|
@@ -181,6 +181,8 @@ public class ExportServiceImpl implements ExportService {
|
|
|
private ActivityUserMapperService activityUserMapperService;
|
|
|
@Autowired
|
|
|
private SysMusicCompareRecordDao sysMusicCompareRecordDao;
|
|
|
+ @Autowired
|
|
|
+ private StudentOperatingVisitDao studentOperatingVisitDao;
|
|
|
|
|
|
private static final ExecutorService exportExecutorService = Executors.newFixedThreadPool(10);
|
|
|
@Autowired
|
|
@@ -345,6 +347,7 @@ public class ExportServiceImpl implements ExportService {
|
|
|
exportFuncMap.put(ExportEnum.EXERCISES_SITUATION, info -> studentExtracurricularExercisesSituationService.queryTeacherPerformanceIndicator(getQueryInfo(info, TeacherServeQueryInfo.class, false)));
|
|
|
exportFuncMap.put(ExportEnum.STUDENT_INSTRUMENT, info -> exportStudentInstrument(info));
|
|
|
exportFuncMap.put(ExportEnum.EXPORT_BILL, info -> exportBill(info));
|
|
|
+ exportFuncMap.put(ExportEnum.EXPORT_OPERATING_VISIT_STATISTICS, info -> exportOperatorVisit(info));
|
|
|
|
|
|
|
|
|
//导出到报表中心
|
|
@@ -367,6 +370,16 @@ public class ExportServiceImpl implements ExportService {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ //导出回访统计
|
|
|
+ private List<StudentOperatingVisit> exportOperatorVisit(Map<String, Object> info){
|
|
|
+ String month = getParam(info, "month", String.class);
|
|
|
+ if(StringUtils.isEmpty(month)){
|
|
|
+ throw new BizException("请选择导出时间");
|
|
|
+ }
|
|
|
+ return studentOperatingVisitDao.sumVisit(month);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//导出对账单
|
|
|
@Override
|
|
|
public List exportBill(Map<String, Object> info) {
|
|
@@ -1465,20 +1478,29 @@ public class ExportServiceImpl implements ExportService {
|
|
|
if (CollectionUtils.isEmpty(rows)) {
|
|
|
throw new BizException("没有可导出的数据");
|
|
|
}
|
|
|
- if (rows.size() > 50000) {
|
|
|
- throw new BizException("数据集太大,不能导出.最大数据集不能超过50000");
|
|
|
+ if (rows.size() > 65535) {
|
|
|
+ throw new BizException("数据集太大,不能导出.最大数据集不能超过");
|
|
|
}
|
|
|
}
|
|
|
+ private void checkRows(Integer count){
|
|
|
+ if(count == null || count <= 0){
|
|
|
+ throw new BizException("没有可导出的数据");
|
|
|
+ }
|
|
|
+ if(count > 65535){
|
|
|
+ throw new BizException("数据集太大,不能导出.最大数据集不能超过65535");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
//导出训练统计
|
|
|
private HttpResponseResult exportCompareRecord(Map<String, Object> info){
|
|
|
ExportCompareQueryInfo queryInfo = JSONObject.parseObject(JSONObject.toJSONString(info), ExportCompareQueryInfo.class);
|
|
|
SysUser user = sysUserService.getUser();
|
|
|
queryInfo.setOrganId(organizationService.getEmployeeOrgan(user.getId(), queryInfo.getOrganId(), user.getIsSuperAdmin()));
|
|
|
- List<ExportCompareRecordDto> rows = sysMusicCompareRecordDao.exportCompareRecord(queryInfo);
|
|
|
- this.checkRows(rows);
|
|
|
+ Integer count = sysMusicCompareRecordDao.countExportCompareRecord(queryInfo);
|
|
|
+ checkRows(count);
|
|
|
ManagerDownload managerDownload = saveManagerDownload(ExportTypeEnum.EXPORT_TRAINING_STATISTICS,user.getId());
|
|
|
- return this.asyncExport(() -> this.initExportInfo(rows, managerDownload,ExportEnum.EXPORT_TRAINING_STATISTICS),
|
|
|
+ return this.asyncExport(() -> this.initExportInfo(sysMusicCompareRecordDao.exportCompareRecord(queryInfo), managerDownload,ExportEnum.EXPORT_TRAINING_STATISTICS),
|
|
|
managerDownload.getName());
|
|
|
}
|
|
|
|