修改

parent 88f655c2
......@@ -103,7 +103,7 @@ public ApiResponse Import([FromForm] IFormCollection form)
if (!FileHelper.CreateFile(path, bytes))
return new ApiResponse(ResponseType.Fail, $"{file.FileName}上传失败");
allot.Path = path;
allot.Remark = EnumHelper.GetDescription(AllotStates.FileUploaded);
allot.Remark = EnumHelper.GetDescription(AllotStates.数据已上传);
if (!againAllotService.Update(allot, againid))
return new ApiResponse(ResponseType.Fail, $"{file.FileName}上传成功,修改状态失败");
......
......@@ -172,8 +172,8 @@ public ApiResponse Import([FromForm] IFormCollection form)
if (!FileHelper.CreateFile(path, bytes))
return new ApiResponse(ResponseType.Fail, $"{file.FileName}上传失败");
allot.Path = path;
allot.States = (int)AllotStates.FileUploaded;
allot.Remark = EnumHelper.GetDescription(AllotStates.FileUploaded);
allot.States = (int)AllotStates.数据已上传;
allot.Remark = EnumHelper.GetDescription(AllotStates.数据已上传);
allot.UploadDate = DateTime.Now;
allot.Generate = (int)AllotGenerate.Init;
if (!_allotService.Update(allot))
......@@ -230,8 +230,8 @@ public ApiResponse ImportExtraction(int allotId)
if (!FileHelper.CreateFile(path, bytes))
return new ApiResponse(ResponseType.Fail, $"上传失败");
allot.Path = path;
allot.States = (int)AllotStates.FileUploaded;
allot.Remark = EnumHelper.GetDescription(AllotStates.FileUploaded);
allot.States = (int)AllotStates.数据已上传;
allot.Remark = EnumHelper.GetDescription(AllotStates.数据已上传);
allot.UploadDate = DateTime.Now;
allot.Generate = (int)AllotGenerate.Init;
allot.IsModifyConfig = 1;
......@@ -280,11 +280,11 @@ public ApiResponse GenerateAsync([CustomizeValidator(RuleSet = "Delete"), FromBo
if (tasks.Any(w => w.Argument == allot.ID.ToString() && w.JobType == (int)Background.JobType.生成测算表 && status.Contains(w.Status)))
return new ApiResponse(ResponseType.OK, "当前绩效正在生成中,请等待生成完成后重新生成");
if (allot.States == (int)AllotStates.Wait)
if (allot.States == (int)AllotStates.等待)
return new ApiResponse(ResponseType.OK, "当前绩效正在等待生成");
_logManageService.WriteMsg("生成绩效准备中", $"准备生成{allot.Year}-{allot.Month.ToString().PadLeft(2, '0')}月份绩效,请稍等!", 1, allot.ID, "ReceiveMessage", true);
_allotService.UpdateAllotStates(allot.ID, (int)AllotStates.Wait, EnumHelper.GetDescription(AllotStates.Wait), allot.Generate);
_allotService.UpdateAllotStates(allot.ID, (int)AllotStates.等待, EnumHelper.GetDescription(AllotStates.等待), allot.Generate);
//_backgroundTaskQueue.QueueBackgroundWorkItem(async token =>
//{
......@@ -316,7 +316,7 @@ public ApiResponse GenerateAsync([CustomizeValidator(RuleSet = "Delete"), FromBo
public ApiResponse GenerateReport([CustomizeValidator(RuleSet = "Delete"), FromBody] AllotRequest request)
{
var allot = _allotService.GetAllot(request.ID);
var states = new[] { (int)AllotStates.Archive, (int)AllotStates.GenerateSucceed, (int)AllotStates.GenerateAccomplish };
var states = new[] { (int)AllotStates.归档, (int)AllotStates.绩效下发, (int)AllotStates.绩效结果解析成功 };
if (null == allot || !states.Contains(allot.States))
throw new PerformanceException("当前绩效暂未生成,无法统计报表数据。");
......@@ -456,7 +456,7 @@ public ApiResponse Issued([FromBody] AllotRequest request)
var isIssued = _resultComputeService.IssuedChangeSecond(allot, seconds);
if (isIssued)
{
_allotService.UpdateAllotStates(allot.ID, (int)AllotStates.GenerateSucceed, EnumHelper.GetDescription(AllotStates.GenerateSucceed));
_allotService.UpdateAllotStates(allot.ID, (int)AllotStates.绩效下发, EnumHelper.GetDescription(AllotStates.绩效下发));
costTransferService.RejectedApplicat(allot.ID);
return new ApiResponse(ResponseType.OK, "下发成功");
}
......
......@@ -35,13 +35,12 @@ public class CollectController : ControllerBase
/// </summary>
[HttpPost]
[Route("getcollectcontent")]
public ApiResponse GetCollectContent([FromQuery] int hospitalId, [FromQuery] int userId)
public ApiResponse<List<CollectPermission>> GetCollectContent([FromQuery] int hospitalId, [FromQuery] int userId)
{
if (hospitalId <= 0)
return new ApiResponse(ResponseType.ParameterError, "参数无效");
return new ApiResponse<List<CollectPermission>>(ResponseType.ParameterError, "参数无效");
var result = collectService.GetCollectContent(hospitalId, userId);
return new ApiResponse(ResponseType.OK, result);
return collectService.GetCollectContent(hospitalId, userId);
}
/// <summary>
......
......@@ -830,7 +830,7 @@ public ApiResponse RedistributionSubmit([FromBody] SecondComputeDto request)
if (allot == null)
throw new PerformanceException("绩效记录不存在!");
if (!new int[] { (int)AllotStates.GenerateSucceed, (int)AllotStates.Archive }.Contains(allot.States))
if (!new int[] { (int)AllotStates.绩效下发, (int)AllotStates.归档 }.Contains(allot.States))
throw new PerformanceException("绩效未下发,无法提交!");
var loads = _redistributionService.GetWorkLoads(allot.HospitalId, second.UnitType, second.Department);
......
......@@ -130,37 +130,37 @@
<member name="F:Performance.DtoModels.DbSrouceType.Performance">
<summary> 绩效库 </summary>
</member>
<member name="F:Performance.DtoModels.AllotStates.NoData">
<member name="F:Performance.DtoModels.AllotStates.数据未上传">
<summary> 数据未上传 </summary>
</member>
<member name="F:Performance.DtoModels.AllotStates.FileUploaded">
<member name="F:Performance.DtoModels.AllotStates.数据已上传">
<summary> 数据已上传 </summary>
</member>
<member name="F:Performance.DtoModels.AllotStates.InCheckData">
<member name="F:Performance.DtoModels.AllotStates.正在校验数据">
<summary> 正在校验数据 </summary>
</member>
<member name="F:Performance.DtoModels.AllotStates.CheckPass">
<member name="F:Performance.DtoModels.AllotStates.数据验证通过">
<summary> 数据验证通过 </summary>
</member>
<member name="F:Performance.DtoModels.AllotStates.CheckFail">
<member name="F:Performance.DtoModels.AllotStates.数据错误">
<summary> 数据错误 </summary>
</member>
<member name="F:Performance.DtoModels.AllotStates.InGenerate">
<member name="F:Performance.DtoModels.AllotStates.正在生成绩效">
<summary> 正在生成绩效 </summary>
</member>
<member name="F:Performance.DtoModels.AllotStates.GenerateSucceed">
<member name="F:Performance.DtoModels.AllotStates.绩效下发">
<summary> 绩效下发 </summary>
</member>
<member name="F:Performance.DtoModels.AllotStates.GenerateFail">
<member name="F:Performance.DtoModels.AllotStates.绩效解析失败">
<summary> 绩效解析失败 </summary>
</member>
<member name="F:Performance.DtoModels.AllotStates.Archive">
<member name="F:Performance.DtoModels.AllotStates.归档">
<summary> 归档 </summary>
</member>
<member name="F:Performance.DtoModels.AllotStates.Wait">
<member name="F:Performance.DtoModels.AllotStates.等待">
<summary> 等待 </summary>
</member>
<member name="F:Performance.DtoModels.AllotStates.GenerateAccomplish">
<member name="F:Performance.DtoModels.AllotStates.绩效结果解析成功">
<summary> 绩效结果解析成功 </summary>
</member>
<member name="F:Performance.DtoModels.AgWorkloadType.PreAccountingReward">
......
......@@ -49,37 +49,37 @@ public enum AllotStates
{
/// <summary> 数据未上传 </summary>
[Description("数据未上传")]
NoData = 0,
数据未上传 = 0,
/// <summary> 数据已上传 </summary>
[Description("数据已上传")]
FileUploaded = 1,
数据已上传 = 1,
/// <summary> 正在校验数据 </summary>
[Description("正在校验数据")]
InCheckData = 2,
正在校验数据 = 2,
/// <summary> 数据验证通过 </summary>
[Description("数据验证通过")]
CheckPass = 3,
数据验证通过 = 3,
/// <summary> 数据错误 </summary>
[Description("数据错误")]
CheckFail = 4,
数据错误 = 4,
/// <summary> 正在生成绩效 </summary>
[Description("正在生成绩效")]
InGenerate = 5,
正在生成绩效 = 5,
/// <summary> 绩效下发 </summary>
[Description("绩效下发")]
GenerateSucceed = 6,
绩效下发 = 6,
/// <summary> 绩效解析失败 </summary>
[Description("绩效解析失败")]
GenerateFail = 7,
绩效解析失败 = 7,
/// <summary> 归档 </summary>
[Description("归档")]
Archive = 8,
归档 = 8,
/// <summary> 等待 </summary>
[Description("等待")]
Wait = 9,
等待 = 9,
/// <summary> 绩效结果解析成功 </summary>
[Description("数据验证通过")]
GenerateAccomplish = 10,
绩效结果解析成功 = 10,
}
public enum AgWorkloadType
......
......@@ -36,5 +36,7 @@ public class view_allot_sign_emp : view_allot_sign_emp_finance
public string Emp_UnitType { get; set; }
public string Emp_AccountingUnit { get; set; }
public string Batch { get; set; }
public string BatchDate { get; set; }
public string BankName { get; set; }
}
}
......@@ -157,7 +157,7 @@ public List<AllotResponse> GetSuccAllotList(int? hospitalId)
if (!hospitalId.HasValue || hospitalId.Value <= 0)
throw new PerformanceException("hospitalId无效");
var allotList = _allotRepository.GetEntities(t => t.HospitalId == hospitalId
&& new List<int> { (int)AllotStates.Archive, (int)AllotStates.GenerateSucceed }.Contains(t.States));
&& new List<int> { (int)AllotStates.归档, (int)AllotStates.绩效下发 }.Contains(t.States));
allotList = allotList == null ? allotList : allotList.OrderByDescending(t => t.ID).ToList();
var isconfig = perforHospitalconfigRepository.GetEntity(t => t.HospitalId == hospitalId) == null ? false : true;
var reuslt = _mapper.Map<List<AllotResponse>>(allotList);
......@@ -186,8 +186,8 @@ public per_allot InsertAllot(AllotRequest request, int userID)
var allot = _mapper.Map<per_allot>(request);
allot.CreateDate = DateTime.Now;
allot.CreateUser = userID;
allot.States = (int)AllotStates.NoData;
allot.Remark = EnumHelper.GetDescription(AllotStates.NoData);
allot.States = (int)AllotStates.数据未上传;
allot.Remark = EnumHelper.GetDescription(AllotStates.数据未上传);
if (!_allotRepository.Add(allot))
throw new PerformanceException("保存失败");
......@@ -317,7 +317,7 @@ public void Generate(per_allot allot)
{
logManageService.WriteMsg("绩效开始执行", $"正在生成{allot.Year}-{allot.Month.ToString().PadLeft(2, '0')}月份绩效!", 1, allot.ID, "ReceiveMessage", true);
UpdateAllotStates(allot.ID, (int)AllotStates.InCheckData, EnumHelper.GetDescription(AllotStates.InCheckData));
UpdateAllotStates(allot.ID, (int)AllotStates.正在校验数据, EnumHelper.GetDescription(AllotStates.正在校验数据));
var excel = new PerExcel();
int generate = allot.Generate;
if (new int[] { (int)AllotGenerate.OriginalDataEdited, (int)AllotGenerate.PersonnelOffice }.Contains(allot.Generate))
......@@ -345,7 +345,7 @@ public void Generate(per_allot allot)
// return;
//}
}
UpdateAllotStates(allot.ID, (int)AllotStates.InGenerate, EnumHelper.GetDescription(AllotStates.InGenerate));
UpdateAllotStates(allot.ID, (int)AllotStates.正在生成绩效, EnumHelper.GetDescription(AllotStates.正在生成绩效));
//保底绩效计算需分两次进行;
//第一次计算包含(保底绩效临床医生人均绩效、保底绩效医技医生人均绩效、保底绩效护士人均绩效)得出科室业绩绩效;
......@@ -445,7 +445,7 @@ public void Generate(per_allot allot)
// 科室创建但不下发
resultComputeService.GenerateSecondAllot(allot);
UpdateAllotStates(allot.ID, (int)AllotStates.GenerateAccomplish, EnumHelper.GetDescription(AllotStates.GenerateAccomplish), generate);
UpdateAllotStates(allot.ID, (int)AllotStates.绩效结果解析成功, EnumHelper.GetDescription(AllotStates.绩效结果解析成功), generate);
perforCofdirectorRepository.SupplementaryData(allot.ID);
// 验证科室核算单元、工号
AccoungtingVerify(allot.ID);
......@@ -466,7 +466,7 @@ public void Generate(per_allot allot)
catch (Exception ex)
{
logManageService.WriteMsg("绩效生成失败", ex.Message, 4, allot.ID, "ReceiveMessage");
UpdateAllotStates(allot.ID, (int)AllotStates.GenerateFail, EnumHelper.GetDescription(AllotStates.GenerateFail));
UpdateAllotStates(allot.ID, (int)AllotStates.绩效解析失败, EnumHelper.GetDescription(AllotStates.绩效解析失败));
//SendEmail(allot, mail, 2, time);
//throw ex;
}
......@@ -713,7 +713,7 @@ public List<OwnerPerformanceDto> GetOwnerPerformance(int userid)
var allot = allots.FirstOrDefault(w => w.ID == owner.AllotId);
if (batch?.BatchDate != null && batch.BatchDate.HasValue)
return batch.BatchDate.Value.ToString("yyyy年MM月dd日 HH:mm");
else if (allot?.States == (int)AllotStates.Archive)
else if (allot?.States == (int)AllotStates.归档)
{
if (allot?.PigeonholeDate != null && allot.PigeonholeDate.HasValue)
return allot.PigeonholeDate.Value.ToString("yyyy年MM月dd日 HH:mm");
......@@ -723,7 +723,7 @@ public List<OwnerPerformanceDto> GetOwnerPerformance(int userid)
};
var res = owner
.Where(w => w.States == (int)AllotStates.Archive)
.Where(w => w.States == (int)AllotStates.归档)
.GroupBy(w => new { w.AllotId, w.Year, w.Month, w.JobNumber })
.Select(w => new OwnerPerformanceDto
{
......
......@@ -87,13 +87,13 @@ public class CollectService : IAutoInjection
/// <param name="hospitalId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public IEnumerable<CollectPermission> GetCollectContent(int hospitalId, int userId)
public ApiResponse<List<CollectPermission>> GetCollectContent(int hospitalId, int userId)
{
var states = new[] { (int)AllotStates.Archive, (int)AllotStates.GenerateSucceed, (int)AllotStates.GenerateAccomplish };
var states = new[] { (int)AllotStates.归档, (int)AllotStates.绩效下发, (int)AllotStates.绩效结果解析成功 };
var allotList = perforPerallotRepository.GetEntities(w => w.HospitalId == hospitalId && states.Contains(w.States))
?.OrderByDescending(w => w.Year).ThenByDescending(w => w.Month).ToList();
if (allotList == null || !allotList.Any())
return null;
return new ApiResponse<List<CollectPermission>>(ResponseType.Fail, "暂无绩效记录", null);
var allot = allotList.First();
......@@ -102,11 +102,11 @@ public IEnumerable<CollectPermission> GetCollectContent(int hospitalId, int user
var sheets = exmoduleRepository.GetEntities(w => w.HospitalId == hospitalId && types.Contains(w.SheetType ?? 0));
var specials = exspecialRepository.GetEntities(w => w.HospitalId == hospitalId);
if ((sheets == null || !sheets.Any()) && (specials == null || !specials.Any()))
return null;
return new ApiResponse<List<CollectPermission>>(ResponseType.Fail, "未能找到模块信息", null);
var headers = exitemRepository.GetEntities(w => sheets.Select(m => m.Id).Contains(w.ModuleId ?? 0)) ?? new List<ex_item>();
if ((headers == null || !headers.Any()) && (specials == null || !specials.Any()))
return null;
return new ApiResponse<List<CollectPermission>>(ResponseType.Fail, "未能找到指标项目", null);
if (specials != null && specials.Any())
{
......@@ -161,9 +161,15 @@ into emppmss
w.AttachLast = w.BanChange ? 1 : w.AttachLast;
w.Visible = w.BanChange ? 1 : w.Visible;
});
return result;
var names = new string[]
{
"核算单元分类", "核算单元", "人员分类", "科室名称",
"核算单元(医技组)", "核算单元(医生组)", "核算单元(护理组)",
"核算单元(医技组)", "核算单元(医生组)", "核算单元(护理组)"
};
result = result.Where(w => !names.Contains(w.HeadName)).ToList();
}
return result;
return new ApiResponse<List<CollectPermission>>(ResponseType.OK, "", result);
}
/// <summary>
......@@ -342,7 +348,7 @@ public HandsonTable GetCollectData(int userId, int allotId, string sheetName)
if (allot == null)
throw new PerformanceException("参数无效");
var states = new[] { (int)AllotStates.Archive, (int)AllotStates.GenerateSucceed, (int)AllotStates.GenerateAccomplish };
var states = new[] { (int)AllotStates.归档, (int)AllotStates.绩效下发, (int)AllotStates.绩效结果解析成功 };
// 如果录入绩效未生成 则获取最近新可用绩效记录
if (!states.Contains(allot.States))
{
......@@ -523,7 +529,7 @@ private List<HandsonRowData> GetAccountExtra(per_allot allot, int sheetType)
}
else
{
var allotStates = new int[] { (int)AllotStates.Archive, (int)AllotStates.GenerateSucceed, (int)AllotStates.GenerateAccomplish };
var allotStates = new int[] { (int)AllotStates.归档, (int)AllotStates.绩效下发, (int)AllotStates.绩效结果解析成功 };
var allots = perforPerallotRepository.GetEntities(t => t.HospitalId == allot.HospitalId && allotStates.Contains(t.States) && t.Year < allot.Year && t.Month < allot.Month);
var prevAllot = allots.LastOrDefault();
if (prevAllot == null) return handsonRows;
......
......@@ -37,8 +37,10 @@ public static List<cof_alias> PerformanceTotal(string route, string[] heads)
new cof_alias{ Alias = "员工号", Name = nameof(view_allot_sign_emp.JobNumber), States = 1, SumStatus = 0, Sort = 4 },
new cof_alias{ Alias = "人员姓名", Name = nameof(view_allot_sign_emp.EmployeeName), States = 1, SumStatus = 0, Sort = 5 },
new cof_alias{ Alias = "职称", Name = nameof(view_allot_sign_emp.TitlePosition), States = 1, SumStatus = 0, Sort = 6 },
new cof_alias{ Alias = "批次", Name = nameof(view_allot_sign_emp.Batch), States = 1, SumStatus = 0, Sort = 7 },
new cof_alias{ Alias = "发放时间", Name = nameof(view_allot_sign_emp.BatchDate), States = 1, SumStatus = 0, Sort = 7 },
new cof_alias{ Alias = "发放银行", Name = nameof(view_allot_sign_emp.BankName), States = 1, SumStatus = 0, Sort = 7 },
new cof_alias{ Alias = "职称", Name = nameof(view_allot_sign_emp.TitlePosition), States = 1, SumStatus = 0, Sort = 8 },
new cof_alias{ Alias = "银行卡号", Name = nameof(view_allot_sign_emp.BankCard), States = 1, SumStatus = 0, Sort = 8 },
new cof_alias{ Alias = "正式/临聘", Name = nameof(view_allot_sign_emp.JobCategory), States = 1, SumStatus = 0, Sort = 9 },
......
......@@ -278,7 +278,7 @@ public bool Applicat(CostTransferRequest request)
|| request.Items.Any(t => t.IsUseRatio == 1 && string.IsNullOrEmpty(t.Source))) throw new PerformanceException("参数错误,申请信息填写不完整");
var allot = perallotRepository.GetEntity(t => t.ID == request.AllotId);
var allotStatus = new[] { (int)AllotStates.GenerateSucceed, (int)AllotStates.Archive };
var allotStatus = new[] { (int)AllotStates.绩效下发, (int)AllotStates.归档 };
if (allotStatus.Contains(allot.States))
throw new PerformanceException("绩效已下发或归档");
......
......@@ -125,7 +125,7 @@ public List<im_employee> GetEmployeeList(int? allotId, int userId)
if (userHospital == null)
throw new PerformanceException("用户未绑定医院!");
var allotList = perallotRepository.GetEntities(t => t.HospitalId == userHospital.HospitalID
&& new List<int> { (int)AllotStates.Archive, (int)AllotStates.GenerateSucceed }.Contains(t.States));
&& new List<int> { (int)AllotStates.归档, (int)AllotStates.绩效下发 }.Contains(t.States));
if (allotList != null && allotList.Any())
{
allotId = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).First().ID;
......@@ -224,7 +224,7 @@ public List<im_employee_clinic> GetEmployeeClinicList(int? allotId, int userId)
if (userHospital == null)
throw new PerformanceException("用户未绑定医院!");
var allotList = perallotRepository.GetEntities(t => t.HospitalId == userHospital.HospitalID
&& new List<int> { (int)AllotStates.Archive, (int)AllotStates.GenerateSucceed }.Contains(t.States));
&& new List<int> { (int)AllotStates.归档, (int)AllotStates.绩效下发 }.Contains(t.States));
if (allotList != null && allotList.Any())
{
allotId = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).First().ID;
......@@ -322,7 +322,7 @@ public List<im_employee_logistics> GetEmployeeLogisticsList(int? allotId, int us
if (userHospital == null)
throw new PerformanceException("用户未绑定医院!");
var allotList = perallotRepository.GetEntities(t => t.HospitalId == userHospital.HospitalID
&& new List<int> { (int)AllotStates.Archive, (int)AllotStates.GenerateSucceed }.Contains(t.States));
&& new List<int> { (int)AllotStates.归档, (int)AllotStates.绩效下发 }.Contains(t.States));
if (allotList != null && allotList.Any())
{
allotId = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).First().ID;
......@@ -412,9 +412,9 @@ public bool DeleteLogistics(im_employee_clinic request)
public bool Audit(int allotId)
{
var allot = perforPerallotRepository.GetEntity(t => t.ID == allotId);
if (allot == null || !new List<int> { (int)AllotStates.GenerateSucceed, (int)AllotStates.GenerateAccomplish }.Contains(allot.States))
if (allot == null || !new List<int> { (int)AllotStates.绩效下发, (int)AllotStates.绩效结果解析成功 }.Contains(allot.States))
throw new PerformanceException("绩效信息错误");
if ((int)AllotStates.Archive == allot.States)
if ((int)AllotStates.归档 == allot.States)
throw new PerformanceException("绩效已归档,暂不支持修改");
allot.Generate = (int)AllotGenerate.PersonnelOffice;
......
......@@ -613,7 +613,7 @@ public string LastAllotFilePath(int allotId)
if (allot == null)
throw new PerformanceException("AllotID错误");
var statesArray = new int[] { (int)AllotStates.GenerateSucceed, (int)AllotStates.Archive };
var statesArray = new int[] { (int)AllotStates.绩效下发, (int)AllotStates.归档 };
var allotList = perallotRepository.GetEntities(t => t.HospitalId == allot.HospitalId && statesArray.Contains(t.States));
var allotLast = allotList?.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
if (allotLast != null)
......@@ -648,7 +648,7 @@ public string Judge(int allotId, int hospitalId, int useTemplate, ref bool isSin
if (hospitalConfigList == null || hospitalConfigList.Count == 0)
throw new PerformanceException("当前医院暂不支持HIS数据抽取");
// 获取最近一次绩效
var statesArray = new int[] { (int)AllotStates.GenerateSucceed, (int)AllotStates.Archive };
var statesArray = new int[] { (int)AllotStates.绩效下发, (int)AllotStates.归档 };
var allotList = perallotRepository.GetEntities(t => t.HospitalId == hospitalId && statesArray.Contains(t.States));
var allotLast = allotList?.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
if (allotLast != null)
......
......@@ -159,8 +159,8 @@ private bool ImportFile(per_allot allot, string filePath)
stream.Read(bytes, 0, bytes.Length);
if (!FileHelper.CreateFile(path, bytes)) return false;
allot.Path = path;
allot.States = (int)AllotStates.FileUploaded;
allot.Remark = EnumHelper.GetDescription(AllotStates.FileUploaded);
allot.States = (int)AllotStates.数据已上传;
allot.Remark = EnumHelper.GetDescription(AllotStates.数据已上传);
allot.UploadDate = DateTime.Now;
allot.Generate = (int)AllotGenerate.Init;
if (!allotService.Update(allot)) return false;
......
......@@ -111,7 +111,7 @@ public string Main(int allotId, int hospitalId, string email, string groupName,
dictionaryService.Handler(hospitalId, allot, groupName, isSingle);
var statesArray = new int[] { (int)AllotStates.GenerateSucceed, (int)AllotStates.Archive };
var statesArray = new int[] { (int)AllotStates.绩效下发, (int)AllotStates.归档 };
var templateFilePath = ExtractHelper.GetExtractFile(hospitalId, allot, ref extractFilePath, filePath);
logService.ReturnTheLog(allotId, groupName, 2, "创建文件", $"模板文件: {FileHelper.GetFileName(templateFilePath)}", 1, isSingle);
......
......@@ -433,10 +433,10 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
head.AddOrUpdate(nameof(ag_headsource.SecondId), second.Id);
head.AddOrUpdate(nameof(ag_headsource.PaymentOfTheMonth), $"{allot.Year}{allot.Month.ToString().PadLeft(2, '0')}月");
head.AddOrUpdate(nameof(ag_headsource.TotalDistPerformance), (allot.States == (int)AllotStates.GenerateSucceed) ? (second.RealGiveFee ?? 0) : 1000);
head.AddOrUpdate(nameof(ag_headsource.NightShiftWorkPerforTotal), (allot.States == (int)AllotStates.GenerateSucceed) ? (second.NightShiftWorkPerforFee ?? 0) : 0);
head.AddOrUpdate(nameof(ag_headsource.TotalDistPerformance), (allot.States == (int)AllotStates.绩效下发) ? (second.RealGiveFee ?? 0) : 1000);
head.AddOrUpdate(nameof(ag_headsource.NightShiftWorkPerforTotal), (allot.States == (int)AllotStates.绩效下发) ? (second.NightShiftWorkPerforFee ?? 0) : 0);
head.AddOrUpdate(nameof(ag_headsource.TotalPerformance), head.GetDecimal(nameof(ag_headsource.TotalDistPerformance)) - head.GetDecimal(nameof(ag_headsource.NightShiftWorkPerforTotal)));
head.AddOrUpdate("Remark", (allot.States == (int)AllotStates.GenerateSucceed) ? "" : "(非正式)");
head.AddOrUpdate("Remark", (allot.States == (int)AllotStates.绩效下发) ? "" : "(非正式)");
#region 添加参考人均 lcr:参考人均那里直接取4.1的人均绩效
// 添加参考人均(二次分配审核时,提示业务中层测算表的基础绩效或实际人均)
......
......@@ -2442,7 +2442,7 @@ public List<DeptDataDetails> DeptComputeDetailList(int userId, int allotId, out
isShowManage = computeService.IsShowManage(allotId);
// 未下发或未归档 则不可见
var status = new int[] { (int)AllotStates.GenerateSucceed, (int)AllotStates.Archive };
var status = new int[] { (int)AllotStates.绩效下发, (int)AllotStates.归档 };
if (!status.Contains(allot.States)) return deptDatas;
......
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