wente
2023-12-05 bb9bf60cbd34d0638f1df89c69358533b2cc220c
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());
@@ -100,6 +103,7 @@
                configItem.setWarehouseId(warehouseId);
                configItemService.insert(configItem);
            }
            sysOssConfigService.updateOss(configItem.getId(), configItem.getFiles());// 保存附件
        }
        for (WarehouseCmAudit cmAudit : configItemDto.getCmAuditList()) {
@@ -121,8 +125,16 @@
                qaAuditService.insert(qaAudit);
            }
        }
        sysOssConfigService.updateOss(configItemDto.getId(), configItemDto.getFiles());// 保存附件
        Long bizId = configItemDto.getConfigItemWarehouse().getId();
        FlowInfoDto flowInfoDto = configItemDto.getFlowInfoDto();
        if (flowInfoDto != 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;
    }
@@ -133,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);
@@ -143,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;