Commit ff9876c7 authored by cq990612's avatar cq990612

优化代码结构

No related merge requests found
......@@ -265,13 +265,17 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
workTimeOrder.setDeptId(workUserDeptService.getDeptIdByUserId(dto.getUserId()));
BeanUtils.copyProperties(dto, workTimeOrder);
totalTime += dto.getWorkTime();
WorkTimeOrder workTimeOrder1 = workTimeOrderMapper.selectById(dto.getWorkId());
if (2 == workTimeOrder1.getStatus()||5 == workTimeOrder1.getStatus()){
if (!dto.getStatus().equals(workTimeOrder1.getStatus())) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.ORDER_EXAMINE);
if (dto.getWorkId() != null) {
WorkTimeOrder workTimeOrder1 = workTimeOrderMapper.selectById(dto.getWorkId());
if (2 == workTimeOrder1.getStatus() || 5 == workTimeOrder1.getStatus()) {
if (!dto.getStatus().equals(workTimeOrder1.getStatus())) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.ORDER_EXAMINE);
}
continue;
}
continue;
}
BeanUtils.copyProperties(workTimeOrder, dto);
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