From e80f12cdc193181251b05945905f3a177cc7d34c Mon Sep 17 00:00:00 2001 From: "LAPTOP-L19E5NHR\\Administrator" Date: Mon, 19 Jun 2023 16:09:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=A2=E6=88=B7=E3=80=81?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=90=AB=E7=A8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Create_U9_ItemMaster/Create_U9_ItemMaster.cs | 2 +- ICS.CreateU9Customer/CreateU9Customer.cs | 41 +++++++++++-------- ICSSoft.Entity/CustomerInsertDataClass.cs | 1 - UFIDA.U9.CreateSupplier/CustCreateSupplier.cs | 7 +++- 4 files changed, 31 insertions(+), 20 deletions(-) diff --git a/Create_U9_ItemMaster/Create_U9_ItemMaster.cs b/Create_U9_ItemMaster/Create_U9_ItemMaster.cs index 17df3b5..1e7cf86 100644 --- a/Create_U9_ItemMaster/Create_U9_ItemMaster.cs +++ b/Create_U9_ItemMaster/Create_U9_ItemMaster.cs @@ -225,7 +225,7 @@ namespace UFIDA.ISV.Create_U9_ItemMaster //主分类 item.m_mainItemCategory = new UFIDAU9CBOPubControllerCommonArchiveDataDTOData(); item.m_mainItemCategory.m_code = data.ItemCategory; - + item.Description = data.Description; //料号 item.m_code = data.Code; item.m_code1 = data.Code1; diff --git a/ICS.CreateU9Customer/CreateU9Customer.cs b/ICS.CreateU9Customer/CreateU9Customer.cs index 78812f4..3596bb2 100644 --- a/ICS.CreateU9Customer/CreateU9Customer.cs +++ b/ICS.CreateU9Customer/CreateU9Customer.cs @@ -104,21 +104,21 @@ namespace ICS.CreateU9Customer // return result; // } -// string serialsql = @"select TOP 1 Code from CBO_Customer -// where Org='" + OrgID + "' and code < '999999' and code not like'%[a-z]%' order by Code DESC"; -// serialsql = string.Format(serialsql, OrgID); -// //serialsql = string.Format(serialsql, CusList.CustomerCode, OrgID); -// DataTable serialdt = DBhlper.Query(serialsql, Appconfig.GetU9ConnStr()); -// if (serialdt.Rows.Count == 0) -// { -// SerialNo = "0001"; -// } -// else -// { -// //string BaseNo = serialdt.Rows[0]["Code"].ToString().Split('-')[1]; -// string BaseNo = serialdt.Rows[0]["Code"].ToString(); -// SerialNo = (Convert.ToInt32(BaseNo) + 1).ToString().PadLeft(4, '0'); -// } + // string serialsql = @"select TOP 1 Code from CBO_Customer + // where Org='" + OrgID + "' and code < '999999' and code not like'%[a-z]%' order by Code DESC"; + // serialsql = string.Format(serialsql, OrgID); + // //serialsql = string.Format(serialsql, CusList.CustomerCode, OrgID); + // DataTable serialdt = DBhlper.Query(serialsql, Appconfig.GetU9ConnStr()); + // if (serialdt.Rows.Count == 0) + // { + // SerialNo = "0001"; + // } + // else + // { + // //string BaseNo = serialdt.Rows[0]["Code"].ToString().Split('-')[1]; + // string BaseNo = serialdt.Rows[0]["Code"].ToString(); + // SerialNo = (Convert.ToInt32(BaseNo) + 1).ToString().PadLeft(4, '0'); + // } SerialNo = CusList.CustomerNo; @@ -134,7 +134,6 @@ namespace ICS.CreateU9Customer (client.Endpoint.Binding as BasicHttpBinding).MaxBufferSize = int.MaxValue; returnCustomers = client.Do(out returnMsg, context, customerDatas.ToArray(), custContext); - StringBuilder str = new StringBuilder(); str.AppendLine("创建U9客户信息"); str.AppendLine("组织:" + CusList.OrgCode); @@ -148,12 +147,19 @@ namespace ICS.CreateU9Customer str.AppendLine("结果:" + "True"); Appconfig.WriteLogFile(str.ToString(), "创建U9客户信息"); - result.MESSAGE = "客户" + SerialNo + "创建成功"; result.IsSuccess = true; result.CustomerCode = returnCustomers[0].m_code; result.CustomerID = returnCustomers[0].m_iD; + if (result.IsSuccess) + { + + string Updatesql = @"UPDATE CBO_Customer SET IsTaxPrice=1 WHERE Code='" + SerialNo + "' "; + Updatesql = string.Format(Updatesql); + DBhlper.Query(Updatesql, Appconfig.GetU9ConnStr()); + } + return result; } else @@ -570,6 +576,7 @@ namespace ICS.CreateU9Customer customer.m_stateTaxNo = datas.StateTaxNo; #region 默认值 customer.m_saleType = 0; + customer.m_priceListCode = datas.PriceListCode; //customer.m_priceListID = long.Parse(PriceListID); customer.m_isPriceListModify = true; diff --git a/ICSSoft.Entity/CustomerInsertDataClass.cs b/ICSSoft.Entity/CustomerInsertDataClass.cs index 9c955a3..a4036b7 100644 --- a/ICSSoft.Entity/CustomerInsertDataClass.cs +++ b/ICSSoft.Entity/CustomerInsertDataClass.cs @@ -226,6 +226,5 @@ namespace ICSSoft.Entity public string CustomerNo { get; set; } - } } diff --git a/UFIDA.U9.CreateSupplier/CustCreateSupplier.cs b/UFIDA.U9.CreateSupplier/CustCreateSupplier.cs index 1a11578..25ab4bb 100644 --- a/UFIDA.U9.CreateSupplier/CustCreateSupplier.cs +++ b/UFIDA.U9.CreateSupplier/CustCreateSupplier.cs @@ -227,7 +227,12 @@ namespace UFIDA.U9.CreateSupplier result.MESSAGE = "创建供应商成功"; result.SuppCode = SuppCode; - + if (result.IsSuccess) + { + string Updatesql = @"UPDATE CBO_Supplier SET IsTaxPrice=1 WHERE Code='" + SuppCode + "' "; + Updatesql = string.Format(Updatesql); + DBhlper.Query(Updatesql, Appconfig.GetU9ConnStr()); + }