From 3587efb3366e2e7e051c97024e9534d4f2304c76 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Mon, 13 May 2024 20:39:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E6=9C=88=E6=8A=A5?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java | 4 ++-- .../report/service/impl/OperStationMonthReportServiceImpl.java | 2 +- .../ticket/twoTicket/service/impl/TicketProcessServiceImpl.java | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java index a18d489..b1d3ab4 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java @@ -361,9 +361,9 @@ public class TaskServiceImpl extends BaseServiceImpl imp taskReportVO.setUserId(userId); taskReportVO.setHours(list.stream().mapToLong(TaskCountVO::getHours).sum()); //巡检任务完成情况 - String finishSituation = list.stream().filter(vo -> StringUtil.isNotBlank(DictCache.getValue(TaskContants.INSPECT_TASK_TYPE, vo.getAutoVideo()))).map(vo -> DictCache.getValue(TaskContants.INSPECT_TASK_TYPE, vo.getAutoVideo()).concat(":").concat(String.valueOf(Optional.ofNullable(vo.getFinishTask()).orElse(0)))).collect(Collectors.joining("\r\n")); + String finishSituation = list.stream().filter(vo -> StringUtil.isNotBlank(DictCache.getValue(TaskContants.INSPECT_TASK_TYPE, vo.getAutoVideo()))).map(vo -> DictCache.getValue(TaskContants.INSPECT_TASK_TYPE, vo.getAutoVideo()).concat("完成数量:").concat(String.valueOf(Optional.ofNullable(vo.getFinishTask()).orElse(0)))).collect(Collectors.joining("\r\n")); //巡检任务未完成情况 - String undoSituation = list.stream().filter(vo -> StringUtil.isNotBlank(DictCache.getValue(TaskContants.INSPECT_TASK_TYPE, vo.getAutoVideo()))).map(vo -> DictCache.getValue(TaskContants.INSPECT_TASK_TYPE, vo.getAutoVideo()).concat(":").concat(String.valueOf(Optional.ofNullable(vo.getUndoneTask()).orElse(0)))).collect(Collectors.joining("\r\n")); + String undoSituation = list.stream().filter(vo -> StringUtil.isNotBlank(DictCache.getValue(TaskContants.INSPECT_TASK_TYPE, vo.getAutoVideo()))).map(vo -> DictCache.getValue(TaskContants.INSPECT_TASK_TYPE, vo.getAutoVideo()).concat("未完成数量:").concat(String.valueOf(Optional.ofNullable(vo.getUndoneTask()).orElse(0)))).collect(Collectors.joining("\r\n")); taskReportVO.setCompleteNum(list.stream().filter(taskCountVO -> Func.isNotEmpty(taskCountVO.getFinishTask())).collect(Collectors.summingInt(TaskCountVO::getFinishTask))); taskReportVO.setCompleteSituation(finishSituation); taskReportVO.setIncompleteNum(list.stream().filter(taskCountVO -> Func.isNotEmpty(taskCountVO.getUndoneTask())).collect(Collectors.summingInt(TaskCountVO::getUndoneTask))); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperStationMonthReportServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperStationMonthReportServiceImpl.java index 1f80b1b..1ebf282 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperStationMonthReportServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperStationMonthReportServiceImpl.java @@ -1272,7 +1272,7 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor double ticketInfoProportion = sum == 0 ? 0 : new BigDecimal(qualifiedNum).divide(new BigDecimal(sum),2, RoundingMode.HALF_DOWN).multiply(new BigDecimal(100)) .setScale(2,RoundingMode.HALF_DOWN).doubleValue(); - String phenomenonConclusion = "5、本月开票%s张,合格率百分之%s%%"; + String phenomenonConclusion = "5、本月开票%s张,合格率为%s%%"; conclusion.append(String.format(phenomenonConclusion, sum, ticketInfoProportion)).append(";\r\n"); }else { conclusion.append("5、本月未开票;\r\n"); diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java index 69c85ed..743651d 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java @@ -539,7 +539,12 @@ public class TicketProcessServiceImpl implements TicketProcessService { } WorkTicketFinish workTicketFinish = workTicketVo.getWorkTicketFinish(); if(ObjectUtil.isNotEmpty(workTicketFinish)) { - workTicketFinishService.saveOrUpdate(workTicketFinish); + WorkTicketFinish res = workTicketFinishService.selectByTicketId(workTicketFinish.getTicketId()); + if (ObjectUtils.isEmpty(res)){ + workTicketFinishService.save(workTicketFinish); + }else { + workTicketFinishService.updateByTicketId(workTicketFinish); + } } // 推送消息 new Thread(() -> this.sendMessage(workTicket,response.getUserId())).start();