| | |
| | | @Autowired |
| | | private StockUtils stockUtils; |
| | | |
| | | @GetMapping("/getByCustomerName") |
| | | @ApiOperation("通过客户名称查询") |
| | | public AjaxResult getByCustomerName(String customerName) { |
| | | return AjaxResult.success(shippingInfoService.getShippingInfoByCustomerName(customerName)); |
| | | } |
| | | |
| | | @ApiOperation("详情") |
| | | @GetMapping("/getById") |
| | | public AjaxResult getById(Long id) { |
| | | return AjaxResult.success(shippingInfoService.getDateil(id)); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("发货信息列表") |
| | | public AjaxResult listPage(Page page, ShippingInfo req) { |
| | | IPage<ShippingInfo> listPage = shippingInfoService.listPage(page,req); |
| | | IPage<ShippingInfoDto> listPage = shippingInfoService.listPage(page,req); |
| | | return AjaxResult.success(listPage); |
| | | } |
| | | |
| | |
| | | req.setStatus("待审核"); |
| | | boolean save = shippingInfoService.save(req); |
| | | return save ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @ApiOperation("发货扣库存") |
| | | @PostMapping("/deductStock") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "发货信息管理", businessType = BusinessType.UPDATE) |
| | | public AjaxResult deductStock(@RequestBody ShippingInfoDto req) throws IOException { |
| | | |
| | | |
| | | return shippingInfoService.deductStock( req) ? AjaxResult.success() : AjaxResult.error(); |
| | | } |
| | | |
| | | @PostMapping("/update") |