From fd7d8869b05daa25ba28ad23aaa4c634b2d4edda Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期三, 15 九月 2021 17:28:13 +0800
Subject: [PATCH] 模器具采购入库单列表完善以及编辑模器具采购入库单
---
WebAPI/Controllers/CJGL/Cj_StationEntrustOutBillController.cs | 130 +++++++++++++++++++++++++++++++++++++-----
1 files changed, 113 insertions(+), 17 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustOutBillController.cs
index 1691687..5707fd9 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationEntrustOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustOutBillController.cs
@@ -168,14 +168,14 @@
objJsonResult.data = null;
return objJsonResult;
}
- if (HInnerBillNo == "")
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍙戣揣鍙锋病鏈夎緭鍏ワ紒";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ //if (HInnerBillNo == "")
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鍙戣揣鍙锋病鏈夎緭鍏ワ紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
if (HProcID <= 0)
{
objJsonResult.code = "0";
@@ -204,18 +204,18 @@
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鎺ユ敹涓暟涓嶈兘灏忎簬绛変簬0锛�";
+ objJsonResult.Message = "鍚堟牸鏁伴噺涓嶈兘灏忎簬绛変簬0锛�";
objJsonResult.data = null;
return objJsonResult;
}
- if (HWasterQty < 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "涓嶅悎鏍兼暟涓嶈兘灏忎簬0锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ //if (HWasterQty < 0)
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "涓嶅悎鏍兼暟涓嶈兘灏忎簬0锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
if (HTaxRate < 0)
{
objJsonResult.code = "0";
@@ -386,6 +386,102 @@
}
}
+ #region 鏍规嵁id鍒犻櫎濮斿鎺ユ敹鍗�
+ [Route("Cj_StationEntrustOutBill/del_StationEntrustOutBill")]
+ [HttpGet]
+ public object del_StationEntrustOutBill(long HInterID, string HDeleteMan)
+ {
+ try
+ {
+
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("MES_StationEntrustOutBill_Delete", 1, true, HDeleteMan))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ DAL.ClsSc_StationEntrustOutBill oBill = new DAL.ClsSc_StationEntrustOutBill();
+ 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_StationOutBill_DelCtrl '" + oBill.omodel.HBillNo + "'", "h_p_MES_StationOutBill_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