Browse Source

Merge branch 'mec_update_2021-11-02' of http://git.dayaedu.com/yonge/mec

zouxuan 4 years ago
parent
commit
5b5f4cf44e

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/IndexBaseMonthDataDao.java

@@ -187,6 +187,8 @@ public interface IndexBaseMonthDataDao extends BaseDAO<Long, IndexBaseMonthData>
                                  @Param("educationUserId") Integer educationUserId,
                                  @Param("noPaymentType") Integer noPaymentType);
 
+
+
     List<Map<Integer, Integer>> countOrganNoPaymentStudentNum(@Param("organIds") Set<Integer> organIds, @Param("educationUserId") Integer educationUserId);
 
     List<String> getNoPaymentMusicGroup(@Param("organIds") Set<Integer> organIds, @Param("educationUserId") Integer educationUserId);
@@ -316,6 +318,7 @@ public interface IndexBaseMonthDataDao extends BaseDAO<Long, IndexBaseMonthData>
                                                                  @Param("organIds") List<Integer> organIds);
 
     int countStudentErrorLeave(@Param("organIdList") Set<Integer> organIdList, @Param("format") String format, @Param("classGroupIds") List<Long> classGroupIds);
+    List<Map<Integer, Integer>> countOrganStudentErrorLeave(@Param("organIds") Set<Integer> organIds, @Param("classGroupIds") List<Long> classGroupIds);
 
     int countStudentErrorLeave1(Map<String, Object> params);
 

+ 2 - 4
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentOrderDao.java

@@ -164,15 +164,13 @@ public interface StudentPaymentOrderDao extends BaseDAO<Long, StudentPaymentOrde
     int countSurplusCourseByMusicGroupAndUser(@Param("musicGroupId") String musicGroupId, @Param("userId") Integer userId);
 
     /**
-     * @param musicGroupId: 乐团或小课金额
-     * @param groupType:
+     * @param vipGroupId: 乐团或小课金额
      * @return java.math.BigDecimal
      * @describe 统计乐团或vip课的收入金额
      * @author Joburgess
      * @date 2019/12/4
      */
-    BigDecimal sumGroupIncomeFee(@Param("musicGroupId") String musicGroupId,
-                                 @Param("groupType") String groupType);
+    BigDecimal sumGroupIncomeFee(@Param("vipGroupId") Long vipGroupId);
 
     List<StudentPaymentOrder> findStudentPaymentOrder(@Param("groupType") String groupType, @Param("musicGroupId") String musicGroupId);
 

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentRegistrationDao.java

@@ -632,6 +632,15 @@ public interface StudentRegistrationDao extends BaseDAO<Long, StudentRegistratio
     List<StudentRegistration> queryMemberEndAutoQuitMusic(@Param("memberEndAutoQuitMusic") String memberEndAutoQuitMusic,
                                                           @Param("educationUserId") Integer educationUserId,
                                                           @Param("organIds") String organIds);
