| | |
| | | public AjaxResult getByCustomerName(String customerName) { |
| | | return AjaxResult.success(shippingInfoService.getShippingInfoByCustomerName(customerName)); |
| | | } |
| | | |
| | | /** |
| | | * 一键发货 - 自动审批通过并出库 |
| | | */ |
| | | @PostMapping("/oneClickShipping") |
| | | @ApiOperation("一键发货") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "发货信息管理", businessType = BusinessType.INSERT) |
| | | public AjaxResult oneClickShipping(@RequestBody ShippingInfoDto req) throws IOException { |
| | | return shippingInfoService.oneClickShipping(req) ? AjaxResult.success("发货成功") : AjaxResult.error("发货失败"); |
| | | } |
| | | |
| | | /** |
| | | * 批量一键发货 - 将销售台账下所有未发货的产品全部发货 |
| | | */ |
| | | @PostMapping("/batchOneClickShipping") |
| | | @ApiOperation("批量一键发货") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Log(title = "发货信息管理", businessType = BusinessType.INSERT) |
| | | public AjaxResult batchOneClickShipping(@RequestBody ShippingInfoDto req) throws IOException { |
| | | if (req.getSalesLedgerId() == null) { |
| | | return AjaxResult.error("销售台账ID不能为空"); |
| | | } |
| | | return shippingInfoService.batchOneClickShipping(req.getSalesLedgerId(), req) ? AjaxResult.success("批量发货成功") : AjaxResult.error("批量发货失败"); |
| | | } |
| | | } |