From bf5d87c751bf4ba9578b5ad93b5018d4bd6d3ccf Mon Sep 17 00:00:00 2001
From: pjb <123456>
Date: 星期四, 03 七月 2025 17:10:22 +0800
Subject: [PATCH] 亮灯流程优化

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/LocDetlServiceImpl.java |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/LocDetlServiceImpl.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/LocDetlServiceImpl.java
index 34c7fb8..179df20 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/LocDetlServiceImpl.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/LocDetlServiceImpl.java
@@ -7,6 +7,7 @@
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.zy.asrs.framework.exception.CoolException;
 import com.zy.asrs.wms.asrs.entity.*;
+import com.zy.asrs.wms.asrs.entity.enums.LocAreaTypeSts;
 import com.zy.asrs.wms.asrs.entity.enums.LocStsType;
 import com.zy.asrs.wms.asrs.entity.param.FieldParam;
 import com.zy.asrs.wms.asrs.entity.param.FieldSortParam;
@@ -43,13 +44,13 @@
         PageParam<ViewLocDetl, BaseParam> result = viewLocDetlMapper.selectPage(pageParam, buildWrapper);
 
         //瑙f瀽鍔ㄦ�佸瓧娈�
-        JSONObject data = JSON.parseObject(JSON.toJSONString(result));
-        List<ViewLocDetl> records = result.getRecords();
-        data.put("records", records);
-        for (ViewLocDetl locDetl : records) {
-            Map<String, Object> resultMap = viewLocDetlMapper.getById(locDetl.getId());
-            locDetl.syncFieldMap(resultMap);
-        }
+//        JSONObject data = JSON.parseObject(JSON.toJSONString(result));
+//        List<ViewLocDetl> records = result.getRecords();
+//        data.put("records", records);
+//        for (ViewLocDetl locDetl : records) {
+//            Map<String, Object> resultMap = viewLocDetlMapper.getById(locDetl.getId());
+//            locDetl.syncFieldMap(resultMap);
+//        }
         return result;
     }
 
@@ -102,7 +103,7 @@
 
     @Override
     public List<LocDetl> queryStock(String matnr, String batch, List<FieldParam> param, List<FieldSortParam> sortParam) {
-        List<Map<String, Object>> list = viewLocDetlMapper.queryStock(matnr, batch, param, sortParam);
+        List<Map<String, Object>> list = viewLocDetlMapper.queryStock(matnr, batch, param, sortParam, LocAreaTypeSts.LOC_AREA_TYPE_UTC.id);
         List<LocDetl> locDetlsSort = resortDetls(list);
         return locDetlsSort;
     }
@@ -183,7 +184,7 @@
     }
 
     @Override
-    @Transactional
+    @Transactional(rollbackFor = Exception.class)
     public void locDetlFreeze(LocDetlFreezeParam param) {
         if (param == null) {
             throw new CoolException("鍙傛暟涓嶈兘涓虹┖");
@@ -230,12 +231,11 @@
     @Override
     public List<LocDetl> queryFlatStock(String matnr, String batch, List<FieldParam> params) {
         //鑾峰彇骞冲簱涓鍚堟潯浠剁殑搴撲綅
-        List<Map<String, Object>> list = viewLocDetlMapper.queryFlatStock(matnr, batch, params);
+        List<Map<String, Object>> list = viewLocDetlMapper.queryFlatStock(matnr, batch, params, LocAreaTypeSts.LOC_AREA_TYPE_FLAT.id);
         List<LocDetl> detls = new ArrayList<>();
         list.forEach(action -> {
-            LocDetl locDetl = new LocDetl();
-            BeanUtils.copyProperties(action, locDetl);
-            detls.add(locDetl);
+            LocDetl parseObject = JSONObject.parseObject(JSON.toJSONString(action), LocDetl.class);
+            detls.add(parseObject);
         });
         return detls;
     }

--
Gitblit v1.9.1