Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

zouxuan 4 лет назад
Родитель
Сommit
7629f20682

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

@@ -72,6 +72,46 @@ public class MusicGroupStudentsDto{
     @ApiModelProperty(value = "欠费金额",required = false)
     private BigDecimal noPaymentAmount;
 
+    @ApiModelProperty(value = "关心包:0:默认不可用;1:可用;2:已使用;")
+    private Integer carePackage;
+    private String carePackageStr;
+
+    @ApiModelProperty(value = "加油包:0:默认不可用;1:可用;2:已使用;")
+    private Integer comeOnPackage;
+    private String comeOnPackageStr;
+
+    public String getCarePackageStr() {
+        return carePackageStr;
+    }
+
+    public void setCarePackageStr(String carePackageStr) {
+        this.carePackageStr = carePackageStr;
+    }
+
+    public String getComeOnPackageStr() {
+        return comeOnPackageStr;
+    }
+
+    public void setComeOnPackageStr(String comeOnPackageStr) {
+        this.comeOnPackageStr = comeOnPackageStr;
+    }
+
+    public Integer getCarePackage() {
+        return carePackage;
+    }
+
+    public void setCarePackage(Integer carePackage) {
+        this.carePackage = carePackage;
+    }
+
+    public Integer getComeOnPackage() {
+        return comeOnPackage;
+    }
+
+    public void setComeOnPackage(Integer comeOnPackage) {
+        this.comeOnPackage = comeOnPackage;
+    }
+
     public Boolean getHasCourse() {
         return hasCourse;
     }

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/MusicGroupStudentQueryInfo.java

@@ -35,6 +35,12 @@ public class MusicGroupStudentQueryInfo extends QueryInfo {
   @ApiModelProperty(value = "缴费状态  PAID_COMPLETED(完成缴费), NON_PAYMENT(未缴费), PROCESSING(缴费中)",required = false)
   private String paymentStatus;
 
+  @ApiModelProperty(value = "关心包:0:默认不可用;1:可用;2:已使用;")
+  private Integer carePackage;
+
+  @ApiModelProperty(value = "加油包:0:默认不可用;1:可用;2:已使用;")
+  private Integer comeOnPackage;
+
   private boolean isExport = false;
 
   public Boolean getOweFlag() {
@@ -45,6 +51,22 @@ public class MusicGroupStudentQueryInfo extends QueryInfo {
     this.oweFlag = oweFlag;
   }
 
+  public Integer getCarePackage() {
+    return carePackage;
+  }
+
+  public void setCarePackage(Integer carePackage) {
+    this.carePackage = carePackage;
+  }
+
+  public Integer getComeOnPackage() {
+    return comeOnPackage;
+  }
+
+  public void setComeOnPackage(Integer comeOnPackage) {
+    this.comeOnPackage = comeOnPackage;
+  }
+
   public Boolean getHasCourse() {
     return hasCourse;
   }

+ 16 - 1
mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml

@@ -461,6 +461,12 @@
             <if test="isActive != null and isActive == false">
                 and su.password_ is null
             </if>
+            <if test="carePackage != null">
+                AND stu.care_package_ = #{carePackage}
+            </if>
+            <if test="comeOnPackage != null">
+                AND stu.come_on_package_ = #{comeOnPackage}
+            </if>
             <if test="userIds != null">
                 AND sr.user_id_ IN
                 <foreach collection="userIds" open="(" close=")" item="item" separator=",">
@@ -487,12 +493,15 @@
         <result property="isActive" column="isActive_"/>
         <result property="isLock" column="is_lock_"/>
         <result property="paymentPeriodList" column="payment_period_list_"/>
+        <result column="care_package_" property="carePackage"/>
+        <result column="come_on_package_" property="comeOnPackage"/>
     </resultMap>
     <select id="queryMusicGroupStudent" resultMap="MusicGroupStudentsDto">
         SELECT sr.user_id_,su.username_ real_name_,su.gender_,su.phone_ parents_phone_,sr.current_grade_,sr.current_grade_date_,
         sr.current_class_,sr.music_group_status_ student_status_,CASE WHEN sr.payment_status_ = 2 THEN 1 ELSE 0 END payment_status_,
         s.name_ subject_name_,sr.music_group_id_,case when su.password_ is null then 0 else 1 end isActive_,
-        IF(DATE_FORMAT(sr.create_time_,'%Y-%m-%d') > DATE_FORMAT(mg.payment_expire_date_,'%Y-%m-%d'),1,0) is_new_student_
+        IF(DATE_FORMAT(sr.create_time_,'%Y-%m-%d') > DATE_FORMAT(mg.payment_expire_date_,'%Y-%m-%d'),1,0) is_new_student_,
+        stu.care_package_,stu.come_on_package_
         FROM student_registration sr
         LEFT JOIN sys_user su ON sr.user_id_ = su.id_
         LEFT JOIN `subject` s ON s.id_ = sr.actual_subject_id_
@@ -500,6 +509,9 @@
         <if test="classGroupId != null">
             LEFT JOIN class_group_student_mapper cgsm ON cgsm.music_group_id_ = sr.music_group_id_
         </if>
+        <if test="carePackage != null or comeOnPackage != null">
+            LEFT JOIN student stu ON sr.user_id_ = stu.user_id_
+        </if>
         <include refid="queryMusicGroupStudentSql"/>
         ORDER BY sr.id_ DESC
         <include refid="global.limit"/>
@@ -514,6 +526,9 @@
         <if test="classGroupId != null">
             LEFT JOIN class_group_student_mapper cgsm ON cgsm.music_group_id_ = sr.music_group_id_
         </if>
+        <if test="carePackage != null or comeOnPackage != null">
+            LEFT JOIN student stu ON sr.user_id_ = stu.user_id_
+        </if>
         <include refid="queryMusicGroupStudentSql"/>
     </select>
 

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

@@ -1290,11 +1290,26 @@ public class ExportController extends BaseController {
                 if (row.getNextPaymentDate() != null) {
                     row.setNextPaymentDateStr(DateUtil.format(row.getNextPaymentDate(), DateUtil.DEFAULT_PATTERN));
                 }
+                if(Objects.isNull(row.getCarePackage())||row.getCarePackage().equals(0)){
+                    row.setCarePackageStr("不可用");
+                }else if(row.getCarePackage().equals(1)){
+                    row.setCarePackageStr("可用");
+                }else if(row.getCarePackage().equals(2)){
+                    row.setCarePackageStr("已使用");
+                }
+                if(Objects.isNull(row.getComeOnPackage())||row.getComeOnPackage().equals(0)){
+                    row.setComeOnPackageStr("不可用");
+                }else if(row.getComeOnPackage().equals(1)){
+                    row.setComeOnPackageStr("可用");
+                }else if(row.getComeOnPackage().equals(2)){
+                    row.setComeOnPackageStr("已使用");
+                }
             }
             String[] header = {"学员编号", "学员姓名", "性别", "联系电话", "年级", "班级", "专业", "学员状态", "新增学员", "缴费金额",
-                        "下次缴费日期", "是否报名缴费", "是否激活", "是否有剩余VIP", "是否有剩余网管课", "欠费总额"};
+                        "下次缴费日期", "是否报名缴费", "是否激活", "是否有剩余VIP", "是否有剩余网管课", "欠费总额", "关心包", "加油包"};
             String[] body = {"userId", "realName", "gender", "phone", "currentGrade", "currentClass", "subjectName", "studentStatus", "isNewStudentStr",
-                    "courseFee", "nextPaymentDateStr", "paymentStatus.desc", "activeName", "hasVip ? '是' : '否'", "hasPractice ? '是' : '否'","noPaymentAmount"};
+                    "courseFee", "nextPaymentDateStr", "paymentStatus.desc", "activeName", "hasVip ? '是' : '否'", "hasPractice ? '是' : '否'","noPaymentAmount",
+                    "carePackageStr", "comeOnPackageStr"};
             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, musicGroupStudentsDtoPageInfo.getRows());
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/controller/education/EduPracticeGroupController.java

@@ -23,6 +23,7 @@ import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
+import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 
 import java.time.LocalDate;
@@ -129,6 +130,13 @@ public class EduPracticeGroupController extends BaseController {
                     iterator.remove();
                 }
             }
+            Iterator<Map.Entry<Integer, List<String>>> iterator = weekNumApplyTimesMap.entrySet().iterator();
+            while (iterator.hasNext()) {
+                Map.Entry<Integer, List<String>> next = iterator.next();
+                if (CollectionUtils.isEmpty(next.getValue())) {
+                    iterator.remove();
+                }
+            }
         }
         return succeed(payPracticeTeacherFreeTimes);
     }