|
|
|
@ -308,10 +308,12 @@ namespace FactorySystemApi.Controllers
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sVersion = string.Format("{0:F4}", dVersion);
|
|
|
|
sVersion = string.Format("{0:F4}", dVersion);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (inParam .ContainsKey("Change_List") && inParam["Change_List"] != null&& inParam["Change_List"].ToString() !="")
|
|
|
|
if (inParam.ContainsKey("Change_List") && inParam["Change_List"] != null && inParam["Change_List"].ToString() != "")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
List<TFS_UpdateFormula> jsonList = JsonConvert.DeserializeObject<List<TFS_UpdateFormula>>(inParam["Change_List"].ToString());
|
|
|
|
List<TFS_UpdateFormula> jsonList = JsonConvert.DeserializeObject<List<TFS_UpdateFormula>>(inParam["Change_List"].ToString());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (jsonList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
foreach (var item in jsonList)
|
|
|
|
foreach (var item in jsonList)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TFS_UpdateFormula tFS_UpdateFormula = new TFS_UpdateFormula()
|
|
|
|
TFS_UpdateFormula tFS_UpdateFormula = new TFS_UpdateFormula()
|
|
|
|
@ -328,8 +330,18 @@ namespace FactorySystemApi.Controllers
|
|
|
|
};
|
|
|
|
};
|
|
|
|
task = FormulaBll.SevaTFS_UpdateFormula(tFS_UpdateFormula);
|
|
|
|
task = FormulaBll.SevaTFS_UpdateFormula(tFS_UpdateFormula);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
apiResult.Error("Change_List不能为空!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
apiResult.Error("Change_List不能为空!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
apiResult.Data = task;
|
|
|
|
apiResult.Data = task;
|
|
|
|
|
|
|
|
|
|
|
|
@ -732,11 +744,8 @@ namespace FactorySystemApi.Controllers
|
|
|
|
List<TFS_ViewMaterial> viewsByTestCodes = FormulaBll.GetViewByTestCodes(testCodes);
|
|
|
|
List<TFS_ViewMaterial> viewsByTestCodes = FormulaBll.GetViewByTestCodes(testCodes);
|
|
|
|
|
|
|
|
|
|
|
|
MaterialBll materialBll = new MaterialBll();
|
|
|
|
MaterialBll materialBll = new MaterialBll();
|
|
|
|
TFS_Material tFS_Material = materialBll.GetMaterialListByFTestCode(item.SP_VALUE).LastOrDefault();
|
|
|
|
TFS_Material tFS_Material = materialBll.GetMaterialListByFCode(item.SP_VALUE).FirstOrDefault();
|
|
|
|
|
|
|
|
|
|
|
|
if ("40".Equals(material.FType))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
item.AMaterialCode = item.SP_VALUE;
|
|
|
|
|
|
|
|
if (tFS_Material != null)
|
|
|
|
if (tFS_Material != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
item.ASapCode = tFS_Material.OldCode;
|
|
|
|
item.ASapCode = tFS_Material.OldCode;
|
|
|
|
@ -745,6 +754,10 @@ namespace FactorySystemApi.Controllers
|
|
|
|
{
|
|
|
|
{
|
|
|
|
item.ASapCode = "";
|
|
|
|
item.ASapCode = "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ("40".Equals(material.FType))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
item.AMaterialCode = item.SP_VALUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -756,15 +769,11 @@ namespace FactorySystemApi.Controllers
|
|
|
|
if (tFS_Material != null)
|
|
|
|
if (tFS_Material != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
item.AMaterialCode = tFS_Material.FCode;
|
|
|
|
item.AMaterialCode = tFS_Material.FCode;
|
|
|
|
item.ASapCode = tFS_Material.OldCode;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//item.AMaterialCode = view2.FSaleOldMaterialCode;
|
|
|
|
//item.AMaterialCode = view2.FSaleOldMaterialCode;
|
|
|
|
//item.ASapCode = view2.FBaseMaterialCode;
|
|
|
|
//item.ASapCode = view2.FBaseMaterialCode;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
item.ASapCode = "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (string.IsNullOrWhiteSpace(item.AMaterialCode))
|
|
|
|
if (string.IsNullOrWhiteSpace(item.AMaterialCode))
|
|
|
|
|