From 7097306354af065107d127cc532ac34a912a6995 Mon Sep 17 00:00:00 2001 From: zzr99 <1940172413@qq.com> Date: 星期四, 13 一月 2022 20:21:52 +0800 Subject: [PATCH] PDA设备点检 --- WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs | 66 ++++++++++++++++++++++++++++++++ 1 files changed, 65 insertions(+), 1 deletions(-) diff --git a/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs b/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs index 5ff1bab..b60a652 100644 --- a/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs +++ b/WebAPI/Controllers/Sc_MouldRepairSendWorkBillController.cs @@ -14,11 +14,13 @@ public class Sc_MouldRepairSendWorkBillController : ApiController { public DBUtility.ClsPub.Enum_BillStatus BillStatus; + ClsSb_MouldRepairWorkBillMain omodel = new ClsSb_MouldRepairWorkBillMain(); List<ClsSb_MouldRepairWorkBillSub> DetailColl = new List<ClsSb_MouldRepairWorkBillSub>(); private json objJsonResult = new json(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); DataSet ds; + DLL.ClsSb_MouldRepairWorkBill oBill = new DLL.ClsSb_MouldRepairWorkBill(); #region 鍣ㄥ叿缁翠慨娲惧伐鍗曟煡璇� [Route("Sc_MouldRepairSendWorkBill/GetMouldRepairSendWorkBillList")] @@ -135,7 +137,7 @@ ",HYear='" + omodel.HYear.ToString() + "'" + ",HPeriod='" + omodel.HPeriod.ToString() + "'" + ",HRemark='" + omodel.HRemark + "'" + - ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + + ",HUpDater='" + omodel.HUpDater + "'" + ",HUpDateDate=getdate()" + //======================================== ",HMouldID=" + omodel.HMouldID.ToString() + @@ -218,5 +220,67 @@ } #endregion + + #region 鍣ㄥ叿缁翠慨娲惧伐鍗� 鍒犻櫎 + [Route("Sc_MouldRepairSendWorkBill/MouldDeleteBill")] + [HttpGet] + public object MouldDeleteBill(long HInterID, string User, string ModRightNameDelete) + { + try + { + //鍒ゆ柇鏉冮檺 + //if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, true, User)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "娌℃湁鍒犻櫎鏉冮檺"; + // objJsonResult.data = null; + // return objJsonResult; + //} + oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo); + + if (oBill.omodel.HBillStatus > 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐨勭姸鎬�"; + objJsonResult.data = null; + return objJsonResult; + } + if (oBill.omodel.HChecker != "") + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍗曟嵁褰撳墠宸插鏍�"; + objJsonResult.data = null; + return objJsonResult; + } + if (oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo)) + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎鎴愬姛"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎澶辫触"; + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳潈闄愬垹闄�"; + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion } } \ No newline at end of file -- Gitblit v1.9.1