diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseCode/HouseCodeService.cs b/Api/Ewide.Application/Service/HouseSafety/HouseCode/HouseCodeService.cs index e57b2b2..ff662e9 100644 --- a/Api/Ewide.Application/Service/HouseSafety/HouseCode/HouseCodeService.cs +++ b/Api/Ewide.Application/Service/HouseSafety/HouseCode/HouseCodeService.cs @@ -70,7 +70,7 @@ LEFT JOIN bs_house_projectinfo Proj ON Proj.Id=HC.ProjectId LEFT JOIN sys_area_code CA ON CA.Code = Proj.AreaCode LEFT JOIN sys_area_code RA ON RA.AdCode = SUBSTR(CA.AdCode,1,9) LEFT JOIN sys_area_code AA ON AA.AdCode = SUBSTR(CA.AdCode,1,6) "; - return await _dapperRepository.QueryPageDataDynamic(sql, input, filterFields: new string[] {"Type", "Address", "HouseCode" }); + return await _dapperRepository.QueryPageDataDynamic(sql, input, filterFields: new string[] {"Type", "Address", "HouseCode","AreaCode"}); } [HttpGet("/houseCode/detail")] diff --git a/Api/Ewide.Core/Enum/QueryTypeEnum.cs b/Api/Ewide.Core/Enum/QueryTypeEnum.cs index 56b12b6..0ac53ca 100644 --- a/Api/Ewide.Core/Enum/QueryTypeEnum.cs +++ b/Api/Ewide.Core/Enum/QueryTypeEnum.cs @@ -53,6 +53,18 @@ namespace Ewide.Core /// 不为空 /// [Description("不为空")] - IsNotNull = 7 + IsNotNull = 7, + + /// + /// 开始于 LIKE Param% + /// + [Description("LIKE Param%")] + StartWith =8, + + /// + /// 结合于 LIKE %Param + /// + [Description("LIKE %Param")] + EndWith = 9 } } diff --git a/Api/Ewide.Core/Ewide.Core.xml b/Api/Ewide.Core/Ewide.Core.xml index 8cc30b3..d504a79 100644 --- a/Api/Ewide.Core/Ewide.Core.xml +++ b/Api/Ewide.Core/Ewide.Core.xml @@ -2522,6 +2522,16 @@ 不为空 + + + 开始于 LIKE Param% + + + + + 结合于 LIKE %Param + + 菜单激活类型 diff --git a/Api/Ewide.Core/Extension/DataFilter/Entity/SearchInfo.cs b/Api/Ewide.Core/Extension/DataFilter/Entity/SearchInfo.cs index bed6461..e62da60 100644 --- a/Api/Ewide.Core/Extension/DataFilter/Entity/SearchInfo.cs +++ b/Api/Ewide.Core/Extension/DataFilter/Entity/SearchInfo.cs @@ -29,13 +29,15 @@ namespace Ewide.Core { get { - return Type switch + return Type.ToLower() switch { "=" or "equal" => QueryTypeEnum.Equal, "<" or "lessthan" => QueryTypeEnum.LessThan, "<=" or "lessthanorequal" => QueryTypeEnum.LessThanOrEqual, ">" or "greaterthan" => QueryTypeEnum.GreaterThan, ">=" or "greaterthanorequal" => QueryTypeEnum.GreaterThanOrEqual, + "start" => QueryTypeEnum.StartWith, + "end" => QueryTypeEnum.EndWith, _ => QueryTypeEnum.Like, }; } diff --git a/Api/Ewide.Core/Extension/DataFilter/WebPage/SearchJsonFitlerInfoGetService.cs b/Api/Ewide.Core/Extension/DataFilter/WebPage/SearchJsonFitlerInfoGetService.cs index 8daaf05..1e78bce 100644 --- a/Api/Ewide.Core/Extension/DataFilter/WebPage/SearchJsonFitlerInfoGetService.cs +++ b/Api/Ewide.Core/Extension/DataFilter/WebPage/SearchJsonFitlerInfoGetService.cs @@ -64,7 +64,7 @@ namespace Ewide.Core.Extension.DataFilter.WebPage var parameterName = "@" + searchInfo.Field + Guid.NewGuid().ToString("N"); //AddParameter(parameterName, elem); - sqlParameters.Add(parameterName, QueryTypeEnum.Like == searchInfo.QueryType ? "%" + elem + "%" : elem); + sqlParameters.Add(parameterName, QueryTypeEnum.Like == searchInfo.QueryType ? "%" + elem + "%" : QueryTypeEnum.StartWith == searchInfo.QueryType ? elem + "%" : QueryTypeEnum.EndWith == searchInfo.QueryType ? "%" + elem : elem); whereList.Add(String.Format(sqlT, searchInfo.Field, GetSearchOperatorStr(searchInfo.QueryType), parameterName)); } if (whereList.Count == 0) return String.Empty; @@ -85,10 +85,10 @@ namespace Ewide.Core.Extension.DataFilter.WebPage return "<"; case QueryTypeEnum.LessThanOrEqual: return "<="; - case QueryTypeEnum.Like: - return " LIKE "; - default: + case QueryTypeEnum.Equal: return "="; + default: + return "LIKE"; } } diff --git a/web-react/src/pages/business/house/code/index.jsx b/web-react/src/pages/business/house/code/index.jsx index 612ad7f..267e342 100644 --- a/web-react/src/pages/business/house/code/index.jsx +++ b/web-react/src/pages/business/house/code/index.jsx @@ -5,7 +5,7 @@ import { Cascader, Form, Input, - InputNumber, + Tag, Popconfirm, message as Message, Radio, @@ -51,10 +51,15 @@ export default class index extends Component { dataIndex: 'houseCode', sorter: true, width: 300, - render: (text, record) => - `${record.areaName}-${record.roadName}-${record.commName}-${record.note}-${record.no - .toString() - .padStart(3, '0')}`, + render: (text, record) => ( + <> + {`${record.areaName}-${record.roadName}-${record.commName}-${ + record.note + }-${record.no.toString().padStart(3, '0')}`} +
+ {text} + + ), }, { title: '房屋性质及行业', @@ -288,7 +293,10 @@ export default class index extends Component { placeholder="请选择所在区域" /> - + + + + {/* value && value.padStart(3, '0')} max={999} @@ -297,7 +305,7 @@ export default class index extends Component { step={1} placeholder="请输入房屋序号" /> - + */} 全部 @@ -326,9 +334,6 @@ export default class index extends Component { - - - } operator={ diff --git a/web-react/src/util/query/index.js b/web-react/src/util/query/index.js index 2aa58ae..cd5050c 100644 --- a/web-react/src/util/query/index.js +++ b/web-react/src/util/query/index.js @@ -103,5 +103,7 @@ export const QueryType = { LessThan: '<', LessThanOrEqual: '<=', Like: 'LIKE', - Equal: '=' + Equal: '=', + StartWith: 'STRAT', + EndWith: 'END' } \ No newline at end of file