From 53cbb390604ddfe5c87c4ab05208cc7252040a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE=E7=94=B7?= <446507344@qq.com> Date: Fri, 29 Mar 2024 08:07:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4MP3=E5=8F=91=E8=BF=90?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E5=87=BA=E5=BA=93MP4=E7=9A=84=E6=9D=A1?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APPQ5/QMAPP.FJC.DAL/FrmPlace/FrmPlaceDAL.cs | 25 +++++++++++++++++-- .../DAHandler/DataAcquirer.cs | 2 +- .../DataValidators/PlanValidator.cs | 5 ++-- APPQ5/QMAPP.WinForm/App.config | 8 +++--- .../WCF/QMFrameWork.WebServiceHost/Web.config | 2 +- 5 files changed, 31 insertions(+), 11 deletions(-) diff --git a/APPQ5/QMAPP.FJC.DAL/FrmPlace/FrmPlaceDAL.cs b/APPQ5/QMAPP.FJC.DAL/FrmPlace/FrmPlaceDAL.cs index 06b27c2..30dfb09 100644 --- a/APPQ5/QMAPP.FJC.DAL/FrmPlace/FrmPlaceDAL.cs +++ b/APPQ5/QMAPP.FJC.DAL/FrmPlace/FrmPlaceDAL.cs @@ -910,6 +910,7 @@ namespace QMAPP.FJC.DAL.FrmPlace ArrayList sqllist = new ArrayList(); + ArrayList sqllistMP4 = new ArrayList(); StringBuilder strSql = new StringBuilder(); StringBuilder strFields = new StringBuilder(); StringBuilder strValues = new StringBuilder(); @@ -943,7 +944,7 @@ namespace QMAPP.FJC.DAL.FrmPlace strSql.Append(" (" + strValues.ToString() + ")"); sqllist.Add(strSql.ToString()); - + List parameters = new List(); foreach (EPasteDetailsCard decard in ppastecard.DetailsCardlist) { int rowindex = strindex; @@ -954,7 +955,19 @@ namespace QMAPP.FJC.DAL.FrmPlace sqllist.Add(strinsertsql.ToString()); sqllist.Add(updatesql.ToString()); sqllist.Add(updatesql2.ToString()); - sqllist.Add(updatesql3.ToString()); + var TABLE = new DataTable(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + TABLE = session.GetTable($"select * from T_AW_PRODUCT where PID = '{decard.PRODUCT_PID}'", parameters.ToArray()); + } + if (TABLE.Rows.Count > 0) + { + sqllist.Add(updatesql3.ToString()); + } + else + { + sqllistMP4.Add(updatesql3.ToString()); + } strindex++; } @@ -970,6 +983,14 @@ namespace QMAPP.FJC.DAL.FrmPlace session.ExecuteSql(sqllist[i].ToString()); } + } + for (var i = 0; i < sqllistMP4.Count; i++) + { + using (IDataSession session = AppDataFactory.CreateSession("maindbBC316_MP4")) + { + session.ExecuteSql(sqllistMP4[i].ToString()); + } + } return reindex; diff --git a/APPQ5/QMAPP.FJC.TRACING/DAHandler/DataAcquirer.cs b/APPQ5/QMAPP.FJC.TRACING/DAHandler/DataAcquirer.cs index 9310a00..157b1a7 100644 --- a/APPQ5/QMAPP.FJC.TRACING/DAHandler/DataAcquirer.cs +++ b/APPQ5/QMAPP.FJC.TRACING/DAHandler/DataAcquirer.cs @@ -82,7 +82,7 @@ namespace QMAPP.FJC.TRACING.DAHandler if (data.OrderPlan == null) { //BC316-MP4 装配首工位 进行计划强校验 - if ("AIRBAG_WELD_BC316".Contains(data.MachineCode)) + if ("AIRBAG_WELD_BC316,UFRAME_WELD_BC316,ANTENNA_BC316,LFRAME_WELD_BC316,AIRDUCT_WELD_BC316MP4,ASSEMBLE_BC316,ASSEMBLE_BC316_2".Contains(data.MachineCode) && data.MachineName.Contains("MP4")) { // QDA3 装配1 强校验第一条计划 var plan = new WorkOrderDAL().GetOrderInCell(data.WorkLocState.WORKCELL_CODE , 1, 1); diff --git a/APPQ5/QMAPP.FJC.TRACING/DataValidators/PlanValidator.cs b/APPQ5/QMAPP.FJC.TRACING/DataValidators/PlanValidator.cs index 339ea2b..5e43f5d 100644 --- a/APPQ5/QMAPP.FJC.TRACING/DataValidators/PlanValidator.cs +++ b/APPQ5/QMAPP.FJC.TRACING/DataValidators/PlanValidator.cs @@ -34,15 +34,14 @@ namespace QMAPP.FJC.TRACING.DataValidators //--------------------BC316帽檐超声波焊接工位---------------------------------------------------- - if (data.WorkLocState.WORKCELL_CODE == "BRIM_WELDING_BC316") + if (data.WorkLocState.WORKCELL_CODE == "BRIM_WELDING_BC316"||("AIRBAG_WELD_BC316,UFRAME_WELD_BC316,ANTENNA_BC316,LFRAME_WELD_BC316,AIRDUCT_WELD_BC316MP4,ASSEMBLE_BC316,ASSEMBLE_BC316_2".Contains(data.MachineCode) && data.MachineName.Contains("MP4"))) { //20230309 DQzhang 获取当前工位第一条派工单 workorder = workorderdal.GetFirstOrderInLoc(data.WorkLocState.WORKCELL_CODE, data.MouldCode); } //----------------------------------------------------------------------------------------------- - - + if (workorder == null) //不存在正在执行的派工单 { diff --git a/APPQ5/QMAPP.WinForm/App.config b/APPQ5/QMAPP.WinForm/App.config index 2664995..ea7c5d5 100644 --- a/APPQ5/QMAPP.WinForm/App.config +++ b/APPQ5/QMAPP.WinForm/App.config @@ -3,15 +3,15 @@ - + + + - +--> diff --git a/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config b/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config index 7249844..ed3ebbc 100644 --- a/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config +++ b/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config @@ -80,8 +80,8 @@ -