|
@@ -2738,13 +2738,12 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
public JSONObject billetAutoTmpDataSyn(StorageBill storageBill) {
|
|
|
JSONObject result = new JSONObject();
|
|
|
try {
|
|
|
-
|
|
|
log.info("{}{}", "钢坯轧钢外运未知目的地数据同步装运单信息:", JSON.toJSON(storageBill));
|
|
|
List<RollClubCommon> rollClubCommonList = new ArrayList<>();
|
|
|
// 根据装运单ID查询钢坯临时表
|
|
|
List<BilletAutoTmp> billetAutoTmpList = billetAutoTmpService.list(new LambdaQueryWrapper<BilletAutoTmp>()
|
|
|
.eq(BilletAutoTmp::getStorageBillId, storageBill.getId()));
|
|
|
- if (oConvertUtils.listIsEmpty(billetAutoTmpList)){
|
|
|
+ if (oConvertUtils.listIsEmpty(billetAutoTmpList) || "1024".equals(storageBill.getTypeConfigId())){
|
|
|
result.put("fail", "钢坯轧钢外运未知目的地明细不存在!");
|
|
|
return result;
|
|
|
}
|
|
@@ -2757,6 +2756,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
rollClubCommonList.add(rollClubCommon);
|
|
|
});
|
|
|
|
|
|
+ log.info("{}{}", "未知目的地数据同步临时表总条数:", rollClubCommonList.size());
|
|
|
+
|
|
|
// 根据ID获取钢坯配置信息
|
|
|
BilletHotsend billetHotsend = new BilletHotsend();
|
|
|
billetHotsend.setCcmNo(storageBill.getCcmNo());
|
|
@@ -2789,7 +2790,8 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
if (jsonObject.containsKey("fail")) {
|
|
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
|
|
log.info("{}{}", "B端钢坯装运单未知目的地数据同步操作失败,事务回滚!", jsonObject);
|
|
|
- return jsonObject;
|
|
|
+ result.put("fail", "B端钢坯装运单未知目的地数据同步操作失败!");
|
|
|
+ return result;
|
|
|
}
|
|
|
}
|
|
|
List<String> billetNos = rollClubCommonList.stream().map(RollClubCommon::getBilletNo).collect(Collectors.toList());
|
|
@@ -2810,8 +2812,11 @@ public class StorageBillServiceImpl extends ServiceImpl<StorageBillMapper, Stora
|
|
|
x.setUpdateTime(new Date());
|
|
|
});
|
|
|
billetBasicInfoService.saveOrUpdateBatch(billetBasicInfoList);
|
|
|
+ log.info("{}{}", "B端钢坯装运单未知目的地数据同步时,装运单总支数!", storageBill.getAmountTotal());
|
|
|
// 维护总支数
|
|
|
storageBill.setAmountTotal(storageBill.getAmountTotal() + rollClubCommonList.size());
|
|
|
+
|
|
|
+ log.info("{}{}", "B端钢坯装运单未知目的地数据同步时,累加临时表后的,装运单总支数!", storageBill.getAmountTotal());
|
|
|
// 取最新的第一条钢坯信息
|
|
|
RollClubCommon rollClubCommon = rollClubCommonList.stream().findFirst().orElse(null);
|
|
|
if (rollClubCommon != null) {
|