|
|
@ -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 = "料品创建成功"; |
|
|
@ -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; |
|
|
|