Commit 6cb7601b by wyc

‘考勤下发’ Code判断

parent 902d0a22
......@@ -836,12 +836,12 @@ public ApiResponse IssueStatistics(int allotId, int userid, int hospitalId)
{
var inserts = insertIssues.Select(item =>
{
var code = cofaccounting.FirstOrDefault(w => w.UnitType == item.UnitType && w.AccountingUnit == item.AccountingUnit).Code;
var code = cofaccounting.FirstOrDefault(w => w.UnitType == item.UnitType && w.AccountingUnit == item.AccountingUnit);
return new per_attendance_issue()
{
AllotId = allotId,
HospitalId = hospitalId,
Code = (code == null) ? "" : code,
Code = code == null ? "" : code.Code,
UnitType = item.UnitType,
AccountingUnit = item.AccountingUnit,
PersonnelNumber = item.PersonnelNumber,
......@@ -874,11 +874,11 @@ public ApiResponse IssueStatistics(int allotId, int userid, int hospitalId)
List<per_attendance_issue> updateIssuedates = new List<per_attendance_issue>();
foreach (var item in updateIssues)
{
var code = cofaccounting.FirstOrDefault(w => w.UnitType == item.UnitType && w.AccountingUnit == item.AccountingUnit).Code;
var code = cofaccounting.FirstOrDefault(w => w.UnitType == item.UnitType && w.AccountingUnit == item.AccountingUnit);
var issuePersonnel = issues.FirstOrDefault(w => w.PersonnelNumber == item.PersonnelNumber);
issuePersonnel.UnitType = item.UnitType;
issuePersonnel.AccountingUnit = item.AccountingUnit;
issuePersonnel.Code = (code == null) ? "" : code;
issuePersonnel.Code = code == null ? "" : code.Code;
issuePersonnel.BeginDate = item.BeginDate;
issuePersonnel.EndDate = item.EndDate;
issuePersonnel.DeductionDays = item.DeductionDays;
......
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