|
|
@ -50,7 +50,7 @@ namespace UFIDA.ISV.Create_U9_ItemMaster |
|
|
|
(client.Endpoint.Binding as BasicHttpBinding).MaxBufferSize = int.MaxValue; |
|
|
|
returnItems = client.Do(out returnMsg, context, itemDatas.ToArray(), custContext); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (ItemMasterDataClass data in itemList) |
|
|
|
{ |
|
|
|
StringBuilder str = new StringBuilder(); |
|
|
@ -65,6 +65,15 @@ namespace UFIDA.ISV.Create_U9_ItemMaster |
|
|
|
//Appconfig.WriteLogFile(str.ToString(), "创建U9料号");
|
|
|
|
|
|
|
|
result.ItemCode += data.Code + "|"; |
|
|
|
|
|
|
|
if (true) |
|
|
|
{ |
|
|
|
string Updatesql = @"UPDATE CBO_ItemMaster_Trl SET Description='" + data.Description + "' where CombineName='" + data.Code + "'"; |
|
|
|
Updatesql = string.Format(Updatesql); |
|
|
|
DBhlper.Query(Updatesql, Appconfig.GetU9ConnStr()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
result.IsSuccess = true; |
|
|
|
result.MESSAGE = "料品创建成功"; |
|
|
@ -89,7 +98,7 @@ namespace UFIDA.ISV.Create_U9_ItemMaster |
|
|
|
str.AppendLine("组织:" + ConfigurationManager.AppSettings["orgCode"].ToString()); |
|
|
|
|
|
|
|
str.AppendLine("结果:" + ""); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
str.AppendLine("结果:" + "False"); |
|
|
|
str.AppendLine("错误:" + GetExceptionMessage(ex)); |
|
|
@ -207,18 +216,18 @@ namespace UFIDA.ISV.Create_U9_ItemMaster |
|
|
|
foreach (ItemMasterDataClass data in datas) |
|
|
|
{ |
|
|
|
|
|
|
|
// string orgsql = @"select ID from Base_Organization
|
|
|
|
// where Code='{0}' ";
|
|
|
|
// orgsql = string.Format(orgsql, data.OrgCode);
|
|
|
|
// DataTable orgdt = DBhlper.Query(orgsql, Appconfig.GetU9ConnStr());
|
|
|
|
// if (orgdt.Rows.Count == 0)
|
|
|
|
// {
|
|
|
|
// throw new Exception("组织编码不存在!");
|
|
|
|
// }
|
|
|
|
// else
|
|
|
|
// {
|
|
|
|
// orgID = orgdt.Rows[0]["ID"].ToString();
|
|
|
|
// }
|
|
|
|
// string orgsql = @"select ID from Base_Organization
|
|
|
|
// where Code='{0}' ";
|
|
|
|
// orgsql = string.Format(orgsql, data.OrgCode);
|
|
|
|
// DataTable orgdt = DBhlper.Query(orgsql, Appconfig.GetU9ConnStr());
|
|
|
|
// if (orgdt.Rows.Count == 0)
|
|
|
|
// {
|
|
|
|
// throw new Exception("组织编码不存在!");
|
|
|
|
// }
|
|
|
|
// else
|
|
|
|
// {
|
|
|
|
// orgID = orgdt.Rows[0]["ID"].ToString();
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
UFIDAU9ISVItemItemMasterDTOData item = new UFIDAU9ISVItemItemMasterDTOData(); |
|
|
@ -239,7 +248,7 @@ namespace UFIDA.ISV.Create_U9_ItemMaster |
|
|
|
item.m_assetCategory = new UFIDAU9CBOPubControllerCommonArchiveDataDTOData(); |
|
|
|
item.m_assetCategory.m_code = data.FinanceType;// "C02";
|
|
|
|
string InventoryUOM = ""; |
|
|
|
string sqlWH = @"select id from Base_UOM where Code='"+data.InventoryUOM+"' "; |
|
|
|
string sqlWH = @"select id from Base_UOM where Code='" + data.InventoryUOM + "' "; |
|
|
|
sqlWH = string.Format(sqlWH); |
|
|
|
DataTable _dtWH = DBhlper.Query(sqlWH, Appconfig.GetU9ConnStr()); |
|
|
|
string WHCode = string.Empty; |
|
|
@ -253,7 +262,7 @@ namespace UFIDA.ISV.Create_U9_ItemMaster |
|
|
|
throw new Exception("单位编码未存在!"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
item.m_sPECS = data.SPEC;//规格
|
|
|
|
|
|
|
|
#region 料品主档DTO
|
|
|
@ -403,7 +412,7 @@ namespace UFIDA.ISV.Create_U9_ItemMaster |
|
|
|
m_mrpInfo.m_releaseTimeFence = 0;//累计汇总提前期
|
|
|
|
item.m_mrpInfo = m_mrpInfo; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//UFIDAU9BaseFlexFieldDescFlexFieldDescFlexSegmentsData m_descFlexField = new UFIDAU9BaseFlexFieldDescFlexFieldDescFlexSegmentsData();
|
|
|
@ -412,7 +421,7 @@ namespace UFIDA.ISV.Create_U9_ItemMaster |
|
|
|
|
|
|
|
//m_descFlexField.m_privateDescSeg15 = data.PartType;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
items.Add(item); |
|
|
|
} |
|
|
|
return items.ToArray(); |
|
|
|