增加下位机下位机测试升级的功能
This commit is contained in:
@@ -3833,29 +3833,31 @@ namespace WebSite.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
string b = Request.Form["roomTypeID"].ToString();
|
||||
if (string.IsNullOrEmpty(b))
|
||||
{
|
||||
return Json(new { IsSuccess = false, Data = "roomTypeID不能为空" });
|
||||
}
|
||||
//1412
|
||||
//固件:BLV-V9 || Launcher_C1F_V04 || C1F_A_L4_31_240723_NM.bin
|
||||
//100331-YHF_T
|
||||
//YHF_T
|
||||
|
||||
string host_list_str = Request.Form["hostid_lists"].ToString();
|
||||
string fileName = Request.Form["upgradefileName"].ToString();
|
||||
//2438
|
||||
//研发测试房型_1
|
||||
//固件:BLV-C5 || Launcher_C1F_V04 || C1F_A_L4_41_250605_NM.bin
|
||||
string roomTypeID = "1412";
|
||||
string host_list_str = "[24540]";
|
||||
//string fileName = "C1F_A_L4_41_250704_NM.bin";
|
||||
string fileName = "C1F_A_L4_31_240723_NM.bin";
|
||||
|
||||
if (string.IsNullOrEmpty(host_list_str))
|
||||
{
|
||||
return Json(new { IsSuccess = false, Data = "hostid_lists不能为空" });
|
||||
}
|
||||
ReallyUpgrade(b, host_list_str, fileName);
|
||||
ReallyUpgrade(roomTypeID, host_list_str, fileName);
|
||||
return Json(new { IsSuccess = true, Data = "正在升级,请等待……" });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error("定时升级出错:"+ex.Message);
|
||||
return Json(new { IsSuccess = false, Data = ex.Message });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void ReallyUpgrade(string 房型ID, string host_list_str, string fileName)
|
||||
{
|
||||
int roomTypeID = 0;
|
||||
@@ -3871,7 +3873,7 @@ namespace WebSite.Controllers
|
||||
HostUpdateController hh = new HostUpdateController();
|
||||
logger.Error("开始升级: " + fileName + " host_list: " + lll);
|
||||
//升级
|
||||
hh.ShengJI_NEW(host_list, fileName, HostManager);
|
||||
hh.ShengJI_NEW(host_list, fileName, HostManager,roomTypeID);
|
||||
}
|
||||
|
||||
[HttpPost()]
|
||||
|
||||
@@ -384,7 +384,7 @@ namespace WebSite.Controllers
|
||||
}
|
||||
|
||||
|
||||
public ActionResult ShengJI_NEW(IList<int> idList, string fileName, IHostManager HostManager1)
|
||||
public ActionResult ShengJI_NEW(IList<int> idList, string fileName, IHostManager HostManager1,int RoomTypeID)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -410,7 +410,8 @@ namespace WebSite.Controllers
|
||||
default:
|
||||
return Json(new { IsSuccess = false, Message = "升级文件不合法!" });
|
||||
}
|
||||
string fileHref = "Uploads/room_type/" + hosts[hosts.Count - 1].RoomType.ID + "/" + fileName;//升级文件相对路径
|
||||
//string fileHref = "Uploads/room_type/" + hosts[hosts.Count - 1].RoomType.ID + "/" + fileName;//升级文件相对路径
|
||||
string fileHref = "Uploads/room_type/" + RoomTypeID + "/" + fileName;//升级文件相对路径
|
||||
string fileMd5 = "";
|
||||
using (Stream stream = System.IO.File.Open(Tools.GetApplicationPath() + fileHref, FileMode.Open))
|
||||
{
|
||||
|
||||
11
WebSite/HTMLPage1.htm
Normal file
11
WebSite/HTMLPage1.htm
Normal file
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title></title>
|
||||
<script src="Scripts/jquery-1.8.3.min.js" type="text/javascript"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -841,6 +841,7 @@
|
||||
<Content Include="easyui-1.4.2\themes\metro\window.css" />
|
||||
<Content Include="easyui-1.4.2\themes\mobile.css" />
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="HTMLPage1.htm" />
|
||||
<Content Include="Images\app\Call.png" />
|
||||
<Content Include="Images\app\loading.gif" />
|
||||
<Content Include="Images\app\bottom.png" />
|
||||
|
||||
Reference in New Issue
Block a user