yonge 2 years ago
parent
commit
e2b6bc7a52

+ 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

+ 44 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/MusicGroupPaymentBaseCalender.java

@@ -53,6 +53,18 @@ public class MusicGroupPaymentBaseCalender {
 
 	@ApiModelProperty(value = "进行中加学员拓展信息", required = false)
 	private CalenderAddStudent calenderAddStudent;
+	
+	@ApiModelProperty(value = "支付时是否显示会员", required = false)
+	private Boolean isShowMemberForPay = true;
+	
+	@ApiModelProperty(value = "支付时是否显示乐保", required = false)
+	private Boolean isShowMusicInsuranceForPay = true;
+	
+	@ApiModelProperty(value = "支付时是否显示VIP课程", required = false)
+	private Boolean isShowVipCourseForPay = true;
+	
+	@ApiModelProperty(value = "支付时是否显示乐团课", required = false)
+	private Boolean isShowMusicCourseForPay = true;
 
 	public Boolean getConfirmCreate() {
 		return confirmCreate;
@@ -181,4 +193,36 @@ public class MusicGroupPaymentBaseCalender {
 	public void setBatchNo(String batchNo) {
 		this.batchNo = batchNo;
 	}
+
+	public Boolean getIsShowMemberForPay() {
+		return isShowMemberForPay;
+	}
+
+	public void setIsShowMemberForPay(Boolean isShowMemberForPay) {
+		this.isShowMemberForPay = isShowMemberForPay;
+	}
+
+	public Boolean getIsShowMusicInsuranceForPay() {
+		return isShowMusicInsuranceForPay;
+	}
+
+	public void setIsShowMusicInsuranceForPay(Boolean isShowMusicInsuranceForPay) {
+		this.isShowMusicInsuranceForPay = isShowMusicInsuranceForPay;
+	}
+
+	public Boolean getIsShowVipCourseForPay() {
+		return isShowVipCourseForPay;
+	}
+
+	public void setIsShowVipCourseForPay(Boolean isShowVipCourseForPay) {
+		this.isShowVipCourseForPay = isShowVipCourseForPay;
+	}
+
+	public Boolean getIsShowMusicCourseForPay() {
+		return isShowMusicCourseForPay;
+	}
+
+	public void setIsShowMusicCourseForPay(Boolean isShowMusicCourseForPay) {
+		this.isShowMusicCourseForPay = isShowMusicCourseForPay;
+	}
 }

+ 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;
+	}
 }

+ 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;
+	}
 }

+ 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/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

+ 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})

+ 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>
 

+ 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">

+ 80 - 0
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -139,6 +139,9 @@ public class ExportController extends BaseController {
     private MusicGroupService musicGroupService;
     @Autowired
     private SysTenantConfigService sysTenantConfigService;
+
+    @Autowired
+    private StudentVisitService studentVisitService;
     
     @Autowired
     private ImLiveBroadcastRoomMemberService imLiveBroadcastRoomMemberService;
@@ -2968,4 +2971,81 @@ 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();
+                }
+            }
+        }
+    }
 }

+ 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();

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

@@ -84,12 +84,15 @@ 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;
         }
-        return succeed(teacherService.findTeachers(organId,demissionFlag));
+        if(isForzenWithQueryCondition == null){
+        	isForzenWithQueryCondition = false;
+        }
+        return succeed(teacherService.findTeachers(organId,demissionFlag,isForzenWithQueryCondition));
     }
 
     @ApiOperation(value = "根据科目获取部门下的教师")