| | |
| | | log.info("申请集团码数据格式:->"+resultStr); |
| | | DockingResultVO resultDataObject = new DockingResultVO(); |
| | | resultDataObject = mdmApplyGroupCodeProvider.receiveAddApply(dockingGroupDataVO); |
| | | log.info("申请集团码返回结果:->"+JSONObject.toJSONString(resultDataObject)); |
| | | code = resultDataObject.getCode(); |
| | | msg = resultDataObject.getMsg(); |
| | | boolean res=false; |
| | | if ("1".equals(code)) { |
| | | if("1".equals(code)) { |
| | | //结果正确的情况 |
| | | List<DockingDataVO> dataObjectVOList = resultDataObject.getData(); |
| | | res=true; |
| | |
| | | DockingMainDataVO data2 = dataObject.getData(); |
| | | String applyId = data2.getApplyId();//申请单id |
| | | BaseModel baseModel = baseModelMap.get(applyId); |
| | | String customCoding = StringUtils.isBlank(data2.getCustomCoding()) ? "" : data2.getCustomCoding();//集团码段 |
| | | String customCoding = StringUtils.isBlank(data2.getCustomCoding()) ? "" : data2.getCustomCoding(); |
| | | msg = dataObject.getMsg(); |
| | | if (code2.equals("1")) {//结果正确的情况 |
| | | if (!"".equals(customCoding)) { |
| | |
| | | } catch (JsonProcessingException e) { |
| | | } |
| | | Date date = new Date(); |
| | | baseModel.setLastModifyTime(date); |
| | | baseModel.setTs(date); |
| | | baseModel.setLastModifier(Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount()); |
| | | dockingPreApplyForm.setLastModifyTime(date); |
| | | dockingPreApplyForm.setTs(date); |
| | | dockingPreApplyForm.setLastModifier(Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount()); |
| | | //DefaultAttrAssimtUtil.updateDefaultAttrAssimt(dockingPreApplyForm); |
| | | } |
| | | //新增的申请单数据 |
| | |
| | | Date date = new Date(); |
| | | dockingPreApplyForm.setCreateTime(date); |
| | | dockingPreApplyForm.setLastModifyTime(date); |
| | | dockingPreApplyForm.setTs(date); |
| | | dockingPreApplyForm.setBtmname(MdmBtmTypeConstant.DOCKING_PRE_JAPPLYFORM); |
| | | dockingPreApplyForm.setLastModifier(Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount()); |
| | | dockingPreApplyForm.setCreator(Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount()); |
| | | dockingPreApplyForm.setBtmname(MdmBtmTypeConstant.DOCKING_PRE_JAPPLYFORM); |
| | | dockingPreApplyForm.setTs(date); |
| | | // DefaultAttrAssimtUtil.addDefaultAttrAssimt(dockingPreApplyForm, MdmBtmTypeConstant.DOCKING_PRE_JAPPLYFORM); |
| | | } |
| | | //如果有集团码则更新数据 |
| | | if (isEditDatas) { |
| | | if (baseModelMap.containsKey(applyId)) { |
| | | baseModel = baseModelMap.get(applyId); |
| | | Map<String,String> dataValueMap=new CaseInsensitiveMap<>(baseModel.getData()); |
| | | //Map<String,String> dataValueMap=new CaseInsensitiveMap<>(baseModel.getData()); |
| | | /*String classOid=baseModel.getId(); |
| | | if(partCode.equals(classOid)){ |
| | | baseModel.setId(10+customCoding); |
| | |
| | | }); |
| | | } else { |
| | | res=false; |
| | | Date date = new Date(); |
| | | editDockingPreApplyFormMap.forEach((key, dockingPreApplyForm) -> { |
| | | dockingPreApplyForm.setCode("2"); |
| | | dockingPreApplyForm.setMsg("申请:" + msg); |
| | | dockingPreApplyForm.setContent(""); |
| | | dockingPreApplyForm.setGroupCode(""); |
| | | Date date = new Date(); |
| | | dockingPreApplyForm.setCreateTime(date); |
| | | dockingPreApplyForm.setLastModifyTime(date); |
| | | dockingPreApplyForm.setTs(date); |
| | | dockingPreApplyForm.setBtmname(MdmBtmTypeConstant.DOCKING_PRE_JAPPLYFORM); |
| | | dockingPreApplyForm.setLastModifier(Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount()); |
| | | dockingPreApplyForm.setCreator(Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount()); |
| | | dockingPreApplyForm.setTs(date); |
| | | //DefaultAttrAssimtUtil.updateDefaultAttrAssimt(dockingPreApplyForm); |
| | | }); |
| | | addDockingPreApplyFormMap.forEach((key, dockingPreApplyForm) -> { |
| | |
| | | dockingPreApplyForm.setMsg("申请:" + msg); |
| | | dockingPreApplyForm.setContent(""); |
| | | dockingPreApplyForm.setGroupCode(""); |
| | | Date date = new Date(); |
| | | dockingPreApplyForm.setCreateTime(date); |
| | | dockingPreApplyForm.setLastModifyTime(date); |
| | | dockingPreApplyForm.setTs(date); |
| | | dockingPreApplyForm.setBtmname(MdmBtmTypeConstant.DOCKING_PRE_JAPPLYFORM); |
| | | dockingPreApplyForm.setLastModifier(Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount()); |
| | | dockingPreApplyForm.setCreator(Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount()); |
| | | dockingPreApplyForm.setBtmname(MdmBtmTypeConstant.DOCKING_PRE_JAPPLYFORM); |
| | | dockingPreApplyForm.setTs(date); |
| | | //DefaultAttrAssimtUtil.addDefaultAttrAssimt(dockingPreApplyForm, MdmBtmTypeConstant.DOCKING_PRE_JAPPLYFORM); |
| | | }); |
| | | } |
| | |
| | | } |
| | | return R.success("申请接口调用成功"); |
| | | } catch (VciBaseException e) { |
| | | return R.fail("申请接口调用失败" + e); |
| | | return R.fail("申请接口调用失败" + e.getMessage()); |
| | | } |
| | | }else{ |
| | | return R.fail("申请接口开关已关闭,不申请集团码"); |
| | |
| | | Date date = new Date(); |
| | | dockingPreApplyForm.setCreateTime(date); |
| | | dockingPreApplyForm.setLastModifyTime(date); |
| | | dockingPreApplyForm.setTs(date); |
| | | dockingPreApplyForm.setBtmname(MdmBtmTypeConstant.DOCKING_PRE_JAPPLYFORM); |
| | | dockingPreApplyForm.setTs(date); |
| | | dockingPreApplyForm.setLastModifier(Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount()); |
| | | dockingPreApplyForm.setCreator(Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount()); |
| | | //DefaultAttrAssimtUtil.addDefaultAttrAssimt(dockingPreApplyForm, MdmBtmTypeConstant.DOCKING_PRE_JAPPLYFORM); |
| | |
| | | baseModel.setLastModifyTime(date); |
| | | baseModel.setTs(date); |
| | | baseModel.setLastModifier(Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount()); |
| | | DefaultAttrAssimtUtil.updateDefaultAttrAssimt(baseModel); |
| | | // baseModel.setId(customCoding); |
| | | //DefaultAttrAssimtUtil.updateDefaultAttrAssimt(baseModel); |
| | | //baseModel.setId(customCoding); |
| | | baseModel.getData().put("GROUPCODE", customCoding); |
| | | updateCbos.add(baseModel);//更新数据集团code |
| | | } |
| | |
| | | dockingPreClassify.setVersionValue(version); |
| | | dockingPreClassifyList.add(dockingPreClassify); |
| | | }); |
| | | boolean res= dockingPreClassifyService.saveOrUpdateBatch(dockingPreClassifyList); |
| | | boolean res = dockingPreClassifyService.saveOrUpdateBatch(dockingPreClassifyList); |
| | | if(res){ |
| | | R.success(message); |
| | | }else{ |
| | |
| | | VciBaseUtil.alertNotNull(operationType,"集成操作类型"); |
| | | try { |
| | | if(operationType.equals("all")){ |
| | | return queryMdmModel(); |
| | | return queryMdmModel(); |
| | | }else{ |
| | | VciBaseUtil.alertNotNull(classifyId,"集团分类主键"); |
| | | return queryClassModel(classifyId); |
| | |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | private DockingGroupDataVO queryApplycodeDataObjects(int optationtype,List<BaseModel> codeWupins,Map<String,DockingPreApplyForm> addDockingPreApplyFormMap,Map<String,DockingPreApplyForm> editDockingPreApplyFormMap,Map<String,BaseModel> codeWupinMap) throws VciBaseException{ |
| | | private DockingGroupDataVO queryApplycodeDataObjects(int optationtype,List<BaseModel> codeWupins,Map<String,DockingPreApplyForm> addDockingPreApplyFormMap,Map<String,DockingPreApplyForm> editDockingPreApplyFormMap,Map<String,BaseModel> codeWupinMap) throws VciBaseException{ |
| | | try { |
| | | // TODO:主数据推送过来的数据是拿不到可以申请集团码的用户信息的,并且这一块儿的逻辑也还没敲定,所以这儿采用配置的用户来申请集团码 |
| | | String curUserName = Func.isBlank(AuthUtil.getUserAccount()) ? applyCodeUserAccount:AuthUtil.getUserAccount(); |
| | |
| | | addDockingPreApplyFormMap.put(applyCode, dockingPreApplyForm);//申请单和申请单对象关系 |
| | | // } |
| | | |
| | | codeWupinMap.put(applyCode, dataBusinessObject);//申请单和对应数据关系 |
| | | //申请单和对应数据关系 |
| | | codeWupinMap.put(applyCode, dataBusinessObject); |
| | | // conditionsMap = new HashMap<String, String>(); |
| | | // conditionsMap.put("jtargetclsfid", codeclsfid);//视图oid |
| | | |
| | |
| | | dockingPreApplyForm.setGroupCode(groucode); |
| | | mainData.setCustomCoding(groucode); |
| | | } |
| | | mainData.setSecretLevel("内部");//密级,默认为内部 |
| | | mainData.setViewInfos(getviewInfos(optationtype,dockingPreClassify, dataBusinessObject));//获取视图模型 |
| | | //密级,默认为内部 |
| | | mainData.setSecretLevel("内部"); |
| | | //获取视图模型 |
| | | mainData.setViewInfos(getviewInfos(optationtype,dockingPreClassify, dataBusinessObject)); |
| | | mainDataList.add(mainData); |
| | | } |
| | | //根据数据模型,组织所需要数据 |
| | | DockingGroupDataVO postParameters=new DockingGroupDataVO(); |
| | | postParameters.setSysName(dockingApplySysName);//系统标识 |
| | | DockingGroupDataVO postParameters = new DockingGroupDataVO(); |
| | | //系统标识 |
| | | postParameters.setSysName(dockingApplySysName); |
| | | postParameters.setMainData(mainDataList);// |
| | | return postParameters; |
| | | } catch (Throwable e) { |
| | |
| | | String jenglishname=dockingPreMetaAttr.getEnglishName();////集团配置属性 |
| | | if(jintegmappconfigMap.containsKey(jenglishname)){ |
| | | DockingPreAttrMapping dockingPreAttrMapping=jintegmappconfigMap.get(jenglishname); |
| | | String attrId = dockingPreAttrMapping.getTargetAttrId();//编码属性id |
| | | // String attrId = dockingPreAttrMapping.getTargetAttrId();//编码属性id |
| | | String jtargetattrkey = dockingPreAttrMapping.getTargetAttrKey();//编码属性id |
| | | Object newVaue=null; |
| | | if(StringUtils.isNotBlank(jtargetattrkey)){ |
| | |
| | | }else{ |
| | | newVaue = getVaue(dockingPreMetaAttr, ""); |
| | | } |
| | | if(newVaue==null||"".equals(newVaue)){ |
| | | if(newVaue==null || "".equals(newVaue)){ |
| | | newVaue= dockingPreMetaAttr.getDefaultValue(); |
| | | } |
| | | //newVaue= Func.isNotEmpty(newVaue)?newVaue:""; |