From 778d3d8b387ca0a8d1b51ef68f783fb0b407ef20 Mon Sep 17 00:00:00 2001
From: wujian <14790700720@163.com>
Date: 星期五, 26 七月 2024 11:52:34 +0800
Subject: [PATCH] fix6

---
 jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml b/jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml
index 1345685..983bd68 100644
--- a/jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml
+++ b/jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml
@@ -44,10 +44,12 @@
         <result property="spareField3"    column="spare_field_3"    />
         <result property="spareField4"    column="spare_field_4"    />
         <result property="typeZ"    column="type_z"    />
+        <result property="productionNotice"    column="production_notice"    />
+
     </resultMap>
 
     <sql id="selectOmProductionOrdeInfoVo">
-        select id, work_order_no, sales_order_code,type_z, product_code, product_name, workshop_code, line_code, route_code, bom_code, recipe_code, plan_qty, actual_qty, bad_qty, scrap_qty, repair_qty, actual_online_qty, online_completion_mark, demand_date, plan_start_time, plan_end_time, actual_start_time, actual_end_time, serial_number, order_status, create_time, update_time, create_user, update_user, remarks, stream_number, custom, market_area_code, software_version_code, product_company_code, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from om_production_orde_info
+        select id, work_order_no, sales_order_code,type_z,product_code, product_name, workshop_code, line_code, route_code, bom_code, recipe_code, plan_qty, actual_qty, bad_qty, scrap_qty, repair_qty, actual_online_qty, online_completion_mark, demand_date, plan_start_time, plan_end_time, actual_start_time, actual_end_time, serial_number, order_status, create_time, update_time, create_user, update_user, remarks, stream_number, custom, market_area_code, software_version_code, product_company_code, spare_field_1, spare_field_2, spare_field_3, spare_field_4, production_notice from om_production_orde_info
     </sql>
 
     <select id="selectOmProductionOrdeInfoList" parameterType="OmProductionOrdeInfo" resultMap="OmProductionOrdeInfoResult">
@@ -69,6 +71,9 @@
             <if test="typeZ != null  and typeZ != ''"> and type_z like concat('%', #{typeZ}, '%')</if>
             <if test="softwareVersionCode != null  and softwareVersionCode != ''"> and software_version_code like concat('%', #{softwareVersionCode}, '%')</if>
             <if test="productCompanyCode != null  and productCompanyCode != ''"> and product_company_code like concat('%', #{productCompanyCode}, '%')</if>
+            <if test="productionNotice != null  and productionNotice != ''"> and production_notice like concat('%', #{productionNotice}, '%')</if>
+            <if test="dateConditions != null  and dateConditions != ''"> and create_time BETWEEN #{startTime} AND #{endTime}</if>
+
         </where>
         ORDER BY stream_number DESC
     </select>
@@ -76,6 +81,15 @@
     <select id="selectOmProductionOrdeInfoById" parameterType="Long" resultMap="OmProductionOrdeInfoResult">
         <include refid="selectOmProductionOrdeInfoVo"/>
         where id = #{id}
+    </select>
+
+    <select id="selectOmProductionOrdeInfoByIds" parameterType="String" resultMap="OmProductionOrdeInfoResult">
+        select type_z,product_code,line_code,route_code, bom_code, recipe_code, sum(plan_qty) plan_qty,serial_number, order_status from om_production_orde_info
+        where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+        GROUP BY  type_z,product_code,line_code,route_code, bom_code, recipe_code,serial_number, order_status
     </select>
         
     <insert id="insertOmProductionOrdeInfo" parameterType="OmProductionOrdeInfo">
@@ -120,7 +134,9 @@
             <if test="spareField2 != null">spare_field_2,</if>
             <if test="spareField3 != null">spare_field_3,</if>
             <if test="spareField4 != null">spare_field_4,</if>
-         </trim>
+            <if test="productionNotice != null">production_notice,</if>
+
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
             <if test="workOrderNo != null">#{workOrderNo},</if>
@@ -161,7 +177,9 @@
             <if test="spareField2 != null">#{spareField2},</if>
             <if test="spareField3 != null">#{spareField3},</if>
             <if test="spareField4 != null">#{spareField4},</if>
-         </trim>
+            <if test="productionNotice != null">#{productionNotice},</if>
+
+        </trim>
     </insert>
 
     <update id="updateOmProductionOrdeInfo" parameterType="OmProductionOrdeInfo">
@@ -205,6 +223,8 @@
             <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="productionNotice != null">production_notice = #{productionNotice},</if>
+
         </trim>
         where id = #{id}
     </update>

--
Gitblit v1.9.3