修改补考名单的上传时间,恢复考核管理的实验班级展示

master
pd 4 years ago
parent 7a19fdb90a
commit b904adc2f2
  1. 20
      src/main/java/com/yipin/liuwanr/controller/AssesmentController.java
  2. 6
      src/main/java/com/yipin/liuwanr/controller/MakeuplistController.java
  3. 35
      src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java
  4. 11
      src/main/java/com/yipin/liuwanr/service/AssesmentService.java
  5. 19
      src/main/java/com/yipin/liuwanr/service/MakeuplistService.java

@ -246,17 +246,17 @@ public class AssesmentController {
/** /**
* 查询实验班级一级栏目 * 查询实验班级一级栏目
* @param schoolId * @param staffId
* @return * @return
*/ */
@GetMapping("/getExperimentalClass") @GetMapping("/getExperimentalClass")
Response getExperimentalClass(@RequestParam Integer schoolId) { Response getExperimentalClass(@RequestParam Integer staffId) {
Response resp = new Response(); Response resp = new Response();
if(StringUtils.isEmpty(schoolId)){ if(StringUtils.isEmpty(staffId)){
resp.setStatus(300); resp.setStatus(300);
resp.setErrmessage("学校为空!"); resp.setErrmessage("教师信息为空");
}else{ }else{
HashMap<String, Object> ret = service.queryCretionTime(schoolId); HashMap<String, Object> ret = service.queryCretionTime(staffId);
int status = (int) ret.get("retcode"); int status = (int) ret.get("retcode");
if (200 == status) { if (200 == status) {
resp.setStatus(status); resp.setStatus(status);
@ -271,21 +271,21 @@ public class AssesmentController {
/** /**
* 二级查询实验班级名称以及班级一下的学生 * 查询实验班级名称以及班级一下的学生
* @param creationTime * @param creationTime
* @return * @return
*/ */
@GetMapping("/getCreationTime") @GetMapping("/getCreationTime")
Response getCreationTime(@RequestParam String creationTime,@RequestParam Integer schoolId) { Response getCreationTime(@RequestParam String creationTime,@RequestParam Integer staffId) {
Response resp = new Response(); Response resp = new Response();
if(StringUtils.isEmpty(schoolId)){ if(StringUtils.isEmpty(staffId)){
resp.setStatus(300); resp.setStatus(300);
resp.setErrmessage("学校为空!"); resp.setErrmessage("教师信息为空");
}else if(StringUtils.isEmpty(creationTime)){ }else if(StringUtils.isEmpty(creationTime)){
resp.setStatus(300); resp.setStatus(300);
resp.setErrmessage("实验班级创建时间信息为空"); resp.setErrmessage("实验班级创建时间信息为空");
}else { }else {
HashMap<String, Object> ret = service.queryCretionTime(creationTime,schoolId); HashMap<String, Object> ret = service.queryCretionTime(creationTime,staffId);
int status = (int) ret.get("retcode"); int status = (int) ret.get("retcode");
if (200 == status) { if (200 == status) {
resp.setStatus(status); resp.setStatus(status);

@ -69,7 +69,8 @@ public class MakeuplistController {
* @return * @return
*/ */
@GetMapping("/queryGetByClassName") @GetMapping("/queryGetByClassName")
Response queryGetByClassName(@RequestParam Integer staffId,@RequestParam String uploadTime,@RequestParam Integer uploadType,@RequestParam Integer schoolId) { Response queryGetByClassName(@RequestParam Integer staffId,@RequestParam long uploadTime,
@RequestParam Integer uploadType,@RequestParam Integer schoolId) {
Response resp = new Response(); Response resp = new Response();
if(StringUtils.isEmpty(staffId)) { if(StringUtils.isEmpty(staffId)) {
resp.setStatus(300); resp.setStatus(300);
@ -122,7 +123,8 @@ public class MakeuplistController {
} }
@GetMapping("/getStudent") @GetMapping("/getStudent")
Response getStudent(@RequestParam Integer staffId,@RequestParam String uploadTime,@RequestParam Integer uploadType,@RequestParam Integer schoolId){ Response getStudent(@RequestParam Integer staffId,@RequestParam long uploadTime,@RequestParam Integer uploadType,
@RequestParam Integer schoolId){
Response resp = new Response(); Response resp = new Response();
if(StringUtils.isEmpty(staffId)) { if(StringUtils.isEmpty(staffId)) {
resp.setStatus(300); resp.setStatus(300);

@ -25,11 +25,13 @@ import com.yipin.liuwanr.entity.Student;
* *
*/ */
import com.yipin.liuwanr.entity.SutdentClass; import com.yipin.liuwanr.entity.SutdentClass;
public interface AssesmentMapper { public interface AssesmentMapper {
/** /**
* 查询项目权限为考核的项目 * 查询项目权限为考核的项目
*
* @return * @return
*/ */
@Select("select projectId,projectName,projectPermissions,founder,creationTime from hr_project_management " + @Select("select projectId,projectName,projectPermissions,founder,creationTime from hr_project_management " +
@ -39,6 +41,7 @@ public interface AssesmentMapper {
/** /**
* 考核列表信息查询 * 考核列表信息查询
*
* @param assesment * @param assesment
* @return * @return
*/ */
@ -59,9 +62,9 @@ public interface AssesmentMapper {
List<Assesment> getByCondition(Assesment assesment); List<Assesment> getByCondition(Assesment assesment);
/** /**
* 查询选中的学生有哪些正在参与考核 * 查询选中的学生有哪些正在参与考核
*
* @param studentIds * @param studentIds
* @return * @return
*/ */
@ -76,6 +79,7 @@ public interface AssesmentMapper {
/** /**
* 创建考核 * 创建考核
*
* @param assesment * @param assesment
*/ */
@Insert("insert into assessment (assesmentName,releaseType,creationTime,endTime,timesum,experimentId,classId,assesmentState,assessmentSize,experimentalClassId,staffId,courseId,assessmentNumber)" @Insert("insert into assessment (assesmentName,releaseType,creationTime,endTime,timesum,experimentId,classId,assesmentState,assessmentSize,experimentalClassId,staffId,courseId,assessmentNumber)"
@ -86,6 +90,7 @@ public interface AssesmentMapper {
/** /**
* 修改考核 * 修改考核
*
* @param assesment * @param assesment
*/ */
@Update("update assessment set assesmentName=#{assesmentName},releaseType=#{releaseType},creationTime=#{creationTime},endTime=#{endTime},timesum=#{timesum},assessmentSize=#{assessmentSize},assessmentNumber=#{assessmentNumber}" @Update("update assessment set assesmentName=#{assesmentName},releaseType=#{releaseType},creationTime=#{creationTime},endTime=#{endTime},timesum=#{timesum},assessmentSize=#{assessmentSize},assessmentNumber=#{assessmentNumber}"
@ -106,6 +111,7 @@ public interface AssesmentMapper {
/** /**
* 根据考核id查询数据 * 根据考核id查询数据
*
* @param id * @param id
* @return * @return
*/ */
@ -117,6 +123,7 @@ public interface AssesmentMapper {
/** /**
* 查询行政班级id * 查询行政班级id
*
* @param studentIds * @param studentIds
* @return * @return
*/ */
@ -129,6 +136,7 @@ public interface AssesmentMapper {
/** /**
* 创建考核时选中的学生 * 创建考核时选中的学生
*
* @param assesmentId * @param assesmentId
* @return * @return
*/ */
@ -138,6 +146,7 @@ public interface AssesmentMapper {
/** /**
* 删除多余的记录信息 * 删除多余的记录信息
*
* @param assesmentId * @param assesmentId
* @param students * @param students
*/ */
@ -151,6 +160,7 @@ public interface AssesmentMapper {
/** /**
* 正在参与考核的学生 * 正在参与考核的学生
*
* @return * @return
*/ */
@Select("select studentId from record re left join assessment ass on re.assesmentId=ass.id where ass.assesmentState=1 and re.assesmentId is not null") @Select("select studentId from record re left join assessment ass on re.assesmentId=ass.id where ass.assesmentState=1 and re.assesmentId is not null")
@ -169,33 +179,33 @@ public interface AssesmentMapper {
void updateAssesmentState(Assesment assesment); void updateAssesmentState(Assesment assesment);
/** /**
* 查询实验班级一级标题创建时间 * 查询实验班级一级标题创建时间
* @param schoolId *
* @param staffId
* @return * @return
*/ */
@Select("select creationTime from experimental_class_ning WHERE isdel=0 and schoolId = #{schoolId} GROUP BY creationTime ORDER BY creationTime desc") @Select("select creationTime from experimental_class_ning WHERE isdel=0 and founder=(select staffName from staff where staffId=#{staffId}) GROUP BY creationTime ORDER BY creationTime desc")
List<ExperimentalClass> queryCreationTime(Integer schoolId); List<String> queryCreationTime(Integer staffId);
/** /**
* 查询实验班级信息,及班级下的学生 * 查询实验班级信息,及班级下的学生
*
* @param creationTime * @param creationTime
* @return * @return
*/ */
@Select("select experimentalClassId,experimentalClassName from experimental_class_ning where isdel=0 and creationTime=#{creationTime} and schoolId = #{schoolId})") @Select("select experimentalClassId,experimentalClassName from experimental_class_ning where isdel=0 and creationTime=#{creationTime} and founder=(select staffName from staff where staffId=#{staffId})")
@Results({ @Results({
@Result(id = true, column = "experimentalClassId", property = "experimentalClassId"), @Result(id = true, column = "experimentalClassId", property = "experimentalClassId"),
@Result(column = "experimentalClassName", property = "experimentalClassName"), @Result(column = "experimentalClassName", property = "experimentalClassName"),
@Result(column = "experimentalClassId", property = "students", many = @Many(select = "com.yipin.liuwanr.mapper.StudentMapper.queryStudent")) @Result(column = "experimentalClassId", property = "students", many = @Many(select = "com.yipin.liuwanr.mapper.StudentMapper.queryStudent"))
}) })
List<ExperimentalClass> queryExperimentalClass(@Param("creationTime") String creationTime,@Param("schoolId") Integer schoolId); List<ExperimentalClass> queryExperimentalClass(@Param("creationTime") String creationTime, @Param("staffId") Integer staffId);
/** /**
* 考核名称创建时间结束时间教师名称考核人数实到人数 * 考核名称创建时间结束时间教师名称考核人数实到人数
*
* @param assesmentId * @param assesmentId
* @return * @return
*/ */
@ -206,6 +216,7 @@ public interface AssesmentMapper {
/** /**
* 实验班级 * 实验班级
*
* @param assesmentId * @param assesmentId
* @return * @return
*/ */
@ -216,6 +227,7 @@ public interface AssesmentMapper {
/** /**
* 行政班级 * 行政班级
*
* @param assesmentId * @param assesmentId
* @return * @return
*/ */
@ -225,6 +237,7 @@ public interface AssesmentMapper {
/** /**
* 查询成绩(升序) * 查询成绩(升序)
*
* @param assesmentId * @param assesmentId
* @param experimentalClassId * @param experimentalClassId
* @param classId * @param classId
@ -244,6 +257,7 @@ public interface AssesmentMapper {
/** /**
* 分组查询分数和对应人数 * 分组查询分数和对应人数
*
* @param assesmentId * @param assesmentId
* @param experimentalClassId * @param experimentalClassId
* @param classId * @param classId
@ -264,6 +278,7 @@ public interface AssesmentMapper {
/** /**
* 统计某个班的总错误量 * 统计某个班的总错误量
*
* @param assesmentId * @param assesmentId
* @param experimentalClassId * @param experimentalClassId
* @param classId * @param classId
@ -283,6 +298,7 @@ public interface AssesmentMapper {
/** /**
* 统计该项目的判分点数量 * 统计该项目的判分点数量
* (select experimentId from assessment where id=#{assesmentId}) * (select experimentId from assessment where id=#{assesmentId})
*
* @return * @return
*/ */
@Select("select count(judgmentPointsId) from hr_judgment_points where FIND_IN_SET(#{projectId},projectId)") @Select("select count(judgmentPointsId) from hr_judgment_points where FIND_IN_SET(#{projectId},projectId)")
@ -291,6 +307,7 @@ public interface AssesmentMapper {
/** /**
* 错误分布 * 错误分布
*
* @param assesmentId * @param assesmentId
* @param experimentalClassId * @param experimentalClassId
* @param classId * @param classId

@ -300,13 +300,13 @@ public class AssesmentService {
/** /**
* 查询实验班级一级栏目 * 查询实验班级一级栏目
* *
* @param schoolId学校id * @param staffId教师id
* @return * @return
*/ */
public HashMap<String, Object> queryCretionTime(Integer schoolId) { public HashMap<String, Object> queryCretionTime(Integer staffId) {
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
try { try {
resp.put("retvalue", mapper.queryCreationTime(schoolId)); resp.put("retvalue", mapper.queryCreationTime(staffId));
resp.put("retcode", 200); resp.put("retcode", 200);
} catch (Exception e) { } catch (Exception e) {
logger.error(e.getMessage()); logger.error(e.getMessage());
@ -324,10 +324,10 @@ public class AssesmentService {
* @param cretionTime * @param cretionTime
* @return * @return
*/ */
public HashMap<String, Object> queryCretionTime(String cretionTime, Integer schoolId) { public HashMap<String, Object> queryCretionTime(String cretionTime, Integer staffId) {
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
try { try {
resp.put("retvalue", mapper.queryExperimentalClass(cretionTime, schoolId)); resp.put("retvalue", mapper.queryExperimentalClass(cretionTime, staffId));
resp.put("retcode", 200); resp.put("retcode", 200);
} catch (Exception e) { } catch (Exception e) {
logger.error(e.getMessage()); logger.error(e.getMessage());
@ -341,7 +341,6 @@ public class AssesmentService {
/** /**
* 考核信息展示 * 考核信息展示
*
* @param assesmentId * @param assesmentId
* @return * @return
*/ */

@ -36,14 +36,15 @@ public class MakeuplistService {
* @param staffId * @param staffId
* @return * @return
*/ */
public HashMap<String, Object> queryAllMakeuplist(Integer staffId,String uploadTime,Integer uploadType,Integer schoolId) { public HashMap<String, Object> queryAllMakeuplist(Integer staffId,long uploadTime,Integer uploadType,Integer schoolId) {
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
String time= AssesmentHelper.longPointDate(uploadTime);
try { try {
if(uploadType.equals(0)){ if(uploadType.equals(0)){
List<Makeuplist> makeuplists=makeuplistMapper.queryExperimentalClassMakeuplist(staffId,uploadTime,schoolId); List<Makeuplist> makeuplists=makeuplistMapper.queryExperimentalClassMakeuplist(staffId,time,schoolId);
resp.put("retvalue", makeuplists); resp.put("retvalue", makeuplists);
}else if(uploadType.equals(1)){ }else if(uploadType.equals(1)){
List<Makeuplist> makeuplists=makeuplistMapper.queryClassMakeuplist(staffId,uploadTime,schoolId); List<Makeuplist> makeuplists=makeuplistMapper.queryClassMakeuplist(staffId,time,schoolId);
resp.put("retvalue", makeuplists); resp.put("retvalue", makeuplists);
} }
resp.put("retcode", 200); resp.put("retcode", 200);
@ -56,10 +57,11 @@ public class MakeuplistService {
return resp; return resp;
} }
public HashMap<String, Object> getStudent(Integer staffId,String uploadTime,Integer uploadType,Integer schoolId){ public HashMap<String, Object> getStudent(Integer staffId,long uploadTime,Integer uploadType,Integer schoolId){
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
String time= AssesmentHelper.longPointDate(uploadTime);
try{ try{
resp.put("retvalue",makeuplistMapper.getstudent(staffId,uploadTime,schoolId)); resp.put("retvalue",makeuplistMapper.getstudent(staffId,time,schoolId));
resp.put("retcode", 200); resp.put("retcode", 200);
}catch (RuntimeException e){ }catch (RuntimeException e){
logger.error(e.getMessage()); logger.error(e.getMessage());
@ -72,14 +74,15 @@ public class MakeuplistService {
public HashMap<String, Object> getByMakeuplist(Integer staffId,String uploadTime,Integer uploadType,Integer schoolId){ public HashMap<String, Object> getByMakeuplist(Integer staffId,long uploadTime,Integer uploadType,Integer schoolId){
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
String time= AssesmentHelper.longPointDate(uploadTime);
try{ try{
if(uploadType.equals(0)){ if(uploadType.equals(0)){
List<Makeuplist> makeuplists=makeuplistMapper.queryExperimentalClassMakeuplist(staffId,uploadTime,schoolId); List<Makeuplist> makeuplists=makeuplistMapper.queryExperimentalClassMakeuplist(staffId,time,schoolId);
resp.put("retvalue", makeuplists); resp.put("retvalue", makeuplists);
}else if(uploadType.equals(1)){ }else if(uploadType.equals(1)){
List<Makeuplist> makeuplists=makeuplistMapper.queryClassMakeuplist(staffId,uploadTime,schoolId); List<Makeuplist> makeuplists=makeuplistMapper.queryClassMakeuplist(staffId,time,schoolId);
resp.put("retvalue", makeuplists); resp.put("retvalue", makeuplists);
} }
resp.put("retcode", 200); resp.put("retcode", 200);

Loading…
Cancel
Save