| | |
| | | return success(true); |
| | | } |
| | | |
| | | @PostMapping("/generate-from-arrival-notice") |
| | | @Operation(summary = "根据到货通知单生成采购入库单") |
| | | @Parameter(name = "arrivalNoticeId", description = "到货通知单编号", required = true) |
| | | @PreAuthorize("@ss.hasPermission('mes:wm-item-receipt:create')") |
| | | public CommonResult<Long> generateFromArrivalNotice(@RequestParam("arrivalNoticeId") Long arrivalNoticeId) { |
| | | return success(itemReceiptService.generateItemReceiptFromArrivalNotice(arrivalNoticeId)); |
| | | } |
| | | |
| | | @PutMapping("/submit-approval") |
| | | @Operation(summary = "提交采购入库单审批") |
| | | @Parameter(name = "id", description = "入库单编号", required = true) |
| | | @Parameter(name = "processDefinitionKey", description = "流程定义 Key", required = true) |
| | | @PreAuthorize("@ss.hasPermission('mes:wm-item-receipt:update')") |
| | | public CommonResult<Boolean> submitApproval(@RequestParam("id") Long id, |
| | | @RequestParam("processDefinitionKey") String processDefinitionKey) { |
| | | itemReceiptService.submitItemReceiptApproval(id, processDefinitionKey); |
| | | return success(true); |
| | | } |
| | | |
| | | // ==================== 拼接 VO ==================== |
| | | |
| | | private List<MesWmItemReceiptRespVO> buildRespVOList(List<MesWmItemReceiptDO> list) { |
| | |
| | | MapUtils.findAndThen(iqcMap, vo.getIqcId(), |
| | | iqc -> vo.setIqcCode(iqc.getCode())); |
| | | MapUtils.findAndThen(noticeMap, vo.getNoticeId(), notice -> |
| | | vo.setNoticeCode(notice.getCode()).setPurchaseOrderCode(notice.getPurchaseOrderCode())); |
| | | vo.setNoticeCode(notice.getCode())); |
| | | }); |
| | | } |
| | | |