修改学生端关于课程的service

master
pd 4 years ago
parent a29537ee05
commit 12c4f755ea
  1. 23
      src/main/java/com/yipin/liuwanr/controller/AssesmentController.java
  2. 17
      src/main/java/com/yipin/liuwanr/controller/ExperimentallearningController.java
  3. 9
      src/main/java/com/yipin/liuwanr/controller/ProjectAndCourseController.java
  4. 2
      src/main/java/com/yipin/liuwanr/mapper/AssesmentMapper.java
  5. 2
      src/main/java/com/yipin/liuwanr/mapper/ExperimentallearningMapper.java
  6. 4
      src/main/java/com/yipin/liuwanr/service/AssesmentService.java
  7. 7
      src/main/java/com/yipin/liuwanr/service/AttendanceService.java
  8. 16
      src/main/java/com/yipin/liuwanr/service/ExperimentallearningService.java
  9. 313
      src/main/java/com/yipin/liuwanr/service/PracticeService.java
  10. 21
      src/main/java/com/yipin/liuwanr/service/ProjectAndCourseService.java

@ -469,20 +469,17 @@ public class AssesmentController {
@GetMapping("/releaseAssesment") @GetMapping("/releaseAssesment")
Response releaseAssesment(@RequestParam Integer courseId){ Response releaseAssesment(@RequestParam Integer courseId){
Response resp = new Response(); Response resp = new Response();
if(StringUtils.isEmpty(courseId)){
resp.setStatus(300); HashMap<String, Object> ret = service.releaseAssesment(courseId);
resp.setErrmessage("课程信息为空"); int status = (int) ret.get("retcode");
}else{ if (200 == status) {
HashMap<String, Object> ret = service.releaseAssesment(courseId); resp.setStatus(status);
int status = (int) ret.get("retcode"); resp.setMessage(ret.get("retvalue"));
if (200 == status) { } else {
resp.setStatus(status); resp.setStatus(status);
resp.setMessage(ret.get("retvalue")); resp.setErrmessage(ret.get("retvalue").toString());
} else {
resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString());
}
} }
return resp; return resp;
} }

@ -94,19 +94,14 @@ public class ExperimentallearningController {
@GetMapping("/queryStudentName") @GetMapping("/queryStudentName")
Response queryStudentName(@RequestParam Integer courseId) { Response queryStudentName(@RequestParam Integer courseId) {
Response resp = new Response(); Response resp = new Response();
if(StringUtils.isEmpty(courseId)){ HashMap<String, Object> ret = service.queryStudentName(courseId);
resp.setStatus(300); int status = (int) ret.get("retcode");
resp.setMessage("课程信息为空"); if (status == 200) {
}else { resp.setStatus(status);
HashMap<String, Object> ret = service.queryStudentName(courseId); resp.setMessage(ret.get("retvalue"));
int status = (int) ret.get("retcode"); } else {
if (status == 200) {
resp.setStatus(status);
resp.setMessage(ret.get("retvalue"));
} else {
resp.setStatus(status); resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString()); resp.setErrmessage(ret.get("retvalue").toString());
}
} }
return resp; return resp;
} }

@ -94,15 +94,11 @@ public class ProjectAndCourseController {
return resp; return resp;
} }
//课程进度
@GetMapping("/getCourseSchedule") @GetMapping("/getCourseSchedule")
Response getCourseSchedule(Integer courseId) { Response getCourseSchedule(Integer courseId) {
Response resp = new Response(); Response resp = new Response();
if(StringUtils.isEmpty(courseId)) { HashMap<String, Object> ret = service.getCourseSchedule(courseId);
resp.setStatus(300);
resp.setErrmessage("课程id为空");
return resp;
}else {
HashMap<String, Object> ret = service.getCourseSchedule(courseId);
int status = (int) ret.get("retcode"); int status = (int) ret.get("retcode");
if (status == 200) { if (status == 200) {
resp.setStatus(status); resp.setStatus(status);
@ -111,7 +107,6 @@ public class ProjectAndCourseController {
resp.setStatus(status); resp.setStatus(status);
resp.setErrmessage(ret.get("retvalue").toString()); resp.setErrmessage(ret.get("retvalue").toString());
} }
}
return resp; return resp;
} }
} }

