成绩管理项目删除,成绩报告数量修复

hehai
jiakun.lin 4 years ago
parent b868abe4c9
commit 082afc11bd
  1. 7
      src/main/java/com/msdw/tms/api/AchievementManagementApi.java
  2. 17
      src/main/java/com/msdw/tms/controller/AchievementManagementController.java
  3. 6
      src/main/java/com/msdw/tms/dao/AchievementManagementDao.java
  4. 5
      src/main/java/com/msdw/tms/service/AchievementManagementService.java
  5. 14
      src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java
  6. 17
      src/main/resources/mapper/tms/AchievementManagementDao.xml

@ -54,7 +54,7 @@ public interface AchievementManagementApi {
// R updateScore(@ApiParam(value = "recordid和score") ProjectRecordEntity entity);
@ApiOperation(value = "删除实验报告",notes = "根据实验记录主键reportId和实验报告主键recordId删除实验报告")
R deleteReport(@ApiParam(value = "实验记录主键",required = true) Integer reportId);
R deleteReport(@ApiParam(value = "实验记录主键",required = true) Integer reportId,@ApiParam(value = "实验报告主键",required = true) @RequestParam Integer recordId);
@ApiOperation(value = "班级实验报告列表查询",notes = "班级实验报告列表查询")
R queryEvaluationReport(@ApiParam(value = "搜索内容(学校名称/学生姓名)",required = false) String searchContant,
@ -78,4 +78,9 @@ public interface AchievementManagementApi {
@ApiOperation(value = "发布成绩",notes = "发布成绩--修改教师签名")
R updateSignatrue(@ApiParam(value = "实验报告主键reportId + 是否使用教师签名isSignature + 教师签名id signatureId + 教师评语comment") ExperimentalReportEntity entity);
@ApiOperation(value = "成绩管理删除项目",notes = "将项目管理表isdel置1")
R deleteReportByProjectId(@ApiParam(value = "项目id",required = true) Integer projectId);
}

@ -11,6 +11,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
/**
@ -193,8 +194,8 @@ public class AchievementManagementController implements AchievementManagementApi
*/
@Override
@PostMapping("/deleteReport")
public R deleteReport(@RequestParam Integer reportId){
R result = service.deleteReport(reportId);
public R deleteReport(@RequestParam Integer reportId,@RequestParam Integer recordId){
R result = service.deleteReport(reportId,recordId);
return result;
}
@ -263,4 +264,16 @@ public class AchievementManagementController implements AchievementManagementApi
service.updateSignatrue(entity);
return R.ok();
}
/**
* 删除成绩管理中的项目
* @param projectId
* @return
*/
@Override
@PostMapping("/deleteReportById")
public R deleteReportByProjectId(@RequestParam Integer projectId) {
return service.deleteReportByProjectId(projectId);
}
}

@ -16,6 +16,7 @@ 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
@ -47,7 +48,7 @@ public interface AchievementManagementDao extends BaseMapper<ExperimentalReportE
AchievementManagementVO queryReport(Integer reportId);
void deleteReport(Integer reportId);
void deleteReport(Integer reportId,Integer recordId);
IPage<AchievementManagementVO> queryEvaluationReport(Page<T> tPage, String searchContant, Integer projectId);
@ -72,4 +73,7 @@ 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);
}

@ -9,6 +9,7 @@ import com.msdw.tms.entity.ResultsEntity;
import com.msdw.tms.entity.vo.ResultsVo;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
public interface AchievementManagementService extends IService<ExperimentalReportEntity> {
@ -30,7 +31,7 @@ public interface AchievementManagementService extends IService<ExperimentalRepor
R queryReport(Integer reportId );
R deleteReport(Integer reportId);
R deleteReport(Integer reportId,Integer recordId);
R queryEvaluationReport(String searchContant,Integer projectId,Integer page,Integer size);
@ -41,4 +42,6 @@ public interface AchievementManagementService extends IService<ExperimentalRepor
R updateComment(ExperimentalReportEntity entity);
void updateSignatrue(ExperimentalReportEntity entity);
R deleteReportByProjectId(Integer projectId);
}

@ -170,8 +170,8 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
@Override
@Transactional
public R deleteReport(Integer reportId) {
achievementManagementDao.deleteReport(reportId);
public R deleteReport(Integer reportId,Integer recordId) {
achievementManagementDao.deleteReport(reportId,recordId);
return R.ok();
}
@ -277,4 +277,14 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
}
}
@Override
public R deleteReportByProjectId(Integer projectId) {
achievementManagementDao.deleteReportById(projectId);
return R.ok();
}
}

@ -84,7 +84,7 @@
<update id="deleteReport">
UPDATE tms_project_record tpr,hr_experimental_report tcr
SET tpr.isdel = 1, tcr.isdel = 1
WHERE tpr.recordId = tcr.eventId AND tcr.reportId = #{reportId}
WHERE tpr.recordId = #{recordId} AND tcr.reportId = #{reportId}
</update>
<update id="updateComment">
UPDATE tms_experimental_report
@ -359,8 +359,9 @@
<select id="list" resultType="com.msdw.tms.entity.ResultsEntity">
SELECT hpm.creationTime,hpm.projectId,hpm.projectName,hpm.projectPermissions,hpm.systemId,(SELECT count(*) FROM
tms_project_record her where hpm.projectId = her.projectId ) as number
FROM hr_project_management hpm WHERE systemId = #{systemId}
tms_project_record her where hpm.projectId = her.projectId and her.isdel = 0 ) as number
FROM hr_project_management hpm
WHERE systemId = #{systemId}
AND hpm.isdel = 0
<if test="projectPermissions!=null and projectPermissions!=''">AND hpm.projectPermissions =
#{projectPermissions}
@ -380,7 +381,7 @@
SELECT et.id,et.experimental_class_name as experimentalClassName,et.experimental_name as
experimentalName,et.project_id as projectId,
pm.projectName,pm.projectPermissions,et.creation_time as creationTime,(SELECT count(*) FROM
tms_project_record her where et.project_id = her.projectId ) as number
tms_project_record her where et.project_id = her.projectId and her.isdel = 0 ) as number
FROM tms_experimental_teaching et,hr_project_management pm
WHERE user_id = #{userId}
AND et.project_id = pm.projectId
@ -440,4 +441,12 @@
WHERE ru.trading_judgment_points_id = #{tradingJudgmentPointsId}
and ru.trading_judgment_points_id = tjp.id
</select>
<update id="deleteReportById">
UPDATE hr_project_management
SET hr_project_management.isdel = 1
WHERE hr_project_management.projectId = #{projectId}
</update>
</mapper>
Loading…
Cancel
Save