Merge branch 'development'
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
using Dlhis.ScheduledTask.SyncSapInfo.Dto;
|
||||
|
||||
namespace Dlhis.ScheduledTask.SyncSapInfo.Comparers;
|
||||
|
||||
/// <summary>
|
||||
/// 机构数据比较器
|
||||
/// </summary>
|
||||
public class SapOrganizationComparer : IEqualityComparer<SapOrganizationItem>
|
||||
{
|
||||
public bool Equals(SapOrganizationItem x, SapOrganizationItem y)
|
||||
{
|
||||
if (ReferenceEquals(x, y)) return true;
|
||||
if (ReferenceEquals(x, null) || ReferenceEquals(y, null)) return false;
|
||||
if (x.GetType() != y.GetType()) return false;
|
||||
|
||||
return x.BEGDA == y.BEGDA
|
||||
&& x.ENDDA == y.ENDDA
|
||||
&& x.LANGU == y.LANGU
|
||||
&& x.OBJID == y.OBJID
|
||||
&& x.STEXT == y.STEXT
|
||||
&& x.SOBID == y.SOBID
|
||||
&& x.ORGID01 == y.ORGID01
|
||||
&& x.ORGID02 == y.ORGID02;
|
||||
}
|
||||
|
||||
public int GetHashCode(SapOrganizationItem obj)
|
||||
{
|
||||
return obj.BEGDA.SafeGetHashCode() ^ obj.ENDDA.SafeGetHashCode()
|
||||
^ obj.LANGU.SafeGetHashCode() ^ obj.OBJID.SafeGetHashCode()
|
||||
^ obj.STEXT.SafeGetHashCode() ^ obj.SOBID.SafeGetHashCode()
|
||||
^ obj.ORGID01.SafeGetHashCode() ^ obj.ORGID02.SafeGetHashCode();
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
using Dlhis.ScheduledTask.SyncSapInfo.Dto;
|
||||
|
||||
namespace Dlhis.ScheduledTask.SyncSapInfo.Comparers;
|
||||
|
||||
/// <summary>
|
||||
/// 岗位信息比较器
|
||||
/// </summary>
|
||||
public class SapPositionComparer : IEqualityComparer<SapPositionItem>
|
||||
{
|
||||
public bool Equals(SapPositionItem x, SapPositionItem y)
|
||||
{
|
||||
if (ReferenceEquals(x, y)) return true;
|
||||
if (ReferenceEquals(x, null) || ReferenceEquals(y, null)) return false;
|
||||
if (x.GetType() != y.GetType()) return false;
|
||||
|
||||
return x.BEGDA == y.BEGDA
|
||||
&& x.ENDDA == y.ENDDA
|
||||
&& x.LANGU == y.LANGU
|
||||
&& x.ZJOBID == y.ZJOBID
|
||||
&& x.ZJOBNAME == y.ZJOBNAME
|
||||
&& x.ZZWID == y.ZZWID
|
||||
&& x.ZDEPID == y.ZDEPID;
|
||||
}
|
||||
|
||||
public int GetHashCode(SapPositionItem obj)
|
||||
{
|
||||
return obj.BEGDA.SafeGetHashCode() ^ obj.ENDDA.SafeGetHashCode()
|
||||
^ obj.LANGU.SafeGetHashCode() ^ obj.ZJOBID.SafeGetHashCode()
|
||||
^ obj.ZJOBNAME.SafeGetHashCode() ^ obj.ZZWID.SafeGetHashCode()
|
||||
^ obj.ZDEPID.SafeGetHashCode();
|
||||
}
|
||||
}
|
||||
@@ -137,7 +137,6 @@ public class SyncPersonJob
|
||||
Position = item.web,
|
||||
Remark = item.remark,
|
||||
Werks = item.WERKS,
|
||||
Employed = item.isowner,
|
||||
};
|
||||
|
||||
if (item.isowner == "T")
|
||||
@@ -150,6 +149,7 @@ public class SyncPersonJob
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void UpdatePerson(IDbContext db, GainfoSapEntity item)
|
||||
{
|
||||
var gainfoSap = db.Queryable<GainfoSapEntity>().Where(x => x.ename == item.ename).First();
|
||||
|
||||
Reference in New Issue
Block a user