Browse Source

修正:月报统计修改

zhongwei
ty 6 months ago
parent
commit
3587efb336
  1. 4
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java
  2. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperStationMonthReportServiceImpl.java
  3. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

4
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java

@ -361,9 +361,9 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, TaskEntity> 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)));

2
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");

7
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();

Loading…
Cancel
Save