Browse Source

流程管理- 流程节点顺序排列

master
yzz 2 years ago
parent
commit
698c02cbb5
  1. 8
      src/main/java/com/spring/modules/request/entity/PlmRequestDetailEntity.java
  2. 2
      src/main/java/com/spring/modules/request/service/impl/RequestManageServiceImpl.java
  3. 15
      src/main/resources/mapper/request/RequestManageMapper.xml

8
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;
}
}

2
src/main/java/com/spring/modules/request/service/impl/RequestManageServiceImpl.java

@ -56,7 +56,7 @@ public class RequestManageServiceImpl extends ServiceImpl<RequestManageMapper, P
.stream()
.map(item -> 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);

15
src/main/resources/mapper/request/RequestManageMapper.xml

@ -81,7 +81,7 @@
AND a.workflow_id like #{query.workflowId}
</if>
<if test = "query.classificationNo != null and query.classificationNo != ''">
AND a.workflow_id like #{query.classificationNo}
AND a.classification_no like #{query.classificationNo}
</if>
</where>
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 @@
<select id="getRequestNodeData" resultType="com.spring.modules.request.vo.PlmRequestDetailVo">
SELECT
a.nodeid nodeId,
a.nodename nodeName
a.nodename nodeName,
a.nodeorder seqNo
FROM VIEW_Process_management_OA_PLM a
<where>
<if test = "workflowId != null and workflowId != ''">
@ -152,11 +153,11 @@
</select>
<insert id="saveRequestNode">
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
<foreach item="data" index="index" collection="list" separator=",">
(#{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})
</foreach>
</insert>
@ -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}
</if>
</where>
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
</select>
<select id="getNodeDetail" parameterType="com.spring.modules.request.vo.PlmRequestDetailVo" resultType="com.spring.modules.request.vo.PlmRequestDetailVo">

Loading…
Cancel
Save