瀏覽代碼

Merge remote-tracking branch 'origin/master'

Joburgess 5 年之前
父節點
當前提交
f93caa59d1

+ 1 - 0
mec-auth/mec-auth-server/src/main/resources/config/mybatis/SysUserMapper.xml

@@ -9,6 +9,7 @@
     <resultMap type="com.ym.mec.auth.api.entity.SysUser" id="SysUser">
         <result column="id_" property="id"/>
         <result column="username_" property="username"/>
+        <result column="real_name_" property="realName"/>
         <result column="password_" property="password"/>
         <result column="salt_" property="salt"/>
         <result column="phone_" property="phone"/>

+ 13 - 11
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupStudentMapperDao.java

@@ -5,6 +5,7 @@ import com.ym.mec.biz.dal.dto.TeacherClassStudentDto;
 import com.ym.mec.biz.dal.entity.ClassGroupStudentMapper;
 import com.ym.mec.biz.dal.entity.StudentRegistration;
 import com.ym.mec.biz.dal.enums.ClassGroupStudentStatusEnum;
+import com.ym.mec.biz.dal.enums.ClassGroupTypeEnum;
 import com.ym.mec.common.dal.BaseDAO;
 import org.apache.ibatis.annotations.Param;
 
@@ -132,38 +133,39 @@ public interface ClassGroupStudentMapperDao extends BaseDAO<Long, ClassGroupStud
      *
      * @param musicGroupId
      * @param userId
+     * @param type
      * @return
      */
-    List<ClassGroupStudentMapper> findHighClassGroupHasUser(@Param("musicGroupId") String musicGroupId, @Param("userId") Integer userId);
+    List<ClassGroupStudentMapper> findHighClassGroupHasUser(@Param("musicGroupId") String musicGroupId, @Param("userId") Integer userId, @Param("type") ClassGroupTypeEnum type);
 
     /**
-     * @describe 获取学生在指定日期对应状态的班级编号
-     * @author Joburgess
-     * @date 2019/11/20
      * @param userId: 用户编号
-     * @param date: 日期
+     * @param date:   日期
      * @param status: 状态
      * @return java.util.List<java.lang.Integer>
+     * @describe 获取学生在指定日期对应状态的班级编号
+     * @author Joburgess
+     * @date 2019/11/20
      */
     List<Integer> findClassGroupIdByUserAndCourseDateAndStatus(@Param("userId") Integer userId,
-                                                               @Param("data")Date date,
+                                                               @Param("data") Date date,
                                                                @Param("status") String status);
 
     /**
+     * @param classGroupIds: 班级编号列表
+     * @return java.util.List<java.util.Map < java.lang.Integer, java.lang.Integer>>
      * @describe 统计班级学生人数
      * @author Joburgess
      * @date 2019/11/21
-     * @param classGroupIds: 班级编号列表
-     * @return java.util.List<java.util.Map<java.lang.Integer,java.lang.Integer>>
      */
-    List<Map<Integer,Integer>> countClassGroupsStudentNum(@Param("classGroupIds") List<Integer> classGroupIds);
+    List<Map<Integer, Integer>> countClassGroupsStudentNum(@Param("classGroupIds") List<Integer> classGroupIds);
 
     /**
+     * @param classGroupId: 班级编号
+     * @return java.util.List<java.util.Map < java.lang.Integer, java.lang.Integer>>
      * @describe 统计班级学生人数
      * @author Joburgess
      * @date 2019/11/21
-     * @param classGroupId: 班级编号
-     * @return java.util.List<java.util.Map<java.lang.Integer,java.lang.Integer>>
      */
     Integer countClassGroupStudentNum(@Param("classGroupId") Integer classGroupId);
 

+ 0 - 4
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SysAccountDao.java

@@ -9,8 +9,6 @@ import java.util.List;
 
 public interface SysAccountDao extends BaseDAO<Integer, SysAccount> {
 
-    int updateByPrimaryKey(SysAccount record);
-
     /**
      * 获取一个私户
      *
@@ -18,6 +16,4 @@ public interface SysAccountDao extends BaseDAO<Integer, SysAccount> {
      * @return
      */
     SysAccount getPerAccount(@Param("amount") BigDecimal amount);
-
-    int batchInsert(@Param("sysAccountList") List<SysAccount> sysAccountList);
 }

+ 22 - 10
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/TeacherPersonalAttendanceDto.java

@@ -31,13 +31,33 @@ public class TeacherPersonalAttendanceDto {
     private String name;
 
     /** 状态(正常签到,异常签到) */
-    @ApiModelProperty(value = "状态(1正常签到,0异常签到) ",required = false)
-    private YesOrNoEnum status;
+    @ApiModelProperty(value = "签到状态(1正常签到,0异常签到) ",required = false)
+    private YesOrNoEnum signInStatus;
+
+    /** 状态(正常签到,异常签到) */
+    @ApiModelProperty(value = "签退状态(1正常签到,0异常签到) ",required = false)
+    private YesOrNoEnum signOutStatus;
 
     /** 备注 */
     @ApiModelProperty(value = "备注",required = false)
     private String remark;
 
+    public YesOrNoEnum getSignInStatus() {
+        return signInStatus;
+    }
+
+    public void setSignInStatus(YesOrNoEnum signInStatus) {
+        this.signInStatus = signInStatus;
+    }
+
+    public YesOrNoEnum getSignOutStatus() {
+        return signOutStatus;
+    }
+
+    public void setSignOutStatus(YesOrNoEnum signOutStatus) {
+        this.signOutStatus = signOutStatus;
+    }
+
     public String getClassDate() {
         return classDate;
     }
@@ -70,14 +90,6 @@ public class TeacherPersonalAttendanceDto {
         this.name = name;
     }
 
-    public YesOrNoEnum getStatus() {
-        return status;
-    }
-
-    public void setStatus(YesOrNoEnum status) {
-        this.status = status;
-    }
-
     public String getRemark() {
         return remark;
     }

+ 16 - 5
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysAccount.java

@@ -12,6 +12,9 @@ public class SysAccount {
      */
     @Version
     private Integer version;
+
+    //账户所属公司
+    private String company;
     /**
     * 收款商户号
     */
@@ -35,7 +38,7 @@ public class SysAccount {
     /**
     * 支付渠道类型(PER-个人 COM-公户)
     */
-    private String channelType;
+    private String type;
 
 
     public Integer getId() {
@@ -78,12 +81,12 @@ public class SysAccount {
         this.channel = channel;
     }
 
-    public String getChannelType() {
-        return channelType;
+    public String getType() {
+        return type;
     }
 
-    public void setChannelType(String channelType) {
-        this.channelType = channelType;
+    public void setType(String type) {
+        this.type = type;
     }
 
     public Integer getVersion() {
@@ -93,4 +96,12 @@ public class SysAccount {
     public void setVersion(Integer version) {
         this.version = version;
     }
+
+    public String getCompany() {
+        return company;
+    }
+
+    public void setCompany(String company) {
+        this.company = company;
+    }
 }

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupService.java

@@ -14,6 +14,7 @@ import com.ym.mec.common.entity.ImUserModel;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.QueryInfo;
 import com.ym.mec.common.service.BaseService;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -340,4 +341,12 @@ public interface ClassGroupService extends BaseService<Integer, ClassGroup> {
      * @return
      */
     Boolean checkSetSalary(String musicGroupId);
+
+    /**
+     * 根据classGroupIds获取班级列表
+     * @param classGroupIds
+     * @return
+     */
+    List<ClassGroup> findByClassGroupIds(List<Integer> classGroupIds);
+
 }

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SubjectService.java

@@ -1,6 +1,7 @@
 package com.ym.mec.biz.service;
 
 import com.ym.mec.biz.dal.dto.ConditionDto;
+import com.ym.mec.biz.dal.dto.SubFeeSettingDto;
 import com.ym.mec.biz.dal.dto.SubjectApplyDetailDto;
 import com.ym.mec.biz.dal.entity.Subject;
 import com.ym.mec.biz.dal.entity.SubjectGoodsMapper;
@@ -94,4 +95,11 @@ public interface SubjectService extends BaseService<Integer, Subject> {
      * @return
      */
     List<String> findBySubIds(String subIds);
+
+    /**
+     * 获取收费类型关联的默认声部数据
+     * @param chargeTypeId
+     * @return
+     */
+    SubFeeSettingDto setSubjectInfo(Integer chargeTypeId);
 }

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

@@ -1779,4 +1779,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
         }
         return false;
     }
+
+    @Override
+    public List<ClassGroup> findByClassGroupIds(List<Integer> classGroupIds) {
+        return classGroupDao.findByClassGroupIds(classGroupIds);
+    }
 }

+ 9 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupStudentMapperServiceImpl.java

@@ -68,7 +68,7 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
 
         //3、删除学生对应班级的课程
         List<CourseSchedule> courseScheduleList = courseScheduleService.findNoStartCoursesByClassGroupId(classGroupId);
-        if(courseScheduleList.size() > 0 ) {
+        if (courseScheduleList.size() > 0) {
             courseScheduleStudentPaymentService.deleteStudentCourseSchedule(userId, courseScheduleList);
         }
 
@@ -122,7 +122,7 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
             courseScheduleStudentPayment.setUpdateTime(date);
             courseScheduleStudentPayments.add(courseScheduleStudentPayment);
         }
-        if(courseScheduleStudentPayments.size() ==0){
+        if (courseScheduleStudentPayments.size() == 0) {
             return true;
         }
 
@@ -147,6 +147,12 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
         ClassGroupRelation classGroupRelation = classGroupRelationService.findClassGroupRelation(classGroupId);
 
         for (String userIdStr : userIdStrSet) {
+            List<ClassGroupStudentMapper> highClassGroupHasUser = classGroupStudentMapperDao.findHighClassGroupHasUser(classGroup.getMusicGroupId(), Integer.parseInt(userIdStr), classGroup.getType());
+            if (highClassGroupHasUser != null && highClassGroupHasUser.size() >= 0) {
+                userIdStrSet.remove(userIdStr);
+                continue;
+            }
+
             ClassGroupStudentMapper classGroupStudentMapper = new ClassGroupStudentMapper();
             classGroupStudentMapper.setMusicGroupId(classGroup.getMusicGroupId());
             classGroupStudentMapper.setClassGroupId(classGroupId);
@@ -161,7 +167,7 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
                 studentRegistrationService.update(studentRegistration);
             }
             //班级在合奏班中
-            if(classGroupRelation != null){
+            if (classGroupRelation != null) {
                 classGroupStudentMapper = new ClassGroupStudentMapper();
                 classGroupStudentMapper.setMusicGroupId(classGroup.getMusicGroupId());
                 classGroupStudentMapper.setClassGroupId(classGroupRelation.getClassGroupId());

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

@@ -5,6 +5,7 @@ import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
 import com.ym.mec.biz.dal.dao.SubjectDao;
 import com.ym.mec.biz.dal.dao.SubjectGoodsMapperDao;
 import com.ym.mec.biz.dal.dto.ConditionDto;
+import com.ym.mec.biz.dal.dto.SubFeeSettingDto;
 import com.ym.mec.biz.dal.dto.SubjectApplyDetailDto;
 import com.ym.mec.biz.dal.entity.Subject;
 import com.ym.mec.biz.dal.entity.SubjectGoodsMapper;
@@ -180,4 +181,9 @@ public class SubjectServiceImpl extends BaseServiceImpl<Integer, Subject>  imple
     public List<String> findBySubIds(String subIds) {
         return subjectDao.findBySubIds(subIds);
     }
+
+    @Override
+    public SubFeeSettingDto setSubjectInfo(Integer chargeTypeId) {
+        return null;
+    }
 }

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

@@ -272,7 +272,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 			}else if(DateUtil.minutesBetween(classEndDateAdd60Minutes,date) > 0){
 				teacherAttendance.setSignOutStatus(YesOrNoEnum.NO);
 			}else {
-				throw new BizException("签退时间异常");
+				return;
 			}
 			teacherAttendance.setSignOutTime(date);
 			teacherAttendanceDao.update(teacherAttendance);

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

@@ -175,7 +175,10 @@
     <select id="findHighClassGroupHasUser" resultMap="ClassGroupStudentMapper">
         SELECT cgsm.* FROM class_group_student_mapper cgsm
         LEFT JOIN class_group cg ON cgsm.class_group_id_ = cg.id_
-        WHERE cgsm.music_group_id_ = #{musicGroupId} AND cgsm.user_id_=#{userId} AND cg.type_ ='HIGH' AND cgsm.status_='NORMAL'
+        WHERE cgsm.music_group_id_ = #{musicGroupId}
+        AND cgsm.user_id_=#{userId}
+        AND cg.type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
+        AND cgsm.status_='NORMAL'
     </select>
     <select id="findClassGroupIdByUserAndCourseDateAndStatus" resultType="int">
         SELECT

+ 19 - 29
mec-biz/src/main/resources/config/mybatis/SysAccountMapper.xml

@@ -4,15 +4,16 @@
   <resultMap id="SysAccount" type="com.ym.mec.biz.dal.entity.SysAccount">
     <!--@Table sys_account-->
     <id column="id_" jdbcType="INTEGER" property="id" />
+    <result column="company_" jdbcType="VARCHAR" property="company" />
     <result column="mer_no_" jdbcType="VARCHAR" property="merNo" />
     <result column="max_receipt_" jdbcType="DECIMAL" property="maxReceipt" />
     <result column="has_receipt_" jdbcType="DECIMAL" property="hasReceipt" />
     <result column="channel_" jdbcType="VARCHAR" property="channel" />
-    <result column="channel_type_" jdbcType="CHAR" property="channelType" />
+    <result column="type_" jdbcType="CHAR" property="type" />
     <result column="version" jdbcType="INTEGER" property="version" />
   </resultMap>
   <sql id="Base_Column_List">
-    id_, mer_no_, max_receipt_, has_receipt_, channel_, channel_type_, version
+    id_,company_, mer_no_, max_receipt_, has_receipt_, channel_, type_, version
   </sql>
   <select id="get" parameterType="java.lang.Integer" resultMap="SysAccount">
     <!--@mbg.generated-->
@@ -30,6 +31,9 @@
     <!--@mbg.generated-->
     insert into sys_account
     <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="company != null">
+        company_,
+      </if>
       <if test="merNo != null">
         mer_no_,
       </if>
@@ -42,14 +46,17 @@
       <if test="channel != null">
         channel_,
       </if>
-      <if test="channelType != null">
-        channel_type_,
+      <if test="type != null">
+        type_,
       </if>
       <if test="version != null">
         version,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="company != null">
+        #{company,jdbcType=VARCHAR},
+      </if>
       <if test="merNo != null">
         #{merNo,jdbcType=VARCHAR},
       </if>
@@ -62,8 +69,8 @@
       <if test="channel != null">
         #{channel,jdbcType=VARCHAR},
       </if>
-      <if test="channelType != null">
-        #{channelType,jdbcType=CHAR},
+      <if test="type != null">
+          #{type,jdbcType=CHAR},
       </if>
       <if test="version != null">
         #{version,jdbcType=INTEGER},
@@ -74,6 +81,9 @@
     <!--@mbg.generated-->
     update sys_account
     <set>
+      <if test="company != null">
+        company_ = #{company,jdbcType=VARCHAR},
+      </if>
       <if test="merNo != null">
         mer_no_ = #{merNo,jdbcType=VARCHAR},
       </if>
@@ -86,8 +96,8 @@
       <if test="channel != null">
         channel_ = #{channel,jdbcType=VARCHAR},
       </if>
-      <if test="channelType != null">
-        channel_type_ = #{channelType,jdbcType=CHAR},
+      <if test="type != null">
+          type_ = #{type,jdbcType=CHAR},
       </if>
       <if test="version != null">
         version = version+1,
@@ -95,28 +105,8 @@
     </set>
     where id_ = #{id,jdbcType=INTEGER} AND version =#{version}
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.ym.mec.biz.dal.entity.SysAccount">
-    <!--@mbg.generated-->
-    update sys_account
-    set mer_no_ = #{merNo,jdbcType=VARCHAR},
-      max_receipt_ = #{maxReceipt,jdbcType=DECIMAL},
-      has_receipt_ = #{hasReceipt,jdbcType=DECIMAL},
-      channel_ = #{channel,jdbcType=VARCHAR},
-      channel_type_ = #{channelType,jdbcType=CHAR},
-      version = #{version,jdbcType=INTEGER}
-    where id_ = #{id,jdbcType=INTEGER}
-  </update>
-  <select id="find"></select>
   <!-- 获取一个私户账户 -->
   <select id="getPerAccount" resultMap="SysAccount">
-    SELECT * FROM sys_account WHERE channel_ = 'YQPAY' AND channel_type_ = 'PER'
+    SELECT * FROM sys_account WHERE channel_ = 'YQPAY' AND type_ = 'PER'
   </select>
-
-  <insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id_">
-    INSERT INTO sys_account (id_,mer_no_,channel_)
-    VALUES
-    <foreach collection="sysAccountList" item="data" separator=",">
-      (#{data.id},#{data.merNo},#{data.channel})
-    </foreach>
-  </insert>
 </mapper>

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

@@ -131,7 +131,8 @@
         <result column="class_date_" property="classDate"/>
         <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="name_" property="name"/>
-        <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="sign_in_status_" property="signInStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+        <result column="sign_out_status_" property="signOutStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
         <result column="remark_" property="remark"/>
     </resultMap>
 
@@ -161,7 +162,7 @@
     <select id="getTeacherPersonalAttendances" parameterType="map" resultMap="teacherPersonalAttendance">
         SELECT
             cs.class_date_,cs.start_class_time_,cs.name_,cs.type_,
-            ta.sign_in_status_ status_,ta.remark_
+            ta.sign_in_status_,ta.sign_out_status_,ta.remark_
         FROM
             teacher_attendance ta
         LEFT JOIN course_schedule cs ON ta.course_schedule_id_=cs.id_

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/controller/ClassGroupController.java

@@ -75,7 +75,7 @@ public class ClassGroupController extends BaseController {
         }
         Map<String, Object> classGroupAndStatusMap = new HashMap<>();
         List<HighClassGroupDto> highClassGroups = classGroupService.findClassGroupByMusicGroupIdAndSubjectId(musicGroupId, studentRegistration.getActualSubjectId());
-        List<ClassGroupStudentMapper> ClassGroupStudentMapper = classGroupStudentMapperDao.findHighClassGroupHasUser(musicGroupId, userId);
+        List<ClassGroupStudentMapper> ClassGroupStudentMapper = classGroupStudentMapperDao.findHighClassGroupHasUser(musicGroupId, userId,ClassGroupTypeEnum.HIGH);
         classGroupAndStatusMap.put("highClassGroups", highClassGroups);
         classGroupAndStatusMap.put("hasReg", false);
         if (ClassGroupStudentMapper.size() > 0) {

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/controller/SubjectController.java

@@ -65,6 +65,14 @@ public class SubjectController extends BaseController {
         return succeed(subjectService.findDefaultSubByChargeTypeId(chargeTypeId));
     }
 
+    @ApiOperation(value = "新建乐团时,获取设置声部费用默认数据")
+    @GetMapping("/setSubjectInfo")
+    @PreAuthorize("@pcs.hasPermissions('subject/setSubjectInfo')")
+    @ApiImplicitParams({ @ApiImplicitParam(name = "chargeTypeId", value = "收费类型编号", required = true, dataType = "Integer")})
+    public Object setSubjectInfo(Integer chargeTypeId){
+        return succeed(subjectService.setSubjectInfo(chargeTypeId));
+    }
+
     @ApiOperation(value = "修改、新增声部关联的商品列表")
     @PostMapping("/markGoods")
     @PreAuthorize("@pcs.hasPermissions('subject/markGoods')")