Browse Source

Merge remote-tracking branch 'origin/master'

周箭河 5 years ago
parent
commit
a48862f124

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

@@ -32,6 +32,16 @@ public class PracticeGroupDto extends PracticeGroup {
 
     private String educationalTeacherName;
 
+    private String payStatus;
+
+    public String getPayStatus() {
+        return payStatus;
+    }
+
+    public void setPayStatus(String payStatus) {
+        this.payStatus = payStatus;
+    }
+
     public Integer getHasRestClass() {
         return hasRestClass;
     }

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PracticeGroupServiceImpl.java

@@ -2187,6 +2187,16 @@ public class PracticeGroupServiceImpl extends BaseServiceImpl<Long, PracticeGrou
                     Long aLong1 = currentClassTimeMap.get(e.getId() + "");
                     e.setCurrentClassTimes(aLong1 == null ? 0 : aLong1.intValue());
                     e.setEducationalTeacherName(idNameMap.get(e.getEducationalTeacherId()));
+                    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("续费");
+                        }
+                    }
                 }
             }
         }

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

@@ -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();