| | |
| | | import org.apache.poi.ss.usermodel.Font; |
| | | import org.apache.poi.ss.usermodel.RichTextString; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.redis.cache.BladeRedis; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | //参照的自行输入名称 |
| | | //分类注入的不用,都是导入后自动处理的 |
| | | //编码,状态等字段不导入 |
| | | List<CodeClassifyTemplateAttrVO> templateAttrVOS = codeClassifyTemplateVO.getAttributes().stream().filter(s -> |
| | | List<CodeClassifyTemplateAttrVO> codeClassifyTemplateAttrVOList=codeClassifyTemplateVO.getAttributes(); |
| | | if(!CollectionUtils.isEmpty(codeClassifyTemplateAttrVOList)) { |
| | | if (CollectionUtils.isEmpty(codeClassifyTemplateAttrVOList)) { |
| | | throw new VciBaseException("模板没有配置属性"); |
| | | } |
| | | } |
| | | List<CodeClassifyTemplateAttrVO> templateAttrVOS = codeClassifyTemplateAttrVOList.stream().filter(s -> |
| | | !DEFAULT_ATTR_LIST.contains(s.getId()) |
| | | && StringUtils.isBlank(s.getComponentRule()) |
| | | && StringUtils.isBlank(s.getClassifyInvokeAttr()) |
| | | && (isHistory || VciBaseUtil.getBoolean(s.getFormDisplayFlag())) |
| | | ).collect(Collectors.toList()); |
| | | |
| | | if(CollectionUtils.isEmpty(templateAttrVOS)){ |
| | | throw new VciBaseException("模板没有配置任何【表单显示】为【是】的属性"); |
| | | } |
| | | if (CollectionUtils.isEmpty(templateAttrVOS)) { |
| | | throw new VciBaseException("模板没有配置任何【表单显示】为【是】的属性"); |
| | | } |
| | | |
| | | List<CodeClassifyTemplateAttrVO> idAttrVOList = codeClassifyTemplateVO.getAttributes().stream().filter(s -> s.getId().equalsIgnoreCase(CODE_FIELD)).collect(Collectors.toList()); |
| | | LinkedList<WriteExcelData> excelDataList = new LinkedList<>(); |
| | | Workbook workbook = new HSSFWorkbook(); |
| | |
| | | public List<CodeImportTemplateVO> gridclassifys(String redisOid) { |
| | | List<CodeImportTemplateVO> codeImportTemplateVOs=new ArrayList<>(); |
| | | VciBaseUtil.alertNotNull(redisOid,"分类",redisOid,"分类缓存主键"); |
| | | |
| | | List<CodeImportTemplateVO> redisServiceCacheObjects=bladeRedis.lRange(redisOid,0,-1); |
| | | List<CodeImportTemplateVO> redisServiceCacheObjects=bladeRedis.get(redisOid); |
| | | if(redisServiceCacheObjects!=null){ |
| | | codeImportTemplateVOs= redisServiceCacheObjects; |
| | | } |
| | |
| | | @Override |
| | | public DataGrid<Map<String, String>> gridDatas(String codeClssifyOid, String redisOid) { |
| | | VciBaseUtil.alertNotNull(redisOid,"导入相似数据",redisOid,"数据缓存主键"); |
| | | List<CodeImprotDataVO> codeImprotDataVOs = bladeRedis.lRange(redisOid+"-"+codeClssifyOid,0,-1); |
| | | List<CodeImprotDataVO> codeImprotDataVOs = bladeRedis.get(redisOid+"-"+codeClssifyOid); |
| | | // redisService.getCacheList(redisOid+"-"+codeClssifyOid); |
| | | CodeImprotDataVO codeImprotDataVO=new CodeImprotDataVO(); |
| | | if(!CollectionUtils.isEmpty(codeImprotDataVOs)){ |
| | |
| | | @Override |
| | | public DataGrid<Map<String,String>> gridRowResemble(String oid,String redisOid){ |
| | | VciBaseUtil.alertNotNull(redisOid,"导入相似数据",redisOid,"数据缓存主键"); |
| | | List<DataResembleVO> codeImprotDataVOs = bladeRedis.lRange(redisOid,0,-1);; |
| | | List<DataResembleVO> codeImprotDataVOs = bladeRedis.get(redisOid);; |
| | | DataGrid<Map<String, String>> dataGrid = new DataGrid<>(); |
| | | List<Map<String, String>> dataList = new ArrayList<>(); |
| | | |