Explorar el Código

热装异常日志添加

qiangxuan hace 2 semanas
padre
commit
85a8ef9ef7

+ 17 - 8
zgzt-sys-java/jeecg-module-conn/src/main/java/org/jeecg/modules/billetActual/service/impl/BilletHotsendBaseServiceImpl.java

@@ -338,7 +338,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		billetLiftingBill.setBilletWeight(0.00);
 		log.info("C端自动化热装——吊运单信息: {}", JSON.toJSON(billetLiftingBill));
 		saveBilletLiftingBillsHotCharge(billetLiftingBill);
-
+		log.info("C端自动化热装保存吊运单成功: {}", billetLiftingBill.getBilletsNo());
 		// 根据坯号查询 对应的钢坯基础信息
 		String[] billetNosparts = billetNos.split(",");
 		//4 获取所有的坯号集合
@@ -347,9 +347,10 @@ 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 < 10; i++) {
+			for (int i = 0; i < 6; i++) {
 				// 延迟10秒
 				try {
 					Thread.sleep(10000);
@@ -362,6 +363,7 @@ 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);
@@ -374,12 +376,18 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 		BilletLiftingBill billetLiftingBillUpdate = billetLiftingBillService.getById(billetLiftingBill.getId());
 		if (oConvertUtils.isNotEmpty(billetLiftingBillUpdate)){
 			// 维护吊运单,坯重、组坯号、炉号
-			billetLiftingBillUpdate.setHeatNo(getHeatNo(billetBasicInfoLists));
-			double totalWeight = billetBasicInfoLists.stream().mapToDouble(BilletBasicInfo::getBilletWeight).sum();
-			billetLiftingBillUpdate.setBilletWeight(totalWeight);
-			billetLiftingBillUpdate.setAssemblyNumber(getAssemblyNumber(billetBasicInfoLists));
-			billetLiftingBillService.updateById(billetLiftingBillUpdate);
+			try {
+				billetLiftingBillUpdate.setHeatNo(getHeatNo(billetBasicInfoLists));
+				double totalWeight = billetBasicInfoLists.stream().mapToDouble(BilletBasicInfo::getBilletWeight).sum();
+				billetLiftingBillUpdate.setBilletWeight(totalWeight);
+				billetLiftingBillUpdate.setAssemblyNumber(getAssemblyNumber(billetBasicInfoLists));
+				billetLiftingBillService.updateById(billetLiftingBillUpdate);
+			} catch (Exception e) {
+				log.info("{}{}", "更新吊运单异常,C端自动化热装<保存>失败!", JSON.toJSON(billetLiftingBillUpdate);
+				return;
+			}
 		}
+		log.info("333自动化热装吊运单更新: {}", billetNosparts);
 		// 查询更新后的装运单信息
 		StorageBill storageBill = storageBillService.getById(isStorageBill.getId());
 		if (oConvertUtils.isEmpty(storageBill)) {
@@ -397,6 +405,7 @@ public class BilletHotsendBaseServiceImpl extends ServiceImpl<BilletHotsendBaseM
 				}
 			}
 		}
+		log.info("444自动化热装装运单查询: {}", JSON.toJSON(storageBill));
 		// 钢坯装运单
 		if (oConvertUtils.isEmpty(storageBill)) {
 			log.info("未查询钢坯装运单信息,车位号为:{},C端自动化热装<保存>失败!", positionNum);
@@ -432,7 +441,7 @@ 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;