完成调查问卷的导入功能
This commit is contained in:
@ -49,9 +49,10 @@ public class DwIndexConfigController extends BaseController
|
|||||||
* 根据毕业年份统计人数
|
* 根据毕业年份统计人数
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getBynf")
|
@GetMapping("/getBynf/{year}")
|
||||||
public AjaxResult getBynf(){
|
public AjaxResult getBynf(@PathVariable int year){
|
||||||
return AjaxResult.success(dwIndexConfigService.getBynf());
|
//todo: 还没有写完
|
||||||
|
return AjaxResult.success(dwIndexConfigService.getBynf(year));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -143,8 +144,8 @@ public class DwIndexConfigController extends BaseController
|
|||||||
return AjaxResult.error("请先选择展示调查问题");
|
return AjaxResult.error("请先选择展示调查问题");
|
||||||
}
|
}
|
||||||
String[] question_ids = dwIndexConfig.getQuestionId().split(",");
|
String[] question_ids = dwIndexConfig.getQuestionId().split(",");
|
||||||
if (question_ids.length > 1 && dwIndexConfig.getIndexType() == 0){
|
if (question_ids.length > 1){
|
||||||
return AjaxResult.error("饼状图只能选择一个问题");
|
return AjaxResult.error("只能选择一个问题");
|
||||||
}
|
}
|
||||||
return toAjax(dwIndexConfigService.updateDwIndexConfig(dwIndexConfig));
|
return toAjax(dwIndexConfigService.updateDwIndexConfig(dwIndexConfig));
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ public interface DwIndexConfigMapper
|
|||||||
* 毕业年份折线图统计
|
* 毕业年份折线图统计
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<BynfVo> selectBynf();
|
public List<BynfVo> selectBynf(int year);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据生源地统计学生数量
|
* 根据生源地统计学生数量
|
||||||
|
@ -74,7 +74,7 @@ public interface IDwIndexConfigService
|
|||||||
* 毕业年份折线图统计
|
* 毕业年份折线图统计
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<BynfVo> getBynf();
|
public List<BynfVo> getBynf(int year);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据学生生源地统计
|
* 根据学生生源地统计
|
||||||
|
@ -117,8 +117,8 @@ public class DwIndexConfigServiceImpl implements IDwIndexConfigService
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BynfVo> getBynf() {
|
public List<BynfVo> getBynf(int year) {
|
||||||
return dwIndexConfigMapper.selectBynf();
|
return dwIndexConfigMapper.selectBynf(year);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -99,8 +99,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
group by answer
|
group by answer
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectBynf" resultType="com.ruoyi.dw.domain.vo.BynfVo">
|
<select id="selectBynf" resultType="com.ruoyi.dw.domain.vo.BynfVo" parameterType="int">
|
||||||
select bynf,count(0) as bubf_count from cj_student where sfqr = 1 group by bynf order by bynf desc
|
select bynf,count(0) as bubf_count
|
||||||
|
from cj_student
|
||||||
|
where sfqr = 1
|
||||||
|
and cast(bynf as unsigned)
|
||||||
|
between YEAR(CURRENT_DATE) - #{year} + 1 and YEAR(CURRENT_DATE)
|
||||||
|
group by bynf order by bynf desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSyd" resultType="com.ruoyi.dw.domain.vo.SydVo">
|
<select id="selectSyd" resultType="com.ruoyi.dw.domain.vo.SydVo">
|
||||||
|
Reference in New Issue
Block a user