|  |  |  | 
|---|
|  |  |  | import com.mzl.flower.base.BaseController; | 
|---|
|  |  |  | import com.mzl.flower.base.R; | 
|---|
|  |  |  | import com.mzl.flower.base.ReturnDataDTO; | 
|---|
|  |  |  | import com.mzl.flower.constant.Constants; | 
|---|
|  |  |  | import com.mzl.flower.dto.request.payment.DeliveryOrderArriveDTO; | 
|---|
|  |  |  | import com.mzl.flower.dto.request.payment.DeliveryOrderQueryDTO; | 
|---|
|  |  |  | import com.mzl.flower.dto.request.payment.PostQueryDTO; | 
|---|
|  |  |  | import com.mzl.flower.dto.response.payment.*; | 
|---|
|  |  |  | import com.mzl.flower.dto.response.supplier.SupplierOrderDTO; | 
|---|
|  |  |  | import com.mzl.flower.service.payment.DeliveryOrderService; | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "获取配送单列表") | 
|---|
|  |  |  | public ResponseEntity<ReturnDataDTO<Page<DeliveryOrderListDTO>>> selectOrderList(Page page | 
|---|
|  |  |  | , DeliveryOrderQueryDTO dto){ | 
|---|
|  |  |  | LocalDate localDate = deliveryOrderService.parseLocalDate(dto.getDate()); | 
|---|
|  |  |  | if(localDate != null){ | 
|---|
|  |  |  | LocalDateTime endDate = localDate.atTime(17, 0, 0); | 
|---|
|  |  |  | LocalDateTime startDate = endDate.plusDays(-1); | 
|---|
|  |  |  | dto.setStartDate(startDate); | 
|---|
|  |  |  | dto.setEndDate(endDate); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return returnData(R.SUCCESS.getCode(), deliveryOrderService.selectDeliveryOrderList(page, dto)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | return returnData(R.SUCCESS.getCode(), deliveryOrderService.getSupplierDeliveryOrderItem(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("/list/items/views") | 
|---|
|  |  |  | @ApiOperation(value = "获取商品详情列表") | 
|---|
|  |  |  | public ResponseEntity<ReturnDataDTO<List<DeliveryOrderItemDTO>>> getSupplierDeliveryOrderItems(@RequestBody PostQueryDTO dto){ | 
|---|
|  |  |  | return returnData(R.SUCCESS.getCode(), deliveryOrderService.getSupplierDeliveryOrderItems(dto)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("/list/arrive") | 
|---|
|  |  |  | @ApiOperation(value = "确认入位") | 
|---|
|  |  |  | public ResponseEntity<ReturnDataDTO> arrived(@RequestBody DeliveryOrderArriveDTO dto) { | 
|---|
|  |  |  | 
|---|
|  |  |  | return returnData(R.SUCCESS.getCode(), deliveryOrderService.selectSettlementListByTime(page, day)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @GetMapping("/mine/list/check/info/reduce") | 
|---|
|  |  |  | @ApiOperation(value = "降级操作详情") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(name = "orderItemId", value = "订单商品id", required = true, dataType = "String", paramType = "query") | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ResponseEntity<ReturnDataDTO<OrderItemCheckReduceDTO>> getReduceCheck(String orderItemId){ | 
|---|
|  |  |  | return returnData(R.SUCCESS.getCode(), deliveryOrderService.getReduceCheck(orderItemId)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @GetMapping("/mine/list/check/info/replace") | 
|---|
|  |  |  | @ApiOperation(value = "补货操作详情") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(name = "orderItemId", value = "订单商品id", required = true, dataType = "String", paramType = "query") | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ResponseEntity<ReturnDataDTO<OrderItemCheckNumDTO>> getReplaceCheck(String orderItemId){ | 
|---|
|  |  |  | return returnData(R.SUCCESS.getCode(), deliveryOrderService.getOtherCheck(orderItemId | 
|---|
|  |  |  | , Constants.CHECK_TYPE.replace.name(), true)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @GetMapping("/mine/list/check/info/lack") | 
|---|
|  |  |  | @ApiOperation(value = "缺货操作详情") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(name = "orderItemId", value = "订单商品id", required = true, dataType = "String", paramType = "query") | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ResponseEntity<ReturnDataDTO<OrderItemCheckNumDTO>> getLackCheck(String orderItemId){ | 
|---|
|  |  |  | return returnData(R.SUCCESS.getCode(), deliveryOrderService.getOtherCheck(orderItemId | 
|---|
|  |  |  | , Constants.CHECK_TYPE.lack.name(), true)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|