瀏覽代碼

寝室分类管理

西昌缴费二期
zhangli 2 年之前
父節點
當前提交
69ef9d7cd5
共有 2 個文件被更改,包括 19 次插入247 次删除
  1. +17
    -90
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs
  2. +2
    -157
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs

+ 17
- 90
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs 查看文件

@@ -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


+ 2
- 157
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs 查看文件

@@ -42,26 +42,6 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}
}

public IEnumerable<Acc_DormitoryBuildEntity> GetBedListByRoomId(string RoomId)
{
try
{
return accommodationService.GetBedListByRoomId(RoomId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public IEnumerable<Acc_DormitoryBuildEntity> GetAllList()
{
try
@@ -218,27 +198,6 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement

}

public string GetParentBuildType(string keyValue)
{
try
{
return accommodationService.GetParentBuildType(keyValue);

}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}

}

/// <summary>
/// 获取Acc_DormitoryBuild表实体数据
/// <param name="keyValue">主键</param>
@@ -330,9 +289,8 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
value = item.ID.ToString(),
showcheck = false,
checkstate = 0,
isexpand = true,
parentId = item.ParentID == null ? "" : item.ParentID,
title = item.BuildType
isexpand = false,
parentId = item.ParentID == null ? "" : item.ParentID

};

@@ -584,31 +542,6 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DeleteBed(string keyValue, string ParentID)
{
try
{
accommodationService.DeleteBed(keyValue, ParentID);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
@@ -633,74 +566,6 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveBedEntity(string keyValue,string ParentID, Acc_DormitoryBuildEntity entity)
{
try
{
accommodationService.SaveBedEntity(keyValue, ParentID, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}


/// <summary>
/// 分配系
/// </summary>
/// <param name="keyValue"></param>
/// <param name="entity"></param>
public void SaveDeptClass(string keyValue, Acc_DormitoryBuildEntity entity,int type)
{
try
{
accommodationService.SaveDeptClass(keyValue, entity, type);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void SaveRoom(string RoomId, List<Acc_DormitoryBuildEntity> list)
{
try
{
accommodationService.SaveRoom(RoomId, list);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 批量添加单元、楼层、宿舍、床位
@@ -757,26 +622,6 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

public void SyncData()
{
try
{
accommodationService.SyncData();

}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}

}
}

#endregion



Loading…
取消
儲存