首页固定死的统计展示
This commit is contained in:
@ -89,7 +89,4 @@ public class CjOptionController extends BaseController
|
||||
return toAjax(cjOptionService.deleteCjOptionByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -7,11 +7,14 @@ 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.CjStudent;
|
||||
import com.ruoyi.dw.domain.DwIndexConfig;
|
||||
import com.ruoyi.dw.service.ICjStudentService;
|
||||
import com.ruoyi.dw.service.IDwIndexConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
@ -28,6 +31,9 @@ public class DwIndexConfigController extends BaseController
|
||||
@Autowired
|
||||
private IDwIndexConfigService dwIndexConfigService;
|
||||
|
||||
@Resource
|
||||
private ICjStudentService cjStudentService;
|
||||
|
||||
/**
|
||||
* 查询调查问卷统计展示列表
|
||||
*/
|
||||
@ -39,6 +45,46 @@ public class DwIndexConfigController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据毕业年份统计人数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getBynf")
|
||||
public AjaxResult getBynf(){
|
||||
return AjaxResult.success(dwIndexConfigService.getBynf());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据生源地进行统计
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getSyd")
|
||||
public AjaxResult getSyd(){
|
||||
return AjaxResult.success(dwIndexConfigService.getSyd());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据单位性质统计
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getDwxz")
|
||||
public AjaxResult getDwxz(){
|
||||
return AjaxResult.success(dwIndexConfigService.getDwzx());
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示优秀毕业生逻辑
|
||||
* @param cjStudent
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getRy")
|
||||
public TableDataInfo getRy(CjStudent cjStudent){
|
||||
startPage();
|
||||
cjStudent.setRysfzs(1L);
|
||||
List<CjStudent> cjStudents = cjStudentService.selectCjStudentList(cjStudent);
|
||||
return getDataTable(cjStudents);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取首页的数据展示
|
||||
* @return
|
||||
|
@ -30,6 +30,12 @@ public class CjStudent extends BaseEntity
|
||||
@Excel(name = "专业")
|
||||
private String zy;
|
||||
|
||||
/** 生源地省 */
|
||||
private String sydsh;
|
||||
|
||||
/** 生源地市 */
|
||||
private String sydshi;
|
||||
|
||||
/** 毕业年份 */
|
||||
@Excel(name = "毕业年份")
|
||||
private Long bynf;
|
||||
@ -66,6 +72,9 @@ public class CjStudent extends BaseEntity
|
||||
@Excel(name = "荣誉是否展示")
|
||||
private Long rysfzs;
|
||||
|
||||
/** 荣誉 */
|
||||
private String ry;
|
||||
|
||||
/** 手机 */
|
||||
@Excel(name = "手机")
|
||||
private String sj;
|
||||
@ -252,6 +261,30 @@ public class CjStudent extends BaseEntity
|
||||
return sfqr;
|
||||
}
|
||||
|
||||
public String getSydsh() {
|
||||
return sydsh;
|
||||
}
|
||||
|
||||
public void setSydsh(String sydsh) {
|
||||
this.sydsh = sydsh;
|
||||
}
|
||||
|
||||
public String getSydshi() {
|
||||
return sydshi;
|
||||
}
|
||||
|
||||
public void setSydshi(String sydshi) {
|
||||
this.sydshi = sydshi;
|
||||
}
|
||||
|
||||
public String getRy() {
|
||||
return ry;
|
||||
}
|
||||
|
||||
public void setRy(String ry) {
|
||||
this.ry = ry;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
27
ruoyi-dw/src/main/java/com/ruoyi/dw/domain/vo/BynfVo.java
Normal file
27
ruoyi-dw/src/main/java/com/ruoyi/dw/domain/vo/BynfVo.java
Normal file
@ -0,0 +1,27 @@
|
||||
package com.ruoyi.dw.domain.vo;
|
||||
|
||||
/**
|
||||
* 统计学生毕业年份
|
||||
*/
|
||||
public class BynfVo {
|
||||
|
||||
private Long bynf;
|
||||
|
||||
private Long bynfCount;
|
||||
|
||||
public Long getBynf() {
|
||||
return bynf;
|
||||
}
|
||||
|
||||
public void setBynf(Long bynf) {
|
||||
this.bynf = bynf;
|
||||
}
|
||||
|
||||
public Long getBynfCount() {
|
||||
return bynfCount;
|
||||
}
|
||||
|
||||
public void setBynfCount(Long bynfCount) {
|
||||
this.bynfCount = bynfCount;
|
||||
}
|
||||
}
|
24
ruoyi-dw/src/main/java/com/ruoyi/dw/domain/vo/DwxzVo.java
Normal file
24
ruoyi-dw/src/main/java/com/ruoyi/dw/domain/vo/DwxzVo.java
Normal file
@ -0,0 +1,24 @@
|
||||
package com.ruoyi.dw.domain.vo;
|
||||
|
||||
public class DwxzVo {
|
||||
|
||||
private String dwxz;
|
||||
|
||||
private Long dwxzCount;
|
||||
|
||||
public String getDwxz() {
|
||||
return dwxz;
|
||||
}
|
||||
|
||||
public void setDwxz(String dwxz) {
|
||||
this.dwxz = dwxz;
|
||||
}
|
||||
|
||||
public Long getDwxzCount() {
|
||||
return dwxzCount;
|
||||
}
|
||||
|
||||
public void setDwxzCount(Long dwxzCount) {
|
||||
this.dwxzCount = dwxzCount;
|
||||
}
|
||||
}
|
24
ruoyi-dw/src/main/java/com/ruoyi/dw/domain/vo/SydVo.java
Normal file
24
ruoyi-dw/src/main/java/com/ruoyi/dw/domain/vo/SydVo.java
Normal file
@ -0,0 +1,24 @@
|
||||
package com.ruoyi.dw.domain.vo;
|
||||
|
||||
public class SydVo {
|
||||
|
||||
private String city;
|
||||
|
||||
private Long studentCount;
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public Long getStudentCount() {
|
||||
return studentCount;
|
||||
}
|
||||
|
||||
public void setStudentCount(Long studentCount) {
|
||||
this.studentCount = studentCount;
|
||||
}
|
||||
}
|
@ -6,6 +6,9 @@ import java.util.Objects;
|
||||
|
||||
import com.ruoyi.dw.domain.DwIndexConfig;
|
||||
import com.ruoyi.dw.domain.vo.AnswerCountVo;
|
||||
import com.ruoyi.dw.domain.vo.BynfVo;
|
||||
import com.ruoyi.dw.domain.vo.DwxzVo;
|
||||
import com.ruoyi.dw.domain.vo.SydVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
@ -70,4 +73,22 @@ public interface DwIndexConfigMapper
|
||||
* @return
|
||||
*/
|
||||
public List<AnswerCountVo> selectIndex(@Param("questionIds") String[] questionIds, @Param("infoId") Long infoId);
|
||||
|
||||
/**
|
||||
* 毕业年份折线图统计
|
||||
* @return
|
||||
*/
|
||||
public List<BynfVo> selectBynf();
|
||||
|
||||
/**
|
||||
* 根据生源地统计学生数量
|
||||
* @return
|
||||
*/
|
||||
public List<SydVo> selectSyd();
|
||||
|
||||
/**
|
||||
* 根据单位性质统计
|
||||
* @return
|
||||
*/
|
||||
public List<DwxzVo> selectDwxz();
|
||||
}
|
||||
|
@ -4,6 +4,9 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.dw.domain.DwIndexConfig;
|
||||
import com.ruoyi.dw.domain.vo.BynfVo;
|
||||
import com.ruoyi.dw.domain.vo.DwxzVo;
|
||||
import com.ruoyi.dw.domain.vo.SydVo;
|
||||
|
||||
/**
|
||||
* 调查问卷统计展示Service接口
|
||||
@ -66,4 +69,22 @@ public interface IDwIndexConfigService
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> getIndex();
|
||||
|
||||
/**
|
||||
* 毕业年份折线图统计
|
||||
* @return
|
||||
*/
|
||||
public List<BynfVo> getBynf();
|
||||
|
||||
/**
|
||||
* 根据学生生源地统计
|
||||
* @return
|
||||
*/
|
||||
public List<SydVo> getSyd();
|
||||
|
||||
/**
|
||||
* 根据单位性质统计
|
||||
* @return
|
||||
*/
|
||||
public List<DwxzVo> getDwzx();
|
||||
}
|
||||
|
@ -7,6 +7,9 @@ import java.util.Map;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.dw.domain.vo.AnswerCountVo;
|
||||
import com.ruoyi.dw.domain.vo.BynfVo;
|
||||
import com.ruoyi.dw.domain.vo.DwxzVo;
|
||||
import com.ruoyi.dw.domain.vo.SydVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.dw.mapper.DwIndexConfigMapper;
|
||||
@ -112,4 +115,19 @@ public class DwIndexConfigServiceImpl implements IDwIndexConfigService
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BynfVo> getBynf() {
|
||||
return dwIndexConfigMapper.selectBynf();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SydVo> getSyd() {
|
||||
return dwIndexConfigMapper.selectSyd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DwxzVo> getDwzx() {
|
||||
return dwIndexConfigMapper.selectDwxz();
|
||||
}
|
||||
}
|
||||
|
@ -5,10 +5,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<mapper namespace="com.ruoyi.dw.mapper.CjStudentMapper">
|
||||
|
||||
<resultMap type="CjStudent" id="CjStudentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="xm" column="xm" />
|
||||
<result property="xb" column="xb" />
|
||||
<result property="zy" column="zy" />
|
||||
<result property="id" column="id" />
|
||||
<result property="xm" column="xm" />
|
||||
<result property="xb" column="xb" />
|
||||
<result property="zy" column="zy" />
|
||||
<result property="sydsh" column="sydsh" />
|
||||
<result property="sydshi" column="sydshi" />
|
||||
<result property="bynf" column="bynf" />
|
||||
<result property="zgyl" column="zgyl" />
|
||||
<result property="gzdw" column="gzdw" />
|
||||
@ -18,6 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="shjz" column="shjz" />
|
||||
<result property="dbry" column="dbry" />
|
||||
<result property="rysfzs" column="rysfzs" />
|
||||
<result property="ry" column="ry" />
|
||||
<result property="sj" column="sj" />
|
||||
<result property="yx" column="yx" />
|
||||
<result property="qt" column="qt" />
|
||||
@ -25,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCjStudentVo">
|
||||
select id, xm, xb, zy, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs, sj, yx, qt, sfqr from cj_student
|
||||
select id, xm,sydsh, sydshi, xb, zy, bynf, zgyl, gzdw, dwxz, dwdz, zwjb, shjz, dbry, rysfzs, ry,sj, yx, qt, sfqr from cj_student
|
||||
</sql>
|
||||
|
||||
<select id="selectCjStudentList" parameterType="CjStudent" resultMap="CjStudentResult">
|
||||
@ -34,6 +37,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="xm != null and xm != ''"> and xm = #{xm}</if>
|
||||
<if test="xb != null and xb != ''"> and xb = #{xb}</if>
|
||||
<if test="zy != null and zy != ''"> and zy = #{zy}</if>
|
||||
<if test="sydsh != null and sydsh != ''"> and sydsh = #{sydsh}</if>
|
||||
<if test="sydshi != null and sydshi != ''"> and sydshi = #{sydshi}</if>
|
||||
<if test="bynf != null "> and bynf = #{bynf}</if>
|
||||
<if test="zgyl != null and zgyl != ''"> and zgyl = #{zgyl}</if>
|
||||
<if test="gzdw != null and gzdw != ''"> and gzdw = #{gzdw}</if>
|
||||
@ -61,6 +66,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="xm != null">xm,</if>
|
||||
<if test="xb != null">xb,</if>
|
||||
<if test="zy != null">zy,</if>
|
||||
<if test="sydsh != null">sydsh,</if>
|
||||
<if test="sydshi != null">sydshi,</if>
|
||||
<if test="bynf != null">bynf,</if>
|
||||
<if test="zgyl != null">zgyl,</if>
|
||||
<if test="gzdw != null">gzdw,</if>
|
||||
@ -70,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="shjz != null">shjz,</if>
|
||||
<if test="dbry != null">dbry,</if>
|
||||
<if test="rysfzs != null">rysfzs,</if>
|
||||
<if test="ry != null">ry,</if>
|
||||
<if test="sj != null">sj,</if>
|
||||
<if test="yx != null">yx,</if>
|
||||
<if test="qt != null">qt,</if>
|
||||
@ -79,6 +87,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="xm != null">#{xm},</if>
|
||||
<if test="xb != null">#{xb},</if>
|
||||
<if test="zy != null">#{zy},</if>
|
||||
<if test="sydsh != null">#{sydsh},</if>
|
||||
<if test="sydshi != null">#{sydshi},</if>
|
||||
<if test="bynf != null">#{bynf},</if>
|
||||
<if test="zgyl != null">#{zgyl},</if>
|
||||
<if test="gzdw != null">#{gzdw},</if>
|
||||
@ -88,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="shjz != null">#{shjz},</if>
|
||||
<if test="dbry != null">#{dbry},</if>
|
||||
<if test="rysfzs != null">#{rysfzs},</if>
|
||||
<if test="ry != null">#{ry},</if>
|
||||
<if test="sj != null">#{sj},</if>
|
||||
<if test="yx != null">#{yx},</if>
|
||||
<if test="qt != null">#{qt},</if>
|
||||
@ -101,6 +112,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="xm != null">xm = #{xm},</if>
|
||||
<if test="xb != null">xb = #{xb},</if>
|
||||
<if test="zy != null">zy = #{zy},</if>
|
||||
<if test="sydsh != null">sydsh = #{sydsh},</if>
|
||||
<if test="sydshi != null">sydshi = #{sydshi},</if>
|
||||
<if test="bynf != null">bynf = #{bynf},</if>
|
||||
<if test="zgyl != null">zgyl = #{zgyl},</if>
|
||||
<if test="gzdw != null">gzdw = #{gzdw},</if>
|
||||
@ -110,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="shjz != null">shjz = #{shjz},</if>
|
||||
<if test="dbry != null">dbry = #{dbry},</if>
|
||||
<if test="rysfzs != null">rysfzs = #{rysfzs},</if>
|
||||
<if test="ry != null">ry = #{ry},</if>
|
||||
<if test="sj != null">sj = #{sj},</if>
|
||||
<if test="yx != null">yx = #{yx},</if>
|
||||
<if test="qt != null">qt = #{qt},</if>
|
||||
|
@ -98,4 +98,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
group by answer
|
||||
</select>
|
||||
|
||||
<select id="selectBynf" resultType="com.ruoyi.dw.domain.vo.BynfVo">
|
||||
select bynf,count(0) as bubf_count from cj_student where sfqr = 1 group by bynf order by bynf desc
|
||||
</select>
|
||||
|
||||
<select id="selectSyd" resultType="com.ruoyi.dw.domain.vo.SydVo">
|
||||
SELECT
|
||||
CASE
|
||||
WHEN sydsh = '山东省' THEN sydshi
|
||||
ELSE '省外'
|
||||
END AS city,
|
||||
COUNT(*) AS student_count
|
||||
FROM cj_student
|
||||
where sfqr = 1
|
||||
GROUP BY
|
||||
CASE
|
||||
WHEN sydsh = '山东省' THEN sydshi
|
||||
ELSE '省外'
|
||||
END
|
||||
ORDER BY
|
||||
CASE
|
||||
WHEN syd_sheng = '山东省' THEN sydshi
|
||||
ELSE sydsh
|
||||
END;
|
||||
</select>
|
||||
|
||||
<select id="selectDwxz" resultType="com.ruoyi.dw.domain.vo.DwxzVo">
|
||||
select dwxz,count(0) as dwxz_count from cj_student where sfqr = 1 group by dwxz
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -115,6 +115,7 @@ public class SecurityConfig
|
||||
// 静态资源,可匿名访问
|
||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||
.antMatchers("/dev-api").permitAll()
|
||||
// 除上面外的所有请求全部需要鉴权认证
|
||||
.anyRequest().authenticated();
|
||||
})
|
||||
|
Reference in New Issue
Block a user