Browse Source

驾驶舱接口变更

应县
ndbs 6 months ago
parent
commit
51b26f7d39
4 changed files with 54 additions and 10 deletions
  1. +6
    -5
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Echarts/StudentEchartsApi.cs
  2. +19
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DIC_CITY/DIC_CITYBLL.cs
  3. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DIC_CITY/DIC_CITYIBLL.cs
  4. +27
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DIC_CITY/DIC_CITYService.cs

+ 6
- 5
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/Echarts/StudentEchartsApi.cs View File

@@ -17,6 +17,7 @@ namespace Learun.Application.WebApi.Modules.Echarts
private DataItemIBLL dataItemIBLL = new DataItemBLL();
private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
private DIC_PROVINCEIBLL dIC_PROVINCEIBLL = new DIC_PROVINCEBLL();
private DIC_CITYIBLL dIC_CITYIBLL = new DIC_CITYBLL();
private StuEncourgementIBLL stuEncourgementIBLL = new StuEncourgementBLL();
private StuTransferInfoIBLL stuTransferInfoIBLL = new StuTransferInfoBLL();
private StuGraduateStatisticIBLL stuGraduateStatisticIBLL = new StuGraduateStatisticBLL();
@@ -353,17 +354,17 @@ namespace Learun.Application.WebApi.Modules.Echarts
public Response stuMapEchart(dynamic _)
{
var res = new List<MapModel>();
var stuList = stuInfoBasicIBLL.GetAllList().Where(x => x.F_ProvinceId != null && x.F_ProvinceId.Length > 0).GroupBy(x => x.F_ProvinceId).Select(x => new
var stuList = stuInfoBasicIBLL.GetAllList().Where(x => x.F_ProvinceId != null && x.F_ProvinceId.Length > 0 && x.F_ProvinceId == "420000").GroupBy(x => x.F_CityId).Select(x => new
{
provinceCode = x.Key,
F_CityId = x.Key,
num = x.Count()
}).OrderBy(x => x.provinceCode);
}).OrderBy(x => x.F_CityId);
foreach (var item in stuList)
{
var model = new MapModel()
{
code = item.provinceCode,
area = dIC_PROVINCEIBLL.GetDIC_PROVINCEEntityByCode(item.provinceCode)?.PNAME,
code = item.F_CityId,
area = dIC_CITYIBLL.GetDIC_CITYEntityByCode(item.F_CityId)?.CNAME,
number = item.num
};
res.Add(model);


+ 19
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DIC_CITY/DIC_CITYBLL.cs View File

@@ -122,7 +122,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
return dIC_CITYService.GetListByProvinceCode(provinceCode);
return dIC_CITYService.GetListByProvinceCode(provinceCode);
}
catch (Exception ex)
{
@@ -139,5 +139,23 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

#endregion

public DIC_CITYEntity GetDIC_CITYEntityByCode(string keyValue)
{
try
{
return dIC_CITYService.GetDIC_CITYEntityByCode(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
}
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DIC_CITY/DIC_CITYIBLL.cs View File

@@ -46,5 +46,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
#endregion

IEnumerable<DIC_CITYEntity> GetListByProvinceCode(string provinceCode);

DIC_CITYEntity GetDIC_CITYEntityByCode(string keyValue);
}
}

+ 27
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/DIC_CITY/DIC_CITYService.cs View File

@@ -43,7 +43,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var dp = new DynamicParameters(new { });
if (!queryParam["CPARENT"].IsEmpty())
{
dp.Add("CPARENT",queryParam["CPARENT"].ToString(), DbType.String);
dp.Add("CPARENT", queryParam["CPARENT"].ToString(), DbType.String);
strSql.Append(" AND t.CPARENT = @CPARENT ");
}
if (!queryParam["CNAME"].IsEmpty())
@@ -51,7 +51,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("CNAME", "%" + queryParam["CNAME"].ToString() + "%", DbType.String);
strSql.Append(" AND t.CNAME Like @CNAME ");
}
return this.BaseRepository("CollegeMIS").FindList<DIC_CITYEntity>(strSql.ToString(),dp, pagination);
return this.BaseRepository("CollegeMIS").FindList<DIC_CITYEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -103,7 +103,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
this.BaseRepository("CollegeMIS").Delete<DIC_CITYEntity>(t=>t.CID == keyValue);
this.BaseRepository("CollegeMIS").Delete<DIC_CITYEntity>(t => t.CID == keyValue);
}
catch (Exception ex)
{
@@ -155,7 +155,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

public IEnumerable<DIC_CITYEntity> GetListByProvinceCode(string provinceCode)
{
return this.BaseRepository("CollegeMIS").FindList<DIC_CITYEntity>(m=>m.CPARENT==provinceCode);
return this.BaseRepository("CollegeMIS").FindList<DIC_CITYEntity>(m => m.CPARENT == provinceCode);
}
/// <summary>
/// 获取DIC_PROVINCE表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public DIC_CITYEntity GetDIC_CITYEntityByCode(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<DIC_CITYEntity>(m => m.CCODE == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
}
}

Loading…
Cancel
Save