Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/java/com/msdw/tms/dao/AchievementManagementDao.java
hehai
jiakun.lin 4 years ago
commit 26b1ac4d40
  1. 2
      src/main/java/com/msdw/tms/api/ProjectRcordControllerApi.java
  2. 4
      src/main/java/com/msdw/tms/controller/ProjectRecordController.java
  3. 6
      src/main/java/com/msdw/tms/dao/AchievementManagementDao.java
  4. 2
      src/main/java/com/msdw/tms/dao/ProjectRecordDao.java
  5. 2
      src/main/java/com/msdw/tms/dao/UserDao.java
  6. 9
      src/main/java/com/msdw/tms/entity/resp/GetByUserRecordResp.java
  7. 2
      src/main/java/com/msdw/tms/service/ProjectRecordService.java
  8. 71
      src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java
  9. 4
      src/main/java/com/msdw/tms/service/impl/ProjectRecordServiceImpl.java
  10. 39
      src/main/resources/mapper/tms/AchievementManagementDao.xml
  11. 4
      src/main/resources/mapper/tms/ProjectRecordDao.xml
  12. 2
      src/main/resources/mapper/tms/StudentDao.xml
  13. 4
      src/main/resources/mapper/tms/UserInfoDao.xml

@ -18,7 +18,7 @@ public interface ProjectRcordControllerApi {
Integer recordState,String condition);
@ApiOperation(value = "用户端虚拟仿真实验记录",notes = "用户端虚拟仿真实验记录")
R queryUserRecord(Integer page,Integer size,Integer userId,Integer projectPermissions);
R queryUserRecord(Integer page,Integer size,Integer userId,Integer projectPermissions,Integer systemId);
@ApiOperation(value = "用户端教学实验记录",notes = "用户端教学实验记录")
R getUserExperimentscore(Integer page,Integer size,Integer userid);

