Merge branch '0.8.X' of https://gitee.com/hdka/klp-oa into 0.8.X
This commit is contained in:
@@ -2913,19 +2913,13 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
throw new RuntimeException("目标钢卷不是历史数据,无法恢复");
|
||||
}
|
||||
|
||||
// 8. 检查历史钢卷的钢卷号是否重复
|
||||
// 8. 检查历史钢卷的当前钢卷号是否重复
|
||||
Map<String, Object> duplicateCheck = checkCoilNoDuplicate(currentCoilId, historyCoil.getEnterCoilNo(), historyCoil.getCurrentCoilNo());
|
||||
String duplicateType = (String) duplicateCheck.get("duplicateType");
|
||||
if (!"none".equals(duplicateType)) {
|
||||
String errorMsg = "无法恢复历史钢卷,存在重复的钢卷号:";
|
||||
if ("enter".equals(duplicateType)) {
|
||||
errorMsg += "入场钢卷号[" + historyCoil.getEnterCoilNo() + "]重复";
|
||||
} else if ("current".equals(duplicateType)) {
|
||||
errorMsg += "当前钢卷号[" + historyCoil.getCurrentCoilNo() + "]重复";
|
||||
} else if ("both".equals(duplicateType)) {
|
||||
errorMsg += "入场钢卷号[" + historyCoil.getEnterCoilNo() + "]和当前钢卷号[" + historyCoil.getCurrentCoilNo() + "]都重复";
|
||||
}
|
||||
errorMsg += "。请先删除重复的钢卷后再进行回滚操作。";
|
||||
// 仅校验当前钢卷号是否重复,忽略入场钢卷号重复
|
||||
boolean currentCoilNoDuplicate = (boolean) duplicateCheck.get("currentCoilNoDuplicate");
|
||||
if (currentCoilNoDuplicate) {
|
||||
String errorMsg = "无法恢复历史钢卷,存在重复的钢卷号:历史钢卷的当前钢卷号[" + historyCoil.getCurrentCoilNo() + "]重复。";
|
||||
errorMsg += "重复的钢卷无法进行回滚操作。";
|
||||
throw new RuntimeException(errorMsg);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user