增加一个调查问卷

This commit is contained in:
2025-07-18 15:33:44 +08:00
parent 31e2a0c5c4
commit a5fc34f7ea
12 changed files with 265 additions and 60 deletions

View File

@ -16,15 +16,6 @@ public class RuoYiApplication
{ {
// System.setProperty("spring.devtools.restart.enabled", "false"); // System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args); SpringApplication.run(RuoYiApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" + System.out.println("女子学院系统,启动成功");
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
" | (_,_).' __ ___(_ o _)' \n" +
" | |\\ \\ | || |(_,_)' \n" +
" | | \\ `' /| `-' / \n" +
" | | \\ / \\ / \n" +
" ''-' `'-' `-..-' ");
} }
} }

View File

@ -113,9 +113,9 @@ public class SwaggerConfig
// 用ApiInfoBuilder进行定制 // 用ApiInfoBuilder进行定制
return new ApiInfoBuilder() return new ApiInfoBuilder()
// 设置标题 // 设置标题
.title("标题:若依管理系统_接口文档") .title("标题:山东女子学院数据采集系统_接口文档")
// 描述 // 描述
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...") .description("")
// 作者信息 // 作者信息
.contact(new Contact(ruoyiConfig.getName(), null, null)) .contact(new Contact(ruoyiConfig.getName(), null, null))
// 版本 // 版本

View File

@ -16,7 +16,7 @@
<!-- 通用工具--> <!-- 通用工具-->
<dependency> <dependency>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId> <artifactId>ruoyi-system</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -3,14 +3,18 @@ package com.ruoyi.dw.controller;
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.domain.entity.SysDept;
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.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.service.ICjStudentService; import com.ruoyi.dw.service.ICjStudentService;
import com.ruoyi.system.service.ISysDeptService;
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 javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
@ -27,6 +31,9 @@ public class CjStudentController extends BaseController
@Autowired @Autowired
private ICjStudentService cjStudentService; private ICjStudentService cjStudentService;
@Resource
private ISysDeptService sysDeptService;
/** /**
* 查询采集学生信息列表 * 查询采集学生信息列表
*/ */
@ -34,12 +41,16 @@ public class CjStudentController extends BaseController
public TableDataInfo list(CjStudent cjStudent) public TableDataInfo list(CjStudent cjStudent)
{ {
startPage(); startPage();
Long deptId = SecurityUtils.getLoginUser().getDeptId();
if (deptId.intValue() != 100){
SysDept dept = sysDeptService.selectDeptById(deptId);
cjStudent.setXy(dept.getDeptName());
}
List<CjStudent> list = cjStudentService.selectCjStudentList(cjStudent); List<CjStudent> list = cjStudentService.selectCjStudentList(cjStudent);
return getDataTable(list); return getDataTable(list);
} }
/** /**
* 导出采集学生信息列表 * 导出采集学生信息列表
*/ */

View File

@ -48,10 +48,12 @@ public class DwQuestionController extends BaseController
/** /**
* 调查问卷问题列表下拉框选择 * 调查问卷问题列表下拉框选择
*/ */
@GetMapping("/select") @GetMapping("/select/{infoId}")
public AjaxResult select() public AjaxResult select(@PathVariable Long infoId)
{ {
List<DwQuestion> list = dwQuestionService.selectDwQuestionList(new DwQuestion()); DwQuestion dwQuestion = new DwQuestion();
dwQuestion.setInfoId(infoId);
List<DwQuestion> list = dwQuestionService.selectDwQuestionList(dwQuestion);
return AjaxResult.success(list); return AjaxResult.success(list);
} }

View File

