feat 人事同步

This commit is contained in:
cheche
2024-01-04 14:40:04 +08:00
parent bb7765ab1f
commit 3d665259b3
25 changed files with 4044 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<!--接口服务器地址 后面不要带 "/"-->
<add key="ServerUrl" value="http://172.16.7.58:8125"/>
<!--接口登录用户名-->
<add key="UserName" value="admin_ws"/>
<!--接口登录密码-->
<add key="Password" value="jinkohr@2017"/>
<!--同步人事信息时间-->
<add key="SyncTime" value="00:00"/>
<!--考勤记录上传间隔-->
<add key="AttendanceUploadInterval" value="30"/>
<!--考勤记录上传间隔-->
<add key="AttendanceUploadUrl" value="http://172.16.7.110:8121/sap/bc/srt/wsdl/flv_10002A111AD1/bndg_url/sap/bc/srt/rfc/sap/zhrf_swipe_data_saven/210/zhrf_swipe_data_save/zhrf_swipe_data_save?sap-client=210"/>
<!--迪联数据库连接-->
<add key="DlhisDatabase" value="server=192.168.199.124,32634;uid=sa;pwd=@Z!123456;database=test;"/>
<add key="Werks" value="aaa,bbb"/>
<!--人事信息开始同步日期-->
<add key="BeginSyncDate" value="2020-5-1"/>
<!--HTTP api 监听端口-->
<add key="ApiPort" value="8099"/>
<add key="EHRWebServiceUserName" value="mes_wsuser"/>
<add key="EHRWebServicePassword" value="pid12345"/>
<add key="EHRInsertRecordApiUrl" value="http://172.16.7.70:50000/dir/wsdl?p=ic/0dba887338dd39cebd17fdf55f2f8430"/>
<add key="EHRDeleteRecordApiUrl" value="http://172.16.7.70:50000/dir/wsdl?p=ic/d8b0cfae38313211a93cb5d813ea0062"/>
<add key="EHRSavePhotoApiUrl" value="http://172.16.7.70:50000/XISOAPAdapter/MessageServlet?senderParty=&amp;senderService=DLDM&amp;receiverParty=&amp;receiverService=&amp;interface=SI_DLDM2EHR_InsertRecord_Out&amp;interfaceNamespace=urn%3Ajinkosolar.com%3Adldm%3Aehr_insert_record"/>
<add key="EHR_GET_WORK_CARD_INFOApiUrl" value="http://sappipap01.jinkosolar.cn:50100/RESTAdapter/Rest/EHR_GET_WORK_CARD_INFO/"/>
<!--获取员工卡片信息-->
<add key="RestUserName" value="DL_USER"/>
<add key="RestPassword" value="MWLnaIbGtI9Q4N"/>
<!--RESULT 账号与密码-->
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<!--
PERNR NUMC 人员号
WERKS CHAR 人事范围
ORGEH NUMC 组织单位
PLANS NUMC 岗位
ZZ_SJGH CHAR 直接上级工号
ZZ_AQJB CHAR 安全级别
NAME CHAR 姓名
GESCH CHAR 性别代码
GBDAT DATS 出生日期
ZZ_SFZH CHAR 身份证号码
ZTELE CHAR 座机号
ZWORKCODE CHAR OA工号
ZMOBILE CHAR 手机
ZEMAIL CHAR 电子邮件
ZSTATUS CHAR 状态
-->

View File

@@ -0,0 +1,22 @@
using Dlhis.ScheduledTask.Extensions;
using Dlhis.ScheduledTask.WsProxy;
namespace Dlhis.ScheduledTask.Comparers
{
internal class ZHRS_ORGComparer : IEqualityComparer<ZHRS_ORG>
{
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();
}
}
}

View File

@@ -0,0 +1,92 @@
using Dlhis.ScheduledTask.Dto;
using Dlhis.ScheduledTask.Extensions;
using System.Text;
namespace Dlhis.ScheduledTask
{
internal class ZHRS_PERSONComparer : IEqualityComparer<PersonDetail>
{
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;
}
}
}

View File

@@ -0,0 +1,21 @@
using Dlhis.ScheduledTask.WsProxy;
namespace Dlhis.ScheduledTask.Comparers
{
internal class ZHRS_POSTComparer : IEqualityComparer<ZHRS_POST>
{
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();
}
}
}

View File

