fix 同步接口

This commit is contained in:
cheche
2024-01-06 17:42:06 +08:00
parent ba87dc6c86
commit 062e2538b5
31 changed files with 1873 additions and 3135 deletions

View File

@@ -4,7 +4,6 @@ using Dlhis.Entity.Basic.Entity;
using Dlhis.Entity.Canteen.Enums;
using Kurisu.AspNetCore.Utils.Extensions;
using Kurisu.Core.DataAccess.Dto;
using Kurisu.SqlSugar.Attributes;
using Kurisu.SqlSugar.Extensions;
using Kurisu.SqlSugar.Services;
using Mapster;

View File

@@ -175,4 +175,22 @@ public class GainfoEntity : SugarBaseEntity
/// </summary>
[SugarColumn(ColumnDescription = "卡号")]
public string CarNo { get; set; }
/// <summary>
/// 人事范围
/// </summary>
[SugarColumn(ColumnDescription = "人事范围")]
public string Werks { get; set; }
/// <summary>
/// 人员号
/// </summary>
[SugarColumn(ColumnDescription = "人员号")]
public string Pernr { get; set; }
/// <summary>
/// 邮箱
/// </summary>
[SugarColumn(ColumnDescription = "邮箱")]
public string Email { get; set; }
}

View File

@@ -0,0 +1,93 @@
using Dlhis.Entity;
using SqlSugar;
namespace Dlhis.ScheduledTask.Entities
{
/// <summary>
/// 部门
/// </summary>
[SugarTable(TableName = "T_ORG", TableDescription = "部门表")]
public class ZHRF_SYN_01Entity : SugarBaseEntity
{
/// <summary>
/// 开始日期
/// </summary>
[SugarColumn(ColumnDescription = "开始日期")]
public string BEGDA { get; set; }
/// <summary>
/// 结束日期
/// </summary>
[SugarColumn(ColumnDescription = "结束日期")]
public string ENDDA { get; set; }
/// <summary>
/// 语言代码
/// </summary>
[SugarColumn(ColumnDescription = "语言代码")]
public int LANGU { get; set; }
/// <summary>
/// 部门id
/// </summary>
[SugarColumn(ColumnDescription = "部门id")]
public int OBJID { get; set; }
/// <summary>
/// 部门名称
/// </summary>
[SugarColumn(ColumnDescription = "部门名称")]
public string STEXT { get; set; }
/// <summary>
/// 上级部门
/// </summary>
[SugarColumn(ColumnDescription = "上级部门")]
public string SOBID { get; set; }
/// <summary>
/// 部门层级
/// </summary>
[SugarColumn(ColumnDescription = "部门层级")]
public string ZZ_BMCJ { get; set; }
/// <summary>
/// 公司
/// </summary>
[SugarColumn(ColumnDescription = "公司")]
public string ORGID01 { get; set; }
/// <summary>
/// 事业部
/// </summary>
[SugarColumn(ColumnDescription = "事业部")]
public string ORGID02 { get; set; }
/// <summary>
/// 一级部门
/// </summary>
[SugarColumn(ColumnDescription = "一级部门")]
public string ORGID03 { get; set; }
/// <summary>
/// 二级部门
/// </summary>
[SugarColumn(ColumnDescription = "二级部门")]
public string ORGID04 { get; set; }
/// <summary>
/// 三级部门
/// </summary>
[SugarColumn(ColumnDescription = "三级部门")]
public string ORGID05 { get; set; }
/// <summary>
/// 四级部门
/// </summary>
[SugarColumn(ColumnDescription = "四级部门")]
public string ORGID06 { get; set; }
}
}

View File

@@ -0,0 +1,54 @@
using Dlhis.Entity;
using SqlSugar;
namespace Dlhis.ScheduledTask.Entities
{
/// <summary>
/// 职位表
/// </summary>
[SugarTable(TableName = "T_POST", TableDescription = "职位表")]
public class ZHRF_SYN_02Entity : SugarBaseEntity
{
/// <summary>
/// 开始日期
/// </summary>
[SugarColumn(ColumnDescription = "开始日期")]
public string BEGDA { get; set; }
/// <summary>
/// 结束日期
/// </summary>
[SugarColumn(ColumnDescription = "结束日期")]
public string ENDDA { get; set; }
/// <summary>
/// 语言代码
/// </summary>
[SugarColumn(ColumnDescription = "语言代码")]
public int LANGU { get; set; }
/// <summary>
/// 岗位编码
/// </summary>
[SugarColumn(ColumnDescription = "岗位编码")]
public string ZJOBID { get; set; }
/// <summary>
/// 岗位名称
/// </summary>
[SugarColumn(ColumnDescription = "岗位名称")]
public string ZJOBANME { get; set; }
/// <summary>
/// 职等
/// </summary>
[SugarColumn(ColumnDescription = "职等")]
public string ZJOBACTID { get; set; }
/// <summary>
/// 所属部门ID
/// </summary>
[SugarColumn(ColumnDescription = "所属部门ID")]
public string ZDEPID { get; set; }
}
}

View File

@@ -1,5 +1,5 @@
using Dlhis.ScheduledTask.Extensions;
using Dlhis.ScheduledTask.WsProxy;
using Dlhis.ScheduledTask.Entities;
using Dlhis.ScheduledTask.Extensions;
namespace Dlhis.ScheduledTask.Comparers
{
@@ -8,15 +8,26 @@ namespace Dlhis.ScheduledTask.Comparers
public bool Equals(ZHRS_ORG x, ZHRS_ORG y)
{
if (ReferenceEquals(x, y)) return true;
if (ReferenceEquals(x, null)) return false;
if (ReferenceEquals(y, null)) return false;
if (ReferenceEquals(x, null) || ReferenceEquals(y, null)) return false;
if (x.GetType() != y.GetType()) return false;
return x.OBJID == y.OBJID && x.STEXT == y.STEXT && x.SOBID == y.SOBID;
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(ZHRS_ORG obj)
{
return obj.OBJID.SafeGetHashCode() ^ obj.STEXT.SafeGetHashCode() ^ obj.SOBID.SafeGetHashCode();
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();
}
}
}

View File

