| | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.atm.AttributeDef; |
| | | import com.vci.dto.OsAttributeDTO; |
| | | import com.vci.dto.OsEnumDTO; |
| | | import com.vci.dto.OsEnumItemDTO; |
| | | import com.vci.omd.dataType.VTDataType; |
| | | import com.vci.pagemodel.OsEnumItemVO; |
| | | import com.vci.pagemodel.OsEnumVO; |
| | | import com.vci.pagemodel.OsUsedAttributeVO; |
| | | import com.vci.po.OsAttributePO; |
| | | import com.vci.po.OsEnumPO; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | | import com.vci.starter.poi.bo.WriteExcelOption; |
| | | import com.vci.starter.poi.constant.ExcelLangCodeConstant; |
| | | import com.vci.starter.poi.util.ExcelUtil; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.model.OsAttributeDO; |
| | |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.hssf.util.HSSFColor; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.swing.*; |
| | | import java.awt.*; |
| | |
| | | @Autowired(required = false) |
| | | @Lazy |
| | | private OsBtmServiceImpl osBtmService; |
| | | |
| | | /** |
| | | * å¿
å¡«å |
| | | */ |
| | | private List<Integer> ColumnNameisRed = new ArrayList<Integer>(); |
| | | |
| | | /** |
| | | * é»è®¤ç屿§ |
| | |
| | | VciBaseUtil.alertNotNull(attrNames,"屿§å"); |
| | | List<OsAttributeVO> osAttributeVOS = new ArrayList<>(); |
| | | for (int i = 0; i < attrNames.length; i++) { |
| | | AttributeDef[] attributeDefs = platformClientUtil.getAttributeService().getAttributeDefs(attrNames[i],1,1); |
| | | AttributeDef[] attributeDefs = platformClientUtil.getAttributeService().getAttributeDefs(attrNames[i].toLowerCase(Locale.ROOT),1,1); |
| | | if(Func.isNotEmpty(attributeDefs)){ |
| | | Arrays.stream(attributeDefs).forEach(attributeDef -> { |
| | | osAttributeVOS.add(attributeDO2VO(attributeDef)); |
| | |
| | | attributeVO.setId(attribItem.name); |
| | | attributeVO.setCreator(attribItem.creator); |
| | | try { |
| | | attributeVO.setCreateTime(VciDateUtil.str2Date(String.valueOf(attribItem.createTime),VciDateUtil.DateTimeFormat)); |
| | | attributeVO.setLastModifyTime(VciDateUtil.str2Date(String.valueOf(attribItem.modifyTime),VciDateUtil.DateTimeFormat)); |
| | | attributeVO.setCreateTime(new Date(attribItem.createTime)); |
| | | attributeVO.setLastModifyTime(new Date(attribItem.modifyTime)); |
| | | attributeVO.setTs(VciDateUtil.str2Date(attribItem.ts,VciDateUtil.DateTimeMillFormat)); |
| | | }catch (Throwable e){ |
| | | |
| | |
| | | attributeVO.setAttributeDataType(attribItem.vtDataType); |
| | | attributeVO.setAttributeDataTypeText(VciFieldTypeEnum.getTextByValue(attribItem.vtDataType)); |
| | | attributeVO.setDefaultValue(attribItem.defValue); |
| | | if(Func.isNotBlank(attribItem.rage)){ |
| | | attributeVO.setRange(attribItem.rage.replace("<","<")); |
| | | }else{ |
| | | attributeVO.setRange(attribItem.rage); |
| | | } |
| | | attributeVO.setOther(attribItem.other); |
| | | //å¤çåç
§ç¸å
³å±æ§ |
| | | if(StringUtils.isNotBlank(attribItem.other)) { |
| | |
| | | attributeVO.setBtmTypeId(s.split("=")[1].trim()); |
| | | } |
| | | //龿¥ç±»å䏿¯æ |
| | | if (s.toLowerCase().contains("link") && s.split("=").length > 1) {//å¿
é¡»è¦å¤æé¿åº¦ï¼å 为æä¸¾çæ¶å乿¯å
å«è¿ä¸ªbtmç |
| | | attributeVO.setLinkTypeName(s.split("=")[1].trim()); |
| | | } |
| | | if (s.toLowerCase().contains("version") && s.split("=").length > 1) {//å¿
é¡»è¦å¤æé¿åº¦ï¼å 为æä¸¾çæ¶å乿¯å
å«è¿ä¸ªbtmç |
| | | attributeVO.setVersion(WebUtil.getInt(s.split("=")[1].trim())); |
| | | } |
| | | } |
| | | } |
| | | //å¿
è¾åé¿åº¦ |
| | |
| | | //æ£æ¥é»è®¤å¼ä¸å±æ§ç±»åæ¯å¦å¹é
|
| | | checkDefValue(osAttributeDTO); |
| | | //dto对象转æ¢ä¸ºå卿é对象 |
| | | osAttributeDTO.setOid(VciBaseUtil.getPk().toUpperCase(Locale.ROOT)); |
| | | AttributeDef attributeDef = this.osAttributeDTO2AttributeDef(osAttributeDTO); |
| | | return platformClientUtil.getAttributeService().addAttributeDef(attributeDef); |
| | | } |
| | |
| | | if(hasInstance && !compatible){ |
| | | throw new PLException("500",new String[]{"æ æåæ´, ä¸å
¼å®¹å·²äº§ççæ°æ®ï¼"}); |
| | | } |
| | | String userId = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(); |
| | | String userId = "developer";//WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(); |
| | | osAttributeDTO.setLastModifier(userId); |
| | | osAttributeDTO.setCreator(osAttributeVO.getCreator()); |
| | | osAttributeDTO.setCreateTime(osAttributeVO.getCreateTime()); |
| | |
| | | */ |
| | | private AttributeDef osAttributeDTO2AttributeDef(OsAttributeDTO osAttributeDTO) { |
| | | AttributeDef attributeDef = new AttributeDef(); |
| | | attributeDef.oid = osAttributeDTO.getOid(); |
| | | attributeDef.name = osAttributeDTO.getId().toLowerCase().replaceAll(" ", ""); |
| | | attributeDef.label = osAttributeDTO.getName(); |
| | | attributeDef.description = osAttributeDTO.getDescription(); |
| | | attributeDef.vtDataType = (String)osAttributeDTO.getAttributeDataType(); |
| | | attributeDef.defValue = Func.isBlank(osAttributeDTO.getDefaultValue()) ? "" : osAttributeDTO.getDefaultValue(); |
| | | attributeDef.rage = Func.isBlank(osAttributeDTO.getRange()) ? "" : osAttributeDTO.getRange(); |
| | | attributeDef.creator = Func.isBlank(osAttributeDTO.getCreator()) ? WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId():osAttributeDTO.getCreator(); |
| | | if(Func.isBlank(osAttributeDTO.getRange())){ |
| | | attributeDef.rage = ""; |
| | | }else{ |
| | | //ç¹æ®å符å¤çï¼ç´æ¥åå¨<伿¥é |
| | | attributeDef.rage = osAttributeDTO.getRange().replace("<","<"); |
| | | } |
| | | attributeDef.ts = Func.format((Func.isNotEmpty(osAttributeDTO.getTs()) ? osAttributeDTO.getTs():new Date()),VciDateUtil.DateTimeMillFormat); |
| | | attributeDef.creator = "developer";//Func.isBlank(osAttributeDTO.getCreator()) ? WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId():osAttributeDTO.getCreator(); |
| | | attributeDef.createTime = Func.isEmpty(osAttributeDTO.getCreateTime()) ? System.currentTimeMillis():osAttributeDTO.getCreateTime().getTime(); |
| | | attributeDef.modifier = Func.isBlank(osAttributeDTO.getLastModifier()) ? WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId():osAttributeDTO.getLastModifier(); |
| | | attributeDef.modifier = "developer";//Func.isBlank(osAttributeDTO.getLastModifier()) ? WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId():osAttributeDTO.getLastModifier(); |
| | | attributeDef.modifyTime = System.currentTimeMillis(); |
| | | //otheréè¦èªè¡å¤ç |
| | | StringBuffer sb = new StringBuffer(); |
| | |
| | | break; |
| | | case VTString: |
| | | if (StringUtils.isNotBlank(osAttributeDTO.getBtmTypeId())) { |
| | | //åç
§ |
| | | //åç
§ä¸å¡ç±»å |
| | | sb.append(BTM).append(" = ").append(osAttributeDTO.getBtmTypeId()).append(";"); |
| | | //龿¥ç±»åææ¶ä¸æ¯æ |
| | | } |
| | | if(StringUtils.isNotBlank(osAttributeDTO.getLinkTypeName())){ |
| | | //åç
§é¾æ¥ç±»å |
| | | sb.append(LINKTYPENAME).append(" = ").append(osAttributeDTO.getLinkTypeName()).append(";"); |
| | | } |
| | | sb.append(LENGTH).append(" = ").append(length > osAttributeDTO.getAttrLength()?length:osAttributeDTO.getAttrLength()).append(";"); |
| | | if (StringUtils.isNotBlank(osAttributeDTO.getEnumId())) { |
| | |
| | | } |
| | | |
| | | if(!attributeName.matches("[a-z A-Z]*")){ |
| | | throw new PLException("500",new String[]{"注æï¼å±æ§ååªè½ä¸ºè±æåæ¯!"+ NAME_MAX_LENGTH}); |
| | | throw new PLException("500",new String[]{"注æï¼å±æ§ååªè½ä¸ºè±æåæ¯!"}); |
| | | } |
| | | |
| | | int length = attributeName.length(); |
| | | if(length > NAME_MAX_LENGTH){ |
| | | throw new PLException("500",new String[]{"屿§åè¿é¿,屿§åé¿åº¦ä¸è½è¶
è¿!"+ NAME_MAX_LENGTH}); |
| | | throw new PLException("500",new String[]{"屿§åè¿é¿,屿§åé¿åº¦ä¸è½è¶
è¿"+ NAME_MAX_LENGTH}); |
| | | } |
| | | |
| | | String abName = attributeName.toLowerCase(); |
| | |
| | | if(rages == null || rages.equals("")){ |
| | | return; |
| | | } |
| | | |
| | | VTInteger obj = new VTInteger(Integer.valueOf(defValue)); |
| | | boolean flag = obj.checkRageValueByRage(rages); |
| | | if(!flag){ |
| | |
| | | if(rages == null || rages.equals("")){ |
| | | return; |
| | | } |
| | | |
| | | VTLong obj = new VTLong(Long.valueOf(defValue)); |
| | | boolean flag = obj.checkRageValueByRage(rages); |
| | | if(!flag){ |
| | |
| | | if(!flag){ |
| | | throw new PLException("500",new String[]{"é»è®¤å¼ä¸å¼åå²çªï¼"}); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | Arrays.asList("屿§å", "æ ç¾", "æè¿°", |
| | | "屿§ç±»å", "å
许为空", "é»è®¤å¼", "使ç¨çæä¸¾è±æåç§°(æä¸¾å)", |
| | | "使ç¨çæä¸¾ä¸æåç§°(æ ç¾)", "åç
§çä¸å¡ç±»åç¼å·", "åç
§çä¸å¡ç±»ååç§°", |
| | | "屿§é¿åº¦", "å°æ°ç²¾åº¦ä½æ°","å°æ°å»åº¦ä½æ°","åå¼èå´","å建æ¶é´") |
| | | "åç
§ç龿¥ç±»ååç§°","çæ¬çæ¬¡","屿§é¿åº¦", "å°æ°ç²¾åº¦ä½æ°","å°æ°å»åº¦ä½æ°","åå¼èå´","å建æ¶é´") |
| | | ); |
| | | |
| | | //åexcel |
| | |
| | | excelDataList.add(new WriteExcelData(i+1,0, osAttributeVO.getId())); |
| | | excelDataList.add(new WriteExcelData(i+1,1, osAttributeVO.getName())); |
| | | excelDataList.add(new WriteExcelData(i+1,2, osAttributeVO.getDescription())); |
| | | excelDataList.add(new WriteExcelData(i+1,3, osAttributeVO.getAttributeDataTypeText()+(osAttributeVO.getAttributeDataType()))); |
| | | excelDataList.add(new WriteExcelData(i+1,3, osAttributeVO.getAttributeDataTypeText()+"("+osAttributeVO.getAttributeDataType()+")")); |
| | | excelDataList.add(new WriteExcelData(i+1,4, osAttributeVO.isNullableFlag())); |
| | | excelDataList.add(new WriteExcelData(i+1,5, osAttributeVO.getDefaultValue())); |
| | | excelDataList.add(new WriteExcelData(i+1,6, osAttributeVO.getEnumId())); |
| | |
| | | excelDataList.add(new WriteExcelData(i+1,8, osAttributeVO.getBtmTypeId())); |
| | | excelDataList.add(new WriteExcelData(i+1,9, osAttributeVO.getBtmTypeName())); |
| | | excelDataList.add(new WriteExcelData(i+1,10, osAttributeVO.getAttrLength())); |
| | | excelDataList.add(new WriteExcelData(i+1,11, osAttributeVO.getPrecisionLength())); |
| | | excelDataList.add(new WriteExcelData(i+1,12, osAttributeVO.getScaleLength())); |
| | | excelDataList.add(new WriteExcelData(i+1,13, osAttributeVO.getRange())); |
| | | excelDataList.add(new WriteExcelData(i+1,14, osAttributeVO.getCreateTime())); |
| | | excelDataList.add(new WriteExcelData(i+1,11, osAttributeVO.getLinkTypeName())); |
| | | excelDataList.add(new WriteExcelData(i+1,12, osAttributeVO.getVersion())); |
| | | excelDataList.add(new WriteExcelData(i+1,13, osAttributeVO.getPrecisionLength())); |
| | | excelDataList.add(new WriteExcelData(i+1,14, osAttributeVO.getScaleLength())); |
| | | excelDataList.add(new WriteExcelData(i+1,15, osAttributeVO.getRange())); |
| | | excelDataList.add(new WriteExcelData(i+1,16, osAttributeVO.getCreateTime())); |
| | | } |
| | | } |
| | | WriteExcelOption excelOption = new WriteExcelOption(excelDataList); |
| | | ExcelUtil.writeDataToFile(excelPath, excelOption); |
| | | return excelPath; |
| | | } |
| | | |
| | | /** |
| | | * ä¸è½½å±æ§å¯¼å
¥æ¨¡æ¿ |
| | | * @param exportFileName |
| | | * @return |
| | | * @throws PLException |
| | | */ |
| | | @Override |
| | | public String downloadAttributeTemplate(String exportFileName) throws Exception { |
| | | //ç颿²¡ä¼ åç§°ï¼ä½¿ç¨é»è®¤å¯¼åºåç§° |
| | | exportFileName = Func.isBlank(exportFileName) ? "屿§æ± 导å
¥æ¨¡æ¿_" + Func.format(new Date(),"yyyy-MM-dd HHmmss.sss"):exportFileName; |
| | | //设置åå |
| | | List<String> columns = new ArrayList<>( |
| | | Arrays.asList("屿§å", "æ ç¾", "æè¿°", |
| | | "屿§ç±»å", "å
许为空(æ¯/å¦)", "é»è®¤å¼", "使ç¨çæä¸¾è±æåç§°", "åç
§çä¸å¡ç±»åç¼å·", |
| | | "åç
§ç龿¥ç±»åç¼å·","çæ¬çæ¬¡","屿§é¿åº¦", "å°æ°ç²¾åº¦ä½æ°","å°æ°å»åº¦ä½æ°","åå¼èå´") |
| | | ); |
| | | //设置å¿
å¡«å |
| | | ColumnNameisRed.clear(); |
| | | ColumnNameisRed.add(0); |
| | | ColumnNameisRed.add(3); |
| | | ColumnNameisRed.add(10); |
| | | |
| | | //åexcel |
| | | String excelPath = LocalFileUtil.getDefaultTempFolder() + File.separator + exportFileName + ".xls"; |
| | | try { |
| | | new File(excelPath).createNewFile(); |
| | | } catch (Throwable e) { |
| | | throw new VciBaseException(LangBaseUtil.getErrorMsg(e), new String[]{excelPath}, e); |
| | | } |
| | | //设置å |
| | | List<WriteExcelData> excelDataList = new ArrayList<>(); |
| | | //设置å头 |
| | | for (int index = 0; index < columns.size(); index++) { |
| | | //夿æ¯å¦ä¸ºå¿
å¡«åï¼ç»å¿
å¡«å设置é¢è² |
| | | if(ColumnNameisRed.contains(index)){ |
| | | WriteExcelData excelData = new WriteExcelData(0, index, columns.get(index)); |
| | | excelData.setFontColor(String.valueOf(HSSFColor.HSSFColorPredefined.RED.getIndex())); |
| | | excelDataList.add(excelData); |
| | | }else{ |
| | | excelDataList.add(new WriteExcelData(0,index, columns.get(index))); |
| | | } |
| | | } |
| | | WriteExcelOption excelOption = new WriteExcelOption(excelDataList); |
| | | ExcelUtil.writeDataToFile(excelPath, excelOption); |
| | | return excelPath; |
| | | } |
| | | |
| | | /** |
| | | * 导å
¥å±æ§ |
| | | * @param file |
| | | * @return |
| | | */ |
| | | @Override |
| | | public BaseResult importAttributes(File file) throws Exception{ |
| | | VciBaseUtil.alertNotNull(file,"excelæä»¶"); |
| | | if(!file.exists()){ |
| | | throw new VciBaseException("导å
¥çexcelæä»¶ä¸åå¨,{0}",new String[]{file.getPath()}); |
| | | } |
| | | try{ |
| | | //1ã读åexcelä¸çæ°æ®ï¼ç»æå¯¹è±¡ |
| | | ReadExcelOption excelOption = new ReadExcelOption(); |
| | | List<OsAttributePO> poList = ExcelUtil.readDataObjectFromExcel(file, OsAttributePO.class,excelOption,(value, po, fieldName)->{}); |
| | | //å»é¤é½æ¯ç©ºçæ
åµ |
| | | if(CollectionUtils.isEmpty(poList)){ |
| | | return BaseResult.fail(ExcelLangCodeConstant.IMPORT_CONTENT_NULL,new String[]{}); |
| | | } |
| | | //excelå¤éï¼æ°æ®æ ¡éªï¼dto对象转æ¢ï¼åå¨å¯¹è±¡è½¬æ¢ï¼æ§è¡ä¿å |
| | | List<OsAttributeDTO> dtoList = new ArrayList<>(); |
| | | //å½åexcel䏿¯å¦éå¤ç¨çå¤éMap:ï¼keyï¼å¤é屿§ï¼valueï¼è¡å·ï¼ |
| | | Map<String, String> excelReapeat = new HashMap<>(); |
| | | //夿å¿
填屿§æ¯å¦ä¸ºç©ºï¼ç¨æ·æ¯å¦å·²åå¨ï¼ä»¥åé¨é¨æ¯å¦å¡«éçæ ¡éªé»è¾ |
| | | poList.stream().forEach(osAttributePO -> { |
| | | if(Func.isBlank(osAttributePO.getId())){//屿§åå¤ç©º |
| | | throw new VciBaseException("第ã"+osAttributePO.getRowIndex()+"ãè¡ï¼enumnameerror"); |
| | | }else if(Func.isBlank(osAttributePO.getAttributeDataType())){ |
| | | throw new VciBaseException("第ã"+osAttributePO.getRowIndex()+"ãè¡ï¼typeerror"); |
| | | }else if(excelReapeat.containsKey(osAttributePO.getId())){//屿§åè¡¨æ ¼ä¸å¤é |
| | | throw new VciBaseException("第ã"+excelReapeat.get(osAttributePO.getId())+"ãè¡å第ã"+osAttributePO.getRowIndex()+"ãè¡æ°æ®ï¼å±æ§åéå¤"); |
| | | } |
| | | //屿§åæ ¡éª |
| | | try { |
| | | checkName(osAttributePO.getId()); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciBaseException(VciBaseUtil.getExceptionMessage(e)); |
| | | } |
| | | //屿§åexcelä¸å¤éå¤ç |
| | | excelReapeat.put(osAttributePO.getId(),osAttributePO.getRowIndex()); |
| | | OsAttributeDTO osAttributeDTO = new OsAttributeDTO(); |
| | | osAttributeDTO.setOid(VciBaseUtil.getPk().toUpperCase(Locale.ROOT)); |
| | | osAttributeDTO.setId(osAttributePO.getId()); |
| | | osAttributeDTO.setName(osAttributePO.getName()); |
| | | osAttributeDTO.setDescription(osAttributePO.getDescription()); |
| | | osAttributeDTO.setDefaultValue(osAttributePO.getDefaultValue()); |
| | | osAttributeDTO.setAttrLength(osAttributePO.getAttrLength()); |
| | | osAttributeDTO.setAttributeDataType(osAttributePO.getAttributeDataType()); |
| | | osAttributeDTO.setBtmTypeId(osAttributePO.getBtmTypeId()); |
| | | //osAttributeDTO.setBtmTypeName(osAttributePO.getBtmname()); |
| | | osAttributeDTO.setLinkTypeName(osAttributePO.getLinkTypeName()); |
| | | osAttributeDTO.setVersion(osAttributePO.getVersion()); |
| | | osAttributeDTO.setEnumId(osAttributePO.getEnumId()); |
| | | //osAttributeDTO.setEnumName(osAttributePO.getEnumId()); |
| | | osAttributeDTO.setPrecisionLength(osAttributePO.getPrecisionLength()); |
| | | osAttributeDTO.setScaleLength(osAttributePO.getScaleLength()); |
| | | osAttributeDTO.setRange(osAttributePO.getRange()); |
| | | osAttributeDTO.setNullableFlag("æ¯".equals(osAttributePO.getNullableFlag()) ? true:false); |
| | | try { |
| | | //æ£æ¥é»è®¤å¼ä¸å±æ§ç±»åæ¯å¦å¹é
|
| | | checkDefValue(osAttributeDTO); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciBaseException(e.getMessage()); |
| | | } |
| | | dtoList.add(osAttributeDTO); |
| | | }); |
| | | //æ§è¡ä¿åæä½ |
| | | dtoList.stream().forEach(dto->{ |
| | | try { |
| | | boolean b = platformClientUtil.getAttributeService().addAttributeDef(osAttributeDTO2AttributeDef(dto)); |
| | | if(!b){ |
| | | throw new VciBaseException("save and return false"); |
| | | } |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | throw new VciBaseException("æ§è¡ä¿åæ¶åºç°é误ï¼éè¯¯å±æ§å¯¹è±¡å为ï¼ã" + dto.getId() + "ãï¼åå ï¼"+e.getMessage()); |
| | | } |
| | | }); |
| | | }catch (Exception e){ |
| | | if(logger.isErrorEnabled()){ |
| | | logger.error("读åexcelå
å®¹æ¶æä¿åç¨æ·ä¿¡æ¯æ¶åºç°äºé误ï¼å
·ä½åå ï¼",VciBaseUtil.getExceptionMessage(e)); |
| | | } |
| | | e.printStackTrace(); |
| | | return BaseResult.fail(VciBaseUtil.getExceptionMessage(e),new String[]{},e); |
| | | } |
| | | return BaseResult.success("æä¸¾å¯¼å
¥æåï¼"); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | private boolean isReferAttr(String other){ |
| | | if(StringUtils.isNotBlank(other) |
| | | && (other.toLowerCase().contains("btm") || other.toLowerCase().contains("ltm"))){ |
| | | && (other.toLowerCase().contains("btm") || other.toLowerCase().contains("link"))){ |
| | | //è¿ä¸è½ç¡®å®ï¼å 为æä¸¾çæ¶åä¹ä¼è®¾ç½®btm |
| | | String[] temp = other.split(";"); |
| | | for(String s : temp){ |
| | | if((s.contains("btm") || s.contains("ltm")) && s.split("=").length>1){ |
| | | if((s.contains("btm") || s.contains("link")) && s.split("=").length>1){ |
| | | return true; |
| | | } |
| | | } |