|  |  | 
 |  |  |     public synchronized R excelImport(MultipartFile file, HashMap<String, Object> hashMap, Long loginUserId) throws Exception { | 
 |  |  |         ExcelImportResult result = ExcelImportUtil.importExcelMore(file.getInputStream(), AsnOrderTemplate.class, ExcelUtil.getDefaultImportParams()); | 
 |  |  |         if (result.getList().isEmpty()) { | 
 |  |  |             throw new CoolException("物料导入失败!!"); | 
 |  |  |         } | 
 |  |  |         if (result.getList().isEmpty()) { | 
 |  |  |             throw new CoolException("表格内容不能为空!!"); | 
 |  |  |         } | 
 |  |  |         List<AsnOrderTemplate> resultList = result.getList(); | 
 |  |  | 
 |  |  |     @Transactional(rollbackFor = Exception.class) | 
 |  |  |     public boolean fieldsSave(Map<String, Object> params, Long loginUserId) { | 
 |  |  |         AsnOrderItem asnOrderItem = JSONObject.parseObject(JSONObject.toJSONString(params), AsnOrderItem.class); | 
 |  |  |         asnOrderItem.setUpdateBy(loginUserId).setCreateBy(loginUserId); | 
 |  |  | //        if (StringUtils.isBlank(asnOrderItem.getTrackCode())) { | 
 |  |  | //            String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_LABEL_CODE, asnOrderItem); | 
 |  |  | //            asnOrderItem.setTrackCode(ruleCode).setBarcode(ruleCode); | 
 |  |  | //        } | 
 |  |  |         if (StringUtils.isNoneBlank(asnOrderItem.getSplrCode())) { | 
 |  |  |             Companys companys = companysService.getOne(new LambdaQueryWrapper<Companys>() | 
 |  |  |                     .eq(Companys::getId, asnOrderItem.getSplrCode()) | 
 |  |  | 
 |  |  |         if (Objects.isNull(asnOrderItem.getAnfme()) || Double.compare(asnOrderItem.getAnfme(), 0.0) <= 0) { | 
 |  |  |             throw new CoolException("计划数不能为空!!"); | 
 |  |  |         } | 
 |  |  | //        if (StringUtils.isBlank(asnOrderItem.getSplrBatch())) { | 
 |  |  | //            throw new CoolException("供应商批次不能为空!!"); | 
 |  |  | //        } | 
 |  |  |         //保存扩展字段 | 
 |  |  |         try { | 
 |  |  |             StringBuffer sb = new StringBuffer(); | 
 |  |  | 
 |  |  |         } catch (Exception e) { | 
 |  |  |             throw new RuntimeException(e); | 
 |  |  |         } | 
 |  |  |         asnOrderItem.setUpdateBy(loginUserId).setCreateBy(loginUserId); | 
 |  |  |         if (!this.saveOrUpdate(asnOrderItem)) { | 
 |  |  |             throw new CoolException("收货通知单明细保存失败!!"); | 
 |  |  |         } |