教师端考核自定义跳转项目管理

master
pd 4 years ago
parent de325a3c61
commit c27e98c04b
  1. 15
      src/main/java/com/yipin/liuwanr/controller/AssesmentController.java
  2. 13
      src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java
  3. 15
      src/main/java/com/yipin/liuwanr/service/AssesmentService.java

@ -525,5 +525,20 @@ public class AssesmentController {
}
@GetMapping("/getByCourseId")
Response getByCourseId(@RequestParam Integer courseId){
Response resp = new Response();
HashMap<String, Object> ret = service.getByCourseId(courseId);
int status = (int) ret.get("retcode");
if (200 == status) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
return resp;
}
}

@ -3,6 +3,7 @@ package com.yipin.liuwanr.mapper;
import java.util.HashMap;
import java.util.List;
import com.yipin.liuwanr.entity.*;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Many;
@ -13,18 +14,11 @@ import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import com.yipin.liuwanr.entity.Assesment;
import com.yipin.liuwanr.entity.ExperimentalClass;
import com.yipin.liuwanr.entity.PointRecord;
import com.yipin.liuwanr.entity.Project_Management;
import com.yipin.liuwanr.entity.Record;
import com.yipin.liuwanr.entity.Student;
/**
* 考核
* @author 或然
*
*/
import com.yipin.liuwanr.entity.SutdentClass;
public interface AssesmentMapper {
@ -334,4 +328,9 @@ public interface AssesmentMapper {
//考核名称去重
@Select("select count(*) from assessment where assesmentName=#{assesmentName}")
Integer getByAssesmentName(String assesmentName);
//自定义跳转
@Select("select tc.systemId,c.systemName from hr_course_tc tc left join service_config c on tc.systemId=c.systemId where courseId=#{courseId} GROUP BY tc.systemId")
List<ServiceConfig> getByCourseId(Integer courseId);
}

@ -672,4 +672,19 @@ public class AssesmentService {
}
return resp;
}
public HashMap<String, Object> getByCourseId(Integer courseId) {
HashMap<String, Object> resp = new HashMap<String, Object>();
try {
resp.put("retvalue", mapper.getByCourseId(courseId));
resp.put("retcode", 200);
}catch (RuntimeException e){
logger.error(e.getMessage());
resp.put("retcode", 500);
resp.put("retvalue", "DELETE Failed");
return resp;
}
return resp;
}
}

Loading…
Cancel
Save