修改bug
This commit is contained in:
parent
6abe47cb40
commit
713bf1c67b
|
@ -108,7 +108,7 @@ public class KcExportConfigTpkwcqkjzglxController extends JeecgController<KcExpo
|
|||
queryWrapper.eq("dwmc ",xxhbUser.getDwmc());
|
||||
}
|
||||
// queryWrapper.eq("zt","在职");
|
||||
queryWrapper.apply("dwmc in (select kkdw from kc_kkdw21_view)");
|
||||
// queryWrapper.apply("dwmc in (select kkdw from kc_kkdw21_view)");
|
||||
Page<KcExportConfigTpkwcqkjzglx> page = new Page<>(pageNo, pageSize);
|
||||
IPage<KcExportConfigTpkwcqkjzglx> pageList = kcExportConfigTpkwcqkjzglxService.page(page, queryWrapper);
|
||||
|
||||
|
@ -126,6 +126,7 @@ public class KcExportConfigTpkwcqkjzglxController extends JeecgController<KcExpo
|
|||
}else{
|
||||
tjQw.in("xnxq",xqxnSet);
|
||||
}
|
||||
// tjQw.like("jsxm",kcExportConfigTpkwcqkjzglx.getXm());
|
||||
List<KcTkcstj> tjList = kcTkcstjService.list(tjQw);
|
||||
Map<String,KcTkcstj> tjMap = Maps.newHashMap();
|
||||
tjList.forEach(x -> {
|
||||
|
@ -153,6 +154,7 @@ public class KcExportConfigTpkwcqkjzglxController extends JeecgController<KcExpo
|
|||
}else{
|
||||
evaluationQw.in("kt.xnxq",xqxnSet);
|
||||
}
|
||||
evaluationQw.eq("upuser",kcExportConfigTpkwcqkjzglx.getXm());
|
||||
|
||||
evaluationQw.groupBy("concat(xnxq,'-',upuserid)");
|
||||
evaluationQw.orderByDesc("kt.skrq");
|
||||
|
@ -233,7 +235,7 @@ public class KcExportConfigTpkwcqkjzglxController extends JeecgController<KcExpo
|
|||
}else{
|
||||
evaluationQw.in("kt.xnxq",xqxnSet);
|
||||
}
|
||||
|
||||
evaluationQw.eq("upuser",kcExportConfigTpkwcqkjzglx.getXm());
|
||||
evaluationQw.groupBy("concat(xnxq,'-',upuserid)");
|
||||
evaluationQw.orderByDesc("kt.skrq");
|
||||
|
||||
|
|
|
@ -177,6 +177,11 @@ public class Export extends BaseExport {
|
|||
// queryWrapper.in("", conSet);
|
||||
// }
|
||||
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> kcExportConfigTpkwcqkjzglxQueryWrapper = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
kcExportConfigTpkwcqkjzglxQueryWrapper.eq("gh",kcExportConfigTpkwcqkjzglx.getFindGh());
|
||||
kcExportConfigTpkwcqkjzglxQueryWrapper.eq("xqxn",kcExportConfigTpkwcqkjzglx.getXqxn());
|
||||
KcExportConfigTpkwcqkjzglx KcExportConfigTpkwcqkjzglxPar = kcExportConfigTpkwcqkjzglxService.getOne(kcExportConfigTpkwcqkjzglxQueryWrapper);
|
||||
|
||||
List<KcExportConfigTpkwcqkjzglx> KcExportConfigTpkwcqkjzglxList = kcExportConfigTpkwcqkjzglxService.list(queryWrapper);
|
||||
Map<String, List<KcExportConfigTpkwcqkjzglx>> ghMap = KcExportConfigTpkwcqkjzglxList.stream().filter(x -> StringUtils.isNotBlank(x.getGh())).collect(Collectors.groupingBy(KcExportConfigTpkwcqkjzglx::getGh));
|
||||
Map<String, List<KcExportConfigTpkwcqkjzglx>> typeMap = KcExportConfigTpkwcqkjzglxList.stream().filter(x -> StringUtils.isNotBlank(x.getTklx())).collect(Collectors.groupingBy(KcExportConfigTpkwcqkjzglx::getTklx));
|
||||
|
@ -265,7 +270,7 @@ public class Export extends BaseExport {
|
|||
// }
|
||||
//********************************取数据END*********************************************************/
|
||||
//********************************通用*************************************************************/
|
||||
result.put("xym",kcExportConfigTpkwcqkjzglx.getDwmc());//学院名称
|
||||
result.put("xym",KcExportConfigTpkwcqkjzglxPar.getDwmc());//学院名称
|
||||
result.put("xqxn",xqxnParam);//学期学年
|
||||
//填进去数量
|
||||
allListMap.forEach((k,v) -> result.put(k + "Size", StringUtils.defaultString(String.valueOf(v.size()),"0")));
|
||||
|
|
|
@ -19,6 +19,8 @@ import org.jeecg.modules.kc.grab.log.entity.XxhbbkjxtkpjGoodLog;
|
|||
import org.jeecg.modules.kc.grab.log.service.IXxhbbkjxtkpjBadLogService;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbbkjxtkpjService;
|
||||
import org.jeecg.modules.kc.grab.log.service.IXxhbbkjxtkpjGoodLogService;
|
||||
import org.jeecg.modules.kc.kcSysConfig.entity.KcSysConfig;
|
||||
import org.jeecg.modules.kc.kcSysConfig.service.IKcSysConfigService;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import org.jeecg.modules.kc.ktgl.service.IKcKetangbiaoService;
|
||||
import org.jeecg.modules.kc.qa.entity.KcEvaluation;
|
||||
|
@ -63,6 +65,8 @@ public class SyncZwdtEvaluation extends BaseSync {
|
|||
|
||||
@Autowired
|
||||
private IKcEvaluationsService kcEvaluationsService;//正在使用问题(回答明细子表)
|
||||
@Autowired
|
||||
private IKcSysConfigService kcSysConfigService;
|
||||
|
||||
//----------------------------------正在使用END------------------------------------------
|
||||
|
||||
|
@ -247,7 +251,6 @@ public class SyncZwdtEvaluation extends BaseSync {
|
|||
inQw.in("xspg2","A", "B", "C", "D", "E");
|
||||
inQw.in("xspg3","A", "B", "C", "D", "E");
|
||||
inQw.in("ztpj", "A", "B", "C", "D", "E");
|
||||
inQw.eq("tkrxm", "刘芮方");
|
||||
// inQw.last("limit 100");
|
||||
List<Xxhbbkjxtkpj> inDataList = xxhbbkjxtkpjService.list(inQw);
|
||||
List<KcEvaluation> saveMainList = Lists.newArrayList();
|
||||
|
@ -333,6 +336,26 @@ public class SyncZwdtEvaluation extends BaseSync {
|
|||
qwKeTang2.last("limit 1");
|
||||
ketangbiao = kcKetangbiaoService.getOne(qwKeTang2);
|
||||
}
|
||||
//如果还是没有,那就造一条记录,插入进去
|
||||
if(ketangbiao == null) {
|
||||
KcKetangbiao KcKetangbiao2 = new KcKetangbiao();
|
||||
KcKetangbiao2.setKcmc(x.getTkkcmc());
|
||||
KcKetangbiao2.setSkjs(x.getRkjs());
|
||||
KcKetangbiao2.setSkrq(DateUtil.format(main.getUpDate(), DatePattern.NORM_DATE_FORMAT));
|
||||
KcKetangbiao2.setHh(hh);
|
||||
KcKetangbiao2.setSkdd(x.getTkjs());
|
||||
String skrq = DateUtil.format(main.getUpDate(), DatePattern.NORM_DATE_FORMAT);
|
||||
QueryWrapper<KcSysConfig> kcSysConfigQueryWrapper = new QueryWrapper<>();
|
||||
kcSysConfigQueryWrapper.apply("bxqkssj >= '" + skrq +"' and bxqjssj <= '" + skrq + "'");
|
||||
KcSysConfig KcSysConfig = kcSysConfigService.getOne(kcSysConfigQueryWrapper);
|
||||
String flag1 = "";
|
||||
if(KcSysConfig!=null){
|
||||
flag1 = KcSysConfig.getFlag1();
|
||||
}
|
||||
KcKetangbiao2.setXnxq(flag1);
|
||||
kcKetangbiaoService.save(KcKetangbiao2);
|
||||
ketangbiao = KcKetangbiao2;
|
||||
}
|
||||
|
||||
if(ketangbiao == null) {
|
||||
//还是为空,,就记录吧,
|
||||
|
|
|
@ -0,0 +1,416 @@
|
|||
package org.jeecg.modules.kc.grab.SynchronizationService;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
|
||||
import org.jeecg.modules.kc.grab.SynchronizationService.tools.ChangeTingKeTongJi;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbbkjxtkpj;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbsynclog;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbbkjxtkpjService;
|
||||
import org.jeecg.modules.kc.grab.log.entity.XxhbbkjxtkpjBadLog;
|
||||
import org.jeecg.modules.kc.grab.log.entity.XxhbbkjxtkpjGoodLog;
|
||||
import org.jeecg.modules.kc.grab.log.service.IXxhbbkjxtkpjBadLogService;
|
||||
import org.jeecg.modules.kc.grab.log.service.IXxhbbkjxtkpjGoodLogService;
|
||||
import org.jeecg.modules.kc.kcSysConfig.entity.KcSysConfig;
|
||||
import org.jeecg.modules.kc.kcSysConfig.service.IKcSysConfigService;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import org.jeecg.modules.kc.ktgl.service.IKcKetangbiaoService;
|
||||
import org.jeecg.modules.kc.qa.entity.KcEvaluation;
|
||||
import org.jeecg.modules.kc.qa.entity.KcEvaluations;
|
||||
import org.jeecg.modules.kc.qa.service.IKcEvaluationService;
|
||||
import org.jeecg.modules.kc.qa.service.IKcEvaluationansService;
|
||||
import org.jeecg.modules.kc.qa.service.IKcEvaluationqueService;
|
||||
import org.jeecg.modules.kc.qa.service.IKcEvaluationsService;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 修补服务大厅数据【查缺补漏】
|
||||
*/
|
||||
@Slf4j
|
||||
public class XbfwdtsjTask extends BaseSync {
|
||||
|
||||
@Autowired
|
||||
private IKcKetangbiaoService kcKetangbiaoService;
|
||||
@Autowired
|
||||
private IKcSysConfigService kcSysConfigService;
|
||||
|
||||
//----------------------------------旧系统------------------------------------------
|
||||
@Autowired
|
||||
private IXxhbbkjxtkpjService xxhbbkjxtkpjService;//政务大厅(纯回答)
|
||||
|
||||
//----------------------------------旧系统END------------------------------------------
|
||||
|
||||
//----------------------------------正在使用------------------------------------------
|
||||
|
||||
@Autowired
|
||||
private IKcEvaluationansService kcEvaluationansService;//正在使用答案(纯答案)
|
||||
|
||||
@Autowired
|
||||
private IKcEvaluationqueService kcEvaluationqueService;//正在使用问题(纯问题)
|
||||
|
||||
@Autowired
|
||||
private IKcEvaluationService kcEvaluationService;//正在使用问题(回答主表)
|
||||
|
||||
@Autowired
|
||||
private IKcEvaluationsService kcEvaluationsService;//正在使用问题(回答明细子表)
|
||||
|
||||
//----------------------------------正在使用END------------------------------------------
|
||||
|
||||
//----------------------------------政务大厅------------------------------------------
|
||||
//----------------------------------政务大厅END------------------------------------------
|
||||
|
||||
//----------------------------------纸质评价(后台导入)------------------------------------------
|
||||
//----------------------------------纸质评价(后台导入)END------------------------------------------
|
||||
|
||||
@Autowired
|
||||
private ChangeTingKeTongJi changeTingKeTongJi;
|
||||
|
||||
@Autowired
|
||||
private IXxhbbkjxtkpjBadLogService xxhbbkjxtkpjBadLogService;
|
||||
|
||||
@Autowired
|
||||
private IXxhbbkjxtkpjGoodLogService xxhbbkjxtkpjGoodLogService;
|
||||
|
||||
|
||||
Map<String,String> queOptionMap = Maps.newHashMap();
|
||||
Map<String,String> ansOptionMap = Maps.newHashMap();
|
||||
|
||||
/**
|
||||
* 若参数变量名修改 QuartzJobController中也需对应修改
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) {
|
||||
start();
|
||||
run(getParamMap());
|
||||
end();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 有参定时任务实现
|
||||
* @param param
|
||||
*/
|
||||
public void run(Map<String, Object> param){
|
||||
|
||||
initOptionMap();
|
||||
//旧版本
|
||||
washOldData(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 无参定时任务实现
|
||||
*/
|
||||
public void run(){
|
||||
run(null);
|
||||
}
|
||||
|
||||
public void initOptionMap (){
|
||||
// optionMap.put("0","A");
|
||||
// optionMap.put("1","B");
|
||||
// optionMap.put("2","C");
|
||||
// optionMap.put("3","D");
|
||||
// optionMap.put("4","E");
|
||||
|
||||
//序号,问题ID
|
||||
queOptionMap.put("1","23");//讲课有热情,精神饱满,能调动学生情绪,课堂气氛活跃
|
||||
queOptionMap.put("2","24");//教学目标明确,内容丰富,重点突出,语言表达清楚
|
||||
queOptionMap.put("3","25");//授课有启发性,能给予学生思考、联想、创新的启迪
|
||||
queOptionMap.put("4","26");//能有效利用各种教学媒体,课件或板书使用效果好
|
||||
queOptionMap.put("5","27");//仪表得体,按时上下课,严格要求学生
|
||||
queOptionMap.put("6","28");//无迟到、早退、旷课现象
|
||||
queOptionMap.put("7","29");//课堂教学秩序好,无喧闹、打瞌睡、发短信、玩手机等现象
|
||||
queOptionMap.put("8","30");//上课认真听讲、积极思考,主动与老师交流互动
|
||||
queOptionMap.put("9","31");//课堂教学总体印象评价
|
||||
queOptionMap.put("10","32");//对课堂内容以及其他方面的具体意见或建议
|
||||
//queOptionMap.put("32", "");//对课堂内容以及其他方面的具体意见或建议
|
||||
|
||||
//问题ID-答案代号,答案ID
|
||||
ansOptionMap.put("23-A", "176");
|
||||
ansOptionMap.put("23-B", "177");
|
||||
ansOptionMap.put("23-C", "178");
|
||||
ansOptionMap.put("23-D", "179");
|
||||
ansOptionMap.put("23-E", "180");
|
||||
ansOptionMap.put("24-A", "181");
|
||||
ansOptionMap.put("24-B", "182");
|
||||
ansOptionMap.put("24-C", "183");
|
||||
ansOptionMap.put("24-D", "184");
|
||||
ansOptionMap.put("24-E", "185");
|
||||
ansOptionMap.put("25-A", "186");
|
||||
ansOptionMap.put("25-B", "187");
|
||||
ansOptionMap.put("25-C", "188");
|
||||
ansOptionMap.put("25-D", "189");
|
||||
ansOptionMap.put("25-E", "190");
|
||||
ansOptionMap.put("26-A", "191");
|
||||
ansOptionMap.put("26-B", "192");
|
||||
ansOptionMap.put("26-C", "193");
|
||||
ansOptionMap.put("26-D", "194");
|
||||
ansOptionMap.put("26-E", "195");
|
||||
ansOptionMap.put("27-A", "196");
|
||||
ansOptionMap.put("27-B", "197");
|
||||
ansOptionMap.put("27-C", "198");
|
||||
ansOptionMap.put("27-D", "199");
|
||||
ansOptionMap.put("27-E", "200");
|
||||
ansOptionMap.put("28-A", "201");
|
||||
ansOptionMap.put("28-B", "202");
|
||||
ansOptionMap.put("28-C", "203");
|
||||
ansOptionMap.put("28-D", "204");
|
||||
ansOptionMap.put("28-E", "205");
|
||||
ansOptionMap.put("29-A", "206");
|
||||
ansOptionMap.put("29-B", "207");
|
||||
ansOptionMap.put("29-C", "208");
|
||||
ansOptionMap.put("29-D", "209");
|
||||
ansOptionMap.put("29-E", "210");
|
||||
ansOptionMap.put("30-A", "211");
|
||||
ansOptionMap.put("30-B", "212");
|
||||
ansOptionMap.put("30-C", "213");
|
||||
ansOptionMap.put("30-D", "214");
|
||||
ansOptionMap.put("30-E", "215");
|
||||
ansOptionMap.put("31-A", "296");
|
||||
ansOptionMap.put("31-B", "297");
|
||||
ansOptionMap.put("31-C", "298");
|
||||
ansOptionMap.put("31-D", "299");
|
||||
ansOptionMap.put("31-E", "300");
|
||||
|
||||
}
|
||||
|
||||
public void washOldData(Map<String, Object> param) {
|
||||
|
||||
DateTime now = DateUtil.date();
|
||||
|
||||
//时间得减一天
|
||||
now = DateUtil.offsetDay(now,-1);
|
||||
|
||||
String nowStr = DateUtil.format(now,DatePattern.NORM_DATE_FORMAT);
|
||||
|
||||
int source = 2;
|
||||
|
||||
|
||||
//查询数据
|
||||
QueryWrapper<Xxhbbkjxtkpj> inQw = new QueryWrapper<>();
|
||||
//筛选符合条件的答案
|
||||
inQw.notLike("tksjxq","()");
|
||||
inQw.in("jspg1","A", "B", "C", "D", "E");
|
||||
inQw.in("jspg2","A", "B", "C", "D", "E");
|
||||
inQw.in("jspg3","A", "B", "C", "D", "E");
|
||||
inQw.in("jspg4","A", "B", "C", "D", "E");
|
||||
inQw.in("jspg5","A", "B", "C", "D", "E");
|
||||
|
||||
inQw.in("xspg1","A", "B", "C", "D", "E");
|
||||
inQw.in("xspg2","A", "B", "C", "D", "E");
|
||||
inQw.in("xspg3","A", "B", "C", "D", "E");
|
||||
inQw.in("ztpj", "A", "B", "C", "D", "E");
|
||||
// inQw.eq("tkrxm","刘芮方");
|
||||
// inQw.last("limit 100");
|
||||
List<Xxhbbkjxtkpj> inDataList = xxhbbkjxtkpjService.list(inQw);
|
||||
List<KcEvaluation> saveMainList = Lists.newArrayList();
|
||||
|
||||
List<KcEvaluations> saveChildList = Lists.newArrayList();
|
||||
|
||||
inDataList.forEach(x -> {
|
||||
KcEvaluation main = new KcEvaluation();
|
||||
|
||||
//类似这样的。。2020年春季第17周星期一(2020年06月14日) 2020年春季第8周星期三(2020年04月14日)
|
||||
String tksjxq = x.getTksjxq();
|
||||
if(StringUtils.isNotBlank(tksjxq)){
|
||||
int startIndex = StringUtils.indexOf(tksjxq,"(");
|
||||
int endIndex = StringUtils.indexOf(tksjxq,")");
|
||||
if(startIndex != -1 && endIndex != -1){
|
||||
String dateStr = StringUtils.substring(tksjxq,startIndex+1,endIndex);
|
||||
Date pksj = DateUtil.parse(dateStr);
|
||||
main.setUpDate(pksj);
|
||||
main.setUpTime(pksj);
|
||||
main.setUpTimestamp(DateUtil.format(pksj, DatePattern.NORM_DATE_FORMAT));
|
||||
}
|
||||
}
|
||||
main.setUpuser(x.getTkrxm());
|
||||
if(StringUtils.isNotBlank(x.getTkrgh())){
|
||||
main.setUpuserid(Integer.parseInt(x.getTkrgh()));
|
||||
}
|
||||
|
||||
QueryWrapper<KcKetangbiao> qwKeTang = new QueryWrapper<>();
|
||||
qwKeTang.eq("kcmc",x.getTkkcmc());
|
||||
qwKeTang.eq("skjs",x.getRkjs());
|
||||
qwKeTang.eq("skrq",DateUtil.format(main.getUpDate(), DatePattern.NORM_DATE_FORMAT));
|
||||
String hh = x.getKcjc();
|
||||
switch (hh){
|
||||
case "第1节":
|
||||
case "第2节":
|
||||
hh = "01、02";
|
||||
break;
|
||||
case "第3节":
|
||||
case "第4节":
|
||||
hh = "03、04";
|
||||
break;
|
||||
case "第5节":
|
||||
case "第6节":
|
||||
hh = "05、06";
|
||||
break;
|
||||
case "第7节":
|
||||
case "第8节":
|
||||
hh = "07、08";
|
||||
break;
|
||||
case "第9节":
|
||||
case "第10节":
|
||||
hh = "09、10";
|
||||
break;
|
||||
case "第11节":
|
||||
case "第12节":
|
||||
hh = "11、12";
|
||||
break;
|
||||
default:
|
||||
hh = "";
|
||||
break;
|
||||
}
|
||||
|
||||
qwKeTang.eq("hh",hh);
|
||||
qwKeTang.last("limit 1");
|
||||
KcKetangbiao ketangbiao = kcKetangbiaoService.getOne(qwKeTang);
|
||||
if(ketangbiao == null) {
|
||||
//再查一遍,去除hh
|
||||
QueryWrapper<KcKetangbiao> qwKeTang2 = new QueryWrapper<>();
|
||||
qwKeTang2.eq("kcmc",x.getTkkcmc());
|
||||
qwKeTang2.eq("skjs",x.getRkjs());
|
||||
qwKeTang2.eq("skrq",DateUtil.format(main.getUpDate(), DatePattern.NORM_DATE_FORMAT));
|
||||
qwKeTang2.last("limit 1");
|
||||
ketangbiao = kcKetangbiaoService.getOne(qwKeTang2);
|
||||
}
|
||||
//如果还是没有,那就造一条记录,插入进去
|
||||
if(ketangbiao == null) {
|
||||
KcKetangbiao KcKetangbiao2 = new KcKetangbiao();
|
||||
KcKetangbiao2.setKcmc(x.getTkkcmc());
|
||||
KcKetangbiao2.setSkjs(x.getRkjs());
|
||||
KcKetangbiao2.setSkrq(DateUtil.format(main.getUpDate(), DatePattern.NORM_DATE_FORMAT));
|
||||
KcKetangbiao2.setHh(hh);
|
||||
KcKetangbiao2.setSkdd(x.getTkjs());
|
||||
String skrq = DateUtil.format(main.getUpDate(), DatePattern.NORM_DATE_FORMAT);
|
||||
QueryWrapper<KcSysConfig> kcSysConfigQueryWrapper = new QueryWrapper<>();
|
||||
kcSysConfigQueryWrapper.apply("bxqkssj >= '" + skrq +"' and bxqjssj <= '" + skrq + "'");
|
||||
KcSysConfig KcSysConfig = kcSysConfigService.getOne(kcSysConfigQueryWrapper);
|
||||
String flag1 = "";
|
||||
if(KcSysConfig!=null){
|
||||
flag1 = KcSysConfig.getFlag1();
|
||||
}
|
||||
KcKetangbiao2.setXnxq(flag1);
|
||||
kcKetangbiaoService.save(KcKetangbiao2);
|
||||
ketangbiao = KcKetangbiao2;
|
||||
}
|
||||
|
||||
|
||||
if(ketangbiao!=null && StringUtils.isNotBlank(ketangbiao.getId())){
|
||||
|
||||
main.setMinkcid(ketangbiao.getId());
|
||||
QueryWrapper<KcEvaluation> kcEvaluationQueryWrapper = new QueryWrapper<KcEvaluation>();
|
||||
kcEvaluationQueryWrapper.eq("upuser",main.getUpuser());
|
||||
kcEvaluationQueryWrapper.eq("upuserid",main.getUpuserid());
|
||||
kcEvaluationQueryWrapper.eq("minkcid",main.getMinkcid());
|
||||
kcEvaluationQueryWrapper.eq("up_timestamp",main.getUpTimestamp());
|
||||
kcEvaluationQueryWrapper.last("limit 1");
|
||||
KcEvaluation KcEvaluationPjsj = kcEvaluationService.getOne(kcEvaluationQueryWrapper);
|
||||
if(KcEvaluationPjsj!=null&&StringUtils.isNotEmpty(KcEvaluationPjsj.getUpuser())){
|
||||
//什么也不干,因为已经有评价数据了
|
||||
}else{
|
||||
|
||||
main.setAnswer1(x.getJspg1());
|
||||
main.setAnswer2(x.getJspg2());
|
||||
main.setAnswer3(x.getJspg3());
|
||||
main.setAnswer4(x.getJspg4());
|
||||
main.setAnswer5(x.getJspg5());
|
||||
main.setAnswer6(x.getXspg1());
|
||||
main.setAnswer7(x.getXspg2());
|
||||
main.setAnswer8(x.getXspg3());
|
||||
main.setAnswer9(x.getZtpj());
|
||||
main.setAnswer10(x.getQtyj());
|
||||
|
||||
main.setEvaluationver(3);//题版本
|
||||
main.setSource(source);//老版本
|
||||
saveMainList.add(main);
|
||||
//子数据
|
||||
|
||||
|
||||
kcEvaluationService.save(main);
|
||||
|
||||
//添加听课日志
|
||||
if(StringUtils.isNotBlank(main.getMinkcid())){
|
||||
changeTingKeTongJi.addTingKeData(String.valueOf(main.getUpuserid()),main.getMinkcid(),main.getUpDate());
|
||||
}
|
||||
|
||||
for (int i = 1; 10 >= i; i++){
|
||||
String optionId = "";
|
||||
String ansKey = "";
|
||||
switch (i) {
|
||||
case 1: optionId = queOptionMap.get("1"); ansKey = main.getAnswer1(); break;
|
||||
case 2: optionId = queOptionMap.get("2"); ansKey = main.getAnswer2(); break;
|
||||
case 3: optionId = queOptionMap.get("3"); ansKey = main.getAnswer3(); break;
|
||||
case 4: optionId = queOptionMap.get("4"); ansKey = main.getAnswer4(); break;
|
||||
case 5: optionId = queOptionMap.get("5"); ansKey = main.getAnswer5(); break;
|
||||
case 6: optionId = queOptionMap.get("6"); ansKey = main.getAnswer6(); break;
|
||||
case 7: optionId = queOptionMap.get("7"); ansKey = main.getAnswer7(); break;
|
||||
case 8: optionId = queOptionMap.get("8"); ansKey = main.getAnswer8(); break;
|
||||
case 9: optionId = queOptionMap.get("9"); ansKey = main.getAnswer9(); break;
|
||||
case 10: optionId = queOptionMap.get("10"); ansKey = main.getAnswer10(); break;
|
||||
}
|
||||
KcEvaluations child = new KcEvaluations();
|
||||
child.setUpDate(x.getTimestamps());
|
||||
child.setUpTime(x.getTimestamps());
|
||||
child.setUpTimestamp(DateUtil.format(x.getTimestamps(),DatePattern.NORM_DATETIME_FORMAT));
|
||||
child.setUpuser(x.getTkrxm());
|
||||
child.setUpuserid(x.getTkrgh());
|
||||
child.setKetangbiaoid(ketangbiao.getId());//用上面的ID
|
||||
child.setQueid(Integer.parseInt(optionId));//问题ID
|
||||
if(i == 10){
|
||||
child.setAnsid(0);
|
||||
child.setTextanscontent(ansKey);//多行文本型答案内容
|
||||
}else {
|
||||
String ansId = ansOptionMap.get(optionId+"-"+ansKey);
|
||||
if(StringUtils.isNotBlank(ansId)){
|
||||
child.setAnsid(Integer.parseInt(ansId));//答案ID
|
||||
}
|
||||
}
|
||||
child.setEvaluationid(main.getId());
|
||||
child.setSource(source);//老版本
|
||||
saveChildList.add(child);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if(saveChildList != null){
|
||||
kcEvaluationsService.saveBatch(saveChildList);
|
||||
}
|
||||
changeTingKeTongJi.changeTingKeTongji();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
//类似这样的。。2020年春季第17周星期一(2020年06月14日) 2020年春季第8周星期三(2020年04月14日)
|
||||
String tksjxq = "2020年春季第17周星期一(2020年06月14日)";
|
||||
if(StringUtils.isNotBlank(tksjxq)){
|
||||
int startIndex = StringUtils.indexOf(tksjxq,"(");
|
||||
int endIndex = StringUtils.indexOf(tksjxq,")");
|
||||
if(startIndex != -1 && endIndex != -1){
|
||||
String dateStr = StringUtils.substring(tksjxq,startIndex+1,endIndex);
|
||||
System.out.println(dateStr);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -329,7 +329,7 @@
|
|||
</if>
|
||||
GROUP BY ev.upuserid, cu.dwh
|
||||
) tk left join
|
||||
( select gh as usercode,xm as username,GROUP_CONCAT( b.item_text SEPARATOR ',' ) as tksf1 ,max(ytkcs) as tkyq from kc_export_config_tpkwcqkjzglx a
|
||||
( select gh as usercode,xm as username,GROUP_CONCAT( b.item_text SEPARATOR ',' ) as tksf1 ,round(max(ytkcs-0),0) as tkyq from kc_export_config_tpkwcqkjzglx a
|
||||
LEFT JOIN sys_dict_item b on a.tklx = b.item_value and dict_id = '1682386362753224705'
|
||||
and a.xqxn = (select flag1 from kc_sys_config where id = 1)
|
||||
<if test="kcEvaluation.tksf != null and kcEvaluation.tksf != ''">
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
GROUP BY tk.userid, tk.username, college
|
||||
) tk LEFT JOIN (
|
||||
|
||||
select gh as usercode,xm as username,GROUP_CONCAT( b.item_text SEPARATOR ',' ) as tksf1 ,max(ytkcs) as tkyq from kc_export_config_tpkwcqkjzglx a
|
||||
select gh as usercode,xm as username,GROUP_CONCAT( b.item_text SEPARATOR ',' ) as tksf1 ,max(ytkcs-0) as tkyq from kc_export_config_tpkwcqkjzglx a
|
||||
LEFT JOIN sys_dict_item b on a.tklx = b.item_value and dict_id = '1682386362753224705'
|
||||
and a.xqxn = (select flag1 from kc_sys_config where id = 1)
|
||||
WHERE 1 = 1
|
||||
|
@ -114,7 +114,7 @@
|
|||
WHERE k.id = t.kechengbiaoid AND t.userid = c.USER
|
||||
) tk
|
||||
LEFT JOIN (
|
||||
select gh as usercode,xm as username,GROUP_CONCAT( b.item_text SEPARATOR ',' ) as assess1 ,max(ytkcs) as tkyq from kc_export_config_tpkwcqkjzglx a
|
||||
select gh as usercode,xm as username,GROUP_CONCAT( b.item_text SEPARATOR ',' ) as assess1 ,max(ytkcs-0) as tkyq from kc_export_config_tpkwcqkjzglx a
|
||||
LEFT JOIN sys_dict_item b on a.tklx = b.item_value and dict_id = '1682386362753224705'
|
||||
and a.xqxn = (select flag1 from kc_sys_config where id = 1)
|
||||
GROUP BY gh,xm
|
||||
|
@ -914,7 +914,7 @@
|
|||
<select id="getUserTingkeInfo" resultType="org.jeecg.modules.kc.tktj.entity.KcTingke">
|
||||
select xb.gh as userid,xb.xm as username,tkyq.yskcs as tkyq,tk.sjtksl AS sjtksl
|
||||
from xxhbuser xb
|
||||
LEFT JOIN (select gh,max(ytkcs) yskcs from kc_export_config_tpkwcqkjzglx where gh = #{userid} and xqxn = #{xnxq}) tkyq on xb.gh = tkyq.gh
|
||||
LEFT JOIN (select gh,max(ytkcs-0) yskcs from kc_export_config_tpkwcqkjzglx where gh = #{userid} and xqxn = #{xnxq}) tkyq on xb.gh = tkyq.gh
|
||||
LEFT JOIN (
|
||||
select count(*) as sjtksl,upuserid from kc_evaluation where up_timestamp >= #{startTime} AND up_timestamp <= concat(#{endTime},' 23:59:59')
|
||||
GROUP BY upuserid
|
||||
|
|
Loading…
Reference in New Issue