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 |   53 ++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 48 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 284bd03..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"    />
@@ -22,19 +23,21 @@
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
+        <result property="orgCode"    column="org_code"    />
     </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 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>
@@ -42,6 +45,10 @@
             <if test="dayProduceAllNum != null "> and day_produce_all_num = #{dayProduceAllNum}</if>
             <if test="days != null "> and days = #{days}</if>
             <if test="monthProduceAllNum != null "> and month_produce_all_num = #{monthProduceAllNum}</if>
+            <if test="orgCode != null "> and org_code = #{orgCode}</if>
+<!--            <if test="major != null and major != ''">-->
+<!--                and process_name in (select process_name from aps_standard_process where major=#{major})-->
+<!--            </if>-->
         </where>
     </select>
     
@@ -50,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>
@@ -58,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>
@@ -70,6 +78,7 @@
             <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
+            <if test="orgCode != null">org_code,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -77,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>
@@ -89,16 +99,18 @@
             <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
+            <if test="orgCode != null">#{orgCode},</if>
          </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>
@@ -111,6 +123,7 @@
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="orgCode != null">org_code = #{orgCode},</if>
         </trim>
         where id = #{id}
     </update>
@@ -125,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