@@ -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; }
/// <summary>
/// 获取员工卡片信息RESUT地址
/// </summary>
public string EHR_GET_WORK_CARD_INFOApiUrl { get; set; }
/// <summary>
/// REST账号
/// </summary>
public string RestUserName { get; set; }
/// <summary>
/// REST密码
/// </summary>
public string RestPassword { get; set; }
public ServiceSettings()
{
ServerUrl = ConfigurationManager.AppSettings[nameof(ServerUrl)];
UserName = ConfigurationManager.AppSettings[nameof(UserName)];
Password = ConfigurationManager.AppSettings[nameof(Password)];
SyncTime = ConfigurationManager.AppSettings[nameof(SyncTime)];
DlhisDatabase = ConfigurationManager.AppSettings[nameof(DlhisDatabase)];
AttendanceUploadUrl = ConfigurationManager.AppSettings[nameof(AttendanceUploadUrl)];
AttendanceUploadInterval = SafeParseInt(ConfigurationManager.AppSettings[nameof(AttendanceUploadInterval)]);
Werks = ConfigurationManager.AppSettings[nameof(Werks)];
BeginSyncDate = SafeParseDate(ConfigurationManager.AppSettings[nameof(BeginSyncDate)], DateTime.Today);
ApiPort = SafeParseInt(ConfigurationManager.AppSettings[nameof(ApiPort)], 8099);
EHRWebServiceUserName = ConfigurationManager.AppSettings[nameof(EHRWebServiceUserName)];
EHRWebServicePassword = ConfigurationManager.AppSettings[nameof(EHRWebServicePassword)];
EHRInsertRecordApiUrl = ConfigurationManager.AppSettings[nameof(EHRInsertRecordApiUrl)];
EHRDeleteRecordApiUrl = ConfigurationManager.AppSettings[nameof(EHRDeleteRecordApiUrl)];
EHRSavePhotoApiUrl = ConfigurationManager.AppSettings[nameof(EHRSavePhotoApiUrl)];
EHR_GET_WORK_CARD_INFOApiUrl = ConfigurationManager.AppSettings[nameof(EHR_GET_WORK_CARD_INFOApiUrl)];
RestUserName = ConfigurationManager.AppSettings[nameof(RestUserName)];
RestPassword = ConfigurationManager.AppSettings[nameof(RestPassword)];
}
private static int SafeParseInt(string value, int defaultValue = 0)
{
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);
}
}
}

View File

@@ -21,6 +21,7 @@
<PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" />
<PackageReference Include="Hangfire.MySqlStorage" Version="2.0.2" />
<PackageReference Include="Kurisu.AspNetCore" Version="0.4.7" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.4" />
</ItemGroup>

View File

@@ -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; }
/// <summary>
///
/// </summary>
public string PERNR { get; set; }
/// <summary>
///
/// </summary>
public string ZWORKCODE { get; set; }
/// <summary>
///
/// </summary>
public string MASSN { get; set; }
/// <summary>
/// 数据变更
/// </summary>
public string MNTXT { get; set; }
/// <summary>
///
/// </summary>
public string MASSG { get; set; }
/// <summary>
/// 数据变更
/// </summary>
public string MGTXT { get; set; }
/// <summary>
///
/// </summary>
public string ZSTATUS { get; set; }
/// <summary>
///
/// </summary>
public string STAT2 { get; set; }
/// <summary>
///
/// </summary>
public string BEGDA { get; set; }
/// <summary>
///
/// </summary>
public string ENDDA { get; set; }
/// <summary>
///
/// </summary>
public string WERKS { get; set; }
/// <summary>
///
/// </summary>
public string PERSG { get; set; }
/// <summary>
///
/// </summary>
public string PERSK { get; set; }
/// <summary>
///
/// </summary>
public string BTRTL { get; set; }
/// <summary>
///
/// </summary>
public string ANSVH { get; set; }
/// <summary>
///
/// </summary>
public string MOABW { get; set; }
/// <summary>
///
/// </summary>
public string ORGEH { get; set; }
/// <summary>
///
/// </summary>
public string PLANS { get; set; }
/// <summary>
///
/// </summary>
public string ZZ_ZYSF { get; set; }
/// <summary>
///
/// </summary>
public string ZZ_AQJB { get; set; }
/// <summary>
///
/// </summary>
public string ZZ_ZD { get; set; }
/// <summary>
///
/// </summary>
public string ZZ_SJGH { get; set; }
/// <summary>
///
/// </summary>
public string ZZ_BGZT { get; set; }
/// <summary>
///
/// </summary>
public string Z_ZJ { get; set; }
/// <summary>
///
/// </summary>
public string ZZ_XSQY { get; set; }
/// <summary>
/// 上海
/// </summary>
public string ZZ_LOC { get; set; }
/// <summary>
///
/// </summary>
public string ZZ_COUN { get; set; }
/// <summary>
///
/// </summary>
public string ZZ_CITY { get; set; }
/// <summary>
///
/// </summary>
public string NACHN { get; set; }
/// <summary>
///
/// </summary>
public string VORNA { get; set; }
/// <summary>
///
/// </summary>
public string NAME { get; set; }
/// <summary>
///
/// </summary>
public string GESCH { get; set; }
/// <summary>
///
/// </summary>
public string GBDAT { get; set; }
/// <summary>
///
/// </summary>
public string NATIO { get; set; }
/// <summary>
///
/// </summary>
public string ZZ_QFRQ { get; set; }
/// <summary>
///
/// </summary>
public string ZMOBILE { get; set; }
/// <summary>
///
/// </summary>
public string ZEMAIL { get; set; }
/// <summary>
///
/// </summary>
public string ZADZH { get; set; }
/// <summary>
///
/// </summary>
public string ZRZRQ { get; set; }
/// <summary>
///
/// </summary>
public string DAT01 { get; set; }
/// <summary>
///
/// </summary>
public string ZCJRQ { get; set; }
/// <summary>
///
/// </summary>
public string ZZZRQ { get; set; }
/// <summary>
/// 本科
/// </summary>
public string ZXUELI { get; set; }
/// <summary>
///
/// </summary>
public string ZZ_ZPQD { get; set; }
}
public class T_PERSON
{
/// <summary>
///
/// </summary>
public List<PersonDetail> item { get; set; }
}
}

