学生采集信息导出
This commit is contained in:
@@ -10,6 +10,7 @@ import com.ruoyi.common.utils.SecurityUtils;
|
|||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.dw.domain.CjStudent;
|
import com.ruoyi.dw.domain.CjStudent;
|
||||||
import com.ruoyi.dw.domain.DwInfo;
|
import com.ruoyi.dw.domain.DwInfo;
|
||||||
|
import com.ruoyi.dw.domain.vo.StudentExportVo;
|
||||||
import com.ruoyi.dw.service.ICjStudentService;
|
import com.ruoyi.dw.service.ICjStudentService;
|
||||||
import com.ruoyi.system.service.ISysDeptService;
|
import com.ruoyi.system.service.ISysDeptService;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
@@ -72,8 +73,13 @@ public class CjStudentController extends BaseController
|
|||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, CjStudent cjStudent)
|
public void export(HttpServletResponse response, CjStudent cjStudent)
|
||||||
{
|
{
|
||||||
List<CjStudent> list = cjStudentService.selectCjStudentList(cjStudent);
|
Long deptId = SecurityUtils.getLoginUser().getDeptId();
|
||||||
ExcelUtil<CjStudent> util = new ExcelUtil<CjStudent>(CjStudent.class);
|
if (deptId.intValue() != 100){
|
||||||
|
SysDept dept = sysDeptService.selectDeptById(deptId);
|
||||||
|
cjStudent.setXy(dept.getDeptName());
|
||||||
|
}
|
||||||
|
List<StudentExportVo> list = cjStudentService.selectExportList(cjStudent);
|
||||||
|
ExcelUtil<StudentExportVo> util = new ExcelUtil<StudentExportVo>(StudentExportVo.class);
|
||||||
util.exportExcel(response, list, "采集学生信息数据");
|
util.exportExcel(response, list, "采集学生信息数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,6 +21,7 @@ public class CjStudent
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** id */
|
/** id */
|
||||||
|
@Excel(name = "序号")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 姓名 */
|
/** 姓名 */
|
||||||
@@ -102,7 +103,6 @@ public class CjStudent
|
|||||||
private String qt;
|
private String qt;
|
||||||
|
|
||||||
/** 是否确认 */
|
/** 是否确认 */
|
||||||
@Excel(name = "是否确认")
|
|
||||||
private Long sfqr;
|
private Long sfqr;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
|
@@ -0,0 +1,275 @@
|
|||||||
|
package com.ruoyi.dw.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import org.springframework.data.annotation.Transient;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 采集学生信息对象 cj_student
|
||||||
|
*
|
||||||
|
* @author sunyg
|
||||||
|
* @date 2025-06-26
|
||||||
|
*/
|
||||||
|
public class StudentExportVo
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** id */
|
||||||
|
@Excel(name = "序号")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 姓名 */
|
||||||
|
@Excel(name = "姓名")
|
||||||
|
private String xm;
|
||||||
|
|
||||||
|
/** 性别 */
|
||||||
|
@Excel(name = "性别")
|
||||||
|
private String xb;
|
||||||
|
|
||||||
|
@Excel(name = "学号")
|
||||||
|
private String xh;
|
||||||
|
|
||||||
|
/** 学院 */
|
||||||
|
@Excel(name = "学院")
|
||||||
|
private String xy;
|
||||||
|
|
||||||
|
/** 专业 */
|
||||||
|
@Excel(name = "专业")
|
||||||
|
private String zy;
|
||||||
|
|
||||||
|
@Excel(name = "班级")
|
||||||
|
private String bj;
|
||||||
|
|
||||||
|
/** 毕业年份 */
|
||||||
|
@Excel(name = "毕业年份")
|
||||||
|
private Integer bynf;
|
||||||
|
|
||||||
|
/** 最高学历 */
|
||||||
|
@Excel(name = "最高学历")
|
||||||
|
private String zgyl;
|
||||||
|
|
||||||
|
/** 工作单位 */
|
||||||
|
@Excel(name = "工作单位")
|
||||||
|
private String gzdw;
|
||||||
|
|
||||||
|
/** 单位性质 */
|
||||||
|
@Excel(name = "单位性质")
|
||||||
|
private String dwxz;
|
||||||
|
|
||||||
|
/** 单位地址 */
|
||||||
|
@Excel(name = "单位地址")
|
||||||
|
private String dwdz;
|
||||||
|
|
||||||
|
@Excel(name = "常驻地")
|
||||||
|
private String czd;
|
||||||
|
|
||||||
|
/** 职务级别 */
|
||||||
|
@Excel(name = "职务/职级")
|
||||||
|
private String zwjb;
|
||||||
|
|
||||||
|
/** 职务级别 */
|
||||||
|
@Excel(name = "社会兼职")
|
||||||
|
private String shjz;
|
||||||
|
|
||||||
|
/** 代表荣誉 */
|
||||||
|
@Excel(name = "代表荣誉")
|
||||||
|
private String dbry;
|
||||||
|
|
||||||
|
/** 荣誉是否展示 */
|
||||||
|
@Excel(name = "荣誉是否展示")
|
||||||
|
private String rysfzs;
|
||||||
|
|
||||||
|
/** 手机 */
|
||||||
|
@Excel(name = "联系电话")
|
||||||
|
private String sj;
|
||||||
|
|
||||||
|
/** 邮箱 */
|
||||||
|
@Excel(name = "邮箱")
|
||||||
|
private String yx;
|
||||||
|
|
||||||
|
public String getCzd() {
|
||||||
|
return czd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCzd(String czd) {
|
||||||
|
this.czd = czd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setXm(String xm)
|
||||||
|
{
|
||||||
|
this.xm = xm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXm()
|
||||||
|
{
|
||||||
|
return xm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setXb(String xb)
|
||||||
|
{
|
||||||
|
this.xb = xb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXb()
|
||||||
|
{
|
||||||
|
return xb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setZy(String zy)
|
||||||
|
{
|
||||||
|
this.zy = zy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZy()
|
||||||
|
{
|
||||||
|
return zy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBynf(Integer bynf) {
|
||||||
|
this.bynf = bynf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBynf() {
|
||||||
|
return bynf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setZgyl(String zgyl)
|
||||||
|
{
|
||||||
|
this.zgyl = zgyl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZgyl()
|
||||||
|
{
|
||||||
|
return zgyl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGzdw(String gzdw)
|
||||||
|
{
|
||||||
|
this.gzdw = gzdw;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGzdw()
|
||||||
|
{
|
||||||
|
return gzdw;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDwxz(String dwxz)
|
||||||
|
{
|
||||||
|
this.dwxz = dwxz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDwxz()
|
||||||
|
{
|
||||||
|
return dwxz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDwdz(String dwdz)
|
||||||
|
{
|
||||||
|
this.dwdz = dwdz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDwdz()
|
||||||
|
{
|
||||||
|
return dwdz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setZwjb(String zwjb)
|
||||||
|
{
|
||||||
|
this.zwjb = zwjb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZwjb()
|
||||||
|
{
|
||||||
|
return zwjb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShjz(String shjz)
|
||||||
|
{
|
||||||
|
this.shjz = shjz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShjz()
|
||||||
|
{
|
||||||
|
return shjz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDbry(String dbry)
|
||||||
|
{
|
||||||
|
this.dbry = dbry;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDbry()
|
||||||
|
{
|
||||||
|
return dbry;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRysfzs() {
|
||||||
|
return rysfzs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRysfzs(String rysfzs) {
|
||||||
|
this.rysfzs = rysfzs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSj(String sj)
|
||||||
|
{
|
||||||
|
this.sj = sj;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSj()
|
||||||
|
{
|
||||||
|
return sj;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setYx(String yx)
|
||||||
|
{
|
||||||
|
this.yx = yx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getYx()
|
||||||
|
{
|
||||||
|
return yx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getXy() {
|
||||||
|
return xy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setXy(String xy) {
|
||||||
|
this.xy = xy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXh() {
|
||||||
|
return xh;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setXh(String xh) {
|
||||||
|
this.xh = xh;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getBj() {
|
||||||
|
return bj;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBj(String bj) {
|
||||||
|
this.bj = bj;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -2,6 +2,7 @@ package com.ruoyi.dw.mapper;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.dw.domain.CjStudent;
|
import com.ruoyi.dw.domain.CjStudent;
|
||||||
|
import com.ruoyi.dw.domain.vo.StudentExportVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,6 +29,8 @@ public interface CjStudentMapper
|
|||||||
*/
|
*/
|
||||||
public List<CjStudent> selectCjStudentList(CjStudent cjStudent);
|
public List<CjStudent> selectCjStudentList(CjStudent cjStudent);
|
||||||
|
|
||||||
|
public List<StudentExportVo> selectExportList(CjStudent cjStudent);
|
||||||
|
|
||||||
public CjStudent selectCjStudentByXh(String xh);
|
public CjStudent selectCjStudentByXh(String xh);
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@ package com.ruoyi.dw.service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.dw.domain.CjStudent;
|
import com.ruoyi.dw.domain.CjStudent;
|
||||||
|
import com.ruoyi.dw.domain.vo.StudentExportVo;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,6 +29,8 @@ public interface ICjStudentService
|
|||||||
*/
|
*/
|
||||||
public List<CjStudent> selectCjStudentList(CjStudent cjStudent);
|
public List<CjStudent> selectCjStudentList(CjStudent cjStudent);
|
||||||
|
|
||||||
|
public List<StudentExportVo> selectExportList(CjStudent cjStudent);
|
||||||
|
|
||||||
|
|
||||||
public List<CjStudent> selectCjStudentByIds(Long[] ids ,String zy);
|
public List<CjStudent> selectCjStudentByIds(Long[] ids ,String zy);
|
||||||
/**
|
/**
|
||||||
|
@@ -3,6 +3,7 @@ package com.ruoyi.dw.service.impl;
|
|||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
import com.ruoyi.dw.domain.CjStudent;
|
import com.ruoyi.dw.domain.CjStudent;
|
||||||
|
import com.ruoyi.dw.domain.vo.StudentExportVo;
|
||||||
import com.ruoyi.dw.mapper.CjStudentMapper;
|
import com.ruoyi.dw.mapper.CjStudentMapper;
|
||||||
import com.ruoyi.dw.service.ICjStudentService;
|
import com.ruoyi.dw.service.ICjStudentService;
|
||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
@@ -55,6 +56,11 @@ public class CjStudentServiceImpl implements ICjStudentService
|
|||||||
return cjStudentMapper.selectCjStudentList(cjStudent);
|
return cjStudentMapper.selectCjStudentList(cjStudent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StudentExportVo> selectExportList(CjStudent cjStudent) {
|
||||||
|
return cjStudentMapper.selectExportList(cjStudent);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CjStudent> selectCjStudentByIds(Long[] ids,String zy) {
|
public List<CjStudent> selectCjStudentByIds(Long[] ids,String zy) {
|
||||||
return cjStudentMapper.selectCjStudentByIds(ids,zy);
|
return cjStudentMapper.selectCjStudentByIds(ids,zy);
|
||||||
|
@@ -63,6 +63,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
order by update_time desc
|
order by update_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectExportList" parameterType="CjStudent" resultType="com.ruoyi.dw.domain.vo.StudentExportVo">
|
||||||
|
select id,xm,xb,xh,xy,zy,bj,bynf,zgyl,gzdw,
|
||||||
|
dwxz,dwdz,concat(sydsh,sydshi)as czd,
|
||||||
|
zwjb,shjz,dbry,(case rysfzs
|
||||||
|
when 0 Then '否'
|
||||||
|
when 1 then '是'
|
||||||
|
else '否' end) as rysfzs,
|
||||||
|
sj,yx from cj_student
|
||||||
|
<where>
|
||||||
|
<if test="xm != null and xm != ''"> and xm like concat('%', #{xm}, '%')</if>
|
||||||
|
<if test="xh != null and xh != ''"> and xh = #{xh}</if>
|
||||||
|
<if test="bj != null and bj != ''"> and bj = #{bj}</if>
|
||||||
|
<if test="xb != null and xb != ''"> and xb = #{xb}</if>
|
||||||
|
<if test="zy != null and zy != ''"> and zy like concat('%', #{zy}, '%')</if>
|
||||||
|
<if test="xy != null and xy != ''"> and xy like concat('%', #{xy}, '%')</if>
|
||||||
|
<if test="bynf != null "> and bynf = #{bynf}</if>
|
||||||
|
</where>
|
||||||
|
order by update_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectCjStudentByIds" resultMap="CjStudentResult">
|
<select id="selectCjStudentByIds" resultMap="CjStudentResult">
|
||||||
<include refid="selectCjStudentVo"/>
|
<include refid="selectCjStudentVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
Reference in New Issue
Block a user