|  | @@ -27,6 +27,7 @@ import com.ym.mec.common.page.PageInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.service.IdGeneratorService;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.collection.MapUtil;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.ini.IniFileUtil;
 | 
	
		
			
				|  |  | +import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  |  import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  |  import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
	
		
			
				|  | @@ -34,6 +35,7 @@ import org.springframework.boot.system.ApplicationHome;
 | 
	
		
			
				|  |  |  import org.springframework.core.io.ClassPathResource;
 | 
	
		
			
				|  |  |  import org.springframework.http.HttpStatus;
 | 
	
		
			
				|  |  |  import org.springframework.scheduling.annotation.Async;
 | 
	
		
			
				|  |  | +import org.springframework.security.access.prepost.PreAuthorize;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import com.ym.mec.common.tenant.TenantContextHolder;
 | 
	
	
		
			
				|  | @@ -43,6 +45,7 @@ import com.ym.mec.util.date.DateUtil;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.excel.POIUtil;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.upload.UploadUtil;
 | 
	
		
			
				|  |  |  import org.springframework.util.CollectionUtils;
 | 
	
		
			
				|  |  | +import org.springframework.web.bind.annotation.GetMapping;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import javax.annotation.PostConstruct;
 | 
	
		
			
				|  |  |  import javax.servlet.http.HttpServletResponse;
 | 
	
	
		
			
				|  | @@ -93,6 +96,8 @@ public class ExportServiceImpl implements ExportService {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private OrganizationService organizationService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  | +    private StudentInstrumentDao studentInstrumentDao;
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  |      private VipGroupService vipGroupService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private PracticeGroupService practiceGroupService;
 | 
	
	
		
			
				|  | @@ -319,6 +324,7 @@ public class ExportServiceImpl implements ExportService {
 | 
	
		
			
				|  |  |          exportFuncMap.put(ExportEnum.COUNT_CLOUD_TEACHER_ACTIVE_DETAIL, info -> countCloudTeacherActiveDetail(info));
 | 
	
		
			
				|  |  |          exportFuncMap.put(ExportEnum.MUSIC_ENLIGHTENMENT_QUESTIONNAIRES, info -> musicEnlightenmentQuestionnaireService.queryPage(getQueryInfo(info,TeacherServeQueryInfo.class,false)).getRows());
 | 
	
		
			
				|  |  |          exportFuncMap.put(ExportEnum.EXERCISES_SITUATION, info -> studentExtracurricularExercisesSituationService.queryTeacherPerformanceIndicator(getQueryInfo(info,TeacherServeQueryInfo.class,false)));
 | 
	
		
			
				|  |  | +        exportFuncMap.put(ExportEnum.STUDENT_INSTRUMENT, info -> exportStudentInstrument(info));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          //导出到报表中心
 | 
	
		
			
				|  |  |  //        exportManageFuncMap.put(ExportEnum.SUPER_FIND_COURSE_SCHEDULES, (info,headColumns) -> this.superFindCourseSchedules(info,headColumns));
 | 
	
	
		
			
				|  | @@ -331,6 +337,43 @@ public class ExportServiceImpl implements ExportService {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    //乐保导出
 | 
	
		
			
				|  |  | +    @Override
 | 
	
		
			
				|  |  | +    public List exportStudentInstrument(Map<String, Object> info){
 | 
	
		
			
				|  |  | +        String startTimeStr = getParam(info, "startTime", String.class);
 | 
	
		
			
				|  |  | +        Date startTime = null;
 | 
	
		
			
				|  |  | +        if(StringUtils.isNotEmpty(startTimeStr)){
 | 
	
		
			
				|  |  | +            startTime = DateUtil.stringToDate(startTimeStr,DateUtil.ISO_EXPANDED_DATE_FORMAT);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        Date endTime = null;
 | 
	
		
			
				|  |  | +        String endTimeStr = getParam(info, "endTime", String.class);
 | 
	
		
			
				|  |  | +        if(StringUtils.isNotEmpty(endTimeStr)){
 | 
	
		
			
				|  |  | +            endTime = DateUtil.stringToDate(endTimeStr,DateUtil.ISO_EXPANDED_DATE_FORMAT);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        String organId = organizationService.getEmployeeOrgan("");
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        if (startTime != null) {
 | 
	
		
			
				|  |  | +            startTime = DateUtil.trunc(startTime);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if (endTime != null) {
 | 
	
		
			
				|  |  | +            endTime = DateUtil.getLastTimeWithDay(endTime);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        List<StudentInstrumentExportDto> instruments = studentInstrumentDao.getInstruments(startTime, endTime, organId, TenantContextHolder.getTenantId());
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        if (instruments.size() <= 0) {
 | 
	
		
			
				|  |  | +            throw new BizException("没有可导出的记录");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        for (StudentInstrumentExportDto instrument : instruments) {
 | 
	
		
			
				|  |  | +            StudentRegistration studentMusicGroup = studentInstrumentDao.findStudentMusicGroup(instrument.getStudentId());
 | 
	
		
			
				|  |  | +            if (studentMusicGroup != null) {
 | 
	
		
			
				|  |  | +                instrument.setRepairerName(studentMusicGroup.getParentsName());
 | 
	
		
			
				|  |  | +                instrument.setMusicGroupName(studentMusicGroup.getClassGroupName());
 | 
	
		
			
				|  |  | +                instrument.setStudentStatus(studentMusicGroup.getMusicGroupStatus());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return instruments;
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      //班级列表导出
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public List exportClassGroup(Map<String, Object> info){
 | 
	
	
		
			
				|  | @@ -775,7 +818,7 @@ public class ExportServiceImpl implements ExportService {
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      public List studentOrder(Map<String, Object> info){
 | 
	
		
			
				|  |  |          String organIds = getParam(info,"organIds",String.class);
 | 
	
		
			
				|  |  | -        Date date = getParam(info,"date",Date.class);
 | 
	
		
			
				|  |  | +        Date date = DateUtil.stringToDate(getParam(info,"date",String.class),DateUtil.ISO_EXPANDED_DATE_FORMAT);
 | 
	
		
			
				|  |  |          SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  |          organIds = organizationService.getEmployeeOrgan(sysUser.getId(), organIds, sysUser.getIsSuperAdmin());
 | 
	
		
			
				|  |  |          Date startTime = DateUtil.getFirstDayOfMonth(date);
 | 
	
	
		
			
				|  | @@ -983,8 +1026,8 @@ public class ExportServiceImpl implements ExportService {
 | 
	
		
			
				|  |  |          HashSet<Integer> added = new HashSet<>();
 | 
	
		
			
				|  |  |          //获取用户选择的表头和表字段
 | 
	
		
			
				|  |  |          Map<String, String> exportMap = getExportMap(exportDto);
 | 
	
		
			
				|  |  | -        Set<String> header = exportMap.keySet();
 | 
	
		
			
				|  |  | -        Collection<String> body = exportMap.values();
 | 
	
		
			
				|  |  | +        Set<String> header = new LinkedHashSet<>(exportMap.keySet());
 | 
	
		
			
				|  |  | +        Set<String> body = new LinkedHashSet<>(exportMap.values());
 | 
	
		
			
				|  |  |          for (RegisterSubjectDto registerSubject : registerSubjects) {
 | 
	
		
			
				|  |  |              if (!added.contains(registerSubject.getSubjectId())) {
 | 
	
		
			
				|  |  |                  added.add(registerSubject.getSubjectId());
 | 
	
	
		
			
				|  | @@ -1127,8 +1170,8 @@ public class ExportServiceImpl implements ExportService {
 | 
	
		
			
				|  |  |          HashSet<Integer> added = new HashSet<>();
 | 
	
		
			
				|  |  |          //获取用户选择的表头和表字段
 | 
	
		
			
				|  |  |          Map<String, String> exportMap = getExportMap(exportDto);
 | 
	
		
			
				|  |  | -        Set<String> header = exportMap.keySet();
 | 
	
		
			
				|  |  | -        Collection<String> body = exportMap.values();
 | 
	
		
			
				|  |  | +        Set<String> header = new LinkedHashSet<>(exportMap.keySet());
 | 
	
		
			
				|  |  | +        Set<String> body = new LinkedHashSet<>(exportMap.values());
 | 
	
		
			
				|  |  |          for (RegisterSubjectDto registerSubject : registerSubjects) {
 | 
	
		
			
				|  |  |              if (!added.contains(registerSubject.getSubjectId())) {
 | 
	
		
			
				|  |  |                  added.add(registerSubject.getSubjectId());
 |