@ -30,6 +30,10 @@ public class CjStudent extends BaseEntity
@Excel(name = "专业") @Excel(name = "专业")
private String zy; private String zy;
/** 学院 */
@Excel(name = "学院")
private String xy;
/** 生源地省 */ /** 生源地省 */
private String sydsh; private String sydsh;
@ -61,7 +65,7 @@ public class CjStudent extends BaseEntity
private String zwjb; private String zwjb;
/** 职务级别 */ /** 职务级别 */
@Excel(name = "务级别") @Excel(name = "社会兼")
private String shjz; private String shjz;
/** 代表荣誉 */ /** 代表荣誉 */
@ -285,6 +289,14 @@ public class CjStudent extends BaseEntity
this.ry = ry; this.ry = ry;
} }
public String getXy() {
return xy;
}
public void setXy(String xy) {
this.xy = xy;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -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;
/** /**
* 调查问卷统计展示对象 dw_index_config * 调查问卷统计展示对象 dw_index_config
@ -11,7 +10,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author sunyg * @author sunyg
* @date 2025-06-27 * @date 2025-06-27
*/ */
public class DwIndexConfig extends BaseEntity public class DwIndexConfig
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -32,7 +31,7 @@ public class DwIndexConfig extends BaseEntity
/** /**
* 展现形式 * 展现形式
* 0-饼状图,2-柱状图,3-折线图 * 0-饼状图,1-柱状图,2-折线图
* */ * */
@Excel(name = "展现形式") @Excel(name = "展现形式")
private Long indexType; private Long indexType;
@ -95,11 +94,6 @@ public class DwIndexConfig extends BaseEntity
.append("questionId", getQuestionId()) .append("questionId", getQuestionId())
.append("infoId", getInfoId()) .append("infoId", getInfoId())
.append("indexType", getIndexType()) .append("indexType", getIndexType())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString(); .toString();
} }
} }

View File

