Kaynağa Gözat

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherAttendanceController.java
Joburgess 5 yıl önce
ebeveyn
işleme
c861738269
32 değiştirilmiş dosya ile 577 ekleme ve 93 silme
  1. 15 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentManageDao.java
  2. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDao.java
  3. 108 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentDto.java
  4. 12 11
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherPersonalAttendanceDto.java
  5. 12 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherLeaveRecord.java
  6. 9 9
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/DealStatusEnum.java
  7. 73 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentPaymentOrderQueryInfo.java
  8. 22 3
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherCloseQueryInfo.java
  9. 0 20
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherCourseQueryInfo.java
  10. 29 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherMusicGroupSalaryQueryInfo.java
  11. 51 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherPaymentRecordInfo.java
  12. 8 0
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentManageService.java
  13. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/service/StudentPaymentOrderService.java
  14. 2 1
      mec-biz/src/main/java/com/ym/mec/biz/service/TeacherAttendanceService.java
  15. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/service/TeacherService.java
  16. 24 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java
  17. 11 5
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java
  18. 2 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherAttendanceServiceImpl.java
  19. 5 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java
  20. 45 0
      mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml
  21. 28 3
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  22. 13 21
      mec-biz/src/main/resources/config/mybatis/TeacherAttendanceMapper.xml
  23. 15 2
      mec-biz/src/main/resources/config/mybatis/TeacherDefaultMusicGroupSalaryMapper.xml
  24. 5 1
      mec-biz/src/main/resources/config/mybatis/TeacherLeaveRecordMapper.xml
  25. 4 0
      mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml
  26. 1 1
      mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml
  27. 5 3
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherAttendanceController.java
  28. 6 1
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherController.java
  29. 9 0
      mec-web/src/main/java/com/ym/mec/web/controller/StudentManageController.java
  30. 29 0
      mec-web/src/main/java/com/ym/mec/web/controller/student/StudentPaymentOrderController.java
  31. 2 1
      mec-web/src/main/java/com/ym/mec/web/controller/teacher/TeacherDefaultMusicGroupSalaryController.java
  32. 3 9
      mec-web/src/main/java/com/ym/mec/web/controller/teacher/TeacherLeaveRecordController.java

+ 15 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentManageDao.java

@@ -2,6 +2,8 @@ package com.ym.mec.biz.dal.dao;
 
 import com.ym.mec.biz.dal.dto.*;
 
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -83,4 +85,17 @@ public interface StudentManageDao {
      */
     StudentManageAccountBaseInfoDto getStudentAccountBaseInfo(Integer userId);
 
+    /**
+     * 获取学员扣费记录列表
+     * @param params
+     * @return
+     */
+    List<StudentPaymentDto> queryStudentPayment(Map<String, Object> params);
+
+    /**
+     *  COUNT学员扣费记录列表
+     * @param params
+     * @return
+     */
+    int countStudentPayment(Map<String, Object> params);
 }

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDao.java

@@ -7,6 +7,7 @@ import com.ym.mec.biz.dal.entity.Teacher;
 import com.ym.mec.common.dal.BaseDAO;
 import org.apache.ibatis.annotations.Param;
 
+import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -81,4 +82,13 @@ public interface TeacherDao extends BaseDAO<Integer, Teacher> {
      * @return java.util.List<com.ym.mec.biz.dal.dto.BasicUserDto>
      */
     List<BasicUserDto> findTeacherByMusicGroup(Long musicGroupId);
+
+
+    /**
+     * 获取教师未结算课酬综合
+     * @param teacherId
+     * @return
+     */
+    BigDecimal findTeacherNoPay(Integer teacherId);
+
 }

+ 108 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentPaymentDto.java

