yonge hace 4 años
padre
commit
c53f8445d2

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/StudentManageListDto.java

@@ -80,6 +80,8 @@ public class StudentManageListDto {
     private String subjectIdList;
 
     private Integer isNewUser;
+    
+    private boolean isSignedContract;
 
     public Integer getIsNewUser() {
         return isNewUser;
@@ -304,4 +306,12 @@ public class StudentManageListDto {
 	public void setSubjectIdList(String subjectIdList) {
 		this.subjectIdList = subjectIdList;
 	}
+
+	public boolean getIsSignedContract() {
+		return isSignedContract;
+	}
+
+	public void setIsSignedContract(boolean isSignedContract) {
+		this.isSignedContract = isSignedContract;
+	}
 }

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

@@ -63,6 +63,7 @@
         <result property="teacherId" column="teacher_id_"/>
         <result property="subjectIdList" column="subject_id_list_"/>
         <result property="isNewUser" column="is_new_user_"/>
+        <result property="isSignedContract" column="is_signed_contract_"/>
     </resultMap>
 
     <sql id="queryCondition">
@@ -152,13 +153,15 @@
         SELECT o.`name_` organ_name_,s.`user_id_` ,su.`username_` ,su.`phone_` parents_phone_,su.`real_name_` ,su.`gender_` , su.organ_id_,
 		tu.`real_name_` teacher_name_,IF(s.service_tag_=2,0,s.service_tag_) service_tag_ ,s.`operating_tag_` , suca.`course_balance_` ,
 		sub.`name_` music_group_subject_ ,su.birthdate_,s.subject_id_list_,s.teacher_id_,
-		case when su.password_ is null then false else true end isActive_,s.is_new_user_
+		case when su.password_ is null then false else true end isActive_,s.is_new_user_,case when count(sut.user_id_) > 0 then 1 else 0 end is_signed_contract_
 		FROM `student` s LEFT JOIN `sys_user` su on s.`user_id_` = su.`id_`
 		LEFT JOIN `organization` o on o.`id_` = su.`organ_id_`
 		LEFT JOIN `sys_user` tu on tu.`id_` = s.`teacher_id_` 
 		LEFT JOIN `sys_user_cash_account` suca on suca.`user_id_` = s.`user_id_`
 		LEFT JOIN `subject` sub on sub.id_ = s.`subject_id_list_`
+		left join sys_user_tsign sut on sut.user_id_ = s.user_id_
         <include refid="findStudentsByOrganIdSql"/>
+        group by s.user_id_
         ORDER BY su.create_time_ DESC
         <include refid="global.limit"/>
     </select>

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

@@ -605,10 +605,10 @@ public class ExportController extends BaseController {
         try {
             HSSFWorkbook workbook = POIUtil.exportExcel(new String[]{"分部", "学员编号", "学员姓名", "性别", "家长姓名",
                     "家长联系电话", "是否激活", "是否有课", "是否有网管课", "课程余额(元)", "账户余额(元)",
-                    "所在乐团", "乐团所属声部", "所在乐团状态", "所在vip课", "所在VIP状态", "服务标签", "运营标签", "指导老师"}, new String[]{
+                    "所在乐团", "乐团所属声部", "所在乐团状态", "所在vip课", "所在VIP状态", "服务标签", "运营标签", "指导老师","是否签订协议"}, new String[]{
                     "organName", "userId", "username", "gender.description", "parentsName", "parentsPhone",
                     "isActive.msg", "hasCourse.msg", "hasPracticeCourse.msg", "courseBalance", "balance", "musicGroupName",
-                    "subjectName", "musicGroupStatus", "vipGroupName", "vipGroupStatus", "serviceTag.msg", "operatingTag.msg", "teacherName"}, rows);
+                    "subjectName", "musicGroupStatus", "vipGroupName", "vipGroupStatus", "serviceTag.msg", "operatingTag.msg", "teacherName", "isSignedContract"}, rows);
             response.setContentType("application/octet-stream");
             response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
             response.flushBuffer();