|
|
@@ -1,21 +1,17 @@ |
|
|
|
package com.ningdatech.pmapi.scheduler.task; |
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.date.StopWatch; |
|
|
|
import cn.hutool.core.util.IdUtil; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.ningdatech.basic.exception.BizException; |
|
|
|
import com.ningdatech.pmapi.scheduler.contants.TaskContant; |
|
|
|
import com.ningdatech.pmapi.sys.contant.RegionConst; |
|
|
|
import com.ningdatech.pmapi.sys.entity.Region; |
|
|
|
import com.ningdatech.pmapi.sys.service.IRegionService; |
|
|
|
import com.wflow.bean.entity.WflowModelHistorys; |
|
|
|
import com.wflow.bean.dto.WflowModelHistorysDto; |
|
|
|
import com.wflow.bean.entity.WflowModels; |
|
|
|
import com.wflow.mapper.WflowModelHistorysMapper; |
|
|
|
import com.wflow.mapper.WflowModelsMapper; |
|
|
|
import com.wflow.workflow.bean.process.ProcessNode; |
|
|
|
import com.wflow.workflow.service.ProcessModelService; |
|
|
|
import com.wflow.workflow.service.WflowFormsService; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@@ -102,7 +98,7 @@ public class InitProcessTask { |
|
|
|
|
|
|
|
String[] processList = TaskContant.Wflow.DEFAULT_PROCESS_LIST; |
|
|
|
for(String processName : processList){ |
|
|
|
WflowModelHistorys models = new WflowModelHistorys(); |
|
|
|
WflowModelHistorysDto models = new WflowModelHistorysDto(); |
|
|
|
models.setCreated(GregorianCalendar.getInstance().getTime()); |
|
|
|
// models.setFormId("wf" + IdUtil.objectId()); |
|
|
|
models.setVersion(1); |
|
|
@@ -110,7 +106,8 @@ public class InitProcessTask { |
|
|
|
// models.setProcessDefId("pd" + IdUtil.objectId()); |
|
|
|
models.setFormName(processName); |
|
|
|
models.setRegionCode(region.getRegionCode()); |
|
|
|
models.setProcess("{\"id\":\"root\",\"desc\":\"任何人\",\"name\":\"发起人\",\"type\":\"ROOT\",\"props\":{},\"children\":{},\"parentId\":null}"); |
|
|
|
ProcessNode processNode = new ProcessNode(); |
|
|
|
models.setProcess(processNode); |
|
|
|
models.setSettings("{\"sign\":false,\"admin\":[],\"notify\":{},\"commiter\":[]}"); |
|
|
|
models.setFormItems("[]"); |
|
|
|
|
|
|
|