ソースを参照

Merge branch 'saas' into 20220930

liujunchi 2 年 前
コミット
b89102bd43
31 ファイル変更598 行追加115 行削除
  1. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java
  2. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDao.java
  3. 13 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupPaymentBaseCalender.java
  4. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroup.java
  5. 17 5
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupPaymentCalender.java
  6. 32 32
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentVisit.java
  7. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ExportTypeEnum.java
  8. 11 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/page/MusicGroupQueryInfo.java
  9. 3 0
      mec-biz/src/main/java/com/ym/mec/biz/service/SysConfigService.java
  10. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/TeacherService.java
  11. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  12. 18 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  13. 1 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java
  14. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  15. 1 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/OrderPayOpsServiceImpl.java
  16. 1 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java
  17. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java
  18. 9 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantAssetsInfoServiceImpl.java
  19. 0 10
      mec-biz/src/main/resources/config/contracts/latest_contract_template.ftl
  20. 2 3
      mec-biz/src/main/resources/config/mybatis/CooperationOrganMapper.xml
  21. 4 0
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  22. 13 2
      mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml
  23. 9 2
      mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderMapper.xml
  24. 1 1
      mec-biz/src/main/resources/config/mybatis/StudentAttendanceMapper.xml
  25. 4 1
      mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml
  26. 2 2
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherCourseScheduleController.java
  27. 7 1
      mec-web/src/main/java/com/ym/mec/web/controller/ChargeTypeController.java
  28. 363 27
      mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java
  29. 1 1
      mec-web/src/main/java/com/ym/mec/web/controller/StudentInstrumentController.java
  30. 54 13
      mec-web/src/main/java/com/ym/mec/web/controller/StudentManageController.java
  31. 5 4
      mec-web/src/main/java/com/ym/mec/web/controller/TeacherController.java

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

@@ -7,6 +7,7 @@ import com.ym.mec.biz.dal.enums.CourseStatusEnum;
 import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.biz.dal.page.CourseDetailQueryInfo;
 import com.ym.mec.common.dal.BaseDAO;
+
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
@@ -1954,4 +1955,10 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
     * @date 2022/9/6 14:07
     */
     void markFreeCourse(@Param("courseIds") String courseIds);
+    
+    /**
+     * 查询已开课乐团列表
+     * @return
+     */
+    List<String> queryStartedCourseMusicGroupIdList(String groupType);
 }

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

