From 51cfd909a5e61910dcbf3102e0b8e2774269c905 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 16 五月 2025 10:39:27 +0800
Subject: [PATCH] 宝工:生产计划排产导入时,日计划工单的生产车间id根据导入文件中的生产车间编码进行设置
---
WebAPI/Controllers/BaseSet/Gy_ProcessController.cs | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs b/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs
index 4d21c5d..a6522b0 100644
--- a/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs
@@ -771,6 +771,18 @@
if (HItemID == 0)
{
oCN.BeginTran();
+ //鍒ゆ柇浠g爜鏄惁閲嶅
+ DataSet dss;
+ dss = oCN.RunProcReturn("select * from Gy_Process where HNumber='" + HNumber + "'", "Gy_Process");
+ //鍒ゆ柇鏄惁鍙紪杈�
+ if (dss.Tables[0].Rows.Count!=0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁浠g爜閲嶅涓嶅厑璁告柊澧�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
//淇濆瓨鍓嶆帶鍒�=========================================
string sql1 = "exec h_p_Gy_Process_BeforeSaveCtrl " + HMakeEmp + ",'" + 1 + "'";
ds = oCN.RunProcReturn(sql1, "h_p_Gy_Process_BeforeSaveCtrl");
@@ -845,7 +857,18 @@
{
//鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
oCN.BeginTran();
-
+ //宸插鏍镐笉鍏佽淇敼
+ DataSet dss;
+ dss = oCN.RunProcReturn("select * from Gy_Process where HItemID=" + HItemID, "Gy_Process");
+ //鍒ゆ柇鏄惁鍙紪杈�
+ if (dss.Tables[0].Rows[0]["HCheckEmp"].ToString() != "" )
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "姝ゅ崟鎹姸鎬佸凡缁忓鏍革紝涓嶅厑璁镐慨鏀癸紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
//淇濆瓨鍓嶆帶鍒�=========================================
string sql1 = "exec h_p_Gy_Process_BeforeSaveCtrl " + HMakeEmp + ",'" + 2 + "'";
ds = oCN.RunProcReturn(sql1, "h_p_Gy_Process_BeforeSaveCtrl");
@@ -880,7 +903,7 @@
",HTypeCount= '" + HTypeCount + "'" +
",HDeptNumber='" + HDeptNumber + "'" +
",HSNo= " + HSNo +
- ",HUseFlag= " + HUseFlag +
+ ",HUseFlag= '" + HUseFlag + "'" +
",HLevel= " + HLevel +
",HEndFlag= '" + HEndFlag + "'" +
",HTProcessFlag= '" + HTProcessFlag + "'" +
--
Gitblit v1.9.1