2023年9月8日 修改听课数为评课数
This commit is contained in:
parent
a36e920d9a
commit
fa7c13a672
|
@ -24,6 +24,8 @@ import org.jeecg.modules.kc.grab.SynchronizationService.tools.ChangeTingKeTongJi
|
|||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbuser;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbuserService;
|
||||
import org.jeecg.modules.kc.kcXqxnHistory.entity.KcXqxnHistory;
|
||||
import org.jeecg.modules.kc.qa.entity.KcEvaluation;
|
||||
import org.jeecg.modules.kc.qa.service.IKcEvaluationService;
|
||||
import org.jeecg.modules.kc.tksf.kctkcstj.entity.KcTkcstj;
|
||||
import org.jeecg.modules.kc.tksf.kctkcstj.service.IKcTkcstjService;
|
||||
import org.jeecg.modules.tools.word.ExportWord;
|
||||
|
@ -64,6 +66,9 @@ public class KcExportConfigTpkwcqkjzglxController extends JeecgController<KcExpo
|
|||
@Autowired
|
||||
private ChangeTingKeTongJi changeTingKeTongJi;
|
||||
|
||||
@Autowired
|
||||
private IKcEvaluationService evaluationService;
|
||||
|
||||
@Value("${jeecg.path.upload}")
|
||||
private String upLoadPath;
|
||||
|
||||
|
@ -119,19 +124,57 @@ public class KcExportConfigTpkwcqkjzglxController extends JeecgController<KcExpo
|
|||
tjList.forEach(x -> {
|
||||
tjMap.put(x.getXnxq() + "-" + x.getJgh(),x);
|
||||
});
|
||||
//
|
||||
// pageList.getRecords().forEach(x -> {
|
||||
// x.setTkxttj("0");
|
||||
// x.setYskcs("0");
|
||||
// if(tjMap.containsKey(x.getXqxn() + "-" + x.getGh())){
|
||||
// KcTkcstj tkcstj = tjMap.get(x.getXqxn() + "-" + x.getGh());
|
||||
// x.setTkxttj(StringUtils.defaultString(tkcstj.getTkxttj(),"0"));
|
||||
// x.setYskcs(StringUtils.defaultString(tkcstj.getYskcs(),"0"));
|
||||
// //x.setXqxn(kcXqxnHistory.getTitle());
|
||||
// }
|
||||
// });
|
||||
|
||||
QueryWrapper<KcEvaluation> evaluationQw = new QueryWrapper<>();
|
||||
evaluationQw.isNotNull("e.minkcid");
|
||||
// evaluationQw.apply("kt.skrq >= STR_TO_DATE('" + "' , '%Y-%m-%d' )");
|
||||
// evaluationQw.apply("kt.skrq <= STR_TO_DATE('" + "' , '%Y-%m-%d' )");
|
||||
|
||||
if(xqxnSet.isEmpty()){
|
||||
evaluationQw.eq("kt.xnxq",-1);
|
||||
}else{
|
||||
evaluationQw.in("kt.xnxq",xqxnSet);
|
||||
}
|
||||
|
||||
evaluationQw.groupBy("concat(xnxq,'-',upuserid)");
|
||||
evaluationQw.orderByDesc("kt.skrq");
|
||||
|
||||
List<KcEvaluation> tjEvaList = evaluationService.findTj(evaluationQw);
|
||||
Map<String,KcEvaluation> tjEvaMap = Maps.newHashMap();
|
||||
tjEvaList.forEach(x -> {
|
||||
tjEvaMap.put(x.getXnxq() + "-" + x.getUpuserid(),x);
|
||||
});
|
||||
|
||||
pageList.getRecords().forEach(x -> {
|
||||
x.setTkxttj("0");
|
||||
x.setYskcs("0");
|
||||
if(tjMap.containsKey(x.getXqxn() + "-" + x.getGh())){
|
||||
KcTkcstj tkcstj = tjMap.get(x.getXqxn() + "-" + x.getGh());
|
||||
x.setTkxttj(StringUtils.defaultString(tkcstj.getTkxttj(),"0"));
|
||||
// x.setTkxttj(StringUtils.defaultString(tkcstj.getTkxttj(),"0"));
|
||||
x.setYskcs(StringUtils.defaultString(tkcstj.getYskcs(),"0"));
|
||||
//x.setXqxn(kcXqxnHistory.getTitle());
|
||||
}
|
||||
if(tjEvaMap.containsKey(x.getXqxn() + "-" + x.getGh())){
|
||||
KcEvaluation tkcstj = tjEvaMap.get(x.getXqxn() + "-" + x.getGh());
|
||||
// x.setTkxttj(StringUtils.defaultString(tkcstj.getTkxttj(),"0"));
|
||||
x.setTkxttj(StringUtils.defaultString(String.valueOf(tkcstj.getPkNum()),"0"));
|
||||
//x.setXqxn(kcXqxnHistory.getTitle());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,4 +39,6 @@ public interface KcEvaluationMapper extends BaseMapper<KcEvaluation> {
|
|||
List<KcEvaluationVo2> selectPageAndKcmc2(Page<KcEvaluationVo2> page, @Param(Constants.WRAPPER) QueryWrapper<KcEvaluationVo2> queryWrapper);
|
||||
|
||||
List<KcEvaluation> queryPkZuJiPage(Page<KcEvaluation> page, @Param(Constants.WRAPPER) QueryWrapper<KcEvaluation> queryWrapper);
|
||||
|
||||
List<KcEvaluation> findTj(@Param(Constants.WRAPPER) QueryWrapper<KcEvaluation> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -474,4 +474,15 @@
|
|||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="findTj" resultType="org.jeecg.modules.kc.qa.entity.KcEvaluation">
|
||||
SELECT
|
||||
count(upuserid) as pkNum,
|
||||
upuserid,
|
||||
kt.xnxq
|
||||
from
|
||||
kc_evaluation e
|
||||
left join kc_ketangbiao kt on kt.id = e.minkcid
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -3,8 +3,8 @@ package org.jeecg.modules.kc.qa.service;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.qa.entity.KcEvaluation;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.kc.qa.entity.KcEvaluation;
|
||||
import org.jeecg.modules.kc.qa.entity.KcEvaluationPkmx;
|
||||
import org.jeecg.modules.kc.statistics.KcEvaluationVo;
|
||||
import org.jeecg.modules.kc.statistics.KcEvaluationVo2;
|
||||
|
@ -40,4 +40,6 @@ public interface IKcEvaluationService extends IService<KcEvaluation> {
|
|||
IPage<KcEvaluationVo2> selectPageAndKcmc2(Page<KcEvaluationVo2> page, QueryWrapper<KcEvaluationVo2> queryWrapper);
|
||||
|
||||
IPage<KcEvaluation> queryPkZuJiPage(Page<KcEvaluation> page, QueryWrapper<KcEvaluation> queryWrapper);
|
||||
|
||||
List<KcEvaluation> findTj(QueryWrapper<KcEvaluation> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -128,4 +128,10 @@ public class KcEvaluationServiceImpl extends ServiceImpl<KcEvaluationMapper, KcE
|
|||
return page.setRecords(baseMapper.queryPkZuJiPage(page,queryWrapper));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KcEvaluation> findTj(QueryWrapper<KcEvaluation> queryWrapper) {
|
||||
return baseMapper.findTj(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue