Ver código fonte

Merge remote-tracking branch 'origin/music_detail' into music_detail

zouxuan 4 anos atrás
pai
commit
919aa1b25b

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

@@ -646,4 +646,11 @@ public interface StudentRegistrationDao extends BaseDAO<Long, StudentRegistratio
      * @return
      */
     List<Mapper> countStudentWithGradeByMusicGroupId(String musicGroupId);
+    
+    /**
+     * 查询学生报名购买的乐器详情
+     * @param params
+     * @return
+     */
+    List<StudentRegisterInstrumentsDetailDto> queryStudentRegisterInstrumentsDetail(Map<String, Object> params);
 }

+ 161 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentRegisterInstrumentsDetailDto.java

@@ -0,0 +1,161 @@
+package com.ym.mec.biz.dal.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+public class StudentRegisterInstrumentsDetailDto {
+
+	@ApiModelProperty(value = "学生编号", required = false)
+	private Integer userId;
+
+	@ApiModelProperty(value = "学生姓名", required = false)
+	private String name;
+
+	@ApiModelProperty(value = "学生手机号码", required = false)
+	private String phone;
+
+	@ApiModelProperty(value = "性别(0,女  1,男", required = false)
+	private Integer gender;
+
+	@ApiModelProperty(value = "当前所在年级", required = false)
+	private Integer currentGradeNum;
+
+	@ApiModelProperty(value = "当前所在年级", required = false)
+	private String currentGrade;
+
+	@ApiModelProperty(value = "实际科目", required = false)
+	private Integer actualSubjectId;
+
+	@ApiModelProperty(value = "实际科目名称", required = false)
+	private String subjectName;
+
+	@ApiModelProperty(value = "乐器名称")
+	private String goodsName;
+
+	@ApiModelProperty(value = "乐器品牌")
+	private String goodsBrand;
+
+	@ApiModelProperty(value = "乐器规格")
+	private String specification;
+
+	private Date goodsBuyTime;
+
+	@ApiModelProperty(value = "乐保开始时间")
+	private Date insuranceStartTime;
+
+	@ApiModelProperty(value = "乐保结束时间")
+	private Date insuranceEndTime;
+
+	public Integer getUserId() {
+		return userId;
+	}
+
+	public void setUserId(Integer userId) {
+		this.userId = userId;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getPhone() {
+		return phone;
+	}
+
+	public void setPhone(String phone) {
+		this.phone = phone;
+	}
+
+	public Integer getGender() {
+		return gender;
+	}
+
+	public void setGender(Integer gender) {
+		this.gender = gender;
+	}
+
+	public Integer getCurrentGradeNum() {
+		return currentGradeNum;
+	}
+
+	public void setCurrentGradeNum(Integer currentGradeNum) {
+		this.currentGradeNum = currentGradeNum;
+	}
+
+	public String getCurrentGrade() {
+		return currentGrade;
+	}
+
+	public void setCurrentGrade(String currentGrade) {
+		this.currentGrade = currentGrade;
+	}
+
+	public Integer getActualSubjectId() {
+		return actualSubjectId;
+	}
+
+	public void setActualSubjectId(Integer actualSubjectId) {
+		this.actualSubjectId = actualSubjectId;
+	}
+
+	public String getSubjectName() {
+		return subjectName;
+	}
+
+	public void setSubjectName(String subjectName) {
+		this.subjectName = subjectName;
+	}
+
+	public String getGoodsName() {
+		return goodsName;
+	}
+
+	public void setGoodsName(String goodsName) {
+		this.goodsName = goodsName;
+	}
+
+	public String getGoodsBrand() {
+		return goodsBrand;
+	}
+
+	public void setGoodsBrand(String goodsBrand) {
+		this.goodsBrand = goodsBrand;
+	}
+
+	public String getSpecification() {
+		return specification;
+	}
+
+	public void setSpecification(String specification) {
+		this.specification = specification;
+	}
+
+	public Date getGoodsBuyTime() {
+		return goodsBuyTime;
+	}
+
+	public void setGoodsBuyTime(Date goodsBuyTime) {
+		this.goodsBuyTime = goodsBuyTime;
+	}
+
+	public Date getInsuranceStartTime() {
+		return insuranceStartTime;
+	}
+
+	public void setInsuranceStartTime(Date insuranceStartTime) {
+		this.insuranceStartTime = insuranceStartTime;
+	}
+
+	public Date getInsuranceEndTime() {
+		return insuranceEndTime;
+	}
+
+	public void setInsuranceEndTime(Date insuranceEndTime) {
+		this.insuranceEndTime = insuranceEndTime;
+	}
+}

+ 51 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/MusicGroupRecordStudentQueryInfo.java

@@ -0,0 +1,51 @@
+package com.ym.mec.biz.dal.page;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import com.ym.mec.common.page.QueryInfo;
+
+public class MusicGroupRecordStudentQueryInfo extends QueryInfo {
+	
+	private String musicGroupId;
+
+	/**  */
+	private Integer subjectId;
+
+	@ApiModelProperty(value = "年级 1-13")
+	private Integer currentGradeNum;
+
+	@ApiModelProperty(value = "是否购买乐保")
+	private Boolean isBuyInstrumentsInsurance;
+
+	public String getMusicGroupId() {
+		return musicGroupId;
+	}
+
+	public void setMusicGroupId(String musicGroupId) {
+		this.musicGroupId = musicGroupId;
+	}
+
+	public Integer getSubjectId() {
+		return subjectId;
+	}
+
+	public void setSubjectId(Integer subjectId) {
+		this.subjectId = subjectId;
+	}
+
+	public Integer getCurrentGradeNum() {
+		return currentGradeNum;
+	}
+
+	public void setCurrentGradeNum(Integer currentGradeNum) {
+		this.currentGradeNum = currentGradeNum;
+	}
+
+	public Boolean getIsBuyInstrumentsInsurance() {
+		return isBuyInstrumentsInsurance;
+	}
+
+	public void setIsBuyInstrumentsInsurance(Boolean isBuyInstrumentsInsurance) {
+		this.isBuyInstrumentsInsurance = isBuyInstrumentsInsurance;
+	}
+}

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

@@ -1569,4 +1569,31 @@
 		where sr.music_group_status_ = 'NORMAL' and sr.music_group_id_ = #{musicGroupId} 
 		group by s.current_grade_num_
     </select>
+    
+    <select id="queryStudentRegisterInstrumentsDetail" resultType="com.ym.mec.biz.dal.dto.StudentRegisterInstrumentsDetailDto" parameterType="map">
+        SELECT sr.user_id_ userId,u.username_ name,u.phone_ phone,u.gender_ phone,sub.name_ subjectName,sr.actual_subject_id_ actualSubjectId,s.current_grade_num_ currentGradeNum,
+        si.goods_brand_ goodsBrand,si.goods_name_ goodsName,si.specification_ specification,si.create_time_ goodsBuyTime,si.start_time_ insuranceStartTime,si.end_time_ insuranceEndTime
+		from student_registration sr LEFT JOIN sys_user u on sr.user_id_ = u.id_ 
+		LEFT JOIN student s on s.user_id_ = sr.user_id_ LEFT JOIN `subject` sub on sub.id_ = sr.actual_subject_id_
+		LEFT JOIN student_instrument si on si.student_id_ = sr.user_id_
+		WHERE sr.music_group_status_ = 'NORMAL' 
+		<if test="musicGroupId != null">
+			AND sr.music_group_id_ = #{musicGroupId}
+		</if>
+		<if test="subjectId != null">
+			AND sr.actual_subject_id_ = #{subjectId}
+		</if>
+		<if test="currentGradeNum != null">
+			AND s.current_grade_num_ = #{currentGradeNum}
+		</if>
+		<if test="isBuyInstrumentsInsurance != null and isBuyInstrumentsInsurance == true">
+			AND si.start_time_ is not null
+		</if>
+		<if test="isBuyInstrumentsInsurance != null and isBuyInstrumentsInsurance == false">
+			AND si.start_time_ is null
+		</if>
+		<if test="search != null and search != ''">
+			AND (u.username_ LIKE CONCAT('%',#{search},'%') OR u.phone_ LIKE CONCAT('%',#{search},'%')) or u.id_ LIKE CONCAT('%',#{search},'%'))
+		</if>
+    </select>
 </mapper>

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

@@ -1,10 +1,11 @@
 package com.ym.mec.web.controller;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 
-import java.util.Map;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.ui.ModelMap;
@@ -16,10 +17,12 @@ import com.ym.mec.biz.dal.dao.ClassGroupDao;
 import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
 import com.ym.mec.biz.dal.dto.MusicGroupBasicDto;
 import com.ym.mec.biz.dal.entity.MusicGroup;
+import com.ym.mec.biz.dal.page.MusicGroupRecordStudentQueryInfo;
 import com.ym.mec.biz.service.CooperationOrganLinkmanService;
 import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.biz.service.OrganizationService;
 import com.ym.mec.common.controller.BaseController;
+import com.ym.mec.util.collection.MapUtil;
 
 @RequestMapping("musicGroupRecord")
 @Api(tags = "乐团档案")
@@ -76,4 +79,13 @@ public class MusicGroupRecordController extends BaseController {
 		
 		return succeed(model);
 	}
+
+	@ApiOperation(value = "学员列表")
+	@GetMapping("/queryStudentInfo")
+	@PreAuthorize("@pcs.hasPermissions('musicGroupRecord/queryStudentInfo')")
+	public Object queryStudentInfo(MusicGroupRecordStudentQueryInfo queryInfo) {
+		Map<String, Object> params = new HashMap<String, Object>();
+		MapUtil.populateMap(params, queryInfo);
+		return succeed(studentRegistrationDao.queryStudentRegisterInstrumentsDetail(params));
+	}
 }