From 2ba5117206c152cece2e5ac40067a6232dfb2870 Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期三, 10 九月 2025 17:12:08 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- WebApi/Gs.Wom/Service/WomdaaManager.cs | 81 ++++++++++++++++------------------------ 1 files changed, 32 insertions(+), 49 deletions(-) diff --git a/WebApi/Gs.Wom/Service/WomdaaManager.cs b/WebApi/Gs.Wom/Service/WomdaaManager.cs index ce7f9e5..392b6de 100644 --- a/WebApi/Gs.Wom/Service/WomdaaManager.cs +++ b/WebApi/Gs.Wom/Service/WomdaaManager.cs @@ -1,13 +1,14 @@ -锘縰sing System.Data; -using System.Data.SqlClient; -using System.Dynamic; -using System.Text; -using Gs.Toolbox; +锘縰sing Gs.Toolbox; using Gs.Toolbox.ApiCore.Abstract.Mvc; using Gs.Toolbox.ApiCore.Common.Mvc; using Gs.Toolbox.ApiCore.Group; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; +using Newtonsoft.Json.Linq; +using System.Data; +using System.Data.SqlClient; +using System.Dynamic; +using System.Text; using static Gs.Toolbox.UtilityHelper; @@ -82,7 +83,7 @@ { LogHelper.Debug(ToString(), ex.Message); return ReturnDto<PageList<dynamic>>.QuickReturn(_pglist, - ReturnCode.Exception, ex.Message); + ReturnCode.Exception, ex.Message); } return ReturnDto<PageList<dynamic>>.QuickReturn(_pglist, @@ -151,7 +152,7 @@ /// <summary> - /// 淇敼宸ュ崟鐘舵�� + /// 淇敼宸ュ崟鐘舵�� /// </summary> /// <param name="mode"></param> /// <returns></returns> @@ -209,13 +210,12 @@ /// <summary> - /// 閲嶆柊鐢熸垚棣栨 + /// 閲嶆柊鐢熸垚棣栨 /// </summary> /// <param name="mode"></param> /// <returns></returns> [RequestMethod(RequestMethods.POST)] - public ReturnDto<ExpandoObject> EditModelSubmitShouJian( - [FromBody] dynamic mode) + public ReturnDto<ExpandoObject> EditModelSubmitShouJian([FromBody] dynamic mode) { string _guid = mode.guid; string _inFieldValue = mode.inFieldValue; @@ -235,7 +235,7 @@ new("@po_outMsg", SqlDbType.NVarChar, 300), new("@po_outStatus", SqlDbType.Int), new("@pi_user", _userCode), - new("@pi_DAA_guid", _guid) + new("@pi_DAA_guid", _guid), }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Direction = ParameterDirection.Output; @@ -264,6 +264,7 @@ } + /// <summary> /// 澧炲姞鎴栫紪杈戝疄浣� /// </summary> @@ -290,12 +291,11 @@ { new("@outMsg", SqlDbType.NVarChar, 300), new("@outSum", SqlDbType.Int), - new("@inOrderGuid", - CheckGuid(guid) ? guid : DBNull.Value), + new("@inOrderGuid",UtilityHelper.CheckGuid(guid)? guid : DBNull.Value), new("@inSjxt", sjxt), new("@inBz", bz), new("@inSclx", sclx), - new("@inEdtUserGuid", _userGuid) + new("@inEdtUserGuid", _userGuid), }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Direction = ParameterDirection.Output; @@ -318,7 +318,6 @@ } } } - if (_outSum <= 0) return ReturnDto<string>.QuickReturn(guid.ToString(), ReturnCode.Exception, _outMsg); @@ -365,7 +364,6 @@ dt.Fill(dset, "0"); } } - conn.Close(); } } @@ -397,20 +395,18 @@ var _dy = dset.Tables[0].TableToDynamicList(); _pglist.list = _dy; } - return ReturnDto<PageList<dynamic>>.QuickReturn(_pglist, ReturnCode.Success, "璇诲彇鎴愬姛"); } /// <summary> - /// 閫夋嫨dab寮圭獥浣� + /// 閫夋嫨dab寮圭獥浣� /// </summary> /// <param name="model"></param> /// <returns></returns> [RequestMethod(RequestMethods.POST)] - public ReturnDto<PageList<dynamic>> GetListSelectDab( - [FromBody] dynamic model) + public ReturnDto<PageList<dynamic>> GetListSelectDab([FromBody] dynamic model) { int currentPage = model.currentPage; int everyPageSize = model.everyPageSize; @@ -443,7 +439,6 @@ dt.Fill(dset, "0"); } } - conn.Close(); } } @@ -453,7 +448,6 @@ return ReturnDto<PageList<dynamic>>.QuickReturn( default(PageList<dynamic>), ReturnCode.Exception, "璇诲彇澶辫触"); } - var _pglist = new PageList<dynamic> { total = 0, @@ -475,7 +469,6 @@ var _dy = dset.Tables[0].TableToDynamicList(); _pglist.list = _dy; } - return ReturnDto<PageList<dynamic>>.QuickReturn(_pglist, ReturnCode.Success, "璇诲彇鎴愬姛"); } @@ -563,7 +556,7 @@ new("@outMsg", SqlDbType.NVarChar, 300), new("@outSum", SqlDbType.Int), new("@inOrderGuid", - CheckGuid(guid) + UtilityHelper.CheckGuid(guid) ? guid : DBNull.Value), new("@inEdtUserGuid", _userGuid), @@ -593,13 +586,12 @@ } if (_outSum <= 0) - return ReturnDto<int>.QuickReturn(rtnInt, ReturnCode.Exception, - _outMsg); + return ReturnDto<int>.QuickReturn(rtnInt, ReturnCode.Exception, _outMsg); return ReturnDto<int>.QuickReturn(rtnInt, ReturnCode.Success, _outMsg); } /// <summary> - /// 宸ヨ壓鍙樻洿 + /// 宸ヨ壓鍙樻洿 /// </summary> /// <param name="model"></param> /// <returns></returns> @@ -617,7 +609,6 @@ _sb.Append("~"); _sb.Append(_line); } - dynamic mObj = new ExpandoObject(); mObj.outMsg = ""; mObj.outSum = -1; @@ -635,8 +626,7 @@ { new("@outMsg", SqlDbType.NVarChar, 300), new("@outSum", SqlDbType.Int), - new("@inOrderGuid", - CheckGuid(guid) ? guid : DBNull.Value), + new("@inOrderGuid", CheckGuid(guid) ? guid : DBNull.Value), new("@inEdtUserGuid", _userGuid), new("@inLineList", _sb.ToString()) }; @@ -661,39 +651,34 @@ } } } - if (mObj.outSum <= 0) - return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Exception, - mObj.outMsg); - return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Success, - mObj.outMsg); + return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Exception, mObj.outMsg); + return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Success, mObj.outMsg); } /// <summary> + /// /// </summary> /// <param name="query"></param> /// <returns></returns> [RequestMethod(RequestMethods.POST)] public ReturnDto<List<dynamic>> GetGyList( - [FromBody] dynamic model) + [FromBody] dynamic model) { string daaGuid = model.guid; var lst = new List<dynamic>(); var dset = new DataSet(); - var sbSql = new StringBuilder(); - sbSql.Append( - " select * from [dbo].[WOMDAA_TECHNIQUE] where daaGuid='" + - daaGuid + "' order by processNo asc "); + System.Text.StringBuilder sbSql = new System.Text.StringBuilder(); + sbSql.Append(" select * from [dbo].[WOMDAA_TECHNIQUE] where daaGuid='" + daaGuid + "' order by processNo asc "); try { - dset = DbHelperSQL.Query(sbSql.ToString()); + dset = Gs.Toolbox.DbHelperSQL.Query(sbSql.ToString()); } catch (Exception ex) { LogHelper.Debug(ToString(), ex.Message); } - if (dset != null && dset.Tables.Count > 0 && dset.Tables[0].Rows.Count > 0) //鏈夋暟鎹� lst = dset.Tables[0].TableToDynamicList(); @@ -703,7 +688,7 @@ /// <summary> - /// 鍙樻洿鍐呭寘瑁呮暟閲� + /// 鍙樻洿鍐呭寘瑁呮暟閲� /// </summary> /// <param name="model"></param> /// <returns></returns> @@ -727,8 +712,7 @@ { new("@outMsg", SqlDbType.NVarChar, 300), new("@outSum", SqlDbType.Int), - new("@inOrderGuid", - CheckGuid(guid) ? guid : DBNull.Value), + new("@inOrderGuid", UtilityHelper.CheckGuid(guid) ? guid: DBNull.Value), new("@inEdtUserGuid", _userGuid), new("@inSl", sl) }; @@ -742,8 +726,7 @@ } catch (Exception ex) { - LogHelper.Debug(ToString(), - "prc_wom_daa_nbz error锛�" + ex.Message); + LogHelper.Debug(ToString(), "prc_wom_daa_nbz error锛�" + ex.Message); _outMsg = ex.Message; _outSum = -1; } @@ -755,8 +738,8 @@ } if (_outSum <= 0) - return ReturnDto<int>.QuickReturn(rtnInt, ReturnCode.Exception, - _outMsg); + return ReturnDto<int>.QuickReturn(rtnInt, ReturnCode.Exception, _outMsg); return ReturnDto<int>.QuickReturn(rtnInt, ReturnCode.Success, _outMsg); } + } \ No newline at end of file -- Gitblit v1.9.3