From ea3c33c8561df39d4f123d1424fda99dd0f0c51d Mon Sep 17 00:00:00 2001
From: wujian <14790700720@163.com>
Date: 星期四, 14 十一月 2024 08:15:41 +0800
Subject: [PATCH] add - panel

---
 jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml |  107 ++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 100 insertions(+), 7 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 3afc5b3..d484f39 100644
--- a/jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml
+++ b/jcdm-main/src/main/resources/mapper/bs/orderScheduling/BsOrderSchedulingMapper.xml
@@ -1,9 +1,9 @@
 <?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">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper">
-    
+
     <resultMap type="BsOrderScheduling" id="BsOrderSchedulingResult">
         <result property="id"    column="id"    />
         <result property="orderNo"    column="order_no"    />
@@ -45,9 +45,76 @@
         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, report_30, box_closing_online_time, closing_box_offline_time, final_assembly_launch_time, final_assembly_offline_time, cvt_launch_time, cvt_offline_time from bs_order_scheduling
     </sql>
 
+    <sql id="selectBsOrderSchedulingForReport">
+        select id, engine_no, report_20, remarks from bs_order_scheduling
+    </sql>
+
+    <select id="selectBsOrderSchedulingForReport"
+            parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
+        <include refid="selectBsOrderSchedulingForReport"/>
+            <where>
+                <if test="engineNoList != null and engineNoList.size() > 0">
+                    and engine_no in
+                    <foreach collection="engineNoList" open="(" close=")" separator="," item="engine">
+                        #{engine}
+                    </foreach>
+                </if>
+            </where>
+    </select>
+
     <select id="selectBsOrderSchedulingList" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
         <include refid="selectBsOrderSchedulingVo"/>
-        <where>  
+        <where>
+            <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>
+            <if test="productionStatus != null  and productionStatus != ''"> and production_status = #{productionStatus}</if>
+            <if test="workingHours != null  and workingHours != ''"> and working_hours = #{workingHours}</if>
+            <if test="currentWorkstation != null  and currentWorkstation != ''"> and current_workstation = #{currentWorkstation}</if>
+            <if test="qualityStatus != null  and qualityStatus != ''"> and quality_status = #{qualityStatus}</if>
+            <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="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 isnull(spare_field_1,'') != #{spareField1}</if>
+            <if test="spareField2 != null  and spareField2 != ''"> and isnull(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>
+            <if test="report30 != null  and report30 != ''"> and report_30 = #{report30}</if>
+            <if test="dateConditions != null  and dateConditions != ''"> and operate_time BETWEEN #{startTime} AND #{endTime}</if>
+            <if test="boxClosingOnlineTime != null  and boxClosingOnlineTime != ''"> and box_closing_online_time = #{boxClosingOnlineTime}</if>
+            <if test="closingBoxOfflineTime != null  and closingBoxOfflineTime != ''"> and closing_box_offline_time = #{closingBoxOfflineTime}</if>
+            <if test="finalAssemblyLaunchTime != null  and finalAssemblyLaunchTime != ''"> and final_assembly_launch_time = #{finalAssemblyLaunchTime}</if>
+            <if test="finalAssemblyOfflineTime != null  and finalAssemblyOfflineTime != ''"> and final_assembly_offline_time = #{finalAssemblyOfflineTime}</if>
+            <if test="cvtLaunchTime != null  and cvtLaunchTime != ''"> and cvt_launch_time = #{cvtLaunchTime}</if>
+            <if test="cvtOfflineTime != null  and cvtOfflineTime != ''"> and cvt_offline_time = #{cvtOfflineTime}</if>
+            <if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> and final_assembly_offline_time between #{startTime} and #{endTime}</if>
+            <if test="engineNoList != null and engineNoList.size() > 0">
+                and engine_no in
+                <foreach collection="engineNoList" open="(" close=")" separator="," item="engine">
+                    #{engine}
+                </foreach>
+            </if>
+            <if test="engineNoListExcel != null and engineNoListExcel.size() > 0">
+                and engine_no in
+                <foreach collection="engineNoListExcel" open="(" close=")" separator="," item="engine">
+                    #{engine}
+                </foreach>
+            </if>
+        </where>
+    </select>
+
+    <select id="selectBsOrderSchedulingPage" parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
+        <include refid="selectBsOrderSchedulingVo"/>
+        <where>
             <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>
@@ -92,9 +159,11 @@
                     #{engine}
                 </foreach>
             </if>
+            and (production_status = '2' or production_status = '3')
         </where>
+        order by create_time DESC
     </select>
-    
+
     <select id="selectBsOrderSchedulingById" parameterType="Long" resultMap="BsOrderSchedulingResult">
         <include refid="selectBsOrderSchedulingVo"/>
         where id = #{id}
@@ -119,6 +188,28 @@
     <select id="getProduceNumToday" resultType="java.lang.Integer">
         select count(*) from bs_order_scheduling
         where ${queryField} BETWEEN #{startTime} AND #{endTime}
+    </select>
+    <select id="getProductNum" resultType="com.jcdm.main.da.passingStationCollection.domain.ProductNumVO">
+        SELECT model,count(*) as num FROM bs_order_scheduling
+        <where>
+            <if test="queryDate != null and queryDate != ''">
+             final_assembly_offline_time between #{queryDate} and #{addQueryDate}
+            </if>
+        </where>
+        GROUP BY model
+    </select>
+
+    <select id="selectBsOrderSchedulingListForNum"
+            parameterType="BsOrderScheduling" resultMap="BsOrderSchedulingResult">
+        select model,final_assembly_offline_time,final_assembly_launch_time,box_closing_online_time
+        from bs_order_scheduling
+        <where>
+            <if test="queryDate != null and queryDate != ''">
+                final_assembly_offline_time between #{queryDate} and #{addQueryDate}
+        or final_assembly_launch_time between #{queryDate} and #{addQueryDate}
+        or box_closing_online_time between #{queryDate} and #{addQueryDate}
+            </if>
+        </where>
     </select>
 
 
@@ -157,7 +248,7 @@
             <if test="finalAssemblyOfflineTime != null">final_assembly_offline_time,</if>
             <if test="cvtLaunchTime != null">cvt_launch_time,</if>
             <if test="cvtOfflineTime != null">cvt_offline_time,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">#{orderNo},</if>
             <if test="engineNo != null">#{engineNo},</if>
@@ -240,9 +331,11 @@
     </delete>
 
     <delete id="deleteBsOrderSchedulingByIds" parameterType="String">
-        delete from bs_order_scheduling where id in 
+        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