| | |
| | | } |
| | | |
| | | /** |
| | | * @param params |
| | | * @param loginUserId |
| | | * @return |
| | | * @author Ryan |
| | | * @description 收货至收货区 |
| | | * @param params |
| | | * @return |
| | | * @time 2025/3/10 15:41 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R receiptToWarehouse(Map<String, Object> params) { |
| | | public R receiptToWarehouse(Map<String, Object> params, Long loginUserId) { |
| | | if (Objects.isNull(params)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | |
| | | } |
| | | List<Map<String, Object>> receipts1 = (List<Map<String, Object>>) params.get("receipts"); |
| | | for (Map<String, Object> rcpt : receipts1) { |
| | | if (Objects.isNull(rcpt)) {continue;} |
| | | if (null == rcpt || Objects.isNull(rcpt)) {continue;} |
| | | ReceiptDetlsDto dto = JSONObject.parseObject(JSONObject.toJSONString(rcpt), ReceiptDetlsDto.class); |
| | | Matnr matnr = matnrMapper.selectById(dto.getMatnrId()); |
| | | if (Objects.isNull(matnr)) { |
| | |
| | | .setAnfme(dto.getReceiptQty()) |
| | | .setSplrBatch(dto.getSplrBatch()) |
| | | .setMatnrCode(matnr.getCode()) |
| | | .setUpdateBy(loginUserId) |
| | | .setCreateBy(loginUserId) |
| | | .setMatnrId(matnr.getId()) |
| | | .setMaktx(matnr.getName()) |
| | | //库存单位为最小单位 |