diff --git a/src/main/java/com/spring/modules/change/mapper/ChangeManagementMapper.java b/src/main/java/com/spring/modules/change/mapper/ChangeManagementMapper.java index fa2e4859..6c98028e 100644 --- a/src/main/java/com/spring/modules/change/mapper/ChangeManagementMapper.java +++ b/src/main/java/com/spring/modules/change/mapper/ChangeManagementMapper.java @@ -189,4 +189,8 @@ public interface ChangeManagementMapper extends BaseMapper{ void deleteChangeCostImpact(@Param("site") String site, @Param("changeNo") String changeNo); void deleteChangeExecutionInfo(@Param("site") String site, @Param("changeNo") String changeNo); + + void updateProcessNodeForReject(@Param("site") String site, @Param("bu") String bu, @Param("requestId") String requestId, @Param("classificationNo") String classificationNo, @Param("nodeId") String nodeId, @Param("nodeConclusion") String nodeConclusion, @Param("rejectOpinion") String rejectOpinion); + + void saveProcessFormBySql(@Param("site") String site, @Param("docNo") String docNo, @Param("classificationNo") String classificationNo); } diff --git a/src/main/java/com/spring/modules/change/service/impl/ChangeManagementServiceImpl.java b/src/main/java/com/spring/modules/change/service/impl/ChangeManagementServiceImpl.java index a1331194..ad43eaee 100644 --- a/src/main/java/com/spring/modules/change/service/impl/ChangeManagementServiceImpl.java +++ b/src/main/java/com/spring/modules/change/service/impl/ChangeManagementServiceImpl.java @@ -1420,7 +1420,7 @@ public class ChangeManagementServiceImpl extends ServiceImpl> isRemarks = res.stream().filter(a -> convertToInt(a.get("isremark")) == 0).collect(Collectors.toList()); // 修改单据的节点结论和驳回意见 - changeManagementMapper.updateProcessNode(paramData.getSite(), paramData.getBu() == null ? "" : paramData.getBu(), paramData.getRequestId(), paramData.getClassificationNo(), paramData.getNodeId(), paramData.getNodeConclusion(), paramData.getRejectOpinion(), paramData.getDomainControlAccount()); + changeManagementMapper.updateProcessNodeForReject(paramData.getSite(), paramData.getBu() == null ? "" : paramData.getBu(), paramData.getRequestId(), paramData.getClassificationNo(), paramData.getNodeId(), paramData.getNodeConclusion(), paramData.getRejectOpinion()); // 2025-05-09 发送统一待办前先调用[删除异构系统指定人员待办流程]接口 DeleteUserRequestInfoParam deleteUserRequestInfoParam = new DeleteUserRequestInfoParam(); @@ -1713,8 +1713,8 @@ public class ChangeManagementServiceImpl extends ServiceImpl queryPartUnitCostList(InventoryPartUnitCostSumEntity inData) { PartInformationEntity partData = partInformationMapper.selectOne(new QueryWrapper().eq("site", inData.getSite()).eq("part_no", inData.getPartNo())); if ("Y".equals(partData.getStatus())) { - Server srv = ifsServer.getIfsServer(ifsUsername, ifsPassword); + // 个人账号查询IFS数据时,需要使用当前登录人的IFS账号密码 + Server srv = getIfsServer(inData.getUserName()); + // Server srv = ifsServer.getIfsServer(ifsUsername, ifsPassword); Map getInventoryValueResponse = baseSearchBean.getInventoryValueByPartNo(srv, partData); if ("200".equals(getInventoryValueResponse.get("resultCode"))) { // 修改物料成本 diff --git a/src/main/resources/mapper/change/ChangeManagementMapper.xml b/src/main/resources/mapper/change/ChangeManagementMapper.xml index 53313aa9..3306d847 100644 --- a/src/main/resources/mapper/change/ChangeManagementMapper.xml +++ b/src/main/resources/mapper/change/ChangeManagementMapper.xml @@ -1082,8 +1082,7 @@ A.update_by = #{userName} from plm_process_form a left join sys_user b on a.domain_control_account = B.domain_control_account - where A.site = #{site} and document_no = #{docNo} and is_remark = 0 - + where A.site = #{site} and document_no = #{docNo} and is_remark = 0 AND B.username = #{userName} @@ -1156,8 +1155,20 @@ set node_conclusion = #{nodeConclusion}, reject_opinion = #{rejectOpinion} where site = #{site} and bu = #{bu} and request_id = #{requestId} - and classification_no = #{classificationNo} and node_id = #{nodeId} and (node_conclusion is null or node_conclusion = '') - + and classification_no = #{classificationNo} + and node_id = #{nodeId} + and domain_control_account = #{domainControlAccount} + and (node_conclusion is null or node_conclusion = '') + + + + update plm_process_form + set node_conclusion = #{nodeConclusion}, + reject_opinion = #{rejectOpinion} + where site = #{site} and bu = #{bu} and request_id = #{requestId} + and classification_no = #{classificationNo} + and node_id = #{nodeId} + and (node_conclusion is null or node_conclusion = '') + + + insert into plm_process_form (site, bu, request_id, workflow_id, node_id, domain_control_account, document_no, document_type, classification_no, + seq_no, node_conclusion, is_remark, step_id, menu_id, create_by, create_date, update_by, update_date) + SELECT + TOP 1 + a.site, + a.bu, + a.request_id, + a.workflow_id, + b.node_id, + domain_control_account, + document_no, + a.document_type, + A.classification_no, + a.seq_no + 10 AS seq_no, + 'Y' AS node_conclusion, + '1' AS is_remark, + b.step_id, + A.menu_id, + a.create_by, + a.create_date, + a.update_by, + a.update_date + FROM + plm_process_form A + LEFT JOIN ( + SELECT + TOP 1 + SITE, + classification_no, + node_id, + node_name, + step_id + FROM plm_request_node + WHERE SITE = #{site} AND classification_no = #{classificationNo} + ORDER BY step_id DESC + ) B ON A.site = B.site AND A.classification_no = B.classification_no + WHERE A.site = #{site} AND document_no = #{docNo} AND a.classification_no IS NOT NULL + ORDER BY A.ID DESC +