Преглед на файлове

编辑装运单和看板确认目的地逻辑调整

qiangxuan преди 2 месеца
родител
ревизия
07cf4ba36e

+ 5 - 4
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/controller/StorageBillController.java

@@ -456,7 +456,7 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
 	public Result<String> edit(@RequestBody StorageBill storageBill) {
 		StorageBill old = storageBillService.getById(storageBill.getId());
 		storageBillService.updateById(storageBill);
-		if(oConvertUtils.isNotEmpty(storageBill.getDestination())){
+		if("1024".equals(old.getTypeConfigId()) && oConvertUtils.isNotEmpty(storageBill.getDestination())){
 			log.info("{}{}", "钢坯装运单编辑,未知目的地数据开始同步:", storageBill.getLicensePlate());
 			JSONObject jsonObject = storageBillService.billetAutoTmpDataSyn(storageBill);
 			log.info("{}{}", "钢坯装运单编辑,未知目的地数据同步结果:", jsonObject);
@@ -1346,12 +1346,13 @@ public class StorageBillController extends JeecgController<StorageBill, IStorage
 			storageBillService.updateById(bill);
 			return Result.OK("确认车牌编辑成功!");
 		}
-		if(oConvertUtils.isNotEmpty(storageBill.getDestination())){
+		// 原始装运单目的地ID是1024,才走数据同步
+		if("1024".equals(bill.getTypeConfigId())){
 			bill.setDestination(storageBill.getDestination());
 			bill.setTypeConfigId(storageBill.getTypeConfigId());
 			JSONObject jsonObject = storageBillService.billetAutoTmpDataSyn(bill);
-			log.info("{}{}", "轧钢外运未知目的地数据同步结果:", jsonObject);
-			return Result.OK("轧钢外运未知目的地数据同步成功!");
+			log.info("{}{}", "看板确认目的地数据同步结果:", jsonObject);
+			return Result.OK("确认目的地成功!");
 		}
         return Result.error("系统异常!");
     }

+ 0 - 12
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/storageBill/service/impl/StorageBillServiceImpl.java

@@ -2739,10 +2739,6 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
         JSONObject result = new JSONObject();
         try {
 
-            // 从 Redis 获取班次信息
-            String shiftGroup = getShiftInfo(storageBill.getCcmNo(), "class:shift:group:%s");
-            String shift = getShiftInfo(storageBill.getCcmNo(), "class:shift:%s");
-
             log.info("{}{}", "钢坯轧钢外运未知目的地数据同步装运单信息:", JSON.toJSON(storageBill));
             List<RollClubCommon> rollClubCommonList = new ArrayList<>();
             // 根据装运单ID查询钢坯临时表
@@ -2827,14 +2823,6 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
             String sizeString = String.join(",", sizeList.stream().map(String::valueOf).collect(Collectors.toList()));
             storageBill.setSize(sizeString);// 定尺
 
-            LambdaQueryWrapper<StorageBill> queryWrapper1 = new LambdaQueryWrapper<>();
-            queryWrapper1.eq(StorageBill::getCcmNo, storageBill.getCcmNo())
-                    .eq(StorageBill::getLicensePlate, storageBill.getLicensePlate())
-                    .eq(StorageBill::getShiftGroup, shiftGroup)
-                    .eq(StorageBill::getShift, shift).between(StorageBill::getCreateTime, DateUtils.getStartOfDay(), DateUtils.getEndOfDay());
-            long carNum = baseMapper.selectCount(queryWrapper1);
-            storageBill.setCarNum(Math.toIntExact(carNum) + 1);
-
             List<String> assemblyNumberList = billetBasicInfoList.stream().map(BilletBasicInfo::getAssemblyNumber).filter(assemblyNumber -> oConvertUtils.isNotEmpty(assemblyNumber)).collect(Collectors.toList());
             if(oConvertUtils.listIsNotEmpty(assemblyNumberList)) {
                 String distinctAssemblyNumber = billetBasicInfoList.stream()