|
|
@ -82,9 +82,13 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T |
|
|
|
@SneakyThrows |
|
|
|
@SneakyThrows |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void loadMonthReport(String dateTime) { |
|
|
|
public void loadMonthReport(String dateTime) { |
|
|
|
|
|
|
|
|
|
|
|
//根据登录人查询所属机构及下属机构
|
|
|
|
//根据登录人查询所属机构及下属机构
|
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
BladeUser user = AuthUtil.getUser(); |
|
|
|
List<Long> createDept = userClient.getDataScope(user.getUserId()); |
|
|
|
List<Long> createDept = userClient.getDataScope(user.getUserId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LambdaQueryWrapper<TicketCount> queryWrapper1 = new LambdaQueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapper1.eq(TicketCount::getDateTime, dateTime); |
|
|
|
//根据月份查询统计的数据
|
|
|
|
//根据月份查询统计的数据
|
|
|
|
CompletableFuture<List<TicketCount>> ticketCountsCompletableFuture = CompletableFuture.supplyAsync(() -> { |
|
|
|
CompletableFuture<List<TicketCount>> ticketCountsCompletableFuture = CompletableFuture.supplyAsync(() -> { |
|
|
|
LambdaQueryWrapper<TicketCount> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
LambdaQueryWrapper<TicketCount> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
@ -92,6 +96,7 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T |
|
|
|
List<TicketCount> ticketCounts = baseMapper.selectList(queryWrapper); |
|
|
|
List<TicketCount> ticketCounts = baseMapper.selectList(queryWrapper); |
|
|
|
return ticketCounts; |
|
|
|
return ticketCounts; |
|
|
|
}, executor); |
|
|
|
}, executor); |
|
|
|
|
|
|
|
|
|
|
|
//第一种工作票
|
|
|
|
//第一种工作票
|
|
|
|
CompletableFuture<Void> oneTicketCompletableFuture = ticketCountsCompletableFuture.thenAcceptAsync((items) -> { |
|
|
|
CompletableFuture<Void> oneTicketCompletableFuture = ticketCountsCompletableFuture.thenAcceptAsync((items) -> { |
|
|
|
//查询第一种工作票
|
|
|
|
//查询第一种工作票
|
|
|
@ -324,10 +329,15 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T |
|
|
|
ticketCount.setTenantId(user.getTenantId()); |
|
|
|
ticketCount.setTenantId(user.getTenantId()); |
|
|
|
ticketCount.setCreateDept(Long.valueOf(user.getDeptId())); |
|
|
|
ticketCount.setCreateDept(Long.valueOf(user.getDeptId())); |
|
|
|
ticketCount.setCreateUser(user.getUserId()); |
|
|
|
ticketCount.setCreateUser(user.getUserId()); |
|
|
|
|
|
|
|
if (entry.getKey() == null) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (entry.getKey() != null) { |
|
|
|
//根据id获取部门名称
|
|
|
|
//根据id获取部门名称
|
|
|
|
R<String> deptName = systemClient.getDeptName(entry.getKey()); |
|
|
|
R<String> deptName = systemClient.getDeptName(entry.getKey()); |
|
|
|
if (deptName.isSuccess()) { |
|
|
|
if (deptName.isSuccess()) { |
|
|
|
ticketCount.setDeptName(deptName.getData()); |
|
|
|
ticketCount.setDeptName(deptName.getData() == null ? "" : deptName.getData()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
List<StandardTicketInfoEntity> values = entry.getValue(); |
|
|
|
List<StandardTicketInfoEntity> values = entry.getValue(); |
|
|
|
ticketCount.setTicketType(CollectionUtils.isNotEmpty(values) ? values.get(0).getTicketType() : ticketType); |
|
|
|
ticketCount.setTicketType(CollectionUtils.isNotEmpty(values) ? values.get(0).getTicketType() : ticketType); |
|
|
@ -389,10 +399,12 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T |
|
|
|
TicketCount ticketCount = new TicketCount(); |
|
|
|
TicketCount ticketCount = new TicketCount(); |
|
|
|
ticketCount.setDeptId(entry.getKey()); |
|
|
|
ticketCount.setDeptId(entry.getKey()); |
|
|
|
ticketCount.setDateTime(dateTime); |
|
|
|
ticketCount.setDateTime(dateTime); |
|
|
|
|
|
|
|
if (entry.getKey() != null) { |
|
|
|
//根据id获取部门名称
|
|
|
|
//根据id获取部门名称
|
|
|
|
R<String> deptName = systemClient.getDeptName(entry.getKey()); |
|
|
|
R<String> deptName = systemClient.getDeptName(entry.getKey()); |
|
|
|
if (deptName.isSuccess()) { |
|
|
|
if (deptName.isSuccess()) { |
|
|
|
ticketCount.setDeptName(deptName.getData()); |
|
|
|
ticketCount.setDeptName(deptName.getData() == null ? "" : deptName.getData()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
List<WorkTicketInfoEntity> values = entry.getValue(); |
|
|
|
List<WorkTicketInfoEntity> values = entry.getValue(); |
|
|
|
ticketCount.setTicketType(CollectionUtils.isNotEmpty(values) ? values.get(0).getType() : ticketType); |
|
|
|
ticketCount.setTicketType(CollectionUtils.isNotEmpty(values) ? values.get(0).getType() : ticketType); |
|
|
|