| | |
| | | import com.zy.common.utils.NodeUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * Created by vincent on 2019-11-25 |
| | |
| | | // 商品 |
| | | 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("归零阈值不能为空!!"); |
| | | } |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException("保存商品信息失败,商品编码:" + excel.getMatnr()); |
| | | } |