update 实现添加房屋编码

This commit is contained in:
2021-05-19 23:15:22 +08:00
parent 3aff5a4413
commit 9bd6446a76
21 changed files with 885 additions and 113 deletions

View File

@@ -41,4 +41,12 @@ namespace Ewide.Application.Service.HouseProjectInfo.Dto
{
public string pid { get; set; }
}
public class ListHouseProjectInfoInput
{
[Required(ErrorMessage = "区域编码不可为空")]
public string AreaCode { get; set; }
[Required(ErrorMessage = "性质不可为空")]
public int Type { get; set; }
}
}

View File

@@ -121,7 +121,7 @@ namespace Ewide.Application.Service.HouseProjectInfo
}
[HttpGet("/houseProjectInfo/nextSort")]
public async Task<int> GetNextProjectSortByAreaCode([FromQuery] HouseProjectInfoInput input)
public async Task<int> GetNextProjectSortByAreaCode([FromQuery] ListHouseProjectInfoInput input)
{
//var projects = await _houseProjectInfoRep.DetachedEntities
// .Where(p => p.AreaCode == input.AreaCode && p.Type == input.Type)
@@ -138,5 +138,19 @@ namespace Ewide.Application.Service.HouseProjectInfo
return p.GetValueOrDefault(0) + 1;
}
/// <summary>
/// 获取项目下拉列表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("houseProjectInfo/list")]
public async Task<dynamic> GetProjectList([FromQuery] ListHouseProjectInfoInput input)
{
return await _houseProjectInfoRep.DetachedEntities
.Where(p => p.AreaCode == input.AreaCode && p.Type == input.Type)
.OrderBy(p => p.Sort)
.ToListAsync();
}
}
}

View File

@@ -18,6 +18,7 @@ namespace Ewide.Application.Service.HouseProjectInfo
Task<dynamic> GetProject([FromQuery] QueryProjectInput input);
Task<dynamic> QueryProjectPageList([FromQuery] PageProjectInput input);
Task<int> GetNextProjectSortByAreaCode([FromQuery] HouseProjectInfoInput input);
Task<int> GetNextProjectSortByAreaCode([FromQuery] ListHouseProjectInfoInput input);
Task<dynamic> GetProjectList([FromQuery] ListHouseProjectInfoInput input);
}
}