From e0c4604c10fa2b31992f236da6f48049f4b23e96 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期五, 22 十月 2021 17:33:58 +0800
Subject: [PATCH] 加汇总
---
WebAPI/Controllers/PublicPageMethodController.cs | 2324 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 2,259 insertions(+), 65 deletions(-)
diff --git a/WebAPI/Controllers/PublicPageMethodController.cs b/WebAPI/Controllers/PublicPageMethodController.cs
index 6e5fb36..b3d3f89 100644
--- a/WebAPI/Controllers/PublicPageMethodController.cs
+++ b/WebAPI/Controllers/PublicPageMethodController.cs
@@ -26,21 +26,12 @@
{
try
{
- if (sWhere == null || sWhere.Equals(""))
- {
- ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Customer where HStopflag=0 Order by HItemID ", "h_v_IF_Customer");
- }
- else
- {
- string sql1 = "Select HItemID,HParentID,HNumber,HName from h_v_IF_Customer where 1 = 1 ";
- string sql = sql1 + sWhere;
- ds = oCN.RunProcReturn(sql, "h_v_IF_Emp");
- }
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Customer "+ sWhere + " Order by HItemID ", "h_v_IF_Customer");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "false锛�";
+ objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -109,12 +100,12 @@
SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
//ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
- ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Customer", "h_v_IF_Customer");
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Customer " + sWhere+"", "h_v_IF_Customer");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "false锛�";
+ objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -131,30 +122,22 @@
#endregion
- #region 閫夋嫨鐢ㄦ埛鍩虹璧勬枡
+ #region 閫夋嫨鑱屽憳鍩虹璧勬枡
- #region 鏉′欢鏌ヨ鐢ㄦ埛鍒楄〃
+ #region 鏉′欢鏌ヨ鑱屽憳鍒楄〃
[Route("PublicPageMethod/UserList")]
[HttpGet]
public object UserList(string sWhere)
{
try
{
- if (sWhere == null || sWhere.Equals(""))
- {
- ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Emp where HStopflag=0 Order by HItemID ", "h_v_IF_Emp");
- }
- else
- {
- string sql1 = "Select HItemID,HParentID,HNumber,HName from h_v_IF_Emp where 1 = 1 ";
- string sql = sql1 + sWhere;
- ds = oCN.RunProcReturn(sql, "h_v_IF_Emp");
- }
+
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Emp "+sWhere+" Order by HItemID ", "h_v_IF_Emp");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "false锛�";
+ objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -178,7 +161,7 @@
}
#endregion
- #region 鏍规嵁鏍戝瀷id鏌ユ壘鐢ㄦ埛鍒楄〃
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘鑱屽憳鍒楄〃
[Route("Gy_MaintenanceMode/UserCX")]
[HttpGet]
public object UserCX(long HInterID)
@@ -215,7 +198,7 @@
}
#endregion
- #region 鏍戝瀷鍒楄〃鐢ㄦ埛鍒楄〃鏁版嵁
+ #region 鏍戝瀷鍒楄〃鑱屽憳鍒楄〃鏁版嵁
[Route("Gy_MaintenanceMode/UserLoadTree")]
[HttpGet]
public object UserLoadTree(string sWhere)
@@ -223,12 +206,12 @@
SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
//ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
- ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Emp", "h_v_IF_Emp");
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Emp " + sWhere+"", "h_v_IF_Emp");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "false锛�";
+ objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -254,21 +237,12 @@
{
try
{
- if (sWhere == null || sWhere.Equals(""))
- {
- ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Warehouse where HStopflag=0 Order by HItemID ", "h_v_IF_Warehouse");
- }
- else
- {
- string sql1 = "Select HItemID,HParentID,HNumber,HName from h_v_IF_Warehouse where 1 = 1 ";
- string sql = sql1 + sWhere;
- ds = oCN.RunProcReturn(sql, "h_v_IF_Warehouse");
- }
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Warehouse "+sWhere+" Order by HItemID ", "h_v_IF_Warehouse");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "false锛�";
+ objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -337,12 +311,117 @@
SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
//ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
- ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Warehouse", "h_v_IF_Warehouse");
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Warehouse "+sWhere+"", "h_v_IF_Warehouse");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "false锛�";
+ objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨浠撲綅鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ浠撲綅鍒楄〃
+ [Route("PublicPageMethod/WareLocationList")]
+ [HttpGet]
+ public object WareLocationList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_StockPlace "+sWhere+" Order by HItemID ", "Gy_StockPlace");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘浠撲綅鍒楄〃
+ [Route("Gy_MaintenanceMode/WareLocationCX")]
+ [HttpGet]
+ public object WareLocationCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.Gy_StockPlace WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.Gy_StockPlace AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_StockPlace");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃浠撲綅鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/WareLocationLoadTree")]
+ [HttpGet]
+ public object WareLocationLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_StockPlace "+sWhere+"", "Gy_StockPlace");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -368,21 +447,12 @@
{
try
{
- if (sWhere == null || sWhere.Equals(""))
- {
- ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Department where HStopflag=0 Order by HItemID ", "h_v_IF_Department");
- }
- else
- {
- string sql1 = "Select HItemID,HParentID,HNumber,HName from h_v_IF_Department where 1 = 1 ";
- string sql = sql1 + sWhere;
- ds = oCN.RunProcReturn(sql, "h_v_IF_Department");
- }
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Department "+sWhere+" Order by HItemID ", "h_v_IF_Department");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "false锛�";
+ objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -451,12 +521,12 @@
SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
//ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
- ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Department", "h_v_IF_Department");
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Department "+sWhere+"", "h_v_IF_Department");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "false锛�";
+ objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
objJsonResult.data = null;
return objJsonResult;
}
@@ -473,6 +543,219 @@
#endregion
+
+ #region 閫夋嫨璁㈠崟绛夌骇鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ璁㈠崟绛夌骇
+ [Route("PublicPageMethod/OrderLevList")]
+ [HttpGet]
+ public object OrderLevList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_OrderLev " + sWhere + " Order by HItemID ", "Gy_OrderLev");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘璁㈠崟绛夌骇
+ [Route("Gy_MaintenanceMode/OrderLevCX")]
+ [HttpGet]
+ public object OrderLevCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.Gy_OrderLev WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.Gy_OrderLev AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_OrderLev");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃璁㈠崟绛夌骇鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/OrderLevLoadTree")]
+ [HttpGet]
+ public object OrderLevLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_OrderLev " + sWhere + "", "Gy_OrderLev");
+ 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;
+ }
+ }
+ #endregion
+
+ #endregion
+
+
+ #region 閫夋嫨璁㈠崟鍙嶉鐘舵�佸熀纭�璧勬枡
+
+ #region 鏉′欢鏌ヨ璁㈠崟鍙嶉鐘舵��
+ [Route("PublicPageMethod/OrderBackInfoList")]
+ [HttpGet]
+ public object OrderBackInfoList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_OrderBackInfo " + sWhere + " Order by HItemID ", "Gy_OrderBackInfo");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘璁㈠崟鍙嶉鐘舵��
+ [Route("Gy_MaintenanceMode/OrderBackInfoCX")]
+ [HttpGet]
+ public object OrderBackInfoCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.Gy_OrderBackInfo WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.Gy_OrderBackInfo AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_OrderBackInfo");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃璁㈠崟鍙嶉鐘舵�佸垪琛ㄦ暟鎹�
+ [Route("Gy_MaintenanceMode/OrderBackInfoLoadTree")]
+ [HttpGet]
+ public object OrderBackInfoLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_OrderBackInfo " + sWhere + "", "Gy_OrderBackInfo");
+ 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;
+ }
+ }
+ #endregion
+
+ #endregion
+
+
#region 閫夋嫨鎴愬搧妯″叿鍩虹璧勬枡
#region 鏉′欢鏌ヨ鎴愬搧妯″叿鍒楄〃
@@ -484,7 +767,7 @@
{
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName,HModel from h_v_Gy_Mould Order by HNumber", "h_v_IF_Department");
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName,HModel from h_v_Gy_Mould Order by HNumber", "h_v_Gy_Mould");
}
else
{
@@ -701,24 +984,24 @@
#endregion
- #region 閫夋嫨渚涘簲鍟嗗熀纭�璧勬枡
+ #region 閫夋嫨缁翠慨楠屾敹椤圭洰鍩虹璧勬枡
- #region 鏉′欢鏌ヨ渚涘簲鍟嗗垪琛�
- [Route("PublicPageMethod/SupplierList")]
+ #region 鏉′欢鏌ヨ缁翠慨楠屾敹椤圭洰鍒楄〃
+ [Route("PublicPageMethod/RepairCheckItemList")]
[HttpGet]
- public object SupplierList(string sWhere)
+ public object RepairCheckItemList(string sWhere)
{
try
{
if (sWhere == null || sWhere.Equals(""))
{
- ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Supplier where HStopflag=0 Order by HItemID", "Gy_Supplier");
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_RepairCheck where HStopflag=0 Order by HItemID", "Gy_RepairCheck");
}
else
{
- string sql1 = "Select HItemID,HParentID,HNumber,HName from Gy_Supplier where 1 = 1 ";
+ string sql1 = "Select HItemID,HParentID,HNumber,HName from Gy_RepairCheck where 1 = 1 ";
string sql = sql1 + sWhere;
- ds = oCN.RunProcReturn(sql, "Gy_Supplier");
+ ds = oCN.RunProcReturn(sql, "Gy_RepairCheck");
}
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
@@ -736,6 +1019,111 @@
objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘淇獙鏀堕」鐩垪琛�
+ [Route("Gy_MaintenanceMode/RepairCheckItemCX")]
+ [HttpGet]
+ public object RepairCheckItemCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.Gy_RepairCheck WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.Gy_RepairCheck AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_RepairCheck");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃淇獙鏀堕」鐩垪琛ㄦ暟鎹�
+ [Route("Gy_MaintenanceMode/RepairCheckItemLoadTree")]
+ [HttpGet]
+ public object RepairCheckItemLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_RepairCheck", "Gy_RepairCheck");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨渚涘簲鍟嗗熀纭�璧勬枡
+
+ #region 鏉′欢鏌ヨ渚涘簲鍟嗗垪琛�
+ [Route("PublicPageMethod/SupplierList")]
+ [HttpGet]
+ public object SupplierList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Supplier "+sWhere+" Order by HItemID", "Gy_Supplier");
+ //if (ds == null || ds.Tables[0].Rows.Count == 0)
+ //{
+ // objJsonResult.code = "0";
+ // objJsonResult.count = 0;
+ // objJsonResult.Message = "false锛�";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //else
+ //{
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ //}
}
catch (Exception e)
{
@@ -793,7 +1181,7 @@
SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
//ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
- ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_Supplier", "Gy_Supplier");
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_Supplier "+sWhere+"", "Gy_Supplier");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -908,6 +1296,120 @@
//ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_ConkType", "Gy_ConkType");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨鏁呴殰鍘熷洜璁剧疆鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ鏁呴殰鍘熷洜璁剧疆鍒楄〃
+ [Route("PublicPageMethod/FaultReasonList")]
+ [HttpGet]
+ public object FaultReasonList(string sWhere)
+ {
+ try
+ {
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_ConkReason where HStopflag=0 Order by HItemID", "Gy_ConkReason");
+ }
+ else
+ {
+ string sql1 = "Select HItemID,HParentID,HNumber,HName from Gy_ConkReason where 1 = 1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "Gy_ConkReason");
+ }
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘鏁呴殰鍘熷洜璁剧疆鍒楄〃
+ [Route("Gy_MaintenanceMode/FaultReasonCX")]
+ [HttpGet]
+ public object FaultReasonCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.Gy_ConkReason WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.Gy_ConkReason AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_ConkReason");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃鏁呴殰鍘熷洜璁剧疆鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/FaultReasonLoadTree")]
+ [HttpGet]
+ public object FaultReasonLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_ConkReason", "Gy_ConkReason");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -1157,5 +1659,1697 @@
#endregion
+ #region 閫夋嫨鐝粍鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ鐝粍鍒楄〃
+ [Route("PublicPageMethod/GroupList")]
+ [HttpGet]
+ public object GroupList(string sWhere)
+ {
+ try
+ {
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Group where HStopflag=0 Order by HItemID", "h_v_IF_Group");
+ }
+ else
+ {
+ string sql1 = "Select HItemID,HParentID,HNumber,HName from h_v_IF_Group where 1 = 1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "h_v_IF_Group");
+ }
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘鐝粍鍒楄〃
+ [Route("Gy_MaintenanceMode/GroupCX")]
+ [HttpGet]
+ public object GroupCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.h_v_IF_Group WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.h_v_IF_Group AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "h_v_IF_Group");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃鐝粍鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/GroupLoadTree")]
+ [HttpGet]
+ public object GroupLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Group", "h_v_IF_Group");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨璧勬簮鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ璧勬簮鍒楄〃
+ [Route("PublicPageMethod/SourceList")]
+ [HttpGet]
+ public object SourceList(string sWhere)
+ {
+ try
+ {
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Source where HStopflag=0 Order by HItemID", "Gy_Source");
+ }
+ else
+ {
+ string sql1 = "Select HItemID,HParentID,HNumber,HName from Gy_Source where 1 = 1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "Gy_Source");
+ }
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘璧勬簮鍒楄〃
+ [Route("Gy_MaintenanceMode/SourceCX")]
+ [HttpGet]
+ public object SourceCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.Gy_Source WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.Gy_Source AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_Source");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃璧勬簮鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/SourceLoadTree")]
+ [HttpGet]
+ public object SourceLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_Source", "Gy_Source");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨鐗╂枡鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ鐗╂枡鍒楄〃
+ [Route("PublicPageMethod/PartList")]
+ [HttpGet]
+ public object PartList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName,HModel from h_v_IF_Material "+sWhere+" Order by HItemID", "h_v_IF_Material");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘鐗╂枡鍒楄〃
+ [Route("Gy_MaintenanceMode/PartCX")]
+ [HttpGet]
+ public object PartCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.h_v_IF_Material WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.h_v_IF_Material AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "h_v_IF_Material");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃鐗╂枡鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/PartLoadTree")]
+ [HttpGet]
+ public object PartLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Material "+sWhere+"", "h_v_IF_Material");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨鍗曚綅鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ鍗曚綅鍒楄〃
+ [Route("PublicPageMethod/UnitList")]
+ [HttpGet]
+ public object UnitList(string sWhere)
+ {
+ try
+ {
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from h_v_IF_Unit where HStopflag=0 Order by HItemID", "h_v_IF_Unit");
+ }
+ else
+ {
+ string sql1 = "Select HItemID,HParentID,HNumber,HName from h_v_IF_Unit ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "h_v_IF_Unit");
+ }
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘鍗曚綅鍒楄〃
+ [Route("Gy_MaintenanceMode/UnitCX")]
+ [HttpGet]
+ public object UnitCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.h_v_IF_Unit WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.h_v_IF_Unit AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "h_v_IF_Unit");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃鍗曚綅鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/UnitLoadTree")]
+ [HttpGet]
+ public object UnitLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from h_v_IF_Unit", "h_v_IF_Unit");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨杈呭姪灞炴�у熀纭�璧勬枡
+
+ #region 鏉′欢鏌ヨ杈呭姪灞炴�у垪琛�
+ [Route("PublicPageMethod/PropertyList")]
+ [HttpGet]
+ public object PropertyList(string sWhere)
+ {
+ try
+ {
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Property where HStopflag=0 Order by HItemID", "Gy_Property");
+ }
+ else
+ {
+ string sql1 = "Select HItemID,HParentID,HNumber,HName from Gy_Property where 1 = 1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "Gy_Property");
+ }
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘杈呭姪灞炴�у垪琛�
+ [Route("Gy_MaintenanceMode/PropertyCX")]
+ [HttpGet]
+ public object PropertyCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (SELECT * FROM dbo.Gy_Property WHERE HitemID=" + HInterID + " UNION ALL SELECT s.* FROM dbo.Gy_Property AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_Property");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃杈呭姪灞炴�у垪琛ㄦ暟鎹�
+ [Route("Gy_MaintenanceMode/PropertyLoadTree")]
+ [HttpGet]
+ public object PropertyLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_Property", "Gy_Property");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨淇濆吇椤圭洰鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ淇濆吇椤圭洰鍒楄〃
+ [Route("PublicPageMethod/MaintainList")]
+ [HttpGet]
+ public object MaintainList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Maintain " + sWhere + " Order by HItemID ", "Gy_Maintain");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘淇濆吇椤圭洰鍒楄〃
+ [Route("Gy_MaintenanceMode/MaintainCX")]
+ [HttpGet]
+ public object MaintainCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (select * from Gy_Maintain WHERE HitemID=" + HInterID + " UNION ALL select s.* from Gy_Maintain AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_Maintain");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃淇濆吇椤圭洰鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/MaintainLoadTree")]
+ [HttpGet]
+ public object MaintainLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_Maintain " + sWhere + "", "Gy_Maintain");
+ 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;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨妫�楠岄」鐩熀纭�璧勬枡
+
+ #region 鏉′欢鏌ヨ妫�楠岄」鐩垪琛�
+ [Route("PublicPageMethod/CheckItemList")]
+ [HttpGet]
+ public object CheckItemList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_QCCheckItem " + sWhere + " Order by HItemID ", "Gy_QCCheckItem");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘妫�楠岄」鐩垪琛�
+ [Route("Gy_MaintenanceMode/CheckItemCX")]
+ [HttpGet]
+ public object CheckItemCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (select * from Gy_QCCheckItem WHERE HitemID=" + HInterID + " UNION ALL select s.* from Gy_QCCheckItem AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_QCCheckItem");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃鐐规椤圭洰鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/CheckItemLoadTree")]
+ [HttpGet]
+ public object CheckItemLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_QCCheckItem " + sWhere + "", "Gy_QCCheckItem");
+ 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;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨鐗╂枡绫诲瀷鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ鐗╂枡绫诲瀷鍒楄〃
+ [Route("PublicPageMethod/MaterTypeList")]
+ [HttpGet]
+ public object MaterTypeList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_MaterType " + sWhere + " Order by HItemID ", "Gy_MaterType");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘鐗╂枡绫诲瀷鍒楄〃
+ [Route("Gy_MaintenanceMode/MaterTypeCX")]
+ [HttpGet]
+ public object MaterTypeCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (select * from Gy_MaterType WHERE HitemID=" + HInterID + " UNION ALL select s.* from Gy_MaterType AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_QCCheckItem");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃鐗╂枡绫诲瀷鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/MaterTypeLoadTree")]
+ [HttpGet]
+ public object MaterTypeLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_MaterType " + sWhere + "", "Gy_MaterType");
+ 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;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨宸ヨ壓璺嚎鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ宸ヨ壓璺嚎鍒楄〃
+ [Route("PublicPageMethod/RouteList")]
+ [HttpGet]
+ public object RouteList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("select HItemID,'' HParentID,HNumber,HName from h_v_IF_MouldRouting " + sWhere + " Order by HItemID ", "h_v_IF_MouldRouting");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨BOM缁勫熀纭�璧勬枡
+
+ #region 鏉′欢鏌ヨBOM缁勫垪琛�
+ [Route("PublicPageMethod/BomGroupList")]
+ [HttpGet]
+ public object BomGroupList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_ICBomGroup " + sWhere + " Order by HItemID ", "Gy_ICBomGroup");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃燘OM鏁版嵁锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘BOM缁勫垪琛�
+ [Route("Gy_MaintenanceMode/BomGroupCX")]
+ [HttpGet]
+ public object BomGroupCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (select * from Gy_ICBomGroup WHERE HitemID=" + HInterID + " UNION ALL select s.* from Gy_ICBomGroup AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_ICBomGroup");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃BOM缁勫垪琛ㄦ暟鎹�
+ [Route("Gy_MaintenanceMode/BomGroupLoadTree")]
+ [HttpGet]
+ public object BomGroupLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_ICBomGroup " + sWhere + "", "Gy_ICBomGroup");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃燘OM鏁版嵁锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨浠撲綅缁勫熀纭�璧勬枡
+
+ #region 鏉′欢鏌ヨ浠撲綅缁勫垪琛�
+ [Route("PublicPageMethod/HSPGroupList")]
+ [HttpGet]
+ public object HSPGroupList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_StockPlaceGroup " + sWhere + " Order by HItemID ", "Gy_StockPlaceGroup");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘浠撲綅缁勫垪琛�
+ [Route("Gy_MaintenanceMode/HSPGroupCX")]
+ [HttpGet]
+ public object HSPGroupCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (select * from Gy_StockPlaceGroup WHERE HitemID=" + HInterID + " UNION ALL select s.* from Gy_StockPlaceGroup AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_StockPlaceGroup");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃浠撲綅缁勫垪琛ㄦ暟鎹�
+ [Route("Gy_MaintenanceMode/HSPGroupLoadTree")]
+ [HttpGet]
+ public object HSPGroupLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_StockPlaceGroup " + sWhere + "", "Gy_StockPlaceGroup");
+ 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;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨鍦板尯鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ鍦板尯鍒楄〃
+ [Route("PublicPageMethod/AreaList")]
+ [HttpGet]
+ public object AreaList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_AreaSet " + sWhere + " Order by HItemID ", "Gy_AreaSet");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘鍦板尯鍒楄〃
+ [Route("Gy_MaintenanceMode/AreaCX")]
+ [HttpGet]
+ public object AreaCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (select * from Gy_AreaSet WHERE HitemID=" + HInterID + " UNION ALL select s.* from Gy_AreaSet AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_AreaSet");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃鍦板尯鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/AreaLoadTree")]
+ [HttpGet]
+ public object AreaLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_AreaSet " + sWhere + "", "Gy_AreaSet");
+ 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;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨璐у竵鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ璐у竵鍒楄〃
+ [Route("PublicPageMethod/CurrencyList")]
+ [HttpGet]
+ public object CurrencyList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Currency " + sWhere + " Order by HItemID ", "Gy_Currency");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘璐у竵鍒楄〃
+ [Route("Gy_MaintenanceMode/CurrencyCX")]
+ [HttpGet]
+ public object CurrencyCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (select * from Gy_Currency WHERE HitemID=" + HInterID + " UNION ALL select s.* from Gy_Currency AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_Currency");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃璐у竵鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/CurrencyLoadTree")]
+ [HttpGet]
+ public object CurrencyLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_Currency " + sWhere + "", "Gy_Currency");
+ 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;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨缁撶畻鏂瑰紡鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ缁撶畻鏂瑰紡鍒楄〃
+ [Route("PublicPageMethod/SettleStyleList")]
+ [HttpGet]
+ public object SettleStyleList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_SettleStyle " + sWhere + " Order by HItemID ", "Gy_SettleStyle");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘缁撶畻鏂瑰紡鍒楄〃
+ [Route("Gy_MaintenanceMode/SettleStyleCX")]
+ [HttpGet]
+ public object SettleStyleCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (select * from Gy_SettleStyle WHERE HitemID=" + HInterID + " UNION ALL select s.* from Gy_SettleStyle AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_SettleStyle");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃缁撶畻鏂瑰紡鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/SettleStyleLoadTree")]
+ [HttpGet]
+ public object SettleStyleLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_SettleStyle " + sWhere + "", "Gy_SettleStyle");
+ 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;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨瀹㈡埛鍒嗙被鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ瀹㈡埛鍒嗙被鍒楄〃
+ [Route("PublicPageMethod/CusTypeList")]
+ [HttpGet]
+ public object CusTypeList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_CusType " + sWhere + " Order by HItemID ", "Gy_CusType");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘瀹㈡埛鍒嗙被鍒楄〃
+ [Route("Gy_MaintenanceMode/CusTypeCX")]
+ [HttpGet]
+ public object CusTypeCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (select * from Gy_CusType WHERE HitemID=" + HInterID + " UNION ALL select s.* from Gy_CusType AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Gy_CusType");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃瀹㈡埛鍒嗙被鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/CusTypeLoadTree")]
+ [HttpGet]
+ public object CusTypeLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Gy_CusType " + sWhere + "", "Gy_CusType");
+ 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;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨鐧诲綍缁勭粐鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ缁勭粐鍒楄〃
+ [Route("PublicPageMethod/OrganizationsList")]
+ [HttpGet]
+ public object OrganizationsList(string sWhere)
+ {
+ try
+ {
+ ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Xt_ORGANIZATIONS " + sWhere + " Order by HItemID ", "Xt_ORGANIZATIONS");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍规嵁鏍戝瀷id鏌ユ壘缁勭粐鍒楄〃
+ [Route("Gy_MaintenanceMode/OrganizationsCX")]
+ [HttpGet]
+ public object OrganizationsCX(long HInterID)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn(string.Format(@"WITH a AS (select * from Gy_CusType Xt_ORGANIZATIONS HitemID=" + HInterID + " UNION ALL select s.* from Xt_ORGANIZATIONS AS s,a WHERE s.hparentid=a.HitemID) SELECT * FROM a"), "Xt_ORGANIZATIONS");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "false锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鏍戝瀷鍒楄〃缁勭粐鍒楄〃鏁版嵁
+ [Route("Gy_MaintenanceMode/OrganizationsLoadTree")]
+ [HttpGet]
+ public object OrganizationsLoadTree(string sWhere)
+ {
+ SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
+ //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
+
+ ds = oCN.RunProcReturn("Select HItemID id,HNumber,(CAST(HNumber as varchar(100))+'-'+CAST(HName as varchar(100))) as title,HParentID ParentID,HLevel from Xt_ORGANIZATIONS " + sWhere + "", "Xt_ORGANIZATIONS");
+ 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;
+ }
+ }
+ #endregion
+
+ #endregion
+
+ #region 閫夋嫨鐢ㄦ埛鍩虹璧勬枡
+
+ #region 鏉′欢鏌ヨ鐢ㄦ埛鍒楄〃
+ [Route("PublicPageMethod/PeopleList")]
+ [HttpGet]
+ public object PeopleList(string sWhere)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("Select czybm HNumber,czymc HName from h_v_Gy_UserList " + sWhere + " Order by czybm ", "h_v_Gy_UserList");
+ 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;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #endregion
}
}
--
Gitblit v1.9.1