解决考核导出问题

hehai
rong.liu 4 years ago
parent 35f9322bb6
commit e6f8720f12
  1. 2
      src/main/java/com/msdw/tms/dao/AchievementManagementDao.java
  2. 9
      src/main/java/com/msdw/tms/service/impl/AchievementManagementServiceImpl.java
  3. 13
      src/main/resources/mapper/tms/AchievementManagementDao.xml

@ -56,7 +56,7 @@ public interface AchievementManagementDao extends BaseMapper<ExperimentalReportE
List<AchievementImportRequest> queryAchievement(@Param("ids") List<Integer> ids);
//导出考核
List<ImportAssessmentRequest> queryAchievementByAssessment(Integer id);
List<ImportAssessmentRequest> queryAchievementByAssessment(@Param("ids") List<Integer> ids);
List<AchievementManagementVO> queryFictitiousRecord(Integer systemId, String searchContant, String startingtime, String endtime, Integer month, List<Integer> projectIds);

@ -247,6 +247,7 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
for (int i = 0; i < split.length; i++) {
list.add(Integer.parseInt(split[i]));
}
//source 1.练习 2考核
switch (source) {
case 1:
//1.获取数据
@ -261,8 +262,12 @@ public class AchievementManagementServiceImpl extends ServiceImpl<AchievementMan
case 2:
//1.获取数据
Integer id = Integer.valueOf(list.get(0));
List<ImportAssessmentRequest> assessment = achievementManagementDao.queryAchievementByAssessment(id);
/*List<ImportAssessmentRequest> assessment = null;
for (Integer id : list) {
assessment = achievementManagementDao.queryAchievementByAssessment(id);
}*/
//Integer id = Integer.valueOf(list.get(0));
List<ImportAssessmentRequest> assessment = achievementManagementDao.queryAchievementByAssessment(list);
//2.加载模板流数据
ClassPathResource resource1 = new ClassPathResource("excel-template/川大成绩管理实验记录导出模板 (2).xlsx");

@ -239,8 +239,7 @@
</select>
<select id="queryAchievementByAssessment" resultType="com.msdw.tms.entity.request.ImportAssessmentRequest"
parameterType="java.lang.Integer">
<select id="queryAchievementByAssessment" resultType="com.msdw.tms.entity.request.ImportAssessmentRequest">
SELECT schoolName,
experimental_class_name,
userName,
@ -258,7 +257,15 @@
INNER JOIN hr_user_info u ON u.userId = r.userId
INNER JOIN school s ON s.schoolId = u.schoolId
INNER JOIN student stu ON stu.userId = u.userId
WHERE t.id = #{id}
WHERE
<if test="ids.size()>0">
r.recordId IN (
<foreach collection="ids" separator="," item="recordId">
#{recordId}
</foreach>
)
</if>
AND report.isdel = 0
</select>
<select id="queryFictitiousRecord" resultType="com.msdw.tms.entity.vo.AchievementManagementVO">

Loading…
Cancel
Save