ÎļþÃû´Ó Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/dao/impl/WebProcessDaoImpl.java ÐÞ¸Ä |
| | |
| | | package com.vci.web.dao.impl; |
| | | |
| | | import com.vci.common.utility.ObjectUtility; |
| | | import com.vci.constant.WFVariablesKeyConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | |
| | | import com.vci.corba.workflow.WorkflowServicePrx; |
| | | import com.vci.corba.workflow.data.*; |
| | | import com.vci.dto.ProcessTemplateVO; |
| | | import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.model.ProcessInstance; |
| | | import com.vci.model.ProcessTask; |
| | | import com.vci.model.WFProcessClassifyDO; |
| | | import com.vci.model.WFProcessTemplateDO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.pagemodel.PageHelper; |
| | | import com.vci.starter.web.pagemodel.SessionInfo; |
| | | import com.vci.starter.web.util.BeanUtil; |
| | | import com.vci.starter.web.util.BeanUtilForVCI; |
| | | import com.vci.starter.web.util.VciBaseUtil; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.constant.WFVariablesKeyConstant; |
| | | import com.vci.web.dao.WebProcessDaoI; |
| | | import com.vci.model.ProcessInstance; |
| | | import com.vci.model.ProcessTask; |
| | | import com.vci.model.WFProcessClassifyDO; |
| | | import com.vci.model.WFProcessTemplateDO; |
| | | import com.vci.web.service.OsLifeCycleServiceI; |
| | | import com.vci.web.service.SmUserQueryServiceI; |
| | | import com.vci.web.service.WebBoServiceI; |
| | | import com.vci.web.service.WebLifeCycleServiceI; |
| | | import com.vci.web.service.WebLoServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | |
| | | import org.springframework.stereotype.Repository; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | */ |
| | | @Repository |
| | | public class WebProcessDaoImpl implements WebProcessDaoI { |
| | | |
| | | @Autowired |
| | | private WebBoServiceI boService; |
| | | |
| | | @Autowired |
| | | private WebLoServiceI loService; |
| | | |
| | | @Autowired |
| | | private OsLifeCycleServiceI lifeCycleService; |
| | | |
| | | /** |
| | | * ç¨æ·æ¥è¯¢æå¡ |
| | | */ |
| | | @Autowired |
| | | private SmUserQueryServiceI userQueryService; |
| | | |
| | | /** |
| | | * æ¥å¿ |
| | |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * æé æ¹æ³ï¼åå§åå¹³å°çæµç¨æå¡ |
| | | */ |
| | | |
| | | /** |
| | | * å¤è¯è¨çåç¼ |
| | | */ |
| | | private final String msgCodePrefix = "com.vci.web.flow."; |
| | | |
| | | @Resource |
| | | private WebBoServiceI boService; |
| | | |
| | | @Resource |
| | | private WebLoServiceI loService; |
| | | |
| | | @Resource |
| | | private WebLifeCycleServiceI lifeCycleService; |
| | | |
| | | /** |
| | | * ç¨æ·æ¥è¯¢æå¡ |
| | | */ |
| | | @Autowired |
| | | private SmUserQueryServiceI userQueryService; |
| | | |
| | | /** |
| | | * å¹³å°çæµç¨æå¡ |
| | |
| | | conditionMap.put("lcstatus", "Executing"); |
| | | btmType = workitemBtmType; |
| | | }else{ |
| | | throw new VciBaseException("msgCodePrefix",new String[]{doTaskType+""}); |
| | | throw new VciBaseException(msgCodePrefix+"doTaskTypeError",new String[]{doTaskType+""}); |
| | | } |
| | | List<String> causeList = new ArrayList<String>(); |
| | | causeList.add("*"); |
| | |
| | | List<ProcessTaskVO> taskVOList = new ArrayList<>(); |
| | | Optional.ofNullable(tasks).orElseGet(()->new ArrayList<>()).stream().forEach(task->{ |
| | | ProcessTaskVO taskVO = new ProcessTaskVO(); |
| | | BeanUtil.convert(task,taskVO); |
| | | BeanUtilForVCI.convert(task,taskVO); |
| | | taskVOList.add(taskVO); |
| | | }); |
| | | return taskVOList; |
| | |
| | | if(process == null || StringUtils.isBlank(process.getOid())){ |
| | | throw new VciBaseException(DATA_OID_NOT_EXIST); |
| | | } |
| | | BeanUtil.convert(process,processInstanceVO); |
| | | BeanUtilForVCI.convert(process,processInstanceVO); |
| | | return processInstanceVO; |
| | | } |
| | | |
| | |
| | | * @throws VciBaseException |
| | | */ |
| | | @Override |
| | | public void endProcess(String executionId) throws VciBaseException { |
| | | public void endProcess(String executionId) { |
| | | try { |
| | | DataGrid dataGrid = getDataByProcess(executionId,null); |
| | | //å
è·åä¸ä¸ |
| | |
| | | } |
| | | } catch (PLException vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | throw new VciBaseException("ç»ææµç¨å¤±è´¥ï¼", new Object[]{}, e); |
| | | } |
| | | } |
| | | |
| | | private void resetLcStatusForBusinessData(List<Map> bussinesDataList,String resetStatus) throws VciBaseException{ |
| | | private void resetLcStatusForBusinessData(List<Map> bussinesDataList,String resetStatus) throws Exception{ |
| | | if(bussinesDataList!=null && bussinesDataList.size() > 0){ |
| | | String btmType = ""; |
| | | String lctId = ""; |
| | |
| | | List<ProcessInstanceVO> instanceVOS = new ArrayList<>(); |
| | | Optional.ofNullable(processInstances).orElseGet(()->new ArrayList<>()).stream().forEach(instance->{ |
| | | ProcessInstanceVO instanceVO = new ProcessInstanceVO(); |
| | | BeanUtil.convert(instance,instanceVO); |
| | | BeanUtilForVCI.convert(instance,instanceVO); |
| | | instanceVOS.add(instanceVO); |
| | | }); |
| | | return instanceVOS; |
| | |
| | | public ProcessClassifyVO processClassifyDO2VO(WFProcessClassifyDO classifyDO){ |
| | | ProcessClassifyVO classifyVO = new ProcessClassifyVO(); |
| | | if(classifyVO!=null){ |
| | | BeanUtil.convert(classifyDO,classifyVO); |
| | | BeanUtilForVCI.convert(classifyDO,classifyVO); |
| | | } |
| | | return classifyVO; |
| | | } |
| | |
| | | public ProcessTemplateVO processTemplateDO2VO(WFProcessTemplateDO templateDO){ |
| | | ProcessTemplateVO templateVO = new ProcessTemplateVO(); |
| | | if(templateVO!=null){ |
| | | BeanUtil.convert(templateDO,templateVO); |
| | | BeanUtilForVCI.convert(templateDO,templateVO); |
| | | } |
| | | return templateVO; |
| | | } |