增加下位机下位机测试升级的功能

This commit is contained in:
2026-01-19 15:49:06 +08:00
parent 7a43c97047
commit f038ca3260
8 changed files with 91 additions and 29 deletions

View File

@@ -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()]