fix(wms): 优化钢卷锁定状态提示信息
- 添加getLockStatusDesc方法用于获取详细的锁定状态描述 - 实现针对不同锁定状态的状态码映射和中文描述 - 更新异常消息显示具体的锁定操作类型而非笼统提示 - 提升用户对钢卷当前操作状态的认知准确性
This commit is contained in:
@@ -1987,6 +1987,23 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
return coil == null ? null : coil.getExclusiveStatus();
|
return coil == null ? null : coil.getExclusiveStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取锁状态描述
|
||||||
|
*/
|
||||||
|
private String getLockStatusDesc(Integer exclusiveStatus) {
|
||||||
|
if (exclusiveStatus == null) {
|
||||||
|
return "状态未知";
|
||||||
|
}
|
||||||
|
switch (exclusiveStatus) {
|
||||||
|
case 1: return "正在单步分卷中";
|
||||||
|
case 2: return "正在退火中";
|
||||||
|
case 3: return "已被酸扎领料锁定";
|
||||||
|
case 4: return "已被分卷领料锁定";
|
||||||
|
case 5: return "已被合卷领料锁定";
|
||||||
|
default: return "已被其他操作锁定(状态码:" + exclusiveStatus + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证钢卷操作权限(检查独占状态)
|
* 验证钢卷操作权限(检查独占状态)
|
||||||
* @param coilId 钢卷ID
|
* @param coilId 钢卷ID
|
||||||
@@ -5031,7 +5048,8 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
|
|
||||||
// 3. 检查是否已被锁定或已有相同类型的待处理操作
|
// 3. 检查是否已被锁定或已有相同类型的待处理操作
|
||||||
if (coil.getExclusiveStatus() != null && coil.getExclusiveStatus() != 0) {
|
if (coil.getExclusiveStatus() != null && coil.getExclusiveStatus() != 0) {
|
||||||
throw new RuntimeException("钢卷正在进行操作");
|
String lockDesc = getLockStatusDesc(coil.getExclusiveStatus());
|
||||||
|
throw new RuntimeException("钢卷" + lockDesc + ",无法执行单步分卷");
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 3.1 检查是否已经有相同类型的待处理操作(防止重复领料)
|
// // 3.1 检查是否已经有相同类型的待处理操作(防止重复领料)
|
||||||
|
|||||||
Reference in New Issue
Block a user