diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/dto/TicketStatisticDTO.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/dto/TicketStatisticDTO.java index 4378262..f5c46ae 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/dto/TicketStatisticDTO.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/dto/TicketStatisticDTO.java @@ -1,14 +1,14 @@ package com.hnac.hzims.ticket.allTicket.dto; import com.fasterxml.jackson.annotation.JsonFormat; -import lombok.Builder; import lombok.Data; -import lombok.EqualsAndHashCode; import org.springblade.core.tool.utils.DateUtil; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.time.LocalDateTime; +import java.util.List; +import java.util.Map; /** * @ClassName TicketStatisticDTO @@ -18,10 +18,11 @@ import java.time.LocalDateTime; * @Version 4.0 **/ @Data -@Builder -@EqualsAndHashCode public class TicketStatisticDTO implements Serializable { + /** + * 机构IDS 按逗号分隔 + */ private String deptIds; @JsonFormat(pattern = DateUtil.PATTERN_DATETIME) @@ -32,4 +33,10 @@ public class TicketStatisticDTO implements Serializable { @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME) private LocalDateTime endTime; + private String startDate; + private String endDate; + + private Map stationMap; + private List depatList; + } diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/ITicketInfoAllClient.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/ITicketInfoAllClient.java index bb2971c..5d3c500 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/ITicketInfoAllClient.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/ITicketInfoAllClient.java @@ -8,12 +8,11 @@ import com.hnac.hzims.ticket.constants.TicketConstants; import org.springblade.core.tool.api.R; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestParam; -import java.time.LocalDateTime; import java.util.List; -import java.util.Map; /** * @author hx @@ -32,15 +31,10 @@ public interface ITicketInfoAllClient { /** * 统计站点统计月报-两票 - * @param startDate 开始时间 - * @param endDate 结束时间 - * @param deptIds 机构IDS 按逗号分隔 * @return 两票统计对象 */ - @GetMapping(GET_TICKET_REPORT_STATISTIC) - List getTicketReportStatistic(@RequestParam String startDate, - @RequestParam String endDate, - @RequestParam String deptIds); + @PostMapping(GET_TICKET_REPORT_STATISTIC) + List getTicketReportStatistic(@RequestBody TicketStatisticDTO ticketStatisticDTO ); /** * 根据ID更新票据状态为未完成 @@ -53,18 +47,14 @@ public interface ITicketInfoAllClient { /** * 根据归属机构获取双票率 */ - @GetMapping(API_PREFIX + DOUBLE_PASS_RATE) - DoublePassRateVO getDoublePassRate(@RequestParam(value = "depatList") List depatList, - @RequestParam(value = "firstDateTime") LocalDateTime firstDateTime, - @RequestParam(value = "now") LocalDateTime now); + @PostMapping(API_PREFIX + DOUBLE_PASS_RATE) + DoublePassRateVO getDoublePassRate(@RequestBody TicketStatisticDTO ticketStatisticDTO); /** * 根据归属机构获取双票率 */ - @GetMapping(API_PREFIX + DOUBLE_PASS_QUANTITY) - List getDoublePassQuantity(@RequestParam(value = "stationMap") Map stationMap, - @RequestParam(value = "firstDateTime") LocalDateTime firstDateTime, - @RequestParam(value = "now") LocalDateTime now); + @PostMapping(API_PREFIX + DOUBLE_PASS_QUANTITY) + List getDoublePassQuantity(@RequestBody TicketStatisticDTO ticketStatisticDTO); @GetMapping(GET_TICKET_PASS_RATE) R getTicketPassRate(TicketStatisticDTO ticketStatisticDTO); diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClientFallback.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClientFallback.java index 76506d0..5f38f8f 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClientFallback.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClientFallback.java @@ -7,9 +7,7 @@ import com.hnac.hzims.ticket.allTicket.vo.TicketInfoStatisticVO; import org.springblade.core.tool.api.R; import org.springframework.stereotype.Component; -import java.time.LocalDateTime; import java.util.List; -import java.util.Map; /** * @author hx @@ -18,7 +16,7 @@ import java.util.Map; public class TicketInfoAllClientFallback implements ITicketInfoAllClient { @Override - public List getTicketReportStatistic(String startDate, String endDate, String deptIds) { + public List getTicketReportStatistic( TicketStatisticDTO ticketStatisticDTO) { return null; } @@ -28,12 +26,12 @@ public class TicketInfoAllClientFallback implements ITicketInfoAllClient { } @Override - public DoublePassRateVO getDoublePassRate(List depatList, LocalDateTime firstDateTime, LocalDateTime now) { + public DoublePassRateVO getDoublePassRate(TicketStatisticDTO ticketStatisticDTO) { return null; } @Override - public List getDoublePassQuantity(Map stationMap, LocalDateTime firstDateTime, LocalDateTime now) { + public List getDoublePassQuantity(TicketStatisticDTO ticketStatisticDTO) { return null; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java index aaafcdc..ce44876 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java @@ -29,6 +29,7 @@ import com.hnac.hzims.operational.maintenance.vo.OperMaintenanceTaskVO; import com.hnac.hzims.operational.report.vo.DutyDefectVO; import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.service.IStationService; +import com.hnac.hzims.ticket.allTicket.dto.TicketStatisticDTO; import com.hnac.hzims.ticket.allTicket.fegin.ITicketInfoAllClient; import com.hnac.hzims.ticket.allTicket.vo.DoublePassRateVO; import lombok.RequiredArgsConstructor; @@ -412,7 +413,11 @@ public class TargetServiceImpl implements TargetService { if(!StringUtil.isEmpty(areaName)){ for (Dept dept: areas.stream().filter(area->area.getDeptName().equals(areaName)).collect(Collectors.toList())) { // 双票 - DoublePassRateVO doublePass = ticketInfoAllClient.getDoublePassRate(Collections.singletonList(dept.getId()), firstDateTime, LocalDateTime.now()); + TicketStatisticDTO ticketStatisticDTO=new TicketStatisticDTO(); + ticketStatisticDTO.setDepatList(Collections.singletonList(dept.getId())); + ticketStatisticDTO.setStartTime(firstDateTime); + ticketStatisticDTO.setEndTime(LocalDateTime.now()); + DoublePassRateVO doublePass = ticketInfoAllClient.getDoublePassRate(ticketStatisticDTO); CompleteTicketVo completeTicketVo = new CompleteTicketVo(); if (ObjectUtil.isEmpty(doublePass)) { completeTicketVo.setAreaName(dept.getDeptName()); @@ -430,7 +435,11 @@ public class TargetServiceImpl implements TargetService { }else{ for (Dept dept: areas) { // 双票 - DoublePassRateVO doublePass = ticketInfoAllClient.getDoublePassRate(Collections.singletonList(dept.getId()), firstDateTime, LocalDateTime.now()); + TicketStatisticDTO ticketStatisticDTO=new TicketStatisticDTO(); + ticketStatisticDTO.setDepatList(Collections.singletonList(dept.getId())); + ticketStatisticDTO.setStartTime(firstDateTime); + ticketStatisticDTO.setEndTime(LocalDateTime.now()); + DoublePassRateVO doublePass = ticketInfoAllClient.getDoublePassRate(ticketStatisticDTO); CompleteTicketVo completeTicketVo = new CompleteTicketVo(); if (ObjectUtil.isEmpty(doublePass)) { completeTicketVo.setAreaName(dept.getDeptName()); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomePageServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomePageServiceImpl.java index c63a786..c64a2b2 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomePageServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomePageServiceImpl.java @@ -18,6 +18,7 @@ import com.hnac.hzims.operational.main.service.IMainTaskStatisticService; import com.hnac.hzims.operational.main.vo.*; import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.service.IStationService; +import com.hnac.hzims.ticket.allTicket.dto.TicketStatisticDTO; import com.hnac.hzims.ticket.allTicket.fegin.ITicketInfoAllClient; import com.hnac.hzims.ticket.allTicket.vo.DoublePassRateVO; import com.hnac.hzims.ticket.allTicket.vo.DoublePassVO; @@ -331,7 +332,11 @@ public class HomePageServiceImpl implements IHomePageService { // 当月首日 LocalDate firstDay = LocalDate.now().withDayOfMonth(1); LocalDateTime firstDateTime = LocalDateTime.of(firstDay, LocalTime.MIN); - return ticketInfoAllClient.getDoublePassQuantity(stationMap, firstDateTime, LocalDateTime.now()); + TicketStatisticDTO ticketStatisticDTO=new TicketStatisticDTO(); + ticketStatisticDTO.setStationMap(stationMap); + ticketStatisticDTO.setStartTime(firstDateTime); + ticketStatisticDTO.setEndTime(LocalDateTime.now()); + return ticketInfoAllClient.getDoublePassQuantity(ticketStatisticDTO); } /** @@ -683,7 +688,11 @@ public class HomePageServiceImpl implements IHomePageService { } LocalDate firstDay = LocalDate.now().withDayOfYear(1); LocalDateTime firstDateTime = LocalDateTime.of(firstDay, LocalTime.MIN); - DoublePassRateVO doublePassRateVO = ticketInfoAllClient.getDoublePassRate(list, firstDateTime, LocalDateTime.now()); + TicketStatisticDTO ticketStatisticDTO=new TicketStatisticDTO(); + ticketStatisticDTO.setDepatList(list); + ticketStatisticDTO.setStartTime(firstDateTime); + ticketStatisticDTO.setEndTime(LocalDateTime.now()); + DoublePassRateVO doublePassRateVO = ticketInfoAllClient.getDoublePassRate(ticketStatisticDTO); if(ObjectUtil.isEmpty(doublePassRateVO)){ return "0.0"; } @@ -790,7 +799,11 @@ public class HomePageServiceImpl implements IHomePageService { exe.execute(() -> { LocalDate firstDay = LocalDate.now().withDayOfYear(1); LocalDateTime firstDateTime = LocalDateTime.of(firstDay, LocalTime.MIN); - DoublePassRateVO doublePassRateVO = ticketInfoAllClient.getDoublePassRate(entry.getValue(), firstDateTime, LocalDateTime.now()); + TicketStatisticDTO ticketStatisticDTO=new TicketStatisticDTO(); + ticketStatisticDTO.setDepatList(entry.getValue()); + ticketStatisticDTO.setStartTime(firstDateTime); + ticketStatisticDTO.setEndTime(LocalDateTime.now()); + DoublePassRateVO doublePassRateVO = ticketInfoAllClient.getDoublePassRate(ticketStatisticDTO); if (ObjectUtil.isEmpty(doublePassRateVO)) { storageConservancyVo.setPassRate("0"); } else { diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java index b6e7d7a..3d22cd3 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java @@ -17,6 +17,7 @@ import com.hnac.hzims.operational.main.service.IMainTaskStatisticService; import com.hnac.hzims.operational.main.vo.*; import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.service.IStationService; +import com.hnac.hzims.ticket.allTicket.dto.TicketStatisticDTO; import com.hnac.hzims.ticket.allTicket.fegin.ITicketInfoAllClient; import com.hnac.hzims.ticket.allTicket.vo.DoublePassRateVO; import lombok.RequiredArgsConstructor; @@ -226,7 +227,11 @@ public class HomeServiceImpl implements HomeService { List areas = result.getData().stream().filter(dept -> stations.stream().map(StationEntity::getRefDept).collect(Collectors.toList()).contains(dept.getId())).map(Dept::getParentId).collect(Collectors.toList()); if(CollectionUtil.isNotEmpty(areas)){ LocalDateTime firstDateTime = LocalDateTime.of(LocalDate.now().withDayOfYear(1), LocalTime.MIN); - DoublePassRateVO pass = ticketClient.getDoublePassRate(areas, firstDateTime, LocalDateTime.now()); + TicketStatisticDTO ticketStatisticDTO=new TicketStatisticDTO(); + ticketStatisticDTO.setDepatList(areas); + ticketStatisticDTO.setStartTime(firstDateTime); + ticketStatisticDTO.setEndTime(LocalDateTime.now()); + DoublePassRateVO pass = ticketClient.getDoublePassRate(ticketStatisticDTO); if(ObjectUtil.isNotEmpty(pass)){ target.setTaget_four(Double.valueOf(pass.getDoublePassRate())); } @@ -276,7 +281,11 @@ public class HomeServiceImpl implements HomeService { LocalDateTime firstDateTime = LocalDateTime.of(firstDay, LocalTime.MIN); R> result = sysClient.getDeptList(); List areas = result.getData().stream().filter(dept -> stations.stream().map(StationEntity::getRefDept).collect(Collectors.toList()).contains(dept.getId())).map(Dept::getParentId).collect(Collectors.toList()); - DoublePassRateVO pass = ticketClient.getDoublePassRate(areas, firstDateTime, LocalDateTime.now()); + TicketStatisticDTO ticketStatisticDTO=new TicketStatisticDTO(); + ticketStatisticDTO.setDepatList(areas); + ticketStatisticDTO.setStartTime(firstDateTime); + ticketStatisticDTO.setEndTime(LocalDateTime.now()); + DoublePassRateVO pass = ticketClient.getDoublePassRate(ticketStatisticDTO); if (ObjectUtil.isNotEmpty(pass)) { target.setTaget_four(Double.valueOf(pass.getDoublePassRate())); } @@ -384,7 +393,11 @@ public class HomeServiceImpl implements HomeService { exe.execute(() -> { LocalDate firstDay = LocalDate.now().withDayOfYear(1); LocalDateTime firstDateTime = LocalDateTime.of(firstDay, LocalTime.MIN); - DoublePassRateVO pass = ticketClient.getDoublePassRate(areas, firstDateTime, LocalDateTime.now()); + TicketStatisticDTO ticketStatisticDTO=new TicketStatisticDTO(); + ticketStatisticDTO.setDepatList(areas); + ticketStatisticDTO.setStartTime(firstDateTime); + ticketStatisticDTO.setEndTime(LocalDateTime.now()); + DoublePassRateVO pass = ticketClient.getDoublePassRate(ticketStatisticDTO); if (ObjectUtil.isNotEmpty(pass)) { target.setTaget_four(Double.valueOf(pass.getDoublePassRate())); } @@ -604,7 +617,11 @@ public class HomeServiceImpl implements HomeService { List areas = result.getData().stream().filter(dept -> stations.stream().map(StationEntity::getRefDept).collect(Collectors.toList()).contains(dept.getId())).map(Dept::getParentId).collect(Collectors.toList()); if(CollectionUtil.isNotEmpty(areas)){ LocalDateTime firstDateTime = LocalDateTime.of(LocalDate.now().withDayOfYear(1), LocalTime.MIN); - DoublePassRateVO pass = ticketClient.getDoublePassRate(areas, firstDateTime, LocalDateTime.now()); + TicketStatisticDTO ticketStatisticDTO=new TicketStatisticDTO(); + ticketStatisticDTO.setDepatList(areas); + ticketStatisticDTO.setStartTime(firstDateTime); + ticketStatisticDTO.setEndTime(LocalDateTime.now()); + DoublePassRateVO pass = ticketClient.getDoublePassRate(ticketStatisticDTO); if(ObjectUtil.isNotEmpty(pass)){ target.setTaget_four(Double.valueOf(pass.getDoublePassRate())); } 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 1a455fa..a2ff283 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 @@ -1,7 +1,5 @@ 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.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 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.service.IMainSystemMonitoringService; 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.utils.ObjectHelper; import com.hnac.hzims.operational.report.vo.*; import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.service.IStationService; 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.vo.TicketInfoStatisticVO; 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.vo.TaskReportVO; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.io.FileUtils; 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.xssf.usermodel.*; 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.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; -import org.springframework.web.multipart.MultipartFile; -import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.lang.reflect.Field; import java.math.BigDecimal; import java.math.RoundingMode; -import java.net.URLEncoder; -import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.YearMonth; import java.time.format.DateTimeFormatter; -import java.time.temporal.TemporalAdjusters; import java.util.*; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; @@ -197,7 +183,11 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor pool.execute(() -> { try { String deptIds = deptIdList.stream().map(deptId -> deptId.toString()).collect(Collectors.joining(",")); - List 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 ticketVOS = ticketInfoAllClient.getTicketReportStatistic(ticketStatisticDTO); stationReportAllVo.setTicketInfoStatisticVOList(ticketVOS); } finally { diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClient.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClient.java index 5b93bba..878cd812 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClient.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClient.java @@ -15,10 +15,7 @@ import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.StringUtil; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.time.LocalDateTime; import java.util.*; @@ -37,9 +34,16 @@ public class TicketInfoAllClient implements ITicketInfoAllClient { private final StandardTicketInfoServiceImpl standardTicketInfoService; private final IFirstWorkTicketService firstWorkTicketService; + /** + * 统计站点统计月报-两票 + * @return 两票统计对象 + */ @Override - @GetMapping("/getTicketReportStatistic") - public List getTicketReportStatistic(String startDate, String endDate, String deptIds) { + @PostMapping("/getTicketReportStatistic") + public List getTicketReportStatistic(@RequestBody TicketStatisticDTO ticketStatisticDTO) { + String startDate = ticketStatisticDTO.getStartDate(); + String endDate = ticketStatisticDTO.getEndDate(); + String deptIds = ticketStatisticDTO.getDeptIds(); Assert.isTrue(StringUtil.isNoneBlank(deptIds),()->{ throw new ServiceException("站点统计月报工作票查询机构ID不能为空"); }); @@ -62,14 +66,20 @@ public class TicketInfoAllClient implements ITicketInfoAllClient { } @Override - @GetMapping(DOUBLE_PASS_RATE) - public DoublePassRateVO getDoublePassRate(List depatList, LocalDateTime firstDateTime, LocalDateTime now) { - return standardTicketInfoService.getDoublePassRate(depatList,firstDateTime,now); + @PostMapping(DOUBLE_PASS_RATE) + public DoublePassRateVO getDoublePassRate(@RequestBody TicketStatisticDTO ticketStatisticDTO) { + List depatList = ticketStatisticDTO.getDepatList(); + LocalDateTime startTime = ticketStatisticDTO.getStartTime(); + LocalDateTime endTime =ticketStatisticDTO.getEndTime(); + return standardTicketInfoService.getDoublePassRate(depatList,startTime,endTime); } @Override @GetMapping(DOUBLE_PASS_QUANTITY) - public List getDoublePassQuantity(Map stationMap, LocalDateTime firstDateTime, LocalDateTime now) { + public List getDoublePassQuantity(@RequestBody TicketStatisticDTO ticketStatisticDTO) { + Map stationMap = ticketStatisticDTO.getStationMap(); + LocalDateTime firstDateTime = ticketStatisticDTO.getStartTime(); + LocalDateTime now =ticketStatisticDTO.getEndTime(); return standardTicketInfoService.getDoublePassQuantity(stationMap,firstDateTime,now); } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/OfflineTicketServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/OfflineTicketServiceImpl.java index 312edca..595a19d 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/OfflineTicketServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/OfflineTicketServiceImpl.java @@ -71,7 +71,7 @@ public class OfflineTicketServiceImpl extends BaseServiceImpl { - return Arrays.stream(ids.split(",")).map(id->Optional.ofNullable(UserCache.getUser(Long.parseLong(id))).map(User::getName).orElse(id)).collect(Collectors.joining(",")); - }).orElse(null); - workTicketInfoVO.setMembersName(membersName); + if(Func.isNotEmpty(workTicketInfoVO.getClassGroupMembersManual())){ + workTicketInfoVO.setClassGroupMembersName(workTicketInfoVO.getClassGroupMembersManual()); } /*完善票据来源、票据类型*/ workTicketInfoVO.setTypeName(DictCache.getValue(DictConstants.TICKET_TYPE,workTicketInfoVO.getType()));