From cd977f63bec817ea46d8e9f5d130062bbe2d5055 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Sat, 31 May 2025 14:12:00 +0800 Subject: [PATCH] =?UTF-8?q?2025-05-31=20=20=E4=BC=9A=E7=AD=BE=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=97=B6=EF=BC=8C=E5=85=B6=E4=B8=AD=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E9=A9=B3=E5=9B=9E=E5=B0=B1=E7=AE=97=E9=A9=B3=E5=9B=9E?= =?UTF-8?q?=20=E5=90=8C=E6=84=8F=E7=9A=84=E8=AF=9D=E4=B8=8D=E5=8F=98=20sql?= =?UTF-8?q?=E5=92=8C=E9=A9=B3=E5=9B=9E=E5=88=86=E5=BC=80=20=20=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E8=B4=A6=E5=8F=B7=E6=9F=A5=E8=AF=A2IFS=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=97=B6=EF=BC=8C=E9=9C=80=E8=A6=81=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E7=99=BB=E5=BD=95=E4=BA=BA=E7=9A=84IFS?= =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E5=AF=86=E7=A0=81=20=20=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=97=B6=EF=BC=8C=E6=8C=89=E7=85=A7=E5=A6=82?= =?UTF-8?q?=E4=B8=8BSQL=E6=8F=92=E5=85=A5=E5=88=B0process=E8=A1=A8?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E8=B0=83=E6=95=B4=E5=90=8E=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AD=98=E5=82=A8=E8=BF=87=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../change/mapper/ChangeManagementMapper.java | 4 ++ .../impl/ChangeManagementServiceImpl.java | 12 ++-- .../InventoryPartUnitCostSumEntity.java | 2 + .../impl/PartInformationServiceImpl.java | 4 +- .../mapper/change/ChangeManagementMapper.xml | 60 +++++++++++++++++-- 5 files changed, 71 insertions(+), 11 deletions(-) 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 +