Commit eda39454 by ruyun.zhang

Merge branch 'develop' into feature/考核

parents 8c3a6172 9006f2d6
diff a/performance/Performance.Api/Controllers/AttendanceController.cs b/performance/Performance.Api/Controllers/AttendanceController.cs (rejected hunks)
@@ -160,7 +160,6 @@
/// <param name="allotId"></param>
/// <param name="attendanceType"></param>
/// <returns></returns>
- [HttpPost("Type/Edit/{allotId},{hospitalId}")]
[HttpPost("Type/Edit/{allotId}")]
public ApiResponse<AttendanceType> InsertAttendanceType(int allotId, AttendanceType attendanceType)
{
...@@ -901,6 +901,7 @@ public ApiResponse CopyDropDown() ...@@ -901,6 +901,7 @@ public ApiResponse CopyDropDown()
//new CopyDrop{Label="收入费用类别",Value="drugTypes"}, //new CopyDrop{Label="收入费用类别",Value="drugTypes"},
new CopyDrop{Label="支出费用类别",Value="drugTypeDisburses"}, new CopyDrop{Label="支出费用类别",Value="drugTypeDisburses"},
new CopyDrop{Label="费用类别系数",Value="drugTypeFactors"}, new CopyDrop{Label="费用类别系数",Value="drugTypeFactors"},
new CopyDrop{Label="考勤类型",Value="attendanceType"},
//new CopyDrop{Label="科室类型",Value="deptTypes"}, //new CopyDrop{Label="科室类型",Value="deptTypes"},
new CopyDrop{Label="二次绩效配置",Value="agains"}, new CopyDrop{Label="二次绩效配置",Value="agains"},
}; };
......
...@@ -612,10 +612,22 @@ public ApiResponse<List<TitleValue>> ClearAprData([FromBody] AprAmountAuditReque ...@@ -612,10 +612,22 @@ public ApiResponse<List<TitleValue>> ClearAprData([FromBody] AprAmountAuditReque
/// <param name="request"></param> /// <param name="request"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost("autocomplate")] [HttpPost("autocomplate")]
public ApiResponse<List<view_per_apr_amount>> GetEmployeeMessage([FromBody] per_apr_amount request) public ApiResponse<List<AutocomplateEmployeeResponse>> GetEmployeeMessage([FromBody] per_apr_amount request)
{ {
var result = employeeService.GetEmployeeMessage(request.AllotId, request.PersonnelNumber, request.DoctorName, claim.GetUserId()); var userId = claim.GetUserId();
return new ApiResponse<List<view_per_apr_amount>>(ResponseType.OK, "人员信息", result); var user = userService.GetUserIdentity(userId);
var result = employeeService.GetEmployeeMessage(request.AllotId, request.PersonnelNumber, request.DoctorName, userId);
var res = result.Select(t => new AutocomplateEmployeeResponse
{
AllotId = request.AllotId,
PersonnelNumber = t.PersonnelNumber,
DoctorName = t.DoctorName,
TypeInDepartment = user.Department,
AccountingUnit = t.AccountingUnit,
PermanentStaff = t.PermanentStaff,
}).ToList();
return new ApiResponse<List<AutocomplateEmployeeResponse>>(ResponseType.OK, "人员信息", res);
} }
/// <summary> /// <summary>
...@@ -1193,10 +1205,10 @@ public ApiResponse<List<per_apr_amount_type>> GetAprTypeList([FromRoute] int all ...@@ -1193,10 +1205,10 @@ public ApiResponse<List<per_apr_amount_type>> GetAprTypeList([FromRoute] int all
[HttpPost] [HttpPost]
public ApiResponse<AprTypeRequest> InsertAprType([FromBody] AprTypeRequest request) public ApiResponse<AprTypeRequest> InsertAprType([FromBody] AprTypeRequest request)
{ {
var createUser = claim.GetUserId(); var createUser = claim.GetUserId();
return employeeService.InsertAprType(createUser, request); return employeeService.InsertAprType(createUser, request);
} }
/// <summary> /// <summary>
......
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
...@@ -52,6 +53,40 @@ public ApiResponse GetPersons([FromRoute] int allotId, [FromBody] PersonParamsRe ...@@ -52,6 +53,40 @@ public ApiResponse GetPersons([FromRoute] int allotId, [FromBody] PersonParamsRe
} }
/// <summary> /// <summary>
/// 获取所有员工记录
/// </summary>
/// <param name="allotId">绩效月ID</param>
/// <param name="personnelNumber">工号</param>
/// <param name="personnelName">姓名</param>
/// <param name="unitType">核算组别</param>
/// <param name="accountingUnit">核算单元</param>
/// <param name="searchText">多字段查询;支持“工号/姓名/核算组别/核算单元”</param>
/// <param name="pageIndex">页码 默认1</param>
/// <param name="pageSize">行数 默认</param>
/// <returns></returns>
[Route("employee/list")]
[HttpPost]
public ApiResponse GetEmployee([FromQuery] int allotId,
[FromQuery, DefaultValue("")] string personnelNumber,
[FromQuery, DefaultValue("")] string personnelName,
[FromQuery, DefaultValue("")] string unitType,
[FromQuery, DefaultValue("")] string accountingUnit,
[FromQuery, DefaultValue("")] string searchText,
[FromQuery, DefaultValue(1)] int pageIndex,
[FromQuery, DefaultValue(20)] int pageSize)
{
var list = personService.GetEmployee(allotId, personnelNumber, personnelName, unitType, accountingUnit, searchText, pageIndex, pageSize);
return new ApiResponse(ResponseType.OK, new
{
list.CurrentPage,
list.TotalPages,
list.PageSize,
list.TotalCount,
list
});
}
/// <summary>
/// 新增员工信息 /// 新增员工信息
/// </summary> /// </summary>
/// <param name="request"></param> /// <param name="request"></param>
......
...@@ -12,27 +12,37 @@ ...@@ -12,27 +12,37 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<!-- 将当前时间转换成23.4.25.4566格式作为版本号的一部分 -->
<VersionSuffix>$([System.DateTime]::UtcNow.ToString(yy.M.d.mmff))</VersionSuffix>
<AssemblyVersion Condition=" '$(VersionSuffix)' == '' ">0.0.0.1</AssemblyVersion>
<AssemblyVersion Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)</AssemblyVersion>
<Version Condition=" '$(VersionSuffix)' == '' ">0.0.1.0</Version>
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)</Version>
<Product>医院绩效管理平台</Product>
</PropertyGroup>
<PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest> <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
<UserSecretsId>e732666b-5531-4cd8-b713-2fe3db31126c</UserSecretsId> <UserSecretsId>e732666b-5531-4cd8-b713-2fe3db31126c</UserSecretsId>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="Files\**" /> <Compile Remove="Files\**" />
<Content Remove="Files\**" /> <Content Remove="Files\**" />
<EmbeddedResource Remove="Files\**" /> <EmbeddedResource Remove="Files\**" />
<None Remove="Files\**" /> <None Remove="Files\**" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="secret.key"> <Content Include="secret.key">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="XC.RSAUtil" Version="1.3.6" /> <PackageReference Include="XC.RSAUtil" Version="1.3.6" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Performance.DtoModels\Performance.DtoModels.csproj" /> <ProjectReference Include="..\Performance.DtoModels\Performance.DtoModels.csproj" />
<ProjectReference Include="..\Performance.Services\Performance.Services.csproj" /> <ProjectReference Include="..\Performance.Services\Performance.Services.csproj" />
...@@ -46,16 +56,16 @@ ...@@ -46,16 +56,16 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Update="wwwroot\Performance.Api.xml"> <Content Update="wwwroot\Performance.Api.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Update="wwwroot\Performance.DtoModels.xml"> <Content Update="wwwroot\Performance.DtoModels.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Update="wwwroot\Performance.DtoModels.xml"> <Content Update="wwwroot\Performance.DtoModels.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Update="wwwroot\Performance.EntityModels.xml"> <Content Update="wwwroot\Performance.EntityModels.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
</ItemGroup> </ItemGroup>
...@@ -70,7 +80,7 @@ ...@@ -70,7 +80,7 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Template\医院人员绩效模板.xlsx"> <None Update="Template\医院人员绩效模板.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Template\医院绩效模板%28无执行科室%29.xlsx"> <None Update="Template\医院绩效模板%28无执行科室%29.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
...@@ -94,16 +104,18 @@ ...@@ -94,16 +104,18 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Template\工作量数据导入模板.xlsx"> <None Update="Template\工作量数据导入模板.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="wwwroot\" /> <Folder Include="wwwroot\" />
</ItemGroup> </ItemGroup>
<ProjectExtensions> <ProjectExtensions>
<VisualStudio><UserProperties appsettings_1json__JSONSchema="" appsettings_1localhost_1json__JsonSchema="https://cdn.jsdelivr.net/gh/roadrunner-server/roadrunner@latest/schemas/config/2.0.schema.json" /></VisualStudio> <VisualStudio>
<UserProperties appsettings_1json__JSONSchema="" appsettings_1localhost_1json__JsonSchema="https://cdn.jsdelivr.net/gh/roadrunner-server/roadrunner@latest/schemas/config/2.0.schema.json" />
</VisualStudio>
</ProjectExtensions> </ProjectExtensions>
</Project> </Project>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
"/api/account/updateuser" "/api/account/updateuser"
], ],
//登录过期时间 //登录过期时间
"ExpirationMinutes": "1200", "ExpirationMinutes": "1200000",
//验证码过期 //验证码过期
"SmsCodeMinutes": "5", "SmsCodeMinutes": "5",
////护士长二次绩效管理员 ////护士长二次绩效管理员
......
...@@ -352,7 +352,7 @@ ...@@ -352,7 +352,7 @@
<member name="P:Performance.EntityModels.PerformanceDbContext.per_attendance"> <member name="P:Performance.EntityModels.PerformanceDbContext.per_attendance">
<summary>调动记录表</summary> <summary>调动记录表</summary>
</member> </member>
<member name="P:Performance.EntityModels.PerformanceDbContext.per_attendance_issue"> <member name="P:Performance.EntityModels.PerformanceDbContext.per_attendance_dept">
<summary>考勤结果</summary> <summary>考勤结果</summary>
</member> </member>
<member name="P:Performance.EntityModels.PerformanceDbContext.per_attendance_type"> <member name="P:Performance.EntityModels.PerformanceDbContext.per_attendance_type">
...@@ -6160,6 +6160,166 @@ ...@@ -6160,6 +6160,166 @@
修改时间 修改时间
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.Entity.per_attendance.PermanentStaff">
<summary>
人员系数
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.Id">
<summary>
自增主键
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.HospitalId">
<summary>
医院Id,可空
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.AllotId">
<summary>
绩效Id
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.PersonnelNumber">
<summary>
工号
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.PersonnelName">
<summary>
姓名
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.PermanentStaff">
<summary>
人员系数
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.Code">
<summary>
核算单元编码
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.UnitType">
<summary>
人员类别
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.AccountingUnit">
<summary>
核算单元
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.State">
<summary>
状态(未提交 = 0,提交 = 1,通过 = 2,驳回 = 3)
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.SubmitUser">
<summary>
提交用户
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.SubmitTime">
<summary>
提交时间
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.AuditUser">
<summary>
审核用户
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.AuditTime">
<summary>
审核时间
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.Remarks">
<summary>
备注
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept.Day01">
<summary>
01日
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.HospitalId">
<summary>
医院Id
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.AllotId">
<summary>
绩效Id
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.Code">
<summary>
核算单元编码
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.UnitType">
<summary>
人员类别
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.AccountingUnit">
<summary>
核算单元
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.PersonnelNumber">
<summary>
工号
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.PersonnelName">
<summary>
姓名
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.PermanentStaff">
<summary>
人员系数
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.BeginDate">
<summary>
在科开始时间
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.EndDate">
<summary>
在科结束时间
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.WorkFullDays">
<summary>
全勤天数
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.AttendanceDays">
<summary>
出勤天数
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.DeductionDays">
<summary>
核减天数
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.NoDeductionDays">
<summary>
不核减天数
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_dept_report.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_issue.HospitalId"> <member name="P:Performance.EntityModels.Entity.per_attendance_issue.HospitalId">
<summary> <summary>
医院Id 医院Id
...@@ -6195,6 +6355,11 @@ ...@@ -6195,6 +6355,11 @@
姓名 姓名
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.Entity.per_attendance_issue.PermanentStaff">
<summary>
人员系数
</summary>
</member>
<member name="P:Performance.EntityModels.Entity.per_attendance_issue.BeginDate"> <member name="P:Performance.EntityModels.Entity.per_attendance_issue.BeginDate">
<summary> <summary>
在科开始时间 在科开始时间
...@@ -7432,7 +7597,7 @@ ...@@ -7432,7 +7597,7 @@
</member> </member>
<member name="P:Performance.EntityModels.per_employee.PermanentStaff"> <member name="P:Performance.EntityModels.per_employee.PermanentStaff">
<summary> <summary>
核算人 人员系
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.per_employee.EfficiencyNumber"> <member name="P:Performance.EntityModels.per_employee.EfficiencyNumber">
...@@ -10060,6 +10225,11 @@ ...@@ -10060,6 +10225,11 @@
姓名 姓名
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.Other.view_attendance.PermanentStaff">
<summary>
人员系数
</summary>
</member>
<member name="P:Performance.EntityModels.Other.view_attendance.AttendanceDate"> <member name="P:Performance.EntityModels.Other.view_attendance.AttendanceDate">
<summary> <summary>
考勤时间 考勤时间
......
...@@ -38,5 +38,9 @@ public class Application ...@@ -38,5 +38,9 @@ public class Application
/// 开启反SQL注入白名单地址 /// 开启反SQL注入白名单地址
/// </summary> /// </summary>
public string[] AntiSqlInjectRouteWhite { get; set; } public string[] AntiSqlInjectRouteWhite { get; set; }
/// <summary>
/// 夜班绩效文本名称
/// </summary>
public string[] NightShiftTexts { get; set; }
} }
} }
using AutoMapper; using AutoMapper;
using Performance.DtoModels.Request; using Performance.DtoModels.Request;
using Performance.DtoModels.Response;
using Performance.EntityModels; using Performance.EntityModels;
using Performance.EntityModels.Entity; using Performance.EntityModels.Entity;
using Performance.Infrastructure; using Performance.Infrastructure;
...@@ -276,8 +277,7 @@ public AutoMapperConfigs() ...@@ -276,8 +277,7 @@ public AutoMapperConfigs()
CreateMap<cof_workitem, WorkItemRequest>() CreateMap<cof_workitem, WorkItemRequest>()
.ReverseMap(); .ReverseMap();
CreateMap<cof_again, CofAgainRequest>() CreateMap<cof_again, CofAgainRequest>().ReverseMap();
.ReverseMap();
CreateMap<AddAssessSchemeItemsRequest, per_assess_scheme_items>() CreateMap<AddAssessSchemeItemsRequest, per_assess_scheme_items>()
.ReverseMap(); .ReverseMap();
...@@ -291,6 +291,10 @@ public AutoMapperConfigs() ...@@ -291,6 +291,10 @@ public AutoMapperConfigs()
.ReverseMap(); .ReverseMap();
CreateMap<per_assess_scheme, AssessSchemeDataResponse>() CreateMap<per_assess_scheme, AssessSchemeDataResponse>()
.ReverseMap(); .ReverseMap();
CreateMap<AttendanceData, per_attendance>().ReverseMap();
CreateMap<AttendanceVacationData, per_attendance_vacation>().ReverseMap();
} }
} }
} }
...@@ -124,6 +124,16 @@ public enum State ...@@ -124,6 +124,16 @@ public enum State
确认 = 2, 确认 = 2,
驳回 = 3, 驳回 = 3,
} }
/// <summary>
/// 考勤上报
/// </summary>
public enum Report
{
未提交 = 1,
提交 = 2,
通过 = 3,
驳回 = 4,
}
public enum OperationType public enum OperationType
{ {
全部 = 0, 全部 = 0,
......
...@@ -14,11 +14,13 @@ public PerAttendanceIssueDto() ...@@ -14,11 +14,13 @@ public PerAttendanceIssueDto()
{ } { }
public PerAttendanceIssueDto(AttendanceStatistics item) public PerAttendanceIssueDto(AttendanceStatistics item)
{ {
Id = 0;
Code = item.Code; Code = item.Code;
UnitType = item.UnitType; UnitType = item.UnitType;
AccountingUnit = item.AccountingUnit; AccountingUnit = item.AccountingUnit;
PersonnelNumber = item.PersonnelNumber; PersonnelNumber = item.PersonnelNumber;
PersonnelName = item.PersonnelName; PersonnelName = item.PersonnelName;
PermanentStaff = item.PermanentStaff;
BeginDate = item.BeginDate; BeginDate = item.BeginDate;
EndDate = item.EndDate; EndDate = item.EndDate;
DeductionDays = item.Detial.Where(w => !w.Remark.Contains("不核减")).Sum(w => w.Value); DeductionDays = item.Detial.Where(w => !w.Remark.Contains("不核减")).Sum(w => w.Value);
...@@ -31,11 +33,13 @@ public PerAttendanceIssueDto(AttendanceStatistics item) ...@@ -31,11 +33,13 @@ public PerAttendanceIssueDto(AttendanceStatistics item)
public PerAttendanceIssueDto(per_attendance_issue item) public PerAttendanceIssueDto(per_attendance_issue item)
{ {
Id = item.Id;
Code = item.Code; Code = item.Code;
UnitType = item.UnitType; UnitType = item.UnitType;
AccountingUnit = item.AccountingUnit; AccountingUnit = item.AccountingUnit;
PersonnelNumber = item.PersonnelNumber; PersonnelNumber = item.PersonnelNumber;
PersonnelName = item.PersonnelName; PersonnelName = item.PersonnelName;
PermanentStaff = item.PermanentStaff;
BeginDate = item.BeginDate; BeginDate = item.BeginDate;
EndDate = item.EndDate; EndDate = item.EndDate;
DeductionDays = item.DeductionDays; DeductionDays = item.DeductionDays;
...@@ -48,6 +52,7 @@ public PerAttendanceIssueDto(per_attendance_issue item) ...@@ -48,6 +52,7 @@ public PerAttendanceIssueDto(per_attendance_issue item)
//public int HospitalId { get; set; } //医院Id //public int HospitalId { get; set; } //医院Id
//public int AllotId { get; set; } //绩效Id //public int AllotId { get; set; } //绩效Id
public int Id { get; set; }
public string Code { get; set; } //核算单元编码 public string Code { get; set; } //核算单元编码
/// <summary> /// <summary>
/// 人员类别 /// 人员类别
...@@ -66,6 +71,10 @@ public PerAttendanceIssueDto(per_attendance_issue item) ...@@ -66,6 +71,10 @@ public PerAttendanceIssueDto(per_attendance_issue item)
/// </summary> /// </summary>
public string PersonnelName { get; set; } public string PersonnelName { get; set; }
/// <summary> /// <summary>
/// 人员系数
/// </summary>
public decimal? PermanentStaff { get; set; }
/// <summary>
/// 在科开始时间 /// 在科开始时间
/// </summary> /// </summary>
public DateTime? BeginDate { get; set; } public DateTime? BeginDate { get; set; }
......
using System;
using System.Collections.Generic;
namespace Performance.DtoModels.Request
{
public class AttendanceDeptAudit
{
/// <summary>
/// 状态(通过 = 3,驳回 = 4)
/// </summary>
public int State { get; set; }
/// <summary>
/// 说明
/// </summary>
public string Remark { get; set; }
}
public class AttendanceDept
{
/// <summary>
/// 工号
/// </summary>
public string PersonnelNumber { get; set; }
/// <summary>
/// 姓名
/// </summary>
public string PersonnelName { get; set; }
/// <summary>
/// 人员系数
/// </summary>
public decimal? PermanentStaff { get; set; }
/// <summary>
/// 01日
/// </summary>
public string Day01 { get; set; }
public string Day02 { get; set; }
public string Day03 { get; set; }
public string Day04 { get; set; }
public string Day05 { get; set; }
public string Day06 { get; set; }
public string Day07 { get; set; }
public string Day08 { get; set; }
public string Day09 { get; set; }
public string Day10 { get; set; }
public string Day11 { get; set; }
public string Day12 { get; set; }
public string Day13 { get; set; }
public string Day14 { get; set; }
public string Day15 { get; set; }
public string Day16 { get; set; }
public string Day17 { get; set; }
public string Day18 { get; set; }
public string Day19 { get; set; }
public string Day20 { get; set; }
public string Day21 { get; set; }
public string Day22 { get; set; }
public string Day23 { get; set; }
public string Day24 { get; set; }
public string Day25 { get; set; }
public string Day26 { get; set; }
public string Day27 { get; set; }
public string Day28 { get; set; }
public string Day29 { get; set; }
public string Day30 { get; set; }
public string Day31 { get; set; }
}
public class AttendanceDeptMore : AttendanceDept
{
/// <summary>
/// 绩效Id
/// </summary>
public int AllotId { get; set; }
/// <summary>
/// 核算单元编码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 核算组别
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 状态(未提交 = 1,提交 = 2,通过 = 3,驳回 = 4)
/// </summary>
public int State { get; set; }
/// <summary>
/// 提交用户
/// </summary>
public string SubmitUser { get; set; }
/// <summary>
/// 提交时间
/// </summary>
public DateTime? SubmitTime { get; set; }
/// <summary>
/// 审核用户
/// </summary>
public string AuditUser { get; set; }
/// <summary>
/// 审核时间
/// </summary>
public DateTime? AuditTime { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remarks { get; set; }
}
public class AttendanceDeptDetail
{
public List<TColumn> Columns { get; set; }
public List<AttendanceDeptMore> Data { get; set; }
}
}
...@@ -38,6 +38,10 @@ public class AttendanceAuditDetail ...@@ -38,6 +38,10 @@ public class AttendanceAuditDetail
/// </summary> /// </summary>
public string PersonnelName { get; set; } public string PersonnelName { get; set; }
/// <summary> /// <summary>
/// 人员系数
/// </summary>
public decimal PermanentStaff { get; set; }
/// <summary>
/// 在科开始时间 /// 在科开始时间
/// </summary> /// </summary>
public DateTime? BeginDate { get; set; } public DateTime? BeginDate { get; set; }
...@@ -85,7 +89,7 @@ public class AttendanceAuditDetails ...@@ -85,7 +89,7 @@ public class AttendanceAuditDetails
/// <summary> /// <summary>
/// 请假天数 /// 请假天数
/// </summary> /// </summary>
public int Value { get; set; } public object Value { get; set; }
/// <summary> /// <summary>
/// 考勤类型 /// 考勤类型
/// </summary> /// </summary>
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Performance.DtoModels.Response
{
public class AttendanceData : AttendanceUpdateData
{
/// <summary>
/// 工号
/// </summary>
public string PersonnelNumber { get; set; }
/// <summary>
/// 姓名
/// </summary>
public string PersonnelName { get; set; }
}
public class AttendanceUpdateData
{
/// <summary>
/// 拿来修改的id
/// </summary>
public int AttendanceId { get; set; }
/// <summary>
/// 人员系数
/// </summary>
public decimal? PermanentStaff { get; set; }
/// <summary>
/// 人员类别
/// </summary>
public string CallInUnitType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string CallInAccountingUnit { get; set; }
/// <summary>
/// 调入时间
/// </summary>
public DateTime? CallInDate { get; set; }
}
}
using System;
namespace Performance.DtoModels.Response
{
public class AttendanceDeptState : AttendanceDeptAuditList
{
/// <summary>
/// 标题名
/// </summary>
public string Title { get; set; }
}
public class AttendanceDeptAuditList
{
/// <summary>
/// 编码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 核算组别
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 总下发数
/// </summary>
public int Count { get; set; }
/// <summary>
/// 确认数
/// </summary>
public int ConfirmCount { get; set; }
/// <summary>
/// 通过数
/// </summary>
public int FinishCount { get; set; }
/// <summary>
/// 驳回数
/// </summary>
public int RejectCount { get; set; }
/// <summary>
/// 状态(未提交 = 1,提交 = 2,通过 = 3,驳回 = 4)
/// </summary>
public int State { get; set; }
/// <summary>
/// 提交人
/// </summary>
public string SubmitUser { get; set; }
/// <summary>
/// 提交时间
/// </summary>
public DateTime? SubmitTime { get; set; }
/// <summary>
/// 审核人
/// </summary>
public string AuditUser { get; set; }
/// <summary>
/// 审核时间
/// </summary>
public DateTime? AuditTime { get; set; }
/// <summary>
/// 状态描述
/// </summary>
public string Remarks { get; set; }
}
}
using System;
using System.Collections.Generic;
namespace Performance.DtoModels
{
public class AttendanceDeptReport
{
/// <summary>
/// 核算单元编码
/// </summary>
public string Code { get; set; }
/// <summary>
///
/// </summary>
public int AllotID { get; set; }
/// <summary>
/// 核算组别
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 科室名称
/// </summary>
public string Department { get; set; }
/// <summary>
/// 工号
/// </summary>
public string PersonnelNumber { get; set; }
/// <summary>
/// 姓名
/// </summary>
public string PersonnelName { get; set; }
/// <summary>
/// 人员系数
/// </summary>
public decimal? PermanentStaff { get; set; }
/// <summary>
/// 在科开始时间
/// </summary>
public DateTime BeginDate { get; set; }
/// <summary>
/// 在科结束时间
/// </summary>
public DateTime EndDate { get; set; }
public List<AttendanceDeptReportItem> Detial { get; set; }
/// <summary>
/// 出勤天数
/// </summary>
public int AttendanceDays { get; set; }
}
public class AttendanceDeptReportItem
{
/// <summary>
/// 请假天数
/// </summary>
public object Value { get; set; }
/// <summary>
/// 考勤类型
/// </summary>
public string Title { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}
...@@ -34,6 +34,10 @@ public class AttendanceStatistics ...@@ -34,6 +34,10 @@ public class AttendanceStatistics
/// </summary> /// </summary>
public string PersonnelName { get; set; } public string PersonnelName { get; set; }
/// <summary> /// <summary>
/// 人员系数
/// </summary>
public decimal? PermanentStaff { get; set; }
/// <summary>
/// 在科开始时间 /// 在科开始时间
/// </summary> /// </summary>
public DateTime BeginDate { get; set; } public DateTime BeginDate { get; set; }
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Performance.DtoModels.Response
{
public class AttendanceVacationData : AttendanceVacationUpdateData
{
/// <summary>
/// 工号
/// </summary>
public string PersonnelNumber { get; set; }
/// <summary>
/// 姓名
/// </summary>
public string PersonnelName { get; set; }
}
public class AttendanceVacationUpdateData
{
/// <summary>
/// 拿来修改的id
/// </summary>
public int AttendanceVacationId { get; set; }
/// <summary>
/// per_attendance_type表中ID
/// </summary>
public int TypeId { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public DateTime? BegDate { get; set; }
/// <summary>
/// 结束时间
/// </summary>
public DateTime? EndDate { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Performance.DtoModels.Response
{
public class AutocomplateEmployeeResponse
{
/// <summary>
///
/// </summary>
public int AllotId { get; set; }
/// <summary>
/// 人员工号
/// </summary>
public string PersonnelNumber { get; set; }
/// <summary>
/// 医生姓名
/// </summary>
public string DoctorName { get; set; }
/// <summary>
/// 录入科室
/// </summary>
public string TypeInDepartment { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 人员系数
/// </summary>
public decimal? PermanentStaff { get; set; }
}
}
...@@ -20,7 +20,10 @@ public class DeptResponse ...@@ -20,7 +20,10 @@ public class DeptResponse
/// ///
/// </summary> /// </summary>
public Nullable<int> SheetID { get; set; } public Nullable<int> SheetID { get; set; }
/// <summary>
/// 组别编码
/// </summary>
public string Code { get; set; }
public int UnitType { get; set; } public int UnitType { get; set; }
/// <summary> /// <summary>
......
namespace Performance.DtoModels
{
public class TColumn
{
public TColumn()
{
}
public TColumn(string field, string title, int width = 80, string @fixed = "", bool sortable = false)
{
Field = field;
Title = title;
Width = width;
Fixed = @fixed;
Sortable = sortable;
}
public string Field { get; set; }
public string Title { get; set; }
public int Width { get; set; }
public string Fixed { get; set; }
public bool Sortable { get; set; }
}
}
...@@ -258,6 +258,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options) ...@@ -258,6 +258,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
/// <summary>调动记录表</summary> /// <summary>调动记录表</summary>
public virtual DbSet<per_attendance> per_attendance { get; set; } public virtual DbSet<per_attendance> per_attendance { get; set; }
/// <summary>考勤结果</summary> /// <summary>考勤结果</summary>
public virtual DbSet<per_attendance_dept> per_attendance_dept { get; set; }
public virtual DbSet<per_attendance_dept_report> per_attendance_dept_report { get; set; }
public virtual DbSet<per_attendance_issue> per_attendance_issue { get; set; } public virtual DbSet<per_attendance_issue> per_attendance_issue { get; set; }
/// <summary>考勤类型</summary> /// <summary>考勤类型</summary>
public virtual DbSet<per_attendance_type> per_attendance_type { get; set; } public virtual DbSet<per_attendance_type> per_attendance_type { get; set; }
......
...@@ -17,6 +17,10 @@ public class per_attendance ...@@ -17,6 +17,10 @@ public class per_attendance
public int AllotId { get; set; } //绩效Id public int AllotId { get; set; } //绩效Id
public string PersonnelNumber { get; set; } //工号 public string PersonnelNumber { get; set; } //工号
public string PersonnelName { get; set; } //姓名 public string PersonnelName { get; set; } //姓名
/// <summary>
/// 人员系数
/// </summary>
public decimal? PermanentStaff { get; set; }
public string CallInUnitType { get; set; } //人员类别 public string CallInUnitType { get; set; } //人员类别
public string CallInAccountingUnit { get; set; } //核算单元 public string CallInAccountingUnit { get; set; } //核算单元
public DateTime? CallInDate { get; set; } //调入时间 public DateTime? CallInDate { get; set; } //调入时间
......
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels.Entity
{
[Table("per_attendance_dept")]
public class per_attendance_dept
{
/// <summary>
/// 自增主键
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
/// 医院Id,可空
/// </summary>
public int? HospitalId { get; set; }
/// <summary>
/// 绩效Id
/// </summary>
public int AllotId { get; set; }
/// <summary>
/// 工号
/// </summary>
public string PersonnelNumber { get; set; }
/// <summary>
/// 姓名
/// </summary>
public string PersonnelName { get; set; }
/// <summary>
/// 人员系数
/// </summary>
public decimal? PermanentStaff { get; set; }
/// <summary>
/// 核算单元编码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 人员类别
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 状态(未提交 = 0,提交 = 1,通过 = 2,驳回 = 3)
/// </summary>
public int State { get; set; }
/// <summary>
/// 提交用户
/// </summary>
public string SubmitUser { get; set; }
/// <summary>
/// 提交时间
/// </summary>
public DateTime? SubmitTime { get; set; }
/// <summary>
/// 审核用户
/// </summary>
public string AuditUser { get; set; }
/// <summary>
/// 审核时间
/// </summary>
public DateTime? AuditTime { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remarks { get; set; }
/// <summary>
/// 01日
/// </summary>
public int? Day01 { get; set; }
public int? Day02 { get; set; }
public int? Day03 { get; set; }
public int? Day04 { get; set; }
public int? Day05 { get; set; }
public int? Day06 { get; set; }
public int? Day07 { get; set; }
public int? Day08 { get; set; }
public int? Day09 { get; set; }
public int? Day10 { get; set; }
public int? Day11 { get; set; }
public int? Day12 { get; set; }
public int? Day13 { get; set; }
public int? Day14 { get; set; }
public int? Day15 { get; set; }
public int? Day16 { get; set; }
public int? Day17 { get; set; }
public int? Day18 { get; set; }
public int? Day19 { get; set; }
public int? Day20 { get; set; }
public int? Day21 { get; set; }
public int? Day22 { get; set; }
public int? Day23 { get; set; }
public int? Day24 { get; set; }
public int? Day25 { get; set; }
public int? Day26 { get; set; }
public int? Day27 { get; set; }
public int? Day28 { get; set; }
public int? Day29 { get; set; }
public int? Day30 { get; set; }
public int? Day31 { get; set; }
}
}
\ No newline at end of file
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels.Entity
{
[Table("per_attendance_dept_report")]
public class per_attendance_dept_report
{
[Key]
public int Id { get; set; }
/// <summary>
/// 医院Id
/// </summary>
public int HospitalId { get; set; }
/// <summary>
/// 绩效Id
/// </summary>
public int AllotId { get; set; }
/// <summary>
/// 核算单元编码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 人员类别
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 工号
/// </summary>
public string PersonnelNumber { get; set; }
/// <summary>
/// 姓名
/// </summary>
public string PersonnelName { get; set; }
/// <summary>
/// 人员系数
/// </summary>
public decimal? PermanentStaff { get; set; }
/// <summary>
/// 在科开始时间
/// </summary>
public DateTime? BeginDate { get; set; }
/// <summary>
/// 在科结束时间
/// </summary>
public DateTime? EndDate { get; set; }
/// <summary>
/// 全勤天数
/// </summary>
public int WorkFullDays { get; set; }
/// <summary>
/// 出勤天数
/// </summary>
public int AttendanceDays { get; set; }
/// <summary>
/// 核减天数
/// </summary>
public int DeductionDays { get; set; }
/// <summary>
/// 不核减天数
/// </summary>
public int NoDeductionDays { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreateTime { get; set; }
}
}
...@@ -46,6 +46,10 @@ public class per_attendance_issue ...@@ -46,6 +46,10 @@ public class per_attendance_issue
/// </summary> /// </summary>
public string PersonnelName { get; set; } public string PersonnelName { get; set; }
/// <summary> /// <summary>
/// 人员系数
/// </summary>
public decimal? PermanentStaff { get; set; }
/// <summary>
/// 在科开始时间 /// 在科开始时间
/// </summary> /// </summary>
public DateTime? BeginDate { get; set; } public DateTime? BeginDate { get; set; }
......
...@@ -87,7 +87,7 @@ public class per_employee ...@@ -87,7 +87,7 @@ public class per_employee
public Nullable<int> AttendanceDay { get; set; } public Nullable<int> AttendanceDay { get; set; }
/// <summary> /// <summary>
/// 核算人 /// 人员系
/// </summary> /// </summary>
public Nullable<decimal> PermanentStaff { get; set; } public Nullable<decimal> PermanentStaff { get; set; }
......
namespace Performance.EntityModels
{
public class AccountUnit
{
public string AccountingUnit { get; set; }
public string UnitType { get; set; }
}
}
...@@ -12,6 +12,7 @@ public class view_attendance ...@@ -12,6 +12,7 @@ public class view_attendance
public int ALLOTID { get; set; } public int ALLOTID { get; set; }
public int YEAR { get; set; } public int YEAR { get; set; }
public int MONTH { get; set; } public int MONTH { get; set; }
public int Id { get; set; } = 0;
/// <summary> /// <summary>
/// 人员类别 /// 人员类别
/// </summary> /// </summary>
...@@ -29,6 +30,10 @@ public class view_attendance ...@@ -29,6 +30,10 @@ public class view_attendance
/// </summary> /// </summary>
public string PersonnelName { get; set; } public string PersonnelName { get; set; }
/// <summary> /// <summary>
/// 人员系数
/// </summary>
public decimal? PermanentStaff { get; set; }
/// <summary>
/// 考勤时间 /// 考勤时间
/// </summary> /// </summary>
public DateTime AttendanceDate { get; set; } public DateTime AttendanceDate { get; set; }
......
...@@ -2,51 +2,58 @@ ...@@ -2,51 +2,58 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
namespace Performance.Infrastructure
public static partial class UtilExtensions
{ {
public static partial class UtilExtensions public static string RemoveLineBreak(this string text)
{
return text.Replace("\n", "");
}
public static string RemoveEnter(this string text)
{ {
public static string RemoveLineBreak(this string text) return text.Replace("\r", "");
{ }
return text.Replace("\n", ""); public static string RemoveSpace(this string text)
} {
return text.Replace(" ", "");
}
public static string RemoveEnter(this string text) public static string Clean(this string text)
{ {
return text.Replace("\r", ""); return text.Trim().RemoveEnter().RemoveLineBreak().RemoveSpace();
} }
/// <summary> /// <summary>
/// 分隔 移除空项 /// 分隔 移除空项
/// </summary> /// </summary>
/// <param name="text"></param> /// <param name="text"></param>
/// <param name="separator"></param> /// <param name="separator"></param>
/// <returns></returns> /// <returns></returns>
public static string[] SplitRemoveEmpty(this string text, params string[] separator) public static string[] SplitRemoveEmpty(this string text, params string[] separator)
{ {
return text.Split(separator, StringSplitOptions.RemoveEmptyEntries); return text.Split(separator, StringSplitOptions.RemoveEmptyEntries);
} }
/// <summary> /// <summary>
/// 确定此字符串实例的开头是否与指定的匹配 忽略字母的大小写 /// 确定此字符串实例的开头是否与指定的匹配 忽略字母的大小写
/// </summary> /// </summary>
/// <param name="text"></param> /// <param name="text"></param>
/// <param name="value"></param> /// <param name="value"></param>
/// <returns></returns> /// <returns></returns>
public static bool StartsWithIgnoreCase(this string text, string value) public static bool StartsWithIgnoreCase(this string text, string value)
{ {
return text.StartsWith(value, StringComparison.OrdinalIgnoreCase); return text.StartsWith(value, StringComparison.OrdinalIgnoreCase);
} }
/// <summary> /// <summary>
/// 确定此字符串是否与指定的字符串对象具有相同的值 忽略字母的大小写 /// 确定此字符串是否与指定的字符串对象具有相同的值 忽略字母的大小写
/// </summary> /// </summary>
/// <param name="text"></param> /// <param name="text"></param>
/// <param name="value"></param> /// <param name="value"></param>
/// <returns></returns> /// <returns></returns>
public static bool EqualsIgnoreCase(this string text, string value) public static bool EqualsIgnoreCase(this string text, string value)
{ {
return text.Equals(value, StringComparison.OrdinalIgnoreCase); return text.Equals(value, StringComparison.OrdinalIgnoreCase);
}
} }
} }
...@@ -29,6 +29,14 @@ public new PageList<per_employee> GetEntitiesForPaging(int pageNumber, int pageS ...@@ -29,6 +29,14 @@ public new PageList<per_employee> GetEntitiesForPaging(int pageNumber, int pageS
return PageList<per_employee>.Create(queryableAuthors, pageNumber, pageSize); return PageList<per_employee>.Create(queryableAuthors, pageNumber, pageSize);
} }
public new List<AccountUnit> GetEmployeeUnit(Expression<Func<per_employee, bool>> exp)
{
return context.Set<per_employee>()
.Where(exp)
.Select(w => new AccountUnit { UnitType = w.UnitType, AccountingUnit = w.AccountingUnit })
.Distinct()
.ToList();
}
//public Comparison GetComparison(ComparisonPagingRequest request) //public Comparison GetComparison(ComparisonPagingRequest request)
//{ //{
...@@ -75,7 +83,7 @@ public DtoModels.Comparison<view_check_emp> CheckEmployeeRealGiveFeeDiff(Compari ...@@ -75,7 +83,7 @@ public DtoModels.Comparison<view_check_emp> CheckEmployeeRealGiveFeeDiff(Compari
"; ";
var queryCount = @" var queryCount = @"
SELECT COUNT(DISTINCT HospitalId,Year,Month,AllotID,ComputeId,UnitType,AccountingUnit,JobNumber) FROM ( SELECT COUNT(0) FROM (
SELECT * FROM view_check_emp WHERE AllotId = @allotId SELECT * FROM view_check_emp WHERE AllotId = @allotId
) TAB ) TAB
WHERE if(@searchQuery='','',AccountingUnit) LIKE @parm OR if(@searchQuery='','',JobNumber) LIKE @parm OR if(@searchQuery='','',EmployeeName) LIKE @parm WHERE if(@searchQuery='','',AccountingUnit) LIKE @parm OR if(@searchQuery='','',JobNumber) LIKE @parm OR if(@searchQuery='','',EmployeeName) LIKE @parm
......
...@@ -444,6 +444,7 @@ public List<dynamic> QueryComputeByDateAndTotal(string viewName, HospitalGrantSu ...@@ -444,6 +444,7 @@ public List<dynamic> QueryComputeByDateAndTotal(string viewName, HospitalGrantSu
{ "view_allot_sign_emp_finance_group", new List<string>{ "code", "hospitalid", "unittype", "accountingunit","jobnumber", "employeename", } }, { "view_allot_sign_emp_finance_group", new List<string>{ "code", "hospitalid", "unittype", "accountingunit","jobnumber", "employeename", } },
{ "view_allot_sign_emp_finance_sum", new List<string>{ "perforsumfee", "performanagementfee", "nightworkperfor", "adjustlaterotherfee", "otherperfor", "hideotherperfor", "shouldgivefee", "reservedratiofee", "realgivefee" } }, { "view_allot_sign_emp_finance_sum", new List<string>{ "perforsumfee", "performanagementfee", "nightworkperfor", "adjustlaterotherfee", "otherperfor", "hideotherperfor", "shouldgivefee", "reservedratiofee", "realgivefee" } },
}; };
if (request.SumBy == null || !request.SumBy.Any(t => !string.IsNullOrEmpty(t))) request.SumBy = dict[viewName + "_sum"]; if (request.SumBy == null || !request.SumBy.Any(t => !string.IsNullOrEmpty(t))) request.SumBy = dict[viewName + "_sum"];
if (request.GroupBy == null || !request.GroupBy.Any(t => !string.IsNullOrEmpty(t))) request.GroupBy = dict[viewName + "_group"]; if (request.GroupBy == null || !request.GroupBy.Any(t => !string.IsNullOrEmpty(t))) request.GroupBy = dict[viewName + "_group"];
......
using Performance.EntityModels;
using Performance.EntityModels.Entity;
namespace Performance.Repository.Repository
{
public partial class PerforPerAttendanceDeptReportRepository : PerforRepository<per_attendance_dept_report>
{
/// <summary>
/// per_attendance Repository
/// </summary>
public PerforPerAttendanceDeptReportRepository(PerformanceDbContext context) : base(context)
{
}
}
}
using Performance.EntityModels;
using Performance.EntityModels.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Performance.Repository.Repository
{
public partial class PerforPerAttendanceDeptRepository : PerforRepository<per_attendance_dept>
{
/// <summary>
/// per_attendance Repository
/// </summary>
public PerforPerAttendanceDeptRepository(PerformanceDbContext context) : base(context)
{
}
}
}
using AutoMapper; using System;
using Newtonsoft.Json.Linq; using System.Collections.Generic;
using System.Linq;
using AutoMapper;
using Microsoft.Extensions.Options;
using Performance.DtoModels; using Performance.DtoModels;
using Performance.DtoModels.AppSettings;
using Performance.EntityModels; using Performance.EntityModels;
using Performance.Infrastructure;
using Performance.Repository; using Performance.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.Services.AllotCompute namespace Performance.Services.AllotCompute
{ {
...@@ -17,6 +16,7 @@ namespace Performance.Services.AllotCompute ...@@ -17,6 +16,7 @@ namespace Performance.Services.AllotCompute
public class ProcessComputService : IAutoInjection public class ProcessComputService : IAutoInjection
{ {
private readonly IMapper _mapper; private readonly IMapper _mapper;
private readonly IOptions<Application> _options;
private readonly BudgetService _budgetService; private readonly BudgetService _budgetService;
private PerforCofincomeRepository perforCofincomeRepository; private PerforCofincomeRepository perforCofincomeRepository;
private PerforPersheetRepository perforPerSheetRepository; private PerforPersheetRepository perforPerSheetRepository;
...@@ -35,6 +35,7 @@ public class ProcessComputService : IAutoInjection ...@@ -35,6 +35,7 @@ public class ProcessComputService : IAutoInjection
public ProcessComputService( public ProcessComputService(
IMapper mapper, IMapper mapper,
IOptions<Application> options,
BudgetService budgetService, BudgetService budgetService,
PerforCofincomeRepository perforCofincomeRepository, PerforCofincomeRepository perforCofincomeRepository,
PerforPersheetRepository perforPerSheetRepository, PerforPersheetRepository perforPerSheetRepository,
...@@ -52,6 +53,7 @@ public class ProcessComputService : IAutoInjection ...@@ -52,6 +53,7 @@ public class ProcessComputService : IAutoInjection
PerforPerallotRepository perallotRepository) PerforPerallotRepository perallotRepository)
{ {
_mapper = mapper; _mapper = mapper;
_options = options;
_budgetService = budgetService; _budgetService = budgetService;
this.perforCofincomeRepository = perforCofincomeRepository; this.perforCofincomeRepository = perforCofincomeRepository;
this.perforPerSheetRepository = perforPerSheetRepository; this.perforPerSheetRepository = perforPerSheetRepository;
...@@ -307,7 +309,10 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot ...@@ -307,7 +309,10 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot
workDoctor = info.Data.FirstOrDefault(t => t.UnitType == UnitType.医生组.ToString() && t.AccountingUnit == dept.AccountingUnit); workDoctor = info.Data.FirstOrDefault(t => t.UnitType == UnitType.医生组.ToString() && t.AccountingUnit == dept.AccountingUnit);
// 夜班绩效 从医院奖罚的明细项中获取 // 夜班绩效 从医院奖罚的明细项中获取
// 2022-03-16 wufeifei // 2022-03-16 wufeifei
string[] nightShiftTexts = new string[] { "夜班绩效", "夜班工作量", "夜班工作量奖励" }; string[] nightShiftTexts = _options.Value.NightShiftTexts;
if (nightShiftTexts?.Any() != true)
nightShiftTexts = new string[] { "夜班绩效", "夜班工作量", "夜班工作量奖励", "手术绩效", };
var nightShift = adjustLaterOtherFee?.FirstOrDefault(w => w.UnitType == dept.UnitType && w.AccountingUnit == dept.AccountingUnit && nightShiftTexts.Contains(w.TypeName?.Trim()))?.CellValue ?? 0; var nightShift = adjustLaterOtherFee?.FirstOrDefault(w => w.UnitType == dept.UnitType && w.AccountingUnit == dept.AccountingUnit && nightShiftTexts.Contains(w.TypeName?.Trim()))?.CellValue ?? 0;
dept.NightShiftWorkPerforFee = nightShift; dept.NightShiftWorkPerforFee = nightShift;
...@@ -391,7 +396,10 @@ public void ComputeOffice(per_allot allot, PerExcel excel) ...@@ -391,7 +396,10 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
{ {
// 夜班绩效 从医院奖罚的明细项中获取 // 夜班绩效 从医院奖罚的明细项中获取
// 2022-03-16 wufeifei // 2022-03-16 wufeifei
string[] nightShiftTexts = new string[] { "夜班绩效", "夜班工作量", "夜班工作量奖励" }; string[] nightShiftTexts = _options.Value.NightShiftTexts;
if (nightShiftTexts?.Any() != true)
nightShiftTexts = new string[] { "夜班绩效", "夜班工作量", "夜班工作量奖励", "手术绩效", };
var nightShift = adjustLaterOtherFee?.FirstOrDefault(w => w.UnitType == dept.UnitType && w.AccountingUnit == dept.AccountingUnit && nightShiftTexts.Contains(w.TypeName?.Trim()))?.CellValue ?? 0; var nightShift = adjustLaterOtherFee?.FirstOrDefault(w => w.UnitType == dept.UnitType && w.AccountingUnit == dept.AccountingUnit && nightShiftTexts.Contains(w.TypeName?.Trim()))?.CellValue ?? 0;
dept.NightShiftWorkPerforFee = nightShift; dept.NightShiftWorkPerforFee = nightShift;
......
using AutoMapper; using AutoMapper;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Performance.DtoModels; using Performance.DtoModels;
using Performance.DtoModels.AppSettings;
using Performance.EntityModels; using Performance.EntityModels;
using Performance.Infrastructure; using Performance.Infrastructure;
using Performance.Repository; using Performance.Repository;
...@@ -17,6 +19,7 @@ namespace Performance.Services.AllotCompute ...@@ -17,6 +19,7 @@ namespace Performance.Services.AllotCompute
public class ResultComputeService : IAutoInjection public class ResultComputeService : IAutoInjection
{ {
private readonly IMapper _mapper; private readonly IMapper _mapper;
private readonly IOptions<Application> _options;
private readonly DapperService _service; private readonly DapperService _service;
private readonly PerforPerallotRepository _perforPerallotRepository; private readonly PerforPerallotRepository _perforPerallotRepository;
private readonly BaiscNormService baiscNormService; private readonly BaiscNormService baiscNormService;
...@@ -36,6 +39,7 @@ public class ResultComputeService : IAutoInjection ...@@ -36,6 +39,7 @@ public class ResultComputeService : IAutoInjection
public ResultComputeService( public ResultComputeService(
IMapper mapper, IMapper mapper,
IOptions<Application> options,
DapperService service, DapperService service,
PerforPerallotRepository perforPerallotRepository, PerforPerallotRepository perforPerallotRepository,
PerforHospitalRepository hospitalRepository, PerforHospitalRepository hospitalRepository,
...@@ -52,6 +56,7 @@ public class ResultComputeService : IAutoInjection ...@@ -52,6 +56,7 @@ public class ResultComputeService : IAutoInjection
ILogger<ResultComputeService> logger) ILogger<ResultComputeService> logger)
{ {
_mapper = mapper; _mapper = mapper;
_options = options;
_service = service; _service = service;
_perforPerallotRepository = perforPerallotRepository; _perforPerallotRepository = perforPerallotRepository;
this.baiscNormService = baiscNormService; this.baiscNormService = baiscNormService;
...@@ -174,7 +179,10 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -174,7 +179,10 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
// 夜班绩效 从医院奖罚的明细项中获取 // 夜班绩效 从医院奖罚的明细项中获取
// 2022-03-16 wufeifei // 2022-03-16 wufeifei
string[] nightShiftTexts = new string[] { "夜班绩效", "夜班工作量", "夜班工作量奖励" }; string[] nightShiftTexts = _options.Value.NightShiftTexts;
if (nightShiftTexts?.Any() != true)
nightShiftTexts = new string[] { "夜班绩效", "夜班工作量", "夜班工作量奖励", "手术绩效", };
var nightShift = adjustLaterOtherFee?.FirstOrDefault(w => w.UnitType == dept?.UnitType && w.AccountingUnit == dept?.AccountingUnit && nightShiftTexts.Contains(w.TypeName?.Trim()))?.CellValue ?? 0; var nightShift = adjustLaterOtherFee?.FirstOrDefault(w => w.UnitType == dept?.UnitType && w.AccountingUnit == dept?.AccountingUnit && nightShiftTexts.Contains(w.TypeName?.Trim()))?.CellValue ?? 0;
decimal? headcount = null; decimal? headcount = null;
...@@ -702,9 +710,6 @@ public bool IssuedChangeSecond(per_allot allot, List<ag_secondallot> secondList) ...@@ -702,9 +710,6 @@ public bool IssuedChangeSecond(per_allot allot, List<ag_secondallot> secondList)
} }
} }
perforAgsecondallotRepository.UpdateRange(updSeconds.ToArray()); perforAgsecondallotRepository.UpdateRange(updSeconds.ToArray());
_service.FreezeAllotSync(allot.ID);
_service.SecondUseTempRestore();
_service.RestoreSecondAllot();
} }
_service.FreezeAllotSync(allot.ID); _service.FreezeAllotSync(allot.ID);
_service.SecondUseTempRestore(); _service.SecondUseTempRestore();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -183,6 +183,7 @@ public static List<cof_alias> GetAllPersonnelTags(bool ownerQuery) ...@@ -183,6 +183,7 @@ public static List<cof_alias> GetAllPersonnelTags(bool ownerQuery)
new cof_alias{ Alias = "出勤天数", Name = nameof(per_employee.AttendanceDay), States = 1, SumStatus = 0, Sort = 14 }, new cof_alias{ Alias = "出勤天数", Name = nameof(per_employee.AttendanceDay), States = 1, SumStatus = 0, Sort = 14 },
new cof_alias{ Alias = "预留比例", Name = nameof(per_employee.ReservedRatio), States = 1, SumStatus = 0, Sort = 16 }, new cof_alias{ Alias = "预留比例", Name = nameof(per_employee.ReservedRatio), States = 1, SumStatus = 0, Sort = 16 },
new cof_alias{ Alias = "银行卡号", Name = nameof(per_employee.BankCard), States = 1, SumStatus = 0, Sort = 18 }, new cof_alias{ Alias = "银行卡号", Name = nameof(per_employee.BankCard), States = 1, SumStatus = 0, Sort = 18 },
new cof_alias{ Alias = "人员系数", Name = nameof(per_employee.PermanentStaff), States = 0, SumStatus = 0, Sort = 19 },
new cof_alias{ Alias = "备用01", Name = nameof(per_employee.Reserve01), States = 0, SumStatus = 0, Sort = 20 }, new cof_alias{ Alias = "备用01", Name = nameof(per_employee.Reserve01), States = 0, SumStatus = 0, Sort = 20 },
new cof_alias{ Alias = "备用02", Name = nameof(per_employee.Reserve02), States = 0, SumStatus = 0, Sort = 20 }, new cof_alias{ Alias = "备用02", Name = nameof(per_employee.Reserve02), States = 0, SumStatus = 0, Sort = 20 },
......
...@@ -36,6 +36,7 @@ public class ComputeService : IAutoInjection ...@@ -36,6 +36,7 @@ public class ComputeService : IAutoInjection
private readonly PerforPeremployeeRepository perforPeremployeeRepository; private readonly PerforPeremployeeRepository perforPeremployeeRepository;
private readonly PerforPerapramounthideRepository _hideRepository; private readonly PerforPerapramounthideRepository _hideRepository;
private readonly PerforCofworkitemRepository cofworkitemRepository; private readonly PerforCofworkitemRepository cofworkitemRepository;
private readonly PerforCofaccountingRepository _cofaccountingRepository;
private readonly PerforCofaliasRepository cofaliasRepository; private readonly PerforCofaliasRepository cofaliasRepository;
private readonly PerforReportRepository reportRepository; private readonly PerforReportRepository reportRepository;
...@@ -59,6 +60,7 @@ public class ComputeService : IAutoInjection ...@@ -59,6 +60,7 @@ public class ComputeService : IAutoInjection
PerforPeremployeeRepository perforPeremployeeRepository, PerforPeremployeeRepository perforPeremployeeRepository,
PerforPerapramounthideRepository hideRepository, PerforPerapramounthideRepository hideRepository,
PerforCofworkitemRepository cofworkitemRepository, PerforCofworkitemRepository cofworkitemRepository,
PerforCofaccountingRepository cofaccountingRepository,
PerforCofaliasRepository cofaliasRepository, PerforCofaliasRepository cofaliasRepository,
PerforReportRepository reportRepository) PerforReportRepository reportRepository)
{ {
...@@ -81,6 +83,7 @@ public class ComputeService : IAutoInjection ...@@ -81,6 +83,7 @@ public class ComputeService : IAutoInjection
this.perforPeremployeeRepository = perforPeremployeeRepository; this.perforPeremployeeRepository = perforPeremployeeRepository;
_hideRepository = hideRepository; _hideRepository = hideRepository;
this.cofworkitemRepository = cofworkitemRepository; this.cofworkitemRepository = cofworkitemRepository;
_cofaccountingRepository = cofaccountingRepository;
this.cofaliasRepository = cofaliasRepository; this.cofaliasRepository = cofaliasRepository;
this.reportRepository = reportRepository; this.reportRepository = reportRepository;
} }
...@@ -314,10 +317,18 @@ public List<DeptResponse> GetOtherPerformance(int allotId) ...@@ -314,10 +317,18 @@ public List<DeptResponse> GetOtherPerformance(int allotId)
public List<DeptResponse> GetGroupPerformance(int allotId, List<int> group) public List<DeptResponse> GetGroupPerformance(int allotId, List<int> group)
{ {
var unitType = group; var unitType = group;
var list = perforResaccountRepository.GetEntities(t => unitType.Contains(t.UnitType.Value) && t.AllotID == allotId)?.OrderBy(t => t.UnitType).ThenByDescending(t => t.AccountingUnit); var list = perforResaccountRepository.GetEntities(t => unitType.Contains(t.UnitType.Value) && t.AllotID == allotId);
List<DeptResponse> Performance = _mapper.Map<List<DeptResponse>>(list); if (list?.Any() != true) return new List<DeptResponse>();
Performance?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString());
return Performance; var cofaccounting = _cofaccountingRepository.GetEntities(g => g.AllotId == allotId);
List<DeptResponse> performance = _mapper.Map<List<DeptResponse>>(list);
performance?.ForEach(t =>
{
t.UnitName = ((UnitType)t.UnitType).ToString();
t.Code = cofaccounting.FirstOrDefault(w => w.UnitType == t.UnitName && w.AccountingUnit == t.AccountingUnit)?.Code ?? "";
});
performance = performance?.OrderBy(t => t.Code).ThenBy(t => t.UnitType).ThenByDescending(t => t.AccountingUnit).ToList();
return performance;
} }
/// <summary> /// <summary>
/// 返回行政科室绩效列表 /// 返回行政科室绩效列表
......
...@@ -738,7 +738,11 @@ public ApiResponse BatchSaveAccounting(int allotId, SaveCollectData request) ...@@ -738,7 +738,11 @@ public ApiResponse BatchSaveAccounting(int allotId, SaveCollectData request)
/// <param name="iD"></param> /// <param name="iD"></param>
public void Copy(per_allot allot) public void Copy(per_allot allot)
{ {
NewCopy(new CopyRequest() { AllotId = allot.ID, Type = new[] { "personnels", "workItems", "drugTypeDisburses", "drugTypeFactors", "deptTypes", "agains", "accountings", "department" } }); NewCopy(new CopyRequest()
{
AllotId = allot.ID,
Type = new[] { "personnels", "workItems", "drugTypeDisburses", "drugTypeFactors", "deptTypes", "agains", "accountings", "department", "attendanceType" }
});
} }
//todo:新copy //todo:新copy
...@@ -764,6 +768,7 @@ public void NewCopy(CopyRequest request) ...@@ -764,6 +768,7 @@ public void NewCopy(CopyRequest request)
{ "deptTypes", (allot, prevAllotId) =>_copyService.Copy_DeptTypes(allot, prevAllotId, delHistotyData:true) }, { "deptTypes", (allot, prevAllotId) =>_copyService.Copy_DeptTypes(allot, prevAllotId, delHistotyData:true) },
{ "agains", (allot, prevAllotId) =>_copyService.Copy_Agains(allot, prevAllotId, delHistotyData:true) }, { "agains", (allot, prevAllotId) =>_copyService.Copy_Agains(allot, prevAllotId, delHistotyData:true) },
{ "accountings", (allot, prevAllotId) =>_copyService.Copy_Accountings(allot, prevAllotId, delHistotyData:true) }, { "accountings", (allot, prevAllotId) =>_copyService.Copy_Accountings(allot, prevAllotId, delHistotyData:true) },
{ "attendanceType", (allot, prevAllotId) =>_copyService.Copy_AttendanceType(allot, prevAllotId, delHistotyData:true) },
{ "department", (allot, prevAllotId) =>_copyService.Copy_DeptDic(allot, prevAllotId, delHistotyData:true) }, { "department", (allot, prevAllotId) =>_copyService.Copy_DeptDic(allot, prevAllotId, delHistotyData:true) },
}; };
......
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Performance.EntityModels; using Performance.EntityModels;
using Performance.EntityModels.Entity;
using Performance.Repository; using Performance.Repository;
using Performance.Repository.Repository; using Performance.Repository.Repository;
using System; using System;
using System.Linq; using System.Linq;
using static Performance.DtoModels.Attendance;
namespace Performance.Services namespace Performance.Services
{ {
...@@ -18,6 +20,7 @@ public class CopyService : IAutoInjection ...@@ -18,6 +20,7 @@ public class CopyService : IAutoInjection
private readonly PerforCofaccountingRepository _cofaccountingRepository; private readonly PerforCofaccountingRepository _cofaccountingRepository;
private readonly PerforCofdrugtypeDisburseRepository _drugtypeDisburseRepository; private readonly PerforCofdrugtypeDisburseRepository _drugtypeDisburseRepository;
private readonly PerforCofdrugtypefactorRepository _cofdrugtypefactorRepository; private readonly PerforCofdrugtypefactorRepository _cofdrugtypefactorRepository;
private readonly PerfoPperAttendanceTypeRepository _pperAttendanceTypeRepository;
public CopyService( public CopyService(
ILogger<ConfigService> logger, ILogger<ConfigService> logger,
...@@ -28,7 +31,8 @@ public class CopyService : IAutoInjection ...@@ -28,7 +31,8 @@ public class CopyService : IAutoInjection
PerforCofdepttypeRepository perforCofdepttypeRepository, PerforCofdepttypeRepository perforCofdepttypeRepository,
PerforCofaccountingRepository cofaccountingRepository, PerforCofaccountingRepository cofaccountingRepository,
PerforCofdrugtypeDisburseRepository drugtypeDisburseRepository, PerforCofdrugtypeDisburseRepository drugtypeDisburseRepository,
PerforCofdrugtypefactorRepository cofdrugtypefactorRepository) PerforCofdrugtypefactorRepository cofdrugtypefactorRepository,
PerfoPperAttendanceTypeRepository pperAttendanceTypeRepository)
{ {
_logger = logger; _logger = logger;
_perdeptdicRepository = perdeptdicRepository; _perdeptdicRepository = perdeptdicRepository;
...@@ -39,6 +43,7 @@ public class CopyService : IAutoInjection ...@@ -39,6 +43,7 @@ public class CopyService : IAutoInjection
_cofaccountingRepository = cofaccountingRepository; _cofaccountingRepository = cofaccountingRepository;
_drugtypeDisburseRepository = drugtypeDisburseRepository; _drugtypeDisburseRepository = drugtypeDisburseRepository;
_cofdrugtypefactorRepository = cofdrugtypefactorRepository; _cofdrugtypefactorRepository = cofdrugtypefactorRepository;
_pperAttendanceTypeRepository = pperAttendanceTypeRepository;
} }
...@@ -235,5 +240,30 @@ public void Copy_DeptDic(per_allot allot, int prevAllotId, bool delHistotyData = ...@@ -235,5 +240,30 @@ public void Copy_DeptDic(per_allot allot, int prevAllotId, bool delHistotyData =
} }
} }
public void Copy_AttendanceType(per_allot allot, int prevAllotId, bool delHistotyData = false)
{
var flag = delHistotyData;
_logger.LogInformation($"copy attendanceType");
var attendanceTypes = _pperAttendanceTypeRepository.GetEntities(t => t.AllotId == allot.ID);
if (delHistotyData && attendanceTypes != null && attendanceTypes.Any())
flag = _pperAttendanceTypeRepository.RemoveRange(attendanceTypes.ToArray());
if (flag || attendanceTypes == null || !attendanceTypes.Any())
{
attendanceTypes = _pperAttendanceTypeRepository.GetEntities(t => t.AllotId == prevAllotId) ?? _pperAttendanceTypeRepository.GetEntities(t => t.AllotId == -1);
if (attendanceTypes != null && attendanceTypes.Any())
{
var newAttendanceTypes = attendanceTypes.Select(t => new per_attendance_type
{
AllotId = allot.ID,
AttendanceName = t.AttendanceName,
HospitalId = t.HospitalId,
IsDeduction = t.IsDeduction
});
_pperAttendanceTypeRepository.AddRange(newAttendanceTypes.ToArray());
}
}
}
} }
} }
...@@ -434,5 +434,96 @@ public int UpdateAllotStates(int allotId, int states, string remark, int generat ...@@ -434,5 +434,96 @@ public int UpdateAllotStates(int allotId, int states, string remark, int generat
throw; throw;
} }
} }
/// <summary>
/// 查询考勤下发绩效视图(运行视图定义)
/// </summary>
/// <param name="allotId"></param>
/// <param name="unitType"></param>
/// <param name="accountingUnit"></param>
/// <param name="personnelNameOrNumber"></param>
/// <returns></returns>
public IEnumerable<dynamic> QueryAttendanceIssue(int allotId, List<string> unitType, string accountingUnit, string personnelNameOrNumber)
{
try
{
using (var connection = new MySqlConnection(_options.Value.PerformanceConnectionString))
{
if (connection.State != ConnectionState.Open) connection.Open();
string sql = $@"select * from view_attendance_issue where allotID = @allotId";
DynamicParameters parameters = new DynamicParameters();
parameters.Add("@allotId", allotId);
if (unitType?.Any() == true)
{
sql += " and unitType in @unitType";
parameters.Add("@unitType", unitType);
}
if (!string.IsNullOrEmpty(accountingUnit))
{
sql += " and accountingUnit = @accountingUnit";
parameters.Add("@accountingUnit", accountingUnit);
}
if (!string.IsNullOrEmpty(personnelNameOrNumber))
{
sql += " and (personnelNumber like @personnelNameOrNumber or personnelName like @personnelNameOrNumber)";
parameters.Add("@personnelNameOrNumber", $"%{personnelNameOrNumber}%");
}
return connection.Query(sql, parameters, commandTimeout: 60 * 60);
}
}
catch (Exception ex)
{
_logger.LogError($"SQL执行异常:{ex}");
throw;
}
}
/// <summary>
/// 查询考勤下发绩效视图(运行视图定义)
/// </summary>
/// <param name="allotId"></param>
/// <param name="unitType"></param>
/// <param name="accountingUnit"></param>
/// <param name="personnelNameOrNumber"></param>
/// <returns></returns>
public IEnumerable<dynamic> QueryAttendanceDeptReport(int allotId, string unitType, string accountingUnit, string personnelNameOrNumber)
{
try
{
using (var connection = new MySqlConnection(_options.Value.PerformanceConnectionString))
{
if (connection.State != ConnectionState.Open) connection.Open();
string sql = $@"select * from view_attendance_dept where allotID = @allotId";
DynamicParameters parameters = new DynamicParameters();
parameters.Add("@allotId", allotId);
if (unitType?.Any() == true)
{
sql += " and unitType = @unitType";
parameters.Add("@unitType", unitType);
}
if (!string.IsNullOrEmpty(accountingUnit))
{
sql += " and accountingUnit = @accountingUnit";
parameters.Add("@accountingUnit", accountingUnit);
}
if (!string.IsNullOrEmpty(personnelNameOrNumber))
{
sql += " and (personnelNumber like @personnelNameOrNumber or personnelName like @personnelNameOrNumber)";
parameters.Add("@personnelNameOrNumber", $"%{personnelNameOrNumber}%");
}
return connection.Query(sql, parameters, commandTimeout: 60 * 60);
}
}
catch (Exception ex)
{
_logger.LogError($"SQL执行异常:{ex}");
throw;
}
}
} }
} }
...@@ -959,7 +959,7 @@ public ApiResponse<AprTypeRequest> UpdateAprType(int typeId, AprTypeRequest requ ...@@ -959,7 +959,7 @@ public ApiResponse<AprTypeRequest> UpdateAprType(int typeId, AprTypeRequest requ
{ {
if (string.IsNullOrEmpty(request.PerforType.Trim()) || request.AllotId <= 0) if (string.IsNullOrEmpty(request.PerforType.Trim()) || request.AllotId <= 0)
return new ApiResponse<AprTypeRequest>(ResponseType.ParameterError, "输入参数不能为空!"); return new ApiResponse<AprTypeRequest>(ResponseType.ParameterError, "输入参数不能为空!");
var tepm = perAprAmountTypeRepository.GetEntity(t =>t.Id!=t.Id && t.AllotId == request.AllotId && t.PerforType == request.PerforType); var tepm = perAprAmountTypeRepository.GetEntity(t => t.Id != t.Id && t.AllotId == request.AllotId && t.PerforType == request.PerforType);
if (tepm != null) if (tepm != null)
return new ApiResponse<AprTypeRequest>(ResponseType.ParameterError, "已存在该类型"); return new ApiResponse<AprTypeRequest>(ResponseType.ParameterError, "已存在该类型");
var res = perAprAmountTypeRepository.GetEntity(t => t.Id == typeId); var res = perAprAmountTypeRepository.GetEntity(t => t.Id == typeId);
...@@ -996,9 +996,9 @@ public ApiResponse DeleteAprType(int typeId) ...@@ -996,9 +996,9 @@ public ApiResponse DeleteAprType(int typeId)
/// <param name="doctorName"></param> /// <param name="doctorName"></param>
/// <param name="userId"></param> /// <param name="userId"></param>
/// <returns></returns> /// <returns></returns>
public List<view_per_apr_amount> GetEmployeeMessage(int allotId, string personnelNumber, string doctorName, int userId) public List<per_employee> GetEmployeeMessage(int allotId, string personnelNumber, string doctorName, int userId)
{ {
if (string.IsNullOrEmpty(personnelNumber) && string.IsNullOrEmpty(doctorName)) return new List<view_per_apr_amount>(); if (string.IsNullOrEmpty(personnelNumber) && string.IsNullOrEmpty(doctorName)) return new List<per_employee>();
var user = userRepository.GetEntity(w => w.ID == userId && w.IsDelete == 1); var user = userRepository.GetEntity(w => w.ID == userId && w.IsDelete == 1);
if (user == null) throw new PerformanceException("操作用户不存在或用户信息错误!"); if (user == null) throw new PerformanceException("操作用户不存在或用户信息错误!");
...@@ -1007,8 +1007,7 @@ public List<view_per_apr_amount> GetEmployeeMessage(int allotId, string personne ...@@ -1007,8 +1007,7 @@ public List<view_per_apr_amount> GetEmployeeMessage(int allotId, string personne
var employeeId = 0; var employeeId = 0;
if (!string.IsNullOrEmpty(personnelNumber)) if (!string.IsNullOrEmpty(personnelNumber))
{ {
var employee = peremployeeRepository.GetEntity(w => w.AllotId == allotId && w.PersonnelNumber != null var employee = peremployeeRepository.GetEntity(w => w.AllotId == allotId && w.PersonnelNumber != null && w.PersonnelNumber.Trim() == personnelNumber.Trim());
&& w.PersonnelNumber.Trim() == personnelNumber.Trim());
if (employee != null) if (employee != null)
{ {
employees.Add(employee); employees.Add(employee);
...@@ -1022,18 +1021,8 @@ public List<view_per_apr_amount> GetEmployeeMessage(int allotId, string personne ...@@ -1022,18 +1021,8 @@ public List<view_per_apr_amount> GetEmployeeMessage(int allotId, string personne
&& w.DoctorName.Trim().Contains(doctorName.Trim()) && w.Id != employeeId); && w.DoctorName.Trim().Contains(doctorName.Trim()) && w.Id != employeeId);
if (filterEmployees != null && filterEmployees.Any()) employees.AddRange(filterEmployees); if (filterEmployees != null && filterEmployees.Any()) employees.AddRange(filterEmployees);
} }
if (employees == null || !employees.Any()) return employees ?? new List<per_employee>();
return new List<view_per_apr_amount>();
return employees.Select(t => new view_per_apr_amount
{
AllotId = allotId,
PersonnelNumber = t.PersonnelNumber,
DoctorName = t.DoctorName,
TypeInDepartment = user.Department,
AccountingUnit = t.AccountingUnit
}).ToList();
} }
/// <summary> /// <summary>
......
using AutoMapper; using AutoMapper;
using MassTransit.Internals.GraphValidation;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
...@@ -35,6 +36,7 @@ public class PersonService : IAutoInjection ...@@ -35,6 +36,7 @@ public class PersonService : IAutoInjection
private readonly PerforAgsecondallotRepository agsecondallotRepository; private readonly PerforAgsecondallotRepository agsecondallotRepository;
private readonly PerforHospitalRepository perforHospitalRepository; private readonly PerforHospitalRepository perforHospitalRepository;
private readonly PerforCofaccountingRepository perforCofaccountingRepository; private readonly PerforCofaccountingRepository perforCofaccountingRepository;
private readonly PerforPerAttendanceIssueRepository _issueRepository;
private readonly UserService userService; private readonly UserService userService;
private readonly DapperService dapperService; private readonly DapperService dapperService;
private readonly Application application; private readonly Application application;
...@@ -53,11 +55,11 @@ public class PersonService : IAutoInjection ...@@ -53,11 +55,11 @@ public class PersonService : IAutoInjection
PerforAgsecondallotRepository agsecondallotRepository, PerforAgsecondallotRepository agsecondallotRepository,
PerforHospitalRepository perforHospitalRepository, PerforHospitalRepository perforHospitalRepository,
PerforCofaccountingRepository perforCofaccountingRepository, PerforCofaccountingRepository perforCofaccountingRepository,
PerforPerAttendanceIssueRepository issueRepository,
UserService userService, UserService userService,
DapperService dapperService, DapperService dapperService,
IOptions<Application> application, IOptions<Application> application,
IWebHostEnvironment evn IWebHostEnvironment evn)
)
{ {
_mapper = mapper; _mapper = mapper;
this.logger = logger; this.logger = logger;
...@@ -71,6 +73,7 @@ IWebHostEnvironment evn ...@@ -71,6 +73,7 @@ IWebHostEnvironment evn
this.agsecondallotRepository = agsecondallotRepository; this.agsecondallotRepository = agsecondallotRepository;
this.perforHospitalRepository = perforHospitalRepository; this.perforHospitalRepository = perforHospitalRepository;
this.perforCofaccountingRepository = perforCofaccountingRepository; this.perforCofaccountingRepository = perforCofaccountingRepository;
_issueRepository = issueRepository;
this.userService = userService; this.userService = userService;
this.dapperService = dapperService; this.dapperService = dapperService;
this.application = application.Value; this.application = application.Value;
...@@ -150,6 +153,25 @@ public void CreateAllotPersons(int hospitalId, int allotId, int prevAllotId = -1 ...@@ -150,6 +153,25 @@ public void CreateAllotPersons(int hospitalId, int allotId, int prevAllotId = -1
return entity; return entity;
}).ToList(); }).ToList();
// lcr 2023-04-14 按调动记录最后一次所在科室更新人员字典
var issues = _issueRepository.GetEntities(w => w.AllotId == prevAllotId);
if (issues?.Any() == true)
{
foreach (var item in data)
{
var issuePersonnel = issues.Where(w => w.PersonnelNumber == item.PersonnelNumber).OrderByDescending(w => w.BeginDate).FirstOrDefault();
if (issuePersonnel != null)
{
if (issuePersonnel.UnitType != item.UnitType || issuePersonnel.AccountingUnit != item.AccountingUnit || issuePersonnel.PermanentStaff != item.PermanentStaff)
{
item.UnitType = issuePersonnel.UnitType;
item.AccountingUnit = issuePersonnel.AccountingUnit;
item.PermanentStaff = issuePersonnel.PermanentStaff;
}
}
}
}
SaveAllotPersons(data); SaveAllotPersons(data);
} }
...@@ -234,6 +256,28 @@ public PageList<per_employee> GetPersons(int allotId, int userId, PersonParamsRe ...@@ -234,6 +256,28 @@ public PageList<per_employee> GetPersons(int allotId, int userId, PersonParamsRe
} }
/// <summary> /// <summary>
/// 获取所有员工记录分页
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
public PageList<per_employee> GetEmployee(int allotId, string personnelNumber, string personnelName, string unitType, string accountingUnit, string searchText, int pageIndex, int pageSize)
{
Expression<Func<per_employee, bool>> exp = t => t.AllotId == allotId;
if (!string.IsNullOrEmpty(personnelNumber))
exp = exp.And(w => w.PersonnelNumber.Contains(personnelNumber));
if (!string.IsNullOrEmpty(personnelName))
exp = exp.And(w => w.DoctorName.Contains(personnelName));
if (!string.IsNullOrEmpty(unitType))
exp = exp.And(w => w.UnitType.Equals(unitType));
if (!string.IsNullOrEmpty(accountingUnit))
exp = exp.And(w => w.AccountingUnit.Contains(accountingUnit));
if (!string.IsNullOrEmpty(searchText))
exp = exp.And(w => w.PersonnelNumber.Contains(searchText) || w.DoctorName.Contains(searchText) || w.UnitType.Contains(searchText) || w.AccountingUnit.Contains(searchText));
return peremployeeRepository.GetEntitiesForPaging(pageIndex, pageSize, exp);
}
/// <summary>
/// 新增员工信息 /// 新增员工信息
/// </summary> /// </summary>
/// <param name="request"></param> /// <param name="request"></param>
......
...@@ -205,6 +205,24 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute ...@@ -205,6 +205,24 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
var maps = new List<SecondColumnDictionary>() var maps = new List<SecondColumnDictionary>()
{ {
// 顶部
new SecondColumnDictionary(getAlias(nameof(ag_headsource.TotalPerformance),"可分配绩效"),nameof(ag_headsource.TotalPerformance), true, 10, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.HosOtherPerformance),"医院其他绩效"),nameof(ag_headsource.HosOtherPerformance), true, 20, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.NightShiftWorkPerforTotal),"夜班绩效综合"),nameof(ag_headsource.NightShiftWorkPerforTotal), true, 30, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.TotalPreAccountingReward),"核算平均前单项"),nameof(ag_headsource.TotalPreAccountingReward), true, 40, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.TotalDistPerformance),"科室总绩效"),nameof(ag_headsource.TotalDistPerformance), true, 50, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.DirectorBasisPerformance),"主任基础绩效"),nameof(ag_headsource.DirectorBasisPerformance), true, 60, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.TotalDeptReward),"科室单项奖励"),nameof(ag_headsource.TotalDeptReward), true, 70, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.DaysFullAttendance),"满勤天数"),nameof(ag_headsource.DaysFullAttendance), true, 80, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.DepartmentsPerCapita),"科室人均"),nameof(ag_headsource.DepartmentsPerCapita), true, 90, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.TheNumberOfAccountingDepartment),"科室核算人数"),nameof(ag_headsource.TheNumberOfAccountingDepartment), true, 100, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.TheTotalAllocationOfPerformanceResults),"业绩分配绩效总额"),nameof(ag_headsource.TheTotalAllocationOfPerformanceResults), true, 110, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.SeniorityTitlesAccountedPerformance),"年资职称绩效占比"),nameof(ag_headsource.SeniorityTitlesAccountedPerformance), true, 120, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.SeniorityTitlesPerformance),"年资职称绩效"),nameof(ag_headsource.SeniorityTitlesPerformance), true, 130, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.Workload_Ratio_Default),"工作量绩效占比"),nameof(ag_headsource.Workload_Ratio_Default), true, 140, "Top", isNumber: true),
new SecondColumnDictionary(getAlias(nameof(ag_headsource.Workload_Amount_Default),"工作量绩效金额"),nameof(ag_headsource.Workload_Amount_Default), true, 150, "Top", isNumber: true),
// 表格
new SecondColumnDictionary(getAlias(nameof(ag_bodysource.WorkNumber),"人员工号"),nameof(ag_bodysource.WorkNumber),true,100, isNumber: false), new SecondColumnDictionary(getAlias(nameof(ag_bodysource.WorkNumber),"人员工号"),nameof(ag_bodysource.WorkNumber),true,100, isNumber: false),
new SecondColumnDictionary(getAlias(nameof(ag_bodysource.Name),"姓名"),nameof(ag_bodysource.Name),true,100, isNumber: false), new SecondColumnDictionary(getAlias(nameof(ag_bodysource.Name),"姓名"),nameof(ag_bodysource.Name),true,100, isNumber: false),
new SecondColumnDictionary(getAlias(nameof(ag_bodysource.Department),"分配科室"),nameof(ag_bodysource.Department),true,100, isNumber: false), new SecondColumnDictionary(getAlias(nameof(ag_bodysource.Department),"分配科室"),nameof(ag_bodysource.Department),true,100, isNumber: false),
...@@ -254,7 +272,8 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute ...@@ -254,7 +272,8 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
foreach (var item in alias) foreach (var item in alias)
{ {
if (!maps.Any(w => w.Key.Equals(item.Name, StringComparison.OrdinalIgnoreCase)) if (!maps.Any(w => w.Key.Equals(item.Name, StringComparison.OrdinalIgnoreCase))
&& !notCalculate.Contains(item.Name)) && !notCalculate.Contains(item.Name)
&& !item.OriginalName.Equals("Top", StringComparison.OrdinalIgnoreCase))
{ {
maps.Add(new SecondColumnDictionary(item.Alias, item.Name, false, item.Sort, color: "title_color", isNumber: false, expand: true)); maps.Add(new SecondColumnDictionary(item.Alias, item.Name, false, item.Sort, color: "title_color", isNumber: false, expand: true));
} }
...@@ -307,8 +326,8 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute ...@@ -307,8 +326,8 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
foreach (var item in workloadTypes.OrderBy(t => t.Id)) foreach (var item in workloadTypes.OrderBy(t => t.Id))
{ {
maps.Add(new SecondColumnDictionary($"{item.TypeName}占比", $"Workload_Ratio_{item.Id}", true, 1, "Top", isNumber: true)); maps.Add(new SecondColumnDictionary($"{item.TypeName}占比", $"Workload_Ratio_{item.Id}", true, 400, "Top", isNumber: true));
maps.Add(new SecondColumnDictionary($"{item.TypeName}金额", $"Workload_Amount_{item.Id}", true, 1, "Top", isNumber: true)); maps.Add(new SecondColumnDictionary($"{item.TypeName}金额", $"Workload_Amount_{item.Id}", true, 400, "Top", isNumber: true));
} }
} }
} }
...@@ -324,7 +343,7 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute ...@@ -324,7 +343,7 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
{ {
maps.Add(new SecondColumnDictionary(item.Value, item.Title, false, ++preAccountingRewardSort, type: "PreAccountingReward", color: "preaccountingreward_color")); maps.Add(new SecondColumnDictionary(item.Value, item.Title, false, ++preAccountingRewardSort, type: "PreAccountingReward", color: "preaccountingreward_color"));
} }
return maps.OrderBy(w => w.Sort).ToList(); return maps.OrderBy(w => w.Site).ThenBy(w => w.Sort).ToList();
} }
/// <summary> /// <summary>
...@@ -460,7 +479,7 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D ...@@ -460,7 +479,7 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
#region 添加参考人均 lcr:参考人均那里直接取4.1的人均绩效 #region 添加参考人均 lcr:参考人均那里直接取4.1的人均绩效
// 添加参考人均(二次分配审核时,提示业务中层测算表的基础绩效或实际人均) // 添加参考人均(二次分配审核时,提示业务中层测算表的基础绩效或实际人均)
var refAvg = 0m; decimal refAvg = 0m, refNum = 0m;
if (Enum.TryParse(typeof(UnitType), second.UnitType, true, out object unittype)) if (Enum.TryParse(typeof(UnitType), second.UnitType, true, out object unittype))
{ {
// 优先取 业务中层实际人均绩效 否则 取 科室人均 // 优先取 业务中层实际人均绩效 否则 取 科室人均
...@@ -469,8 +488,10 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D ...@@ -469,8 +488,10 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
var rescompute = _resaccountRepository.GetEntity(w => w.AllotID == allot.ID && w.AccountingUnit == second.Department && w.UnitType == (int)unittype); var rescompute = _resaccountRepository.GetEntity(w => w.AllotID == allot.ID && w.AccountingUnit == second.Department && w.UnitType == (int)unittype);
var avg = (empolyee != null && empolyee.FitPeopleValue.HasValue) ? empolyee.FitPeopleValue : rescompute?.Avg ?? 0; var avg = (empolyee != null && empolyee.FitPeopleValue.HasValue) ? empolyee.FitPeopleValue : rescompute?.Avg ?? 0;
refAvg = avg ?? 0; refAvg = avg ?? 0;
refNum = rescompute?.Number ?? 0;
} }
head.AddOrUpdate("RefAvg", Math.Round(refAvg, 0, MidpointRounding.AwayFromZero)); head.AddOrUpdate("RefAvg", Math.Round(refAvg, 0, MidpointRounding.AwayFromZero));
head.AddOrUpdate("RefNum", refNum);
#endregion #endregion
// 横向 纵向 特有顶部信息 // 横向 纵向 特有顶部信息
......
...@@ -574,6 +574,7 @@ select new ...@@ -574,6 +574,7 @@ select new
AttendanceDay = t1.AttendanceDay, AttendanceDay = t1.AttendanceDay,
ReservedRatio = t1.ReservedRatio, ReservedRatio = t1.ReservedRatio,
BankCard = t1.BankCard, BankCard = t1.BankCard,
PermanentStaff = t1.PermanentStaff,
Remark = t1.Remark, Remark = t1.Remark,
Reserve01 = t1.Reserve01, Reserve01 = t1.Reserve01,
Reserve02 = t1.Reserve02, Reserve02 = t1.Reserve02,
...@@ -785,6 +786,7 @@ public ApiResponse SaveReportPersonTag(int hospitalId, int allotId, int userId, ...@@ -785,6 +786,7 @@ public ApiResponse SaveReportPersonTag(int hospitalId, int allotId, int userId,
employee.AttendanceDay = pdata.AttendanceDay; employee.AttendanceDay = pdata.AttendanceDay;
employee.ReservedRatio = pdata.ReservedRatio; employee.ReservedRatio = pdata.ReservedRatio;
employee.BankCard = pdata.BankCard; employee.BankCard = pdata.BankCard;
employee.PermanentStaff = pdata.PermanentStaff;
employee.Remark = pdata.Remark; employee.Remark = pdata.Remark;
employee.Reserve01 = pdata.Reserve01; employee.Reserve01 = pdata.Reserve01;
employee.Reserve02 = pdata.Reserve02; employee.Reserve02 = pdata.Reserve02;
...@@ -927,7 +929,7 @@ public void SaveReportTag(int hospitalId, SaveCollectData request) ...@@ -927,7 +929,7 @@ public void SaveReportTag(int hospitalId, SaveCollectData request)
{ {
var header = request.ColHeaders[c]; var header = request.ColHeaders[c];
var first = alias.FirstOrDefault(w => w.Alias.ToLower() == header.ToLower()); var first = alias.FirstOrDefault(w => w.Alias.ToLower() == header.ToLower());
if (!default(KeyValuePair<string, string>).Equals(first) if (first!=null && !default(KeyValuePair<string, string>).Equals(first)
&& !result.ContainsKey(header) && !result.ContainsKey(header)
&& request.Data[rownumber].Length > c) && request.Data[rownumber].Length > c)
{ {
......
...@@ -911,7 +911,8 @@ public List<SecondTempResponse> GetTemp(int hospitalid, string unitType, string ...@@ -911,7 +911,8 @@ public List<SecondTempResponse> GetTemp(int hospitalid, string unitType, string
} }
else else
{ {
useTemp = agusetempRepository.GetEntity(t => t.HospitalId == hospitalid && t.UnitType == unitType && t.Department == department); var useTemps = agusetempRepository.GetEntities(t => t.HospitalId == hospitalid);
useTemp = useTemps.FirstOrDefault(t => UnitTypeUtil.IsEqualsUnitType(t.UnitType, unitType) && t.Department == department);
} }
var secondTemps = _mapper.Map<List<SecondTempResponse>>(temps); var secondTemps = _mapper.Map<List<SecondTempResponse>>(temps);
...@@ -1681,7 +1682,7 @@ bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount) ...@@ -1681,7 +1682,7 @@ bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount)
var nightShiftWorkPerforFee = data.Sum(w => w.NightWorkPerformance ?? 0); var nightShiftWorkPerforFee = data.Sum(w => w.NightWorkPerformance ?? 0);
var total = data.Sum(t => (t.DistPerformance ?? 0) + (t.NightWorkPerformance ?? 0)); var total = data.Sum(t => (t.DistPerformance ?? 0) + (t.NightWorkPerformance ?? 0));
if (!VerifySubmissioAmount(nightShiftWorkPerforFee, second.NightShiftWorkPerforFee)) if (!VerifySubmissioAmount(nightShiftWorkPerforFee, second.NightShiftWorkPerforFee))
throw new PerformanceException($"夜班绩效金额不一致!夜班绩效金额:{second.NightShiftWorkPerforFee ?? 0:0.####},提交金额:{nightShiftWorkPerforFee:0.####}"); throw new PerformanceException($"专项绩效金额不一致!专项绩效金额:{second.NightShiftWorkPerforFee ?? 0:0.####},提交金额:{nightShiftWorkPerforFee:0.####}");
else if (!VerifySubmissioAmount(total, second.RealGiveFee)) else if (!VerifySubmissioAmount(total, second.RealGiveFee))
throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee:0.####},提交金额:{total:0.####}"); throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee:0.####},提交金额:{total:0.####}");
else else
......
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