Ver a proveniência

Merge branch 'master' of 123.57.209.16:bjquanjiang/DigitalScholl

中职版本
liangkun há 3 anos
ascendente
cometimento
ea85784f85
8 ficheiros alterados com 98 adições e 25 eliminações
  1. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs
  2. +26
    -17
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/FormOfStudent.js
  3. +10
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs
  4. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/FamilyIndex.js
  5. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptBLL.cs
  6. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptIBLL.cs
  7. +30
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptService.cs
  8. +8
    -5
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs

+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Application.Organization/User/UserService.cs Ver ficheiro

@@ -176,6 +176,9 @@ namespace Learun.Application.Organization
case "1":
strSql.Append(" AND t.F_Description='学生' ");
break;
case "2":
strSql.Append(" AND t.F_Description='家长' ");
break;
}
}
if (!string.IsNullOrEmpty(keyword))


+ 26
- 17
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/FormOfStudent.js Ver ficheiro

@@ -46,7 +46,7 @@ var bootstrap = function ($, learun) {
label: '手机号码', name: 'Mobile', width: 100, align: 'left'
, edit: {
type: 'input',
}
},
{
@@ -154,37 +154,46 @@ var bootstrap = function ($, learun) {
if (!$('body').lrValidform()) {
return false;
}
var flag = true;
//家庭成员:
var familyList = $('#StuInfoFreshFamily').jfGridGet('rowdatas');
$.each(familyList, function (i, item) {
//身份证号的验证
if (!IsUserCard(item.IdCard)) {//身份证错误
learun.alert.warning("家庭成员:" + item.Name + "的身份证号有误!");
if (!item.Name) {
flag = false;
learun.alert.warning("家庭成员的姓名不可空!");
return false;
}
//手机号验证
if (!item.Mobile) {
flag = false;
learun.alert.warning("家庭成员:" + item.Name + "的手机号不可空!");
return false;
}
else if(!IsMobile){
else if (!IsMobile(item.Mobile)) {
flag = false;
learun.alert.warning("家庭成员:" + item.Name + "的手机号格式有误!");
return false;
}
});

var postData = {};
postData.strEntity = JSON.stringify($('[data-table="StuInfoFresh"]').lrGetFormData());
postData.strstuInfoFreshEmergePeopleList = JSON.stringify($('#StuInfoFreshEmergePeople').jfGridGet('rowdatas'));
postData.strstuInfoFreshFamilyList = JSON.stringify($('#StuInfoFreshFamily').jfGridGet('rowdatas'));

$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
//身份证号的验证
if (!item.IdCard || !IsUserCard(item.IdCard)) {//身份证错误
flag = false;
learun.alert.warning("家庭成员:" + item.Name + "的身份证号有误!");
return false;
}
});
if (flag) {
var postData = {};
postData.strEntity = JSON.stringify($('[data-table="StuInfoFresh"]').lrGetFormData());
postData.strstuInfoFreshEmergePeopleList = JSON.stringify($('#StuInfoFreshEmergePeople').jfGridGet('rowdatas'));
postData.strstuInfoFreshFamilyList = JSON.stringify($('#StuInfoFreshFamily').jfGridGet('rowdatas'));

$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/StuInfoFresh/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
}
};
page.init();
}


+ 10
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Controllers/UserController.cs Ver ficheiro

@@ -29,7 +29,15 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers


#region 获取视图

/// <summary>
/// 家长用户管理
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FamilyIndex()
{
return View();
}
[HttpGet]
public ActionResult StudentIndex()
{
@@ -90,7 +98,7 @@ namespace Learun.Application.Web.Areas.LR_OrganizationModule.Controllers
/// <param name="keyword">关键字</param>
/// <param name="companyId">公司主键</param>
/// <param name="departmentId">部门主键</param>
/// <param name="tp">0 教师 1学生</param>
/// <param name="tp">0 教师 1学生 2家长</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OrganizationModule/Views/User/FamilyIndex.js Ver ficheiro

@@ -319,7 +319,7 @@ var bootstrap = function ($, learun) {
param = param || {};
param.companyId = companyId;
param.departmentId = departmentId;
param.tp = "1";
param.tp = "2";
$('#gridtable').jfGridSet('reload', param);
}
};


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptBLL.cs Ver ficheiro

@@ -199,6 +199,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public string GetSchoolIdByDeptNo(string deptno)
{
try
{
return cdDeptService.GetSchoolIdByDeptNo(deptno);
}
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/EducationalAdministration/CdDept/CdDeptIBLL.cs Ver ficheiro

@@ -55,5 +55,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration

IEnumerable<CdDeptEntity> GetListBySchoolId(string schoolId);
IEnumerable<CdDeptEntity> GetAllList();
string GetSchoolIdByDeptNo(string deptno);
}
}

+ 30
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/CdDept/CdDeptService.cs Ver ficheiro

@@ -250,5 +250,35 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}


/// <summary>
/// 获取ClassInfo表实体数据
/// <param name="className">班级名称</param>
/// <summary>
/// <returns></returns>
public string GetSchoolIdByDeptNo(string deptno)
{
try
{
string sql = $@"select F_SchoolId from [dbo].[CdDept] where deptno='{deptno}'";
var obj = this.BaseRepository("CollegeMIS").FindObject(sql);
if (obj == null)
return "";
else
return obj.ToString();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
}
}

+ 8
- 5
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs Ver ficheiro

@@ -900,6 +900,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
db.Commit();

//家长生成账号
GenerateAccoutForStuFamily(entity, stuInfoFreshFamilyList);
}
catch (Exception ex)
{
@@ -924,7 +927,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
UserRelationIBLL userRelationIBLL = new UserRelationBLL();
UserIBLL userIBLL = new UserBLL();
ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
CdDeptIBLL cdDeptIBLL = new CdDeptBLL();
try
{
var stuInfoBasicEntities = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(m => m.CheckMark != "0");
@@ -940,13 +943,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var studentList = new List<UserEntity>();
foreach (var fEntity in stuInfoFreshFamilyList)
{
if (string.IsNullOrEmpty(fEntity.Mobile) && alluserlist.Count(m => m.F_Account == fEntity.Mobile) > 0)
if (string.IsNullOrEmpty(fEntity.Mobile) || alluserlist.Count(m => m.F_Account == fEntity.Mobile)>0)
{
continue;
}
//获取schoolid ClassNo
var schoolid= classInfoIBLL.GetSchoolIdByClassNo(entity.ClassNo);
if(string.IsNullOrEmpty((schoolid)))
//获取schoolid DeptNo
var schoolid = cdDeptIBLL.GetSchoolIdByDeptNo(entity.DeptNo);
if (string.IsNullOrEmpty((schoolid)))
continue;

UserEntity userbase = new UserEntity();


Carregando…
Cancelar
Guardar