@ -68,7 +68,7 @@ public interface IDwIndexConfigService
* 获取首页的四个展位数据 * 获取首页的四个展位数据
* @return * @return
*/ */
public Map<String, Object> getIndex(); public List<Map<String, Object>> getIndex();
/** /**
* 毕业年份折线图统计 * 毕业年份折线图统计

View File

@ -1,9 +1,6 @@
package com.ruoyi.dw.service.impl; package com.ruoyi.dw.service.impl;
import java.util.Collections; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.dw.domain.DwQuestion; import com.ruoyi.dw.domain.DwQuestion;
@ -68,7 +65,6 @@ public class DwIndexConfigServiceImpl implements IDwIndexConfigService
@Override @Override
public int insertDwIndexConfig(DwIndexConfig dwIndexConfig) public int insertDwIndexConfig(DwIndexConfig dwIndexConfig)
{ {
dwIndexConfig.setCreateTime(DateUtils.getNowDate());
return dwIndexConfigMapper.insertDwIndexConfig(dwIndexConfig); return dwIndexConfigMapper.insertDwIndexConfig(dwIndexConfig);
} }
@ -81,7 +77,6 @@ public class DwIndexConfigServiceImpl implements IDwIndexConfigService
@Override @Override
public int updateDwIndexConfig(DwIndexConfig dwIndexConfig) public int updateDwIndexConfig(DwIndexConfig dwIndexConfig)
{ {
dwIndexConfig.setUpdateTime(DateUtils.getNowDate());
return dwIndexConfigMapper.updateDwIndexConfig(dwIndexConfig); return dwIndexConfigMapper.updateDwIndexConfig(dwIndexConfig);
} }
@ -110,19 +105,21 @@ public class DwIndexConfigServiceImpl implements IDwIndexConfigService
} }
@Override @Override
public Map<String, Object> getIndex() public List<Map<String, Object>> getIndex()
{ {
List<DwIndexConfig> configs = dwIndexConfigMapper.selectDwIndexConfigList(new DwIndexConfig()); List<DwIndexConfig> configs = dwIndexConfigMapper.selectDwIndexConfigList(new DwIndexConfig());
Map<String, Object> result = new HashMap<String, Object>(); List<Map<String, Object>> resultList = new ArrayList<Map<String, Object>>();
for (DwIndexConfig config: configs){ for (DwIndexConfig config: configs){
Map<String, Object> result = new HashMap<String, Object>();
result.put("id", config.getId()); result.put("id", config.getId());
result.put("indexType", config.getIndexType()); result.put("indexType", config.getIndexType());
DwQuestion question = dwQuestionMapper.selectDwQuestionById(Long.valueOf(config.getQuestionId())); DwQuestion question = dwQuestionMapper.selectDwQuestionById(Long.valueOf(config.getQuestionId()));
result.put("question", question.getQuestion()); result.put("question", question.getQuestion());
List<AnswerCountVo> list = dwIndexConfigMapper.selectIndex(Long.valueOf(config.getQuestionId()), config.getInfoId()); List<AnswerCountVo> list = dwIndexConfigMapper.selectIndex(Long.valueOf(config.getQuestionId()), config.getInfoId());
result.put("data", list); result.put("data", list);
resultList.add(result);
} }
return result; return resultList;
} }
@Override @Override

View File

@ -1654,6 +1654,215 @@ public class DwQuestionServiceImpl implements IDwQuestionService
answer22.setInfoId(dwInfo.getId()); answer22.setInfoId(dwInfo.getId());
answer22.setQuestionId(87L); answer22.setQuestionId(87L);
answers.add(answer22); answers.add(answer22);
}if (dwInfo.getId().intValue() == 4){
DwAnswer answer1 = new DwAnswer();
Cell cell15 = row.getCell(15);
answer1.setAnswer(cell15.getStringCellValue());
answer1.setInfoId(dwInfo.getId());
answer1.setQuestionId(88L);
answers.add(answer1);
DwAnswer answer2 = new DwAnswer();
Cell cell16 = row.getCell(16);
answer2.setAnswer(cell16.getStringCellValue());
answer2.setInfoId(dwInfo.getId());
answer2.setQuestionId(89L);
answers.add(answer2);
DwAnswer answer3 = new DwAnswer();
Cell cell17 = row.getCell(17);
Cell cell18 = row.getCell(18);
if (cell18 != null && StringUtils.isNotEmpty(cell17.getStringCellValue())){
answer3.setAnswer(cell18.getStringCellValue());
}else {
answer3.setAnswer(cell17.getStringCellValue());
}
answer3.setInfoId(dwInfo.getId());
answer3.setQuestionId(90L);
answers.add(answer3);
DwAnswer answer4 = new DwAnswer();
Cell cell19 = row.getCell(19);
Cell cell20 = row.getCell(20);
if (cell20 != null && StringUtils.isNotEmpty(cell20.getStringCellValue())){
answer4.setAnswer(cell20.getStringCellValue());
}else {
answer4.setAnswer(cell19.getStringCellValue());
}
answer4.setInfoId(dwInfo.getId());
answer4.setQuestionId(91L);
answers.add(answer4);
Cell cell22 = row.getCell(22);
if (cell22 != null && StringUtils.isNotEmpty(cell22.getStringCellValue())){
DwAnswer answer51 = new DwAnswer();
answer51.setAnswer(cell22.getStringCellValue());
answer51.setInfoId(dwInfo.getId());
answer51.setQuestionId(92L);
answers.add(answer51);
}
Cell cell23 = row.getCell(23);
if (cell23 != null && StringUtils.isNotEmpty(cell23.getStringCellValue())){
DwAnswer answer52 = new DwAnswer();
answer52.setAnswer(cell23.getStringCellValue());
answer52.setInfoId(dwInfo.getId());
answer52.setQuestionId(92L);
answers.add(answer52);
}
Cell cell24 = row.getCell(24);
if (cell24 != null && StringUtils.isNotEmpty(cell24.getStringCellValue())){
DwAnswer answer53 = new DwAnswer();
answer53.setAnswer(cell24.getStringCellValue());
answer53.setInfoId(dwInfo.getId());
answer53.setQuestionId(92L);
answers.add(answer53);
}
Cell cell25 = row.getCell(25);
if (cell25 != null && StringUtils.isNotEmpty(cell25.getStringCellValue())){
DwAnswer answer54 = new DwAnswer();
answer54.setAnswer(cell25.getStringCellValue());
answer54.setInfoId(dwInfo.getId());
answer54.setQuestionId(92L);
answers.add(answer54);
}
Cell cell26 = row.getCell(26);
if (cell26 != null && StringUtils.isNotEmpty(cell26.getStringCellValue())){
DwAnswer answer55 = new DwAnswer();
answer55.setAnswer(cell26.getStringCellValue());
answer55.setInfoId(dwInfo.getId());
answer55.setQuestionId(92L);
answers.add(answer55);
}
Cell cell27 = row.getCell(27);
if (cell27 != null && StringUtils.isNotEmpty(cell27.getStringCellValue())){
DwAnswer answer56 = new DwAnswer();
answer56.setAnswer(cell27.getStringCellValue());
answer56.setInfoId(dwInfo.getId());
answer56.setQuestionId(92L);
answers.add(answer56);
}
Cell cell28 = row.getCell(28);
if (cell28 != null && StringUtils.isNotEmpty(cell28.getStringCellValue())){
DwAnswer answer57 = new DwAnswer();
answer57.setAnswer(cell28.getStringCellValue());
answer57.setInfoId(dwInfo.getId());
answer57.setQuestionId(92L);
answers.add(answer57);
}
DwAnswer answer6 = new DwAnswer();
Cell cell29 = row.getCell(29);
answer6.setAnswer(cell29.getStringCellValue());
answer6.setInfoId(dwInfo.getId());
answer6.setQuestionId(93L);
answers.add(answer6);
DwAnswer answer7 = new DwAnswer();
Cell cell30 = row.getCell(30);
answer7.setAnswer(cell30.getStringCellValue());
answer7.setInfoId(dwInfo.getId());
answer7.setQuestionId(94L);
answers.add(answer7);
DwAnswer answer8 = new DwAnswer();
Cell cell31 = row.getCell(31);
answer8.setAnswer(cell31.getStringCellValue());
answer8.setInfoId(dwInfo.getId());
answer8.setQuestionId(95L);
answers.add(answer8);
DwAnswer answer9 = new DwAnswer();
Cell cell32 = row.getCell(32);
answer9.setAnswer(cell32.getStringCellValue());
answer9.setInfoId(dwInfo.getId());
answer9.setQuestionId(96L);
answers.add(answer9);
DwAnswer answer10 = new DwAnswer();
Cell cell33 = row.getCell(33);
answer10.setAnswer(cell33.getStringCellValue());
answer10.setInfoId(dwInfo.getId());
answer10.setQuestionId(97L);
answers.add(answer10);
DwAnswer answer11 = new DwAnswer();
Cell cell34 = row.getCell(34);
answer11.setAnswer(cell34.getStringCellValue());
answer11.setInfoId(dwInfo.getId());
answer11.setQuestionId(98L);
answers.add(answer11);
DwAnswer answer12 = new DwAnswer();
Cell cell35 = row.getCell(35);
Cell cell36 = row.getCell(36);
Cell cell37 = row.getCell(37);
Cell cell38 = row.getCell(38);
Cell cell39 = row.getCell(39);
Cell cell40 = row.getCell(40);
Cell cell41 = row.getCell(41);
Cell cell42 = row.getCell(42);
Cell cell43 = row.getCell(43);
Cell cell44 = row.getCell(44);
Cell cell45 = row.getCell(45);
Cell cell46 = row.getCell(46);
Cell cell47 = row.getCell(47);
Cell cell48 = row.getCell(48);
answer12.setAnswer(cell35.getStringCellValue() + "," + cell36.getStringCellValue()
+ "," + cell37.getStringCellValue() + "," + cell38.getStringCellValue()
+ "," + cell39.getStringCellValue() + "," + cell40.getStringCellValue()
+ "," + cell41.getStringCellValue() + "," + cell42.getStringCellValue()
+ "," + cell43.getStringCellValue() + "," + cell44.getStringCellValue()
+ "," + cell45.getStringCellValue() + "," + cell46.getStringCellValue()
+ "," + cell47.getStringCellValue() + "," + cell48.getStringCellValue());
answer12.setInfoId(dwInfo.getId());
answer12.setQuestionId(99L);
answers.add(answer12);
DwAnswer answer13 = new DwAnswer();
Cell cell49 = row.getCell(49);
Cell cell50 = row.getCell(50);
if (cell50 != null && StringUtils.isNotEmpty(cell50.getStringCellValue())){
answer13.setAnswer(cell50.getStringCellValue());
}else {
answer13.setAnswer(cell49.getStringCellValue());
}
answer13.setInfoId(dwInfo.getId());
answer13.setQuestionId(100L);
answers.add(answer13);
DwAnswer answer14 = new DwAnswer();
Cell cell51 = row.getCell(51);
answer14.setAnswer(cell51.getStringCellValue());
answer14.setInfoId(dwInfo.getId());
answer14.setQuestionId(101L);
answers.add(answer14);
DwAnswer answer15 = new DwAnswer();
Cell cell52 = row.getCell(52);
Cell cell53 = row.getCell(53);
if (cell53 != null && StringUtils.isNotEmpty(cell53.getStringCellValue())){
answer15.setAnswer(cell53.getStringCellValue());
}else {
answer15.setAnswer(cell52.getStringCellValue());
}
answer15.setInfoId(dwInfo.getId());
answer15.setQuestionId(102L);
answers.add(answer15);
DwAnswer answer16 = new DwAnswer();
Cell cell54 = row.getCell(54);
answer16.setAnswer(cell54.getStringCellValue());
answer16.setInfoId(dwInfo.getId());
answer16.setQuestionId(103L);
answers.add(answer16);
DwAnswer answer17 = new DwAnswer();
Cell cell55 = row.getCell(55);
answer17.setAnswer(cell55.getStringCellValue());
answer17.setInfoId(dwInfo.getId());
answer17.setQuestionId(104L);
answers.add(answer17);
DwAnswer answer18 = new DwAnswer();
Cell cell56 = row.getCell(56);
Cell cell57 = row.getCell(57);
if (cell57 != null && StringUtils.isNotEmpty(cell57.getStringCellValue())){
answer18.setAnswer(cell57.getStringCellValue());
}else {
answer18.setAnswer(cell56.getStringCellValue());
}
answer18.setInfoId(dwInfo.getId());
answer18.setQuestionId(105L);
answers.add(answer18);
DwAnswer answer19 = new DwAnswer();
Cell cell58 = row.getCell(58);
answer19.setAnswer(cell58.getStringCellValue());
answer19.setInfoId(dwInfo.getId());
answer19.setQuestionId(106L);
answers.add(answer19);
}else { }else {
return -2; return -2;
} }

View File

@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="xm" column="xm" /> <result property="xm" column="xm" />
<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="sydsh" column="sydsh" /> <result property="sydsh" column="sydsh" />
<result property="sydshi" column="sydshi" /> <result property="sydshi" column="sydshi" />
<result property="bynf" column="bynf" /> <result property="bynf" column="bynf" />
@ -28,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectCjStudentVo"> <sql id="selectCjStudentVo">
select id, xm,sydsh, sydshi, xb, zy, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs, ry,sj, yx, qt, sfqr from cj_student select id, xm,sydsh, sydshi, xb, zy,xy, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs, ry,sj, yx, qt, sfqr from cj_student
</sql> </sql>
<select id="selectCjStudentList" parameterType="CjStudent" resultMap="CjStudentResult"> <select id="selectCjStudentList" parameterType="CjStudent" resultMap="CjStudentResult">
@ -37,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="xm != null and xm != ''"> and xm = #{xm}</if> <if test="xm != null and xm != ''"> and xm = #{xm}</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="sydsh != null and sydsh != ''"> and sydsh = #{sydsh}</if> <if test="sydsh != null and sydsh != ''"> and sydsh = #{sydsh}</if>
<if test="sydshi != null and sydshi != ''"> and sydshi = #{sydshi}</if> <if test="sydshi != null and sydshi != ''"> and sydshi = #{sydshi}</if>
<if test="bynf != null "> and bynf = #{bynf}</if> <if test="bynf != null "> and bynf = #{bynf}</if>
@ -66,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="xm != null">xm,</if> <if test="xm != null">xm,</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="sydsh != null">sydsh,</if> <if test="sydsh != null">sydsh,</if>
<if test="sydshi != null">sydshi,</if> <if test="sydshi != null">sydshi,</if>
<if test="bynf != null">bynf,</if> <if test="bynf != null">bynf,</if>
@ -87,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="xm != null">#{xm},</if> <if test="xm != null">#{xm},</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="sydsh != null">#{sydsh},</if> <if test="sydsh != null">#{sydsh},</if>
<if test="sydshi != null">#{sydshi},</if> <if test="sydshi != null">#{sydshi},</if>
<if test="bynf != null">#{bynf},</if> <if test="bynf != null">#{bynf},</if>

View File

@ -10,11 +10,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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" />
<result property="createBy" column="create_by" /> </resultMap>
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <resultMap type="AnswerCountVo" id="answerCountVo">
<result property="updateTime" column="update_time" /> <result property="answer" column="answer" />
<result property="remark" column="remark" /> <result property="answerCount" column="answer_count" />
</resultMap> </resultMap>
<sql id="selectDwIndexConfigVo"> <sql id="selectDwIndexConfigVo">
@ -43,22 +43,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</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="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>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim> </trim>
</insert> </insert>
@ -69,11 +59,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
@ -89,10 +74,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</delete> </delete>
<select id="selectIndex" resultType="com.ruoyi.dw.domain.vo.AnswerCountVo"> <select id="selectIndex" resultMap="answerCountVo">
select answer, count(0) as answer_count select answer, count(0) as answer_count
from dw_answer from dw_answer
where indo_id = #{infoId} where info_id = #{infoId}
and question_id = #{questionId} and question_id = #{questionId}
group by answer group by answer
</select> </select>