From 098e233106dcae6fbb26f876bc409d56e9dc3d33 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE=E7=94=B7?= <446507344@qq.com>
Date: Thu, 7 Mar 2024 09:02:42 +0800
Subject: [PATCH] 111
---
APPQ5/QMAPP.FJC.DAL/ProductionPlan/WorkOrderDAL.cs | 4 ++--
APPQ5/QMAPP.FJC.TRACING/DataValidators/PlanValidator.cs | 2 +-
APPQ5/QMAPP.WinForm/App.config | 2 +-
APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm_316.cs | 4 +++-
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/APPQ5/QMAPP.FJC.DAL/ProductionPlan/WorkOrderDAL.cs b/APPQ5/QMAPP.FJC.DAL/ProductionPlan/WorkOrderDAL.cs
index 74a10a5..e206cd6 100644
--- a/APPQ5/QMAPP.FJC.DAL/ProductionPlan/WorkOrderDAL.cs
+++ b/APPQ5/QMAPP.FJC.DAL/ProductionPlan/WorkOrderDAL.cs
@@ -879,8 +879,8 @@ namespace QMAPP.FJC.DAL.ProductionPlan
sql.AppendFormat(" LEFT JOIN [T_PP_ORDERPLAN] AS P ");
sql.AppendFormat(" ON P.[PID]=W.[ORDERPLANID] ");
sql.AppendFormat(" LEFT JOIN [T_MD_MATERIAL] AS M ");
- sql.AppendFormat(" ON W.[MATERIAL_CODE]=M.[MATERIAL_CODE] ");
- sql.AppendFormat(" WHERE W.[PID]=@orderplan_pid ");
+ sql.AppendFormat(" ON W.[MATERIAL_CODE]=M.[MATERIAL_CODE] WHERE 1 = 1");
+ sql.AppendFormat(" and W.[PID]=@orderplan_pid ");
sql.AppendLine(" AND W.[STATE]<>'4' ");
sql.AppendFormat(" ORDER BY W.[PRI],W.[PLAN_DATE],P.PLAN_SEQ,W.[SEQ],W.[MATERIAL_CODE] ");
diff --git a/APPQ5/QMAPP.FJC.TRACING/DataValidators/PlanValidator.cs b/APPQ5/QMAPP.FJC.TRACING/DataValidators/PlanValidator.cs
index 9d48a2e..339ea2b 100644
--- a/APPQ5/QMAPP.FJC.TRACING/DataValidators/PlanValidator.cs
+++ b/APPQ5/QMAPP.FJC.TRACING/DataValidators/PlanValidator.cs
@@ -25,7 +25,7 @@ namespace QMAPP.FJC.TRACING.DataValidators
//--------------------BC316总成装配工位----------------------------------------------------------
- if (data.WorkLocState.WORKCELL_CODE == "ASSEMBLE_BC316")
+ if (data.WorkLocState.WORKCELL_CODE == "ASSEMBLE_BC316" && !string.IsNullOrEmpty(data.WorkLocState.CurrentState.ORDERPLAN_PID))
{
//20220501 DQzhang 用pid 获取重新排序后的第一条派工单
workorder = workorderdal.GetNewFirstOrderInLoc(data.WorkLocState.CurrentState.ORDERPLAN_PID, data.MouldCode);
diff --git a/APPQ5/QMAPP.WinForm/App.config b/APPQ5/QMAPP.WinForm/App.config
index 0f6c1d1..67e5afe 100644
--- a/APPQ5/QMAPP.WinForm/App.config
+++ b/APPQ5/QMAPP.WinForm/App.config
@@ -247,7 +247,7 @@
-->
-
+
diff --git a/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm_316.cs b/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm_316.cs
index 35d072a..b446bb9 100644
--- a/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm_316.cs
+++ b/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm_316.cs
@@ -641,7 +641,9 @@ namespace QMAPP.WinForm.Forms.Operation
if (fisPlanTable.Rows.Count < 1)
{
- throw new Exception("没有fis计划,请创建计划!");
+ //throw new Exception("没有fis计划,请创建计划!");
+ MessageBox.Show("没有fis计划,请创建计划!");
+ return;
}
DataRow fisPlanRow = fisPlanTable.Rows[0];
var orderid = this.dgvPlan.SelectedRows[0].Cells[1].Value.ToString();