|
@@ -14,10 +14,8 @@ import com.ym.mec.common.page.PageInfo;
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
import com.ym.mec.util.date.DateUtil;
|
|
import com.ym.mec.util.date.DateUtil;
|
|
import com.ym.mec.util.excel.POIUtil;
|
|
import com.ym.mec.util.excel.POIUtil;
|
|
-
|
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
-
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -29,7 +27,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
-
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.io.OutputStream;
|
|
import java.io.OutputStream;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
@@ -89,7 +86,6 @@ public class ExportController extends BaseController {
|
|
private TeacherCourseRewardService teacherCourseRewardService;
|
|
private TeacherCourseRewardService teacherCourseRewardService;
|
|
@Autowired
|
|
@Autowired
|
|
private DegreeRegistrationService degreeRegistrationService;
|
|
private DegreeRegistrationService degreeRegistrationService;
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private CooperationOrganService cooperationOrganService;
|
|
private CooperationOrganService cooperationOrganService;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -98,10 +94,43 @@ public class ExportController extends BaseController {
|
|
private StudentPaymentOrderDao studentPaymentOrderDao;
|
|
private StudentPaymentOrderDao studentPaymentOrderDao;
|
|
@Autowired
|
|
@Autowired
|
|
private StudentDao studentDao;
|
|
private StudentDao studentDao;
|
|
-
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private MusicGroupPaymentCalenderDetailService musicGroupPaymentCalenderDetailService;
|
|
@Autowired
|
|
@Autowired
|
|
private TeacherService teacherService;
|
|
private TeacherService teacherService;
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "乐团管理--修改--缴费设置--缴费记录导出")
|
|
|
|
+ @PostMapping("export/musicGroupPaymentCalenderDetail")
|
|
|
|
+ @PreAuthorize("@pcs.hasPermissions('export/musicGroupPaymentCalenderDetail')")
|
|
|
|
+ public void exportTeacherAttendances(HttpServletResponse response, MusicCalenderDetailQueryInfo queryInfo) throws IOException {
|
|
|
|
+ queryInfo.setPage(1);
|
|
|
|
+ queryInfo.setRows(49999);
|
|
|
|
+ List<MusicGroupPaymentCalenderDetail> rows = musicGroupPaymentCalenderDetailService.queryPage(queryInfo).getRows();
|
|
|
|
+ OutputStream outputStream = response.getOutputStream();
|
|
|
|
+ try {
|
|
|
|
+ HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"学员编号", "学员姓名", "学员声部", "学员状态", "手机号", "预计缴费金额",
|
|
|
|
+ "缴费开始日期","缴费截止日期","是否开启缴费","缴费状态","支付时间"}, new String[]{
|
|
|
|
+ "userId", "sysUser.username", "studentRegistration.subjectName", "studentRegistration.musicGroupStatus.msg", "sysUser.phone", "expectAmount",
|
|
|
|
+ "startPaymentDateMgpc", "deadlinePaymentDateMgpc", "openFlag.msg", "paymentStatus.desc", "payTime"}, rows);
|
|
|
|
+ response.setContentType("application/octet-stream");
|
|
|
|
+ response.setHeader("Content-Disposition", "attachment;filename=lender-" + 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 = "导出教师考勤列表")
|
|
@ApiOperation(value = "导出教师考勤列表")
|
|
@PostMapping("export/queryTeacherAttendances")
|
|
@PostMapping("export/queryTeacherAttendances")
|
|
@PreAuthorize("@pcs.hasPermissions('export/queryTeacherAttendances')")
|
|
@PreAuthorize("@pcs.hasPermissions('export/queryTeacherAttendances')")
|
|
@@ -445,13 +474,23 @@ public class ExportController extends BaseController {
|
|
if (rows != null && rows.size() > 0) {
|
|
if (rows != null && rows.size() > 0) {
|
|
rows.forEach(e -> {
|
|
rows.forEach(e -> {
|
|
e.setSubClassTimes(e.getTotalClassTimes() == null ? 0 : e.getTotalClassTimes() - (e.getCurrentClassTimes() == null ? 0 : e.getCurrentClassTimes()));
|
|
e.setSubClassTimes(e.getTotalClassTimes() == null ? 0 : e.getTotalClassTimes() - (e.getCurrentClassTimes() == null ? 0 : e.getCurrentClassTimes()));
|
|
|
|
+ if(e.getBuyMonths() == null || e.getBuyMonths() == 0){
|
|
|
|
+ e.setPayStatus("免费");
|
|
|
|
+ }else {
|
|
|
|
+ if(e.getBeRenewGroupId() == null || e.getBeRenewGroupId() == 0l){
|
|
|
|
+ e.setPayStatus("首充");
|
|
|
|
+ }else {
|
|
|
|
+ e.setPayStatus("续费");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
});
|
|
});
|
|
}
|
|
}
|
|
try {
|
|
try {
|
|
- HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "网管课编号", "课程名称", "指导老师", "教务老师", "班级人数", "先上课单价", "线下课单价",
|
|
|
|
- "当前课次", "总课次", "剩余课次", "开课时间", "结束时间"}, new String[]{
|
|
|
|
- "organName", "id", "name", "teacherName", "educationalTeacherName", "studentNum", "onlineClassesUnitPrice",
|
|
|
|
- "offlineClassesUnitPrice", "currentClassTimes", "totalClassTimes", "subClassTimes", "coursesStartDate", "coursesExpireDate"}, rows);
|
|
|
|
|
|
+ HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{ "课程组编号","课程组名称", "课程组类型","分部", "教务老师", "指导老师", "班级人数",
|
|
|
|
+ "当前课次", "总课次", "剩余课次", "开课时间", "结束时间", "课程组状态", "是否续费", "备注"}, new String[]{
|
|
|
|
+ "id","name","type.msg","organName", "educationalTeacherName", "teacherName", "studentNum","currentClassTimes",
|
|
|
|
+ "totalClassTimes", "subClassTimes", "coursesStartDate", "coursesExpireDate",
|
|
|
|
+ "groupStatus.desc","payStatus","memo"}, rows);
|
|
response.setContentType("application/octet-stream");
|
|
response.setContentType("application/octet-stream");
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
response.flushBuffer();
|
|
response.flushBuffer();
|