jinlin
2023-12-07 4a5e36e2d8aaa767cd9d4b79fe66770a1fe5e567
modules/mainPart/src/main/java/com/zt/life/modules/configItemWarehouse/service/ConfigItemWarehouseService.java
@@ -15,6 +15,8 @@
import com.zt.life.modules.project.model.SoftwareTestOrderMeasured;
import com.zt.life.modules.project.service.ProjectService;
import com.zt.life.modules.sysBaseInfo.service.TestAgencyInfoService;
import com.zt.life.modules.testCheckOrder.model.TestCheckOrder;
import com.zt.life.modules.testCheckOrder.service.TestCheckOrderService;
import com.zt.life.sys.service.SysOssConfigService;
import com.zt.modules.coderule.service.SysCodeRuleService;
import com.zt.modules.oss.service.SysOssService;
@@ -62,6 +64,9 @@
    @Autowired
    private WarehouseConfigItemService configItemService;
    @Autowired
    private TestCheckOrderService testCheckOrderService;
    /**
     * 分页查询
     *
@@ -98,10 +103,33 @@
        for (WarehouseConfigItem configItem : configItemDto.getConfigItemList()) {
            configItem.setWarehouseId(warehouseId);
            if (configItem.getId() != null) {
                if (configItem.getCheckId()!=null){
                    String code ="719CTC-09-ST";
                    String projectCode = configItemDto.getProject().getCode();
                    if (configItem.getItemName().equals("软件测试计划")){
                        code=code+"P";
                    }else if (configItem.getItemName().equals("软件测试说明")){
                        code=code+"D";
                    }else if (configItem.getItemName().equals("软件测试记录")){
                        code=code+"H";
                    }else if (configItem.getItemName().equals("软件测试报告")){
                        code=code+"R";
                    }
                    configItem.setItemIdentify(code+"-"+projectCode);
                }
                configItemService.update(configItem);
            } else {
                configItem.setWarehouseId(warehouseId);
                configItemService.insert(configItem);
            }
            Long checkId = configItem.getCheckId();
            if (checkId != null) {
                TestCheckOrder testCheckOrder = testCheckOrderService.get(checkId);
                if (testCheckOrder.getConfigItemId() == null) {
                    Long configItemId = configItem.getId();
                    testCheckOrder.setConfigItemId(configItemId);
                    testCheckOrderService.update(testCheckOrder);
                }
            }
            sysOssConfigService.updateOss(configItem.getId(), configItem.getFiles());// 保存附件
        }
@@ -129,7 +157,7 @@
        Long bizId = configItemDto.getConfigItemWarehouse().getId();
        FlowInfoDto flowInfoDto = configItemDto.getFlowInfoDto();
        if (flowInfoDto != null && "tj,bl".contains(flowInfoDto.getSubmitType())) {
        if (flowInfoDto != null && flowInfoDto.getSubmitType() != null && "tj,bl".contains(flowInfoDto.getSubmitType())) {
            if ("tj".equals(flowInfoDto.getSubmitType())) {
                workflowService.startFlow(flowInfoDto.getFlowCode(), bizId);
            }