| | |
| | | import com.vincent.rsf.framework.common.R; |
| | | 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.excel.OutStockTemplate; |
| | | import com.vincent.rsf.server.manager.enums.OrderType; |
| | | import com.vincent.rsf.server.manager.enums.OrderWorkType; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | |
| | | } |
| | | |
| | | @PostMapping("/outStock/order/getOutTaskItems") |
| | | @ApiOperation("出库单库位预览") |
| | | @PreAuthorize("hasAuthority('manager:outStock:list')") |
| | | public R getOrderOutTaskItem(@RequestBody OrderOutTaskParam param) { |
| | | if (Cools.isEmpty(param)) { |
| | |
| | | if (Cools.isEmpty()) { |
| | | return R.error("参数不能为空!!"); |
| | | } |
| | | if (Objects.isNull(params.get("outId"))) { |
| | | return R.error("出库参数不能为空!!"); |
| | | } |
| | | |
| | | List<OutStockToTaskParams> taskParams = JSONArray.parseArray(JSONArray.toJSONString(params.get("items")), OutStockToTaskParams.class); |
| | | |
| | | return outStockService.genOutStockTask(taskParams, getLoginUserId()); |
| | | return outStockService.genOutStockTask(taskParams, getLoginUserId(), Long.parseLong(params.get("outId").toString())); |
| | | } |
| | | |
| | | /** |
| | | * 获取出库站点 |
| | | * @return |
| | | */ |
| | | @GetMapping("/outStock/tasks/sites") |
| | | @ApiOperation("获取出库库口") |
| | | @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); |
| | | } |
| | | |
| | | } |