@ -57,7 +57,7 @@ public interface AssesmentMapper {
" <if test='releaseType!=null'>and a.releaseType=#{releaseType} </if>", " <if test='releaseType!=null'>and a.releaseType=#{releaseType} </if>",
" <if test='assesmentState!=null'>and a.assesmentState=#{assesmentState} </if>", " <if test='assesmentState!=null'>and a.assesmentState=#{assesmentState} </if>",
" <if test='className!=null and className!=\"\"'>and c.className like concat('%',#{className},'%') </if>", " <if test='className!=null and className!=\"\"'>and c.className like concat('%',#{className},'%') </if>",
" GROUP BY a.id ORDER BY a.creationTime ORDER BY a.id desc ", " GROUP BY a.id ORDER BY a.id desc ",
"</script> "}) "</script> "})
List<Assesment> getByCondition(Assesment assesment); List<Assesment> getByCondition(Assesment assesment);

@ -87,7 +87,7 @@ public interface ExperimentallearningMapper {
* @return * @return
*/ */
@Select("select id,experimentId,experimentalClassId,classId from assessment a left join hr_project_management pm on a.experimentId=pm.projectId left join hr_course_tc tc on pm.systemId=tc.systemId" + @Select("select id,experimentId,experimentalClassId,classId from assessment a left join hr_project_management pm on a.experimentId=pm.projectId left join hr_course_tc tc on pm.systemId=tc.systemId" +
"where a.assesmentState=1 AND pm.state=1 and pm.isdel=0 AND pm.projectPermissions=1 and a.courseId=tc.courseId and tc.courseId=#{courseId} GROUP BY tc.systemId") " where a.assesmentState=1 AND pm.state=1 and pm.isdel=0 AND pm.projectPermissions=1 and a.courseId=tc.courseId and tc.courseId=#{courseId} GROUP BY tc.systemId")
List<Assesment> queryAssesment(Integer courseId); List<Assesment> queryAssesment(Integer courseId);

@ -615,7 +615,9 @@ public class AssesmentService {
public HashMap<String, Object> releaseAssesment(Integer courseId) { public HashMap<String, Object> releaseAssesment(Integer courseId) {
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
try { try {
resp.put("retvalue", mapper.releaseAssesment(courseId)); if(courseId!=null){
resp.put("retvalue", mapper.releaseAssesment(courseId));
}
resp.put("retcode", 200); resp.put("retcode", 200);
} catch (Exception e) { } catch (Exception e) {
logger.error(e.getMessage()); logger.error(e.getMessage());

@ -17,6 +17,7 @@ import com.yipin.liuwanr.entity.Attendance;
import com.yipin.liuwanr.entity.PageResult; import com.yipin.liuwanr.entity.PageResult;
import com.yipin.liuwanr.helper.ExcelExportHelper; import com.yipin.liuwanr.helper.ExcelExportHelper;
import com.yipin.liuwanr.mapper.AttendanceMapper; import com.yipin.liuwanr.mapper.AttendanceMapper;
import org.springframework.util.StringUtils;
/** /**
* 考勤记录 * 考勤记录
@ -43,7 +44,7 @@ public class AttendanceService {
public HashMap<String, Object> queryAttendanceDetailed(Integer studentId,Integer courseId,Integer pageNo,Integer pageSize){ public HashMap<String, Object> queryAttendanceDetailed(Integer studentId,Integer courseId,Integer pageNo,Integer pageSize){
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
try { try {
if(courseId!=null&&studentId!=null){ if(!StringUtils.isEmpty(courseId)&&!StringUtils.isEmpty(studentId)){
PageHelper.startPage(pageNo, pageSize); PageHelper.startPage(pageNo, pageSize);
List<Attendance> list = mapper.getByCourseId(studentId,courseId); List<Attendance> list = mapper.getByCourseId(studentId,courseId);
PageInfo<Attendance> info=new PageInfo<Attendance>(list); PageInfo<Attendance> info=new PageInfo<Attendance>(list);
@ -75,7 +76,7 @@ public class AttendanceService {
*/ */
public HashMap<String, Object> exportPractice(HttpServletResponse response,Integer studentId,Integer courseId,String[] titles) { public HashMap<String, Object> exportPractice(HttpServletResponse response,Integer studentId,Integer courseId,String[] titles) {
try { try {
if(studentId!=null&&courseId!=null&&titles.length>0){ if(!StringUtils.isEmpty(courseId)&&!StringUtils.isEmpty(studentId)&&titles.length>0){
String fileName="考勤记录.xls"; String fileName="考勤记录.xls";
String sheetName="考勤记录"; String sheetName="考勤记录";
List<Attendance> list = mapper.getByCourseId(studentId,courseId); List<Attendance> list = mapper.getByCourseId(studentId,courseId);
@ -104,7 +105,7 @@ public class AttendanceService {
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
Attendance attendance=new Attendance(); Attendance attendance=new Attendance();
try { try {
if(studentId!=null&&courseId!=null){ if(!StringUtils.isEmpty(courseId)&&!StringUtils.isEmpty(studentId)){
attendance.setStudentName(mapper.getByStudentName(studentId)); attendance.setStudentName(mapper.getByStudentName(studentId));
List<Integer> projectIds=mapper.queryProjectIds(courseId); List<Integer> projectIds=mapper.queryProjectIds(courseId);
attendance.setCount(projectIds.size()); attendance.setCount(projectIds.size());

@ -14,6 +14,7 @@ import com.yipin.liuwanr.entity.Attendance;
import com.yipin.liuwanr.entity.Project_Management; import com.yipin.liuwanr.entity.Project_Management;
import com.yipin.liuwanr.mapper.ExperimentallearningMapper; import com.yipin.liuwanr.mapper.ExperimentallearningMapper;
import com.yipin.liuwanr.mapper.TeacherProjectAndCourseMapper; import com.yipin.liuwanr.mapper.TeacherProjectAndCourseMapper;
import org.springframework.util.StringUtils;
/** /**
* 学生端_实验学习 * 学生端_实验学习
@ -41,7 +42,7 @@ public class ExperimentallearningService {
public HashMap<String, Object> queryProject(Integer studentId, Integer courseId) { public HashMap<String, Object> queryProject(Integer studentId, Integer courseId) {
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
try { try {
if(studentId!=null&&courseId!=null){ if(!StringUtils.isEmpty(courseId)&&!StringUtils.isEmpty(studentId)){
List<Integer> projectIds = mapper.queryIsAttendance(studentId, courseId); List<Integer> projectIds = mapper.queryIsAttendance(studentId, courseId);
List<Project_Management> projects = mapper2.getBySystemId(courseId, 0, null); List<Project_Management> projects = mapper2.getBySystemId(courseId, 0, null);
for (int i = 0; i < projects.size(); i++) { for (int i = 0; i < projects.size(); i++) {
@ -103,7 +104,7 @@ public class ExperimentallearningService {
public HashMap<String, Object> queryStudentName(Integer courseId) { public HashMap<String, Object> queryStudentName(Integer courseId) {
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
try { try {
if(courseId!=null){ if(!StringUtils.isEmpty(courseId)){
resp.put("retvalue", mapper.queryStudentName(courseId)); resp.put("retvalue", mapper.queryStudentName(courseId));
} }
resp.put("retcode", 200); resp.put("retcode", 200);
@ -122,7 +123,7 @@ public class ExperimentallearningService {
public HashMap<String, Object> queryTeacherName(Integer courseId) { public HashMap<String, Object> queryTeacherName(Integer courseId) {
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
try { try {
if(courseId!=null){ if(!StringUtils.isEmpty(courseId)){
resp.put("retvalue", mapper.queryTeacherName(courseId)); resp.put("retvalue", mapper.queryTeacherName(courseId));
} }
resp.put("retcode", 200); resp.put("retcode", 200);
@ -142,7 +143,10 @@ public class ExperimentallearningService {
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
HashMap<String, Object> val = new HashMap<String, Object>(); HashMap<String, Object> val = new HashMap<String, Object>();
try { try {
List<Assesment> assesments = mapper.queryAssesment(courseId); List<Assesment> assesments=null;
if(!StringUtils.isEmpty(courseId)) {
assesments = mapper.queryAssesment(courseId);
}
// 查询出来该课程有多个考核开启,则不符合逻辑(一门课程一次只能开启一个考核,不能有多个) // 查询出来该课程有多个考核开启,则不符合逻辑(一门课程一次只能开启一个考核,不能有多个)
if(!assesments.isEmpty()&&assesments.size()>0){ if(!assesments.isEmpty()&&assesments.size()>0){
if (assesments.size() > 1) { if (assesments.size() > 1) {
@ -161,13 +165,13 @@ public class ExperimentallearningService {
val.put("assesmentId", assesmentId); val.put("assesmentId", assesmentId);
} }
} }
resp.put("retvalue", val);
} }
resp.put("retcode", 200); resp.put("retcode", 200);
resp.put("retvalue", val);
} catch (Exception e) { } catch (Exception e) {
logger.error(e.getMessage()); logger.error(e.getMessage());
resp.put("retcode", 500); resp.put("retcode", 500);
resp.put("retvalue", "Inquiry Failed"); resp.put("retvalue", "查询考核信息失败");
return resp; return resp;
} }
return resp; return resp;

@ -19,167 +19,174 @@ import com.yipin.liuwanr.helper.ExcelExportHelper;
import com.yipin.liuwanr.mapper.AssesmentMapper; import com.yipin.liuwanr.mapper.AssesmentMapper;
import com.yipin.liuwanr.mapper.RecordMapper; import com.yipin.liuwanr.mapper.RecordMapper;
import com.yipin.liuwanr.vo.PracticeRecordVo; import com.yipin.liuwanr.vo.PracticeRecordVo;
import org.springframework.util.StringUtils;
/** /**
* 练习记录 * 练习记录
* @author 或然
* *
* @author 或然
*/ */
@Service @Service
public class PracticeService { public class PracticeService {
private static Logger logger = Logger.getLogger(PracticeService.class); private static Logger logger = Logger.getLogger(PracticeService.class);
@Autowired @Autowired
private RecordMapper mapper; private RecordMapper mapper;
@Autowired @Autowired
private AssesmentMapper assesment; private AssesmentMapper assesment;
/** /**
* 练习记录 And 考核记录 * 练习记录 And 考核记录
* @param studentId *
* @param projectPermissions * @param studentId
* @param pageNum * @param projectPermissions
* @param pageSize * @param pageNum
* @return * @param pageSize
*/ * @return
public HashMap<String, Object> queryStudentByPage(Integer studentId,Integer projectPermissions,Integer courseId,Integer pageNum,Integer pageSize) { */
HashMap<String, Object> resp = new HashMap<String, Object>(); public HashMap<String, Object> queryStudentByPage(Integer studentId, Integer projectPermissions, Integer courseId, Integer pageNum, Integer pageSize) {
try { HashMap<String, Object> resp = new HashMap<String, Object>();
if(studentId!=null&&courseId!=null&&projectPermissions!=null) { try {
PageHelper.startPage(pageNum, pageSize); if (!StringUtils.isEmpty(courseId) && !StringUtils.isEmpty(studentId) && projectPermissions != null) {
List<Record> records=mapper.getByStudentId(projectPermissions,courseId,studentId); PageHelper.startPage(pageNum, pageSize);
PageInfo<Record> info=new PageInfo<Record>(records); List<Record> records = mapper.getByStudentId(projectPermissions, courseId, studentId);
int total1 = (int) info.getTotal(); PageInfo<Record> info = new PageInfo<Record>(records);
int totalPages; int total1 = (int) info.getTotal();
totalPages = total1 / pageSize; int totalPages;
if (total1 % pageSize != 0){ totalPages = total1 / pageSize;
totalPages ++; if (total1 % pageSize != 0) {
} totalPages++;
long total = total1; }
resp.put("retvalue", new PageResult(total, records,totalPages)); long total = total1;
} resp.put("retvalue", new PageResult(total, records, totalPages));
resp.put("retcode", 200); }
} catch (Exception e) { resp.put("retcode", 200);
logger.error(e.getMessage()); } catch (Exception e) {
resp.put("retcode", 500); logger.error(e.getMessage());
resp.put("retvalue", "Inquiry Failed"); resp.put("retcode", 500);
return resp; resp.put("retvalue", "Inquiry Failed");
} return resp;
return resp; }
} return resp;
}
/**
* 练习记录 and 考核记录导出 /**
* @param response * 练习记录 and 考核记录导出
* @param studentId学生id *
* @param projectPermissions权限(练习考核) * @param response
* @param titles(标题) * @param studentId学生id
* @return * @param projectPermissions权限(练习考核)
*/ * @param titles(标题)
public HashMap<String, Object> exportPractice(HttpServletResponse response,Integer studentId,Integer projectPermissions,Integer courseId,String[] titles) { * @return
String fileName=null; */
String sheetName=null; public HashMap<String, Object> exportPractice(HttpServletResponse response, Integer studentId, Integer projectPermissions, Integer courseId, String[] titles) {
try { String fileName = null;
List<Record> records=mapper.getByStudentId(projectPermissions,courseId,studentId); String sheetName = null;
if(records.size()>0&&!records.isEmpty()) { List<Record> records = null;
if(projectPermissions==0) { try {
fileName = "练习记录.xls"; if (!StringUtils.isEmpty(courseId) && !StringUtils.isEmpty(studentId)) {
sheetName = "练习记录"; records = mapper.getByStudentId(projectPermissions, courseId, studentId);
}else if(projectPermissions==1){ }
fileName = "考核记录.xls"; if (records.size() > 0 && !records.isEmpty()) {
sheetName = "考核记录"; if (projectPermissions == 0) {
} fileName = "练习记录.xls";
HSSFWorkbook bos = ExcelExportHelper.exportPractice(records, sheetName,titles); sheetName = "练习记录";
} else if (projectPermissions == 1) {
response.setHeader("content-Type", "application/vnd.ms-excel"); fileName = "考核记录.xls";
response.setHeader("Content-disposition","attachment;filename=" + URLEncoder.encode(fileName, "UTF-8")); sheetName = "考核记录";
response.flushBuffer(); }
bos.write(response.getOutputStream()); HSSFWorkbook bos = ExcelExportHelper.exportPractice(records, sheetName, titles);
bos.close();
} response.setHeader("content-Type", "application/vnd.ms-excel");
} catch (Exception e) { response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
logger.error(e.getMessage()); response.flushBuffer();
return null; bos.write(response.getOutputStream());
} bos.close();
return null; }
} } catch (Exception e) {
logger.error(e.getMessage());
return null;
/** }
* 练习信息 return null;
* @param studentId }
* @return
*/
public HashMap<String, Object> queryPracticeVo(Integer studentId,Integer courseId) { /**
HashMap<String, Object> resp = new HashMap<String, Object>(); * 练习信息
try { *
if(studentId!=null&&courseId!=null){ * @param studentId
// 学生个人的练习信息 * @return
PracticeRecordVo practiceVo = mapper.getByPracticeVO(studentId,courseId); */
// 练习项目数量 public HashMap<String, Object> queryPracticeVo(Integer studentId, Integer courseId) {
Integer practiceNumber=mapper.queryPracticeNumber(courseId); HashMap<String, Object> resp = new HashMap<String, Object>();
if(practiceNumber!=null) { try {
practiceVo.setPracticeNumber(practiceNumber); if (!StringUtils.isEmpty(courseId) && !StringUtils.isEmpty(studentId)) {
// 学生个人的练习信息
// 求完成项目数量 PracticeRecordVo practiceVo = mapper.getByPracticeVO(studentId, courseId);
Integer accomplishNumber=mapper.queryAccomplishNumber(studentId,courseId); // 练习项目数量
if(accomplishNumber!=null) { Integer practiceNumber = mapper.queryPracticeNumber(courseId);
practiceVo.setAccomplishNumber(accomplishNumber); if (practiceNumber != null) {
} practiceVo.setPracticeNumber(practiceNumber);
}else {
practiceVo.setPracticeNumber(0); // 求完成项目数量
practiceVo.setAccomplishNumber(0); Integer accomplishNumber = mapper.queryAccomplishNumber(studentId, courseId);
} if (accomplishNumber != null) {
// 练习总次数 practiceVo.setAccomplishNumber(accomplishNumber);
Integer sumNumber=mapper.querySumNumber(studentId,courseId); }
if(sumNumber!=null) { } else {
practiceVo.setSumNumber(sumNumber); practiceVo.setPracticeNumber(0);
}else { practiceVo.setAccomplishNumber(0);
practiceVo.setSumNumber(0); }
} // 练习总次数
PracticeRecordVo vo=mapper.queryCountry(courseId); Integer sumNumber = mapper.querySumNumber(studentId, courseId);
if(vo!=null) { if (sumNumber != null) {
//全国实训积分平均分 practiceVo.setSumNumber(sumNumber);
practiceVo.setAvgintegral(vo.getAvgintegral()); } else {
//全国最高实训积分 practiceVo.setSumNumber(0);
practiceVo.setHeightintegral(vo.getHeightintegral()); }
}else { PracticeRecordVo vo = mapper.queryCountry(courseId);
//全国实训积分平均分 if (vo != null) {
practiceVo.setAvgintegral(0); //全国实训积分平均分
//全国最高实训积分 practiceVo.setAvgintegral(vo.getAvgintegral());
practiceVo.setHeightintegral(0); //全国最高实训积分
} practiceVo.setHeightintegral(vo.getHeightintegral());
resp.put("retvalue", practiceVo); } else {
} //全国实训积分平均分
resp.put("retcode", 200); practiceVo.setAvgintegral(0);
} catch (Exception e) { //全国最高实训积分
logger.error(e.getMessage()); practiceVo.setHeightintegral(0);
resp.put("retcode", 500); }
resp.put("retvalue", "Inquiry Failed"); resp.put("retvalue", practiceVo);
return resp; }
} resp.put("retcode", 200);
return resp; } catch (Exception e) {
} logger.error(e.getMessage());
resp.put("retcode", 500);
resp.put("retvalue", "Inquiry Failed");
public HashMap<String, Object> queryAllExperiment(Integer coureseId) { return resp;
HashMap<String, Object> resp = new HashMap<String, Object>(); }
try { return resp;
if(coureseId!=null){ }
resp.put("retvalue", assesment.queryGetByAssesmentProject(coureseId));
}
resp.put("retcode", 200); public HashMap<String, Object> queryAllExperiment(Integer courseId) {
} catch (Exception e) { HashMap<String, Object> resp = new HashMap<String, Object>();
logger.error(e.getMessage()); try {
resp.put("retcode", 500); if (!StringUtils.isEmpty(courseId)) {
resp.put("retvalue", "Inquiry Failed"); resp.put("retvalue", assesment.queryGetByAssesmentProject(courseId));
return resp; }
} resp.put("retcode", 200);
return resp; } catch (Exception e) {
} logger.error(e.getMessage());
resp.put("retcode", 500);
resp.put("retvalue", "Inquiry Failed");
return resp;
}
return resp;
}
} }

@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
import com.yipin.liuwanr.entity.Project_Management; import com.yipin.liuwanr.entity.Project_Management;
import com.yipin.liuwanr.mapper.TeacherProjectAndCourseMapper; import com.yipin.liuwanr.mapper.TeacherProjectAndCourseMapper;
import org.springframework.util.StringUtils;
/** /**
* *
@ -82,15 +83,17 @@ public class ProjectAndCourseService {
HashMap<String, Object> resp = new HashMap<String, Object>(); HashMap<String, Object> resp = new HashMap<String, Object>();
HashMap<String, Integer> obj = new HashMap<String, Integer>(); HashMap<String, Integer> obj = new HashMap<String, Integer>();
try { try {
//完成的课程项目 if(StringUtils.isEmpty(courseId)){
Integer number=mapper.getCourseSchedule(courseId); //完成的课程项目
//总项目数量 Integer number=mapper.getCourseSchedule(courseId);
List<Project_Management> project=mapper.getBySystemId(courseId,null, null); //总项目数量
obj.put("total",project.size()); List<Project_Management> project=mapper.getBySystemId(courseId,null, null);
if(number!=null){ obj.put("total",project.size());
obj.put("number",number); if(number!=null){
}else{ obj.put("number",number);
obj.put("number",0); }else{
obj.put("number",0);
}
} }
resp.put("retcode", 200); resp.put("retcode", 200);
resp.put("retvalue",obj); resp.put("retvalue",obj);

Loading…
Cancel
Save