From 90ee7578f4b40ba142b183f9cb3765d2669e8aeb Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 15 九月 2023 10:10:52 +0800
Subject: [PATCH] 生产领料单:增加审核、反审核、作废、反作废、关闭、反关闭功能
---
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 188 ++++++++++++++++++++++++++++++++++------------
1 files changed, 139 insertions(+), 49 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index fbe4b72..d1d7e04 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -44,15 +44,30 @@
string OperationType = sArray[2].ToString();//绫诲瀷
string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О
- //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄�
- if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Edit", 1, false, user))
+ if (OperationType == "5")
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏃犵紪杈戞潈闄�!";
- objJsonResult.data = null;
- return objJsonResult;
+ //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹屽伐鍗曟棤缂栬緫鏉冮檺!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
+ else {
+ //鍒ゆ柇鏄惁鏈夌紪杈戞潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍑虹珯鍗曟棤缂栬緫鏉冮檺!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
Stopwatch sw = new Stopwatch();
sw.Start();//寮�濮嬭鏃�
@@ -1500,20 +1515,35 @@
#region 杩斿洖宸ュ簭鍑虹珯姹囨姤鍗曞垪琛�
[Route("Cj_StationOutBill/get_Display")]
[HttpGet]
- public object get_Display(string sWhere,string user)
+ public object get_Display(string sWhere,string user,string HBillSubType)
{
try
{
List<object> columnNameList = new List<object>();
- //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
- if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user))
+ if (HBillSubType == "SUB")
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳煡璇㈡潈闄�!";
- objJsonResult.data = null;
- return objJsonResult;
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹屽伐鍗曟棤鏌ヨ鏉冮檺!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
+ else {
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍑虹珯鍗曟棤鏌ヨ鏉冮檺!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
//鑾峰彇绯荤粺鍙傛暟
string Ret = "";
@@ -1942,20 +1972,35 @@
#region 鏍规嵁id鍒犻櫎鍑虹珯鍗�
[Route("Cj_StationOutBill/del_StationOutBill")]
[HttpGet]
- public object del_StationOutBill(long HInterID, string HDeleteMan)
+ public object del_StationOutBill(long HInterID, string HDeleteMan,string HBillSubType)
{
try
{
string HComputerName = SystemInformation.ComputerName; //璁惧鍚嶇О
- //缂栬緫鏉冮檺
- if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Drop", 1, false, HDeleteMan))
+ if (HBillSubType == "SUB")
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳潈闄愶紒";
- objJsonResult.data = null;
- return objJsonResult;
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Drop", 1, false, HDeleteMan))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹屽伐鍗曟棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
+ else {
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Drop", 1, false, HDeleteMan))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍑虹珯鍗曟棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
DAL.ClsSc_StationOutBill oBill = new DAL.ClsSc_StationOutBill();
if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
{
@@ -2171,20 +2216,35 @@
#region 瀹℃牳
[Route("Cj_StationOutBill/set_CheckBill")]
[HttpGet]
- public object set_CheckBill(string HInterID, string CurUserName)
+ public object set_CheckBill(string HInterID, string CurUserName,string HBillSubType)
{
try
{
- string ModRightNameCheck = "Cj_StationOutBill_Check";
- ////瀹℃牳鏉冮檺
- if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
+ if (HBillSubType == "SUB")
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
- objJsonResult.data = null;
- return objJsonResult;
+ ////瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Check", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹屽伐鍗曞鏍稿け璐ワ紒鏃犳潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
+ else
+ { ////瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Check", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍑虹珯鍗曞鏍稿け璐ワ紒鏃犳潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+
var HBillNo = HInterID.Split(',');
DAL.ClsSc_StationOutBill oBill = new DAL.ClsSc_StationOutBill();
@@ -2299,20 +2359,35 @@
#region 鍙嶅鏍�
[Route("Cj_StationOutBill/set_AbandonCheck")]
[HttpGet]
- public object set_AbandonCheck(string HInterID, string CurUserName)
+ public object set_AbandonCheck(string HInterID, string CurUserName,string HBillSubType)
{
try
{
- string ModRightNameCheck = "Cj_StationOutBill_Check";
- ////瀹℃牳鏉冮檺
- if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, CurUserName))
+ if (HBillSubType == "SUB")
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍙嶅鏍稿け璐ワ紒鏃犳潈闄愶紒";
- objJsonResult.data = null;
- return objJsonResult;
+ ////瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Check", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹屽伐鍗曞弽瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
+ else
+ {
+ ////瀹℃牳鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Check", 1, false, CurUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍑虹珯鍗曞弽瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
var HBillNo = HInterID.Split(',');
DAL.ClsSc_StationOutBill oBill = new DAL.ClsSc_StationOutBill();
@@ -2451,19 +2526,34 @@
#region 宸ュ簭鍑虹珯鍏抽棴/鍙嶅叧闂姛鑳�
[Route("Cj_StationOutBill/CloseCj_StationOutBill")]
[HttpGet]
- public object CloseCj_StationOutBill(string HInterID, int Type, string user)
+ public object CloseCj_StationOutBill(string HInterID, int Type, string user,string HBillSubType)
{
try
{
- //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
- if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Close", 1, false, user))
+ if (HBillSubType == "SUB")
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏃犳潈闄愬叧闂�!";
- objJsonResult.data = null;
- return objJsonResult;
+ //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Close", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹屽伐鍗曟棤鏉冮檺鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
+ else {
+ //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Close", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍑虹珯鍗曟棤鏉冮檺鍏抽棴!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
if (string.IsNullOrWhiteSpace(HInterID))
{
--
Gitblit v1.9.1