Browse Source

U8同步

Branch_PaiNaWeiSJob
徐莉 4 months ago
parent
commit
9f14e1ca15
  1. BIN
      .vs/ICSSoft.FromERP/v14/.suo
  2. 28
      ICSSoft.FromERP/ICSInventoryFromU8.cs
  3. 27
      ICSSoft.FromERP/ICSMoFromU8.cs
  4. 14
      ICSSoft.FromERP/ICSModel.cs
  5. 1
      ICSSoft.FromERP/ICSSoft.FromERP.csproj
  6. 23
      ICSSoft.FromERP/IcsMainCategoryCodeFromU8.cs
  7. 29
      ICSSoft.FromERP/IcsSBomFromU8.cs

BIN
.vs/ICSSoft.FromERP/v14/.suo

Binary file not shown.

28
ICSSoft.FromERP/ICSInventoryFromU8.cs

@ -5,6 +5,7 @@ using System.Text;
using Quartz;
using System.Data;
using System.Net.NetworkInformation;
namespace ICSSoft.FromERP
{
@ -40,16 +41,35 @@ namespace ICSSoft.FromERP
string conStr = ICSHelper.GetConnectString();
string Namespace = this.GetType().Namespace;
//string Class = this.GetType().Name;
string erpNames = ICSHelper.GetConfigString()["Workpoint_ERPDB"];
List<string> DBS = erpNames.Split(',').ToList();
List<WorkpointERPDBLink> ListDB = new List<WorkpointERPDBLink>();
foreach (string DB in DBS)
{
if (DB.Split('_') != null && DB.Split('_').Count() > 1)
{
WorkpointERPDBLink wd = new WorkpointERPDBLink();
wd.Workpoint = DB.Split('_')[0];
wd.ERPDB = DB.Split('_')[1];
ListDB.Add(wd);
}
}
DataTable dt = ICSHelper.GetERPDB(conStr);
foreach (DataRow dr in dt.Rows)
{
string erpName = ICSHelper.GetConfigString()["ERPDB"];
string TenantId = dr["TenantId"].ToString();
string TenantId = dr["TenantId"].ToString();
string TenantCode = dr["TenantCode"].ToString();
string ErpId = dr["ErpID"].ToString(); //erpID
string Class = this.GetType().Name + TenantCode;
erpName = string.Format(erpName, TenantId);
WorkpointERPDBLink dblink= ListDB.FindLast(a => a.Workpoint == TenantCode);
if (dblink == null)
{
return;
}
string erpName = dblink.ERPDB;
//erpName = string.Format(erpName, TenantId);
#region SQL
string sql = @"

27
ICSSoft.FromERP/ICSMoFromU8.cs

@ -40,14 +40,37 @@ namespace ICSSoft.FromERP
string Namespace = this.GetType().Namespace;
//string Class = this.GetType().Name;
DataTable dt = ICSHelper.GetERPDB(conStr);
string erpNames = ICSHelper.GetConfigString()["Workpoint_ERPDB"];
List<string> DBS = erpNames.Split(',').ToList();
List<WorkpointERPDBLink> ListDB = new List<WorkpointERPDBLink>();
foreach (string DB in DBS)
{
if (DB.Split('_') != null && DB.Split('_').Count() > 1)
{
WorkpointERPDBLink wd = new WorkpointERPDBLink();
wd.Workpoint = DB.Split('_')[0];
wd.ERPDB = DB.Split('_')[1];
ListDB.Add(wd);
}
}
foreach (DataRow dr in dt.Rows)
{
string erpName = ICSHelper.GetConfigString()["ERPDB"];
// string erpName = ICSHelper.GetConfigString()["ERPDB"];
string TenantId = dr["TenantId"].ToString();//mes 组织
string TenantCode = dr["TenantCode"].ToString();
string ErpId = dr["ErpID"].ToString(); //erpID
string Class = this.GetType().Name + TenantCode;
erpName = string.Format(erpName, TenantId);
WorkpointERPDBLink dblink = ListDB.FindLast(a => a.Workpoint == TenantCode);
if (dblink == null)
{
return;
}
string erpName = dblink.ERPDB;
//erpName = string.Format(erpName, TenantId);
#region SQL
string sql = @"

14
ICSSoft.FromERP/ICSModel.cs

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ICSSoft.FromERP
{
public class WorkpointERPDBLink
{
public String Workpoint { get; set; }
public String ERPDB { get; set; }
}
}

1
ICSSoft.FromERP/ICSSoft.FromERP.csproj

@ -98,6 +98,7 @@
<Compile Include="IcsMainCategoryCodeFromU8.cs" />
<Compile Include="IcsMainCategoryCode.cs" />
<Compile Include="ICSManufactureReceive.cs" />
<Compile Include="ICSModel.cs" />
<Compile Include="ICSMoFromU8.cs" />
<Compile Include="ICSMOIssue.cs" />
<Compile Include="IcsSBomFromU8.cs" />

23
ICSSoft.FromERP/IcsMainCategoryCodeFromU8.cs

@ -40,15 +40,34 @@ namespace ICSSoft.FromERP
string Namespace = this.GetType().Namespace;
//string Class = this.GetType().Name;
string erpNames = ICSHelper.GetConfigString()["Workpoint_ERPDB"];
List<string> DBS = erpNames.Split(',').ToList();
List<WorkpointERPDBLink> ListDB = new List<WorkpointERPDBLink>();
foreach (string DB in DBS)
{
if (DB.Split('_') != null && DB.Split('_').Count() > 1)
{
WorkpointERPDBLink wd = new WorkpointERPDBLink();
wd.Workpoint = DB.Split('_')[0];
wd.ERPDB = DB.Split('_')[1];
ListDB.Add(wd);
}
}
DataTable dt = ICSHelper.GetERPDB(conStr);
foreach (DataRow dr in dt.Rows)
{
string erpName = ICSHelper.GetConfigString()["ERPDB"];
// string erpName = ICSHelper.GetConfigString()["ERPDB"];
string TenantId = dr["TenantId"].ToString();//mes 组织
string TenantCode = dr["TenantCode"].ToString();
string ErpId = dr["ErpID"].ToString(); //erpID
string Class = this.GetType().Name + TenantCode;
erpName = string.Format(erpName, TenantId);
WorkpointERPDBLink dblink = ListDB.FindLast(a => a.Workpoint == TenantCode);
if (dblink == null)
{
return;
}
string erpName = dblink.ERPDB;
// erpName = string.Format(erpName, TenantId);
#region SQL
string sql = @" select a.cInvCCode as ItemMainCategoryCode

29
ICSSoft.FromERP/IcsSBomFromU8.cs

@ -39,14 +39,39 @@ namespace ICSSoft.FromERP
string Namespace = this.GetType().Namespace;
//string Class = this.GetType().Name;
DataTable dt = ICSHelper.GetERPDB(conStr);
string erpNames = ICSHelper.GetConfigString()["Workpoint_ERPDB"];
List<string> DBS = erpNames.Split(',').ToList();
List<WorkpointERPDBLink> ListDB = new List<WorkpointERPDBLink>();
foreach (string DB in DBS)
{
if (DB.Split('_') != null && DB.Split('_').Count() > 1)
{
WorkpointERPDBLink wd = new WorkpointERPDBLink();
wd.Workpoint = DB.Split('_')[0];
wd.ERPDB = DB.Split('_')[1];
ListDB.Add(wd);
}
}
foreach (DataRow dr in dt.Rows)
{
string erpName = ICSHelper.GetConfigString()["ERPDB"];
// string erpName = ICSHelper.GetConfigString()["ERPDB"];
string TenantId = dr["TenantId"].ToString();
string TenantCode = dr["TenantCode"].ToString();
string ErpId = dr["ErpID"].ToString(); //erpID
string Class = this.GetType().Name + TenantCode;
erpName = string.Format(erpName, TenantId);
WorkpointERPDBLink dblink = ListDB.FindLast(a => a.Workpoint == TenantCode);
if (dblink == null)
{
return;
}
string erpName = dblink.ERPDB;
// erpName = string.Format(erpName, TenantId);
#region SQL
string sql = @"

Loading…
Cancel
Save