From 2aea64bfec61758ef8a4cc87853d48b5e7320f2d Mon Sep 17 00:00:00 2001
From: jiang <1354748262@qq.com>
Date: 星期六, 13 一月 2024 16:29:10 +0800
Subject: [PATCH] 更新订单排产

---
 jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml |  100 +++++++++++++++++++++++++++++++++++++------------
 1 files changed, 75 insertions(+), 25 deletions(-)

diff --git a/jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml b/jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml
index 2dd716d..f906af9 100644
--- a/jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml
+++ b/jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml
@@ -5,7 +5,8 @@
 <mapper namespace="com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper">
     
     <resultMap type="BsOrderScheduling" id="BsOrderSchedulingResult">
-        <result property="orderNumber"    column="order_number"    />
+        <result property="id"    column="id"    />
+        <result property="orderNo"    column="order_no"    />
         <result property="engineNo"    column="engine_no"    />
         <result property="productType"    column="product_type"    />
         <result property="model"    column="model"    />
@@ -16,20 +17,30 @@
         <result property="whetherOrPrint"    column="whether_or_print"    />
         <result property="report10"    column="report_10"    />
         <result property="report20"    column="report_20"    />
-        <result property="combinedBoxLaunch"    column="combined_box_launch"    />
-        <result property="finalAssemblyOffline"    column="final_assembly_offline"    />
+        <result property="combinedBoxTime"    column="combined_box_time"    />
+        <result property="finalAssemblyTime"    column="final_assembly_time"    />
         <result property="operator"    column="operator"    />
         <result property="operateTime"    column="operate_time"    />
+        <result property="status"    column="status"    />
+        <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="createUser"    column="create_user"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateUser"    column="update_user"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remarks"    column="remarks"    />
     </resultMap>
 
     <sql id="selectBsOrderSchedulingVo">
-        select order_number, engine_no, product_type, model, production_status, working_hours, current_workstation, quality_status, whether_or_print, report_10, report_20, combined_box_launch, final_assembly_offline, operator, operate_time from bs_order_scheduling
+        select id, order_no, engine_no, product_type, model, production_status, working_hours, current_workstation, quality_status, whether_or_print, report_10, report_20, combined_box_time, final_assembly_time, operator, operate_time, status, spare_field_1, spare_field_2, spare_field_3, spare_field_4, create_user, create_time, update_user, update_time, remarks from bs_order_scheduling
     </sql>
 
     <select id="selectBsOrderSchedulingList" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
         <include refid="selectBsOrderSchedulingVo"/>
         <where>  
-            <if test="orderNumber != null  and orderNumber != ''"> and order_number = #{orderNumber}</if>
+            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
             <if test="engineNo != null  and engineNo != ''"> and engine_no = #{engineNo}</if>
             <if test="productType != null  and productType != ''"> and product_type = #{productType}</if>
             <if test="model != null  and model != ''"> and model = #{model}</if>
@@ -40,22 +51,30 @@
             <if test="whetherOrPrint != null  and whetherOrPrint != ''"> and whether_or_print = #{whetherOrPrint}</if>
             <if test="report10 != null  and report10 != ''"> and report_10 = #{report10}</if>
             <if test="report20 != null  and report20 != ''"> and report_20 = #{report20}</if>
-            <if test="combinedBoxLaunch != null  and combinedBoxLaunch != ''"> and combined_box_launch = #{combinedBoxLaunch}</if>
-            <if test="finalAssemblyOffline != null  and finalAssemblyOffline != ''"> and final_assembly_offline = #{finalAssemblyOffline}</if>
+            <if test="combinedBoxTime != null  and combinedBoxTime != ''"> and combined_box_time = #{combinedBoxTime}</if>
+            <if test="finalAssemblyTime != null  and finalAssemblyTime != ''"> and final_assembly_time = #{finalAssemblyTime}</if>
             <if test="operator != null  and operator != ''"> and operator = #{operator}</if>
             <if test="operateTime != null  and operateTime != ''"> and operate_time = #{operateTime}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="spareField1 != null  and spareField1 != ''"> and spare_field_1 = #{spareField1}</if>
+            <if test="spareField2 != null  and spareField2 != ''"> and spare_field_2 = #{spareField2}</if>
+            <if test="spareField3 != null  and spareField3 != ''"> and spare_field_3 = #{spareField3}</if>
+            <if test="spareField4 != null  and spareField4 != ''"> and spare_field_4 = #{spareField4}</if>
+            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
+            <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
+            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
         </where>
     </select>
     
-    <select id="selectBsOrderSchedulingByOrderNumber" parameterType="String" resultMap="BsOrderSchedulingResult">
+    <select id="selectBsOrderSchedulingById" parameterType="Long" resultMap="BsOrderSchedulingResult">
         <include refid="selectBsOrderSchedulingVo"/>
