diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index c4191ef..578ff6f 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -206,6 +206,10 @@ public class ExcelUtil this.clazz = clazz; } + public Workbook getWb(){ + return wb; + } + /** * 仅在Excel中显示列属性 * diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/CjOptionController.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/CjOptionController.java index a4818c1..80de71f 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/CjOptionController.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/CjOptionController.java @@ -1,18 +1,29 @@ package com.ruoyi.dw.controller; +import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.dw.domain.CjOption; +import com.ruoyi.dw.domain.CjStudent; +import com.ruoyi.dw.domain.vo.OptionUserVo; import com.ruoyi.dw.service.ICjOptionService; +import com.ruoyi.dw.service.ICjStudentService; +import org.apache.poi.ss.usermodel.Workbook; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpHeaders; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.util.List; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; /** * 数据采集选项Controller @@ -27,6 +38,9 @@ public class CjOptionController extends BaseController @Autowired private ICjOptionService cjOptionService; + @Resource + private ICjStudentService cjStudentService; + /** * 查询数据采集选项列表 */ @@ -43,11 +57,44 @@ public class CjOptionController extends BaseController */ @Log(title = "数据采集选项", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, CjOption cjOption) + public void export(HttpServletResponse response, @RequestBody OptionUserVo userVo) throws IOException { - List list = cjOptionService.selectCjOptionList(cjOption); - ExcelUtil util = new ExcelUtil(CjOption.class); - util.exportExcel(response, list, "数据采集选项数据"); + List listOption = cjOptionService.selectCjOptionByIds(userVo.getOptionId()); + List listStudent = cjStudentService.selectCjStudentByIds(userVo.getStudentId()); + + // 设置响应头,通知浏览器下载 ZIP 文件 + String zipFileName = "export_data_" + System.currentTimeMillis() + ".zip"; + response.setContentType("application/zip"); + response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + zipFileName + "\""); + // 使用 ZipOutputStream 将两个 Excel 文件打包 + try (ZipOutputStream zipOut = new ZipOutputStream(response.getOutputStream())) { + // 1. 导出选项数据 Excel + addExcelToZip(zipOut, listOption, "选项数据.xlsx", CjOption.class); + + // 2. 导出学生信息 Excel + addExcelToZip(zipOut, listStudent, "学生信息.xlsx", CjStudent.class); + } + + } + + /** + * 将 Excel 数据写入 ZIP 流中 + */ + private void addExcelToZip(ZipOutputStream zipOut, List dataList, String fileName, Class clazz) throws IOException { + ExcelUtil excelUtil = new ExcelUtil<>(clazz); + excelUtil.init(dataList, "数据", StringUtils.EMPTY, Excel.Type.EXPORT); + excelUtil.writeSheet(); + + // 创建 ZIP 条目 + ZipEntry zipEntry = new ZipEntry(fileName); + zipOut.putNextEntry(zipEntry); + + // 将 Excel 写入 ZIP 流 + Workbook workbook = excelUtil.getWb(); + workbook.write(zipOut); + + // 关闭当前 ZIP 条目 + zipOut.closeEntry(); } /** diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/CjStudentController.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/CjStudentController.java index 18d3a67..6eb1cd4 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/CjStudentController.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/CjStudentController.java @@ -12,12 +12,14 @@ import com.ruoyi.dw.domain.CjStudent; import com.ruoyi.dw.domain.DwInfo; import com.ruoyi.dw.service.ICjStudentService; import com.ruoyi.system.service.ISysDeptService; +import org.apache.poi.ss.usermodel.Workbook; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; +import java.time.LocalDate; import java.util.List; /** @@ -48,6 +50,16 @@ public class CjStudentController extends BaseController SysDept dept = sysDeptService.selectDeptById(deptId); cjStudent.setXy(dept.getDeptName()); } + if (cjStudent.getInfoId() != null){ + int currentYear = LocalDate.now().getYear(); + if (cjStudent.getInfoId().intValue() == 1){ + currentYear = currentYear -4; + cjStudent.setGtYear(currentYear); + }else { + currentYear = currentYear -5; + cjStudent.setLtYear(currentYear); + } + } List list = cjStudentService.selectCjStudentList(cjStudent); return getDataTable(list); } diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/DwIndexConfigController.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/DwIndexConfigController.java index 7583097..c1d705e 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/DwIndexConfigController.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/DwIndexConfigController.java @@ -74,14 +74,12 @@ public class DwIndexConfigController extends BaseController /** * 展示优秀毕业生逻辑 - * @param cjStudent * @return */ @PostMapping("/getRy") - public TableDataInfo getRy(CjStudent cjStudent){ + public TableDataInfo getRy(){ startPage(); - cjStudent.setRysfzs(1L); - List cjStudents = cjStudentService.selectCjStudentList(cjStudent); + List cjStudents = cjStudentService.selectRyStudent(); return getDataTable(cjStudents); } diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/DwQuestionController.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/DwQuestionController.java index f339595..2ee9ca2 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/DwQuestionController.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/controller/DwQuestionController.java @@ -1,22 +1,33 @@ package com.ruoyi.dw.controller; +import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.dw.domain.CjOption; +import com.ruoyi.dw.domain.CjStudent; import com.ruoyi.dw.domain.DwInfo; import com.ruoyi.dw.domain.DwQuestion; +import com.ruoyi.dw.domain.vo.QuestionUserVo; +import com.ruoyi.dw.service.ICjStudentService; import com.ruoyi.dw.service.IDwInfoService; import com.ruoyi.dw.service.IDwQuestionService; +import org.apache.poi.ss.usermodel.Workbook; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpHeaders; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; import java.util.List; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; /** * 调查问卷问题Controller @@ -31,6 +42,9 @@ public class DwQuestionController extends BaseController @Autowired private IDwQuestionService dwQuestionService; + @Resource + private ICjStudentService cjStudentService; + @Resource private IDwInfoService dwInfoService; @@ -62,11 +76,45 @@ public class DwQuestionController extends BaseController */ @Log(title = "调查问卷问题", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, DwQuestion dwQuestion) + public void export(HttpServletResponse response, @RequestBody QuestionUserVo questionUserVo) throws IOException { - List list = dwQuestionService.selectDwQuestionList(dwQuestion); - ExcelUtil util = new ExcelUtil(DwQuestion.class); - util.exportExcel(response, list, "调查问卷问题数据"); + List listStudent = cjStudentService.selectCjStudentByIds(questionUserVo.getStudentId()); + DwQuestion dwQuestion = new DwQuestion(); + dwQuestion.setInfoId(questionUserVo.getInfoId()); + List listQuestion = dwQuestionService.selectDwQuestionList(dwQuestion); + + // 设置响应头,通知浏览器下载 ZIP 文件 + String zipFileName = "export_data_" + System.currentTimeMillis() + ".zip"; + response.setContentType("application/zip"); + response.setHeader(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + zipFileName + "\""); + // 使用 ZipOutputStream 将两个 Excel 文件打包 + try (ZipOutputStream zipOut = new ZipOutputStream(response.getOutputStream())) { + // 1. 导出选项数据 Excel + addExcelToZip(zipOut, listQuestion, "问卷问题数据.xlsx", DwQuestion.class); + + // 2. 导出学生信息 Excel + addExcelToZip(zipOut, listStudent, "学生信息.xlsx", CjStudent.class); + } + } + + /** + * 将 Excel 数据写入 ZIP 流中 + */ + private void addExcelToZip(ZipOutputStream zipOut, List dataList, String fileName, Class clazz) throws IOException { + ExcelUtil excelUtil = new ExcelUtil<>(clazz); + excelUtil.init(dataList, "数据", StringUtils.EMPTY, Excel.Type.EXPORT); + excelUtil.writeSheet(); + + // 创建 ZIP 条目 + ZipEntry zipEntry = new ZipEntry(fileName); + zipOut.putNextEntry(zipEntry); + + // 将 Excel 写入 ZIP 流 + Workbook workbook = excelUtil.getWb(); + workbook.write(zipOut); + + // 关闭当前 ZIP 条目 + zipOut.closeEntry(); } /** diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/CjOption.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/CjOption.java index 08eef23..a846b70 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/CjOption.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/CjOption.java @@ -1,9 +1,8 @@ package com.ruoyi.dw.domain; +import com.ruoyi.common.annotation.Excel; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; /** * 数据采集选项对象 cj_option diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/CjStudent.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/CjStudent.java index 0f420c1..1e1e07e 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/CjStudent.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/CjStudent.java @@ -4,6 +4,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; +import org.springframework.data.annotation.Transient; /** * 采集学生信息对象 cj_student @@ -22,6 +23,9 @@ public class CjStudent @Excel(name = "姓名") private String xm; + @Excel(name = "学号") + private String xh; + /** 性别 */ @Excel(name = "性别") private String xb; @@ -94,6 +98,15 @@ public class CjStudent @Excel(name = "是否确认") private Long sfqr; + @Transient + private Long infoId; + + @Transient + private Integer ltYear; + + @Transient + private Integer gtYear; + public void setId(Long id) { this.id = id; @@ -286,6 +299,38 @@ public class CjStudent this.xy = xy; } + public String getXh() { + return xh; + } + + public void setXh(String xh) { + this.xh = xh; + } + + public Long getInfoId() { + return infoId; + } + + public void setInfoId(Long infoId) { + this.infoId = infoId; + } + + public Integer getLtYear() { + return ltYear; + } + + public void setLtYear(Integer ltYear) { + this.ltYear = ltYear; + } + + public Integer getGtYear() { + return gtYear; + } + + public void setGtYear(Integer gtYear) { + this.gtYear = gtYear; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/DwIndexConfig.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/DwIndexConfig.java index d883d3c..e1dbb42 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/DwIndexConfig.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/DwIndexConfig.java @@ -21,6 +21,10 @@ public class DwIndexConfig @Excel(name = "展位名称") private String indexName; + /** 展位标题 */ + @Excel(name = "展位标题") + private String indexTitle; + /** 问题id多个逗号隔开 */ @Excel(name = "问题id多个逗号隔开") private String questionId; @@ -81,11 +85,20 @@ public class DwIndexConfig this.indexType = indexType; } - public Long getIndexType() + + public Long getIndexType() { return indexType; } + public String getIndexTitle() { + return indexTitle; + } + + public void setIndexTitle(String indexTitle) { + this.indexTitle = indexTitle; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/vo/OptionUserVo.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/vo/OptionUserVo.java new file mode 100644 index 0000000..eda0903 --- /dev/null +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/vo/OptionUserVo.java @@ -0,0 +1,22 @@ +package com.ruoyi.dw.domain.vo; + +public class OptionUserVo { + private Long[] studentId; + private Long[] optionId; + + public Long[] getStudentId() { + return studentId; + } + + public void setStudentId(Long[] studentId) { + this.studentId = studentId; + } + + public Long[] getOptionId() { + return optionId; + } + + public void setOptionId(Long[] optionId) { + this.optionId = optionId; + } +} diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/vo/QuestionUserVo.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/vo/QuestionUserVo.java new file mode 100644 index 0000000..ad70cc0 --- /dev/null +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/domain/vo/QuestionUserVo.java @@ -0,0 +1,22 @@ +package com.ruoyi.dw.domain.vo; + +public class QuestionUserVo { + private Long infoId; + private Long[] studentId; + + public Long getInfoId() { + return infoId; + } + + public void setInfoId(Long infoId) { + this.infoId = infoId; + } + + public Long[] getStudentId() { + return studentId; + } + + public void setStudentId(Long[] studentId) { + this.studentId = studentId; + } +} diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/mapper/CjOptionMapper.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/mapper/CjOptionMapper.java index 342f600..16194cd 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/mapper/CjOptionMapper.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/mapper/CjOptionMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.dw.mapper; import java.util.List; import com.ruoyi.dw.domain.CjOption; +import org.apache.ibatis.annotations.Param; /** * 数据采集选项Mapper接口 @@ -27,6 +28,9 @@ public interface CjOptionMapper */ public List selectCjOptionList(CjOption cjOption); + + public List selectCjOptionByIds(@Param("ids") Long[] ids); + /** * 新增数据采集选项 * diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/mapper/CjStudentMapper.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/mapper/CjStudentMapper.java index d45b21f..9a97739 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/mapper/CjStudentMapper.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/mapper/CjStudentMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.dw.mapper; import java.util.List; import com.ruoyi.dw.domain.CjStudent; +import org.apache.ibatis.annotations.Param; /** * 采集学生信息Mapper接口 @@ -27,6 +28,16 @@ public interface CjStudentMapper */ public List selectCjStudentList(CjStudent cjStudent); + + public List selectCjStudentByIds(@Param("ids") Long[] ids); + + + /** + * 查询荣誉学生列表 + * @return + */ + public List selectRyStudentList(); + /** * 新增采集学生信息 * diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/mapper/DwQuestionMapper.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/mapper/DwQuestionMapper.java index ae923d4..8c3d88c 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/mapper/DwQuestionMapper.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/mapper/DwQuestionMapper.java @@ -2,6 +2,8 @@ package com.ruoyi.dw.mapper; import java.util.List; import com.ruoyi.dw.domain.DwQuestion; +import org.apache.ibatis.annotations.Param; +import org.springframework.security.core.parameters.P; /** * 调查问卷问题Mapper接口 @@ -27,6 +29,8 @@ public interface DwQuestionMapper */ public List selectDwQuestionList(DwQuestion dwQuestion); + public List selectDwQuestionByIds(@Param("ids") Long[] ids); + /** * 新增调查问卷问题 * diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/ICjOptionService.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/ICjOptionService.java index 96d0292..12a14bd 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/ICjOptionService.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/ICjOptionService.java @@ -27,6 +27,13 @@ public interface ICjOptionService */ public List selectCjOptionList(CjOption cjOption); + /** + * 根据id数组查询 + * @param ids + * @return + */ + public List selectCjOptionByIds(Long[] ids); + /** * 新增数据采集选项 * diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/ICjStudentService.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/ICjStudentService.java index 1abff5c..4552ed7 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/ICjStudentService.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/ICjStudentService.java @@ -28,6 +28,15 @@ public interface ICjStudentService */ public List selectCjStudentList(CjStudent cjStudent); + + public List selectCjStudentByIds(Long[] ids); + /** + * 查询荣誉学生信息列表 + * + * @return 采集学生信息集合 + */ + public List selectRyStudent(); + /** * 新增采集学生信息 * diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/IDwQuestionService.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/IDwQuestionService.java index b2424c6..eadef89 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/IDwQuestionService.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/IDwQuestionService.java @@ -6,6 +6,8 @@ import com.ruoyi.dw.domain.DwInfo; import com.ruoyi.dw.domain.DwQuestion; import org.springframework.web.multipart.MultipartFile; +import javax.servlet.http.HttpServletRequest; + /** * 调查问卷问题Service接口 * @@ -30,6 +32,8 @@ public interface IDwQuestionService */ public List selectDwQuestionList(DwQuestion dwQuestion); + public List selectDwQuestionByIds(Long[] ids); + /** * 新增调查问卷问题 * diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/CjOptionServiceImpl.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/CjOptionServiceImpl.java index 0af1b01..7c146e0 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/CjOptionServiceImpl.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/CjOptionServiceImpl.java @@ -1,5 +1,6 @@ package com.ruoyi.dw.service.impl; +import java.util.Collections; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -43,6 +44,11 @@ public class CjOptionServiceImpl implements ICjOptionService return cjOptionMapper.selectCjOptionList(cjOption); } + @Override + public List selectCjOptionByIds(Long[] ids) { + return cjOptionMapper.selectCjOptionByIds(ids); + } + /** * 新增数据采集选项 * diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/CjStudentServiceImpl.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/CjStudentServiceImpl.java index d9fc2e9..12cadcd 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/CjStudentServiceImpl.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/CjStudentServiceImpl.java @@ -1,6 +1,7 @@ package com.ruoyi.dw.service.impl; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import com.ruoyi.common.core.redis.RedisCache; @@ -43,7 +44,7 @@ public class CjStudentServiceImpl implements ICjStudentService /** * 查询采集学生信息列表 - * + * * @param cjStudent 采集学生信息 * @return 采集学生信息 */ @@ -53,6 +54,16 @@ public class CjStudentServiceImpl implements ICjStudentService return cjStudentMapper.selectCjStudentList(cjStudent); } + @Override + public List selectCjStudentByIds(Long[] ids) { + return cjStudentMapper.selectCjStudentByIds(ids); + } + + @Override + public List selectRyStudent() { + return cjStudentMapper.selectRyStudentList(); + } + /** * 新增采集学生信息 * @@ -127,42 +138,44 @@ public class CjStudentServiceImpl implements ICjStudentService Cell cell15 = row.getCell(15); cjStudent.setXm(cell15.getStringCellValue()); Cell cell16 = row.getCell(16); - cjStudent.setXb(cell16.getStringCellValue()); + cjStudent.setXh(cell16.getStringCellValue()); Cell cell17 = row.getCell(17); - cjStudent.setZy(cell17.getStringCellValue()); + cjStudent.setXb(cell17.getStringCellValue()); Cell cell18 = row.getCell(18); - cjStudent.setXy(cell18.getStringCellValue()); + cjStudent.setZy(cell18.getStringCellValue()); Cell cell19 = row.getCell(19); - cjStudent.setSydsh(cell19.getStringCellValue()); + cjStudent.setXy(cell19.getStringCellValue()); Cell cell20 = row.getCell(20); - cjStudent.setSydshi(cell20.getStringCellValue()); + cjStudent.setSydsh(cell20.getStringCellValue()); Cell cell21 = row.getCell(21); - cjStudent.setBynf(Integer.valueOf(cell21.getStringCellValue())); + cjStudent.setSydshi(cell21.getStringCellValue()); Cell cell22 = row.getCell(22); - cjStudent.setZgyl(cell22.getStringCellValue()); + cjStudent.setBynf(Integer.valueOf(cell22.getStringCellValue())); Cell cell23 = row.getCell(23); - cjStudent.setGzdw(cell23.getStringCellValue()); + cjStudent.setZgyl(cell23.getStringCellValue()); Cell cell24 = row.getCell(24); - cjStudent.setDwxz(cell24.getStringCellValue()); + cjStudent.setGzdw(cell24.getStringCellValue()); Cell cell25 = row.getCell(25); - cjStudent.setDwdz(cell25.getStringCellValue()); + cjStudent.setDwxz(cell25.getStringCellValue()); Cell cell26 = row.getCell(26); - cjStudent.setZwjb(cell26.getStringCellValue()); + cjStudent.setDwdz(cell26.getStringCellValue()); Cell cell27 = row.getCell(27); - cjStudent.setShjz(cell27.getStringCellValue()); + cjStudent.setZwjb(cell27.getStringCellValue()); Cell cell28 = row.getCell(28); - cjStudent.setDbry(cell28.getStringCellValue()); + cjStudent.setShjz(cell28.getStringCellValue()); Cell cell29 = row.getCell(29); - String sfzs = cell29.getStringCellValue(); + cjStudent.setDbry(cell29.getStringCellValue()); + Cell cell30 = row.getCell(30); + String sfzs = cell30.getStringCellValue(); if (sfzs.equals("是")){ cjStudent.setRysfzs(1L); }else { cjStudent.setRysfzs(0L); } - Cell cell30 = row.getCell(30); - cjStudent.setSj(cell30.getStringCellValue()); Cell cell31 = row.getCell(31); - cjStudent.setYx(cell31.getStringCellValue()); + cjStudent.setSj(cell31.getStringCellValue()); + Cell cell32 = row.getCell(32); + cjStudent.setYx(cell32.getStringCellValue()); cjStudent.setSfqr(1L); cjStudent.setQt(""); list.add(cjStudent); diff --git a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/DwQuestionServiceImpl.java b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/DwQuestionServiceImpl.java index f204eb1..675a065 100644 --- a/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/DwQuestionServiceImpl.java +++ b/ruoyi-dw/src/main/java/com/ruoyi/dw/service/impl/DwQuestionServiceImpl.java @@ -1,6 +1,7 @@ package com.ruoyi.dw.service.impl; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import com.ruoyi.common.core.redis.RedisCache; @@ -61,6 +62,11 @@ public class DwQuestionServiceImpl implements IDwQuestionService return dwQuestionMapper.selectDwQuestionList(dwQuestion); } + @Override + public List selectDwQuestionByIds(Long[] ids) { + return Collections.emptyList(); + } + /** * 新增调查问卷问题 * diff --git a/ruoyi-dw/src/main/resources/mapper/dw/CjOptionMapper.xml b/ruoyi-dw/src/main/resources/mapper/dw/CjOptionMapper.xml index cca0f46..d66a42d 100644 --- a/ruoyi-dw/src/main/resources/mapper/dw/CjOptionMapper.xml +++ b/ruoyi-dw/src/main/resources/mapper/dw/CjOptionMapper.xml @@ -19,6 +19,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and option_info = #{optionInfo} + + - + and xm = #{xm} + and xh = #{xh} and xb = #{xb} and zy = #{zy} and xy = #{xy} @@ -53,6 +55,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and yx = #{yx} and qt = #{qt} and sfqr = #{sfqr} + and bynf = ]]> #{gtYear} + and bynf #{ltYear} + + + + + + @@ -65,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" insert into cj_student xm, + xh, xb, zy, xy, @@ -86,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{xm}, + #{xh}, #{xb}, #{zy}, #{xy}, @@ -109,11 +136,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" insert into cj_student - (xm, xb, zy,xy,sydsh, sydshi, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs,sj, yx, qt, sfqr) + (xm,xh, xb, zy,xy,sydsh, sydshi, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs,sj, yx, qt, sfqr) VALUES #{item.xm}, + #{item.xh}, #{item.xb}, #{item.zy}, #{item.xy}, diff --git a/ruoyi-dw/src/main/resources/mapper/dw/DwIndexConfigMapper.xml b/ruoyi-dw/src/main/resources/mapper/dw/DwIndexConfigMapper.xml index da075e7..12d01ce 100644 --- a/ruoyi-dw/src/main/resources/mapper/dw/DwIndexConfigMapper.xml +++ b/ruoyi-dw/src/main/resources/mapper/dw/DwIndexConfigMapper.xml @@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -33,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, index_name, question_id, info_id, index_type, create_by, create_time, update_by, update_time, remark from dw_index_config + select id, index_name,index_title, question_id, info_id, index_type from dw_index_config \ No newline at end of file diff --git a/ruoyi-dw/src/main/resources/mapper/dw/DwQuestionMapper.xml b/ruoyi-dw/src/main/resources/mapper/dw/DwQuestionMapper.xml index 234ecb3..d7ce5b7 100644 --- a/ruoyi-dw/src/main/resources/mapper/dw/DwQuestionMapper.xml +++ b/ruoyi-dw/src/main/resources/mapper/dw/DwQuestionMapper.xml @@ -23,6 +23,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and question_sort = #{questionSort} + +