|
|
@@ -881,7 +881,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
return this.BaseRepository("CollegeMIS").FindList<EmpInfoEntity>().Count(); |
|
|
|
return this.BaseRepository("CollegeMIS").FindList<EmpInfoEntity>(x => x.CheckMark == true).Count(); |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
@@ -901,16 +901,16 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi |
|
|
|
/// </summary> |
|
|
|
/// <param name="type">1按性别,2按岗位类别</param> |
|
|
|
/// <returns></returns> |
|
|
|
public Dictionary<string,int> GetDicCount(int type) |
|
|
|
public Dictionary<string, int> GetDicCount(int type) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
var rs = new Dictionary<string, int>(); |
|
|
|
var query = this.BaseRepository("CollegeMIS").FindList<EmpInfoEntity>(); |
|
|
|
var query = this.BaseRepository("CollegeMIS").FindList<EmpInfoEntity>(x => x.CheckMark == true); |
|
|
|
switch (type) |
|
|
|
{ |
|
|
|
case 2: |
|
|
|
var data = query.GroupBy(x => x.EmpSortNo).Select(x=>new Tuple<string, int>(x.Key,x.Count())).ToList(); |
|
|
|
var data = query.GroupBy(x => x.EmpSortNo).Select(x => new Tuple<string, int>(x.Key, x.Count())).ToList(); |
|
|
|
ConvertName(data, rs); |
|
|
|
break; |
|
|
|
default: |
|
|
@@ -934,7 +934,7 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi |
|
|
|
|
|
|
|
private void ConvertName(List<Tuple<string, int>> data, Dictionary<string, int> rs) |
|
|
|
{ |
|
|
|
if(data.Any()) |
|
|
|
if (data.Any()) |
|
|
|
{ |
|
|
|
var detailList = this.BaseRepository().FindList<DataItemDetailEntity>(@"SELECT t.*,t2.F_ItemCode FROM LR_Base_DataItemDetail t |
|
|
|
INNER JOIN LR_Base_DataItem t2 ON t.F_ItemId = t2.F_ItemId |
|
|
@@ -942,9 +942,9 @@ sum(case when DATEDIFF(YYYY, t.Birthday, GETDATE()) > 20 and DATEDIFF(YYYY, t.Bi |
|
|
|
foreach (var item in data) |
|
|
|
{ |
|
|
|
var dl = detailList.FirstOrDefault(x => x.F_ItemValue == item.Item1); |
|
|
|
if(dl!=null) |
|
|
|
if (dl != null) |
|
|
|
{ |
|
|
|
if(!rs.ContainsKey(dl.F_ItemName)) |
|
|
|
if (!rs.ContainsKey(dl.F_ItemName)) |
|
|
|
{ |
|
|
|
rs.Add(dl.F_ItemName, item.Item2); |
|
|
|
} |
|
|
|