zouxuan 1 rok pred
rodič
commit
c1b57dfb41

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java

@@ -2089,7 +2089,7 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
 
     CourseSchedule findByRoomUid(@Param("roomUid") String roomUid, @Param("type") GroupType type);
 
-    List<ExportCourseIncomeDto> exportCourseIncome(@Param("cutFirstDayOfMonth") String cutFirstDayOfMonth, @Param("cutLastDayOfMonth") String cutLastDayOfMonth);
+    List<ExportCourseIncomeDto> exportCourseIncome(@Param("firstDayOfMonth") String firstDayOfMonth, @Param("lastDayOfMonth") String lastDayOfMonth);
 
     List<CourseSchedule> getNotStartOnlineNoLive(@Param("beforeTime") Integer beforeTime, @Param("tenantInfoId") Integer tenantInfoId);
 

+ 6 - 80
mec-biz/src/main/java/com/ym/mec/biz/dal/page/CourseSalaryQueryInfo4Web.java

@@ -2,17 +2,23 @@ package com.ym.mec.biz.dal.page;
 
 import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.common.page.QueryInfo;
+import lombok.Data;
 
 /**
  * @Author Joburgess
  * @Date 2020/4/15
  */
+@Data
 public class CourseSalaryQueryInfo4Web extends QueryInfo {
 
     private Integer teacherId;
 
     private String month;
 
+    private String firstDayOfMonth;
+
+    private String lastDayOfMonth;
+
     private String organIdList;
 
     private GroupType groupType;
@@ -28,84 +34,4 @@ public class CourseSalaryQueryInfo4Web extends QueryInfo {
     private Integer confirmStatus;
 
     private Integer belongDaya;
-
-    public Integer getBelongDaya() {
-        return belongDaya;
-    }
-
-    public void setBelongDaya(Integer belongDaya) {
-        this.belongDaya = belongDaya;
-    }
-
-    public Integer getTeacherId() {
-        return teacherId;
-    }
-
-    public void setTeacherId(Integer teacherId) {
-        this.teacherId = teacherId;
-    }
-
-    public String getMonth() {
-        return month;
-    }
-
-    public void setMonth(String month) {
-        this.month = month;
-    }
-
-    public String getOrganIdList() {
-        return organIdList;
-    }
-
-    public void setOrganIdList(String organIdList) {
-        this.organIdList = organIdList;
-    }
-
-    public GroupType getGroupType() {
-        return groupType;
-    }
-
-    public void setGroupType(GroupType groupType) {
-        this.groupType = groupType;
-    }
-
-    public Long getCourseScheduleId() {
-        return courseScheduleId;
-    }
-
-    public void setCourseScheduleId(Long courseScheduleId) {
-        this.courseScheduleId = courseScheduleId;
-    }
-
-    public String getGroupName() {
-        return groupName;
-    }
-
-    public void setGroupName(String groupName) {
-        this.groupName = groupName;
-    }
-
-    public Integer getSignInStatus() {
-        return signInStatus;
-    }
-
-    public void setSignInStatus(Integer signInStatus) {
-        this.signInStatus = signInStatus;
-    }
-
-    public Integer getSignOutStatus() {
-        return signOutStatus;
-    }
-
-    public void setSignOutStatus(Integer signOutStatus) {
-        this.signOutStatus = signOutStatus;
-    }
-
-    public Integer getConfirmStatus() {
-        return confirmStatus;
-    }
-
-    public void setConfirmStatus(Integer confirmStatus) {
-        this.confirmStatus = confirmStatus;
-    }
 }

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleTeacherSalaryServiceImpl.java

@@ -991,6 +991,12 @@ public class CourseScheduleTeacherSalaryServiceImpl extends BaseServiceImpl<Long
     @Override
     public PageInfo<TeacherCourseSalaryDetail4WebDto> findIsSettlementCourseSalarys(CourseSalaryQueryInfo4Web queryInfo) {
         PageInfo<TeacherCourseSalaryDetail4WebDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
+        if(StringUtils.isNotEmpty(queryInfo.getMonth())){
+            String firstDayOfMonth = DateUtil.dateToString(DateUtil.getFirstDayOfMonth(DateUtil.stringToDate(queryInfo.getMonth(),DateUtil.ISO_YEAR_MONTH_FORMAT)),DateUtil.ISO_EXPANDED_DATE_FORMAT);
+            String lastDayOfMonth = DateUtil.dateToString(DateUtil.getLastDayOfMonth(DateUtil.stringToDate(queryInfo.getMonth(),DateUtil.ISO_YEAR_MONTH_FORMAT)),DateUtil.ISO_EXPANDED_DATE_FORMAT);
+            queryInfo.setFirstDayOfMonth(firstDayOfMonth);
+            queryInfo.setLastDayOfMonth(lastDayOfMonth);
+        }
         Map<String, Object> params = new HashMap<>();
         MapUtil.populateMap(params, queryInfo);
 

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

@@ -4488,7 +4488,7 @@
         select o.name_ organName,cs.id_ courseId,SUM(cssp.actual_price_) amount from course_schedule cs
         left join course_schedule_student_payment cssp ON cs.id_ = cssp.course_schedule_id_
         left join organization o ON o.id_ = cs.organ_id_
-        where cs.class_date_ BETWEEN #{cutFirstDayOfMonth} AND #{cutLastDayOfMonth} AND cssp.actual_price_ > 0
+        where cs.class_date_ BETWEEN #{firstDayOfMonth} AND #{lastDayOfMonth} AND cssp.actual_price_ > 0
           AND cs.del_flag_ = '0' AND cs.is_lock_ = 0 and cs.pre_course_flag_ != 1
           AND cs.tenant_id_ = 1
         group by cs.id_ order by cs.organ_id_;

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

@@ -911,8 +911,8 @@
 			<if test="groupName!=null">
 				AND cs.name_ LIKE CONCAT('%', #{groupName}, '%')
 			</if>
-			<if test="month!=null">
-				AND DATE_FORMAT(cs.class_date_, '%Y-%m') = #{month}
+			<if test="firstDayOfMonth != null and firstDayOfMonth != ''">
+				AND cs.class_date_ BETWEEN #{firstDayOfMonth} AND #{lastDayOfMonth}
 			</if>
 			<if test="organIdList != null and organIdList != ''">
 				AND FIND_IN_SET(t.organ_id_,#{organIdList})