| | |
| | | String userName = WebUtil.getCurrentUserId(); |
| | | BusinessObject bo = new BusinessObject(); |
| | | bo.oid = (new ObjectUtility()).getNewObjectID36(); |
| | | bo.revisionid = (new ObjectUtility()).getNewObjectID36(); |
| | | bo.revoid = (new ObjectUtility()).getNewObjectID36(); |
| | | bo.nameoid = (new ObjectUtility()).getNewObjectID36(); |
| | | bo.btName = boName; |
| | | bo.isLastR = true; |
| | |
| | | if(cbo !=null){ |
| | | BusinessObject businessObject = new BusinessObject(); |
| | | businessObject.oid = new ObjectUtility().getNewObjectID36(); |
| | | businessObject.revisionid = new ObjectUtility().getNewObjectID36(); |
| | | businessObject.revoid = new ObjectUtility().getNewObjectID36(); |
| | | businessObject.nameoid = new ObjectUtility().getNewObjectID36(); |
| | | businessObject.btName = cbo.btName; |
| | | businessObject.isLastR = cbo.isLastR; |
| | |
| | | private AttributeValue[] clone(AttributeValue[] newAttrValList) { |
| | | AttributeValue[] n = new AttributeValue[newAttrValList.length]; |
| | | for (int i = 0; i < newAttrValList.length; i++) { |
| | | n[i] = new AttributeValue(newAttrValList[i].attrName,newAttrValList[i].attrVal); |
| | | n[i] = new AttributeValue(newAttrValList[i].name,newAttrValList[i].value); |
| | | } |
| | | return n; |
| | | } |
| | |
| | | AttributeValue[] attributeValueList = new AttributeValue[attributeValues.length]; |
| | | for (int i = 0; i < attributeValues.length; i++) { |
| | | AttributeValue newAttributeValue = new AttributeValue(); |
| | | newAttributeValue.attrName = attributeValues[i].attrName; |
| | | newAttributeValue.attrVal = attributeValues[i].attrVal; |
| | | newAttributeValue.name = attributeValues[i].name; |
| | | newAttributeValue.value = attributeValues[i].value; |
| | | attributeValueList[i] = newAttributeValue; |
| | | } |
| | | return attributeValueList; |
| | |
| | | |
| | | for (i = 0; i < attrValList.size(); ++i) { |
| | | attrVal = (AttributeValue) attrValList.get(i); |
| | | if (attrVal.attrName.toUpperCase().equals(attributeName.toUpperCase())) { |
| | | attrVal.attrVal = attributeValue; |
| | | if (attrVal.name.toUpperCase().equals(attributeName.toUpperCase())) { |
| | | attrVal.value = attributeValue; |
| | | isExist = true; |
| | | break; |
| | | } |
| | |
| | | |
| | | if (!isExist) { |
| | | attrVal = new AttributeValue(); |
| | | attrVal.attrName = attributeName.toUpperCase(); |
| | | attrVal.attrVal = attributeValue; |
| | | attrVal.name = attributeName.toUpperCase(); |
| | | attrVal.value = attributeValue; |
| | | attrValList.add(attrVal); |
| | | } |
| | | |
| | |
| | | } |
| | | //改为递归,处理模板套模板的问题 |
| | | this.recurReplaceCiMap(qt,replaceLowMap); |
| | | /*Map<String, ConditionItem> ciMap = condition.getCIMap(); |
| | | ciMap.forEach((ciId,ci)->{ |
| | | if(ci.isLeaf()) { |
| | | LeafInfo lInfo = ci.getLeafInfo(); |
| | | String value = lInfo.getValue().getOrdinaryValue(); |
| | | if(StringUtils.isNotBlank(value)){ |
| | | if(value.contains("#")){ |
| | | //系统变量.支持一个 |
| | | //lInfo.getValue().setOrdinaryValue(systemVarValueMap.getOrDefault(value.toUpperCase(),"")); |
| | | }else if(value.contains("${")){ |
| | | //有${xxxx}的方式 |
| | | if(!CollectionUtils.isEmpty(replaceLowMap)) { |
| | | try { |
| | | lInfo.getValue().setOrdinaryValue(VciBaseUtil.replaceByFreeMarker(value, replaceLowMap)); |
| | | }catch (Throwable e){ |
| | | logger.error("可能配置有问题,在转换freemarker表达式的时候,没有找到对应的值,目前表达式为{}",new String[]{value},e); |
| | | } |
| | | } |
| | | }else if(replaceLowMap.containsKey(value.toLowerCase())){ |
| | | lInfo.getValue().setOrdinaryValue(replaceLowMap.get(value.toLowerCase())); |
| | | } |
| | | } |
| | | } |
| | | });*/ |
| | | } |
| | | }catch(PLException e){ |
| | | logger.error(e.code,e); |
| | |
| | | if (bo.newAttrValList != null) { |
| | | for (int i = 0; i < bo.newAttrValList.length; ++i) { |
| | | AttributeValue av = bo.newAttrValList[i]; |
| | | if (WebUtil.isNormalAttr(av.attrName)) { |
| | | if(av.attrVal == null){ |
| | | av.attrVal = ""; |
| | | if (WebUtil.isNormalAttr(av.name)) { |
| | | if(av.value == null){ |
| | | av.value = ""; |
| | | } |
| | | newAttr.add(av); |
| | | } |