style(wms): 修改分卷提示信息更加人性化

- 将"钢卷正在进行其他操作,无法开始单步分卷"简化为"钢卷正在进行操作"
- 将"创建待操作记录失败"简化为"创建待操作失败"
- 将"母卷不存在"统一为"钢卷不存在"
- 将"母卷未处于单步分卷状态"修改为"钢卷未处于分卷状态"
- 将"母卷已成为历史数据,无法取消分卷"修改为"该钢卷已成为历史数据,无法取消分卷"
- 将"母卷未处于单步分卷状态,无法取消"修改为"钢卷未处于分卷状态,无法取消"
- 将"取消单步分卷成功"修改为"取消分卷成功"
This commit is contained in:
2026-01-26 14:22:13 +08:00
parent 43db64ae6c
commit 5718a77be6

View File

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