Pārlūkot izejas kodu

update 学生增加服务指标,运营指标标记

周箭河 5 gadi atpakaļ
vecāks
revīzija
bc57a86a6a

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleEvaluateMapper.xml

@@ -350,6 +350,7 @@
                  LEFT JOIN student s ON s.user_id_ = cssp.user_id_
         WHERE vg.organ_id_ >= 1
           AND s.operating_tag_ = 0
+          AND cs.is_lock_ != 1
           AND cs.teach_mode_ = 'ONLINE'
         GROUP BY vg.organ_id_
     </select>
@@ -364,6 +365,7 @@
         <if test="endDate != null">
             <![CDATA[AND CONCAT(cs.class_date_, ' ', cs.end_class_time_) < #{endDate}]]>
         </if>
+        AND cs.is_lock_ != 1
         AND cs.teach_mode_ = 'ONLINE'
         GROUP BY vg.organ_id_
     </select>
@@ -382,6 +384,7 @@
             AND FIND_IN_SET(cssp.user_id_,#{studentIds})
         </if>
         AND pg.buy_months_ >= 1
+        AND cs.is_lock_ != 1
         GROUP BY pg.organ_id_
     </select>
 </mapper>

+ 5 - 3
mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java

@@ -509,6 +509,8 @@ public class StudentOrderController extends BaseController {
             practiceAndVipBuyNums = courseScheduleEvaluateDao.getPracticeBuyNums(new Date(), null, studentIds);
         }
         Date startTime = DateUtil.getFirstDayOfMonth(new Date());
+        Date endTime = DateUtil.addMonths(startTime, 1);
+
 
         //当月新增网管课人数
         List<PracticeGroupsDto> monthOrganPracticeBuyMoneys = courseScheduleEvaluateDao.getMonthOrganMoney(OrderTypeEnum.PRACTICE_GROUP_BUY, startTime);
@@ -518,13 +520,13 @@ public class StudentOrderController extends BaseController {
         List<PracticeGroupsDto> monthOrganRenewMoneys = courseScheduleEvaluateDao.getMonthOrganMoney(OrderTypeEnum.PRACTICE_GROUP_RENEW, startTime);
 
         //本月总人数
-        List<Practice4OrganDto> nowMonthPracticeBuyNums = courseScheduleEvaluateDao.getPracticeBuyNums(startTime, null, null);
-        List<Practice4OrganDto> nowMonthVipBuyNums = courseScheduleEvaluateDao.getVipBuyNums(startTime, null);
+        List<Practice4OrganDto> nowMonthPracticeBuyNums = courseScheduleEvaluateDao.getPracticeBuyNums(startTime, endTime, null);
+        List<Practice4OrganDto> nowMonthVipBuyNums = courseScheduleEvaluateDao.getVipBuyNums(startTime, endTime);
         List<Practice4OrganDto> nowMonthPracticeAndVipBuyNums = new ArrayList<>();
 
         studentIds = vipBuyNums.stream().filter(practice4OrganDto -> practice4OrganDto.getOrganId() != null).map(Practice4OrganDto::getStudentIds).collect(Collectors.joining(","));
         if (!studentIds.isEmpty()) {
-            nowMonthPracticeAndVipBuyNums = courseScheduleEvaluateDao.getPracticeBuyNums(startTime, null, studentIds);
+            nowMonthPracticeAndVipBuyNums = courseScheduleEvaluateDao.getPracticeBuyNums(startTime, endTime, studentIds);
         }
 
         //上月总人数