Commit 540887cc by Neo Turing

对接优化

parent 6d42ce29
......@@ -14,7 +14,6 @@ namespace Kivii.Third.Chinaerdos.Entities
{
public class ErdosOrderBase: IEntityIsThirdReportOrder
{
private JsonServiceClient _client = null;
public Report OnInstanceThirdReport(Guid ThirdReportOrderKvid)
{
......@@ -111,13 +110,30 @@ namespace Kivii.Third.Chinaerdos.Entities
//catch { }
rtns.Results.AddRange(results);
rtns.Total = rtns.Results.Count;
var thread = KiviiContext.NewThread(() =>
{
//没有关联报告的 自动执行符合条件的关联
OrderExtension.LinkReports();
});
thread.Start();
return rtns;
}
public bool OnRejectThirdReport(Guid ThirdReportOrderKvid)
{
if (ThirdReportOrderKvid == Guid.Empty) return false;
var conn = KiviiContext.GetOpenedDbConnection<ThirdReportOrder>();
var third = conn.SingleById<ThirdReportOrder>(ThirdReportOrderKvid);
if (third == null) return false;
if (third.ThirdType != typeof(ErdosOrder).FullName) return false;
//订单还未受理的才退回 否则不能退回
if (third.IsAccepted) return false;// third.AutoLinkReports();
if (third.IsUploaded) return false;
var client = new JsonHttpClient(Configs._defaultUrl);
var resp = client.RejectOrder(third.SerialNumber, Configs._token, Configs._secret);
if (resp.code == 200) return true;
return false;
}
public bool OnUploadThirdReport(Guid ThirdReportOrderKvid)
......
......@@ -98,7 +98,7 @@ namespace Kivii.Third.Chinaerdos.Extensions
}
}
public static OrderResponse RejectOrder(JsonHttpClient _client, string orderNo, string apptoken = null, string appsecret = null)
public static OrderResponse RejectOrder(this JsonHttpClient _client, string orderNo, string apptoken = null, string appsecret = null)
{
(_client == null).ThrowIfTrue("RejectOrder:请传入_client");
if (apptoken.IsNullOrEmpty()) apptoken = Configs._token;//.ThrowIfTrue("RejectOrder:请传入apptoken");
......
......@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2024.10280")]
[assembly: AssemblyFileVersion("5.4.2024.10280")]
[assembly: AssemblyVersion("5.4.2025.1080")]
[assembly: AssemblyFileVersion("5.4.2025.1080")]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment