From c206acfaedc69c390fb67daa81bc686f58a212ef Mon Sep 17 00:00:00 2001
From: CZT <czt18638530771@163.com>
Date: 星期一, 27 十一月 2023 16:12:11 +0800
Subject: [PATCH] 提交配置信息2

---
 igds-inout/src/main/resources/mapper/InoutCommonMapper.xml |  268 +++++++++++++++++++++++++----------------------------
 1 files changed, 128 insertions(+), 140 deletions(-)

diff --git a/igds-inout/src/main/resources/mapper/InoutCommonMapper.xml b/igds-inout/src/main/resources/mapper/InoutCommonMapper.xml
index c4b1b4a..72000e4 100644
--- a/igds-inout/src/main/resources/mapper/InoutCommonMapper.xml
+++ b/igds-inout/src/main/resources/mapper/InoutCommonMapper.xml
@@ -42,11 +42,11 @@
 
     <!-- 鏍规嵁ip鍜岀鍙f洿鏂板嚭鍏ュ簱璁惧鐘舵�� -->
     <update id="updateInoutConfStatus">
-		update D_INOUT_CONF
-		set STATUS_ = #{status}
-		where IP_ = #{ip}
-		and PORT_ = #{port}
-	</update>
+        update D_INOUT_CONF
+        set STATUS_ = #{status}
+        where IP_ = #{ip}
+          and PORT_ = #{port}
+    </update>
 
     <!-- 鏍规嵁鍙傛暟鑾峰彇寰�鏉ュ崟浣� -->
     <select id="listCustomer" parameterType="com.ld.igds.inout.dto.InoutParam"
@@ -142,11 +142,11 @@
     <!-- 鑾峰彇缂栫爜鏈�澶х殑鍗曚綅 -->
     <select id="getMaxCustomerId" parameterType="java.lang.String"
             resultType="java.lang.String">
-		select ID_ from D_INOUT_CUSTOMER
-		where
-		COMPANY_ID_ = #{companyId}
-		order by ID_ DESC limit 1
-	</select>
+        select ID_
+        from D_INOUT_CUSTOMER
+        where COMPANY_ID_ = #{companyId}
+        order by ID_ DESC limit 1
+    </select>
 
     <!-- 鑾峰彇鍏ュ簱閫氱煡鍗曚俊鎭� -->
     <select id="listNoticeIn" parameterType="com.ld.igds.m.dto.NoticeParam"
@@ -156,7 +156,6 @@
         COMPANY_ID_ as companyId,
         DEPT_ID_ as deptId,
         PLAN_ID_ as planId,
-        PLAN_NAME_ as planName,
         CONTRACT_ID_ as contractId,
         CONTRACT_NAME_ as contractName,
         NAME_ as name,
@@ -173,6 +172,7 @@
         CREATE_TIME_ as createTime,
         CREATE_USER_ as createUser,
         COMPLETE_TIME_ as completeTime,
+        DEPOT_ID_ as depotId,
         REMARK_ as remark
         from
         D_INOUT_NOTICE_IN
@@ -198,51 +198,47 @@
 
     <!-- 鏂板鍏ュ簱閫氱煡鍗� -->
     <insert id="addNoticeIn" parameterType="com.ld.igds.models.InoutNoticeIn">
