From c87cf9a415a98d71b83f6a00a9c6e9cd8bc18b8d Mon Sep 17 00:00:00 2001 From: 杨乐 <yang.le.192@qq.com> Date: 星期二, 28 十二月 2021 20:16:44 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/GG_NoticeController.cs | 43 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 41 insertions(+), 2 deletions(-) diff --git a/WebAPI/Controllers/GG_NoticeController.cs b/WebAPI/Controllers/GG_NoticeController.cs index 3061fa7..e52323c 100644 --- a/WebAPI/Controllers/GG_NoticeController.cs +++ b/WebAPI/Controllers/GG_NoticeController.cs @@ -68,7 +68,7 @@ public static DataSet Get_GG_NoticeBillList(string sWhere) { - var sql = "select A.HInterID,b.HEntryID,A.HBillNo,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '鏈槄' when B.HReadFlag=1 then '宸查槄' end HReadFlag, A.HMaker,A.HDate,A.HUpDater,A.HUpDateDate" + + var sql = "select A.HInterID,b.HEntryID,A.HBillNo,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '鏈槄' when B.HReadFlag=1 then '宸查槄' end HReadFlag, A.HMaker,A.HMakeDate,A.HUpDater,A.HUpDateDate" + " from OA_InformBillMain A inner join OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where 1=1 " + sWhere; return new SQLHelper.ClsCN().RunProcReturn(sql, "OA_InformBillMain"); } @@ -84,7 +84,7 @@ return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" }; SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); - var dataSet = oCN.RunProcReturn("select A.HInterID,b.HEntryID,A.HBillNo,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '鏈槄' when B.HReadFlag=1 then '宸查槄' end HReadFlag, A.HMaker,A.HDate,A.HUpDater,A.HUpDateDate" + + var dataSet = oCN.RunProcReturn("select A.HInterID,b.HEntryID,A.HBillNo,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '鏈槄' when B.HReadFlag=1 then '宸查槄' end HReadFlag, A.HMaker,A.HMakeDate,A.HUpDater,A.HUpDateDate" + " from OA_InformBillMain A inner join OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where A.HInterID='"+ HID + "' and b.HEntryID='"+HEntryID+"'", "OA_InformBillMain"); if (dataSet == null || dataSet.Tables[0].Rows.Count == 0) return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄥ崟鍙�" }; @@ -255,5 +255,44 @@ } #endregion + #region 鍏憡鍒楄〃鍒犻櫎 + [Route("GG_Notice/Get_GG_Notice_DeleteBill")] + [HttpGet] + public object Get_GG_Notice_DeleteBill(string HInterID, string user) + { + try + { + //鍒犻櫎鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log_second("", 1, true, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒"; + // objJsonResult.data = null; + // return objJsonResult; + //} + + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + oCN.RunProc("delete from OA_InformBillSub where HInterID=" + HInterID); + oCN.RunProc("delete from OA_InformBillMain where HInterID=" + HInterID); + oCN.Commit();//鎻愪氦浜嬪姟 + objJsonResult.code = "1"; + 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; + } + } + #endregion + } } -- Gitblit v1.9.1