| | |
| | | return deliveryOrderItemMapper.selectDoItemList(id); |
| | | } |
| | | |
| | | public List<DeliveryOrderItemDTO> getSupplierDeliveryOrderItems(PostQueryDTO dto){ |
| | | List<String> idList = dto.getIds(); |
| | | List<DeliveryOrderItemDTO> ls = new ArrayList<>(); |
| | | if(idList != null && idList.size() > 0){ |
| | | for(String id : idList){ |
| | | ls.add(getSupplierDeliveryOrderItem(id)); |
| | | } |
| | | } |
| | | |
| | | return ls; |
| | | } |
| | | |
| | | public DeliveryOrderItemDTO getSupplierDeliveryOrderItem(String id) { |
| | | DeliveryOrderItemDTO dto = new DeliveryOrderItemDTO(); |
| | | |
| | |
| | | ); |
| | | if (count == 0) { |
| | | Order o = orderMapper.selectById(orderId); |
| | | if(!Constants.ORDER_STATUS_BACKEND.COLLECTION.name().equals(o.getStatus())){ |
| | | log.warn("非待集货状态,不可设置待发货"); |
| | | return; |
| | | } |
| | | o.setStatusBackend(Constants.ORDER_STATUS_BACKEND.SEND.name()); |
| | | o.update(SecurityUtils.getUserId()); |
| | | orderMapper.updateById(o); |
| | |
| | | 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; |
| | | } |
| | | } |