Commit ff9876c7 authored by cq990612's avatar cq990612

优化代码结构

parent a47f10d5
...@@ -265,13 +265,17 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -265,13 +265,17 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
workTimeOrder.setDeptId(workUserDeptService.getDeptIdByUserId(dto.getUserId())); workTimeOrder.setDeptId(workUserDeptService.getDeptIdByUserId(dto.getUserId()));
BeanUtils.copyProperties(dto, workTimeOrder); BeanUtils.copyProperties(dto, workTimeOrder);
totalTime += dto.getWorkTime(); totalTime += dto.getWorkTime();
WorkTimeOrder workTimeOrder1 = workTimeOrderMapper.selectById(dto.getWorkId()); if (dto.getWorkId() != null) {
if (2 == workTimeOrder1.getStatus()||5 == workTimeOrder1.getStatus()){ WorkTimeOrder workTimeOrder1 = workTimeOrderMapper.selectById(dto.getWorkId());
if (!dto.getStatus().equals(workTimeOrder1.getStatus())) { if (2 == workTimeOrder1.getStatus() || 5 == workTimeOrder1.getStatus()) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.ORDER_EXAMINE); if (!dto.getStatus().equals(workTimeOrder1.getStatus())) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.ORDER_EXAMINE);
}
continue;
} }
continue;
} }
BeanUtils.copyProperties(workTimeOrder, dto); BeanUtils.copyProperties(workTimeOrder, dto);
addList.add(workTimeOrder); addList.add(workTimeOrder);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment