Przeglądaj źródła

更新利库数量,剩余数量

[user3] 4 lat temu
rodzic
commit
fc8081fb18

+ 4 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/liKuResourcePool/mapper/LiKuResourcePoolMapper.java

@@ -36,4 +36,8 @@ public interface LiKuResourcePoolMapper extends BaseMapper<LiKuResourcePool> {
      */
     List<LiKuResourcePool> findLiKuList(@Param("isSectionLength") Integer isSectionLength, @Param("whereFrom")Integer whereFrom);
 
+    /**
+     *
+     * */
+    void updateAllList(@Param("list") List<LiKuResourcePool> list);
 }

+ 8 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/liKuResourcePool/mapper/xml/LiKuResourcePoolMapper.xml

@@ -236,6 +236,14 @@
 			del_flag = #{DEL_FLAG_DELETE}
 		WHERE id = #{id}
 	</update>
+	<update id="updateAllList">
+		<foreach collection="list" item="item" index="index"  separator=";">
+			update bla_resource_pool set
+			numberOfNiches = #{item.numberOfNiches},
+			remaining = #{item.remaining}
+			where id = #{item.id}
+		</foreach>
+	</update>
 
 
 	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->

+ 7 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/liKuResourcePool/service/LiKuResourcePoolService.java

@@ -73,5 +73,12 @@ public class LiKuResourcePoolService extends CrudService<LiKuResourcePoolMapper,
 		return mapper.findLiKuList(isSectionLength, whereFrom);
 	}
 
+	/**
+	 * 更新物资上报后利库
+	 */
+	@Transactional(readOnly = false)
+	public void updateAllList(List<LiKuResourcePool> list) {
+		mapper.updateAllList(list);
+	}
 
 }

+ 29 - 0
src/main/java/com/jeeplus/modules/sg/balancedlibrary/materialReportDetails/web/MaterialReportDetailsController.java

@@ -5572,6 +5572,35 @@ public class MaterialReportDetailsController extends BaseController {
                     exportList.add(details);
                 }
             }
+            //利库基础数据更新库存
+            List<LiKuResourcePool> replaceList = new ArrayList<>();
+            if (bBNonPoolList.size() > 0) {
+                replaceList.addAll(bBNonPoolList);
+            }
+            if (yZNonPoolList.size() > 0) {
+                replaceList.addAll(yZNonPoolList);
+            }
+            if (dYNonPoolList.size() > 0) {
+                replaceList.addAll(dYNonPoolList);
+            }
+            if (dYNonPoolList.size() > 0) {
+                replaceList.addAll(dYNonPoolList);
+            }
+            if (bBPoolList.size() > 0) {
+                replaceList.addAll(bBPoolList);
+            }
+            if (yZPoolList.size() > 0) {
+                replaceList.addAll(yZPoolList);
+            }
+            if (dYPoolList.size() > 0) {
+                replaceList.addAll(dYPoolList);
+            }
+            if (jRPoolList.size() > 0) {
+                replaceList.addAll(jRPoolList);
+            }
+            if (replaceList.size() > 0) {
+                poolService.updateAllList(replaceList);
+            }
 
             if (exportList.size() > 0) {
                 service.delAll();