@ -41,9 +41,9 @@ public interface AssesmentMapper {
*/
*/
@Select({"<script>",
@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,"
"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 "
+"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 "
+"(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} ",
+"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})")
// @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);
// 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({"<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)"
@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",
@Update({"<script>"+
" <if test='countries!=null and countries !=\"\" '>and u.countries = #{countries} </if>",
"UPDATE hr_user_info SET isdel=1 WHERE userId IN "+
" <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>",
"UPDATE staff set isdel=1 where userId = #{userId}",
@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)"
"UPDATE staff set isdel=1 where userId = #{userId}",
@Select({"<script>",
"</script>"})
"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",
voiddeleteStudent(IntegeruserId);
" <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> "})
@Insert({"<script>",
List<UserInfo>queryUserInfo(UserInfouserInfo);
"INSERT INTO hr_personal_file(personalCareerId,schoolId,schoolName,disciplineId,disciplineName,professionalClassId,professionalClassName,professionalId,professionalName,userId,updatetime) values "+
"INSERT INTO hr_organization_relationship(userId,platformId,schoolId,schoolName,roleId,workNumber,oneDepartmentId,oneDepartmentName,twoDepartmentId,twoDepartmentName,professionalId,professionalName,gradeId,gradeName,classId,className,updatetime,customerId) "+
"INSERT INTO hr_personal_file(personalCareerId,schoolId,schoolName,disciplineId,disciplineName,professionalClassId,professionalClassName,professionalId,professionalName,userId,updatetime) values "+
"Delete from student where userId = #{userId} and platformId = #{platformId}",
@Insert({"<script>",
"</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} ")
@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} ")
@Select("SELECT userId,roleId from hr_organization_relationship where userId = #{userId} and schoolId = #{schoolId}")
@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} ")
@Select("SELECT schoolId,schoolName,userId from hr_organization_relationship where userId = #{userId} GROUP BY schoolId")
@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} ")
// @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 schoolId,schoolName,userId from hr_organization_relationship where userId = #{userId} GROUP BY schoolId")
@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 * from hr_organization_relationship where userId = #{userId} and roleId = #{roleId} and schoolId = #{schoolId}")
@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("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 sta.*,sch.schoolName from staff sta,school sch where sta.userId = #{userId} and sta.platformId = #{platformId} and sta.schoolId = sch.schoolId",
"SELECT * from hr_organization_relationship where userId = #{userId}",
"SELECT stu.*,sch.schoolName from student stu,school sch where stu.userId = #{userId} and stu.platformId = #{platformId} and stu.schoolId = sch.schoolId",
"SELECT customerId,customerName,schoolId FROM customer where isdel = 0",
"</script> "})
" <if test='searchContent!=null and searchContent !=\"\" '>and customerName like CONCAT('%',#{searchContent},'%')</if>",
@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}")
@Update("update hr_user_info set userAvatars=#{userAvatars} where userId=#{userId}")
@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 ",
@Select("SELECT platformId,platformName,domainName,createTime from hr_platform where FIND_IN_SET (platformId,#{platformId})")
voidaddPersonalFile(UserProfilesuserProfiles);
List<Platform>queryPlatform(StringplatformId);
//添加用户组织关系
//查询学生
@Insert({"<script>",
@Select("SELECT * from student where platformId = #{platformId} and userId = #{userId} and isdel=0")
"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 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) "+