ソースを参照

1、多区新增是否有包边参数
2、调整床垫面料侧边的排序
3、床垫报价,垫层tab的规格尺寸超长时读取床垫尺寸

chen_yjin 1 ヶ月 前
コミット
cc409e7713

+ 15 - 0
JLHHJSvr/Com/Model/u_bednet_area.cs

@@ -45,5 +45,20 @@ namespace JLHHJSvr.Com.Model
         /// 七区比例
         /// </summary>
         public decimal? area_7 { get; set; }
+        public decimal? sponge_1 { get; set; }
+        public decimal? sponge_2 { get; set; }
+        public decimal? sponge_3 { get; set; }
+        public decimal? sponge_4 { get; set; }
+        public decimal? sponge_5 { get; set; }
+        public decimal? sponge_6 { get; set; }
+        public decimal? sponge_7 { get; set; }
+        public decimal? sponge_8 { get; set; }
+        public decimal? sponge_9 { get; set; }
+        public decimal? sponge_10 { get; set; }
+        public decimal? sponge_11 { get; set; }
+        public decimal? sponge_12 { get; set; }
+        public decimal? sponge_13 { get; set; }
+        public decimal? sponge_14 { get; set; }
+        public decimal? sponge_15 { get; set; }
     }
 }

+ 3 - 0
JLHHJSvr/DataStore/_Mapper_deptid.xml

@@ -13,6 +13,9 @@ FROM u_dept
 	  <when notnull="@deptid">
 		  u_dept.deptid = @deptid
 	  </when>
+	  <when $user_deptstr!="0">
+		  u_dept.deptid IN ($$user_deptstr$$) OR u_dept.deptid = -1
+	  </when>
   </where>
   <displayfields>
   </displayfields>

+ 15 - 0
JLHHJSvr/DataStore/web_bednet_arealist.xml

@@ -18,6 +18,21 @@ SELECT u_bednet_area.areaid
 	,u_bednet_area.area_13
 	,u_bednet_area.area_14
 	,u_bednet_area.area_15
+	,sponge_1
+	,sponge_2
+	,sponge_3
+	,sponge_4
+	,sponge_5
+	,sponge_6
+	,sponge_7
+	,sponge_8
+	,sponge_9
+	,sponge_10
+	,sponge_11
+	,sponge_12
+	,sponge_13
+	,sponge_14
+	,sponge_15
 FROM u_bednet_area
   </selectstr>
   <where>

+ 9 - 1
JLHHJSvr/DataStore/web_mattress_formulalist.xml

@@ -34,7 +34,15 @@ FROM u_mattress_formula
 	  </when>
   </where>
 	<orderstr>
-		formulatype, sortcode
+		formulatype, sortcode, 
+		CASE
+			WHEN formulakind = 2 THEN 1
+			WHEN formulakind = 82 THEN 2
+			WHEN formulakind = 42 THEN 3
+			WHEN formulakind = 52 THEN 4
+			WHEN formulakind = 62 THEN 5
+			WHEN formulakind = 72 THEN 6
+		END
 	</orderstr>
   <displayfields>
     <field field="pid" compute="getrow()">序</field>

+ 2 - 2
JLHHJSvr/Excutor/SaveBedNetAreaExcutor.cs

