| | |
| | | } |
| | | // 采购退货单 |
| | | // if (param.getNumber().startsWith("PR-")) { |
| | | // erp单据上传 |
| | | Long docId = pakouts.get(0).getDocId(); |
| | | if (null != docId) { |
| | | List<BillDto> dtos = new ArrayList<>(); |
| | | for (Pakout pakout : pakouts) { |
| | | BillDto billDto = new BillDto(); |
| | | billDto.setMatnr(pakout.getMatnr()); |
| | | billDto.setQty(pakout.getAnfme()); |
| | | dtos.add(billDto); |
| | | } |
| | | if (!erpService.uploadBill(dtos, docId.intValue() , pakouts.get(0).getDocNum())) { |
| | | throw new CoolException("无法上报至erp"); |
| | | } |
| | | } |
| | | // erp单据上传 todo |
| | | // Long docId = pakouts.get(0).getDocId(); |
| | | // if (null != docId) { |
| | | // List<BillDto> dtos = new ArrayList<>(); |
| | | // for (Pakout pakout : pakouts) { |
| | | // BillDto billDto = new BillDto(); |
| | | // billDto.setMatnr(pakout.getMatnr()); |
| | | // billDto.setQty(pakout.getAnfme()); |
| | | // dtos.add(billDto); |
| | | // } |
| | | // if (!erpService.uploadBill(dtos, docId.intValue() , pakouts.get(0).getDocNum())) { |
| | | // throw new CoolException("无法上报至erp"); |
| | | // } |
| | | // } |
| | | |
| | | // } |
| | | return R.ok(); |
| | |
| | | DateUtils.convert(now), // 单据日期[非空] |
| | | param.getCustomerTypeId(), // 客户编号 |
| | | null, // 经手人编号[空] |
| | | null, |
| | | dto.getMatnr(), // 商品编号 |
| | | dto.getCount(), // 商品数量 |
| | | dto.getCount(), // 总数量 |