| | |
| | | using Tiger.Model; |
| | | using SqlSugar; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq.Expressions; |
| | |
| | | using System.Linq; |
| | | using Newtonsoft.Json; |
| | | using Tiger.IBusiness; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Tiger.Model.Minsun; |
| | | using Org.BouncyCastle.Asn1.Tsp; |
| | | using Tiger.Model.Entitys.MES.Position; |
| | | using Apache.NMS.ActiveMQ.Commands; |
| | | using System.Security.Cryptography; |
| | | using System.Diagnostics; |
| | | using Tiger.Model.Entitys.MES.U9C; |
| | | using Newtonsoft.Json.Linq; |
| | | using System.Security.Policy; |
| | | using NetTaste; |
| | | using static System.Net.WebRequestMethods; |
| | | |
| | | namespace Tiger.Business.WMS |
| | | { |
| | |
| | | List<CreateRcvBySrcASNParam> param = new(); |
| | | param.Add(input.CreateRcvBySrcASNParam); |
| | | var response = await HttpHelper.PostAsync(CreateRcvBySrcASNUrl, JsonConvert.SerializeObject(param), new Dictionary<string, string>() { { "token", input.token } }); |
| | | //var response = new ApiAction("{\"ResCode\":0,\"Success\":true,\"ResMsg\":null,\"Data\":[{\"IsSucess\":true,\"U9CVersion\":null,\"OtherID\":\"WMS\",\"ID\":1002503210000100,\"Code\":\"YDRC250300003\",\"ErrorMsg\":null}]}"); |
| | | |
| | | var result = JsonConvert.DeserializeObject<U9CResult2>(response.Message); |
| | | if (result != null) |
| | | { |
| | | if (result.Success && result.Data[0].IsSucess) |
| | | { |
| | | action.Data = result.Data; |
| | | Logger.Interface.Info($"新增收货单-来源ASN单接口提交Json: {JsonConvert.SerializeObject(param)},返回Json: {response.Message}"); |
| | | // Logger.Interface.Info($"新增收货单-来源ASN单接口提交Json: {JsonConvert.SerializeObject(param)},返回Json: {response.Message}"); |
| | | } |
| | | else |
| | | { |
| | |
| | | var action = new ApiAction<List<U9CReturnData2>>(); |
| | | try |
| | | { |
| | | action = await SubmitLine(input); |
| | | if (action.IsSuccessed) { |
| | | action = await ApproveLine(input); |
| | | } |
| | | //action = await SubmitLine(input); |
| | | //if (action.IsSuccessed) { |
| | | // input.IsLogin = false; |
| | | // action = await ApproveLine(input); |
| | | //} |
| | | action = await ApproveLine(input); |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | |
| | | Logger.Interface.Info($"U9C登录token: {input.token}"); |
| | | } |
| | | } |
| | | var response = await HttpHelper.PostAsync(SubmitLineUrl, JsonConvert.SerializeObject(input.param), new Dictionary<string, string>() { { "token", input.token } }); |
| | | var _params = new List<SubmitLineInputParam>(); |
| | | _params.Add(input.param); |
| | | var response = await HttpHelper.PostAsync(SubmitLineUrl, JsonConvert.SerializeObject(_params), new Dictionary<string, string>() { { "token", input.token } }); |
| | | var result = JsonConvert.DeserializeObject<U9CResult2>(response.Message); |
| | | if (result != null) |
| | | { |
| | | if (result.Success && result.Data[0].IsSucess) |
| | | { |
| | | action.Data = result.Data; |
| | | Logger.Interface.Info($"收货单-行提交接口提交Json: {JsonConvert.SerializeObject(input.param)},返回Json: {response.Message}"); |
| | | Logger.Interface.Info($"收货单-行提交接口提交Json: {JsonConvert.SerializeObject(_params)},返回Json: {response.Message}"); |
| | | } |
| | | else |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"{action.Message}; {result.Data[0].ErrorMsg}"); |
| | | action.LocaleMsg = new($"收货单-行提交接口失败: {result.Data[0].ErrorMsg}"); |
| | | Logger.Interface.Info($"收货单-行提交接口失败:{result.Data[0].ErrorMsg}"); |
| | | } |
| | | } |
| | |
| | | Logger.Interface.Info($"U9C登录token: {input.token}"); |
| | | } |
| | | } |
| | | var response = await HttpHelper.PostAsync(ApproveLineUrl, JsonConvert.SerializeObject(input.param), new Dictionary<string, string>() { { "token", input.token } }); |
| | | var _params = new List<SubmitLineInputParam>(); |
| | | _params.Add(input.param); |
| | | var response = await HttpHelper.PostAsync(ApproveLineUrl, JsonConvert.SerializeObject(_params), new Dictionary<string, string>() { { "token", input.token } }); |
| | | var result = JsonConvert.DeserializeObject<U9CResult2>(response.Message); |
| | | if (result != null) |
| | | { |
| | | if (result.Success && result.Data[0].IsSucess) |
| | | { |
| | | action.Data = result.Data; |
| | | Logger.Interface.Info($"收货单-行审核接口提交Json: {JsonConvert.SerializeObject(input.param)},返回Json: {response.Message}"); |
| | | Logger.Interface.Info($"收货单-行审核接口提交Json: {JsonConvert.SerializeObject(_params)},返回Json: {response.Message}"); |
| | | } |
| | | else |
| | | { |
| | | action.IsSuccessed = false; |
| | | action.LocaleMsg = new($"{action.Message}; {result.Data[0].ErrorMsg}"); |
| | | action.LocaleMsg = new($"收货单 - 行审核接口失败:{result.Data[0].ErrorMsg}"); |
| | | Logger.Interface.Info($"收货单-行审核接口失败:{result.Data[0].ErrorMsg}"); |
| | | } |
| | | } |