| | |
| | | |
| | | import com.alibaba.excel.context.AnalysisContext; |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.SpringUtils; |
| | | import com.core.exception.CoolException; |
| | |
| | | |
| | | } |
| | | //模具信息更新 |
| | | matService.deleteById(mat.getId()); |
| | | matService.delete(new EntityWrapper<Mat>().eq("matnr",mat.getMatnr())); |
| | | mat = excel; |
| | | mat.setTagId(tagId); |
| | | mat.setMatnr(excel.getMatnr()+"__"+excel.getName()); |
| | | mat.setMatnr(excel.getMatnr() + "__" + excel.getName()); |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException("保存商品档案失败,商品编码:" + excel.getMatnr()); |
| | | } |