From 888e4b1cec310a0be3528217e2a392ff827f9938 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期二, 14 九月 2021 01:31:13 +0800
Subject: [PATCH] 产量汇报单删除后回写生产状态临时表数量及单据状态
---
WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs | 97 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 97 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
index 4c2156c..118a408 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -720,6 +720,103 @@
}
}
#endregion
+
+ #region 鏍规嵁id鍒犻櫎濮斿鍙戝嚭鍗�
+ [Route("Cj_StationEntrustInBill/del_StationEntrustInBill")]
+ [HttpGet]
+ public object del_StationEntrustInBill(long HInterID, string HDeleteMan)
+ {
+ try
+ {
+
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("MES_StationEntrustInBill_Delete", 1, true, HDeleteMan))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ DAL.ClsSc_StationInBill oBill = new DAL.ClsSc_StationInBill();
+ if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (oBill.omodel.HMaker != HDeleteMan && (HDeleteMan != "admin" && HDeleteMan != "Admin"))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙兘鍒犻櫎鏈汉鐨勫崟鎹紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (oBill.omodel.HChecker != "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ DataSet ds;
+ //鍒ゆ柇鏄惁瀛樺湪 鐩稿悓鍗曟嵁鍙� 鐨勯鏂欏崟 鍒ゆ柇鐢熶骇璁㈠崟鏄惁宸茬粨妗堬紝瑕佹眰璁″垝鎵嬪伐鍙嶇粨妗�
+ ds = oCn.RunProcReturn("exec h_p_MES_StationInBill_DelCtrl '" + oBill.omodel.HBillNo + "'", "h_p_MES_StationInBill_DelCtrl");
+ if (ds == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒ゆ柇鍏宠仈澶辫触锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (ds.Tables[0].Rows.Count > 0 && Pub_Class.ClsPub.isInt(ds.Tables[0].Rows[0][0]) == 2)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0][1]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ //鍐欏叆鍒犻櫎鏃ュ織
+ string WorkList = "鍒犻櫎濮斿鍙戝嚭鍗曪細" + oBill.omodel.HBillNo;
+ if (!oBill.DeleteBill(oBill.omodel.HInterID, oBill.omodel.HProcExchInterID, oBill.omodel.HProcExchEntryID, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ 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
//
}
}
\ No newline at end of file
--
Gitblit v1.9.1