三级页面修改
This commit is contained in:
@@ -159,10 +159,27 @@ public class WmsCoilPendingActionServiceImpl implements IWmsCoilPendingActionSer
|
||||
*/
|
||||
@Override
|
||||
public Boolean completeAction(Long actionId) {
|
||||
// 先查询原记录,检查操作人是否为空
|
||||
WmsCoilPendingAction oldAction = baseMapper.selectById(actionId);
|
||||
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());
|
||||
} catch (Exception e) {
|
||||
// 如果获取登录用户失败,不影响主流程
|
||||
}
|
||||
}
|
||||
|
||||
return baseMapper.updateById(action) > 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user