|
@@ -14,10 +14,8 @@ import com.ym.mec.common.page.PageInfo;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
import com.ym.mec.util.date.DateUtil;
|
|
|
import com.ym.mec.util.excel.POIUtil;
|
|
|
-
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
-
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
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 javax.servlet.http.HttpServletResponse;
|
|
|
-
|
|
|
import java.io.IOException;
|
|
|
import java.io.OutputStream;
|
|
|
import java.math.BigDecimal;
|
|
@@ -479,13 +476,23 @@ public class ExportController extends BaseController {
|
|
|
if (rows != null && rows.size() > 0) {
|
|
|
rows.forEach(e -> {
|
|
|
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 {
|
|
|
HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "网管课编号", "课程名称", "指导老师", "教务老师", "班级人数", "先上课单价", "线下课单价",
|
|
|
- "当前课次", "总课次", "剩余课次", "开课时间", "结束时间"}, new String[]{
|
|
|
+ "当前课次", "总课次", "剩余课次", "开课时间", "结束时间", "课程组状态", "是否续费", "备注"}, new String[]{
|
|
|
"organName", "id", "name", "teacherName", "educationalTeacherName", "studentNum", "onlineClassesUnitPrice",
|
|
|
- "offlineClassesUnitPrice", "currentClassTimes", "totalClassTimes", "subClassTimes", "coursesStartDate", "coursesExpireDate"}, rows);
|
|
|
+ "offlineClassesUnitPrice", "currentClassTimes", "totalClassTimes", "subClassTimes", "coursesStartDate", "coursesExpireDate",
|
|
|
+ "groupStatus.desc","payStatus","memo"}, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
response.flushBuffer();
|