@@ -48,12 +48,12 @@ namespace JLHHJSvr.Excutor
                 {
                     try
                     {
-                        var fields = "areaid,areaname,area_1,area_2,area_3,area_4,area_5,area_6,area_7,area_8,area_9,area_10,area_11,area_12,area_13,area_14,area_15";
+                        var fields = "areaname,area_1,area_2,area_3,area_4,area_5,area_6,area_7,area_8,area_9,area_10,area_11,area_12,area_13,area_14,area_15,sponge_1,sponge_2,sponge_3,sponge_4,sponge_5,sponge_6,sponge_7,sponge_8,sponge_9,sponge_10,sponge_11,sponge_12,sponge_13,sponge_14,sponge_15";
                         if (request.area.areaid <= 0)
                         {
                             request.area.areaid = BllHelper.GetID(cmd, "u_bednet_area");
 
-                            DbSqlHelper.Insert(cmd, "u_bednet_area", null, request.area, fields);
+                            DbSqlHelper.Insert(cmd, "u_bednet_area", null, request.area, "areaid," + fields);
                         }
                         else
                         {

+ 14 - 12
JLHHJSvr/Helper/MattressHelper.cs

@@ -102,8 +102,8 @@ namespace JLHHJSvr.Helper
 
                     string expression = ConvertToEnglishSymbols(mx.formula), use_expression = ConvertToEnglishSymbols(mx.useformula);
 
-                    expression = InitMxSideReplaceMents(mx, diancengList, mattersstype, expression);
-                    use_expression = InitMxSideReplaceMents(mx, diancengList, mattersstype,use_expression);
+                    expression = InitMxSideReplaceMents(mattress, mx, diancengList, mattersstype, expression);
+                    use_expression = InitMxSideReplaceMents(mattress, mx, diancengList, mattersstype,use_expression);
 
                     #region 替换布料幅宽
                     //大侧
@@ -137,14 +137,14 @@ namespace JLHHJSvr.Helper
                     //内布套
                     if (new List<int>() { 101,102,103,104,105,106 }.Contains(mx.formulakind.Value))
                     {
-                        expression = InitMxClothHeightReplaceMents(mx, expression, mxlist, 101);
-                        use_expression = InitMxClothHeightReplaceMents(mx, use_expression, mxlist, 101);
+                        expression = InitMxClothHeightReplaceMents(mattress, mx, expression, mxlist, 101);
+                        use_expression = InitMxClothHeightReplaceMents(mattress, mx, use_expression, mxlist, 101);
                     }
                     //外布套
                     if (new List<int>() { 111, 112, 113, 114, 115, 116 }.Contains(mx.formulakind.Value))
                     {
-                        expression = InitMxClothHeightReplaceMents(mx, expression, mxlist, 111);
-                        use_expression = InitMxClothHeightReplaceMents(mx, use_expression, mxlist, 111);
+                        expression = InitMxClothHeightReplaceMents(mattress, mx, expression, mxlist, 111);
+                        use_expression = InitMxClothHeightReplaceMents(mattress, mx, use_expression, mxlist, 111);
                     }
                     #endregion
 
@@ -568,7 +568,7 @@ namespace JLHHJSvr.Helper
         /// <param name="mattersstype"></param>
         /// <param name="expression"></param>
         /// <returns></returns>
-        private string InitMxSideReplaceMents(u_mattress_mx_mtrl mx,List<u_mattress_mx_mtrl> diancengList, u_mattress_type mattersstype, string expression)
+        private string InitMxSideReplaceMents(u_mattress mattress, u_mattress_mx_mtrl mx,List<u_mattress_mx_mtrl> diancengList, u_mattress_type mattersstype, string expression)
         {
             // 获取垫层的数据
             decimal bigSum = 0, smallSum = 0, vSum = 0;
@@ -626,8 +626,10 @@ namespace JLHHJSvr.Helper
             }
             #endregion
 
-            if (mx.mattress_width != null && mx.mattress_width > 0) expression = expression.Replace("【规格宽】", $"{mx.mattress_width}");
-            if (mx.mattress_length != null && mx.mattress_length > 0) expression = expression.Replace("【规格长】", $"{mx.mattress_length}");
+            #region 若填写则顶替床垫尺寸
+            if (mx.mattress_width != null && mx.mattress_width > 0 && mx.mattress_width <= mattress.mattress_width) expression = expression.Replace("【规格宽】", $"{mx.mattress_width}");
+            if (mx.mattress_length != null && mx.mattress_length > 0 && mx.mattress_length <= mattress.mattress_length) expression = expression.Replace("【规格长】", $"{mx.mattress_length}");
+            #endregion
 
             return expression;
         }
@@ -656,15 +658,15 @@ namespace JLHHJSvr.Helper
         /// </summary>
         /// <param name="mxlist"></param>
         /// <param name="formulakind"></param>
-        private string InitMxClothHeightReplaceMents(u_mattress_mx_mtrl mx, string expression, List<u_mattress_mx_mtrl> mxlist, int formulakind)
+        private string InitMxClothHeightReplaceMents(u_mattress mattress, u_mattress_mx_mtrl mx, string expression, List<u_mattress_mx_mtrl> mxlist, int formulakind)
         {
             decimal cloth_height = 0;
             cloth_height = mxlist.First(t => t.formulakind.Value == formulakind).thickness.Value;
 
             AddKeyValue("布套高", cloth_height);
 
-            if (mx.mattress_width != null && mx.mattress_width > 0) expression = expression.Replace("【规格宽】", $"{mx.mattress_width}");
-            if (mx.mattress_length != null && mx.mattress_length > 0) expression = expression.Replace("【规格长】", $"{mx.mattress_length}");
+            if (mx.mattress_width != null && mx.mattress_width > 0 && mx.mattress_width <= mattress.mattress_width) expression = expression.Replace("【规格宽】", $"{mx.mattress_width}");
+            if (mx.mattress_length != null && mx.mattress_length > 0 && mx.mattress_length <= mattress.mattress_length) expression = expression.Replace("【规格长】", $"{mx.mattress_length}");
 
             return expression;
         }