| | |
| | | String[] secLengths = cbo.getData().get(CODE_SEC_LENGTH_FIELD).split("#"); |
| | | cbo.getData().remove(CODE_SEC_LENGTH_FIELD);//将此key除去 |
| | | cbo.getData().remove(IMPORT_ROW_INDEX);//将此key除去 |
| | | cbo.getData().remove("codeclassifyid");//将此key除去 |
| | | List<CodeBasicSecVO> secVOList = ruleVO.getSecVOList().stream().sorted(((o1, o2) -> o1.getOrderNum().compareTo(o2.getOrderNum()))).collect(Collectors.toList()); |
| | | Map<String/**码段的主键**/,String/**码段的值**/> serialValueMap = new HashMap<>(); |
| | | Map<String, CodeBasicSecVO> secVOMap = secVOList.stream().collect(Collectors.toMap(s -> s.getOid(), t -> t)); |
| | |
| | | |
| | | for (int i = 0; i < dataCBOList.size(); i++) { |
| | | BaseModel cbo = dataCBOList.get(i); |
| | | cbo.getData().remove(CODE_SEC_LENGTH_FIELD);//将此key除去 |
| | | cbo.getData().remove(IMPORT_ROW_INDEX);//将此key除去 |
| | | cbo.getData().remove("codeclassifyid");//将此key除去 |
| | | List<String> thisSecValueList = new LinkedList<>(); |
| | | for (int j = 0; j < secValueList.size(); j++) { |
| | | thisSecValueList.add(secValueList.get(j)); |
| | |
| | | } |
| | | saveSerialValue( ruleVO, lastMaxSerialValueMap, maxSerialValueMap); |
| | | |
| | | allCodeDOList.stream().forEach( |
| | | allCode -> {DefaultAttrAssimtUtil.addDefaultAttrAssimt(allCode,"codeallcode");allCode.setLctid("codeAllCodeLC");} |
| | | ); |
| | | |
| | | |
| | | Map<String, String> statusMap = allCodeDOList.stream().collect(Collectors.toMap(s -> s.getOid(), s -> s.getLcStatus())); |
| | | allCodeDOList.stream().filter(s -> StringUtils.equalsIgnoreCase("codeallcode",s.getBtmname())).forEach(s -> { |
| | | s.setLcStatus(statusMap.get(s.getOid())); |
| | | }); |
| | | |
| | | |
| | | allCodeDOList.stream().forEach( |
| | | allCode -> {DefaultAttrAssimtUtil.addDefaultAttrAssimt(allCode,"codeallcode");allCode.setLctid("codeAllCodeLC");} |
| | | ); |
| | | |
| | | codeAllCodeService.saveBatch(allCodeDOList); |
| | | // iCodeWupinService.saveBatch(dataCBOList); |
| | |
| | | * @param rule 规则的内容 |
| | | * @return 转换后的 |
| | | */ |
| | | private String getValueByFormulaForCBO(BaseModel cbo,String rule){ |
| | | Map<String, Object> dataMap = BeanUtils.beanToMap(cbo); |
| | | private String getValueByFormulaForCBO(BaseModel cbo,String rule) { |
| | | Map<String, Object> dataMap = null; |
| | | try{ |
| | | dataMap = VciBaseUtil.convertBean2Map(cbo); |
| | | }catch(Exception e){ |
| | | throw new VciBaseException("mapToBeanError:"+e); |
| | | } |
| | | Map<String, String> map = new HashMap<String, String>(); |
| | | for (String i : dataMap.keySet()) { |
| | | map.put(i, String.valueOf(dataMap.get(i))); |