服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2025-03-10 40df5d91f800bb8b7be2638c13b4f9292d461221
Tiger.Business.WMS/ERP/WMS_U9C.cs
@@ -45,6 +45,8 @@
        { get; set; } = ApiConfig.IsTestServer ? Cache.SysParam["CreateOutProdMaterialReqUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateOutProdMaterialReqUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/PMIssueDoc/Create
        public static string CreateOutProdReturnOrderUrl
        { get; set; } = ApiConfig.IsTestServer ? Cache.SysParam["CreateOutProdReturnOrderUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateOutProdReturnOrderUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/PMIssueDoc/CreateRecedeIssueDoc
        public static string CreateTransferInUrl
        { get; set; } = ApiConfig.IsTestServer ? Cache.SysParam["CreateTransferInUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateTransferInUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/TransferIn/Create
        /// <summary>
        /// 新增收货单-来源ASN单接口
@@ -139,16 +141,9 @@
                    rcvDTO = new()
                    {
                        BusinessDate = DateTime.Now,
                        Supplier = new() { m_code = "C.9999" },
                        Supplier = new() { m_code = input.Supplier },
                        RcvDocType = new() { m_code = "RCV01" },
                        RcvLines= new() {
                        },
                        IsRcvByChangeable =true,
                        IsPriceListChangeable = true,
                        IsConfirmTermChangeable = true,
                        IsPaymentTermChangeable = true,
                        IsLineApprove= true,
                        RcvLines= input.RcvLines,
                    },
                    OtherID = "WMS"
                };
@@ -187,32 +182,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);