Jelajahi Sumber

请假记录 上课记录

肖玮 6 tahun lalu
induk
melakukan
c456bde6f1
99 mengubah file dengan 661 tambahan dan 75 penghapusan
  1. 33 0
      mec-education/src/main/java/com/ym/mec/education/controller/TeacherAttendanceController.java
  2. 33 0
      mec-education/src/main/java/com/ym/mec/education/controller/TeacherLeaveRecordController.java
  3. 81 15
      mec-education/src/main/java/com/ym/mec/education/entity/CourseSchedule.java
  4. 3 3
      mec-education/src/main/java/com/ym/mec/education/entity/TeacherAttendance.java
  5. 88 19
      mec-education/src/main/java/com/ym/mec/education/entity/TeacherLeaveRecord.java
  6. 49 0
      mec-education/src/main/java/com/ym/mec/education/enums/SignStatusEnum.java
  7. 1 1
      mec-education/src/main/java/com/ym/mec/education/mapper/ClassGroupTeacherSalaryMapper.java
  8. 1 1
      mec-education/src/main/java/com/ym/mec/education/mapper/LeaveCategoryMapper.java
  9. 5 1
      mec-education/src/main/java/com/ym/mec/education/mapper/TeacherAttendanceMapper.java
  10. 1 1
      mec-education/src/main/java/com/ym/mec/education/mapper/TeacherLeaveRecordMapper.java
  11. 0 23
      mec-education/src/main/java/com/ym/mec/education/mapper/xml/TeacherAttendanceMapper.xml
  12. 27 0
      mec-education/src/main/java/com/ym/mec/education/req/TeacherLeaveRecordReq.java
  13. 45 0
      mec-education/src/main/java/com/ym/mec/education/resp/TeacherAttendanceResp.java
  14. 45 0
      mec-education/src/main/java/com/ym/mec/education/resp/TeacherLeaveRecordResp.java
  15. 1 1
      mec-education/src/main/java/com/ym/mec/education/service/IClassGroupTeacherSalaryService.java
  16. 1 1
      mec-education/src/main/java/com/ym/mec/education/service/ILeaveCategoryService.java
  17. 4 1
      mec-education/src/main/java/com/ym/mec/education/service/ITeacherAttendanceService.java
  18. 4 1
      mec-education/src/main/java/com/ym/mec/education/service/ITeacherLeaveRecordService.java
  19. 1 1
      mec-education/src/main/java/com/ym/mec/education/service/impl/ClassGroupTeacherSalaryServiceImpl.java
  20. 1 1
      mec-education/src/main/java/com/ym/mec/education/service/impl/LeaveCategoryServiceImpl.java
  21. 74 1
      mec-education/src/main/java/com/ym/mec/education/service/impl/TeacherAttendanceServiceImpl.java
  22. 77 1
      mec-education/src/main/java/com/ym/mec/education/service/impl/TeacherLeaveRecordServiceImpl.java
  23. 25 0
      mec-education/src/main/java/com/ym/mec/education/utils/DateUtil.java
  24. 1 1
      mec-education/src/main/resources/application.yml
  25. 0 0
      mec-education/src/main/resources/mapper/ChargeTypeMapper.xml
  26. 0 0
      mec-education/src/main/resources/mapper/ChargeTypeSubjectMapperMapper.xml
  27. 0 0
      mec-education/src/main/resources/mapper/ClassGroupMapper.xml
  28. 0 0
      mec-education/src/main/resources/mapper/ClassGroupRelationMapper.xml
  29. 0 0
      mec-education/src/main/resources/mapper/ClassGroupStudentMapperMapper.xml
  30. 0 0
      mec-education/src/main/resources/mapper/ClassGroupTeacherMapperMapper.xml
  31. 0 0
      mec-education/src/main/resources/mapper/ClassGroupTeacherSalaryMapper.xml
  32. 0 0
      mec-education/src/main/resources/mapper/CooperationOrganMapper.xml
  33. 0 0
      mec-education/src/main/resources/mapper/CourseHomeworkMapper.xml
  34. 0 0
      mec-education/src/main/resources/mapper/CourseHomeworkTemplateMapper.xml
  35. 5 1
      mec-education/src/main/resources/mapper/CourseScheduleMapper.xml
  36. 0 0
      mec-education/src/main/resources/mapper/CourseScheduleTeacherSalaryMapper.xml
  37. 0 0
      mec-education/src/main/resources/mapper/DemoGroupClassGroupMapperMapper.xml
  38. 0 0
      mec-education/src/main/resources/mapper/DemoGroupCoursesPlanMapper.xml
  39. 0 0
      mec-education/src/main/resources/mapper/DemoGroupMapper.xml
  40. 0 0
      mec-education/src/main/resources/mapper/EmployeeMapper.xml
  41. 0 0
      mec-education/src/main/resources/mapper/GoodsCategoryMapper.xml
  42. 0 0
      mec-education/src/main/resources/mapper/GoodsMapper.xml
  43. 0 0
      mec-education/src/main/resources/mapper/GoodsOrderItemMapper.xml
  44. 0 0
      mec-education/src/main/resources/mapper/GoodsOrderMapper.xml
  45. 0 0
      mec-education/src/main/resources/mapper/GoodsOrderPaymentMapper.xml
  46. 0 0
      mec-education/src/main/resources/mapper/HotWordsLabelMapper.xml
  47. 0 0
      mec-education/src/main/resources/mapper/LeaveCategoryMapper.xml
  48. 0 0
      mec-education/src/main/resources/mapper/MusicGroupBuildLogMapper.xml
  49. 0 0
      mec-education/src/main/resources/mapper/MusicGroupMapper.xml
  50. 0 0
      mec-education/src/main/resources/mapper/MusicGroupPaymentCalenderMapper.xml
  51. 0 0
      mec-education/src/main/resources/mapper/MusicGroupPaymentEntitiesMapper.xml
  52. 0 0
      mec-education/src/main/resources/mapper/MusicGroupPurchaseListMapper.xml
  53. 0 0
      mec-education/src/main/resources/mapper/MusicGroupStudentFeeMapper.xml
  54. 0 0
      mec-education/src/main/resources/mapper/MusicGroupSubjectGoodsGroupMapper.xml
  55. 0 0
      mec-education/src/main/resources/mapper/MusicGroupSubjectPlanMapper.xml
  56. 0 0
      mec-education/src/main/resources/mapper/OrganizationMapper.xml
  57. 0 0
      mec-education/src/main/resources/mapper/RongyunRoomMapper.xml
  58. 0 0
      mec-education/src/main/resources/mapper/RongyunRoomMemberMapper.xml
  59. 0 0
      mec-education/src/main/resources/mapper/RongyunUserMapper.xml
  60. 0 0
      mec-education/src/main/resources/mapper/RongyunWhiteboardMapper.xml
  61. 0 0
      mec-education/src/main/resources/mapper/SchoolMapper.xml
  62. 0 0
      mec-education/src/main/resources/mapper/StudentApplyRefundsMapper.xml
  63. 0 0
      mec-education/src/main/resources/mapper/StudentAttendanceMapper.xml
  64. 0 0
      mec-education/src/main/resources/mapper/StudentCourseHomeworkMapper.xml
  65. 0 0
      mec-education/src/main/resources/mapper/StudentCourseHomeworkReplyMapper.xml
  66. 0 0
      mec-education/src/main/resources/mapper/StudentPaymentOrderDetailMapper.xml
  67. 0 0
      mec-education/src/main/resources/mapper/StudentPaymentOrderMapper.xml
  68. 0 0
      mec-education/src/main/resources/mapper/StudentRechargeMapper.xml
  69. 0 0
      mec-education/src/main/resources/mapper/StudentRegistrationMapper.xml
  70. 0 0
      mec-education/src/main/resources/mapper/StudentWithdrawMapper.xml
  71. 0 0
      mec-education/src/main/resources/mapper/SubjectGoodsMapperMapper.xml
  72. 0 0
      mec-education/src/main/resources/mapper/SubjectMapper.xml
  73. 0 0
      mec-education/src/main/resources/mapper/SysAreaMapper.xml
  74. 0 0
      mec-education/src/main/resources/mapper/SysAuditLogMapper.xml
  75. 0 0
      mec-education/src/main/resources/mapper/SysMenuMapper.xml
  76. 0 0
      mec-education/src/main/resources/mapper/SysMessageConfigMapper.xml
  77. 0 0
      mec-education/src/main/resources/mapper/SysMessageMapper.xml
  78. 0 0
      mec-education/src/main/resources/mapper/SysNewsInformationMapper.xml
  79. 0 0
      mec-education/src/main/resources/mapper/SysOauthClientDetailsMapper.xml
  80. 0 0
      mec-education/src/main/resources/mapper/SysRoleMapper.xml
  81. 0 0
      mec-education/src/main/resources/mapper/SysRoleMenuMapper.xml
  82. 0 0
      mec-education/src/main/resources/mapper/SysSuggestionMapper.xml
  83. 0 0
      mec-education/src/main/resources/mapper/SysTaskMapper.xml
  84. 0 0
      mec-education/src/main/resources/mapper/SysUserBankCardMapper.xml
  85. 0 0
      mec-education/src/main/resources/mapper/SysUserCashAccountDetailMapper.xml
  86. 0 0
      mec-education/src/main/resources/mapper/SysUserCashAccountMapper.xml
  87. 0 0
      mec-education/src/main/resources/mapper/SysUserLoginLogMapper.xml
  88. 0 0
      mec-education/src/main/resources/mapper/SysUserLoginMapper.xml
  89. 0 0
      mec-education/src/main/resources/mapper/SysUserMapper.xml
  90. 0 0
      mec-education/src/main/resources/mapper/SysUserRoleMapper.xml
  91. 49 0
      mec-education/src/main/resources/mapper/TeacherAttendanceMapper.xml
  92. 0 0
      mec-education/src/main/resources/mapper/TeacherDefaultMusicGroupSalaryMapper.xml
  93. 0 0
      mec-education/src/main/resources/mapper/TeacherDefaultVipGroupSalaryMapper.xml
  94. 6 1
      mec-education/src/main/resources/mapper/TeacherLeaveRecordMapper.xml
  95. 0 0
      mec-education/src/main/resources/mapper/TeacherMapper.xml
  96. 0 0
      mec-education/src/main/resources/mapper/TeacherSchoolMapper.xml
  97. 0 0
      mec-education/src/main/resources/mapper/VipGroupCategoryMapper.xml
  98. 0 0
      mec-education/src/main/resources/mapper/VipGroupClassGroupMapperMapper.xml
  99. 0 0
      mec-education/src/main/resources/mapper/VipGroupMapper.xml

