Commits

Inside Zhou committed 9555ba8

[bugfix]join时,左右条件列的格式化模板未生效。

Comments (0)

Files changed (1)

 				}
 
 				var leftColName = (contextualColumns[item.left._guid] as DyObj)["name"] as string;
+				if(!string.IsNullOrEmpty(item.left_format)) {
+					leftColName = string.Format(item.left_format, leftColName);
+				}
+
 				var rightColName = (join._contextual_columns[item.right._guid] as DyObj)["name"] as string;
+				if(!string.IsNullOrEmpty(item.right_format)) {
+					rightColName = string.Format(item.right_format, rightColName);
+				}
+
 				switch(conditionType) {
 					case ConditionType.Equal:
 						conditionTxt = "{0} = {1}".Fmt(leftColName, rightColName);
 				var colName = "{0}_{1}".Fmt(planAlias, string.IsNullOrEmpty(c.alias) ? c.attr_name as string : (c.alias as string).Substr());
 				var value = dr[colName];
 
-				if(null != rightCol && (rightCol["_guid"] as string == c._guid)  && ObjectHelper.IsNil(value)) {
+				if(null != rightCol && (rightCol["_guid"] as string == c._guid) && ObjectHelper.IsNil(value)) {
 					return null;
 				}