From 2c7661d0bca739a9b403cdd420d2b91eb77470e6 Mon Sep 17 00:00:00 2001
From: admin <15939171744@163.com>
Date: 星期一, 29 四月 2024 19:48:32 +0800
Subject: [PATCH] -

---
 jcdm-main/src/main/resources/mapper/bs/formulaChild/BsFormulaChildInfoMapper.xml |   53 +++++++++++++++++++++++++++++++----------------------
 1 files changed, 31 insertions(+), 22 deletions(-)

diff --git a/jcdm-main/src/main/resources/mapper/bs/formulaChild/BsFormulaChildInfoMapper.xml b/jcdm-main/src/main/resources/mapper/bs/formulaChild/BsFormulaChildInfoMapper.xml
index 750f29a..05bb608 100644
--- a/jcdm-main/src/main/resources/mapper/bs/formulaChild/BsFormulaChildInfoMapper.xml
+++ b/jcdm-main/src/main/resources/mapper/bs/formulaChild/BsFormulaChildInfoMapper.xml
@@ -23,16 +23,18 @@
         <result property="createTime"    column="create_time"    />
         <result property="updateUser"    column="update_user"    />
         <result property="updateTime"    column="update_time"    />
-        <result property="spareField1"    column="spare_field_1"    />
-        <result property="spareField2"    column="spare_field_2"    />
-        <result property="spareField3"    column="spare_field_3"    />
-        <result property="spareField4"    column="spare_field_4"    />
+        <result property="spareField1"    column="spare_field1"    />
+        <result property="spareField2"    column="spare_field2"    />
+        <result property="spareField3"    column="spare_field3"    />
+        <result property="spareField4"    column="spare_field4"    />
         <result property="collectData"    column="collect_data"    />
         <result property="results"    column="results"    />
+        <result property="counts"    column="counts"    />
+
     </resultMap>
 
     <sql id="selectBsFormulaChildInfoVo">
-        select id, workshop_code, line_code, processes_code, product_code, operation_steps, tech_requirement, operation_type, step_sort, param_code, material_code, formula_code, picture, remarks, create_user, create_time, update_user, update_time, spare_field_1, spare_field_2, spare_field_3, spare_field_4, collect_data, results from bs_formula_child_info
+        select id, workshop_code, line_code, processes_code, product_code, operation_steps, tech_requirement, operation_type, step_sort, param_code, material_code, formula_code, picture, remarks, create_user, create_time, update_user, update_time, spare_field1, spare_field2, spare_field3, spare_field4, collect_data, results from bs_formula_child_info
     </sql>
 
     <select id="selectBsFormulaChildInfoList" parameterType="BsFormulaChildInfo" resultMap="BsFormulaChildInfoResult">
@@ -47,6 +49,10 @@
             <if test="collectData != null  and collectData != ''"> and collect_data = #{collectData}</if>
             <if test="results != null  and result != ''"> and result = #{results}</if>
             <if test="materialCode != null  and materialCode != ''"> and material_code = #{materialCode}</if>
+            <if test="paramCode != null  and paramCode != ''"> and param_code = #{paramCode}</if>
+            <if test="spareField4 != null  and spareField4 != ''"> and spare_field4 = #{spareField4}</if>
+
+
 
         </where>
         ORDER BY step_sort ASC
@@ -77,10 +83,10 @@
             <if test="createTime != null">create_time,</if>
             <if test="updateUser != null">update_user,</if>
             <if test="updateTime != null">update_time,</if>
-            <if test="spareField1 != null">spare_field_1,</if>
-            <if test="spareField2 != null">spare_field_2,</if>
-            <if test="spareField3 != null">spare_field_3,</if>
-            <if test="spareField4 != null">spare_field_4,</if>
+            <if test="spareField1 != null">spare_field1,</if>
+            <if test="spareField2 != null">spare_field2,</if>
+            <if test="spareField3 != null">spare_field3,</if>
+            <if test="spareField4 != null">spare_field4,</if>
             <if test="collectData != null">collect_data,</if>
             <if test="results != null">results,</if>
          </trim>
@@ -131,10 +137,10 @@
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateUser != null">update_user = #{updateUser},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
-            <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
-            <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
-            <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
-            <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
+            <if test="spareField1 != null">spare_field1 = #{spareField1},</if>
+            <if test="spareField2 != null">spare_field2 = #{spareField2},</if>
+            <if test="spareField3 != null">spare_field3 = #{spareField3},</if>
+            <if test="spareField4 != null">spare_field4 = #{spareField4},</if>
             <if test="collectData != null">collect_data = #{collectData},</if>
             <if test="results != null">results = #{results},</if>
         </trim>
@@ -174,15 +180,18 @@
         ORDER BY step_sort ASC
     </select>
 
-    <select id="releaseCheck" resultMap="BsFormulaChildInfoResult" parameterType="BsFormulaChildInfo">
-        SELECT
-            *
-        FROM
-            bs_formula_child_info
-        WHERE
-            NOT results = 'OK'
-          AND product_code = #{productCode}
-          AND processes_code = #{processesCode};
+    <select id="getCount" parameterType="BsFormulaChildInfo" resultMap="BsFormulaChildInfoResult">
+        SELECT COUNT(*) AS counts
+        FROM bs_formula_child_info
+        WHERE (processes_code = #{processesCode} AND product_code = #{productCode})
+          AND (results IS NULL OR results = '');
+    </select>
+
+    <select id="releaseCheck" parameterType="BsFormulaChildInfo" resultMap="BsFormulaChildInfoResult">
+        SELECT COUNT(*) AS counts
+        FROM bs_formula_child_info
+        WHERE (processes_code = #{processesCode} AND product_code = #{productCode})
+          AND (results IS NULL OR results = '');
     </select>
 
     <update id="workpieceRelease" parameterType="BsFormulaChildInfo">

--
Gitblit v1.9.3