@@ -488,7 +488,7 @@ public interface TeacherDao extends BaseDAO<Integer, Teacher> {
      * @param organId
      * @return
      */
-    List<TeacherBasicDto> findByFlowOrganRangeTeachers(@Param("organId") String organId,@Param("demissionFlag") Boolean demissionFlag);
+    List<TeacherBasicDto> findByFlowOrganRangeTeachers(@Param("organId") String organId,@Param("demissionFlag") Boolean demissionFlag,@Param("isForzenWithQueryCondition") Boolean isForzenWithQueryCondition);
 
     /**
      * 根据教师编号列表获取名称map

+ 13 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupPaymentBaseCalender.java

@@ -53,7 +53,10 @@ public class MusicGroupPaymentBaseCalender {
 
 	@ApiModelProperty(value = "进行中加学员拓展信息", required = false)
 	private CalenderAddStudent calenderAddStudent;
-
+	
+	@ApiModelProperty(value = "缴费项目显示状态", required = false)
+	private String paymentItemShowState;
+	
 	public Boolean getConfirmCreate() {
 		return confirmCreate;
 	}
@@ -181,4 +184,13 @@ public class MusicGroupPaymentBaseCalender {
 	public void setBatchNo(String batchNo) {
 		this.batchNo = batchNo;
 	}
+
+	public String getPaymentItemShowState() {
+		return paymentItemShowState;
+	}
+
+	public void setPaymentItemShowState(String paymentItemShowState) {
+		this.paymentItemShowState = paymentItemShowState;
+	}
+
 }

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroup.java

@@ -209,6 +209,9 @@ public class MusicGroup extends BaseEntity {
 	private Boolean isGiveAccessories;
 	
 	private ClassGroupTypeEnum extracurricularTeacher;
+	
+	@ApiModelProperty(value = "第一节课实际开始时间",required = false)
+	private Date firstCourseStartTime;
 
 	public String getMusicalInstrumentsProvideTime() {
 		return musicalInstrumentsProvideTime;
@@ -723,4 +726,12 @@ public class MusicGroup extends BaseEntity {
 	public void setExtracurricularTeacher(ClassGroupTypeEnum extracurricularTeacher) {
 		this.extracurricularTeacher = extracurricularTeacher;
 	}
+
+	public Date getFirstCourseStartTime() {
+		return firstCourseStartTime;
+	}
+
+	public void setFirstCourseStartTime(Date firstCourseStartTime) {
+		this.firstCourseStartTime = firstCourseStartTime;
+	}
 }

+ 17 - 5
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/MusicGroupPaymentCalender.java

@@ -1,17 +1,18 @@
 package com.ym.mec.biz.dal.entity;
 
-import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
-import com.ym.mec.biz.dal.enums.PeriodEnum;
-import com.ym.mec.common.entity.BaseEntity;
-import com.ym.mec.common.enums.BaseEnum;
 import io.swagger.annotations.ApiModelProperty;
-import org.apache.commons.lang3.builder.ToStringBuilder;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+import com.ym.mec.biz.dal.enums.CourseViewTypeEnum;
+import com.ym.mec.common.entity.BaseEntity;
+import com.ym.mec.common.enums.BaseEnum;
+
 /**
  * 对应数据库表(music_group_payment_calender):
  */
@@ -201,6 +202,9 @@ public class MusicGroupPaymentCalender extends BaseEntity {
 
 	@ApiModelProperty(value = "标记是否云教练缴费项目",required = false)
 	private Boolean cloudTeacherPaymentFlag = false;
+	
+	@ApiModelProperty(value = "缴费项目显示状态", required = false)
+	private String paymentItemShowState;
 
 	public Boolean getCloudTeacherPaymentFlag() {
 		return cloudTeacherPaymentFlag;
@@ -490,6 +494,14 @@ public class MusicGroupPaymentCalender extends BaseEntity {
 		this.attribute2 = attribute2;
 	}
 
+	public String getPaymentItemShowState() {
+		return paymentItemShowState;
+	}
+
+	public void setPaymentItemShowState(String paymentItemShowState) {
+		this.paymentItemShowState = paymentItemShowState;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 32 - 32
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/StudentVisit.java

@@ -13,7 +13,7 @@ import java.util.Date;
 public class StudentVisit extends BaseEntity {
 
     public enum VisiterTypeEnum implements BaseEnum<String, TeachModeEnum> {
-        TEACHER("TEACHER", "指导老师"), EDU_TEACHER("EDU_TEACHER", "教务老师");
+        TEACHER("TEACHER", "指导老师"), EDU_TEACHER("EDU_TEACHER", "乐团主管");
 
         private String code;
 
@@ -189,7 +189,7 @@ public class StudentVisit extends BaseEntity {
 
     private Long objectId;
 
-    private Integer probStatus;
+    private Integer probStatus = 0;
 
     private String visitCyCle;
 
@@ -197,30 +197,6 @@ public class StudentVisit extends BaseEntity {
     @ApiModelProperty(value = "回访图片", required = true)
     private String attachments;
 
-    public String getAttachments() {
-        return attachments;
-    }
-
-    public void setAttachments(String attachments) {
-        this.attachments = attachments;
-    }
-
-    public FeedbackTypeDescEnum getFeedbackTypeDesc() {
-        return feedbackTypeDesc;
-    }
-
-    public void setFeedbackTypeDesc(FeedbackTypeDescEnum feedbackTypeDesc) {
-        this.feedbackTypeDesc = feedbackTypeDesc;
-    }
-
-    public FeedbackTypeEnum getFeedbackType() {
-        return feedbackType;
-    }
-
-    public void setFeedbackType(FeedbackTypeEnum feedbackType) {
-        this.feedbackType = feedbackType;
-    }
-
     public Integer getId() {
         return id;
     }
@@ -233,6 +209,10 @@ public class StudentVisit extends BaseEntity {
         return musicGroupId;
     }
 
+    public void setMusicGroupId(String musicGroupId) {
+        this.musicGroupId = musicGroupId;
+    }
+
     public Integer getOrganId() {
         return organId;
     }
@@ -241,10 +221,6 @@ public class StudentVisit extends BaseEntity {
         this.organId = organId;
     }
 
-    public void setMusicGroupId(String musicGroupId) {
-        this.musicGroupId = musicGroupId;
-    }
-
     public Integer getStudentId() {
         return studentId;
     }
@@ -293,6 +269,22 @@ public class StudentVisit extends BaseEntity {
         this.overview = overview;
     }
 
+    public FeedbackTypeEnum getFeedbackType() {
+        return feedbackType;
+    }
+
+    public void setFeedbackType(FeedbackTypeEnum feedbackType) {
+        this.feedbackType = feedbackType;
+    }
+
+    public FeedbackTypeDescEnum getFeedbackTypeDesc() {
+        return feedbackTypeDesc;
+    }
+
+    public void setFeedbackTypeDesc(FeedbackTypeDescEnum feedbackTypeDesc) {
+        this.feedbackTypeDesc = feedbackTypeDesc;
+    }
+
     public String getFeedback() {
         return feedback;
     }
@@ -325,11 +317,11 @@ public class StudentVisit extends BaseEntity {
         this.objectId = objectId;
     }
 
-    public int getProbStatus() {
+    public Integer getProbStatus() {
         return probStatus;
     }
 
-    public void setProbStatus(int probStatus) {
+    public void setProbStatus(Integer probStatus) {
         this.probStatus = probStatus;
     }
 
@@ -340,4 +332,12 @@ public class StudentVisit extends BaseEntity {
     public void setVisitCyCle(String visitCyCle) {
         this.visitCyCle = visitCyCle;
     }
+
+    public String getAttachments() {
+        return attachments;
+    }
+
+    public void setAttachments(String attachments) {
+        this.attachments = attachments;
+    }
 }

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/ExportTypeEnum.java

@@ -7,7 +7,7 @@ public enum ExportTypeEnum implements BaseEnum<Integer, ExportTypeEnum> {
 	COURSE_SCHEDULE(1, "课表列表"),
 	ROUTE_ORDER(2, "财务管理"),
 	STUDENT_VIP_PRACTICE(3, "VIP网管课耗导出"),
-	STUDENT_MUSIC_THEORY_COURSE_INFO(4, "网管课学员课程信息导出"),
+	STUDENT_MUSIC_THEORY_COURSE_INFO(4, "乐理课学员课程导出"),
 	STUDENT_VIP_COURSE_INFO(5, "VIP课学员课程信息导出"),
 	VIP_STUDENT_COURSE_MANAGE(6, "vip学员课程管理"),
 	STUDENT_SMALL_CLASS_STATISTICS(7, "学员小课数据统计"),

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/MusicGroupQueryInfo.java

@@ -48,6 +48,9 @@ public class MusicGroupQueryInfo extends QueryInfo {
     private Date billStartDate;
     
     private Date billEndDate;
+    
+    @ApiModelProperty(value = "是否开课")
+    private Boolean isStartedCourse;
 
     @ApiModelProperty(value = "维修技师")
     private Integer repairUserId;
@@ -187,4 +190,12 @@ public class MusicGroupQueryInfo extends QueryInfo {
 	public void setBillEndDate(Date billEndDate) {
 		this.billEndDate = billEndDate;
 	}
+
+	public Boolean getIsStartedCourse() {
+		return isStartedCourse;
+	}
+
+	public void setIsStartedCourse(Boolean isStartedCourse) {
+		this.isStartedCourse = isStartedCourse;
+	}
 }

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SysConfigService.java

@@ -393,6 +393,9 @@ public interface SysConfigService extends BaseService<Long, SysConfig> {
 
     //平台收款账户
     String PLATFORM_PAYEE_ACCOUNT = "platform_payee_account";
+    
+    //机构云教室账户余额提醒
+    String TENANT_CLOUD_ROOM_BALANCE_NOTICE = "tenant_cloud_room_balance_notice_";
 
     static Date checkActivityDate(String startTimeStr, String endTimeStr) {
         Date now = new Date();

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

@@ -101,7 +101,7 @@ public interface TeacherService extends BaseService<Integer, Teacher> {
      * @param organId
      * @return
      */
-    List<TeacherBasicDto> findTeachers(String organId,Boolean demissionFlag);
+    List<TeacherBasicDto> findTeachers(String organId,Boolean demissionFlag, Boolean isForzenWithQueryCondition);
 
     /**
      * @param subjectId: 科目编号

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

@@ -4379,7 +4379,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         List<Map<Integer, BigDecimal>> surplusCourseFeeMapList = new ArrayList<>();
         List<Map<String, String>> classGroupStudents = (List<Map<String, String>>) JSON.parse(classGroupStudentMap);
         //班级列表
-        List<Integer> classGroupIds = classGroupStudents.stream().map(e -> Integer.parseInt(e.keySet().iterator().next())).collect(Collectors.toList());
+        /*List<Integer> classGroupIds = classGroupStudents.stream().map(e -> Integer.parseInt(e.keySet().iterator().next())).collect(Collectors.toList());
         classGroupIds.add(masterClassGroupId);
         List<ClassGroup> byClassGroupIds = classGroupDao.findByClassGroupIds(classGroupIds, null);
         long count = byClassGroupIds.stream().map(e -> e.getMusicGroupId()).distinct().count();
@@ -4390,7 +4390,7 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
             if (musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE) {
                 throw new BizException("操作失败:主班乐团不能是系统收费团");
             }
-        }
+        }*/
         //学员剩余课程价值
         Map<Integer, BigDecimal> classGroupTotalPrice = new HashMap<>();
         //主班剩余课程价值

+ 18 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -4070,6 +4070,9 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
     public List<Long> updateCourseScheduleToOverStatus() {
 
         Date date = new Date();
+        //查询所有已上课乐团
+        List<String> musicGroupIdList = courseScheduleDao.queryStartedCourseMusicGroupIdList(GroupType.MUSIC.getCode());
+        
         //自动更新课程状态至“已结束”
         List<CourseSchedule> list = courseScheduleDao.queryFinishedWithNoUpdateStatus();
 
@@ -4090,6 +4093,21 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
             if (courseSchedule.getGroupType() == GroupType.VIP) {
                 courseScheduleIdList.add(courseSchedule.getId());
             }
+            
+            if(courseSchedule.getGroupType() == GroupType.MUSIC){
+            	if(!musicGroupIdList.contains(courseSchedule.getMusicGroupId())){
+            		//乐团第一次上课
+            		MusicGroup musicGroup = musicGroupDao.get(courseSchedule.getMusicGroupId());
+            		if(musicGroup != null){
+            			musicGroup.setFirstCourseStartTime(courseSchedule.getClassDate());
+            			musicGroup.setGroupMemberNum(courseScheduleStudentPaymentDao.countStudentNum(courseSchedule.getId().intValue()));
+            			
+            			musicGroupDao.update(musicGroup);
+            		}
+            		
+            		musicGroupIdList.add(courseSchedule.getMusicGroupId());
+            	}
+            }
         }
 
 		if (updateList.size() > 0) {

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java

@@ -338,6 +338,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
         musicGroupPaymentCalender.setOriginalTotalAmount(originalTotalAmount);
         musicGroupPaymentCalender.setStatus(status);
         musicGroupPaymentCalender.setOrganId(musicGroup.getOrganId());
+        musicGroupPaymentCalender.setPaymentItemShowState(musicGroupPaymentBaseCalender.getPaymentItemShowState());
 
         if (musicGroupPaymentCalender.getStatus() != AUDITING) {
             if (date.after(musicGroupPaymentCalender.getStartPaymentDate())) {

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

@@ -1497,9 +1497,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "确认开团(筹备中 -> 进行中)", sysUser.getId(), ""));
         musicGroup.setStatus(MusicGroupStatusEnum.PROGRESS);
         //获取所有已缴费学员人数
-        List<StudentRegistration> studentRegistrations = studentRegistrationDao.queryStudentByMusicGroupId(musicGroupId);
+        //List<StudentRegistration> studentRegistrations = studentRegistrationDao.queryStudentByMusicGroupId(musicGroupId);
         studentRegistrationDao.updateOriginalFlag(musicGroupId);
-        musicGroup.setGroupMemberNum(studentRegistrations == null ? 0 : studentRegistrations.size());
+        //musicGroup.setGroupMemberNum(studentRegistrations == null ? 0 : studentRegistrations.size());
         musicGroup.setBillStartDate(new Date());
         musicGroupDao.update(musicGroup);
         //获取乐团班级列表

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/OrderPayOpsServiceImpl.java

@@ -273,6 +273,7 @@ public class OrderPayOpsServiceImpl implements OrderPayOpsService {
             throw new BizException("微信支付请先授权");
         }
         String wxMpOAuth2AccessTokenUrl = String.format(ConfigInit.wxMpOAuth2AccessTokenUrl, hfMerchantConfig.getWxAppId(), hfMerchantConfig.getWxAppSecret(), code);
+        log.info("请求微信授权接口的参数:{}", wxMpOAuth2AccessTokenUrl);
         Map<String, String> weChatRes = JSON.parseObject(HttpUtil.get(wxMpOAuth2AccessTokenUrl, new HashMap<>()), Map.class);
         if (!weChatRes.containsKey("openid")) {
         	log.error("获取微信openId失败:[{}]",JsonUtil.toJSONString(weChatRes));

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentPaymentOrderServiceImpl.java

@@ -1146,6 +1146,7 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen
         studentPaymentOrderService.update(studentPaymentOrder);
         studentPaymentOrder.setVersion(studentPaymentOrder.getVersion() + 1);
 
+        studentPaymentOrder.setVersion(0);
         studentGoodsSell.setCouponMarketAmount(studentPaymentOrder.getCouponRemitFee());
         studentGoodsSell.setOrganId(student.getOrganId());
         studentGoodsSell.setTotalAmount(studentPaymentOrder.getActualAmount());

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

@@ -459,8 +459,8 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher> implem
     }
 
     @Override
-    public List<TeacherBasicDto> findTeachers(String organId,Boolean demissionFlag) {
-        return teacherDao.findByFlowOrganRangeTeachers(organId,demissionFlag);
+    public List<TeacherBasicDto> findTeachers(String organId,Boolean demissionFlag, Boolean isForzenWithQueryCondition) {
+        return teacherDao.findByFlowOrganRangeTeachers(organId,demissionFlag,isForzenWithQueryCondition);
     }
 
     @Override

+ 9 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TenantAssetsInfoServiceImpl.java

@@ -49,6 +49,9 @@ public class TenantAssetsInfoServiceImpl extends ServiceImpl<TenantAssetsInfoDao
     private TenantInfoService tenantInfoService;
     @Autowired
     private SysMessageService sysMessageService;
+    
+    @Autowired
+    private SysConfigService sysConfigService;
 
     private final Predicate<String> VipPredicate = (o) -> Objects.equals(o, CourseSchedule.CourseScheduleType.VIP.getCode());
 
@@ -175,7 +178,12 @@ public class TenantAssetsInfoServiceImpl extends ServiceImpl<TenantAssetsInfoDao
     private void sendMsg(Integer tenantId, BigDecimal balance, BigDecimal after) {
         TenantInfo t = tenantInfoService.getById(tenantId);
         //当前余额大于300 并且 本次扣除后剩余额度小于300
-        BigDecimal threeHundred = new BigDecimal(300);
+        int balanceThresholdValue = 300;
+        SysConfig config = sysConfigService.findByParamName(SysConfigService.TENANT_CLOUD_ROOM_BALANCE_NOTICE);
+        if(config != null && StringUtils.isNotBlank(config.getParanValue())){
+        	balanceThresholdValue = Integer.parseInt(config.getParanValue());
+        }
+        BigDecimal threeHundred = new BigDecimal(balanceThresholdValue);
         if (balance.compareTo(threeHundred) >= 0 && after.compareTo(threeHundred) < 0) {
 
             //邮件

+ 0 - 10
mec-biz/src/main/resources/config/contracts/latest_contract_template.ftl

@@ -99,16 +99,6 @@
                 <div class="iInfo">
                     <span>学生姓名:${studentInfo.username!}</span>
                 </div>
-                <#if studentInfo.grade?default("")?trim?length gt 1>
-                <div class="iInfo">
-                    <span>所在班级:${studentInfo.grade!} ${studentInfo.clazz!}</span>
-                </div>
-                </#if>
-                <#if studentInfo.subject.name?default("")?trim?length gt 1>
-                <div class="iInfo">
-                    <span>所在声部:${studentInfo.subject.name!}</span>
-                </div>
-                </#if>
             </div>
         </div>
         <div>(本协议中“乙方“指学员及家长;”乙方学员“指购买甲方产品或服务的学员;”乙方家长“仅指乙方学员的法定监护人。)</div>

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

@@ -115,7 +115,7 @@
         LEFT JOIN organization o ON co.organ_id_ = o.id_
         LEFT JOIN sys_user su ON su.id_ = co.education_user_id_
         <include refid="queryPageSql"/>
-        ORDER BY co.update_time_ DESC
+        ORDER BY co.name_ DESC
         <include refid="global.limit"/>
     </select>
 
@@ -123,8 +123,7 @@
         <where>
             co.del_flag_ != 1
             <if test="search != null">
-                AND (co.education_user_id_ = #{search} OR su.real_name_ LIKE CONCAT('%',#{search},'%')
-                OR co.id_ LIKE CONCAT('%',#{search},'%') OR co.name_ LIKE CONCAT('%',#{search},'%'))
+                AND (su.real_name_ LIKE CONCAT('%',#{search},'%') OR co.name_ LIKE CONCAT('%',#{search},'%'))
             </if>
             <if test="organId != null">
                 AND FIND_IN_SET(co.organ_id_,#{organId})

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

@@ -4079,4 +4079,8 @@
             </if>
         </if>
     </select>
+    
+    <select id="queryStartedCourseMusicGroupIdList" resultType="java.lang.String">
+		select distinct cs.music_group_id_ from course_schedule cs where cs.group_type_ = #{groupType} and cs.status_ = 'OVER'
+    </select>
 </mapper>

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

@@ -16,6 +16,7 @@
         <result column="course_form_" property="courseForm"/>
         <result column="create_time_" property="createTime"/>
         <result column="update_time_" property="updateTime"/>
+        <result column="first_course_start_time_" property="firstCourseStartTime"/>
         <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="extracurricular_teacher_" property="extracurricularTeacher" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="bill_start_date_" property="billStartDate"/>
@@ -108,7 +109,7 @@
                  settlement_type_, cooperation_organ_id_, enlightenment_course_time_,
                  parent_meeting_time_, img_, director_user_id_, is_classroom_lessons_, memo_, expect_start_group_date_,
                  ownership_type_, repair_user_id_, del_flag_, payment_valid_start_date_, payment_valid_end_date_,
-                 payment_pattern_, course_view_type_, transaction_teacher_id_,homework_push_flag_,member_course_show_flag_,tenant_id_,is_give_accessories_,extracurricular_teacher_)
+                 payment_pattern_, course_view_type_, transaction_teacher_id_,homework_push_flag_,member_course_show_flag_,tenant_id_,is_give_accessories_,extracurricular_teacher_,first_course_start_time_)
         VALUES (#{id}, #{name}, #{organId}, #{schoolId}, #{applyExpireDate}, #{preApplyExpireDate}, #{teamTeacherId},
                 #{educationalTeacherId},
                 #{chargeTypeId}, #{courseForm}, now(), now(),
@@ -120,7 +121,8 @@
                 #{isClassroomLessons}, #{memo}, #{expectStartGroupDate},
                 #{ownershipType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{repairUserId},
                 #{delFlag}, #{paymentValidStartDate}, #{paymentValidEndDate}, #{paymentPattern},
-                #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{transactionTeacherId},#{homeworkPushFlag},#{memberCourseShowFlag},#{tenantId},#{isGiveAccessories},#{extracurricularTeacher,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
+                #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}, #{transactionTeacherId},#{homeworkPushFlag},#{memberCourseShowFlag},#{tenantId},#{isGiveAccessories},
+                #{extracurricularTeacher,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{firstCourseStartTime})
     </insert>
 
     <!-- 根据主键查询一条记录 -->
@@ -241,6 +243,9 @@
             <if test="extracurricularTeacher != null">
                 extracurricular_teacher_ = #{extracurricularTeacher,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
             </if>
+            <if test="firstCourseStartTime != null">
+                first_course_start_time_ = #{firstCourseStartTime},
+            </if>
         </set>
         WHERE id_ = #{id}
     </update>
@@ -315,6 +320,12 @@
             <if test="billEndDate!=null">
                 AND date(mg.bill_start_date_) &lt;= #{billEndDate}
             </if>
+            <if test="isStartedCourse != null and isStartedCourse == true">
+                AND first_course_start_time_ is not null
+            </if>
+            <if test="isStartedCourse != null and isStartedCourse == false">
+                AND first_course_start_time_ is null
+            </if>
         </where>
     </sql>
 

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

@@ -39,6 +39,7 @@
         <result column="member_valid_date_" property="memberValidDate"/>
         <result column="current_total_amount_" property="currentTotalAmount"/>
         <result column="original_total_amount_" property="originalTotalAmount"/>
+        <result column="payment_item_show_state_" property="paymentItemShowState"/>
     </resultMap>
 
     <!-- 根据主键查询一条记录 -->
@@ -59,14 +60,14 @@
         actual_num_,memo_,is_give_music_network_,create_time_,update_time_,payment_valid_start_date_,payment_valid_end_date_,
         payment_pattern_,payment_type_,payment_amount_,batch_no_,audit_memo_,operator_,attribute1_,
          attribute2_,student_ids_,member_payment_amount_,member_rank_setting_id_,member_valid_date_
-         ,original_member_payment_amount_,current_total_amount_,original_total_amount_,tenant_id_,organ_id_,cloud_teacher_payment_flag_)
+         ,original_member_payment_amount_,current_total_amount_,original_total_amount_,tenant_id_,organ_id_,cloud_teacher_payment_flag_,payment_item_show_state_)
         VALUES(#{musicGroupId},#{musicGroupOrganizationCourseSettingId},#{payUserType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
         #{rejectReason},#{startPaymentDate},#{deadlinePaymentDate},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
         #{expectNum},#{actualNum},#{memo},#{isGiveMusicNetwork},now(),now(),
         #{paymentValidStartDate},#{paymentValidEndDate},#{paymentPattern},#{paymentType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
         #{paymentAmount},#{batchNo},#{auditMemo},#{operator},#{attribute1},#{attribute2},#{studentIds},
                #{memberPaymentAmount},#{memberRankSettingId},#{memberValidDate},#{originalMemberPaymentAmount},
-               #{currentTotalAmount},#{originalTotalAmount},#{tenantId},#{organId},#{cloudTeacherPaymentFlag})
+               #{currentTotalAmount},#{originalTotalAmount},#{tenantId},#{organId},#{cloudTeacherPaymentFlag},#{paymentItemShowState})
     </insert>
 
 
@@ -156,6 +157,9 @@
             <if test="attribute2 != null">
                 attribute2_ = #{attribute2},
             </if>
+            <if test="paymentItemShowState != null">
+                payment_item_show_state_ = #{paymentItemShowState},
+            </if>
         </set>
         WHERE id_ = #{id} and tenant_id_ = #{tenantId}
     </update>
@@ -239,6 +243,9 @@
 	            <if test="item.attribute2 != null">
 	                attribute2_ = #{item.attribute2},
 	            </if>
+	            <if test="item.paymentItemShowState != null">
+	                payment_item_show_state_ = #{item.paymentItemShowState},
+	            </if>
 	        </set>
 	        WHERE id_ = #{item.id} and tenant_id_ = #{item.tenantId}
 		</foreach>

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

@@ -471,7 +471,7 @@
     
     <select id="findStudentAttendance" resultMap="StudentAttendance">
         SELECT cssp.id_,cssp.course_schedule_id_,cssp.user_id_,cssp.group_type_,cssp.music_group_id_,sa.sign_in_time_,sa.sign_out_time_,
-               CASE WHEN sa.status_ IS NULL THEN 'TRUANT' ELSE sa.status_ END status_,
+               CASE WHEN sa.status_ IS NULL and cs.status_ = 'OVER' THEN 'TRUANT' ELSE sa.status_ END status_,
         su.username_,su.phone_,su.avatar_,cs.teach_mode_,cs.type_ course_type_,o.name_ organ_name_,tu.real_name_ teacher_name_,tu.avatar_ teacher_avatar_,
         cs.name_ course_schedule_name_,cs.status_ course_status_,
         cs.actual_teacher_id_ teacher_id_,cs.class_date_ ,cs.start_class_time_,cs.end_class_time_ ,cs.new_course_id_,

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

@@ -937,11 +937,14 @@
     <select id="findByFlowOrganRangeTeachers" resultMap="TeacherBasicDto">
         SELECT su.id_,su.username_,su.real_name_,t.organ_id_ FROM teacher t
         LEFT JOIN sys_user su ON t.id_ = su.id_
-        WHERE su.del_flag_ = 0 AND su.lock_flag_ = 0
+        WHERE su.del_flag_ = 0
             AND (INTE_ARRAY(#{organId},t.flow_organ_range_) OR FIND_IN_SET(t.organ_id_,#{organId}))
         <if test="demissionFlag != null and demissionFlag == false">
             AND t.demission_date_ IS NULL
         </if>
+        <if test="isForzenWithQueryCondition == null or isForzenWithQueryCondition == false">
+        	 AND su.lock_flag_ = 0
+        </if>
     </select>
 
     <select id="findByTeacherIds" resultMap="Teacher">

+ 2 - 2
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherCourseScheduleController.java

@@ -203,9 +203,9 @@ public class TeacherCourseScheduleController extends BaseController {
         if(Objects.isNull(oldCourseSchedule.getTenantId())){
             return failed("课程机构信息异常");
         }
-        if(oldCourseSchedule.getGroupType() != GroupType.VIP){
+        /*if(oldCourseSchedule.getGroupType() != GroupType.VIP){
         	return failed("客户端只能调整VIP课");
-        }
+        }*/
         Date now = new Date();
         if(now.compareTo(oldCourseSchedule.getStartClassTime())>0){
             throw new BizException("进行中或已结束课程不可调整");

+ 7 - 1
mec-web/src/main/java/com/ym/mec/web/controller/ChargeTypeController.java

@@ -5,16 +5,20 @@ import com.ym.mec.biz.service.ChargeTypeService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.page.QueryInfo;
+import com.ym.mec.common.tenant.TenantContextHolder;
 import com.yonge.log.model.AuditLogAnnotation;
+
 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.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 @RequestMapping("chargeType")
 @Api(tags = "收费类型服务")
@@ -53,7 +57,9 @@ public class ChargeTypeController extends BaseController {
     @GetMapping("/findAll")
     @PreAuthorize("@pcs.hasPermissions('chargeType/findAll')")
     public HttpResponseResult<List<ChargeType>> findAll() {
-        return succeed(chargeTypeService.findAll(new HashMap<>()));
+    	Map<String, Object> params = new HashMap<String, Object>();
+    	params.put("tenantId", TenantContextHolder.getTenantId());
+        return succeed(chargeTypeService.findAll(params));
     }
 
 }

+ 363 - 27
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -1,14 +1,219 @@
 package com.ym.mec.web.controller;
 
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.annotation.GetMapping;
+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;
+
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.dao.*;
-import com.ym.mec.biz.dal.dto.*;
-import com.ym.mec.biz.dal.entity.*;
-import com.ym.mec.biz.dal.enums.*;
-import com.ym.mec.biz.dal.page.*;
+import com.ym.mec.biz.dal.dao.CourseScheduleDao;
+import com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao;
+import com.ym.mec.biz.dal.dao.MusicGroupDao;
+import com.ym.mec.biz.dal.dao.PracticeGroupDao;
+import com.ym.mec.biz.dal.dao.StudentDao;
+import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
+import com.ym.mec.biz.dal.dao.SysUserCashAccountDetailDao;
+import com.ym.mec.biz.dal.dao.SysUserCoursesAccountDetailDao;
+import com.ym.mec.biz.dal.dao.TempBuyFreeLiveTheoryCourseDao;
+import com.ym.mec.biz.dal.dao.VipGroupDao;
+import com.ym.mec.biz.dal.dto.ChildrenStatisticsDetailDto;
+import com.ym.mec.biz.dal.dto.ClassGroupTeachersDto;
+import com.ym.mec.biz.dal.dto.CloudTeacherActiveTargetDetailDto;
+import com.ym.mec.biz.dal.dto.CloudTeacherActiveTargetDto;
+import com.ym.mec.biz.dal.dto.CourseGroupExportDto;
+import com.ym.mec.biz.dal.dto.CourseReviewDto;
+import com.ym.mec.biz.dal.dto.DoubleEleven2021Dto;
+import com.ym.mec.biz.dal.dto.DoubleEleven2021OrderDetailDto;
+import com.ym.mec.biz.dal.dto.EduOrganStudentDataDto;
+import com.ym.mec.biz.dal.dto.EduOrganStudentListExportDto;
+import com.ym.mec.biz.dal.dto.ExportDto;
+import com.ym.mec.biz.dal.dto.ExportStudentAttendanceDto;
+import com.ym.mec.biz.dal.dto.ExportTeacherSalaryDto;
+import com.ym.mec.biz.dal.dto.ExportVipGroupActivityDto;
+import com.ym.mec.biz.dal.dto.ExtraExerciseStudentsDto;
+import com.ym.mec.biz.dal.dto.IndexErrorDataExportDto;
+import com.ym.mec.biz.dal.dto.MusicArrearageStudentDto;
+import com.ym.mec.biz.dal.dto.MusicGroupCourseScheduleDto;
+import com.ym.mec.biz.dal.dto.MusicGroupPaymentCalenderAuditDto;
+import com.ym.mec.biz.dal.dto.MusicGroupPaymentCalenderDetailDto;
+import com.ym.mec.biz.dal.dto.MusicGroupStudentsDto;
+import com.ym.mec.biz.dal.dto.MusicalListDetailDto;
+import com.ym.mec.biz.dal.dto.NoClassMusicStudentDto;
+import com.ym.mec.biz.dal.dto.OrderByTypeExportDto;
+import com.ym.mec.biz.dal.dto.OrganDoubleEleven2021StatisDto;
+import com.ym.mec.biz.dal.dto.PageInfoDegree;
+import com.ym.mec.biz.dal.dto.PracticeCourseDto;
+import com.ym.mec.biz.dal.dto.PracticeGroupDto;
+import com.ym.mec.biz.dal.dto.Student4operating;
+import com.ym.mec.biz.dal.dto.StudentApplyDetailDto;
+import com.ym.mec.biz.dal.dto.StudentBuyPracticeDto;
+import com.ym.mec.biz.dal.dto.StudentErrorLeaveDto;
+import com.ym.mec.biz.dal.dto.StudentExercisesSituationDto;
+import com.ym.mec.biz.dal.dto.StudentManageListDto;
+import com.ym.mec.biz.dal.dto.StudentVisitDto;
+import com.ym.mec.biz.dal.dto.TeacherCourseSalaryDetail4WebDto;
+import com.ym.mec.biz.dal.dto.TeacherDefaultSalaryDto;
+import com.ym.mec.biz.dal.dto.TeacherSalaryDto;
+import com.ym.mec.biz.dal.dto.TeacherServeDto;
+import com.ym.mec.biz.dal.dto.TeacherStudentDataDto;
+import com.ym.mec.biz.dal.dto.VipBuyResultDto;
+import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
+import com.ym.mec.biz.dal.entity.CooperationOrgan;
+import com.ym.mec.biz.dal.entity.DegreeRegistration;
+import com.ym.mec.biz.dal.entity.EmployeeInfo;
+import com.ym.mec.biz.dal.entity.Goods;
+import com.ym.mec.biz.dal.entity.ManagerDownload;
+import com.ym.mec.biz.dal.entity.MusicEnlightenmentQuestionnaire;
+import com.ym.mec.biz.dal.entity.MusicGroup;
+import com.ym.mec.biz.dal.entity.MusicGroupQuit;
+import com.ym.mec.biz.dal.entity.SellOrder;
+import com.ym.mec.biz.dal.entity.SporadicChargeInfo;
+import com.ym.mec.biz.dal.entity.Student;
+import com.ym.mec.biz.dal.entity.StudentAttendance;
+import com.ym.mec.biz.dal.entity.SysMusicScore;
+import com.ym.mec.biz.dal.entity.SysUserCashAccountDetail;
+import com.ym.mec.biz.dal.entity.SysUserCoursesAccountDetail;
+import com.ym.mec.biz.dal.entity.Teacher;
+import com.ym.mec.biz.dal.entity.TeacherCourseReward;
+import com.ym.mec.biz.dal.entity.TeacherCourseStatistics;
+import com.ym.mec.biz.dal.entity.TeacherSalaryComplaints;
+import com.ym.mec.biz.dal.entity.TempBuyFreeLiveTheoryCourse;
+import com.ym.mec.biz.dal.entity.TenantPaymentOrder;
+import com.ym.mec.biz.dal.entity.VipGroup;
+import com.ym.mec.biz.dal.enums.AccountType;
+import com.ym.mec.biz.dal.enums.CourseStatusEnum;
+import com.ym.mec.biz.dal.enums.ExamSongTypeEnum;
+import com.ym.mec.biz.dal.enums.ExportEnum;
+import com.ym.mec.biz.dal.enums.ExportTypeEnum;
+import com.ym.mec.biz.dal.enums.GroupType;
+import com.ym.mec.biz.dal.enums.IndexErrorType;
+import com.ym.mec.biz.dal.enums.KitGroupPurchaseTypeEnum;
+import com.ym.mec.biz.dal.enums.LevelEnum;
+import com.ym.mec.biz.dal.enums.OrderTypeEnum;
+import com.ym.mec.biz.dal.enums.PaymentChannelEnum;
+import com.ym.mec.biz.dal.enums.PaymentStatusEnum;
+import com.ym.mec.biz.dal.enums.TeachTypeEnum;
+import com.ym.mec.biz.dal.enums.YesOrNoEnum;
+import com.ym.mec.biz.dal.page.ArrearageStudentsQueryInfo;
+import com.ym.mec.biz.dal.page.ChildrenReserveQueryInfo;
+import com.ym.mec.biz.dal.page.ClassGroupQueryInfo;
+import com.ym.mec.biz.dal.page.CloudTeacherActiveQueryInfo;
+import com.ym.mec.biz.dal.page.CooperationOrganQueryInfo;
+import com.ym.mec.biz.dal.page.CourseReviewQueryInfo;
+import com.ym.mec.biz.dal.page.CourseSalaryQueryInfo4Web;
+import com.ym.mec.biz.dal.page.CourseScheduleTeacherSalaryQueryInfo;
+import com.ym.mec.biz.dal.page.DegreeQueryInfo;
+import com.ym.mec.biz.dal.page.DoubleEleven2021QueryInfo;
+import com.ym.mec.biz.dal.page.EmployeeInfoQueryInfo;
+import com.ym.mec.biz.dal.page.EndCourseScheduleQueryInfo;
+import com.ym.mec.biz.dal.page.ExportStudentAttendanceQueryInfo;
+import com.ym.mec.biz.dal.page.ExportTeacherSalaryQueryInfo;
+import com.ym.mec.biz.dal.page.ExportUserAccountQueryInfo;
+import com.ym.mec.biz.dal.page.ExtraExercilseReplyQueryInfo;
+import com.ym.mec.biz.dal.page.GoodsQueryInfo;
+import com.ym.mec.biz.dal.page.IndexErrRecordQueryInfo;
+import com.ym.mec.biz.dal.page.LiveBroadcastRoomMemberQueryInfo;
+import com.ym.mec.biz.dal.page.MusicCalenderDetailQueryInfo;
+import com.ym.mec.biz.dal.page.MusicEnlightenmentQuestionnaireQueryInfo;
+import com.ym.mec.biz.dal.page.MusicGroupPaymentCalenderQueryInfo;
+import com.ym.mec.biz.dal.page.MusicGroupQueryInfo;
+import com.ym.mec.biz.dal.page.MusicGroupQuitQueryInfo;
+import com.ym.mec.biz.dal.page.MusicGroupStudentQueryInfo;
+import com.ym.mec.biz.dal.page.NoClassMusicStudentQueryInfo;
+import com.ym.mec.biz.dal.page.OrganCloudStudyStudentDataQueryInfo;
+import com.ym.mec.biz.dal.page.PracticeGroupQueryInfo;
+import com.ym.mec.biz.dal.page.SellOrderQueryInfo;
+import com.ym.mec.biz.dal.page.SporadicChargeInfoQueryInfo;
+import com.ym.mec.biz.dal.page.StudentAttendanceQueryInfo;
+import com.ym.mec.biz.dal.page.StudentBuyPracticeQueryInfo;
+import com.ym.mec.biz.dal.page.StudentErrorLeaveQueryInfo;
+import com.ym.mec.biz.dal.page.StudentExercisesSituationQueryInfo;
+import com.ym.mec.biz.dal.page.StudentManageQueryInfo;
+import com.ym.mec.biz.dal.page.StudentOperatingQueryInfo;
+import com.ym.mec.biz.dal.page.StudentQueryInfo;
+import com.ym.mec.biz.dal.page.StudentRegistrationQueryInfo;
+import com.ym.mec.biz.dal.page.StudentVisitQueryInfo;
+import com.ym.mec.biz.dal.page.SysExamSongQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherCourseRewardQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherCourseStatisticsQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherSalaryModifyQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherServeQueryInfo;
+import com.ym.mec.biz.dal.page.TenantPaymentOrderQueryInfo;
+import com.ym.mec.biz.dal.page.VipGroupActivityQueryInfo;
+import com.ym.mec.biz.dal.page.VipGroupQueryInfo;
+import com.ym.mec.biz.dal.page.queryMusicGroupCourseScheduleQueryInfo;
 import com.ym.mec.biz.dal.vo.ImLiveBroadcastRoomMemberVo;
-import com.ym.mec.biz.service.*;
+import com.ym.mec.biz.service.ChildrenDayReserveService;
+import com.ym.mec.biz.service.ClassGroupService;
+import com.ym.mec.biz.service.CooperationOrganService;
+import com.ym.mec.biz.service.CourseReviewService;
+import com.ym.mec.biz.service.CourseScheduleService;
+import com.ym.mec.biz.service.CourseScheduleTeacherSalaryService;
+import com.ym.mec.biz.service.DegreeRegistrationService;
+import com.ym.mec.biz.service.EmployeeInfoService;
+import com.ym.mec.biz.service.ExportService;
+import com.ym.mec.biz.service.ExtracurricularExercisesReplyService;
+import com.ym.mec.biz.service.GoodsService;
+import com.ym.mec.biz.service.ImLiveBroadcastRoomMemberService;
+import com.ym.mec.biz.service.IndexBaseMonthDataService;
+import com.ym.mec.biz.service.IndexErrDataRecordService;
+import com.ym.mec.biz.service.MusicEnlightenmentQuestionnaireService;
+import com.ym.mec.biz.service.MusicGroupPaymentCalenderDetailService;
+import com.ym.mec.biz.service.MusicGroupPaymentCalenderService;
+import com.ym.mec.biz.service.MusicGroupQuitService;
+import com.ym.mec.biz.service.MusicGroupService;
+import com.ym.mec.biz.service.OrganizationService;
+import com.ym.mec.biz.service.PracticeGroupService;
+import com.ym.mec.biz.service.SellOrderService;
+import com.ym.mec.biz.service.SporadicChargeInfoService;
+import com.ym.mec.biz.service.StudentAttendanceService;
+import com.ym.mec.biz.service.StudentExtracurricularExercisesSituationService;
+import com.ym.mec.biz.service.StudentManageService;
+import com.ym.mec.biz.service.StudentPaymentOrderDetailService;
+import com.ym.mec.biz.service.StudentRegistrationService;
+import com.ym.mec.biz.service.StudentService;
+import com.ym.mec.biz.service.StudentVisitService;
+import com.ym.mec.biz.service.SysConfigService;
+import com.ym.mec.biz.service.SysMusicScoreService;
+import com.ym.mec.biz.service.SysTenantConfigService;
+import com.ym.mec.biz.service.TeacherAttendanceService;
+import com.ym.mec.biz.service.TeacherCourseRewardService;
+import com.ym.mec.biz.service.TeacherCourseStatisticsService;
+import com.ym.mec.biz.service.TeacherSalaryComplaintsService;
+import com.ym.mec.biz.service.TeacherService;
+import com.ym.mec.biz.service.TenantPaymentOrderService;
+import com.ym.mec.biz.service.VipGroupActivityService;
+import com.ym.mec.biz.service.VipGroupService;
 import com.ym.mec.common.constant.CommonConstants;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
@@ -19,27 +224,6 @@ import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
 import com.ym.mec.util.excel.POIUtil;
 
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.util.CollectionUtils;
-import org.springframework.web.bind.annotation.*;
-
-import javax.annotation.Resource;
-import javax.servlet.http.HttpServletResponse;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.math.BigDecimal;
-import java.util.*;
-import java.util.stream.Collectors;
-
 @RequestMapping
 @Api(tags = "数据导出服务")
 @RestController
@@ -139,6 +323,9 @@ public class ExportController extends BaseController {
     private MusicGroupService musicGroupService;
     @Autowired
     private SysTenantConfigService sysTenantConfigService;
+
+    @Autowired
+    private StudentVisitService studentVisitService;
     
     @Autowired
     private ImLiveBroadcastRoomMemberService imLiveBroadcastRoomMemberService;
@@ -2968,4 +3155,153 @@ public class ExportController extends BaseController {
             }
         }
     }
+
+    @ApiOperation(value = "学生课表考勤导出")
+    @PostMapping("export/studentCourseAttendance")
+    @PreAuthorize("@pcs.hasPermissions('export/studentCourseAttendance')")
+    public void exportStudentCourseAttendance(HttpServletResponse response, StudentAttendanceQueryInfo queryInfo) throws IOException {
+        queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
+        //按考勤状态和回访状态排序
+        queryInfo.setOrderFlag(true);
+        queryInfo.setPage(1);
+        queryInfo.setRows(49999);
+        List<StudentAttendance> rows = studentAttendanceService.findStudentAttendance(queryInfo).getRows();
+        if (rows.size() < 1) {
+            throw new BizException("没有可导出数据");
+        }
+        OutputStream outputStream = response.getOutputStream();
+        try {
+            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "学员姓名", "学员编号", "老师姓名", "老师编号",
+                    "课程组编号", "课程编号", "课程名称", "课程组类型", "课程类型", "上课时间","签到时间", "签退时间", "考勤状态"}, new String[]{
+                    "courseSchedule.organization.name", "username", "userId", "courseSchedule.teacherName", "teacherId", "musicGroupId", "courseScheduleId",
+                    "courseSchedule.name", "groupType.desc", "courseSchedule.type.msg", "courseSchedule.classDate", "signInTime",
+                    "signOutTime", "status.msg"}, rows);
+            response.setContentType("application/octet-stream");
+            response.setHeader("Content-Disposition", "attac:wq" +
+                    "hment;filename=courseAttendance-" + DateUtil.getDate(new Date()) + ".xls");
+
+            outputStream = response.getOutputStream();
+            workbook.write(outputStream);
+            outputStream.flush();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (outputStream != null) {
+                try {
+                    outputStream.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+    
+    @ApiOperation(value = "学生回访记录导出")
+    @PostMapping("export/studentVisitRecord")
+    @PreAuthorize("@pcs.hasPermissions('export/studentVisitRecord')")
+    public void exportStudentVisitRecord(HttpServletResponse response, StudentVisitQueryInfo queryInfo) throws IOException {
+    	queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
+        queryInfo.setPage(1);
+        queryInfo.setRows(49999);
+        List<StudentVisitDto> rows = studentVisitService.getPageList(queryInfo).getRows();
+        if (rows.size() < 1) {
+            throw new BizException("没有可导出数据");
+        }
+        OutputStream outputStream = response.getOutputStream();
+        try {
+            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"老师姓名", "所属分部",
+                    "角色", "学生编号", "学生姓名", "回访类型", "回访目的", "问题状态","回访图片", "回访时间"}, new String[]{
+                    "teacherName", "organName", "visiterType.msg", "studentId", "studentName", "type", "purpose","probStatus == 1 ? '已解决' : '待跟进'",
+                    "attachments", "visitTime"}, rows);
+            response.setContentType("application/octet-stream");
+            response.setHeader("Content-Disposition", "attac:wq" +
+                    "hment;filename=visitRecord-" + DateUtil.getDate(new Date()) + ".xls");
+
+            outputStream = response.getOutputStream();
+            workbook.write(outputStream);
+            outputStream.flush();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (outputStream != null) {
+                try {
+                    outputStream.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+    
+    @ApiOperation(value = "没有班级的学员导出")
+    @PostMapping("export/noClassGroupStudentList")
+    @PreAuthorize("@pcs.hasPermissions('export/noClassGroupStudentList')")
+    public void exportNoClassGroupStudentList(HttpServletResponse response, NoClassMusicStudentQueryInfo queryInfo) throws IOException {
+    	queryInfo = organizationService.onlyEducation(queryInfo);
+        queryInfo.setPage(1);
+        queryInfo.setRows(49999);
+        List<NoClassMusicStudentDto> rows = studentRegistrationService.queryNoClassMusicStudentInfo(queryInfo).getRows();
+        if (rows.size() < 1) {
+            throw new BizException("没有可导出数据");
+        }
+        OutputStream outputStream = response.getOutputStream();
+        try {
+            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "乐团编号",
+                    "乐团名称", "学生编号", "学生姓名", "学员声部"}, new String[]{
+                    "organName", "groupId", "groupName", "studentId", "studentName", "subjectName"}, rows);
+            response.setContentType("application/octet-stream");
+            response.setHeader("Content-Disposition", "attac:wq" +
+                    "hment;filename=noClassGroupStudentList-" + DateUtil.getDate(new Date()) + ".xls");
+
+            outputStream = response.getOutputStream();
+            workbook.write(outputStream);
+            outputStream.flush();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (outputStream != null) {
+                try {
+                    outputStream.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+    
+    @ApiOperation(value = "学员异常请假列表")
+    @PostMapping("export/studentErrorLeaveList")
+    @PreAuthorize("@pcs.hasPermissions('export/studentErrorLeaveList')")
+    public void exportStudentErrorLeaveList(HttpServletResponse response, StudentErrorLeaveQueryInfo queryInfo) throws IOException {
+    	queryInfo.setOrganIds(organizationService.getEmployeeOrgan(queryInfo.getOrganIds()));
+        queryInfo.setPage(1);
+        queryInfo.setRows(49999);
+        List<StudentErrorLeaveDto> rows = studentManageService.queryStudentErrorLeaveList(queryInfo).getRows();
+        if (rows.size() < 1) {
+            throw new BizException("没有可导出数据");
+        }
+        OutputStream outputStream = response.getOutputStream();
+        try {
+            HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "学生编号",
+                    "学生姓名", "手机号", "近两个月请假次数", "本月请假次数"}, new String[]{
+                    "organName", "userId", "studentName", "phone", "totalNum", "currentNum"}, rows);
+            response.setContentType("application/octet-stream");
+            response.setHeader("Content-Disposition", "attac:wq" +
+                    "hment;filename=studentErrorLeaveList-" + DateUtil.getDate(new Date()) + ".xls");
+
+            outputStream = response.getOutputStream();
+            workbook.write(outputStream);
+            outputStream.flush();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if (outputStream != null) {
+                try {
+                    outputStream.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
 }

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/StudentInstrumentController.java

@@ -65,7 +65,7 @@ public class StudentInstrumentController extends BaseController {
 
     @ApiOperation(value = "乐器保养列表")
     @GetMapping("/getList")
-    @PreAuthorize("@pcs.hasPermissions('studentInstrument/getList')")
+    //@PreAuthorize("@pcs.hasPermissions('studentInstrument/getList')")
     public HttpResponseResult<PageInfo<StudentInstrument>> getList(StudentInstrumentQueryInfo queryInfo) {
         queryInfo.setOrganId(organizationService.getEmployeeOrgan(queryInfo.getOrganId()));
         studentInstrumentDao.batchUpdate();

+ 54 - 13
mec-web/src/main/java/com/ym/mec/web/controller/StudentManageController.java

@@ -1,25 +1,66 @@
 package com.ym.mec.web.controller;
 
-import com.ym.mec.biz.dal.dto.*;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.annotation.GetMapping;
+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;
+
+import com.ym.mec.biz.dal.dto.ActivityCourseDetailDto;
+import com.ym.mec.biz.dal.dto.CloudStudyStudentDataDto;
+import com.ym.mec.biz.dal.dto.EduOrganStudentDataDto;
+import com.ym.mec.biz.dal.dto.IndexCloudStudyListDto;
+import com.ym.mec.biz.dal.dto.StatDto;
+import com.ym.mec.biz.dal.dto.StudentSubTotalCourseTimesDto;
+import com.ym.mec.biz.dal.dto.UpdateStudentFeeDto;
 import com.ym.mec.biz.dal.entity.Organization;
 import com.ym.mec.biz.dal.entity.Student;
-import com.ym.mec.biz.dal.page.*;
-import com.ym.mec.biz.service.*;
+import com.ym.mec.biz.dal.page.CloudTeacherActiveQueryInfo;
+import com.ym.mec.biz.dal.page.MusicGroupStudentQueryInfo;
+import com.ym.mec.biz.dal.page.OrganCloudStudyStudentDataQueryInfo;
+import com.ym.mec.biz.dal.page.StudentActivityQueryInfo;
+import com.ym.mec.biz.dal.page.StudentErrorLeaveQueryInfo;
+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.StudentManageVipClassQueryInfo;
+import com.ym.mec.biz.dal.page.StudentOperatingQueryInfo;
+import com.ym.mec.biz.dal.page.StudentQueryInfo;
+import com.ym.mec.biz.dal.page.StudentSignQueryInfo;
+import com.ym.mec.biz.dal.page.StudentSubTotalCourseTimesQueryInfo;
+import com.ym.mec.biz.dal.page.TeacherPaymentRecordInfo;
+import com.ym.mec.biz.dal.page.UserBasicQueryInfo;
+import com.ym.mec.biz.service.MusicGroupStudentFeeService;
+import com.ym.mec.biz.service.OrganizationService;
+import com.ym.mec.biz.service.StudentCourseHomeworkService;
+import com.ym.mec.biz.service.StudentManageService;
+import com.ym.mec.biz.service.StudentRegistrationService;
+import com.ym.mec.biz.service.StudentService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.QueryInfo;
-import io.swagger.annotations.*;
-import io.swagger.models.auth.In;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.util.CollectionUtils;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.*;
-import java.util.stream.Collectors;
 
 @Api(tags = "学生管理")
 @RestController

+ 5 - 4
mec-web/src/main/java/com/ym/mec/web/controller/TeacherController.java

@@ -84,12 +84,13 @@ public class TeacherController extends BaseController {
     @ApiOperation(value = "获取分部所有老师")
     @GetMapping("/findTeachers")
     @PreAuthorize("@pcs.hasPermissions('teacher/findTeachers','system')")
-    public HttpResponseResult findTeachers(String organId,Boolean demissionFlag) {
+    public HttpResponseResult findTeachers(String organId,Boolean demissionFlag, Boolean isForzenWithQueryCondition) {
         organId = organizationService.getEmployeeOrgan(organId);
-        if (demissionFlag == null){
-            demissionFlag = false;
+        demissionFlag = false;
+        if(isForzenWithQueryCondition == null){
+        	isForzenWithQueryCondition = false;
         }
-        return succeed(teacherService.findTeachers(organId,demissionFlag));
+        return succeed(teacherService.findTeachers(organId,demissionFlag,isForzenWithQueryCondition));
     }
 
     @ApiOperation(value = "根据科目获取部门下的教师")