From 4865d02a4b21285b1cba3f180a0fad5480aef5be Mon Sep 17 00:00:00 2001 From: "songnan.zhang" Date: Wed, 10 Aug 2022 07:56:08 +0800 Subject: [PATCH] 11 --- .../QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs | 38 ++++++++++--------- .../QMAPP.WinForm/Properties/AssemblyInfo.cs | 4 +- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs b/APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs index 801c5fe..40b98b0 100644 --- a/APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs +++ b/APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmPlace.cs @@ -1229,34 +1229,38 @@ namespace QMAPP.WinForm.Forms.TianJin //物料 var mach = inputstring.Substring(4, inputstring.Length - 4); var plan = new TJOrderPlan(); - - plan.PID = Guid.NewGuid().ToString(); + plan.PLAN_DATE = DateTime.Now; - plan.MATERIAL_CODE = mach; - plan.QTY = defaultNum; + plan.QTY = defaultNum/2; if (mach.Substring(0, 3) == "770") plan.LINENO = "770B"; else plan.LINENO = "018D"; - - foreach (var rule in _barcodeRules) + foreach (var s in "F,R".Split(',')) { - if (System.Text.RegularExpressions.Regex.IsMatch(mach+"1", rule.REGEX)) + plan.PID = Guid.NewGuid().ToString(); + + plan.MATERIAL_CODE = mach.Substring(0, mach.Length - 1) + s + mach.Substring(mach.Length - 1,1); + + foreach (var rule in _barcodeRules) { - plan.MATERIAL_CODE = rule.MATERIAL_CODE; + if (System.Text.RegularExpressions.Regex.IsMatch(plan.MATERIAL_CODE + "1", rule.REGEX)) + { + plan.MATERIAL_CODE = rule.MATERIAL_CODE; + } } - } - var list = agent.InvokeServiceFunction>("TJDoorPlankPlanBLL_GetListMachine", plan.MATERIAL_CODE); - if (list != null) - plan.MATERIAL_NAME = list[0].MATERIALNAME; + //var list = agent.InvokeServiceFunction>("TJDoorPlankPlanBLL_GetListMachine", plan.MATERIAL_CODE); + //if (list != null) + // plan.MATERIAL_NAME = list[0].MATERIALNAME; - //QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); - var RESULT = agent.InvokeServiceFunction>("TJDoorPlankPlanBLL_Insert", plan); - if (RESULT.IsSuccess == true) - { - agent.InvokeServiceFunction>("TJDoorPlankPlanBLL_PutOut", plan.PID); + //QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + var RESULT = agent.InvokeServiceFunction>("TJDoorPlankPlanBLL_Insert", plan); + if (RESULT.IsSuccess == true) + { + agent.InvokeServiceFunction>("TJDoorPlankPlanBLL_PutOut", plan.PID); + } } return; } diff --git a/APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs b/APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs index 9045992..d4d6124 100644 --- a/APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs +++ b/APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, // 方法是按如下所示使用“*”: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2022.08.09.01")] -[assembly: AssemblyFileVersion("2022.08.09.01")] +[assembly: AssemblyVersion("2022.08.10.01")] +[assembly: AssemblyFileVersion("2022.08.10.01")]