| | |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.sd.DeliveryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @Api(value="发货controller",tags={"发货操作接口"}) |
| | | @RequestMapping("/Delivery") |
| | | public class DeliveryController { |
| | | @Autowired |
| | |
| | | |
| | | |
| | | /*发货订单查询*/ |
| | | @PostMapping("/getseletShippingOrder/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getseletShippingOrder(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody Delivery delivery){ |
| | | return Result.seccess(deliveryService.getseletShippingOrder(pageNum,pageSize,selectDate,delivery)); |
| | | @ApiOperation("发货订单查询接口") |
| | | @PostMapping("/getSelectShippingOrder/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectShippingOrder(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody Delivery delivery){ |
| | | return Result.seccess(deliveryService.getSelectShippingOrder(pageNum,pageSize,selectDate,delivery)); |
| | | } |
| | | |
| | | /*发货报表查询*/ |
| | | @ApiOperation("发货报表查询接口") |
| | | @PostMapping("/getSelectDeliveryDetailReport/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectDeliveryDetailReport(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody DeliveryDetail deliveryDetail){ |
| | | return Result.seccess(deliveryService.getSelectDeliveryDetailReport(pageNum,pageSize,selectDate,deliveryDetail)); |
| | | } |
| | | |
| | | /*发货订单明细查询*/ |
| | | @PostMapping("/getseletShippingOrderDetail/{pageNum}/{pageSize}") |
| | | public Result getseletShippingOrderDetail(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ |
| | | System.out.println(orderDetail.getDeliveryDetail().getDeliveryId()); |
| | | return Result.seccess(deliveryService.getseletShippingOrderDetail(pageNum,pageSize,orderDetail)); |
| | | @ApiOperation("发货编辑订单明细查询接口") |
| | | @PostMapping("/getSelectShippingOrderDetail/{pageNum}/{pageSize}") |
| | | public Result getSelectShippingOrderDetail(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ |
| | | return Result.seccess(deliveryService.getSelectShippingOrderDetail(pageNum,pageSize,orderDetail)); |
| | | } |
| | | |
| | | /*库存可发货订单查询*/ |
| | | @ApiOperation("库存可发货订单查询接口接口") |
| | | @PostMapping("/getSelectOrderInventory/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectOrderInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody Order order){ |
| | | return Result.seccess(deliveryService.getSelectOrderInventory(pageNum,pageSize,selectDate,order)); |
| | | } |
| | | |
| | | /*发货订单明细查询*/ |
| | | @PostMapping("/getseletShippingOrderDetails/{pageNum}/{pageSize}") |
| | | public Result getseletShippingOrderDetails(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ |
| | | System.out.println(orderDetail); |
| | | return Result.seccess(deliveryService.getseletShippingOrderDetails(pageNum,pageSize,orderDetail)); |
| | | @ApiOperation("发货新增订单明细查询接口") |
| | | @PostMapping("/getSelectShippingOrderDetails/{pageNum}/{pageSize}") |
| | | public Result getSelectShippingOrderDetails(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OrderDetail orderDetail){ |
| | | return Result.seccess(deliveryService.getSelectShippingOrderDetails(pageNum,pageSize,orderDetail)); |
| | | } |
| | | |
| | | @ApiOperation("发货新增接口") |
| | | @PostMapping("/insertDelivery") |
| | | public Result insertDelivery( @RequestBody Map<String,Object> object){ |
| | | if(deliveryService.insertDelivery(object)){ |
| | |
| | | |
| | | } |
| | | } |
| | | @ApiOperation("发货审核修改接口") |
| | | @PostMapping("/updateDeliveryToExamine") |
| | | public Result updateDeliveryToExamine( @RequestBody Map<String,Object> object){ |
| | | System.out.println(object); |
| | | if(deliveryService.updateDeliveryToExamine(object)){ |
| | | return Result.seccess(); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("发货删除接口") |
| | | @PostMapping("/deleteDelivery") |
| | | public Result deleteDelivery( @RequestBody Map<String,Object> object){ |
| | | if(deliveryService.deleteDelivery(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |