|
|
@@ -0,0 +1,160 @@
|
|
|
+package com.zhongzheng.modules.grade.vo;
|
|
|
+
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
+import com.zhongzheng.common.annotation.Excel;
|
|
|
+import com.zhongzheng.modules.user.vo.UserUpdateVo;
|
|
|
+import io.swagger.annotations.ApiModel;
|
|
|
+import io.swagger.annotations.ApiModelProperty;
|
|
|
+import lombok.Data;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
+
|
|
|
+import javax.xml.validation.Validator;
|
|
|
+import java.io.Serializable;
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 班级学员导出对象 mall_package
|
|
|
+ *
|
|
|
+ * @author yangdamao
|
|
|
+ * @date 2021-11-10
|
|
|
+ */
|
|
|
+@Data
|
|
|
+@ApiModel("班级学员导出对象")
|
|
|
+public class ClassStudentExportVo implements Serializable {
|
|
|
+
|
|
|
+ @Excel(name = "学员编码")
|
|
|
+ @ApiModelProperty("学员编码")
|
|
|
+ private String studentCode;
|
|
|
+
|
|
|
+ @Excel(name = "学员姓名")
|
|
|
+ @ApiModelProperty("学员姓名")
|
|
|
+ private String realname;
|
|
|
+
|
|
|
+ @Excel(name = "学员身份证")
|
|
|
+ @ApiModelProperty("学员身份证")
|
|
|
+ private String idCard;
|
|
|
+
|
|
|
+ @Excel(name = "绑定手机号码")
|
|
|
+ @ApiModelProperty("绑定手机号码")
|
|
|
+ private String telPhone;
|
|
|
+
|
|
|
+ @ApiModelProperty("资料是否变更过 1变更 0未变更")
|
|
|
+ private Integer userStatus;
|
|
|
+
|
|
|
+ @Excel(name = "资料是否变更过")
|
|
|
+ private String userStatusStr;
|
|
|
+
|
|
|
+ @ApiModelProperty("用户是否绑定微信")
|
|
|
+ private Integer userBindWx;
|
|
|
+
|
|
|
+ @Excel(name = "是否绑定小程序账号")
|
|
|
+ private String userBindWxStr;
|
|
|
+
|
|
|
+ @ApiModelProperty("用户是否关注微信")
|
|
|
+ private Integer userFollowWx;
|
|
|
+
|
|
|
+ @Excel(name = "是否关注公众号")
|
|
|
+ private String userFollowWxStr;
|
|
|
+
|
|
|
+ @Excel(name = "课程学时")
|
|
|
+ @ApiModelProperty("课程学时")
|
|
|
+ private BigDecimal classHours;
|
|
|
+
|
|
|
+ @Excel(name = "用户学习时长(秒)")
|
|
|
+ @ApiModelProperty("用户学习时长(秒)")
|
|
|
+ private Integer userStudyDuration;
|
|
|
+
|
|
|
+ @ApiModelProperty("已学节数")
|
|
|
+ private Long stuAllNum;
|
|
|
+
|
|
|
+ @ApiModelProperty("总节数")
|
|
|
+ private Long secAllNum;
|
|
|
+
|
|
|
+ @Excel(name = "视频学习进度(节)")
|
|
|
+ @ApiModelProperty("视频学习进度(节)")
|
|
|
+ private String stuAllNumStr;
|
|
|
+
|
|
|
+ @ApiModelProperty("试卷数")
|
|
|
+ private Long examNum;
|
|
|
+
|
|
|
+ @ApiModelProperty("已做试卷")
|
|
|
+ private Long recordNum;
|
|
|
+
|
|
|
+ @Excel(name = "做题进度(章卷)")
|
|
|
+ private String recordNumStr;
|
|
|
+
|
|
|
+ @ApiModelProperty("学时审批状态 0 未通过 1通过 2待审核")
|
|
|
+ private Long periodStatus;
|
|
|
+
|
|
|
+ @Excel(name = "学时审批状态")
|
|
|
+ private String periodStatusStr;
|
|
|
+
|
|
|
+ @ApiModelProperty("服务有效期开始")
|
|
|
+ private Long serviceStartTime;
|
|
|
+
|
|
|
+ @ApiModelProperty("服务有效期结束")
|
|
|
+ private Long serviceEndTime;
|
|
|
+
|
|
|
+ @Excel(name = "学习服务期")
|
|
|
+ private String serviceDateStr;
|
|
|
+
|
|
|
+ @ApiModelProperty("班级有效期开始")
|
|
|
+ private Long classStartTime;
|
|
|
+
|
|
|
+ @ApiModelProperty("班级有效期结束")
|
|
|
+ private Long classEndTime;
|
|
|
+
|
|
|
+ @Excel(name = "班级有效期")
|
|
|
+ private String classDateStr;
|
|
|
+
|
|
|
+ @ApiModelProperty("学习完成状态 0 未学完 1学完")
|
|
|
+ private Long finishStatus;
|
|
|
+
|
|
|
+ @Excel(name = "学完状态")
|
|
|
+ private String finishStatusStr;
|
|
|
+
|
|
|
+ @ApiModelProperty("剩余学习次数")
|
|
|
+ @Excel(name = "剩余学习机会(次)")
|
|
|
+ private Long studyCount;
|
|
|
+
|
|
|
+ @ApiModelProperty("0 非复购 1复购 针对业务层次配了【下单前需要 选择班级")
|
|
|
+ private Integer rebuy;
|
|
|
+
|
|
|
+ @Excel(name = "复购-学时冲突")
|
|
|
+ private String rebuyStr;
|
|
|
+
|
|
|
+ public static ClassStudentExportVo initEntity(ClassGradeStudentVo studentVo){
|
|
|
+ ClassStudentExportVo vo = new ClassStudentExportVo();
|
|
|
+ BeanUtils.copyProperties(studentVo,vo);
|
|
|
+ vo.setUserStatusStr(ObjectUtil.isNotNull(studentVo.getUserStatus()) && studentVo.getUserStatus() == 1?"变更":"未变更");
|
|
|
+ vo.setUserBindWxStr(ObjectUtil.isNotNull(studentVo.getUserBindWx()) && studentVo.getUserBindWx() == 1?"是":"否");
|
|
|
+ vo.setUserFollowWxStr(ObjectUtil.isNotNull(studentVo.getUserFollowWx()) && studentVo.getUserFollowWx() == 1?"是":"否");
|
|
|
+ if (ObjectUtil.isNotNull(studentVo.getStuAllNum()) && ObjectUtil.isNotNull(studentVo.getSecAllNum())){
|
|
|
+ BigDecimal bigDecimal = new BigDecimal(studentVo.getStuAllNum());
|
|
|
+ BigDecimal bigDecimal1 = new BigDecimal(studentVo.getSecAllNum());
|
|
|
+ BigDecimal multiply = bigDecimal.divide(bigDecimal1, 0, BigDecimal.ROUND_CEILING).multiply(new BigDecimal("100.00"));
|
|
|
+ vo.setStuAllNumStr(studentVo.getStuAllNum()+"/"+studentVo.getSecAllNum()+" "+multiply+"%");
|
|
|
+ }
|
|
|
+ if (ObjectUtil.isNotNull(studentVo.getRecordNum()) && ObjectUtil.isNotNull(studentVo.getExamNum())){
|
|
|
+ BigDecimal bigDecimal = new BigDecimal(studentVo.getRecordNum());
|
|
|
+ BigDecimal bigDecimal1 = new BigDecimal(studentVo.getExamNum());
|
|
|
+ BigDecimal multiply = bigDecimal.divide(bigDecimal1, 0, BigDecimal.ROUND_CEILING).multiply(new BigDecimal("100.00"));
|
|
|
+ vo.setRecordNumStr(studentVo.getRecordNum()+"/"+studentVo.getExamNum()+" "+multiply+"%");
|
|
|
+ }
|
|
|
+ vo.setPeriodStatusStr(studentVo.getPeriodStatus() == 0 ? "未通过":studentVo.getPeriodStatus() == 1?"通过":"待审核");
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ if (ObjectUtil.isNotNull(studentVo.getServiceStartTime()) && ObjectUtil.isNotNull(studentVo.getServiceEndTime())){
|
|
|
+ vo.setServiceDateStr(sdf.format(new Date(studentVo.getServiceStartTime()))+"至"+sdf.format(new Date(studentVo.getServiceEndTime())));
|
|
|
+ }
|
|
|
+ if (ObjectUtil.isNotNull(studentVo.getClassStartTime()) && ObjectUtil.isNotNull(studentVo.getClassEndTime())){
|
|
|
+ vo.setClassDateStr(sdf.format(new Date(studentVo.getClassStartTime()))+"至"+sdf.format(new Date(studentVo.getClassEndTime())));
|
|
|
+ }
|
|
|
+ vo.setFinishStatusStr(ObjectUtil.isNotNull(studentVo.getFinishStatus()) && studentVo.getFinishStatus() == 1?"学完":"未学完");
|
|
|
+ vo.setRebuyStr(ObjectUtil.isNotNull(studentVo.getRebuy()) && studentVo.getRebuy() == 1?"复购 针对业务层次配了【下单前需要选择班级】":"非复购");
|
|
|
+ return vo;
|
|
|
+ }
|
|
|
+}
|