@ -41,9 +41,9 @@ public interface AssesmentMapper {
*/
@Select({"<script>",
"SELECT a.id,a.assesmentName as assesmentName,a.assessmentSize as assessmentSize,p.projectName as projectName,a.timeSum as timeSum,GROUP_CONCAT(c.className) as className,"
+"a.releaseType as releaseType,a.creationTime as creationTime,a.endTime as endTime,a.assesmentState as assesmentState FROM "
+"(assessment a left join hr_project_management p on a.experimentId=p.projectId ) left join class c on FIND_IN_SET(c.classId,a.classId )>0 "
+"WHERE a.staffId=#{staffId} AND a.courseId=#{courseId} ",
+"a.releaseType as releaseType,a.creationTime as creationTime,a.endTime as endTime,a.assesmentState as assesmentState FROM "
+"(assessment a left join hr_project_management p on a.experimentId=p.projectId ) left join class c on FIND_IN_SET(c.classId,a.classId )>0 "
+"WHERE a.staffId=#{staffId} AND a.courseId=#{courseId} ",
// @Insert("INSERT INTO staff(staffName,staffWorkNumber,phone,email,staffProfessionalArchitectureId,staffGradeId,roleId,isdel,uniqueIdentificationAccount,schoolId)VALUES(#{staffName},#{staffWorkNumber},#{phone},#{email},#{staffProfessionalArchitectureId},#{staffGradeId},#{roleId},0,#{uniqueIdentificationAccount},#{schoolId})")
// void addStaff(Staff staff);
//添加员工
@Insert("INSERT INTO staff(staffName,staffWorkNumber,phone,email,staffProfessionalArchitectureId,staffGradeId,roleId,isdel,uniqueIdentificationAccount,schoolId)VALUES(#{staffName},#{staffWorkNumber},#{phone},#{email},#{staffProfessionalArchitectureId},#{staffGradeId},#{roleId},0,#{uniqueIdentificationAccount},#{schoolId})")
@Insert("INSERT INTO staff(staffName,workNumber,phone,email,staffProfessionalArchitectureId,staffGradeId,roleId,isdel,uniqueIdentificationAccount,schoolId)VALUES(#{staffName},#{workNumber},#{phone},#{email},#{staffProfessionalArchitectureId},#{staffGradeId},#{roleId},0,#{uniqueIdentificationAccount},#{schoolId})")
"insert into staff(staffName,staffWorkNumber,staffGradeId,staffProfessionalArchitectureId,roleId,phone,uniqueIdentificationAccount,email,schoolId,isdel) values ",
"insert into staff(staffName,workNumber,staffGradeId,staffProfessionalArchitectureId,roleId,phone,uniqueIdentificationAccount,email,schoolId,isdel) values ",
"SELECT uniqueIdentificationAccount,studentName,studentNumber,phone,email,roleId,schoolId,professionalId,gradeId,classId from student where isdel = 0 and studentId = #{studentId}",
"SELECT uniqueIdentificationAccount,studentName,workNumber,phone,email,roleId,schoolId,professionalId,gradeId,classId from student where isdel = 0 and studentId = #{studentId}",
@ -63,12 +63,12 @@ public interface StudentMapper {
//查询学生详情
@Select({"<script>",
"SELECT s.uniqueIdentificationAccount,s.studentName,s.studentNumber,s.phone,s.email,s.roleId,s.schoolId,s.professionalId,s.gradeId,s.classId,u.* from student s,user u where s.isdel = 0 and s.studentId = #{studentId} and s.phone = u.phone",
"SELECT s.uniqueIdentificationAccount,s.studentName,s.workNumber,s.phone,s.email,s.roleId,s.schoolId,s.professionalId,s.gradeId,s.classId,u.* from student s,user u where s.isdel = 0 and s.studentId = #{studentId} and s.phone = u.phone",
@Insert("INSERT INTO hr_user_info(userName,uniqueIdentificationAccount,documentType,IDNumber,provinceId,cityId,countries,dateBirth,educationDegree,schoolId,phone,weChatID,email,account,password,creationTime,logInNumber,sex,userAvatars,isdel)"
@Insert("INSERT INTO hr_user_info(userName,uniqueIdentificationAccount,documentType,IDNumber,provinceId,cityId,countries,dateBirth,educationDegree,schoolId,phone,weChatID,email,account,password,creationTime,logInNumber,sex,userAvatars,isdel)"
"SELECT u.userId,u.userName,s.schoolName,s.provinceId,s.cityId,s.provinceName,s.cityName,u.countries,u.creationTime,u.account,u.logInNumber,u.schoolId,hor.platformId,hor.roleId FROM hr_user_info u,hr_organization_relationship hor,school s WHERE u.userId = hor.userId and u.schoolId = s.schoolId and u.isdel = 0 and hor.isdel = 0",
" <if test='countries!=null and countries !=\"\" '>and u.countries = #{countries} </if>",
" <if test='searchContent!=null and searchContent !=\"\" '> AND CONCAT(u.userName, s.schoolName,u.account) LIKE CONCAT('%',#{searchContent},'%')</if>",
" <if test='creationTime!=null and endTime!=null and endTime!=\"\" and creationTime!=\"\" '> and u.creationTime between #{creationTime} and #{endTime}</if>",
"GROUP BY u.userId order by u.creationTime desc",
"</script> "})
List<UserInfo>queryUserInfo(UserInfouserInfo);
@Update({"<script>",
"UPDATE hr_user_info set isdel=1 where userId = #{userId}",
"INSERT INTO hr_personal_file(personalCareerId,schoolId,schoolName,disciplineId,disciplineName,professionalClassId,professionalClassName,professionalId,professionalName,userId,updatetime) values "+
"Delete from hr_personal_file where userId = #{userId}",
"</script>"})
voiddeleteUserProfiles(IntegeruserId);
//修改用户组织关系添加功能
@Insert({"<script>",
"INSERT INTO hr_organization_relationship(userId,platformId,schoolId,schoolName,roleId,workNumber,oneDepartmentId,oneDepartmentName,twoDepartmentId,twoDepartmentName,professionalId,professionalName,gradeId,gradeName,classId,className,updatetime,customerId) "+
@Select("SELECT hui.schoolId,hui.account,hui.cityId,hui.countries,hui.creationTime,hui.dateBirth,hui.documentType,hui.educationDegree,hui.email,hui.iDNumber,hui.logInNumber,hui.phone,hui.provinceId,hui.sex,hui.uniqueIdentificationAccount,hui.userAvatars,hui.userId,hui.userName,hui.weChatID from hr_user_info hui where hui.isdel=0 and hui.userId = #{userId} ")
UserInfologins(UserInfouserInfo);
//登陆账号密码
@Select("SELECT hui.schoolId,hui.account,hui.cityId,hui.countries,hui.creationTime,hui.dateBirth,hui.documentType,hui.educationDegree,hui.email,hui.iDNumber,hui.logInNumber,hui.phone,hui.provinceId,hui.sex,hui.uniqueIdentificationAccount,hui.userAvatars,hui.userId,hui.userName,hui.weChatID from hr_user_info hui where hui.isdel=0 and hui.account = #{account} and password = #{password} ")
UserInfologinsAP(UserInfouserInfo);
//查询用户角色
@Select("SELECT userId,roleId from hr_organization_relationship where userId = #{userId} and schoolId = #{schoolId}")
@Select("SELECT hp.* FROM hr_platform hp,hr_organization_relationship hor WHERE hor.platformId = hp.platformId and hor.userId = #{userId} and hor.isdel = 0 GROUP BY platformId")
List<Platform>queryUserPlatform(IntegeruserId);
//查询用户手机
@Select("SELECT userId from hr_user_info where isdel=0 and phone = #{phone}")
List<UserInfo>queryPhone(Stringphone);
//查询用户详情
@Select({"<script>",
"SELECT * from hr_user_info where isdel = 0 and userId = #{userId}",
"</script> "})
UserInfoqueryUserInfoDetails(IntegeruserId);
//查询用户详情
@Select({"<script>",
"SELECT * from hr_personal_file where userId = #{userId}",
@Update({"UPDATE user SET logInNumber=logInNumber+1, lastTimeOfLanding=now() WHERE userId=#{userId}"})
voidupdateLogInNumber(UserMuser);
//更新学生登录次数和最后一次登录时间
@Update({"UPDATE student SET logInNumber=logInNumber+1, lastLoginTime=now() WHERE phone=#{phone}"})
voidupdateStudentLogInNumber(UserMuser);
//更新员工登录次数和最后一次登录时间
@Update({"UPDATE staff SET logNumber=logNumber+1, lastTimeOfLanding=now() WHERE phone=#{phone}"})
voidupdateStaffLogInNumber(UserMuser);
//查询账号是否存在
@Select("SELECT account,email,userName,userId,uniqueIdentificationAccount,phone from hr_user_info where isdel = 0 and account = #{account}")
List<UserInfo>queryAccountIsExist(Stringaccount);
//查询账号是否存在
@Select("SELECT hor.* from hr_organization_relationship hor,hr_user_info hui where hor.isdel = 0 and hui.account = #{account} and hor.userId = hui.userId and hor.schoolId = #{schoolId}")
@Select("SELECT userId,workNumber,schoolId,roleId from hr_organization_relationship where workNumber = #{workNumber} and roleId = #{roleId} and schoolId = #{schoolId}")
"insert into hr_personal_file(personalCareerId,schoolId,disciplineId,professionalClassId,professionalId,userId,schoolName,disciplineName,professionalClassName,professionalName) values ",
"INSERT INTO hr_organization_relationship(userId,platformId,schoolId,schoolName,roleId,workNumber,oneDepartmentId,oneDepartmentName,twoDepartmentId,twoDepartmentName,professionalId,professionalName,gradeId,gradeName,classId,className,updatetime,customerId,creationTime) "+
@Insert("INSERT INTO hr_user_info(userName,uniqueIdentificationAccount,documentType,IDNumber,provinceId,cityId,countries,dateBirth,educationDegree,schoolId,phone,weChatID,email,account,password,creationTime,logInNumber,sex,userAvatars,isdel)"
@Insert("INSERT INTO staff(workNumber,schoolId,staffProfessionalArchitectureId,staffGradeId,staffProfessionalArchitectureName,staffGradeName,roleId,userId,platformId,isdel)"
"SELECT u.userId,u.userName,s.schoolName,s.provinceId,s.cityId,s.provinceName,s.cityName,u.countries,u.creationTime,u.account,u.logInNumber,u.schoolId,u.roleId FROM hr_user_info u,school s WHERE u.schoolId = s.schoolId and u.isdel = 0",
" <if test='countries!=null and countries !=\"\" '>and u.countries = #{countries} </if>",
" <if test='roleId!=null and roleId !=\"\" '>and u.roleId LIKE CONCAT('%',#{roleId},'%')</if>",
" <if test='searchContent!=null and searchContent !=\"\" '> AND CONCAT(u.userName, s.schoolName,u.account) LIKE CONCAT('%',#{searchContent},'%')</if>",
" <if test='creationTime!=null and endTime!=null and endTime!=\"\" and creationTime!=\"\" '> and u.creationTime between #{creationTime} and #{endTime}</if>",
"GROUP BY u.userId order by u.creationTime desc",
"</script> "})
List<UserInfo>queryUserInfo(UserInfouserInfo);
@Update({"<script>",
"UPDATE hr_user_info set isdel=1 where userId = #{userId}",
"</script>"})
voiddeleteUser(IntegeruserId);
@Update({"<script>",
"UPDATE staff set isdel=1 where userId = #{userId}",
"</script>"})
voiddeleteStaff(IntegeruserId);
@Update({"<script>",
"UPDATE staff set isdel=1 where userId = #{userId}",
@Update("UPDATE hr_user_info SET roleId = #{roleId} where userId = #{userId}")
voidupdateUserRoleId(IntegeruserId,StringroleId);
//修改个人档案添加功能(删除后添加用户个人档案)
@Insert({"<script>",
"INSERT INTO hr_personal_file(personalCareerId,schoolId,schoolName,disciplineId,disciplineName,professionalClassId,professionalClassName,professionalId,professionalName,userId,updatetime) values "+
"Delete from hr_personal_file where userId = #{userId}",
"</script>"})
voiddeleteUserProfiles(IntegeruserId);
//修改用户组织关系添加功能
@Insert({"<script>",
"INSERT INTO hr_organization_relationship(userId,platformId,schoolId,schoolName,roleId,workNumber,oneDepartmentId,oneDepartmentName,twoDepartmentId,twoDepartmentName,professionalId,professionalName,gradeId,gradeName,classId,className,updatetime,customerId) "+
@Select("SELECT hui.schoolId,hui.account,hui.cityId,hui.countries,hui.creationTime,hui.dateBirth,hui.documentType,hui.educationDegree,hui.email,hui.iDNumber,hui.logInNumber,hui.phone,hui.provinceId,hui.sex,hui.uniqueIdentificationAccount,hui.userAvatars,hui.userId,hui.userName,hui.weChatID from hr_user_info hui where hui.isdel=0 and hui.userId = #{userId} ")
UserInfologins(UserInfouserInfo);
//登陆账号密码
@Select("SELECT hui.schoolId,hui.account,hui.cityId,hui.countries,hui.creationTime,hui.dateBirth,hui.documentType,hui.educationDegree,hui.email,hui.iDNumber,hui.logInNumber,hui.phone,hui.provinceId,hui.sex,hui.uniqueIdentificationAccount,hui.userAvatars,hui.userId,hui.userName,hui.weChatID from hr_user_info hui where hui.isdel=0 and hui.account = #{account} and password = #{password} ")
UserInfologinsAP(UserInfouserInfo);
//查询用户角色
@Select("SELECT userId,roleId from hr_organization_relationship where userId = #{userId} and schoolId = #{schoolId}")
// @Select("SELECT hp.* FROM hr_platform hp,hr_organization_relationship hor WHERE hor.platformId = hp.platformId and hor.userId = #{userId} and hor.isdel = 0 GROUP BY platformId")
@Select("SELECT hp.* FROM hr_platform hp,student stu WHERE stu.platformId = hp.platformId and stu.userId = #{userId} and stu.isdel = 0 GROUP BY platformId")
@Select("SELECT hp.* FROM hr_platform hp,staff sta WHERE sta.platformId = hp.platformId and sta.userId = #{userId} and sta.isdel = 0 GROUP BY platformId")
"SELECT sta.*,sch.schoolName from staff sta,school sch where sta.userId = #{userId} and sta.platformId = #{platformId} and sta.schoolId = sch.schoolId",
"SELECT stu.*,sch.schoolName from student stu,school sch where stu.userId = #{userId} and stu.platformId = #{platformId} and stu.schoolId = sch.schoolId",
@Update({"UPDATE user SET logInNumber=logInNumber+1, lastTimeOfLanding=now() WHERE userId=#{userId}"})
voidupdateLogInNumber(UserMuser);
//更新学生登录次数和最后一次登录时间
@Update({"UPDATE student SET logInNumber=logInNumber+1, lastLoginTime=now() WHERE phone=#{phone}"})
voidupdateStudentLogInNumber(UserMuser);
//更新员工登录次数和最后一次登录时间
@Update({"UPDATE staff SET logNumber=logNumber+1, lastTimeOfLanding=now() WHERE phone=#{phone}"})
voidupdateStaffLogInNumber(UserMuser);
//查询账号是否存在
@Select("SELECT account,email,userName,userId,uniqueIdentificationAccount,phone from hr_user_info where isdel = 0 and account = #{account}")
List<UserInfo>queryAccountIsExist(Stringaccount);
//查询账号是否存在
@Select("SELECT hor.* from hr_organization_relationship hor,hr_user_info hui where hor.isdel = 0 and hui.account = #{account} and hor.userId = hui.userId and hor.schoolId = #{schoolId}")
@Select("SELECT userId,workNumber,schoolId,roleId from hr_organization_relationship where workNumber = #{workNumber} and roleId = #{roleId} and schoolId = #{schoolId}")
"insert into hr_personal_file(personalCareerId,schoolId,disciplineId,professionalClassId,professionalId,userId,schoolName,disciplineName,professionalClassName,professionalName) values ",
"INSERT INTO hr_organization_relationship(userId,platformId,schoolId,schoolName,roleId,workNumber,oneDepartmentId,oneDepartmentName,twoDepartmentId,twoDepartmentName,professionalId,professionalName,gradeId,gradeName,classId,className,updatetime,customerId,creationTime) "+