diff --git a/Api/Ewide.Application/Service/HouseCode/Dto/HouseCodeInput.cs b/Api/Ewide.Application/Service/HouseCode/Dto/HouseCodeInput.cs index 3f8e9f9..0346656 100644 --- a/Api/Ewide.Application/Service/HouseCode/Dto/HouseCodeInput.cs +++ b/Api/Ewide.Application/Service/HouseCode/Dto/HouseCodeInput.cs @@ -50,6 +50,7 @@ namespace Ewide.Application.Service.HouseCode.Dto public class QueryHouseCodeInput : PageInputBase { public string HouseCode { get; set; } + public int? No { get; set; } public string Address { get; set; } public string ProjectId { get; set; } public string ZoonId { get; set; } diff --git a/Api/Ewide.Application/Service/HouseCode/HouseCodeService.cs b/Api/Ewide.Application/Service/HouseCode/HouseCodeService.cs index 56b00c9..1a6c24a 100644 --- a/Api/Ewide.Application/Service/HouseCode/HouseCodeService.cs +++ b/Api/Ewide.Application/Service/HouseCode/HouseCodeService.cs @@ -66,12 +66,12 @@ namespace Ewide.Application.Service.HouseCode [HttpPost("/houseCode/page")] public async Task QueryPage([FromBody] QueryHouseCodeInput input) { - var sql = @"SELECT HC.*,HP.AreaCode,HP.Note,AA.Name AreaName,RA.Name RoadName,CA.Name CommName FROM bs_house_code HC -LEFT JOIN bs_house_projectinfo HP ON HP.Id=HC.ProjectId -LEFT JOIN sys_area_code CA ON CA.Code = HP.AreaCode + var sql = @"SELECT HC.*,AA.Name AreaName,RA.Name RoadName,CA.Name CommName,Proj.AreaCode,Proj.Note,Proj.Name+'('+Proj.Note+')' FullProjName FROM bs_house_code HC +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) WHERE HC.Address like @Address"; - return await _dapperRepository.QueryPageData(sql, input, param: new { Address = '%' + input.Address + '%' }); +LEFT JOIN sys_area_code AA ON AA.AdCode = SUBSTR(CA.AdCode,1,6) WHERE HC.Address LIKE @Address AND HC.HouseCode LIKE @HouseCode"; + return await _dapperRepository.QueryPageData(sql, input, param: new { Address = '%' + input.Address + '%', HouseCode = '%' + input.HouseCode + '%'}); } /// diff --git a/Web/src/pages/business/house/houseCode/index.vue b/Web/src/pages/business/house/houseCode/index.vue index 1e884ea..bd7a08c 100644 --- a/Web/src/pages/business/house/houseCode/index.vue +++ b/Web/src/pages/business/house/houseCode/index.vue @@ -8,60 +8,33 @@
- + - + - + 全部 - {{ item.value }} + {{ item.value }} - {{ item.value }} + {{ item.value }} + + + 新增房屋编码 @@ -69,7 +42,7 @@