+
+    /**
+     * 获取所有在会员团,但是没有会员,并且没有待生效的学员
+     * @param memberEndAutoQuitMusic
+     * @return
+     */
+    List<Map<Integer, Integer>> queryOrganMemberEndAutoQuitMusic(@Param("memberEndAutoQuitMusic") String memberEndAutoQuitMusic,
+                                                          @Param("educationUserId") Integer educationUserId,
+                                                          @Param("organIds") Set<Integer> organIds);
     
     /**
      * 统计指定乐团在读的声部人数

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/IndexErrorDataExportDto.java

@@ -28,12 +28,18 @@ public class IndexErrorDataExportDto {
     @ApiModelProperty(value = "未加入任何班级学员")
     private int noClassMusicGroupStudentInfo;
 
+    @ApiModelProperty(value = "学员请假异常数")
+    private int studentErrorLeave;
+
     @ApiModelProperty(value = "未缴费学员数")
     private int studentNotPayment;
 
     @ApiModelProperty(value = "申请退团学员数")
     private int studentApplyForQuitMusicGroup;
 
+    @ApiModelProperty(value = "会员已过期数量")
+    private int noMemberStudentNum;
+
     @ApiModelProperty(value = "预计课酬较低")
     private int teacherExpectSalaryBeLow;
 
@@ -73,6 +79,22 @@ public class IndexErrorDataExportDto {
     @ApiModelProperty(value = "总计")
     private int total;
 
+    public int getStudentErrorLeave() {
+        return studentErrorLeave;
+    }
+
+    public void setStudentErrorLeave(int studentErrorLeave) {
+        this.studentErrorLeave = studentErrorLeave;
+    }
+
+    public int getNoMemberStudentNum() {
+        return noMemberStudentNum;
+    }
+
+    public void setNoMemberStudentNum(int noMemberStudentNum) {
+        this.noMemberStudentNum = noMemberStudentNum;
+    }
+
     public Integer getOrganId() {
         return organId;
     }

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

@@ -43,6 +43,17 @@ public class EmployeeInfoQueryInfo extends QueryInfo {
 	
 	private String hrbp;
 
+	@ApiModelProperty(value = "是否没有手机号和微信", required = false)
+	private Boolean notMobileAndWechat;
+
+	public Boolean getNotMobileAndWechat() {
+		return notMobileAndWechat;
+	}
+
+	public void setNotMobileAndWechat(Boolean notMobileAndWechat) {
+		this.notMobileAndWechat = notMobileAndWechat;
+	}
+
 	public String getUserNameOrIdOrMobile() {
 		return userNameOrIdOrMobile;
 	}

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

@@ -29,6 +29,9 @@ public class MusicGroupQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "教务老师编号")
     private Integer educationalTeacherId;
 
+    @ApiModelProperty(value = "合作单位编号")
+    private Integer cooperationOrganId;
+
     private MusicGroupStatusEnum status;
 
     private Boolean noClassStudentMusicGroup;
@@ -47,6 +50,14 @@ public class MusicGroupQueryInfo extends QueryInfo {
     
     private Date billEndDate;
 
+    public Integer getCooperationOrganId() {
+        return cooperationOrganId;
+    }
+
+    public void setCooperationOrganId(Integer cooperationOrganId) {
+        this.cooperationOrganId = cooperationOrganId;
+    }
+
     public CourseViewTypeEnum getCourseViewType() {
         return courseViewType;
     }

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

@@ -811,6 +811,10 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		Map<Integer, Integer> teacherNotAClassMap = new HashMap<>();
 		//服务指标异常
 		Map<Integer, Integer> teacherServeErrorMap = new HashMap<>();
+		//学员请假异常
+		Map<Integer, Integer> studentErrorLeaveMap = new HashMap<>();
+		//会员过期学员数
+		Map<Integer, Integer> noMemberStudentMap = new HashMap<>();
 
 		if(IndexErrorType.MUSIC_PATROL.equals(errorType)||Objects.isNull(errorType)){
 			//基础技能班学员数量异常
@@ -827,6 +831,10 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		}
 
 		if(IndexErrorType.STUDENT_INFO.equals(errorType)||Objects.isNull(errorType)){
+			//学员异常请假数
+			List<Map<Integer, Integer>> studentErrorLeaveMapList = indexBaseMonthDataDao.countOrganStudentErrorLeave(organIds, classGroupIds);
+			studentErrorLeaveMap = MapUtil.mapListToMap(studentErrorLeaveMapList, Integer.class, Integer.class);
+
 			//未缴费学员数
 			List<Map<Integer, Integer>> studentNotPaymentMapList = indexBaseMonthDataDao.countOrganNoPaymentStudentNum(organIds, educationUserId);
 			studentNotPaymentMap = MapUtil.mapListToMap(studentNotPaymentMapList, Integer.class, Integer.class);
@@ -834,6 +842,10 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			//申请退团学员数
 			List<Map<Integer, Integer>> studentApplyForQuitMusicGroupMapList = indexBaseMonthDataDao.queryOrganApplyForQuitGroupNum(organIds, educationUserId);
 			studentApplyForQuitMusicGroupMap = MapUtil.mapListToMap(studentApplyForQuitMusicGroupMapList, Integer.class, Integer.class);
+
+			//会员过期学员数
+			List<Map<Integer, Integer>> memberEndAutoQuitMusicMapList = studentRegistrationDao.queryOrganMemberEndAutoQuitMusic(null, educationUserId,organIds);
+			noMemberStudentMap = MapUtil.mapListToMap(memberEndAutoQuitMusicMapList, Integer.class, Integer.class);
 		}
 
 		if(IndexErrorType.TEACHER_INFO.equals(errorType)||Objects.isNull(errorType)){
@@ -921,6 +933,12 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			}
 			total += indexErrorData.getNoClassMusicGroupStudentInfo();
 			totalData.setNoClassMusicGroupStudentInfo(totalData.getNoClassMusicGroupStudentInfo() + indexErrorData.getNoClassMusicGroupStudentInfo());
+			//学员请假异常数
+			if(studentErrorLeaveMap.containsKey(organ.getId())){
+				indexErrorData.setStudentErrorLeave(studentErrorLeaveMap.get(organ.getId()));
+			}
+			total += indexErrorData.getStudentErrorLeave();
+			totalData.setStudentErrorLeave(totalData.getStudentErrorLeave() + indexErrorData.getStudentErrorLeave());
 			//未缴费学员数
 			if(studentNotPaymentMap.containsKey(organ.getId())){
 				indexErrorData.setStudentNotPayment(studentNotPaymentMap.get(organ.getId()));
@@ -933,6 +951,12 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			}
 			total += indexErrorData.getStudentApplyForQuitMusicGroup();
 			totalData.setStudentApplyForQuitMusicGroup(totalData.getStudentApplyForQuitMusicGroup() + indexErrorData.getStudentApplyForQuitMusicGroup());
+			//会员已过期数量
+			if(noMemberStudentMap.containsKey(organ.getId())){
+				indexErrorData.setNoMemberStudentNum(noMemberStudentMap.get(organ.getId()));
+			}
+			total += indexErrorData.getNoMemberStudentNum();
+			totalData.setNoMemberStudentNum(totalData.getNoMemberStudentNum() + indexErrorData.getNoMemberStudentNum());
 			//预计课酬较低
 			if(teacherExpectSalaryBeLowMap.containsKey(organ.getId())){
 				indexErrorData.setTeacherExpectSalaryBeLow(teacherExpectSalaryBeLowMap.get(organ.getId()));

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

@@ -3725,9 +3725,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			vipGroupSalaryBaseInfo.setTotalFeeDeduction(new BigDecimal(0));
 		}
 
-		BigDecimal totalCoursePrice= studentPaymentOrderDao.sumGroupIncomeFee(vipGroup.getId().toString(),GroupType.VIP.getCode());
+		BigDecimal totalCoursePrice = studentPaymentOrderDao.sumGroupIncomeFee(vipGroup.getId());
 		if(Objects.isNull(totalCoursePrice)){
-			totalCoursePrice=new BigDecimal(0);
+			totalCoursePrice = new BigDecimal(0);
 		}
 
 		//课程总价

+ 6 - 0
mec-biz/src/main/resources/config/mybatis/EmployeeInfoMapper.xml

@@ -159,6 +159,12 @@
 	
 	<sql id="queryPageMap">
 		<where>
+			<if test="notMobileAndWechat == 1">
+            	AND ei.mobile_no_ IS NULL AND ei.wechat_no_ IS NULL
+	        </if>
+			<if test="notMobileAndWechat == 0">
+				AND (ei.mobile_no_ IS NOT NULL OR ei.wechat_no_ IS NOT NULL)
+	        </if>
 			<if test="organId != null">
             	AND ei.organ_id_ = #{organId}
 	        </if>

+ 21 - 0
mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml

@@ -1548,6 +1548,27 @@
 		GROUP BY sa.user_id_,DATE_FORMAT(cs.class_date_,'%Y-%m')
 		HAVING COUNT(sa.id_) > 1 AND COUNT(sa.id_) > SUM(sa.leave_visit_flag_)) c
 	</select>
+	<select id="countOrganStudentErrorLeave" resultType="map">
+		SELECT c.organ_id_ 'key',COUNT(c.user_id_) 'value' FROM (
+		SELECT sa.user_id_,cs.organ_id_ FROM student_attendance sa
+		LEFT JOIN course_schedule cs ON cs.id_ = sa.course_schedule_id_
+		WHERE DATE_FORMAT(cs.class_date_,'%Y-%m') >= '2021-11' AND sa.status_ = 'LEAVE' AND cs.pre_course_flag_ = 0
+		<if test="classGroupIds != null and classGroupIds.size() > 0">
+			AND cs.class_group_id_ IN
+			<foreach collection="classGroupIds" item="classGroupId" open="(" close=")" separator=",">
+				#{classGroupId}
+			</foreach>
+		</if>
+		<if test="organIds != null and organIds.size > 0">
+			AND cs.organ_id_ IN
+			<foreach collection="organIds" open="(" close=")" item="item" separator=",">
+				#{item}
+			</foreach>
+		</if>
+		GROUP BY sa.user_id_
+		HAVING COUNT(sa.id_) > 1 AND COUNT(sa.id_) > SUM(sa.leave_visit_flag_))c
+		GROUP BY c.organ_id_
+	</select>
 	<select id="countStudentErrorLeave1" resultType="java.lang.Integer">
 		SELECT COUNT(DISTINCT c.user_id_) FROM (
 		SELECT sa.user_id_ FROM student_attendance sa

+ 22 - 19
mec-biz/src/main/resources/config/mybatis/MusicGroupMapper.xml

@@ -245,66 +245,69 @@
     </delete>
 
     <select id="queryPage" resultMap="MusicGroup" parameterType="map">
-        SELECT * FROM music_group
+        SELECT mg.* FROM music_group mg
+        LEFT JOIN cooperation_organ co ON mg.cooperation_organ_id_ = co.id_
         <include refid="musicGroupQueryPageSql"/>
-        ORDER BY create_time_ DESC,id_
+        ORDER BY mg.create_time_ DESC,mg.id_
         <include refid="global.limit"/>
     </select>
 
     <sql id="musicGroupQueryPageSql">
         <where>
-            del_flag_ = 0
+            mg.del_flag_ = 0
             <if test="organId != null">
-                AND FIND_IN_SET(organ_id_,#{organId})
+                AND FIND_IN_SET(mg.organ_id_,#{organId})
             </if>
             <if test="cooperationOrganId != null">
-                AND cooperation_organ_id_ = #{cooperationOrganId}
+                AND mg.cooperation_organ_id_ = #{cooperationOrganId}
             </if>
-            <if test="musicGroupName != null and musicGroupName != ''">
-                AND (name_ LIKE CONCAT('%',#{musicGroupName},'%') OR id_ LIKE CONCAT('%',#{musicGroupName},'%'))
+            <if test="search != null and search != ''">
+                AND (mg.name_ LIKE CONCAT('%',#{search},'%') OR mg.id_ LIKE CONCAT('%',#{search},'%')
+                 OR mg.cooperation_organ_id_ = #{search} OR co.name_ LIKE CONCAT('%',#{search},'%'))
             </if>
             <if test="chargeTypeId != null">
-                AND charge_type_id_ = #{chargeTypeId}
+                AND mg.charge_type_id_ = #{chargeTypeId}
             </if>
             <if test="musicGroupStatus != null">
-                AND FIND_IN_SET(status_,#{musicGroupStatus})
+                AND FIND_IN_SET(mg.status_,#{musicGroupStatus})
             </if>
             <if test="musicGroupId != null">
-                AND FIND_IN_SET(id_,#{musicGroupId})
+                AND FIND_IN_SET(mg.id_,#{musicGroupId})
             </if>
             <if test="transactionTeacherId!=null">
-                AND transaction_teacher_id_ = #{transactionTeacherId}
+                AND mg.transaction_teacher_id_ = #{transactionTeacherId}
             </if>
             <if test="educationalTeacherId!=null">
-                AND educational_teacher_id_ = #{educationalTeacherId}
+                AND mg.educational_teacher_id_ = #{educationalTeacherId}
             </if>
             <if test="courseViewType != null">
-                AND course_view_type_ = #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+                AND mg.course_view_type_ = #{courseViewType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
             </if>
             <if test="musicGroupIds!=null and musicGroupIds.size()>0">
-                AND id_ IN
+                AND mg.id_ IN
                 <foreach collection="musicGroupIds" item="musicGroupId" open="(" close=")" separator=",">
                     #{musicGroupId}
                 </foreach>
             </if>
             <if test="createStartDate!=null">
-                AND date(create_time_) &gt;= #{createStartDate}
+                AND date(mg.create_time_) &gt;= #{createStartDate}
             </if>
             <if test="createEndDate!=null">
-                AND date(create_time_) &lt;= #{createEndDate}
+                AND date(mg.create_time_) &lt;= #{createEndDate}
             </if>
             <if test="billStartDate!=null">
-                AND date(bill_start_date_) &gt;= #{billStartDate}
+                AND date(mg.bill_start_date_) &gt;= #{billStartDate}
             </if>
             <if test="billEndDate!=null">
-                AND date(bill_start_date_) &lt;= #{billEndDate}
+                AND date(mg.bill_start_date_) &lt;= #{billEndDate}
             </if>
         </where>
     </sql>
 
     <!-- 查询当前表的总记录数 -->
     <select id="queryCount" resultType="int">
-        SELECT COUNT(*) FROM music_group
+        SELECT COUNT(mg.id_) FROM music_group mg
+        LEFT JOIN cooperation_organ co ON mg.cooperation_organ_id_ = co.id_
         <include refid="musicGroupQueryPageSql"/>
     </select>
 

+ 13 - 5
mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml

@@ -554,11 +554,19 @@
           AND CONCAT(cs.class_date_, ' ', cs.start_class_time_) &gt; NOW()
     </select>
     <select id="sumGroupIncomeFee" resultType="java.math.BigDecimal">
-        SELECT SUM(expect_amount_)
-        FROM student_payment_order
-        WHERE group_type_ = #{groupType}
-          AND music_group_id_ = #{musicGroupId}
-          AND status_ = 'SUCCESS'
+        SELECT
+        (CASE WHEN a.a IS NULL THEN 0 ELSE a.a END) +
+        (CASE WHEN c.c IS NULL THEN 0 ELSE c.c END) +
+        (CASE WHEN d.d IS NULL THEN 0 ELSE d.d END) +
+        (CASE WHEN e.e IS NULL THEN 0 ELSE e.e END) -
+        (CASE WHEN b.b IS NULL THEN 0 ELSE b.b END) amount_
+        FROM
+        (SELECT SUM(CASE WHEN expect_amount_ IS NULL THEN 0 ELSE expect_amount_ END) a FROM student_payment_order
+         WHERE group_type_ = 'VIP' AND type_ = 'SMALL_CLASS_TO_BUY' AND music_group_id_ = #{vipGroupId} AND status_ = 'SUCCESS') a,
+        (SELECT SUM(CASE WHEN amount_ IS NULL THEN 0 ELSE amount_ END) b FROM sys_user_cash_account_log WHERE group_id_ = 1200) b,
+        (SELECT SUM(CASE WHEN actual_price_ IS NULL THEN 0 ELSE actual_price_ END) c FROM activity_user_mapper WHERE vip_group_id_ = 1200) c,
+        (SELECT SUM(CASE WHEN amount_ IS NULL THEN 0 ELSE amount_ END) d FROM sys_user_cash_account_detail WHERE group_id_ = 1200) d,
+        (SELECT SUM(CASE WHEN amount_ IS NULL THEN 0 ELSE amount_ END) e FROM sys_user_courses_account_detail WHERE group_id_ = 1200) e
     </select>
     <select id="findStudentPaymentOrder" resultMap="StudentPaymentOrder">
         SELECT *

+ 23 - 0
mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml

@@ -1587,6 +1587,29 @@
         </if>
         GROUP BY sr.user_id_
     </select>
+    <select id="queryOrganMemberEndAutoQuitMusic" resultType="Map">
+        SELECT mg.organ_id_ 'key',COUNT(DISTINCT sr.user_id_) 'value' FROM student_registration sr
+        LEFT JOIN music_group mg ON mg.id_ = sr.music_group_id_
+        LEFT JOIN cloud_teacher_order cto ON cto.student_id_ = sr.user_id_ AND cto.status_ = 1 AND cto.music_group_id_ IS NOT NULL
+        WHERE sr.music_group_status_ = 'NORMAL' AND mg.course_view_type_ = 2 AND mg.status_ = 'PROGRESS'
+        AND cto.id_ IS NULL AND (sr.membership_end_time_ IS NULL OR sr.membership_end_time_ &lt; NOW())
+        <if test="educationUserId != null">
+            AND mg.educational_teacher_id_ = #{educationUserId}
+        </if>
+        <if test="organIds != null and organIds.size > 0">
+            AND mg.organ_id_ IN
+            <foreach collection="organIds" open="(" close=")" item="item" separator=",">
+                #{item}
+            </foreach>
+        </if>
+        <if test="memberEndAutoQuitMusic != null">
+            AND cto.id_ IS NULL AND DATEDIFF(sr.membership_end_time_,NOW()) &lt;= #{memberEndAutoQuitMusic} AND sr.membership_end_time_ > NOW()
+        </if>
+        <if test="memberEndAutoQuitMusic == null">
+            AND cto.id_ IS NULL AND (sr.membership_end_time_ IS NULL OR sr.membership_end_time_ &lt; NOW())
+        </if>
+        GROUP BY mg.organ_id_
+    </select>
 
     <select id="countStudentWithSubjectByMusicGroupId" resultMap="Mapper">
         select sr.actual_subject_id_ subject_id_, s.name_ key_,count(sr.id_) value_ from student_registration sr LEFT JOIN subject s on sr.actual_subject_id_ = s.id_

+ 6 - 38
mec-biz/src/main/resources/config/mybatis/SysUserCashAccountLogMapper.xml

@@ -28,6 +28,7 @@
         <result column="channel_" property="channel"/>
         <result column="organ_name_" property="organName"/>
         <result column="platform_account_no_" property="platformAccountNo"/>
+        <result column="group_id_" property="groupId"/>
     </resultMap>
 
     <!-- 根据主键查询一条记录 -->
@@ -46,45 +47,12 @@
     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.SysUserCashAccountLog" useGeneratedKeys="true"
             keyColumn="id" keyProperty="id">
         INSERT INTO sys_user_cash_account_log
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id!=null">id_,</if>
-            <if test="userId!=null">user_id_,</if>
-            <if test="transNo!=null">trans_no_,</if>
-            <if test="type!=null">type_,</if>
-            <if test="transType!=null">trans_type_,</if>
-            <if test="status!=null">status_,</if>
-            <if test="amount!=null">amount_,</if>
-            <if test="comAmount!=null">com_amount_,</if>
-            <if test="perAmount!=null">per_amount_,</if>
-            <if test="balance!=null">balance_,</if>
-            <if test="description!=null">description_,</if>
-            <if test="comment!=null">comment_,</if>
-            create_time_,
-            update_time_,
-            <if test="attribute!=null">attribute1_,</if>
-            <if test="channel!=null">channel_,</if>
-            <if test="platformAccountNo!=null">platform_account_no_,</if>
-        </trim>
+            (user_id_,trans_no_,type_,trans_type_,status_,amount_,com_amount_,
+             per_amount_,balance_,description_,comment_,attribute1_,channel_,platform_account_no_,create_time_,update_time_)
         VALUES
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id!=null">#{id},</if>
-            <if test="userId!=null">#{userId},</if>
-            <if test="transNo!=null">#{transNo},</if>
-            <if test="type!=null">#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},</if>
-            <if test="transType!=null">#{transType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},</if>
-            <if test="status!=null">#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},</if>
-            <if test="amount!=null">#{amount},</if>
-            <if test="comAmount!=null">#{comAmount},</if>
-            <if test="perAmount!=null">#{perAmount},</if>
-            <if test="balance!=null">#{balance},</if>
-            <if test="description!=null">#{description},</if>
-            <if test="comment!=null">#{comment},</if>
-            NOW(),
-            NOW(),
-            <if test="attribute!=null">#{attribute},</if>
-            <if test="channel!=null">#{channel},</if>
-            <if test="platformAccountNo!=null">#{platformAccountNo},</if>
-        </trim>
+        (#{userId},#{transNo},#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+         #{transType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+            #{amount},#{comAmount},#{perAmount},#{balance},#{description},#{comment},#{attribute},#{channel},#{platformAccountNo},NOW(),NOW()
     </insert>
 
     <!-- 根据主键查询一条记录 -->

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

@@ -2943,10 +2943,10 @@ public class ExportController extends BaseController {
         try {
             String[] header = {"分部", "基础技能班学员数量异常", "乐团巡查事项异常", "未在班级学员数", "欠费学员数",
                     "申请退团学员数", "预计课酬较低", "课程时间安排异常", "乐团巡查未计划", "乐团巡查任务未提交",
-                    "回访任务未完成", "课程考勤异常", "课程异常", "服务指标异常", "总计",};
+                    "回访任务未完成", "课程考勤异常", "课程异常", "服务指标异常", "异常请假", "会员过期学员数", "总计",};
             String[] body = {"organName", "highClassStudentLessThanThreeNum", "musicPatrolItem", "noClassMusicGroupStudentInfo", "studentNotPayment",
                     "studentApplyForQuitMusicGroup", "teacherExpectSalaryBeLow", "courseTimeError", "inspectionItem", "inspectionItemPlan",
-                    "studentVisit", "teacherExceptionAttendance", "teacherNotAClass", "teacherServeError", "total",};
+                    "studentVisit", "teacherExceptionAttendance", "teacherNotAClass", "teacherServeError", "studentErrorLeave", "noMemberStudentNum", "total",};
             HSSFWorkbook workbook = POIUtil.exportExcel(header, body, result);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=teacherDefaultSalary-" + DateUtil.getDate(new Date()) + ".xls");