| | |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.manager.controller.params.GenWaveParams; |
| | | import com.vincent.rsf.server.manager.controller.params.OrderOutTaskParam; |
| | | import com.vincent.rsf.server.manager.controller.params.OutStockToTaskParams; |
| | | import com.vincent.rsf.server.manager.entity.DeliveryItem; |
| | |
| | | @PreAuthorize("hasAuthority('manager:outStock:update')") |
| | | @ApiOperation("出库单生成波次") |
| | | @PostMapping("/outStock/generate/wave") |
| | | public R generateWave(@RequestBody Map<String, Object> params) { |
| | | public R generateWave(@RequestBody GenWaveParams params) { |
| | | if (Objects.isNull(params)) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | List<Long> ids = (List<Long>) params.get("ids"); |
| | | return outStockService.generateWaves(ids); |
| | | return outStockService.generateWaves(params); |
| | | } |
| | | |
| | | @PostMapping("/outStock/items/save") |
| | |
| | | @PreAuthorize("hasAuthority('manager:outStock:list')") |
| | | public R getSiteNos() { |
| | | return outStockService.getSiteNos(); |
| | | } |
| | | |
| | | /** |
| | | * @author Ryan |
| | | * @description 下载模板 |
| | | * @param |
| | | * @return |
| | | * @time 2025/4/18 08:17 |
| | | */ |
| | | @PostMapping("/outStock/template/download") |
| | | @ApiOperation("下载收货单模板") |
| | | @PreAuthorize("hasAuthority('manager:outStockItem:update')") |
| | | public void downloadTemplate(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | OutStockTemplate template = ExcelUtil.mockData(OutStockTemplate.class); |
| | | List<OutStockTemplate> list = Arrays.asList(template); |
| | | ExcelUtil.build(ExcelUtil.create(list, OutStockTemplate.class, true), response); |
| | | } |
| | | |
| | | } |