|
|
@@ -7,7 +7,6 @@ using System.Web.Helpers; |
|
|
|
using Newtonsoft.Json; |
|
|
|
using Newtonsoft.Json.Linq; |
|
|
|
using System; |
|
|
|
using System.Linq; |
|
|
|
|
|
|
|
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers |
|
|
|
{ |
|
|
@@ -33,31 +32,26 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers |
|
|
|
{ |
|
|
|
return View(); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 分配宿舍 |
|
|
|
/// <summary> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
public ActionResult IndexDistribution() |
|
|
|
{ |
|
|
|
return View(); |
|
|
|
} |
|
|
|
///// <summary> |
|
|
|
///// 表单页 |
|
|
|
///// <summary> |
|
|
|
///// <returns></returns> |
|
|
|
//[HttpGet] |
|
|
|
//public ActionResult Form() |
|
|
|
//{ |
|
|
|
// return View(); |
|
|
|
//} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 带参数的表单页 |
|
|
|
/// <summary> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
public ActionResult Form(string ParentID = null, string ParentName = null, string keyValue = null) |
|
|
|
public ActionResult Form(string ParentID = null, string ParentName = null) |
|
|
|
{ |
|
|
|
ViewBag.ParentID = ParentID; |
|
|
|
ViewBag.ParentName = ParentName; |
|
|
|
ViewBag.BuildType = accommodationIBLL.GetBuildType(ParentID); |
|
|
|
if (!string.IsNullOrEmpty(keyValue)) |
|
|
|
{ |
|
|
|
ViewBag.BuildType = accommodationIBLL.GetParentBuildType(keyValue); |
|
|
|
} |
|
|
|
|
|
|
|
return View(); |
|
|
|
} |
|
|
|
|
|
|
@@ -143,15 +137,6 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers |
|
|
|
return View(); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 分配系 |
|
|
|
/// </summary> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
public ActionResult FormDept() |
|
|
|
{ |
|
|
|
return View(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
@@ -210,6 +195,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
#region 获取数据 |
|
|
@@ -399,18 +385,6 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers |
|
|
|
return Success("删除成功!"); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 删除 |
|
|
|
/// <param name="keyValue">主键</param> |
|
|
|
/// <summary> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpPost] |
|
|
|
[AjaxOnly] |
|
|
|
public ActionResult DeleteBed(string keyValue,string ParentID) |
|
|
|
{ |
|
|
|
accommodationIBLL.DeleteBed(keyValue, ParentID); |
|
|
|
return Success("删除成功!"); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 保存实体数据(新增、修改) |
|
|
|
/// <param name="keyValue">主键</param> |
|
|
|
/// <summary> |
|
|
@@ -424,50 +398,8 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers |
|
|
|
accommodationIBLL.SaveEntity(keyValue, entity); |
|
|
|
return Success("保存成功!"); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 保存实体数据(新增、修改) |
|
|
|
/// <param name="keyValue">主键</param> |
|
|
|
/// <summary> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpPost] |
|
|
|
[ValidateAntiForgeryToken] |
|
|
|
[AjaxOnly] |
|
|
|
public ActionResult SaveBedForm(string keyValue,string ParentID, string strEntity) |
|
|
|
{ |
|
|
|
Acc_DormitoryBuildEntity entity = strEntity.ToObject<Acc_DormitoryBuildEntity>(); |
|
|
|
accommodationIBLL.SaveBedEntity(keyValue, ParentID, entity); |
|
|
|
return Success("保存成功!"); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 寝室分配系 |
|
|
|
/// <param name="keyValue">主键</param> |
|
|
|
/// <summary> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpPost] |
|
|
|
[ValidateAntiForgeryToken] |
|
|
|
[AjaxOnly] |
|
|
|
public ActionResult SaveDeptClass(string keyValue, string strEntity,int type) |
|
|
|
{ |
|
|
|
Acc_DormitoryBuildEntity entity = strEntity.ToObject<Acc_DormitoryBuildEntity>(); |
|
|
|
accommodationIBLL.SaveDeptClass(keyValue, entity, type); |
|
|
|
return Success("保存成功!"); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 寝室分配床位 |
|
|
|
/// <summary> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpPost] |
|
|
|
[ValidateAntiForgeryToken] |
|
|
|
[AjaxOnly] |
|
|
|
public ActionResult SaveRoom(string RoomId, List<Acc_DormitoryBuildEntity> list) |
|
|
|
{ |
|
|
|
//List<Acc_DormitoryBuildEntity> list = strEntity.ToObject<List<Acc_DormitoryBuildEntity>>(); |
|
|
|
accommodationIBLL.SaveRoom(RoomId, list); |
|
|
|
return Success("保存成功!"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 学生宿舍的单元、楼层、房间、床位添加 |
|
|
|
/// </summary> |
|
|
@@ -479,6 +411,11 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers |
|
|
|
[AjaxOnly] |
|
|
|
public ActionResult DormitoryAdd(string keyValue, string strEntity) |
|
|
|
{ |
|
|
|
//dynamic entity = JsonConvert.DeserializeObject(strEntity); |
|
|
|
//var ElementNum = entity.ElementNum; |
|
|
|
//var FloorNum = entity.FloorNum; |
|
|
|
//var RoomNum = entity.RoomNUm; |
|
|
|
//var BedNum = entity.BedNum; |
|
|
|
JObject jsonEntity = JObject.Parse(strEntity); |
|
|
|
|
|
|
|
var elementNum = int.Parse(jsonEntity["ElementNum"].ToString()); |
|
|
@@ -507,17 +444,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 同步宿舍信息数据 |
|
|
|
/// </summary> |
|
|
|
/// <returns></returns> |
|
|
|
public ActionResult SyncData() |
|
|
|
{ |
|
|
|
accommodationIBLL.SyncData(); |
|
|
|
return Success("同步成功"); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
//public ActionResult DormitoryAdd(string a,string ) |
|
|
|
|
|
|
|
#endregion |
|
|
|