|
@@ -144,89 +144,22 @@ public class ExportController extends BaseController {
|
|
|
@Autowired
|
|
|
private MusicEnlightenmentQuestionnaireService musicEnlightenmentQuestionnaireService;
|
|
|
|
|
|
- @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("/organDoubleEleven2021Statis")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/organDoubleEleven2021Statis')")
|
|
|
+ public void organDoubleEleven2021Statis(String order, String sort,HttpServletResponse response) throws IOException {
|
|
|
+ List<DoubleEleven2021Dto> rows = vipGroupActivityService.organDoubleEleven2021Statis(order, sort);
|
|
|
if(rows.size() < 1){
|
|
|
- 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);
|
|
|
- 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 = "21年暑期考级活动统计页面详情导出")
|
|
|
- @PostMapping("export/statisticsDetailPage")
|
|
|
- @PreAuthorize("@pcs.hasPermissions('export/statisticsDetailPage')")
|
|
|
- public void statisticsDetailPage(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("非法请求");
|
|
|
- }
|
|
|
+ throw new BizException("没有可导出数据");
|
|
|
}
|
|
|
- queryInfo.setPage(1);
|
|
|
- queryInfo.setRows(49999);
|
|
|
- List<ChildrenStatisticsDetailDto> rows = childrenDayReserveService.queryStatisticsDetailPage(queryInfo).getRows();
|
|
|
- if(rows.size() < 1){
|
|
|
- throw new BizException("没有可导出数据");
|
|
|
- }
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
- HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"学员姓名", "学员编号", "手机号", "是否预约","报考器乐", "器乐报考等级", "乐理报考等级", "是否购买VIP",
|
|
|
- "是否购买乐理课", "支付金额"}, new String[]{
|
|
|
- "username", "userId", "phone", "isReserve == true ?'是':'否'","subjectName"
|
|
|
- ,"theoryLevel","gradeLeave","buyVipFlag","buyTheoryCourseFlag","totalAmount"}, 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");
|
|
@@ -247,10 +180,10 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "21年暑期考级活动统计页面导出")
|
|
|
- @PostMapping("export/statisticsPage")
|
|
|
- @PreAuthorize("@pcs.hasPermissions('export/statisticsPage')")
|
|
|
- public void statisticsPage(HttpServletResponse response, ChildrenReserveQueryInfo 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("用户信息获取失败");
|
|
@@ -268,16 +201,16 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
queryInfo.setPage(1);
|
|
|
queryInfo.setRows(49999);
|
|
|
- List<ChildrenStatisticsDto> rows = childrenDayReserveService.queryStatisticsPage(queryInfo).getRows();
|
|
|
+ List<ChildrenStatisticsDetailDto> rows = childrenDayReserveService.exportStatisticsDetail(queryInfo);
|
|
|
if(rows.size() < 1){
|
|
|
throw new BizException("没有可导出数据");
|
|
|
}
|
|
|
OutputStream outputStream = response.getOutputStream();
|
|
|
try {
|
|
|
- HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部名称", "合作单位", "乐团名称", "在读人数",
|
|
|
- "预约人数", "未预约人数", "器乐考级人数", "乐理考级人数", "VIP课购买人数", "VIP课成交金额", "乐理课购买人数", "乐理课成交金额"}, new String[]{
|
|
|
- "organName", "cooperationOrganName", "musicGroupName", "normalNum",
|
|
|
- "reserveNum", "noReserveNum", "instrumentalMusicNum", "musicTheoryNum","buyVip1Num","buyVip1Amount","buyVip2Num","buyVip2Amount","buyMusicTheoryNum","buyMusicTheoryAmount"}, 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");
|
|
@@ -297,7 +230,6 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-*/
|
|
|
|
|
|
@ApiOperation(value = "学生个人账户余额导出")
|
|
|
@PostMapping("export/userCashAccountDetail")
|