Sfoglia il codice sorgente

1、优化床网代码
2、更新床垫报价保存代码

MY 5 mesi fa
parent
commit
79f5b0a7b3

+ 50 - 0
JLHHJSvr/BLL/HelperBase.cs

@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace JLHHJSvr.BLL
+{
+    internal abstract class HelperBase
+    {
+        /// <summary>
+        /// 数据库连接
+        /// </summary>
+        public SqlCommand cmd { get; set; }
+        /// <summary>
+        /// 预留的上下文
+        /// </summary>
+        public Context context { get; set; }
+        public static T GetHelper<T>(SqlCommand cmd) where T : HelperBase, new()
+        {
+            var rslt = new T();
+            rslt.cmd = cmd;
+            return rslt;
+        }
+
+        public static T GetHelper<T>(SqlCommand cmd, Context context) where T : HelperBase, new()
+        {
+            var rslt = new T();
+            rslt.cmd = cmd;
+            rslt.context = context ?? new Context();
+            return rslt;
+        }
+
+        public sealed class Context
+        {
+            private DateTime _opdate = DateTime.Now;
+
+            public DateTime opdate
+            {
+                get { return _opdate; }
+                set { _opdate = value; }
+            }
+            /// <summary>
+            /// 用户登陆信息
+            /// </summary>
+            public TokenData tokendata { get; set; }
+        }
+    }
+}

+ 4 - 0
JLHHJSvr/Com/Model/u_bednet.cs

@@ -192,5 +192,9 @@ namespace JLHHJSvr.Com.Model
         public decimal? fork_weight_qty { get; set; }
         public int? if_jb { get; set; }
 
+        #region
+        public int? pricelistid { get; set; }
+        public string typename { get; set; }
+        #endregion
     }
 }

+ 9 - 1
JLHHJSvr/Com/Model/u_mattress_mx_mtrl.cs

@@ -36,6 +36,14 @@ namespace JLHHJSvr.Com.Model
         public string gydscrp { get; set; }
         public string cw_erpmtrlcode { get; set; }
         public int? erp_mtrlid { get; set; }
-
+        #region 其他
+        /// <summary>
+        /// 区分床垫Tab 0-面料 1-垫层 2-辅料 3-包装 4-杂料 99-床网 101-102-内布套 103-顶布裥棉
+        /// </summary>
+        public int? formulatype { get; set; }
+        public int? formulakind { get; set; }
+        public string sortcode { get; set; }
+        public string mtrlname { get; set; }
+        #endregion
     }
 }

+ 4 - 1
JLHHJSvr/Com/Model/u_mattress_type.cs

@@ -1,10 +1,13 @@
-using System;
+using LJLib.DAL.SQL;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 
 namespace JLHHJSvr.Com.Model
 {
+
+    [PK(new[] { "mattresstypeid" })]
     public sealed class u_mattress_type
     {
         /// <summary>

File diff suppressed because it is too large
+ 14 - 1791
JLHHJSvr/Excutor/SaveBedNetExcutor.cs


File diff suppressed because it is too large
+ 12 - 87
JLHHJSvr/Excutor/SaveMattressExcutor.cs


File diff suppressed because it is too large
+ 1942 - 0
JLHHJSvr/Helper/BedNetHelper.cs


File diff suppressed because it is too large
+ 930 - 0
JLHHJSvr/Helper/MattressHelper.cs


+ 3 - 0
JLHHJSvr/JLHHJSvr.csproj

@@ -58,6 +58,7 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="BLL\FuncPowerHelper.cs" />
+    <Compile Include="BLL\HelperBase.cs" />
     <Compile Include="BLL\UserHelper.cs" />
     <Compile Include="BLL\BllHelper.cs" />
     <Compile Include="BLL\TokenData.cs" />
@@ -286,6 +287,8 @@
     <Compile Include="Excutor\GetSysUserFileStringExcutor.cs" />
     <Compile Include="Excutor\SetSysUserFileStringExcutor.cs" />
     <Compile Include="Excutor\SetOptionExcutor.cs" />
+    <Compile Include="Helper\BedNetHelper.cs" />
+    <Compile Include="Helper\MattressHelper.cs" />
     <Compile Include="ImgHelper\ImgHelper.cs" />
     <Compile Include="LJFrameWork\LJException\LJException.cs" />
     <Compile Include="LJFrameWork\LJLib.Method\SortedListEx.cs" />