DESKTOP-DIHMM3I\22375 2 years ago
parent
commit
c2908c736b
  1. 2
      Create_U9_ItemMaster/Create_U9_ItemMaster.cs
  2. 41
      ICS.CreateU9Customer/CreateU9Customer.cs
  3. 25
      ICS.CreateWCRCV/CustCreateBFRcvSrvSub.cs
  4. 1
      ICSSoft.Entity/CustomerInsertDataClass.cs
  5. 9
      UFIDA.U9.CreateSupplier/CustCreateSupplier.cs

2
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 = new UFIDAU9CBOPubControllerCommonArchiveDataDTOData();
item.m_mainItemCategory.m_code = data.ItemCategory; item.m_mainItemCategory.m_code = data.ItemCategory;
item.Description = data.Description;
//料号 //料号
item.m_code = data.Code; item.m_code = data.Code;
item.m_code1 = data.Code1; item.m_code1 = data.Code1;

41
ICS.CreateU9Customer/CreateU9Customer.cs

@ -104,21 +104,21 @@ namespace ICS.CreateU9Customer
// return result; // 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; SerialNo = CusList.CustomerNo;
@ -134,7 +134,6 @@ namespace ICS.CreateU9Customer
(client.Endpoint.Binding as BasicHttpBinding).MaxBufferSize = int.MaxValue; (client.Endpoint.Binding as BasicHttpBinding).MaxBufferSize = int.MaxValue;
returnCustomers = client.Do(out returnMsg, context, customerDatas.ToArray(), custContext); returnCustomers = client.Do(out returnMsg, context, customerDatas.ToArray(), custContext);
StringBuilder str = new StringBuilder(); StringBuilder str = new StringBuilder();
str.AppendLine("创建U9客户信息"); str.AppendLine("创建U9客户信息");
str.AppendLine("组织:" + CusList.OrgCode); str.AppendLine("组织:" + CusList.OrgCode);
@ -148,12 +147,19 @@ namespace ICS.CreateU9Customer
str.AppendLine("结果:" + "True"); str.AppendLine("结果:" + "True");
Appconfig.WriteLogFile(str.ToString(), "创建U9客户信息"); Appconfig.WriteLogFile(str.ToString(), "创建U9客户信息");
result.MESSAGE = "客户" + SerialNo + "创建成功"; result.MESSAGE = "客户" + SerialNo + "创建成功";
result.IsSuccess = true; result.IsSuccess = true;
result.CustomerCode = returnCustomers[0].m_code; result.CustomerCode = returnCustomers[0].m_code;
result.CustomerID = returnCustomers[0].m_iD; 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; return result;
} }
else else
@ -570,6 +576,7 @@ namespace ICS.CreateU9Customer
customer.m_stateTaxNo = datas.StateTaxNo; customer.m_stateTaxNo = datas.StateTaxNo;
#region 默认值 #region 默认值
customer.m_saleType = 0; customer.m_saleType = 0;
customer.m_priceListCode = datas.PriceListCode; customer.m_priceListCode = datas.PriceListCode;
//customer.m_priceListID = long.Parse(PriceListID); //customer.m_priceListID = long.Parse(PriceListID);
customer.m_isPriceListModify = true; customer.m_isPriceListModify = true;

25
ICS.CreateWCRCV/CustCreateBFRcvSrvSub.cs

@ -277,6 +277,29 @@ namespace UFIDA.ISV.CreateWCRCVForApi
#region 20200615 #region 20200615
Decimal SupplierConfirmQtyTU = 0; Decimal SupplierConfirmQtyTU = 0;
Decimal TotalArriveQtyCU = 0; Decimal TotalArriveQtyCU = 0;
string sql = @"SELECT
a.id
FROM
PM_PurchaseOrder a
LEFT JOIN PM_POLine b ON b.PurchaseOrder = a.ID
WHERE
a.DocNo = '" + rCVhead.srcDocPONo + "' AND b.DocLineNo='" + line.srcDocPOLineNo + "' ";
DataTable POShip = DBhlper.Query(sql, Appconfig.GetU9ConnStr());
if (POShip != null && POShip.Rows.Count > 0)
{
}
else
{
rtnRcvInfo rtnpo = new rtnRcvInfo();
rtnpo.IsSuccess = false;
rtnpo.Message = "采购订单:" + rCVhead.srcDocPONo + ",行:" + line.srcDocPOLineNo + ",不存在!";
rtnpos.Add(rtnpo);
return rtnpos;
}
string sqlShip = @"SELECT string sqlShip = @"SELECT
c.SubLineNo, c.SubLineNo,
c.ItemInfo_ItemCode, c.ItemInfo_ItemCode,
@ -470,7 +493,7 @@ namespace UFIDA.ISV.CreateWCRCVForApi
{ {
rtnRcvInfo rtnpo = new rtnRcvInfo(); rtnRcvInfo rtnpo = new rtnRcvInfo();
rtnpo.IsSuccess = false; rtnpo.IsSuccess = false;
rtnpo.Message = "采购订单:" + rCVhead.srcDocPONo + ",行:" + line.srcDocPOLineNo + ",已全部入库!";
rtnpo.Message = "采购订单:" + rCVhead.srcDocPONo + ",行:" + line.srcDocPOLineNo + ",不存在或者已全部入库!";
rtnpos.Add(rtnpo); rtnpos.Add(rtnpo);
return rtnpos; return rtnpos;
} }

1
ICSSoft.Entity/CustomerInsertDataClass.cs

@ -226,6 +226,5 @@ namespace ICSSoft.Entity
public string CustomerNo { get; set; } public string CustomerNo { get; set; }
} }
} }

9
UFIDA.U9.CreateSupplier/CustCreateSupplier.cs

@ -122,7 +122,7 @@ namespace UFIDA.U9.CreateSupplier
UFIDAU9BasePropertyTypesEffectiveData m_effective = new UFIDAU9BasePropertyTypesEffectiveData(); UFIDAU9BasePropertyTypesEffectiveData m_effective = new UFIDAU9BasePropertyTypesEffectiveData();
//m_effective.m_effectiveDate = new DateTime(2022, 9, 1); //m_effective.m_effectiveDate = new DateTime(2022, 9, 1);
m_effective.m_effectiveDate = DateTime.Now.AddDays(-1);
m_effective.m_effectiveDate = Convert.ToDateTime(Supp.Effective_EffectiveDate);// DateTime.Now.AddDays(-1);
m_effective.m_disableDate = new DateTime(9999, 12, 31); m_effective.m_disableDate = new DateTime(9999, 12, 31);
m_effective.m_isEffective = true; m_effective.m_isEffective = true;
@ -227,7 +227,12 @@ namespace UFIDA.U9.CreateSupplier
result.MESSAGE = "创建供应商成功"; result.MESSAGE = "创建供应商成功";
result.SuppCode = SuppCode; 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());
}

Loading…
Cancel
Save