From 75f957d38bd6b151ef3dcaeba85b6a5720d28833 Mon Sep 17 00:00:00 2001
From: 张磊磊 <201175954@qq.com>
Date: 星期三, 15 十一月 2023 16:37:59 +0800
Subject: [PATCH] 拌合站接口H5页面接口

---
 hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml |  138 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 137 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 9ac50f0..8d33ac6 100644
--- a/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml
+++ b/hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml
@@ -146,5 +146,141 @@
     is_use=2
     where material_release_id=#{materialReleaseId}
   </update>
-
+  <select id="pieceList" resultType="com.thhy.materials.modules.biz.concret.entity.dto.PieceDto">
+    select by_id as byId from  t_piece
+    where 1=1
+    <if test="byId!=null and byId!='' ">
+      and by_id=#{byId}
+    </if>
+    ORDER BY  by_id desc
+  </select>
+  <select id="materialRew" resultType="com.thhy.materials.modules.biz.concret.entity.TRawMaterial">
+    select Storage as storage,
+    Material as material,
+    RecAmnt as recamnt,
+    PlanAmnt as planamnt,
+    FactAmnt as factamnt
+     from  t_raw_material
+    where  Piece=#{byId}
+  </select>
+  <insert id="mixingInsert" >
+    insert into t_mixing
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="mixingId != null">
+        mixing_id,
+      </if>
+      <if test="material != null">
+        material,
+      </if>
+      <if test="spec != null">
+        spec,
+      </if>
+      <if test="producer != null">
+        producer,
+      </if>
+      <if test="stove != null">
+        stove,
+      </if>
+      <if test="inNum != null">
+        in_num,
+      </if>
+      <if test="inDate != null">
+        in_date,
+      </if>
+      <if test="inspectState != null">
+        inspect_state,
+      </if>
+      <if test="reportNumber != null">
+        report_number,
+      </if>
+      <if test="stata != null">
+        stata,
+      </if>
+      <if test="siloId != null">
+        silo_id,
+      </if>
+      <if test="percentage != null">
+        percentage,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="mixingId != null">
+        #{mixingId,jdbcType=VARCHAR},
+      </if>
+      <if test="material != null">
+        #{material,jdbcType=VARCHAR},
+      </if>
+      <if test="spec != null">
+        #{spec,jdbcType=VARCHAR},
+      </if>
+      <if test="producer != null">
+        #{producer,jdbcType=VARCHAR},
+      </if>
+      <if test="stove != null">
+        #{stove,jdbcType=VARCHAR},
+      </if>
+      <if test="inNum != null">
+        #{inNum,jdbcType=VARCHAR},
+      </if>
+      <if test="inDate != null">
+        #{inDate,jdbcType=VARCHAR},
+      </if>
+      <if test="inspectState != null">
+        #{inspectState,jdbcType=INTEGER},
+      </if>
+      <if test="reportNumber != null">
+        #{reportNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="stata != null">
+        #{stata},
+      </if>
+      <if test="siloId != null">
+        #{siloId,jdbcType=VARCHAR},
+      </if>
+      <if test="percentage != null">
+        #{percentage,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="mixingList" resultType="com.thhy.materials.modules.biz.concret.entity.TMixing">
+        select
+        mixing_id as mixingId,
+        material as material,
+        spec as spec,
+        producer as producer,
+        stove as stove,
+        in_num as inNum,
+        in_date as inDate,
+        inspect_state as inspectState,
+        report_number as reportNumber,
+        stata as stata,
+        silo_id as siloId,
+        percentage as percentage
+        from t_mixing where silo_id=#{siloId}
+        order by in_date desc limit 0,1
+  </select>
+  <select id="mixingLists" resultType="com.thhy.materials.modules.biz.concret.entity.TMixing">
+        select
+        mixing_id as mixingId,
+        material as material,
+        spec as spec,
+        producer as producer,
+        stove as stove,
+        in_num as inNum,
+        in_date as inDate,
+        inspect_state as inspectState,
+        report_number as reportNumber,
+        stata as stata,
+        silo_id as siloId,
+        percentage as percentage
+        from t_mixing where silo_id=#{siloId}
+        order by in_date desc limit 0,1
+  </select>
+  <select id="siloList" resultType="com.thhy.materials.modules.biz.concret.entity.TSilo">
+    select
+     silo_id as siloId,
+     silo_name as siloName,
+     types as types
+     from t_silo where types=#{types}
+  </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3