修改实验报告数量

hehai
rong.liu 4 years ago
parent 6098042a9c
commit b2db6454fe
  1. 18
      src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java
  2. 25
      src/main/resources/mapper/tms/AchievementManagementDao.xml

@ -78,9 +78,26 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
return R.ok().put("name", name); return R.ok().put("name", name);
} }
/**
* 虚拟仿真列表
*
* @param vo
* @param page
* @param size
* @return
*/
@Override @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); List<ResultsEntity> list = achievementManagementDao.list(vo);
for (ResultsEntity entity : list) {
Integer number = achievementManagementDao.getImitationAchievement(entity.getProjectId()).size();
entity.setNumber(number);
}
return list; return list;
} }
@ -295,6 +312,7 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
public List<AchievementManagementVO> getImitationAchievement(Integer projectId) { public List<AchievementManagementVO> getImitationAchievement(Integer projectId) {
List<AchievementManagementVO> list = achievementManagementDao.getImitationAchievement(projectId); List<AchievementManagementVO> list = achievementManagementDao.getImitationAchievement(projectId);
return list; return list;
} }

@ -391,14 +391,35 @@
GROUP BY hec.codeId GROUP BY hec.codeId
</select> </select>
<select id="list" resultType="com.msdw.tms.entity.ResultsEntity"> <!--SELECT hpm.creationTime,hpm.projectId,hpm.projectName,hpm.projectPermissions,hpm.systemId,(SELECT count(*) FROM
SELECT hpm.creationTime,hpm.projectId,hpm.projectName,hpm.projectPermissions,hpm.systemId,(SELECT count(*) FROM
tms_project_record her where hpm.projectId = her.projectId and her.isdel = 0 ) as number tms_project_record her where hpm.projectId = her.projectId and her.isdel = 0 ) as number
FROM hr_project_management hpm FROM hr_project_management hpm
WHERE systemId = #{systemId} WHERE systemId = #{systemId}
AND hpm.isdel = 0 AND hpm.isdel = 0
AND hpm.projectPermissions = #{projectPermissions} AND hpm.projectPermissions = #{projectPermissions}
<if test="searchContant!=null and searchContant!=''">and hpm.projectName like concat('%',#{searchContant},'%')
</if>
<if test="startTime!=null and startTime!='' and endTime!=null and endTime != ''">and hpm.creationTime between
#{endTime} and #{startTime}
</if>
<if test="month!=null and month != ''">and DATE_SUB(CURDATE(), INTERVAL #{month} month ) &lt;=
date(hpm.creationTime)
</if>
ORDER BY hpm.creationTime DESC-->
<select id="list" resultType="com.msdw.tms.entity.ResultsEntity">
SELECT
hpm.projectId,
hpm.projectName,
hpm.projectPermissions,
hpm.systemId,
hpm.creationTime
FROM
hr_project_management hpm
WHERE systemId = #{systemId}
AND hpm.isdel = 0
AND hpm.projectPermissions = #{projectPermissions}
<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

Loading…
Cancel
Save