View File

@@ -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
{
}
}

View File

@@ -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<T>(this IDbConnection conn, string tableName, List<T> 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<T>(List<T> 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<T>(this IDbConnection conn, string targetTableName, List<T> 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}
"
);
}
}
}
}

View File

@@ -0,0 +1,13 @@
namespace Dlhis.ScheduledTask.Extensions
{
public static class EnumerableExtensions
{
public static IEnumerable<IEnumerable<T>> Chunk<T>(this IEnumerable<T> arr, int size)
{
for (var i = 0; i < arr.Count() / size + 1; i++)
{
yield return arr.Skip(i * size).Take(size);
}
}
}
}

View File

@@ -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();
}
}
}

View File

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

View File

@@ -0,0 +1,12 @@
using Dlhis.ScheduledTask.Dto;
namespace Dlhis.ScheduledTask.Response
{
public class PersonResult
{
/// <summary>
///
/// </summary>
public T_PERSON T_PERSON { get; set; }
}
}

View File

@@ -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;
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,855 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
//
// This source code was auto-generated by wsdl, Version=4.6.1055.0.
//
namespace Dlhis.ScheduledTask.WsProxy
{
/// <remarks/>
// CODEGEN: The optional WSDL extension element 'Policy' from namespace 'http://schemas.xmlsoap.org/ws/2004/09/policy' was not handled.
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "ZHRF_SYN_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;
/// <remarks/>
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";
}
/// <remarks/>
public event ZHRF_SYN_03CompletedEventHandler ZHRF_SYN_03Completed;
/// <remarks/>
[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]));
}
/// <remarks/>
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);
}
/// <remarks/>
public ZHRF_SYN_03Response EndZHRF_SYN_03(System.IAsyncResult asyncResult)
{
object[] results = this.EndInvoke(asyncResult);
return ((ZHRF_SYN_03Response)(results[0]));
}
/// <remarks/>
public void ZHRF_SYN_03Async(ZHRF_SYN_03 ZHRF_SYN_031)
{
this.ZHRF_SYN_03Async(ZHRF_SYN_031, null);
}
/// <remarks/>
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));
}
}
/// <remarks/>
public new void CancelAsync(object userState)
{
base.CancelAsync(userState);
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRF_SYN_03
{
private string i_DATEField;
private ZHRS_PERSON[] t_PERSONField;
private ZHRS_PNO[] t_PNOField;
private ZHRS_WERKS[] t_WERKSField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string I_DATE
{
get
{
return this.i_DATEField;
}
set
{
this.i_DATEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public ZHRS_PERSON[] T_PERSON
{
get
{
return this.t_PERSONField;
}
set
{
this.t_PERSONField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public ZHRS_PNO[] T_PNO
{
get
{
return this.t_PNOField;
}
set
{
this.t_PNOField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public ZHRS_WERKS[] T_WERKS
{
get
{
return this.t_WERKSField;
}
set
{
this.t_WERKSField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRS_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;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string PERNR
{
get
{
return this.pERNRField;
}
set
{
this.pERNRField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string WERKS
{
get
{
return this.wERKSField;
}
set
{
this.wERKSField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ORGEH
{
get
{
return this.oRGEHField;
}
set
{
this.oRGEHField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string PLANS
{
get
{
return this.pLANSField;
}
set
{
this.pLANSField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZZ_SJGH
{
get
{
return this.zZ_SJGHField;
}
set
{
this.zZ_SJGHField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZZ_AQJB
{
get
{
return this.zZ_AQJBField;
}
set
{
this.zZ_AQJBField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string NAME
{
get
{
return this.nAMEField;
}
set
{
this.nAMEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string GESCH
{
get
{
return this.gESCHField;
}
set
{
this.gESCHField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string GBDAT
{
get
{
return this.gBDATField;
}
set
{
this.gBDATField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZZ_SFZH
{
get
{
return this.zZ_SFZHField;
}
set
{
this.zZ_SFZHField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZTELE
{
get
{
return this.zTELEField;
}
set
{
this.zTELEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZWORKCODE
{
get
{
return this.zWORKCODEField;
}
set
{
this.zWORKCODEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZMOBILE
{
get
{
return this.zMOBILEField;
}
set
{
this.zMOBILEField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZEMAIL
{
get
{
return this.zEMAILField;
}
set
{
this.zEMAILField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZSTATUS
{
get
{
return this.zSTATUSField;
}
set
{
this.zSTATUSField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZZ_XSQY
{
get
{
return this.zZZ_XSQYField;
}
set
{
this.zZZ_XSQYField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string KOSTL
{
get
{
return this.zKOSTLField;
}
set
{
this.zKOSTLField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZZ_ZD
{
get
{
return this.zZZ_ZDField;
}
set
{
this.zZZ_ZDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
/// <remarks/>
public string Z_ZJ
{
get
{
return this.zZ_ZJField;
}
set
{
this.zZ_ZJField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZRZRQ
{
get
{
return this.zZRZRQField;
}
set
{
this.zZRZRQField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZLZRQ
{
get
{
return this.zZLZRQField;
}
set
{
this.zZLZRQField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string MASSG
{
get
{
return this.zMASSGField;
}
set
{
this.zMASSGField = value;
}
}
/// <remarks/>
[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;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRS_WERKS
{
private string wERKSField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string WERKS
{
get
{
return this.wERKSField;
}
set
{
this.wERKSField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRS_PNO
{
private string zWORKCODEField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public string ZWORKCODE
{
get
{
return this.zWORKCODEField;
}
set
{
this.zWORKCODEField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "urn:sap-com:document:sap:rfc:functions")]
public partial class ZHRF_SYN_03Response
{
private ZHRS_PERSON[] t_PERSONField;
private ZHRS_PNO[] t_PNOField;
private ZHRS_WERKS[] t_WERKSField;
/// <remarks/>
[System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public ZHRS_PERSON[] T_PERSON
{
get
{
return this.t_PERSONField;
}
set
{
this.t_PERSONField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public ZHRS_PNO[] T_PNO
{
get
{
return this.t_PNOField;
}
set
{
this.t_PNOField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
[System.Xml.Serialization.XmlArrayItemAttribute("item", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = false)]
public ZHRS_WERKS[] T_WERKS
{
get
{
return this.t_WERKSField;
}
set
{
this.t_WERKSField = value;
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.6.1055.0")]
public delegate void ZHRF_SYN_03CompletedEventHandler(object sender, ZHRF_SYN_03CompletedEventArgs e);
/// <remarks/>
[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;
}
/// <remarks/>
public ZHRF_SYN_03Response Result
{
get
{
this.RaiseExceptionIfNecessary();
return ((ZHRF_SYN_03Response)(this.results[0]));
}
}
}
}

View File

@@ -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<ZHRS_ORG>
{
public bool Equals(ZHRS_ORG other)
{
if (other is null)
return false;
return this.OBJID == other.OBJID
&& this.SOBID == other.SOBID
&& this.STEXT == other.STEXT;
}
public override bool Equals(object obj) => Equals(obj as ZHRS_ORG);
public override int GetHashCode() => (OBJID, SOBID, STEXT).GetHashCode();
}
}

View File

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

View File

@@ -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<ZHRS_POST>
{
public bool Equals(ZHRS_POST other)
{
if (other is null)
return false;
return this.ZDEPID == other.ZDEPID
&& this.ZJOBACTID == other.ZJOBACTID
&& this.ZJOBID == other.ZJOBID
&& this.ZJOBNAME == other.ZJOBNAME;
}
public override bool Equals(object obj) => Equals(obj as ZHRS_POST);
public override int GetHashCode() => (ZDEPID, ZJOBACTID, ZJOBID, ZJOBNAME).GetHashCode();
}
}

View File

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