完善系统
This commit is contained in:
@ -206,6 +206,10 @@ public class ExcelUtil<T>
|
|||||||
this.clazz = clazz;
|
this.clazz = clazz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Workbook getWb(){
|
||||||
|
return wb;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 仅在Excel中显示列属性
|
* 仅在Excel中显示列属性
|
||||||
*
|
*
|
||||||
|
@ -1,18 +1,29 @@
|
|||||||
package com.ruoyi.dw.controller;
|
package com.ruoyi.dw.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.dw.domain.CjOption;
|
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.ICjOptionService;
|
||||||
|
import com.ruoyi.dw.service.ICjStudentService;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.zip.ZipEntry;
|
||||||
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据采集选项Controller
|
* 数据采集选项Controller
|
||||||
@ -27,6 +38,9 @@ public class CjOptionController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ICjOptionService cjOptionService;
|
private ICjOptionService cjOptionService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ICjStudentService cjStudentService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询数据采集选项列表
|
* 查询数据采集选项列表
|
||||||
*/
|
*/
|
||||||
@ -43,11 +57,44 @@ public class CjOptionController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@Log(title = "数据采集选项", businessType = BusinessType.EXPORT)
|
@Log(title = "数据采集选项", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, CjOption cjOption)
|
public void export(HttpServletResponse response, @RequestBody OptionUserVo userVo) throws IOException
|
||||||
{
|
{
|
||||||
List<CjOption> list = cjOptionService.selectCjOptionList(cjOption);
|
List<CjOption> listOption = cjOptionService.selectCjOptionByIds(userVo.getOptionId());
|
||||||
ExcelUtil<CjOption> util = new ExcelUtil<CjOption>(CjOption.class);
|
List<CjStudent> listStudent = cjStudentService.selectCjStudentByIds(userVo.getStudentId());
|
||||||
util.exportExcel(response, list, "数据采集选项数据");
|
|
||||||
|
// 设置响应头,通知浏览器下载 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 <T> void addExcelToZip(ZipOutputStream zipOut, List<T> dataList, String fileName, Class<T> clazz) throws IOException {
|
||||||
|
ExcelUtil<T> 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -12,12 +12,14 @@ import com.ruoyi.dw.domain.CjStudent;
|
|||||||
import com.ruoyi.dw.domain.DwInfo;
|
import com.ruoyi.dw.domain.DwInfo;
|
||||||
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.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -48,6 +50,16 @@ public class CjStudentController extends BaseController
|
|||||||
SysDept dept = sysDeptService.selectDeptById(deptId);
|
SysDept dept = sysDeptService.selectDeptById(deptId);
|
||||||
cjStudent.setXy(dept.getDeptName());
|
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<CjStudent> list = cjStudentService.selectCjStudentList(cjStudent);
|
List<CjStudent> list = cjStudentService.selectCjStudentList(cjStudent);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
@ -74,14 +74,12 @@ public class DwIndexConfigController extends BaseController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 展示优秀毕业生逻辑
|
* 展示优秀毕业生逻辑
|
||||||
* @param cjStudent
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/getRy")
|
@PostMapping("/getRy")
|
||||||
public TableDataInfo getRy(CjStudent cjStudent){
|
public TableDataInfo getRy(){
|
||||||
startPage();
|
startPage();
|
||||||
cjStudent.setRysfzs(1L);
|
List<CjStudent> cjStudents = cjStudentService.selectRyStudent();
|
||||||
List<CjStudent> cjStudents = cjStudentService.selectCjStudentList(cjStudent);
|
|
||||||
return getDataTable(cjStudents);
|
return getDataTable(cjStudents);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,22 +1,33 @@
|
|||||||
package com.ruoyi.dw.controller;
|
package com.ruoyi.dw.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
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.DwInfo;
|
||||||
import com.ruoyi.dw.domain.DwQuestion;
|
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.IDwInfoService;
|
||||||
import com.ruoyi.dw.service.IDwQuestionService;
|
import com.ruoyi.dw.service.IDwQuestionService;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpHeaders;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.zip.ZipEntry;
|
||||||
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调查问卷问题Controller
|
* 调查问卷问题Controller
|
||||||
@ -31,6 +42,9 @@ public class DwQuestionController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IDwQuestionService dwQuestionService;
|
private IDwQuestionService dwQuestionService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ICjStudentService cjStudentService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IDwInfoService dwInfoService;
|
private IDwInfoService dwInfoService;
|
||||||
|
|
||||||
@ -62,11 +76,45 @@ public class DwQuestionController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@Log(title = "调查问卷问题", businessType = BusinessType.EXPORT)
|
@Log(title = "调查问卷问题", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, DwQuestion dwQuestion)
|
public void export(HttpServletResponse response, @RequestBody QuestionUserVo questionUserVo) throws IOException
|
||||||
{
|
{
|
||||||
List<DwQuestion> list = dwQuestionService.selectDwQuestionList(dwQuestion);
|
List<CjStudent> listStudent = cjStudentService.selectCjStudentByIds(questionUserVo.getStudentId());
|
||||||
ExcelUtil<DwQuestion> util = new ExcelUtil<DwQuestion>(DwQuestion.class);
|
DwQuestion dwQuestion = new DwQuestion();
|
||||||
util.exportExcel(response, list, "调查问卷问题数据");
|
dwQuestion.setInfoId(questionUserVo.getInfoId());
|
||||||
|
List<DwQuestion> 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 <T> void addExcelToZip(ZipOutputStream zipOut, List<T> dataList, String fileName, Class<T> clazz) throws IOException {
|
||||||
|
ExcelUtil<T> 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
package com.ruoyi.dw.domain;
|
package com.ruoyi.dw.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据采集选项对象 cj_option
|
* 数据采集选项对象 cj_option
|
||||||
|
@ -4,6 +4,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
|
|||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import org.springframework.data.annotation.Transient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采集学生信息对象 cj_student
|
* 采集学生信息对象 cj_student
|
||||||
@ -22,6 +23,9 @@ public class CjStudent
|
|||||||
@Excel(name = "姓名")
|
@Excel(name = "姓名")
|
||||||
private String xm;
|
private String xm;
|
||||||
|
|
||||||
|
@Excel(name = "学号")
|
||||||
|
private String xh;
|
||||||
|
|
||||||
/** 性别 */
|
/** 性别 */
|
||||||
@Excel(name = "性别")
|
@Excel(name = "性别")
|
||||||
private String xb;
|
private String xb;
|
||||||
@ -94,6 +98,15 @@ public class CjStudent
|
|||||||
@Excel(name = "是否确认")
|
@Excel(name = "是否确认")
|
||||||
private Long sfqr;
|
private Long sfqr;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private Long infoId;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private Integer ltYear;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private Integer gtYear;
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
@ -286,6 +299,38 @@ public class CjStudent
|
|||||||
this.xy = xy;
|
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
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
@ -21,6 +21,10 @@ public class DwIndexConfig
|
|||||||
@Excel(name = "展位名称")
|
@Excel(name = "展位名称")
|
||||||
private String indexName;
|
private String indexName;
|
||||||
|
|
||||||
|
/** 展位标题 */
|
||||||
|
@Excel(name = "展位标题")
|
||||||
|
private String indexTitle;
|
||||||
|
|
||||||
/** 问题id多个逗号隔开 */
|
/** 问题id多个逗号隔开 */
|
||||||
@Excel(name = "问题id多个逗号隔开")
|
@Excel(name = "问题id多个逗号隔开")
|
||||||
private String questionId;
|
private String questionId;
|
||||||
@ -81,11 +85,20 @@ public class DwIndexConfig
|
|||||||
this.indexType = indexType;
|
this.indexType = indexType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Long getIndexType()
|
public Long getIndexType()
|
||||||
{
|
{
|
||||||
return indexType;
|
return indexType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getIndexTitle() {
|
||||||
|
return indexTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndexTitle(String indexTitle) {
|
||||||
|
this.indexTitle = indexTitle;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,7 @@ package com.ruoyi.dw.mapper;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.dw.domain.CjOption;
|
import com.ruoyi.dw.domain.CjOption;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据采集选项Mapper接口
|
* 数据采集选项Mapper接口
|
||||||
@ -27,6 +28,9 @@ public interface CjOptionMapper
|
|||||||
*/
|
*/
|
||||||
public List<CjOption> selectCjOptionList(CjOption cjOption);
|
public List<CjOption> selectCjOptionList(CjOption cjOption);
|
||||||
|
|
||||||
|
|
||||||
|
public List<CjOption> selectCjOptionByIds(@Param("ids") Long[] ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增数据采集选项
|
* 新增数据采集选项
|
||||||
*
|
*
|
||||||
|
@ -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 org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 采集学生信息Mapper接口
|
* 采集学生信息Mapper接口
|
||||||
@ -27,6 +28,16 @@ public interface CjStudentMapper
|
|||||||
*/
|
*/
|
||||||
public List<CjStudent> selectCjStudentList(CjStudent cjStudent);
|
public List<CjStudent> selectCjStudentList(CjStudent cjStudent);
|
||||||
|
|
||||||
|
|
||||||
|
public List<CjStudent> selectCjStudentByIds(@Param("ids") Long[] ids);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询荣誉学生列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<CjStudent> selectRyStudentList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增采集学生信息
|
* 新增采集学生信息
|
||||||
*
|
*
|
||||||
|
@ -2,6 +2,8 @@ package com.ruoyi.dw.mapper;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.dw.domain.DwQuestion;
|
import com.ruoyi.dw.domain.DwQuestion;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.security.core.parameters.P;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调查问卷问题Mapper接口
|
* 调查问卷问题Mapper接口
|
||||||
@ -27,6 +29,8 @@ public interface DwQuestionMapper
|
|||||||
*/
|
*/
|
||||||
public List<DwQuestion> selectDwQuestionList(DwQuestion dwQuestion);
|
public List<DwQuestion> selectDwQuestionList(DwQuestion dwQuestion);
|
||||||
|
|
||||||
|
public List<DwQuestion> selectDwQuestionByIds(@Param("ids") Long[] ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增调查问卷问题
|
* 新增调查问卷问题
|
||||||
*
|
*
|
||||||
|
@ -27,6 +27,13 @@ public interface ICjOptionService
|
|||||||
*/
|
*/
|
||||||
public List<CjOption> selectCjOptionList(CjOption cjOption);
|
public List<CjOption> selectCjOptionList(CjOption cjOption);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id数组查询
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<CjOption> selectCjOptionByIds(Long[] ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增数据采集选项
|
* 新增数据采集选项
|
||||||
*
|
*
|
||||||
|
@ -28,6 +28,15 @@ public interface ICjStudentService
|
|||||||
*/
|
*/
|
||||||
public List<CjStudent> selectCjStudentList(CjStudent cjStudent);
|
public List<CjStudent> selectCjStudentList(CjStudent cjStudent);
|
||||||
|
|
||||||
|
|
||||||
|
public List<CjStudent> selectCjStudentByIds(Long[] ids);
|
||||||
|
/**
|
||||||
|
* 查询荣誉学生信息列表
|
||||||
|
*
|
||||||
|
* @return 采集学生信息集合
|
||||||
|
*/
|
||||||
|
public List<CjStudent> selectRyStudent();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增采集学生信息
|
* 新增采集学生信息
|
||||||
*
|
*
|
||||||
|
@ -6,6 +6,8 @@ import com.ruoyi.dw.domain.DwInfo;
|
|||||||
import com.ruoyi.dw.domain.DwQuestion;
|
import com.ruoyi.dw.domain.DwQuestion;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调查问卷问题Service接口
|
* 调查问卷问题Service接口
|
||||||
*
|
*
|
||||||
@ -30,6 +32,8 @@ public interface IDwQuestionService
|
|||||||
*/
|
*/
|
||||||
public List<DwQuestion> selectDwQuestionList(DwQuestion dwQuestion);
|
public List<DwQuestion> selectDwQuestionList(DwQuestion dwQuestion);
|
||||||
|
|
||||||
|
public List<DwQuestion> selectDwQuestionByIds(Long[] ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增调查问卷问题
|
* 新增调查问卷问题
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.dw.service.impl;
|
package com.ruoyi.dw.service.impl;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -43,6 +44,11 @@ public class CjOptionServiceImpl implements ICjOptionService
|
|||||||
return cjOptionMapper.selectCjOptionList(cjOption);
|
return cjOptionMapper.selectCjOptionList(cjOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CjOption> selectCjOptionByIds(Long[] ids) {
|
||||||
|
return cjOptionMapper.selectCjOptionByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增数据采集选项
|
* 新增数据采集选项
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.dw.service.impl;
|
package com.ruoyi.dw.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
@ -53,6 +54,16 @@ public class CjStudentServiceImpl implements ICjStudentService
|
|||||||
return cjStudentMapper.selectCjStudentList(cjStudent);
|
return cjStudentMapper.selectCjStudentList(cjStudent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CjStudent> selectCjStudentByIds(Long[] ids) {
|
||||||
|
return cjStudentMapper.selectCjStudentByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CjStudent> selectRyStudent() {
|
||||||
|
return cjStudentMapper.selectRyStudentList();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增采集学生信息
|
* 新增采集学生信息
|
||||||
*
|
*
|
||||||
@ -127,42 +138,44 @@ public class CjStudentServiceImpl implements ICjStudentService
|
|||||||
Cell cell15 = row.getCell(15);
|
Cell cell15 = row.getCell(15);
|
||||||
cjStudent.setXm(cell15.getStringCellValue());
|
cjStudent.setXm(cell15.getStringCellValue());
|
||||||
Cell cell16 = row.getCell(16);
|
Cell cell16 = row.getCell(16);
|
||||||
cjStudent.setXb(cell16.getStringCellValue());
|
cjStudent.setXh(cell16.getStringCellValue());
|
||||||
Cell cell17 = row.getCell(17);
|
Cell cell17 = row.getCell(17);
|
||||||
cjStudent.setZy(cell17.getStringCellValue());
|
cjStudent.setXb(cell17.getStringCellValue());
|
||||||
Cell cell18 = row.getCell(18);
|
Cell cell18 = row.getCell(18);
|
||||||
cjStudent.setXy(cell18.getStringCellValue());
|
cjStudent.setZy(cell18.getStringCellValue());
|
||||||
Cell cell19 = row.getCell(19);
|
Cell cell19 = row.getCell(19);
|
||||||
cjStudent.setSydsh(cell19.getStringCellValue());
|
cjStudent.setXy(cell19.getStringCellValue());
|
||||||
Cell cell20 = row.getCell(20);
|
Cell cell20 = row.getCell(20);
|
||||||
cjStudent.setSydshi(cell20.getStringCellValue());
|
cjStudent.setSydsh(cell20.getStringCellValue());
|
||||||
Cell cell21 = row.getCell(21);
|
Cell cell21 = row.getCell(21);
|
||||||
cjStudent.setBynf(Integer.valueOf(cell21.getStringCellValue()));
|
cjStudent.setSydshi(cell21.getStringCellValue());
|
||||||
Cell cell22 = row.getCell(22);
|
Cell cell22 = row.getCell(22);
|
||||||
cjStudent.setZgyl(cell22.getStringCellValue());
|
cjStudent.setBynf(Integer.valueOf(cell22.getStringCellValue()));
|
||||||
Cell cell23 = row.getCell(23);
|
Cell cell23 = row.getCell(23);
|
||||||
cjStudent.setGzdw(cell23.getStringCellValue());
|
cjStudent.setZgyl(cell23.getStringCellValue());
|
||||||
Cell cell24 = row.getCell(24);
|
Cell cell24 = row.getCell(24);
|
||||||
cjStudent.setDwxz(cell24.getStringCellValue());
|
cjStudent.setGzdw(cell24.getStringCellValue());
|
||||||
Cell cell25 = row.getCell(25);
|
Cell cell25 = row.getCell(25);
|
||||||
cjStudent.setDwdz(cell25.getStringCellValue());
|
cjStudent.setDwxz(cell25.getStringCellValue());
|
||||||
Cell cell26 = row.getCell(26);
|
Cell cell26 = row.getCell(26);
|
||||||
cjStudent.setZwjb(cell26.getStringCellValue());
|
cjStudent.setDwdz(cell26.getStringCellValue());
|
||||||
Cell cell27 = row.getCell(27);
|
Cell cell27 = row.getCell(27);
|
||||||
cjStudent.setShjz(cell27.getStringCellValue());
|
cjStudent.setZwjb(cell27.getStringCellValue());
|
||||||
Cell cell28 = row.getCell(28);
|
Cell cell28 = row.getCell(28);
|
||||||
cjStudent.setDbry(cell28.getStringCellValue());
|
cjStudent.setShjz(cell28.getStringCellValue());
|
||||||
Cell cell29 = row.getCell(29);
|
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("是")){
|
if (sfzs.equals("是")){
|
||||||
cjStudent.setRysfzs(1L);
|
cjStudent.setRysfzs(1L);
|
||||||
}else {
|
}else {
|
||||||
cjStudent.setRysfzs(0L);
|
cjStudent.setRysfzs(0L);
|
||||||
}
|
}
|
||||||
Cell cell30 = row.getCell(30);
|
|
||||||
cjStudent.setSj(cell30.getStringCellValue());
|
|
||||||
Cell cell31 = row.getCell(31);
|
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.setSfqr(1L);
|
||||||
cjStudent.setQt("");
|
cjStudent.setQt("");
|
||||||
list.add(cjStudent);
|
list.add(cjStudent);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.ruoyi.dw.service.impl;
|
package com.ruoyi.dw.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
@ -61,6 +62,11 @@ public class DwQuestionServiceImpl implements IDwQuestionService
|
|||||||
return dwQuestionMapper.selectDwQuestionList(dwQuestion);
|
return dwQuestionMapper.selectDwQuestionList(dwQuestion);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DwQuestion> selectDwQuestionByIds(Long[] ids) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增调查问卷问题
|
* 新增调查问卷问题
|
||||||
*
|
*
|
||||||
|
@ -20,6 +20,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectCjOptionByIds" parameterType="map" resultMap="CjOptionResult">
|
||||||
|
<include refid="selectCjOptionVo"/>
|
||||||
|
<if test="ids != null and ids.length > 0">
|
||||||
|
WHERE id IN
|
||||||
|
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectCjOptionById" parameterType="Long" resultMap="CjOptionResult">
|
<select id="selectCjOptionById" parameterType="Long" resultMap="CjOptionResult">
|
||||||
<include refid="selectCjOptionVo"/>
|
<include refid="selectCjOptionVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
|
@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<resultMap type="CjStudent" id="CjStudentResult">
|
<resultMap type="CjStudent" id="CjStudentResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="xm" column="xm" />
|
<result property="xm" column="xm" />
|
||||||
|
<result property="xh" column="xh" />
|
||||||
<result property="xb" column="xb" />
|
<result property="xb" column="xb" />
|
||||||
<result property="zy" column="zy" />
|
<result property="zy" column="zy" />
|
||||||
<result property="xy" column="xy" />
|
<result property="xy" column="xy" />
|
||||||
@ -28,13 +29,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectCjStudentVo">
|
<sql id="selectCjStudentVo">
|
||||||
select id, xm, xb, zy,xy,sydsh, sydshi, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs,sj, yx, qt, sfqr from cj_student
|
select id, xm,xh, xb, zy,xy,sydsh, sydshi, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs,sj, yx, qt, sfqr from cj_student
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectCjStudentList" parameterType="CjStudent" resultMap="CjStudentResult">
|
<select id="selectCjStudentList" parameterType="CjStudent" resultMap="CjStudentResult">
|
||||||
<include refid="selectCjStudentVo"/>
|
<include refid="selectCjStudentVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="xm != null and xm != ''"> and xm = #{xm}</if>
|
<if test="xm != null and xm != ''"> and xm = #{xm}</if>
|
||||||
|
<if test="xh != null and xh != ''"> and xh = #{xh}</if>
|
||||||
<if test="xb != null and xb != ''"> and xb = #{xb}</if>
|
<if test="xb != null and xb != ''"> and xb = #{xb}</if>
|
||||||
<if test="zy != null and zy != ''"> and zy = #{zy}</if>
|
<if test="zy != null and zy != ''"> and zy = #{zy}</if>
|
||||||
<if test="xy != null and xy != ''"> and xy = #{xy}</if>
|
<if test="xy != null and xy != ''"> and xy = #{xy}</if>
|
||||||
@ -53,6 +55,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="yx != null and yx != ''"> and yx = #{yx}</if>
|
<if test="yx != null and yx != ''"> and yx = #{yx}</if>
|
||||||
<if test="qt != null and qt != ''"> and qt = #{qt}</if>
|
<if test="qt != null and qt != ''"> and qt = #{qt}</if>
|
||||||
<if test="sfqr != null "> and sfqr = #{sfqr}</if>
|
<if test="sfqr != null "> and sfqr = #{sfqr}</if>
|
||||||
|
<if test="gtYear != null "> and bynf <![CDATA[ >= ]]> #{gtYear}</if>
|
||||||
|
<if test="ltYear != null "> and bynf <![CDATA[ <= ]]> #{ltYear}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectCjStudentByIds" parameterType="map" resultMap="CjStudentResult">
|
||||||
|
<include refid="selectCjStudentVo"/>
|
||||||
|
<if test="ids != null and ids.length > 0">
|
||||||
|
WHERE id IN
|
||||||
|
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectRyStudentList" resultMap="CjStudentResult">
|
||||||
|
select id, CASE
|
||||||
|
WHEN rysfzs = 0 THEN '***'
|
||||||
|
WHEN rysfzs = 1 THEN xm
|
||||||
|
ELSE xm -- 可选:处理 rysfzs 不是 0 或 1 的情况
|
||||||
|
END AS xm,xh, xb, zy,xy,sydsh, sydshi, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs,sj, yx, qt, sfqr from cj_student
|
||||||
|
<where>
|
||||||
|
dbry is not null and dbry != '' and dbry != '无'
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -65,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
insert into cj_student
|
insert into cj_student
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="xm != null">xm,</if>
|
<if test="xm != null">xm,</if>
|
||||||
|
<if test="xh != null">xh,</if>
|
||||||
<if test="xb != null">xb,</if>
|
<if test="xb != null">xb,</if>
|
||||||
<if test="zy != null">zy,</if>
|
<if test="zy != null">zy,</if>
|
||||||
<if test="xy != null">xy,</if>
|
<if test="xy != null">xy,</if>
|
||||||
@ -86,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="xm != null">#{xm},</if>
|
<if test="xm != null">#{xm},</if>
|
||||||
|
<if test="xh != null">#{xh},</if>
|
||||||
<if test="xb != null">#{xb},</if>
|
<if test="xb != null">#{xb},</if>
|
||||||
<if test="zy != null">#{zy},</if>
|
<if test="zy != null">#{zy},</if>
|
||||||
<if test="xy != null">#{xy},</if>
|
<if test="xy != null">#{xy},</if>
|
||||||
@ -109,11 +136,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<insert id="insertCjStudentBatch" parameterType="list">
|
<insert id="insertCjStudentBatch" parameterType="list">
|
||||||
insert into cj_student
|
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
|
VALUES
|
||||||
<foreach item="item" collection="list" separator=",">
|
<foreach item="item" collection="list" separator=",">
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
#{item.xm},
|
#{item.xm},
|
||||||
|
#{item.xh},
|
||||||
#{item.xb},
|
#{item.xb},
|
||||||
#{item.zy},
|
#{item.zy},
|
||||||
#{item.xy},
|
#{item.xy},
|
||||||
|
@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<resultMap type="DwIndexConfig" id="DwIndexConfigResult">
|
<resultMap type="DwIndexConfig" id="DwIndexConfigResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="indexName" column="index_name" />
|
<result property="indexName" column="index_name" />
|
||||||
|
<result property="indexTitle" column="index_title" />
|
||||||
<result property="questionId" column="question_id" />
|
<result property="questionId" column="question_id" />
|
||||||
<result property="infoId" column="info_id" />
|
<result property="infoId" column="info_id" />
|
||||||
<result property="indexType" column="index_type" />
|
<result property="indexType" column="index_type" />
|
||||||
@ -33,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDwIndexConfigVo">
|
<sql id="selectDwIndexConfigVo">
|
||||||
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
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDwIndexConfigList" parameterType="DwIndexConfig" resultMap="DwIndexConfigResult">
|
<select id="selectDwIndexConfigList" parameterType="DwIndexConfig" resultMap="DwIndexConfigResult">
|
||||||
@ -55,12 +56,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
insert into dw_index_config
|
insert into dw_index_config
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="indexName != null">index_name,</if>
|
<if test="indexName != null">index_name,</if>
|
||||||
|
<if test="indexTitle != null">index_title,</if>
|
||||||
<if test="questionId != null">question_id,</if>
|
<if test="questionId != null">question_id,</if>
|
||||||
<if test="infoId != null">info_id,</if>
|
<if test="infoId != null">info_id,</if>
|
||||||
<if test="indexType != null">index_type,</if>
|
<if test="indexType != null">index_type,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="indexName != null">#{indexName},</if>
|
<if test="indexName != null">#{indexName},</if>
|
||||||
|
<if test="indexTitle != null">#{indexTitle},</if>
|
||||||
<if test="questionId != null">#{questionId},</if>
|
<if test="questionId != null">#{questionId},</if>
|
||||||
<if test="infoId != null">#{infoId},</if>
|
<if test="infoId != null">#{infoId},</if>
|
||||||
<if test="indexType != null">#{indexType},</if>
|
<if test="indexType != null">#{indexType},</if>
|
||||||
@ -71,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
update dw_index_config
|
update dw_index_config
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="indexName != null">index_name = #{indexName},</if>
|
<if test="indexName != null">index_name = #{indexName},</if>
|
||||||
|
<if test="indexTitle != null">index_title = #{indexTitle},</if>
|
||||||
<if test="questionId != null">question_id = #{questionId},</if>
|
<if test="questionId != null">question_id = #{questionId},</if>
|
||||||
<if test="infoId != null">info_id = #{infoId},</if>
|
<if test="infoId != null">info_id = #{infoId},</if>
|
||||||
<if test="indexType != null">index_type = #{indexType},</if>
|
<if test="indexType != null">index_type = #{indexType},</if>
|
||||||
@ -125,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDwxz" resultMap="dwxzVo">
|
<select id="selectDwxz" resultMap="dwxzVo">
|
||||||
select dwxz,count(0) as dwxz_count from cj_student where sfqr = 1 group by dwxz
|
select dwxz,count(0) as dwxz_count from cj_student where sfqr = 1 and dwxz is not null group by dwxz
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -24,6 +24,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectDwQuestionByIds" parameterType="map" resultMap="DwQuestionResult">
|
||||||
|
<include refid="selectDwQuestionVo"/>
|
||||||
|
<if test="ids != null and ids.length > 0">
|
||||||
|
WHERE id IN
|
||||||
|
<foreach item="id" collection="ids" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectDwQuestionById" parameterType="Long" resultMap="DwQuestionResult">
|
<select id="selectDwQuestionById" parameterType="Long" resultMap="DwQuestionResult">
|
||||||
<include refid="selectDwQuestionVo"/>
|
<include refid="selectDwQuestionVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
|
Reference in New Issue
Block a user