|
|
@@ -145,9 +145,62 @@ 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 {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ throw new BizException("用户信息获取失败");
|
|
|
+ }
|
|
|
+ Employee employee = employeeDao.get(sysUser.getId());
|
|
|
+ if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
+ queryInfo.setOrganId(employee.getOrganIdList());
|
|
|
+ }else if(StringUtils.isEmpty(employee.getOrganIdList())){
|
|
|
+ throw new BizException("用户所在分部异常");
|
|
|
+ }else {
|
|
|
+ List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
|
|
|
+ if(!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))){
|
|
|
+ throw new BizException("非法请求");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ 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");
|
|
|
+ response.flushBuffer();
|
|
|
+ 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/musicGroup")
|
|
|
+ @PostMapping("export/musicGroup")
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/musicGroup')")
|
|
|
public void exportMusicGroup(HttpServletResponse response, MusicGroupQueryInfo queryInfo) throws IOException {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
@@ -174,7 +227,7 @@ public class ExportController extends BaseController {
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "乐团编号", "乐团名称","合作单位", "乐团状态",
|
|
|
- "收费模式","收费类型","乐团主管","运营主管","成团人数", "在读人数", "申请时间", "成团时间", "清单状态"}, new String[]{
|
|
|
+ "收费模式","收费类型","乐团主管","成团人数", "在读人数", "申请时间", "成团时间", "清单状态"}, new String[]{
|
|
|
"organName", "id", "name","cooperationOrganName", "status.msg", "courseViewType.msg","chargeTypeName",
|
|
|
"educationalTeacherName", "teamTeacherName", "groupMemberNum","payNum"
|
|
|
,"createTime","updateTime","hasVerifyMusicalList?'已确认':'未确认'"}, rows);
|
|
|
@@ -198,22 +251,37 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "2021双十一学员购买详情")
|
|
|
- @RequestMapping("export/doubleEleven2021OrderDetail")
|
|
|
- @PreAuthorize("@pcs.hasPermissions('export/doubleEleven2021OrderDetail')")
|
|
|
- public void doubleEleven2021OrderDetail(HttpServletResponse response,DoubleEleven2021QueryInfo queryInfo) throws IOException {
|
|
|
+ @ApiOperation(value = "21年暑期考级活动统计页面详情导出")
|
|
|
+ @PostMapping("export/statisticsDetail")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/statisticsDetail')")
|
|
|
+ public void statisticsDetail(HttpServletResponse response, ChildrenReserveQueryInfo queryInfo) throws IOException {
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ throw new BizException("用户信息获取失败");
|
|
|
+ }
|
|
|
+ Employee employee = employeeDao.get(sysUser.getId());
|
|
|
+ if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
+ queryInfo.setOrganId(employee.getOrganIdList());
|
|
|
+ }else if(StringUtils.isEmpty(employee.getOrganIdList())){
|
|
|
+ throw new BizException("用户所在分部异常");
|
|
|
+ }else {
|
|
|
+ List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
|
|
|
+ if(!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))){
|
|
|
+ throw new BizException("非法请求");
|
|
|
+ }
|
|
|
+ }
|
|
|
queryInfo.setPage(1);
|
|
|
queryInfo.setRows(49999);
|
|
|
- List<DoubleEleven2021OrderDetailDto> rows = vipGroupActivityService.doubleEleven2021OrderDetail(queryInfo).getRows();
|
|
|
+ List<ChildrenStatisticsDetailDto> rows = childrenDayReserveService.exportStatisticsDetail(queryInfo);
|
|
|
if(rows.size() < 1){
|
|
|
- throw new BizException("没有可导出数据");
|
|
|
- }
|
|
|
+ throw new BizException("没有可导出数据");
|
|
|
+ }
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
- HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"学员编号", "学员姓名","订单号", "交易金额",
|
|
|
- "交易时间", "订单创建时间", "购买课程", "赠送会员"}, new String[]{
|
|
|
- "userId", "username", "orderNo","amount", "payTime", "createTime","type",
|
|
|
- "giveMember==0?'否':'是'"}, rows);
|
|
|
+ HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "合作单位", "乐团","学员编号", "学员姓名", "手机号","声部","所在班级","指导老师", "是否预约", "器乐等级", "乐理等级", "是否购买VIP","是否购买乐理课"}, new String[]{
|
|
|
+ "organName", "cooperationOrganName", "musicGroupName","userId", "username", "phone","subjectName",
|
|
|
+ "currentClass", "realName", "isReserve == true ?'是':'否'","gradeLeave"
|
|
|
+ ,"theoryLevel","buyVipFlag == true ?'是':'否'","buyTheoryCourseFlag == true ?'是':'否'"}, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
"hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
@@ -234,22 +302,22 @@ 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);
|
|
|
+ @ApiOperation(value = "2021双十一学员购买详情")
|
|
|
+ @RequestMapping("export/doubleEleven2021OrderDetail")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/doubleEleven2021OrderDetail')")
|
|
|
+ public void doubleEleven2021OrderDetail(HttpServletResponse response,DoubleEleven2021QueryInfo queryInfo) throws IOException {
|
|
|
+ queryInfo.setPage(1);
|
|
|
+ queryInfo.setRows(49999);
|
|
|
+ List<DoubleEleven2021OrderDetailDto> rows = vipGroupActivityService.doubleEleven2021OrderDetail(queryInfo).getRows();
|
|
|
if(rows.size() < 1){
|
|
|
throw new BizException("没有可导出数据");
|
|
|
}
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
- HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "总成交金额","总购买人数", "人均购买金额",
|
|
|
- "20节1v1成交金额", "20节1v1成交人数", "40节1v1成交金额", "40节1v1成交人数", "20节1v2成交金额", "20节1v2成交人数",
|
|
|
- "40节1v2成交金额", "40节1v2成交人数", "乐理课成交金额", "乐理课成交人数", "赠送会员人数"}, new String[]{
|
|
|
- "organName", "totalBuyAmount", "totalBuyNum","avgBuyAmount", "vip1V120Amount", "vip1V120Num","vip1V140Amount",
|
|
|
- "vip1V140Num", "vip1V220Amount", "vip1V220Num","vip1V240Amount"
|
|
|
- ,"vip1V240Num","musicTheoryAmount","musicTheoryNum","giveMemberNum"}, rows);
|
|
|
+ HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"学员编号", "学员姓名","订单号", "交易金额",
|
|
|
+ "交易时间", "订单创建时间", "购买课程", "赠送会员"}, new String[]{
|
|
|
+ "userId", "username", "orderNo","amount", "payTime", "createTime","type",
|
|
|
+ "giveMember==0?'否':'是'"}, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
"hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
@@ -270,37 +338,22 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "21年暑期考级活动统计页面详情导出")
|
|
|
- @PostMapping("export/statisticsDetail")
|
|
|
- @PreAuthorize("@pcs.hasPermissions('export/statisticsDetail')")
|
|
|
- public void statisticsDetail(HttpServletResponse response, ChildrenReserveQueryInfo queryInfo) throws IOException {
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- if (sysUser == null) {
|
|
|
- throw new BizException("用户信息获取失败");
|
|
|
- }
|
|
|
- Employee employee = employeeDao.get(sysUser.getId());
|
|
|
- if (StringUtils.isEmpty(queryInfo.getOrganId())) {
|
|
|
- queryInfo.setOrganId(employee.getOrganIdList());
|
|
|
- }else if(StringUtils.isEmpty(employee.getOrganIdList())){
|
|
|
- throw new BizException("用户所在分部异常");
|
|
|
- }else {
|
|
|
- List<String> list = Arrays.asList(employee.getOrganIdList().split(","));
|
|
|
- if(!list.containsAll(Arrays.asList(queryInfo.getOrganId().split(",")))){
|
|
|
- throw new BizException("非法请求");
|
|
|
- }
|
|
|
- }
|
|
|
- queryInfo.setPage(1);
|
|
|
- queryInfo.setRows(49999);
|
|
|
- List<ChildrenStatisticsDetailDto> rows = childrenDayReserveService.exportStatisticsDetail(queryInfo);
|
|
|
+ @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);
|
|
|
if(rows.size() < 1){
|
|
|
- throw new BizException("没有可导出数据");
|
|
|
- }
|
|
|
+ throw new BizException("没有可导出数据");
|
|
|
+ }
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
- HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "合作单位", "乐团","学员编号", "学员姓名", "手机号","声部","所在班级","指导老师", "是否预约", "器乐等级", "乐理等级", "是否购买VIP","是否购买乐理课"}, new String[]{
|
|
|
- "organName", "cooperationOrganName", "musicGroupName","userId", "username", "phone","subjectName",
|
|
|
- "currentClass", "realName", "isReserve == true ?'是':'否'","gradeLeave"
|
|
|
- ,"theoryLevel","buyVipFlag == true ?'是':'否'","buyTheoryCourseFlag == true ?'是':'否'"}, rows);
|
|
|
+ HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "总成交金额","总购买人数", "人均购买金额",
|
|
|
+ "20节1v1成交金额", "20节1v1成交人数", "40节1v1成交金额", "40节1v1成交人数", "20节1v2成交金额", "20节1v2成交人数",
|
|
|
+ "40节1v2成交金额", "40节1v2成交人数", "乐理课成交金额", "乐理课成交人数", "赠送会员人数"}, new String[]{
|
|
|
+ "organName", "totalBuyAmount", "totalBuyNum","avgBuyAmount", "vip1V120Amount", "vip1V120Num","vip1V140Amount",
|
|
|
+ "vip1V140Num", "vip1V220Amount", "vip1V220Num","vip1V240Amount"
|
|
|
+ ,"vip1V240Num","musicTheoryAmount","musicTheoryNum","giveMemberNum"}, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attac:wq" +
|
|
|
"hment;filename=classGroup-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
@@ -1185,7 +1238,9 @@ public class ExportController extends BaseController {
|
|
|
managerDownload.setUpdateTime(nowDate);
|
|
|
managerDownloadDao.insert(managerDownload);
|
|
|
exportService.superFindCourseSchedules(queryInfo, managerDownload);
|
|
|
- return succeed(fileName+"导出申请已提交,请到【报表中心-下载列表查看】");
|
|
|
+ HttpResponseResult<Object> succeed = succeed();
|
|
|
+ succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
|
|
|
+ return succeed;
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1439,7 +1494,36 @@ public class ExportController extends BaseController {
|
|
|
managerDownload.setUpdateTime(nowDate);
|
|
|
managerDownloadDao.insert(managerDownload);
|
|
|
exportService.orderList(params, managerDownload);
|
|
|
- return succeed(fileName+"导出申请已提交,请到【报表中心-下载列表查看】");
|
|
|
+ HttpResponseResult<Object> succeed = succeed();
|
|
|
+ succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
|
|
|
+ return succeed;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "学员小课记录导出")
|
|
|
+ @RequestMapping("export/studentVipPractice")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/studentVipPractice')")
|
|
|
+ public HttpResponseResult exportStudentVipPractice(Integer organId) throws IOException {
|
|
|
+ boolean hasCourse = courseScheduleStudentPaymentDao.hasCourse(organId);
|
|
|
+ if (!hasCourse) {
|
|
|
+ return failed("没有可导出的数据");
|
|
|
+ }
|
|
|
+ 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);
|
|
|
+ HttpResponseResult<Object> succeed = succeed();
|
|
|
+ succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
|
|
|
+ return succeed;
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -2394,7 +2478,9 @@ public class ExportController extends BaseController {
|
|
|
managerDownload.setUpdateTime(nowDate);
|
|
|
managerDownloadDao.insert(managerDownload);
|
|
|
exportService.routeOrderList(params, managerDownload);
|
|
|
- return succeed(fileName+"导出申请已提交,请到【报表中心-下载列表查看】");
|
|
|
+ HttpResponseResult<Object> succeed = succeed();
|
|
|
+ succeed.setMsg(fileName + "导出申请已提交,请到【报表中心-下载列表查看】");
|
|
|
+ return succeed;
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -2918,10 +3004,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", "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");
|