From 8c170ee508d93a4aa5af90409730deaca71206a6 Mon Sep 17 00:00:00 2001
From: zhangli <1109134334@qq.com>
Date: Tue, 14 Sep 2021 09:34:51 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=AD=A6=E7=94=9F=E5=85=A5?=
=?UTF-8?q?=E4=BD=8F=E5=AE=BF=E8=88=8D=E4=BF=A1=E6=81=AF=E3=80=90=E6=9C=AA?=
=?UTF-8?q?=E5=AE=8C=E6=88=90=E3=80=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/AccommodationController.cs | 10 +++++++
.../Views/Accommodation/Index.cshtml | 1 +
.../Views/Accommodation/Index.js | 13 ++++++++++
.../Accommodation/AccommodationBLL.cs | 20 ++++++++++++++
.../Accommodation/AccommodationIBLL.cs | 1 +
.../Accommodation/AccommodationService.cs | 26 +++++++++++++++++++
6 files changed, 71 insertions(+)
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs
index 44ceaa1eb..94c336d32 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/AccommodationController.cs
@@ -344,8 +344,18 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
}
+
+ ///
+ /// 同步宿舍信息数据
+ ///
+ ///
+ public ActionResult SyncData()
+ {
+ accommodationIBLL.SyncData();
+ return Success("同步成功");
+ }
//public ActionResult DormitoryAdd(string a,string )
#endregion
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.cshtml
index 3a88caf9d..e3951c2cc 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.cshtml
@@ -67,6 +67,7 @@
批量添加宿舍
自动分配宿舍
+ 同步宿舍信息
录入
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js
index c2917124b..70795f2ab 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js
@@ -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 () {
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs
index ce5fef8f2..efb5fe22b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationBLL.cs
@@ -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
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs
index db8337358..41cd164b0 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationIBLL.cs
@@ -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);
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs
index 72d6b7479..21b627eb3 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs
@@ -1321,6 +1321,32 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
}
+ ///
+ /// 同步宿舍信息
+ ///
+ 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
();
+ //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 提交数据
}