Sfoglia il codice sorgente

Merge branch 'master' of 123.57.209.16:bjquanjiang/DigitalScholl

master
liangkun 3 anni fa
parent
commit
7d66ad6dfc
4 ha cambiato i file con 106 aggiunte e 7 eliminazioni
  1. +30
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/FormOfStudent.js
  2. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
  3. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs
  4. +69
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs

+ 30
- 6
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoFresh/FormOfStudent.js Vedi File

@@ -25,7 +25,7 @@ var bootstrap = function ($, learun) {
$("#HighTestSortNo").lrDataItemSelect({ code: 'GraduateCategory' });
$("#MatriculateSort").lrDataItemSelect({ code: 'EnrollStyle' });
$('#ResidenceNo').lrDataItemSelect({ code: 'ResidenceNo' });
//家庭成员(直系亲属)
$('#StuInfoFreshFamily').jfGrid({
headData: [
{
@@ -42,6 +42,13 @@ var bootstrap = function ($, learun) {
code: 'FamilyRelation'
}
},
{
label: '手机号码', name: 'Mobile', width: 100, align: 'left'
, edit: {
type: 'input',
}
},
{
label: '性别', name: 'Sex', width: 100, align: 'left'
, edit: {
@@ -53,7 +60,8 @@ var bootstrap = function ($, learun) {
{
label: '年龄', name: 'Age', width: 100, align: 'left'
, edit: {
type: 'input'
type: 'input',
inputType: 'number',
}
},
{
@@ -75,7 +83,7 @@ var bootstrap = function ($, learun) {
isEditWithTip: true,
height: 200
});
//紧急联系人
$('#StuInfoFreshEmergePeople').jfGrid({
headData: [
{
@@ -147,13 +155,23 @@ var bootstrap = function ($, learun) {
return false;
}

//家庭成员:身份证号的验证
//家庭成员:
var familyList = $('#StuInfoFreshFamily').jfGridGet('rowdatas');
$.each(familyList, function (i, item) {
//身份证号的验证
if (!IsUserCard(item.IdCard)) {//身份证错误
learun.alert.warning("家庭成员:" + item.Name + "的身份证号有误!");
return false;
}
//手机号验证
if (!item.Mobile) {
learun.alert.warning("家庭成员:" + item.Name + "的手机号不可空!");
return false;
}
else if(!IsMobile){
learun.alert.warning("家庭成员:" + item.Name + "的手机号格式有误!");
return false;
}
});

var postData = {};
@@ -171,8 +189,14 @@ var bootstrap = function ($, learun) {
page.init();
}



//验证手机号
function IsMobile(mobile) {
var reg = /^((\(\d{2,3}\))|(\d{3}\-))?1\d{10}$/;
if (!reg.test(mobile)) {
return false;
}
return true;
}

// 验证身份证
function IsUserCard(idNo) {


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config Vedi File

@@ -133,6 +133,8 @@
<add key="kaoshisystemurl" value="http://ks.bjquanjiang.com/RereClientConnector" />
<!--批量生成学生帐号时默认的角色Id-->
<add key="GenerateStudentsRoleId" value="0cfc388c-80e6-4cf0-b53b-02201827490a" />
<!--批量生成家长帐号时默认的角色Id-->
<add key="GenerateParentsRoleId" value="" />
<!--批量生成教师帐号时默认的角色Id-->
<add key="GenerateTeachersRoleId" value="e1702746-185a-4480-8f19-3892066555cf" />
<add key="QingJuurl" value="http://xy.bjquanjiang.com/Student/LoginForSSOHandler.ashx" />


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshEntity.cs Vedi File

@@ -849,6 +849,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[Column("IDCARD")]
public string IdCard { get; set; }
/// <summary>
/// 手机号
/// </summary>
[Column("MOBILE")]
public string Mobile { get; set; }
#endregion

#region 扩展操作


+ 69
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs Vedi File

@@ -160,7 +160,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}

var data = this.BaseRepository("CollegeMIS").FindList<StuInfoFreshEntity>(strSql.ToString(), dp);
return data;
}
catch (Exception ex)
@@ -915,6 +915,74 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

private void GenerateAccoutForStuFamily(StuInfoFreshEntity entity, List<StuInfoFreshFamilyEntity> stuInfoFreshFamilyList)
{
UserRelationIBLL userRelationIBLL = new UserRelationBLL();
UserIBLL userIBLL = new UserBLL();
try
{
var stuInfoBasicEntities = BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(m => m.CheckMark != "0");
var alluserlist = userIBLL.GetAllList().Where(m => m.F_Description == "家长");
var roleId = Config.GetValue("GenerateParentsRoleId");
var defaultpwd = Config.GetValue("defaultpwd");
//读取默认密码配置中已启用的密码
var Sys_DefaultPwdConfigEntity = this.BaseRepository().FindEntity<Sys_DefaultPwdConfigEntity>(x => x.IsEnabled == true);
if (Sys_DefaultPwdConfigEntity != null)
{
defaultpwd = Sys_DefaultPwdConfigEntity.Pwd;
}
var studentList = new List<UserEntity>();
foreach (var fEntity in stuInfoFreshFamilyList)
{
if (string.IsNullOrEmpty(fEntity.Mobile) && alluserlist.Count(m => m.F_Account == fEntity.Mobile) > 0)
{
continue;
}
//获取schoolid ClassNo
//var annexesFileEntity = this.BaseRepository().FindEntity<AnnexesFileEntity>(a => a.F_FolderId == fEntity.Photo);
//var url = "";
//if (annexesFileEntity != null)
//{
// url = annexesFileEntity.F_FilePath;
// url = "/" + url.Substring(url.IndexOf("Resource"));
//}

//UserEntity userbase = new UserEntity();
//userbase.F_Account = fEntity.Mobile;
//userbase.F_RealName = fEntity.Name;
//userbase.F_EnCode = fEntity.Mobile;
//userbase.F_Password = Md5Helper.Encrypt(defaultpwd, 32).ToLower();
//userbase.F_HeadIcon = string.IsNullOrEmpty(url) ? Config.GetValue("defaultheadimg") : url;
//userbase.F_Gender = !string.IsNullOrEmpty(fEntity.Sex) ? Convert.ToInt32(fEntity.Sex) : 1;
//userbase.F_DeleteMark = 0;
//userbase.F_EnabledMark = 1;
//userbase.F_Mobile = fEntity.Mobile;
//userbase.F_Description = "家长";
//userbase.F_CompanyId = entity.com;
//userbase.F_DepartmentId = entity.DeptNo;
//userbase.F_IdentityCardNo = fEntity.IdentityCardNo;
//userIBLL.SaveEntity(null, userbase);
//studentList.Add(userbase);
}
if (studentList.Any())
{
string s = studentList.Select(m => m.F_UserId).Aggregate((current, userEntity) => current + "," + userEntity);
userRelationIBLL.SaveEntityList2(roleId, 1, s);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>


Caricamento…
Annulla
Salva