| | |
| | | throw new CoolException("物料数据为空"); |
| | | } |
| | | |
| | | if (Cools.isEmpty(param.getOrderNo()) || param.getOrderNo().isEmpty()) { |
| | | throw new CoolException("盘点单编号为空"); |
| | | } |
| | | |
| | | for (MatSyncParam.MatParam matParam : param.getData()) { |
| | | if (Cools.isEmpty(matParam.getMatnr())) { |
| | | throw new CoolException("商品编码为空"); |
| | |
| | | |
| | | if (diff != 0) { |
| | | CheckDetl checkDetl = new CheckDetl(); |
| | | checkDetl.setOrderNo(param.getOrderNo()); |
| | | checkDetl.setAnfme(diff); //这里记录差值 |
| | | checkDetl.setMatnr(matParam.getMatnr()); |
| | | checkDetl.setMaktx(matParam.getMaktx()); |
| | | checkDetl.setSpecs(matParam.getSpecs()); |
| | | checkDetl.setBatch(matParam.getBatch()); |
| | | checkDetl.setCreateTime(new Date()); |
| | | |
| | | checkDetlService.insert(checkDetl); // 插入差异记录 |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |