From 1b004047f00cc846924209051ee654619c56a249 Mon Sep 17 00:00:00 2001
From: 叶松 <2217086471@qq.com>
Date: 星期三, 06 十二月 2023 16:17:42 +0800
Subject: [PATCH] Merge branch 'master' of http://111.30.93.211:10101/r/supipe

---
 hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml |   76 +++++++++++++++++++++++++++++++++----
 1 files changed, 67 insertions(+), 9 deletions(-)

diff --git a/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml b/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml
index 90f0cd7..5ceb27c 100644
--- a/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml
+++ b/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml
@@ -285,9 +285,10 @@
         report_number as reportNumber,
         stata as stata,
         silo_id as siloId,
-        percentage as percentage
+        percentage as percentage,
+        inspect_date as inspectDate
         from t_mixing where silo_id=#{siloId}
-        order by in_date desc limit 0,1
+        and types=1
   </select>
   <select id="siloList" resultType="com.thhy.materials.modules.biz.concret.entity.TSilo">
     select
@@ -330,9 +331,7 @@
   <insert id="mixingConsumeInTwo" >
     insert into t_mixing_consume
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="mixingConsumeId != null">
         mixing_consume_id,
-      </if>
       <if test="dictId != null">
         dict_id,
       </if>
@@ -363,11 +362,15 @@
       <if test="star != null">
         star,
       </if>
+      <if test="constructionUnit != null">
+          construction_unit,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="mixingConsumeId != null">
-        #{mixingConsumeId,jdbcType=VARCHAR},
-      </if>
+<!--      <if test="mixingConsumeId != null">-->
+<!--        #{mixingConsumeId,jdbcType=VARCHAR},-->
+<!--      </if>-->
+      REPLACE(UUID(),'-',''),
       <if test="dictId != null">
         #{dictId,jdbcType=VARCHAR},
       </if>
@@ -398,6 +401,9 @@
       <if test="star != null">
         #{star},
       </if>
+      <if test="constructionUnit != null">
+        #{constructionUnit},
+      </if>
     </trim>
   </insert>
   <select id="starInt" resultType="java.lang.Integer">
@@ -419,12 +425,16 @@
     <if test="signboardName!=null and signboardName!='' ">
         and  tms.signboard_name like concat('%',#{signboardName},'%')
     </if>
+    <if test="mixingSignboardId !=null and mixingSignboardId !='' ">
+        and tms.mixing_signboard_id=#{mixingSignboardId}
+    </if>
   </select>
 
   <select id="mixingConsumes" resultType="com.thhy.materials.modules.biz.concret.entity.TMixingConsume">
     select
     mc.mixing_consume_id as mixingConsumeId,
     sd.dict_name as dictName,
+    mc.dict_id as dictId,
     mc.spec as spec,
     mc.manufacturer as manufacturer,
     mc.wat_full as watFull,
@@ -433,16 +443,22 @@
     mc.save_stamp as saveStamp,
     mc.construction as construction,
     mc.mixing_signboard_id as mixingSignboardId,
-    mc.star as star
+    mc.star as star,
+    mc.create_time as createTime,
+    mc.construction_unit as constructionUnit
      from t_mixing_consume mc
      left join  sys_dict sd on mc.dict_id=sd.dict_id
      where mc.mixing_signboard_id=#{mixingSignboardId} and mc.star=#{star}
+<!--     <if test="strTime!=null and strTime!='' and endTime !=null and endTime!=''">-->
+<!--         and mc.create_time between #{strTime} and #{endTime}-->
+<!--     </if>-->
   </select>
   <select id="mixingConsumePull" resultType="com.thhy.materials.modules.biz.concret.entity.TMixingSignboard">
     select
      tms.mixing_signboard_id as mixingSignboardId,
      tms.signboard_name as signboardName,
-     sp.pro_name as proName
+     sp.pro_name as proName,
+     sp.construction_unit as constructionUnit
      from t_mixing_signboard tms left join sys_project sp
      on tms.pro_id=sp.pro_id
   </select>
@@ -531,4 +547,46 @@
   <delete id="mixingDel" parameterType="java.lang.String">
     delete from  t_mixing where  mixing_id=#{mixingId}
   </delete>
+  <update id="mixingConsumeUpTwo" >
+    update t_mixing_consume
+    <set>
+      <if test="dictId != null">
+        dict_id = #{dictId,jdbcType=VARCHAR},
+      </if>
+      <if test="spec != null">
+        spec = #{spec,jdbcType=VARCHAR},
+      </if>
+      <if test="manufacturer != null">
+        manufacturer = #{manufacturer,jdbcType=VARCHAR},
+      </if>
+      <if test="watFull != null">
+        wat_full = #{watFull,jdbcType=VARCHAR},
+      </if>
+      <if test="planAmnt != null">
+        plan_amnt = #{planAmnt,jdbcType=VARCHAR},
+      </if>
+      <if test="factAmnt != null">
+        fact_amnt = #{factAmnt,jdbcType=VARCHAR},
+      </if>
+      <if test="saveStamp != null">
+        save_stamp = #{saveStamp,jdbcType=VARCHAR},
+      </if>
+      <if test="construction != null">
+        construction = #{construction,jdbcType=VARCHAR},
+      </if>
+      <if test="mixingSignboardId != null">
+        mixing_signboard_id = #{mixingSignboardId,jdbcType=VARCHAR},
+      </if>
+      <if test="star != null">
+        star = #{star},
+      </if>
+    </set>
+    where mixing_consume_id = #{mixingConsumeId,jdbcType=VARCHAR}
+  </update>
+    <delete id="mixingConsumeDel" >
+        delete from  t_mixing_consume where  mixing_consume_id=#{mixingConsumeId} and star=#{star}
+    </delete>
+    <delete id="mixingConsumeDelSign" >
+        delete from  t_mixing_consume where  mixing_signboard_id=#{mixingSignboardId} and star=#{star}
+    </delete>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3