增加一系列功能
屏蔽 下位机 故障上报上报正常的数据。增加 日志系统的功能
This commit is contained in:
@@ -24,6 +24,12 @@ namespace RCUHost.Implement
|
||||
private IList<UpdateHostWorker> updateHostList = new List<UpdateHostWorker>();
|
||||
/// <summary>
|
||||
/// 升级
|
||||
///
|
||||
///
|
||||
///
|
||||
/// 升级 成功 或者失败会在这里上报,
|
||||
///
|
||||
/// 唯 一的在这里上报,别的地方不会
|
||||
/// </summary>
|
||||
/// <param name="hostUpdate"></param>
|
||||
/// <param name="fileType"></param>
|
||||
@@ -147,6 +153,27 @@ namespace RCUHost.Implement
|
||||
bbb.Upgrade_status = "升级失败";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
string endpoint = context.RemoteEndPoint.ToString();
|
||||
|
||||
var host = updateHostWorker.Host;
|
||||
ShengJi_Log s1 = new ShengJi_Log();
|
||||
s1.hotel_id = host.SysHotel.Code;
|
||||
s1.room_id = host.RoomNumber;
|
||||
s1.device_id = host.HostNumber;
|
||||
|
||||
s1.is_send = 0;
|
||||
s1.udp_raw = context.Data;
|
||||
s1.remote_endpoint = endpoint;
|
||||
s1.md5 = "";
|
||||
s1.partition = 0;
|
||||
s1.file_type = 0;
|
||||
s1.file_path = "";
|
||||
s1.upgrade_state = reply.Value.Status;
|
||||
s1.app_version = reply.Value.Version;
|
||||
|
||||
CSRedisCacheHelper.Publish("redis-up", Newtonsoft.Json.JsonConvert.SerializeObject(s1));
|
||||
UploadCurrentVersionReceiver.UP_Grade_Json(updateHostWorker.Host, bbb);
|
||||
}
|
||||
else
|
||||
@@ -196,6 +223,27 @@ namespace RCUHost.Implement
|
||||
updateHostList.Remove(updateHostWorker);
|
||||
break;
|
||||
}
|
||||
|
||||
var host = hostUpdateStatus.Host;
|
||||
string endpoint = context.RemoteEndPoint.ToString();
|
||||
|
||||
ShengJi_Log s1 = new ShengJi_Log();
|
||||
s1.hotel_id = host.SysHotel.Code;
|
||||
s1.room_id = host.RoomNumber;
|
||||
s1.device_id = host.HostNumber;
|
||||
|
||||
s1.is_send = 0;
|
||||
s1.udp_raw = context.Data;
|
||||
s1.remote_endpoint = endpoint;
|
||||
s1.md5 = "";
|
||||
s1.partition = 0;
|
||||
s1.file_type = 0;
|
||||
s1.file_path = "";
|
||||
s1.upgrade_state = reply.Value.Status;
|
||||
s1.app_version = reply.Value.Version;
|
||||
CSRedisCacheHelper.Publish("redis-up", Newtonsoft.Json.JsonConvert.SerializeObject(s1));
|
||||
|
||||
|
||||
bbb.Upgrade_DateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
UploadCurrentVersionReceiver.UP_Grade_Json(updateHostWorker.Host, bbb);
|
||||
hostUpdateStatus.UpdatedTime = DateTime.Now;
|
||||
|
||||
Reference in New Issue
Block a user