修改bug
This commit is contained in:
parent
aafd393564
commit
8017f736f6
|
@ -200,10 +200,10 @@ public class KcSysConfigController extends JeecgController<KcSysConfig, IKcSysCo
|
||||||
Date date3 = date1;
|
Date date3 = date1;
|
||||||
Calendar calendar = Calendar.getInstance(); //日历时间工具类实例化创建,取得当前时间初值
|
Calendar calendar = Calendar.getInstance(); //日历时间工具类实例化创建,取得当前时间初值
|
||||||
// String lssj = DateUtils.formatDate(date1,"yyyy-MM-dd")+" 23:59:59";
|
// String lssj = DateUtils.formatDate(date1,"yyyy-MM-dd")+" 23:59:59";
|
||||||
calendar.setTime(date3); //覆盖掉当前时间
|
calendar.setTime(DateUtil.parse(DateUtil.format(date3,"yyyy-MM-dd")+" 23:59:59","yyyy-MM-dd HH:mm:ss")); //覆盖掉当前时间
|
||||||
calendar.add(Calendar.DATE, 7); //+7
|
calendar.add(Calendar.DATE, 7); //+7
|
||||||
Date date4 = calendar.getTime();
|
Date date4 = calendar.getTime();
|
||||||
date1 = calendar.getTime();
|
date1 = DateUtil.parse(DateUtil.format(calendar.getTime(),"yyyy-MM-dd")+" 00:00:00","yyyy-MM-dd HH:mm:ss");
|
||||||
Date date5 = new Date();
|
Date date5 = new Date();
|
||||||
System.out.println("3: "+DateUtil.format(date3,"yyyy-MM-dd HH:mm:ss"));
|
System.out.println("3: "+DateUtil.format(date3,"yyyy-MM-dd HH:mm:ss"));
|
||||||
System.out.println("5: "+DateUtil.format(date5,"yyyy-MM-dd HH:mm:ss"));
|
System.out.println("5: "+DateUtil.format(date5,"yyyy-MM-dd HH:mm:ss"));
|
||||||
|
|
|
@ -2,6 +2,7 @@ package org.jeecg.modules.kc.tktj.controller;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
@ -89,6 +90,29 @@ public class KcTingkeController extends JeecgController<KcTingke, IKcTingkeServi
|
||||||
IPage<KcTingke> pageList = kcTingkeService.queryPageList(page, kcTingke);
|
IPage<KcTingke> pageList = kcTingkeService.queryPageList(page, kcTingke);
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value="kc_tingke-分页列表查询", notes="kc_tingke-分页列表查询")
|
||||||
|
@GetMapping(value = "/indexListPage")
|
||||||
|
public Result<?> indexListPage(KcTingke kcTingke,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<KcTingke> queryWrapper = QueryGenerator.initQueryWrapper("a",kcTingke, req.getParameterMap());
|
||||||
|
queryWrapper.apply(StringUtils.isNotBlank(kcTingke.getSearchInput()),"( a.kcmc like '%"+kcTingke.getSearchInput()+"%' or a.skjs like '%"+kcTingke.getSearchInput()+"%')");
|
||||||
|
queryWrapper.ge(StringUtils.isNotBlank(kcTingke.getStartTime()),"a.tingketime",kcTingke.getStartDate());
|
||||||
|
queryWrapper.le(StringUtils.isNotBlank(kcTingke.getEndTime()),"a.tingketime",kcTingke.getEndDate()+" 23:59:59");
|
||||||
|
queryWrapper.eq(StringUtils.isNotBlank(kcTingke.getKkdw()),"a.kkdw",kcTingke.getKkdw());
|
||||||
|
queryWrapper.eq(StringUtils.isNotBlank(kcTingke.getHh()),"a.hh",kcTingke.getHh());
|
||||||
|
if("0".equals(kcTingke.getPj())){
|
||||||
|
queryWrapper.apply("score is null");
|
||||||
|
}else if("1".equals(kcTingke.getPj())){
|
||||||
|
queryWrapper.apply("score is not null");
|
||||||
|
}
|
||||||
|
Page<KcTingke> page = new Page<KcTingke>(pageNo, pageSize);
|
||||||
|
IPage<Map<String,Object>> pageList = kcTingkeService.indexListPage(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
|
|
|
@ -223,5 +223,32 @@ public class KcTingke implements Serializable {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String ketangbiaoid;
|
private String ketangbiaoid;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String evaluationver;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String tkrq;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String shijian;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String hq;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String mq;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String WEEK;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String evaluationid;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String source;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String suibiId;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String suibiNotes;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String skdd;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String bh;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String kcbh;
|
||||||
|
|
||||||
// private java.lang.String tingketime;
|
// private java.lang.String tingketime;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,4 +43,6 @@ public interface KcTingkeMapper extends BaseMapper<KcTingke> {
|
||||||
List<KcTkmx> selectTkmxExportList(KcTkmx kcTkmx);
|
List<KcTkmx> selectTkmxExportList(KcTkmx kcTkmx);
|
||||||
|
|
||||||
List<KcTingke> getSftk(@Param(Constants.WRAPPER) QueryWrapper<KcTingke> queryWrapper);
|
List<KcTingke> getSftk(@Param(Constants.WRAPPER) QueryWrapper<KcTingke> queryWrapper);
|
||||||
|
|
||||||
|
IPage<Map<String,Object>> indexListPage(Page<KcTingke> page, @Param(Constants.WRAPPER) QueryWrapper<KcTingke> queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
AND (tk.username like CONCAT('%',#{kcTingke.username},'%') or tk.userid like CONCAT('%',#{kcTingke.username},'%'))
|
AND (tk.username like CONCAT('%',#{kcTingke.username},'%') or tk.userid like CONCAT('%',#{kcTingke.username},'%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="kcTingke.userid!=null and kcTingke.userid!=''">
|
<if test="kcTingke.userid!=null and kcTingke.userid!=''">
|
||||||
AND tk.userid =#{userid}
|
AND tk.userid =#{kcTingke.userid}
|
||||||
</if>
|
</if>
|
||||||
GROUP BY tk.userid, tk.username, college
|
GROUP BY tk.userid, tk.username, college
|
||||||
) tk LEFT JOIN (
|
) tk LEFT JOIN (
|
||||||
|
@ -780,4 +780,61 @@
|
||||||
select * from kc_tingke
|
select * from kc_tingke
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="indexListPage" resultType="java.util.Map">
|
||||||
|
select * from (
|
||||||
|
SELECT
|
||||||
|
tingketime, tkrq, shijian, hq, mq,
|
||||||
|
tk.kcmc, tk.ketangbiaoid, tk.skjs, tk.kkdw, tk.userid, tk.hh, tk.WEEK,
|
||||||
|
ev.evaluationid, ev.evaluationver, ev.score,ev.source, suibi.id as suibiId ,suibi.notes as suibiNotes ,
|
||||||
|
tk.skdd, tk.skrq, tkpj.bh,tk.kcbh
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
tingketime,
|
||||||
|
ifnull(DATE_FORMAT( tk.tingketime, '%Y-%m-%d' ),'') tkrq,
|
||||||
|
DATE_FORMAT( tk.tingketime, '%H:%i:%s' ) AS shijian,
|
||||||
|
TIMESTAMPDIFF( HOUR, tk.tingketime, NOW() ) AS hq,
|
||||||
|
TIMESTAMPDIFF( MINUTE, tk.tingketime, NOW() ) AS mq,kt.kcbh,
|
||||||
|
kt.kcmc, kt.id AS ketangbiaoid, kt.skjs, kt.kkdw, tk.userid, kt.hh, kt.WEEK, kt.skdd, kt.skrq
|
||||||
|
FROM
|
||||||
|
kc_tingke tk,
|
||||||
|
kc_ketangbiao kt
|
||||||
|
WHERE
|
||||||
|
tk.kechengbiaoid = kt.id
|
||||||
|
|
||||||
|
|
||||||
|
) tk
|
||||||
|
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 tk.ketangbiaoid = ev.ketangbiaoid
|
||||||
|
left join (
|
||||||
|
SELECT
|
||||||
|
id, user_id, ketangbiao_id, notes
|
||||||
|
FROM ( SELECT distinct id, user_id, ketangbiao_id, notes, create_time FROM kc_ketang_suibi
|
||||||
|
ORDER BY create_time DESC ) a
|
||||||
|
GROUP BY user_id, ketangbiao_id
|
||||||
|
) suibi on suibi.ketangbiao_id = tk.ketangbiaoid
|
||||||
|
LEFT JOIN xxhbbkjxtkpj tkpj on tk.kcbh = tkpj.kbbh
|
||||||
|
) a
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -40,4 +40,6 @@ public interface IKcTingkeService extends IService<KcTingke> {
|
||||||
List<KcTkmx> selectTkmxExportList(KcTkmx kcTkmx);
|
List<KcTkmx> selectTkmxExportList(KcTkmx kcTkmx);
|
||||||
|
|
||||||
List<KcTingke> getSftk(QueryWrapper<KcTingke> queryWrapper);
|
List<KcTingke> getSftk(QueryWrapper<KcTingke> queryWrapper);
|
||||||
|
|
||||||
|
IPage<Map<String,Object>> indexListPage(Page<KcTingke> page, QueryWrapper<KcTingke> queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,4 +79,9 @@ public class KcTingkeServiceImpl extends ServiceImpl<KcTingkeMapper, KcTingke> i
|
||||||
public List<KcTingke> getSftk(QueryWrapper<KcTingke> queryWrapper) {
|
public List<KcTingke> getSftk(QueryWrapper<KcTingke> queryWrapper) {
|
||||||
return baseMapper.getSftk(queryWrapper);
|
return baseMapper.getSftk(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<Map<String,Object>> indexListPage(Page<KcTingke> page, QueryWrapper<KcTingke> queryWrapper) {
|
||||||
|
return baseMapper.indexListPage(page,queryWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue