|
|
@@ -3,6 +3,8 @@ using System.Data; |
|
|
|
using Learun.Application.TwoDevelopment.EducationalAdministration; |
|
|
|
using System.Web.Mvc; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Configuration; |
|
|
|
using System.Net.Http; |
|
|
|
|
|
|
|
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers |
|
|
|
{ |
|
|
@@ -94,6 +96,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers |
|
|
|
return Success("删除成功!"); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 开门 |
|
|
|
/// </summary> |
|
|
|
/// <param name="keyValue">主键</param> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpPost] |
|
|
|
[AjaxOnly] |
|
|
|
public ActionResult DoorForm(string keyValue) |
|
|
|
{ |
|
|
|
var url = ConfigurationManager.AppSettings["HkOpenDoor"]; |
|
|
|
var close=false; |
|
|
|
using (var client=new HttpClient()) |
|
|
|
{ |
|
|
|
var r=client.GetAsync($"{url}{keyValue}?c={close}").Result; |
|
|
|
if(r.IsSuccessStatusCode) |
|
|
|
{ |
|
|
|
var str=r.Content.ReadAsStringAsync().Result; |
|
|
|
return Success(str); |
|
|
|
} |
|
|
|
return Fail("开门失败"); |
|
|
|
} |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 保存实体数据(新增、修改) |
|
|
|
/// </summary> |
|
|
|
/// <param name="keyValue">主键</param> |
|
|
|