فهرست منبع

Merge branch 'master' of http://gogs.gisvg.com/YDM/graduate

47 3 ماه پیش
والد
کامیت
b8dbb159fc

+ 3 - 2
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/studentPassedExportRespVO.java

@@ -1,6 +1,7 @@
 package cn.iocoder.yudao.module.system.controller.admin.user.vo.user;
 
 import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
+import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
 import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import io.swagger.v3.oas.annotations.media.Schema;
@@ -20,12 +21,12 @@ public class studentPassedExportRespVO {
 
     @Schema(description = "选择状态", example = "1")
     @DictFormat("system_student_select_record_select_status")
-    @ExcelProperty("选择状态")
+    @ExcelProperty(value = "选择状态", converter = DictConvert.class)
     private Long selectStatus;
 
     @Schema(description = "硕士类型")
     @DictFormat("system_student_master_type")
-    @ExcelProperty("硕士类型")
+    @ExcelProperty(value = "硕士类型",converter = DictConvert.class)
     private Integer masterType;
 
     @Schema(description = "学生年级")

+ 11 - 3
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/studentUnPassedExportRespVO.java

@@ -1,16 +1,24 @@
 package cn.iocoder.yudao.module.system.controller.admin.user.vo.user;
 
 import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
+import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
 import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
 import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.Accessors;
 
 import java.time.LocalDate;
 
 @Schema(description = "管理后台 - 项目未通过学生excel  VO")
 @Data
-@ExcelIgnoreUnannotated
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+@Accessors(chain = false) // 设置 chain = false,避免用户导入有问题
 public class studentUnPassedExportRespVO {
 
     @Schema(description = "项目名称")
@@ -19,12 +27,12 @@ public class studentUnPassedExportRespVO {
 
     @Schema(description = "选择状态", example = "1")
     @DictFormat("system_student_select_record_select_status")
-    @ExcelProperty("选择状态")
+    @ExcelProperty(value = "选择状态", converter = DictConvert.class)
     private Long selectStatus;
 
     @Schema(description = "硕士类型")
     @DictFormat("system_student_master_type")
-    @ExcelProperty("硕士类型")
+    @ExcelProperty(value = "硕士类型",converter = DictConvert.class)
     private Integer masterType;
 
     @Schema(description = "学生年级")

+ 21 - 0
yudao-module-system/yudao-module-system-biz/src/main/resources/Mapper/user/AdminUserMapper.xml

@@ -517,6 +517,17 @@
             <when test="isPassed == 1">IN (2, 4)</when>
         </choose>
 
+        AND (
+        <if test="reqVO.selectStatus != null">
+            CASE
+            WHEN #{reqVO.selectStatus} = 4 THEN COALESCE(MAX(CASE WHEN r.select_type = 4 THEN 1 ELSE 0 END), 0) = 1
+            WHEN #{reqVO.selectStatus} = 2 THEN COALESCE(MAX(CASE WHEN r.select_type = 2 THEN 1 ELSE 0 END), 0) = 1
+            WHEN #{reqVO.selectStatus} = 1 THEN COALESCE(MAX(CASE WHEN r.select_type = 1 THEN 1 ELSE 0 END), 0) = 1
+            WHEN #{reqVO.selectStatus} = 0 THEN COALESCE(MAX(CASE WHEN r.select_type = 0 THEN 1 ELSE 0 END), 0) = 1
+            END
+        </if>
+        )
+
         ORDER BY
         a.id DESC
 
@@ -585,6 +596,16 @@
             <when test="isPassed == 0">IN (0, 1)</when>
             <when test="isPassed == 1">IN (2, 4)</when>
         </choose>
+        AND (
+        <if test="reqVO.selectStatus != null">
+            CASE
+            WHEN #{reqVO.selectStatus} = 4 THEN COALESCE(MAX(CASE WHEN r.select_type = 4 THEN 1 ELSE 0 END), 0) = 1
+            WHEN #{reqVO.selectStatus} = 2 THEN COALESCE(MAX(CASE WHEN r.select_type = 2 THEN 1 ELSE 0 END), 0) = 1
+            WHEN #{reqVO.selectStatus} = 1 THEN COALESCE(MAX(CASE WHEN r.select_type = 1 THEN 1 ELSE 0 END), 0) = 1
+            WHEN #{reqVO.selectStatus} = 0 THEN COALESCE(MAX(CASE WHEN r.select_type = 0 THEN 1 ELSE 0 END), 0) = 1
+            END
+        </if>
+        )
         ) AS subquery;
     </select>