From 09bef7222f28abfe5fbb308c610997dc52da5f18 Mon Sep 17 00:00:00 2001
From: dytyqx <1342948614@qq.com>
Date: 星期四, 26 二月 2026 08:11:40 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/BaseSet/Gy_MaterialController.cs |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index 6a0abc9..43b9ae1 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -2708,6 +2708,7 @@
                 string HProductDesignSize = mainList[0].HProductDesignSize;  // 浜у搧璁捐灏哄
                 string HGaugeDesignSize = mainList[0].HGaugeDesignSize;  // 妫�鍏疯璁″昂瀵�
                 int HProductQTY = mainList[0].HProductQTY;  // 浜у搧鏁伴噺
+                int HManagerID = mainList[0].HManagerID;  // 璐熻矗浜�
 
                 //淇濆瓨鍓嶆帶鍒�=========================================
                 string HBillNote = "";
@@ -2745,7 +2746,7 @@
                 ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode,HMadeSupID" +
                 ",HMouldClass,HNowWHID,HNowSPID,HInitLife,HMouldUseStatus,HCREATEORGID,HUSEORGID " +
                  ",HMouldLength,HMouldWidth,HMouldHeight,HMouldFoldHeight,HTransPackFlag,HSendPackFlag," +
-                 "HUserID,HBrand,HCalibrationType,HLocation,HCalibrationDate,HCalibrationCycle,HProductDesignSize,HGaugeDesignSize,HProductQTY ) " +
+                 "HUserID,HBrand,HCalibrationType,HLocation,HCalibrationDate,HCalibrationCycle,HProductDesignSize,HGaugeDesignSize,HProductQTY,HManagerID) " +
 
                " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                 "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
@@ -2758,7 +2759,7 @@
                 ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID +
                 ",'" + HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "','" + HMouldUseStatus + "'," + HCREATEORGID + "," + HUSEORGID +
                 "," + HMouldLength + "," + HMouldWidth + "," + HMouldHeight + "," + HMouldFoldHeight + "," + Convert.ToString(HTransPackFlag ? 1 : 0) + "," + Convert.ToString(HSendPackFlag ? 1 : 0) + "," +
-                "'" + HUserID + "','" + HBrand + "','" + HCalibrationType + "','" + HLocation + "','" + HCalibrationDate + "','" + HCalibrationCycle + "','" + HProductDesignSize + "','" + HGaugeDesignSize + "','" + HProductQTY + "') ");
+                "'" + HUserID + "','" + HBrand + "','" + HCalibrationType + "','" + HLocation + "','" + HCalibrationDate + "','" + HCalibrationCycle + "','" + HProductDesignSize + "','" + HGaugeDesignSize + "','" + HProductQTY + "','" + HManagerID + "') ");
 
                 //瀛愯〃
                 oCN.RunProc("Insert into Gy_MouldFileSub " +
@@ -2922,6 +2923,7 @@
                 string HProductDesignSize = mainList[0].HProductDesignSize;  // 浜у搧璁捐灏哄
                 string HGaugeDesignSize = mainList[0].HGaugeDesignSize;  // 妫�鍏疯璁″昂瀵�
                 int HProductQTY = mainList[0].HProductQTY;  // 浜у搧鏁伴噺
+                int HManagerID = mainList[0].HManagerID;  // 璐熻矗浜�
 
                 //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
                 oCN.BeginTran();
@@ -3019,6 +3021,7 @@
                  "',HProductDesignSize='" + HProductDesignSize +
                  "',HGaugeDesignSize='" + HGaugeDesignSize +
                  "',HProductQTY='" + HProductQTY +
+                 "',HManagerID='" + HManagerID +
                  "' where HInterID=" + HInterID.ToString());             
 
                 oCN.RunProc("delete from Gy_MouldFileSub_SubMater where HInterID='" + HInterID + "'");
@@ -3233,16 +3236,24 @@
                     return objJsonResult;
                 }
 
-                ds = oCN.RunProcReturn("select * from Gy_MouldFileMain where HInterID = " + hmainid + " and ISNULL(HChecker,'') <> '' and HPrintQty>0", "Gy_MouldFileMain");
+                ds = oCN.RunProcReturn("select * from Gy_MouldFileMain where HInterID = " + hmainid + " and ISNULL(HChecker,'') <> '' ", "Gy_MouldFileMain");
                 if (ds.Tables[0].Rows.Count > 0)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鍒犻櫎澶辫触锛佸崟鎹凡瀹℃牳鎴栧凡琚墦鍗帮紒";
+                    objJsonResult.Message = "鍒犻櫎澶辫触锛佸崟鎹凡瀹℃牳锛�";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
-
+                ds = oCN.RunProcReturn("select * from Gy_MouldFileMain where HInterID = " + hmainid + "  and HPrintQty>0", "Gy_MouldFileMain");
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍒犻櫎澶辫触锛佸崟鎹凡琚墦鍗帮紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
                 oCN.BeginTran();
                 //鍒犻櫎鍓嶆帶鍒�=========================================
                 ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFile_BeforeDelCtrl " + hmainid + ",'" + User + "'", "h_p_Gy_MouldFile_BeforeDelCtrl");
@@ -4016,6 +4027,8 @@
                 DataSet ds = new DataSet();
                 ds = oCN.RunProcReturn("select * from Gy_MouldFileMain where HInterID=" + HInterID, "Gy_MouldFileMain");
                 DataRow dr = ds.Tables[0].Rows[0];
+                dr["HPrintQty"] = 0;
+
                 string Num = dr["HBarCode"].ToString();
                 string Num1 = Num.Substring(0, (Num.Length) - 5);
                 oCN.BeginTran();
@@ -4821,7 +4834,7 @@
                         "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HCaveQty +
                         "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID + "','" + HNowSupTypeID + "'" +
                         ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID +
-                        ",'" + HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + " ) ");
+                        ",'" + HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "' ) ");
                     }
                     else
                     {

--
Gitblit v1.9.1