Commit 19aa6aa2 by ruyun.zhang

BUG修复

parent 3b6d5ce7
...@@ -72,8 +72,15 @@ public DtoModels.Comparison<view_check_emp> CheckEmployeeRealGiveFeeDiff(Compari ...@@ -72,8 +72,15 @@ public DtoModels.Comparison<view_check_emp> CheckEmployeeRealGiveFeeDiff(Compari
{ {
var queryData = $@"CALL proc_allot_check_emp(@allotId);"; var queryData = $@"CALL proc_allot_check_emp(@allotId);";
var checkEmps = DapperQuery<view_check_emp>(queryData, new { allotId = request.AllotId }); var checkEmps = DapperQuery<view_check_emp>(queryData, new { allotId = request.AllotId });
request.SearchQuery = request.SearchQuery?.Clean();
if (!string.IsNullOrEmpty(request.SearchQuery)) if (!string.IsNullOrEmpty(request.SearchQuery))
checkEmps = checkEmps.Where(w => w.UnitType.Contains(request.SearchQuery) || w.AccountingUnit.Contains(request.SearchQuery) || w.JobNumber.Contains(request.SearchQuery) || w.EmployeeName.Contains(request.SearchQuery)); {
checkEmps = checkEmps.Where(w => (!string.IsNullOrEmpty(w.UnitType) && w.UnitType.Contains(request.SearchQuery))
|| (!string.IsNullOrEmpty(w.AccountingUnit) && w.AccountingUnit.Contains(request.SearchQuery))
|| (!string.IsNullOrEmpty(w.JobNumber) && w.JobNumber.Contains(request.SearchQuery))
|| (!string.IsNullOrEmpty(w.EmployeeName) && w.EmployeeName.Contains(request.SearchQuery)));
}
checkEmps = checkEmps.OrderByDescending(w => Math.Abs(w.Diff ?? 0)); checkEmps = checkEmps.OrderByDescending(w => Math.Abs(w.Diff ?? 0));
return new DtoModels.Comparison<view_check_emp>() return new DtoModels.Comparison<view_check_emp>()
...@@ -90,8 +97,15 @@ public DtoModels.Comparison<view_check_emp> CheckAccountingUnitRealGiveFeeDiff(C ...@@ -90,8 +97,15 @@ public DtoModels.Comparison<view_check_emp> CheckAccountingUnitRealGiveFeeDiff(C
{ {
var queryData = $@"CALL proc_allot_check_dept(@allotId);"; var queryData = $@"CALL proc_allot_check_dept(@allotId);";
var checkEmps = DapperQuery<view_check_emp>(queryData, new { allotId = request.AllotId }); var checkEmps = DapperQuery<view_check_emp>(queryData, new { allotId = request.AllotId });
request.SearchQuery = request.SearchQuery?.Clean();
if (!string.IsNullOrEmpty(request.SearchQuery)) if (!string.IsNullOrEmpty(request.SearchQuery))
checkEmps = checkEmps.Where(w => w.UnitType.Contains(request.SearchQuery) || w.AccountingUnit.Contains(request.SearchQuery) || w.JobNumber.Contains(request.SearchQuery) || w.EmployeeName.Contains(request.SearchQuery)); {
checkEmps = checkEmps.Where(w => (!string.IsNullOrEmpty(w.UnitType) && w.UnitType.Contains(request.SearchQuery))
|| (!string.IsNullOrEmpty(w.AccountingUnit) && w.AccountingUnit.Contains(request.SearchQuery))
|| (!string.IsNullOrEmpty(w.JobNumber) && w.JobNumber.Contains(request.SearchQuery))
|| (!string.IsNullOrEmpty(w.EmployeeName) && w.EmployeeName.Contains(request.SearchQuery)));
}
checkEmps = checkEmps.OrderByDescending(w => Math.Abs(w.Diff ?? 0)); checkEmps = checkEmps.OrderByDescending(w => Math.Abs(w.Diff ?? 0));
return new DtoModels.Comparison<view_check_emp>() return new DtoModels.Comparison<view_check_emp>()
...@@ -108,7 +122,8 @@ public DtoModels.Comparison<DeptComparisonTotal> CheckView_check_deptUnitRealGiv ...@@ -108,7 +122,8 @@ public DtoModels.Comparison<DeptComparisonTotal> CheckView_check_deptUnitRealGiv
{ {
var queryData = $@"CALL proc_allot_check_dept(@allotId);"; var queryData = $@"CALL proc_allot_check_dept(@allotId);";
var checkEmps = DapperQuery<view_check_emp>(queryData, new { allotId }); var checkEmps = DapperQuery<view_check_emp>(queryData, new { allotId });
var datas = checkEmps.Where(w => w.Diff != 0).GroupBy(w => w.UnitType).Select(w => new DeptComparisonTotal var list = checkEmps.Where(w => w.Diff != 0).ToList();
var datas = list.GroupBy(w => w.UnitType).Select(w => new DeptComparisonTotal
{ {
UnitType = w.Key, UnitType = w.Key,
Count = w.Count(), Count = w.Count(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment