2023年6月18日 修复同步和导出

This commit is contained in:
bai 2023-06-18 19:23:44 +08:00
parent 224167eb26
commit 98e02eaf25
2 changed files with 43 additions and 1 deletions

View File

@ -1,9 +1,12 @@
package org.jeecg.modules.kc.grab.SynchronizationService;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.util.DateUtils;
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
import org.jeecg.modules.kc.grab.exports.entity.TFwdtBkjxtkpj;
@ -66,6 +69,25 @@ public class SyncTFwdtBkjxtkpj extends BaseSync {
*/
public void run(Map<String, Object> param){
DateTime now = DateUtil.date();
boolean isAll = false;
if(param != null){
if(param.containsKey("isAll")){
String isAllStr = (String)param.get("isAll");
if(StringUtils.isNotBlank(isAllStr)){
isAll = Boolean.parseBoolean(isAllStr);
}
}
// if(param.containsKey("nowDay")){
// String nowDayStr = (String)param.get("nowDay");
// if(StringUtils.isNotBlank(nowDayStr)){
// now = DateUtil.parse(nowDayStr, "yyyy-MM-dd");
// }
// }
}
//查询数据
Date date = new Date();//获取当前时间
@ -74,7 +96,9 @@ public class SyncTFwdtBkjxtkpj extends BaseSync {
calendar.add(Calendar.DAY_OF_MONTH, -1);//当前时间前去一天
QueryWrapper<TFwdtBkjxtkpj> queryWrapper = new QueryWrapper<>();
// queryWrapper.like("timestamps", DateUtils.formatDate(calendar.getTime(),"yyyy-MM-dd"));//增量数据
queryWrapper.apply("trunc(timestamps,'dd') = to_date('"+DateUtils.formatDate(calendar.getTime(),"yyyy-MM-dd")+"','yyyy-mm-dd')");
if(!isAll){
queryWrapper.apply("trunc(timestamps,'dd') = to_date('"+DateUtils.formatDate(calendar.getTime(),"yyyy-MM-dd")+"','yyyy-mm-dd')");
}
List<TFwdtBkjxtkpj> inDataList = tfwdtBkjxtkpjService.list(queryWrapper);
List<Xxhbbkjxtkpj> outDataList = Lists.newArrayList();

View File

@ -110,12 +110,20 @@ public class TingKeStatisticsController {
sourceDictMap.put(1,"老系统");
sourceDictMap.put(2,"服务大厅");
sourceDictMap.put(3,"线下纸质");
Map<String,String> pjlblxMap = Maps.newHashMap();
//0门户添加1老系统2政务大厅3后台导入
// sourceDictMap.put(0,"课程中心");
// sourceDictMap.put(1,"老系统");
pjlblxMap.put("2","线上课堂评价表");
pjlblxMap.put("3","听课记录表");
pjlblxMap.put("4","同行评价表");
//---------------------补数据1------------------------------------------
Set<String> tjSet = Sets.newHashSet();
pageList.getRecords().forEach(x -> {
//补充信息
x.setSourceName(sourceDictMap.get(x.getSource()));//数据来源
x.setPjlblx(pjlblxMap.get(x.getPjlblx()));
Integer ixuserId = x.getUpuserid();
String xuserId = String.valueOf(ixuserId);
tjSet.add(xuserId);
@ -224,12 +232,22 @@ public class TingKeStatisticsController {
sourceDictMap.put(1,"老系统");
sourceDictMap.put(2,"服务大厅");
sourceDictMap.put(3,"线下纸质");
Map<String,String> pjlblxMap = Maps.newHashMap();
//0门户添加1老系统2政务大厅3后台导入
// sourceDictMap.put(0,"课程中心");
// sourceDictMap.put(1,"老系统");
pjlblxMap.put("2","线上课堂评价表");
pjlblxMap.put("3","听课记录表");
pjlblxMap.put("4","同行评价表");
//---------------------补数据1------------------------------------------
Set<String> tjSet = Sets.newHashSet();
pageList.getRecords().forEach(x -> {
//补充信息
x.setSourceName(sourceDictMap.get(x.getSource()));//数据来源
x.setPjlblx(pjlblxMap.get(x.getPjlblx()));
Integer ixuserId = x.getUpuserid();
String xuserId = String.valueOf(ixuserId);
tjSet.add(xuserId);