From ae36a4639fff74935c27c8e7bb0ce6b39ad039a5 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期五, 24 十月 2025 13:35:45 +0800
Subject: [PATCH] WEBS引用更新
---
WebAPI/Controllers/ReportPlatFormController.cs | 324 +++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 309 insertions(+), 15 deletions(-)
diff --git a/WebAPI/Controllers/ReportPlatFormController.cs b/WebAPI/Controllers/ReportPlatFormController.cs
index a1295de..2daaede 100644
--- a/WebAPI/Controllers/ReportPlatFormController.cs
+++ b/WebAPI/Controllers/ReportPlatFormController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
@@ -15,6 +16,7 @@
private json objJsonResult = new json();
SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
DataSet ds;
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
#region 鎶ュ伐骞冲彴鏍规嵁璐d换浜虹瓫閫夊姞杞借祫婧愬垪琛�
@@ -26,6 +28,46 @@
{
//鏍规嵁閫夋嫨璧勬簮ID鑾峰彇褰撳墠鐢熶骇宸ュ崟銆佽矗浠讳汉
ds = oCN.RunProcReturn("exec h_p_JIT_GetSourceInfoByUser " + HUserName + "", "h_p_JIT_GetSourceInfoByUser");
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�";
+ objJsonResult.data = ds;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏆傛棤璧勬簮缁戝畾锛�";
+ objJsonResult.data = ds;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = e.Message.ToString();
+ objJsonResult.data = null;
+
+ }
+ return objJsonResult;
+ }
+ #endregion
+
+ #region 鎶ュ伐骞冲彴鏍规嵁璐d换浜虹瓫閫夊姞杞借祫婧愬垪琛�
+ [Route("ReportPlatForm/SearchGetLineBindBillListStatus")]
+ [HttpGet]
+ public object SearchGetLineBindBillListStatus(string HUserName,string HStatus)
+ {
+ try
+ {
+ //鏍规嵁閫夋嫨璧勬簮ID鑾峰彇褰撳墠鐢熶骇宸ュ崟銆佽矗浠讳汉
+ ds = oCN.RunProcReturn("exec h_p_JIT_GetSourceInfoByUser " + HUserName + ",'" + HStatus + "'", "h_p_JIT_GetSourceInfoByUser");
if (ds.Tables[0].Rows.Count > 0)
{
@@ -70,28 +112,42 @@
try
{
- ds = oCN.RunProcReturn("select * from Gy_SourceRelationSet where HSourceID='" + HSourceID + "' and HUserName='"+ HSourceName + "'", "Gy_SourceRelationSet");
+
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("IpadIndex_Edit", 1, false, HUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏂板浜х嚎澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ds = oCN.RunProcReturn("select * from Gy_SourceRelationSet where HSourceID='" + HSourceID + "' and HUserName='" + HUserName + "'", "Gy_SourceRelationSet");
+
if (ds.Tables[0].Rows.Count > 0)
{
-
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "褰撳墠浜哄憳鍒涘缓姝ょ敓浜ц祫婧�,涓嶅厑璁搁噸澶嶅垱寤猴紒";
objJsonResult.data = null;
- return objJsonResult;
+
}
- oCN.BeginTran();
- //鍐欏叆浜х嚎缁戝畾
- string sql = string.Format(@"insert into Gy_SourceRelationSet (HSourceID,HUserName,HGroupID,HManagerID,HRemark,HCreateDate,HCreator,HNowFlag,HCheckManID)
+ else
+ {
+ oCN.BeginTran();
+ //鍐欏叆浜х嚎缁戝畾
+ string sql = string.Format(@"insert into Gy_SourceRelationSet (HSourceID,HUserName,HGroupID,HManagerID,HRemark,HCreateDate,HCreator,HNowFlag,HCheckManID)
values('" + HSourceID + "','" + HUserName + "','" + HGroupID + "','" + HManagerID + "','" + HRemark + "','" + DateTime.Parse(HCreateDate).ToShortDateString() + "','" + HUserName + "','0','')");
- oCN.RunProc(sql);
- oCN.Commit();
+ oCN.RunProc(sql);
+ oCN.Commit();
- objJsonResult.code = "1";
- objJsonResult.count = 1;
- objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
- objJsonResult.data = null;
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = null;
+ }
}
catch (Exception e)
{
@@ -157,13 +213,24 @@
#region 鎶ュ伐骞冲彴鍒犻櫎璧勬簮鍒楄〃
[Route("ReportPlatForm/DeleteGetLineBindBillList")]
[HttpGet]
- public object DeleteGetLineBindBillList(string HSourceID)
+ public object DeleteGetLineBindBillList(string HSourceID,string user)
{
try
{
+
+ //缂栬緫鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log_second("IpadIndex_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎浜х嚎澶辫触锛佹棤鏉冮檺锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
oCN.BeginTran();
//鏇存柊鍒囨崲鐘舵�佸��
- string sql = string.Format(@"delete Gy_SourceRelationSet where HSourceID='" + HSourceID + "'");
+ string sql = string.Format(@"delete Gy_SourceRelationSet where HSourceID='" + HSourceID + "' and HUserName = '" + user + "'");
oCN.RunProc(sql);
oCN.Commit();
objJsonResult.code = "1";
@@ -185,5 +252,232 @@
}
#endregion
+ #region 閫氳繃绯荤粺鍙傛暟鎺у埗锛屽垽鏂敓浜ц鍗曟槸鍚﹀仛浜嗛浠舵楠屽崟鍜屽伐搴忔楠屽崟
+ [Route("ReportPlatForm/IsCheck")]
+ [HttpGet]
+ public object IsCheck(Int64 HICMOInterID,Int64 HICMOEntryID,string HICMOBillNo)
+ {
+ try
+ {
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ string HBackRemark = "";
+ if (oSystemParameter.ShowBill(ref sErrMsg) == true)
+ {
+ if (oSystemParameter.omodel.Sc_ICMOReportBill_FirstCheckOut == "Y") //绯荤粺鍙傛暟 鏄惁鍋氫簡棣栦欢妫�楠屽崟 绌虹櫧涓洪�氱敤
+ {
+ ds = oCN.RunProcReturn("exec h_p_JIT_IsFirstCheckOut " + HICMOInterID + "," + HICMOEntryID + ",'" + HICMOBillNo + "'", "h_p_Sc_IsFirstCheckOut");
+
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ HBackRemark += ds.Tables[0].Rows[0]["HBackRemark"] + " ";
+ }
+ }
+ if(oSystemParameter.omodel.Sc_ICMOReportBill_ProcessCheckOut == "Y") //绯荤粺鍙傛暟 鏄惁鍋氫簡杩囩▼妫�楠屽崟 绌虹櫧涓洪�氱敤
+ {
+ ds = oCN.RunProcReturn("exec h_p_JIT_IsProcessCheckOut " + HICMOInterID + "," + HICMOEntryID + ",'" + HICMOBillNo + "'", "h_p_Sc_IsProcessCheckOut");
+
+ if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ HBackRemark += ds.Tables[0].Rows[0]["HBackRemark"];
+ }
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (HBackRemark == "")
+ {
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "褰撳墠鐢熶骇璁㈠崟宸茬淮鎶ら浠舵楠屽崟鍜岃繃绋嬫楠屽崟";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = HBackRemark;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ }
+ catch (Exception ex)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = ex.Message;
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
+
+ #region 鎶ュ伐骞冲彴鎸夐挳鏌ヨ
+ [Route("ReportPlatForm/getButtonlist")]
+ [HttpGet]
+ public object getButtonlist(string user)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ ds = oCN.RunProcReturn("select * from h_v_Gy_UserButton where 鐢ㄦ埛鍚嶇О='" + user+ "' order by 鎸夐挳鎺掑簭", "h_v_Gy_UserButton");
+
+ if (ds.Tables[0]==null || ds.Tables[0].Rows.Count <1)
+ {
+ ds = oCN.RunProcReturn("select * from h_v_Gy_UserButton where 鐢ㄦ埛鍚嶇О='admin' order by 鎸夐挳鎺掑簭", "h_v_Gy_UserButton");
+ }
+
+ //娣诲姞鍒楀悕
+ 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 = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 鎶ュ伐骞冲彴鎸夐挳娣诲姞
+ [Route("ReportPlatForm/AddButtonlist")]
+ [HttpGet]
+ public object AddButtonlist(string HUserName,string HButtonID, string HButtonName, string HButtonSize, string HButtonOrder)
+ {
+ try
+ {
+
+ ds = oCN.RunProcReturn("select * from Gy_UserButtons where HButtonID='" + HButtonID + "' and HUserName='" + HUserName + "'", "Gy_UserButtons");
+
+ if (ds.Tables[0].Rows.Count > 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "褰撳墠浜哄憳宸插垱寤烘敼鎸夐挳,涓嶅厑璁搁噸澶嶅垱寤猴紒";
+ objJsonResult.data = null;
+
+ }
+ else
+ {
+ oCN.BeginTran();
+ //鍐欏叆鎸夐挳缁戝畾
+ oCN.RunProc("insert into Gy_UserButtons(HUserName,HButtonID,HButtonName,HButtonSize,HButtonOrder)values('" + HUserName+"','"+HButtonID+ "','" + HButtonName + "','" + HButtonSize + "','" + HButtonOrder + "')");
+ oCN.Commit();
+
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+ objJsonResult.data = null;
+ }
+ }
+ catch (Exception e)
+ {
+ oCN.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
+
+ #region 鎶ュ伐骞冲彴鎸夐挳鍒犻櫎
+ [Route("ReportPlatForm/DeleteButtonlist")]
+ [HttpGet]
+ public object DeleteButtonlist(int HItemID)
+ {
+ try
+ {
+ oCN.BeginTran();
+ oCN.RunProc("delete from Gy_UserButtons where HItemID ='" + HItemID + "'");
+ oCN.Commit();
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鍒犻櫎鎸夐挳鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = e.Message.ToString();
+ objJsonResult.data = null;
+
+ }
+ return objJsonResult;
+ }
+ #endregion
+
+ #region 鎶ュ伐骞冲彴鎸夐挳鍩虹璧勬枡鏌ヨ
+ [Route("ReportPlatForm/GetGy_BGButtons")]
+ [HttpGet]
+ public object GetGy_BGButtons(string sWhere)
+ {
+ try
+ {
+ List<object> columnNameList = new List<object>();
+
+ if (sWhere == null || sWhere.Equals(""))
+ {
+ ds = oCN.RunProcReturn("select HItemID 鎸夐挳id,HNumber 鎸夐挳浠g爜,HName 鎸夐挳鍚嶇О from Gy_BGButtons", "Gy_BGButtons");
+ }
+ else
+ {
+ string sql1 = "select HItemID 鎸夐挳id,HNumber 鎸夐挳浠g爜,HName 鎸夐挳鍚嶇О from Gy_BGButtons where 1 = 1 ";
+ string sql = sql1 + sWhere;
+ ds = oCN.RunProcReturn(sql, "Gy_BGButtons");
+ }
+
+ //娣诲姞鍒楀悕
+ 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 = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
--
Gitblit v1.9.1