| | |
| | | return text; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 批量申请编码数据 |
| | | * |
| | |
| | | // return null; |
| | | return codeImProtRusultVO; |
| | | } |
| | | |
| | | |
| | | /*** |
| | | * 从顶层批量申请导入方法 |
| | |
| | | |
| | | }); |
| | | |
| | | |
| | | //都转换完了。需要批量检查 |
| | | //如果出错了,我们依然执行有效的数据,无效的数据写回到excel中 |
| | | //2.判断必输项。。需要全部的属性,如果是必输,但是表单里面不显示的,只能是分类注入或者组合规则 |
| | |
| | | createRedisDatas(uuid + "-ok",codeImprotDataVOS, newErrorMap,true); |
| | | |
| | | }); |
| | | |
| | | //往物品节点上加模板 |
| | | |
| | | |
| | | |
| | | List<String> needRowIndexList=new ArrayList<>(); |
| | | CodeImProtRusultVO codeImProtRusultVO = new CodeImProtRusultVO(); |
| | | if(errorMap.size()>0) { |
| | |
| | | String uuid=VciBaseUtil.getPk(); |
| | | boolean isCreateUUid=false; |
| | | boolean isExport=false; |
| | | long start = System.currentTimeMillis(); |
| | | for(int i=0;i<sheetDataSetList.size()-1;i++) { |
| | | if (CollectionUtils.isEmpty(sheetDataSetList) || CollectionUtils.isEmpty(sheetDataSetList.get(i).getRowData()) |
| | | || sheetDataSetList.get(i).getRowData().size() < 1) { |
| | |
| | | // 5.3 企业编码的长度,和编码规则的长度要对应上 |
| | | // 5.4 获取流水码段的值,去除填充的字符,看流水号是多少,然后将流水号和现在的最大流水号判断,小于就直接录入,大于则修改最大流水号 |
| | | // 5.5 存储企业编码到allcode中 |
| | | |
| | | //查询分类和模板 |
| | | CodeClassifyFullInfoBO classifyFullInfo = classifyService.getClassifyFullInfo(codeClassifyOid); |
| | | |
| | |
| | | ruleRowIndexMap.keySet().parallelStream().forEach(ruleOid -> { |
| | | List<String> rowIndexList = ruleRowIndexMap.get(ruleOid); |
| | | List<ClientBusinessObject> thisCbos = cboList.stream().filter(cbo -> rowIndexList.contains(cbo.getAttributeValue(IMPORT_ROW_INDEX)) && !errorMap.containsKey(cbo.getAttributeValue(IMPORT_ROW_INDEX))).collect(Collectors.toList()); |
| | | //我们需要先查询一下,内容是否已经存在 |
| | | //我们需要先查询一下,内容是否已经存在 |
| | | if(!CollectionUtils.isEmpty(thisCbos)){ |
| | | List<String> existIds = new ArrayList<>(); |
| | | VciBaseUtil.switchCollectionForOracleIn(thisCbos).stream().forEach(cbos -> { |
| | |
| | | |
| | | if (!CollectionUtils.isEmpty(thisCbos)) { |
| | | try { |
| | | // TODO 多线程流问题 |
| | | productCodeService.productCodeAndSaveData(classifyFullInfo, finalTemplateVO, ruleVOMap.get(ruleOid), null, dataCBOList); |
| | | } catch (Throwable e) { |
| | | log.error("批量产生编码的时候出错了", e); |
| | |
| | | engineService.batchSaveSelectChar(templateVO, dataCBOIdList); |
| | | } |
| | | } |
| | | long end = System.currentTimeMillis(); |
| | | //log.info("=============for执行时间================="+String.valueOf((end-start)/1000)); |
| | | String excelFileName=""; |
| | | if(isExport&&!CollectionUtils.isEmpty(shetNameMap)) { |
| | | excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + "错误信息.xls"; |
| | |
| | | |
| | | return codeImProtRusultVO; |
| | | } |
| | | |
| | | /*private void converBaseModels(List<ClientBusinessObject> clientBusinessObjects,List<BaseModel>dataCBOList){ |
| | | clientBusinessObjects.stream().forEach(clientBusinessObject -> { |
| | | BaseModel baseModel=new BaseModel(); |
| | |
| | | }); |
| | | |
| | | }*/ |
| | | |
| | | /*** |
| | | * 从execl里构建对象 |
| | | * @param rowDataList |