From b4e78e5b10fd9777e44a9114aad3502edfd43037 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期二, 29 十一月 2022 17:19:40 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API into master
---
WebAPI/Controllers/SCGL/Sc_MaterToSourceBillController.cs | 92 +++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 87 insertions(+), 5 deletions(-)
diff --git a/WebAPI/Controllers/SCGL/Sc_MaterToSourceBillController.cs b/WebAPI/Controllers/SCGL/Sc_MaterToSourceBillController.cs
index af0c38b..d354a67 100644
--- a/WebAPI/Controllers/SCGL/Sc_MaterToSourceBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MaterToSourceBillController.cs
@@ -40,13 +40,13 @@
{
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select * from h_v_Sc_MaterToSourceBillList " + sWhere, "h_v_Sc_MaterToSourceBillList");
+ ds = oCN.RunProcReturn("select * from h_v_Sc_MaterToSourceBillMain " + sWhere, "h_v_Sc_MaterToSourceBillMain");
}
else
{
- string sql1 = "select * from h_v_Sc_MaterToSourceBillList where 1 = 1 ";
+ string sql1 = "select * from h_v_Sc_MaterToSourceBillMain where 1 = 1 ";
string sql = sql1 + sWhere;
- ds = oCN.RunProcReturn(sql, "h_v_Sc_MaterToSourceBillList");
+ ds = oCN.RunProcReturn(sql, "h_v_Sc_MaterToSourceBillMain");
}
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
@@ -132,6 +132,87 @@
objJsonResult.data = null;
}
return objJsonResult;
+ }
+ #endregion
+
+ #region [涓婃枡闃查敊鍗曞垹闄ゅ姛鑳絔
+ /// <summary>
+ /// 寮�宸ュ崟鍒犻櫎鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ [Route("Sc_MaterToSourceBill/DeltetMaterToSourceBill")]
+ [HttpGet]
+ public object DeltetMaterToSourceBill(string HInterID, string UserName)
+ {
+ DBUtility.ClsPub.CurUserName = UserName;
+ //缂栬緫鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log("MES_MaterToSourceBill_Delete", 1, false, DBUtility.ClsPub.CurUserName))
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+
+
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+ if (lngBillKey == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ DAL.ClsSc_MESMaterToSourceBill oBill = new DAL.ClsSc_MESMaterToSourceBill();
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+ {
+ if (oBill.omodel.HBillStatus > 1)
+ {
+ 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;
+ }
+
+ bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ if (IsDete)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
#endregion
@@ -338,7 +419,7 @@
string refSav = sArray[2].ToString();
//淇濆瓨鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log("MES_MaterToSourceBill_Edit", 1, true, DBUtility.ClsPub.CurUserName))
+ //if (!DBUtility.ClsPub.Security_Log("MES_MaterToSourceBill_Edit", 1, false, DBUtility.ClsPub.CurUserName))
//{
// objJsonResult.code = "0";
// objJsonResult.count = 0;
@@ -515,6 +596,7 @@
else
{
bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+ objJsonResult.HInterID = DBUtility.ClsPub.sExeReturnInfo; //杩斿洖涓籌D
objJsonResult.Verify = "N";
}
if (bResult)
@@ -563,7 +645,7 @@
try
{
//瀹℃牳鏉冮檺
- //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
+ //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
//{
// objJsonResult.code = "0";
// objJsonResult.count = 0;
--
Gitblit v1.9.1