ソースを参照

核价后台:1、修复同步报价录入字段;2、新增覆盖半成品归属接口

chen_yjin 3 週間 前
コミット
bc4d3a5a9a

+ 27 - 0
JLHHJSvr/Com/GetResetWiptype.cs

@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using JLHHJSvr.Com.Model;
+using LJLib.Net.SPI.Com;
+
+namespace JLHHJSvr.Com
+{
+    public sealed class GetResetWiptypeRequest : ILJRequest<GetResetWiptypeResponse>
+    {
+        public override string GetApiName()
+        {
+            return "GetResetWiptype";
+        }
+        /// <summary>
+        /// 登录token
+        /// </summary>
+        public string token { get; set; }
+        public List<u_mattress_interface_qd> qdList { get; set; }
+    }
+
+    public sealed class GetResetWiptypeResponse : LJResponse
+    {
+        public List<u_mattress_interface_qd> qdList { get; set; }
+    }
+}

+ 49 - 0
JLHHJSvr/Excutor/GetResetWiptypeExcutor.cs

@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Data.SqlClient;
+using System.Linq;
+using DirectService.Tools;
+using JLHHJSvr.BLL;
+using JLHHJSvr.Com;
+using JLHHJSvr.Com.Model;
+using JLHHJSvr.Helper;
+using JLHHJSvr.LJException;
+using LJLib.DAL.SQL;
+using LJLib.Net.SPI.Server;
+
+namespace JLHHJSvr.Excutor
+{
+    internal sealed class GetResetWiptypeExcutor : ExcutorBase<GetResetWiptypeRequest, GetResetWiptypeResponse>
+    {
+        protected override void ExcuteInternal(GetResetWiptypeRequest request, object state, GetResetWiptypeResponse rslt)
+        {
+            var tokendata = BllHelper.GetToken(request.token);
+            if (tokendata == null)
+            {
+                rslt.ErrMsg = "会话已经中断,请重新登录";
+                return;
+            }
+
+            using (var con = new SqlConnection(GlobalVar.ConnectionString))
+            using (var cmd = con.CreateCommand())
+            {
+                con.Open();
+
+                var qdList = request.qdList;
+                foreach (var qdmx in qdList)
+                {
+                    var _bcpcompare = new u_bcpcompare() { pzname = qdmx.bj_pzname };
+                    var _wip_type = "";
+                    if (DbSqlHelper.SelectOne(cmd, _bcpcompare, "wip_type") == 1)
+                    {
+                        _wip_type = _bcpcompare.wip_type;
+                    }
+                    qdmx.wip_type = _wip_type;
+                }
+
+
+                rslt.qdList = qdList;
+            }
+        }
+    }
+}

+ 31 - 21
JLHHJSvr/Form2.Designer.cs

@@ -42,26 +42,29 @@
             // label1
             // 
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(37, 224);
+            this.label1.Location = new System.Drawing.Point(74, 448);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(143, 12);
+            this.label1.Size = new System.Drawing.Size(286, 24);
             this.label1.TabIndex = 0;
-            this.label1.Text = "mattressid列表,逗号分隔";
+            this.label1.Text = "报价唯一码列表,逗号分隔";
             // 
             // textBox1
             // 
-            this.textBox1.Location = new System.Drawing.Point(39, 239);
+            this.textBox1.Location = new System.Drawing.Point(78, 478);
+            this.textBox1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.textBox1.Multiline = true;
             this.textBox1.Name = "textBox1";
             this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
-            this.textBox1.Size = new System.Drawing.Size(736, 133);
+            this.textBox1.Size = new System.Drawing.Size(1468, 262);
             this.textBox1.TabIndex = 1;
             // 
             // button1
             // 
-            this.button1.Location = new System.Drawing.Point(645, 378);
+            this.button1.Location = new System.Drawing.Point(1290, 756);
+            this.button1.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(75, 23);
+            this.button1.Size = new System.Drawing.Size(150, 46);
             this.button1.TabIndex = 2;
             this.button1.Text = "同步";
             this.button1.UseVisualStyleBackColor = true;
@@ -69,60 +72,66 @@
             // 
             // textBox2
             // 
-            this.textBox2.Location = new System.Drawing.Point(174, 65);
+            this.textBox2.Location = new System.Drawing.Point(348, 130);
+            this.textBox2.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.textBox2.Name = "textBox2";
-            this.textBox2.Size = new System.Drawing.Size(100, 21);
+            this.textBox2.Size = new System.Drawing.Size(196, 35);
             this.textBox2.TabIndex = 3;
             this.textBox2.Text = "super";
             // 
             // textBox3
             // 
-            this.textBox3.Location = new System.Drawing.Point(174, 113);
+            this.textBox3.Location = new System.Drawing.Point(348, 226);
+            this.textBox3.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.textBox3.Name = "textBox3";
-            this.textBox3.Size = new System.Drawing.Size(100, 21);
+            this.textBox3.Size = new System.Drawing.Size(196, 35);
             this.textBox3.TabIndex = 4;
             this.textBox3.UseSystemPasswordChar = true;
             // 
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(91, 73);
+            this.label2.Location = new System.Drawing.Point(182, 146);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(41, 12);
+            this.label2.Size = new System.Drawing.Size(82, 24);
             this.label2.TabIndex = 5;
             this.label2.Text = "用户名";
             // 
             // label3
             // 
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(93, 121);
+            this.label3.Location = new System.Drawing.Point(186, 242);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(29, 12);
+            this.label3.Size = new System.Drawing.Size(58, 24);
             this.label3.TabIndex = 6;
             this.label3.Text = "密码";
             // 
             // textBox4
             // 
