From fd56fa51fe25f26ce5b518c6f3afb81fbc19553a Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期一, 25 七月 2022 17:04:53 +0800
Subject: [PATCH] 盘点
---
WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs | 66 ++++++++++++++++++++++-----------
1 files changed, 44 insertions(+), 22 deletions(-)
diff --git a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
index 641981d..a8cf93a 100644
--- a/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_POInStockBillController.cs
@@ -67,36 +67,47 @@
/// </summary>
[Route("Cg_POInStockBill/list")]
[HttpGet]
- public object list(string sWhere)
+ public object list(string sWhere,string user)
{
try
{
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Cg_POInStockBillQuery", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("select * from h_v_IF_POInStockBillList " + sWhere, "h_v_IF_POInStockBillList");
+ ds = oCN.RunProcReturn("select * from h_v_IF_POInStockBillList order by hmainid desc" , "h_v_IF_POInStockBillList");
}
else
{
string sql1 = "select * from h_v_IF_POInStockBillList where 1 = 1 ";
- string sql = sql1 + sWhere;
+ string sql = sql1 + sWhere+ " order by 鏃ユ湡 desc,hmainid desc";
ds = oCN.RunProcReturn(sql, "h_v_IF_POInStockBillList");
}
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "Sucess锛�";
- objJsonResult.data = ds.Tables[0];
- return objJsonResult;
- }
+
+ //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ //{
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ //}
+ //else
+ //{
+ //objJsonResult.code = "0";
+ //objJsonResult.count = 0;
+ //objJsonResult.Message = "鏃犳暟鎹�";
+ //objJsonResult.data = null;
+ //return objJsonResult;
+ //}
}
catch (Exception e)
{
@@ -246,7 +257,7 @@
try
{
//鍒ゆ柇鏄惁鏈夊垹闄ょ殑鏉冮檺
- if (!DBUtility.ClsPub.Security_Log("Xs_SeOrderBill_Drop", 1, false, user))
+ if (!DBUtility.ClsPub.Security_Log("Cg_POInStockBill_Drop", 1, false, user))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -286,10 +297,20 @@
/// </summary>
[Route("Cg_POInStockBill/DeAuditPOInStockBill")]
[HttpGet]
- public object DeAuditPOInStockBill(string HInterID)
+ public object DeAuditPOInStockBill(string HInterID,string user)
{
try
{
+ //鍒ゆ柇鏄惁鏈夊鏍哥殑鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("Cg_POInStockBill_Check", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲鏍告潈闄�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
//鍏堝垹闄� 閲戣澏鏁版嵁
objJsonResult = DeleteKingDee(HInterID);
if (objJsonResult.code == "0")
@@ -314,7 +335,7 @@
return objJsonResult;
}
}
- //瀹℃牳 鍒犻櫎 鍒犻櫎閲戣澏鏁版嵁搴撳搴� 鏀舵枡閫氱煡鍒版暟鎹�
+ //鍙嶅鏍� 鍒犻櫎 鍒犻櫎閲戣澏鏁版嵁搴撳搴� 鏀舵枡閫氱煡鍒版暟鎹�
public json DeleteKingDee(string hinterid)
{
string sql = string.Format("select HinterID,HERPBillNO,HERPInterID from Cg_POInStockBillMain where HERPInterID>0 and hinterid in (" + hinterid + ")");
@@ -329,6 +350,7 @@
Ids = ""
};
var loginRet = InvokeHelper.Login();
+
var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
if (isSuccess == 0)
{
--
Gitblit v1.9.1