parent
2f4a5627ea
commit
782775acdb
6 changed files with 212 additions and 151 deletions
@ -1,145 +1,145 @@ |
|||||||
package com.msdw.tms.service; |
//package com.msdw.tms.service;
|
||||||
|
//
|
||||||
import com.msdw.tms.common.utils.R; |
//import com.msdw.tms.common.utils.R;
|
||||||
import com.msdw.tms.dao.AchievementManagementDao; |
//import com.msdw.tms.dao.AchievementManagementDao;
|
||||||
import com.msdw.tms.entity.ProjectEntity; |
//import com.msdw.tms.entity.ProjectEntity;
|
||||||
import com.msdw.tms.entity.ProjectRecordEntity; |
//import com.msdw.tms.entity.ProjectRecordEntity;
|
||||||
import com.msdw.tms.entity.request.AchievementImportRequest; |
//import com.msdw.tms.entity.request.AchievementImportRequest;
|
||||||
import com.msdw.tms.entity.vo.AchievementManagementVo; |
//import com.msdw.tms.entity.vo.AchievementManagementVo;
|
||||||
import com.msdw.tms.entity.vo.SearchAchievementVo; |
//import com.msdw.tms.entity.vo.SearchAchievementVo;
|
||||||
import org.junit.jupiter.api.Test; |
//import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.beans.factory.annotation.Autowired; |
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.test.context.SpringBootTest; |
//import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
//
|
||||||
import java.util.ArrayList; |
//import java.util.ArrayList;
|
||||||
import java.util.Date; |
//import java.util.Date;
|
||||||
import java.util.List; |
//import java.util.List;
|
||||||
|
//
|
||||||
@SpringBootTest |
//@SpringBootTest
|
||||||
public class AchievementManagementTest { |
//public class AchievementManagementTest {
|
||||||
|
//
|
||||||
@Autowired |
// @Autowired
|
||||||
private AchievementManagementService achievementManagementService; |
// private AchievementManagementService achievementManagementService;
|
||||||
|
//
|
||||||
@Autowired |
// @Autowired
|
||||||
private ProjectRecordService projectRecordService; |
// private ProjectRecordService projectRecordService;
|
||||||
|
//
|
||||||
@Autowired |
// @Autowired
|
||||||
AchievementManagementDao achievementManagementDao; |
// AchievementManagementDao achievementManagementDao;
|
||||||
|
//
|
||||||
//测试新增实验记录
|
// //测试新增实验记录
|
||||||
|
//// @Test
|
||||||
|
//// public void addReport(){
|
||||||
|
//// AchievementManagementVo vo = new AchievementManagementVo();
|
||||||
|
//// ProjectRecordEntity entity = new ProjectRecordEntity();
|
||||||
|
//// Date date = new Date();
|
||||||
|
//// //用户id
|
||||||
|
//// Integer userId = 385;
|
||||||
|
////
|
||||||
|
//// entity.setUserid(userId)
|
||||||
|
//// .setProjectid(368)
|
||||||
|
//// .setScore(100)
|
||||||
|
//// .setRecordstate(0)
|
||||||
|
//// .setStartingtime(date)
|
||||||
|
//// .setEndtime(date)
|
||||||
|
//// .setSubmittime(date)
|
||||||
|
//// .setTimeSum(0)
|
||||||
|
//// .setIsdel(0);
|
||||||
|
//// vo.setUserId(userId)
|
||||||
|
//// .setEvaluationId(158)
|
||||||
|
//// .setExperimentalGoal("目标2")
|
||||||
|
//// .setPrinciple("原理2")
|
||||||
|
//// .setStep("步骤2")
|
||||||
|
//// .setAnalysis("实验分析2")
|
||||||
|
//// .setSummarize("实验总结2")
|
||||||
|
//// .setImprovement("实验建议2")
|
||||||
|
//// .setCommentId(3)
|
||||||
|
//// .setTeacherId(178)
|
||||||
|
//// .setPeriod("学时")
|
||||||
|
//// .setLaboratory("实验室名称2")
|
||||||
|
//// .setIsSignature(0)
|
||||||
|
//// .setSignatureId(4)
|
||||||
|
//// .setIsdel(0);
|
||||||
|
//// vo.setEntity(entity);
|
||||||
|
//// R r = achievementManagementService.addReport(vo);
|
||||||
|
//// System.out.println(r);
|
||||||
|
//// }
|
||||||
|
//
|
||||||
|
// @Test
|
||||||
|
// public void queryReport(){
|
||||||
|
// Integer reportId = 4;
|
||||||
|
// Integer recordId = 100;
|
||||||
|
// R r = achievementManagementService.queryReport(reportId);
|
||||||
|
// System.out.println(r);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Test
|
||||||
|
// public void updateScore(){
|
||||||
|
// ProjectRecordEntity vo = new ProjectRecordEntity();
|
||||||
|
// Integer recordId = 100;
|
||||||
|
// Integer score = 99;
|
||||||
|
// vo.setRecordid(recordId).setScore(score);
|
||||||
|
// projectRecordService.updateScore(vo);
|
||||||
|
// }
|
||||||
|
//
|
||||||
// @Test
|
// @Test
|
||||||
// public void addReport(){
|
// public void daleteReport(){
|
||||||
|
// Integer reportId = 4;
|
||||||
|
// Integer recordId = 100;
|
||||||
// AchievementManagementVo vo = new AchievementManagementVo();
|
// AchievementManagementVo vo = new AchievementManagementVo();
|
||||||
// ProjectRecordEntity entity = new ProjectRecordEntity();
|
// ProjectRecordEntity entity = new ProjectRecordEntity();
|
||||||
// Date date = new Date();
|
// entity.setRecordid(recordId);
|
||||||
// //用户id
|
// vo.setReportId(reportId);
|
||||||
// Integer userId = 385;
|
|
||||||
//
|
|
||||||
// entity.setUserid(userId)
|
|
||||||
// .setProjectid(368)
|
|
||||||
// .setScore(100)
|
|
||||||
// .setRecordstate(0)
|
|
||||||
// .setStartingtime(date)
|
|
||||||
// .setEndtime(date)
|
|
||||||
// .setSubmittime(date)
|
|
||||||
// .setTimeSum(0)
|
|
||||||
// .setIsdel(0);
|
|
||||||
// vo.setUserId(userId)
|
|
||||||
// .setEvaluationId(158)
|
|
||||||
// .setExperimentalGoal("目标2")
|
|
||||||
// .setPrinciple("原理2")
|
|
||||||
// .setStep("步骤2")
|
|
||||||
// .setAnalysis("实验分析2")
|
|
||||||
// .setSummarize("实验总结2")
|
|
||||||
// .setImprovement("实验建议2")
|
|
||||||
// .setCommentId(3)
|
|
||||||
// .setTeacherId(178)
|
|
||||||
// .setPeriod("学时")
|
|
||||||
// .setLaboratory("实验室名称2")
|
|
||||||
// .setIsSignature(0)
|
|
||||||
// .setSignatureId(4)
|
|
||||||
// .setIsdel(0);
|
|
||||||
// vo.setEntity(entity);
|
// vo.setEntity(entity);
|
||||||
// R r = achievementManagementService.addReport(vo);
|
// R r = achievementManagementService.deleteReport(reportId);
|
||||||
// System.out.println(r);
|
// System.out.println(r);
|
||||||
// }
|
// }
|
||||||
|
//
|
||||||
@Test |
// //测试查询班级实验成绩列表
|
||||||
public void queryReport(){ |
// @Test
|
||||||
Integer reportId = 4; |
// public void queryEvaluationReport(){
|
||||||
Integer recordId = 100; |
// String searchContant = "michonne";
|
||||||
R r = achievementManagementService.queryReport(reportId); |
// // String searchContant = "";
|
||||||
System.out.println(r); |
// Integer projectId = 368;
|
||||||
} |
// Integer page = 1;
|
||||||
|
// Integer size = 2;
|
||||||
@Test |
// R r = achievementManagementService.queryEvaluationReport(searchContant,projectId,page,size);
|
||||||
public void updateScore(){ |
// System.out.println(r);
|
||||||
ProjectRecordEntity vo = new ProjectRecordEntity(); |
//}
|
||||||
Integer recordId = 100; |
//
|
||||||
Integer score = 99; |
// //筛选查询-教学实验
|
||||||
vo.setRecordid(recordId).setScore(score); |
// @Test
|
||||||
projectRecordService.updateScore(vo); |
// public void queryEvaluationReportByRecordId(){
|
||||||
} |
// Integer month = 1;
|
||||||
|
// Integer systemId = 1;
|
||||||
@Test |
// String searchContent= "";
|
||||||
public void daleteReport(){ |
// String staingTime = "";
|
||||||
Integer reportId = 4; |
// String endTime = "";
|
||||||
Integer recordId = 100; |
// List<Integer> list = achievementManagementDao.countEducationProjectId();
|
||||||
AchievementManagementVo vo = new AchievementManagementVo(); |
// List<AchievementManagementVo> result = achievementManagementDao.queryEducationRecord(systemId, searchContent, staingTime, endTime, month, list);
|
||||||
ProjectRecordEntity entity = new ProjectRecordEntity(); |
// System.out.println(result);
|
||||||
entity.setRecordid(recordId); |
// }
|
||||||
vo.setReportId(reportId); |
// //筛选查询-虚拟实验
|
||||||
vo.setEntity(entity); |
// @Test
|
||||||
R r = achievementManagementService.deleteReport(reportId); |
// public void queryFictitiousReportByRecordId(){
|
||||||
System.out.println(r); |
// Integer month = null;
|
||||||
} |
// Integer systemId = 1;
|
||||||
|
// String searchContent= "";
|
||||||
//测试查询班级实验成绩列表
|
// String staingTime = "";
|
||||||
@Test |
// String endTime = "";
|
||||||
public void queryEvaluationReport(){ |
// List<Integer> list = achievementManagementDao.countFictitiousProjectId();
|
||||||
String searchContant = "michonne"; |
// List<AchievementManagementVo> result = achievementManagementDao.queryFictitiousRecord(systemId, searchContent, staingTime, endTime, month, list);
|
||||||
// String searchContant = "";
|
// System.out.println(result);
|
||||||
Integer projectId = 368; |
// }
|
||||||
Integer page = 1; |
//
|
||||||
Integer size = 2; |
// @Test
|
||||||
R r = achievementManagementService.queryEvaluationReport(searchContant,projectId,page,size); |
// public void testQuery(){
|
||||||
System.out.println(r); |
//// String str = "184,185";
|
||||||
} |
// ArrayList<Integer> integers = new ArrayList<>();
|
||||||
|
// integers.add(184);
|
||||||
//筛选查询-教学实验
|
// integers.add(185);
|
||||||
@Test |
//
|
||||||
public void queryEvaluationReportByRecordId(){ |
// List<AchievementImportRequest> achievementImportRequests = achievementManagementDao.queryAchievement(integers);
|
||||||
Integer month = 1; |
// System.out.println(achievementImportRequests);
|
||||||
Integer systemId = 1; |
// }
|
||||||
String searchContent= ""; |
//}
|
||||||
String staingTime = ""; |
|
||||||
String endTime = ""; |
|
||||||
List<Integer> list = achievementManagementDao.countEducationProjectId(); |
|
||||||
List<AchievementManagementVo> result = achievementManagementDao.queryEducationRecord(systemId, searchContent, staingTime, endTime, month, list); |
|
||||||
System.out.println(result); |
|
||||||
} |
|
||||||
//筛选查询-虚拟实验
|
|
||||||
@Test |
|
||||||
public void queryFictitiousReportByRecordId(){ |
|
||||||
Integer month = null; |
|
||||||
Integer systemId = 1; |
|
||||||
String searchContent= ""; |
|
||||||
String staingTime = ""; |
|
||||||
String endTime = ""; |
|
||||||
List<Integer> list = achievementManagementDao.countFictitiousProjectId(); |
|
||||||
List<AchievementManagementVo> result = achievementManagementDao.queryFictitiousRecord(systemId, searchContent, staingTime, endTime, month, list); |
|
||||||
System.out.println(result); |
|
||||||
} |
|
||||||
|
|
||||||
@Test |
|
||||||
public void testQuery(){ |
|
||||||
// String str = "184,185";
|
|
||||||
ArrayList<Integer> integers = new ArrayList<>(); |
|
||||||
integers.add(184); |
|
||||||
integers.add(185); |
|
||||||
|
|
||||||
List<AchievementImportRequest> achievementImportRequests = achievementManagementDao.queryAchievement(integers); |
|
||||||
System.out.println(achievementImportRequests); |
|
||||||
} |
|
||||||
} |
|
||||||
|
Loading…
Reference in new issue