Browse Source

update001

qiangxuan 1 ngày trước cách đây
mục cha
commit
a12a4ed9e3

+ 8 - 2
zgztBus/jeecg-module-sbm/src/main/java/org/jeecg/modules/billet/billetOriginalProductRecord/controller/BilletOriginalProductRecordController.java

@@ -195,8 +195,14 @@ public class BilletOriginalProductRecordController extends JeecgController<Bille
 				.eq(BilletHotsend::getShift, finalShift)
 				.eq(BilletHotsend::getShiftGroup, finalShiftGroup)
 				.eq(BilletHotsend::getCcmNo, billetOriginalProductRecord.getCcmNo());
-		if (billetHotsendBaseService.count(hotsendQuery) > 0) {
-			return Result.error("当前炉号已存在于当前班次(炉次传递单)");
+		BilletHotsend billetHotsendInfos = billetHotsendBaseService.getOne(hotsendQuery, false);
+		if (billetHotsendInfos != null) {
+			if (billetHotsendInfos.getDeleteStatus() == 1){
+				billetHotsendInfos.setDeleteStatus(null);
+				billetHotsendBaseService.updateById(billetHotsendInfos);
+			}else {
+				return Result.error("当前炉号已存在于当前班次(炉次传递单)");
+			}
 		}
 
 		// 2. 检查 billetOriginalProductRecord 中是否存在相同炉号+班次+班组的记录