From cad1c8c205205ae2f3ba3532c4f456e4449e86ee Mon Sep 17 00:00:00 2001 From: "songnan.zhang" Date: Tue, 31 May 2022 07:25:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APP/QMAPP.Web/Web.config | 6 +- APPMD/QMAPP.MD.Web/Web.config | 4 +- APPQ5/QMAPP.FJC.BLL/FIS/DoorPlankPlanBLL.cs | 2 +- APPQ5/QMAPP.FJC.Web/Web.config | 7 +- .../Forms/Operation/OperationForm.cs | 12 ++ .../Forms/Operation/SignInfoForm.cs | 137 ++++++------------ .../Forms/TianJin/TJPrintPlanLabel.cs | 23 ++- AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs | 6 + ServicesCenter/Task/QMTask.Host/App.config | 1 + .../App_Data/FJCServiceList.xml | 7 + 10 files changed, 98 insertions(+), 107 deletions(-) diff --git a/APP/QMAPP.Web/Web.config b/APP/QMAPP.Web/Web.config index cfda042..7da4d20 100644 --- a/APP/QMAPP.Web/Web.config +++ b/APP/QMAPP.Web/Web.config @@ -49,8 +49,10 @@ - - + + + diff --git a/APPMD/QMAPP.MD.Web/Web.config b/APPMD/QMAPP.MD.Web/Web.config index e0d210c..64df405 100644 --- a/APPMD/QMAPP.MD.Web/Web.config +++ b/APPMD/QMAPP.MD.Web/Web.config @@ -31,9 +31,11 @@ - + + + diff --git a/APPQ5/QMAPP.FJC.BLL/FIS/DoorPlankPlanBLL.cs b/APPQ5/QMAPP.FJC.BLL/FIS/DoorPlankPlanBLL.cs index 7b4ae33..cb51b96 100644 --- a/APPQ5/QMAPP.FJC.BLL/FIS/DoorPlankPlanBLL.cs +++ b/APPQ5/QMAPP.FJC.BLL/FIS/DoorPlankPlanBLL.cs @@ -238,7 +238,7 @@ namespace QMAPP.FJC.BLL.FIS try { - if (model.MATERIAL_CODE.Length <= 8) + if (model.MATERIAL_CODE.Length <= 10) { var listMatral = new TJDoorPlankPlanDAL(); var ListMachine = listMatral.GetListMachine(model.MATERIAL_CODE); diff --git a/APPQ5/QMAPP.FJC.Web/Web.config b/APPQ5/QMAPP.FJC.Web/Web.config index fc74490..4531abf 100644 --- a/APPQ5/QMAPP.FJC.Web/Web.config +++ b/APPQ5/QMAPP.FJC.Web/Web.config @@ -40,8 +40,11 @@ - - + + + + diff --git a/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs b/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs index d2bd149..f389a86 100644 --- a/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs +++ b/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs @@ -109,6 +109,11 @@ namespace QMAPP.WinForm.Forms.Operation private string _DeleteProductLoc = string.Empty; //撤销按钮删除产品信息触发工位 private string _DeleteProductDaiCode = string.Empty; //撤销按钮删除产品信息触发采集点 + /// + /// + /// + public MachineInfo _SignMachineInfo = new MachineInfo(); + #endregion #region 窗体构造函数 @@ -183,6 +188,8 @@ namespace QMAPP.WinForm.Forms.Operation //页面初始化 Init(); + _SignMachineInfo = _operationServiceParam.machineInfo; + //tsbRe.Visible = false; DGViewProList.ClearSelection(); @@ -3632,6 +3639,11 @@ namespace QMAPP.WinForm.Forms.Operation /// private void btnSignInfo_Click(object sender, EventArgs e) { + if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.MACHINECODDE)) + { + MessageBox.Show("请先选择工位!"); + return; + } SignInfoForm frm = new SignInfoForm(this); frm.ShowDialog(); } diff --git a/APPQ5/QMAPP.WinForm/Forms/Operation/SignInfoForm.cs b/APPQ5/QMAPP.WinForm/Forms/Operation/SignInfoForm.cs index baec989..2ee87c6 100644 --- a/APPQ5/QMAPP.WinForm/Forms/Operation/SignInfoForm.cs +++ b/APPQ5/QMAPP.WinForm/Forms/Operation/SignInfoForm.cs @@ -10,17 +10,23 @@ using QMAPP.Entity; namespace QMAPP.WinForm.Forms.Operation { + /// + /// + /// public partial class SignInfoForm : Form { //获取服务代理 QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); - List _bzdConfig = null; + List _bzdConfig = null; + private SignInfo signInfo = new SignInfo(); Product _CurrentProduct = null; private OperationForm _parentForm; - private OperationForm_316 operationForm_316; - + /// + /// + /// + /// public SignInfoForm(OperationForm parentForm) { InitializeComponent(); @@ -29,11 +35,6 @@ namespace QMAPP.WinForm.Forms.Operation _parentForm = parentForm; } - public SignInfoForm(OperationForm_316 operationForm_316) - { - this.operationForm_316 = operationForm_316; - } - #region 打印按钮 /// @@ -46,92 +47,27 @@ namespace QMAPP.WinForm.Forms.Operation try { - if (string.IsNullOrWhiteSpace(cbMaterial.Text)) - { - infolabel.Text = "请选择总成零件号!"; - cbMaterial.Focus(); - return; - } + if (string.IsNullOrWhiteSpace(cbMaterial.Text)) + { + infolabel.Text = "请选择标记类型!"; + cbMaterial.Focus(); + return; + } - if (string.IsNullOrEmpty(txtMainCode.Text)) - { - infolabel.Text = "请扫描或填写装配码!"; + signInfo.ProductCode = txtMainCode.Text; + signInfo.WorkLoc = _parentForm._SignMachineInfo.MACHINECODDE; + signInfo.Type = cbMaterial.Text; - txtMainCode.Focus(); - return; - } - //***************************** - var _Product = _agent.InvokeServiceFunction(B9IPCService.BZDRecorderBLL_GetRecord.ToString(), new BZDRecorder2() { PRODUCTCODE = txtMainCode.Text }); + var result = _agent.InvokeServiceFunction>(B9IPCService.SignInfoBLL_Insert.ToString(), signInfo); - if (_Product == null) + if (result.Result > 0) { - string BZDRule = ""; - DataTable dataTable = _agent.InvokeServiceFunction(B9IPCService.BZDConfigBLL_GetAppConfigValue.ToString(), "BZDRule"); - if (dataTable.Rows.Count > 0) - { - BZDRule = dataTable.Rows[0]["Value"].ToString(); - } - if (string.IsNullOrEmpty(BZDRule)) - { - MessageBox.Show("未配置总成规则!"); - return; - } - string MATERIAL_CODE = cbMaterial.Text.Split('|')[0]; - - if (System.Text.RegularExpressions.Regex.IsMatch(txtMainCode.Text, BZDRule)) - { - //添加补打记录 - _agent.InvokeServiceFunction(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = txtMainCode.Text, Type = "BZD条码补打" }); - - _parentForm.planMATERIAL_CODE = MATERIAL_CODE; - _parentForm.processMainCode = txtMainCode.Text; - //_parentForm.cBoxVAN = false; - - - - //添加T_AW_PRODUCT - var ProductList = SelectProduct(txtMainCode.Text); - var PID = Guid.NewGuid().ToString(); - var ProductNew = new Product() - { - PRODUCTCODE = txtMainCode.Text, - PID = PID, - //MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE, - //MACHINENAME = _operationServiceParam.machineInfo.MACHINENAME, - PRODUCTSOURCE = "0", - MATERIAL_CODE = MATERIAL_CODE, - STATUS = "0", - OUTFLAG = "0", - USINGSTATE = "0", - CAPACITY = 1, - USINGCOUNT = 0, - //WORKCELL_CODE = ProductList.WORKCELL_CODE, - //WORKLOC_CODE = ProductList.WORKLOC_CODE, - //WORKCENTER_CODE = ProductList.WORKCENTER_CODE, - WORKCENTER_CODE = "ASSLINE", - MATERIAL_TYPE = "IP_FINASSY" - }; - //_agent.InvokeServiceFunction>(B9BasicService.ProductBLL_Insert.ToString(), ProductNew); - DataResult result;//判断是否成功 - //result = _agent.InvokeServiceFunction>(B9BasicService.ProductBLL_Insert.ToString(), ProductNew); - result = _agent.InvokeServiceFunction>(B9BasicService.ProductBLL_InsertForBundle.ToString(), ProductNew); - if (!result.IsSuccess) - { - MessageBox.Show(result.Msg); - return; - } - - _parentForm.Print052QRCODE(false,txtMainCode.Text); - - } - else - { - MessageBox.Show("条码规则不符合!"); - } - + infolabel.Text = "保存成功!"; + txtMainCode.Text = ""; + return; } - else - MessageBox.Show("条码已存在!"); + + } catch (Exception exception) { @@ -164,12 +100,9 @@ namespace QMAPP.WinForm.Forms.Operation /// private void PrintForm_Load(object sender, EventArgs e) { - _bzdConfig = - _agent.InvokeServiceFunction>(B9IPCService.BZDConfigBLL_GetAllList.ToString(),""); - foreach (var t in _bzdConfig) - { - t.MATERIALCODDE = t.MATERIALCODDE + "|" + t.ColorDetail; - } + _bzdConfig.Add(new Config { PID = "配胶", MATERIALCODDE = "配胶" }); + _bzdConfig.Add(new Config { PID = "清胶", MATERIALCODDE = "清胶" }); + _bzdConfig.Add(new Config { PID = "表皮新料", MATERIALCODDE = "表皮新料" }); LoadAssyMaterial(); } @@ -188,7 +121,19 @@ namespace QMAPP.WinForm.Forms.Operation this.cbMaterial.DisplayMember = "MATERIALCODDE"; this.cbMaterial.ValueMember = "PID"; } - + /// + /// + /// + public class Config{ + /// + /// + /// + public string PID { get; set; } + /// + /// + /// + public string MATERIALCODDE { get; set; } + } #endregion diff --git a/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs b/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs index d7905b7..6a05318 100644 --- a/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs +++ b/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs @@ -186,9 +186,11 @@ namespace QMAPP.WinForm.Forms.TianJin //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE); QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo(); StringBuilder dataline=new StringBuilder(); + var TMPPath = string.Empty; + var DATPath = string.Empty; foreach (var label in labeldata) { - string[] texts = new string[6]; + string[] texts = new string[8]; var sourcetext = label.Description.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); @@ -198,7 +200,7 @@ namespace QMAPP.WinForm.Forms.TianJin } //OrderNo,OrderType,PlanDate,Name,Class,CarModel,Text1,Text2,Text3,Text4,Text5,Text6 - dataline.AppendFormat("\"{0}\",\"{1}\",\"{2:yyyy-MM-dd HH:mm:ss}\",\"{3}\",\"{4}\",\"{5}\",\"{6}\",\"{7}\",\"{8}\",\"{9}\",\"{10}\",\"{11}\",\"{12}\"\r\n", + dataline.AppendFormat("\"{0}\",\"{1}\",\"{2:yyyy-MM-dd HH:mm:ss}\",\"{3}\",\"{4}\",\"{5}\",\"{6}\",\"{7}\",\"{8}\",\"{9}\",\"{10}\",\"{11}\",\"{12}\",\"{13}\",\"{14}\"\r\n", label.OrderNo,//计划号 label.OrderType,//计划类型(0:FIS,1:STOCK,2:INSERT) label.PlanDate,//计划日期 @@ -211,9 +213,20 @@ namespace QMAPP.WinForm.Forms.TianJin texts[3],//装配详细信息 texts[4],//装配详细信息 texts[5],//装配详细信息 + texts[6],//装配详细信息 + texts[7],//装配详细信息 label.MATERIALCODE// ); - + if (label.OrderNo.Contains("018D")) + { + TMPPath = "PlanLabelTMPPath8D"; + DATPath = "PlanLabelDATPath8D"; + } + else + { + TMPPath = "PlanLabelTMPPath"; + DATPath = "PlanLabelDATPath"; + } } @@ -222,8 +235,8 @@ namespace QMAPP.WinForm.Forms.TianJin QM.Assist.PrintUtil.LabelList2.Add(ll); QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString - (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelTMPPath"].ToString - (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelDATPath"].ToString + (), System.Configuration.ConfigurationManager.AppSettings[TMPPath].ToString + (), System.Configuration.ConfigurationManager.AppSettings[DATPath].ToString ()); #endregion diff --git a/AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs b/AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs index a166c23..b12250c 100644 --- a/AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs +++ b/AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs @@ -4105,6 +4105,12 @@ namespace QMAPP.ServicesAgent [Description("工控机方法枚举")] public enum B9IPCService { + #region + + SignInfoBLL_Insert, + + #endregion + #region 时间验证 CHECKTIMEBLL_Insert, diff --git a/ServicesCenter/Task/QMTask.Host/App.config b/ServicesCenter/Task/QMTask.Host/App.config index 65da47e..0a79fb4 100644 --- a/ServicesCenter/Task/QMTask.Host/App.config +++ b/ServicesCenter/Task/QMTask.Host/App.config @@ -9,6 +9,7 @@ + diff --git a/ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml b/ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml index ae81a8e..1d51899 100644 --- a/ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml +++ b/ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml @@ -981,4 +981,11 @@ QMAPP.FJC.BLL.dll + + SignInfoBLL + 标记信息 + QMAPP.FJC.BLL.Operation.SignInfoBLL + QMAPP.FJC.BLL.dll + + \ No newline at end of file