From 7cd52b112a2e7da06aa8cfebf19a337be858762f Mon Sep 17 00:00:00 2001
From: hongjli <3117313295@qq.com>
Date: 星期五, 16 五月 2025 11:32:39 +0800
Subject: [PATCH] 查询气体管路产能规划列表补充“OrgCode”字段值
---
aps-modules/aps-core/src/main/resources/mapper/core/ApsPlateProcessStatMapper.xml | 58 ++++++++++++++++++++++++++++++++--------------------------
1 files changed, 32 insertions(+), 26 deletions(-)
diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlateProcessStatMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlateProcessStatMapper.xml
index 6f26ce2..97d1d08 100644
--- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlateProcessStatMapper.xml
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsPlateProcessStatMapper.xml
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.aps.core.mapper.ApsPlateProcessStatMapper">
- <resultMap type="ApsPlateProcessStat" id="ApsPlateProcessStatResult">
+ <resultMap type="com.aps.core.domain.ApsPlateProcessStat" id="ApsPlateProcessStatResult">
<result property="id" column="id" />
<result property="workOrderNo" column="work_order_no" />
<result property="processName" column="process_name" />
@@ -22,13 +22,19 @@
<result property="batchNumber" column="batch_number" />
<result property="createBy" column="create_by" />
<result property="delFlag" column="del_flag" />
+ <result property="warning" column="warning" />
+ <result property="exceptionStatus" column="exception_status" />
</resultMap>
<sql id="selectApsPlateProcessStatVo">
- select id, work_order_no, process_name, num, route_process_number, current_process_number, production_quantity, standard_time, process_total_time, process_plan_end_day,process_plan_start_day, order_plan_end_day, design_times, batch_number, create_by, del_flag from aps_plate_process_stat
+ select id, work_order_no, process_name, num, route_process_number, current_process_number, production_quantity,
+ standard_time, process_total_time, process_plan_end_day,process_plan_start_day, order_plan_end_day, design_times,
+ batch_number, create_by, del_flag, warning,
+ CASE WHEN <![CDATA[ process_plan_start_day <= NOW() OR process_plan_end_day <= NOW() ]]> THEN '鏄�' ELSE '鍚�' END as exception_status
+ from aps_plate_process_stat
</sql>
- <select id="selectApsPlateProcessStatList" parameterType="ApsPlateProcessStat" resultMap="ApsPlateProcessStatResult">
+ <select id="selectApsPlateProcessStatList" parameterType="com.aps.core.domain.ApsPlateProcessStat" resultMap="ApsPlateProcessStatResult">
<include refid="selectApsPlateProcessStatVo"/>
<where>
<if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if>
@@ -44,6 +50,7 @@
<if test="designTimes != null "> and design_times = #{designTimes}</if>
<if test="batchNumber != null and batchNumber != ''"> and batch_number = #{batchNumber}</if>
</where>
+ order by work_order_no asc,num desc
</select>
<select id="selectApsPlateProcessStatById" parameterType="String" resultMap="ApsPlateProcessStatResult">
@@ -51,7 +58,7 @@
where id = #{id}
</select>
- <insert id="insertApsPlateProcessStat" parameterType="ApsPlateProcessStat">
+ <insert id="insertApsPlateProcessStat" parameterType="com.aps.core.domain.ApsPlateProcessStat">
insert into aps_plate_process_stat
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
@@ -65,12 +72,12 @@
<if test="processTotalTime != null">process_total_time,</if>
<if test="processPlanEndDay != null">process_plan_end_day,</if>
<if test="processPlanStartDay != null">process_plan_start_day,</if>
- <if test="processPlanStartDay != null">process_plan_start_day,</if>
+ <if test="orderPlanEndDay != null">order_plan_end_day,</if>
<if test="designTimes != null">design_times,</if>
<if test="batchNumber != null">batch_number,</if>
<if test="createBy != null">create_by,</if>
-
- <if test="delFlag != null">del_flag,</if>
+ <if test="warning != null">warning,</if>
+ del_flag,
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@@ -84,15 +91,16 @@
<if test="processTotalTime != null">#{processTotalTime},</if>
<if test="processPlanEndDay != null">#{processPlanEndDay},</if>
<if test="processPlanStartDay != null">#{processPlanStartDay},</if>
+ <if test="orderPlanEndDay != null">#{orderPlanEndDay},</if>
<if test="designTimes != null">#{designTimes},</if>
<if test="batchNumber != null">#{batchNumber},</if>
<if test="createBy != null">#{createBy},</if>
-
- <if test="delFlag != null">#{delFlag},</if>
+ <if test="warning != null">#{warning},</if>
+ '0'
</trim>
</insert>
- <update id="updateApsPlateProcessStat" parameterType="ApsPlateProcessStat">
+ <update id="updateApsPlateProcessStat" parameterType="com.aps.core.domain.ApsPlateProcessStat">
update aps_plate_process_stat
<trim prefix="SET" suffixOverrides=",">
<if test="workOrderNo != null">work_order_no = #{workOrderNo},</if>
@@ -125,29 +133,27 @@
</delete>
<select id="queryTempStat" resultMap="ApsPlateProcessStatResult">
- select
- row_number() over (partition by rt.work_order_no order by rt.process_number desc ) as num,
- rt.work_order_no,
- rt.process_name,
- cast(rt.process_number as numeric(18, 2)) as route_process_number,
- cast(pl.process_number as numeric(18, 2)) as current_process_number,
- pl.production_quantity,
- rt.standard_time,
- (rt.standard_time * pl.production_quantity) as process_total_time,
- rt.process_plan_start_day,
- rt.process_plan_end_day,
- pl.plan_end_day as order_plan_end_day
+ select row_number() over (partition by rt.work_order_no order by rt.process_number desc ) as num,
+ rt.work_order_no,
+ rt.process_name,
+ cast(rt.process_number as numeric(18, 2)) as route_process_number,
+ cast(pl.process_number as numeric(18, 2)) as current_process_number,
+ pl.production_quantity,
+ rt.standard_time,
+ (rt.standard_time * pl.production_quantity) as process_total_time,
+ rt.process_plan_start_day,
+ rt.process_plan_end_day,
+ pl.plan_end_day as order_plan_end_day
from aps_plate_plan as pl
left join aps_process_route as rt on pl.document_number = rt.work_order_no
- where pl.del_flag = '0' and rt.del_flag = '0'
- and (pl.document_status is not null and (pl.document_status != '3'))
- order by rt.work_order_no asc , rt.process_number desc
+ where pl.document_number is not null and rt.work_order_no is not null and pl.plan_end_day is not null
+ order by rt.work_order_no asc, rt.process_number desc
</select>
<update id="removeOtherStat" parameterType="String">
delete from aps_plate_process_stat where batch_number != #{batchNumber}
</update>
- <insert id="batchInsertPlateStat" parameterType="ApsPlateProcessStat">
+ <insert id="batchInsertPlateStat" parameterType="com.aps.core.domain.ApsPlateProcessStat">
insert into aps_plate_process_stat
(
id,
--
Gitblit v1.9.3