-		insert into
-		D_INOUT_NOTICE_IN (
-		ID_,
-		COMPANY_ID_,
-		DEPT_ID_,
-		PLAN_ID_,
-		CONTRACT_ID_,
-		NAME_,
-		CUSTOMER_ID_,
-		CUSTOMER_NAME_,
-		UNIT_NAME_,
-		FOOD_VARIETY_,
-		YEAR_,
-		TARGET_NUMBER_,
-		COMPLETE_NUMBER_,
-		AUDIT_STATUS_,
-		AUDIT_USER_,
-		COMPLETE_STATUS_,
-		CREATE_TIME_,
-		CREATE_USER_,
-		UPDATE_TIME_,
-		REMARK_
-		)values (
-		#{param.id},
-		#{param.companyId},
-		#{param.deptId},
-		#{param.planId},
-		#{param.contractId},
-		#{param.name},
-		#{param.customerId},
-		#{param.customerName},
-		#{param.unitName},
-		#{param.foodVariety},
-		#{param.year},
-		#{param.targetNumber},
-		#{param.completeNumber},
-		#{param.auditStatus},
-		#{param.auditUser},
-		#{param.completeStatus},
-		#{param.createTime},
-		#{param.createUser},
-		#{param.updateTime},
-		#{param.remark}
-		)
-	</insert>
+        insert into D_INOUT_NOTICE_IN (ID_,
+                                       COMPANY_ID_,
+                                       DEPT_ID_,
+                                       PLAN_ID_,
+                                       CONTRACT_ID_,
+                                       NAME_,
+                                       CUSTOMER_ID_,
+                                       CUSTOMER_NAME_,
+                                       UNIT_NAME_,
+                                       FOOD_VARIETY_,
+                                       YEAR_,
+                                       TARGET_NUMBER_,
+                                       COMPLETE_NUMBER_,
+                                       AUDIT_STATUS_,
+                                       AUDIT_USER_,
+                                       COMPLETE_STATUS_,
+                                       CREATE_TIME_,
+                                       CREATE_USER_,
+                                       UPDATE_TIME_,
+                                       REMARK_)
+        values (#{param.id},
+                #{param.companyId},
+                #{param.deptId},
+                #{param.planId},
+                #{param.contractId},
+                #{param.name},
+                #{param.customerId},
+                #{param.customerName},
+                #{param.unitName},
+                #{param.foodVariety},
+                #{param.year},
+                #{param.targetNumber},
+                #{param.completeNumber},
+                #{param.auditStatus},
+                #{param.auditUser},
+                #{param.completeStatus},
+                #{param.createTime},
+                #{param.createUser},
+                #{param.updateTime},
+                #{param.remark})
+    </insert>
 
     <!--鏇存柊鍏ュ簱閫氱煡鍗�-->
     <update id="updateNoticeIn" parameterType="com.ld.igds.m.dto.NoticeInData">
@@ -267,18 +263,17 @@
 
     <!-- 鑾峰彇鎵�鏈夋湭瀹屾垚鐘舵�佸叆搴撻�氱煡鍗� -->
     <select id="getUnComNoticeIn" resultType="com.ld.igds.models.InoutNoticeIn">
-		select
-		ID_ as id,
-		COMPANY_ID_ as companyId,
-		DEPT_ID_ as deptId,
-		PLAN_ID_ as planId,
-		CONTRACT_ID_ as contractId,
-		NAME_ as name,
-		CUSTOMER_ID_ as customerId,
-		CUSTOMER_NAME_ as customerName,
-		UNIT_NAME_ as unitName,
-		FOOD_VARIETY_ as foodVariety,
-		YEAR_ as year,
+        select ID_            as id,
+               COMPANY_ID_    as companyId,
+               DEPT_ID_       as deptId,
+               PLAN_ID_       as planId,
+               CONTRACT_ID_   as contractId,
+               NAME_          as name,
+               CUSTOMER_ID_   as customerId,
+               CUSTOMER_NAME_ as customerName,
+               UNIT_NAME_     as unitName,
+               FOOD_VARIETY_  as foodVariety,
+               YEAR_ as year,
 		TARGET_NUMBER_ as targetNumber,
 		COMPLETE_NUMBER_ as completeNumber,
 		AUDIT_STATUS_ as auditStatus,
@@ -288,36 +283,34 @@
 		CREATE_USER_ as createUser,
 		COMPLETE_TIME_ as completeTime,
 		REMARK_ as remark
-		from
-		D_INOUT_NOTICE_IN
-		where
-		COMPLETE_STATUS_ = 'NONE'
-		and COMPANY_ID_ = #{companyId}
-	</select>
+        from
+            D_INOUT_NOTICE_IN
+        where
+            COMPLETE_STATUS_ = 'NONE'
+          and COMPANY_ID_ = #{companyId}
+    </select>
 
     <!-- 閲嶆柊璁$畻鍏ュ簱閫氱煡鍗曞畬鎴愰噺 -->
     <update id="reSumNoticeInComplete" parameterType="com.ld.igds.m.dto.NoticeParam">
-		update D_INOUT_NOTICE_IN t,(
-		SELECT
-		r.CUSTOMER_ID_,
-		r.FOOD_VARIETY_,
-		r.NOTICE_ID_,
-		sum(r.RECORD_WEIGHT_) as COMPLETE_NUMBER_
-		from d_inout_record r
-		where r.COMPANY_ID_ = #{param.companyId}
-		and r.DEPT_ID_ = #{param.deptId}
-		and r.CUSTOMER_ID_ = #{param.customerId}
-		and r.FOOD_VARIETY_ = #{param.foodVariety}
-		and r.NOTICE_ID_ = #{param.id}
-		and r.RECORD_STATUS_ != 'DEL'
-		and r.RECORD_STATUS_ != 'ERROR'
-		GROUP BY r.FOOD_VARIETY_
-		) b
-		SET t.COMPLETE_NUMBER_ = b.COMPLETE_NUMBER_
-		WHERE t.CUSTOMER_ID_ = b.CUSTOMER_ID_
-		AND t.FOOD_VARIETY_ = b.FOOD_VARIETY_
-		AND t.ID_ = b.NOTICE_ID_
-	</update>
+        update D_INOUT_NOTICE_IN t,(
+            SELECT
+            r.FOOD_VARIETY_,
+            r.NOTICE_ID_,
+            sum(r.RECORD_WEIGHT_) as COMPLETE_NUMBER_
+            from d_inout_record r
+            where r.COMPANY_ID_ = #{param.companyId}
+            and r.DEPT_ID_ = #{param.deptId}
+            and r.FOOD_VARIETY_ = #{param.foodVariety}
+            and r.NOTICE_ID_ = #{param.id}
+            and r.RECORD_STATUS_ != 'DEL'
+            and r.RECORD_STATUS_ != 'ERROR'
+            GROUP BY r.FOOD_VARIETY_
+            ) b
+        SET t.COMPLETE_NUMBER_ = b.COMPLETE_NUMBER_
+        WHERE
+          t.FOOD_VARIETY_ = b.FOOD_VARIETY_
+          AND t.ID_ = b.NOTICE_ID_
+    </update>
 
     <!-- 鏍规嵁鍙傛暟鏌ヨ鍑哄簱閫氱煡鍗� -->
     <select id="queryNoticeOut" resultType="int" parameterType="com.ld.igds.m.dto.NoticeParam">
@@ -387,7 +380,6 @@
         COMPANY_ID_ as companyId,
         DEPT_ID_ as deptId,
         PLAN_ID_ as planId,
-        PLAN_NAME_ as planName,
         CONTRACT_ID_ as contractId,
         CONTRACT_NAME_ as contractName,
         NAME_ as name,
@@ -437,21 +429,20 @@
 
     <!-- 鑾峰彇鎵�鏈夋湭瀹屾垚鐘舵�佸嚭搴撻�氱煡鍗� -->
     <select id="getUnComNoticeOut" resultType="com.ld.igds.models.InoutNoticeOut">
-		select
-		ID_ as id,
-		COMPANY_ID_ as companyId,
-		DEPT_ID_ as deptId,
-		PLAN_ID_ as planId,
-		CONTRACT_ID_ as contractId,
-		NAME_ as name,
-		DEPOT_ID_ as depotId,
-		CUSTOMER_ID_ as customerId,
-		CUSTOMER_NAME_ as customerName,
-		UNIT_NAME_ as unitName,
-		FOOD_VARIETY_ as foodVariety,
-		FOOD_TYPE_ as foodType,
-		FOOD_LEVEL_ as foodLevel,
-		YEAR_ as year,
+        select ID_            as id,
+               COMPANY_ID_    as companyId,
+               DEPT_ID_       as deptId,
+               PLAN_ID_       as planId,
+               CONTRACT_ID_   as contractId,
+               NAME_          as name,
+               DEPOT_ID_      as depotId,
+               CUSTOMER_ID_   as customerId,
+               CUSTOMER_NAME_ as customerName,
+               UNIT_NAME_     as unitName,
+               FOOD_VARIETY_  as foodVariety,
+               FOOD_TYPE_     as foodType,
+               FOOD_LEVEL_    as foodLevel,
+               YEAR_ as year,
 		STORAGE_REAL_ as storageReal,
 		TARGET_NUMBER_ as targetNumber,
 		COMPLETE_NUMBER_ as completeNumber,
@@ -462,37 +453,34 @@
 		CREATE_USER_ as createUser,
 		COMPLETE_TIME_ as completeTime,
 		REMARK_ as remark
-		from
-		D_INOUT_NOTICE_OUT
-		where
-		COMPLETE_STATUS_ = 'NONE'
-		and COMPANY_ID_ = #{companyId}
-	</select>
+        from
+            D_INOUT_NOTICE_OUT
+        where
+            COMPLETE_STATUS_ = 'NONE'
+          and COMPANY_ID_ = #{companyId}
+    </select>
 
     <!-- 閲嶆柊璁$畻鍑哄簱閫氱煡鍗曞畬鎴愰噺锛屽彧鏍规嵁瀹㈡埛鏇存柊 -->
     <update id="reSumNoticeOutComplete" parameterType="com.ld.igds.m.dto.NoticeParam">
-		update D_INOUT_NOTICE_OUT t,(
-		SELECT
-		r.CUSTOMER_ID_,
-		r.FOOD_VARIETY_,
-		r.DEPOT_ID_,
-		r.NOTICE_ID_,
-		sum(r.RECORD_WEIGHT_) as COMPLETE_NUMBER_
-		from d_inout_record r
-		where r.COMPANY_ID_ = #{param.companyId}
-		AND r.DEPT_ID_ = #{param.deptId}
-		and r.CUSTOMER_ID_ = #{param.customerId}
-		and r.DEPOT_ID_ = #{param.depotId}
-		and r.FOOD_VARIETY_ = #{param.foodVariety}
-		and r.RECORD_STATUS_ != 'DEL'
-		and r.RECORD_STATUS_ != 'ERROR'
-		GROUP BY r.DEPOT_ID_
-		) b
-		SET t.COMPLETE_NUMBER_ = b.COMPLETE_NUMBER_
-		WHERE t.CUSTOMER_ID_ = b.CUSTOMER_ID_
-		AND t.FOOD_VARIETY_ = b.FOOD_VARIETY_
-		AND t.DEPOT_ID_ = b.DEPOT_ID_
-		AND t.ID_ = b.NOTICE_ID_
-	</update>
+        update D_INOUT_NOTICE_OUT t,(
+            SELECT
+            r.FOOD_VARIETY_,
+            r.DEPOT_ID_,
+            r.NOTICE_ID_,
+            sum(r.RECORD_WEIGHT_) as COMPLETE_NUMBER_
+            from d_inout_record r
+            where r.COMPANY_ID_ = #{param.companyId}
+            AND r.DEPT_ID_ = #{param.deptId}
+            and r.DEPOT_ID_ = #{param.depotId}
+            and r.FOOD_VARIETY_ = #{param.foodVariety}
+            and r.RECORD_STATUS_ != 'DEL'
+            and r.RECORD_STATUS_ != 'ERROR'
+            GROUP BY r.DEPOT_ID_
+            ) b
+        SET t.COMPLETE_NUMBER_ = b.COMPLETE_NUMBER_
+        WHERE  t.FOOD_VARIETY_ = b.FOOD_VARIETY_
+          AND t.DEPOT_ID_ = b.DEPOT_ID_
+          AND t.ID_ = b.NOTICE_ID_
+    </update>
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3