From 35578c22f2d5d14780ca0d9919044e393e19d118 Mon Sep 17 00:00:00 2001 From: Leo Date: Mon, 9 Oct 2023 11:38:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E6=96=B9=E6=B8=85=E5=8D=95=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E6=9F=A5=E8=AF=A2=E6=97=B6=EF=BC=8C=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=B2=A1=E6=9C=89=E8=BD=AC=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/FormulaController.cs | 5 +++-- FactorySystemBll/FormulaBll.cs | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/FactorySystemApi/Controllers/FormulaController.cs b/FactorySystemApi/Controllers/FormulaController.cs index 047c3f2..37ba9ba 100644 --- a/FactorySystemApi/Controllers/FormulaController.cs +++ b/FactorySystemApi/Controllers/FormulaController.cs @@ -403,11 +403,12 @@ namespace FactorySystemApi.Controllers { 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"; } - 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"; } diff --git a/FactorySystemBll/FormulaBll.cs b/FactorySystemBll/FormulaBll.cs index c21f9af..fea04d0 100644 --- a/FactorySystemBll/FormulaBll.cs +++ b/FactorySystemBll/FormulaBll.cs @@ -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); if (bType != null) temp.FType = bType.FValue; insertList.Add(temp);