Commit 902d0a22 by wyc

‘考勤下发’ code判断

parent e4dba427
......@@ -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);
var code = cofaccounting.FirstOrDefault(w => w.UnitType == item.UnitType && w.AccountingUnit == item.AccountingUnit).Code;
return new per_attendance_issue()
{
AllotId = allotId,
HospitalId = hospitalId,
Code = code.Code,
Code = (code == null) ? "" : 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);
var code = cofaccounting.FirstOrDefault(w => w.UnitType == item.UnitType && w.AccountingUnit == item.AccountingUnit).Code;
var issuePersonnel = issues.FirstOrDefault(w => w.PersonnelNumber == item.PersonnelNumber);
issuePersonnel.UnitType = item.UnitType;
issuePersonnel.AccountingUnit = item.AccountingUnit;
issuePersonnel.Code = code.Code;
issuePersonnel.Code = (code == null) ? "" : 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