-        where order_number = #{orderNumber}
+        where id = #{id}
     </select>
         
-    <insert id="insertBsOrderScheduling" parameterType="BsOrderScheduling">
+    <insert id="insertBsOrderScheduling" parameterType="BsOrderScheduling" useGeneratedKeys="true" keyProperty="id">
         insert into bs_order_scheduling
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="orderNumber != null">order_number,</if>
+            <if test="orderNo != null">order_no,</if>
             <if test="engineNo != null">engine_no,</if>
             <if test="productType != null">product_type,</if>
             <if test="model != null">model,</if>
@@ -66,13 +85,23 @@
             <if test="whetherOrPrint != null">whether_or_print,</if>
             <if test="report10 != null">report_10,</if>
             <if test="report20 != null">report_20,</if>
-            <if test="combinedBoxLaunch != null">combined_box_launch,</if>
-            <if test="finalAssemblyOffline != null">final_assembly_offline,</if>
+            <if test="combinedBoxTime != null">combined_box_time,</if>
+            <if test="finalAssemblyTime != null">final_assembly_time,</if>
             <if test="operator != null">operator,</if>
             <if test="operateTime != null">operate_time,</if>
+            <if test="status != null">status,</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="createUser != null">create_user,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateUser != null">update_user,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remarks != null">remarks,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="orderNumber != null">#{orderNumber},</if>
+            <if test="orderNo != null">#{orderNo},</if>
             <if test="engineNo != null">#{engineNo},</if>
             <if test="productType != null">#{productType},</if>
             <if test="model != null">#{model},</if>
@@ -83,16 +112,27 @@
             <if test="whetherOrPrint != null">#{whetherOrPrint},</if>
             <if test="report10 != null">#{report10},</if>
             <if test="report20 != null">#{report20},</if>
-            <if test="combinedBoxLaunch != null">#{combinedBoxLaunch},</if>
-            <if test="finalAssemblyOffline != null">#{finalAssemblyOffline},</if>
+            <if test="combinedBoxTime != null">#{combinedBoxTime},</if>
+            <if test="finalAssemblyTime != null">#{finalAssemblyTime},</if>
             <if test="operator != null">#{operator},</if>
             <if test="operateTime != null">#{operateTime},</if>
+            <if test="status != null">#{status},</if>
+            <if test="spareField1 != null">#{spareField1},</if>
+            <if test="spareField2 != null">#{spareField2},</if>
+            <if test="spareField3 != null">#{spareField3},</if>
+            <if test="spareField4 != null">#{spareField4},</if>
+            <if test="createUser != null">#{createUser},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateUser != null">#{updateUser},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remarks != null">#{remarks},</if>
          </trim>
     </insert>
 
     <update id="updateBsOrderScheduling" parameterType="BsOrderScheduling">
         update bs_order_scheduling
         <trim prefix="SET" suffixOverrides=",">
+            <if test="orderNo != null">order_no = #{orderNo},</if>
             <if test="engineNo != null">engine_no = #{engineNo},</if>
             <if test="productType != null">product_type = #{productType},</if>
             <if test="model != null">model = #{model},</if>
@@ -103,22 +143,32 @@
             <if test="whetherOrPrint != null">whether_or_print = #{whetherOrPrint},</if>
             <if test="report10 != null">report_10 = #{report10},</if>
             <if test="report20 != null">report_20 = #{report20},</if>
-            <if test="combinedBoxLaunch != null">combined_box_launch = #{combinedBoxLaunch},</if>
-            <if test="finalAssemblyOffline != null">final_assembly_offline = #{finalAssemblyOffline},</if>
+            <if test="combinedBoxTime != null">combined_box_time = #{combinedBoxTime},</if>
+            <if test="finalAssemblyTime != null">final_assembly_time = #{finalAssemblyTime},</if>
             <if test="operator != null">operator = #{operator},</if>
             <if test="operateTime != null">operate_time = #{operateTime},</if>
+            <if test="status != null">status = #{status},</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="createUser != null">create_user = #{createUser},</if>
+            <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="remarks != null">remarks = #{remarks},</if>
         </trim>
-        where order_number = #{orderNumber}
+        where id = #{id}
     </update>
 
-    <delete id="deleteBsOrderSchedulingByOrderNumber" parameterType="String">
-        delete from bs_order_scheduling where order_number = #{orderNumber}
+    <delete id="deleteBsOrderSchedulingById" parameterType="Long">
+        delete from bs_order_scheduling where id = #{id}
     </delete>
 
-    <delete id="deleteBsOrderSchedulingByOrderNumbers" parameterType="String">
-        delete from bs_order_scheduling where order_number in 
-        <foreach item="orderNumber" collection="array" open="(" separator="," close=")">
-            #{orderNumber}
+    <delete id="deleteBsOrderSchedulingByIds" parameterType="String">
+        delete from bs_order_scheduling where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
         </foreach>
     </delete>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3