+ 33 - 0
mec-education/src/main/java/com/ym/mec/education/controller/TeacherAttendanceController.java

@@ -0,0 +1,33 @@
+package com.ym.mec.education.controller;
+
+import com.ym.mec.education.base.PageResponse;
+import com.ym.mec.education.req.TeacherLeaveRecordReq;
+import com.ym.mec.education.service.ITeacherAttendanceService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @program: mec
+ * @description: 老师考勤 上课
+ * @author: xw
+ * @create: 2019-09-30 13:54
+ */
+@RestController
+@RequestMapping("api/teacherAttendance")
+@Api(tags = "老师考勤/上课")
+public class TeacherAttendanceController {
+
+    @Autowired
+    private ITeacherAttendanceService teacherAttendanceService;
+
+    @PostMapping("/list")
+    @ApiOperation("老师上课记录列表")
+    public PageResponse list(@RequestBody TeacherLeaveRecordReq teacherLeaveRecordReq) {
+        return teacherAttendanceService.getPage(teacherLeaveRecordReq);
+    }
+}

+ 33 - 0
mec-education/src/main/java/com/ym/mec/education/controller/TeacherLeaveRecordController.java

@@ -0,0 +1,33 @@
+package com.ym.mec.education.controller;
+
+import com.ym.mec.education.base.PageResponse;
+import com.ym.mec.education.req.TeacherLeaveRecordReq;
+import com.ym.mec.education.service.ITeacherLeaveRecordService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @program: mec
+ * @description: 老师考勤
+ * @author: xw
+ * @create: 2019-09-29 17:10
+ */
+@RestController
+@RequestMapping("api/teacherLeaveRecord")
+@Api(tags = "老师请假记录")
+public class TeacherLeaveRecordController {
+
+    @Autowired
+    private ITeacherLeaveRecordService teacherLeaveRecordService;
+
+    @PostMapping("/list")
+    @ApiOperation("老师请假记录列表")
+    public PageResponse list(@RequestBody TeacherLeaveRecordReq teacherLeaveRecordReq) {
+        return teacherLeaveRecordService.getPage(teacherLeaveRecordReq);
+    }
+}

+ 81 - 15
mec-education/src/main/java/com/ym/mec/education/entity/CourseSchedule.java

@@ -5,9 +5,11 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.ym.mec.common.enums.BaseEnum;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.sql.Time;
+import java.util.Arrays;
 import java.util.Date;
 
 /**
@@ -23,6 +25,43 @@ public class CourseSchedule extends Model<CourseSchedule> {
 
     private static final long serialVersionUID = 1L;
 
+    public enum CourseScheduleType implements BaseEnum<String, CourseScheduleType> {
+
+        SINGLE("SINGLE", "单技课"), MIX("MIX", "合奏课"), HIGH("HIGH", "小班课"), VIP("VIP", "vip课"), DEMO("demo", "试听课"), COMPREHENSIVE("comprehensive", "综合课"), PRACTICE(
+                "PRACTICE", "练习课"), ENLIGHTENMENT("ENLIGHTENMENT", "启蒙课"), TRAINING("TRAINING", "集训课");
+
+        private String code;
+
+        private String msg;
+
+        CourseScheduleType(String code, String msg) {
+            this.code = code;
+            this.msg = msg;
+        }
+
+        @Override
+        public String getCode() {
+            return code;
+        }
+
+        public String getMsg() {
+            return msg;
+        }
+
+        /**
+         * 根据枚举值获取枚举信息
+         *
+         * @param code 枚举值
+         * @return 枚举信息
+         */
+        public static String getMsgByCode(String code) {
+            return Arrays.stream(CourseScheduleType.values())
+                    .filter(StudentAttendanceStatusEnum -> StudentAttendanceStatusEnum.getCode().equals(code))
+                    .findFirst()
+                    .map(CourseScheduleType::getMsg).orElse(null);
+        }
+    }
+
     @TableId(value = "id_", type = IdType.AUTO)
     private Long id;
     /**
@@ -79,7 +118,16 @@ public class CourseSchedule extends Model<CourseSchedule> {
      */
     @TableField("complaint_status_")
     private String complaintStatus;
