| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.security.PermitAll; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | |
| | | @Api(tags = "状态统计报表接口") |
| | | @RequestMapping("/xboot/signCount") |
| | | @Transactional |
| | | @PermitAll |
| | | public class SignCountController { |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @GetMapping("/outExcels") |
| | | @ApiOperation(value = "导出签收统计信息表", notes = "导出签收统计信息表") |
| | | @PermitAll |
| | | public void export1(OrderStatusCount orderStatusCount, HttpServletResponse response) throws IOException { |
| | | if(orderStatusCount.getSendDateStart()!=null){ |
| | | orderStatusCount.setSendDateStart(orderStatusCount.getSendDateStart() + " 00:00:00"); |
| | | } |
| | | if(orderStatusCount.getSendDateEnd()!=null){ |
| | | orderStatusCount.setSendDateEnd(orderStatusCount.getSendDateEnd() + " 23:59:59"); |
| | | } |
| | | List<OrderStatusCount> orderStatus = this.iSignCountService.signCounts2New(orderStatusCount); |
| | | System.out.println(orderStatus); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setCharacterEncoding("utf-8"); |
| | | String fileName = URLEncoder.encode("签收数量统计报表", "UTF-8"); |
| | |
| | | } |
| | | |
| | | @GetMapping(value = "/selectBySign") |
| | | @ApiOperation(value = "签收统计信息表", notes = "签收统计信息表") |
| | | public Result<IPage<OrderStatusCount>> signCounts(OrderStatusCount orderStatusCount,QueryRequest queryRequest) { |
| | | if(orderStatusCount.getSendDateStart()!=null){ |
| | | orderStatusCount.setSendDateStart(orderStatusCount.getSendDateStart() + " 00:00:00"); |
| | | } |
| | | if(orderStatusCount.getSendDateEnd()!=null){ |
| | | orderStatusCount.setSendDateEnd(orderStatusCount.getSendDateEnd() + " 23:59:59"); |
| | | } |
| | | IPage<OrderStatusCount> data = this.iSignCountService.signCounts(orderStatusCount,queryRequest); |
| | | return new ResultUtil<IPage<OrderStatusCount>>().setData(data); |
| | | } |
| | | |
| | | @GetMapping(value = "/selectBySignNew") |
| | | @ApiOperation(value = "签收统计信息表1", notes = "签收统计信息表1") |
| | | @PermitAll |
| | | public Result<IPage<OrderStatusCount>> signCountsNew(OrderStatusCount orderStatusCount,QueryRequest queryRequest) { |
| | | if(orderStatusCount.getSendDateStart()!=null){ |
| | | orderStatusCount.setSendDateStart(orderStatusCount.getSendDateStart() + " 00:00:00"); |
| | | } |
| | | if(orderStatusCount.getSendDateEnd()!=null){ |
| | | orderStatusCount.setSendDateEnd(orderStatusCount.getSendDateEnd() + " 23:59:59"); |
| | | } |
| | | IPage<OrderStatusCount> data = this.iSignCountService.signCountsNew(orderStatusCount,queryRequest); |
| | | return new ResultUtil<IPage<OrderStatusCount>>().setData(data); |
| | | } |