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/ApsGasPipelineCapacityPlanMapper.xml |   45 ++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipelineCapacityPlanMapper.xml b/aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipelineCapacityPlanMapper.xml
index 45731fd..9cf0dc8 100644
--- a/aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipelineCapacityPlanMapper.xml
+++ b/aps-modules/aps-core/src/main/resources/mapper/core/ApsGasPipelineCapacityPlanMapper.xml
@@ -4,12 +4,13 @@
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.aps.core.mapper.ApsGasPipelineCapacityPlanMapper">
     
-    <resultMap type="ApsGasPipelineCapacityPlan" id="ApsGasPipelineCapacityPlanResult">
+    <resultMap type="com.aps.core.domain.ApsGasPipelineCapacityPlan" id="ApsGasPipelineCapacityPlanResult">
         <result property="id"    column="id"    />
         <result property="processName"    column="process_name"    />
         <result property="year"    column="year"    />
         <result property="month"    column="month"    />
         <result property="major"    column="major"    />
+        <result property="workshop"    column="workshop"    />
         <result property="dayProduceType"    column="day_produce_type"    />
         <result property="dayProduceNum"    column="day_produce_num"    />
         <result property="dayProduceUnit"    column="day_produce_unit"    />
@@ -26,16 +27,17 @@
     </resultMap>
 
     <sql id="selectApsGasPipelineCapacityPlanVo">
-        select id, process_name, year, month, major, day_produce_type, day_produce_num, day_produce_unit, personnel_number, day_produce_all_num, days, month_produce_all_num, remark, create_by, create_time, update_by, update_time, org_code from aps_gas_pipeline_capacity_plan
+        select id, process_name, year, month, major, workshop, day_produce_type, day_produce_num, day_produce_unit, personnel_number, day_produce_all_num, days, month_produce_all_num, remark, create_by, create_time, update_by, update_time, org_code from aps_gas_pipeline_capacity_plan
     </sql>
 
-    <select id="selectApsGasPipelineCapacityPlanList" parameterType="ApsGasPipelineCapacityPlan" resultMap="ApsGasPipelineCapacityPlanResult">
+    <select id="selectApsGasPipelineCapacityPlanList" parameterType="com.aps.core.domain.ApsGasPipelineCapacityPlan" resultMap="ApsGasPipelineCapacityPlanResult">
         <include refid="selectApsGasPipelineCapacityPlanVo"/>
         <where>  
             <if test="processName != null  and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
             <if test="year != null  and year != ''"> and year = #{year}</if>
             <if test="month != null  and month != ''"> and month = #{month}</if>
             <if test="major != null  and major != ''"> and major = #{major}</if>
+            <if test="workshop != null  and workshop != ''"> and workshop = #{workshop}</if>
             <if test="dayProduceType != null  and dayProduceType != ''"> and day_produce_type = #{dayProduceType}</if>
             <if test="dayProduceNum != null "> and day_produce_num = #{dayProduceNum}</if>
             <if test="dayProduceUnit != null  and dayProduceUnit != ''"> and day_produce_unit = #{dayProduceUnit}</if>
@@ -55,7 +57,7 @@
         where id = #{id}
     </select>
 
-    <insert id="insertApsGasPipelineCapacityPlan" parameterType="ApsGasPipelineCapacityPlan">
+    <insert id="insertApsGasPipelineCapacityPlan" parameterType="com.aps.core.domain.ApsGasPipelineCapacityPlan">
         insert into aps_gas_pipeline_capacity_plan
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="id != null">id,</if>
@@ -63,6 +65,7 @@
             <if test="year != null">year,</if>
             <if test="month != null">month,</if>
             <if test="major != null">major,</if>
+            <if test="workshop != null">workshop,</if>
             <if test="dayProduceType != null">day_produce_type,</if>
             <if test="dayProduceNum != null">day_produce_num,</if>
             <if test="dayProduceUnit != null">day_produce_unit,</if>
@@ -83,6 +86,7 @@
             <if test="year != null">#{year},</if>
             <if test="month != null">#{month},</if>
             <if test="major != null">#{major},</if>
+            <if test="workshop != null">workshop,</if>
             <if test="dayProduceType != null">#{dayProduceType},</if>
             <if test="dayProduceNum != null">#{dayProduceNum},</if>
             <if test="dayProduceUnit != null">#{dayProduceUnit},</if>
@@ -99,13 +103,14 @@
          </trim>
     </insert>
 
-    <update id="updateApsGasPipelineCapacityPlan" parameterType="ApsGasPipelineCapacityPlan">
+    <update id="updateApsGasPipelineCapacityPlan" parameterType="com.aps.core.domain.ApsGasPipelineCapacityPlan">
         update aps_gas_pipeline_capacity_plan
         <trim prefix="SET" suffixOverrides=",">
             <if test="processName != null">process_name = #{processName},</if>
             <if test="year != null">year = #{year},</if>
             <if test="month != null">month = #{month},</if>
             <if test="major != null">major = #{major},</if>
+            <if test="workshop != null">workshop,</if>
             <if test="dayProduceType != null">day_produce_type = #{dayProduceType},</if>
             <if test="dayProduceNum != null">day_produce_num = #{dayProduceNum},</if>
             <if test="dayProduceUnit != null">day_produce_unit = #{dayProduceUnit},</if>
@@ -133,4 +138,34 @@
             #{id}
         </foreach>
     </delete>
+
+    <delete id="deleteByDateAndFactory" >
+        delete from aps_gas_pipeline_capacity_plan
+               where year = #{year}
+                   and month = #{month}
+                   and org_code = #{factory}
+                   and major = #{major}
+    </delete>
+    
+    <!-- 鏌ヨ璁捐浜ц兘鏁版嵁 - 涓撶敤浜庢帴鍙d簩鍔熻兘 -->
+    <select id="selectDesignCapacityForInterface2" resultMap="ApsGasPipelineCapacityPlanResult">
+        <include refid="selectApsGasPipelineCapacityPlanVo"/>
+        <where>
+            <if test="processName != null and processName != ''">
+                and process_name = #{processName}
+            </if>
+            <if test="year != null and year != ''">
+                and year = #{year}
+            </if>
+            <if test="month != null and month != ''">
+                and CAST(month AS INTEGER) = CAST(#{month} AS INTEGER)
+            </if>
+            <if test="major != null and major != ''">
+                and major = #{major}
+            </if>
+            <if test="orgCode != null and orgCode != ''">
+                and org_code = #{orgCode}
+            </if>
+        </where>
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3