修改bug
This commit is contained in:
parent
261edbd999
commit
664e6e96a3
|
@ -52,7 +52,7 @@ public class KcKetangSuibiController extends JeecgController<KcKetangSuibi, IKcK
|
|||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcKetangSuibi> queryWrapper = QueryGenerator.initQueryWrapper(kcKetangSuibi, req.getParameterMap());
|
||||
QueryWrapper<KcKetangSuibi> queryWrapper = QueryGenerator.initQueryWrapper("a",kcKetangSuibi, req.getParameterMap());
|
||||
Page<KcKetangSuibi> page = new Page<KcKetangSuibi>(pageNo, pageSize);
|
||||
IPage<KcKetangSuibi> pageList = kcKetangSuibiService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
|
|
|
@ -3,6 +3,7 @@ package org.jeecg.modules.kc.kcKetangSuibi.entity;
|
|||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
@ -63,4 +64,15 @@ public class KcKetangSuibi implements Serializable {
|
|||
@Excel(name = "笔记内容", width = 15)
|
||||
@ApiModelProperty(value = "笔记内容")
|
||||
private java.lang.String notes;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String kcmc;
|
||||
@TableField(exist = false)
|
||||
private String skjs;
|
||||
@TableField(exist = false)
|
||||
private String skdd;
|
||||
@TableField(exist = false)
|
||||
private String skrq;
|
||||
@TableField(exist = false)
|
||||
private String hh;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.business.kc.mapper.KcKetangSuibiMapper">
|
||||
<mapper namespace="org.jeecg.modules.kc.kcKetangSuibi.mapper.KcKetangSuibiMapper">
|
||||
|
||||
<select id="selectPage" resultType="org.jeecg.modules.kc.kcKetangSuibi.entity.KcKetangSuibi">
|
||||
SELECT a.*,b.kcmc,b.skjs,b.skdd,b.skrq,b.hh from kc_ketang_suibi a
|
||||
LEFT JOIN kc_ketangbiao b on a.ketangbiao_id = b.id
|
||||
${ew.customSqlSegment}
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -248,6 +248,7 @@ public class KcZzThpjbController extends JeecgController<KcZzThpjb, IKcZzThpjbSe
|
|||
List<KcKetangbiao> kcKetangBiaoList = kcKetangbiaoService.list(kcKetangbiaoQueryWrapper);
|
||||
if(kcKetangBiaoList!=null && kcKetangBiaoList.size()>0){
|
||||
KcKetangbiao KcKetangbiao = kcKetangBiaoList.get(0);
|
||||
KcZzThpjbPar.setKcbh(KcKetangbiao.getKcbh());
|
||||
newList.add(KcZzThpjbPar);
|
||||
KcTingke kcTingke = new KcTingke();
|
||||
kcTingke.setTingketime(DateUtil.format(KcZzThpjbPar.getSksj(),"yyyy-MM-dd"));
|
||||
|
|
|
@ -230,8 +230,9 @@ public class KcZzXstkbController extends JeecgController<KcZzXstkb, IKcZzXstkbSe
|
|||
kcKetangbiaoQueryWrapper.eq("skjs",KcZzXstkbPar.getSkjs());
|
||||
List<KcKetangbiao> kcKetangBiaoList = kcKetangbiaoService.list(kcKetangbiaoQueryWrapper);
|
||||
if(kcKetangBiaoList!=null && kcKetangBiaoList.size()>0){
|
||||
newList.add(KcZzXstkbPar);
|
||||
KcKetangbiao KcKetangbiao = kcKetangBiaoList.get(0);
|
||||
KcZzXstkbPar.setKcbh(KcKetangbiao.getKcbh());
|
||||
newList.add(KcZzXstkbPar);
|
||||
|
||||
KcTingke kcTingke = new KcTingke();
|
||||
kcTingke.setTingketime(DateUtil.format(KcZzXstkbPar.getSksj(),"yyyy-MM-dd"));
|
||||
|
|
|
@ -248,8 +248,9 @@ public class KcZzYbtkbController extends JeecgController<KcZzYbtkb, IKcZzYbtkbSe
|
|||
kcKetangbiaoQueryWrapper.eq("skjs",KcZzYbtkbPar.getSkjs());
|
||||
List<KcKetangbiao> kcKetangBiaoList = kcKetangbiaoService.list(kcKetangbiaoQueryWrapper);
|
||||
if(kcKetangBiaoList!=null && kcKetangBiaoList.size()>0){
|
||||
newList.add(KcZzYbtkbPar);
|
||||
KcKetangbiao KcKetangbiao = kcKetangBiaoList.get(0);
|
||||
KcZzYbtkbPar.setKcbh(KcKetangbiao.getKcbh());
|
||||
newList.add(KcZzYbtkbPar);
|
||||
|
||||
KcTingke kcTingke = new KcTingke();
|
||||
kcTingke.setTingketime(DateUtil.format(KcZzYbtkbPar.getSkrq(),"yyyy-MM-dd"));
|
||||
|
|
|
@ -398,19 +398,44 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
@GetMapping(value = "/ykktzsList")
|
||||
public Result<?> ykktzsList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
String skrq,String kkdw,String hh,String kcxz,String ywTime,String ywmc) {
|
||||
//查询第三句-已开课堂总数
|
||||
QueryWrapper qw3 = new QueryWrapper();
|
||||
qw3.select("*");
|
||||
qw3.ge("skrq",getBxqStartTime());//<=
|
||||
qw3.le("skrq",skrq);//>=
|
||||
qw3.eq(StringUtils.isNotBlank(kkdw),"kkdw",kkdw);
|
||||
qw3.eq(StringUtils.isNotBlank(hh),"hh",hh);
|
||||
qw3.eq(StringUtils.isNotBlank(kcxz),"kcxz",kcxz);
|
||||
qw3.eq(StringUtils.isNotBlank(ywTime),"skrq",ywTime);
|
||||
qw3.apply(StringUtils.isNotBlank(ywmc),"(skjs like '%"+ywmc+"%' or kcmc like '%"+ywmc+"%') ");
|
||||
Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
|
||||
IPage<Map<String, Object>> kcKetangbiao3List = kcKetangbiaoService.pageMaps(page,qw3);
|
||||
return Result.OK(kcKetangbiao3List);
|
||||
|
||||
|
||||
|
||||
QueryWrapper<KcKetangbiao> qw3 = new QueryWrapper<>();
|
||||
qw3.ge("kt.skrq",getBxqStartTime());//<=
|
||||
qw3.le("kt.skrq",skrq);//>=
|
||||
qw3.eq(StringUtils.isNotBlank(kkdw),"kt.kkdw",kkdw);
|
||||
qw3.eq(StringUtils.isNotBlank(hh),"kt.hh",hh);
|
||||
qw3.eq(StringUtils.isNotBlank(kcxz),"kt.kcxz",kcxz);
|
||||
qw3.eq(StringUtils.isNotBlank(ywTime),"kt.skrq",ywTime);
|
||||
qw3.apply(StringUtils.isNotBlank(ywmc),"(kt.skjs like '%"+ywmc+"%' or kt.kcmc like '%"+ywmc+"%') ");
|
||||
Page<KcKetangbiao> page = new Page<KcKetangbiao>(pageNo, pageSize);
|
||||
IPage<KcKetangbiao> pageList = kcKetangbiaoService.indexYkktzsPage(page, qw3);
|
||||
|
||||
// //查询第三句-已开课堂总数
|
||||
// QueryWrapper qw3 = new QueryWrapper();
|
||||
// qw3.select("*");
|
||||
// qw3.ge("skrq",getBxqStartTime());//<=
|
||||
// qw3.le("skrq",skrq);//>=
|
||||
// qw3.eq(StringUtils.isNotBlank(kkdw),"kkdw",kkdw);
|
||||
// qw3.eq(StringUtils.isNotBlank(hh),"hh",hh);
|
||||
// qw3.eq(StringUtils.isNotBlank(kcxz),"kcxz",kcxz);
|
||||
// qw3.eq(StringUtils.isNotBlank(ywTime),"skrq",ywTime);
|
||||
// qw3.apply(StringUtils.isNotBlank(ywmc),"(skjs like '%"+ywmc+"%' or kcmc like '%"+ywmc+"%') ");
|
||||
// Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
|
||||
// IPage<Map<String, Object>> kcKetangbiao3List = kcKetangbiaoService.pageMaps(page,qw3);
|
||||
// List<Map<String, Object>> list = kcKetangbiao3List.getRecords();
|
||||
// for(int i=0;i<list.size();i++){
|
||||
// Map<String, Object> map = list.get(i);
|
||||
// String ketangbiaoid = map.get("id")+"";
|
||||
// KcKetangbiao kcKetangbiao = new KcKetangbiao();
|
||||
// kcKetangbiao.setId(ketangbiaoid);
|
||||
// KcKetangbiao kcKetangbiaoPar = kcKetangbiaoService.getScoreById(kcKetangbiao);
|
||||
// if(kcKetangbiaoPar!=null&&StringUtils.isNotBlank(kcKetangbiaoPar.getScore())){
|
||||
// map.put("score",kcKetangbiaoPar.getScore());
|
||||
// }
|
||||
// }
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -290,5 +290,7 @@ public class KcKetangbiao implements Serializable {
|
|||
|
||||
@TableField(exist = false)
|
||||
private boolean searchByNowXqxn;
|
||||
@TableField(exist = false)
|
||||
private String score;
|
||||
|
||||
}
|
||||
|
|
|
@ -52,4 +52,8 @@ public interface KcKetangbiaoMapper extends BaseMapper<KcKetangbiao> {
|
|||
List<KcKetangbiao> getKtbjList(KcKetangbiao kcKetangbiao);
|
||||
|
||||
IPage<KcKetangbiao> fundAllPjjgList(Page<KcKetangbiao> page, @Param(Constants.ENTITY) QueryWrapper<KcKetangbiao> queryWrapper);
|
||||
|
||||
KcKetangbiao getScoreById(KcKetangbiao kcKetangbiao);
|
||||
|
||||
IPage<KcKetangbiao> indexYkktzsPage(Page<KcKetangbiao> page, @Param(Constants.WRAPPER) QueryWrapper<KcKetangbiao> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -563,4 +563,52 @@
|
|||
ORDER BY a.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="getScoreById" resultType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao">
|
||||
SELECT
|
||||
ea.score,ev.source
|
||||
FROM
|
||||
kc_evaluation ev,
|
||||
kc_evaluations evs,
|
||||
kc_evaluationque eq,
|
||||
kc_evaluationans ea
|
||||
WHERE
|
||||
ev.id = evs.evaluationid
|
||||
AND ev.evaluationver = eq.evaluationver
|
||||
AND ea.id = evs.ansid
|
||||
AND evs.queid = eq.id
|
||||
AND ea.queid = eq.id
|
||||
AND eq.genre = 0
|
||||
<if test="id!=null and id!=''">
|
||||
and ev.minkcid = #{id}
|
||||
</if>
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="indexYkktzsPage" resultType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao">
|
||||
SELECT
|
||||
kt.*,ev.score
|
||||
FROM kc_ketangbiao kt
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
ev.id AS evaluationid, ev.evaluationver, evs.ketangbiaoid, ea.score,ev.source
|
||||
FROM
|
||||
kc_evaluation ev,
|
||||
kc_evaluations evs,
|
||||
kc_evaluationque eq,
|
||||
kc_evaluationans ea
|
||||
WHERE
|
||||
ev.id = evs.evaluationid
|
||||
AND ev.evaluationver = eq.evaluationver
|
||||
AND ea.id = evs.ansid
|
||||
AND evs.queid = eq.id
|
||||
AND ea.queid = eq.id
|
||||
AND eq.genre = 0
|
||||
) ev ON kt.id = ev.ketangbiaoid
|
||||
${ew.customSqlSegment}
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
|
@ -54,4 +54,8 @@ public interface IKcKetangbiaoService extends IService<KcKetangbiao> {
|
|||
List<KcKetangbiao> getKtbjList(KcKetangbiao kcKetangbiao);
|
||||
|
||||
IPage<KcKetangbiao> fundAllPjjgList(Page<KcKetangbiao> page, QueryWrapper<KcKetangbiao> queryWrapper);
|
||||
|
||||
KcKetangbiao getScoreById(KcKetangbiao kcKetangbiao);
|
||||
|
||||
IPage<KcKetangbiao> indexYkktzsPage(Page<KcKetangbiao> page, QueryWrapper<KcKetangbiao> qw3);
|
||||
}
|
||||
|
|
|
@ -106,4 +106,14 @@ public class KcKetangbiaoServiceImpl extends ServiceImpl<KcKetangbiaoMapper, KcK
|
|||
public IPage<KcKetangbiao> fundAllPjjgList(Page<KcKetangbiao> page, QueryWrapper<KcKetangbiao> queryWrapper) {
|
||||
return baseMapper.fundAllPjjgList(page,queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KcKetangbiao getScoreById(KcKetangbiao kcKetangbiao) {
|
||||
return baseMapper.getScoreById(kcKetangbiao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<KcKetangbiao> indexYkktzsPage(Page<KcKetangbiao> page, QueryWrapper<KcKetangbiao> qw3) {
|
||||
return baseMapper.indexYkktzsPage(page,qw3);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue