From 2f6f2d57f37b1992d1b0d26a21c2257ce9e2b2c9 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 04 十月 2024 18:55:22 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 88 +++++++++++++------------------------------
1 files changed, 27 insertions(+), 61 deletions(-)
diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index 2c8f87c..d15cceb 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -2,6 +2,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
+using SyntacticSugar.constant;
using System;
using System.Collections;
using System.Collections.Generic;
@@ -225,7 +226,7 @@
if (oSystemParameter.ShowBill(ref Ret))
{
//鍒ゆ柇瀹㈡埛涓嶄负榫欏北姹介厤
- if (oSystemParameter.omodel.WMS_CampanyName != "榫欏北姹介厤" && oSystemParameter.omodel.WMS_CampanyName != "鐟炰笌绁�") //绯荤粺鍙傛暟
+ if (oSystemParameter.omodel.WMS_CampanyName != "榫欏北姹介厤" && oSystemParameter.omodel.WMS_CampanyName != "鐟炰笌绁�" && oSystemParameter.omodel.WMS_CampanyName != "娣诲悍绉戞妧") //绯荤粺鍙傛暟
{
if (HSourceID == 0)
{
@@ -1715,67 +1716,32 @@
}
#endregion
- #region 杩斿洖宸ュ簭鍑虹珯姹囨姤鍗曞垪琛� 20240926鏂板
- [Route("Cj_StationOutBillController/GetSc_StationOutBillList_Json")]
+ #region 宸ュ簭鍑虹珯姹囨姤鍗曞垪琛�
+ [Route("Cj_StationOutBill/page")]
[HttpGet]
- public object GetSc_StationOutBillList_Json(string sWhere, string HMaker, string HBillSubType, string OperationType, string ViewName)
+ public json page(string sWhere, string user, int page, int size)
{
+ json res = new json();
try
{
List<object> columnNameList = new List<object>();
- //鍒ゆ柇鏉冮檺
- if (HBillSubType == "SUB")
- {
//鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
- if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Sub_Query", 1, false, HMaker))
+ if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user))
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "瀹屽伐鍗曟棤鏌ヨ鏉冮檺!";
- objJsonResult.data = null;
- return objJsonResult;
+ res.code = "0";
+ res.count = 0;
+ res.Message = "鍑虹珯鍗曟棤鏌ヨ鏉冮檺!";
+ res.data = null;
+ return res;
}
- }
- else if(OperationType == "1")
+ if (sWhere == null || sWhere.Equals(""))
{
- //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
- if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, HMaker))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鍑虹珯鍗曟棤鏌ヨ鏉冮檺!";
- objJsonResult.data = null;
- return objJsonResult;
- }
+ ds = oCN.RunProcReturn("exec h_p_MES_StationOutBillList " + page + "," + size + ",''", "h_p_MES_StationOutBillList");
}
-
- //鑾峰彇绯荤粺鍙傛暟
- string Ret = "";
- if (oSystemParameter.ShowBill(ref Ret))
+ else
{
- //鍒ゆ柇瀹㈡埛涓洪緳灞辨苯閰�
- if (oSystemParameter.omodel.WMS_CampanyName == "榫欏北姹介厤")
- {
- //鑾峰彇闇�瑕佹嫾鎺ョ殑瀛楃涓�
- string sql_splice = DBUtility.ClsPub.SpliceSQL(HMaker, "宸ュ簭姹囨姤鍗曞垪琛�");
-
- if (sql_splice == "娌℃湁鏌ヨ鍒扮浉鍏崇敤鎴蜂俊鎭�")
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "娌℃湁鏌ヨ鍒扮浉鍏崇敤鎴蜂俊鎭�!";
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- sWhere += sql_splice;
- }
- }
+ ds = oCN.RunProcReturn("exec h_p_MES_StationOutBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_MES_StationOutBillList");
}
-
- //杩斿洖鍒楄〃淇℃伅
- ds = oCN.RunProcReturn("select * from " + ViewName + " where 1=1 " + sWhere + " order by hmainid desc", ViewName);
//娣诲姞鍒楀悕
foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1784,24 +1750,24 @@
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
}
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = "鎴愬姛锛�";
- objJsonResult.data = ds.Tables[0];
- objJsonResult.list = columnNameList;
- return objJsonResult;
+
+ res.code = CodeConstant.SUCCEED;
+ res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+ res.Message = "Sucess锛�";
+ res.list = columnNameList;
+ res.data = ds.Tables[0];
+ return res;
}
catch (Exception e)
{
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鏌ヨ鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
- objJsonResult.data = null;
+ res.code = CodeConstant.FAIL;
+ res.count = CountConstant.FAIL;
+ res.Message = "Exception锛�" + e.ToString();
+ res.data = null;
return objJsonResult;
}
}
#endregion
-
#region 宸ュ簭鍑虹珯姹囨姤鍗� 瀛愯〃鏌ヨ
[Route("Cj_StationOutBill/get_SubDisplay")]
[HttpGet]
--
Gitblit v1.9.1