New file |
| | |
| | | package com.example.erp.controller.sd; |
| | | |
| | | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.sd.DeliveryService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/Delivery") |
| | | public class DeliveryController { |
| | | @Autowired |
| | | DeliveryService deliveryService; |
| | | |
| | | |
| | | /*发货订单查询*/ |
| | | @PostMapping("/getseletShippingOrder/{pageNum}/{pageSize}") |
| | | public Result getseletShippingOrder(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody Delivery delivery){ |
| | | return Result.seccess(deliveryService.getseletShippingOrder(pageNum,pageSize,delivery)); |
| | | } |
| | | |
| | | /*发货订单明细查询*/ |
| | | @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)); |
| | | } |
| | | |
| | | /*库存可发货订单查询*/ |
| | | @PostMapping("/getSelectOrderInventory/{pageNum}/{pageSize}") |
| | | public Result getSelectOrderInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody Order order){ |
| | | return Result.seccess(deliveryService.getSelectOrderInventory(pageNum,pageSize,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)); |
| | | } |
| | | |
| | | @PostMapping("/insertDelivery") |
| | | public Result insertDelivery( @RequestBody Map<String,Object> object){ |
| | | System.out.println(object); |
| | | if(deliveryService.insertDelivery(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"发货失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |