Commit 765b5304 authored by cq990612's avatar cq990612

优化代码结构

parent 24c72689
......@@ -169,15 +169,17 @@ public class WorkCollectServiceImpl implements WorkCollectService {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.WORK_ORDER_INFO_IS_NULL);
}
int status = 2;
int total_time = 0;
// 查看userId workDay 的数据status是否全部为2
List<WorkTimeOrder> timeOrders = workTimeOrderMapper.getByDay(userId, workDay);
for (WorkTimeOrder timeOrder : timeOrders) {
if (1 == timeOrder.getStatus() || 3 == timeOrder.getStatus() || 4 == timeOrder.getStatus()) {
status = 1;
}
total_time += timeOrder.getWorkTime();
}
workCollect.setStatus(status);
workCollect.setTotalTime(0);
workCollectService.update(workCollect);
}
return true;
......
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