| | |
| | | // 商品 |
| | | Mat mat = matService.selectByMatnr(excel.getMatnr()); |
| | | if (mat == null) { |
| | | mat = excel; |
| | | mat = new Mat(); |
| | | mat.setMatnr(excel.getMatnr()); |
| | | mat.setMaktx(excel.getMaktx()); |
| | | mat.setSafeQty(excel.getSafeQty()); |
| | | mat.setVolume(excel.getVolume()); |
| | | mat.setStoreMax(excel.getStoreMax()); |
| | | mat.setStoreMin(excel.getStoreMin()); |
| | | mat.setTagId(tagId); |
| | | mat.setLocType(tagId); |
| | | if (Objects.isNull(mat.getVolume())) { |
| | | throw new CoolException("每公斤长度不能为空!!"); |
| | | } |
| | | if (Objects.isNull(mat.getSafeQty())) { |
| | | throw new CoolException("归零阀值不能为空!!"); |
| | | throw new CoolException("归零阈值不能为空!!"); |
| | | } |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException("保存商品信息失败,商品编码:" + excel.getMatnr()); |