Browse Source

乐团学员列表增加导出功能

周箭河 5 years ago
parent
commit
c044e18046

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupStudentsDto.java

@@ -53,6 +53,8 @@ public class MusicGroupStudentsDto{
 
 
     private String isNewStudentStr;
     private String isNewStudentStr;
 
 
+    private String nextPaymentDateStr;
+
     public Boolean getIsActive() {
     public Boolean getIsActive() {
         return isActive;
         return isActive;
     }
     }
@@ -180,4 +182,12 @@ public class MusicGroupStudentsDto{
     public void setIsNewStudentStr(String isNewStudentStr) {
     public void setIsNewStudentStr(String isNewStudentStr) {
         this.isNewStudentStr = isNewStudentStr;
         this.isNewStudentStr = isNewStudentStr;
     }
     }
+
+    public String getNextPaymentDateStr() {
+        return nextPaymentDateStr;
+    }
+
+    public void setNextPaymentDateStr(String nextPaymentDateStr) {
+        this.nextPaymentDateStr = nextPaymentDateStr;
+    }
 }
 }

+ 3 - 3
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -27,7 +27,6 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.stereotype.Controller;
 import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 
@@ -301,12 +300,13 @@ public class ExportController extends BaseController {
                 }else {
                 }else {
                     row.setIsNewStudentStr("否");
                     row.setIsNewStudentStr("否");
                 }
                 }
+                row.setNextPaymentDateStr(DateUtil.format(row.getNextPaymentDate(), DateUtil.DEFAULT_PATTERN));
                 row.setCurrentGrade(row.getCurrentGrade() + row.getCurrentClass());
                 row.setCurrentGrade(row.getCurrentGrade() + row.getCurrentClass());
             }
             }
-            String[] header = {"学员编号","学姓名", "性别", "联系电话", "年级班级", "专业", "学员状态", "新增学员", "缴费金额",
+            String[] header = {"学员编号","学姓名", "性别", "联系电话", "年级班级", "专业", "学员状态", "新增学员", "缴费金额",
                     "下次缴费日期", "报名缴费", "是否激活"};
                     "下次缴费日期", "报名缴费", "是否激活"};
             String[] body = {"userId","realName", "gender", "phone", "currentGrade", "subjectName", "studentStatus", "isNewStudentStr",
             String[] body = {"userId","realName", "gender", "phone", "currentGrade", "subjectName", "studentStatus", "isNewStudentStr",
-                    "courseFee", "nextPaymentDate","paymentStatus", "activeName"};
+                    "courseFee", "nextPaymentDateStr","paymentStatus", "activeName"};
             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, musicGroupStudentsDtoPageInfo.getRows());
             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, musicGroupStudentsDtoPageInfo.getRows());
             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");