From 2896d6fa447cf6a678ba27ba2e19224379f14dd4 Mon Sep 17 00:00:00 2001
From: 邱宇豪 <qyh123230312>
Date: 星期五, 03 十一月 2023 16:48:43 +0800
Subject: [PATCH] 20231103_qiuyh_发运计划

---
 hd/pipe/materialsManage/src/main/resources/mapping/PipeOutPlanMapper.xml |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/hd/pipe/materialsManage/src/main/resources/mapping/PipeOutPlanMapper.xml b/hd/pipe/materialsManage/src/main/resources/mapping/PipeOutPlanMapper.xml
index 9ec9b23..b5081a1 100644
--- a/hd/pipe/materialsManage/src/main/resources/mapping/PipeOutPlanMapper.xml
+++ b/hd/pipe/materialsManage/src/main/resources/mapping/PipeOutPlanMapper.xml
@@ -67,6 +67,7 @@
                 t.update_user updateUser,
                 sp.pro_name proName
         from t_pipe_out_plan t
+        left join sys_project sp on sp.pro_id = t.pro_id
         where
                 t.is_use = 1
           and t.pro_id = #{proId}
@@ -108,7 +109,7 @@
                 GROUP BY b.time
             ) c ON c.yearAndMoth= d.yearAndMoth
         ) e ON e.Moth = a.month
-        WHERE b.pro_id = #{proId}
+        WHERE b.pro_id = #{proId} and a.pipe_out_plan_id =#{planOutId}
         ORDER BY a.month
     </select>
 
@@ -122,7 +123,7 @@
                 pipe_out_plan_id,
             </if>
             <if test="month != null">
-                month,
+                `month`,
             </if>
             <if test="planProduct != null">
                 plan_product,
@@ -130,16 +131,16 @@
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides="," >
             <if test="id != null">
-                id = #{id,jdbcType=VARCHAR},
+                #{id,jdbcType=VARCHAR},
             </if>
             <if test="pipeOutPlanId != null">
-                pipe_out_plan_id = #{pipeOutPlanId,jdbcType=VARCHAR},
+                #{pipeOutPlanId,jdbcType=VARCHAR},
             </if>
             <if test="month != null">
-                `month` = #{month,jdbcType=INTEGER},
+                #{month,jdbcType=INTEGER},
             </if>
             <if test="planProduct != null">
-                plan_product= #{planProduct,jdbcType=INTEGER},
+                #{planProduct,jdbcType=INTEGER},
             </if>
         </trim>
     </insert>
@@ -215,7 +216,7 @@
                 plan_year=#{planYear},
             </if>
             <if test="needPipeNum != null">
-                needPipeNum = #{needPipeNum},
+                need_pipe_num = #{needPipeNum},
             </if>
             <if test="createTime != null">
                 create_time=#{createTime},
@@ -241,7 +242,7 @@
     </update>
 
     <delete id="deleteMoth">
-        delete from t_pipe_out_plan_moth where plan_out_id=#{planOutId}
+        delete from t_pipe_out_plan_moth where pipe_out_plan_id=#{planOutId}
     </delete>
 
 

--
Gitblit v1.9.3