服务端的TigerApi 框架,基于.NET6 2024 版本
YangYuGang
2025-03-11 309ea7eb73b9ede89386b30147610b81c79b5aeb
Tiger.Business.WMS/ERP/WMS_U9C.cs
@@ -69,27 +69,8 @@
                        Logger.Interface.Info($"U9C登录token: {input.token}");
                    }
                }
                List<CreateRcvBySrcASNParam> param = new() {
                     new() {
                        aSNToRcvTransDTOs = new(){
                            new(){
                                TransQty=new() {
                                    m_amount1= input.CurRevQty,
                                    m_uOM1 = new() {
                                        UOMMain = "1002212260110007",
                                        UOMMain_SKey=new(){
                                            ID="1002212260110007",
                                        },
                                        UOMSub_SKey = new(){
                                            ID="1002212260110007",
                                        }
                                    },
                                },
                                ASNLineKey=input.ASNLineKey,
                            }
                        }
                     }
                };
                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 result = JsonConvert.DeserializeObject<U9CResult2>(response.Message);
                if (result != null)
@@ -141,16 +122,9 @@
                    rcvDTO = new()
                    {
                        BusinessDate = DateTime.Now,
                        Supplier = new() { m_code = "C.9999" },
                        RcvDocType = new() { m_code = "RCV01" },
                        RcvLines= new() {
                        },
                        IsRcvByChangeable =true,
                        IsPriceListChangeable = true,
                        IsConfirmTermChangeable = true,
                        IsPaymentTermChangeable = true,
                        IsLineApprove= true,
                        Supplier = new() { m_code = input.Supplier },
                        RcvDocType = new() { m_code = input.RcvDocType },
                        RcvLines= input.RcvLines,
                    },
                    OtherID = "WMS"
                };
@@ -189,32 +163,6 @@
            var action = new ApiAction<List<U9CReturnData2>>();
            try
            {
                //如果已经登录则不需要再次登录,直接使用传入的token
                if (input.IsLogin)
                {
                    var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={input.userId}{secret}");
                    if (u9CLoginResult.Success)
                    {
                        input.token = u9CLoginResult.Data;
                        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 result = JsonConvert.DeserializeObject<U9CResult2>(response.Message);
                if (result != null)
                {
                    if (result.Success && result.Data[0].IsSucess)
                    {
                        Logger.Interface.Info($"收货单-行审核总入口接口提交Json: {JsonConvert.SerializeObject(input.param)},返回Json: {response.Message}");
                    }
                    else
                    {
                        action.IsSuccessed = false;
                        action.LocaleMsg = new($"{action.Message}; {result.Data[0].ErrorMsg}");
                        Logger.Interface.Info($"收货单-行审核总入口接口失败:{result.Data[0].ErrorMsg}");
                    }
                }
                action = await SubmitLine(input);
                if (action.IsSuccessed) {
                    action = await ApproveLine(input);