Parcourir la source

同步学生入住宿舍信息【未完成】

西昌缴费二期
zhangli il y a 3 ans
Parent
révision
8c170ee508
6 fichiers modifiés avec 71 ajouts et 0 suppressions
  1. +10
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.cshtml
  3. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js
  4. +20
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs
  5. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs
  6. +26
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs

+ 10
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs Voir le fichier

@@ -344,8 +344,18 @@ 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


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.cshtml Voir le fichier

@@ -67,6 +67,7 @@
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
<a id="lr_dormitoryAdd" class="btn btn-default"><i class="fa fa-pencil-square"></i>&nbsp;批量添加宿舍</a>
<a id="lr_allocation" class="btn btn-default"><i class="fa fa-pencil-square"></i>&nbsp;自动分配宿舍</a>
<a id="lr_syncdata" class="btn btn-default"><i class="fa fa-pencil-square"></i>&nbsp;同步宿舍信息</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;录入</a>


+ 13
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js Voir le fichier

@@ -126,6 +126,19 @@ var bootstrap = function ($, learun) {
});

});
// 同步宿舍信息
$('#lr_syncdata').on('click', function () {
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认同步!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/SyncData', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
//初始化左侧树
initTree: function () {


+ 20
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs Voir le fichier

@@ -561,6 +561,26 @@ 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



+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs Voir le fichier

@@ -90,6 +90,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement


void Automatic_allocation_accommodation(bool noNation, bool noPlace);
void SyncData();
object GetDormitoryList();
object GetUnitList(string ParentID);
object GetFloorList(string parentID);


+ 26
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs Voir le fichier

@@ -1321,6 +1321,32 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}

/// <summary>
/// 同步宿舍信息
/// </summary>
public void SyncData()
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
string sql = "select 学号,姓名,性别,公寓,单元,楼层,宿舍号,床位号 from t1 where 学号 is not null order by 公寓,单元,楼层,宿舍号,床位号";
DataTable dt = db.FindTable(sql);
//var list = db.FindList<Acc_DormitoryBuildEntity>();
//select * from Acc_DormitoryBuild where parentid= (select ID from Acc_DormitoryBuild where parentid=( select ID from Acc_DormitoryBuild where name='一号学生公寓'));

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

#endregion 提交数据
}

Chargement…
Annuler
Enregistrer