feat 卡类型编辑

This commit is contained in:
2025-01-03 11:56:06 +08:00
parent d7ab8f27e6
commit fddf77858e
10 changed files with 129 additions and 43 deletions

View File

@@ -221,7 +221,6 @@ public class GainfoUpdateService : IGainfoUpdateService
CostId = item.KOSTL,
EntryDate = item.createdate,
ResignationDate = item.ZLZRQ,
CardType = SafeParseCardType(item.ZZ_KLX),
Workplace = _tenants.LastOrDefault(x => x.Name == item.ZZ_GZDJDNM)?.Code ?? item.ZZ_GZDJDNM,
Factory = _tenants.FirstOrDefault(x => x.Name == item.ZZ_GZDCQNM)?.Code ?? item.ZZ_GZDCQNM,
};
@@ -251,7 +250,6 @@ public class GainfoUpdateService : IGainfoUpdateService
ZSTATUS = item.ZSTATUS,
ZLZRQ = item.ZLZRQ,
STELL_NM = item.STELL_NM,
ZZ_KLX = item.ZZ_KLX,
createdate = item.createdate,
ZZ_GZDJDNM = item.ZZ_GZDJDNM,
ZZ_GZDCQNM = item.ZZ_GZDCQNM,
@@ -284,7 +282,6 @@ public class GainfoUpdateService : IGainfoUpdateService
ResignationDate = item.ZLZRQ,
Workplace = workplace,
Factory = factory,
CardType = SafeParseCardType(item.ZZ_KLX)
}).Where(x => x.Code == item.ename).ExecuteCommandAsync();
await _identityUserSyncService.SyncAccountAsync(gainfo.Code, gainfo.Name, gainfo.IdNo, factory);
@@ -355,7 +352,6 @@ public class GainfoUpdateService : IGainfoUpdateService
ResignationDate = item.ZLZRQ,
Workplace = workplace,
Factory = factory,
CardType = SafeParseCardType(item.ZZ_KLX)
}).Where(x => x.Code == item.ename).ExecuteCommandAsync();
}
}
@@ -385,7 +381,6 @@ public class GainfoUpdateService : IGainfoUpdateService
ZWORKCODE = x.ename,
ZZ_SFZH = x.idno,
GBDAT = x.birthday,
ZZ_KLX = x.ZZ_KLX,
ZXUELI = x.email,
ORGEH = x.appellation,
ZMOBILE = x.phone,
@@ -432,7 +427,6 @@ public class GainfoUpdateService : IGainfoUpdateService
ename = person.ZWORKCODE,
idno = person.ZZ_SFZH,
birthday = person.GBDAT,
ZZ_KLX = person.ZZ_KLX,
email = person.ZXUELI,
appellation = person.ORGEH,
phone = person.ZMOBILE,
@@ -477,14 +471,4 @@ public class GainfoUpdateService : IGainfoUpdateService
idNo = idNo.TrimStart();
return idNo[..6];
}
private static int? SafeParseCardType(string ZZ_KLX)
{
if (int.TryParse(ZZ_KLX, out var cardType))
{
return cardType;
}
return null;
}
}