瀏覽代碼

学员乐器维修

zouxuan 2 年之前
父節點
當前提交
821e2bb59e

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/RepairStudentQueryInfo.java

@@ -37,6 +37,16 @@ public class RepairStudentQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "是否有减免金额0-否 1-是",required = false)
     private Integer hasExemptionAmount;
 
+    @ApiModelProperty(value = "是否乐器维修",required = false)
+    private Boolean repairFlag;
+
+    public Boolean getRepairFlag() {
+        return repairFlag;
+    }
+
+    public void setRepairFlag(Boolean repairFlag) {
+        this.repairFlag = repairFlag;
+    }
 
     public Integer getSubjectId() {
         return subjectId;

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

@@ -4020,9 +4020,10 @@
         <result property="courseScheduleReviewId" column="course_schedule_review_id_"/>
         <result property="classDate" column="class_date_"/>
         <result property="studentAttendanceId" column="student_attendance_id_"/>
+        <result property="repairFlag" column="repair_flag_"/>
     </resultMap>
     <select id="queryStudyStandard" resultMap="StudentStandardDto">
-        SELECT su.avatar_,su.username_,sa.user_id_,sb.name_ subject_name_,sa.qualified_flag_
+        SELECT su.avatar_,su.username_,sa.user_id_,sb.name_ subject_name_,sa.qualified_flag_,s.repair_flag_
         FROM student_attendance sa
         LEFT JOIN student s ON s.user_id_ = sa.user_id_
         LEFT JOIN `subject` sb ON sb.id_ = s.subject_id_list_

+ 15 - 9
mec-biz/src/main/resources/config/mybatis/StudentRepairMapper.xml

@@ -151,23 +151,29 @@
         SELECT su.username_ ,su.id_ user_id_,su.avatar_ head_url_,su.gender_,su.phone_,s.care_package_,s.come_on_package_,su.organ_id_
         FROM sys_user su
         LEFT JOIN student s ON su.id_=s.user_id_
-        WHERE FIND_IN_SET(organ_id_,#{organIdList})
-        AND user_type_ LIKE '%STUDENT%'
+        WHERE FIND_IN_SET(su.organ_id_,#{organIdList})
+        AND su.user_type_ LIKE '%STUDENT%' AND su.del_flag_ = 0
         <if test="search">
-            AND (username_ LIKE CONCAT(#{search},'%') OR phone_ LIKE CONCAT(#{search},'%'))
+            AND (su.username_ LIKE CONCAT(#{search},'%') OR su.phone_ LIKE CONCAT(#{search},'%'))
+        </if>
+        <if test="repairFlag != null">
+            AND s.repair_flag_ = #{repairFlag}
         </if>
-        AND del_flag_ = 0
         <include refid="global.limit"/>
     </select>
 
     <select id="getStudentsCount" resultType="java.lang.Integer">
-        SELECT COUNT(*) FROM sys_user
-        WHERE FIND_IN_SET(organ_id_,#{organIdList})
-        AND user_type_ LIKE '%STUDENT%'
+        SELECT COUNT(su.id_) FROM sys_user su
+        <if test="repairFlag != null">
+            LEFT JOIN student s ON su.id_=s.user_id_
+        </if>
+        WHERE FIND_IN_SET(su.organ_id_,#{organIdList}) AND su.user_type_ LIKE '%STUDENT%' AND su.del_flag_ = 0
         <if test="search">
-            AND (username_ LIKE CONCAT(#{search},'%') OR phone_ LIKE CONCAT(#{search},'%'))
+            AND (su.username_ LIKE CONCAT(#{search},'%') OR su.phone_ LIKE CONCAT(#{search},'%'))
+        </if>
+        <if test="repairFlag != null">
+            AND s.repair_flag_ = #{repairFlag}
         </if>
-        AND del_flag_ = 0
     </select>
 
     <select id="queryPage" resultMap="StudentRepair">

+ 7 - 2
mec-web/src/main/java/com/ym/mec/web/controller/education/EduStudentController.java

@@ -4,7 +4,6 @@ import com.ym.mec.biz.dal.dto.BaseMapDto;
 import com.ym.mec.biz.dal.dto.EduOrganStudentDataDto;
 import com.ym.mec.biz.dal.dto.StatDto;
 import com.ym.mec.biz.dal.entity.Organization;
-import com.ym.mec.biz.dal.entity.Subject;
 import com.ym.mec.biz.dal.page.StudentQueryInfo;
 import com.ym.mec.biz.service.OrganizationService;
 import com.ym.mec.biz.service.StudentManageService;
@@ -15,7 +14,6 @@ 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.util.CollectionUtils;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -69,4 +67,11 @@ public class EduStudentController extends BaseController {
     public HttpResponseResult<List<BaseMapDto>> queryStuSubjectId(){
         return succeed(studentService.queryStuSubjectId(organizationService.getEmployeeOrgan(null)));
     }
+
+    @ApiOperation(value = "修改学员维修标记")
+    @GetMapping("/updateRepairFlag")
+    public HttpResponseResult updateRepairFlag(Integer userId,Boolean repairFlag){
+        studentService.updateRepairFlag(userId,repairFlag);
+        return succeed();
+    }
 }