From bb001d64dcb47dd59179f334719a8dd95d2908a0 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 11 九月 2024 21:12:21 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 179 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
index 38bf0cb..31035fa 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
@@ -9,6 +9,7 @@
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
+using SyntacticSugar.constant;
namespace WebAPI.Controllers
{
@@ -1336,6 +1337,31 @@
{
bResult = false;
}
+
+ //鑷姩瀹℃牳璁剧疆
+ if (refSav == "Add")
+ {
+ objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //杩斿洖涓籌D
+ //绯荤粺鍙傛暟 鑷姩瀹℃牳
+ string sReturn = "";
+ if (oSystemParameter.ShowBill(ref sReturn) == true)
+ {
+ if (oSystemParameter.omodel.Xs_SeOrderBill_AutoCheck == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
+ {
+ objJsonResult.Verify = "Y";
+ }
+ else
+ {
+ objJsonResult.Verify = "N";
+ }
+ }
+ }
+ else if (refSav == "Update")
+ {
+ objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //杩斿洖涓籌D
+ objJsonResult.Verify = "N";
+ }
+
if (bResult)
{
objJsonResult.code = "0";
@@ -3291,6 +3317,159 @@
}
#endregion
+ #region 閿�鍞鍗曚笅鎺ㄦ煡璇㈠垪琛�
+ [Route("Xs_SeOrderBill/PushList")]
+ [HttpGet]
+ public object PushList(string HBillNo, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ string sql = "select * from h_v_IF_SeOrderBillList where 鍗曟嵁鍙� = '" + HBillNo + "' and 鐘舵�� = '宸插鏍�' and 鏁伴噺 - 鍏宠仈鏁伴噺 > 0";
+
+
+ ds = oCN.RunProcReturn(sql, "h_v_IF_SeOrderBillList");
+
+ if (ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "鎵句笉鍒扮鍚堟潯浠跺崟鎹�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = CountConstant.SUCCEED;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 閿�鍞鍗曟煡璇㈠垪琛�
+ [Route("Xs_SeOrderBill/QueryList")]
+ [HttpGet]
+ public object QueryList(string sWhere, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+ if (!DBUtility.ClsPub.Security_Log("Xs_SeOrderBillQuery", 1, false, user))
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ string sql = "select * from h_v_Xs_SeOrderBillQuery where 1 = 1 ";
+
+ if (sWhere == "" || sWhere == null)
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Xs_SeOrderBillQuery order by hmainid desc", "h_v_Xs_SeOrderBillQuery");
+ }
+ else
+ {
+ ds = oCN.RunProcReturn(sql + sWhere + " order by hmainid desc", "h_v_Xs_SeOrderBillQuery");
+ }
+
+
+
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = CountConstant.SUCCEED;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 閿�鍞鍗曟煡璇㈠瓙鍒楄〃
+ [Route("Xs_SeOrderBill/QuerySubList")]
+ [HttpGet]
+ public object QuerySubList(string hmainid, string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+ if (!DBUtility.ClsPub.Security_Log("Xs_SeOrderBillQuery", 1, false, user))
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ string sql = "select * from h_v_Xs_SeOrderBillQuerySub where hmainid = " + hmainid;
+
+ ds = oCN.RunProcReturn(sql + " order by hsubid desc", "h_v_Xs_SeOrderBillQuerySub");
+
+
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = CodeConstant.SUCCEED;
+ objJsonResult.count = CountConstant.SUCCEED;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
#region 閿�鍞鍗� 鍒ゆ柇鏄惁鍏峰鏌ョ湅閲戦鏉冮檺
[Route("Xs_SeOrderBill/CheckRight_Money")]
[HttpGet]
--
Gitblit v1.9.1