成绩列表隐藏数据优化

hehai
jiakun.lin 4 years ago
parent 0577e59e11
commit fa3ccd26be
  1. 2
      src/main/java/com/msdw/tms/TmsApplication.java
  2. 3
      src/main/java/com/msdw/tms/entity/ResultsEntity.java
  3. 6
      src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java
  4. 7
      src/main/resources/mapper/tms/AchievementManagementDao.xml

@ -6,7 +6,7 @@ import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
//@EnableScheduling//定时任务 @EnableScheduling//定时任务
@SpringBootApplication @SpringBootApplication
public class TmsApplication extends SpringBootServletInitializer { public class TmsApplication extends SpringBootServletInitializer {

@ -51,7 +51,4 @@ public class ResultsEntity{
//是否删除 //是否删除
private Integer isdel; private Integer isdel;
//是否隐藏项目实体类
private ProjectHiddenEntity projectHiddenEntity;
} }

@ -100,9 +100,6 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
for (ResultsEntity entity : list) { for (ResultsEntity entity : list) {
Integer number = achievementManagementDao.getImitationAchievement(entity.getProjectId()).size(); Integer number = achievementManagementDao.getImitationAchievement(entity.getProjectId()).size();
entity.setNumber(number); entity.setNumber(number);
ProjectHiddenEntity hiddenEntity = projectHiddenDao.selectByProjectId(entity.getProjectId());
entity.setProjectHiddenEntity(hiddenEntity);
} }
/* /*
Date begin = new Date(); Date begin = new Date();
@ -144,9 +141,6 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
for (ResultsEntity entity : newList) { for (ResultsEntity entity : newList) {
Integer number = achievementManagementDao.getTeachAchievement(entity.getId()).size(); Integer number = achievementManagementDao.getTeachAchievement(entity.getId()).size();
entity.setNumber(number); entity.setNumber(number);
ProjectHiddenEntity hiddenEntity = projectHiddenDao.selectByTeachId(entity.getId());
entity.setProjectHiddenEntity(hiddenEntity);
} }
PageInfo info = new PageInfo(newList); PageInfo info = new PageInfo(newList);

@ -442,9 +442,11 @@
hpm.isdel hpm.isdel
FROM FROM
hr_project_management hpm hr_project_management hpm
LEFT JOIN
tms_project_hidden tph on hpm.projectId = tph.project_id
WHERE systemId = #{systemId} WHERE systemId = #{systemId}
AND hpm.projectPermissions = #{projectPermissions} AND hpm.projectPermissions = #{projectPermissions}
AND tph.is_hidden is NULL
<if test="searchContant!=null and searchContant!=''">and hpm.projectName like concat('%',#{searchContant},'%') <if test="searchContant!=null and searchContant!=''">and hpm.projectName like concat('%',#{searchContant},'%')
</if> </if>
<if test="startTime!=null and startTime!='' and endTime!=null and endTime != ''">and hpm.creationTime between <if test="startTime!=null and startTime!='' and endTime!=null and endTime != ''">and hpm.creationTime between
@ -500,8 +502,11 @@
FROM FROM
tms_experimental_teaching et inner join tms_experimental_teaching et inner join
hr_project_management pm on et.project_id = pm.projectId hr_project_management pm on et.project_id = pm.projectId
LEFT JOIN
tms_project_hidden tph on et.id = tph.teach_id
WHERE WHERE
user_id = #{userId} user_id = #{userId}
AND tph.is_hidden is NULL
/*AND pm.isdel = 0*/ /*AND pm.isdel = 0*/
<if test="searchContant!=null and searchContant!=''">and et.experimental_class_name like <if test="searchContant!=null and searchContant!=''">and et.experimental_class_name like
concat('%',#{searchContant},'%') or et.experimental_name like concat('%',#{searchContant},'%') or concat('%',#{searchContant},'%') or et.experimental_name like concat('%',#{searchContant},'%') or

Loading…
Cancel
Save