Commit 0b7107d6 authored by cq990612's avatar cq990612

优化代码结构

parent c6a8cfda
...@@ -599,6 +599,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -599,6 +599,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.WORK_TIME_OVER_NOW_DAY); throw new BaseCustomException(BASE_RESP_CODE_ENUM.WORK_TIME_OVER_NOW_DAY);
} }
} }
//3.每天工时累加不得超过八小时 //3.每天工时累加不得超过八小时
private void timeNotEight(int count, List<WorkTimeOrderDto> list) { private void timeNotEight(int count, List<WorkTimeOrderDto> list) {
for (WorkTimeOrderDto workOrder : list) { for (WorkTimeOrderDto workOrder : list) {
...@@ -737,12 +738,12 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -737,12 +738,12 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
List<Integer> types; List<Integer> types;
// 项目经理 // 项目经理
if (1 == level) { if (1 == level) {
types = type == null ? Arrays.asList(1, 2, 3, 4) : new ArrayList<>(type); types = type == null ? Arrays.asList(1, 2) : new ArrayList<>(type);
workTimeOrders = workTimeOrderMapper.queryByPage(status, projectId, types); workTimeOrders = workTimeOrderMapper.queryByPage(status, projectId, types);
} }
// 部门经理 // 部门经理
if (2 == level) { if (2 == level) {
types = type == null ? Arrays.asList(3, 4, 5, 6, 7) : new ArrayList<>(type); types = type == null ? Arrays.asList(5, 6, 7) : new ArrayList<>(type);
workTimeOrders = workTimeOrderMapper.queryByPage(status, null, types); workTimeOrders = workTimeOrderMapper.queryByPage(status, null, types);
} }
List<WorkTimeOrderDto> workTimeOrderDtos = new ArrayList<>(); List<WorkTimeOrderDto> workTimeOrderDtos = new ArrayList<>();
...@@ -757,10 +758,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService { ...@@ -757,10 +758,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
workTimeOrderDtos.add(workTimeOrderDto); workTimeOrderDtos.add(workTimeOrderDto);
} }
PageInfo<WorkTimeOrderDto> pageInfo = new PageInfo<>(workTimeOrderDtos); PageInfo<WorkTimeOrderDto> pageInfo = new PageInfo<>(workTimeOrderDtos);
return pageInfo; return pageInfo;
} }
......
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