|  |  | 
 |  |  |     List<StationStatisticDTO> statisticStationList(@Param("startDate") LocalDateTime startDate, | 
 |  |  |                                                    @Param("endDate")LocalDateTime endDate, | 
 |  |  |                                                    @Param("name") String name, | 
 |  |  |                                                    @Param("userId") String userId); | 
 |  |  |                                                    @Param("userId") String userId, | 
 |  |  |                                                    @Param("statusList") List<String> statusList); | 
 |  |  |  | 
 |  |  |     List<DeliveryOrder> selectSupplierDoEntity4Check(@Param("supplierId") Long supplierId | 
 |  |  |             , @Param("startDate") LocalDateTime startDate, @Param("endDate") LocalDateTime endDate); | 
 
 |  |  | 
 |  |  |         return dto; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public List<StationStatisticDTO> statisticStationList(String name, LocalDateTime startDate, LocalDateTime endDate) { | 
 |  |  |     public List<StationStatisticDTO> statisticStationList(String name, LocalDateTime startDate | 
 |  |  |             , LocalDateTime endDate, String status) { | 
 |  |  |         String userId = SecurityUtils.getUserId(); | 
 |  |  |         LambdaQueryWrapper<Station> lambdaQueryWrapper = new LambdaQueryWrapper<>(); | 
 |  |  |         lambdaQueryWrapper.like(Station::getUserIds, userId); | 
 |  |  |         lambdaQueryWrapper.like(Station::getUserIds, "%" + userId + "%"); | 
 |  |  |         lambdaQueryWrapper.eq(Station::getType, "0"); | 
 |  |  |         boolean hasZc = stationMapper.selectCount(lambdaQueryWrapper)>0;//当前用户是否有总仓权限,总仓能查看到所有集货站的数据 | 
 |  |  |         boolean hasZc = stationMapper.selectCount(lambdaQueryWrapper) > 0;//当前用户是否有总仓权限,总仓能查看到所有集货站的数据 | 
 |  |  |         List<String> statusList = splitParam(status); | 
 |  |  |         if(hasZc){ | 
 |  |  |             List<StationStatisticDTO> stationStatisticDTOS = deliveryOrderMapper.statisticStationList(startDate, endDate,name,null); | 
 |  |  |             List<StationStatisticDTO> stationStatisticDTOS = deliveryOrderMapper.statisticStationList(startDate, endDate,name,null, statusList); | 
 |  |  |             return stationStatisticDTOS; | 
 |  |  |         }else{ | 
 |  |  |             List<StationStatisticDTO> stationStatisticDTOS = deliveryOrderMapper.statisticStationList(startDate, endDate,name,userId); | 
 |  |  |             List<StationStatisticDTO> stationStatisticDTOS = deliveryOrderMapper.statisticStationList(startDate, endDate, name, userId, statusList); | 
 |  |  |             return stationStatisticDTOS; | 
 |  |  |         } | 
 |  |  |     } | 
 
 |  |  | 
 |  |  |  | 
 |  |  |     @GetMapping("/station/list") | 
 |  |  |     @ApiOperation(value = "查询我的集货站列表") | 
 |  |  |     public ResponseEntity<ReturnDataDTO<List<StationStatisticDTO>>> statisticStationList(String name){ | 
 |  |  |         LocalDateTime now = LocalDateTime.now(); | 
 |  |  |         LocalDateTime towAm = LocalDate.now().atTime(2, 0, 0); | 
 |  |  |         LocalDateTime fivePm = LocalDate.now().atTime(17, 0, 0); | 
 |  |  |     public ResponseEntity<ReturnDataDTO<List<StationStatisticDTO>>> statisticStationList(String name | 
 |  |  |             , String status, String date){ | 
 |  |  |         /*if(StringUtils.isEmpty(date)){ | 
 |  |  |             throw new ValidationException("请选择日期"); | 
 |  |  |         }*/ | 
 |  |  |         LocalDateTime startDate; | 
 |  |  |         LocalDateTime endDate; | 
 |  |  |         if(now.isAfter(towAm)){ | 
 |  |  |             startDate = fivePm.plusDays(-1); | 
 |  |  |             endDate = fivePm; | 
 |  |  |         LocalDate localDate = deliveryOrderService.parseLocalDate(date); | 
 |  |  |         if(localDate != null){ | 
 |  |  |             endDate = localDate.atTime(17, 0, 0); | 
 |  |  |             startDate = endDate.plusDays(-1); | 
 |  |  |         } else { | 
 |  |  |             startDate = fivePm.plusDays(-2); | 
 |  |  |             endDate = fivePm.plusDays(-1); | 
 |  |  |             LocalDateTime now = LocalDateTime.now(); | 
 |  |  |             LocalDateTime towAm = LocalDate.now().atTime(2, 0, 0); | 
 |  |  |             LocalDateTime fivePm = LocalDate.now().atTime(17, 0, 0); | 
 |  |  |             if(now.isAfter(towAm)){ | 
 |  |  |                 startDate = fivePm.plusDays(-1); | 
 |  |  |                 endDate = fivePm; | 
 |  |  |             } else { | 
 |  |  |                 startDate = fivePm.plusDays(-2); | 
 |  |  |                 endDate = fivePm.plusDays(-1); | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         return returnData(R.SUCCESS.getCode(), deliveryOrderService.statisticStationList(name,startDate,endDate)); | 
 |  |  |  | 
 |  |  |         return returnData(R.SUCCESS.getCode(), deliveryOrderService.statisticStationList(name, startDate, endDate, status)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 
 |  |  | 
 |  |  |             <if test="endDate != null"> | 
 |  |  |                 AND o.create_time <= #{endDate} | 
 |  |  |             </if> | 
 |  |  |             GROUP BY | 
 |  |  |             s.station_id, | 
 |  |  |             st.`name`; | 
 |  |  |  | 
 |  |  |             <if test="statusList != null and statusList.size > 0"> | 
 |  |  |                 AND o.status in | 
 |  |  |                 <foreach collection="statusList" item="status" open="(" separator="," close=")"> | 
 |  |  |                     #{status} | 
 |  |  |                 </foreach> | 
 |  |  |             </if> | 
 |  |  |             GROUP BY s.station_id, st.`name` | 
 |  |  |     </select> | 
 |  |  |  | 
 |  |  |     <update id="setDeliveryOrderPending"> |