|
|
@ -1,7 +1,5 @@ |
|
|
|
package com.hnac.hzims.operational.report.service.impl; |
|
|
|
package com.hnac.hzims.operational.report.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import cn.afterturn.easypoi.excel.ExcelExportUtil; |
|
|
|
|
|
|
|
import cn.afterturn.easypoi.excel.entity.TemplateExportParams; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
@ -19,26 +17,20 @@ import com.hnac.hzims.operational.main.common.ExcelData; |
|
|
|
import com.hnac.hzims.operational.main.enums.ColumnEnum; |
|
|
|
import com.hnac.hzims.operational.main.enums.ColumnEnum; |
|
|
|
import com.hnac.hzims.operational.main.service.IMainSystemMonitoringService; |
|
|
|
import com.hnac.hzims.operational.main.service.IMainSystemMonitoringService; |
|
|
|
import com.hnac.hzims.operational.maintenance.service.IOperMaintenanceTaskService; |
|
|
|
import com.hnac.hzims.operational.maintenance.service.IOperMaintenanceTaskService; |
|
|
|
import com.hnac.hzims.operational.report.entity.OperMonthReportEntity; |
|
|
|
|
|
|
|
import com.hnac.hzims.operational.report.mapper.MonthReportMapper; |
|
|
|
|
|
|
|
import com.hnac.hzims.operational.report.service.IOperStationMonthReportService; |
|
|
|
import com.hnac.hzims.operational.report.service.IOperStationMonthReportService; |
|
|
|
import com.hnac.hzims.operational.report.utils.ObjectHelper; |
|
|
|
|
|
|
|
import com.hnac.hzims.operational.report.vo.*; |
|
|
|
import com.hnac.hzims.operational.report.vo.*; |
|
|
|
import com.hnac.hzims.operational.station.entity.StationEntity; |
|
|
|
import com.hnac.hzims.operational.station.entity.StationEntity; |
|
|
|
import com.hnac.hzims.operational.station.service.IStationService; |
|
|
|
import com.hnac.hzims.operational.station.service.IStationService; |
|
|
|
import com.hnac.hzims.operational.util.ExcelUtil; |
|
|
|
import com.hnac.hzims.operational.util.ExcelUtil; |
|
|
|
import com.hnac.hzims.operational.util.ObjectUtils; |
|
|
|
import com.hnac.hzims.ticket.allTicket.dto.TicketStatisticDTO; |
|
|
|
import com.hnac.hzims.ticket.allTicket.fegin.ITicketInfoAllClient; |
|
|
|
import com.hnac.hzims.ticket.allTicket.fegin.ITicketInfoAllClient; |
|
|
|
import com.hnac.hzims.ticket.allTicket.vo.TicketInfoStatisticVO; |
|
|
|
import com.hnac.hzims.ticket.allTicket.vo.TicketInfoStatisticVO; |
|
|
|
import com.hnac.hzinfo.inspect.ai.feign.IInspectRobotTaskClient; |
|
|
|
import com.hnac.hzinfo.inspect.ai.feign.IInspectRobotTaskClient; |
|
|
|
import com.hnac.hzinfo.inspect.gather.feign.IInspectGatherClient; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.inspect.task.feign.IInspectTaskReportClient; |
|
|
|
import com.hnac.hzinfo.inspect.task.feign.IInspectTaskReportClient; |
|
|
|
import com.hnac.hzinfo.inspect.task.vo.TaskReportVO; |
|
|
|
import com.hnac.hzinfo.inspect.task.vo.TaskReportVO; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.io.FileUtils; |
|
|
|
|
|
|
|
import org.apache.poi.ss.usermodel.HorizontalAlignment; |
|
|
|
import org.apache.poi.ss.usermodel.HorizontalAlignment; |
|
|
|
import org.apache.poi.ss.usermodel.Workbook; |
|
|
|
|
|
|
|
import org.apache.poi.ss.util.CellRangeAddress; |
|
|
|
import org.apache.poi.ss.util.CellRangeAddress; |
|
|
|
import org.apache.poi.xssf.usermodel.*; |
|
|
|
import org.apache.poi.xssf.usermodel.*; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
@ -54,24 +46,18 @@ import org.springframework.util.Assert; |
|
|
|
import org.springframework.web.context.request.RequestAttributes; |
|
|
|
import org.springframework.web.context.request.RequestAttributes; |
|
|
|
import org.springframework.web.context.request.RequestContextHolder; |
|
|
|
import org.springframework.web.context.request.RequestContextHolder; |
|
|
|
import org.springframework.web.context.request.ServletRequestAttributes; |
|
|
|
import org.springframework.web.context.request.ServletRequestAttributes; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.ServletOutputStream; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.io.File; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.InputStream; |
|
|
|
import java.io.InputStream; |
|
|
|
import java.lang.reflect.Field; |
|
|
|
import java.lang.reflect.Field; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.math.RoundingMode; |
|
|
|
import java.math.RoundingMode; |
|
|
|
import java.net.URLEncoder; |
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.LocalTime; |
|
|
|
import java.time.LocalTime; |
|
|
|
import java.time.YearMonth; |
|
|
|
import java.time.YearMonth; |
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
import java.time.temporal.TemporalAdjusters; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.CountDownLatch; |
|
|
|
import java.util.concurrent.CountDownLatch; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
@ -197,7 +183,11 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor |
|
|
|
pool.execute(() -> { |
|
|
|
pool.execute(() -> { |
|
|
|
try { |
|
|
|
try { |
|
|
|
String deptIds = deptIdList.stream().map(deptId -> deptId.toString()).collect(Collectors.joining(",")); |
|
|
|
String deptIds = deptIdList.stream().map(deptId -> deptId.toString()).collect(Collectors.joining(",")); |
|
|
|
List<TicketInfoStatisticVO> ticketVOS = ticketInfoAllClient.getTicketReportStatistic(fmt.format(startDate),fmt.format(endDate),deptIds); |
|
|
|
TicketStatisticDTO ticketStatisticDTO=new TicketStatisticDTO(); |
|
|
|
|
|
|
|
ticketStatisticDTO.setStartDate(fmt.format(startDate)); |
|
|
|
|
|
|
|
ticketStatisticDTO.setEndDate(fmt.format(endDate)); |
|
|
|
|
|
|
|
ticketStatisticDTO.setDeptIds(deptIds); |
|
|
|
|
|
|
|
List<TicketInfoStatisticVO> ticketVOS = ticketInfoAllClient.getTicketReportStatistic(ticketStatisticDTO); |
|
|
|
stationReportAllVo.setTicketInfoStatisticVOList(ticketVOS); |
|
|
|
stationReportAllVo.setTicketInfoStatisticVOList(ticketVOS); |
|
|
|
} |
|
|
|
} |
|
|
|
finally { |
|
|
|
finally { |
|
|
|