@ -63,8 +63,8 @@ public class ProjectRecordController implements ProjectRcordControllerApi {
*/
@Override
@GetMapping("/user/record")
public R queryUserRecord(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userId,@RequestParam Integer projectPermissions){
PageUtils page1 = projectRecordService.queryPage(page,size,userId,projectPermissions);
public R queryUserRecord(@RequestParam Integer page,@RequestParam Integer size,@RequestParam Integer userId,@RequestParam Integer projectPermissions,@RequestParam Integer systemId){
PageUtils page1 = projectRecordService.queryPage(page,size,userId,projectPermissions,systemId);
return R.ok().put("data", page1);
}

@ -16,7 +16,6 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.poi.ss.formula.functions.T;
import java.util.ArrayList;
import java.util.List;
@Mapper
@ -48,7 +47,7 @@ public interface AchievementManagementDao extends BaseMapper<ExperimentalReportE
AchievementManagementVO queryReport(Integer reportId);
void deleteReport(Integer reportId,Integer recordId);
void deleteReport(Integer reportId);
IPage<AchievementManagementVO> queryEvaluationReport(Page<T> tPage, String searchContant, Integer projectId);
@ -73,7 +72,4 @@ public interface AchievementManagementDao extends BaseMapper<ExperimentalReportE
List<AchievementManagementVO> queryPythonTest(Integer eventId);
void updateSignatrue(Integer isSignature,Integer signatureId,Integer reportId,String comment);
void deleteReportById(Integer projectId);
}

@ -23,7 +23,7 @@ import java.util.List;
@Mapper
public interface ProjectRecordDao extends BaseMapper<ProjectRecordEntity> {
IPage<GetByUserRecordResp> getByUserRecord(Page page, @Param("userId") Integer userId, @Param("projectPermissions") Integer projectPermissions);
IPage<GetByUserRecordResp> getByUserRecord(Page page, @Param("userId") Integer userId, @Param("projectPermissions") Integer projectPermissions,@Param("systemId") Integer systemId);
IPage<ProjectRecordVo> getByUserExperimentRecord(Page page, @Param("pro") ProjectRecordEntity projectRecordEntity);

@ -41,7 +41,7 @@ public interface UserDao extends BaseMapper<UserEntity> {
List<String> findPhoneSetTime(String phone, String checkCode,Integer types);
boolean saveCheckPhoneCode(CheckVo checkVo);
// boolean saveCheckPhoneCode(CheckVo checkVo);
List<Integer> queryPhone(CheckVo checkVo);
}

@ -22,6 +22,15 @@ public class GetByUserRecordResp {
private String submitTime;
private Integer timeSum;
private Integer userId;
private Integer systemId;
public Integer getSystemId() {
return systemId;
}
public void setSystemId(Integer systemId) {
this.systemId = systemId;
}
public String getProjectName() {
return projectName;

@ -17,7 +17,7 @@ import java.util.List;
*/
public interface ProjectRecordService extends IService<ProjectRecordEntity> {
PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions);
PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions,Integer systemId);
PageUtils queryExperimentPage(Integer page, Integer size, Integer userid);

@ -28,6 +28,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.*;
@Slf4j
@Service
public class AchievementManagementServiceImpl extends ServiceImpl<AchievementManagementDao, ExperimentalReportEntity> implements AchievementManagementService {
@ -58,39 +59,39 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
experimentalReportEntity.setReportId(reportId);
ExperimentalReportEntity experimentalReportEntity1 = baseMapper.getReport(experimentalReportEntity);
List<UserScoreVO> score = baseMapper.getScore(userScoreVO);
obj.put("score",score);
obj.put("experimentalReportEntity",experimentalReportEntity1);
obj.put("score", score);
obj.put("experimentalReportEntity", experimentalReportEntity1);
List<Integer> tradingJudgmentPointsIds = baseMapper.queryTradingJudgmentPointsId(reportId);
Integer size = tradingJudgmentPointsIds.size();
for (int i = 0;i<size; i++){
for (int i = 0; i < size; i++) {
Integer tradingJudgmentPointsId = tradingJudgmentPointsIds.get(i);
List<JudgmentPointsRuleVO> judgmentPointsRuleList = baseMapper.getUserAnswers(tradingJudgmentPointsId);
map.put("judgmentPointsRuleList"+i,judgmentPointsRuleList);
map.put("judgmentPointsRuleList" + i, judgmentPointsRuleList);
}
obj.put("userAnswersList",map);
return R.ok().put("data",obj);
obj.put("userAnswersList", map);
return R.ok().put("data", obj);
}
@Override
public R getTeacher(Integer projectId) {
String name = baseMapper.getTeacher(projectId);
return R.ok().put("name",name);
return R.ok().put("name", name);
}
@Override
public List<ResultsEntity> list(ResultsVo vo,Integer page,Integer size) {
public List<ResultsEntity> list(ResultsVo vo, Integer page, Integer size) {
List<ResultsEntity> list = achievementManagementDao.list(vo);
return list;
}
@Override
public List<ReportEntity> reportList(ResultsVo vo,Integer page,Integer size) {
public List<ReportEntity> reportList(ResultsVo vo, Integer page, Integer size) {
List<ReportEntity> reportList = achievementManagementDao.reportList(vo);
return reportList;
}
@Override
public List<ResultsEntity> newList(ResultsVo vo,Integer page,Integer size) {
public List<ResultsEntity> newList(ResultsVo vo, Integer page, Integer size) {
List<ResultsEntity> newList = achievementManagementDao.newList(vo);
return newList;
}
@ -152,20 +153,20 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
Integer eventId = report.getEventId();
ProjectRecordEntity record = projectRecordDao.queryReport(eventId);
String userName = userInfoDao.queryUserReport(record.getUserid());
if (report.getProjectId()!=null){
if (report.getProjectId() != null) {
String evaluationName = achievementManagementDao.queryEvaluationName(report.getProjectId());
report.setEvaluationName(evaluationName);
}
//python实验数据
Integer systemId = report.getSystemId();
if (systemId==1|systemId==4|systemId==5) {
if (systemId == 1 | systemId == 4 | systemId == 5) {
List<AchievementManagementVO> data = achievementManagementDao.queryPythonTest(eventId);
map.put("data", data);
}
report.setUserName(userName);
map.put("report",report);
map.put("record",record);
return R.ok().put("data",map);
map.put("report", report);
map.put("record", record);
return R.ok().put("data", map);
}
@Override
@ -176,12 +177,14 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
}
@Override
public R queryEvaluationReport(String searchContant,Integer projectId,Integer page,Integer size) {
Page<T> tPage = new Page<>(page,size);
IPage<AchievementManagementVO> data = achievementManagementDao.queryEvaluationReport(tPage,searchContant,projectId);
public R queryEvaluationReport(String searchContant, Integer projectId, Integer page, Integer size) {
Page<T> tPage = new Page<>(page, size);
IPage<AchievementManagementVO> data = achievementManagementDao.queryEvaluationReport(tPage, searchContant, projectId);
PageUtils result = new PageUtils(data);
return R.ok().put("data",result);
return R.ok().put("data", result);
}
@Override
@ -190,7 +193,7 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
List<Integer> list = new ArrayList<>();
String[] split = ids.split(",");
for (int i = 0;i<split.length;i++){
for (int i = 0; i < split.length; i++) {
list.add(Integer.parseInt(split[i]));
}
List<AchievementImportRequest> achievement = achievementManagementDao.queryAchievement(list);
@ -205,7 +208,7 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
}
@Override
public R queryAchievement(Integer systemId,Integer projectPermissions, String searchContant, String startingtime,
public R queryAchievement(Integer systemId, Integer projectPermissions, String searchContant, String startingtime,
String endtime, Integer month) {
try {
List<AchievementManagementVO> fictitious;
@ -213,14 +216,16 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
List<AchievementManagementVO> vo = new ArrayList<>();
List<Integer> educationResult = achievementManagementDao.countEducationProjectId();//获取教学实验的主键id
List<Integer> fictitiousResult = achievementManagementDao.countFictitiousProjectId();//获取教学实验的主键id
if (projectPermissions==null){projectPermissions=-9999;}
if (projectPermissions==0){//只查询练习项目
if (projectPermissions == null) {
projectPermissions = -9999;
}
if (projectPermissions == 0) {//只查询练习项目
fictitious = achievementManagementDao.queryFictitiousRecord(systemId, searchContant, startingtime, endtime, month, fictitiousResult);
vo = fictitious;
}else if (projectPermissions==1){//只查询考核项目
} else if (projectPermissions == 1) {//只查询考核项目
education = achievementManagementDao.queryEducationRecord(systemId, searchContant, startingtime, endtime, month, educationResult);
vo = education;
}else {//查询练习+考核项目
} else {//查询练习+考核项目
if (educationResult.size() == 0) {
if (fictitiousResult.size() > 0) {
fictitious = achievementManagementDao.queryFictitiousRecord(systemId, searchContant, startingtime, endtime, month, fictitiousResult);
@ -245,10 +250,10 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
}
}
}
return R.ok().put("data",vo);
}catch (RuntimeException e){
return R.ok().put("data", vo);
} catch (RuntimeException e) {
log.info(e.getMessage());
return R.error(500,"系统异常!!!");
return R.error(500, "系统异常!!!");
}
}
@ -267,13 +272,13 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
Integer signatureId = entity.getSignatureId();
Integer reportId = entity.getReportId();
String comment = entity.getComment();
if (comment==""){
if (comment == "") {
comment = null;
}
if (isSignature==1){
achievementManagementDao.updateSignatrue(1,signatureId,reportId,comment);
}else {
achievementManagementDao.updateSignatrue(0,null,reportId,comment);
if (isSignature == 1) {
achievementManagementDao.updateSignatrue(1, signatureId, reportId, comment);
} else {
achievementManagementDao.updateSignatrue(0, null, reportId, comment);
}
}

@ -38,7 +38,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
@Override
public PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions) {
public PageUtils queryPage(Integer page, Integer size, Integer userId, Integer projectPermissions,Integer systemId) {
/*GetByUserRecordResp projectRecord = new GetByUserRecordResp();
projectRecord.setUserId(userId);*/
@ -46,7 +46,7 @@ public class ProjectRecordServiceImpl extends ServiceImpl<ProjectRecordDao, Proj
//分页对象
Page<T> page1 = new Page<>(page, size);
IPage<GetByUserRecordResp> projectRecordVos = this.baseMapper.getByUserRecord(page1, userId, projectPermissions);
IPage<GetByUserRecordResp> projectRecordVos = this.baseMapper.getByUserRecord(page1, userId, projectPermissions,systemId);
PageUtils questionsPage = new PageUtils(projectRecordVos);

@ -132,7 +132,8 @@
LEFT JOIN hr_project_management AS hpm ON hpm.projectId = tpr.projectId
WHERE reportId = #{reportId}
</select>
<select id="queryEvaluationReport" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">
<!--
SELECT
u.userName,
sch.schoolName,
@ -158,14 +159,46 @@
AND tcr.isdel = 0
AND u.isdel = 0
AND tpr.projectId = #{projectId}
<if test="searchContant!=null and searchContant!=''">AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%')
<if test="searchContant!=null and searchContant!=''">
AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%')
OR u.userName LIKE CONCAT('%',#{searchContant},'%') )
</if>
GROUP BY
tcr.reportId
ORDER BY tpr.submitTime DESC
-->
<select id="queryEvaluationReport" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">
SELECT
r.reportId,
re.recordId,
sch.schoolName,
s.workNumber,
u.userName,
re.score,
re.submitTime,
r.eventId
FROM
tms_experimental_report r
INNER JOIN tms_experimental_teaching t ON t.id = r.projectId
INNER JOIN student s ON s.studentId = r.studentId
INNER JOIN school sch ON sch.schoolId = s.schoolId
INNER JOIN hr_user_info u ON u.userId = s.userId
INNER JOIN tms_project_record re ON re.projectId = t.project_id
WHERE
t.id = r.projectId
and r.eventId = re.recordId
AND r.projectId = #{projectId}
AND r.isdel = 0
AND t.is_del = 0
AND u.isdel = 0
<if test="searchContant!=null and searchContant!=''">
AND (sch.schoolName LIKE CONCAT('%',#{searchContant},'%')
OR u.userName LIKE CONCAT('%',#{searchContant},'%') )
</if>
GROUP BY r.reportId DESC
</select>
<select id="queryAchievement" resultType="com.msdw.tms.entity.request.AchievementImportRequest">
SELECT
u.userName,
@ -363,7 +396,7 @@
FROM hr_project_management hpm
WHERE systemId = #{systemId}
AND hpm.isdel = 0
<if test="projectPermissions!=null and projectPermissions!=''">AND hpm.projectPermissions =
<if test="projectPermissions!=null and projectPermissions!=''">AND hpm.projectPer missions =
#{projectPermissions}
</if>
<if test="searchContant!=null and searchContant!=''">and hpm.projectName like concat('%',#{searchContant},'%')

@ -52,13 +52,15 @@
r.startingTime,
r.submitTime,
r.timeSum,
c.userId
c.userId,
t.systemId
FROM hr_experiment_code c
INNER JOIN hr_project_management t ON t.projectId = c.projectId
INNER JOIN tms_project_record r ON r.recordId = c.recordId
WHERE c.userId = #{userId}
and r.isdel = 0
and projectPermissions = #{projectPermissions}
and t.systemId = #{systemId}
GROUP BY c.recordId desc
</select>

@ -43,7 +43,7 @@
AND u.isdel = 0
AND l.isdel = 0
AND s.isdel = 0
<if test="searchContent!=null">AND (u.userName LIKE CONCAT('%',#{searchContent},'%') OR s.workNumber LIKE CONCAT('%',#{searchContent},'%'))</if>
<if test="searchContent!=null">AND (u.account LIKE CONCAT('%',#{searchContent},'%') OR u.userName LIKE CONCAT('%',#{searchContent},'%') OR s.workNumber LIKE CONCAT('%',#{searchContent},'%'))</if>
ORDER BY
lastLoginTime DESC,studentId DESC
</select>

@ -215,7 +215,7 @@
</update>
<select id="queryPersonalFileES" parameterType="com.msdw.tms.entity.UserPersonalFileEntity"
resultType="hashMap">
resultType="com.msdw.tms.entity.vo.UserProsonalEntityVo">
SELECT
personalFileId,
schoolId,
@ -233,7 +233,7 @@
userId = #{userId}
</select>
<select id="queryPersonalInfo" parameterType="com.msdw.tms.entity.UserInfoEntity"
resultType="hashMap">
resultType="com.msdw.tms.entity.vo.UserProsonalEntityVo">
SELECT
u.userId,
userName,

Loading…
Cancel
Save