@@ -2,7 +2,7 @@
using Dlhis.ScheduledTask.Extensions;
using System.Text;
namespace Dlhis.ScheduledTask
namespace Dlhis.ScheduledTask.Comparers
{
internal class ZHRS_PERSONComparer : IEqualityComparer<PersonDetail>
{

View File

@@ -1,4 +1,5 @@
using Dlhis.ScheduledTask.WsProxy;
using Dlhis.ScheduledTask.Entities;
using Dlhis.ScheduledTask.Extensions;
namespace Dlhis.ScheduledTask.Comparers
{
@@ -7,15 +8,25 @@ namespace Dlhis.ScheduledTask.Comparers
public bool Equals(ZHRS_POST x, ZHRS_POST y)
{
if (ReferenceEquals(x, y)) return true;
if (ReferenceEquals(x, null)) return false;
if (ReferenceEquals(y, null)) return false;
if (ReferenceEquals(x, null) || ReferenceEquals(y, null)) return false;
if (x.GetType() != y.GetType()) return false;
return x.ZJOBID == y.ZJOBID && x.ZJOBNAME == y.ZJOBNAME && x.ZJOBACTID == y.ZJOBACTID && x.ZDEPID == y.ZDEPID;
return x.BEGDA == y.BEGDA
&& x.ENDDA == y.ENDDA
&& x.LANGU == y.LANGU
&& x.ZJOBID == y.ZJOBID
&& x.ZJOBANME == y.ZJOBANME
&& x.ZZWID == y.ZZWID
&& x.ZDEPID == y.ZDEPID;
}
public int GetHashCode(ZHRS_POST obj)
{
return obj.ZJOBID.SafeGetHashCode() ^ obj.ZJOBNAME.SafeGetHashCode() ^ obj.ZJOBACTID.SafeGetHashCode() ^ obj.ZDEPID.SafeGetHashCode();
return obj.BEGDA.SafeGetHashCode() ^ obj.ENDDA.SafeGetHashCode()
^ obj.LANGU.SafeGetHashCode() ^ obj.ZJOBID.SafeGetHashCode()
^ obj.ZJOBANME.SafeGetHashCode() ^ obj.ZZWID.SafeGetHashCode()
^ obj.ZDEPID.SafeGetHashCode();
}
}
}

View File

@@ -3,7 +3,7 @@
namespace Dlhis.ScheduledTask.Configurations
{
[Configuration]
//[Configuration]
public class ServiceSettings
{
public string ServerUrl { get; private set; }
@@ -43,27 +43,7 @@ namespace Dlhis.ScheduledTask.Configurations
/// REST密码
/// </summary>
public string RestPassword { get; set; }
public ServiceSettings()
{
//ServerUrl = ConfigurationManager.AppSettings[nameof(ServerUrl)];
//UserName = ConfigurationManager.AppSettings[nameof(UserName)];
//Password = ConfigurationManager.AppSettings[nameof(Password)];
//SyncTime = ConfigurationManager.AppSettings[nameof(SyncTime)];
//DlhisDatabase = ConfigurationManager.AppSettings[nameof(DlhisDatabase)];
//AttendanceUploadUrl = ConfigurationManager.AppSettings[nameof(AttendanceUploadUrl)];
//AttendanceUploadInterval = SafeParseInt(ConfigurationManager.AppSettings[nameof(AttendanceUploadInterval)]);
//Werks = ConfigurationManager.AppSettings[nameof(Werks)];
//BeginSyncDate = SafeParseDate(ConfigurationManager.AppSettings[nameof(BeginSyncDate)], DateTime.Today);
//ApiPort = SafeParseInt(ConfigurationManager.AppSettings[nameof(ApiPort)], 8099);
//EHRWebServiceUserName = ConfigurationManager.AppSettings[nameof(EHRWebServiceUserName)];
//EHRWebServicePassword = ConfigurationManager.AppSettings[nameof(EHRWebServicePassword)];
//EHRInsertRecordApiUrl = ConfigurationManager.AppSettings[nameof(EHRInsertRecordApiUrl)];
//EHRDeleteRecordApiUrl = ConfigurationManager.AppSettings[nameof(EHRDeleteRecordApiUrl)];
//EHRSavePhotoApiUrl = ConfigurationManager.AppSettings[nameof(EHRSavePhotoApiUrl)];
//EHR_GET_WORK_CARD_INFOApiUrl = ConfigurationManager.AppSettings[nameof(EHR_GET_WORK_CARD_INFOApiUrl)];
//RestUserName = ConfigurationManager.AppSettings[nameof(RestUserName)];
//RestPassword = ConfigurationManager.AppSettings[nameof(RestPassword)];
}
private static int SafeParseInt(string value, int defaultValue = 0)
{

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>disable</Nullable>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..</DockerfileContext>
@@ -23,4 +23,8 @@
<PackageReference Include="Kurisu.AspNetCore" Version="0.4.7" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Dlhis.Entity\Dlhis.Entity.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,76 @@
using System.Security.Cryptography;
namespace Dlhis.ScheduledTask.Entities
{
public partial class ZHRS_ORG
{
/// <summary>
/// 开始日期
/// </summary>
public string BEGDA { get; set; }
/// <summary>
/// 结束日期
/// </summary>
public string ENDDA { get; set; }
/// <summary>
/// 语言
/// </summary>
public int LANGU { get; set; }
/// <summary>
/// 部门id
/// </summary>
public int OBJID { get; set; }
/// <summary>
/// 部门名称
/// </summary>
public string STEXT { get; set; }
/// <summary>
/// 上级部门
/// </summary>
public string SOBID { get; set; }
/// <summary>
/// 公司
/// </summary>
public string ORGID01 { get; set; }
/// <summary>
/// 事业部
/// </summary>
public string ORGID02 { get; set; }
}
public partial class ZHRS_ORG : IEquatable<ZHRS_ORG>
{
public bool Equals(ZHRS_ORG other)
{
if (other is null)
return false;
return this.BEGDA == other.BEGDA
&& this.ENDDA == other.ENDDA
&& this.LANGU == other.LANGU
&& this.OBJID == other.OBJID
&& this.STEXT == other.STEXT
&& this.SOBID == other.SOBID
&& this.ORGID01 == other.ORGID01
&& this.ORGID02 == other.ORGID02;
}
public override bool Equals(object obj) => Equals(obj as ZHRS_ORG);
public override int GetHashCode() => (BEGDA, ENDDA, LANGU, OBJID, STEXT, SOBID, ORGID01, ORGID02).GetHashCode();
}
public class T_ORG
{
public List<ZHRS_ORG> item { get; set; }
}
public class ZHRS_ORGResult
{
public T_ORG T_ORG { get; set; }
}
}

View File

@@ -0,0 +1,69 @@
namespace Dlhis.ScheduledTask.Entities
{
public partial class ZHRS_POST
{
/// <summary>
/// 开始日期
/// </summary>
public string BEGDA { get; set; }
/// <summary>
/// 结束日期
/// </summary>
public string ENDDA { get; set; }
/// <summary>
/// 语言代码
/// </summary>
public int LANGU { get; set; }
/// <summary>
/// 岗位编码
/// </summary>
public string ZJOBID { get; set; }
/// <summary>
/// 岗位名称
/// </summary>
public string ZJOBANME { get; set; }
/// <summary>
///
/// </summary>
public string ZZWID { get; set; }
/// <summary>
/// 所属部门ID
/// </summary>
public string ZDEPID { get; set; }
}
public partial class ZHRS_POST : IEquatable<ZHRS_POST>
{
public bool Equals(ZHRS_POST other)
{
if (other is null)
return false;
return this.BEGDA == other.BEGDA
&& this.ENDDA == other.ENDDA
&& this.LANGU == other.LANGU
&& this.ZJOBID == other.ZJOBID
&& this.ZJOBANME == other.ZJOBANME
&& this.ZZWID == other.ZZWID
&& this.ZDEPID == other.ZDEPID;
}
public override bool Equals(object obj) => Equals(obj as ZHRS_POST);
public override int GetHashCode() => (BEGDA, ENDDA, LANGU, ZJOBID, ZJOBANME, ZZWID, ZDEPID).GetHashCode();
}
public class T_POST
{
public List<ZHRS_POST> item { get; set; }
}
public class ZHRS_POSTResult
{
public T_POST T_POST { get; set; }
}
}

View File

@@ -1,16 +1,21 @@
using Hangfire;
using Dlhis.ScheduledTask.Configurations;
using Dlhis.ScheduledTask.Job;
using Hangfire;
using Hangfire.Dashboard.BasicAuthorization;
using Hangfire.MySql;
using Kurisu.AspNetCore.Startup;
namespace Dlhis.ScheduledTask
{
public class HangfirePack : BaseAppPack
{
public override bool IsBeforeUseRouting => true;
public override bool IsBeforeUseRouting { get; }
public override void ConfigureServices(IServiceCollection services)
{
services.Configure<ServiceSettings>(Configuration.GetSection("ServiceSettings"));
services.AddHangfire(configuration =>
{
var options = new MySqlStorageOptions
@@ -23,12 +28,13 @@ namespace Dlhis.ScheduledTask
.UseStorage(new MySqlStorage(Configuration.GetConnectionString("HangfireConnection"), options));
});
services.UseHangfireto();
services.AddHangfireServer();
}
public override void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseHangfireDashboard("/hangfire", new DashboardOptions
{
AppPath = null,
@@ -52,8 +58,12 @@ namespace Dlhis.ScheduledTask
});
app.UseHangfireDashboard();
BackgroundJob.Enqueue(() => Console.WriteLine("This is a background job."));
RecurringJob.AddOrUpdate<SyncOrgInfoJob>("SyncOrgInfoJob_id", s => s.SyncOrgInfo(), "0 0 0 * * ?");
RecurringJob.AddOrUpdate<SyncPositionJob>("SyncPositionJob_id", s =>s.SyncPositionInfo(), "0 0 1 * * ?");
RecurringJob.AddOrUpdate<SyncPersonJob>("SyncPersonJob_id", s => s.SyncPersonInfo(), "0 0 2 * * ?");
}
}
}

View File

@@ -0,0 +1,19 @@
using Hangfire;
namespace Dlhis.ScheduledTask.Job
{
public class HangfireActivator : JobActivator
{
private readonly IServiceProvider _serviceProvider;
public HangfireActivator(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
public override object? ActivateJob(Type jobType)
{
return _serviceProvider.GetService(jobType);
}
}
}

View File

@@ -1,405 +0,0 @@
using Dlhis.ScheduledTask.Configurations;
using Dlhis.ScheduledTask.Dto;
using Dlhis.ScheduledTask.Entities;
using Dlhis.ScheduledTask.Response;
using Hangfire.Logging;
using Newtonsoft.Json;
using Serilog;
using System.Net.Http.Headers;
using System.Text;
using Dlhis.ScheduledTask.WsProxy;
using Microsoft.Extensions.Options;
namespace Dlhis.ScheduledTask.Job
{
public class JinkoHrJob
{
private List<PersonDetail> lastUpdatedPersonList = new List<PersonDetail>();
private List<ZHRS_ORG> lastUpdatedOrgList = new List<ZHRS_ORG>();
private List<ZHRS_POST> lastUpdatedPositionList = new List<ZHRS_POST>();
public ServiceSettings Settings { get; }
private readonly ZHRS_WERKS[] werks;
private readonly ILogger<JinkoHrJob> _logger;
private readonly ServiceSettings _serviceSettings;
public JinkoHrJob(ILogger<JinkoHrJob> logger, IOptions<ServiceSettings> options)
{
_logger = logger;
_serviceSettings = options.Value;
}
private PersonResult GetPersons()
{
HttpClient httpClient = new HttpClient();
httpClient.Timeout = TimeSpan.FromMinutes(10);
var credentials = string.Format("{0}:{1}", "EHS_USER", "y3R1hd2h*RICAC");
var headerValue = Convert.ToBase64String(Encoding.UTF8.GetBytes(credentials));
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", headerValue);
List<PersonDetail> persons = new List<PersonDetail>();
foreach (var item in werks)
{
try
{
var body = new
{
T_WERKS = new
{
item = new List<object>
{
new
{
item.WERKS
}
}
},
T_PERSON = Array.Empty<string>(),
T_PNO = Array.Empty<string>(),
};
var content = new StringContent(JsonConvert.SerializeObject(body), Encoding.UTF8, "application/json");
var response = httpClient.PostAsync("http://sappipap01.jinkosolar.cn:50100/RESTAdapter/Rest/EHR_PERSONNEL/", content).Result;
var jsonResponse = response.Content.ReadAsStringAsync().Result;
if (response.IsSuccessStatusCode)
{
PersonResult personResp = JsonConvert.DeserializeObject<PersonResult>(jsonResponse);
if (personResp?.T_PERSON?.item?.Any() == true)
{
persons.AddRange(personResp.T_PERSON.item);
//log.Info($"人事范围[{item.WERKS}]获取{personResp.T_PERSON.item.Count}条数据");
}
}
else
{
throw new Exception($"请求异常:{response.StatusCode}:" + jsonResponse);
}
// this is webservice call
//var personResp = archivesClient.ZHRF_SYN_03(new ZHRF_SYN_03()
//{
// //I_DATE = Settings.BeginSyncDate.ToString("yyy-MM-dd"),
// T_PERSON = Array.Empty<ZHRS_PERSON>(),
// T_PNO = Array.Empty<ZHRS_PNO>(),
// T_WERKS = new ZHRS_WERKS[] { item },
//});
}
catch (Exception ex)
{
// log.Error($"人事范围[{item.WERKS}]获取失败:{ex.Message}", ex);
}
}
return new PersonResult()
{
T_PERSON = new T_PERSON
{
item = persons
},
};
}
private List<PersonDetail> GetModifiedPerson(List<PersonDetail> sapList)
{
if (lastUpdatedPersonList.Count <= 0)
{
return sapList;
}
var needRemove = sapList.Intersect(lastUpdatedPersonList, new ZHRS_PERSONComparer());
return sapList.Except(needRemove, new ZHRS_PERSONComparer()).ToList();
}
private int SavePerson(List<PersonDetail> persons)
{
var workCodes = persons.Select(x => x.ZWORKCODE).ToList();
var index = 1;
var count = 4000;
var failure = 0;
var total = persons.Count;
// log.Debug($"{i}/{persons.Count}\tName={person.NAME}\tIdNo={person.ZZ_SFZH}\tPERNR={person.PERNR}");
log.Debug($"一共{persons.Count}条差异数据");
var conn = OpenDlDbConnection();
var searchCodes = workCodes.Skip((index - 1) * count).Take(count).ToList();
while (searchCodes.Count > 0)
{
//var existsWorkCodes = conn.Query<string>($"select ename from gainfo_sap where ename in ( {string.Join(",", searchCodes.Select(x => $"'{x}'"))} )")
// .ToList();
var existsWorkCodes = conn.Queryable<GainfoSap>()
.Where(x => searchCodes.Contains(x.Ename))
.Select(x => x.Ename)
.ToList();
var originUpdates = persons.Where(x => existsWorkCodes.Contains(x.ZWORKCODE)).ToList();
var originInserts = persons.Where(x => searchCodes.Contains(x.ZWORKCODE)).Except(originUpdates, new ZHRS_PERSONComparer()).ToList();
int i = 0;
if (originUpdates.Count + originInserts.Count <= count)
{
var currentTotal = originUpdates.Count + originInserts.Count;
//log.Debug($"正在进行第{index}批次,需要处理{currentTotal}条数据");
var updates = ToGainfoSap(originUpdates);
var inserts = ToGainfoSap(originInserts);
foreach (var item in inserts)
{
i++;
try
{
conn.Execute(SqlGeneration.InsertSql, item);
// 模拟触发器业务逻辑
SimulateTriggerBusinessLogic(item);
// log.Debug($"执行新增{i}/{currentTotal} name:{item.gname},ename:{item.ename}");
}
catch (Exception ex)
{
failure++;
//log.Error($"执行新增{i}/{currentTotal} name:{item.gname},ename:{item.ename}失败 \r\n{ex.Message}");
}
}
foreach (var item in updates)
{
i++;
try
{
conn.Execute(SqlGeneration.UpdateSql, item);
// 手动执行触发器的业务逻辑
UpdateExecuteTriggerBusinessLogic(originUpdates);
//log.Debug($"执行更新{i}/{currentTotal} name:{item.gname},ename:{item.ename}");
}
catch (Exception ex)
{
failure++;
//log.Error($"执行更新{i}/{currentTotal} name:{item.gname},ename:{item.ename}失败 \r\n{ex.Message}");
}
}
}
index++;
persons = persons.Except(originUpdates).Except(originUpdates).ToList();
searchCodes = workCodes.Skip((index - 1) * count).Take(count).ToList();
}
return failure;
}
//插入
#region
// 模拟触发器业务逻辑的方法
private void SimulateTriggerBusinessLogic(GainfoSap item)
{
int ret;
string accnt = GetAccnt();
// 判断记录是否存在于 Gainfo 表中
if (db.Queryable<GainfoEntity>().Any(it => it.IdNO == item.idno))
{
// 如果存在,执行更新逻辑
UpdateGainfo(item);
}
else
{
// 如果不存在,执行插入逻辑
InsertGainfo(item);
}
}
// 更新 Gainfo 表的方法
private void UpdateGainfo(GainfoSap item)
{
// 此处需要编写更新 Gainfo 表的具体逻辑
// 根据业务需求更新相应的字段
// 这里仅为演示,需要替换为实际逻辑
db.Updateable<GainfoEntity>().UpdateColumns(it => new GainfoEntity
{
Gname = item.gname,
Ename = item.ename,
Web = item.web,
Phone = item.phone,
Appellation = item.appellation,
Isowner = item.isowner,
Remark = item.remark,
Email = item.email,
})
.Where(it => it.IdNO == item.idno)
.ExecuteCommand();
}
// 插入 Gainfo 表的方法
private void InsertGainfo(GainfoSap item)
{
// 此处需要编写插入 Gainfo 表的具体逻辑
// 根据业务需求插入相应的字段
// 这里仅为演示,需要替换为实际逻辑
var accnt = GetAccnt();
db.Insertable(new GainfoEntity
{
Guestno = accnt,
Ano = item.ano,
Class = item.@class,
Gname = item.gname,
Ename = item.ename,
Country = item.country,
Idcls = item.idcls,
Idno = item.idno,
Native = item.native,
Sex = item.sex,
Birthday = item.birthday,
Address = item.address,
Appellation = item.appellation,
Nation = item.nation,
Web = item.web,
Phone = item.phone,
Log_id = item.log_id,
Log_shift = item.log_shift,
Log_date = item.log_date,
Log_ip = item.log_ip,
Isowner = item.isowner,
Remark = item.remark,
}).ExecuteCommand();
}
// 获取 accnt 的方法
private string GetAccnt()
{
int ret;
string accnt = null;
db.Ado.UseStoredProcedure(() =>
{
db.Ado.RegisterOutParam("ret", out ret);
db.Ado.RegisterOutParam("accnt", out accnt);
db.Ado.ExecuteCommand("p_xx_pub_getno", new SugarParameter("@ret", ParameterDirection.Output), new SugarParameter("@accnt", ParameterDirection.Output));
});
return accnt;
}
#endregion
//修改
#region
private void UpdateExecuteTriggerBusinessLogic(List<GainfoSap> updates)
{
foreach (var item in updates)
{
try
{
ExecuteUpdateLogic(item);
Console.WriteLine($"执行更新逻辑 name:{item.gname}, ename:{item.ename}");
}
catch (Exception ex)
{
Console.WriteLine($"执行更新逻辑失败 name:{item.gname}, ename:{item.ename} \r\n{ex.Message}");
}
}
}
private void ExecuteUpdateLogic(GainfoSap updatedItem)
{
//todo 下发任务
// 获取 accnt
string accnt = GetAccnt();
// 检查是否存在相同 idno 的记录
var existingRecord = db.Queryable<GainfoEntity>().FirstOrDefault(a => a.idno == updatedItem.idno);
if (existingRecord != null)
{
// 更新已存在的记录的字段
db.Updateable<GainfoEntity>()
.SetColumns(it => new { it.ano, it.gname, it.ename, it.web, it.phone, it.appellation, it.isowner, it.remark, it.email, it.createdate, it.werks })
.Where(it => it.idno == updatedItem.idno && !db.Queryable<GainfoSap>().Any(b => b.idno == updatedItem.idno && b.pernr != updatedItem.pernr && b.isowner == "T")
&& !db.Queryable<GainfoSap>().Any(c => c.idno == updatedItem.idno && c.pernr > updatedItem.pernr && c.isowner == updatedItem.isowner))
.ExecuteCommand();
}
else
{
// 不存在相同 idno 的记录,执行插入操作
db.Ado.BeginTran();
try
{
accnt = GetAccnt();
db.Insertable(new GainfoEntity
{
Ano = updatedItem.PERNR,
Guestno = accnt,
Ano = updatedItem.ano,
Class = updatedItem.@class,
Gname = updatedItem.gname,
Ename = updatedItem.ename,
Country = updatedItem.country,
Idcls = updatedItem.idcls,
Idno = updatedItem.idno,
Native = updatedItem.native,
Sex = updatedItem.sex,
Birthday = updatedItem.birthday,
Address = updatedItem.address,
Appellation = updatedItem.appellation,
Nation = updatedItem.nation,
Web = updatedItem.web,
Phone = updatedItem.phone,
Log_id = updatedItem.log_id,
Log_shift = updatedItem.log_shift,
Log_date = updatedItem.log_date,
Log_ip = updatedItem.log_ip,
Isowner = updatedItem.isowner,
Remark = updatedItem.remark,
}).ExecuteCommand();
db.Ado.CommitTran();
}
catch (Exception)
{
db.Ado.RollbackTran();
throw;
}
}
}
#endregion
public void SyncPersonInfo()
{
try
{
//var personResp = JsonConvert.DeserializeObject<PersonResult>(File.ReadAllText("C:\\Users\\79144\\Desktop\\request.json")); // GetPersons();
var personResp = GetPersons();// JsonConvert.DeserializeObject<PersonResult>(File.ReadAllText("Cache/request.json")); // GetPersons();
var persons = personResp.T_PERSON.item;
log.LogInformation("获取人员信息成功,count:" + persons.Count);
File.WriteAllText("Cache/request.json", JsonConvert.SerializeObject(personResp));
log.LogInformation("请求数据保存到Cache/request.json");
if (persons.Count > 0)
{
var modifiedPersons = GetModifiedPerson(persons.OrderByDescending(x => x.ZSTATUS).ThenBy(x => x.ZRZRQ).ToList());
//WhyDiff(modifiedPersons.Last());
log.LogInformation($"同步人员差异数据:{modifiedPersons.Count}");
if (modifiedPersons.Count > 0)
{
var failedRecords = SavePerson(modifiedPersons);
log.Info($"同步人员数据完成,成功{modifiedPersons.Count - failedRecords}条, 失败:{failedRecords}");
}
else
{
log.LogInformation($"同步人员数据完成,无数据变更");
}
}
}
catch (Exception ex)
{
log.Error("同步人员信息失败", ex);
}
}
}
}

View File

@@ -0,0 +1,96 @@
using Dlhis.Entity.Basic.Entity;
using Dlhis.ScheduledTask.Comparers;
using Dlhis.ScheduledTask.Entities;
using Kurisu.SqlSugar.Services;
using Mapster;
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;
namespace Dlhis.ScheduledTask.Job
{
/// <summary>
/// 部门同步定时任务
/// </summary>
public class SyncOrgInfoJob
{
private List<ZHRS_ORG> lastUpdatedOrgList = new List<ZHRS_ORG>();
private readonly IDbContext _dbContext;
public SyncOrgInfoJob(IDbContext dbContext)
{
_dbContext = dbContext;
}
public async Task SyncOrgInfo()
{
HttpClient httpClient = new HttpClient();
httpClient.Timeout = TimeSpan.FromMinutes(10);
var credentials = string.Format("{0}:{1}", "EHS_USER", "y3R1hd2h*RICAC");
var headerValue = Convert.ToBase64String(Encoding.UTF8.GetBytes(credentials));
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", headerValue);
string apiUrl =
"http://sappidap.jinkosolar.cn:51000/RESTAdapter/Rest/EHR_ORGANIZATION/";
string requestBody = "{\"I_DATE\":\"2021-01-01\",\"I_DATE_TO\":\"2022-05-29\",\"I_LANGU\":\"1\",\"T_ID\":{\"item\":[{\"OBJID\":\"50007967\"},{\"OBJID\":\"50008308\"}]}}";
HttpResponseMessage response = await httpClient.PostAsync(apiUrl, new StringContent(requestBody, Encoding.UTF8, "application/json"));
if (response.IsSuccessStatusCode)
{
string responseData = await response.Content.ReadAsStringAsync();
ZHRS_ORGResult orgResult = JsonSerializer.Deserialize<ZHRS_ORGResult>(responseData);
if (orgResult.T_ORG != null && orgResult.T_ORG.item.Count > 0)
{
var modifiedOrgList = GetModifiedOrg(orgResult.T_ORG?.item);
// 使用 SQLSugar 将新数据同步到数据库
await SaveOrg(modifiedOrgList);
}
//}
//else
//{
// Console.WriteLine($"HTTP请求失败,状态码:{response.StatusCode}");
}
}
private List<ZHRS_ORG> GetModifiedOrg(List<ZHRS_ORG> sapList)
{
if (lastUpdatedOrgList.Count <= 0)
{
return sapList;
}
var needRemove = sapList.Intersect(lastUpdatedOrgList, new ZHRS_ORGComparer());
return sapList.Except(needRemove, new ZHRS_ORGComparer()).ToList();
}
private async Task SaveOrg(List<ZHRS_ORG> modifiedOrgList)
{
if (modifiedOrgList == null || modifiedOrgList.Count == 0) return;
foreach (ZHRS_ORG item in modifiedOrgList)
{
var existingOrgs = await _dbContext.Queryable<ZHRF_SYN_01Entity>().Where(x => x.OBJID == item.OBJID).FirstAsync();
if (existingOrgs != null)
{
var org = item.Adapt(existingOrgs);
await _dbContext.UpdateAsync(org);
}
else
{
var org = item.Adapt<ZHRF_SYN_01Entity>();
await _dbContext.InsertAsync(org);
}
}
}
}
}

View File

@@ -0,0 +1,447 @@
using Dlhis.ScheduledTask.Comparers;
using Dlhis.ScheduledTask.Dto;
using Dlhis.ScheduledTask.Entities;
using Dlhis.ScheduledTask.Response;
using Newtonsoft.Json;
using System.Data.SqlClient;
using System.Data;
using System.Net.Http.Headers;
using System.Text;
using Dlhis.ScheduledTask.Configurations;
using Kurisu.SqlSugar.Services;
using Dlhis.Entity.Basic.Entity;
using Dlhis.ScheduledTask.Wsproxy.Dlhis.JinkoHr.WsProxy;
namespace Dlhis.ScheduledTask.Job
{
public class SyncPersonJob
{
private List<PersonDetail> lastUpdatedPersonList = new List<PersonDetail>();
private List<ZHRS_ORG> lastUpdatedOrgList = new List<ZHRS_ORG>();
private List<ZHRS_POST> lastUpdatedPositionList = new List<ZHRS_POST>();
private readonly ServiceSettings serviceSettings;
private readonly ZHRS_WERKS[] werks;
private readonly IDbContext _dbContext;
public SyncPersonJob(IDbContext dbContext)
{
_dbContext = dbContext;
}
public void SyncPersonInfo()
{
try
{
//var personResp = JsonConvert.DeserializeObject<PersonResult>(File.ReadAllText("C:\\Users\\79144\\Desktop\\request.json")); // GetPersons();
var personResp = GetPersons();// JsonConvert.DeserializeObject<PersonResult>(File.ReadAllText("Cache/request.json")); // GetPersons();
var persons = personResp.T_PERSON.item;
//log.Info("获取人员信息成功,count:" + persons.Count);
File.WriteAllText("Cache/request.json", JsonConvert.SerializeObject(personResp));
//log.Info("请求数据保存到Cache/request.json");
if (persons.Count > 0)
{
var modifiedPersons = GetModifiedPerson(persons.OrderByDescending(x => x.ZSTATUS).ThenBy(x => x.ZRZRQ).ToList());
//WhyDiff(modifiedPersons.Last());
//log.Info($"同步人员差异数据:{modifiedPersons.Count}");
if (modifiedPersons.Count > 0)
{
var failedRecords = SavePerson(modifiedPersons);
//log.Info($"同步人员数据完成,成功{modifiedPersons.Count - failedRecords}条, 失败:{failedRecords}");
}
else
{
//log.Info($"同步人员数据完成,无数据变更");
}
}
}
catch (Exception ex)
{
//log.Error("同步人员信息失败", ex);
}
}
private async Task<int> SavePerson(List<PersonDetail> persons)
{
var workCodes = persons.Select(x => x.ZWORKCODE).ToList();
var index = 1;
var count = 4000;
var failure = 0;
var total = persons.Count;
// log.Debug($"{i}/{persons.Count}\tName={person.NAME}\tIdNo={person.ZZ_SFZH}\tPERNR={person.PERNR}");
//log.Debug($"一共{persons.Count}条差异数据");
//var conn = OpenDlDbConnection();
var searchCodes = workCodes.Skip((index - 1) * count).Take(count).ToList();
while (searchCodes.Count > 0)
{
//var existsWorkCodes = conn.Query<string>($"select ename from gainfo_sap where ename in ( {string.Join(",", searchCodes.Select(x => $"'{x}'"))} )")
// .ToList();
var existsWorkCodes = _dbContext.Queryable<GainfoEntity>()
.Where(x => searchCodes.Contains(x.Ename))
.Select(x => x.Ename)
.ToList();
var originUpdates = persons.Where(x => existsWorkCodes.Contains(x.ZWORKCODE)).ToList();
var originInserts = persons.Where(x => searchCodes.Contains(x.ZWORKCODE)).Except(originUpdates, new ZHRS_PERSONComparer()).ToList();
int i = 0;
if (originUpdates.Count + originInserts.Count <= count)
{
var currentTotal = originUpdates.Count + originInserts.Count;
//log.Debug($"正在进行第{index}批次,需要处理{currentTotal}条数据");
var updates = ToGainfoSap(originUpdates);
var inserts = ToGainfoSap(originInserts);
foreach (var item in inserts)
{
i++;
try
{
await SavePerson(item);
//conn.Execute(SqlGeneration.InsertSql, item);
//log.Debug($"执行新增{i}/{currentTotal} name:{item.gname},ename:{item.ename}");
}
catch (Exception ex)
{
failure++;
//log.Error($"执行新增{i}/{currentTotal} name:{item.gname},ename:{item.ename}失败 \r\n{ex.Message}");
}
}
foreach (var item in updates)
{
i++;
try
{
await UpdatePerson(item);
//conn.Execute(SqlGeneration.UpdateSql, item);
//log.Debug($"执行更新{i}/{currentTotal} name:{item.gname},ename:{item.ename}");
}
catch (Exception ex)
{
failure++;
//log.Error($"执行更新{i}/{currentTotal} name:{item.gname},ename:{item.ename}失败 \r\n{ex.Message}");
}
}
}
index++;
persons = persons.Except(originUpdates).Except(originUpdates).ToList();
searchCodes = workCodes.Skip((index - 1) * count).Take(count).ToList();
}
return failure;
}
private async Task SavePerson(GainfoSap item)
{
var gainfo = await _dbContext.Queryable<GainfoEntity>().Where(x => x.IdNO == item.idno).FirstAsync();
if (gainfo != null)
{
gainfo.Pernr = item.PERNR;
gainfo.Gname = item.gname;
gainfo.Ename = item.ename;
gainfo.Web = item.web;
gainfo.Phone = item.phone;
gainfo.Appellation = item.appellation;
gainfo.Isowner = item.isowner;
gainfo.Remark = item.remark;
gainfo.Email = item.email;
gainfo.Createdate = (DateTime)item.createdate;
gainfo.Werks = item.WERKS;
await _dbContext.UpdateAsync(gainfo);
}
else
{
var info = new GainfoEntity()
{
Ano = item.ano,
Guestno = item.guestno,
Class = item.@class,
Gname = item.gname,
Ename = item.ename,
Country = item.country,
Idcls = item.idcls,
Native = item.native,
Sex = item.sex,
Birthday = (DateTime)item.birthday,
Address = item.address,
//Occupation = item.occupation,
Appellation = item.appellation,
Nation = item.nation,
Phone = item.phone,
Web = item.web,
Log_id = item.log_id,
Log_shift = item.log_shift,
Log_date = (DateTime)item.log_date,
Log_ip = item.log_ip,
Isowner = item.isowner,
Remark = item.remark,
Email = item.email,
Createdate = (DateTime)item.createdate,
Werks = item.WERKS,
};
await _dbContext.InsertAsync(info);
}
}
private async Task UpdatePerson(GainfoSap item)
{
var gainfo = await _dbContext.Queryable<GainfoEntity>().Where(x => x.IdNO == item.idno).FirstAsync();
if (gainfo != null)
{
_dbContext.Updateable<GainfoEntity>().SetColumns(g => new GainfoEntity
{
Pernr = item.PERNR,
Gname = item.gname,
Ename = item.ename,
Web = item.web,
Phone = item.phone,
Appellation = item.appellation,
Isowner = item.isowner,
Remark = item.remark,
Email = item.email,
Createdate = (DateTime)item.createdate,
Werks = item.WERKS
})
.Where(g => g.IdNO == item.idno
&& !_dbContext.Queryable<GainfoEntity>().Any(g => g.IdNO == item.idno && g.Pernr != item.PERNR && g.Isowner == "T")
&& !_dbContext.Queryable<GainfoEntity>().Any(g => g.IdNO == item.idno && int.Parse(g.Pernr) > int.Parse(item.PERNR) && g.Isowner == item.isowner));
}
else
{
_dbContext.Updateable<GainfoEntity>().SetColumns(g => new GainfoEntity
{
Pernr = item.PERNR,
Gname = item.gname,
Ename = item.ename,
Web = item.web,
Phone = item.phone,
Appellation = item.appellation,
Isowner = item.isowner,
Remark = item.remark,
Email = item.email,
Createdate = (DateTime)item.createdate,
Werks = item.WERKS
})
.Where(g => g.Ano == item.PERNR
&& !_dbContext.Queryable<GainfoEntity>().Any(g => g.Ename == item.ename && g.Isowner == "T")
&& !_dbContext.Queryable<GainfoEntity>().Any(g => g.IdNO == item.idno && int.Parse(g.Pernr) > int.Parse(item.PERNR) && g.Isowner == item.isowner));
}
}
private PersonResult GetPersons()
{
HttpClient httpClient = new HttpClient();
httpClient.Timeout = TimeSpan.FromMinutes(10);
var credentials = string.Format("{0}:{1}", "EHS_USER", "y3R1hd2h*RICAC");
var headerValue = Convert.ToBase64String(Encoding.UTF8.GetBytes(credentials));
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", headerValue);
List<PersonDetail> persons = new List<PersonDetail>();
foreach (var item in werks)
{
try
{
var body = new
{
T_WERKS = new
{
item = new List<object>
{
new
{
item.WERKS
}
}
},
T_PERSON = Array.Empty<string>(),
T_PNO = Array.Empty<string>(),
};
var content = new StringContent(JsonConvert.SerializeObject(body), Encoding.UTF8, "application/json");
var response = httpClient.PostAsync("http://sappipap01.jinkosolar.cn:50100/RESTAdapter/Rest/EHR_PERSONNEL/", content).Result;
var jsonResponse = response.Content.ReadAsStringAsync().Result;
if (response.IsSuccessStatusCode)
{
PersonResult personResp = JsonConvert.DeserializeObject<PersonResult>(jsonResponse);
if (personResp?.T_PERSON?.item?.Any() == true)
{
persons.AddRange(personResp.T_PERSON.item);
//log.Info($"人事范围[{item.WERKS}]获取{personResp.T_PERSON.item.Count}条数据");
}
}
else
{
throw new Exception($"请求异常:{response.StatusCode}:" + jsonResponse);
}
// this is webservice call
//var personResp = archivesClient.ZHRF_SYN_03(new ZHRF_SYN_03()
//{
// //I_DATE = Settings.BeginSyncDate.ToString("yyy-MM-dd"),
// T_PERSON = Array.Empty<ZHRS_PERSON>(),
// T_PNO = Array.Empty<ZHRS_PNO>(),
// T_WERKS = new ZHRS_WERKS[] { item },
//});
}
catch (Exception ex)
{
//log.Error($"人事范围[{item.WERKS}]获取失败:{ex.Message}", ex);
}
}
return new PersonResult()
{
T_PERSON = new T_PERSON
{
item = persons
},
};
}
private List<PersonDetail> GetModifiedPerson(List<PersonDetail> sapList)
{
if (lastUpdatedPersonList.Count <= 0)
{
return sapList;
}
var needRemove = sapList.Intersect(lastUpdatedPersonList, new ZHRS_PERSONComparer());
return sapList.Except(needRemove, new ZHRS_PERSONComparer()).ToList();
}
private List<GainfoSap> ToGainfoSap(List<PersonDetail> data)
{
return data.Select(person =>
{
GainfoSap o = null;
try
{
var position = lastUpdatedPositionList.FirstOrDefault(x => x.ZJOBID == person.PLANS);
var rzrq = SafeParseDate(person.ZRZRQ);
var lzrq = SafeParseDate(person.ZLZRQ);
var rmk = "";
if (rzrq != null)
rmk = $"入职时间:{rzrq.Value.ToString("yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture)} ";
if (lzrq != null)
rmk += $"离职时间:{lzrq.Value.ToString("yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture)} ";
if (!string.IsNullOrWhiteSpace(person.MGTXT))
rmk += $"离职原因:{person.MGTXT}";
var native = GetNative(person.ZZ_SFZH);
var sex = person.GESCH == "2" ? "F" : "M";
person.ZZ_SFZH = person.ZZ_SFZH?.TrimStart();
o = new GainfoSap
{
gname = person.NAME,
ename = person.ZWORKCODE,
idno = SubString(person.ZZ_SFZH, 18),
birthday = SafeParseDate(person.GBDAT).Value,
ZZ_KLX = person.ZZ_KLX,
email = person.ZXUELI,
appellation = person.ORGEH,
phone = person.ZMOBILE,
ZSTATUS = person.ZSTATUS,
createdate = Convert.ToDateTime(person.ZRZRQ),
PERNR = person.PERNR,
WERKS = person.WERKS,
KOSTL = person.KOSTL,
ZZ_ZD = person.ZZ_ZD,
Z_ZJ = person.Z_ZJ,
STELL = person.STELL,
STELL_NM = person.STELL_NM,
ZLZRQ = SafeParseDate(person.ZLZRQ).Value,
MASSN = person.MASSN,
MNTXT = person.MNTXT,
remark = rmk,
native = native,
sex = sex,
web = SubString(position?.ZJOBANME, 30),
logdate = DateTime.Now,
isowner = int.Parse(person.ZSTATUS) < 4 ? "T" : "F",
@class = "C",
country = "CN",
log_ip = "127.0.0.1",
log_shift = "1",
log_id = "XX",
address = "",
occupation = "99",
nation = "01"
};
return o;
}
catch (Exception ex)
{
throw;
}
}).ToList();
}
private string GetNative(string idno)
{
if (string.IsNullOrWhiteSpace(idno) || idno.Length < 6) return null;
idno = idno.TrimStart();
return idno.Substring(0, 6);
}
private DateTime? SafeParseDate(string str)
{
if (string.IsNullOrEmpty(str))
{
str = "1900-01-01";
}
if ("0000-00-00".Equals(str))
{
str = "1900-01-01";
}
if (DateTime.TryParse(str, out var d))
{
return d;
}
return null;
}
private string SubString(string s, int len)
{
if (string.IsNullOrWhiteSpace(s))
{
return s?.Trim() ?? "";
}
s = s.Trim();
var bs = Encoding.UTF8.GetBytes(s);
if (bs.Length <= len)
{
return s;
}
var bytes = new byte[len];
Buffer.BlockCopy(bs, 0, bytes, 0, len);
return Encoding.UTF8.GetString(bytes);
}
private IDbConnection OpenDlDbConnection()
{
try
{
IDbConnection conn = new SqlConnection(serviceSettings.DlhisDatabase);
if (conn.State != ConnectionState.Open)
{
conn.Open();
}
return conn;
}
catch (Exception ex)
{
throw new Exception($"打开迪联数据库错误:{ex.Message}", ex);
}
}
}
}

