|
|
|
|
@ -565,6 +565,8 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
|
|
|
|
|
if (restResult != null && restResult.data != null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
ExceptionHelper.AddSystemJournal(Request, inParam, restResult);
|
|
|
|
|
List<BomModel> bomList = JsonConvert.DeserializeObject<List<BomModel>>(restResult.data.ToString());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -668,6 +670,8 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
List<TFS_Material> mateList = new List<TFS_Material>();
|
|
|
|
|
List<TFS_ViewMaterial> viewList = new List<TFS_ViewMaterial>();
|
|
|
|
|
List<TFS_Formula> formulaList = new List<TFS_Formula>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string ids1 = "", ids2 = "";//需求变更ids2弃用
|
|
|
|
|
string materialCodes = ",";
|
|
|
|
|
string testCodes = ",";
|
|
|
|
|
@ -807,40 +811,7 @@ namespace FactorySystemApi.Controllers
|
|
|
|
|
|
|
|
|
|
int.TryParse(material.FType, out int mType);
|
|
|
|
|
if (materLevel == 1) ids1 += material.FID + ",";
|
|
|
|
|
switch (mType)
|
|
|
|
|
{
|
|
|
|
|
case (int)Constant.MaterialType.产成品:
|
|
|
|
|
material.FTestCode = item.TestNO;
|
|
|
|
|
view.FBaseTestCode = item.TestNO;
|
|
|
|
|
view.FViewType = 1;
|
|
|
|
|
break;
|
|
|
|
|
case (int)Constant.MaterialType.半成品:
|
|
|
|
|
view.FViewType = (int)Constant.ViewType.半成品视图;
|
|
|
|
|
material.FTestCode = item.TestNO;
|
|
|
|
|
view.FBaseTestCode = item.TestNO;
|
|
|
|
|
break;
|
|
|
|
|
case (int)Constant.MaterialType.中间品:
|
|
|
|
|
view.FViewType = material.FName.Contains("香基") ? (int)Constant.ViewType.香基视图 : (int)Constant.ViewType.中间品视图;
|
|
|
|
|
material.FTestCode = item.TestNO;
|
|
|
|
|
view.FBaseTestCode = item.TestNO;
|
|
|
|
|
break;
|
|
|
|
|
case (int)Constant.MaterialType.原辅料:
|
|
|
|
|
view.FViewType = (int)Constant.ViewType.原料视图;
|
|
|
|
|
view.FBaseMaterialCode = material.FCode;
|
|
|
|
|
//默认值不同
|
|
|
|
|
view.FPurchaseCompany = "kg";
|
|
|
|
|
view.FPurchaseCompanyCount = "1";
|
|
|
|
|
view.FPurchaseBaseCompanyCount = "1000";
|
|
|
|
|
view.FSaleAccountSettingGroup = "15";
|
|
|
|
|
view.FStorageTotalShelfLife = "7300";
|
|
|
|
|
view.FMRP2ExternalStoragePlace = "1000";
|
|
|
|
|
view.FPlanUnlimitedOverDelivery = "";
|
|
|
|
|
view.FAccountPriceControl = "V";
|
|
|
|
|
view.FAccountPriceDetermine = "2";
|
|
|
|
|
view.FAccountAccessType = "1000";
|
|
|
|
|
view.FAccountSaleOrderInventory = "1010";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mateList.Add(material);
|
|
|
|
|
viewList.Add(view);
|
|
|
|
|
|
|
|
|
|
|