|
@@ -11,7 +11,6 @@ import com.ym.mec.biz.dal.entity.*;
|
|
|
import com.ym.mec.biz.dal.enums.GroupType;
|
|
|
import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
|
|
|
import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
|
|
|
-import com.ym.mec.biz.dal.enums.OrderTypeEnum;
|
|
|
import com.ym.mec.biz.dal.page.*;
|
|
|
import com.ym.mec.biz.service.*;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
@@ -65,6 +64,8 @@ public class ExportController extends BaseController {
|
|
|
private VipGroupService vipGroupService;
|
|
|
@Autowired
|
|
|
private CourseScheduleService scheduleService;
|
|
|
+ @Autowired
|
|
|
+ private SporadicChargeInfoService sporadicChargeInfoService;
|
|
|
|
|
|
|
|
|
|
|
@@ -112,8 +113,7 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- @ApiOperation(value = "终极课表获取")
|
|
|
+ @ApiOperation(value = "终课表列表导出")
|
|
|
@GetMapping("export/superFindCourseSchedules")
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/superFindCourseSchedules')")
|
|
|
public void superFindCourseSchedules(EndCourseScheduleQueryInfo queryInfo,HttpServletResponse response){
|
|
@@ -152,6 +152,43 @@ public class ExportController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @ApiOperation(value = "导出零星收费列表")
|
|
|
+ @GetMapping("export/sporadicChargeInfo")
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/sporadicChargeInfo')")
|
|
|
+ public void queryPage(SporadicChargeInfoQueryInfo queryInfo,HttpServletResponse response) {
|
|
|
+ queryInfo.setRows(999999999);
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
+ if (sysUser == null) {
|
|
|
+ throw new BizException("用户信息获取失败");
|
|
|
+ }
|
|
|
+ if(!sysUser.getIsSuperAdmin()){
|
|
|
+ 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("非法请求");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ List<SporadicChargeInfo> rows = sporadicChargeInfoService.queryDetailPage(queryInfo).getRows();
|
|
|
+ try {
|
|
|
+ HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "收费类型", "标题", "金额", "时间", "学生姓名","创建人"}, new String[]{
|
|
|
+ "organName", "chargeType.msg", "title", "amount", "updateTime", "userName","operatorName"}, rows);
|
|
|
+ response.setContentType("application/octet-stream");
|
|
|
+ response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
+ response.flushBuffer();
|
|
|
+ workbook.write(response.getOutputStream());
|
|
|
+ workbook.close();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "导出学员是否有课")
|
|
|
@PostMapping("export/studentHasCourse")
|
|
|
@PreAuthorize("@pcs.hasPermissions('export/studentHasCourse')")
|