-
+    /**
+     * 课程类型(单技课、小班课、合奏课、综合课、练习课、启蒙课、集训课、VIP课、试听课)
+     */
+    @TableField("type_")
+    private String type;
+    /**
+     * 课程名
+     */
+    @TableField("name_")
+    private String name;
 
     public Long getId() {
         return id;
@@ -198,6 +246,22 @@ public class CourseSchedule extends Model<CourseSchedule> {
         return this;
     }
 
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
     @Override
     protected Serializable pkVal() {
         return this.id;
@@ -206,19 +270,21 @@ public class CourseSchedule extends Model<CourseSchedule> {
     @Override
     public String toString() {
         return "CourseSchedule{" +
-        ", id=" + id +
-        ", classGroupId=" + classGroupId +
-        ", status=" + status +
-        ", subsidy=" + subsidy +
-        ", classDate=" + classDate +
-        ", startClassTime=" + startClassTime +
-        ", endClassTime=" + endClassTime +
-        ", teacherId=" + teacherId +
-        ", actualTeacherId=" + actualTeacherId +
-        ", createTime=" + createTime +
-        ", updateTime=" + updateTime +
-        ", teachMode=" + teachMode +
-        ", complaintStatus=" + complaintStatus +
-        "}";
+                "id=" + id +
+                ", classGroupId=" + classGroupId +
+                ", status='" + status + '\'' +
+                ", subsidy=" + subsidy +
+                ", classDate=" + classDate +
+                ", startClassTime=" + startClassTime +
+                ", endClassTime=" + endClassTime +
+                ", teacherId=" + teacherId +
+                ", actualTeacherId=" + actualTeacherId +
+                ", createTime=" + createTime +
+                ", updateTime=" + updateTime +
+                ", teachMode='" + teachMode + '\'' +
+                ", complaintStatus='" + complaintStatus + '\'' +
+                ", type='" + type + '\'' +
+                ", name='" + name + '\'' +
+                '}';
     }
 }

+ 3 - 3
mec-education/src/main/java/com/ym/mec/education/entity/TeacherAttendance.java

@@ -41,7 +41,7 @@ public class TeacherAttendance extends Model<TeacherAttendance> {
      * 状态(正常签到,异常签到)
      */
     @TableField("status_")
-    private String status;
+    private Integer status;
     /**
      * 备注
      */
@@ -105,11 +105,11 @@ public class TeacherAttendance extends Model<TeacherAttendance> {
         return this;
     }
 
-    public String getStatus() {
+    public Integer getStatus() {
         return status;
     }
 
-    public TeacherAttendance setStatus(String status) {
+    public TeacherAttendance setStatus(Integer status) {
         this.status = status;
         return this;
     }

+ 88 - 19
mec-education/src/main/java/com/ym/mec/education/entity/TeacherLeaveRecord.java

@@ -29,12 +29,12 @@ public class TeacherLeaveRecord extends Model<TeacherLeaveRecord> {
      * 请假天数
      */
     @TableField("days_")
-    private Integer days;
+    private Double days;
     /**
      * 请假类型
      */
-    @TableField("type_")
-    private String type;
+    @TableField("leave_category_id_")
+    private Integer leaveCategoryId;
     /**
      * 请假状态(审批中、拒绝、通过)
      */
@@ -49,7 +49,31 @@ public class TeacherLeaveRecord extends Model<TeacherLeaveRecord> {
     private Date createTime;
     @TableField("update_time_")
     private Date updateTime;
-
+    /**
+     * 请假开始时间
+     */
+    @TableField("start_time_")
+    private Date startTime;
+    /**
+     * 请假结束时间
+     */
+    @TableField("end_time_")
+    private Date endTime;
+    /**
+     * 课程调整
+     */
+    @TableField("courses_schedule_json_")
+    private String coursesScheduleJson;
+    /**
+     * 流程定义
+     */
+    @TableField("wf_process_id_")
+    private String wfProcessId;
+    /**
+     * 流程实例
+     */
+    @TableField("wf_order_id_")
+    private String wfOrderId;
 
     public Long getId() {
         return id;
@@ -69,21 +93,21 @@ public class TeacherLeaveRecord extends Model<TeacherLeaveRecord> {
         return this;
     }
 
-    public Integer getDays() {
+    public Double getDays() {
         return days;
     }
 
-    public TeacherLeaveRecord setDays(Integer days) {
+    public TeacherLeaveRecord setDays(Double days) {
         this.days = days;
         return this;
     }
 
-    public String getType() {
-        return type;
+    public Integer getLeaveCategoryId() {
+        return leaveCategoryId;
     }
 
-    public TeacherLeaveRecord setType(String type) {
-        this.type = type;
+    public TeacherLeaveRecord setLeaveCategoryId(Integer leaveCategoryId) {
+        this.leaveCategoryId = leaveCategoryId;
         return this;
     }
 
@@ -123,6 +147,46 @@ public class TeacherLeaveRecord extends Model<TeacherLeaveRecord> {
         return this;
     }
 
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public String getCoursesScheduleJson() {
+        return coursesScheduleJson;
+    }
+
+    public void setCoursesScheduleJson(String coursesScheduleJson) {
+        this.coursesScheduleJson = coursesScheduleJson;
+    }
+
+    public String getWfProcessId() {
+        return wfProcessId;
+    }
+
+    public void setWfProcessId(String wfProcessId) {
+        this.wfProcessId = wfProcessId;
+    }
+
+    public String getWfOrderId() {
+        return wfOrderId;
+    }
+
+    public void setWfOrderId(String wfOrderId) {
+        this.wfOrderId = wfOrderId;
+    }
+
     @Override
     protected Serializable pkVal() {
         return this.id;
@@ -131,14 +195,19 @@ public class TeacherLeaveRecord extends Model<TeacherLeaveRecord> {
     @Override
     public String toString() {
         return "TeacherLeaveRecord{" +
-        ", id=" + id +
-        ", userId=" + userId +
-        ", days=" + days +
-        ", type=" + type +
-        ", status=" + status +
-        ", remark=" + remark +
-        ", createTime=" + createTime +
-        ", updateTime=" + updateTime +
-        "}";
+                "id=" + id +
+                ", userId=" + userId +
+                ", days=" + days +
+                ", leaveCategoryId='" + leaveCategoryId + '\'' +
+                ", status='" + status + '\'' +
+                ", remark='" + remark + '\'' +
+                ", createTime=" + createTime +
+                ", updateTime=" + updateTime +
+                ", startTime=" + startTime +
+                ", endTime=" + endTime +
+                ", coursesScheduleJson='" + coursesScheduleJson + '\'' +
+                ", wfProcessId='" + wfProcessId + '\'' +
+                ", wfOrderId='" + wfOrderId + '\'' +
+                '}';
     }
 }

+ 49 - 0
mec-education/src/main/java/com/ym/mec/education/enums/SignStatusEnum.java

@@ -0,0 +1,49 @@
+package com.ym.mec.education.enums;
+
+import com.ym.mec.common.enums.BaseEnum;
+import java.util.Arrays;
+
+//状态(1正常签到,0异常签到,2正常签退)
+public enum SignStatusEnum implements BaseEnum<Integer, SignStatusEnum> {
+    SIGN(1,"正常签到"),
+    EXCEPTION(0,"异常签到"),
+    YES_QUIT(2,"正常签退");
+
+    private Integer code;
+    private String msg;
+
+    SignStatusEnum(Integer code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    public void setCode(Integer code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    @Override
+    public Integer getCode() {
+        return this.code;
+    }
+
+    /**
+     * 根据枚举值获取枚举信息
+     *
+     * @param code 枚举值
+     * @return 枚举信息
+     */
+    public static String getMsgByCode(Integer code) {
+        return Arrays.stream(SignStatusEnum.values())
+                .filter(SignStatusEnum -> SignStatusEnum.getCode().equals(code))
+                .findFirst()
+                .map(SignStatusEnum::getMsg).orElse(null);
+    }
+}

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/mapper/ClassGroupTeacherSalaryMapper.java

@@ -1,6 +1,6 @@
 package com.ym.mec.education.mapper;
 
-import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ym.mec.education.entity.ClassGroupTeacherSalary;
 
 /**

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/mapper/LeaveCategoryMapper.java

@@ -1,7 +1,7 @@
 package com.ym.mec.education.mapper;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ym.mec.education.entity.LeaveCategory;
-import com.baomidou.mybatisplus.mapper.BaseMapper;
 
 /**
  * <p>

+ 5 - 1
mec-education/src/main/java/com/ym/mec/education/mapper/TeacherAttendanceMapper.java

@@ -1,7 +1,10 @@
 package com.ym.mec.education.mapper;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ym.mec.education.entity.TeacherAttendance;
-import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.ym.mec.education.req.TeacherLeaveRecordReq;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * <p>
@@ -13,4 +16,5 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
  */
 public interface TeacherAttendanceMapper extends BaseMapper<TeacherAttendance> {
 
+    Page<TeacherAttendance> selectClassRecordPage(Page page, @Param("query")TeacherLeaveRecordReq teacherLeaveRecordReq);
 }

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/mapper/TeacherLeaveRecordMapper.java

@@ -1,7 +1,7 @@
 package com.ym.mec.education.mapper;
 
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ym.mec.education.entity.TeacherLeaveRecord;
-import com.baomidou.mybatisplus.mapper.BaseMapper;
 
 /**
  * <p>

+ 0 - 23
mec-education/src/main/java/com/ym/mec/education/mapper/xml/TeacherAttendanceMapper.xml

@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ym.mec.education.mapper.TeacherAttendanceMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.ym.mec.education.entity.TeacherAttendance">
-        <id column="id_" property="id" />
-        <result column="teacher_id_" property="teacherId" />
-        <result column="music_group_id_" property="musicGroupId" />
-        <result column="class_group_id_" property="classGroupId" />
-        <result column="course_schedule_id_" property="courseScheduleId" />
-        <result column="sign_in_time_" property="signInTime" />
-        <result column="status_" property="status" />
-        <result column="remark_" property="remark" />
-        <result column="create_time_" property="createTime" />
-    </resultMap>
-
-    <!-- 通用查询结果列 -->
-    <sql id="Base_Column_List">
-        id_, teacher_id_, music_group_id_, class_group_id_, course_schedule_id_, sign_in_time_, status_, remark_, create_time_
-    </sql>
-
-</mapper>

+ 27 - 0
mec-education/src/main/java/com/ym/mec/education/req/TeacherLeaveRecordReq.java

@@ -0,0 +1,27 @@
+package com.ym.mec.education.req;
+
+import com.ym.mec.education.base.BaseQuery;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.util.Date;
+
+/**
+ * @program: mec
+ * @description: 老师请假记录入参
+ * @author: xw
+ * @create: 2019-09-29 17:04
+ */
+@Data
+@ApiModel(description = "老师请假记录入参")
+public class TeacherLeaveRecordReq extends BaseQuery {
+
+    @ApiModelProperty(value = "老师id", required = true)
+    private Integer teacherId;
+
+    @ApiModelProperty(value = "老师请假时间")
+    private Date leaveTime;
+
+    @ApiModelProperty(value = "课程类型(单技课、小班课、合奏课、综合课、练习课、启蒙课、集训课、VIP课、试听课)")
+    private String courseType;
+}

+ 45 - 0
mec-education/src/main/java/com/ym/mec/education/resp/TeacherAttendanceResp.java

@@ -0,0 +1,45 @@
+package com.ym.mec.education.resp;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @program: mec
+ * @description: 老师考勤出参
+ * @author: xw
+ * @create: 2019-09-30 14:06
+ */
+@Data
+@ApiModel(description = "老师考勤出参")
+@Accessors(chain = true)
+public class TeacherAttendanceResp {
+
+    @ApiModelProperty(value = "上课日期")
+    private String classDate;
+
+    @ApiModelProperty(value = "课程类别")
+    private String courseType;
+
+    @ApiModelProperty(value = "上课星期")
+    private String classWeek;
+
+    @ApiModelProperty(value = "声部名称")
+    private List<String> subjectName;
+
+    @ApiModelProperty(value = "课程进度")
+    private String courseProgress;
+
+    @ApiModelProperty(value = "课程名称")
+    private String courseName;
+
+    @ApiModelProperty(value = "老师考勤状态")
+    private String teacherAttendanceStatus;
+
+    @ApiModelProperty(value = "课酬")
+    private BigDecimal teacherSalary;
+}

+ 45 - 0
mec-education/src/main/java/com/ym/mec/education/resp/TeacherLeaveRecordResp.java

@@ -0,0 +1,45 @@
+package com.ym.mec.education.resp;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @program: mec
+ * @description: 老师请假记录出参
+ * @author: xw
+ * @create: 2019-09-29 16:38
+ */
+@Data
+@ApiModel(description = "老师请假记录出参")
+@Accessors(chain = true)
+public class TeacherLeaveRecordResp implements Serializable {
+
+    @ApiModelProperty(value = "提交日期")
+    private String commitDate;
+
+    @ApiModelProperty(value = "开始时间")
+    private String startDate;
+
+    @ApiModelProperty(value = "结束时间")
+    private String endDate;
+
+    @ApiModelProperty(value = "请假类别")
+    private String leaveCategory;
+
+    @ApiModelProperty(value = "上课时间")
+    private String classDate;
+
+    @ApiModelProperty(value = "调整后上课时间")
+    private String classAdjustDate;
+
+    @ApiModelProperty(value = "课程类型")
+    private String courseType;
+
+    @ApiModelProperty(value = "课程名称")
+    private String courseName;
+}

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/service/IClassGroupTeacherSalaryService.java

@@ -1,6 +1,6 @@
 package com.ym.mec.education.service;
 
-import com.baomidou.mybatisplus.service.IService;
+import com.baomidou.mybatisplus.extension.service.IService;
 import com.ym.mec.education.entity.ClassGroupTeacherSalary;
 
 /**

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/service/ILeaveCategoryService.java

@@ -1,7 +1,7 @@
 package com.ym.mec.education.service;
 
+import com.baomidou.mybatisplus.extension.service.IService;
 import com.ym.mec.education.entity.LeaveCategory;
-import com.baomidou.mybatisplus.service.IService;
 
 /**
  * <p>

+ 4 - 1
mec-education/src/main/java/com/ym/mec/education/service/ITeacherAttendanceService.java

@@ -1,7 +1,9 @@
 package com.ym.mec.education.service;
 
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.TeacherAttendance;
-import com.baomidou.mybatisplus.service.IService;
+import com.ym.mec.education.req.TeacherLeaveRecordReq;
 
 /**
  * <p>
@@ -13,4 +15,5 @@ import com.baomidou.mybatisplus.service.IService;
  */
 public interface ITeacherAttendanceService extends IService<TeacherAttendance> {
 
+    PageResponse getPage(TeacherLeaveRecordReq teacherLeaveRecordReq);
 }

+ 4 - 1
mec-education/src/main/java/com/ym/mec/education/service/ITeacherLeaveRecordService.java

@@ -1,7 +1,9 @@
 package com.ym.mec.education.service;
 
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ym.mec.education.base.PageResponse;
 import com.ym.mec.education.entity.TeacherLeaveRecord;
-import com.baomidou.mybatisplus.service.IService;
+import com.ym.mec.education.req.TeacherLeaveRecordReq;
 
 /**
  * <p>
@@ -13,4 +15,5 @@ import com.baomidou.mybatisplus.service.IService;
  */
 public interface ITeacherLeaveRecordService extends IService<TeacherLeaveRecord> {
 
+    PageResponse getPage(TeacherLeaveRecordReq teacherLeaveRecordReq);
 }

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/service/impl/ClassGroupTeacherSalaryServiceImpl.java

@@ -1,6 +1,6 @@
 package com.ym.mec.education.service.impl;
 
-import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ym.mec.education.entity.ClassGroupTeacherSalary;
 import com.ym.mec.education.mapper.ClassGroupTeacherSalaryMapper;
 import com.ym.mec.education.service.IClassGroupTeacherSalaryService;

+ 1 - 1
mec-education/src/main/java/com/ym/mec/education/service/impl/LeaveCategoryServiceImpl.java

@@ -1,9 +1,9 @@
 package com.ym.mec.education.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ym.mec.education.entity.LeaveCategory;
 import com.ym.mec.education.mapper.LeaveCategoryMapper;
 import com.ym.mec.education.service.ILeaveCategoryService;
-import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
 /**

+ 74 - 1
mec-education/src/main/java/com/ym/mec/education/service/impl/TeacherAttendanceServiceImpl.java

@@ -1,10 +1,30 @@
 package com.ym.mec.education.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.collect.Lists;
+import com.ym.mec.education.base.PageResponse;
+import com.ym.mec.education.entity.ClassGroup;
+import com.ym.mec.education.entity.CourseSchedule;
+import com.ym.mec.education.entity.CourseScheduleTeacherSalary;
 import com.ym.mec.education.entity.TeacherAttendance;
+import com.ym.mec.education.enums.SignStatusEnum;
 import com.ym.mec.education.mapper.TeacherAttendanceMapper;
+import com.ym.mec.education.req.TeacherLeaveRecordReq;
+import com.ym.mec.education.resp.TeacherAttendanceResp;
+import com.ym.mec.education.service.IClassGroupService;
+import com.ym.mec.education.service.ICourseScheduleService;
+import com.ym.mec.education.service.ICourseScheduleTeacherSalaryService;
 import com.ym.mec.education.service.ITeacherAttendanceService;
-import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.ym.mec.education.utils.DateUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+import java.util.List;
+import java.util.Objects;
 
 /**
  * <p>
@@ -17,4 +37,57 @@ import org.springframework.stereotype.Service;
 @Service("ITeacherAttendanceService")
 public class TeacherAttendanceServiceImpl extends ServiceImpl<TeacherAttendanceMapper, TeacherAttendance> implements ITeacherAttendanceService {
 
+    @Autowired
+    private ICourseScheduleService courseScheduleService;
+    @Autowired
+    private IClassGroupService classGroupService;
+    @Autowired
+    private ICourseScheduleTeacherSalaryService teacherSalaryService;
+
+    @Override
+    public PageResponse getPage(TeacherLeaveRecordReq teacherLeaveRecordReq) {
+        if (Objects.isNull(teacherLeaveRecordReq.getTeacherId())) {
+            return PageResponse.errorParam();
+        }
+        Page<TeacherAttendance> teacherAttendancePage = new Page<>(teacherLeaveRecordReq.getPageNo(), teacherLeaveRecordReq.getPageSize());
+        Page<TeacherAttendanceResp> pageResult = new Page();
+        List<TeacherAttendanceResp> list = Lists.newArrayList();
+        Page<TeacherAttendance> page = baseMapper.selectClassRecordPage(teacherAttendancePage, teacherLeaveRecordReq);
+        BeanUtils.copyProperties(page, pageResult);
+        if (!CollectionUtils.isEmpty(page.getRecords())) {
+            page.getRecords().forEach(item -> {
+                TeacherAttendanceResp teacherAttendanceResp = new TeacherAttendanceResp();
+                teacherAttendanceResp.setTeacherAttendanceStatus(SignStatusEnum.getMsgByCode(item.getStatus()));
+                CourseSchedule courseSchedule = courseScheduleService.getById(item.getCourseScheduleId());
+                if (Objects.nonNull(courseSchedule)) {
+                    if (Objects.nonNull(courseSchedule.getClassDate())) {
+                        teacherAttendanceResp.setClassDate(DateUtil.date2String(courseSchedule.getClassDate(), DateUtil.DATE_FORMAT_EXTRA)
+                                + " " + DateUtil.time2String(courseSchedule.getStartClassTime(), DateUtil.TIME_FORMAT_MIN))
+                                .setClassWeek(DateUtil.date2Week(courseSchedule.getClassDate()));
+                    }
+                    if (StringUtils.isNotBlank(courseSchedule.getName())) {
+                        teacherAttendanceResp.setCourseName(courseSchedule.getName());
+                    }
+                    if (StringUtils.isNotBlank(courseSchedule.getType())) {
+                        teacherAttendanceResp.setCourseType(CourseSchedule.CourseScheduleType.getMsgByCode(courseSchedule.getType()));
+                    }
+                    ClassGroup classGroup = classGroupService.getById(courseSchedule.getClassGroupId());
+                    if (Objects.nonNull(classGroup) && Objects.nonNull(classGroup.getCurrentClassTimes()) && Objects.nonNull(classGroup.getCurrentClassTimes())) {
+                        teacherAttendanceResp.setCourseProgress(classGroup.getCurrentClassTimes() + "/" + classGroup.getTotalClassTimes());
+                    }
+                    //课酬
+                    QueryWrapper<CourseScheduleTeacherSalary> courseScheduleTeacherSalaryQueryWrapper = new QueryWrapper();
+                    courseScheduleTeacherSalaryQueryWrapper.lambda().eq(CourseScheduleTeacherSalary::getCourseScheduleId, item.getCourseScheduleId())
+                            .eq(CourseScheduleTeacherSalary::getUserId, item.getTeacherId());
+                    CourseScheduleTeacherSalary teacherSalary = teacherSalaryService.getOne(courseScheduleTeacherSalaryQueryWrapper);
+                    if (Objects.nonNull(teacherSalary) && Objects.nonNull(teacherSalary.getSalary())) {
+                        teacherAttendanceResp.setTeacherSalary(teacherSalary.getSalary());
+                    }
+                }
+                list.add(teacherAttendanceResp);
+            });
+            pageResult.setRecords(list);
+        }
+        return PageResponse.success(pageResult);
+    }
 }

+ 77 - 1
mec-education/src/main/java/com/ym/mec/education/service/impl/TeacherLeaveRecordServiceImpl.java

@@ -1,10 +1,31 @@
 package com.ym.mec.education.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.collect.Lists;
+import com.ym.mec.education.base.PageResponse;
+import com.ym.mec.education.entity.CourseSchedule;
+import com.ym.mec.education.entity.LeaveCategory;
 import com.ym.mec.education.entity.TeacherLeaveRecord;
 import com.ym.mec.education.mapper.TeacherLeaveRecordMapper;
+import com.ym.mec.education.req.TeacherLeaveRecordReq;
+import com.ym.mec.education.resp.TeacherLeaveRecordResp;
+import com.ym.mec.education.service.ILeaveCategoryService;
 import com.ym.mec.education.service.ITeacherLeaveRecordService;
-import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import com.ym.mec.education.utils.DateUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
 
 /**
  * <p>
@@ -15,6 +36,61 @@ import org.springframework.stereotype.Service;
  * @since 2019-09-25
  */
 @Service("ITeacherLeaveRecordService")
+@Slf4j
 public class TeacherLeaveRecordServiceImpl extends ServiceImpl<TeacherLeaveRecordMapper, TeacherLeaveRecord> implements ITeacherLeaveRecordService {
 
+    @Autowired
+    private ILeaveCategoryService leaveCategoryService;
+
+    @Override
+    public PageResponse getPage(TeacherLeaveRecordReq teacherLeaveRecordReq) {
+        if (Objects.isNull(teacherLeaveRecordReq.getTeacherId()) || Objects.isNull(teacherLeaveRecordReq.getLeaveTime())) {
+            return PageResponse.errorParam();
+        }
+        Page<TeacherLeaveRecord> teacherLeaveRecordPage = new Page(teacherLeaveRecordReq.getPageNo(), teacherLeaveRecordReq.getPageSize());
+        QueryWrapper<TeacherLeaveRecord> recordQueryWrapper = new QueryWrapper();
+        recordQueryWrapper.lambda().eq(TeacherLeaveRecord::getUserId, teacherLeaveRecordReq.getTeacherId())
+                .ge(TeacherLeaveRecord::getCreateTime, teacherLeaveRecordReq.getLeaveTime())
+                .lt(TeacherLeaveRecord::getCreateTime, DateUtil.getFirstDayOfNextMonth(teacherLeaveRecordReq.getLeaveTime()));
+        IPage<TeacherLeaveRecord> page = page(teacherLeaveRecordPage, recordQueryWrapper);
+        Page<TeacherLeaveRecordResp> pageResult = new Page();
+        List<TeacherLeaveRecordResp> list = Lists.newArrayList();
+        if (!CollectionUtils.isEmpty(page.getRecords())) {
+            page.getRecords().forEach(item -> {
+                TeacherLeaveRecordResp teacherLeaveRecordResp = new TeacherLeaveRecordResp();
+                Optional.ofNullable(item.getCreateTime()).ifPresent(date ->
+                        teacherLeaveRecordResp.setCommitDate(DateUtil.date2String(date, DateUtil.DATE_FORMAT_MIN)));
+                Optional.ofNullable(item.getStartTime()).ifPresent(date ->
+                        teacherLeaveRecordResp.setStartDate(DateUtil.date2String(date, DateUtil.DATE_FORMAT_MIN)));
+                Optional.ofNullable(item.getEndTime()).ifPresent(date ->
+                        teacherLeaveRecordResp.setEndDate(DateUtil.date2String(date, DateUtil.DATE_FORMAT_MIN)));
+                Optional.ofNullable(item.getLeaveCategoryId()).ifPresent(leaveCategoryId -> {
+                    LeaveCategory leaveCategory = leaveCategoryService.getById(leaveCategoryId);
+                    if (Objects.nonNull(leaveCategory) && Objects.nonNull(leaveCategory.getName())) {
+                        teacherLeaveRecordResp.setLeaveCategory(leaveCategory.getName());
+                    }
+                });
+                //解析课程调整json
+                try {
+                    if (StringUtils.isNotBlank(item.getCoursesScheduleJson())) {
+                        JSONObject coursesSchedule = JSON.parseObject(item.getCoursesScheduleJson());
+                        JSONObject before = coursesSchedule.getJSONObject("before");
+                        teacherLeaveRecordResp.setClassDate(before.getString("classDate").substring(5) + " " +
+                                before.getString("startClassTime").substring(0, before.getString("startClassTime").length() - 3));
+                        JSONObject after = coursesSchedule.getJSONObject("after");
+                        teacherLeaveRecordResp.setClassAdjustDate(after.getString("classDate").substring(5) + " " +
+                                before.getString("startClassTime").substring(0, before.getString("startClassTime").length() - 3));
+                        teacherLeaveRecordResp.setCourseType(CourseSchedule.CourseScheduleType.getMsgByCode(before.getString("type")));
+                        teacherLeaveRecordResp.setCourseName(before.getString("name"));
+                    }
+                } catch (Exception e) {
+                    log.error("老师请假记录中解析课程json出现异常 {}", e.getMessage(), e);
+                }
+                list.add(teacherLeaveRecordResp);
+            });
+        }
+        BeanUtils.copyProperties(page, pageResult);
+        pageResult.setRecords(list);
+        return PageResponse.success(pageResult);
+    }
 }

+ 25 - 0
mec-education/src/main/java/com/ym/mec/education/utils/DateUtil.java

@@ -18,8 +18,11 @@ public class DateUtil {
 
     private static final String DATE_FORMAT_CHINESE = "MM月dd日";
     private static final String TIME_FORMAT = "HH:mm";
+    public static final String TIME_FORMAT_MIN = "HH:mm:ss";
     public static final String DATE_FORMAT = "MM-dd";
     public static final String DATE_FORMAT_HOUR = "MM-dd HH:mm";
+    public static final String DATE_FORMAT_MIN = "yyyy年MM月dd日 HH:mm";
+    public static final String DATE_FORMAT_EXTRA = "yyyy/MM/dd";
     private static ThreadLocal<DateFormat> threadLocal = new ThreadLocal<DateFormat>();
 
     public static DateFormat getDateFormat(String dateFormat) {
@@ -47,6 +50,11 @@ public class DateUtil {
         return format;
     }
 
+    public static String time2String(Time time, String dateFormatPattern) {
+        String format = time.toLocalTime().format(DateTimeFormatter.ofPattern(dateFormatPattern));
+        return format;
+    }
+
     public static String date2Week(Date date) {
         Calendar calendar = Calendar.getInstance();
         calendar.setTime(date);
@@ -70,4 +78,21 @@ public class DateUtil {
                 return "";
         }
     }
+
+    /**
+     * 获取下个月的第一天
+     * @param date
+     * @return
+     */
+    public static Date getFirstDayOfNextMonth(Date date) {
+        try {
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTime(date);
+            calendar.set(Calendar.DAY_OF_MONTH, 1);
+            calendar.add(Calendar.MONTH, 1);
+            return calendar.getTime();
+        } catch (Exception e) {
+        }
+        return null;
+    }
 }

+ 1 - 1
mec-education/src/main/resources/application.yml

@@ -51,7 +51,7 @@ spring:
       min-idle: 0
 
 mybatis-plus:
-  mapper-locations: classpath:com/ym/mec/education/mapper/xml/*.xml
+  mapper-locations: classpath*:mapper/*.xml
   typeAliasesPackage : com.ym.mec.education.entity
   configuration:
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl

+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/ChargeTypeMapper.xml → mec-education/src/main/resources/mapper/ChargeTypeMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/ChargeTypeSubjectMapperMapper.xml → mec-education/src/main/resources/mapper/ChargeTypeSubjectMapperMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/ClassGroupMapper.xml → mec-education/src/main/resources/mapper/ClassGroupMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/ClassGroupRelationMapper.xml → mec-education/src/main/resources/mapper/ClassGroupRelationMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/ClassGroupStudentMapperMapper.xml → mec-education/src/main/resources/mapper/ClassGroupStudentMapperMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/ClassGroupTeacherMapperMapper.xml → mec-education/src/main/resources/mapper/ClassGroupTeacherMapperMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/ClassGroupTeacherSalaryMapper.xml → mec-education/src/main/resources/mapper/ClassGroupTeacherSalaryMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/CooperationOrganMapper.xml → mec-education/src/main/resources/mapper/CooperationOrganMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/CourseHomeworkMapper.xml → mec-education/src/main/resources/mapper/CourseHomeworkMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/CourseHomeworkTemplateMapper.xml → mec-education/src/main/resources/mapper/CourseHomeworkTemplateMapper.xml


+ 5 - 1
mec-education/src/main/java/com/ym/mec/education/mapper/xml/CourseScheduleMapper.xml → mec-education/src/main/resources/mapper/CourseScheduleMapper.xml

@@ -17,11 +17,15 @@
         <result column="update_time_" property="updateTime" />
         <result column="teach_mode_" property="teachMode" />
         <result column="complaint_status_" property="complaintStatus" />
+        <result column="complaint_status_" property="complaintStatus" />
+        <result column="type_" property="type" />
+        <result column="name_" property="name" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id_, class_group_id_, status_, subsidy_, class_date_, start_class_time_, end_class_time_, teacher_id_, actual_teacher_id_, create_time_, update_time_, teach_mode_, complaint_status_
+        id_, class_group_id_, status_, subsidy_, class_date_, start_class_time_, end_class_time_, teacher_id_,
+        actual_teacher_id_, create_time_, update_time_, teach_mode_, complaint_status_,type_, name_
     </sql>
 
 </mapper>

+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/CourseScheduleTeacherSalaryMapper.xml → mec-education/src/main/resources/mapper/CourseScheduleTeacherSalaryMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/DemoGroupClassGroupMapperMapper.xml → mec-education/src/main/resources/mapper/DemoGroupClassGroupMapperMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/DemoGroupCoursesPlanMapper.xml → mec-education/src/main/resources/mapper/DemoGroupCoursesPlanMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/DemoGroupMapper.xml → mec-education/src/main/resources/mapper/DemoGroupMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/EmployeeMapper.xml → mec-education/src/main/resources/mapper/EmployeeMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/GoodsCategoryMapper.xml → mec-education/src/main/resources/mapper/GoodsCategoryMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/GoodsMapper.xml → mec-education/src/main/resources/mapper/GoodsMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/GoodsOrderItemMapper.xml → mec-education/src/main/resources/mapper/GoodsOrderItemMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/GoodsOrderMapper.xml → mec-education/src/main/resources/mapper/GoodsOrderMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/GoodsOrderPaymentMapper.xml → mec-education/src/main/resources/mapper/GoodsOrderPaymentMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/HotWordsLabelMapper.xml → mec-education/src/main/resources/mapper/HotWordsLabelMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/LeaveCategoryMapper.xml → mec-education/src/main/resources/mapper/LeaveCategoryMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/MusicGroupBuildLogMapper.xml → mec-education/src/main/resources/mapper/MusicGroupBuildLogMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/MusicGroupMapper.xml → mec-education/src/main/resources/mapper/MusicGroupMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/MusicGroupPaymentCalenderMapper.xml → mec-education/src/main/resources/mapper/MusicGroupPaymentCalenderMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/MusicGroupPaymentEntitiesMapper.xml → mec-education/src/main/resources/mapper/MusicGroupPaymentEntitiesMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/MusicGroupPurchaseListMapper.xml → mec-education/src/main/resources/mapper/MusicGroupPurchaseListMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/MusicGroupStudentFeeMapper.xml → mec-education/src/main/resources/mapper/MusicGroupStudentFeeMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/MusicGroupSubjectGoodsGroupMapper.xml → mec-education/src/main/resources/mapper/MusicGroupSubjectGoodsGroupMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/MusicGroupSubjectPlanMapper.xml → mec-education/src/main/resources/mapper/MusicGroupSubjectPlanMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/OrganizationMapper.xml → mec-education/src/main/resources/mapper/OrganizationMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/RongyunRoomMapper.xml → mec-education/src/main/resources/mapper/RongyunRoomMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/RongyunRoomMemberMapper.xml → mec-education/src/main/resources/mapper/RongyunRoomMemberMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/RongyunUserMapper.xml → mec-education/src/main/resources/mapper/RongyunUserMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/RongyunWhiteboardMapper.xml → mec-education/src/main/resources/mapper/RongyunWhiteboardMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SchoolMapper.xml → mec-education/src/main/resources/mapper/SchoolMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/StudentApplyRefundsMapper.xml → mec-education/src/main/resources/mapper/StudentApplyRefundsMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/StudentAttendanceMapper.xml → mec-education/src/main/resources/mapper/StudentAttendanceMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/StudentCourseHomeworkMapper.xml → mec-education/src/main/resources/mapper/StudentCourseHomeworkMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/StudentCourseHomeworkReplyMapper.xml → mec-education/src/main/resources/mapper/StudentCourseHomeworkReplyMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/StudentPaymentOrderDetailMapper.xml → mec-education/src/main/resources/mapper/StudentPaymentOrderDetailMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/StudentPaymentOrderMapper.xml → mec-education/src/main/resources/mapper/StudentPaymentOrderMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/StudentRechargeMapper.xml → mec-education/src/main/resources/mapper/StudentRechargeMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/StudentRegistrationMapper.xml → mec-education/src/main/resources/mapper/StudentRegistrationMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/StudentWithdrawMapper.xml → mec-education/src/main/resources/mapper/StudentWithdrawMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SubjectGoodsMapperMapper.xml → mec-education/src/main/resources/mapper/SubjectGoodsMapperMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SubjectMapper.xml → mec-education/src/main/resources/mapper/SubjectMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysAreaMapper.xml → mec-education/src/main/resources/mapper/SysAreaMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysAuditLogMapper.xml → mec-education/src/main/resources/mapper/SysAuditLogMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysMenuMapper.xml → mec-education/src/main/resources/mapper/SysMenuMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysMessageConfigMapper.xml → mec-education/src/main/resources/mapper/SysMessageConfigMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysMessageMapper.xml → mec-education/src/main/resources/mapper/SysMessageMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysNewsInformationMapper.xml → mec-education/src/main/resources/mapper/SysNewsInformationMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysOauthClientDetailsMapper.xml → mec-education/src/main/resources/mapper/SysOauthClientDetailsMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysRoleMapper.xml → mec-education/src/main/resources/mapper/SysRoleMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysRoleMenuMapper.xml → mec-education/src/main/resources/mapper/SysRoleMenuMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysSuggestionMapper.xml → mec-education/src/main/resources/mapper/SysSuggestionMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysTaskMapper.xml → mec-education/src/main/resources/mapper/SysTaskMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysUserBankCardMapper.xml → mec-education/src/main/resources/mapper/SysUserBankCardMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysUserCashAccountDetailMapper.xml → mec-education/src/main/resources/mapper/SysUserCashAccountDetailMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysUserCashAccountMapper.xml → mec-education/src/main/resources/mapper/SysUserCashAccountMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysUserLoginLogMapper.xml → mec-education/src/main/resources/mapper/SysUserLoginLogMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysUserLoginMapper.xml → mec-education/src/main/resources/mapper/SysUserLoginMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysUserMapper.xml → mec-education/src/main/resources/mapper/SysUserMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/SysUserRoleMapper.xml → mec-education/src/main/resources/mapper/SysUserRoleMapper.xml


+ 49 - 0
mec-education/src/main/resources/mapper/TeacherAttendanceMapper.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ym.mec.education.mapper.TeacherAttendanceMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.ym.mec.education.entity.TeacherAttendance">
+        <id column="id_" property="id"/>
+        <result column="teacher_id_" property="teacherId"/>
+        <result column="music_group_id_" property="musicGroupId"/>
+        <result column="class_group_id_" property="classGroupId"/>
+        <result column="course_schedule_id_" property="courseScheduleId"/>
+        <result column="sign_in_time_" property="signInTime"/>
+        <result column="status_" property="status"/>
+        <result column="remark_" property="remark"/>
+        <result column="create_time_" property="createTime"/>
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id_, teacher_id_, music_group_id_, class_group_id_, course_schedule_id_, sign_in_time_, status_, remark_, create_time_
+    </sql>
+    <sql id="Column_List">
+        teacher_attendance.id_, teacher_attendance.teacher_id_, teacher_attendance.music_group_id_,
+        teacher_attendance.class_group_id_, teacher_attendance.course_schedule_id_,
+        teacher_attendance.sign_in_time_, teacher_attendance.status_,
+        teacher_attendance.remark_, teacher_attendance.create_time_
+    </sql>
+
+    <!--上课记录-->
+    <select id="selectClassRecordPage" parameterType="com.ym.mec.education.req.TeacherLeaveRecordReq"
+            resultMap="BaseResultMap">
+        select
+        <include refid="Column_List"/>
+        from teacher_attendance left join course_schedule
+        on teacher_attendance.course_schedule_id_ = course_schedule.id_
+        where
+        teacher_attendance.teacher_id_ = #{query.teacherId}
+        <if test="query.courseType != null and query.courseType != ''">
+            <!--VIP课-->
+            <if test="query.courseType == 'VIP'">
+                and course_schedule.type_ = 'VIP'
+            </if>
+            <!--乐团课-->
+            <if test="query.courseType == 'GROUP'">
+                and course_schedule.type_ not in ('ENLIGHTENMENT', 'TRAINING')
+            </if>
+        </if>
+    </select>
+</mapper>

+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/TeacherDefaultMusicGroupSalaryMapper.xml → mec-education/src/main/resources/mapper/TeacherDefaultMusicGroupSalaryMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/TeacherDefaultVipGroupSalaryMapper.xml → mec-education/src/main/resources/mapper/TeacherDefaultVipGroupSalaryMapper.xml


+ 6 - 1
mec-education/src/main/java/com/ym/mec/education/mapper/xml/TeacherLeaveRecordMapper.xml → mec-education/src/main/resources/mapper/TeacherLeaveRecordMapper.xml

@@ -7,11 +7,16 @@
         <id column="id_" property="id" />
         <result column="user_id_" property="userId" />
         <result column="days_" property="days" />
-        <result column="type_" property="type" />
+        <result column="leaveCategoryId" property="leave_category_id_" />
         <result column="status_" property="status" />
         <result column="remark_" property="remark" />
         <result column="create_time_" property="createTime" />
         <result column="update_time_" property="updateTime" />
+        <result column="start_time_" property="startTime" />
+        <result column="end_time_" property="endTime" />
+        <result column="courses_schedule_json_" property="coursesScheduleJson" />
+        <result column="wf_process_id_" property="wfProcessId" />
+        <result column="wf_order_id_" property="wfOrderId" />
     </resultMap>
 
     <!-- 通用查询结果列 -->

+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/TeacherMapper.xml → mec-education/src/main/resources/mapper/TeacherMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/TeacherSchoolMapper.xml → mec-education/src/main/resources/mapper/TeacherSchoolMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/VipGroupCategoryMapper.xml → mec-education/src/main/resources/mapper/VipGroupCategoryMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/VipGroupClassGroupMapperMapper.xml → mec-education/src/main/resources/mapper/VipGroupClassGroupMapperMapper.xml


+ 0 - 0
mec-education/src/main/java/com/ym/mec/education/mapper/xml/VipGroupMapper.xml → mec-education/src/main/resources/mapper/VipGroupMapper.xml