-            this.textBox4.Location = new System.Drawing.Point(174, 27);
+            this.textBox4.Location = new System.Drawing.Point(348, 54);
+            this.textBox4.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.textBox4.Name = "textBox4";
-            this.textBox4.Size = new System.Drawing.Size(601, 21);
+            this.textBox4.Size = new System.Drawing.Size(1198, 35);
             this.textBox4.TabIndex = 7;
             this.textBox4.Text = "http://8.134.222.185:9076/api/common/";
             // 
             // label4
             // 
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(93, 35);
+            this.label4.Location = new System.Drawing.Point(186, 70);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(47, 12);
+            this.label4.Size = new System.Drawing.Size(94, 24);
             this.label4.TabIndex = 8;
             this.label4.Text = "api前缀";
             // 
             // Form2
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(800, 450);
+            this.ClientSize = new System.Drawing.Size(1600, 900);
             this.Controls.Add(this.label4);
             this.Controls.Add(this.textBox4);
             this.Controls.Add(this.label3);
@@ -132,6 +141,7 @@
             this.Controls.Add(this.button1);
             this.Controls.Add(this.textBox1);
             this.Controls.Add(this.label1);
+            this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
             this.Name = "Form2";
             this.Text = "Form2";
             this.ResumeLayout(false);

ファイルの差分が大きいため隠しています
+ 6 - 4
JLHHJSvr/Form2.cs


+ 1 - 0
JLHHJSvr/GlobalVar/GlobalVar.cs

@@ -237,6 +237,7 @@ namespace JLHHJSvr
                 excutorManager.AddMap("FormulaCheck", typeof(FormulaCheckRequest),new FormulaCheckExcutor());
 
                 excutorManager.AddMap("JLH_FetchPrice", typeof(JLH_FetchPriceRequest), new JLH_FetchPriceExcutor());
+                excutorManager.AddMap("GetResetWiptype", typeof(GetResetWiptypeRequest), new GetResetWiptypeExcutor());
             }
             catch (Exception ex)
             {

+ 9 - 1
JLHHJSvr/Helper/InterfaceHelper.cs

@@ -1256,6 +1256,13 @@ namespace JLHHJSvr.Helper
         /// <returns></returns>
         public u_mattress_interface_qd InserMattressInterfacePrdPf(string itemname, string bj_pzname, string namemx, int mtrlid, decimal useqty, int formulaid = 0)
         {
+            var _bcpcompare = new u_bcpcompare() { pzname = bj_pzname };
+            var _wip_type = "";
+            if (DbSqlHelper.SelectOne(cmd, _bcpcompare, "wip_type") == 1)
+            {
+                _wip_type = _bcpcompare.wip_type;
+            }
+
             var mattress_interface_qd = new u_mattress_interface_qd()
             {
                 itemname = itemname,
@@ -1263,7 +1270,8 @@ namespace JLHHJSvr.Helper
                 bj_pzname_mx = namemx,
                 mtrlid = mtrlid,
                 useqty = useqty,
-                formulaid = formulaid
+                formulaid = formulaid,
+                wip_type = _wip_type
             };
 
             return mattress_interface_qd;

+ 3 - 0
JLHHJSvr/JLHHJSvr.csproj

@@ -102,6 +102,7 @@
     <Compile Include="Com\CreatPrdPf.cs" />
     <Compile Include="Com\DeleteMattressExtraType.cs" />
     <Compile Include="Com\DeleteMattressExtra.cs" />
+    <Compile Include="Com\GetResetWiptype.cs" />
     <Compile Include="Com\GetMattressSubspecs.cs" />
     <Compile Include="Com\JLH_FetchPrice.cs" />
     <Compile Include="Com\ChangePassword.cs" />
@@ -114,6 +115,7 @@
     <Compile Include="Com\Model\u_mattress_extra.cs" />
     <Compile Include="Com\Model\u_mattress_mx_extra.cs" />
     <Compile Include="Com\Model\u_mattress_mx_subspecs.cs" />
+    <Compile Include="Com\Model\u_bcpcompare.cs" />
     <Compile Include="Com\SaveMattressExtraType.cs" />
     <Compile Include="Com\SaveMattressExtra.cs" />
     <Compile Include="Com\UnLockUser.cs" />
@@ -302,6 +304,7 @@
     <Compile Include="Excutor\DeleteMattressExtraExcutor.cs" />
     <Compile Include="Excutor\FormulaCheckExcutor.cs" />
     <Compile Include="Excutor\GetFormulaVarListExcutor.cs" />
+    <Compile Include="Excutor\GetResetWiptypeExcutor.cs" />
     <Compile Include="Excutor\GetMattressSubspecsExcutor.cs" />
     <Compile Include="Excutor\JLH_FetchPriceExcutor.cs" />
     <Compile Include="Excutor\ChangePasswordExcutor.cs" />