配方清单申请查询时,类型判断没有转小写

master
Leo 2 years ago
parent 38e3e2daa5
commit 35578c22f2

@ -403,11 +403,12 @@ namespace FactorySystemApi.Controllers
{ {
foreach(BomModel bom in subBomList) foreach(BomModel bom in subBomList)
{ {
if (bom.Type == "a" || bom.Type == "f") string bomType = bom.Type.ToLower(); // 转小写
if (bomType == "a" || bomType == "f")
{ {
bom.ABomType = "20"; bom.ABomType = "20";
} }
else if (bom.Type == "b" || bom.Type == "bb" || bom.Type == "i" || bom.Type == "iz") else if (bomType == "b" || bomType == "bb" || bomType == "i" || bomType == "iz")
{ {
bom.ABomType = "30"; bom.ABomType = "30";
} }

@ -176,6 +176,25 @@ namespace FactorySystemBll
} }
} }
// 按照协同物料清单下来的逻辑修改配方物料类型
string ftype = temp.FType.ToLower();
if (ftype == "f")
{
temp.FType = "10";
}
else if (ftype == "a")
{
temp.FType = "20";
}
else if (ftype == "b" || ftype == "bb" || ftype == "i" || ftype == "iz")
{
temp.FType = "30";
}
else
{
temp.FType = "40";
}
TBasicCode bType = typeList.Find(s => s.FName == temp.FType || s.FValue == temp.FType); TBasicCode bType = typeList.Find(s => s.FName == temp.FType || s.FValue == temp.FType);
if (bType != null) temp.FType = bType.FValue; if (bType != null) temp.FType = bType.FValue;
insertList.Add(temp); insertList.Add(temp);

Loading…
Cancel
Save