|
@@ -266,7 +266,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
String address = jsonObject.getString("address");
|
|
|
String liftingTime = jsonObject.getString("liftingTime");
|
|
|
String location = jsonObject.getString("location");
|
|
|
-
|
|
|
+ String vehicleNumber = jsonObject.getString("vehicleNumber");
|
|
|
if (oConvertUtils.isEmpty(billetNos) || oConvertUtils.isEmpty(positionNum)){
|
|
|
log.info("{}{}", "参数为空,C端自动化热装<保存>失败!", jsonObject);
|
|
|
return;
|
|
@@ -281,6 +281,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
queryWrapper2.eq(StorageBill::getCcmNo, ccmNo);
|
|
|
}
|
|
|
StorageBill isStorageBill = storageBillService.getOne(queryWrapper2);
|
|
|
+
|
|
|
// 取钢坯号的第九位字符
|
|
|
ccmNo = Optional.ofNullable(billetNos)
|
|
|
.filter(s -> !s.isEmpty())
|
|
@@ -290,11 +291,16 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
.filter(num -> num.length() >= 9)
|
|
|
.map(num -> String.valueOf(num.charAt(8)))
|
|
|
.orElse("");
|
|
|
-
|
|
|
- log.info("C端自动化热装铸机号:{}", ccmNo);
|
|
|
+
|
|
|
String shiftGroup = shiftGroupHandle(ccmNo);
|
|
|
String shift = shiftHandle(ccmNo);
|
|
|
- // 更具装运单确认铸机号
|
|
|
+ log.info("C端自动化热装缓存中的班组、班别:{}", ccmNo + "#:" + shiftGroup + ":" + shift);
|
|
|
+ if (oConvertUtils.isEmpty(shiftGroup) || oConvertUtils.isEmpty(shift)){
|
|
|
+ log.info("{}{}", "班组班别获取为空,C端自动化热装<保存>失败!", JSON.toJSON(isStorageBill));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ log.info("C端自动化热装装运单信息:{}", JSON.toJSONString(isStorageBill));
|
|
|
+ // 更新装运单确认铸机号
|
|
|
if (oConvertUtils.isNotEmpty(isStorageBill) && oConvertUtils.isEmpty(isStorageBill.getCcmNo())) {
|
|
|
// 更新铸机号,到装运单
|
|
|
isStorageBill.setCcmNo(ccmNo);
|
|
@@ -302,11 +308,6 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
isStorageBill.setShift(shift);
|
|
|
storageBillService.updateById(isStorageBill);
|
|
|
}
|
|
|
- log.info("C端自动化缓存中的班组、班别:{}", shiftGroup + ":" + shift);
|
|
|
- if (oConvertUtils.isEmpty(shiftGroup) || oConvertUtils.isEmpty(shift)){
|
|
|
- log.info("{}{}", "班组班别获取为空,C端自动化热装<保存>失败!", JSON.toJSON(isStorageBill));
|
|
|
- return;
|
|
|
- }
|
|
|
|
|
|
BilletHotsend billetHotsends = new BilletHotsend();
|
|
|
billetHotsends.setCcmNo(ccmNo);
|
|
@@ -315,30 +316,11 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
billetHotsends.setIsUpd(false);
|
|
|
billetHotsendDetailsVo.setBilletHotsend(billetHotsends);
|
|
|
|
|
|
+ // 独立事务热装保存行车吊运单
|
|
|
BilletLiftingBill billetLiftingBill = new BilletLiftingBill();
|
|
|
- // 独立保存行车吊运单
|
|
|
billetLiftingBill.setId(String.valueOf(IdWorker.getId()));
|
|
|
- billetLiftingBill.setCcmNo(ccmNo);
|
|
|
- billetLiftingBill.setBilletsNo(billetNos);
|
|
|
- billetLiftingBill.setShiftGroup(shiftGroup);
|
|
|
- billetLiftingBill.setShift(shift);
|
|
|
- billetLiftingBill.setVehicleNumber(jsonObject.getString("vehicleNumber"));
|
|
|
- billetLiftingBill.setLocation(location);
|
|
|
- billetLiftingBill.setAddress(address);
|
|
|
- billetLiftingBill.setLiftingType("1");
|
|
|
- billetLiftingBill.setBelongType("1");
|
|
|
- billetLiftingBill.setDestination(destination);
|
|
|
- billetLiftingBill.setLayer(layer);
|
|
|
- billetLiftingBill.setPositionNum(Integer.valueOf(positionNum));
|
|
|
- billetLiftingBill.setPlateOrStack(plateOrStack);
|
|
|
- if (oConvertUtils.isNotEmpty(liftingTime)){
|
|
|
- billetLiftingBill.setLiftingTime(DateUtils.str2Date(liftingTime, DateUtils.datetimeFormat.get()));
|
|
|
- }
|
|
|
- billetLiftingBill.setRemark("热装吊运单");
|
|
|
- billetLiftingBill.setBilletWeight(0.00);
|
|
|
- log.info("C端自动化热装——吊运单信息: {}", JSON.toJSON(billetLiftingBill));
|
|
|
- saveBilletLiftingBillsHotCharge(billetLiftingBill);
|
|
|
- log.info("C端自动化热装保存吊运单成功: {}", billetLiftingBill.getBilletsNo());
|
|
|
+ saveBilletLiftingBillsHotCharge(billetLiftingBill.getId(), ccmNo, billetNos, shiftGroup, shift, vehicleNumber, location, address, destination, layer, positionNum, plateOrStack, liftingTime);
|
|
|
+
|
|
|
// 根据坯号查询 对应的钢坯基础信息
|
|
|
String[] billetNosparts = billetNos.split(",");
|
|
|
//4 获取所有的坯号集合
|
|
@@ -347,7 +329,6 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
.isNull(BilletBasicInfo::getBelongTable)
|
|
|
.isNull(BilletBasicInfo::getBhtcId);
|
|
|
List<BilletBasicInfo> billetBasicInfoLists = billetBasicInfoService.list(queryWrapper1);
|
|
|
- log.info("111自动化热装钢坯实绩: {}", billetNosparts);
|
|
|
if (oConvertUtils.listIsEmpty(billetBasicInfoLists)){
|
|
|
// 循环三次处理
|
|
|
for (int i = 0; i < 6; i++) {
|
|
@@ -363,7 +344,6 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- log.info("222自动化热装钢坯实绩: {}", billetNosparts);
|
|
|
if (oConvertUtils.listIsEmpty(billetBasicInfoLists)){
|
|
|
log.info("{}{}", "钢坯基础信息不存在,C端自动化热装<保存>失败!", jsonObject);
|
|
|
BilletAutoException billetAutoException = createBilletAutoException(ccmNo, billetNos, shiftGroupHandle(ccmNo), shiftHandle(ccmNo), null);
|
|
@@ -387,10 +367,9 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- log.info("333自动化热装吊运单更新: {}", billetNosparts);
|
|
|
// 查询更新后的装运单信息
|
|
|
- StorageBill storageBill = storageBillService.getById(isStorageBill.getId());
|
|
|
- if (oConvertUtils.isEmpty(storageBill)) {
|
|
|
+ StorageBill storageBill = new StorageBill();
|
|
|
+ if (oConvertUtils.isEmpty(isStorageBill)) {
|
|
|
// 验证空的装运单 循环三次处理
|
|
|
for (int i = 0; i < 6; i++) {
|
|
|
// 延迟10秒
|
|
@@ -399,13 +378,13 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
} catch (InterruptedException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- storageBill = storageBillService.getById(isStorageBill.getId());
|
|
|
+ storageBill = storageBillService.getOne(queryWrapper2);
|
|
|
if (!oConvertUtils.isEmpty(storageBill)){
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- log.info("444自动化热装装运单查询: {}", JSON.toJSON(storageBill));
|
|
|
+ log.info("C端自动化热装,60秒延迟查询最终装运单对象: {}", JSON.toJSON(storageBill));
|
|
|
// 钢坯装运单
|
|
|
if (oConvertUtils.isEmpty(storageBill)) {
|
|
|
log.info("未查询钢坯装运单信息,车位号为:{},C端自动化热装<保存>失败!", positionNum);
|
|
@@ -416,7 +395,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
billetAutoException.setShiftGroup(shiftGroup);
|
|
|
billetAutoException.setShift(shift);
|
|
|
billetAutoException.setCreateTime(new Date());
|
|
|
- billetAutoException.setRemark(licensePlate);
|
|
|
+ billetAutoException.setRemark("车位号:" + positionNum + ", 车牌号为:" + licensePlate);
|
|
|
billetAutoException.setMassage("未查询钢坯装运单信息,C端自动化热装<保存>失败!");
|
|
|
billetAutoExceptionService.save(billetAutoException);
|
|
|
return;
|
|
@@ -441,7 +420,6 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
billetHotsendDetailsVo.setBelongTypeName(billetHotsendTypeConfig.getTypeName());
|
|
|
billetHotsendDetailsVo.setBilletHotsendTypeConfigId(billetHotsendTypeConfig.getId());
|
|
|
}
|
|
|
- log.info("555自动化热装数据组装: {}", billetHotsendDetailsVo.getBilletHotsendTypeConfigId());
|
|
|
List<RollClubCommon> rollClubCommonLists= new ArrayList<>();
|
|
|
AtomicInteger startNum = new AtomicInteger(0);
|
|
|
String finalCcmNo = ccmNo;
|
|
@@ -462,7 +440,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
|
|
|
saveBilletCommomTrucking(billetHotsendDetailsVo);
|
|
|
|
|
|
- log.info("{}{}", "C端自动化热装<保存>操作成功:", jsonObject);
|
|
|
+ log.info("{}{}", "C端自动化热装<保存>操作成功:", billetNos);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -649,11 +627,46 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
|
|
|
|
|
|
/**
|
|
|
* 轧钢外运热装,吊运单保存
|
|
|
- * @param billetLiftingBill
|
|
|
+ * @param ccmNo
|
|
|
+ * @param billetNos
|
|
|
+ * @param shiftGroup
|
|
|
+ * @param shift
|
|
|
+ * @param vehicleNumber
|
|
|
+ * @param location
|
|
|
+ * @param address
|
|
|
+ * @param destination
|
|
|
+ * @param layer
|
|
|
+ * @param positionNum
|
|
|
+ * @param plateOrStack
|
|
|
+ * @param liftingTime
|
|
|
*/
|
|
|
@Transactional(propagation = org.springframework.transaction.annotation.Propagation.REQUIRES_NEW)
|
|
|
- public void saveBilletLiftingBillsHotCharge(BilletLiftingBill billetLiftingBill) {
|
|
|
+ public void saveBilletLiftingBillsHotCharge(String id, String ccmNo, String billetNos, String shiftGroup, String shift, String vehicleNumber,
|
|
|
+ String location, String address, String destination, String layer, String positionNum,
|
|
|
+ String plateOrStack, String liftingTime) {
|
|
|
try {
|
|
|
+ BilletLiftingBill billetLiftingBill = new BilletLiftingBill();
|
|
|
+ // 独立保存行车吊运单
|
|
|
+ billetLiftingBill.setId(id);
|
|
|
+ billetLiftingBill.setCcmNo(ccmNo);
|
|
|
+ billetLiftingBill.setBilletsNo(billetNos);
|
|
|
+ billetLiftingBill.setShiftGroup(shiftGroup);
|
|
|
+ billetLiftingBill.setShift(shift);
|
|
|
+ billetLiftingBill.setVehicleNumber(vehicleNumber);
|
|
|
+ billetLiftingBill.setLocation(location);
|
|
|
+ billetLiftingBill.setAddress(address);
|
|
|
+ billetLiftingBill.setLiftingType("1");
|
|
|
+ billetLiftingBill.setBelongType("1");
|
|
|
+ billetLiftingBill.setDestination(destination);
|
|
|
+ billetLiftingBill.setLayer(layer);
|
|
|
+ billetLiftingBill.setPositionNum(Integer.valueOf(positionNum));
|
|
|
+ billetLiftingBill.setPlateOrStack(plateOrStack);
|
|
|
+ if (oConvertUtils.isNotEmpty(liftingTime)){
|
|
|
+ billetLiftingBill.setLiftingTime(DateUtils.str2Date(liftingTime, DateUtils.datetimeFormat.get()));
|
|
|
+ }
|
|
|
+ billetLiftingBill.setRemark("热装吊运单");
|
|
|
+ billetLiftingBill.setBilletWeight(0.00);
|
|
|
+ log.info("C端自动化热装保存吊运单成功: {}", billetLiftingBill);
|
|
|
billetLiftingBillService.save(billetLiftingBill);
|
|
|
} catch (Exception e) {
|
|
|
log.error("轧钢外运热装保存单个吊运单失败: {}", e.getMessage(), e);
|