diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs index 9f2fffe98..5359fda69 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentBLL.cs @@ -432,6 +432,30 @@ namespace Learun.Application.Organization } } } + /// + /// 保存部门信息(新增、修改) + /// + /// 主键值 + /// 部门实体 + /// + public void SaveEntity2(string keyValue, DepartmentEntity departmentEntity) + { + try + { + departmentService.SaveEntity(keyValue, departmentEntity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } public List GetAllList() { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentEntity.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentEntity.cs index 5aba87495..8e1956d76 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentEntity.cs @@ -172,6 +172,11 @@ namespace Learun.Application.Organization /// [Column("F_ORDER")] public int? F_Order { get; set; } + /// + /// 发送标识(对接第三方人脸系统) + /// + [Column("SENDFLAG")] + public bool? SendFlag { get; set; } #endregion #region 扩展操作 @@ -200,8 +205,8 @@ namespace Learun.Application.Organization this.F_ModifyDate = DateTime.Now; UserInfo userInfo = LoginUserInfo.Get(); - this.F_ModifyUserId = userInfo.userId; - this.F_ModifyUserName = userInfo.realName; + this.F_ModifyUserId = userInfo?.userId; + this.F_ModifyUserName = userInfo?.realName; } #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentIBLL.cs index 16cff28d9..7d3e8836c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Organization/Department/DepartmentIBLL.cs @@ -89,6 +89,13 @@ namespace Learun.Application.Organization /// 部门实体 /// void SaveEntity(string keyValue, DepartmentEntity departmentEntity); + /// + /// 保存部门信息(新增、修改) + /// + /// 主键值 + /// 部门实体 + /// + void SaveEntity2(string keyValue, DepartmentEntity departmentEntity); #endregion List GetAllList(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/FormTime.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/FormTime.cshtml index d0af53190..f50222b48 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/FormTime.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/FormTime.cshtml @@ -6,26 +6,17 @@ .child_delete { padding: 6px 9px; } + #form { + width: 100%; + overflow-y: auto; + overflow-x: hidden; + height: 500px; + border: 0px solid red; + }
 
- @*
-
考试课程类型*
-
-
-
-
考试日期*
- -
-
-
开始时间*
- -
-
-
结束时间*
- -
*@
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/FormTime.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/DepartmentController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/DepartmentController.cs index f81b9b7c9..869c9f0c6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/DepartmentController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/DepartmentController.cs @@ -150,6 +150,8 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers return Fail("部门编号已存在!"); } } + //发送标识false + entity.SendFlag = false; departmentIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TransferApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TransferApi.cs index 5644082bf..c05bc3d76 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TransferApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TransferApi.cs @@ -27,7 +27,7 @@ namespace Learun.Application.WebApi { private EmpInfoIBLL empInfoIBLL = new EmpInfoBLL(); private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); - private CdDeptIBLL cdDeptIBLL = new CdDeptBLL(); + private DepartmentIBLL departmentIBLL = new DepartmentBLL(); private UserIBLL userIBLL = new UserBLL(); /// @@ -37,7 +37,7 @@ namespace Learun.Application.WebApi : base("/TransferApi/BasicInfo") { //发送部门基础信息 - Get["/sendDeptInfo"] = SendDeptInfo; + Get["/sendDepartmentInfo"] = SendDepartmentInfo; //发送教师基础信息 Get["/sendTeacherInfo"] = SendTeacherInfo; //发送学生基础信息 @@ -79,7 +79,7 @@ namespace Learun.Application.WebApi /// /// /// - public Response SendDeptInfo(dynamic _) + public Response SendDepartmentInfo(dynamic _) { var result = new List(); @@ -88,26 +88,32 @@ namespace Learun.Application.WebApi //调登录接口拿到cookie GetCookie(); } - var deptList = cdDeptIBLL.GetAllList(); - foreach (var item in deptList) + var departmentList = departmentIBLL.GetAllList().Where(x => x.SendFlag == false); + foreach (var item in departmentList) { var param = new { - ParentCode = "iccsid", + ParentCode = string.IsNullOrEmpty(item.F_ParentId) || item.F_ParentId == "0" ? "iccsid" : (departmentIBLL.GetEntity(item.F_ParentId) == null ? "iccsid" : departmentIBLL.GetEntity(item.F_ParentId)?.F_EnCode), pageSize = 10, - Name = "部门5", - Code = "5", + Name = item.F_FullName, + Code = item.F_EnCode, }; - + var responseSend = SendRequestWithCookie("POST", "application/json;charset=utf-8", @"http://172.70.0.4:8088/fastgate/department", Encoding.UTF8, JsonConvert.SerializeObject(param)); var responseSendObj = JsonConvert.DeserializeObject(responseSend); - result.Add("部门编号" + item.DeptNo + ",新增接口结果:" + responseSendObj.ErrCode + responseSendObj.ErrMsg); + result.Add("部门编号" + item.F_EnCode + ",新增接口结果:" + responseSendObj.ErrCode + responseSendObj.ErrMsg); if (responseSendObj.ErrCode == 200) { //第三方新增成功,修改表-发送标识为true //TODO: + var entity = departmentIBLL.GetEntity(item.F_DepartmentId); + if (entity != null) + { + entity.SendFlag = true; + departmentIBLL.SaveEntity2(entity.F_DepartmentId, entity); + } } else if (responseSendObj.ErrCode == 1010) //{ "ErrCode":1010,"ErrMsg":"登录状态已失效"} { @@ -119,19 +125,25 @@ namespace Learun.Application.WebApi //调修改接口 var param2 = new { - Code = "5", - Name = "部门bm5", + Code = item.F_EnCode, + Name = item.F_FullName, pageSize = 10, }; var responseSend2 = SendRequestWithCookie("PUT", "application/json;charset=utf-8", @"http://172.70.0.4:8088/fastgate/department", Encoding.UTF8, JsonConvert.SerializeObject(param2)); var responseSendObj2 = JsonConvert.DeserializeObject(responseSend2); - result.Add("部门编号" + item.DeptNo + ",修改接口结果:" + responseSendObj2.ErrCode + responseSendObj2.ErrMsg); + result.Add("部门编号" + item.F_EnCode + ",修改接口结果:" + responseSendObj2.ErrCode + responseSendObj2.ErrMsg); if (responseSendObj2.ErrCode == 200) { //第三方修改成功,修改表-发送标识为true //TODO: + var entity = departmentIBLL.GetEntity(item.F_DepartmentId); + if (entity != null) + { + entity.SendFlag = true; + departmentIBLL.SaveEntity2(entity.F_DepartmentId, entity); + } } else { @@ -172,7 +184,7 @@ namespace Learun.Application.WebApi var param = BuildQuery2(parameters, "----WebKitFormBoundaryAOT8GpQYYAP9jgGf"); var contentType = "multipart/form-data; boundary=----WebKitFormBoundaryAOT8GpQYYAP9jgGf"; - var responseSend = SendRequestWithCookie("POST",contentType, @"http://172.70.0.4:8088/fastgate/person", Encoding.UTF8, param); + var responseSend = SendRequestWithCookie("POST", contentType, @"http://172.70.0.4:8088/fastgate/person", Encoding.UTF8, param); var responseSendObj = JsonConvert.DeserializeObject(responseSend); result.Add("教师编号,新增接口结果:" + responseSendObj.ErrCode + responseSendObj.ErrMsg);