|
@@ -26,10 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
@@ -102,8 +99,6 @@ public class ExportController extends BaseController {
|
|
|
@Autowired
|
|
|
private TeacherService teacherService;
|
|
|
@Autowired
|
|
|
- private MusicGroupBuildLogDao musicGroupBuildLogDao;
|
|
|
- @Autowired
|
|
|
private MusicGroupPaymentCalenderService musicGroupPaymentCalenderService;
|
|
|
@Autowired
|
|
|
private SellOrderService sellOrderService;
|
|
@@ -143,46 +138,48 @@ public class ExportController extends BaseController {
|
|
|
private MusicEnlightenmentQuestionnaireService musicEnlightenmentQuestionnaireService;
|
|
|
@Autowired
|
|
|
private MusicGroupService musicGroupService;
|
|
|
- @Autowired
|
|
|
- private SysUserCashAccountLogService sysUserCashAccountLogService;
|
|
|
|
|
|
- @ApiOperation(value = "退费记录导出")
|
|
|
- @RequestMapping("export/userCashAccountLog")
|
|
|
- @PreAuthorize("@pcs.hasPermissions('export/userCashAccountLog')")
|
|
|
- public void exportUserCashAccountLog(HttpServletResponse response, AccountLogQueryInfo queryInfo) throws IOException {
|
|
|
- queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
|
|
|
- queryInfo.setPage(1);
|
|
|
- queryInfo.setRows(49999);
|
|
|
- List<SysUserCashAccountLog> rows = sysUserCashAccountLogService.queryPage(queryInfo).getRows();
|
|
|
- if(rows.size() < 1){
|
|
|
- throw new BizException("没有可导出数据");
|
|
|
- }
|
|
|
- OutputStream outputStream = response.getOutputStream();
|
|
|
- try {
|
|
|
- HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"退费编号", "学员编号", "学员姓名","分部", "课程组编号", "课程组类型",
|
|
|
- "退费金额","退费类型","退费时间","交易流水号", "打款时间"}, new String[]{
|
|
|
- "id", "userId","username", "organName", "groupId","groupType.desc",
|
|
|
- "amount", "returnFeeType.msg", "createTime", "transNo","payTime"}, rows);
|
|
|
- response.setContentType("application/octet-stream");
|
|
|
- response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
- "hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-
|
|
|
- outputStream = response.getOutputStream();
|
|
|
- workbook.write(outputStream);
|
|
|
- outputStream.flush();
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- } finally {
|
|
|
- if (outputStream != null) {
|
|
|
- try {
|
|
|
- outputStream.close();
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
+ @ApiOperation(value = "获取可导出字段")
|
|
|
+ @RequestMapping("export/getFields")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/getFields')")
|
|
|
+ public HttpResponseResult export(ExportEnum exportEnum) throws IOException {
|
|
|
+ return succeed(exportService.getExportFields(exportEnum));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "导出")
|
|
|
+ @RequestMapping("export/now")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/now')")
|
|
|
+ public void export(HttpServletResponse response, @RequestBody ExportDto exportDto) throws Exception {
|
|
|
+ if(exportDto.getExportEnum() == ExportEnum.MUSIC_GROUP_REGISTER){
|
|
|
+ exportService.musicGroupRegister(response,exportDto);
|
|
|
+ }else if(exportDto.getExportEnum() == ExportEnum.MUSIC_GROUP_NORMAL_STUDENT_NUM){
|
|
|
+ exportService.musicGroupNormalStudentNum(response,exportDto);
|
|
|
+ }else {
|
|
|
+ Map<String, Object> queryInfo = exportDto.getQueryInfo();
|
|
|
+ if(queryInfo == null){
|
|
|
+ queryInfo = new HashMap<>(10);
|
|
|
+ }
|
|
|
+ queryInfo.put("page",1);
|
|
|
+ queryInfo.put("rows",49999);
|
|
|
+ queryInfo.put("isExport",true);
|
|
|
+ exportService.export(response,exportService.getExportFuncMap().get(exportDto.getExportEnum()).apply(queryInfo),exportDto);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "导出到报表中心")
|
|
|
+ @PostMapping("export/managerDownload")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/managerDownload')")
|
|
|
+ public HttpResponseResult managerDownload(@RequestBody ExportDto exportDto){
|
|
|
+ Map<String, Object> queryInfo = exportDto.getQueryInfo();
|
|
|
+ if(queryInfo == null){
|
|
|
+ queryInfo = new HashMap<>(10);
|
|
|
+ }
|
|
|
+ queryInfo.put("page",1);
|
|
|
+ queryInfo.put("rows",49999);
|
|
|
+ queryInfo.put("isExport",true);
|
|
|
+ return exportService.getExportManageFuncMap().get(exportDto.getExportEnum()).apply(queryInfo,exportDto.getHeadColumns());
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "乐团列表导出")
|
|
|
@PostMapping("export/musicGroup")
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/musicGroup')")
|
|
@@ -204,7 +201,7 @@ public class ExportController extends BaseController {
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
"hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-
|
|
|
+
|
|
|
outputStream = response.getOutputStream();
|
|
|
workbook.write(outputStream);
|
|
|
outputStream.flush();
|
|
@@ -241,7 +238,7 @@ public class ExportController extends BaseController {
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
"hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-
|
|
|
+
|
|
|
outputStream = response.getOutputStream();
|
|
|
workbook.write(outputStream);
|
|
|
outputStream.flush();
|
|
@@ -277,7 +274,7 @@ public class ExportController extends BaseController {
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
"hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-
|
|
|
+
|
|
|
outputStream = response.getOutputStream();
|
|
|
workbook.write(outputStream);
|
|
|
outputStream.flush();
|
|
@@ -297,8 +294,8 @@ public class ExportController extends BaseController {
|
|
|
@ApiOperation(value = "分部2021双11活动统计导出")
|
|
|
@RequestMapping("export/organDoubleEleven2021Statis")
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/organDoubleEleven2021Statis')")
|
|
|
- public void organDoubleEleven2021Statis(HttpServletResponse response,Integer organId,String order, String sort) throws IOException {
|
|
|
- List<DoubleEleven2021Dto> rows = vipGroupActivityService.organDoubleEleven2021Statis(order, sort,organId);
|
|
|
+ public void organDoubleEleven2021Statis(HttpServletResponse response,OrganDoubleEleven2021StatisDto statisDto) throws IOException {
|
|
|
+ List<DoubleEleven2021Dto> rows = vipGroupActivityService.organDoubleEleven2021Statis(statisDto);
|
|
|
if(rows.size() < 1){
|
|
|
throw new BizException("没有可导出数据");
|
|
|
}
|
|
@@ -313,7 +310,7 @@ public class ExportController extends BaseController {
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
"hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-
|
|
|
+
|
|
|
outputStream = response.getOutputStream();
|
|
|
workbook.write(outputStream);
|
|
|
outputStream.flush();
|
|
@@ -351,7 +348,7 @@ public class ExportController extends BaseController {
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
"hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-
|
|
|
+
|
|
|
outputStream = response.getOutputStream();
|
|
|
workbook.write(outputStream);
|
|
|
outputStream.flush();
|
|
@@ -389,7 +386,7 @@ public class ExportController extends BaseController {
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
"hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-
|
|
|
+
|
|
|
outputStream = response.getOutputStream();
|
|
|
workbook.write(outputStream);
|
|
|
outputStream.flush();
|
|
@@ -437,7 +434,7 @@ public class ExportController extends BaseController {
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
"hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-
|
|
|
+
|
|
|
outputStream = response.getOutputStream();
|
|
|
workbook.write(outputStream);
|
|
|
outputStream.flush();
|
|
@@ -473,7 +470,7 @@ public class ExportController extends BaseController {
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
"hment;filename=goods-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-
|
|
|
+
|
|
|
outputStream = response.getOutputStream();
|
|
|
workbook.write(outputStream);
|
|
|
outputStream.flush();
|
|
@@ -508,7 +505,7 @@ public class ExportController extends BaseController {
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
"hment;filename=vipGroupActivity-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-
|
|
|
+
|
|
|
outputStream = response.getOutputStream();
|
|
|
workbook.write(outputStream);
|
|
|
outputStream.flush();
|
|
@@ -543,7 +540,7 @@ public class ExportController extends BaseController {
|
|
|
, "educationalTeacherName", "educationalTeacherId", "actualTeacherName", "actualTeacherId", "studentAttendanceStatus.msg"}, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=studentAttendance-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-
|
|
|
+
|
|
|
outputStream = response.getOutputStream();
|
|
|
workbook.write(outputStream);
|
|
|
outputStream.flush();
|
|
@@ -939,16 +936,16 @@ public class ExportController extends BaseController {
|
|
|
queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
|
|
|
List<VipGroup> rows = vipGroupService.findVipGroups(queryInfo).getRows();
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
- if (rows != null && rows.size() > 0) {
|
|
|
- for (VipGroup e : rows) {
|
|
|
- e.setSubClassTimes(e.getTotalClassTimes() == null ? 0 : e.getTotalClassTimes() - (e.getCurrentClassTimes() == null ? 0 : e.getCurrentClassTimes()));
|
|
|
- }
|
|
|
- }
|
|
|
+// if (rows != null && rows.size() > 0) {
|
|
|
+// for (VipGroup e : rows) {
|
|
|
+// e.setSubClassTimes(e.getTotalClassTimes() == null ? 0 : e.getTotalClassTimes() - (e.getCurrentClassTimes() == null ? 0 : e.getCurrentClassTimes()));
|
|
|
+// }
|
|
|
+// }
|
|
|
try {
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"VIP编号", "课程名称", "课程状态", "指导老师", "教务老师", "班级人数", "课程单价",
|
|
|
"活动方案", "当前课次", "总课次", "剩余课次", "月消耗", "上次课时间", "开课时间", "结束时间", "申请时间", "学生姓名", "课程形式", "备注"}, new String[]{
|
|
|
"id", "name", "status.msg", "userName", "educationalTeacherName", "studentNum", "courseUnitPrice",
|
|
|
- "vipGroupActivityName", "currentClassTimes", "totalClassTimes", "subClassTimes", "monthConsumeRate", "lastOverTime",
|
|
|
+ "vipGroupActivityName", "currentClassTimes", "totalClassTimes", "totalClassTimes == null ? 0 : totalClassTimes - (currentClassTimes == null ? 0 : currentClassTimes)", "monthConsumeRate", "lastOverTime",
|
|
|
"courseStartDate", "coursesExpireDate", "registrationStartTime", "userInfo", "vipGroupCategoryName", "stopReason"}, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
@@ -969,45 +966,6 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "终课表列表导出")
|
|
|
- @GetMapping("export/superFindCourseSchedules")
|
|
|
- @PreAuthorize("@pcs.hasPermissions('export/superFindCourseSchedules')")
|
|
|
- public Object superFindCourseSchedules(EndCourseScheduleQueryInfo queryInfo) throws IOException {
|
|
|
- queryInfo.setPage(1);
|
|
|
- queryInfo.setRows(49999);
|
|
|
- queryInfo.setIsExport(true);
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if (sysUser == null) {
|
|
|
- throw new BizException("用户信息获取失败");
|
|
|
- }
|
|
|
- queryInfo.setOrganIdList(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganIdList(),sysUser.getIsSuperAdmin()));
|
|
|
- Map<String, Object> params = new HashMap<>();
|
|
|
- MapUtil.populateMap(params, queryInfo);
|
|
|
- int count = scheduleService.endCountCourseSchedules(params);
|
|
|
- if (count <= 0) {
|
|
|
- return failed("没有可导出的数据");
|
|
|
- }
|
|
|
-
|
|
|
- if (count > 50000) {
|
|
|
- return failed("数据集太大,不能导出.最大数据集不能超过50000");
|
|
|
- }
|
|
|
- Date nowDate = new Date();
|
|
|
- String no = idGeneratorService.generatorId("download") + "";
|
|
|
- String fileName = "课表列表-" + no + "-" + DateUtil.getDate(nowDate) + ".xls";
|
|
|
- ManagerDownload managerDownload = new ManagerDownload();
|
|
|
- managerDownload.setType(ExportTypeEnum.COURSE_SCHEDULE);
|
|
|
- managerDownload.setUserId(sysUser.getId());
|
|
|
- managerDownload.setName(fileName);
|
|
|
- managerDownload.setFileUrl("");
|
|
|
- managerDownload.setCreateTime(nowDate);
|
|
|
- managerDownload.setUpdateTime(nowDate);
|
|
|
- managerDownloadDao.insert(managerDownload);
|
|
|
- exportService.superFindCourseSchedules(queryInfo, managerDownload);
|
|
|
- HttpResponseResult<Object> succeed = succeed();
|
|
|
- succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
|
|
|
- return succeed;
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
@ApiOperation(value = "导出零星收费列表")
|
|
|
@GetMapping("export/sporadicChargeInfo")
|
|
@@ -1018,14 +976,14 @@ public class ExportController extends BaseController {
|
|
|
queryInfo.setIsExport(true);
|
|
|
queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
|
|
|
List<SporadicChargeInfo> rows = sporadicChargeInfoService.queryDetailPage(queryInfo).getRows();
|
|
|
- for (SporadicChargeInfo row : rows) {
|
|
|
- row.setOpenFlagStr(row.getOpenFlag().equals(0) ? "开启" : "关闭");
|
|
|
- row.setOrderType(row.getUserId() == null ? "公用" : "个人");
|
|
|
- }
|
|
|
+// for (SporadicChargeInfo row : rows) {
|
|
|
+// row.setOpenFlagStr(row.getOpenFlag().equals(0) ? "开启" : "关闭");
|
|
|
+// row.setOrderType(row.getUserId() == null ? "公用" : "个人");
|
|
|
+// }
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "收费类型", "标题", "收费状态", "金额", "时间", "学生姓名", "订单类型", "创建人"}, new String[]{
|
|
|
- "organName", "chargeType.msg", "title", "openFlagStr", "amount", "createTime", "userName", "orderType", "operatorName"}, rows);
|
|
|
+ "organName", "chargeType.msg", "title", "openFlag == 0?'开启':'关闭'", "amount", "createTime", "userName", "userId == null?'公用':'个人'", "operatorName"}, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
|
|
@@ -1091,7 +1049,8 @@ public class ExportController extends BaseController {
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "乐团", "学员编号", "学员姓名", "声部", "购买乐器", "乐器采购方式", "乐器金额", "购买教辅", "教辅金额", "课程金额", "团练宝金额", "乐保金额", "订单总价"}, new String[]{
|
|
|
- "organName", "musicGroupName", "userId", "username", "subjectName", "musicalName", "kitGroupPurchaseTypeEnum.msg", "musicalAmount", "accessoriesName", "accessoriesAmount", "courseAmount", "cloudTeacherAmount", "maintenanceAmount", "orderAmount"}, musicalList);
|
|
|
+ "organName", "musicGroupName", "userId", "username", "subjectName", "musicalName", "kitGroupPurchaseTypeEnum.msg",
|
|
|
+ "musicalAmount", "accessoriesName", "accessoriesAmount", "courseAmount", "cloudTeacherAmount", "maintenanceAmount", "orderAmount"}, musicalList);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
|
|
@@ -1149,8 +1108,11 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
- HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"学生姓名", "家长姓名", "年级", "班级", "性别", "服从调剂", "报名专业", "实际专业", "联系电话", "学员缴费状态", "乐器购买方式","缴费中/审核中","是否购买团练宝"}, new String[]{
|
|
|
- "studentName", "parentsName", "currentGrade", "currentClass", "gender.description", "isAllowAdjust.msg", "subjectName", "actualSubjectName", "parentsPhone", "paymentStatus.desc", "kitGroupPurchaseTypeEnum.msg","payingStatusStr","hasCloudTeacher==1?'有':'没有'"}, studentApplyDetail);
|
|
|
+ HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"学生姓名", "家长姓名", "年级", "班级", "性别", "服从调剂", "报名专业",
|
|
|
+ "实际专业", "联系电话", "学员缴费状态", "乐器购买方式","缴费中/审核中","是否购买团练宝"}, new String[]{
|
|
|
+ "studentName", "parentsName", "currentGrade", "currentClass", "gender.description",
|
|
|
+ "isAllowAdjust.msg", "subjectName", "actualSubjectName", "parentsPhone", "paymentStatus.desc",
|
|
|
+ "kitGroupPurchaseTypeEnum.msg","payingStatusStr","hasCloudTeacher==1?'有':'没有'"}, studentApplyDetail);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
|
|
@@ -1201,81 +1163,6 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "订单列表导出")
|
|
|
- @RequestMapping("export/orderList")
|
|
|
- @PreAuthorize("@pcs.hasPermissions('export/orderList')")
|
|
|
- public HttpResponseResult orderList(StudentPaymentOrderQueryInfo queryInfo) throws Exception {
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if(sysUser == null || sysUser.getId() == null){
|
|
|
- return failed(HttpStatus.FORBIDDEN, "请登录");
|
|
|
- }
|
|
|
- queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganId(),sysUser.getIsSuperAdmin()));
|
|
|
- if (StringUtils.isNotBlank(queryInfo.getSearch())) {
|
|
|
- List<BasicUserDto> users = studentPaymentOrderDao.getUsers(queryInfo.getSearch());
|
|
|
- List<Integer> userIds = users.stream().map(BasicUserDto::getUserId).collect(Collectors.toList());
|
|
|
- if (userIds.size() <= 0) {
|
|
|
- userIds.add(0);
|
|
|
- }
|
|
|
- queryInfo.setUserIds(userIds);
|
|
|
- }
|
|
|
- queryInfo.setPage(1);
|
|
|
- queryInfo.setRows(50000);
|
|
|
- queryInfo.setIsExport(true);
|
|
|
- Map<String, Object> params = new HashMap<>();
|
|
|
- MapUtil.populateMap(params, queryInfo);
|
|
|
- int count = studentPaymentOrderDao.queryCount(params);
|
|
|
- if (count <= 0) {
|
|
|
- return failed("没有可导出的数据");
|
|
|
- }
|
|
|
-
|
|
|
- if (count > 50000) {
|
|
|
- return failed("数据集太大,不能导出.最大数据集不能超过50000");
|
|
|
- }
|
|
|
- Date nowDate = new Date();
|
|
|
- String no = idGeneratorService.generatorId("download") + "";
|
|
|
- String fileName = "orderList-" + no + "-" + DateUtil.getDate(nowDate) + ".xls";
|
|
|
- ManagerDownload managerDownload = new ManagerDownload();
|
|
|
- managerDownload.setType(ExportTypeEnum.ORDER);
|
|
|
- managerDownload.setUserId(sysUser.getId());
|
|
|
- managerDownload.setName(fileName);
|
|
|
- managerDownload.setFileUrl("");
|
|
|
- managerDownload.setCreateTime(nowDate);
|
|
|
- managerDownload.setUpdateTime(nowDate);
|
|
|
- managerDownloadDao.insert(managerDownload);
|
|
|
- exportService.orderList(params, managerDownload, sysUser.getTenantId() <= 0);
|
|
|
- HttpResponseResult<Object> succeed = succeed();
|
|
|
- succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
|
|
|
- return succeed;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- @ApiOperation(value = "学员小课记录导出")
|
|
|
- @RequestMapping("export/studentVipPractice")
|
|
|
- @PreAuthorize("@pcs.hasPermissions('export/studentVipPractice')")
|
|
|
- public HttpResponseResult exportStudentVipPractice(String organId) throws IOException {
|
|
|
- Boolean hasCourse = courseScheduleStudentPaymentDao.hasCourse(organId, TenantContextHolder.getTenantId());
|
|
|
- if (hasCourse == null || !hasCourse) {
|
|
|
- return failed("没有可导出的数据");
|
|
|
- }
|
|
|
- Integer tenantId = TenantContextHolder.getTenantId();
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- Date nowDate = new Date();
|
|
|
- String no = idGeneratorService.generatorId("download") + "";
|
|
|
- String fileName = "studentVipPractice-" + no + "-" + DateUtil.getDate(nowDate) + ".xls";
|
|
|
- ManagerDownload managerDownload = new ManagerDownload();
|
|
|
- managerDownload.setType(ExportTypeEnum.STUDENT_VIP_PRACTICE);
|
|
|
- managerDownload.setUserId(sysUser.getId());
|
|
|
- managerDownload.setName(fileName);
|
|
|
- managerDownload.setFileUrl("");
|
|
|
- managerDownload.setCreateTime(nowDate);
|
|
|
- managerDownload.setUpdateTime(nowDate);
|
|
|
- managerDownloadDao.insert(managerDownload);
|
|
|
- exportService.studentVipPractice(organId, managerDownload, tenantId);
|
|
|
- HttpResponseResult<Object> succeed = succeed();
|
|
|
- succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
|
|
|
- return succeed;
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
@ApiOperation(value = "乐团管理--乐团详情-导出学员列表")
|
|
|
@RequestMapping("export/musicGroupStudent")
|
|
@@ -1330,10 +1217,10 @@ public class ExportController extends BaseController {
|
|
|
"VIP/网管是否有课","关心包","加油包", "欠费金额(元)", "退团原因", "会员截止时间", "会员剩余天数"};
|
|
|
String[] body = {"userId", "realName", "gender", "phone","registerTime", "currentGrade", "currentClass", "subjectName", "studentStatus", "paymentStatus.desc"
|
|
|
,"courseFee", "activeName", "hasCourse ? '是' : '否'"
|
|
|
- ,"carePackage == null || carePackage == 0 ? \"不可用\" : carePackage == 1 ? \"可用\" : \"已使用\""
|
|
|
- ,"comeOnPackage == null || comeOnPackage == 0 ? \"不可用\" : comeOnPackage == 1 ? \"可用\" : \"已使用\""
|
|
|
+ ,"carePackage == null || carePackage == 0 ? '不可用' : carePackage == 1 ? '可用' : '已使用'"
|
|
|
+ ,"comeOnPackage == null || comeOnPackage == 0 ? '不可用'' : comeOnPackage == 1 ? '可用' : '已使用'"
|
|
|
,"noPaymentAmount == null ? 0 : noPaymentAmount", "quitReason",
|
|
|
- "membershipEndTime","membershipEndTime == null ? hasNoStartCloudTeacher ? \"未生效\" : \"未购买\" : membershipDay >= 0 ? membershipDay : hasNoStartCloudTeacher ? \"未生效\" : \"会员已过期\""};
|
|
|
+ "membershipEndTime","membershipEndTime == null ? hasNoStartCloudTeacher ? '未生效' : '未购买' : membershipDay >= 0 ? membershipDay : hasNoStartCloudTeacher ? '未生效' : '会员已过期'"};
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(header, body, musicGroupStudentsDtoPageInfo.getRows());
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
@@ -1362,7 +1249,6 @@ public class ExportController extends BaseController {
|
|
|
queryInfo.setIsExport(1);
|
|
|
queryInfo.setPage(1);
|
|
|
queryInfo.setRows(49999);
|
|
|
- // PageInfo<CourseReviewDto> practiceGroupReviews = courseReviewService.findPracticeGroupReviews(queryInfo);
|
|
|
PageInfo<CourseReviewDto> practiceGroupReviews = courseReviewService.getVipCourseReviews(queryInfo);
|
|
|
if (practiceGroupReviews.getTotal() <= 0) {
|
|
|
throw new BizException("没有可导出的记录");
|
|
@@ -1412,8 +1298,11 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- String[] header = {"分部", "上课日期", "学生编号", "课程编号", "学员是否到课", "课程班名称", "老师", "教材内容", "发音", "节奏", "乐理", "曲目", "评价备注", "回访日期(布置训练)", "完成app双向沟通", "学员评分", "是否布置训练", "是否提交训练", "是否回复训练", "教务老师", "教务评价"};
|
|
|
- String[] body = {"organName", "classDateStr", "studentId", "id", "attendanceStr", "courseName", "teacherName", "teachingMaterial", "pronunciationStr", "tempoStr", "musicTheoryStr", "song", "memo", "createTimeStr", "hasLiaison", "studentReview", "assignHomeworkStr", "handHomeworkStr", "homeWorkReplied", "eduTeacherName", "courseReview"};
|
|
|
+ String[] header = {"分部", "上课日期", "学生编号", "课程编号", "学员是否到课", "课程班名称", "老师", "教材内容", "发音", "节奏",
|
|
|
+ "乐理", "曲目", "评价备注", "回访日期(布置训练)", "完成app双向沟通", "学员评分", "是否布置训练", "是否提交训练", "是否回复训练", "教务老师", "教务评价"};
|
|
|
+ String[] body = {"organName", "classDateStr", "studentId", "id", "attendanceStr", "courseName",
|
|
|
+ "teacherName", "teachingMaterial", "pronunciationStr", "tempoStr", "musicTheoryStr", "song",
|
|
|
+ "memo", "createTimeStr", "hasLiaison", "studentReview", "assignHomeworkStr", "handHomeworkStr", "homeWorkReplied", "eduTeacherName", "courseReview"};
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(header, body, practiceGroupReviews.getRows());
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
@@ -1476,8 +1365,10 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
|
|
|
try {
|
|
|
- String[] header = {"分部", "学生编号", "学生姓名", "网管课老师id", "网管课老师", "教务老师id", "教务老师", "有效期截止时间", "课程截止时间", "总课时", "剩余课时", "是否购买"};
|
|
|
- String[] body = {"organName", "studentId", "studentName", "teacherIds", "teacherName", "eduTeacherIds", "eduTeacherName", "expireDate", "classEndDate", "totalClassTimes", "noStartClassTimes", "buyPractice.msg"};
|
|
|
+ String[] header = {"分部", "学生编号", "学生姓名", "网管课老师id", "网管课老师", "教务老师id", "教务老师",
|
|
|
+ "有效期截止时间", "课程截止时间", "总课时", "剩余课时", "是否购买"};
|
|
|
+ String[] body = {"organName", "studentId", "studentName", "teacherIds", "teacherName", "eduTeacherIds",
|
|
|
+ "eduTeacherName", "expireDate", "classEndDate", "totalClassTimes", "noStartClassTimes", "buyPractice.msg"};
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(header, body, practiceGroupExports);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
@@ -1591,7 +1482,8 @@ public class ExportController extends BaseController {
|
|
|
try {
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(
|
|
|
new String[]{"布置时间", "截至时间", "训练标题", "老师名字", "分部", "学生姓名", "学生编号", "提交训练", "提交训练时间", "是否评价", "是否有vip", "及时评价"},
|
|
|
- new String[]{"createTime", "expireDate", "title", "teacherName", "organName", "user.username", "userId", "statusStr", "submitTime", "isRepliedStr", "existVipCourseStr", "isRepliedTimelyStr"}, rows);
|
|
|
+ new String[]{"createTime", "expireDate", "title", "teacherName", "organName",
|
|
|
+ "user.username", "userId", "statusStr", "submitTime", "isRepliedStr", "existVipCourseStr", "isRepliedTimelyStr"}, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
ouputStream = response.getOutputStream();
|
|
@@ -1616,7 +1508,7 @@ public class ExportController extends BaseController {
|
|
|
public void exercisesSituations(StudentExercisesSituationQueryInfo queryInfo, HttpServletResponse response) throws IOException {
|
|
|
queryInfo.setPage(1);
|
|
|
queryInfo.setRows(49999);
|
|
|
- queryInfo.setOrganIdList(organizationService.getEmployeeOrgan(queryInfo.getOrganIdList()));
|
|
|
+ queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
|
|
|
List<StudentExercisesSituationDto> rows = studentExtracurricularExercisesSituationService.findStudentExtracurricularExercisesSituations(queryInfo).getRows();
|
|
|
if (CollectionUtils.isEmpty(rows)) {
|
|
|
throw new BizException("没有可导出的记录");
|
|
@@ -1624,8 +1516,11 @@ public class ExportController extends BaseController {
|
|
|
OutputStream ouputStream = null;
|
|
|
try {
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(
|
|
|
- new String[]{"学员编号", "学员姓名", "所属分部", "乐团名称", "指导老师", "教务老师", "服务课程", "预期安排", "实际安排", "提交次数", "评价次数", "及时评价次数", "付费网管课", "VIP课", "训练提交时间"},
|
|
|
- new String[]{"studentId", "studentName", "organName", "groupNames", "teacherName", "educationalTeacherName", "serveType == 'EXERCISE' ? '课外训练':courseIds", "expectExercisesNum", "actualExercisesNum", "exercisesReplyNum",
|
|
|
+ new String[]{"学员编号", "学员姓名", "所属分部", "乐团名称", "指导老师", "教务老师", "服务课程",
|
|
|
+ "预期安排", "实际安排", "提交次数", "评价次数", "及时评价次数", "付费网管课", "VIP课", "训练提交时间"},
|
|
|
+ new String[]{"studentId", "studentName", "organName", "groupNames", "teacherName",
|
|
|
+ "educationalTeacherName", "serveType == 'EXERCISE' ? '课外训练':courseIds",
|
|
|
+ "expectExercisesNum", "actualExercisesNum", "exercisesReplyNum",
|
|
|
"exercisesMessageNum", "exercisesMessageTimelyNum", "existPracticeCourse", "existVipCourse", "lastSubmitTime"}, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
@@ -1755,7 +1650,8 @@ public class ExportController extends BaseController {
|
|
|
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(
|
|
|
new String[]{"分部", "乐团名称", "学生", "学生编号", "指导老师", "指导老师id", "参与运营指标", "有线上VIP课", "参与免费网管课", "有付费网管课", "有乐团网管课"},
|
|
|
- new String[]{"organName", "groupNames", "studentName", "studentId", "teacherName", "teacherId", "operatingTagStr", "vipTimesStr", "freePracticeTimesStr", "buyPracticeTimesStr", "musicNetWorkTimesStr"}, rows);
|
|
|
+ new String[]{"organName", "groupNames", "studentName", "studentId", "teacherName", "teacherId",
|
|
|
+ "operatingTagStr", "vipTimesStr", "freePracticeTimesStr", "buyPracticeTimesStr", "musicNetWorkTimesStr"}, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
ouputStream = response.getOutputStream();
|
|
@@ -1778,7 +1674,6 @@ public class ExportController extends BaseController {
|
|
|
@RequestMapping("export/vipCourseReviews")
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/vipCourseReviews')")
|
|
|
public void vipCourseReviews(CourseReviewQueryInfo queryInfo, HttpServletResponse response) throws IOException {
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
|
|
|
queryInfo.setIsExport(1);
|
|
|
queryInfo.setPage(1);
|
|
@@ -1832,8 +1727,11 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- String[] header = {"分部", "上课日期", "课程编号", "课程班名称", "老师", "教材内容", "发音", "节奏", "乐理", "曲目", "评价备注", "回访日期(布置训练)", "是否布置训练", "是否提交训练", "教务老师", "教务评价"};
|
|
|
- String[] body = {"organName", "classDateStr", "id", "courseName", "teacherName", "teachingMaterial", "pronunciationStr", "tempoStr", "musicTheoryStr", "song", "memo", "createTimeStr", "assignHomeworkStr", "handHomeworkStr", "eduTeacherName", "courseReview"};
|
|
|
+ String[] header = {"分部", "上课日期", "课程编号", "课程班名称", "老师", "教材内容", "发音", "节奏", "乐理",
|
|
|
+ "曲目", "评价备注", "回访日期(布置训练)", "是否布置训练", "是否提交训练", "教务老师", "教务评价"};
|
|
|
+ String[] body = {"organName", "classDateStr", "id", "courseName", "teacherName", "teachingMaterial",
|
|
|
+ "pronunciationStr", "tempoStr", "musicTheoryStr", "song", "memo", "createTimeStr", "assignHomeworkStr",
|
|
|
+ "handHomeworkStr", "eduTeacherName", "courseReview"};
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(header, body, practiceGroupReviews.getRows());
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
@@ -1868,21 +1766,22 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
- for (DegreeRegistration row : pageList.getRows()) {
|
|
|
- if (row.getGender().equals("1")) {
|
|
|
- row.setGender("男");
|
|
|
- } else {
|
|
|
- row.setGender("女");
|
|
|
- }
|
|
|
- if (row.getStatus().equals(2)) {
|
|
|
- row.setStatusStr("已缴费");
|
|
|
- } else {
|
|
|
- row.setStatusStr("未缴费");
|
|
|
- }
|
|
|
- }
|
|
|
+// for (DegreeRegistration row : pageList.getRows()) {
|
|
|
+// if (row.getGender().equals("1")) {
|
|
|
+// row.setGender("男");
|
|
|
+// } else {
|
|
|
+// row.setGender("女");
|
|
|
+// }
|
|
|
+// if (row.getStatus().equals(2)) {
|
|
|
+// row.setStatusStr("已缴费");
|
|
|
+// } else {
|
|
|
+// row.setStatusStr("未缴费");
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
String[] header = {"姓名", "性别", "身份证号", "城市", "学校", "报考乐器", "报考级别", "乐理级别", "乐理级别证书", "家长联系电话", "考级费用", "乐理费用", "备注", "缴费状态", "订单编号", "商户订单号", "报名时间"};
|
|
|
- String[] body = {"name", "gender", "idcard", "city", "school", "subject", "level", "theoryLevel", "theoryCert", "mobile", "money", "theoryMoney", "memo", "statusStr", "orderNo", "transNo", "createTime"};
|
|
|
+ String[] body = {"name", "gender == 1?'男':'女'", "idcard", "city", "school", "subject", "level", "theoryLevel",
|
|
|
+ "theoryCert", "mobile", "money", "theoryMoney", "memo", "status == 2?'已缴费':'未缴费'", "orderNo", "transNo", "createTime"};
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(header, body, pageList.getRows());
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
@@ -1939,125 +1838,7 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "报名中缴费中乐团缴费情况导出")
|
|
|
- @RequestMapping("export/musicGroupRegister")
|
|
|
- @PreAuthorize("@pcs.hasPermissions('export/musicGroupRegister')")
|
|
|
- public void musicGroupRegister(String organIds, HttpServletResponse response) throws IOException {
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- organIds = organizationService.getEmployeeOrgan(sysUser.getId(),organIds,sysUser.getIsSuperAdmin());
|
|
|
- List<MusicGroupStatusEnum> musicGroupStatusList = new ArrayList<>();
|
|
|
- musicGroupStatusList.add(MusicGroupStatusEnum.APPLY);
|
|
|
- musicGroupStatusList.add(MusicGroupStatusEnum.PAY);
|
|
|
-
|
|
|
- List<MusicGroupRegisterDto> musicGroupRegisters = musicGroupDao.getMusicGroupRegister(musicGroupStatusList, organIds, TenantContextHolder.getTenantId());
|
|
|
-
|
|
|
- if (musicGroupRegisters.size() <= 0) {
|
|
|
- throw new BizException("没有可导出的记录");
|
|
|
- }
|
|
|
- List<String> musicGroupIds = musicGroupRegisters.stream().map(MusicGroupRegisterDto::getMusicGroupId).collect(Collectors.toList());
|
|
|
-
|
|
|
- List<RegisterSubjectDto> registerSubjects = musicGroupDao.getRegisterSubjectNum(musicGroupIds, null, 2);
|
|
|
- List<MusicGroupRegisterDto> musicGroupRegisterOrders = musicGroupDao.getMusicGroupRegisterOrder(musicGroupIds);
|
|
|
- List<MusicGroupRegisterDto> musicGroupRegisterTotalMoneys = musicGroupDao.getMusicGroupRegisterTotalMoney(musicGroupIds);
|
|
|
-
|
|
|
- List<MusicGroupBuildLog> musicGroupAuditSuccess = musicGroupBuildLogDao.getMusicGroupAuditSuccess(musicGroupIds);
|
|
|
-
|
|
|
- HashSet<Integer> added = new HashSet<>();
|
|
|
- List<String> header = new ArrayList<>();
|
|
|
- header.add("分部");
|
|
|
- header.add("乐团名称");
|
|
|
- header.add("乐团状态");
|
|
|
- header.add("审核通过时间");
|
|
|
- header.add("报名总数");
|
|
|
- List<String> body = new ArrayList<>();
|
|
|
- body.add("organName");
|
|
|
- body.add("musicGroupName");
|
|
|
- body.add("musicGroupStatus");
|
|
|
- body.add("auditSuccessTime");
|
|
|
- body.add("registerNum");
|
|
|
- for (RegisterSubjectDto registerSubject : registerSubjects) {
|
|
|
- if (!added.contains(registerSubject.getSubjectId())) {
|
|
|
- added.add(registerSubject.getSubjectId());
|
|
|
- header.add(registerSubject.getSubjectName());
|
|
|
- body.add("subject" + registerSubject.getSubjectId());
|
|
|
- }
|
|
|
- }
|
|
|
- header.add("团购数");
|
|
|
- header.add("缴费总数");
|
|
|
- header.add("回款总金额");
|
|
|
-
|
|
|
- body.add("groupBuyMusicalNum");
|
|
|
- body.add("registerPayNum");
|
|
|
- body.add("totalMoney");
|
|
|
-
|
|
|
-
|
|
|
- List<Map<String, Object>> data = new ArrayList<>();
|
|
|
- for (MusicGroupRegisterDto musicGroupRegister : musicGroupRegisters) {
|
|
|
- added.clear();
|
|
|
- HashMap<String, Object> musicGroupRegisterMap = new HashMap<>();
|
|
|
- int registerPayNum = 0;
|
|
|
- musicGroupRegisterMap.put("organName", musicGroupRegister.getOrganName());
|
|
|
- musicGroupRegisterMap.put("musicGroupName", musicGroupRegister.getMusicGroupName());
|
|
|
- musicGroupRegisterMap.put("musicGroupStatus", musicGroupRegister.getMusicGroupStatus().getMsg());
|
|
|
- musicGroupRegisterMap.put("registerNum", musicGroupRegister.getRegisterNum());
|
|
|
- for (MusicGroupRegisterDto musicGroupRegisterOrder : musicGroupRegisterOrders) {
|
|
|
- if (musicGroupRegisterOrder.getMusicGroupId().equals(musicGroupRegister.getMusicGroupId())) {
|
|
|
- musicGroupRegister.setGroupBuyMusicalNum(musicGroupRegisterOrder.getGroupBuyMusicalNum());
|
|
|
- }
|
|
|
- }
|
|
|
- for (MusicGroupRegisterDto musicGroupRegisterTotalMoney : musicGroupRegisterTotalMoneys) {
|
|
|
- if (musicGroupRegisterTotalMoney.getMusicGroupId().equals(musicGroupRegister.getMusicGroupId())) {
|
|
|
- musicGroupRegister.setTotalMoney(musicGroupRegisterTotalMoney.getTotalMoney());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- for (RegisterSubjectDto registerSubject : registerSubjects) {
|
|
|
- if (registerSubject.getMusicGroupId().equals(musicGroupRegister.getMusicGroupId())) {
|
|
|
- added.add(registerSubject.getSubjectId());
|
|
|
- musicGroupRegisterMap.put("subject" + registerSubject.getSubjectId(), registerSubject.getNum());
|
|
|
- registerPayNum += registerSubject.getNum();
|
|
|
- }
|
|
|
- if (!added.contains(registerSubject.getSubjectId())) {
|
|
|
- musicGroupRegisterMap.put("subject" + registerSubject.getSubjectId(), 0);
|
|
|
- }
|
|
|
- }
|
|
|
- for (MusicGroupBuildLog groupAuditSuccess : musicGroupAuditSuccess) {
|
|
|
- if (!groupAuditSuccess.getMusicGroupId().equals(musicGroupRegister.getMusicGroupId())) continue;
|
|
|
- musicGroupRegisterMap.put("auditSuccessTime", groupAuditSuccess.getCreateTime());
|
|
|
- }
|
|
|
- musicGroupRegisterMap.put("groupBuyMusicalNum", musicGroupRegister.getGroupBuyMusicalNum());
|
|
|
- musicGroupRegisterMap.put("registerPayNum", registerPayNum);
|
|
|
- musicGroupRegisterMap.put("totalMoney", musicGroupRegister.getTotalMoney());
|
|
|
- data.add(musicGroupRegisterMap);
|
|
|
- }
|
|
|
-
|
|
|
- OutputStream outputStream = response.getOutputStream();
|
|
|
- try {
|
|
|
- String[] headerStr = header.toArray(new String[header.size()]);
|
|
|
- String[] bodyStr = body.toArray(new String[body.size()]);
|
|
|
-
|
|
|
- HSSFWorkbook workbook = POIUtil.exportExcel(headerStr, bodyStr, data);
|
|
|
- response.setContentType("application/octet-stream");
|
|
|
- response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-
|
|
|
- outputStream = response.getOutputStream();
|
|
|
- workbook.write(outputStream);
|
|
|
- outputStream.flush();
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- } finally {
|
|
|
- if (outputStream != null) {
|
|
|
- try {
|
|
|
- outputStream.close();
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- @ApiOperation(value = "财务管理导出")
|
|
|
+/* @ApiOperation(value = "财务管理导出")
|
|
|
@RequestMapping("export/routeOrderList")
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/routeOrderList')")
|
|
|
public HttpResponseResult routeOrderList(StudentPaymentOrderQueryInfo queryInfo) throws Exception {
|
|
@@ -2108,6 +1889,107 @@ public class ExportController extends BaseController {
|
|
|
return succeed;
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "学员小课记录导出")
|
|
|
+ @RequestMapping("export/studentVipPractice")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/studentVipPractice')")
|
|
|
+ public HttpResponseResult exportStudentVipPractice(String organId) throws IOException {
|
|
|
+ Boolean hasCourse = courseScheduleStudentPaymentDao.hasCourse(organId, TenantContextHolder.getTenantId());
|
|
|
+ if (hasCourse == null || !hasCourse) {
|
|
|
+ return failed("没有可导出的数据");
|
|
|
+ }
|
|
|
+ Integer tenantId = TenantContextHolder.getTenantId();
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ Date nowDate = new Date();
|
|
|
+ String no = idGeneratorService.generatorId("download") + "";
|
|
|
+ String fileName = "studentVipPractice-" + no + "-" + DateUtil.getDate(nowDate) + ".xls";
|
|
|
+ ManagerDownload managerDownload = new ManagerDownload();
|
|
|
+ managerDownload.setType(ExportTypeEnum.STUDENT_VIP_PRACTICE);
|
|
|
+ managerDownload.setUserId(sysUser.getId());
|
|
|
+ managerDownload.setName(fileName);
|
|
|
+ managerDownload.setFileUrl("");
|
|
|
+ managerDownload.setCreateTime(nowDate);
|
|
|
+ managerDownload.setUpdateTime(nowDate);
|
|
|
+ managerDownloadDao.insert(managerDownload);
|
|
|
+ exportService.studentVipPractice(organId, managerDownload, tenantId);
|
|
|
+ HttpResponseResult<Object> succeed = succeed();
|
|
|
+ succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
|
|
|
+ return succeed;
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "订单列表导出")
|
|
|
+ @RequestMapping("export/orderList")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/orderList')")
|
|
|
+ public HttpResponseResult orderList(StudentPaymentOrderQueryInfo queryInfo) throws Exception {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if(sysUser == null || sysUser.getId() == null){
|
|
|
+ return failed(HttpStatus.FORBIDDEN, "请登录");
|
|
|
+ }
|
|
|
+ queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganId(),sysUser.getIsSuperAdmin()));
|
|
|
+ if (StringUtils.isNotBlank(queryInfo.getSearch())) {
|
|
|
+ List<BasicUserDto> users = studentPaymentOrderDao.getUsers(queryInfo.getSearch());
|
|
|
+ List<Integer> userIds = users.stream().map(BasicUserDto::getUserId).collect(Collectors.toList());
|
|
|
+ if (userIds.size() <= 0) {
|
|
|
+ userIds.add(0);
|
|
|
+ }
|
|
|
+ queryInfo.setUserIds(userIds);
|
|
|
+ }
|
|
|
+ queryInfo.setPage(1);
|
|
|
+ queryInfo.setRows(50000);
|
|
|
+ queryInfo.setIsExport(true);
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
+ MapUtil.populateMap(params, queryInfo);
|
|
|
+ int count = studentPaymentOrderDao.queryCount(params);
|
|
|
+ if (count <= 0) {
|
|
|
+ return failed("没有可导出的数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (count > 50000) {
|
|
|
+ return failed("数据集太大,不能导出.最大数据集不能超过50000");
|
|
|
+ }
|
|
|
+ Date nowDate = new Date();
|
|
|
+ String no = idGeneratorService.generatorId("download") + "";
|
|
|
+ String fileName = "orderList-" + no + "-" + DateUtil.getDate(nowDate) + ".xls";
|
|
|
+ ManagerDownload managerDownload = new ManagerDownload();
|
|
|
+ managerDownload.setType(ExportTypeEnum.ORDER);
|
|
|
+ managerDownload.setUserId(sysUser.getId());
|
|
|
+ managerDownload.setName(fileName);
|
|
|
+ managerDownload.setFileUrl("");
|
|
|
+ managerDownload.setCreateTime(nowDate);
|
|
|
+ managerDownload.setUpdateTime(nowDate);
|
|
|
+ managerDownloadDao.insert(managerDownload);
|
|
|
+ exportService.orderList(params, managerDownload, sysUser.getTenantId() <= 0);
|
|
|
+ HttpResponseResult<Object> succeed = succeed();
|
|
|
+ succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
|
|
|
+ return succeed;
|
|
|
+ }*/
|
|
|
+
|
|
|
+ @ApiOperation(value = "终课表列表导出")
|
|
|
+ @GetMapping("export/superFindCourseSchedules")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/superFindCourseSchedules')")
|
|
|
+ public HttpResponseResult superFindCourseSchedules(EndCourseScheduleQueryInfo queryInfo) throws IOException {
|
|
|
+ queryInfo.setPage(1);
|
|
|
+ queryInfo.setRows(49999);
|
|
|
+ queryInfo.setIsExport(true);
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ throw new BizException("用户信息获取失败");
|
|
|
+ }
|
|
|
+ queryInfo.setOrganIdList(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganIdList(),sysUser.getIsSuperAdmin()));
|
|
|
+ Map<String, Object> params = new HashMap<>();
|
|
|
+ MapUtil.populateMap(params, queryInfo);
|
|
|
+ int count = scheduleService.endCountCourseSchedules(params);
|
|
|
+ if (count <= 0) {
|
|
|
+ return failed("没有可导出的数据");
|
|
|
+ }
|
|
|
+ if (count > 50000) {
|
|
|
+ return failed("数据集太大,不能导出.最大数据集不能超过50000");
|
|
|
+ }
|
|
|
+ ManagerDownload managerDownload = exportService.saveManagerDownload(ExportTypeEnum.COURSE_SCHEDULE,sysUser.getId());
|
|
|
+ exportService.superFindCourseSchedules(queryInfo, managerDownload);
|
|
|
+ HttpResponseResult<Object> succeed = succeed();
|
|
|
+ succeed.setMsg(managerDownload.getName() + "导出申请已提交,请到【报表中心-下载列表查看】");
|
|
|
+ return succeed;
|
|
|
+ }
|
|
|
|
|
|
@ApiOperation(value = "老师默认课酬导出")
|
|
|
@RequestMapping("export/teacherDefaultSalary")
|
|
@@ -2153,94 +2035,6 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- @ApiOperation(value = "乐团声部在读人数导出")
|
|
|
- @RequestMapping("export/musicGroupNormalStudentNum")
|
|
|
- @PreAuthorize("@pcs.hasPermissions('export/musicGroupNormalStudentNum')")
|
|
|
- public void musicGroupNormalStudentNum(String organIds, HttpServletResponse response) throws IOException {
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- organIds = organizationService.getEmployeeOrgan(sysUser.getId(),organIds,sysUser.getIsSuperAdmin());
|
|
|
-
|
|
|
- List<MusicGroupStatusEnum> musicGroupStatusList = new ArrayList<>();
|
|
|
- musicGroupStatusList.add(MusicGroupStatusEnum.PAY);
|
|
|
- musicGroupStatusList.add(MusicGroupStatusEnum.PREPARE);
|
|
|
- musicGroupStatusList.add(MusicGroupStatusEnum.PROGRESS);
|
|
|
- musicGroupStatusList.add(MusicGroupStatusEnum.PAUSE);
|
|
|
- List<MusicGroupRegisterDto> musicGroupRegisters = musicGroupDao.getMusicGroupRegister(musicGroupStatusList, organIds, TenantContextHolder.getTenantId());
|
|
|
-
|
|
|
- if (musicGroupRegisters.size() <= 0) {
|
|
|
- throw new BizException("没有可导出的记录");
|
|
|
- }
|
|
|
- List<String> musicGroupIds = musicGroupRegisters.stream().map(MusicGroupRegisterDto::getMusicGroupId).collect(Collectors.toList());
|
|
|
-
|
|
|
- List<RegisterSubjectDto> registerSubjects = musicGroupDao.getRegisterSubjectNum(musicGroupIds, StudentMusicGroupStatusEnum.NORMAL, null);
|
|
|
-
|
|
|
- HashSet<Integer> added = new HashSet<>();
|
|
|
- List<String> header = new ArrayList<>();
|
|
|
- header.add("分部");
|
|
|
- header.add("乐团名称");
|
|
|
- header.add("乐团状态");
|
|
|
- header.add("在读总人数");
|
|
|
- List<String> body = new ArrayList<>();
|
|
|
- body.add("organName");
|
|
|
- body.add("musicGroupName");
|
|
|
- body.add("musicGroupStatus");
|
|
|
- body.add("normalNum");
|
|
|
- for (RegisterSubjectDto registerSubject : registerSubjects) {
|
|
|
- if (!added.contains(registerSubject.getSubjectId())) {
|
|
|
- added.add(registerSubject.getSubjectId());
|
|
|
- header.add(registerSubject.getSubjectName());
|
|
|
- body.add("subject" + registerSubject.getSubjectId());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- List<Map<String, Object>> data = new ArrayList<>();
|
|
|
- for (MusicGroupRegisterDto musicGroupRegister : musicGroupRegisters) {
|
|
|
- added.clear();
|
|
|
- HashMap<String, Object> musicGroupRegisterMap = new HashMap<>();
|
|
|
-
|
|
|
- musicGroupRegisterMap.put("organName", musicGroupRegister.getOrganName());
|
|
|
- musicGroupRegisterMap.put("musicGroupName", musicGroupRegister.getMusicGroupName());
|
|
|
- musicGroupRegisterMap.put("musicGroupStatus", musicGroupRegister.getMusicGroupStatus().getMsg());
|
|
|
- musicGroupRegisterMap.put("normalNum", musicGroupRegister.getNormalNum());
|
|
|
-
|
|
|
- for (RegisterSubjectDto registerSubject : registerSubjects) {
|
|
|
- if (registerSubject.getMusicGroupId().equals(musicGroupRegister.getMusicGroupId())) {
|
|
|
- added.add(registerSubject.getSubjectId());
|
|
|
- musicGroupRegisterMap.put("subject" + registerSubject.getSubjectId(), registerSubject.getNum());
|
|
|
- }
|
|
|
- if (!added.contains(registerSubject.getSubjectId())) {
|
|
|
- musicGroupRegisterMap.put("subject" + registerSubject.getSubjectId(), 0);
|
|
|
- }
|
|
|
- }
|
|
|
- data.add(musicGroupRegisterMap);
|
|
|
- }
|
|
|
-
|
|
|
- OutputStream outputStream = response.getOutputStream();
|
|
|
- try {
|
|
|
- String[] headerStr = header.toArray(new String[header.size()]);
|
|
|
- String[] bodyStr = body.toArray(new String[body.size()]);
|
|
|
-
|
|
|
- HSSFWorkbook workbook = POIUtil.exportExcel(headerStr, bodyStr, data);
|
|
|
- response.setContentType("application/octet-stream");
|
|
|
- response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
-
|
|
|
- outputStream = response.getOutputStream();
|
|
|
- workbook.write(outputStream);
|
|
|
- outputStream.flush();
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- } finally {
|
|
|
- if (outputStream != null) {
|
|
|
- try {
|
|
|
- outputStream.close();
|
|
|
- } catch (IOException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
@ApiOperation(value = "回款统计")
|
|
|
@RequestMapping("export/studentOrder")
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/studentOrder')")
|
|
@@ -2392,7 +2186,7 @@ public class ExportController extends BaseController {
|
|
|
if (sysUser == null) {
|
|
|
throw new BizException("用户信息获取失败");
|
|
|
}
|
|
|
- queryInfo.setOrganIds(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganIds(),sysUser.getIsSuperAdmin()));
|
|
|
+ queryInfo.setOrganId(organizationService.getEmployeeOrgan(sysUser.getId(),queryInfo.getOrganId(),sysUser.getIsSuperAdmin()));
|
|
|
queryInfo.setPage(1);
|
|
|
queryInfo.setRows(49999);
|
|
|
PageInfo<MusicArrearageStudentDto> result = musicGroupPaymentCalenderDetailService.queryArrearageStudents(queryInfo);
|
|
@@ -2402,7 +2196,8 @@ public class ExportController extends BaseController {
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
String[] header = {"学员编号", "学员姓名", "所属分部", "合作单位", "所在乐团", "乐团主管", "声部", "性别", "家长姓名", "家长联系电话", "欠费金额"};
|
|
|
- String[] body = {"userId", "studentName", "organName", "cooperationName", "musicGroupName", "eduTeacherName", "subjectName", "gender==0?'女':'男'", "parentName", "phone", "noPaymentAmount"};
|
|
|
+ String[] body = {"userId", "studentName", "organName", "cooperationName", "musicGroupName", "eduTeacherName",
|
|
|
+ "subjectName", "gender==0?'女':'男'", "parentName", "phone", "noPaymentAmount"};
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(header, body, result.getRows());
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=teacherDefaultSalary-" + DateUtil.getDate(new Date()) + ".xls");
|
|
@@ -2533,10 +2328,10 @@ public class ExportController extends BaseController {
|
|
|
try {
|
|
|
String[] header = {"分部", "基础技能班学员数量异常", "乐团巡查事项异常", "未在班级学员数", "欠费学员数",
|
|
|
"申请退团学员数", "预计课酬较低", "课程时间安排异常", "乐团巡查未计划", "乐团巡查任务未提交",
|
|
|
- "回访任务未完成", "课程考勤异常", "课程异常", "服务指标异常", "异常请假", "会员过期学员数", "总计",};
|
|
|
+ "回访任务未完成", "课程考勤异常", "课程异常", "服务指标异常", "异常请假", "会员过期学员数", "总计"};
|
|
|
String[] body = {"organName", "highClassStudentLessThanThreeNum", "musicPatrolItem", "noClassMusicGroupStudentInfo", "studentNotPayment",
|
|
|
"studentApplyForQuitMusicGroup", "teacherExpectSalaryBeLow", "courseTimeError", "inspectionItem", "inspectionItemPlan",
|
|
|
- "studentVisit", "teacherExceptionAttendance", "teacherNotAClass", "teacherServeError", "studentErrorLeave", "noMemberStudentNum", "total",};
|
|
|
+ "studentVisit", "teacherExceptionAttendance", "teacherNotAClass", "teacherServeError", "studentErrorLeave", "noMemberStudentNum", "total"};
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(header, body, result);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=teacherDefaultSalary-" + DateUtil.getDate(new Date()) + ".xls");
|
|
@@ -2807,7 +2602,7 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "分部云教练学员数据预览导出")
|
|
|
+ @ApiOperation(value = "分部云教练学员数据详情导出")
|
|
|
@RequestMapping("export/cloudStudyStudentOverView")
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/cloudStudyStudentOverView')")
|
|
|
public void cloudStudyStudentOverView(OrganCloudStudyStudentDataQueryInfo queryInfo,HttpServletResponse response) throws IOException {
|
|
@@ -2954,7 +2749,7 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "分部云教练学员训练数据导出")
|
|
|
+ @ApiOperation(value = "云教练活动统计详情")
|
|
|
@RequestMapping("export/countCloudTeacherActiveDetail")
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/countCloudTeacherActiveDetail')")
|
|
|
public void countCloudTeacherActiveDetail(CloudTeacherActiveQueryInfo queryInfo,HttpServletResponse response) throws IOException {
|
|
@@ -3011,21 +2806,18 @@ public class ExportController extends BaseController {
|
|
|
queryInfo.setRows(49999);
|
|
|
PageInfo<MusicEnlightenmentQuestionnaire> practiceGroupReviews = musicEnlightenmentQuestionnaireService.queryPage(queryInfo);
|
|
|
if (practiceGroupReviews.getTotal() <= 0) {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
return;
|
|
|
}
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
- for (MusicEnlightenmentQuestionnaire row : practiceGroupReviews.getRows()) {
|
|
|
- if(Objects.isNull(row.getSubjectName())){
|
|
|
- row.setSubjectName("无");
|
|
|
- }
|
|
|
- }
|
|
|
+// for (MusicEnlightenmentQuestionnaire row : practiceGroupReviews.getRows()) {
|
|
|
+// if(Objects.isNull(row.getSubjectName())){
|
|
|
+// row.setSubjectName("无");
|
|
|
+// }
|
|
|
+// }
|
|
|
String[] header = {"学员姓名","联系电话","年级","班级","老师推荐专业","是否在学习某件乐器","目前所学乐器","报名参加管乐团家长会了解相关情况","备注"};
|
|
|
- String[] body = {"userName","phone","currentGrade","currentClass","subjectName","musicalInstrumentsLearning?'是':'否'","musicalInstrumentsName","joinParentMeeting?'是':'否'","remark",};
|
|
|
+ String[] body = {"userName","phone","currentGrade","currentClass","subjectName == null?'无':subjectName","musicalInstrumentsLearning?'是':'否'",
|
|
|
+ "musicalInstrumentsName","joinParentMeeting?'是':'否'","remark"};
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(header, body, practiceGroupReviews.getRows());
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
@@ -3054,16 +2846,14 @@ public class ExportController extends BaseController {
|
|
|
queryInfo.setRows(49999);
|
|
|
List<TeacherServeDto> list = studentExtracurricularExercisesSituationService.queryTeacherPerformanceIndicator(queryInfo);
|
|
|
if (list.size() <= 0) {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
return;
|
|
|
}
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
String[] header = {"分部","老师编号","老师姓名","预计安排(人次)","实际安排(人次)","布置率(%)","提交人数","点评次数","点评率(%)","及时点评次数","及时点评率(%)"};
|
|
|
- String[] body = {"organName","teacherId","teacherName","expectExercisesNum","actualExercisesNum","100 * actualExercisesNum / expectExercisesNum","exercisesReplyNum","exercisesMessageNum","100 * exercisesMessageNum / exercisesReplyNum", "exercisesMessageTimelyNum","100 * exercisesMessageTimelyNum / exercisesReplyNum"};
|
|
|
+ String[] body = {"organName","teacherId","teacherName","expectExercisesNum","actualExercisesNum",
|
|
|
+ "100 * actualExercisesNum / expectExercisesNum","exercisesReplyNum","exercisesMessageNum",
|
|
|
+ "100 * exercisesMessageNum / exercisesReplyNum", "exercisesMessageTimelyNum","100 * exercisesMessageTimelyNum / exercisesReplyNum"};
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(header, body, list);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=teacherPerformanceIndicator-" + DateUtil.getDate(new Date()) + ".xls");
|