From 42c5ed8edc862ebc80c117ed9a26e00f6f3e844d Mon Sep 17 00:00:00 2001 From: wtt <1985833171@qq.com> Date: 星期二, 17 十二月 2024 08:24:11 +0800 Subject: [PATCH] 基础资料单据(产品工艺参数、设备启动点检清单、产品防错验证清单)增加 导入按钮 --- WebAPI/Controllers/BaseSet/Gy_MaterialController.cs | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 52 insertions(+), 4 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs index 103c5e3..6763499 100644 --- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs @@ -1587,7 +1587,7 @@ return objJsonResult; } - string sql1 = "select top 5000 * from h_v_IF_BarCodeBillList where 1 = 1 "; + string sql1 = "select top 15000 * from h_v_IF_BarCodeBillList where 1 = 1 "; string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_IF_BarCodeBillList"); @@ -2036,6 +2036,30 @@ string HMouldClass = mainList[0].HMouldClass; int HNowWHID = mainList[0].HNowWHID; int HNowSPID = mainList[0].HNowSPID; + string HMouldUseStatus = mainList[0].HMouldUseStatus; + + //淇濆瓨鍓嶆帶鍒�========================================= + string HBillNote = ""; + ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFileMain_BeforeSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_MouldFileMain_BeforeSaveCtrl"); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:淇濆瓨鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴"; + objJsonResult.data = null; + return objJsonResult; + } + + if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ; + objJsonResult.data = null; + return objJsonResult; + } + //========================================================= + //涓昏〃 oCN.RunProc("Insert Into Gy_MouldFileMain " + @@ -2048,7 +2072,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,HMouldUseStatus) " + " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" + ",'" + HMouldNo + "','" + HName + "','" + HModel + "','" + HModel2 + "','" + HDiameter + "'" + @@ -2058,7 +2082,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 + "','" + HMouldUseStatus + "') "); //瀛愯〃 oCN.RunProc("Insert into Gy_MouldFileSub " + @@ -2070,6 +2094,29 @@ ") "); objJsonResult = AddBillSub(msg5,msg6,msg7,HInterID, HBillNo); + + //淇濆瓨鍚庢帶鍒�========================================= + ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFileMain_AfterSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_MouldFileMain_AfterSaveCtrl"); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:淇濆瓨鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴"; + objJsonResult.data = null; + return objJsonResult; + } + + if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "淇濆瓨澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HBackRemark"].ToString(); ; + objJsonResult.data = null; + oCN.RollBack(); + return objJsonResult; + } + //========================================================= + if (objJsonResult.code == "0") { @@ -2185,7 +2232,7 @@ string HMouldClass = mainList[0].HMouldClass; int HNowWHID = mainList[0].HNowWHID; int HNowSPID = mainList[0].HNowSPID; - + string HMouldUseStatus = mainList[0].HMouldUseStatus; //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙� oCN.BeginTran(); //涓昏〃 @@ -2242,6 +2289,7 @@ ",HNowWHID=" + HNowWHID + ",HNowSPID=" + HNowSPID + ",HInitLife='" + HInitLife + + "',HMouldUseStatus='" + HMouldUseStatus + "' where HInterID=" + HInterID.ToString()); //淇敼瀛愰」鐩唬鐮� -- Gitblit v1.9.1