From c0d86c96b9c56f2d6af5fc655c0f9d388b89e0e8 Mon Sep 17 00:00:00 2001
From: 张磊磊 <201175954@qq.com>
Date: 星期二, 21 十一月 2023 14:13:44 +0800
Subject: [PATCH] 拌合站标识牌/搅拌站新增校验时间

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

diff --git a/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml b/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml
index 8d33ac6..1c3c6d1 100644
--- a/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml
+++ b/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml
@@ -202,6 +202,9 @@
       <if test="percentage != null">
         percentage,
       </if>
+      <if test="inspectDate != null">
+        inspect_date,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="mixingId != null">
@@ -240,6 +243,9 @@
       <if test="percentage != null">
         #{percentage,jdbcType=VARCHAR},
       </if>
+      <if test="inspectDate != null">
+        #{inspectDate,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="mixingList" resultType="com.thhy.materials.modules.biz.concret.entity.TMixing">
@@ -255,7 +261,8 @@
         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
   </select>
@@ -283,4 +290,147 @@
      types as types
      from t_silo where types=#{types}
   </select>
+  <insert id="mixingConsumeIn" keyProperty="mixingSignboardId" useGeneratedKeys="true" parameterType="java.util.Map">
+    insert into t_mixing_signboard
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="mixingSignboardId != null">
+        mixing_signboard_id,
+      </if>
+      <if test="signboardName != null">
+        signboard_name,
+      </if>
+      <if test="proId != null">
+        pro_id,
+      </if>
+      <if test="mixingConsume != null">
+        mixing_consume,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="mixingSignboardId != null">
+        #{mixingSignboardId,jdbcType=VARCHAR},
+      </if>
+      <if test="signboardName != null">
+        #{signboardName,jdbcType=VARCHAR},
+      </if>
+      <if test="proId != null">
+        #{proId,jdbcType=VARCHAR},
+      </if>
+      <if test="mixingConsume != null">
+        #{mixingConsume,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <insert id="mixingConsumeInTwo" parameterType="com.thhy.materials.modules.biz.concret.entity.TMixingConsume">
+    insert into t_mixing_consume
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="mixingConsumeId != null">
+        mixing_consume_id,
+      </if>
+      <if test="dictId != null">
+        dict_id,
+      </if>
+      <if test="spec != null">
+        spec,
+      </if>
+      <if test="manufacturer != null">
+        manufacturer,
+      </if>
+      <if test="watFull != null">
+        wat_full,
+      </if>
+      <if test="planAmnt != null">
+        plan_amnt,
+      </if>
+      <if test="factAmnt != null">
+        fact_amnt,
+      </if>
+      <if test="saveStamp != null">
+        save_stamp,
+      </if>
+      <if test="construction != null">
+        construction,
+      </if>
+      <if test="mixingSignboardId != null">
+        mixing_signboard_id,
+      </if>
+      <if test="star != null">
+        star,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="mixingConsumeId != null">
+        #{mixingConsumeId,jdbcType=VARCHAR},
+      </if>
+      <if test="dictId != null">
+        #{dictId,jdbcType=VARCHAR},
+      </if>
+      <if test="spec != null">
+        #{spec,jdbcType=VARCHAR},
+      </if>
+      <if test="manufacturer != null">
+        #{manufacturer,jdbcType=VARCHAR},
+      </if>
+      <if test="watFull != null">
+        #{watFull,jdbcType=VARCHAR},
+      </if>
+      <if test="planAmnt != null">
+        #{planAmnt,jdbcType=VARCHAR},
+      </if>
+      <if test="factAmnt != null">
+        #{factAmnt,jdbcType=VARCHAR},
+      </if>
+      <if test="saveStamp != null">
+        #{saveStamp,jdbcType=VARCHAR},
+      </if>
+      <if test="construction != null">
+        #{construction,jdbcType=VARCHAR},
+      </if>
+      <if test="mixingSignboardId != null">
+        #{mixingSignboardId,jdbcType=VARCHAR},
+      </if>
+      <if test="star != null">
+        #{star},
+      </if>
+    </trim>
+  </insert>
+  <select id="starInt" resultType="java.lang.Integer">
+    select star from t_mixing_consume order by star desc limit 0,1
+  </select>
+  <select id="starIntSig" parameterType="java.lang.String" resultType="java.lang.Integer">
+    select star from t_mixing_consume where  mixing_signboard_id=#{mixingSignboardId} order by star desc limit 0,1
+  </select>
+  <select id="mixingSignboardList" resultType="com.thhy.materials.modules.biz.concret.entity.TMixingSignboard">
+    select tms.mixing_signboard_id as mixingSignboardId,
+    tms.signboard_name as signboardName,
+    tms.pro_id as proId,
+    tms.mixing_consume as mixingConsume,
+    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
+    where  1=1
+    <if test="signboardName!=null and signboardName!='' ">
+        and  tms.signboard_name like concat('%',#{signboardName},'%')
+    </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.spec as spec,
+    mc.manufacturer as manufacturer,
+    mc.wat_full as watFull,
+    mc.plan_amnt as planAmnt,
+    mc.fact_amnt as factAmnt,
+    mc.save_stamp as saveStamp,
+    mc.construction as construction,
+    mc.mixing_signboard_id as mixingSignboardId,
+    mc.star as star
+     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}
+  </select>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3