View File

@@ -0,0 +1,89 @@
using Dlhis.ScheduledTask.Comparers;
using Dlhis.ScheduledTask.Entities;
using Kurisu.SqlSugar.Services;
using Mapster;
using Newtonsoft.Json;
using System.Net.Http.Headers;
using System.Text;
namespace Dlhis.ScheduledTask.Job
{
/// <summary>
/// 职位同步定时任务
/// </summary>
public class SyncPositionJob
{
private List<ZHRS_POST> lastUpdatedPositionList = new List<ZHRS_POST>();
private readonly IDbContext _dbContext;
public SyncPositionJob(IDbContext dbContext)
{
_dbContext = dbContext;
}
public async Task SyncPositionInfo()
{
HttpClient httpClient = new HttpClient();
httpClient.Timeout = TimeSpan.FromMinutes(10);
var credentials = string.Format("{0}:{1}", "EHS_USER", "y3R1hd2h*RICAC");
var headerValue = Convert.ToBase64String(Encoding.UTF8.GetBytes(credentials));
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", headerValue);
string url = "http://sappidap.jinkosolar.cn:51000/RESTAdapter/Rest/EHR_POSITION/";
string requestBody = "{\"I_DATE\":\"2022-05-26\",\"I_DATE_TO\":\"2022-05-29\",\"I_LANGU\":\"1\",\"I_ALLINFO\":\"X\"}";
StringContent content = new StringContent(requestBody, Encoding.UTF8, "application/json");
HttpResponseMessage response = await httpClient.PostAsync(url, content);
if (response.IsSuccessStatusCode)
{
string responseContent = await response.Content.ReadAsStringAsync();
var postResult = JsonConvert.DeserializeObject<ZHRS_POSTResult>(responseContent);
if (postResult.T_POST != null && postResult.T_POST.item.Count > 0)
{
var modifiedOrgList = GetModifiedPosition(postResult.T_POST.item);
// 步骤 4:使用 SQLSugar 将新数据同步到数据库
SaveOrg(modifiedOrgList);
}
}
else
{
Console.WriteLine($"HTTP请求失败,状态码:{response.StatusCode}");
}
}
private List<ZHRS_POST> GetModifiedPosition(List<ZHRS_POST> spaList)
{
if (lastUpdatedPositionList.Count <= 0)
{
return spaList;
}
var needRemove = spaList.Intersect(lastUpdatedPositionList, new ZHRS_POSTComparer());
return spaList.Except(needRemove, new ZHRS_POSTComparer()).ToList();
}
private async void SaveOrg(List<ZHRS_POST> modifiedPostList)
{
if (modifiedPostList == null || modifiedPostList.Count == 0) return;
foreach (var item in modifiedPostList)
{
var existingPosts = await _dbContext.Queryable<ZHRF_SYN_02Entity>().Where(x =>x.ZJOBID == item.ZJOBID).FirstAsync();
if (existingPosts != null)
{
var entity = item.Adapt(existingPosts);
await _dbContext.UpdateAsync(entity);
}
else
{
var entity = item.Adapt<ZHRF_SYN_02Entity>();
await _dbContext.InsertAsync(entity);
}
}
}
}
}

