Merge branch '0.8.X' of https://gitee.com/hdka/klp-oa into 0.8.X
This commit is contained in:
@@ -3263,7 +3263,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
|
||||
// 3. 检查是否已被锁定或已有相同类型的待处理操作
|
||||
if (coil.getExclusiveStatus() != null && coil.getExclusiveStatus() != 0) {
|
||||
throw new RuntimeException("钢卷正在进行其他操作,无法开始单步分卷");
|
||||
throw new RuntimeException("钢卷正在进行操作");
|
||||
}
|
||||
|
||||
// // 3.1 检查是否已经有相同类型的待处理操作(防止重复领料)
|
||||
@@ -3293,7 +3293,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
|
||||
Boolean insertResult = coilPendingActionService.insertByBo(pendingActionBo);
|
||||
if (!insertResult) {
|
||||
throw new RuntimeException("创建待操作记录失败");
|
||||
throw new RuntimeException("创建待操作失败");
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -3308,12 +3308,12 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
// 1. 查询母卷信息
|
||||
WmsMaterialCoil parentCoil = baseMapper.selectById(parentCoilId);
|
||||
if (parentCoil == null) {
|
||||
throw new RuntimeException("母卷不存在");
|
||||
throw new RuntimeException("钢卷不存在");
|
||||
}
|
||||
|
||||
// 2. 验证独占状态
|
||||
if (parentCoil.getExclusiveStatus() == null || parentCoil.getExclusiveStatus() != 1) {
|
||||
throw new RuntimeException("母卷未处于单步分卷状态");
|
||||
throw new RuntimeException("钢卷未处于分卷状态");
|
||||
}
|
||||
|
||||
// 3. 查询待操作记录
|
||||
@@ -3418,7 +3418,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
Long parentCoilId = pendingAction.getCoilId();
|
||||
WmsMaterialCoil parentCoil = baseMapper.selectById(parentCoilId);
|
||||
if (parentCoil == null) {
|
||||
throw new RuntimeException("母卷不存在");
|
||||
throw new RuntimeException("钢卷不存在");
|
||||
}
|
||||
|
||||
// 3. 获取所有子卷ID
|
||||
@@ -3519,16 +3519,16 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
// 3. 查询母卷
|
||||
WmsMaterialCoil parentCoil = baseMapper.selectById(pendingAction.getCoilId());
|
||||
if (parentCoil == null) {
|
||||
throw new RuntimeException("母卷不存在");
|
||||
throw new RuntimeException("钢卷不存在");
|
||||
}
|
||||
|
||||
if (parentCoil.getDataType() == 0) {
|
||||
throw new RuntimeException("母卷已成为历史数据,无法取消分卷");
|
||||
throw new RuntimeException("该钢卷已成为历史数据,无法取消分卷");
|
||||
}
|
||||
|
||||
// 4. 校验母卷是否处于“单步分卷中”
|
||||
if (Objects.equals(parentCoil.getExclusiveStatus(), 0)) {
|
||||
throw new RuntimeException("母卷未处于单步分卷状态,无法取消");
|
||||
throw new RuntimeException("钢卷未处于分卷状态,无法取消");
|
||||
}
|
||||
|
||||
// 释放母卷独占锁
|
||||
@@ -3540,7 +3540,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
}
|
||||
|
||||
result.put("success", true);
|
||||
result.put("message", "取消单步分卷成功");
|
||||
result.put("message", "取消分卷成功");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user