浏览代码

add web乐器维护列表

周箭河 4 年之前
父节点
当前提交
9fde00dea1

+ 22 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/MusicGroupStudentQueryInfo.java

@@ -41,6 +41,12 @@ public class MusicGroupStudentQueryInfo extends QueryInfo {
   @ApiModelProperty(value = "加油包:0:默认不可用;1:可用;2:已使用;")
   private Integer comeOnPackage;
 
+  @ApiModelProperty(value = "年级",required = false)
+  private String currentGrade;
+
+  @ApiModelProperty(value = "入学年份",required = false)
+  private String createYear;
+
   private boolean isExport = false;
 
   public Boolean getOweFlag() {
@@ -146,4 +152,20 @@ public class MusicGroupStudentQueryInfo extends QueryInfo {
   public void setPaymentStatus(String paymentStatus) {
     this.paymentStatus = paymentStatus;
   }
+
+  public String getCurrentGrade() {
+    return currentGrade;
+  }
+
+  public void setCurrentGrade(String currentGrade) {
+    this.currentGrade = currentGrade;
+  }
+
+  public String getCreateYear() {
+    return createYear;
+  }
+
+  public void setCreateYear(String createYear) {
+    this.createYear = createYear;
+  }
 }

+ 24 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/StudentRegistrationQueryInfo.java

@@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModelProperty;
 import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 import com.ym.mec.common.page.QueryInfo;
 
+import javax.xml.crypto.Data;
+
 public class StudentRegistrationQueryInfo extends QueryInfo {
 
     @ApiModelProperty(value = "乐团编号",required = false)
@@ -25,6 +27,12 @@ public class StudentRegistrationQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "用户名或手机号",required = false)
     private String name;
 
+    @ApiModelProperty(value = "年级",required = false)
+    private String currentGrade;
+
+    @ApiModelProperty(value = "入学年份",required = false)
+    private String createYear;
+
     private boolean isExport = false;
 
     public boolean getIsExport() {
@@ -82,4 +90,20 @@ public class StudentRegistrationQueryInfo extends QueryInfo {
     public void setPaymentStatus(String paymentStatus) {
         this.paymentStatus = paymentStatus;
     }
+
+    public String getCreateYear() {
+        return createYear;
+    }
+
+    public void setCreateYear(String createYear) {
+        this.createYear = createYear;
+    }
+
+    public String getCurrentGrade() {
+        return currentGrade;
+    }
+
+    public void setCurrentGrade(String currentGrade) {
+        this.currentGrade = currentGrade;
+    }
 }

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

@@ -473,6 +473,12 @@
                     #{item}
                 </foreach>
             </if>
+            <if test="currentGrade != null">
+                AND sr.current_grade_ LIKE CONCAT('%',#{currentGrade},'%')
+            </if>
+            <if test="createYear != null">
+                AND DATE_FORMAT(sr.create_time_,'%Y') =  #{createYear}
+            </if>
         </where>
     </sql>
     <resultMap id="MusicGroupStudentsDto" type="com.ym.mec.biz.dal.dto.MusicGroupStudentsDto">

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

@@ -291,6 +291,12 @@
             <if test="name != null">
                 AND (sr.name_ LIKE CONCAT('%',#{name},'%') OR sr.parents_phone_ LIKE CONCAT('%',#{name},'%'))
             </if>
+            <if test="currentGrade != null">
+                AND sr.current_grade_ LIKE CONCAT('%',#{currentGrade},'%')
+            </if>
+            <if test="createYear != null">
+                AND DATE_FORMAT(sr.create_time_,'%Y') =  #{createYear}
+            </if>
         </where>
     </sql>
 

+ 11 - 0
mec-web/src/main/java/com/ym/mec/web/controller/OrganizationController.java

@@ -6,6 +6,7 @@ import com.ym.mec.biz.dal.entity.Organization;
 import com.ym.mec.biz.dal.page.OrganizationQueryInfo;
 import com.ym.mec.biz.service.OrganizationService;
 import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.common.entity.HttpResponseResult;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -14,6 +15,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Date;
+import java.util.Map;
 
 @RequestMapping("organization")
 @Api(tags = "分部服务")
@@ -72,4 +74,13 @@ public class OrganizationController extends BaseController {
     public Object get( @PathVariable("id") Integer id){
         return succeed(organizationService.get(id));
     }
+
+
+    @ApiOperation(value = "获取用户所在分部的年级列表)")
+    @GetMapping("organization/getGradeList")
+    @PreAuthorize("@pcs.hasPermissions('organization/getGradeList')")
+    @ApiParam(value = "分部编号", required = true)
+    public HttpResponseResult<Map<Integer,String>> getGradeList(Integer id) {
+        return succeed(organizationService.getGradeList(id));
+    }
 }