| | |
| | | import java.io.StringWriter; |
| | | import java.util.*; |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | import java.util.concurrent.ForkJoinPool; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | |
| | | */ |
| | | @Value("${bzApply.seriesFlow:seriesFlow}") |
| | | private String seriesFlow; |
| | | |
| | | /*** |
| | | * 是否变更系列 |
| | | */ |
| | | @Value("${bzApply.isEditSeries:isEditSeries}") |
| | | private String isEditSeries; |
| | | |
| | | /*** |
| | | * 控制是否写入值的码段名称 |
| | | */ |
| | |
| | | */ |
| | | @Value("${bzApply.yearSecName:年代号}") |
| | | private String yearSecName; |
| | | |
| | | |
| | | @Value("${code.universalinterface.checkSystemConfig:true}") |
| | | public boolean CODE_CHECKCONFIG; |
| | |
| | | */ |
| | | @Resource |
| | | private IDockingLogeService dockingLogeService; |
| | | |
| | | @Resource |
| | | private IPasswordFreeLoginService passwordFreeLoginService; |
| | | |
| | | /** |
| | | * 自定义并发ForkJoinPool |
| | | */ |
| | | private static final ForkJoinPool customForkJoinPool = new ForkJoinPool(Runtime.getRuntime().availableProcessors() - 1); |
| | | |
| | | private static String separator="##VCI##"; |
| | | private String errorid="0"; |
| | |
| | | throw new Throwable("用户鉴权失败."); |
| | | } |
| | | List<ClassfyVO> classVOList = classfysVO.getClassify(); |
| | | InterParameterVO finalInterParameterVO = interParameterVO; |
| | | //InterParameterVO finalInterParameterVO = interParameterVO; |
| | | //这是账号信息 |
| | | SessionInfo sessionInfo = new SessionInfo(); |
| | | sessionInfo.setUserId(userVo.getUserName()); |
| | |
| | | */ |
| | | @Override |
| | | public ResultOrgData syncDataForPerson(PersonData personData) { |
| | | |
| | | boolean isUsedFlag= personAndDeptConfig.isUsedFlag(); |
| | | ResultOrgData resultOrgData=new ResultOrgData(); |
| | | |
| | |
| | | throw new Throwable("编码规则"); |
| | | } |
| | | List<XMLResultDataObjectDetailDO> xDOs=new CopyOnWriteArrayList<>(); |
| | | dataObjectVO.getRowData().parallelStream().forEach(rowData->{ |
| | | final List<RowDatas> rowDatas = dataObjectVO.getRowData(); |
| | | rowDatas.parallelStream().forEach(rowData->{ |
| | | String mesg=""; |
| | | try { |
| | | CodeOrderDTO orderDTO = new CodeOrderDTO(); |
| | |
| | | resultDataObjectDetailDOs.addAll(xDOs); |
| | | boolean finalSuccess1 = success.get(); |
| | | String finalMessage1 = message; |
| | | // 限制线程并行数量 |
| | | customForkJoinPool.submit(()->{ |
| | | resultDataObjectDetailDOs.stream().forEach(resultDataObjectDetailDO->{ |
| | | ResultMdMapping resultMdMapping=new ResultMdMapping(); |
| | | resultMdMapping.setBusiDataId(resultDataObjectDetailDO.getId()); |
| | |
| | | resultMdMapping.setSubMdMappings(null); |
| | | resultMdMappingList.add(resultMdMapping); |
| | | }); |
| | | }).join(); |
| | | log.info("end:申请获取完毕"); |
| | | } |
| | | }catch (Throwable e){ |
| | |
| | | public ResultOrgData syncDataForOrg(OrgData orgData) { |
| | | boolean isUsedFlag= personAndDeptConfig.isUsedFlag(); |
| | | ResultOrgData resultOrgData=new ResultOrgData(); |
| | | boolean isPersonApplyGroupCode= personAndDeptConfig.isDeptApplyGroupCode(); |
| | | //boolean isPersonApplyGroupCode= personAndDeptConfig.isDeptApplyGroupCode(); |
| | | List<ResultMdMapping> resultMdMappingList=new ArrayList<>(); |
| | | AtomicBoolean success= new AtomicBoolean(true); |
| | | String message=""; |
| | |
| | | List<CodeClassifyTemplateAttrVO> attrVOS = templateVO.getAttributes().stream().filter(s -> !DEFAULT_SYNC_ATTR_LIST.contains(s.getId()) && |
| | | ((Func.isNotEmpty(s.getClassifyInvokeAttr()) || Func.isNotEmpty(s.getClassifyInvokeAttrName())) || VciBaseUtil.getBoolean(s.getFormDisplayFlag())) |
| | | ).collect(Collectors.toList()); |
| | | List<Map> dataList=new ArrayList<>(); |
| | | List<String> codeList=new ArrayList<>(); |
| | | List<ApplyDataVO> applyDataVOList=new ArrayList<>(); |
| | | List<ApplyDataVO> deleteDataVOList=new ArrayList<>(); |
| | |
| | | throw new Throwable("编码规则"); |
| | | } |
| | | List<XMLResultDataObjectDetailDO> xDOs=new CopyOnWriteArrayList<>(); |
| | | //限制线程并行数量 |
| | | customForkJoinPool.submit(()->{ |
| | | dataObjectVO.getRowData().parallelStream().forEach(rowData->{ |
| | | String mesg=""; |
| | | try { |
| | |
| | | orderDTO.setLcStatus(rowData.getStatus()); |
| | | if(!CollectionUtils.isEmpty(ruleVO.getSecVOList())) { |
| | | ruleVO.getSecVOList().stream().forEach(codeBasicSecVO -> { |
| | | if (codeBasicSecVO.getSecType().equals("codevariablesec")) {//规则之定义为可变码段存储主数据传递过来的数据 |
| | | if (codeBasicSecVO.getSecType().equals("codevariablesec")) { |
| | | //规则之定义为可变码段存储主数据传递过来的数据 |
| | | CodeOrderSecDTO CodeOrderSecDTO = new CodeOrderSecDTO(); |
| | | CodeOrderSecDTO.setSecOid(codeBasicSecVO.getOid()); |
| | | CodeOrderSecDTO.setSecValue(rowData.getCode()); |
| | | CodeOrderSecDTO.setSecValue(rowData.getOid()); |
| | | codeOrderSecDTOList.add(CodeOrderSecDTO); |
| | | |
| | | } |
| | | }); |
| | | } |
| | |
| | | orderDTO.setSecDTOList(codeOrderSecDTOList);//存储编码 |
| | | orderDTO.setData(rowData.getFiledValue()); |
| | | String code=engineService.addSaveCodeNotauthUser(orderDTO,false); |
| | | if(StringUtils.isNotBlank(code)) { |
| | | /*if(StringUtils.isNotBlank(code)) { |
| | | //rowData.setCode(code); |
| | | StringBuffer sqlsb = new StringBuffer(); |
| | | sqlsb.append(" select * from "); |
| | |
| | | mesg = "数据保存成功,等待申请集团码"; |
| | | } |
| | | } |
| | | } |
| | | }*/ |
| | | } catch (Exception e) { |
| | | mesg=e.getMessage(); |
| | | e.printStackTrace(); |
| | |
| | | xDOs.add(x); |
| | | } |
| | | }); |
| | | }).join(); |
| | | resultDataObjectDetailDOs.addAll(xDOs); |
| | | boolean finalSuccess1 = success.get(); |
| | | String finalMessage1 = message; |
| | |
| | | throw new Throwable("用户鉴权失败"); |
| | | } |
| | | List<ClassfyVO> classVOList = classfysVO.getClassify(); |
| | | InterParameterVO finalInterParameterVO = interParameterVO; |
| | | //InterParameterVO finalInterParameterVO = interParameterVO; |
| | | //这是账号信息 |
| | | SessionInfo sessionInfo = new SessionInfo(); |
| | | sessionInfo.setUserId(userVo.getUserName()); |