Commit d76e0d33 by 纪旭 韦

加上了 手工录入列表 - 汇总

parent 6e573a49
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
using Microsoft.AspNetCore.Http.Internal; using Microsoft.AspNetCore.Http.Internal;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Performance.DtoModels; using Performance.DtoModels;
using Performance.DtoModels.Request;
using Performance.EntityModels; using Performance.EntityModels;
using Performance.Infrastructure; using Performance.Infrastructure;
using Performance.Services; using Performance.Services;
...@@ -818,11 +819,28 @@ public ApiResponse GetGather([FromRoute] int allotId, [FromBody] PersonParamsReq ...@@ -818,11 +819,28 @@ public ApiResponse GetGather([FromRoute] int allotId, [FromBody] PersonParamsReq
/// <returns></returns> /// <returns></returns>
[Route("getgathertotal/{allotId}")] [Route("getgathertotal/{allotId}")]
[HttpPost] [HttpPost]
public ApiResponse GetGatherTotal([FromRoute] int allotId, [FromBody] PersonParamsRequest request) public ApiResponse<List<GatherTotalRequest>> GetGatherTotal([FromRoute] int allotId, [FromBody] PersonParamsRequest request)
{ {
return new ApiResponse(ResponseType.OK); //var allot = allotService.GetAllot(allotId);
} //if (null == allot)
// throw new PerformanceException("当前记录不存在");
var list = employeeService.GetGatherTotal(allotId,request);
if (null == list)
throw new PerformanceException("当前记录不存在");
return new ApiResponse<List<GatherTotalRequest>>(ResponseType.OK, "ok", list);
}
///// <summary>
///// 手工录入列表 - 汇总
///// </summary>
///// <param name="allotId"></param>
///// <param name="request"></param>
///// <returns></returns>
//[Route("getgathertotal/{allotId}")]
//[HttpPost]
//public ApiResponse GetGatherTotal([FromRoute] int allotId, [FromBody] PersonParamsRequest request)
//{
// return new ApiResponse(ResponseType.OK);
//}
#endregion #endregion
} }
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
}, },
"AppConnection": { "AppConnection": {
//"PerformanceConnectionString": "server=112.124.13.17;database=db_performance;uid=suvalue;pwd=suvalue2016;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;", //"PerformanceConnectionString": "server=112.124.13.17;database=db_performance;uid=suvalue;pwd=suvalue2016;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"PerformanceConnectionString": "server=192.168.18.166;database=db_performance_screen;uid=root;pwd=1234qwer;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;", "PerformanceConnectionString": "server=192.168.18.166;database=db_test_srfy;uid=root;pwd=1234qwer;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"HangfireConnectionString": "server=192.168.18.166;database=db_hangfire;uid=root;pwd=1234qwer;port=3306;allow user variables=true;", "HangfireConnectionString": "server=192.168.18.166;database=db_hangfire;uid=root;pwd=1234qwer;port=3306;allow user variables=true;",
"RedisConnectionString": "116.62.245.55:6379,defaultDatabase=2" "RedisConnectionString": "116.62.245.55:6379,defaultDatabase=2"
}, },
......
...@@ -1202,7 +1202,7 @@ ...@@ -1202,7 +1202,7 @@
</member> </member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetGatherHands(System.Int32,Performance.DtoModels.GatherRequest)"> <member name="M:Performance.Api.Controllers.EmployeeController.GetGatherHands(System.Int32,Performance.DtoModels.GatherRequest)">
<summary> <summary>
手工录入 手工录入 - 录入界面
</summary> </summary>
<param name="allotId"></param> <param name="allotId"></param>
<param name="request"></param> <param name="request"></param>
...@@ -1218,7 +1218,15 @@ ...@@ -1218,7 +1218,15 @@
</member> </member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetGather(System.Int32,Performance.DtoModels.PersonParamsRequest)"> <member name="M:Performance.Api.Controllers.EmployeeController.GetGather(System.Int32,Performance.DtoModels.PersonParamsRequest)">
<summary> <summary>
手工录入列表 手工录入列表 - 明细
</summary>
<param name="allotId"></param>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetGatherTotal(System.Int32,Performance.DtoModels.PersonParamsRequest)">
<summary>
手工录入列表 - 汇总
</summary> </summary>
<param name="allotId"></param> <param name="allotId"></param>
<param name="request"></param> <param name="request"></param>
......
...@@ -101,6 +101,13 @@ public class ColumnHeadsConfig ...@@ -101,6 +101,13 @@ public class ColumnHeadsConfig
new Heads{Column="费用",Name=nameof(ex_result_gather.Fee)}, new Heads{Column="费用",Name=nameof(ex_result_gather.Fee)},
new Heads{Column="来源",Name=nameof(ex_result_gather.Source)} new Heads{Column="来源",Name=nameof(ex_result_gather.Source)}
}; };
public static List<Heads> GatherTotal { get; } = new List<Heads>
{
new Heads{Column="科室",Name=nameof(ex_result_gather.Department)},
new Heads{Column="来源",Name=nameof(ex_result_gather.Source)},
new Heads{Column="数值",Name=nameof(ex_result_gather.Fee)}
};
} }
} }
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels.Request
{
public class GatherTotalRequest
{
public int ID { get; set; }
public string Department { get; set; }
public string Source { get; set; }
public decimal Fee { get; set; }
}
}
using Performance.EntityModels;
using Performance.Infrastructure.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
namespace Performance.Repository
{
public partial class PerforExresultgatherRepository : PerforRepository<ex_result_gather>
{
public PageList<ex_result_gather> GetGatherForPaging(int pageNumber, int pageSize, Expression<Func<ex_result_gather, bool>> exp)
{
IQueryable<ex_result_gather> queryableAuthors = context.Set<ex_result_gather>()
.Where(exp)
.OrderBy(w => w.Department)
.ThenBy(t => t.PersonnelNumber);
return PageList<ex_result_gather>.Create(queryableAuthors, pageNumber, pageSize);
}
}
}
...@@ -29,13 +29,6 @@ public new PageList<per_employee> GetEntitiesForPaging(int pageNumber, int pageS ...@@ -29,13 +29,6 @@ public new PageList<per_employee> GetEntitiesForPaging(int pageNumber, int pageS
} }
public PageList<ex_result_gather> GetGatherForPaging(int pageNumber, int pageSize, Expression<Func<ex_result_gather, bool>> exp)
{
IQueryable<ex_result_gather> queryableAuthors = context.Set<ex_result_gather>().Where(exp).OrderBy(w => w.Department).ThenBy(t => t.PersonnelNumber);
return PageList<ex_result_gather>.Create(queryableAuthors, pageNumber, pageSize);
}
//public Comparison GetComparison(ComparisonPagingRequest request) //public Comparison GetComparison(ComparisonPagingRequest request)
//{ //{
// var search = ""; // var search = "";
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
using NPOI.SS.Util; using NPOI.SS.Util;
using NPOI.XSSF.UserModel; using NPOI.XSSF.UserModel;
using Performance.DtoModels; using Performance.DtoModels;
using Performance.DtoModels.Request;
using Performance.EntityModels; using Performance.EntityModels;
using Performance.Infrastructure; using Performance.Infrastructure;
using Performance.Repository; using Performance.Repository;
...@@ -1249,7 +1250,8 @@ public GatherResponse GetGather(int allotId, PersonParamsRequest request) ...@@ -1249,7 +1250,8 @@ public GatherResponse GetGather(int allotId, PersonParamsRequest request)
if (request != null && !string.IsNullOrEmpty(request.SearchQuery)) if (request != null && !string.IsNullOrEmpty(request.SearchQuery))
exp = exp.And(t => t.Department.Contains(request.SearchQuery) || t.DoctorName.Contains(request.SearchQuery) || t.PersonnelNumber.Contains(request.SearchQuery) || t.Category.Contains(request.SearchQuery) || t.Source.Contains(request.SearchQuery)); exp = exp.And(t => t.Department.Contains(request.SearchQuery) || t.DoctorName.Contains(request.SearchQuery) || t.PersonnelNumber.Contains(request.SearchQuery) || t.Category.Contains(request.SearchQuery) || t.Source.Contains(request.SearchQuery));
var data = peremployeeRepository.GetGatherForPaging(request.PageNumber, request.PageSize, exp); var data = exresultgatherRepository.GetGatherForPaging(request.PageNumber, request.PageSize, exp);
return new GatherResponse() return new GatherResponse()
{ {
...@@ -1262,6 +1264,22 @@ public GatherResponse GetGather(int allotId, PersonParamsRequest request) ...@@ -1262,6 +1264,22 @@ public GatherResponse GetGather(int allotId, PersonParamsRequest request)
}; };
} }
public List<GatherTotalRequest> GetGatherTotal(int allotId, PersonParamsRequest request)
{
Expression<Func<ex_result_gather, bool>> exp = t => t.AllotId == allotId;
if (request != null && !string.IsNullOrEmpty(request.SearchQuery))
exp = exp.And(t => t.Department.Contains(request.SearchQuery) || t.DoctorName.Contains(request.SearchQuery) || t.PersonnelNumber.Contains(request.SearchQuery) || t.Category.Contains(request.SearchQuery) || t.Source.Contains(request.SearchQuery));
var list = exresultgatherRepository.GetGatherForPaging(request.PageNumber, request.PageSize, exp);
List<GatherTotalRequest> deptTotal = Mapper.Map<List<GatherTotalRequest>>(list);
return deptTotal;
}
public static Dictionary<string, string> Gather { get; } = new Dictionary<string, string> public static Dictionary<string, string> Gather { get; } = new Dictionary<string, string>
{ {
{nameof(ex_result_gather.Department), "科室"}, {nameof(ex_result_gather.Department), "科室"},
...@@ -1305,6 +1323,8 @@ public GatherResponse GetGather(int allotId, PersonParamsRequest request) ...@@ -1305,6 +1323,8 @@ public GatherResponse GetGather(int allotId, PersonParamsRequest request)
return result; return result;
} }
#endregion #endregion
} }
......
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