| | |
| | | object.setOperate("create"); |
| | | applyDataVOList.add(object); |
| | | } |
| | | codeList.add(personMasterData.getLm_code()); |
| | | codeList.add(object.getCode()); |
| | | }); |
| | | |
| | | R<BtmTypeVO> r = btmTypeClient.getAllAttributeByBtmId(templateVO.getBtmTypeId()); |
| | |
| | | DataObjectVO dataObjectVO = new DataObjectVO(); |
| | | this.getConfigDatas(systemCode, personLibrary, editDatasVO, attrVOS, dataObjectVO); |
| | | log.info("start:修改数据执行完毕"); |
| | | boolean personApplyGroupCode =personAndDeptConfig.isPersonApplyGroupCode(); |
| | | mdmIOService.batchSyncEditDatas(codeClassifyVO,dataObjectVO, resultDataObjectDetailDOs,personApplyGroupCode); |
| | | // boolean personApplyGroupCode =personAndDeptConfig.isPersonApplyGroupCode(); |
| | | mdmIOService.batchSyncEditDatas(codeClassifyVO,dataObjectVO, resultDataObjectDetailDOs,isPersonApplyGroupCode); |
| | | log.info("end:修改数据执行完毕"); |
| | | } |
| | | if(applyDatasVO.getObject()!=null&&applyDatasVO.getObject().size()>0) { |
| | |
| | | log.error("数据保存失败:",e); |
| | | mesg=e.getMessage(); |
| | | e.printStackTrace(); |
| | | throw new ServiceException(e.getMessage()); |
| | | // throw new ServiceException(e.getMessage()); |
| | | }finally { |
| | | XMLResultDataObjectDetailDO x=new XMLResultDataObjectDetailDO(); |
| | | x.setId(rowData.getOid()); |
| | |
| | | List<ApplyDataVO> deleteDataVOList=new ArrayList<>(); |
| | | orgMasterDataList.stream().forEach(orgMasterData -> { |
| | | ApplyDataVO object=new ApplyDataVO(); |
| | | object.setCode(orgMasterData.getMdm_code());//编码 |
| | | object.setCode(orgMasterData.getDepartment_code());//编码 |
| | | object.setCreator(orgMasterData.getCreator());//创建者 |
| | | object.setEditor(orgMasterData.getModifier());//修改者 |
| | | object.setId(orgMasterData.getDepartment_code());//主键 |
| | | object.setId(orgMasterData.getId());//主键 |
| | | object.setStatus(CodeDefaultLC.RELEASED.getValue());//状态则需要判断 |
| | | Map<String,String> dataMap= VciBaseUtil.objectToMapString(orgMasterData); |
| | | List<ProppertyVO> proppertyVOList = new ArrayList<>(); |
| | |
| | | object.setOperate("create"); |
| | | applyDataVOList.add(object); |
| | | } |
| | | codeList.add(orgMasterData.getMdm_code()); |
| | | codeList.add(object.getCode()); |
| | | }); |
| | | |
| | | R<BtmTypeVO> r = btmTypeClient.getAllAttributeByBtmId(templateVO.getBtmTypeId()); |
| | |
| | | DataObjectVO dataObjectVO = new DataObjectVO(); |
| | | this.getConfigDatas(systemCode, deptLibrary, editDatasVO, attrVOS, dataObjectVO); |
| | | log.info("start:修改数据执行完毕"); |
| | | boolean personApplyGroupCode = personAndDeptConfig.isPersonApplyGroupCode(); |
| | | boolean personApplyGroupCode = false;//personAndDeptConfig.isPersonApplyGroupCode(); |
| | | mdmIOService.batchSyncEditDatas(codeClassifyVO,dataObjectVO, resultDataObjectDetailDOs,personApplyGroupCode); |
| | | log.info("end:修改数据执行完毕"); |
| | | } |
| | |
| | | } |
| | | List<XMLResultDataObjectDetailDO> xDOs=new CopyOnWriteArrayList<>(); |
| | | //限制线程并行数量 |
| | | customForkJoinPool.submit(()->{ |
| | | dataObjectVO.getRowData().parallelStream().forEach(rowData->{ |
| | | //customForkJoinPool.submit(()->{ |
| | | // dataObjectVO.getRowData().parallelStream().forEach(rowData->{ |
| | | dataObjectVO.getRowData().forEach(rowData->{ |
| | | String mesg=""; |
| | | try { |
| | | CodeOrderDTO orderDTO = new CodeOrderDTO(); |
| | |
| | | //规则之定义为可变码段存储主数据传递过来的数据 |
| | | CodeOrderSecDTO CodeOrderSecDTO = new CodeOrderSecDTO(); |
| | | CodeOrderSecDTO.setSecOid(codeBasicSecVO.getOid()); |
| | | CodeOrderSecDTO.setSecValue(rowData.getOid()); |
| | | CodeOrderSecDTO.setSecValue(rowData.getCode()); |
| | | codeOrderSecDTOList.add(CodeOrderSecDTO); |
| | | } |
| | | }); |
| | |
| | | orderDTO.setSecDTOList(codeOrderSecDTOList);//存储编码 |
| | | orderDTO.setData(rowData.getFiledValue()); |
| | | String code = engineService.addSaveCodeNotauthUser(orderDTO,false); |
| | | /*if(StringUtils.isNotBlank(code)) { |
| | | //rowData.setCode(code); |
| | | StringBuffer sqlsb = new StringBuffer(); |
| | | sqlsb.append(" select * from "); |
| | | sqlsb.append(tableName); |
| | | sqlsb.append(" where 1=1 "); |
| | | sqlsb.append(" and lastr=1 and lastv=1"); |
| | | sqlsb.append(" and id in ("); |
| | | sqlsb.append(VciBaseUtil.toInSql(code)); |
| | | sqlsb.append(")"); |
| | | List<Map<String, String>> newDataMapList = commonsMapper.queryByOnlySqlForMap(sqlsb.toString()); |
| | | if (!CollectionUtils.isEmpty(newDataMapList)) { |
| | | String oid = StringUtils.isBlank(newDataMapList.get(0).get("OID")) ? "" : newDataMapList.get(0).get("OID"); |
| | | List<String> oidList = new ArrayList<>(); |
| | | oidList.add(oid); |
| | | //如果有申请就去调用申请集团码 |
| | | if (isPersonApplyGroupCode) { |
| | | mdmIOService.sendApplyGroupcode(oidList, templateVO.getBtmTypeId(), sysIntegrationPushTypeEnum.ACCPET_APPCODE.getValue()); |
| | | success.set(true); |
| | | mesg = "数据保存成功,等待申请集团码"; |
| | | /*if(StringUtils.isNotBlank(code)) { |
| | | //rowData.setCode(code); |
| | | StringBuffer sqlsb = new StringBuffer(); |
| | | sqlsb.append(" select * from "); |
| | | sqlsb.append(tableName); |
| | | sqlsb.append(" where 1=1 "); |
| | | sqlsb.append(" and lastr=1 and lastv=1"); |
| | | sqlsb.append(" and id in ("); |
| | | sqlsb.append(VciBaseUtil.toInSql(code)); |
| | | sqlsb.append(")"); |
| | | List<Map<String, String>> newDataMapList = commonsMapper.queryByOnlySqlForMap(sqlsb.toString()); |
| | | if (!CollectionUtils.isEmpty(newDataMapList)) { |
| | | String oid = StringUtils.isBlank(newDataMapList.get(0).get("OID")) ? "" : newDataMapList.get(0).get("OID"); |
| | | List<String> oidList = new ArrayList<>(); |
| | | oidList.add(oid); |
| | | //如果有申请就去调用申请集团码 |
| | | if (isPersonApplyGroupCode) { |
| | | mdmIOService.sendApplyGroupcode(oidList, templateVO.getBtmTypeId(), sysIntegrationPushTypeEnum.ACCPET_APPCODE.getValue()); |
| | | success.set(true); |
| | | mesg = "数据保存成功,等待申请集团码"; |
| | | } |
| | | } |
| | | } |
| | | }*/ |
| | | }*/ |
| | | } catch (Exception e) { |
| | | log.error( "部门数据接收失败:",e); |
| | | mesg=e.getMessage(); |
| | | e.printStackTrace(); |
| | | throw new ServiceException(e.getMessage()); |
| | | // throw new ServiceException(e.getMessage()); |
| | | }finally { |
| | | XMLResultDataObjectDetailDO x=new XMLResultDataObjectDetailDO(); |
| | | x.setId(rowData.getOid()); |
| | |
| | | xDOs.add(x); |
| | | } |
| | | }); |
| | | }).join(); |
| | | //}).join(); |
| | | resultDataObjectDetailDOs.addAll(xDOs); |
| | | boolean finalSuccess1 = success.get(); |
| | | String finalMessage1 = message; |
| | |
| | | String buildSqlwhere=""; |
| | | List<CodeSectionValueVO> codeSectionValueVOList=new ArrayList<>(); |
| | | if(coderefersecSearchVO!=null) { |
| | | Map<String, Object> condtionMap = new HashMap<>(); |
| | | String valueField= coderefersecSearchVO.getValueField(); |
| | | if(StringUtils.isNotBlank(valueField)){ |
| | | condtionMap.put(valueField,sectypeValue); |
| | | } |
| | | if (coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.DEFAULT.getValue()) || coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.GRID.getValue())) {//默认样式/列表 |
| | | Map<String, Object> condtionMap = new HashMap<>(); |
| | | List<CodeSrchCondConfigVO> codeSrchCondConfigVOList = coderefersecSearchVO.getCodeSrchCondConfigVOS(); |
| | | |
| | | if (!CollectionUtils.isEmpty(codeSrchCondConfigVOList)) { |
| | | codeSrchCondConfigVOList.stream().forEach(codeSrchCondConfigVO -> { |
| | | condtionMap.put(codeSrchCondConfigVO.getFilterField() + codeSrchCondConfigVO.getFilterType(), codeSrchCondConfigVO.getFilterValue()); |
| | | }); |
| | | } |
| | | if(!CollectionUtils.isEmpty(condtionMap)) { |
| | | buildSqlwhere = UBCSSqlKeyword.buildSqlwhere(condtionMap); |
| | | } |
| | | |
| | | //使用传入的业务类型查询表 |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referBtmId)); |
| | | if (!listR.isSuccess() || listR.getData().size() == 0) { |
| | |
| | | sb.append(buildSqlwhere); |
| | | } |
| | | List<Map> ListMap = commonsMapper.selectBySql(sb.toString()); |
| | | String valueField = coderefersecSearchVO.getValueField(); |
| | | //String valueField = coderefersecSearchVO.getValueField(); |
| | | String textField = coderefersecSearchVO.getTextField(); |
| | | final int[] num = {0}; |
| | | if (!CollectionUtils.isEmpty(ListMap)) { |
| | |
| | | }); |
| | | } |
| | | }else if (coderefersecSearchVO.getType().equals(CodeReferConfigTypeEnum.TREE.getValue())) {//树形 |
| | | Map<String, Object> condtionMap = new HashMap<>(); |
| | | |
| | | //使用传入的业务类型查询表 |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(referBtmId)); |
| | | if (!listR.isSuccess() || listR.getData().size() == 0) { |
| | |
| | | codeSrchCondConfigVOList.stream().forEach(codeSrchCondConfigVO -> { |
| | | condtionMap.put(codeSrchCondConfigVO.getFilterField() + codeSrchCondConfigVO.getFilterType(), codeSrchCondConfigVO.getFilterValue()); |
| | | }); |
| | | } |
| | | if(!CollectionUtils.isEmpty(condtionMap)) { |
| | | buildSqlwhere = UBCSSqlKeyword.buildSqlwhere(condtionMap); |
| | | } |
| | | |
| | | //if("all".equals(coderefersecSearchVO.getLoadType())) { |
| | | String parentOidSql = ""; |
| | | if(StringUtils.isNotBlank(parentValue)){ |
| | |
| | | sb.append(buildSqlwhere); |
| | | } |
| | | List<Map> ListMap = commonsMapper.selectBySql(sb.toString()); |
| | | String valueField = coderefersecSearchVO.getValueField(); |
| | | String textField = coderefersecSearchVO.getTextField(); |
| | | final int[] num = {0}; |
| | | if (!CollectionUtils.isEmpty(ListMap)) { |
| | |
| | | if(!CollectionUtils.isEmpty(codeSectionValueVOList)){ |
| | | Map<String, CodeSectionValueVO> codeSectionValueVOMap = codeSectionValueVOList.stream().collect(Collectors.toMap(s -> s.getValue(), t -> t, (o1, o2) -> o2)); |
| | | if(!codeSectionValueVOMap.containsKey(sectypeValue)){ |
| | | message="传入的编码规则码段:【"+name+"】为"+CODE_REFER_SEC.getText()+",其对应的值,在编码系统不存在"; |
| | | message="传入的编码规则码段:【"+name+"】为"+CODE_REFER_SEC.getText()+",其对应的值【"+sectypeValue+"】,在编码系统不存在"; |
| | | errorMap.put("error",errorMap.getOrDefault("error","")+";"+message); |
| | | } |
| | | }else{ |
| | | message="传入的编码规则码段:【"+name+"】为"+CODE_REFER_SEC.getText()+",其对应的值,在编码系统不存在"; |
| | | message="传入的编码规则码段:【"+name+"】为"+CODE_REFER_SEC.getText()+",其对应的值【"+sectypeValue+"】,在编码系统不存在"; |
| | | errorMap.put("error",errorMap.getOrDefault("error","")+";"+message); |
| | | } |
| | | } |
| | |
| | | String dataValue = sourceKeyValueMap.get(sourceKey); |
| | | if (attrMapConfigMap.containsKey(sourceKey)) { |
| | | String targetKey = attrMapConfigMap.get(sourceKey); |
| | | log.info("xxxxx属性映射值:sourceKey【"+sourceKey+"】——》+targetKey---》"+targetKey+":"+dataValue); |
| | | keyValueMap.put(targetKey, StringUtils.isBlank(dataValue)?"":dataValue); |
| | | } |
| | | }); |
| | |
| | | String dataValue = sourceKeyValueMap.get(sourceKey); |
| | | if (attrMapConfigMap.containsKey(sourceKey)) { |
| | | String targetKey = attrMapConfigMap.get(sourceKey); |
| | | log.info("xxxxx属性映射值:sourceKey【"+sourceKey+"】——》+targetKey---》"+targetKey+":"+dataValue); |
| | | keyValueMap.put(targetKey, StringUtils.isBlank(dataValue)?"":dataValue); |
| | | } |
| | | }); |