From 77d1eb907a434e215096601752597e36aa88b1d4 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 04 九月 2023 13:15:11 +0800
Subject: [PATCH] 工序流转卡排缸
---
WebAPI/Controllers/QC_ManagementController.cs | 146 +++++++++++++++++++++++++-----------------------
1 files changed, 75 insertions(+), 71 deletions(-)
diff --git a/WebAPI/Controllers/QC_ManagementController.cs b/WebAPI/Controllers/QC_ManagementController.cs
index 4cc2c52..a3743c1 100644
--- a/WebAPI/Controllers/QC_ManagementController.cs
+++ b/WebAPI/Controllers/QC_ManagementController.cs
@@ -13,6 +13,8 @@
{
public class QC_ManagementController : ApiController
{
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DataSet ds;
#region 閿欒杩斿洖鏂规硶
// GET: QC_Management
@@ -1127,80 +1129,82 @@
return objJsonResult;
}
}
+ #region [浼垹闄ゆā寮廬
+ ///// <summary>
+ ///// 棣栦欢妫�楠岄�昏緫鍒犻櫎鍔熻兘
+ ///// </summary>
+ ///// <returns></returns>
+ //[Route("DeltetQC_FirstPieceCheck")]
+ //[HttpGet]
+ //public object DeltetQC_FirstPieceCheck(string HInterID,string user)
+ //{
+ // DataSet ds;
+ // string ModRightNameCheck = "QC_FirstPieceCheckBill_Delete";
+ // try
+ // {
+ // //鍒犻櫎鏉冮檺
+ // if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, user))
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
- /// <summary>
- /// 棣栦欢妫�楠岄�昏緫鍒犻櫎鍔熻兘
- /// </summary>
- /// <returns></returns>
- [Route("DeltetQC_FirstPieceCheck")]
- [HttpGet]
- public object DeltetQC_FirstPieceCheck(string HInterID,string user)
- {
- DataSet ds;
- string ModRightNameCheck = "QC_FirstPieceCheckBill_Delete";
- try
- {
- //鍒犻櫎鏉冮檺
- if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, user))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ // SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ // if (string.IsNullOrWhiteSpace(HInterID))
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "HInterID涓虹┖锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+ // oCN.BeginTran();//寮�濮嬩簨鍔�
+ // ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillMain where HInterID=" + HInterID, "QC_FirstPieceCheckBillMain");
+ // DataSet ds2 = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillSub where HInterID=" + HInterID, "QC_FirstPieceCheckBillSub");
+ // if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0)
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "娌℃湁杩欎釜鍗曟嵁锛屾棤娉曞垹闄わ紒";
+ // objJsonResult.data = null;
+ // return objJsonResult; ;
+ // }
+ // var HCloseMan = Convert.ToString(ds.Tables[0].Rows[0]["HCloseMan"]);
+ // var HCloseMan2 = Convert.ToString(ds2.Tables[0].Rows[0]["HCloseMan"]);
+ // if (!string.IsNullOrWhiteSpace(HCloseMan) || !string.IsNullOrWhiteSpace(HCloseMan2))
+ // {
+ // oCN.RollBack();//鍥炴粴浜嬪姟
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鍗曟嵁宸插垹闄ゆ棤娉曞啀娆″垹闄わ紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
- SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
- if (string.IsNullOrWhiteSpace(HInterID))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "HInterID涓虹┖锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- oCN.BeginTran();//寮�濮嬩簨鍔�
- ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillMain where HInterID=" + HInterID, "QC_FirstPieceCheckBillMain");
- DataSet ds2 = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillSub where HInterID=" + HInterID, "QC_FirstPieceCheckBillSub");
- if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩欎釜鍗曟嵁锛屾棤娉曞垹闄わ紒";
- objJsonResult.data = null;
- return objJsonResult; ;
- }
- var HCloseMan = Convert.ToString(ds.Tables[0].Rows[0]["HCloseMan"]);
- var HCloseMan2 = Convert.ToString(ds2.Tables[0].Rows[0]["HCloseMan"]);
- if (!string.IsNullOrWhiteSpace(HCloseMan) || !string.IsNullOrWhiteSpace(HCloseMan2))
- {
- oCN.RollBack();//鍥炴粴浜嬪姟
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍗曟嵁宸插垹闄ゆ棤娉曞啀娆″垹闄わ紒";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ // oCN.RunProc("update QC_FirstPieceCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE() where HInterID=" + HInterID);
+ // oCN.RunProc("update QC_FirstPieceCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE() where HInterID=" + HInterID);
+ // oCN.Commit();//鎻愪氦浜嬪姟
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 1;
+ // objJsonResult.Message = "* 鍗曟嵁鍒犻櫎鎴愬姛锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult; ;
- oCN.RunProc("update QC_FirstPieceCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE() where HInterID=" + HInterID);
- oCN.RunProc("update QC_FirstPieceCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE() where HInterID=" + HInterID);
- oCN.Commit();//鎻愪氦浜嬪姟
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "* 鍗曟嵁鍒犻櫎鎴愬姛锛�";
- objJsonResult.data = null;
- return objJsonResult; ;
-
- }
- catch (Exception e)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
- objJsonResult.data = null;
- return objJsonResult;
- }
- }
+ // }
+ // catch (Exception e)
+ // {
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ // }
+ //}
+ #endregion
+
#endregion
#region 宸℃
--
Gitblit v1.9.1