View File

@@ -0,0 +1,12 @@
using Hangfire;
namespace Dlhis.ScheduledTask.Job
{
public static class UseHangfire
{
public static void UseHangfireto(this IServiceCollection services)
{
GlobalConfiguration.Configuration.UseActivator(new HangfireActivator(services.BuildServiceProvider()));
}
}
}

View File

@@ -0,0 +1,29 @@
using Kurisu.AspNetCore.Startup;
using Kurisu.AspNetCore;
using Kurisu.SqlSugar.Extensions;
using SqlSugar;
namespace Dlhis.ScheduledTask
{
public class SqlSugarPack : BaseAppPack
{
public override bool IsBeforeUseRouting { get; }
public override void ConfigureServices(IServiceCollection services)
{
services.AddHttpContextAccessor();
services.AddSqlSugar();
}
public override void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
#if DEBUG
using var scope = app.ApplicationServices.CreateScope();
var db = scope.ServiceProvider.GetService<ISqlSugarClient>();
var tables = App.ActiveTyps.Where(x => x.IsDefined(typeof(SugarTable), false)).ToArray();
db.DbMaintenance.CreateDatabase();
db.CodeFirst.InitTables(tables);
#endif
}
}
}

View File

@@ -1,281 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
//
// This source code was auto-generated by wsdl, Version=4.7.2053.0.
//
namespace Dlhis.ScheduledTask.WsProxy
{
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "SI_DLDM2EHR_DeleteRecord_OutBinding", Namespace = "urn:jinkosolar.com:dldm:ehr_delete_record")]
public partial class SI_DLDM2EHR_DeleteRecord_OutServiceClient : System.Web.Services.Protocols.SoapHttpClientProtocol
{
private System.Threading.SendOrPostCallback SI_DLDM2EHR_DeleteRecord_OutOperationCompleted;
/// <remarks/>
public SI_DLDM2EHR_DeleteRecord_OutServiceClient()
{
this.Url = "http://sappidap.jinkosolar.cn:50000/XISOAPAdapter/MessageServlet?senderParty=&sen" +
"derService=DLDM&receiverParty=&receiverService=&interface=SI_DLDM2EHR_DeleteReco" +
"rd_Out&interfaceNamespace=urn%3Ajinkosolar.com%3Adldm%3Aehr_delete_record";
}
/// <remarks/>
public event SI_DLDM2EHR_DeleteRecord_OutCompletedEventHandler SI_DLDM2EHR_DeleteRecord_OutCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://sap.com/xi/WebService/soap1.1", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlArrayAttribute("MT_DeleteRecord_Response", Namespace = "urn:jinkosolar.com:ehr:dldm_delete_record")]
[return: System.Xml.Serialization.XmlArrayItemAttribute("T_DATA", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public DT_DeleteRecord_ResponseT_DATA[] SI_DLDM2EHR_DeleteRecord_Out([System.Xml.Serialization.XmlArrayAttribute(Namespace = "urn:jinkosolar.com:ehr:dldm_delete_record")][System.Xml.Serialization.XmlArrayItemAttribute("T_DATA", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)] DT_DeleteRecord_RequestT_DATA[] MT_DeleteRecord_Request)
{
object[] results = this.Invoke("SI_DLDM2EHR_DeleteRecord_Out", new object[] {
MT_DeleteRecord_Request});
return ((DT_DeleteRecord_ResponseT_DATA[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSI_DLDM2EHR_DeleteRecord_Out(DT_DeleteRecord_RequestT_DATA[] MT_DeleteRecord_Request, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("SI_DLDM2EHR_DeleteRecord_Out", new object[] {
MT_DeleteRecord_Request}, callback, asyncState);
}
/// <remarks/>
public DT_DeleteRecord_ResponseT_DATA[] EndSI_DLDM2EHR_DeleteRecord_Out(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((DT_DeleteRecord_ResponseT_DATA[])(results[0]));
}
/// <remarks/>
public void SI_DLDM2EHR_DeleteRecord_OutAsync(DT_DeleteRecord_RequestT_DATA[] MT_DeleteRecord_Request)
{
this.SI_DLDM2EHR_DeleteRecord_OutAsync(MT_DeleteRecord_Request, null);
}
/// <remarks/>
public void SI_DLDM2EHR_DeleteRecord_OutAsync(DT_DeleteRecord_RequestT_DATA[] MT_DeleteRecord_Request, object userState)
{
if ((this.SI_DLDM2EHR_DeleteRecord_OutOperationCompleted == null))
{
this.SI_DLDM2EHR_DeleteRecord_OutOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSI_DLDM2EHR_DeleteRecord_OutOperationCompleted);
}
this.InvokeAsync("SI_DLDM2EHR_DeleteRecord_Out", new object[] {
MT_DeleteRecord_Request}, this.SI_DLDM2EHR_DeleteRecord_OutOperationCompleted, userState);
}
private void OnSI_DLDM2EHR_DeleteRecord_OutOperationCompleted(object arg)
{
if ((this.SI_DLDM2EHR_DeleteRecord_OutCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SI_DLDM2EHR_DeleteRecord_OutCompleted(this, new SI_DLDM2EHR_DeleteRecord_OutCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState)
{
base.CancelAsync(userState);
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:jinkosolar.com:ehr:dldm_delete_record")]
public partial class DT_DeleteRecord_RequestT_DATA
{
private string zWORKCODEField;
private string sUBTYField;
private string bEGDAField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZWORKCODE
{
get
{
return this.zWORKCODEField;
}
set
{
this.zWORKCODEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string SUBTY
{
get
{
return this.sUBTYField;
}
set
{
this.sUBTYField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string BEGDA
{
get
{
return this.bEGDAField;
}
set
{
this.bEGDAField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:jinkosolar.com:ehr:dldm_delete_record")]
public partial class DT_DeleteRecord_ResponseT_DATA
{
private string zWORKCODEField;
private string sUBTYField;
private string bEGDAField;
private string mSGTYField;
private string mSGTXField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZWORKCODE
{
get
{
return this.zWORKCODEField;
}
set
{
this.zWORKCODEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string SUBTY
{
get
{
return this.sUBTYField;
}
set
{
this.sUBTYField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string BEGDA
{
get
{
return this.bEGDAField;
}
set
{
this.bEGDAField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string MSGTY
{
get
{
return this.mSGTYField;
}
set
{
this.mSGTYField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string MSGTX
{
get
{
return this.mSGTXField;
}
set
{
this.mSGTXField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
public delegate void SI_DLDM2EHR_DeleteRecord_OutCompletedEventHandler(object sender, SI_DLDM2EHR_DeleteRecord_OutCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SI_DLDM2EHR_DeleteRecord_OutCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal SI_DLDM2EHR_DeleteRecord_OutCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public DT_DeleteRecord_ResponseT_DATA[] Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((DT_DeleteRecord_ResponseT_DATA[])(this.results[0]));
}
}
}
}

View File

@@ -1,313 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
//
// This source code was auto-generated by wsdl, Version=4.7.2053.0.
namespace Dlhis.ScheduledTask.WsProxy
{
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "SI_DLDM2EHR_InsertRecord_OutBinding", Namespace = "urn:jinkosolar.com:dldm:ehr_insert_record")]
public partial class SI_DLDM2EHR_InsertRecord_OutServiceClient : System.Web.Services.Protocols.SoapHttpClientProtocol
{
private System.Threading.SendOrPostCallback SI_DLDM2EHR_InsertRecord_OutOperationCompleted;
/// <remarks/>
public SI_DLDM2EHR_InsertRecord_OutServiceClient()
{
this.Url = "http://sappidap.jinkosolar.cn:50000/XISOAPAdapter/MessageServlet?senderParty=&sen" +
"derService=DLDM&receiverParty=&receiverService=&interface=SI_DLDM2EHR_InsertReco" +
"rd_Out&interfaceNamespace=urn%3Ajinkosolar.com%3Adldm%3Aehr_insert_record";
}
/// <remarks/>
public event SI_DLDM2EHR_InsertRecord_OutCompletedEventHandler SI_DLDM2EHR_InsertRecord_OutCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://sap.com/xi/WebService/soap1.1", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlArrayAttribute("MT_InsertRecord_Response", Namespace = "urn:jinkosolar.com:ehr:dldm_insert_record")]
[return: System.Xml.Serialization.XmlArrayItemAttribute("T_DATA", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public DT_InsertRecord_ResponseT_DATA[] SI_DLDM2EHR_InsertRecord_Out([System.Xml.Serialization.XmlArrayAttribute(Namespace = "urn:jinkosolar.com:ehr:dldm_insert_record")][System.Xml.Serialization.XmlArrayItemAttribute("T_DATA", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)] DT_InsertRecord_RequestT_DATA[] MT_InsertRecord_Request)
{
object[] results = this.Invoke("SI_DLDM2EHR_InsertRecord_Out", new object[] {
MT_InsertRecord_Request});
return ((DT_InsertRecord_ResponseT_DATA[])(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSI_DLDM2EHR_InsertRecord_Out(DT_InsertRecord_RequestT_DATA[] MT_InsertRecord_Request, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("SI_DLDM2EHR_InsertRecord_Out", new object[] {
MT_InsertRecord_Request}, callback, asyncState);
}
/// <remarks/>
public DT_InsertRecord_ResponseT_DATA[] EndSI_DLDM2EHR_InsertRecord_Out(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((DT_InsertRecord_ResponseT_DATA[])(results[0]));
}
/// <remarks/>
public void SI_DLDM2EHR_InsertRecord_OutAsync(DT_InsertRecord_RequestT_DATA[] MT_InsertRecord_Request)
{
this.SI_DLDM2EHR_InsertRecord_OutAsync(MT_InsertRecord_Request, null);
}
/// <remarks/>
public void SI_DLDM2EHR_InsertRecord_OutAsync(DT_InsertRecord_RequestT_DATA[] MT_InsertRecord_Request, object userState)
{
if ((this.SI_DLDM2EHR_InsertRecord_OutOperationCompleted == null))
{
this.SI_DLDM2EHR_InsertRecord_OutOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSI_DLDM2EHR_InsertRecord_OutOperationCompleted);
}
this.InvokeAsync("SI_DLDM2EHR_InsertRecord_Out", new object[] {
MT_InsertRecord_Request}, this.SI_DLDM2EHR_InsertRecord_OutOperationCompleted, userState);
}
private void OnSI_DLDM2EHR_InsertRecord_OutOperationCompleted(object arg)
{
if ((this.SI_DLDM2EHR_InsertRecord_OutCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SI_DLDM2EHR_InsertRecord_OutCompleted(this, new SI_DLDM2EHR_InsertRecord_OutCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState)
{
base.CancelAsync(userState);
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:jinkosolar.com:ehr:dldm_insert_record")]
public partial class DT_InsertRecord_RequestT_DATA
{
private string zWORKCODEField;
private string sUBTYField;
private string bEGDAField;
private string bETRGField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZWORKCODE
{
get
{
return this.zWORKCODEField;
}
set
{
this.zWORKCODEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string SUBTY
{
get
{
return this.sUBTYField;
}
set
{
this.sUBTYField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string BEGDA
{
get
{
return this.bEGDAField;
}
set
{
this.bEGDAField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string BETRG
{
get
{
return this.bETRGField;
}
set
{
this.bETRGField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:jinkosolar.com:ehr:dldm_insert_record")]
public partial class DT_InsertRecord_ResponseT_DATA
{
private string zWORKCODEField;
private string sUBTYField;
private string bEGDAField;
private string bETRGField;
private string mSGTYField;
private string mSGTXField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZWORKCODE
{
get
{
return this.zWORKCODEField;
}
set
{
this.zWORKCODEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string SUBTY
{
get
{
return this.sUBTYField;
}
set
{
this.sUBTYField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string BEGDA
{
get
{
return this.bEGDAField;
}
set
{
this.bEGDAField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string BETRG
{
get
{
return this.bETRGField;
}
set
{
this.bETRGField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string MSGTY
{
get
{
return this.mSGTYField;
}
set
{
this.mSGTYField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string MSGTX
{
get
{
return this.mSGTXField;
}
set
{
this.mSGTXField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
public delegate void SI_DLDM2EHR_InsertRecord_OutCompletedEventHandler(object sender, SI_DLDM2EHR_InsertRecord_OutCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SI_DLDM2EHR_InsertRecord_OutCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal SI_DLDM2EHR_InsertRecord_OutCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public DT_InsertRecord_ResponseT_DATA[] Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((DT_InsertRecord_ResponseT_DATA[])(this.results[0]));
}
}
}
}

View File

@@ -1,216 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
//
// This source code was auto-generated by wsdl, Version=4.7.2053.0.
//
namespace Dlhis.ScheduledTask.WsProxy
{
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "SI_DLDM2EHR_SavePhoto_OutBinding", Namespace = "urn:jinkosolar.com:dldm:dldm_save_photo")]
public partial class SI_DLDM2EHR_SavePhoto_OutServiceClient : System.Web.Services.Protocols.SoapHttpClientProtocol
{
private System.Threading.SendOrPostCallback SI_DLDM2EHR_SavePhoto_OutOperationCompleted;
/// <remarks/>
public SI_DLDM2EHR_SavePhoto_OutServiceClient()
{
this.Url = "http://sappidap.jinkosolar.cn:50000/XISOAPAdapter/MessageServlet?senderParty=&sen" +
"derService=DLDM&receiverParty=&receiverService=&interface=SI_DLDM2EHR_SavePhoto_" +
"Out&interfaceNamespace=urn%3Ajinkosolar.com%3Adldm%3Adldm_save_photo";
}
/// <remarks/>
public event SI_DLDM2EHR_SavePhoto_OutCompletedEventHandler SI_DLDM2EHR_SavePhoto_OutCompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://sap.com/xi/WebService/soap1.1", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute("MT_SavePhoto_Response", Namespace = "urn:jinkosolar.com:ehr:dldm_save_photo")]
public DT_SavePhoto_Response SI_DLDM2EHR_SavePhoto_Out([System.Xml.Serialization.XmlElementAttribute(Namespace = "urn:jinkosolar.com:ehr:dldm_save_photo")] DT_SavePhoto_Request MT_SavePhoto_Request)
{
object[] results = this.Invoke("SI_DLDM2EHR_SavePhoto_Out", new object[] {
MT_SavePhoto_Request});
return ((DT_SavePhoto_Response)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSI_DLDM2EHR_SavePhoto_Out(DT_SavePhoto_Request MT_SavePhoto_Request, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("SI_DLDM2EHR_SavePhoto_Out", new object[] {
MT_SavePhoto_Request}, callback, asyncState);
}
/// <remarks/>
public DT_SavePhoto_Response EndSI_DLDM2EHR_SavePhoto_Out(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((DT_SavePhoto_Response)(results[0]));
}
/// <remarks/>
public void SI_DLDM2EHR_SavePhoto_OutAsync(DT_SavePhoto_Request MT_SavePhoto_Request)
{
this.SI_DLDM2EHR_SavePhoto_OutAsync(MT_SavePhoto_Request, null);
}
/// <remarks/>
public void SI_DLDM2EHR_SavePhoto_OutAsync(DT_SavePhoto_Request MT_SavePhoto_Request, object userState)
{
if ((this.SI_DLDM2EHR_SavePhoto_OutOperationCompleted == null))
{
this.SI_DLDM2EHR_SavePhoto_OutOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSI_DLDM2EHR_SavePhoto_OutOperationCompleted);
}
this.InvokeAsync("SI_DLDM2EHR_SavePhoto_Out", new object[] {
MT_SavePhoto_Request}, this.SI_DLDM2EHR_SavePhoto_OutOperationCompleted, userState);
}
private void OnSI_DLDM2EHR_SavePhoto_OutOperationCompleted(object arg)
{
if ((this.SI_DLDM2EHR_SavePhoto_OutCompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SI_DLDM2EHR_SavePhoto_OutCompleted(this, new SI_DLDM2EHR_SavePhoto_OutCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState)
{
base.CancelAsync(userState);
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "urn:jinkosolar.com:ehr:dldm_save_photo")]
public partial class DT_SavePhoto_Request
{
private string i_WORKCODEField;
private string i_PHOTO_STRField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string I_WORKCODE
{
get
{
return this.i_WORKCODEField;
}
set
{
this.i_WORKCODEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string I_PHOTO_STR
{
get
{
return this.i_PHOTO_STRField;
}
set
{
this.i_PHOTO_STRField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "urn:jinkosolar.com:ehr:dldm_save_photo")]
public partial class DT_SavePhoto_Response
{
private string oLXField;
private string oMSField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string OLX
{
get
{
return this.oLXField;
}
set
{
this.oLXField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string OMS
{
get
{
return this.oMSField;
}
set
{
this.oMSField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
public delegate void SI_DLDM2EHR_SavePhoto_OutCompletedEventHandler(object sender, SI_DLDM2EHR_SavePhoto_OutCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SI_DLDM2EHR_SavePhoto_OutCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal SI_DLDM2EHR_SavePhoto_OutCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public DT_SavePhoto_Response Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((DT_SavePhoto_Response)(this.results[0]));
}
}
}
}

View File

@@ -1,291 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
//
// This source code was auto-generated by wsdl, Version=4.6.1055.0.
//
namespace Dlhis.ScheduledTask.WsProxy
{
/// <remarks/>
// CODEGEN: The optional WSDL extension element 'Policy' from namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' was not handled.
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "ZHRF_SWIPE_DATA_SAVE", Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRF_SWIPE_DATA_SAVE_CLIENT : System.Web.Services.Protocols.SoapHttpClientProtocol
{
private System.Threading.SendOrPostCallback CallZHRF_SWIPE_DATA_SAVEOperationCompleted;
/// <remarks/>
public ZHRF_SWIPE_DATA_SAVE_CLIENT()
{
this.Url = "http://sapehdap.jinkosolar.cn:8121/sap/bc/srt/rfc/sap/zhrf_swipe_data_save/210/zh" +
"rf_swipe_data_save/zhrf_swipe_data_save";
}
/// <remarks/>
public event CallZHRF_SWIPE_DATA_SAVECompletedEventHandler CallZHRF_SWIPE_DATA_SAVECompleted;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute("ZHRF_SWIPE_DATA_SAVEResponse", Namespace = "urn:sap-com:document:sap:rfc:functions")]
public ZHRF_SWIPE_DATA_SAVEResponse CallZHRF_SWIPE_DATA_SAVE([System.Xml.Serialization.XmlElementAttribute(Namespace = "urn:sap-com:document:sap:rfc:functions")] ZHRF_SWIPE_DATA_SAVE ZHRF_SWIPE_DATA_SAVE)
{
object[] results = this.Invoke("CallZHRF_SWIPE_DATA_SAVE", new object[] {
ZHRF_SWIPE_DATA_SAVE});
return ((ZHRF_SWIPE_DATA_SAVEResponse)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginCallZHRF_SWIPE_DATA_SAVE(ZHRF_SWIPE_DATA_SAVE ZHRF_SWIPE_DATA_SAVE, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("CallZHRF_SWIPE_DATA_SAVE", new object[] {
ZHRF_SWIPE_DATA_SAVE}, callback, asyncState);
}
/// <remarks/>
public ZHRF_SWIPE_DATA_SAVEResponse EndCallZHRF_SWIPE_DATA_SAVE(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((ZHRF_SWIPE_DATA_SAVEResponse)(results[0]));
}
/// <remarks/>
public void CallZHRF_SWIPE_DATA_SAVEAsync(ZHRF_SWIPE_DATA_SAVE ZHRF_SWIPE_DATA_SAVE)
{
this.CallZHRF_SWIPE_DATA_SAVEAsync(ZHRF_SWIPE_DATA_SAVE, null);
}
/// <remarks/>
public void CallZHRF_SWIPE_DATA_SAVEAsync(ZHRF_SWIPE_DATA_SAVE ZHRF_SWIPE_DATA_SAVE, object userState)
{
if ((this.CallZHRF_SWIPE_DATA_SAVEOperationCompleted == null))
{
this.CallZHRF_SWIPE_DATA_SAVEOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCallZHRF_SWIPE_DATA_SAVEOperationCompleted);
}
this.InvokeAsync("CallZHRF_SWIPE_DATA_SAVE", new object[] {
ZHRF_SWIPE_DATA_SAVE}, this.CallZHRF_SWIPE_DATA_SAVEOperationCompleted, userState);
}
private void OnCallZHRF_SWIPE_DATA_SAVEOperationCompleted(object arg)
{
if ((this.CallZHRF_SWIPE_DATA_SAVECompleted != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.CallZHRF_SWIPE_DATA_SAVECompleted(this, new CallZHRF_SWIPE_DATA_SAVECompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState)
{
base.CancelAsync(userState);
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRF_SWIPE_DATA_SAVE
{
private ZHRS_SWIPE_DATA[] t_DATAField;
/// <remarks/>
[System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public ZHRS_SWIPE_DATA[] T_DATA
{
get
{
return this.t_DATAField;
}
set
{
this.t_DATAField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRS_SWIPE_DATA
{
private string zWORKCODEField;
private string zDATEField;
private System.String zTIMEField;
private string zNOTEField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZWORKCODE
{
get
{
return this.zWORKCODEField;
}
set
{
this.zWORKCODEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZDATE
{
get
{
return this.zDATEField;
}
set
{
this.zDATEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public System.String ZTIME
{
get
{
return this.zTIMEField;
}
set
{
this.zTIMEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZNOTE
{
get
{
return this.zNOTEField;
}
set
{
this.zNOTEField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRF_SWIPE_DATA_SAVEResponse
{
private string oLXField;
private string oMSField;
private ZHRS_SWIPE_DATA[] t_DATAField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string OLX
{
get
{
return this.oLXField;
}
set
{
this.oLXField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string OMS
{
get
{
return this.oMSField;
}
set
{
this.oMSField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public ZHRS_SWIPE_DATA[] T_DATA
{
get
{
return this.t_DATAField;
}
set
{
this.t_DATAField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
public delegate void CallZHRF_SWIPE_DATA_SAVECompletedEventHandler(object sender, CallZHRF_SWIPE_DATA_SAVECompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CallZHRF_SWIPE_DATA_SAVECompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal CallZHRF_SWIPE_DATA_SAVECompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public ZHRF_SWIPE_DATA_SAVEResponse Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((ZHRF_SWIPE_DATA_SAVEResponse)(this.results[0]));
}
}
}
}

View File

@@ -1,259 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
//
// This source code was auto-generated by wsdl, Version=4.6.1055.0.
//
namespace Dlhis.ScheduledTask.WsProxy
{
/// <remarks/>
// CODEGEN: The optional WSDL extension element 'Policy' from namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' was not handled.
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "ZHRF_SYN_01", Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRF_SYN_01 : System.Web.Services.Protocols.SoapHttpClientProtocol
{
private System.Threading.SendOrPostCallback CallZHRF_SYN_01OperationCompleted;
/// <remarks/>
public ZHRF_SYN_01()
{
this.Url = "http://sapehpap01.jinkosolar.cn:8125/sap/bc/srt/rfc/sap/zhrf_syn_01/800/zhrf_syn_" +
"01/zhrf_syn_01";
}
/// <remarks/>
public event CallZHRF_SYN_01CompletedEventHandler CallZHRF_SYN_01Completed;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:sap-com:document:sap:rfc:functions:ZHRF_SYN_01:ZHRF_SYN_01Request", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute("ZHRF_SYN_01Response", Namespace = "urn:sap-com:document:sap:rfc:functions")]
public ZHRF_SYN_01Response CallZHRF_SYN_01([System.Xml.Serialization.XmlElementAttribute(Namespace = "urn:sap-com:document:sap:rfc:functions")] ZHRF_SYN_011 ZHRF_SYN_01)
{
object[] results = this.Invoke("CallZHRF_SYN_01", new object[] {
ZHRF_SYN_01});
return ((ZHRF_SYN_01Response)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginCallZHRF_SYN_01(ZHRF_SYN_011 ZHRF_SYN_01, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("CallZHRF_SYN_01", new object[] {
ZHRF_SYN_01}, callback, asyncState);
}
/// <remarks/>
public ZHRF_SYN_01Response EndCallZHRF_SYN_01(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((ZHRF_SYN_01Response)(results[0]));
}
/// <remarks/>
public void CallZHRF_SYN_01Async(ZHRF_SYN_011 ZHRF_SYN_01)
{
this.CallZHRF_SYN_01Async(ZHRF_SYN_01, null);
}
/// <remarks/>
public void CallZHRF_SYN_01Async(ZHRF_SYN_011 ZHRF_SYN_01, object userState)
{
if ((this.CallZHRF_SYN_01OperationCompleted == null))
{
this.CallZHRF_SYN_01OperationCompleted = new System.Threading.SendOrPostCallback(this.OnCallZHRF_SYN_01OperationCompleted);
}
this.InvokeAsync("CallZHRF_SYN_01", new object[] {
ZHRF_SYN_01}, this.CallZHRF_SYN_01OperationCompleted, userState);
}
private void OnCallZHRF_SYN_01OperationCompleted(object arg)
{
if ((this.CallZHRF_SYN_01Completed != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.CallZHRF_SYN_01Completed(this, new CallZHRF_SYN_01CompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState)
{
base.CancelAsync(userState);
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRF_SYN_011
{
private string i_DATEField;
private ZHRS_ORG[] t_ORGField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string I_DATE
{
get
{
return this.i_DATEField;
}
set
{
this.i_DATEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public ZHRS_ORG[] T_ORG
{
get
{
return this.t_ORGField;
}
set
{
this.t_ORGField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRS_ORG
{
private string oBJIDField;
private string sTEXTField;
private string sOBIDField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string OBJID
{
get
{
return this.oBJIDField;
}
set
{
this.oBJIDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string STEXT
{
get
{
return this.sTEXTField;
}
set
{
this.sTEXTField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string SOBID
{
get
{
return this.sOBIDField;
}
set
{
this.sOBIDField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRF_SYN_01Response
{
private ZHRS_ORG[] t_ORGField;
/// <remarks/>
[System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public ZHRS_ORG[] T_ORG
{
get
{
return this.t_ORGField;
}
set
{
this.t_ORGField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
public delegate void CallZHRF_SYN_01CompletedEventHandler(object sender, CallZHRF_SYN_01CompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CallZHRF_SYN_01CompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal CallZHRF_SYN_01CompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public ZHRF_SYN_01Response Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((ZHRF_SYN_01Response)(this.results[0]));
}
}
}
}

View File

@@ -1,275 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
//
// This source code was auto-generated by wsdl, Version=4.6.1055.0.
//
namespace Dlhis.ScheduledTask.WsProxy
{
/// <remarks/>
// CODEGEN: The optional WSDL extension element 'Policy' from namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' was not handled.
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "ZHRF_SYN_02", Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRF_SYN_02 : System.Web.Services.Protocols.SoapHttpClientProtocol
{
private System.Threading.SendOrPostCallback CallZHRF_SYN_02OperationCompleted;
/// <remarks/>
public ZHRF_SYN_02()
{
this.Url = "http://172.16.7.58:8125/sap/bc/srt/rfc/sap/zhrf_syn_02/800/zhrf_syn_" +
"02/zhrf_syn_02";
}
/// <remarks/>
public event CallZHRF_SYN_02CompletedEventHandler CallZHRF_SYN_02Completed;
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:sap-com:document:sap:rfc:functions:ZHRF_SYN_02:ZHRF_SYN_02Request", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute("ZHRF_SYN_02Response", Namespace = "urn:sap-com:document:sap:rfc:functions")]
public ZHRF_SYN_02Response CallZHRF_SYN_02([System.Xml.Serialization.XmlElementAttribute(Namespace = "urn:sap-com:document:sap:rfc:functions")] ZHRF_SYN_021 ZHRF_SYN_02)
{
object[] results = this.Invoke("CallZHRF_SYN_02", new object[] {
ZHRF_SYN_02});
return ((ZHRF_SYN_02Response)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginCallZHRF_SYN_02(ZHRF_SYN_021 ZHRF_SYN_02, System.AsyncCallback callback, object asyncState)
{
return this.BeginInvoke("CallZHRF_SYN_02", new object[] {
ZHRF_SYN_02}, callback, asyncState);
}
/// <remarks/>
public ZHRF_SYN_02Response EndCallZHRF_SYN_02(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((ZHRF_SYN_02Response)(results[0]));
}
/// <remarks/>
public void CallZHRF_SYN_02Async(ZHRF_SYN_021 ZHRF_SYN_02)
{
this.CallZHRF_SYN_02Async(ZHRF_SYN_02, null);
}
/// <remarks/>
public void CallZHRF_SYN_02Async(ZHRF_SYN_021 ZHRF_SYN_02, object userState)
{
if ((this.CallZHRF_SYN_02OperationCompleted == null))
{
this.CallZHRF_SYN_02OperationCompleted = new System.Threading.SendOrPostCallback(this.OnCallZHRF_SYN_02OperationCompleted);
}
this.InvokeAsync("CallZHRF_SYN_02", new object[] {
ZHRF_SYN_02}, this.CallZHRF_SYN_02OperationCompleted, userState);
}
private void OnCallZHRF_SYN_02OperationCompleted(object arg)
{
if ((this.CallZHRF_SYN_02Completed != null))
{
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.CallZHRF_SYN_02Completed(this, new CallZHRF_SYN_02CompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState)
{
base.CancelAsync(userState);
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRF_SYN_021
{
private string i_DATEField;
private ZHRS_POST[] t_POSTField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string I_DATE
{
get
{
return this.i_DATEField;
}
set
{
this.i_DATEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public ZHRS_POST[] T_POST
{
get
{
return this.t_POSTField;
}
set
{
this.t_POSTField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRS_POST
{
private string zJOBIDField;
private string zJOBNAMEField;
private string zJOBACTIDField;
private string zDEPIDField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZJOBID
{
get
{
return this.zJOBIDField;
}
set
{
this.zJOBIDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZJOBNAME
{
get
{
return this.zJOBNAMEField;
}
set
{
this.zJOBNAMEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZJOBACTID
{
get
{
return this.zJOBACTIDField;
}
set
{
this.zJOBACTIDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZDEPID
{
get
{
return this.zDEPIDField;
}
set
{
this.zDEPIDField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRF_SYN_02Response
{
private ZHRS_POST[] t_POSTField;
/// <remarks/>
[System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public ZHRS_POST[] T_POST
{
get
{
return this.t_POSTField;
}
set
{
this.t_POSTField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
public delegate void CallZHRF_SYN_02CompletedEventHandler(object sender, CallZHRF_SYN_02CompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CallZHRF_SYN_02CompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
{
private object[] results;
internal CallZHRF_SYN_02CompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState)
{
this.results = results;
}
/// <remarks/>
public ZHRF_SYN_02Response Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((ZHRF_SYN_02Response)(this.results[0]));
}
}
}
}

View File

@@ -1,33 +1,28 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
//
// This source code was auto-generated by wsdl, Version=4.6.1055.0.
//
namespace Dlhis.ScheduledTask.WsProxy
namespace Dlhis.ScheduledTask.Wsproxy
{
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
//
// This source code was auto-generated by wsdl, Version=4.6.1055.0.
//
namespace Dlhis.JinkoHr.WsProxy
{
/// <remarks/>
// CODEGEN: The optional WSDL extension element 'Policy' from namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' was not handled.
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "ZHRF_SYN_03N", Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRF_SYN_03N : System.Web.Services.Protocols.SoapHttpClientProtocol
//[System.Web.Services.WebServiceBindingAttribute(Name = "ZHRF_SYN_03N", Namespace = "urn:sap-com:document:sap:rfc:functions")]
/*public partial class ZHRF_SYN_03N : System.Web.Services.Protocols.SoapHttpClientProtocol
{
private System.Threading.SendOrPostCallback ZHRF_SYN_03OperationCompleted;
@@ -97,13 +92,13 @@ namespace Dlhis.ScheduledTask.WsProxy
{
base.CancelAsync(userState);
}
}
}*/
/// <remarks/>
/* /// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.ComponentModel.DesignerCategoryAttribute("code")]*/
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRF_SYN_03
{
@@ -852,4 +847,5 @@ namespace Dlhis.ScheduledTask.WsProxy
}
}
}
}
}

View File

@@ -1,25 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace Dlhis.ScheduledTask.WsProxy
{
public partial class ZHRS_ORG : IEquatable<ZHRS_ORG>
{
public bool Equals(ZHRS_ORG other)
{
if (other is null)
return false;
return this.OBJID == other.OBJID
&& this.SOBID == other.SOBID
&& this.STEXT == other.STEXT;
}
public override bool Equals(object obj) => Equals(obj as ZHRS_ORG);
public override int GetHashCode() => (OBJID, SOBID, STEXT).GetHashCode();
}
}

View File

@@ -1,61 +0,0 @@
//using System;
//namespace Dlhis.ScheduledTask.WsProxy
//{
// public partial class ZHRS_PERSON : IEquatable<ZHRS_PERSON>
// {
// public bool Equals(ZHRS_PERSON other)
// {
// if (other is null)
// return false;
// return this.GBDAT == other.GBDAT
// && this.GESCH == other.GESCH
// && this.NAME == other.NAME
// && this.ORGEH == other.ORGEH
// && this.PERNR == other.PERNR
// && this.PLANS == other.PLANS
// && this.WERKS == other.WERKS
// && this.ZEMAIL == other.ZEMAIL
// && this.ZMOBILE == other.ZMOBILE
// && this.ZSTATUS == other.ZSTATUS
// && this.ZTELE == other.ZTELE
// && this.ZWORKCODE == other.ZWORKCODE
// && this.ZZ_AQJB == other.ZZ_AQJB
// && this.ZZ_SFZH == other.ZZ_SFZH
// && this.ZZ_SJGH == other.ZZ_SJGH
// && this.ZZ_XSQY == other.ZZ_XSQY
// && this.KOSTL == other.KOSTL
// && this.ZZ_ZD == other.ZZ_ZD
// && this.Z_ZJ == other.Z_ZJ
// && this.ZRZRQ == other.ZRZRQ
// && this.ZLZRQ == other.ZLZRQ
// && this.MASSG == other.MASSG
// && this.MGTXT == other.MGTXT
// && this.BEGDA == other.BEGDA
// && this.ENDDA == other.ENDDA
// && this.STELL == other.STELL
// && this.STELL_NM == other.STELL_NM
// && this.ZADZH == other.ZADZH
// && this.STAT2 == other.STAT2
// && this.ZCJRQ == other.ZCJRQ
// && this.ZZZRQ == other.ZZZRQ
// && this.MASSN == other.MASSN
// && this.MNTXT == other.MNTXT
// && this.ZXUELI == other.ZXUELI
// && this.ZZ_KLX == other.ZZ_KLX;
// }
// public override bool Equals(object obj) => Equals(obj as ZHRS_PERSON);
// //public override int GetHashCode() => (GBDAT, GESCH, NAME, ORGEH, PERNR, PLANS,
// // WERKS, ZEMAIL, ZMOBILE, ZSTATUS, ZTELE, ZWORKCODE, ZZ_AQJB, ZZ_SFZH, ZZ_SJGH,
// // ZZ_XSQY, KOSTL, ZZ_ZD, Z_ZJ, ZRZRQ, ZLZRQ, MASSG, MGTXT, BEGDA, ENDDA, STELL,
// // STELL_NM, ZADZH, STAT2, ZCJRQ, ZZZRQ, MASSN, MNTXT).GetHashCode();
// public override int GetHashCode() => string.Join("", GBDAT ?? "", GESCH ?? "", NAME ?? "", ORGEH ?? "", PERNR ?? "", PLANS ?? "",
// WERKS ?? "", ZEMAIL ?? "", ZMOBILE ?? "", ZSTATUS ?? "", ZTELE ?? "", ZWORKCODE ?? "", ZZ_AQJB ?? "", ZZ_SFZH ?? "", ZZ_SJGH ?? "",
// ZZ_XSQY ?? "", KOSTL ?? "", ZZ_ZD ?? "", Z_ZJ ?? "", ZRZRQ ?? "", ZLZRQ ?? "", MASSG ?? "", MGTXT ?? "", BEGDA ?? "", ENDDA ?? "", STELL ?? "",
// STELL_NM ?? "", ZADZH ?? "", STAT2 ?? "", ZCJRQ ?? "", ZZZRQ ?? "", MASSN ?? "", MNTXT ?? "", ZXUELI ?? "", ZZ_KLX ?? "").GetHashCode();
// }
//}

View File

@@ -1,25 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Dlhis.ScheduledTask.WsProxy
{
public partial class ZHRS_POST : IEquatable<ZHRS_POST>
{
public bool Equals(ZHRS_POST other)
{
if (other is null)
return false;
return this.ZDEPID == other.ZDEPID
&& this.ZJOBACTID == other.ZJOBACTID
&& this.ZJOBID == other.ZJOBID
&& this.ZJOBNAME == other.ZJOBNAME;
}
public override bool Equals(object obj) => Equals(obj as ZHRS_POST);
public override int GetHashCode() => (ZDEPID, ZJOBACTID, ZJOBID, ZJOBNAME).GetHashCode();
}
}

View File

@@ -1,139 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using log4net;
using Newtonsoft.Json;
using System.Net;
using System.IO;
using Newtonsoft.Json.Linq;
using Hangfire.Logging;
namespace Dlhis.ScheduledTask.WsProxy
{
/// <summary>
/// 获取图片
/// </summary>
public class ZHR_OA_O_WORK_CARD_INFO
{
private static readonly log4net.ILog log = LogManager.GetLogger(typeof(ZHR_OA_O_WORK_CARD_INFO));
/// <summary>
/// 获取员工卡片信息
/// </summary>
public List<string> Get_ZHR_OA_O_WORK_CARD_INFO(string url, string userName, string password, List<string> workcode)
{
List<string> list = new List<string>();
try
{
if (workcode == null || workcode.Count == 0) return list;
List<Dictionary<string, string>> workcodes = new List<Dictionary<string, string>>();
foreach (var item in workcode)
{
var dictitem = new Dictionary<string, string>
{
{ "WORKCODE", item }
};
workcodes.Add(dictitem);
}
Dictionary<string, object> dictitems = new Dictionary<string, object>
{
{ "item", workcodes }
};
Dictionary<string, object> IT_PERSON = new Dictionary<string, object>
{
{ "IT_PERSON", dictitems }
};
string postData = JsonConvert.SerializeObject(IT_PERSON);
var auth = EncodeBase64($"{userName}:{password}");
string readTxt = "";
HttpWebRequest request = HttpWebRequest.Create(url) as HttpWebRequest;
request.Headers.Add("Authorization", $"Basic {auth}");
request.Timeout = 30 * 1000;
request.ContentType = "application/json";
request.Method = "POST";
byte[] data = Encoding.UTF8.GetBytes(postData);
request.ContentLength = data.Length;
Stream postStream = request.GetRequestStream();
postStream.Write(data, 0, data.Length);
postStream.Close();
using (var res = request.GetResponse() as HttpWebResponse)
{
if (res.StatusCode == HttpStatusCode.OK)
{
StreamReader reader = new StreamReader(res.GetResponseStream(), Encoding.UTF8);
readTxt = reader.ReadToEnd();
}
}
if (!string.IsNullOrEmpty(readTxt))
{
var resutJson = JsonConvert.DeserializeObject<JObject>(readTxt);
if (resutJson.HasValues)
{
var resultItem = resutJson["ET_DATA"]?["item"];
if (resultItem.HasValues && resultItem.Count() > 0)
{
foreach (var _item in resultItem)
{
var _photo = _item["PHOTO_STR"]?.ToString();
if (string.IsNullOrEmpty(_photo))
{
list.Add("");
}
else
{
list.Add(_photo);
}
}
}
}
}
return list;
}
catch (Exception ex)
{
log.Error(ex.ToString());
throw new Exception($"请求{url}失败", ex);
}
}
/// <summary>
/// Base64编码
/// </summary>
/// <param name="code"></param>
/// <param name="code_type">默认UTF8</param>
/// <returns></returns>
public static string EncodeBase64(string code, string code_type = "")
{
string encode = "";
byte[] bytes = null;
if (string.IsNullOrEmpty(code_type))
{
bytes = System.Text.Encoding.UTF8.GetBytes(code);
}
else
{
bytes = Encoding.GetEncoding(code_type).GetBytes(code);
}
try
{
encode = Convert.ToBase64String(bytes);
}
catch
{
encode = code;
}
return encode;
}
}
}

View File

@@ -5,11 +5,26 @@
"Microsoft.AspNetCore": "Warning"
}
},
"SqlSugarOptions": {
"DefaultConnectionString": "server=192.168.199.124;port=3306;userid=root;password=dlhis123;database=yikatong;charset=utf8mb4;",
"SlaveConnectionString": [],
"Timeout": 30,
"SlowSqlTime": 1,
"EnableSqlLog": true
},
"ConnectionStrings": {
"HangfireConnection": "server=192.168.199.124;port=3306;userid=root;password=dlhis123;database=Hangfire;charset=utf8mb4;Allow User Variables=true;"
},
"ServiceSettings": {
"ServerUrl": ""
"ServerUrl": "http://172.16.7.58:8125",
"UserName": "admin_ws",
"Password": "jinkohr@2017",
"SyncTime": "00:00",
"AttendanceUploadInterval": "30",
"AttendanceUploadUrl": "http://172.16.7.110:8121/sap/bc/srt/wsdl/flv_10002A111AD1/bndg_url/sap/bc/srt/rfc/sap/zhrf_swipe_data_saven/210/zhrf_swipe_data_save/zhrf_swipe_data_save?sap-client=210",
"DlhisDatabase": "server=192.168.199.124,32634;uid=sa;pwd=@Z!123456;database=test;",
"Werks": "aaa,bbb",
"BeginSyncDate": "2020-5-1"
},
"AllowedHosts": "*",
"Serilog": {