Преглед изворни кода

厂外库出库功能BUG修改

xiaosonghong пре 3 недеља
родитељ
комит
4b33c2c74c

+ 8 - 4
src/main/java/com/steerinfo/dil/service/impl/OyeResultServiceImpl.java

@@ -240,7 +240,9 @@ public class OyeResultServiceImpl implements IOyeResultService {
             map.put("inventoryId",inventoryId);
             map.put("flag",2);
             OyeRealtimeInventory oyeRealtimeInventory = updateRealTimeInventory(map);
-            oyeRealtimeInventories.add(oyeRealtimeInventory);
+            //更新库存信息BUG修改
+            //oyeRealtimeInventories.add(oyeRealtimeInventory);
+            oyeRealtimeInventoryMapper.updateByPrimaryKey(oyeRealtimeInventory);
             TmstruckWeightBatch  tmstruckWeightBatch  = generateWeightBatch(map);
             tmstruckWeightBatches.add(tmstruckWeightBatch);
             Map<String, Object> updateMap = new HashMap<>();
@@ -253,7 +255,7 @@ public class OyeResultServiceImpl implements IOyeResultService {
             oyeOutboundResults.add(oyeOutboundResult);
         }
         oyeOutboundResultMapper.batchInsert(oyeOutboundResults);
-        oyeRealtimeInventoryMapper.batchUpdate(oyeRealtimeInventories);
+        //oyeRealtimeInventoryMapper.batchUpdate(oyeRealtimeInventories);
         tmstruckWeightBatchMapper.batchInsert(tmstruckWeightBatches);
         return "出库成功";
     }
@@ -752,7 +754,9 @@ public class OyeResultServiceImpl implements IOyeResultService {
             updateRealMap.put("netWeight",netWeightOld);
             updateRealMap.put("theoryWeight",theoryWeightOld);
             OyeRealtimeInventory oyeRealtimeInventory = updateRealTimeInventory(updateRealMap);
-            oyeRealtimeInventories.add(oyeRealtimeInventory);
+            //库存批量更新BUG
+            //oyeRealtimeInventories.add(oyeRealtimeInventory);
+            oyeRealtimeInventoryMapper.updateByPrimaryKey(oyeRealtimeInventory);
             TmstruckWeightBatch  tmstruckWeightBatch  = tmstruckWeightBatchMapper.selectByPrimaryKey(weightBatchId);
             tmstruckWeightBatch.setBatchNetWeight(netWeight);
             tmstruckWeightBatches.add(tmstruckWeightBatch);
@@ -769,7 +773,7 @@ public class OyeResultServiceImpl implements IOyeResultService {
             return 1;
         }
         oyeOutboundResultMapper.batchUpdate(oyeOutboundResults);
-        oyeRealtimeInventoryMapper.batchUpdate(oyeRealtimeInventories);
+        //oyeRealtimeInventoryMapper.batchUpdate(oyeRealtimeInventories);
         tmstruckWeightBatchMapper.batchUpdate(tmstruckWeightBatches);
         return 1;
     }