| | |
| | | import com.vincent.rsf.server.manager.entity.excel.AsnOrderTemplate; |
| | | import com.vincent.rsf.server.manager.service.AsnOrderItemService; |
| | | import com.vincent.rsf.server.manager.service.AsnOrderService; |
| | | import com.vincent.rsf.server.manager.service.CloudWmsNotifyLogService; |
| | | import com.vincent.rsf.server.manager.service.impl.PurchaseItemServiceImpl; |
| | | import com.vincent.rsf.server.manager.service.impl.PurchaseServiceImpl; |
| | | import com.vincent.rsf.server.system.constant.SerialRuleCode; |
| | |
| | | private PurchaseServiceImpl purchaseService; |
| | | @Autowired |
| | | private PurchaseItemServiceImpl purchaseItemService; |
| | | @Autowired |
| | | private CloudWmsNotifyLogService cloudWmsNotifyLogService; |
| | | |
| | | @ApiOperation("手动触发云仓回馈(入库通知单,放行暂缓上报)") |
| | | @PostMapping("/asnOrder/cloudWmsReport/submit") |
| | | @PreAuthorize("hasAuthority('manager:asnOrder:list')") |
| | | public R submitCloudWmsReportInbound(@RequestBody(required = false) Map<String, Object> body) { |
| | | String code = body != null && body.get("code") != null ? String.valueOf(body.get("code")).trim() : null; |
| | | return cloudWmsNotifyLogService.manualFlushToNotifyByOrderCode(code, true); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:asnOrder:list')") |
| | | @PostMapping("/asnOrder/page") |
| | |
| | | QueryWrapper<WkOrder> queryWrapper = pageParam.buildWrapper(true); |
| | | List<String> asList = Arrays.asList(OrderType.ORDER_IN.type); |
| | | queryWrapper.in("type", asList); |
| | | return R.ok().add(asnOrderService.page(pageParam, queryWrapper)); |
| | | Page<WkOrder> pageResult = asnOrderService.page(pageParam, queryWrapper); |
| | | asnOrderService.fillPalletQty(pageResult.getRecords()); |
| | | return R.ok().add(pageResult); |
| | | } |
| | | |
| | | @ApiOperation("获取首页表头数据") |
| | |
| | | @PreAuthorize("hasAuthority('manager:asnOrder:list')") |
| | | @PostMapping({"/asnOrder/many/{ids}", "/asnOrders/many/{ids}"}) |
| | | public R many(@PathVariable Long[] ids) { |
| | | return R.ok().add(asnOrderService.listByIds(Arrays.asList(ids))); |
| | | List<WkOrder> list = asnOrderService.listByIds(Arrays.asList(ids)); |
| | | asnOrderService.fillPalletQty(list); |
| | | return R.ok().add(list); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:asnOrder:list')") |
| | | @OperationLog("表单查询") |
| | | @GetMapping("/asnOrder/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(asnOrderService.getById(id)); |
| | | WkOrder order = asnOrderService.getById(id); |
| | | if (order != null) { |
| | | asnOrderService.fillPalletQty(Collections.singletonList(order)); |
| | | } |
| | | return R.ok().add(order); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:asnOrder:save')") |