| | |
| | | |
| | | 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; |
| | |
| | | import com.zy.asrs.entity.MatBarcode; |
| | | import com.zy.asrs.entity.Tag; |
| | | import com.zy.asrs.mapper.TagMapper; |
| | | import com.zy.asrs.service.InOutService; |
| | | import com.zy.asrs.service.MatBarcodeService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.TagService; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.entity.MatExcel; |
| | | import com.zy.common.utils.NodeUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | MatService matService = SpringUtils.getBean(MatService.class); |
| | | InOutService inOutService = SpringUtils.getBean(InOutService.class); |
| | | MatBarcodeService matBarcodeService = SpringUtils.getBean(MatBarcodeService.class); |
| | | WrkDetlService wrkDetlService = SpringUtils.getBean(WrkDetlService.class); |
| | | LocDetlService locDetlService = SpringUtils.getBean(LocDetlService.class); |
| | | WaitPakinService waitPakinService = SpringUtils.getBean(WaitPakinService.class); |
| | | Date now = new Date(); |
| | | Long tagId; |
| | | // 分类 |
| | |
| | | |
| | | } |
| | | //模具信息更新 |
| | | matService |
| | | matService.delete(new EntityWrapper<Mat>().eq("matnr",mat.getMatnr())); |
| | | mat = excel; |
| | | mat.setTagId(tagId); |
| | | mat.setMatnr(excel.getMatnr() + "__" + excel.getName()); |
| | | if (!matService.insert(mat)) { |
| | | throw new CoolException("保存商品档案失败,商品编码:" + excel.getMatnr()); |
| | | } |
| | | } |
| | | } |
| | | |