diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java index 22dd9ab..eb971a1 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java @@ -712,7 +712,9 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl selectStandardTicketByDeptIdWithTicketType(List createDept, String ticketType, String dateTime) { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.lambda().eq(StandardTicketInfoEntity::getTicketType, ticketType); - queryWrapper.lambda().in(StandardTicketInfoEntity::getCreateDept, createDept); + if (CollectionUtils.isNotEmpty(createDept)){ + queryWrapper.lambda().in(StandardTicketInfoEntity::getCreateDept, createDept); + } queryWrapper.apply("date_format(CREATE_TIME,'%Y-%m') = {0}", dateTime); return baseMapper.selectList(queryWrapper); } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/utils/OperationWordHelper.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/utils/OperationWordHelper.java index eb1b45b..803e2c1 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/utils/OperationWordHelper.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/utils/OperationWordHelper.java @@ -44,8 +44,10 @@ public class OperationWordHelper { switch (status) { case 1: result = "电气操作票.docx"; + break; default: result = "电气操作票.docx"; + break; } return result; } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketCountServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketCountServiceImpl.java index 4594890..eda0445 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketCountServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketCountServiceImpl.java @@ -82,9 +82,13 @@ public class TicketCountServiceImpl extends BaseServiceImpl createDept = userClient.getDataScope(user.getUserId()); + + LambdaQueryWrapper queryWrapper1 = new LambdaQueryWrapper<>(); + queryWrapper1.eq(TicketCount::getDateTime, dateTime); //根据月份查询统计的数据 CompletableFuture> ticketCountsCompletableFuture = CompletableFuture.supplyAsync(() -> { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); @@ -92,6 +96,7 @@ public class TicketCountServiceImpl extends BaseServiceImpl ticketCounts = baseMapper.selectList(queryWrapper); return ticketCounts; }, executor); + //第一种工作票 CompletableFuture oneTicketCompletableFuture = ticketCountsCompletableFuture.thenAcceptAsync((items) -> { //查询第一种工作票 @@ -324,10 +329,15 @@ public class TicketCountServiceImpl extends BaseServiceImpl deptName = systemClient.getDeptName(entry.getKey()); - if (deptName.isSuccess()) { - ticketCount.setDeptName(deptName.getData()); + if (entry.getKey() == null) { + continue; + } + if (entry.getKey() != null) { + //根据id获取部门名称 + R deptName = systemClient.getDeptName(entry.getKey()); + if (deptName.isSuccess()) { + ticketCount.setDeptName(deptName.getData() == null ? "" : deptName.getData()); + } } List values = entry.getValue(); ticketCount.setTicketType(CollectionUtils.isNotEmpty(values) ? values.get(0).getTicketType() : ticketType); @@ -389,10 +399,12 @@ public class TicketCountServiceImpl extends BaseServiceImpl deptName = systemClient.getDeptName(entry.getKey()); - if (deptName.isSuccess()) { - ticketCount.setDeptName(deptName.getData()); + if (entry.getKey() != null) { + //根据id获取部门名称 + R deptName = systemClient.getDeptName(entry.getKey()); + if (deptName.isSuccess()) { + ticketCount.setDeptName(deptName.getData() == null ? "" : deptName.getData()); + } } List values = entry.getValue(); ticketCount.setTicketType(CollectionUtils.isNotEmpty(values) ? values.get(0).getType() : ticketType); diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java index 5dbca58..e1333c2 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java @@ -1104,7 +1104,10 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl selectTicketByDeptIdWithTicketType(List createDept, String ticketType, String dateTime) { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.lambda().eq(WorkTicketInfoEntity::getType, ticketType); - queryWrapper.lambda().in(BaseEntity::getCreateDept, createDept); + if (CollectionUtils.isNotEmpty(createDept)) { + queryWrapper.lambda().in(BaseEntity::getCreateDept, createDept); + } + queryWrapper.apply("date_format(CREATE_TIME,'%Y-%m') = {0}" , dateTime); return baseMapper.selectList(queryWrapper); }