2023年6月18日 修复同步和导出
This commit is contained in:
parent
224167eb26
commit
98e02eaf25
|
@ -1,9 +1,12 @@
|
||||||
package org.jeecg.modules.kc.grab.SynchronizationService;
|
package org.jeecg.modules.kc.grab.SynchronizationService;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
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 com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.compress.utils.Lists;
|
import org.apache.commons.compress.utils.Lists;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.jeecg.common.util.DateUtils;
|
import org.jeecg.common.util.DateUtils;
|
||||||
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
|
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
|
||||||
import org.jeecg.modules.kc.grab.exports.entity.TFwdtBkjxtkpj;
|
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){
|
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();//获取当前时间
|
Date date = new Date();//获取当前时间
|
||||||
|
@ -74,7 +96,9 @@ public class SyncTFwdtBkjxtkpj extends BaseSync {
|
||||||
calendar.add(Calendar.DAY_OF_MONTH, -1);//当前时间前去一天
|
calendar.add(Calendar.DAY_OF_MONTH, -1);//当前时间前去一天
|
||||||
QueryWrapper<TFwdtBkjxtkpj> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<TFwdtBkjxtkpj> queryWrapper = new QueryWrapper<>();
|
||||||
// queryWrapper.like("timestamps", DateUtils.formatDate(calendar.getTime(),"yyyy-MM-dd"));//增量数据
|
// 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<TFwdtBkjxtkpj> inDataList = tfwdtBkjxtkpjService.list(queryWrapper);
|
||||||
List<Xxhbbkjxtkpj> outDataList = Lists.newArrayList();
|
List<Xxhbbkjxtkpj> outDataList = Lists.newArrayList();
|
||||||
|
|
||||||
|
|
|
@ -110,12 +110,20 @@ public class TingKeStatisticsController {
|
||||||
sourceDictMap.put(1,"老系统");
|
sourceDictMap.put(1,"老系统");
|
||||||
sourceDictMap.put(2,"服务大厅");
|
sourceDictMap.put(2,"服务大厅");
|
||||||
sourceDictMap.put(3,"线下纸质");
|
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------------------------------------------
|
//---------------------补数据1------------------------------------------
|
||||||
|
|
||||||
Set<String> tjSet = Sets.newHashSet();
|
Set<String> tjSet = Sets.newHashSet();
|
||||||
pageList.getRecords().forEach(x -> {
|
pageList.getRecords().forEach(x -> {
|
||||||
//补充信息
|
//补充信息
|
||||||
x.setSourceName(sourceDictMap.get(x.getSource()));//数据来源
|
x.setSourceName(sourceDictMap.get(x.getSource()));//数据来源
|
||||||
|
x.setPjlblx(pjlblxMap.get(x.getPjlblx()));
|
||||||
Integer ixuserId = x.getUpuserid();
|
Integer ixuserId = x.getUpuserid();
|
||||||
String xuserId = String.valueOf(ixuserId);
|
String xuserId = String.valueOf(ixuserId);
|
||||||
tjSet.add(xuserId);
|
tjSet.add(xuserId);
|
||||||
|
@ -224,12 +232,22 @@ public class TingKeStatisticsController {
|
||||||
sourceDictMap.put(1,"老系统");
|
sourceDictMap.put(1,"老系统");
|
||||||
sourceDictMap.put(2,"服务大厅");
|
sourceDictMap.put(2,"服务大厅");
|
||||||
sourceDictMap.put(3,"线下纸质");
|
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------------------------------------------
|
//---------------------补数据1------------------------------------------
|
||||||
|
|
||||||
Set<String> tjSet = Sets.newHashSet();
|
Set<String> tjSet = Sets.newHashSet();
|
||||||
pageList.getRecords().forEach(x -> {
|
pageList.getRecords().forEach(x -> {
|
||||||
//补充信息
|
//补充信息
|
||||||
x.setSourceName(sourceDictMap.get(x.getSource()));//数据来源
|
x.setSourceName(sourceDictMap.get(x.getSource()));//数据来源
|
||||||
|
x.setPjlblx(pjlblxMap.get(x.getPjlblx()));
|
||||||
Integer ixuserId = x.getUpuserid();
|
Integer ixuserId = x.getUpuserid();
|
||||||
String xuserId = String.valueOf(ixuserId);
|
String xuserId = String.valueOf(ixuserId);
|
||||||
tjSet.add(xuserId);
|
tjSet.add(xuserId);
|
||||||
|
|
Loading…
Reference in New Issue