Browse Source

核价后台:1、修复床垫清单-配置,刺绣输出逻辑有误

chen_yjin 17 giờ trước cách đây
mục cha
commit
02747349ae
2 tập tin đã thay đổi với 10 bổ sung2 xóa
  1. 3 0
      JLHHJSvr/DataStore/web_mattress.xml
  2. 7 2
      JLHHJSvr/Helper/InterfaceHelper.cs

+ 3 - 0
JLHHJSvr/DataStore/web_mattress.xml

@@ -127,6 +127,9 @@
 		<when notnull="@arg_search">
 			EXISTS (SELECT 1 FROM dbo.SC_SPLIT(@arg_search, ',') A WHERE A.Item <> '' AND (u_mattress.mattresscode LIKE '%'+LTRIM(RTRIM(A.Item))+'%' OR u_mattress.mattressrelcode like '%'+LTRIM(RTRIM(A.Item))+'%' OR u_mattress.mattressname like '%'+LTRIM(RTRIM(A.Item))+'%'))
 		</when>
+		<when notnull="@arg_erp_mtrlcode">
+			EXISTS (SELECT 1 FROM dbo.SC_SPLIT(@arg_erp_mtrlcode, ',') A WHERE A.Item <> '' AND (u_mattress.erp_mtrlcode LIKE '%'+LTRIM(RTRIM(A.Item))+'%'))
+		</when>
 	</where>
 	<orderstr>
 		mattressid DESC

+ 7 - 2
JLHHJSvr/Helper/InterfaceHelper.cs

@@ -518,13 +518,18 @@ namespace JLHHJSvr.Helper
             }
             // 刺绣
             var cixiuList = jianmianList.Where(t => t.formulakind == 6).ToList();
+            var ls_temp_cnt = 0;
             for (int i = 0; i < cixiuList.Count; i++)
             {
                 var mx = cixiuList[i];
                 if (string.IsNullOrEmpty(mx.chastr) && mx.mtrlid > 0)
                 {
-                    interfaceList.Add(InserMattressInterfacePz("拉手刺绣及其他工艺", $"侧刺绣{i + 1}做法", 1, new string[] { "" }));
-                    interfaceList.Add(InserMattressInterfacePz("拉手刺绣及其他工艺", $"侧刺绣{i + 1}位置", 0, new string[] { "" }));
+                    for (int k = 0; k < mx.qty; k++)
+                    {
+                        ls_temp_cnt++;
+                        interfaceList.Add(InserMattressInterfacePz("拉手刺绣及其他工艺", $"侧刺绣{ls_temp_cnt}做法", 1, new string[] { "" }));
+                        interfaceList.Add(InserMattressInterfacePz("拉手刺绣及其他工艺", $"侧刺绣{ls_temp_cnt}位置", 0, new string[] { "" }));
+                    }
                 }
             }
             // 大侧压压布