| | |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.Dynamic; |
| | | using System.Text; |
| | | using Gs.Toolbox; |
| | | using Gs.Toolbox.ApiCore.Abstract.Mvc; |
| | | using Gs.Toolbox.ApiCore.Common.Mvc; |
| | | using Gs.Toolbox.ApiCore.Group; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Newtonsoft.Json.Linq; |
| | | using static Gs.Toolbox.UtilityHelper; |
| | | |
| | | namespace Gs.Wom.WorkService |
| | | { |
| | | namespace Gs.Wom.WorkService; |
| | | |
| | | [ApiGroup(ApiGroupNames.WOM)] |
| | | public class MesAutoRkController : IRomteService |
| | | { |
| | | private readonly IHttpContextAccessor _http; |
| | | private readonly string _userCode, _userGuid, _orgFids; |
| | | |
| | | public MesAutoRkController(IHttpContextAccessor httpContextAccessor) |
| | | { |
| | | _http = httpContextAccessor; |
| | |
| | | } |
| | | |
| | | #region |
| | | |
| | | /// <summary> |
| | | /// 读取列表,支持分页 |
| | | /// </summary> |
| | |
| | | return ReturnDto<PageList<dynamic>>.QuickReturn(_pglist, |
| | | ReturnCode.Exception, ex.Message); |
| | | } |
| | | |
| | | return ReturnDto<PageList<dynamic>>.QuickReturn(_pglist, |
| | | ReturnCode.Success, "读取成功"); |
| | | } |
| | |
| | | var dset = new DataSet(); |
| | | try |
| | | { |
| | | dset = DbHelperSQL.RunProcedure("[prc_auto_rk_mx]", parameters, "0"); |
| | | dset = DbHelperSQL.RunProcedure("[prc_auto_rk_mx]", parameters, |
| | | "0"); |
| | | if (dset != null && dset.Tables.Count > 0 && |
| | | dset.Tables[0].Rows.Count > 0) |
| | | { |
| | |
| | | cmd.CommandType = CommandType.StoredProcedure; |
| | | SqlParameter[] parameters = |
| | | { |
| | | new SqlParameter("@outMsg", SqlDbType.NVarChar, 300), |
| | | new SqlParameter("@outSum", SqlDbType.Int), |
| | | new SqlParameter("@outGuid", SqlDbType.UniqueIdentifier), |
| | | new SqlParameter("@outNo", SqlDbType.NVarChar, 300), |
| | | new SqlParameter("@inOrderGuid", CheckGuid(guid) ? guid : DBNull.Value), |
| | | new SqlParameter("@ItemId", string.IsNullOrEmpty(itemId) ? DBNull.Value : (object)long.Parse(itemId)), |
| | | new SqlParameter("@departmentId", string.IsNullOrEmpty(departmentId) ? DBNull.Value : (object)long.Parse(departmentId)), |
| | | new SqlParameter("@depotId", string.IsNullOrEmpty(depotId) ? DBNull.Value : (object)long.Parse(depotId)), |
| | | new SqlParameter("@depotlocid", string.IsNullOrEmpty(depotlocid) ? DBNull.Value : (object)depotlocid), |
| | | new SqlParameter("@remark", ""), |
| | | new SqlParameter("@inEdtUserGuid", _userGuid), |
| | | new SqlParameter("@inLineList", DBNull.Value), // 设置为DBNull.Value |
| | | new SqlParameter("@inLineList2", DBNull.Value) // 设置为DBNull.Value |
| | | new("@outMsg", SqlDbType.NVarChar, 300), |
| | | new("@outSum", SqlDbType.Int), |
| | | new("@outGuid", SqlDbType.UniqueIdentifier), |
| | | new("@outNo", SqlDbType.NVarChar, 300), |
| | | new("@inOrderGuid", |
| | | CheckGuid(guid) ? guid : DBNull.Value), |
| | | new("@ItemId", |
| | | string.IsNullOrEmpty(itemId) |
| | | ? DBNull.Value |
| | | : long.Parse(itemId)), |
| | | new("@departmentId", |
| | | string.IsNullOrEmpty(departmentId) |
| | | ? DBNull.Value |
| | | : long.Parse(departmentId)), |
| | | new("@depotId", |
| | | string.IsNullOrEmpty(depotId) |
| | | ? DBNull.Value |
| | | : long.Parse(depotId)), |
| | | new("@depotlocid", |
| | | string.IsNullOrEmpty(depotlocid) |
| | | ? DBNull.Value |
| | | : depotlocid), |
| | | new("@remark", ""), |
| | | new("@inEdtUserGuid", _userGuid), |
| | | new("@inLineList", DBNull.Value), // 设置为DBNull.Value |
| | | new("@inLineList2", DBNull.Value) // 设置为DBNull.Value |
| | | }; |
| | | parameters[0].Direction = ParameterDirection.Output; |
| | | parameters[1].Direction = ParameterDirection.Output; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | 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> |
| | |
| | | string _guid = mode.guid; |
| | | string _inFieldValue = mode.inFieldValue; |
| | | string _chkOut = mode.chkOut; |
| | | string _proName = "prc_auto_rk_submit"; |
| | | var _proName = "prc_auto_rk_submit"; |
| | | dynamic m = new ExpandoObject(); |
| | | m.outSum = -1; |
| | | m.outMsg = ""; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Success, "操作成功!"); |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |