| | |
| | | // && StringUtils.isNotBlank(cbo.getAttributeValue(CODE_SEC_LENGTH_FIELD)) |
| | | ){ |
| | | //是历史数据导入 |
| | | //历史数据执行的时候,这个系统会很卡 |
| | | //主要是为了录入最大流水号和allcode |
| | | //SessionInfo sessionInfo = VciBaseUtil.getCurrentUserSessionInfo(); |
| | | List<CodeAllCode> allCodeDOList = new CopyOnWriteArrayList<>(); |
| | | Map<String/**流水依据**/, ConcurrentHashMap<String/**码段的主键**/,String/**最大流水号**/>> maxSerialMap = new ConcurrentHashMap<>(); |
| | | Map<String/**流水依据**/, HashMap<String/**码段的主键**/,String/**最大流水号**/>> maxSerialMap = new HashMap<>(); |
| | | // TODO 多线程流引发的问题已修改 |
| | | dataCBOList.parallelStream().forEach(cbo->{ |
| | | log.info("code:----->"+cbo.getId()); |
| | |
| | | OsCodeFillTypeEnum.LEFT.getValue().equalsIgnoreCase(secVO.getCodeFillType())); |
| | | } |
| | | Double newSerialDb= CustomSerialEnum.getDoubleCustomSerialValue(secValue,secVO.getCustomCodeSerialType()); |
| | | ConcurrentHashMap<String, String> thisUnitMaxMap = maxSerialMap.getOrDefault(serialUnitString, new ConcurrentHashMap<>()); |
| | | HashMap<String, String> thisUnitMaxMap = maxSerialMap.getOrDefault(serialUnitString, new HashMap<>()); |
| | | Double maxValue=newSerialDb; |
| | | if(thisUnitMaxMap.containsKey(secOid)){ |
| | | String newMaxValue= thisUnitMaxMap.getOrDefault(secOid,""); |
| | |
| | | allCodeDOList.stream().filter(s -> StringUtils.equalsIgnoreCase("codeallcode",s.getBtmname())).forEach(s -> { |
| | | s.setLcStatus(statusMap.get(s.getOid())); |
| | | }); |
| | | |
| | | |
| | | //通过ID来进行去重 |
| | | List<CodeAllCode> distinctCodeAllCOdes = allCodeDOList.stream().collect(Collectors |
| | |
| | | |
| | | /** |
| | | * 拼接前后缀 |
| | | * @param secVO |
| | | * @param secValue |
| | | * @param secVO 码段 |
| | | * @param secValue 码值 |
| | | * @return |
| | | */ |
| | | private String joinPreffixAndSuffix(CodeBasicSecVO secVO, String secValue){ |
| | | StringBuilder joinSecValue = new StringBuilder(); |
| | | // 拼接前缀 |
| | | if (Func.isNotEmpty(secVO.getPrefixCode())) { |
| | | if (Func.isNotEmpty(secVO.getPrefixCode()) && Func.isNotEmpty(secValue)) { |
| | | joinSecValue = joinSecValue.append(secVO.getPrefixCode()); |
| | | } |
| | | // 在中间拼接值 |
| | | joinSecValue.append(secValue); |
| | | // 拼接后缀 |
| | | if(Func.isNotEmpty(secVO.getSuffixCode())){ |
| | | if(Func.isNotEmpty(secVO.getSuffixCode()) && Func.isNotEmpty(secValue)){ |
| | | joinSecValue = joinSecValue.append(secVO.getSuffixCode()); |
| | | } |
| | | return joinSecValue.toString(); |