| | |
| | | import com.vci.ubcs.starter.revision.model.TreeQueryObject; |
| | | import com.vci.ubcs.starter.revision.model.TreeWrapperOptions; |
| | | import com.vci.ubcs.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.ubcs.starter.util.UBCSSqlKeyword; |
| | | import com.vci.ubcs.starter.web.constant.QueryOptionConstant; |
| | | import com.vci.ubcs.starter.web.constant.RegExpConstant; |
| | | import com.vci.ubcs.starter.web.enumpck.BooleanEnum; |
| | |
| | | import org.springblade.core.launch.constant.AppConstant; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringPool; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.Cache; |
| | |
| | | } else if (key.endsWith("_notequal")) { |
| | | String field = UBCSSqlKeyword.getColumn(key, "_notequal"); |
| | | if (referFieldMap.containsKey(field)) { |
| | | //说明还是参照里面的,我们默认这种情况下都是字符串吧,因为参照的属性不一定用的平台的属性池里的,所以大部分情况下,显示的属性都是字符串吧 |
| | | return referFieldMap.get(field) + SPACE + " != '" + value + "'" + SPACE; |
| | | } else { |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + " != " + getStringValueInWhere(field, value, attrVOMap); |
| | |
| | | } else if (key.endsWith("_ge")) { |
| | | String field = UBCSSqlKeyword.getColumn(key, "_ge"); |
| | | if (referFieldMap.containsKey(field)) { |
| | | //说明还是参照里面的,我们默认这种情况下都是字符串吧,因为参照的属性不一定用的平台的属性池里的,所以大部分情况下,显示的属性都是字符串吧 |
| | | return referFieldMap.get(field) + SPACE + " >= '" + value + "'" + SPACE; |
| | | } else { |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + " >= '" + getStringValueInWhere(value, field, attrVOMap) + "'" + SPACE; |
| | |
| | | //说明是<=的。我们需要先获取一下 |
| | | String field = UBCSSqlKeyword.getColumn(key, "_le"); |
| | | if (referFieldMap.containsKey(field)) { |
| | | //说明还是参照里面的,我们默认这种情况下都是字符串吧,因为参照的属性不一定用的平台的属性池里的,所以大部分情况下,显示的属性都是字符串吧 |
| | | return referFieldMap.get(field) + SPACE + " <= '" + value + "'" + SPACE; |
| | | } else { |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + " <= '" + getStringValueInWhere(field, value, attrVOMap) + "'" + SPACE; |
| | |
| | | } else if (key.endsWith("_lt")) { |
| | | String field = UBCSSqlKeyword.getColumn(key, "_lt"); |
| | | if (referFieldMap.containsKey(field)) { |
| | | //说明还是参照里面的,我们默认这种情况下都是字符串吧,因为参照的属性不一定用的平台的属性池里的,所以大部分情况下,显示的属性都是字符串吧 |
| | | return referFieldMap.get(field) + SPACE + "< '" + value + "'" + SPACE; |
| | | } else { |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + "< '" + getStringValueInWhere(field, value, attrVOMap) + "'" + SPACE; |
| | |
| | | } else if (key.endsWith("_datege")) { |
| | | String field = UBCSSqlKeyword.getColumn(key, "_datege"); |
| | | if (referFieldMap.containsKey(field)) { |
| | | //说明还是参照里面的,我们默认这种情况下都是字符串吧,因为参照的属性不一定用的平台的属性池里的,所以大部分情况下,显示的属性都是字符串吧 |
| | | return referFieldMap.get(field) + SPACE + ">= '" + DateUtil.parse(String.valueOf(value), "yyyy-MM-dd HH:mm:ss") + "'" + SPACE; |
| | | } else { |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + ">= '" + DateUtil.parse(String.valueOf(getStringValueInWhere(field, value, attrVOMap)), "yyyy-MM-dd HH:mm:ss") + "'" + SPACE; |
| | |
| | | } else { |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + "IS NOT NULL" + SPACE; |
| | | } |
| | | } else { |
| | | } else if(key.endsWith("_dateequal")) { |
| | | String field = UBCSSqlKeyword.getColumn(key, "_dateequal"); |
| | | if (referFieldMap.containsKey(field)) { |
| | | return referFieldMap.get(field) + SPACE + "= '" + DateUtil.parse(String.valueOf(value), "yyyy-MM-dd HH:mm:ss") + "'" + SPACE; |
| | | } else { |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + "= '" + DateUtil.parse(String.valueOf(getStringValueInWhere(field, value, attrVOMap)), "yyyy-MM-dd HH:mm:ss") + "'" + SPACE; |
| | | } |
| | | }else { |
| | | String field = UBCSSqlKeyword.getColumn(key, "_equal"); |
| | | if (referFieldMap.containsKey(field)) { |
| | | return referFieldMap.get(field) + SPACE + "= '" + value + "'" + SPACE; |
| | | } else { |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + "= '" + getStringValueInWhere(field, value, attrVOMap)+ "'" + SPACE; |
| | | } |
| | | } |
| | | *//*else { |
| | | if (referFieldMap.containsKey(key)) { |
| | | //说明是参照的,我们参照的查询都认为是字符串,如果是时间格式的查询肯定有问题, |
| | | String selectKey = referFieldMap.get(key); |
| | | return getSqlByValue(selectKey, value, null,btmType); |
| | | } else { |
| | | return getSqlByValue(key, value, attrVOMap,btmType); |
| | | } |
| | | }*//* |
| | | } |
| | | return "";*/ |
| | | |
| | | }*/ |
| | | if (key.endsWith("_begin")) { |
| | | //说明是>=的。我们需要先获取一下 |
| | | String field = (key.substring(0, key.length() - 6).toLowerCase().trim()); |
| | |
| | | return getSqlByValue(key, value, attrVOMap,btmType); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |