Sfoglia il codice sorgente

Merge branch 'master' of http://git.longjoe.com/shuiping150/JLH

JohnnyChan 1 settimana fa
parent
commit
73fcec16dc
2 ha cambiato i file con 8 aggiunte e 12 eliminazioni
  1. 8 11
      JLHHJSvr/Helper/MattressHelper.cs
  2. 0 1
      JLHHJSvr/JLHHJSvr.csproj

+ 8 - 11
JLHHJSvr/Helper/MattressHelper.cs

@@ -567,10 +567,7 @@ namespace JLHHJSvr.Helper
             {
                 cost = GetExtraAmt(mattress, 2);
             }
-            if (cost > 0)
-            {
-                mattress.extras_cost = cost;
-            }
+            AddKeyValue("材料额外费用", cost);
 
             decimal cost1 = 0;
             if (extraProcesses != null && extraProcesses.Count > 0)
@@ -1042,7 +1039,7 @@ namespace JLHHJSvr.Helper
             #endregion
 
             #region 拼侧 最大金额的侧  和   工厂利润率加点
-            CalCulatePince(mattress, mxlist);
+            CalCulatePince(mattress, mxlist, isNewFormula);
             #endregion
 
             #region 内布套特殊加点
@@ -1150,7 +1147,7 @@ namespace JLHHJSvr.Helper
         /// </summary>
         /// <param name="mattress"></param>
         /// <param name="mxlist"></param>
-        private void CalCulatePince(u_mattress mattress, List<u_mattress_mx_mtrl> mxlist)
+        private void CalCulatePince(u_mattress mattress, List<u_mattress_mx_mtrl> mxlist, Boolean isNewFormula = true)
         {
             var mianliaoList = mxlist.Where(t => t.formulatype == 0).ToList();
 
@@ -1241,7 +1238,7 @@ namespace JLHHJSvr.Helper
             string field = pinceCnt > 3 || (hasBigSide && (pinceCnt == 2 || pinceCnt == 3)) ? "num_3" : hasBigSide ? "num_1" : pinceCnt == 2 || pinceCnt == 3 ? "num_2" : string.Empty;
             
             // 查找点数
-            mattress.profitrate_point = GetWorkmanshipRate(mattress, field, "工艺点数");
+            mattress.profitrate_point = GetWorkmanshipRate(mattress, field, "工艺点数", isNewFormula);
             AddKeyValue("工艺点数", mattress.profitrate_point);
 
             decimal extraProcesses = GetExtraAmt(mattress, 1);
@@ -1350,14 +1347,14 @@ namespace JLHHJSvr.Helper
         /// <param name="field">旧表字段名</paramD>
         /// <param name="label">新表变量名</paramD>
         /// <returns></returns>
-        public decimal GetWorkmanshipRate(u_mattress mattress, string field, string label)
+        public decimal GetWorkmanshipRate(u_mattress mattress, string field, string label, Boolean isNewFormula = true)
         {
             decimal rate = 0;
             if (field == "") return 0;
 
-            var addList = GetWorkmanshipAdd(label);
-            if (addList.Count > 0)
+            if (isNewFormula)
             {
+                var addList = GetWorkmanshipAdd(label);
                 var tgList = addList.Where(o => o.deptid == mattress.deptid && o.mattresstypeid == mattress.mattresstypeid).ToList();
                 if (tgList.Count <= 0) tgList = addList.Where(o => o.deptid == mattress.deptid).ToList();
                 if (tgList.Count <= 0) tgList = addList.Where(o => o.mattresstypeid == mattress.mattresstypeid).ToList();
@@ -1375,7 +1372,7 @@ namespace JLHHJSvr.Helper
                     }
                 }
             }
-            if (rate == 0)
+            else
             {
                 cmd.CommandText = @"SELECT " + field + " FROM u_workmanship_dianshu WHERE deptid = @deptid AND  mattresstypeid = @mattresstypeid";
                 cmd.Parameters.Clear();

+ 0 - 1
JLHHJSvr/JLHHJSvr.csproj

@@ -393,7 +393,6 @@
     <Compile Include="Excutor\SetSysUserFileStringExcutor.cs" />
     <Compile Include="Excutor\SetOptionExcutor.cs" />
     <Compile Include="Helper\BedNetHelper.cs" />
-    <Compile Include="Helper\CacheHelper.cs" />
     <Compile Include="Helper\ERPHelper.cs" />
     <Compile Include="Helper\InterfaceHelper.cs" />
     <Compile Include="Helper\MattressHelper.cs" />