|
@@ -1,15 +1,17 @@
|
|
package com.ym.mec.biz.dal.entity;
|
|
package com.ym.mec.biz.dal.entity;
|
|
|
|
|
|
-import io.swagger.annotations.ApiModelProperty;
|
|
|
|
-
|
|
|
|
-import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
|
|
-
|
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
import com.ym.mec.biz.dal.enums.CourseStatusEnum;
|
|
import com.ym.mec.biz.dal.enums.CourseStatusEnum;
|
|
import com.ym.mec.biz.dal.enums.TeachModeEnum;
|
|
import com.ym.mec.biz.dal.enums.TeachModeEnum;
|
|
import com.ym.mec.common.enums.BaseEnum;
|
|
import com.ym.mec.common.enums.BaseEnum;
|
|
|
|
+import io.swagger.annotations.ApiModelProperty;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
+import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
+import java.text.ParseException;
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 对应数据库表(course_schedule):
|
|
* 对应数据库表(course_schedule):
|
|
@@ -17,6 +19,9 @@ import java.math.BigDecimal;
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
public class CourseSchedule {
|
|
public class CourseSchedule {
|
|
|
|
|
|
|
|
+ private SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
+ private SimpleDateFormat simpleDateFormat1=new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
|
|
|
+
|
|
public enum CourseScheduleType implements BaseEnum<String, CourseScheduleType> {
|
|
public enum CourseScheduleType implements BaseEnum<String, CourseScheduleType> {
|
|
|
|
|
|
SINGLE("SINGLE", "单技课"), MIX("MIX", "合奏课"), HIGH("HIGH", "小班课"), VIP("VIP", "vip课"), DEMO("DEMO", "试听课"), COMPREHENSIVE("COMPREHENSIVE", "综合课"), PRACTICE(
|
|
SINGLE("SINGLE", "单技课"), MIX("MIX", "合奏课"), HIGH("HIGH", "小班课"), VIP("VIP", "vip课"), DEMO("DEMO", "试听课"), COMPREHENSIVE("COMPREHENSIVE", "综合课"), PRACTICE(
|
|
@@ -64,10 +69,16 @@ public class CourseSchedule {
|
|
@ApiModelProperty(value = "上课时间", required = false)
|
|
@ApiModelProperty(value = "上课时间", required = false)
|
|
private java.util.Date startClassTime;
|
|
private java.util.Date startClassTime;
|
|
|
|
|
|
|
|
+ @ApiModelProperty(value = "上课时间字符")
|
|
|
|
+ private String startClassTimeStr;
|
|
|
|
+
|
|
/** 结束时间 */
|
|
/** 结束时间 */
|
|
@ApiModelProperty(value = "结束时间", required = false)
|
|
@ApiModelProperty(value = "结束时间", required = false)
|
|
private java.util.Date endClassTime;
|
|
private java.util.Date endClassTime;
|
|
|
|
|
|
|
|
+ @ApiModelProperty(value = "结束时间字符")
|
|
|
|
+ private String endClassTimeStr;
|
|
|
|
+
|
|
/** 上课教师 */
|
|
/** 上课教师 */
|
|
@ApiModelProperty(value = "上课教师", required = false)
|
|
@ApiModelProperty(value = "上课教师", required = false)
|
|
private Long teacherId;
|
|
private Long teacherId;
|
|
@@ -94,6 +105,32 @@ public class CourseSchedule {
|
|
@ApiModelProperty(value = "请假人数")
|
|
@ApiModelProperty(value = "请假人数")
|
|
private Integer leaveStudentNum;
|
|
private Integer leaveStudentNum;
|
|
|
|
|
|
|
|
+ public String getStartClassTimeStr() {
|
|
|
|
+ return startClassTimeStr;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setStartClassTimeStr(String startClassTimeStr) throws ParseException {
|
|
|
|
+ if(Objects.nonNull(this.classDate)){
|
|
|
|
+ String startTime = simpleDateFormat.format(this.classDate);
|
|
|
|
+ startTime=startTime+" "+startClassTimeStr;
|
|
|
|
+ this.startClassTime=simpleDateFormat1.parse(startTime);
|
|
|
|
+ }
|
|
|
|
+ this.startClassTimeStr = startClassTimeStr;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public String getEndClassTimeStr() {
|
|
|
|
+ return endClassTimeStr;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setEndClassTimeStr(String endClassTimeStr) throws ParseException {
|
|
|
|
+ if(Objects.nonNull(this.classDate)){
|
|
|
|
+ String endTime = simpleDateFormat.format(this.classDate);
|
|
|
|
+ endTime=endTime+" "+endClassTimeStr;
|
|
|
|
+ this.endClassTime=simpleDateFormat1.parse(endTime);
|
|
|
|
+ }
|
|
|
|
+ this.endClassTimeStr = endClassTimeStr;
|
|
|
|
+ }
|
|
|
|
+
|
|
public Integer getStudentNum() {
|
|
public Integer getStudentNum() {
|
|
return studentNum;
|
|
return studentNum;
|
|
}
|
|
}
|
|
@@ -142,7 +179,25 @@ public class CourseSchedule {
|
|
return this.subsidy;
|
|
return this.subsidy;
|
|
}
|
|
}
|
|
|
|
|
|
- public void setClassDate(java.util.Date classDate) {
|
|
|
|
|
|
+ public void setClassDate(java.util.Date classDate){
|
|
|
|
+ if(StringUtils.isNotEmpty(startClassTimeStr)){
|
|
|
|
+ String startTime = simpleDateFormat.format(classDate);
|
|
|
|
+ startTime=startTime+" "+startClassTimeStr;
|
|
|
|
+ try {
|
|
|
|
+ this.startClassTime=simpleDateFormat1.parse(startTime);
|
|
|
|
+ } catch (ParseException e) {
|
|
|
|
+ this.startClassTime=null;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(StringUtils.isNotEmpty(endClassTimeStr)){
|
|
|
|
+ String endTime = simpleDateFormat.format(classDate);
|
|
|
|
+ endTime=endTime+" "+endClassTimeStr;
|
|
|
|
+ try {
|
|
|
|
+ this.endClassTime=simpleDateFormat1.parse(endTime);
|
|
|
|
+ } catch (ParseException e) {
|
|
|
|
+ this.endClassTime=null;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.classDate = classDate;
|
|
this.classDate = classDate;
|
|
}
|
|
}
|
|
|
|
|