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()); } }