服务端的TigerApi 框架,基于.NET6 2024 版本
YangYuGang
昨天 e26f91635aa0343f6f5c201c95d20141dc465ed3
Tiger.Business.WMS/ERP/WMS_U9C.CreateRcvLineLocation.cs
@@ -36,42 +36,42 @@
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task<ApiAction<List<U9CReturnData>>> CreateRcvLineLocation(CreateRcvLineLocationInput input)
        public async Task<ApiAction<List<U9CReturnData2>>> CreateRcvLineLocation(CreateRcvLineLocationInput input)
        {
            Logger.Interface.Info($"/**\r\n *进入创建收货单新增行库位接口....\r\n */\r\n"); //固定写法
            var action = new ApiAction<List<U9CReturnData>>();
            var action = new ApiAction<List<U9CReturnData2>>();
            try
            {
                //如果已经登录则不需要再次登录,直接使用传入的token
                if (input.IsLogin)
                {
                    var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={input.userId}{secret}");
                    var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={Reviewer}{secret}");
                    if (u9CLoginResult.Success)
                    {
                        input.token = u9CLoginResult.Data;
                        Logger.Interface.Info($"U9C登录token: {input.token}");
                    }
                }
                var response = await HttpHelper.PostAsync(CreateRcvLineLocationUrl, JsonConvert.SerializeObject(input.RcvLineLocationParam), new Dictionary<string, string>() { { "token", input.token } });
                var result = JsonConvert.DeserializeObject<U9CResult>(response.Message);
                var response = await HttpHelper.PostAsync(MiscRcvTransApproveUrl, JsonConvert.SerializeObject(input.RcvLineLocationParam), new Dictionary<string, string>() { { "token", input.token } });
                var result = JsonConvert.DeserializeObject<U9CResult2>(response.Message);
                if (result != null)
                {
                    if (result.Success && result.Data[0].m_isSucess)
                    if (result.Success && result.Data[0].IsSucess)
                    {
                        action.Data = result.Data;
                        Logger.Interface.Info($"创建收货单新增行库位接口提交Json: {JsonConvert.SerializeObject(input.RcvLineLocationParam)},返回Json: {response.Message}");
                        Logger.Interface.Info($"收货单新增行库位接口提交Json: {JsonConvert.SerializeObject(input.RcvLineLocationParam)},返回Json: {response.Message}");
                    }
                    else
                    {
                        action.IsSuccessed = false;
                        action.LocaleMsg = new($"{action.Message}; {result.Data[0].m_errorMsg}");
                        Logger.Interface.Info($"创建收货单新增行库位接口失败:{result.Data[0].m_errorMsg}");
                        action.LocaleMsg = new($"{action.Message}; {result.Data[0].ErrorMsg}");
                        Logger.Interface.Info($"收货单新增行库位接口失败:{result.Data[0].ErrorMsg}");
                    }
                }
            }
            catch (System.Exception ex)
            {
                action.CatchExceptionWithLog(ex, "创建收货单新增行库位异常");
                action.CatchExceptionWithLog(ex, "收货单新增行库位异常");
            }
            Logger.Interface.Info($"/* 创建收货单新增行库位结束 */\r\n"); //固定写法
            return action;