feat(wms): 增加处理时间
- 在操作记录中添加处理时间字段 - 使用当前时间初始化processTime属性 -保持异常处理逻辑不变,确保主流程不受影响
This commit is contained in:
@@ -164,22 +164,23 @@ public class WmsCoilPendingActionServiceImpl implements IWmsCoilPendingActionSer
|
||||
if (oldAction == null) {
|
||||
throw new RuntimeException("待操作记录不存在");
|
||||
}
|
||||
|
||||
|
||||
WmsCoilPendingAction action = new WmsCoilPendingAction();
|
||||
action.setActionId(actionId);
|
||||
action.setActionStatus(2); // 已完成
|
||||
action.setCompleteTime(new Date());
|
||||
|
||||
|
||||
// 如果操作人为空,设置当前登录用户为操作人
|
||||
if (oldAction.getOperatorId() == null || oldAction.getOperatorName() == null) {
|
||||
try {
|
||||
action.setOperatorId(LoginHelper.getUserId());
|
||||
action.setOperatorName(LoginHelper.getUsername());
|
||||
action.setProcessTime(new Date());
|
||||
} catch (Exception e) {
|
||||
// 如果获取登录用户失败,不影响主流程
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return baseMapper.updateById(action) > 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user