Merge branch '0.8.X' of http://49.232.154.205:10100/DeXun/klp-oa into 0.8.X
This commit is contained in:
@@ -3036,6 +3036,20 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
// 9.2 删除当前钢卷
|
||||
baseMapper.deleteById(currentCoilId);
|
||||
|
||||
// 删除操作记录:删除最晚的一条且actionType不在401-405范围内,并且coilId等于historyCoilId
|
||||
LambdaQueryWrapper<WmsCoilPendingAction> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(WmsCoilPendingAction::getCoilId, historyCoilId)
|
||||
.notIn(WmsCoilPendingAction::getActionType, Arrays.asList(401, 402, 403, 404, 405))
|
||||
.eq(WmsCoilPendingAction::getDelFlag, 0)
|
||||
.eq(WmsCoilPendingAction::getActionStatus, 2)
|
||||
.orderByDesc(WmsCoilPendingAction::getCreateTime)
|
||||
.last("LIMIT 1");
|
||||
|
||||
WmsCoilPendingAction latestAction = coilPendingActionMapper.selectOne(queryWrapper);
|
||||
if (latestAction != null) {
|
||||
coilPendingActionMapper.deleteById(latestAction.getActionId());
|
||||
}
|
||||
|
||||
// 9.3 恢复历史钢卷为当前数据
|
||||
LambdaUpdateWrapper<WmsMaterialCoil> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(WmsMaterialCoil::getCoilId, historyCoilId)
|
||||
|
||||
Reference in New Issue
Block a user