|
@@ -284,10 +284,10 @@ public class OyeResultServiceImpl implements IOyeResultService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 更新实时库存
|
|
|
+ * 更新实时库存(2025-4-10 14:00:22)
|
|
|
*/
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public synchronized OyeRealtimeInventory updateRealTimeInventory(Map<String,Object> map) throws Exception {
|
|
|
+ public OyeRealtimeInventory updateRealTimeInventory(Map<String,Object> map) throws Exception {
|
|
|
//更新实时库存
|
|
|
BigDecimal inventoryId = DataChange.dataToBigDecimal(map.get("inventoryId"));
|
|
|
// flag为1,则为入库,为2则为出库
|
|
@@ -315,6 +315,12 @@ public class OyeResultServiceImpl implements IOyeResultService {
|
|
|
return oyeRealtimeInventory;
|
|
|
}
|
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public synchronized void updateRealTimeInventoryOye(Map<String,Object> map) throws Exception{
|
|
|
+ OyeRealtimeInventory oyeRealtimeInventory = updateRealTimeInventory(map);
|
|
|
+ oyeRealtimeInventoryMapper.updateByPrimaryKeySelective(oyeRealtimeInventory);
|
|
|
+ }
|
|
|
+
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public TmstruckWeightBatch generateWeightBatch(Map<String,Object> map) {
|
|
|
TmstruckWeightBatch tmstruckWeightBatch = new TmstruckWeightBatch();
|
|
@@ -336,8 +342,6 @@ public class OyeResultServiceImpl implements IOyeResultService {
|
|
|
// 划分实时库存数据
|
|
|
// 针对原先的库存,需要进行出库;针对划分后的库存需要进行入库;先出后入;
|
|
|
// 创建出库需要的数据;
|
|
|
- Map<String, Object> jiChuMap = new HashMap<>();
|
|
|
- jiChuMap.put("inventoryId",map.get("inventoryId"));
|
|
|
BigDecimal newInventoryId = DataChange.dataToBigDecimal(map.get("newInventoryId"));
|
|
|
OyeOutboundResult oyeOutboundResult = new OyeOutboundResult();
|
|
|
oyeOutboundResult.setId(oyeOutboundResultMapper.getResultId());
|
|
@@ -392,8 +396,8 @@ public class OyeResultServiceImpl implements IOyeResultService {
|
|
|
OyeRealtimeInventory oyeRealtimeInventoryInsert = null;
|
|
|
OyeRealtimeInventory oyeRealtimeInventoryUpdate = null;
|
|
|
//根据区域,客户,物资,单重,米数,仓库,库区查询实时库存在不在
|
|
|
- BigDecimal inventoryId = null ;
|
|
|
- if(newInventoryId == null || newInventoryId.intValue() == 0) {
|
|
|
+ BigDecimal inventoryId;
|
|
|
+ if(newInventoryId.intValue() == 0) {
|
|
|
inventoryId = oyeRealtimeInventoryMapper.getInventoryId(map);
|
|
|
}else{
|
|
|
inventoryId = newInventoryId;
|
|
@@ -544,7 +548,7 @@ public class OyeResultServiceImpl implements IOyeResultService {
|
|
|
*/
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public synchronized String putNewFactory(Map<String, Object> map) throws Exception{
|
|
|
- map.put("inboundArea", "欧冶库");
|
|
|
+ map.put("inboundArea", "厂外库");
|
|
|
System.out.println("+++++++++++" + new Date());
|
|
|
JSONObject jsonObject = new JSONObject(map);
|
|
|
System.out.println(jsonObject);
|
|
@@ -698,7 +702,7 @@ public class OyeResultServiceImpl implements IOyeResultService {
|
|
|
}
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public int reUpdateOutBound(Map<String, Object> mapValue) throws Exception {
|
|
|
+ public synchronized int reUpdateOutBound(Map<String, Object> mapValue) throws Exception {
|
|
|
List<OyeOutboundResult> oyeOutboundResults = new ArrayList<>();
|
|
|
List<TmstruckWeightBatch> tmstruckWeightBatches = new ArrayList<>();
|
|
|
List<OyeRealtimeInventory> oyeRealtimeInventories = new ArrayList<>();
|