From 1ac724081443a0cea3c8e2f46b9016a6f0851bfc Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 23 十一月 2023 17:07:26 +0800
Subject: [PATCH] 生产日记报表:查询时增加根据用户关联客户过滤
---
WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 119 insertions(+), 0 deletions(-)
diff --git a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
index 134b1ca..21886e5 100644
--- a/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
+++ b/WebAPI/Controllers/XSGL/Xs_SeOrderBillController.cs
@@ -1992,5 +1992,124 @@
}
}
#endregion
+
+ #region 閿�鍞鍗� 妫�鏌ュ崟鎹槸鍚﹀瓨鍦�
+ /// <summary>
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <returns></returns>
+ [Route("Xs_SeOrderBill/CheckSeOrderBill_IsExist")]
+ [HttpGet]
+ public object CheckSeOrderBill_IsExist(int HInterID)
+ {
+ try
+ {
+ //HInterID鏁版嵁鍒ゆ柇
+ if (HInterID <= 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID灏忎簬0锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ Int64 lngBillKey = 0;
+ lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+ DAL.ClsXs_SeOrderBill oBill = new DAL.ClsXs_SeOrderBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+ //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+ if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍗曟嵁瀛樺湪";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "绋嬪簭閿欒锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 閿�鍞鍗� 涓嬫煡
+ /// <summary>
+ /// </summary>
+ /// <param name="HInterID">鍗曟嵁ID</param>
+ /// <returns></returns>
+ [Route("Xs_SeOrderBill/SeOrderBill_LookDown")]
+ [HttpGet]
+ public object SeOrderBill_LookDown(int HInterID)
+ {
+ try
+ {
+ List<object> columnNameListSum = new List<object>();
+ List<object> columnNameList0 = new List<object>();
+ List<object> columnNameList1 = new List<object>();
+ List<object> columnNameList2 = new List<object>();
+
+ string sql = "exec h_p_Xs_SeOrderBill_lookdown " + HInterID;
+ ds = oCN.RunProcReturn(sql, "h_p_Xs_SeOrderBill_lookdown");
+
+ //娣诲姞 閿�鍞鍗曞彉鏇村崟 鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList0.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ //娣诲姞 鐢熶骇璁㈠崟 鍒楀悕
+ foreach (DataColumn col in ds.Tables[1].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList1.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ //娣诲姞 鐗规壒鐢宠鍗� 鍒楀悕
+ foreach (DataColumn col in ds.Tables[2].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList2.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ columnNameListSum.Add(columnNameList0);
+ columnNameListSum.Add(columnNameList1);
+ columnNameListSum.Add(columnNameList2);
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables;
+ objJsonResult.list = columnNameListSum;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1