Merge branch 'master' of http://118.178.224.202:3000/ewide/ewide_core
This commit is contained in:
@@ -29,6 +29,7 @@ namespace Ewide.Application
|
||||
public class GetHouseCodeOutput
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string HouseCode { get; set; }
|
||||
public int Type { get; set; }
|
||||
public int Industry { get; set; }
|
||||
public string AreaCode { get; set; }
|
||||
|
||||
@@ -88,6 +88,7 @@ namespace Ewide.Application.Service.HouseProjectInfo
|
||||
var areaCodeRep = Db.GetRepository<SysAreaCode>();
|
||||
var projects = await _houseProjectInfoRep.DetachedEntities
|
||||
.Join(areaCodeRep.DetachedEntities, p => p.AreaCode, a => a.Code, (p, a) => new { p, AreaName = a.Name })
|
||||
.Where(input.Type>0, x => x.p.Type == input.Type)
|
||||
.Where(!string.IsNullOrEmpty(input.Name), x => x.p.Name.Contains(input.Name))
|
||||
.Where(!string.IsNullOrEmpty(input.Note), x => x.p.Note.Contains(input.Note))
|
||||
.Where(!string.IsNullOrEmpty(input.AreaCode), x => x.p.AreaCode == input.AreaCode)
|
||||
|
||||
@@ -93,11 +93,17 @@ namespace Ewide.Core.Service.Area
|
||||
#endif
|
||||
}
|
||||
var query = cachedAreaCodes.Where(p => p.LevelType <= level);
|
||||
var resAreaCode = new List<SysAreaCode>();
|
||||
if (areaCodeList != null)
|
||||
{
|
||||
query = query.Where(p => areaCodeList.Contains(p.Code));
|
||||
foreach (var code in areaCodeList)
|
||||
{
|
||||
var queryRes = query.Where(p => p.Code.StartsWith(code));
|
||||
resAreaCode.AddRange(queryRes);
|
||||
}
|
||||
cachedAreaCodes = resAreaCode.Distinct().ToList();
|
||||
}
|
||||
cachedAreaCodes = query.ToList();
|
||||
|
||||
return new TreeBuildUtil<AreaTreeNode>().DoTreeBuild(cachedAreaCodes.Select(u => new AreaTreeNode
|
||||
{
|
||||
Code = u.Code,
|
||||
|
||||
Reference in New Issue
Block a user