zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package cn.autoform.web.service.process.impl;
 
import cn.autoform.bean.ProcessState;
import cn.autoform.fw.exception.FormClientException;
import cn.autoform.web.client.FormClient;
import cn.autoform.web.mapper.formset.FormSetMapper;
import cn.autoform.web.service.process.ProcessStateService;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import javax.swing.text.html.Option;
import java.util.Optional;
import java.util.concurrent.TimeoutException;
@Service("processStateServiceImpl")
public class ProcessStateServiceImpl implements ProcessStateService{
    
    //修改业务系统
    @Resource
    private FormClient client;
    
    @Resource
    private FormSetMapper formSet;
    
    
    public static final String cloud = "cloud";
    
    public static final String service = "services";
    
    @Override
    public int updateState(ProcessState process) throws FormClientException, TimeoutException {
        
        /**
         * 判断是业务系统还是云存储
         */
//        process =new ProcessState();
//        client.updateState(process);
            client.updateState(process);
        return 1;
    }
 
    @Override
    public ProcessState selectState(ProcessState process) throws TimeoutException, FormClientException {
        return Optional.ofNullable(client.selectState(process)).orElse(new ProcessState());
    }
    
}