@@ -0,0 +1,108 @@
+package com.ym.mec.biz.dal.dto;
+
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+public class StudentPaymentDto extends QueryInfo {
+
+    @ApiModelProperty(value = "上课日期",required = true)
+    private String classDate;
+
+    @ApiModelProperty(value = "上课时间",required = true)
+    private String startClassTime;
+
+    @ApiModelProperty(value = "课程类型",required = true)
+    private String classGroupType;
+
+    @ApiModelProperty(value = "班级名称",required = true)
+    private String classGroupName;
+
+    @ApiModelProperty(value = "当前课次",required = true)
+    private Integer currentClassTimes;
+
+    @ApiModelProperty(value = "总课次",required = true)
+    private Integer totalClassTimes;
+
+    @ApiModelProperty(value = "考勤状态",required = true)
+    private String status;
+
+    @ApiModelProperty(value = "预计费用",required = true)
+    private BigDecimal expectPrice;
+
+    @ApiModelProperty(value = "实际费用",required = true)
+    private BigDecimal actualPrice;
+
+    public String getClassDate() {
+        return classDate;
+    }
+
+    public void setClassDate(String classDate) {
+        this.classDate = classDate;
+    }
+
+    public String getStartClassTime() {
+        return startClassTime;
+    }
+
+    public void setStartClassTime(String startClassTime) {
+        this.startClassTime = startClassTime;
+    }
+
+    public String getClassGroupType() {
+        return classGroupType;
+    }
+
+    public void setClassGroupType(String classGroupType) {
+        this.classGroupType = classGroupType;
+    }
+
+    public String getClassGroupName() {
+        return classGroupName;
+    }
+
+    public void setClassGroupName(String classGroupName) {
+        this.classGroupName = classGroupName;
+    }
+
+    public Integer getCurrentClassTimes() {
+        return currentClassTimes;
+    }
+
+    public void setCurrentClassTimes(Integer currentClassTimes) {
+        this.currentClassTimes = currentClassTimes;
+    }
+
+    public Integer getTotalClassTimes() {
+        return totalClassTimes;
+    }
+
+    public void setTotalClassTimes(Integer totalClassTimes) {
+        this.totalClassTimes = totalClassTimes;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public BigDecimal getExpectPrice() {
+        return expectPrice;
+    }
+
+    public void setExpectPrice(BigDecimal expectPrice) {
+        this.expectPrice = expectPrice;
+    }
+
+    public BigDecimal getActualPrice() {
+        return actualPrice;
+    }
+
+    public void setActualPrice(BigDecimal actualPrice) {
+        this.actualPrice = actualPrice;
+    }
+}

+ 12 - 11
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherPersonalAttendanceDto.java

@@ -1,5 +1,6 @@
 package com.ym.mec.biz.dal.dto;
 
+import com.ym.mec.biz.dal.entity.CourseSchedule;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.util.Date;
@@ -15,49 +16,49 @@ public class TeacherPersonalAttendanceDto {
 
     /** 上课日期 */
     @ApiModelProperty(value = "上课日期",required = false)
-    private java.util.Date classDate;
+    private String classDate;
 
     /** 上课时间 */
     @ApiModelProperty(value = "上课时间",required = false)
-    private java.util.Date startClassTime;
+    private String startClassTime;
 
     /** 班级类型(普通班级、合奏班级) */
-    @ApiModelProperty(value = "班级类型(普通班级、合奏班级、提高课班级、VIP班级)",required = false)
-    private ClassGroupTypeEnum type;
+    @ApiModelProperty(value = "课程类型",required = false)
+    private CourseSchedule.CourseScheduleType type;
 
     /** 班级名称 */
     @ApiModelProperty(value = "班级名称",required = false)
     private String name;
 
     /** 状态(正常签到,异常签到) */
-    @ApiModelProperty(value = "状态(1正常签到,0异常签到,2正常签退) ",required = false)
+    @ApiModelProperty(value = "状态(1正常签到,0异常签到) ",required = false)
     private YesOrNoEnum status;
 
     /** 备注 */
     @ApiModelProperty(value = "备注",required = false)
     private String remark;
 
-    public Date getClassDate() {
+    public String getClassDate() {
         return classDate;
     }
 
-    public void setClassDate(Date classDate) {
+    public void setClassDate(String classDate) {
         this.classDate = classDate;
     }
 
-    public Date getStartClassTime() {
+    public String getStartClassTime() {
         return startClassTime;
     }
 
-    public void setStartClassTime(Date startClassTime) {
+    public void setStartClassTime(String startClassTime) {
         this.startClassTime = startClassTime;
     }
 
-    public ClassGroupTypeEnum getType() {
+    public CourseSchedule.CourseScheduleType getType() {
         return type;
     }
 
-    public void setType(ClassGroupTypeEnum type) {
+    public void setType(CourseSchedule.CourseScheduleType type) {
         this.type = type;
     }
 

+ 12 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/TeacherLeaveRecord.java

@@ -20,6 +20,9 @@ public class TeacherLeaveRecord {
 	
 	/** 请假类型 */
 	private Integer leaveCategoryId;
+
+	/** 请假类型名称 */
+	private String leaveCategoryName;
 	
 	/** 请假状态(审批中、拒绝、通过) */
 	private AuditStatusEnum status;
@@ -47,7 +50,15 @@ public class TeacherLeaveRecord {
 	
 	/** 流程实例 */
 	private String wfOrderId;
-	
+
+	public String getLeaveCategoryName() {
+		return leaveCategoryName;
+	}
+
+	public void setLeaveCategoryName(String leaveCategoryName) {
+		this.leaveCategoryName = leaveCategoryName;
+	}
+
 	public void setId(Long id){
 		this.id = id;
 	}

+ 9 - 9
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/DealStatusEnum.java

@@ -5,22 +5,22 @@ import com.ym.mec.common.enums.BaseEnum;
 /**
  * '交易状态(1,交易中;2,成功交易;3,交易失败,4交易关闭;)',
  */
-public enum DealStatusEnum implements BaseEnum<Integer, DealStatusEnum> {
-	ING(1, "交易中"),
-	SUCCESS(2, "成功交易"),
-	FAilED(3, "交易失败"),
-	CLOSE(4, "交易关闭");
+public enum DealStatusEnum implements BaseEnum<String, DealStatusEnum> {
+	ING("ING", "交易中"),
+	SUCCESS("SUCCESS", "成功交易"),
+	FAilED("FAilED", "交易失败"),
+	CLOSE("CLOSE", "交易关闭");
 
-	private Integer code;
+	private String code;
 
 	private String msg;
 
-	DealStatusEnum(Integer code, String msg) {
+	DealStatusEnum(String code, String msg) {
 		this.code = code;
 		this.msg = msg;
 	}
 
-	public void setCode(Integer code) {
+	public void setCode(String code) {
 		this.code = code;
 	}
 
@@ -33,7 +33,7 @@ public enum DealStatusEnum implements BaseEnum<Integer, DealStatusEnum> {
 	}
 
 	@Override
-	public Integer getCode() {
+	public String getCode() {
 		return this.code;
 	}
 }

+ 73 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentPaymentOrderQueryInfo.java

@@ -0,0 +1,73 @@
+package com.ym.mec.biz.dal.page;
+
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
+
+public class StudentPaymentOrderQueryInfo extends QueryInfo {
+
+    @ApiModelProperty(value = "开始时间",required = false)
+    private String orderStartDate;
+
+    @ApiModelProperty(value = "截止时间",required = false)
+    private String orderEndDate;
+
+    @ApiModelProperty(value = "交易类型",required = false)
+    private String paymentType;
+
+    @ApiModelProperty(value = "交易类型",required = false)
+    private String remark;
+
+    @ApiModelProperty(value = "学生编号",required = false)
+    private Integer studentId;
+
+    @ApiModelProperty(value = "交易状态",required = false)
+    private String paymentStatus;
+
+    public String getOrderStartDate() {
+        return orderStartDate;
+    }
+
+    public void setOrderStartDate(String orderStartDate) {
+        this.orderStartDate = orderStartDate;
+    }
+
+    public String getOrderEndDate() {
+        return orderEndDate;
+    }
+
+    public void setOrderEndDate(String orderEndDate) {
+        this.orderEndDate = orderEndDate;
+    }
+
+    public String getPaymentType() {
+        return paymentType;
+    }
+
+    public void setPaymentType(String paymentType) {
+        this.paymentType = paymentType;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public Integer getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Integer studentId) {
+        this.studentId = studentId;
+    }
+
+    public String getPaymentStatus() {
+        return paymentStatus;
+    }
+
+    public void setPaymentStatus(String paymentStatus) {
+        this.paymentStatus = paymentStatus;
+    }
+}

+ 22 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherCloseQueryInfo.java

@@ -1,8 +1,5 @@
 package com.ym.mec.biz.dal.page;
 
-import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
-import com.ym.mec.biz.dal.entity.CourseSchedule;
-import com.ym.mec.biz.dal.enums.TeachTypeEnum;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -22,6 +19,28 @@ public class TeacherCloseQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "课程类型")
     private String courseScheduleType;
 
+    @ApiModelProperty(value = "课程名称")
+    private String classGroupName;
+
+    @ApiModelProperty(value = "签到状态")
+    private String signInStatus;
+
+    public String getSignInStatus() {
+        return signInStatus;
+    }
+
+    public void setSignInStatus(String signInStatus) {
+        this.signInStatus = signInStatus;
+    }
+
+    public String getClassGroupName() {
+        return classGroupName;
+    }
+
+    public void setClassGroupName(String classGroupName) {
+        this.classGroupName = classGroupName;
+    }
+
     public String getCourseStartDate() {
         return courseStartDate;
     }

+ 0 - 20
mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherCourseQueryInfo.java

@@ -1,20 +0,0 @@
-package com.ym.mec.biz.dal.page;
-
-import io.swagger.annotations.ApiModelProperty;
-
-import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
-import com.ym.mec.common.page.QueryInfo;
-
-public class TeacherCourseQueryInfo extends QueryInfo {
-
-    @ApiModelProperty(value = "课程类型")
-    private ClassGroupTypeEnum type;
-
-    public ClassGroupTypeEnum getType() {
-        return type;
-    }
-
-    public void setType(ClassGroupTypeEnum type) {
-        this.type = type;
-    }
-}

+ 29 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherMusicGroupSalaryQueryInfo.java

@@ -0,0 +1,29 @@
+package com.ym.mec.biz.dal.page;
+
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
+
+public class TeacherMusicGroupSalaryQueryInfo extends QueryInfo {
+
+    @ApiModelProperty(value = "教师编号",required = false)
+    private Integer teacherId;
+
+    @ApiModelProperty(value = "结算方式",required = false)
+    private String settlementType;
+
+    public Integer getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Integer teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public String getSettlementType() {
+        return settlementType;
+    }
+
+    public void setSettlementType(String settlementType) {
+        this.settlementType = settlementType;
+    }
+}

+ 51 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/TeacherPaymentRecordInfo.java

@@ -0,0 +1,51 @@
+package com.ym.mec.biz.dal.page;
+
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.ApiModelProperty;
+
+public class TeacherPaymentRecordInfo extends QueryInfo {
+
+    @ApiModelProperty(value = "课程类型",required = false)
+    private String classGroupType;
+
+    @ApiModelProperty(value = "课程名称",required = false)
+    private String classGroupName;
+
+    @ApiModelProperty(value = "考勤状态",required = false)
+    private String attendanceStatus;
+
+    @ApiModelProperty(value = "学生编号",required = false)
+    private Integer studentId;
+
+    public String getClassGroupType() {
+        return classGroupType;
+    }
+
+    public void setClassGroupType(String classGroupType) {
+        this.classGroupType = classGroupType;
+    }
+
+    public String getClassGroupName() {
+        return classGroupName;
+    }
+
+    public void setClassGroupName(String classGroupName) {
+        this.classGroupName = classGroupName;
+    }
+
+    public String getAttendanceStatus() {
+        return attendanceStatus;
+    }
+
+    public void setAttendanceStatus(String attendanceStatus) {
+        this.attendanceStatus = attendanceStatus;
+    }
+
+    public Integer getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Integer studentId) {
+        this.studentId = studentId;
+    }
+}

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/StudentManageService.java

@@ -4,7 +4,9 @@ import com.ym.mec.biz.dal.dto.*;
 import com.ym.mec.biz.dal.page.StudentManageAttendanceQueryInfo;
 import com.ym.mec.biz.dal.page.StudentManageCourseQueryInfo;
 import com.ym.mec.biz.dal.page.StudentManageQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherPaymentRecordInfo;
 import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
 
 import java.util.List;
 
@@ -63,4 +65,10 @@ public interface StudentManageService {
      */
     StudentManageAccountBaseInfoDto getStudentAccountBaseInfo(Integer userID);
 
+    /**
+     * 获取学员扣费记录列表
+     * @param queryInfo
+     * @return
+     */
+    PageInfo queryStudentPayment(TeacherPaymentRecordInfo queryInfo);
 }

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

@@ -6,6 +6,9 @@ import com.ym.mec.biz.dal.entity.Goods;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
+import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
+import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.BaseService;
 
 public interface StudentPaymentOrderService extends BaseService<Long, StudentPaymentOrder> {
@@ -40,4 +43,11 @@ public interface StudentPaymentOrderService extends BaseService<Long, StudentPay
 	 * @return
 	 */
 	int findPayOrderNum();
+
+	/**
+	 * 获取学员的缴费订单
+	 * @param queryInfo
+	 * @return
+	 */
+    PageInfo queryOrderPage(StudentPaymentOrderQueryInfo queryInfo);
 }

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/TeacherAttendanceService.java

@@ -3,6 +3,7 @@ package com.ym.mec.biz.service;
 import com.ym.mec.biz.dal.dto.TeacherSignOutDto;
 import com.ym.mec.biz.dal.entity.TeacherAttendance;
 import com.ym.mec.biz.dal.page.TeacherAttendanceQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 
@@ -21,7 +22,7 @@ public interface TeacherAttendanceService extends BaseService<Long, TeacherAtten
 	 * 获取教师个人的签到记录
 	 * @return
 	 */
-	PageInfo getTeacherPersonalAttendances(TeacherAttendanceQueryInfo queryInfo);
+	PageInfo getTeacherPersonalAttendances(TeacherCloseQueryInfo queryInfo);
 
 	/**
 	 * 推送未签退消息提醒

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/TeacherService.java

@@ -10,6 +10,7 @@ import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 import org.apache.ibatis.annotations.Param;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 public interface TeacherService extends BaseService<Integer, Teacher> {
@@ -92,4 +93,12 @@ public interface TeacherService extends BaseService<Integer, Teacher> {
      * @return java.util.List<com.ym.mec.biz.dal.dto.BasicUserDto>
      */
     List<BasicUserDto> queryMusicGroupTeacher(Long musicGroupId);
+
+
+    /**
+     * 获取老师未结算课酬总额
+     * @param teacherId
+     * @return
+     */
+    BigDecimal findTeacherNoPay(Integer teacherId);
 }

+ 24 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentManageServiceImpl.java

@@ -2,6 +2,7 @@ package com.ym.mec.biz.service.impl;
 
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao;
 import com.ym.mec.biz.dal.dao.StudentManageDao;
 import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
 import com.ym.mec.biz.dal.dao.VipGroupDao;
@@ -9,8 +10,11 @@ import com.ym.mec.biz.dal.dto.*;
 import com.ym.mec.biz.dal.page.StudentManageAttendanceQueryInfo;
 import com.ym.mec.biz.dal.page.StudentManageCourseQueryInfo;
 import com.ym.mec.biz.dal.page.StudentManageQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherPaymentRecordInfo;
+import com.ym.mec.biz.service.CourseScheduleStudentPaymentService;
 import com.ym.mec.biz.service.StudentManageService;
 import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.util.collection.MapUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -124,4 +128,24 @@ public class StudentManageServiceImpl implements StudentManageService {
     public StudentManageAccountBaseInfoDto getStudentAccountBaseInfo(Integer userId) {
         return studentManageDao.getStudentAccountBaseInfo(userId);
     }
+
+    @Override
+    public PageInfo queryStudentPayment(TeacherPaymentRecordInfo queryInfo) {
+        PageInfo pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
+        Map<String, Object> params = new HashMap<String, Object>();
+        MapUtil.populateMap(params, queryInfo);
+
+        List dataList = null;
+        int count = studentManageDao.countStudentPayment(params);
+        if (count > 0) {
+            pageInfo.setTotal(count);
+            params.put("offset", pageInfo.getOffset());
+            dataList = studentManageDao.queryStudentPayment(params);
+        }
+        if (count == 0) {
+            dataList = new ArrayList<>();
+        }
+        pageInfo.setRows(dataList);
+        return pageInfo;
+    }
 }

+ 11 - 5
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java

@@ -1,18 +1,19 @@
 package com.ym.mec.biz.service.impl;
 
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
 import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
 import com.ym.mec.biz.dal.entity.Goods;
 import com.ym.mec.biz.dal.entity.StudentPaymentOrder;
 import com.ym.mec.biz.dal.enums.DealStatusEnum;
 import com.ym.mec.biz.dal.enums.OrderDetailTypeEnum;
+import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
 import com.ym.mec.biz.service.StudentPaymentOrderService;
 import com.ym.mec.common.dal.BaseDAO;
+import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 @Service
 public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, StudentPaymentOrder> implements StudentPaymentOrderService {
@@ -45,4 +46,9 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
         return studentPaymentOrderDao.findPayOrderNum();
     }
 
+    @Override
+    public PageInfo queryOrderPage(StudentPaymentOrderQueryInfo queryInfo) {
+        return queryPage(queryInfo);
+    }
+
 }

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherAttendanceServiceImpl.java

@@ -12,6 +12,7 @@ import com.ym.mec.biz.dal.enums.ParamEnum;
 import com.ym.mec.biz.dal.enums.SignStatusEnum;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.biz.dal.page.TeacherAttendanceQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
 import com.ym.mec.biz.service.CourseHomeworkService;
 import com.ym.mec.biz.service.CourseScheduleService;
 import com.ym.mec.biz.service.SysConfigService;
@@ -171,7 +172,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 	}
 
 	@Override
-	public PageInfo getTeacherPersonalAttendances(TeacherAttendanceQueryInfo queryInfo) {
+	public PageInfo getTeacherPersonalAttendances(TeacherCloseQueryInfo queryInfo) {
 		PageInfo<TeacherPersonalAttendanceDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
 		Map<String, Object> params = new HashMap<String, Object>();
 		MapUtil.populateMap(params, queryInfo);

+ 5 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java

@@ -181,6 +181,11 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 	}
 
 	@Override
+	public BigDecimal findTeacherNoPay(Integer teacherId) {
+		return teacherDao.findTeacherNoPay(teacherId);
+	}
+
+	@Override
 	public List<BasicUserDto> queryMusicGroupTeacher(Long musicGroupId) {
 		if(Objects.isNull(musicGroupId)){
 			throw new BizException("请指定乐团");

+ 45 - 0
mec-biz/src/main/resources/config/mybatis/StudentManageDao.xml

@@ -242,4 +242,49 @@
             suca.user_id_ =#{userId}
     </select>
 
+    <resultMap id="StudentPaymentDto" type="com.ym.mec.biz.dal.dto.StudentPaymentDto">
+        <result property="classDate" column="class_date_"/>
+        <result property="startClassTime" column="start_class_time_"/>
+        <result property="classGroupType" column="class_group_type_"/>
+        <result property="classGroupName" column="class_group_name_"/>
+        <result property="currentClassTimes" column="current_class_times_"/>
+        <result property="totalClassTimes" column="total_class_times_"/>
+        <result property="status" column="status_"/>
+        <result property="expectPrice" column="expect_price_"/>
+        <result property="actualPrice" column="actual_price_"/>
+    </resultMap>
+    <select id="queryStudentPayment" resultMap="StudentPaymentDto">
+        SELECT cs.class_date_,cs.start_class_time_,cs.type_ class_group_type_ ,cs.name_ class_group_name_,
+        cg.total_class_times_,sa.current_class_times_,sa.status_,cssp.expect_price_,cssp.actual_price_
+        FROM course_schedule_student_payment cssp
+        LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_
+        LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cssp.course_schedule_id_
+        LEFT JOIN class_group cg ON cg.id_ = sa.class_group_id_
+        <include refid="studentPaymentSql"/>
+        <include refid="global.limit"/>
+    </select>
+    <sql id="studentPaymentSql">
+        <where>
+            <if test="classGroupType != null">
+                AND cs.type_ = #{classGroupType}
+            </if>
+            <if test="classGroupName != null">
+                AND cs.name_ = #{classGroupName}
+            </if>
+            <if test="attendanceStatus != null">
+                AND sa.status_ = #{attendanceStatus}
+            </if>
+            <if test="studentId != null">
+                AND cssp.user_id_ = #{studentId}
+            </if>
+        </where>
+    </sql>
+    <select id="countStudentPayment" resultType="java.lang.Integer">
+        SELECT COUNT(cssp.id_)
+        FROM course_schedule_student_payment cssp
+        LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_
+        LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cssp.course_schedule_id_
+        <include refid="studentPaymentSql"/>
+    </select>
+
 </mapper>

+ 28 - 3
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -140,16 +140,41 @@
 
     <!-- 分页查询 -->
     <select id="queryPage" resultMap="StudentPaymentOrder" parameterType="map">
-        SELECT * FROM student_payment_order ORDER BY id_
+        SELECT * FROM student_payment_order spo
+        <include refid="queryPaymentOrder"/>
+        ORDER BY spo.id_
         <include refid="global.limit"/>
     </select>
 
     <!-- 查询当前表的总记录数 -->
     <select id="queryCount" resultType="int">
-        SELECT COUNT(*)
-        FROM student_payment_order
+        SELECT COUNT(spo.id_) FROM student_payment_order spo
+        <include refid="queryPaymentOrder"/>
     </select>
 
+    <sql id="queryPaymentOrder">
+        <where>
+            <if test="orderStartDate != null">
+                AND spo.pay_time_ &gt;= #{orderStartDate}
+            </if>
+            <if test="orderEndDate != null">
+                AND spo.pay_time_ &lt;= #{orderEndDate}
+            </if>
+            <if test="paymentType != null">
+                AND spo.type_ = #{paymentType}
+            </if>
+            <if test="remark != null">
+                AND spo.memo_ LIKE CONCAT('%',#{remark},'%')
+            </if>
+            <if test="studentId != null">
+                AND spo.user_id_ = #{studentId}
+            </if>
+            <if test="paymentStatus != null">
+                AND spo.status_ = #{paymentStatus}
+            </if>
+        </where>
+    </sql>
+
     <select id="queryApplyGoodsList" resultMap="Goods" parameterType="map">
         select g.* from goods g where g.id_ in (SELECT spod.goods_id_list_ FROM student_payment_order spo left join
         student_payment_order_detail spod on spo.id_ = spod.payment_order_id_ where spo.music_group_id_ =

+ 13 - 21
mec-biz/src/main/resources/config/mybatis/TeacherAttendanceMapper.xml

@@ -97,6 +97,7 @@
     <resultMap id="teacherPersonalAttendance" type="com.ym.mec.biz.dal.dto.TeacherPersonalAttendanceDto">
         <result column="class_date_" property="classDate"/>
         <result column="start_class_time_" property="startClassTime"/>
+        <result column="class_date_" property="classDate"/>
         <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="name_" property="name"/>
         <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
@@ -108,48 +109,39 @@
             <if test="teacherId != null">
                 and ta.teacher_id_ = #{teacherId}
             </if>
-            <if test="musicGroupId != null">
-                and ta.music_group_id_ = #{musicGroupId}
+            <if test="courseStartDate != null">
+                and cs.class_date_ &gt;= #{courseStartDate}
             </if>
-            <if test="classGroupId != null">
-                and ta.class_group_id_ = #{classGroupId}
+            <if test="courseEndDate != null">
+                and cs.class_date_ &lt;= #{courseEndDate}
             </if>
-            <if test="attendanceStatus != null">
-                and ta.sign_in_status_ = #{attendanceStatus, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+            <if test="signInStatus != null">
+                and ta.sign_in_status_ = #{signInStatus}
             </if>
-            <if test="classGroupType != null">
-                and cg.type_ = #{classGroupType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+            <if test="courseScheduleType != null">
+                and cs.type_ = #{courseScheduleType}
             </if>
             <if test="classGroupName != null">
-                and cg.name_ like CONCAT('%',#{classGroupName},'%')
+                and cs.name_ like CONCAT('%',#{classGroupName},'%')
             </if>
         </where>
     </sql>
 
     <select id="getTeacherPersonalAttendances" parameterType="map" resultMap="teacherPersonalAttendance">
         SELECT
-            cs.class_date_,
-            cs.start_class_time_,
-            cg.name_,
-            cg.type_,
-            ta.sign_in_status_ status_,
-            ta.remark_
+            cs.class_date_,cs.start_class_time_,cs.name_,cs.type_,
+            ta.sign_in_status_ status_,ta.remark_
         FROM
             teacher_attendance ta
         LEFT JOIN course_schedule cs ON ta.course_schedule_id_=cs.id_
-        LEFT JOIN class_group cg ON ta.class_group_id_=cg.id_
         <include refid="queryCondition"/>
         ORDER BY class_date_ DESC
         <include refid="global.limit"/>
     </select>
 
     <select id="getTeacherPersonalAttendancesCount" resultType="int">
-        SELECT
-            count(ta.id_)
-        FROM
-          teacher_attendance ta
+        SELECT count(ta.id_) FROM teacher_attendance ta
         LEFT JOIN course_schedule cs ON ta.course_schedule_id_=cs.id_
-        LEFT JOIN class_group cg ON ta.class_group_id_=cg.id_
         <include refid="queryCondition"/>
     </select>
 

+ 15 - 2
mec-biz/src/main/resources/config/mybatis/TeacherDefaultMusicGroupSalaryMapper.xml

@@ -79,13 +79,26 @@
 
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="TeacherDefaultMusicGroupSalary" parameterType="map">
-		SELECT * FROM teacher_default_music_group_salary ORDER BY id_
+		SELECT * FROM teacher_default_music_group_salary tdmgs
+		<include refid="querySalary"/>
+		ORDER BY tdmgs.id_
 		<include refid="global.limit"/>
 	</select>
+	<sql id="querySalary">
+		<where>
+			<if test="teacherId != null">
+				AND tdmgs.user_id_ = #{teacherId}
+			</if>
+			<if test="settlementType != null">
+				AND tdmgs.settlement_type_ = #{settlementType}
+			</if>
+		</where>
+	</sql>
 
 	<!-- 查询当前表的总记录数 -->
 	<select id="queryCount" resultType="int">
-		SELECT COUNT(*) FROM teacher_default_music_group_salary
+		SELECT COUNT(id_) FROM teacher_default_music_group_salary tdmgs
+		<include refid="querySalary"/>
 	</select>
 
 	<!-- 根据user_id 获取老师的默认薪酬 -->

+ 5 - 1
mec-biz/src/main/resources/config/mybatis/TeacherLeaveRecordMapper.xml

@@ -9,6 +9,7 @@
 		<result column="user_id_" property="userId" />
 		<result column="days_" property="days" />
 		<result column="leave_category_id_" property="leaveCategoryId" />
+		<result column="leave_category_name_" property="leaveCategoryName" />
 		<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler" />
 		<result column="remark_" property="remark" />
 		<result column="create_time_" property="createTime" />
@@ -97,7 +98,10 @@
 
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="TeacherLeaveRecord" parameterType="map">
-		SELECT * FROM teacher_leave_record tlr
+		SELECT tlr.create_time_,tlr.start_time_,tlr.end_time_,tlr.remark_,tlr.id_,
+		lc.name_ leave_category_name_,lc.id_ leave_category_id_
+		FROM teacher_leave_record tlr
+		LEFT JOIN leave_category lc ON tlr.leave_category_id_ = lc.id_
 		<include refid="queryLeavePage"/>
 		ORDER BY tlr.id_
 		<include refid="global.limit" />

+ 4 - 0
mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -294,6 +294,10 @@
         <include refid="global.limit"/>
     </select>
 
+    <select id="findTeacherNoPay" resultType="decimal">
+        SELECT SUM(expect_salary_) FROM course_schedule_teacher_salary csts WHERE settlement_time_ IS NULL AND user_id_ = #{teacherId}
+    </select>
+
     <select id="findTeacherByMusicGroup" resultMap="com.ym.mec.biz.dal.dao.MusicGroupDao.BasicUserDto">
         SELECT
             su.id_ user_id_,

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

@@ -571,7 +571,7 @@
         LEFT JOIN vip_group_class_group_mapper vgcgm ON vg.id_ = vgcgm.vip_group_id_
         LEFT JOIN class_group cg ON cg.id_ = vgcgm.class_group_id_
         LEFT JOIN course_schedule cs ON cs.class_group_id_ = cg.id_
-        WHERE cs.actual_teacher_id_ = 6 AND cs.type_ = 'VIP' AND cg.del_flag_ = 0
+        WHERE cs.actual_teacher_id_ = #{teacherId} AND cs.type_ = 'VIP' AND cg.del_flag_ = 0
     </select>
 
     <resultMap type="com.ym.mec.biz.dal.dto.TeacherVipClassInfoDto" id="getTeacherVipClassMap">

+ 5 - 3
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherAttendanceController.java

@@ -4,6 +4,8 @@ import com.ym.mec.biz.dal.dto.TeacherSignOutDto;
 import com.ym.mec.biz.dal.entity.StudentAttendance;
 import com.ym.mec.biz.dal.page.TeacherAttendanceQueryInfo;
 import com.ym.mec.biz.service.ClassGroupService;
+import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
+import com.ym.mec.biz.service.ClassGroupService;
 import com.ym.mec.biz.service.StudentAttendanceService;
 import com.ym.mec.biz.service.TeacherAttendanceService;
 import com.ym.mec.common.controller.BaseController;
@@ -40,10 +42,10 @@ public class TeacherAttendanceController extends BaseController {
         return succeed(teacherAttendanceService.queryPage(queryInfo));
     }
 
-    @ApiOperation(value = "查询教师签到记录")
+    @ApiOperation(value = "查询教师签到(上课)记录")
     @GetMapping("/getTeacherPersonalAttendances")
-    public Object getTeacherPersonalAttendances(TeacherAttendanceQueryInfo queryInfo){
-        return teacherAttendanceService.getTeacherPersonalAttendances(queryInfo);
+    public Object getTeacherPersonalAttendances(TeacherCloseQueryInfo queryInfo){
+        return succeed(teacherAttendanceService.getTeacherPersonalAttendances(queryInfo));
     }
 
     @ApiOperation(value = "根据班级ID获取当前课程的学生")

+ 6 - 1
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherController.java

@@ -3,7 +3,6 @@ package com.ym.mec.teacher.controller;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.entity.Teacher;
-import com.ym.mec.biz.dal.entity.TeacherDefaultMusicGroupSalary;
 import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
 import com.ym.mec.biz.dal.page.TeacherQueryInfo;
 import com.ym.mec.biz.dal.page.VipClassQueryInfo;
@@ -113,4 +112,10 @@ public class TeacherController extends BaseController {
     public Object queryCloses(TeacherCloseQueryInfo queryInfo){
         return succeed(teacherService.queryCloses(queryInfo));
     }
+
+    @ApiOperation(value = "获取教师上课课酬未结算总额")
+    @GetMapping("/sumTeacherNoPay")
+    public Object findTeacherNoPay(Integer teacherId){
+        return succeed(teacherService.findTeacherNoPay(teacherId));
+    }
 }

+ 9 - 0
mec-web/src/main/java/com/ym/mec/web/controller/StudentManageController.java

@@ -1,5 +1,7 @@
 package com.ym.mec.web.controller;
 
+import com.ym.mec.biz.dal.page.TeacherPaymentRecordInfo;
+import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -77,4 +79,11 @@ public class StudentManageController extends BaseController {
         return succeed(studentManageService.getStudentAccountBaseInfo(userId));
     }
 
+    @ApiOperation(value = "获取学员扣费记录列表")
+    @GetMapping("/queryStudentPayment")
+    @PreAuthorize("@pcs.hasPermissions('studentManage/queryStudentPayment')")
+    public Object queryStudentPayment(TeacherPaymentRecordInfo queryInfo){
+        return succeed(studentManageService.queryStudentPayment(queryInfo));
+    }
+
 }

+ 29 - 0
mec-web/src/main/java/com/ym/mec/web/controller/student/StudentPaymentOrderController.java

@@ -0,0 +1,29 @@
+package com.ym.mec.web.controller.student;
+
+import com.ym.mec.biz.dal.page.StudentPaymentOrderQueryInfo;
+import com.ym.mec.biz.service.StudentPaymentOrderService;
+import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.page.QueryInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RequestMapping("studentPaymentOrder")
+@Api(tags = "学生缴费订单服务")
+@RestController
+public class StudentPaymentOrderController extends BaseController {
+
+    @Autowired
+    private StudentPaymentOrderService studentPaymentOrderService;
+
+    @ApiOperation(value = "获取学员订单列表")
+    @GetMapping("/queryOrderPage")
+    public Object queryOrderPage(StudentPaymentOrderQueryInfo queryInfo){
+        studentPaymentOrderService.queryOrderPage(queryInfo);
+        return succeed();
+    }
+
+}

+ 2 - 1
mec-web/src/main/java/com/ym/mec/web/controller/teacher/TeacherDefaultMusicGroupSalaryController.java

@@ -1,5 +1,6 @@
 package com.ym.mec.web.controller.teacher;
 
+import com.ym.mec.biz.dal.page.TeacherMusicGroupSalaryQueryInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 
@@ -34,7 +35,7 @@ public class TeacherDefaultMusicGroupSalaryController extends BaseController {
 
     @ApiOperation(value = "分页查询教师薪酬")
     @GetMapping("/queryPage")
-    public Object queryPage(QueryInfo queryInfo) {
+    public Object queryPage(TeacherMusicGroupSalaryQueryInfo queryInfo) {
         return succeed(teacherDefaultMusicGroupSalaryService.queryPage(queryInfo));
     }
 }

+ 3 - 9
mec-web/src/main/java/com/ym/mec/web/controller/teacher/TeacherLeaveRecordController.java

@@ -1,22 +1,17 @@
 package com.ym.mec.web.controller.teacher;
 
 import com.ym.mec.biz.dal.dto.TeacherLeaveRecordDto;
+import com.ym.mec.biz.dal.entity.TeacherLeaveRecord;
+import com.ym.mec.biz.service.TeacherLeaveRecordService;
+import com.ym.mec.common.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import com.ym.mec.biz.dal.entity.TeacherLeaveRecord;
-import com.ym.mec.biz.service.TeacherLeaveRecordService;
-import com.ym.mec.common.controller.BaseController;
-import com.ym.mec.common.page.QueryInfo;
-
 @RequestMapping("teacherLeaveRecord")
 @Api(tags = "教师请假记录服务")
 @RestController
@@ -37,5 +32,4 @@ public class TeacherLeaveRecordController extends BaseController {
     public Object queryPage(TeacherLeaveRecordDto queryInfo){
         return succeed(teacherLeaveRecordService.queryPage(queryInfo));
     }
-
 }