From c8d8a511f45c96ed3a5123a88e48de2ffdbf632a Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期日, 03 十二月 2023 20:00:47 +0800
Subject: [PATCH] 6
---
modules/mainPart/src/main/java/com/zt/life/modules/configItemWarehouse/service/ConfigItemWarehouseService.java | 28 +++++++++++++++++++++-------
1 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/configItemWarehouse/service/ConfigItemWarehouseService.java b/modules/mainPart/src/main/java/com/zt/life/modules/configItemWarehouse/service/ConfigItemWarehouseService.java
index 862c230..30da0ec 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/configItemWarehouse/service/ConfigItemWarehouseService.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/configItemWarehouse/service/ConfigItemWarehouseService.java
@@ -18,9 +18,12 @@
import com.zt.life.sys.service.SysOssConfigService;
import com.zt.modules.coderule.service.SysCodeRuleService;
import com.zt.modules.oss.service.SysOssService;
+import com.zt.modules.workflow.dto.FlowInfoDto;
+import com.zt.modules.workflow.service.WorkflowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zt.common.db.query.QueryFilter;
+
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
@@ -30,11 +33,11 @@
/**
* config_item_warehouse
*
- * @author zt generator
+ * @author zt generator
* @since 1.0.0 2023-11-27
*/
@Service
-public class ConfigItemWarehouseService extends BaseService<ConfigItemWarehouseDao, ConfigItemWarehouse> {
+public class ConfigItemWarehouseService extends BaseService<ConfigItemWarehouseDao, ConfigItemWarehouse> {
@Autowired
private SysOssConfigService sysOssConfigService;
@@ -42,7 +45,7 @@
private SysOssService sysOssService;
@Autowired
- private TestAgencyInfoService testAgencyInfoService;
+ private WorkflowService workflowService;
@Autowired
private SysCodeRuleService sysCodeRuleService;
@@ -85,7 +88,7 @@
else {
Map<String, String> map = new HashMap<>();
map.put("funCode", "config_item_warehouse");
- map.put("projectId",configItemDto.getProjectId().toString());
+ map.put("projectId", configItemDto.getProjectId().toString());
configItemDto.getConfigItemWarehouse().setProjectId(configItemDto.getProjectId());
configItemDto.getConfigItemWarehouse().setCode(sysCodeRuleService.getNewCode(map));
baseDao.insert(configItemDto.getConfigItemWarehouse());
@@ -122,6 +125,16 @@
qaAuditService.insert(qaAudit);
}
}
+
+ Long bizId = configItemDto.getConfigItemWarehouse().getId();
+ FlowInfoDto flowInfoDto = configItemDto.getFlowInfoDto();
+
+ if (flowInfoDto != null && flowInfoDto.getBizId() != null && "tj,bl".contains(flowInfoDto.getSubmitType())) {
+ if ("tj".equals(flowInfoDto.getSubmitType())) {
+ workflowService.startFlow(flowInfoDto.getFlowCode(), bizId);
+ }
+ workflowService.approvePass(flowInfoDto.getFlowCode(), bizId, flowInfoDto.getStepIdMark());
+ }
return true;
}
@@ -132,8 +145,9 @@
ConfigItemWarehouse configItemWarehouse = this.get(warehouseId);
data.setConfigItemWarehouse(configItemWarehouse);
- projectId = configItemWarehouse.getProjectId();
-
+ if (projectId == null) {
+ projectId = configItemWarehouse.getProjectId();
+ }
List<WarehouseCmAudit> CmAuditList = cmAuditService.getList(warehouseId);
data.setCmAuditList(CmAuditList);
List<WarehouseQaAudit> QaAuditList = qaAuditService.getList(warehouseId);
@@ -142,7 +156,7 @@
data.setConfigItemList(ConfigItemList);
} else {
- ConfigItemWarehouse configItemWarehouse =new ConfigItemWarehouse();
+ ConfigItemWarehouse configItemWarehouse = new ConfigItemWarehouse();
data.setConfigItemWarehouse(configItemWarehouse);
List<?> cmList = baseDao.itemList("warehouse_cm_audit");
List<?> CmAuditList = cmList;
--
Gitblit v1.9.1