From cd5f5e0bf379cf41b93ddb24cf0e1b0831fb1d01 Mon Sep 17 00:00:00 2001
From: bingbo <bingbo1993@126.com>
Date: 星期五, 24 十一月 2023 17:41:17 +0800
Subject: [PATCH] Merge branch 'master' of http://111.30.93.211:10101/r/supipe

---
 hd/pipe/materialsManage/src/main/resources/mapping/WeighMapper.xml |   96 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 96 insertions(+), 0 deletions(-)

diff --git a/hd/pipe/materialsManage/src/main/resources/mapping/WeighMapper.xml b/hd/pipe/materialsManage/src/main/resources/mapping/WeighMapper.xml
index ddadc5f..55cbeb7 100644
--- a/hd/pipe/materialsManage/src/main/resources/mapping/WeighMapper.xml
+++ b/hd/pipe/materialsManage/src/main/resources/mapping/WeighMapper.xml
@@ -615,4 +615,100 @@
         order by weighbridge_id desc
     </select>
 
+    <select id="weighbridgeListType" resultType="com.thhy.materials.modules.biz.weigh.entity.TWeighbridge">
+        select
+        weighbridge_id as weighbridgeId,
+        id,
+        code,
+        orgName,
+        supplyOrgName,
+        carNumber,
+        driverName,
+        matName,
+        matModel,
+        mPoundTime,
+        mPoundWeight,
+        mPoundName,
+        pPoundTime,
+        pPoundWeight,
+        pPoundName,
+        jPoundWeight,
+        buckleWeight,
+        mWeight,
+        pWeight,
+        jWeight,
+        wareName,
+        fileImage,
+        types
+         from  t_weighbridge where
+        types=1
+    </select>
+    <select id="materialStockValue" resultType="java.lang.Double">
+        select material_value as materialValue
+        from  t_material_stock where  material_name=#{dictId}
+    </select>
+
+
+    <insert id="materialStockRecordIns" >
+        insert into t_material_stock_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            id,
+            <if test="createDate != null">
+                create_date,
+            </if>
+            <if test="type != null">
+                type,
+            </if>
+            <if test="opType != null">
+                op_type,
+            </if>
+            <if test="materialName != null">
+                material_name,
+            </if>
+            <if test="materialValue != null">
+                material_value,
+            </if>
+            <if test="beforeStock != null">
+                before_stock,
+            </if>
+            <if test="afterStock != null">
+                after_stock,
+            </if>
+            <if test="companyId != null">
+                company_id,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            REPLACE(UUID(),'-',''),
+            <if test="createDate != null">
+                #{createDate,jdbcType=TIMESTAMP},
+            </if>
+            <if test="type != null">
+                #{type,jdbcType=INTEGER},
+            </if>
+            <if test="opType != null">
+                #{opType,jdbcType=INTEGER},
+            </if>
+            <if test="materialName != null">
+                #{materialName,jdbcType=VARCHAR},
+            </if>
+            <if test="materialValue != null">
+                #{materialValue,jdbcType=DOUBLE},
+            </if>
+            <if test="beforeStock != null">
+                #{beforeStock,jdbcType=DOUBLE},
+            </if>
+            <if test="afterStock != null">
+                #{afterStock,jdbcType=DOUBLE},
+            </if>
+            <if test="companyId != null">
+                #{companyId},
+            </if>
+        </trim>
+    </insert>
+    <update id="weighbridgeUpdateType" >
+        update t_weighbridge set
+        types=2
+        where weighbridge_id=#{weighbridgeId}
+    </update>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3