From 23855599412c4d61b38d78f0f3abd3430a48b5b1 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期三, 25 六月 2025 11:51:38 +0800
Subject: [PATCH] Merge branch 'mdc_hyjs_master'

---
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/xml/ProcessStreamMapper.xml |   66 +++++++++++++++++++++++++++++++++
 1 files changed, 66 insertions(+), 0 deletions(-)

diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/xml/ProcessStreamMapper.xml b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/xml/ProcessStreamMapper.xml
new file mode 100644
index 0000000..a7d298a
--- /dev/null
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/xml/ProcessStreamMapper.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="org.jeecg.modules.dnc.mapper.ProcessStreamMapper">
+    <select id="getByUserPerms" resultType="org.jeecg.modules.dnc.entity.ProcessStream">
+        select
+               p.PROCESS_ID
+             , p.product_id
+             , p.component_id
+             , p.parts_id
+             , p.psv_id
+             , p.PROCESS_NAME
+             , p.PROCESS_CODE
+             , p.CRAFT_NO
+             , p.PROCESS_TYPE
+             , p.PROCESSING_EQUIPMENT_MODEL
+             , p.PROCESSING_EQUIPMENT_CODE
+             , p.ASSEMBLE_STEP
+             , p.ASSEMBLE_NAME
+             , p.DESCRIPTION
+             , p.CREATE_TIME
+             , p.create_by
+             , p.UPDATE_TIME
+             , p.update_by
+             , (select sys_user.realname from sys_user where p.create_by=sys_user.username) as createName
+             , (select sys_user.realname from sys_user where p.update_by=sys_user.username) as updateName
+        from nc_process_stream p
+                 inner join
+             (select business_id,business_type from nc_permission_stream_new where delete_flag = 0 and user_id=#{userId}) s
+             on p.PROCESS_ID = s.business_id and s.business_type='5'
+        where p.delete_flag = 0
+    </select>
+    <select id="findByPartsAndComponents" resultType="org.jeecg.modules.dnc.entity.ProcessStream">
+        SELECT
+        *
+        FROM
+        nc_process_stream ps
+        WHERE
+        ps.PROCESS_ID IN (
+        SELECT
+        pss.PROCESS_ID
+        FROM
+        nc_process_stream pss
+        WHERE
+        1=1
+        <if test="productId != null and productId != ''">
+        AND pss.PRODUCT_ID = #{productId}
+        </if>
+        <if test="componentIds != null and componentIds.size() > 0">
+        AND pss.COMPONENT_ID IN
+        <foreach collection = "componentIds" item = "componentId" index = "index" open = "(" close= ")" separator = ",">
+        #{ componentId }
+        </foreach>
+        </if>
+        AND (
+        pss.PARTS_ID IS NULL
+        <if test="partsIds != null and partsIds.size() > 0">
+        OR pss.PARTS_ID IN
+        <foreach collection = "partsIds" item = "partsId" index = "index" open = "(" close = ")" separator = ",">
+        #{ partsId }
+        </foreach>
+        </if>
+        )
+        );
+
+    </select>
+</mapper>

--
Gitblit v1.9.3