Commit 4170b4fa by lcx

Merge branch '手工录入_' into 手工录入

# Conflicts:
#	performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
parents f4080e41 19794494
......@@ -3,6 +3,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Performance.DtoModels;
using Performance.DtoModels.Request;
using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Services;
......@@ -318,6 +319,8 @@ public ApiResponse GetAprDetail([FromBody] per_apr_amount request)
if (employee == null || !employee.Any())
return new ApiResponse(ResponseType.OK, "ok", employee);
var result = employee.GroupBy(t => new { t.AccountingUnit, t.PersonnelNumber, t.DoctorName }).Select(t => new
{
PersonnelNumber = t.Key.PersonnelNumber,
......@@ -767,7 +770,6 @@ public ApiResponse GetGatherHands([FromRoute] int allotId, [FromBody] GatherRequ
{
if (allotId <= 0)
return new ApiResponse(ResponseType.Fail, "参数错误", "allotid无效");
var relust = employeeService.GetGatherHands(allotId, request);
return new ApiResponse(ResponseType.OK, relust);
}
......@@ -780,12 +782,12 @@ public ApiResponse GetGatherHands([FromRoute] int allotId, [FromBody] GatherRequ
/// <returns></returns>
[Route("savegatherhands/{allotId}")]
[HttpPost]
public ApiResponse SaveGatherHands(int allotId, [FromBody] SaveGatherData request)
public ApiResponse SaveGatherHands([FromRoute] int allotId, [FromBody] SaveGatherData request)
{
if (allotId <= 0)
return new ApiResponse(ResponseType.Fail, "参数错误", "allotid无效");
if (string.IsNullOrEmpty(request.Source) || string.IsNullOrEmpty(request.Category))
return new ApiResponse(ResponseType.OK);
return new ApiResponse(ResponseType.Fail);
employeeService.SaveGatherHands(allotId, request);
return new ApiResponse(ResponseType.OK);
......@@ -795,33 +797,40 @@ public ApiResponse SaveGatherHands(int allotId, [FromBody] SaveGatherData reques
/// 手工录入列表 - 明细
/// </summary>
/// <param name="allotId"></param>
/// <param name="request"></param>
/// <param name="department">科室</param>
/// <param name="source">来源</param>
/// <param name="request">分页</param>
/// <returns></returns>
[Route("getgather/{allotId}")]
[Route("getgather/{allotId},{department},{source}")]
[HttpPost]
public ApiResponse GetGather([FromRoute] int allotId, [FromBody] PersonParamsRequest request)
public ApiResponse GetGather([FromRoute] int allotId,string department,string source,[FromBody] PersonParamsRequest request)
{
if (allotId <= 0)
return new ApiResponse(ResponseType.Fail, "参数错误", "allotid无效");
if (allotId <= 0 || string.IsNullOrEmpty(department) || string.IsNullOrEmpty(source))
return new ApiResponse(ResponseType.Fail, "参数错误", "请检查allotId,department,source是否正确");
var result = employeeService.GetGather(allotId, request);
var result = employeeService.GetGather(allotId, department, source, request);
return new ApiResponse(ResponseType.OK, result);
}
/// <summary>
/// 手工录入列表 - 汇总
/// </summary>
/// <param name="allotId"></param>
/// <param name="request"></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);
}
if (allotId <= 0)
return new ApiResponse(ResponseType.Fail, "参数错误", "allotid无效");
var result = employeeService.GetGatherTotal(allotId, request);
return new ApiResponse(ResponseType.OK, result);
}
#endregion
}
}
......@@ -1199,7 +1199,7 @@
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetGatherHands(System.Int32,Performance.DtoModels.GatherRequest)">
<summary>
手工录入
手工录入 - 录入界面
</summary>
<param name="allotId"></param>
<param name="request"></param>
......@@ -1213,12 +1213,22 @@
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetGather(System.Int32,Performance.DtoModels.PersonParamsRequest)">
<member name="M:Performance.Api.Controllers.EmployeeController.GetGather(System.Int32,System.String,System.String,Performance.DtoModels.PersonParamsRequest)">
<summary>
手工录入列表
手工录入列表 - 明细
</summary>
<param name="allotId"></param>
<param name="request"></param>
<param name="department">科室</param>
<param name="source">来源</param>
<param name="request">分页</param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetGatherTotal(System.Int32,Performance.DtoModels.PersonParamsRequest)">
<summary>
手工录入列表 - 汇总
</summary>
<param name="allotId"></param>
<param name="request">分页</param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.ExConfigController.Extract(Performance.DtoModels.ModModuleRequest)">
......
......@@ -94,12 +94,19 @@ public class ColumnHeadsConfig
{
public static List<Heads> GatherHeads { get; } = new List<Heads>
{
new Heads{Column="科室",Name=nameof(ex_result_gather.Department)},
new Heads{Column="医生姓名",Name=nameof(ex_result_gather.DoctorName)},
new Heads{Column="人员工号",Name=nameof(ex_result_gather.PersonnelNumber)},
new Heads{Column="费用类型",Name=nameof(ex_result_gather.Category)},
new Heads{Column="费用",Name=nameof(ex_result_gather.Fee)},
new Heads{Column="来源",Name=nameof(ex_result_gather.Source)}
new Heads{Column="来源",Name=nameof(GatherInfoRequest.Source)},
new Heads{Column="科室",Name=nameof(GatherInfoRequest.Department)},
new Heads{Column="医生姓名",Name=nameof(GatherInfoRequest.DoctorName)},
new Heads{Column="人员工号",Name=nameof(GatherInfoRequest.PersonnelNumber)},
new Heads{Column="费用类型",Name=nameof(GatherInfoFee.Category)},
new Heads{Column="费用",Name=nameof(GatherInfoFee.Fee)},
};
public static List<Heads> GatherTotal { get; } = new List<Heads>
{
new Heads{Column="科室",Name=nameof(GatherTotalRequest.Department)},
new Heads{Column="来源",Name=nameof(GatherTotalRequest.Source)},
new Heads{Column="费用",Name=nameof(GatherTotalRequest.Fee)}
};
}
......
using Performance.EntityModels;
using Performance.DtoModels.Request;
using Performance.EntityModels;
using Performance.Infrastructure.Models;
using System.Collections.Generic;
......@@ -7,7 +8,16 @@ namespace Performance.DtoModels
public class GatherResponse
{
public List<Heads> Heads { get; set; }
public PageList<ex_result_gather> Datas { get; set; }
public List<GatherTotalRequest> Datas { get; set; }
public int CurrentPage { get; set; }
public int TotalPages { get; set; }
public int PageSize { get; set; }
public int TotalCount { get; set; }
}
public class GatherInfo
{
public List<Heads> Heads { get; set; }
public List<GatherInfoRequest> Datas { get; set; }
public int CurrentPage { get; set; }
public int TotalPages { get; set; }
public int PageSize { get; set; }
......@@ -28,4 +38,27 @@ public class GatherRequest
public string Source { get; set; }
public string Category { get; set; }
}
public class GatherTotalRequest
{
public int ID { get; set; }
public string Department { get; set; }
public string Source { get; set; }
public decimal Fee { get; set; }
}
public class GatherInfoRequest
{
public string Source { get; set; }
public string Department { get; set; }
public string DoctorName { get; set; }
public string PersonnelNumber { get; set; }
public List<GatherInfoFee> Detail { get; set; }
}
public class GatherInfoFee
{
public string Category { 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);
}
}
}
......@@ -30,13 +30,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)
//{
// var search = "";
......
......@@ -869,6 +869,7 @@ public bool BatchSaveAccounting(int allotId, SaveCollectData request)
var json = JsonHelper.Serialize(item);
var data = JsonHelper.Deserialize<cof_accounting>(json);
data.AllotId = allotId;
if (!unitType.Contains(data?.UnitType) && !string.IsNullOrEmpty(data?.UnitType)) return false;
if (getAccounts != null)
if (getAccounts.Any(t => t.AccountingUnit == data?.AccountingUnit && t.UnitType == data?.UnitType)) continue;
......
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