From 698c02cbb58272ccc7453d9e95c1385704bcc9f8 Mon Sep 17 00:00:00 2001 From: yzz Date: Thu, 25 Apr 2024 15:26:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E7=AE=A1=E7=90=86-=20?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E8=8A=82=E7=82=B9=E9=A1=BA=E5=BA=8F=E6=8E=92?= =?UTF-8?q?=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../request/entity/PlmRequestDetailEntity.java | 8 +++++++- .../service/impl/RequestManageServiceImpl.java | 2 +- .../mapper/request/RequestManageMapper.xml | 15 +++++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/spring/modules/request/entity/PlmRequestDetailEntity.java b/src/main/java/com/spring/modules/request/entity/PlmRequestDetailEntity.java index 01dd92d9..d1ba0273 100644 --- a/src/main/java/com/spring/modules/request/entity/PlmRequestDetailEntity.java +++ b/src/main/java/com/spring/modules/request/entity/PlmRequestDetailEntity.java @@ -124,12 +124,17 @@ public class PlmRequestDetailEntity extends QueryPage implements Serializable { */ private String workflowId; + /** + * 排序 + */ + private Integer seqNo; + public PlmRequestDetailEntity() { } public PlmRequestDetailEntity(String site, String bu, String classificationNo, String nodeId, String nodeName, - String nodeType, String isBranch, Date createDate, String createBy, String remark, String workflowId) { + String nodeType, String isBranch, Date createDate, String createBy, String remark, String workflowId, Integer seqNo) { this.site = site; this.bu = bu; this.classificationNo = classificationNo; @@ -141,6 +146,7 @@ public class PlmRequestDetailEntity extends QueryPage implements Serializable { this.createBy = createBy; this.remark = remark; this.workflowId = workflowId; + this.seqNo = seqNo; } } diff --git a/src/main/java/com/spring/modules/request/service/impl/RequestManageServiceImpl.java b/src/main/java/com/spring/modules/request/service/impl/RequestManageServiceImpl.java index 55fce28b..7f01f9ca 100644 --- a/src/main/java/com/spring/modules/request/service/impl/RequestManageServiceImpl.java +++ b/src/main/java/com/spring/modules/request/service/impl/RequestManageServiceImpl.java @@ -56,7 +56,7 @@ public class RequestManageServiceImpl extends ServiceImpl new PlmRequestDetailEntity(data.getSite(), data.getBu(), data.getClassificationNo(), item.getNodeId(), - item.getNodeName(), "", "", new Date(), data.getCreateBy(), "",workflowId)) + item.getNodeName(), "", "", new Date(), data.getCreateBy(), "",workflowId,item.getSeqNo())) .collect(Collectors.toList()); //保存信息 requestManageMapper.saveRequestNode(nodeList); diff --git a/src/main/resources/mapper/request/RequestManageMapper.xml b/src/main/resources/mapper/request/RequestManageMapper.xml index 4ee25c87..a8689c7e 100644 --- a/src/main/resources/mapper/request/RequestManageMapper.xml +++ b/src/main/resources/mapper/request/RequestManageMapper.xml @@ -81,7 +81,7 @@ AND a.workflow_id like #{query.workflowId} - AND a.workflow_id like #{query.classificationNo} + AND a.classification_no like #{query.classificationNo} group by a.site, a.bu, d.bu_desc, a.classification_no, a.classification_name, a.menu_id, c.name, a.workflow_id, @@ -142,7 +142,8 @@ - INSERT INTO plm_request_node (site,bu,classification_no,node_id,node_name,node_type,create_date,create_by,remark,workflow_id) + INSERT INTO plm_request_node (site,bu,classification_no,node_id,node_name,node_type,create_date,create_by,remark,workflow_id, seq_no) values (#{data.site}, #{data.bu},#{data.classificationNo},#{data.nodeId},#{data.nodeName},#{data.nodeType},#{data.createDate} - ,#{data.createBy},#{data.remark},#{data.workflowId}) + ,#{data.createBy},#{data.remark},#{data.workflowId},#{data.seqNo}) @@ -168,7 +169,8 @@ c.workflowname, a.node_id, a.node_name, - a.node_type + a.node_type, + a.seq_no FROM plm_request_node a LEFT JOIN plm_request_header b ON a.site = b.site and a.classification_no = b.classification_no and a.workflow_id = b.workflow_id LEFT JOIN VIEW_Process_management_OA_PLM c ON a.workflow_id = c.workflowid @@ -183,7 +185,8 @@ AND a.workflow_id like #{query.workflowId} - group by a.site, a.classification_no, a.workflow_id, c.workflowname, a.node_id, a.node_name, a.node_type + group by a.site, a.classification_no, a.workflow_id, c.workflowname, a.node_id, a.node_name, a.node_type, a.seq_no + order by a.seq_no