From 2a64b537e8e3bce9ce030585a3da17d48379c0ad Mon Sep 17 00:00:00 2001
From: sfd <sun.sunshine@163.com>
Date: 星期一, 26 五月 2025 15:04:45 +0800
Subject: [PATCH] 修改json类型转换错误
---
aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipingPlanMapper.xml | 103 +++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 98 insertions(+), 5 deletions(-)
diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipingPlanMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipingPlanMapper.xml
index 29da727..09c1e9d 100644
--- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipingPlanMapper.xml
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipingPlanMapper.xml
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.aps.core.mapper.ApsGasPipingPlanMapper">
- <resultMap type="ApsGasPipingPlan" id="ApsGasPipingPlanResult">
+ <resultMap type="com.aps.core.domain.ApsGasPipingPlan" id="ApsGasPipingPlanResult">
<result property="id" column="id" />
<result property="masterPlanner" column="master_planner" />
<result property="weekDay" column="week_day" />
@@ -40,13 +40,70 @@
<result property="isStockComplete" column="is_stock_complete" />
<result property="hasTurnback" column="has_turnback" />
<result property="hasRisk" column="has_risk" />
+ <result property="planType" column="plan_type" />
+ <result property="opStatus" column="op_status" />
+ <result property="nextOpName" column="next_op_name" />
+ <result property="orderCreateTime" column="order_create_time" />
+ <result property="approveOn" column="approve_on" />
+ <result property="startWorkDate" column="start_work_date" />
+ <result property="lowOrderCode" column="low_order_code" />
+<!-- <collection property="apsProcessRoutes" javaType="java.util.ArrayList" ofType="com.aps.core.domain.ApsProcessRoute">-->
+<!-- <result property="id" column="id" />-->
+<!-- <result property="itemNo" column="item_no" />-->
+<!-- <result property="workOrderNo" column="work_order_no" />-->
+<!-- <result property="processNumber" column="process_number_sub" />-->
+<!-- <result property="processName" column="process_name" />-->
+<!-- <result property="processPlanStartDay" column="process_plan_start_day" />-->
+<!-- <result property="processPlanEndDay" column="process_plan_end_day" />-->
+<!-- <result property="notStartWorkCount" column="not_start_work_count" />-->
+<!-- <result property="completedCount" column="completed_count" />-->
+<!-- <result property="discardCount" column="discard_count" />-->
+<!-- <result property="integrationDay" column="integration_day" />-->
+<!-- <result property="plant" column="plant" />-->
+<!-- <result property="delFlag" column="del_flag" />-->
+<!-- <result property="createBy" column="create_by" />-->
+<!-- <result property="createTime" column="create_time" />-->
+<!-- <result property="updateBy" column="update_by" />-->
+<!-- <result property="updateTime" column="update_time" />-->
+<!-- <result property="standardTime" column="standard_time" />-->
+<!-- <result property="processOrder" column="process_order" />-->
+<!-- <result property="workCenter" column="work_center" />-->
+<!-- <result property="processQty" column="process_qty" />-->
+<!-- <result property="opStatus" column="op_status" />-->
+<!-- <result property="opStatus" column="op_status" />-->
+<!-- <result property="orgCode" column="org_code" />-->
+<!-- </collection>-->
+ </resultMap>
+
+ <resultMap type="com.aps.core.domain.ApsGasPipingPlan" id="ApsGasPipingPlanResultWithProcess">
+ <result property="documentNumber" column="document_number" />
+ <result property="itemNumber" column="item_number" />
+ <result property="productionQuantity" column="production_quantity" />
+ <result property="processNumber" column="process_number" />
+ <result property="planType" column="plan_type" />
+ <result property="planEndDay" column="plan_end_day" />
+ <result property="stdOp" column="std_op" />
+ <collection property="apsProcessRoutes" javaType="java.util.ArrayList" ofType="com.aps.core.domain.ApsProcessRoute">
+ <result property="processNumber" column="process_number_sub" />
+ <result property="processName" column="process_name" />
+ <result property="processPlanStartDay" column="process_plan_start_day" />
+ <result property="processPlanEndDay" column="process_plan_end_day" />
+ <result property="standardTime" column="standard_time" />
+ </collection>
</resultMap>
<sql id="selectApsGasPipingPlanVo">
- select id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer, business_type, document_number, requirement_type, document_status, item_number, drawing_no, version_number, production_quantity, good_products_quantity, process_number, work_center, department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock, next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials, advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete, has_turnback, has_risk from aps_gas_piping_plan
+ select id, master_planner, week_day, week_cycle, main_part_number, main_part_drawing_number, customer,
+ business_type, document_number, requirement_type, document_status, item_number, drawing_no,
+ version_number, production_quantity, good_products_quantity, process_number, work_center,
+ department, plan_start_day, plan_end_day, standby_number, standby_name, standby_stock,
+ next_process_deparment, is_suspended, is_outsourcing, account, advanced_materials,
+ advanced_document_number, advanced_requirement_day, is_plan_complete, is_stock_complete,
+ has_turnback, has_risk ,plan_type, op_status, next_op_name, order_create_time, approve_on, start_work_date, low_order_code
+ from aps_gas_piping_plan
</sql>
- <select id="selectApsGasPipingPlanList" parameterType="ApsGasPipingPlan" resultMap="ApsGasPipingPlanResult">
+ <select id="selectApsGasPipingPlanList" parameterType="com.aps.core.domain.ApsGasPipingPlan" resultMap="ApsGasPipingPlanResult">
<include refid="selectApsGasPipingPlanVo"/>
<where>
<if test="masterPlanner != null and masterPlanner != ''"> and master_planner like concat('%', #{masterPlanner}, '%')</if>
@@ -79,6 +136,10 @@
<if test="isStockComplete != null "> and is_stock_complete = #{isStockComplete}</if>
<if test="hasTurnback != null "> and has_turnback = #{hasTurnback}</if>
<if test="hasRisk != null "> and has_risk = #{hasRisk}</if>
+ <if test="planType != null "> and plan_type = #{planType}</if>
+ <if test="opStatus != null "> and op_status = #{opStatus}</if>
+ <if test="nextOpName != null "> and next_op_name = #{nextOpName}</if>
+ and del_flag ='0'
</where>
</select>
@@ -87,7 +148,7 @@
where id = #{id}
</select>
- <insert id="insertApsGasPipingPlan" parameterType="ApsGasPipingPlan">
+ <insert id="insertApsGasPipingPlan" parameterType="com.aps.core.domain.ApsGasPipingPlan">
insert into aps_gas_piping_plan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">id,</if>
@@ -125,6 +186,13 @@
<if test="isStockComplete != null">is_stock_complete,</if>
<if test="hasTurnback != null">has_turnback,</if>
<if test="hasRisk != null">has_risk,</if>
+ <if test="planType != null">plan_type,</if>
+ <if test="opStatus != null">op_status,</if>
+ <if test="nextOpName != null">next_op_name,</if>
+ <if test="orderCreateTime != null">order_create_time,</if>
+ <if test="approveOn != null">approve_on,</if>
+ <if test="startWorkDate != null">start_work_date,</if>
+ <if test="lowOrderCode != null">low_order_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null and id != ''">#{id},</if>
@@ -162,10 +230,17 @@
<if test="isStockComplete != null">#{isStockComplete},</if>
<if test="hasTurnback != null">#{hasTurnback},</if>
<if test="hasRisk != null">#{hasRisk},</if>
+ <if test="planType != null">#{planType},</if>
+ <if test="opStatus != null">#{opStatus},</if>
+ <if test="nextOpName != null">#{nextOpName},</if>
+ <if test="orderCreateTime != null">#{orderCreateTime},</if>
+ <if test="approveOn != null">#{approveOn},</if>
+ <if test="startWorkDate != null">#{startWorkDate},</if>
+ <if test="lowOrderCode != null">#{lowOrderCode},</if>
</trim>
</insert>
- <update id="updateApsGasPipingPlan" parameterType="ApsGasPipingPlan">
+ <update id="updateApsGasPipingPlan" parameterType="com.aps.core.domain.ApsGasPipingPlan">
update aps_gas_piping_plan
<trim prefix="SET" suffixOverrides=",">
<if test="masterPlanner != null">master_planner = #{masterPlanner},</if>
@@ -202,6 +277,13 @@
<if test="isStockComplete != null">is_stock_complete = #{isStockComplete},</if>
<if test="hasTurnback != null">has_turnback = #{hasTurnback},</if>
<if test="hasRisk != null">has_risk = #{hasRisk},</if>
+ <if test="planType != null">plan_type = #{planType},</if>
+ <if test="opStatus != null">op_status = #{opStatus},</if>
+ <if test="nextOpName != null">next_op_name = #{nextOpName},</if>
+ <if test="orderCreateTime != null">order_create_time = #{orderCreateTime},</if>
+ <if test="approveOn != null">approve_on = #{approveOn},</if>
+ <if test="startWorkDate != null">start_work_date = #{startWorkDate},</if>
+ <if test="lowOrderCode != null">low_order_code = #{lowOrderCode},</if>
</trim>
where id = #{id}
</update>
@@ -216,4 +298,15 @@
#{id}
</foreach>
</delete>
+
+ <update id="removeAllPlans" >
+ update aps_gas_piping_plan set del_flag='1' where del_flag ='0'
+ </update>
+
+ <select id="selectApsGasPipingPlanWithProcess" parameterType="com.aps.core.domain.ApsGasPipingPlan" resultMap="ApsGasPipingPlanResultWithProcess">
+ select c.* from (select a.document_number,a.item_number,a.process_number,a.production_quantity,a.plan_type,a.plan_end_day,a.std_op,b.process_name,b.process_number as process_number_sub,b.standard_time,b.process_plan_start_day,b.process_plan_end_day from aps_gas_piping_plan a
+ left join aps_process_route b on a.document_number = b.work_order_no
+ where a.document_status in ('0','1','2','4') and a.op_status!='瀹屽伐' and b.process_plan_start_day is not null and b.process_name in(select process_name from aps_standard_process where major='姘旀煖' or major='绠¤矾') ORDER BY a.document_number,b.process_number) c GROUP BY c.document_number,c.item_number,c.process_number,c.production_quantity,c.process_name,c.process_number_sub,c.standard_time,c.process_plan_start_day,c.plan_type,c.process_plan_end_day,c.plan_end_day,c.std_op
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3