diff --git a/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java b/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java index 08ce7483..e152c9f3 100644 --- a/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java +++ b/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java @@ -1159,6 +1159,7 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification List operatorList = technicalSpecificationMapper.selectTechnicalSpecificationTeam(data.getSite(), data.getCodeNo()); List engineers = operatorList.stream().filter(a -> "engineer".equals(a.getType())).collect(Collectors.toList()); List technicians = operatorList.stream().filter(a -> "technician".equals(a.getType())).collect(Collectors.toList()); + List dccs = operatorList.stream().filter(a -> "dcc".equals(a.getType())).collect(Collectors.toList()); // 根据字段对应的数据库表+字段查询出数据 for (PlmRequestDetailVo nodeDetail : nodeDetails) { @@ -1201,7 +1202,7 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification } fieldValues.append(oaIds.get(0).getId()).append(","); } - } else if ("technician".equals(nodeDetail.getPlmField().split("#")[1])) { + } else if ("technician".equals(nodeDetail.getPlmField().split("#")[1])) { for (PlmTechnicalSpecificationTeamData technician : technicians) { // 根据域控账号获取oa人员id List oaIds = sysUserDao.selectOaIdByAccount(technician.getDomainControlAccount()); @@ -1210,6 +1211,15 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification } fieldValues.append(oaIds.get(0).getId()).append(","); } + } else if ("dcc".equals(nodeDetail.getPlmField().split("#")[1])) { + for (PlmTechnicalSpecificationTeamData dcc : dccs) { + // 根据域控账号获取oa人员id + List oaIds = sysUserDao.selectOaIdByAccount(dcc.getDomainControlAccount()); + if (oaIds.isEmpty()) { + throw new RuntimeException("未获取到域控账号对应的OA人员!"); + } + fieldValues.append(oaIds.get(0).getId()).append(","); + } } fieldValue = fieldValues.length() > 0 ? fieldValues.substring(0, fieldValues.length() - 1) : ""; } @@ -1265,6 +1275,7 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification List operatorList = technicalSpecificationMapper.selectTechnicalSpecificationTeam(data.getSite(), data.getCodeNo()); List engineers = operatorList.stream().filter(a -> "engineer".equals(a.getType())).collect(Collectors.toList()); List technicians = operatorList.stream().filter(a -> "technician".equals(a.getType())).collect(Collectors.toList()); + List dccs = operatorList.stream().filter(a -> "dcc".equals(a.getType())).collect(Collectors.toList()); ParamData paramData = new ParamData(data.getSite(), baseData.get("nodeId"), data.getCodeNo(), data.getUserName(), baseData.get("classificationNo"), baseData.get("userId"), baseData.get("workflowId"), baseData.get("workflowname"), baseData.get("requestName"), baseData.get("path"), baseData.get("requestId"), @@ -1278,7 +1289,7 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification cData.setNodeId(paramData.getNodeId()); cData.setWorkflowId(paramData.getWorkflowId()); List controlList = requestManageService.getProcessSelect(cData); - if(controlList.size()>0){ + if(!controlList.isEmpty()){ for (int i = 0; i < controlList.size(); i++) { requestManageService.doProcessControl(controlList.get(i).getRoleId(),data.getSite(),data.getCodeNo()); } @@ -1337,6 +1348,15 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification } fieldValues.append(oaIds.get(0).getId()).append(","); } + } else if ("dcc".equals(nodeDetail.getPlmField().split("#")[1])) { + for (PlmTechnicalSpecificationTeamData dcc : dccs) { + // 根据域控账号获取oa人员id + List oaIds = sysUserDao.selectOaIdByAccount(dcc.getDomainControlAccount()); + if (oaIds.isEmpty()) { + throw new RuntimeException("未获取到域控账号对应的OA人员!"); + } + fieldValues.append(oaIds.get(0).getId()).append(","); + } } fieldValue = fieldValues.length() > 0 ? fieldValues.substring(0, fieldValues.length() - 1) : ""; } diff --git a/src/main/resources/mapper/change/ChangeManagementMapper.xml b/src/main/resources/mapper/change/ChangeManagementMapper.xml index 5208bf1e..fa60bb7f 100644 --- a/src/main/resources/mapper/change/ChangeManagementMapper.xml +++ b/src/main/resources/mapper/change/ChangeManagementMapper.xml @@ -1074,7 +1074,7 @@ node_conclusion, nodeConclusionDesc, update_date, - create_by, + username as create_by, reject_opinion, updateBy from (select @@ -1089,7 +1089,7 @@ c.node_conclusion, case when c.node_conclusion = 'Y' then '同意' when c.node_conclusion = 'N' then '驳回' else '' end as nodeConclusionDesc, CAST(c.update_date AS DATETIME2(0)) AS update_date, - c.create_by, + d.username, CAST(c.create_date AS DATETIME2(0)) AS create_date, c.reject_opinion, case when c.update_by is null then d.username else c.update_by end as updateBy