| | |
| | | import com.vci.ubcs.system.vo.RoleVO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.xml.ws.WebServiceContext; |
| | | import javax.xml.ws.handler.MessageContext; |
| | | import java.io.PrintWriter; |
| | | import java.io.StringWriter; |
| | | import java.util.*; |
| | | import java.util.concurrent.CopyOnWriteArrayList; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | |
| | | log.info("end:模板查询完毕"); |
| | | ApplyDatasVO applyDatasVO = classVO.getObjects(); |
| | | DataObjectVO dataObjectVO = new DataObjectVO(); |
| | | List<CodeClassifyTemplateAttrVO> attrVOS = templateVO.getAttributes().stream().filter(s -> !DEFAULT_SYNC_ATTR_LIST.contains(s.getId()) && VciBaseUtil.getBoolean(s.getFormDisplayFlag()) |
| | | 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()); |
| | | this.getConfigDatas(finalSystemId, libray, applyDatasVO, attrVOS, dataObjectVO); |
| | | log.info("end:数据组织完毕"); |
| | |
| | | resultStr= transferResultXMl(xmlResultSystemVO,dataType); |
| | | }catch (Throwable e){ |
| | | e.printStackTrace(); |
| | | StringWriter sw = new StringWriter(); |
| | | PrintWriter pw = new PrintWriter(sw); |
| | | e.printStackTrace(pw);//将出错的栈信息输出到printWriter中 |
| | | pw.flush(); |
| | | sw.flush(); |
| | | msg="申请编码失败:"+e.getMessage(); |
| | | /* XMLResultSystemVO XMLResultSystemVO=new XMLResultSystemVO(); |
| | | XMLResultSystemVO.setErrorid(errorid); |
| | |
| | | throw new Throwable ("根据传输的分类,未获取MDM系统中对应模板"); |
| | | } |
| | | |
| | | List<CodeClassifyTemplateAttrVO> attrVOS = templateVO.getAttributes().stream().filter(s -> !DEFAULT_SYNC_ATTR_LIST.contains(s.getId()) && VciBaseUtil.getBoolean(s.getFormDisplayFlag()) |
| | | 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<PersonMasterData> personMasterDataList= personData.getMasterData(); |
| | |
| | | sb.append(VciBaseUtil.toInSql(codeList.toArray(new String[0]))); |
| | | sb.append(")"); |
| | | List<Map<String,String>> dataMapList=commonsMapper.queryByOnlySqlForMap(sb.toString()); |
| | | |
| | | List<ClientBusinessObject> cboList= ChangeMapTOClientBusinessObjects(dataMapList); |
| | | ApplyDatasVO applyDatasVO=new ApplyDatasVO(); |
| | | ApplyDatasVO editDatasVO=new ApplyDatasVO(); |
| | |
| | | throw new Throwable ("根据传输的分类,未获取MDM系统中对应模板"); |
| | | } |
| | | |
| | | List<CodeClassifyTemplateAttrVO> attrVOS = templateVO.getAttributes().stream().filter(s -> !DEFAULT_SYNC_ATTR_LIST.contains(s.getId()) && VciBaseUtil.getBoolean(s.getFormDisplayFlag()) |
| | | 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<>(); |
| | |
| | | ApplyDatasVO applyDatasVO = classVO.getObjects(); |
| | | DataObjectVO dataObjectVO = new DataObjectVO(); |
| | | //将默认的属性全部替换掉 |
| | | List<CodeClassifyTemplateAttrVO> attrVOS = templateVO.getAttributes().stream().filter(s -> !DEFAULT_SYNC_ATTR_LIST.contains(s.getId()) && VciBaseUtil.getBoolean(s.getFormDisplayFlag()) |
| | | 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()); |
| | | this.getConfigDatas(finalSystemId, libray, applyDatasVO, attrVOS, dataObjectVO); |
| | | log.info("end:数据构建完毕"); |
| | |
| | | log.info("end:模板查询完毕"); |
| | | ApplyBZDatasVO applyBZDatasVO = classfyBZVO.getObjects(); |
| | | DataObjectVO dataObjectVO = new DataObjectVO(); |
| | | List<CodeClassifyTemplateAttrVO> attrVOS = templateVO.getAttributes().stream().filter(s -> !DEFAULT_SYNC_ATTR_LIST.contains(s.getId()) && VciBaseUtil.getBoolean(s.getFormDisplayFlag()) |
| | | 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<ApplyBZDataVO> applyBZDataVOList= applyBZDatasVO.getObject(); |
| | | if(applyBZDataVOList.size()>1){ |
| | |
| | | |
| | | private List<ClientBusinessObject> ChangeMapTOClientBusinessObjects(List<Map<String,String>> oldDataMap){ |
| | | List<ClientBusinessObject> clientBusinessObjectList=new ArrayList<>(); |
| | | DefaultAttrAssimtUtil.mapToLowerCase(oldDataMap,true); |
| | | final BladeUser user = AuthUtil.getUser(); |
| | | oldDataMap.stream().forEach(dataMap->{ |
| | | ClientBusinessObject clientBusinessObject=new ClientBusinessObject(); |
| | | DefaultAttrAssimtUtil.copplyDefaultAttrAssimt(dataMap,clientBusinessObject,null); |
| | | DefaultAttrAssimtUtil.copplyDefaultAttrAssimt(dataMap,clientBusinessObject,false,user); |
| | | for (String key:dataMap.keySet()){ |
| | | Object value= dataMap.getOrDefault(key,""); |
| | | clientBusinessObject.setAttributeValue(key.toLowerCase(Locale.ROOT),value==null?"":value.toString()); |
| | |
| | | |
| | | |
| | | /*** |
| | | * 根据穿入的参数信息校验码段规则 |
| | | * 根据传入的参数信息校验码段规则 |
| | | */ |
| | | private List<CodeOrderSecDTO> getRuleCodeOrderSecDTOs(List<SectionVO> SectionVOList,CodeRuleVO ruleVO,CodeClassifyFullInfoBO classifyFullInfo) throws Throwable{ |
| | | List<CodeBasicSecVO> codeBasicSecVOS= ruleVO.getSecVOList(); |
| | |
| | | CodeOrderSecDTO.setSecValue(sectypeValue); |
| | | codeOrderSecDTOList.add(CodeOrderSecDTO); |
| | | } else { |
| | | message="传入的码段规则缺少" + name + "码段"; |
| | | message="传入的码段规则缺少" + name; |
| | | errorMap.put("error",errorMap.getOrDefault("error","")+";"+message); |
| | | } |
| | | } |
| | |
| | | //根据分类模板组织数据 |
| | | final int[] index = {0}; |
| | | try { |
| | | //除去默认的属性.还有只有具有分类注入的才过滤出来 |
| | | codeClassifyTemplateAttrVOList = codeClassifyTemplateAttrVOList.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()); |
| | | codeClassifyTemplateAttrVOList.stream().forEach(codeClassifyTemplateAttrVO -> { |
| | | String attrName = codeClassifyTemplateAttrVO.getName(); |
| | | String field = codeClassifyTemplateAttrVO.getId(); |