From 3d665259b32288be73badb73b9556997d4b1ab95 Mon Sep 17 00:00:00 2001 From: cheche <717840555@qq.com> Date: Thu, 4 Jan 2024 14:40:04 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E4=BA=BA=E4=BA=8B=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/Dlhis.ScheduledTask/App.config | 75 ++ .../Comparers/ZHRS_ORGComparer.cs | 22 + .../Comparers/ZHRS_PERSONComparer.cs | 92 ++ .../Comparers/ZHRS_POSTComparer.cs | 21 + .../Configurations/ServiceSettings.cs | 102 +++ .../Dlhis.ScheduledTask.csproj | 1 + Src/Dlhis.ScheduledTask/Dto/Person.cs | 203 +++++ Src/Dlhis.ScheduledTask/Entities/GainfoSap.cs | 115 +++ .../Extensions/DbConnectionExtensions.cs | 122 +++ .../Extensions/EnumerableExtensions.cs | 13 + .../Extensions/GetHashCodeExtensions.cs | 16 + Src/Dlhis.ScheduledTask/Job/JinkoHrJob.cs | 476 ++++++++++ .../Response/PersonResult.cs | 12 + Src/Dlhis.ScheduledTask/SqlGeneration.cs | 34 + ..._DLDM2EHR_DeleteRecord_OutServiceClient.cs | 281 ++++++ ..._DLDM2EHR_InsertRecord_OutServiceClient.cs | 313 +++++++ .../SI_DLDM2EHR_SavePhoto_OutServiceClient.cs | 216 +++++ .../WsProxy/ZHRF_SWIPE_DATA_SAVE_CLIENT.cs | 291 ++++++ .../WsProxy/ZHRF_SYN_01.cs | 259 ++++++ .../WsProxy/ZHRF_SYN_02.cs | 275 ++++++ .../WsProxy/ZHRF_SYN_03N.cs | 855 ++++++++++++++++++ Src/Dlhis.ScheduledTask/WsProxy/ZHRS_ORG.cs | 25 + .../WsProxy/ZHRS_PERSON.cs | 61 ++ Src/Dlhis.ScheduledTask/WsProxy/ZHRS_POST.cs | 25 + .../WsProxy/ZHR_OA_O_WORK_CARD_INFO.cs | 139 +++ 25 files changed, 4044 insertions(+) create mode 100644 Src/Dlhis.ScheduledTask/App.config create mode 100644 Src/Dlhis.ScheduledTask/Comparers/ZHRS_ORGComparer.cs create mode 100644 Src/Dlhis.ScheduledTask/Comparers/ZHRS_PERSONComparer.cs create mode 100644 Src/Dlhis.ScheduledTask/Comparers/ZHRS_POSTComparer.cs create mode 100644 Src/Dlhis.ScheduledTask/Configurations/ServiceSettings.cs create mode 100644 Src/Dlhis.ScheduledTask/Dto/Person.cs create mode 100644 Src/Dlhis.ScheduledTask/Entities/GainfoSap.cs create mode 100644 Src/Dlhis.ScheduledTask/Extensions/DbConnectionExtensions.cs create mode 100644 Src/Dlhis.ScheduledTask/Extensions/EnumerableExtensions.cs create mode 100644 Src/Dlhis.ScheduledTask/Extensions/GetHashCodeExtensions.cs create mode 100644 Src/Dlhis.ScheduledTask/Job/JinkoHrJob.cs create mode 100644 Src/Dlhis.ScheduledTask/Response/PersonResult.cs create mode 100644 Src/Dlhis.ScheduledTask/SqlGeneration.cs create mode 100644 Src/Dlhis.ScheduledTask/WsProxy/SI_DLDM2EHR_DeleteRecord_OutServiceClient.cs create mode 100644 Src/Dlhis.ScheduledTask/WsProxy/SI_DLDM2EHR_InsertRecord_OutServiceClient.cs create mode 100644 Src/Dlhis.ScheduledTask/WsProxy/SI_DLDM2EHR_SavePhoto_OutServiceClient.cs create mode 100644 Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SWIPE_DATA_SAVE_CLIENT.cs create mode 100644 Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SYN_01.cs create mode 100644 Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SYN_02.cs create mode 100644 Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SYN_03N.cs create mode 100644 Src/Dlhis.ScheduledTask/WsProxy/ZHRS_ORG.cs create mode 100644 Src/Dlhis.ScheduledTask/WsProxy/ZHRS_PERSON.cs create mode 100644 Src/Dlhis.ScheduledTask/WsProxy/ZHRS_POST.cs create mode 100644 Src/Dlhis.ScheduledTask/WsProxy/ZHR_OA_O_WORK_CARD_INFO.cs diff --git a/Src/Dlhis.ScheduledTask/App.config b/Src/Dlhis.ScheduledTask/App.config new file mode 100644 index 00000000..fb37bfe6 --- /dev/null +++ b/Src/Dlhis.ScheduledTask/App.config @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Src/Dlhis.ScheduledTask/Comparers/ZHRS_ORGComparer.cs b/Src/Dlhis.ScheduledTask/Comparers/ZHRS_ORGComparer.cs new file mode 100644 index 00000000..a65d70a6 --- /dev/null +++ b/Src/Dlhis.ScheduledTask/Comparers/ZHRS_ORGComparer.cs @@ -0,0 +1,22 @@ +using Dlhis.ScheduledTask.Extensions; +using Dlhis.ScheduledTask.WsProxy; + +namespace Dlhis.ScheduledTask.Comparers +{ + internal class ZHRS_ORGComparer : IEqualityComparer + { + 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 (x.GetType() != y.GetType()) return false; + return x.OBJID == y.OBJID && x.STEXT == y.STEXT && x.SOBID == y.SOBID; + } + + public int GetHashCode(ZHRS_ORG obj) + { + return obj.OBJID.SafeGetHashCode() ^ obj.STEXT.SafeGetHashCode() ^ obj.SOBID.SafeGetHashCode(); + } + } +} diff --git a/Src/Dlhis.ScheduledTask/Comparers/ZHRS_PERSONComparer.cs b/Src/Dlhis.ScheduledTask/Comparers/ZHRS_PERSONComparer.cs new file mode 100644 index 00000000..7fe514fb --- /dev/null +++ b/Src/Dlhis.ScheduledTask/Comparers/ZHRS_PERSONComparer.cs @@ -0,0 +1,92 @@ +using Dlhis.ScheduledTask.Dto; +using Dlhis.ScheduledTask.Extensions; +using System.Text; + +namespace Dlhis.ScheduledTask +{ + internal class ZHRS_PERSONComparer : IEqualityComparer + { + public bool Equals(PersonDetail x, PersonDetail y) + { + if (ReferenceEquals(x, y)) return true; + if (ReferenceEquals(x, null)) return false; + if (ReferenceEquals(y, null)) return false; + + return x.PERNR == y.PERNR + && x.WERKS == y.WERKS + && SubString(x.ORGEH, 10) == SubString(y.ORGEH, 10) + && SubString(x.NAME, 50) == SubString(y.NAME, 50) + && SafeParseDate(x.GBDAT) == SafeParseDate(y.GBDAT) + && SubString(x.ZZ_SFZH, 18) == SubString(y.ZZ_SFZH, 18) + && SubString(x.ZWORKCODE, 50) == SubString(y.ZWORKCODE, 50) + && SubString(x.ZMOBILE, 20) == SubString(y.ZMOBILE, 20) + && x.ZSTATUS == y.ZSTATUS + && x.KOSTL == y.KOSTL + && x.ZZ_ZD == y.ZZ_ZD + && x.Z_ZJ == y.Z_ZJ + && x.ZRZRQ == y.ZRZRQ + && SafeParseDate(x.ZLZRQ) == SafeParseDate(y.ZLZRQ) + && x.STELL == y.STELL + && x.STELL_NM == y.STELL_NM + && x.MASSN == y.MASSN + && x.MNTXT == y.MNTXT + && (x.ZXUELI ?? string.Empty).Trim() == (y.ZXUELI ?? string.Empty).Trim() + && (x.ZZ_KLX ?? string.Empty) == (y.ZZ_KLX ?? string.Empty); + } + + public int GetHashCode(PersonDetail obj) + { + return obj.PERNR.SafeGetHashCode() + ^ obj.WERKS.SafeGetHashCode() + ^ SubString(obj.ORGEH, 10).SafeGetHashCode() + ^ SubString(obj.NAME, 50).SafeGetHashCode() + ^ SafeParseDate(obj.GBDAT).SafeGetHashCode() + ^ SubString(obj.ZZ_SFZH, 18).SafeGetHashCode() + ^ SubString(obj.ZWORKCODE, 50).SafeGetHashCode() + ^ SubString(obj.ZMOBILE, 20).SafeGetHashCode() + ^ obj.ZSTATUS.SafeGetHashCode() + ^ obj.KOSTL.SafeGetHashCode() + ^ obj.ZZ_ZD.SafeGetHashCode() + ^ obj.Z_ZJ.SafeGetHashCode() + ^ obj.ZRZRQ.SafeGetHashCode() + ^ SafeParseDate(obj.ZLZRQ).SafeGetHashCode() + ^ obj.STELL.SafeGetHashCode() + ^ obj.STELL_NM.SafeGetHashCode() + ^ obj.MASSN.SafeGetHashCode() + ^ obj.MNTXT.SafeGetHashCode() + ^ obj.ZXUELI.SafeGetHashCode() + ^ (obj.ZZ_KLX ?? "").SafeGetHashCode(); + } + + + 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 DateTime? SafeParseDate(string str) + { + if (str == "0000-00-00" || str == "0001-01-01" || str == "1900-01-01") + return null; + + if (DateTime.TryParse(str, out var d)) + { + return d; + } + return null; + } + } +} diff --git a/Src/Dlhis.ScheduledTask/Comparers/ZHRS_POSTComparer.cs b/Src/Dlhis.ScheduledTask/Comparers/ZHRS_POSTComparer.cs new file mode 100644 index 00000000..d74e200e --- /dev/null +++ b/Src/Dlhis.ScheduledTask/Comparers/ZHRS_POSTComparer.cs @@ -0,0 +1,21 @@ +using Dlhis.ScheduledTask.WsProxy; + +namespace Dlhis.ScheduledTask.Comparers +{ + internal class ZHRS_POSTComparer : IEqualityComparer + { + 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 (x.GetType() != y.GetType()) return false; + return x.ZJOBID == y.ZJOBID && x.ZJOBNAME == y.ZJOBNAME && x.ZJOBACTID == y.ZJOBACTID && x.ZDEPID == y.ZDEPID; + } + + public int GetHashCode(ZHRS_POST obj) + { + return obj.ZJOBID.SafeGetHashCode() ^ obj.ZJOBNAME.SafeGetHashCode() ^ obj.ZJOBACTID.SafeGetHashCode() ^ obj.ZDEPID.SafeGetHashCode(); + } + } +} diff --git a/Src/Dlhis.ScheduledTask/Configurations/ServiceSettings.cs b/Src/Dlhis.ScheduledTask/Configurations/ServiceSettings.cs new file mode 100644 index 00000000..a17dceea --- /dev/null +++ b/Src/Dlhis.ScheduledTask/Configurations/ServiceSettings.cs @@ -0,0 +1,102 @@ +using System; +using System.Configuration; +using ConfigurationManager = System.Configuration.ConfigurationManager; + + +namespace Dlhis.ScheduledTask.Configurations +{ + public class ServiceSettings + { + public string ServerUrl { get; private set; } + + public string UserName { get; private set; } + + public string Password { get; private set; } + + public string SyncTime { get; private set; } + public int AttendanceUploadInterval { get; private set; } + public string AttendanceUploadUrl { get; private set; } + public string DlhisDatabase { get; private set; } + + public string Werks { get; private set; } + + public DateTime BeginSyncDate { get; private set; } + public int ApiPort { get; private set; } + public string EHRWebServiceUserName { get; set; } + public string EHRWebServicePassword { get; set; } + public string EHRInsertRecordApiUrl { get; set; } + public string EHRDeleteRecordApiUrl { get; set; } + + public string EHRSavePhotoApiUrl { get; set; } + + + /// + /// 获取员工卡片信息RESUT地址 + /// + public string EHR_GET_WORK_CARD_INFOApiUrl { get; set; } + + /// + /// REST账号 + /// + public string RestUserName { get; set; } + + /// + /// REST密码 + /// + 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) + { + if (int.TryParse(value, out int i)) + { + return i; + } + return defaultValue; + } + private static bool SafeParseBoolean(string value, bool defaultValue = false) + { + if (bool.TryParse(value, out var b)) + { + return b; + } + return defaultValue; + } + private static DateTime SafeParseDate(string value, DateTime defaultValue) + { + if (DateTime.TryParse(value, out var b)) + { + return b; + } + return defaultValue; + } + + public void SetBeginSyncDate(DateTime beginSyncDate) + { + BeginSyncDate = beginSyncDate; + Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); + config.AppSettings.Settings[nameof(BeginSyncDate)].Value = beginSyncDate.ToString("yyyy-MM-dd"); + config.Save(ConfigurationSaveMode.Modified); + } + } +} diff --git a/Src/Dlhis.ScheduledTask/Dlhis.ScheduledTask.csproj b/Src/Dlhis.ScheduledTask/Dlhis.ScheduledTask.csproj index 6aa4680e..0e2c2f98 100644 --- a/Src/Dlhis.ScheduledTask/Dlhis.ScheduledTask.csproj +++ b/Src/Dlhis.ScheduledTask/Dlhis.ScheduledTask.csproj @@ -21,6 +21,7 @@ + diff --git a/Src/Dlhis.ScheduledTask/Dto/Person.cs b/Src/Dlhis.ScheduledTask/Dto/Person.cs new file mode 100644 index 00000000..8ee5479f --- /dev/null +++ b/Src/Dlhis.ScheduledTask/Dto/Person.cs @@ -0,0 +1,203 @@ +namespace Dlhis.ScheduledTask.Dto +{ + public class PersonDetail + { + public string KOSTL { get; set; } + + public string ZLZRQ { get; set; } + public string ZZ_SFZH { get; set; } + + public string STELL { get; set; } + + public string STELL_NM { get; set; } + + public string ZZ_KLX { get; set; } + + /// + /// + /// + public string PERNR { get; set; } + /// + /// + /// + public string ZWORKCODE { get; set; } + /// + /// + /// + public string MASSN { get; set; } + /// + /// 数据变更 + /// + public string MNTXT { get; set; } + /// + /// + /// + public string MASSG { get; set; } + /// + /// 数据变更 + /// + public string MGTXT { get; set; } + /// + /// + /// + public string ZSTATUS { get; set; } + /// + /// + /// + public string STAT2 { get; set; } + /// + /// + /// + public string BEGDA { get; set; } + /// + /// + /// + public string ENDDA { get; set; } + /// + /// + /// + public string WERKS { get; set; } + /// + /// + /// + public string PERSG { get; set; } + /// + /// + /// + public string PERSK { get; set; } + /// + /// + /// + public string BTRTL { get; set; } + /// + /// + /// + public string ANSVH { get; set; } + /// + /// + /// + public string MOABW { get; set; } + /// + /// + /// + public string ORGEH { get; set; } + /// + /// + /// + public string PLANS { get; set; } + /// + /// + /// + public string ZZ_ZYSF { get; set; } + /// + /// + /// + public string ZZ_AQJB { get; set; } + /// + /// + /// + public string ZZ_ZD { get; set; } + /// + /// + /// + public string ZZ_SJGH { get; set; } + /// + /// + /// + public string ZZ_BGZT { get; set; } + /// + /// + /// + public string Z_ZJ { get; set; } + /// + /// + /// + public string ZZ_XSQY { get; set; } + /// + /// 上海 + /// + public string ZZ_LOC { get; set; } + /// + /// + /// + public string ZZ_COUN { get; set; } + /// + /// + /// + public string ZZ_CITY { get; set; } + /// + /// + /// + public string NACHN { get; set; } + /// + /// + /// + public string VORNA { get; set; } + /// + /// + /// + public string NAME { get; set; } + /// + /// + /// + public string GESCH { get; set; } + /// + /// + /// + public string GBDAT { get; set; } + /// + /// + /// + public string NATIO { get; set; } + /// + /// + /// + public string ZZ_QFRQ { get; set; } + /// + /// + /// + public string ZMOBILE { get; set; } + /// + /// + /// + public string ZEMAIL { get; set; } + /// + /// + /// + public string ZADZH { get; set; } + /// + /// + /// + public string ZRZRQ { get; set; } + /// + /// + /// + public string DAT01 { get; set; } + /// + /// + /// + public string ZCJRQ { get; set; } + /// + /// + /// + public string ZZZRQ { get; set; } + /// + /// 本科 + /// + public string ZXUELI { get; set; } + /// + /// + /// + public string ZZ_ZPQD { get; set; } + } + + public class T_PERSON + { + /// + /// + /// + public List item { get; set; } + } + + +} diff --git a/Src/Dlhis.ScheduledTask/Entities/GainfoSap.cs b/Src/Dlhis.ScheduledTask/Entities/GainfoSap.cs new file mode 100644 index 00000000..a32ce79f --- /dev/null +++ b/Src/Dlhis.ScheduledTask/Entities/GainfoSap.cs @@ -0,0 +1,115 @@ +namespace Dlhis.ScheduledTask.Entities +{ + public class GainfoSap + { + public GainfoSap() + { + + } + + [PkColumn] + public int id { get; set; } + + public string ano { get; set; } + public string @class { get; set; } + + public string passwd { get; set; } + public string question { get; set; } + + public string answer { get; set; } + public string gname { get; set; } + + [UpdateColumn] + public string ename { get; set; } + + public string country { get; set; } + public string idcls { get; set; } + public string idno { get; set; } + public string native { get; set; } + public string sex { get; set; } + public DateTime? birthday { get; set; } + public string address { get; set; } + public string postcode { get; set; } + public string occupation { get; set; } + public string appellation { get; set; } + public string nation { get; set; } + public string phone { get; set; } + public string fax { get; set; } + public string mobile { get; set; } + public string email { get; set; } + public string web { get; set; } + public string vip { get; set; } + public string sec { get; set; } + public string cropsno { get; set; } + public string cropname { get; set; } + public string fancy { get; set; } + public string remark { get; set; } + + public int amount { get; set; } + public int days { get; set; } + public decimal consume01 { get; set; } + + public decimal consume02 { get; set; } + + public decimal consume03 { get; set; } + + public decimal consume04 { get; set; } + public string log_id { get; set; } + public string log_shift { get; set; } + public DateTime? log_date { get; set; } + public string log_ip { get; set; } + public int times { get; set; } + public int logmark { get; set; } + public string rmcode { get; set; } + public string mkt { get; set; } + public string src { get; set; } + public string isowner { get; set; } + public DateTime? createdate { get; set; } + + public string PERNR { get; set; } + + public string WERKS { get; set; } + + public string ZSTATUS { get; set; } + + public string KOSTL { get; set; } + + public string ZZ_ZD { get; set; } + + public string Z_ZJ { get; set; } + + public string STELL { get; set; } + + public string STELL_NM { get; set; } + + public DateTime? ZLZRQ { get; set; } + + public string MASSN { get; set; } + + public string MNTXT { get; set; } + public string MASSG { get; set; } + public string MGTXT { get; set; } + public DateTime? logdate { get; set; } + public DateTime? updatelogdate { get; set; } + public string guestno { get; set; } + public string ZZ_KLX { get; set; } + public DateTime? DAT01 { get; set; } + } + + + public class UpdateColumnAttribute : Attribute + { + + } + + public class PkColumnAttribute : Attribute + { + + } + + + public class IgnoreColumnAttribute : Attribute + { + + } +} diff --git a/Src/Dlhis.ScheduledTask/Extensions/DbConnectionExtensions.cs b/Src/Dlhis.ScheduledTask/Extensions/DbConnectionExtensions.cs new file mode 100644 index 00000000..30da5522 --- /dev/null +++ b/Src/Dlhis.ScheduledTask/Extensions/DbConnectionExtensions.cs @@ -0,0 +1,122 @@ +using log4net; +using System.Data.SqlClient; +using System.Data; +using Dapper; +using Dlhis.ScheduledTask.Job; + +namespace Dlhis.ScheduledTask.Extensions +{ + public static class DbConnectionExtensions + { + private static readonly ILog log = LogManager.GetLogger(typeof(JinkoHrJob)); + + public static void BulkcopyInsert(this IDbConnection conn, string tableName, List data) + { + using (var bulkcopy = new SqlBulkCopy(conn as SqlConnection)) + { + bulkcopy.BatchSize = 10000; + bulkcopy.BulkCopyTimeout = 60; + bulkcopy.DestinationTableName = tableName; + var dt = ToDataTable(data); + foreach (DataColumn column in dt.Columns) + { + bulkcopy.ColumnMappings.Add(new SqlBulkCopyColumnMapping(column.ColumnName, column.ColumnName)); + } + + bulkcopy.WriteToServer(dt); + } + } + + + private static DataTable ToDataTable(List data) + { + var dt = new DataTable(); + var properties = typeof(T).GetProperties();//.Where(x => x.IsDefined(typeof(CopyAttribute), false)); + + foreach (var property in properties) + { + dt.Columns.Add(property.Name, Nullable.GetUnderlyingType(property.PropertyType) ?? property.PropertyType); + } + + foreach (var item in data) + { + var values = new object[properties.Length]; + for (int i = 0; i < properties.Length; i++) + { + if (properties[i].PropertyType == typeof(DateTime?)) + { + var o = (DateTime?)properties[i].GetValue(item); + if (!o.HasValue || o.Value == DateTime.MinValue) + { + o = new DateTime(1900, 1, 1); + } + values[i] = o; + } + else + { + var o = properties[i].GetValue(item); + values[i] = o; + } + + } + + dt.Rows.Add(values); + } + + return dt; + } + + + + public static void BulkcopyUpdate(this IDbConnection conn, string targetTableName, List data) + { + var tmpTable = "#tmp_" + targetTableName; + try + { + //go 语法错误 ??? + conn.Execute($@" +if object_id('tempdb..{tmpTable}') is not null +drop table {tmpTable}"); + + conn.Execute($@" +select * +into {tmpTable} +from {targetTableName} where 1=2 ;"); + + conn.BulkcopyInsert(tmpTable, data); + + var properties = typeof(T).GetProperties(); + var updates = properties.Where(x => !x.Name.Equals("ename")) + .Where(x => !x.Name.Equals("id")) + .Where(x => !x.Name.Equals("timeid")) + .Select(x => + { + return $"T.{x.Name}=S.{x.Name}"; + }); + + var updateScript = string.Join(",", updates); + + var merge = $@" +Merge into {targetTableName} AS T +Using {tmpTable} AS S +ON T.ename = S.ename +WHEN MATCHED +THEN UPDATE SET {updateScript} ; +"; + + conn.Execute(merge); + } + catch (Exception ex) + { + log.Error($"批量更新失败:{ex.Message}", ex); + } + finally + { + conn.Execute($@" +drop table {tmpTable} +" +); + } + } + } +} diff --git a/Src/Dlhis.ScheduledTask/Extensions/EnumerableExtensions.cs b/Src/Dlhis.ScheduledTask/Extensions/EnumerableExtensions.cs new file mode 100644 index 00000000..caa57d0c --- /dev/null +++ b/Src/Dlhis.ScheduledTask/Extensions/EnumerableExtensions.cs @@ -0,0 +1,13 @@ +namespace Dlhis.ScheduledTask.Extensions +{ + public static class EnumerableExtensions + { + public static IEnumerable> Chunk(this IEnumerable arr, int size) + { + for (var i = 0; i < arr.Count() / size + 1; i++) + { + yield return arr.Skip(i * size).Take(size); + } + } + } +} diff --git a/Src/Dlhis.ScheduledTask/Extensions/GetHashCodeExtensions.cs b/Src/Dlhis.ScheduledTask/Extensions/GetHashCodeExtensions.cs new file mode 100644 index 00000000..d0db1f4c --- /dev/null +++ b/Src/Dlhis.ScheduledTask/Extensions/GetHashCodeExtensions.cs @@ -0,0 +1,16 @@ +namespace Dlhis.ScheduledTask.Extensions +{ + internal static class GetHashCodeExtensions + { + public static int SafeGetHashCode(this object o) + { + if (o == null) return 0; + return o.GetHashCode(); + } + + public static int SafeGetHashCode(this int o) + { + return o.GetHashCode(); + } + } +} diff --git a/Src/Dlhis.ScheduledTask/Job/JinkoHrJob.cs b/Src/Dlhis.ScheduledTask/Job/JinkoHrJob.cs new file mode 100644 index 00000000..c4d1407c --- /dev/null +++ b/Src/Dlhis.ScheduledTask/Job/JinkoHrJob.cs @@ -0,0 +1,476 @@ +using Dlhis.ScheduledTask.Configurations; +using Dlhis.ScheduledTask.Dto; +using Dlhis.ScheduledTask.Entities; +using Dlhis.ScheduledTask.Response; +using Hangfire.Logging; +using Microsoft.AspNetCore.SignalR; +using Microsoft.Extensions.DependencyModel; +using Newtonsoft.Json; +using Serilog; +using System.Data.SqlClient; +using System.Data; +using System.Net; +using System.Net.Http.Headers; +using System.Text; +using static Dapper.SqlMapper; +using Dlhis.ScheduledTask.WsProxy; +using log4net; + +namespace Dlhis.ScheduledTask.Job +{ + public class JinkoHrJob + { + private IDisposable webApp; + private static readonly log4net.ILog log = LogManager.GetLogger(typeof(JinkoHrJob)); + const string ORG_CACHE_FILE = "org.json"; + const string POSITION_CACHE_FILE = "position.json"; + const string PERSON_CACHE_FILE = "person.json"; + + private List lastUpdatedPersonList = new List(); + private List lastUpdatedOrgList = new List(); + private List lastUpdatedPositionList = new List(); + private readonly ZHRF_SYN_01 orgClient; + private readonly ZHRF_SYN_02 positionClient; + private readonly ZHRF_SYN_03N archivesClient; + private readonly ZHRF_SWIPE_DATA_SAVE_CLIENT dataSaveClient; + private readonly SI_DLDM2EHR_InsertRecord_OutServiceClient insertRecord_OutService; + private readonly SI_DLDM2EHR_DeleteRecord_OutServiceClient deleteRecord_OutService; + + public ServiceSettings Settings { get; } + private readonly ZHRS_WERKS[] werks; + volatile bool started = false; + public JinkoHrJob(ServiceSettings settings) + { + Settings = settings; + var list = new List(); + if (!string.IsNullOrWhiteSpace(Settings.Werks)) + { + var ss = Settings.Werks.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + foreach (var w in ss) + { + list.Add(new ZHRS_WERKS() { WERKS = w }); + } + werks = list.ToArray(); + } + else + { + werks = Array.Empty(); + } + orgClient = new ZHRF_SYN_01() + { + Url = Settings.ServerUrl + "/sap/bc/srt/rfc/sap/zhrf_syn_01/800/zhrf_syn_01/zhrf_syn_01", + Credentials = new NetworkCredential(Settings.UserName, Settings.Password), + Timeout = 10000000, + }; + positionClient = new ZHRF_SYaN_02() + { + Url = Settings.ServerUrl + "/sap/bc/srt/rfc/sap/zhrf_syn_02/800/zhrf_syn_02/zhrf_syn_02", + Credentials = new NetworkCredential(Settings.UserName, Settings.Password), + Timeout = 10000000 + }; + + archivesClient = new ZHRF_SYN_03N() + { + Url = Settings.ServerUrl + "/sap/bc/srt/rfc/sap/zhrf_syn_03n/800/zhrf_syn_03n/zhrf_syn_03n", + Credentials = new NetworkCredential(Settings.UserName, Settings.Password), + Timeout = 10000000 + }; + + dataSaveClient = new ZHRF_SWIPE_DATA_SAVE_CLIENT() + { + Credentials = new NetworkCredential(Settings.UserName, Settings.Password), + Url = settings.AttendanceUploadUrl, + Timeout = 10000000 + }; + } + + 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 persons = new List(); + + foreach (var item in werks) + { + try + { + var body = new + { + T_WERKS = new + { + item = new List + { + new + { + item.WERKS + } + } + }, + T_PERSON = Array.Empty(), + T_PNO = Array.Empty(), + }; + 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(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(), + // T_PNO = Array.Empty(), + // 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 GetModifiedPerson(List 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 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($"select ename from gainfo_sap where ename in ( {string.Join(",", searchCodes.Select(x => $"'{x}'"))} )") + // .ToList(); + + var existsWorkCodes = conn.Queryable() + .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().Any(it => it.IdNO == item.idno)) + { + // 如果存在,执行更新逻辑 + UpdateGainfo(item); + } + else + { + // 如果不存在,执行插入逻辑 + InsertGainfo(item); + } + } + // 更新 Gainfo 表的方法 + private void UpdateGainfo(GainfoSap item) + { + // 此处需要编写更新 Gainfo 表的具体逻辑 + // 根据业务需求更新相应的字段 + // 这里仅为演示,需要替换为实际逻辑 + db.Updateable().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 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) + { + // 获取 accnt + string accnt = GetAccnt(); + + // 检查是否存在相同 idno 的记录 + var existingRecord = db.Queryable().FirstOrDefault(a => a.idno == updatedItem.idno); + + if (existingRecord != null) + { + // 更新已存在的记录的字段 + db.Updateable() + .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().Any(b => b.idno == updatedItem.idno && b.pernr != updatedItem.pernr && b.isowner == "T") + && !db.Queryable().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(File.ReadAllText("C:\\Users\\79144\\Desktop\\request.json")); // GetPersons(); + var personResp = GetPersons();// JsonConvert.DeserializeObject(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); + } + } + + private IDbConnection OpenDlDbConnection() + { + try + { + IDbConnection conn = new SqlConnection(Settings.DlhisDatabase); + if (conn.State != ConnectionState.Open) + { + conn.Open(); + } + return conn; + } + catch (Exception ex) + { + throw new Exception($"打开迪联数据库错误:{ex.Message}", ex); + } + } + } + +} diff --git a/Src/Dlhis.ScheduledTask/Response/PersonResult.cs b/Src/Dlhis.ScheduledTask/Response/PersonResult.cs new file mode 100644 index 00000000..2464d1de --- /dev/null +++ b/Src/Dlhis.ScheduledTask/Response/PersonResult.cs @@ -0,0 +1,12 @@ +using Dlhis.ScheduledTask.Dto; + +namespace Dlhis.ScheduledTask.Response +{ + public class PersonResult + { + /// + /// + /// + public T_PERSON T_PERSON { get; set; } + } +} diff --git a/Src/Dlhis.ScheduledTask/SqlGeneration.cs b/Src/Dlhis.ScheduledTask/SqlGeneration.cs new file mode 100644 index 00000000..da1e0068 --- /dev/null +++ b/Src/Dlhis.ScheduledTask/SqlGeneration.cs @@ -0,0 +1,34 @@ +using System.Linq; +using Dlhis.ScheduledTask.Entities; + +namespace Dlhis +{ + public class SqlGeneration + { + private static string _insertSql; + private static string _updateSql; + + static SqlGeneration() + { + //"" + var properties = typeof(GainfoSap).GetProperties(); + + var insertFields = properties + .Where(x => !x.IsDefined(typeof(IgnoreColumnAttribute), false)) + .Where(x => !x.IsDefined(typeof(PkColumnAttribute), false)) + .Select(x => x.Name); + _insertSql = $" insert into gainfo_sap({string.Join(",", insertFields)}) \r\n values \r\n ({string.Join(",", insertFields.Select(x => $"@{x}"))})"; + + var updateFields = properties + .Where(x => !x.IsDefined(typeof(IgnoreColumnAttribute), false)) + .Where(x => !x.IsDefined(typeof(PkColumnAttribute), false)) + .Where(x => !x.IsDefined(typeof(UpdateColumnAttribute), false)) + .Select(x => x.Name); + _updateSql = $" update gainfo_sap set {string.Join(",", updateFields.Select(x => $"{x}=@{x}"))} \t\n where ename=@ename"; + } + + public static string InsertSql => _insertSql; + public static string UpdateSql => _updateSql; + } +} + diff --git a/Src/Dlhis.ScheduledTask/WsProxy/SI_DLDM2EHR_DeleteRecord_OutServiceClient.cs b/Src/Dlhis.ScheduledTask/WsProxy/SI_DLDM2EHR_DeleteRecord_OutServiceClient.cs new file mode 100644 index 00000000..1c4a801d --- /dev/null +++ b/Src/Dlhis.ScheduledTask/WsProxy/SI_DLDM2EHR_DeleteRecord_OutServiceClient.cs @@ -0,0 +1,281 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +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 +{ + /// + [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; + + /// + 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"; + } + + /// + public event SI_DLDM2EHR_DeleteRecord_OutCompletedEventHandler SI_DLDM2EHR_DeleteRecord_OutCompleted; + + /// + [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])); + } + + /// + 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); + } + + /// + public DT_DeleteRecord_ResponseT_DATA[] EndSI_DLDM2EHR_DeleteRecord_Out(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((DT_DeleteRecord_ResponseT_DATA[])(results[0])); + } + + /// + public void SI_DLDM2EHR_DeleteRecord_OutAsync(DT_DeleteRecord_RequestT_DATA[] MT_DeleteRecord_Request) + { + this.SI_DLDM2EHR_DeleteRecord_OutAsync(MT_DeleteRecord_Request, null); + } + + /// + 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)); + } + } + + /// + public new void CancelAsync(object userState) + { + base.CancelAsync(userState); + } + } + + /// + [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; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZWORKCODE + { + get + { + return this.zWORKCODEField; + } + set + { + this.zWORKCODEField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string SUBTY + { + get + { + return this.sUBTYField; + } + set + { + this.sUBTYField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string BEGDA + { + get + { + return this.bEGDAField; + } + set + { + this.bEGDAField = value; + } + } + } + + /// + [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; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZWORKCODE + { + get + { + return this.zWORKCODEField; + } + set + { + this.zWORKCODEField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string SUBTY + { + get + { + return this.sUBTYField; + } + set + { + this.sUBTYField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string BEGDA + { + get + { + return this.bEGDAField; + } + set + { + this.bEGDAField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string MSGTY + { + get + { + return this.mSGTYField; + } + set + { + this.mSGTYField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string MSGTX + { + get + { + return this.mSGTXField; + } + set + { + this.mSGTXField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")] + public delegate void SI_DLDM2EHR_DeleteRecord_OutCompletedEventHandler(object sender, SI_DLDM2EHR_DeleteRecord_OutCompletedEventArgs e); + + /// + [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; + } + + /// + public DT_DeleteRecord_ResponseT_DATA[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((DT_DeleteRecord_ResponseT_DATA[])(this.results[0])); + } + } + } +} + diff --git a/Src/Dlhis.ScheduledTask/WsProxy/SI_DLDM2EHR_InsertRecord_OutServiceClient.cs b/Src/Dlhis.ScheduledTask/WsProxy/SI_DLDM2EHR_InsertRecord_OutServiceClient.cs new file mode 100644 index 00000000..8ffca1f3 --- /dev/null +++ b/Src/Dlhis.ScheduledTask/WsProxy/SI_DLDM2EHR_InsertRecord_OutServiceClient.cs @@ -0,0 +1,313 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +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 +{ + + + /// + [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; + + /// + 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"; + } + + /// + public event SI_DLDM2EHR_InsertRecord_OutCompletedEventHandler SI_DLDM2EHR_InsertRecord_OutCompleted; + + /// + [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])); + } + + /// + 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); + } + + /// + public DT_InsertRecord_ResponseT_DATA[] EndSI_DLDM2EHR_InsertRecord_Out(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((DT_InsertRecord_ResponseT_DATA[])(results[0])); + } + + /// + public void SI_DLDM2EHR_InsertRecord_OutAsync(DT_InsertRecord_RequestT_DATA[] MT_InsertRecord_Request) + { + this.SI_DLDM2EHR_InsertRecord_OutAsync(MT_InsertRecord_Request, null); + } + + /// + 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)); + } + } + + /// + public new void CancelAsync(object userState) + { + base.CancelAsync(userState); + } + } + + /// + [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; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZWORKCODE + { + get + { + return this.zWORKCODEField; + } + set + { + this.zWORKCODEField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string SUBTY + { + get + { + return this.sUBTYField; + } + set + { + this.sUBTYField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string BEGDA + { + get + { + return this.bEGDAField; + } + set + { + this.bEGDAField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string BETRG + { + get + { + return this.bETRGField; + } + set + { + this.bETRGField = value; + } + } + } + + /// + [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; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZWORKCODE + { + get + { + return this.zWORKCODEField; + } + set + { + this.zWORKCODEField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string SUBTY + { + get + { + return this.sUBTYField; + } + set + { + this.sUBTYField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string BEGDA + { + get + { + return this.bEGDAField; + } + set + { + this.bEGDAField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string BETRG + { + get + { + return this.bETRGField; + } + set + { + this.bETRGField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string MSGTY + { + get + { + return this.mSGTYField; + } + set + { + this.mSGTYField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string MSGTX + { + get + { + return this.mSGTXField; + } + set + { + this.mSGTXField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")] + public delegate void SI_DLDM2EHR_InsertRecord_OutCompletedEventHandler(object sender, SI_DLDM2EHR_InsertRecord_OutCompletedEventArgs e); + + /// + [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; + } + + /// + public DT_InsertRecord_ResponseT_DATA[] Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((DT_InsertRecord_ResponseT_DATA[])(this.results[0])); + } + } + } + } + diff --git a/Src/Dlhis.ScheduledTask/WsProxy/SI_DLDM2EHR_SavePhoto_OutServiceClient.cs b/Src/Dlhis.ScheduledTask/WsProxy/SI_DLDM2EHR_SavePhoto_OutServiceClient.cs new file mode 100644 index 00000000..378ab16a --- /dev/null +++ b/Src/Dlhis.ScheduledTask/WsProxy/SI_DLDM2EHR_SavePhoto_OutServiceClient.cs @@ -0,0 +1,216 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +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 +{ + /// + [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; + + /// + 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"; + } + + /// + public event SI_DLDM2EHR_SavePhoto_OutCompletedEventHandler SI_DLDM2EHR_SavePhoto_OutCompleted; + + /// + [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])); + } + + /// + 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); + } + + /// + public DT_SavePhoto_Response EndSI_DLDM2EHR_SavePhoto_Out(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((DT_SavePhoto_Response)(results[0])); + } + + /// + public void SI_DLDM2EHR_SavePhoto_OutAsync(DT_SavePhoto_Request MT_SavePhoto_Request) + { + this.SI_DLDM2EHR_SavePhoto_OutAsync(MT_SavePhoto_Request, null); + } + + /// + 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)); + } + } + + /// + public new void CancelAsync(object userState) + { + base.CancelAsync(userState); + } + } + + /// + [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; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string I_WORKCODE + { + get + { + return this.i_WORKCODEField; + } + set + { + this.i_WORKCODEField = value; + } + } + + /// + [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; + } + } + } + + /// + [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; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string OLX + { + get + { + return this.oLXField; + } + set + { + this.oLXField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string OMS + { + get + { + return this.oMSField; + } + set + { + this.oMSField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.7.2053.0")] + public delegate void SI_DLDM2EHR_SavePhoto_OutCompletedEventHandler(object sender, SI_DLDM2EHR_SavePhoto_OutCompletedEventArgs e); + + /// + [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; + } + + /// + public DT_SavePhoto_Response Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((DT_SavePhoto_Response)(this.results[0])); + } + } + } + +} \ No newline at end of file diff --git a/Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SWIPE_DATA_SAVE_CLIENT.cs b/Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SWIPE_DATA_SAVE_CLIENT.cs new file mode 100644 index 00000000..1879c084 --- /dev/null +++ b/Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SWIPE_DATA_SAVE_CLIENT.cs @@ -0,0 +1,291 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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 +{ + /// + // 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; + + /// + 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"; + } + + /// + public event CallZHRF_SWIPE_DATA_SAVECompletedEventHandler CallZHRF_SWIPE_DATA_SAVECompleted; + + /// + [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])); + } + + /// + 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); + } + + /// + public ZHRF_SWIPE_DATA_SAVEResponse EndCallZHRF_SWIPE_DATA_SAVE(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ZHRF_SWIPE_DATA_SAVEResponse)(results[0])); + } + + /// + public void CallZHRF_SWIPE_DATA_SAVEAsync(ZHRF_SWIPE_DATA_SAVE ZHRF_SWIPE_DATA_SAVE) + { + this.CallZHRF_SWIPE_DATA_SAVEAsync(ZHRF_SWIPE_DATA_SAVE, null); + } + + /// + 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)); + } + } + + /// + public new void CancelAsync(object userState) + { + base.CancelAsync(userState); + } + } + + /// + [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; + + /// + [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; + } + } + } + + /// + [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; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZWORKCODE + { + get + { + return this.zWORKCODEField; + } + set + { + this.zWORKCODEField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZDATE + { + get + { + return this.zDATEField; + } + set + { + this.zDATEField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public System.String ZTIME + { + get + { + return this.zTIMEField; + } + set + { + this.zTIMEField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZNOTE + { + get + { + return this.zNOTEField; + } + set + { + this.zNOTEField = value; + } + } + } + + /// + [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; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string OLX + { + get + { + return this.oLXField; + } + set + { + this.oLXField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string OMS + { + get + { + return this.oMSField; + } + set + { + this.oMSField = value; + } + } + + /// + [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; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")] + public delegate void CallZHRF_SWIPE_DATA_SAVECompletedEventHandler(object sender, CallZHRF_SWIPE_DATA_SAVECompletedEventArgs e); + + /// + [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; + } + + /// + public ZHRF_SWIPE_DATA_SAVEResponse Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ZHRF_SWIPE_DATA_SAVEResponse)(this.results[0])); + } + } + } +} diff --git a/Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SYN_01.cs b/Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SYN_01.cs new file mode 100644 index 00000000..80e0247f --- /dev/null +++ b/Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SYN_01.cs @@ -0,0 +1,259 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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 +{ + /// + // 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; + + /// + 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"; + } + + /// + public event CallZHRF_SYN_01CompletedEventHandler CallZHRF_SYN_01Completed; + + /// + [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])); + } + + /// + 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); + } + + /// + public ZHRF_SYN_01Response EndCallZHRF_SYN_01(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ZHRF_SYN_01Response)(results[0])); + } + + /// + public void CallZHRF_SYN_01Async(ZHRF_SYN_011 ZHRF_SYN_01) + { + this.CallZHRF_SYN_01Async(ZHRF_SYN_01, null); + } + + /// + 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)); + } + } + + /// + public new void CancelAsync(object userState) + { + base.CancelAsync(userState); + } + } + + /// + [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; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string I_DATE + { + get + { + return this.i_DATEField; + } + set + { + this.i_DATEField = value; + } + } + + /// + [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; + } + } + } + + /// + [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; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string OBJID + { + get + { + return this.oBJIDField; + } + set + { + this.oBJIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string STEXT + { + get + { + return this.sTEXTField; + } + set + { + this.sTEXTField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string SOBID + { + get + { + return this.sOBIDField; + } + set + { + this.sOBIDField = value; + } + } + } + + /// + [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; + + /// + [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; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")] + public delegate void CallZHRF_SYN_01CompletedEventHandler(object sender, CallZHRF_SYN_01CompletedEventArgs e); + + /// + [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; + } + + /// + public ZHRF_SYN_01Response Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ZHRF_SYN_01Response)(this.results[0])); + } + } + } +} \ No newline at end of file diff --git a/Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SYN_02.cs b/Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SYN_02.cs new file mode 100644 index 00000000..c276d3a6 --- /dev/null +++ b/Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SYN_02.cs @@ -0,0 +1,275 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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 +{ + /// + // 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; + + /// + 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"; + } + + /// + public event CallZHRF_SYN_02CompletedEventHandler CallZHRF_SYN_02Completed; + + /// + [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])); + } + + /// + 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); + } + + /// + public ZHRF_SYN_02Response EndCallZHRF_SYN_02(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ZHRF_SYN_02Response)(results[0])); + } + + /// + public void CallZHRF_SYN_02Async(ZHRF_SYN_021 ZHRF_SYN_02) + { + this.CallZHRF_SYN_02Async(ZHRF_SYN_02, null); + } + + /// + 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)); + } + } + + /// + public new void CancelAsync(object userState) + { + base.CancelAsync(userState); + } + } + + /// + [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; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string I_DATE + { + get + { + return this.i_DATEField; + } + set + { + this.i_DATEField = value; + } + } + + /// + [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; + } + } + } + + /// + [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; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZJOBID + { + get + { + return this.zJOBIDField; + } + set + { + this.zJOBIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZJOBNAME + { + get + { + return this.zJOBNAMEField; + } + set + { + this.zJOBNAMEField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZJOBACTID + { + get + { + return this.zJOBACTIDField; + } + set + { + this.zJOBACTIDField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZDEPID + { + get + { + return this.zDEPIDField; + } + set + { + this.zDEPIDField = value; + } + } + } + + /// + [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; + + /// + [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; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")] + public delegate void CallZHRF_SYN_02CompletedEventHandler(object sender, CallZHRF_SYN_02CompletedEventArgs e); + + /// + [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; + } + + /// + public ZHRF_SYN_02Response Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ZHRF_SYN_02Response)(this.results[0])); + } + } + } +} diff --git a/Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SYN_03N.cs b/Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SYN_03N.cs new file mode 100644 index 00000000..d85e7a28 --- /dev/null +++ b/Src/Dlhis.ScheduledTask/WsProxy/ZHRF_SYN_03N.cs @@ -0,0 +1,855 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +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 +{ + + /// + // 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 + { + + private System.Threading.SendOrPostCallback ZHRF_SYN_03OperationCompleted; + + /// + public ZHRF_SYN_03N() + { + this.Url = "http://172.16.7.58:8125/sap/bc/srt/rfc/sap/zhrf_syn_03n/800/zhrf_syn" + + "_03n/zhrf_syn_03n"; + } + + /// + public event ZHRF_SYN_03CompletedEventHandler ZHRF_SYN_03Completed; + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:sap-com:document:sap:rfc:functions:ZHRF_SYN_03N:ZHRF_SYN_03Request", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Bare)] + [return: System.Xml.Serialization.XmlElementAttribute("ZHRF_SYN_03Response", Namespace = "urn:sap-com:document:sap:rfc:functions")] + public ZHRF_SYN_03Response ZHRF_SYN_03([System.Xml.Serialization.XmlElementAttribute("ZHRF_SYN_03", Namespace = "urn:sap-com:document:sap:rfc:functions")] ZHRF_SYN_03 ZHRF_SYN_031) + { + object[] results = this.Invoke("ZHRF_SYN_03", new object[] { + ZHRF_SYN_031}); + return ((ZHRF_SYN_03Response)(results[0])); + } + + /// + public System.IAsyncResult BeginZHRF_SYN_03(ZHRF_SYN_03 ZHRF_SYN_031, System.AsyncCallback callback, object asyncState) + { + return this.BeginInvoke("ZHRF_SYN_03", new object[] { + ZHRF_SYN_031}, callback, asyncState); + } + + /// + public ZHRF_SYN_03Response EndZHRF_SYN_03(System.IAsyncResult asyncResult) + { + object[] results = this.EndInvoke(asyncResult); + return ((ZHRF_SYN_03Response)(results[0])); + } + + /// + public void ZHRF_SYN_03Async(ZHRF_SYN_03 ZHRF_SYN_031) + { + this.ZHRF_SYN_03Async(ZHRF_SYN_031, null); + } + + /// + public void ZHRF_SYN_03Async(ZHRF_SYN_03 ZHRF_SYN_031, object userState) + { + if ((this.ZHRF_SYN_03OperationCompleted == null)) + { + this.ZHRF_SYN_03OperationCompleted = new System.Threading.SendOrPostCallback(this.OnZHRF_SYN_03OperationCompleted); + } + this.InvokeAsync("ZHRF_SYN_03", new object[] { + ZHRF_SYN_031}, this.ZHRF_SYN_03OperationCompleted, userState); + } + + private void OnZHRF_SYN_03OperationCompleted(object arg) + { + if ((this.ZHRF_SYN_03Completed != null)) + { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.ZHRF_SYN_03Completed(this, new ZHRF_SYN_03CompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) + { + base.CancelAsync(userState); + } + } + + /// + [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_03 + { + + private string i_DATEField; + + private ZHRS_PERSON[] t_PERSONField; + + private ZHRS_PNO[] t_PNOField; + + private ZHRS_WERKS[] t_WERKSField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string I_DATE + { + get + { + return this.i_DATEField; + } + set + { + this.i_DATEField = value; + } + } + + /// + [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_PERSON[] T_PERSON + { + get + { + return this.t_PERSONField; + } + set + { + this.t_PERSONField = value; + } + } + + /// + [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_PNO[] T_PNO + { + get + { + return this.t_PNOField; + } + set + { + this.t_PNOField = value; + } + } + + /// + [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_WERKS[] T_WERKS + { + get + { + return this.t_WERKSField; + } + set + { + this.t_WERKSField = value; + } + } + } + + /// + [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_PERSON + { + + private string pERNRField; + + private string wERKSField; + + private string oRGEHField; + + private string pLANSField; + + private string zZ_SJGHField; + + private string zZ_AQJBField; + + private string nAMEField; + + private string gESCHField; + + private string gBDATField; + + private string zZ_SFZHField; + + private string zTELEField; + + private string zWORKCODEField; + + private string zMOBILEField; + + private string zEMAILField; + + private string zSTATUSField; + private string zZZ_XSQYField; + private string zKOSTLField; + private string zZZ_ZDField; + private string zZ_ZJField; + private string zZRZRQField; + private string zZLZRQField; + private string zMASSGField; + private string zMGTXTField; + + private string zBEGDAField; + + private string zENDDAField; + + private string zSTELLField; + + private string zSTELL_NMField; + + private string zZADZHField; + + private string zSTAT2Field; + + private string zZCJRQField; + + private string zZZZRQField; + + private string zMASSNField; + + private string zMNTXTField; + + private string zXUELIField; + + private string zZ_KLXField; + + + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string PERNR + { + get + { + return this.pERNRField; + } + set + { + this.pERNRField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string WERKS + { + get + { + return this.wERKSField; + } + set + { + this.wERKSField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ORGEH + { + get + { + return this.oRGEHField; + } + set + { + this.oRGEHField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string PLANS + { + get + { + return this.pLANSField; + } + set + { + this.pLANSField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZZ_SJGH + { + get + { + return this.zZ_SJGHField; + } + set + { + this.zZ_SJGHField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZZ_AQJB + { + get + { + return this.zZ_AQJBField; + } + set + { + this.zZ_AQJBField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string NAME + { + get + { + return this.nAMEField; + } + set + { + this.nAMEField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string GESCH + { + get + { + return this.gESCHField; + } + set + { + this.gESCHField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string GBDAT + { + get + { + return this.gBDATField; + } + set + { + this.gBDATField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZZ_SFZH + { + get + { + return this.zZ_SFZHField; + } + set + { + this.zZ_SFZHField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZTELE + { + get + { + return this.zTELEField; + } + set + { + this.zTELEField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZWORKCODE + { + get + { + return this.zWORKCODEField; + } + set + { + this.zWORKCODEField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZMOBILE + { + get + { + return this.zMOBILEField; + } + set + { + this.zMOBILEField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZEMAIL + { + get + { + return this.zEMAILField; + } + set + { + this.zEMAILField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZSTATUS + { + get + { + return this.zSTATUSField; + } + set + { + this.zSTATUSField = value; + } + } + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZZ_XSQY + { + get + { + return this.zZZ_XSQYField; + } + set + { + this.zZZ_XSQYField = value; + } + } + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string KOSTL + { + get + { + return this.zKOSTLField; + } + set + { + this.zKOSTLField = value; + } + } + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZZ_ZD + { + get + { + return this.zZZ_ZDField; + } + set + { + this.zZZ_ZDField = value; + } + } + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + /// + public string Z_ZJ + { + get + { + return this.zZ_ZJField; + } + set + { + this.zZ_ZJField = value; + } + } + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZRZRQ + { + get + { + return this.zZRZRQField; + } + set + { + this.zZRZRQField = value; + } + } + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZLZRQ + { + get + { + return this.zZLZRQField; + } + set + { + this.zZLZRQField = value; + } + } + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string MASSG + { + get + { + return this.zMASSGField; + } + set + { + this.zMASSGField = value; + } + } + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string MGTXT + { + get + { + return this.zMGTXTField; + } + set + { + this.zMGTXTField = value; + } + } + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string BEGDA + { + get + { + return zBEGDAField; + } + set + { + zBEGDAField = value; + } + } + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ENDDA + { + get + { + return zENDDAField; + } + set + { + zENDDAField = value; + } + } + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string STELL + { + get + { + return zSTELLField; + } + set + { + zSTELLField = value; + } + } + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string STELL_NM + { + get + { + return zSTELL_NMField; + } + set + { + zSTELL_NMField = value; + } + } + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZADZH + { + get + { + return zZADZHField; + } + set + { + zZADZHField = value; + } + } + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string STAT2 + { + get + { + return zSTAT2Field; + } + set + { + zSTAT2Field = value; + } + } + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZCJRQ + { + get + { + return zZCJRQField; + } + set + { + zZCJRQField = value; + } + } + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZZZRQ + { + get + { + return zZZZRQField; + } + set + { + zZZZRQField = value; + } + } + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string MASSN + { + get + { + return zMASSNField; + } + set + { + zMASSNField = value; + } + } + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string MNTXT + { + get + { + return zMNTXTField; + } + set + { + zMNTXTField = value; + } + } + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZXUELI + { + get + { + return zXUELIField; + } + set + { + zXUELIField = value; + } + } + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZZ_KLX + { + get + { + return zZ_KLXField; + } + set + { + zZ_KLXField = value; + } + } + } + + /// + [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_WERKS + { + + private string wERKSField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string WERKS + { + get + { + return this.wERKSField; + } + set + { + this.wERKSField = value; + } + } + } + + /// + [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_PNO + { + + private string zWORKCODEField; + + /// + [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] + public string ZWORKCODE + { + get + { + return this.zWORKCODEField; + } + set + { + this.zWORKCODEField = value; + } + } + } + + /// + [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_03Response + { + + private ZHRS_PERSON[] t_PERSONField; + + private ZHRS_PNO[] t_PNOField; + + private ZHRS_WERKS[] t_WERKSField; + + /// + [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_PERSON[] T_PERSON + { + get + { + return this.t_PERSONField; + } + set + { + this.t_PERSONField = value; + } + } + + /// + [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_PNO[] T_PNO + { + get + { + return this.t_PNOField; + } + set + { + this.t_PNOField = value; + } + } + + /// + [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_WERKS[] T_WERKS + { + get + { + return this.t_WERKSField; + } + set + { + this.t_WERKSField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")] + public delegate void ZHRF_SYN_03CompletedEventHandler(object sender, ZHRF_SYN_03CompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ZHRF_SYN_03CompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs + { + + private object[] results; + + internal ZHRF_SYN_03CompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) + { + this.results = results; + } + + /// + public ZHRF_SYN_03Response Result + { + get + { + this.RaiseExceptionIfNecessary(); + return ((ZHRF_SYN_03Response)(this.results[0])); + } + } + } +} \ No newline at end of file diff --git a/Src/Dlhis.ScheduledTask/WsProxy/ZHRS_ORG.cs b/Src/Dlhis.ScheduledTask/WsProxy/ZHRS_ORG.cs new file mode 100644 index 00000000..1eab7b6b --- /dev/null +++ b/Src/Dlhis.ScheduledTask/WsProxy/ZHRS_ORG.cs @@ -0,0 +1,25 @@ +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 + { + 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(); + } +} diff --git a/Src/Dlhis.ScheduledTask/WsProxy/ZHRS_PERSON.cs b/Src/Dlhis.ScheduledTask/WsProxy/ZHRS_PERSON.cs new file mode 100644 index 00000000..a38345e1 --- /dev/null +++ b/Src/Dlhis.ScheduledTask/WsProxy/ZHRS_PERSON.cs @@ -0,0 +1,61 @@ +//using System; + +//namespace Dlhis.ScheduledTask.WsProxy +//{ +// public partial class ZHRS_PERSON : IEquatable +// { +// 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(); +// } +//} diff --git a/Src/Dlhis.ScheduledTask/WsProxy/ZHRS_POST.cs b/Src/Dlhis.ScheduledTask/WsProxy/ZHRS_POST.cs new file mode 100644 index 00000000..790f5eda --- /dev/null +++ b/Src/Dlhis.ScheduledTask/WsProxy/ZHRS_POST.cs @@ -0,0 +1,25 @@ +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 + { + 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(); + } +} diff --git a/Src/Dlhis.ScheduledTask/WsProxy/ZHR_OA_O_WORK_CARD_INFO.cs b/Src/Dlhis.ScheduledTask/WsProxy/ZHR_OA_O_WORK_CARD_INFO.cs new file mode 100644 index 00000000..f18da156 --- /dev/null +++ b/Src/Dlhis.ScheduledTask/WsProxy/ZHR_OA_O_WORK_CARD_INFO.cs @@ -0,0 +1,139 @@ +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 +{ + /// + /// 获取图片 + /// + public class ZHR_OA_O_WORK_CARD_INFO + { + private static readonly log4net.ILog log = LogManager.GetLogger(typeof(ZHR_OA_O_WORK_CARD_INFO)); + + /// + /// 获取员工卡片信息 + /// + public List Get_ZHR_OA_O_WORK_CARD_INFO(string url, string userName, string password, List workcode) + { + List list = new List(); + try + { + if (workcode == null || workcode.Count == 0) return list; + + + List> workcodes = new List>(); + foreach (var item in workcode) + { + var dictitem = new Dictionary + { + { "WORKCODE", item } + }; + workcodes.Add(dictitem); + } + Dictionary dictitems = new Dictionary + { + { "item", workcodes } + }; + Dictionary IT_PERSON = new Dictionary + { + { "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(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); + } + } + + /// + /// Base64编码 + /// + /// + /// 默认UTF8 + /// + 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; + } + } +} +