From 9a0a23ad1bd7e15fa7111d99959552bd5e33701f Mon Sep 17 00:00:00 2001 From: Jjie <1005539536@qq.com> Date: Tue, 8 Apr 2025 13:42:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=8A=E7=89=A9?= =?UTF-8?q?=E6=96=99id=E4=BD=BF=E7=94=A8=E5=BE=B7=E6=98=93=E4=BB=95?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E7=9A=84long=E7=B1=BB?= =?UTF-8?q?=E5=9E=8Bid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ICSSoft.FromERP/ICSSoft.FromERP/ICSInventory.cs | 4 ++-- ICSSoft.FromERP/ICSSoft.FromERP/ICSVendor.cs | 4 +++- ICSSoft.FromERP/ICSSoft.Test/Program.cs | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/ICSSoft.FromERP/ICSSoft.FromERP/ICSInventory.cs b/ICSSoft.FromERP/ICSSoft.FromERP/ICSInventory.cs index b3e5fd3..c0764b9 100644 --- a/ICSSoft.FromERP/ICSSoft.FromERP/ICSInventory.cs +++ b/ICSSoft.FromERP/ICSSoft.FromERP/ICSInventory.cs @@ -137,7 +137,7 @@ namespace ICSSoft.FromERP if (obj["code"].ToString() == "200") { #region 处理数据 - + string id = obj["data"]?[0]?["id"]?.ToString(); string code = obj["data"]?[0]?["code"]?.ToString(); string name_simplifiedName = obj["data"]?[0]?["name"]?["simplifiedName"]?.ToString(); string model1 = obj["data"]?[0]?["model1"]?.ToString(); @@ -162,7 +162,7 @@ namespace ICSSoft.FromERP string batchManage = obj["data"]?[0]?["detail"]?["batchManage"]?.ToString(); string modifyTime = obj["data"]?[0]?["modifyTime"]?.ToString(); #endregion - sqlGG = @" select NEWID() AS ID, + sqlGG = @" select '"+ id + @"' AS ID, '" + code + @"' AS INVCODE, '"+name_simplifiedName+@"' AS INVNAME, diff --git a/ICSSoft.FromERP/ICSSoft.FromERP/ICSVendor.cs b/ICSSoft.FromERP/ICSSoft.FromERP/ICSVendor.cs index 37fb885..0b26ff5 100644 --- a/ICSSoft.FromERP/ICSSoft.FromERP/ICSVendor.cs +++ b/ICSSoft.FromERP/ICSSoft.FromERP/ICSVendor.cs @@ -132,6 +132,8 @@ namespace ICSSoft.FromERP //string vendorcontactss_contactmobile = obj["data"] != null ? (obj["data"]["vendorcontactss"] != null ? (obj["data"]["vendorcontactss"]["contactmobile"] != null ? obj["data"]["vendorcontactss"]["contactmobile"].ToString() : "") : "") : ""; //string registerCurrency_name = obj["data"] != null ? (obj["data"]["registerCurrency_name"] != null ? obj["data"]["registerCurrency_name"].ToString() : "") : ""; //string createTime = obj["data"] != null ? (obj["data"]["createTime"] != null ? obj["data"]["createTime"].ToString() : "") : ""; + + string id = obj["data"]["id"]?.ToString(); string Zcode = obj["data"]["code"]?.ToString(); string namezh_CN = obj["data"]["name"]["zh_CN"].ToString(); string vendorclass_code = obj["data"]["vendorclass_code"].ToString(); @@ -163,7 +165,7 @@ namespace ICSSoft.FromERP #endregion sqlGG = @" select '" + Zcode + @"' AS cVenCode , - NEWID() AS ID, + '"+ id + @"' AS ID, '" + namezh_CN + @"' AS cVenName, '" + namezh_CN + @"' AS cVenAbbName, '" + vendorclass_code + @"' AS cVCCode, diff --git a/ICSSoft.FromERP/ICSSoft.Test/Program.cs b/ICSSoft.FromERP/ICSSoft.Test/Program.cs index 6cb84f3..34d0605 100644 --- a/ICSSoft.FromERP/ICSSoft.Test/Program.cs +++ b/ICSSoft.FromERP/ICSSoft.Test/Program.cs @@ -11,8 +11,8 @@ namespace ICSSoft.Test static void Main(string[] args) { - // DYSDelive a = new DYSDelive(); - ICSInventory a = new ICSInventory(); + // DYSDelive a = new DYSDelive(); + ICSVendor a = new ICSVendor(); a.Execute();