Kaynağa Gözat

优化工资列表排序展示、导入时自动排序

西昌分支
北京泉江 1 yıl önce
ebeveyn
işleme
c4a20ef6d9
4 değiştirilmiş dosya ile 37 ekleme ve 29 silme
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsBLL.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsIBLL.cs
  3. +25
    -25
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsService.cs
  4. +10
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsBLL.cs Dosyayı Görüntüle

@@ -191,7 +191,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

public IEnumerable<Tuple<string, string>> GetAmountsDetail(string userNo, int year, int month, int show)
public IEnumerable<Tuple<string, string, int>> GetAmountsDetail(string userNo, int year, int month, int show)
{
try
{


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsIBLL.cs Dosyayı Görüntüle

@@ -61,7 +61,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement

IEnumerable<Gz_AmountsCols> GetPageListCol(Pagination pagination, string queryJson, string userNo);

IEnumerable<Tuple<string, string>> GetAmountsDetail(string userNo, int year, int month, int show);
IEnumerable<Tuple<string, string, int>> GetAmountsDetail(string userNo, int year, int month, int show);
#endregion

}


+ 25
- 25
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Amounts/Gz_AmountsService.cs Dosyayı Görüntüle

@@ -344,17 +344,17 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement

if (items.Any())
{
var xmId = items.FirstOrDefault(x => x.Name == "职员姓名").Id;
var deptCodeId = items.FirstOrDefault(x => x.Name == "部门代码").Id;
var deptId = items.FirstOrDefault(x => x.Name == "部门名称").Id;
var ptcId = items.FirstOrDefault(x => x.Name == "职员类型代码").Id;
var ptId = items.FirstOrDefault(x => x.Name == "职员类型").Id;
var sendId = items.FirstOrDefault(x => x.Name == "发放时间").Id;
var sendCountId = items.FirstOrDefault(x => x.Name == "发放次数").Id;
var kchjId = items.FirstOrDefault(x => x.Name == "扣款合计").Id;
var sfhjId = items.FirstOrDefault(x => x.Name == "实发合计").Id;
var bzId = items.FirstOrDefault(x => x.Name == "备注").Id;
var shrId = items.FirstOrDefault(x => x.Name == "审核人").Id;
var xmId = items.FirstOrDefault(x => x.Name == "职员姓名")?.Id ?? "职员姓名";
var deptCodeId = items.FirstOrDefault(x => x.Name == "部门代码")?.Id ?? "部门代码";
var deptId = items.FirstOrDefault(x => x.Name == "部门名称")?.Id ?? "部门名称";
var ptcId = items.FirstOrDefault(x => x.Name == "职员类型代码")?.Id ?? "职员类型代码";
var ptId = items.FirstOrDefault(x => x.Name == "职员类型")?.Id ?? "职员类型";
var sendId = items.FirstOrDefault(x => x.Name == "发放时间")?.Id ?? "发放时间";
var sendCountId = items.FirstOrDefault(x => x.Name == "发放次数")?.Id ?? "发放次数";
var kchjId = items.FirstOrDefault(x => x.Name == "扣款合计")?.Id ?? "扣款合计";
var sfhjId = items.FirstOrDefault(x => x.Name == "实发合计")?.Id ?? "实发合计";
var bzId = items.FirstOrDefault(x => x.Name == "备注")?.Id ?? "备注";
var shrId = items.FirstOrDefault(x => x.Name == "审核人")?.Id ?? "审核人";

var itemId = items.Select(x => x.Id).ToArray();

@@ -402,13 +402,13 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}


public IEnumerable<Tuple<string, string>> GetAmountsDetail(string userNo, int year, int month, int show)
public IEnumerable<Tuple<string, string, int>> GetAmountsDetail(string userNo, int year, int month, int show)
{
try
{
var items = this.BaseRepository("CollegeMIS").FindList<Gz_ItemsEntity>(x => x.IsShow == (show==1)).ToList();
var items = this.BaseRepository("CollegeMIS").FindList<Gz_ItemsEntity>(x => x.IsShow == (show == 1)).OrderBy(x => x.ShowOrder).ToList();
var itemId = items.Select(x => x.Id).ToArray();
var query = this.BaseRepository("CollegeMIS").FindList<Gz_AmountsEntity>(x => itemId.Contains(x.ItemId) && x.Year == year && x.Month == month && x.UserNo == userNo).Join(items, a => a.ItemId, b => b.Id, (a, b) => new Tuple<string, string>(b.Name, a.OriVal));
var query = this.BaseRepository("CollegeMIS").FindList<Gz_AmountsEntity>(x => itemId.Contains(x.ItemId) && x.Year == year && x.Month == month && x.UserNo == userNo).Join(items, a => a.ItemId, b => b.Id, (a, b) => new Tuple<string, string, int>(b.Name, a.OriVal, b.ShowOrder ?? 0)).OrderBy(x => x.Item3);
return query;
}
catch (Exception ex)
@@ -453,17 +453,17 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
var items = this.BaseRepository("CollegeMIS").FindList<Gz_ItemsEntity>(x => x.IsShow == true).ToList();
if (items.Any())
{
var xmId = items.FirstOrDefault(x => x.Name == "职员姓名").Id;
var deptCodeId = items.FirstOrDefault(x => x.Name == "部门代码").Id;
var deptId = items.FirstOrDefault(x => x.Name == "部门名称").Id;
var ptcId = items.FirstOrDefault(x => x.Name == "职员类型代码").Id;
var ptId = items.FirstOrDefault(x => x.Name == "职员类型").Id;
var sendId = items.FirstOrDefault(x => x.Name == "发放时间").Id;
var sendCountId = items.FirstOrDefault(x => x.Name == "发放次数").Id;
var kchjId = items.FirstOrDefault(x => x.Name == "扣款合计").Id;
var sfhjId = items.FirstOrDefault(x => x.Name == "实发合计").Id;
var bzId = items.FirstOrDefault(x => x.Name == "备注").Id;
var shrId = items.FirstOrDefault(x => x.Name == "审核人").Id;
var xmId = items.FirstOrDefault(x => x.Name == "职员姓名")?.Id ?? "职员姓名";
var deptCodeId = items.FirstOrDefault(x => x.Name == "部门代码")?.Id ?? "部门代码";
var deptId = items.FirstOrDefault(x => x.Name == "部门名称")?.Id ?? "部门名称";
var ptcId = items.FirstOrDefault(x => x.Name == "职员类型代码")?.Id ?? "职员类型代码";
var ptId = items.FirstOrDefault(x => x.Name == "职员类型")?.Id ?? "职员类型";
var sendId = items.FirstOrDefault(x => x.Name == "发放时间")?.Id ?? "发放时间";
var sendCountId = items.FirstOrDefault(x => x.Name == "发放次数")?.Id ?? "发放次数";
var kchjId = items.FirstOrDefault(x => x.Name == "扣款合计")?.Id ?? "扣款合计";
var sfhjId = items.FirstOrDefault(x => x.Name == "实发合计")?.Id ?? "实发合计";
var bzId = items.FirstOrDefault(x => x.Name == "备注")?.Id ?? "备注";
var shrId = items.FirstOrDefault(x => x.Name == "审核人")?.Id ?? "审核人";

var itemId = items.Select(x => x.Id).ToArray();



+ 10
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/Gz_Items/Gz_ItemsService.cs Dosyayı Görüntüle

@@ -92,7 +92,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
pagination.records = query.Count();

query = query.Skip(skip).Take(pagination.rows);
query = query.OrderBy(x=>x.ShowOrder).Skip(skip).Take(pagination.rows);

return query;
}
@@ -207,11 +207,19 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
var ls = this.BaseRepository("CollegeMIS").FindList<Gz_ItemsEntity>();
var lsName = ls.Select(x => x.Name).ToList();
var iCount = lsName.Count;
var exc = cols.Except(lsName);
var addLs = new List<Gz_ItemsEntity>();
var i = iCount + 100;
if (exc.Any())
{
addLs = exc.Select(x => new Gz_ItemsEntity { Name = x, Id = Guid.NewGuid().ToString() }).ToList();
foreach (var x in exc)
{
i++;
var adm = new Gz_ItemsEntity { Name = x, Id = Guid.NewGuid().ToString(), ShowOrder = i };
addLs.Add(adm);
}
//addLs = exc.Select(x => new Gz_ItemsEntity { Name = x, Id = Guid.NewGuid().ToString() }).ToList();
var r = this.BaseRepository("CollegeMIS").Insert<Gz_ItemsEntity>(addLs);
}
return ls.Union(addLs).ToList();


Yükleniyor…
İptal
Kaydet