修改bug
This commit is contained in:
parent
06cf9a79a0
commit
02f1f13a05
|
@ -26,10 +26,7 @@ import java.io.File;
|
|||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: 教师调查问卷
|
||||
|
@ -98,40 +95,88 @@ public class BlTeacherMainServiceImpl extends ServiceImpl<BlTeacherMainMapper, B
|
|||
|
||||
WordOperator wo = ExportWord.getWordOperator(templateName);
|
||||
|
||||
QueryWrapper<BlTeacherTjfx> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("main_id",id);
|
||||
queryWrapper.last("limit 10");
|
||||
List<BlTeacherTjfx> dataList = blTeacherTjfxMapper.selectList(queryWrapper);
|
||||
// QueryWrapper<BlTeacherTjfx> queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.eq("main_id",id);
|
||||
// queryWrapper.last("limit 10");
|
||||
// List<BlTeacherTjfx> dataList = blTeacherTjfxMapper.selectList(queryWrapper);
|
||||
|
||||
BlTeacherMain blTeacherMain = baseMapper.selectById(id);
|
||||
|
||||
Random random = new Random();
|
||||
Map<String, Object> result = Maps.newHashMap();
|
||||
Map<String, Object> result2 = Maps.newHashMap();
|
||||
result.put("title", blTeacherMain.getTitle());
|
||||
result.put("nan", blTeacherMain.getTitle());//男占比
|
||||
result.put("nan_zb", blTeacherMain.getTitle());//女占比
|
||||
result.put("nv", blTeacherMain.getTitle());//女
|
||||
result.put("nv_zb", blTeacherMain.getTitle());//女占比
|
||||
result.put("xlccjg1", blTeacherMain.getTitle());//研究生
|
||||
result.put("xlccjg1_zb", blTeacherMain.getTitle());//研究生
|
||||
result.put("gwlxjg1", blTeacherMain.getTitle());//教学科研型
|
||||
result.put("gwlxjg1_zb", blTeacherMain.getTitle());//教学科研型
|
||||
result.put("xyjg1", blTeacherMain.getTitle());//学院结构
|
||||
result.put("xyjg1_zb", blTeacherMain.getTitle());//学院结构
|
||||
result.put("nan", random.nextInt(900) + 100+"");//男占比
|
||||
result.put("nan_zb", random.nextInt(900) + 10+"");//女占比
|
||||
result.put("nv", random.nextInt(900) + 100+"");//女
|
||||
result.put("nv_zb", random.nextInt(900) + 10+"");//女占比
|
||||
result.put("xlccjg1", random.nextInt(900) + 100+"");//研究生
|
||||
result.put("xlccjg2", random.nextInt(900) + 100+"");//研究生
|
||||
result.put("xlccjg3", random.nextInt(900) + 100+"");//研究生
|
||||
result.put("xlccjg1_zb", random.nextInt(900) + 10+"");//研究生
|
||||
result.put("xlccjg2_zb", random.nextInt(900) + 10+"");//研究生
|
||||
result.put("xlccjg3_zb", random.nextInt(900) + 10+"");//研究生
|
||||
|
||||
result.put("zcjg1", random.nextInt(900) + 100+"");//教学科研型
|
||||
result.put("zcjg2", random.nextInt(900) + 100+"");//教学科研型
|
||||
result.put("zcjg3", random.nextInt(900) + 100+"");//教学科研型
|
||||
result.put("zcjg4", random.nextInt(900) + 100+"");//教学科研型
|
||||
result.put("zcjg1_zb", random.nextInt(900) + 10+"");//教学科研型
|
||||
result.put("zcjg2_zb", random.nextInt(900) + 10+"");//教学科研型
|
||||
result.put("zcjg3_zb", random.nextInt(900) + 10+"");//教学科研型
|
||||
result.put("zcjg4_zb", random.nextInt(900) + 10+"");//教学科研型
|
||||
|
||||
result.put("gwlxjg1", random.nextInt(900) + 100+"");//教学科研型
|
||||
result.put("gwlxjg2", random.nextInt(900) + 100+"");//教学科研型
|
||||
result.put("gwlxjg3", random.nextInt(900) + 100+"");//教学科研型
|
||||
result.put("gwlxjg4", random.nextInt(900) + 100+"");//教学科研型
|
||||
result.put("gwlxjg1_zb", random.nextInt(900) + 10+"");//教学科研型
|
||||
result.put("gwlxjg2_zb", random.nextInt(900) + 10+"");//教学科研型
|
||||
result.put("gwlxjg3_zb", random.nextInt(900) + 10+"");//教学科研型
|
||||
result.put("gwlxjg4_zb", random.nextInt(900) + 10+"");//教学科研型
|
||||
|
||||
result.put("xyjg1", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg2", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg3", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg4", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg5", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg6", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg7", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg8", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg9", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg10", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg11", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg12", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg13", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg14", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg15", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg16", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg17", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg18", random.nextInt(900) + 100+"");//学院结构
|
||||
result.put("xyjg1_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg2_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg3_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg4_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg5_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg6_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg7_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg8_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg9_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg10_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg11_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg12_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg13_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg14_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg15_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg16_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg17_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
result.put("xyjg18_zb", random.nextInt(900) + 10+"");//学院结构
|
||||
|
||||
|
||||
// 创建数据集
|
||||
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
|
||||
dataset.addValue(100, "Series1", "Category1");
|
||||
dataset.addValue(150, "Series1", "Category2");
|
||||
dataset.addValue(200, "Series1", "Category3");
|
||||
dataset.addValue(200, "Series1", "Category4");
|
||||
dataset.addValue(200, "Series1", "Category5");
|
||||
dataset.addValue(100, "Series2", "Category1");
|
||||
dataset.addValue(150, "Series2", "Category2");
|
||||
dataset.addValue(200, "Series2", "Category3");
|
||||
dataset.addValue(200, "Series2", "Category4");
|
||||
dataset.addValue(200, "Series2", "Category5");
|
||||
dataset.addValue(random.nextInt(900) + 10, "tjfx", "tjfx1");
|
||||
dataset.addValue(random.nextInt(900) + 10, "tjfx", "tjfx2");
|
||||
dataset.addValue(random.nextInt(900) + 10, "tjfx", "tjfx3");
|
||||
|
||||
// 创建图表
|
||||
JFreeChart chart = ChartFactory.createBarChart(
|
||||
|
@ -155,23 +200,49 @@ public class BlTeacherMainServiceImpl extends ServiceImpl<BlTeacherMainMapper, B
|
|||
List<List<String>> oneList = Lists.newArrayList();
|
||||
List<List<String>> twoList = Lists.newArrayList();
|
||||
//-------拼装list--------------
|
||||
for(BlTeacherTjfx tjfxPar:dataList){
|
||||
List<String> list = Lists.newArrayList();
|
||||
list.add("依法依规,履行教师职责");
|
||||
list.add("4.80");
|
||||
list.add("4.66");
|
||||
list.add("4.82");
|
||||
list.add("4.85");
|
||||
list.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
oneList.add(list);
|
||||
list = Lists.newArrayList();
|
||||
list.add("关心爱护学生");
|
||||
list.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
oneList.add(list);
|
||||
list = Lists.newArrayList();
|
||||
list.add("精神面貌及品德修养良好");
|
||||
list.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
oneList.add(list);
|
||||
|
||||
List<String> list2 = Lists.newArrayList();
|
||||
list2.add("1111111");
|
||||
list2.add("4.80");
|
||||
list2.add("4.66");
|
||||
list2.add("4.82");
|
||||
list2.add("4.85");
|
||||
list2.add("依法依规,履行教师职责");
|
||||
list2.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list2.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list2.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list2.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
twoList.add(list2);
|
||||
list2 = Lists.newArrayList();
|
||||
list2.add("关心爱护学生");
|
||||
list2.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list2.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list2.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list2.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
twoList.add(list2);
|
||||
list2 = Lists.newArrayList();
|
||||
list2.add("精神面貌及品德修养良好");
|
||||
list2.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list2.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list2.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
list2.add(String.format("%.2f", (double) random.nextInt(10)));
|
||||
twoList.add(list2);
|
||||
}
|
||||
wo.insert2Table(1, 1, true, oneList);
|
||||
wo.insert2Table(2, 1, true, twoList);
|
||||
|
||||
|
|
|
@ -90,6 +90,13 @@ public class KcDetectionMainController extends JeecgController<KcDetectionMain,
|
|||
queryWrapper.eq("ketangbiao_info -> '$.hh'", kcDetectionMain.getSearchHh());
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(kcDetectionMain.getSearchHh())){
|
||||
queryWrapper.eq("ketangbiao_info -> '$.hh'", kcDetectionMain.getSearchHh());
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(kcDetectionMain.getSkjs())){
|
||||
queryWrapper.like("ketangbiao_info -> '$.skjs'", kcDetectionMain.getSkjs());
|
||||
}
|
||||
Page<KcDetectionMain> page = new Page<>(pageNo, pageSize);
|
||||
IPage<KcDetectionMain> pageList = kcDetectionMainService.page(page, queryWrapper);
|
||||
//补充查询子列表
|
||||
|
@ -108,7 +115,7 @@ public class KcDetectionMainController extends JeecgController<KcDetectionMain,
|
|||
QueryWrapper<KcDetectionDetailed> qw = new QueryWrapper<>();
|
||||
qw.lambda().in(KcDetectionDetailed::getPid,pidSet);
|
||||
// qw.orderByAsc("detection_num");
|
||||
qw.orderByDesc("create_time");
|
||||
qw.orderByAsc("create_time");
|
||||
List<KcDetectionDetailed> detailedList = kcDetectionDetailedService.list(qw);
|
||||
detailedList.forEach(x -> {
|
||||
if(detectionMainMap.containsKey(x.getPid())){
|
||||
|
@ -117,9 +124,52 @@ public class KcDetectionMainController extends JeecgController<KcDetectionMain,
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
List<KcDetectionMain> alist = pageList.getRecords();
|
||||
for(KcDetectionMain par: alist){
|
||||
List<KcDetectionDetailed> blist = par.getDetectionDetailedList();
|
||||
int anum = 0;//第一次抓取人数
|
||||
int bnum = 0;//第二次抓取人数
|
||||
int cnum = 0;//第三次抓取人数
|
||||
if(blist.size()>=2){
|
||||
for(int i=0;i<blist.size();i++){
|
||||
KcDetectionDetailed bpar = blist.get(i);
|
||||
if(i==0){
|
||||
anum = bpar.getNum();
|
||||
}else if (i==1){
|
||||
bnum = bpar.getNum();
|
||||
}else if (i==2){
|
||||
cnum = bpar.getNum();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(bnum!=0){
|
||||
if(anum!=0){
|
||||
if(bnum-anum<0){
|
||||
par.setCdrs("0");
|
||||
}else{
|
||||
par.setCdrs(String.valueOf(bnum-anum));
|
||||
}
|
||||
}else{
|
||||
par.setCdrs("0");
|
||||
}
|
||||
if(cnum!=0){
|
||||
if(bnum-cnum<0){
|
||||
par.setZtrs(String.valueOf(bnum-cnum));
|
||||
}else{
|
||||
par.setZtrs("0");
|
||||
}
|
||||
}else{
|
||||
par.setZtrs("0");
|
||||
}
|
||||
}else{
|
||||
par.setCdrs("0");
|
||||
par.setZtrs("0");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
|
|
@ -104,4 +104,16 @@ public class KcDetectionMain implements Serializable {
|
|||
/**搜索节次*/
|
||||
@TableField(exist = false)
|
||||
private String searchHh;
|
||||
/**授课教师*/
|
||||
@TableField(exist = false)
|
||||
private String skjs;
|
||||
|
||||
|
||||
//迟到人数
|
||||
@TableField(exist = false)
|
||||
private String cdrs;
|
||||
//早退人数
|
||||
@TableField(exist = false)
|
||||
private String ztrs;
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.jeecg.modules.kc.detection.service.impl;
|
|||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
|
@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.beust.jcommander.internal.Sets;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
@ -37,6 +39,9 @@ import java.io.File;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.CompletionService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
/**
|
||||
* @Description: 教室人数检测-详细表
|
||||
|
@ -72,12 +77,12 @@ public class KcDetectionDetailedServiceImpl extends ServiceImpl<KcDetectionDetai
|
|||
@Autowired
|
||||
SftpConfig sftpConfig;
|
||||
|
||||
|
||||
|
||||
|
||||
@Value(value = "${jeecg.path.upload}")
|
||||
private String uploadpath;
|
||||
|
||||
@Value(value = "${jeecg.path.webapp}")
|
||||
private String downloadpath;
|
||||
|
||||
@Override
|
||||
public void videoScreenshotAll() {
|
||||
DateTime now = DateTime.now();
|
||||
|
@ -85,13 +90,18 @@ public class KcDetectionDetailedServiceImpl extends ServiceImpl<KcDetectionDetai
|
|||
|
||||
String yearMonthStr = now.toString("yyyy-MM");
|
||||
|
||||
CompletionService<Boolean> threadService = ThreadUtil.newCompletionService(Executors.newFixedThreadPool(2));
|
||||
|
||||
List<Callable<Boolean>> calls = Lists.newArrayList();
|
||||
|
||||
|
||||
//新版,查询当前是否有课
|
||||
// KcZhihuijiaoshi jiaoshi = new KcZhihuijiaoshi();
|
||||
// jiaoshi.setXm("学生全景");
|
||||
// jiaoshi.setChangshang("奥威亚");
|
||||
// QueryWrapper<KcZhihuijiaoshi> queryWrapper = new QueryWrapper<>();
|
||||
// queryWrapper.eq("xm","学生全景");
|
||||
// queryWrapper.eq("changshang","奥威亚");
|
||||
KcZhihuijiaoshi jiaoshi = new KcZhihuijiaoshi();
|
||||
jiaoshi.setXm("学生全景");
|
||||
jiaoshi.setChangshang("奥威亚");
|
||||
QueryWrapper<KcZhihuijiaoshi> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("xm","学生全景");
|
||||
queryWrapper.eq("changshang","奥威亚");
|
||||
|
||||
String hh = "";
|
||||
KcJieci kcJieci = new KcJieci();
|
||||
|
@ -103,20 +113,21 @@ public class KcDetectionDetailedServiceImpl extends ServiceImpl<KcDetectionDetai
|
|||
hh = kcJieciParam.getJieci() + "," + String.join(",", jcArray);
|
||||
}
|
||||
|
||||
|
||||
KcKetangbiao kcKetangbiao = new KcKetangbiao();
|
||||
kcKetangbiao.setSfyzhjs("1");
|
||||
kcKetangbiao.setHh(hh);
|
||||
kcKetangbiao.setSkrq(nowStr);
|
||||
// kcKetangbiao.setUserid("");
|
||||
// kcKetangbiao.setSkrq("2024-06-14");
|
||||
kcKetangbiao.setSkxs(1);
|
||||
kcKetangbiao.setSbType("1");
|
||||
kcKetangbiao.setSftkb("1");
|
||||
kcKetangbiao.setYwskxs("");
|
||||
|
||||
if(StringUtils.equals(",", hh)){
|
||||
log.error("未查到节次,原因未知!");
|
||||
return;
|
||||
}
|
||||
// if(StringUtils.equals(",", hh)){
|
||||
// log.error("未查到节次,原因未知!");
|
||||
// return;
|
||||
// }
|
||||
|
||||
Page<KcKetangbiao> page = new Page<>(1, -1);
|
||||
IPage<KcKetangbiao> pageList = kcKetangbiaoService.getKclblist(page, kcKetangbiao);
|
||||
|
@ -145,7 +156,9 @@ public class KcDetectionDetailedServiceImpl extends ServiceImpl<KcDetectionDetai
|
|||
String fileName;
|
||||
File uploadpathFile = new File(uploadpath);
|
||||
String uploadpathFilePath = uploadpathFile.getPath();
|
||||
|
||||
File file = new File(uploadpathFilePath + File.separator + "temp" + File.separator + "videoScreenshot" + File.separator + ketangbiao.getXnxq() + File.separator + yearMonthStr + File.separator + x.getJsbh() + File.separator);
|
||||
File fileBak = new File(downloadpath + File.separator + "temp" + File.separator + "videoScreenshot" + File.separator + ketangbiao.getXnxq() + File.separator + yearMonthStr + File.separator + x.getJsbh() + File.separator);
|
||||
String orgName = x.getPullUrl();// 获取文件名
|
||||
orgName = CommonUtil.getFileName(orgName);
|
||||
if(orgName.lastIndexOf(".")!=-1){
|
||||
|
@ -160,10 +173,6 @@ public class KcDetectionDetailedServiceImpl extends ServiceImpl<KcDetectionDetai
|
|||
}
|
||||
fileName = rwbh + "_" + fileName;
|
||||
//qn更改-- 修复特殊字符上传后无法下载的问题,修复多个.名称错乱的问题END
|
||||
// String savePath = file.getPath() + File.separator + fileName;
|
||||
// File savefile = new File(savePath);
|
||||
// FileCopyUtils.copy(mf.getBytes(), savefile);
|
||||
|
||||
//截图
|
||||
String outImagePath = file.getPath() + File.separator + fileName;
|
||||
FileUtil.touch(outImagePath);
|
||||
|
@ -172,6 +181,7 @@ public class KcDetectionDetailedServiceImpl extends ServiceImpl<KcDetectionDetai
|
|||
boolean isSuccess = _FFmpegTools.videoScreenshot(x.getPullUrl(), outImagePath);
|
||||
|
||||
if(isSuccess){
|
||||
|
||||
//转存文件到ftp
|
||||
//miniOutImagePath
|
||||
if(StringUtils.equals(CommonConstant.UPLOAD_TYPE_SFTP, global.uploadType)){
|
||||
|
@ -179,11 +189,17 @@ public class KcDetectionDetailedServiceImpl extends ServiceImpl<KcDetectionDetai
|
|||
int index = miniOutImagePath.lastIndexOf("/");
|
||||
String outImagePathDir = miniOutImagePath.substring(0,index);
|
||||
String outImagePathName = miniOutImagePath.substring(index+1);
|
||||
Map<String, String> res = SFTPUtil.upload(sftpConfig, false, outImagePathDir, outImagePath, outImagePathName );
|
||||
if(!StringUtils.equals(res.get("code"),"0")){
|
||||
log.error("上传文件出现错误:{}", res.get("msg"));
|
||||
|
||||
}
|
||||
String finalFileName = fileName;
|
||||
calls.add(() -> {
|
||||
FileUtil.copy(outImagePath,fileBak.getPath() + File.separator + finalFileName, true);
|
||||
log.info("sftpConfig: {}, outImagePathDir:{}, outImagePath:{}, outImagePathName:{}",sftpConfig, outImagePathDir, outImagePath, outImagePathName);
|
||||
Map<String, String> res = SFTPUtil.upload(sftpConfig, false, outImagePathDir, outImagePath, outImagePathName );
|
||||
log.info("res: {}",res);
|
||||
if(!StringUtils.equals(res.get("code"),"0")){
|
||||
log.error("上传文件出现错误:{}", res.get("msg"));
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -254,6 +270,15 @@ public class KcDetectionDetailedServiceImpl extends ServiceImpl<KcDetectionDetai
|
|||
save(detectionDetailed);
|
||||
|
||||
});
|
||||
|
||||
calls.forEach(threadService::submit);
|
||||
calls.forEach(fn -> {
|
||||
try {
|
||||
threadService.take();
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.jeecg.modules.kc.config.service.IKcExportConfigTpkwcqkjzglxService;
|
|||
import org.jeecg.modules.kc.kcSysConfig.entity.KcSysConfig;
|
||||
import org.jeecg.modules.kc.kcSysConfig.service.IKcSysConfigService;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.StudentCyglSys;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.StudentWjglSys;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmlbPage;
|
||||
import org.jeecg.modules.kc.wjxDjxx.service.IWjxDjxxService;
|
||||
|
@ -189,4 +190,104 @@ public class WjxDjxxController extends JeecgController<WjxDjxx, IWjxDjxxService>
|
|||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="教学大纲-分页列表查询", notes="教学大纲-分页列表查询")
|
||||
@GetMapping(value = "/sysWjglList")
|
||||
public Result<IPage<StudentWjglSys>> sysList(StudentWjglSys studentWjglSys,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
QueryWrapper<StudentWjglSys> queryWrapper = new QueryWrapper<StudentWjglSys>();
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapperCon = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
queryWrapperCon.eq("gh",sysUser.getUsername());
|
||||
queryWrapperCon.orderByDesc("create_time");
|
||||
queryWrapperCon.last("limit 1");
|
||||
KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx = kcExportConfigTpkwcqkjzglxService.getOne(queryWrapperCon);
|
||||
queryWrapper.eq("kkdw",kcExportConfigTpkwcqkjzglx.getDwmc());
|
||||
}
|
||||
|
||||
if(com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(studentWjglSys.getXqxn())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
||||
}else{
|
||||
queryWrapper.eq("xqxn",studentWjglSys.getXqxn());
|
||||
}
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentWjglSys.getKkdw()),"kkdw",studentWjglSys.getKkdw());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentWjglSys.getKcmc()),"kcmc",studentWjglSys.getKcmc());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentWjglSys.getKcbh()),"kcbh",studentWjglSys.getKcbh());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentWjglSys.getSkjs()),"skjs",studentWjglSys.getSkjs());
|
||||
|
||||
|
||||
Page<StudentWjglSys> page = new Page<StudentWjglSys>(pageNo, pageSize);
|
||||
IPage<StudentWjglSys> pageList = wjxDjxxService.sysWjglList(page, queryWrapper,studentWjglSys);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/exportWjglSysXls")
|
||||
public ModelAndView exportWjglSysXls(HttpServletRequest request, StudentWjglSys studentWjglSys) {
|
||||
String title = "学生作业管理";
|
||||
// Step.1 组装查询条件
|
||||
QueryWrapper<StudentWjglSys> queryWrapper = new QueryWrapper<>();
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapperCon = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
queryWrapperCon.eq("gh",sysUser.getUsername());
|
||||
queryWrapperCon.orderByDesc("create_time");
|
||||
queryWrapperCon.last("limit 1");
|
||||
KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx = kcExportConfigTpkwcqkjzglxService.getOne(queryWrapperCon);
|
||||
queryWrapper.eq("kkdw",kcExportConfigTpkwcqkjzglx.getDwmc());
|
||||
}
|
||||
|
||||
if(com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(studentWjglSys.getXqxn())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
||||
}else{
|
||||
queryWrapper.eq("xqxn",studentWjglSys.getXqxn());
|
||||
}
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentWjglSys.getKkdw()),"kkdw",studentWjglSys.getKkdw());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentWjglSys.getKcmc()),"kcmc",studentWjglSys.getKcmc());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentWjglSys.getKcbh()),"kcbh",studentWjglSys.getKcbh());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentWjglSys.getSkjs()),"skjs",studentWjglSys.getSkjs());
|
||||
|
||||
// Step.2 获取导出数据
|
||||
List<StudentWjglSys> exportList = service.exportWjglSysXls(queryWrapper,studentWjglSys);
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, title);
|
||||
mv.addObject(NormalExcelConstants.CLASS, StudentWjglSys.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title);
|
||||
exportParams.setImageBasePath(upLoadPath);
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,5 +48,6 @@ public class StudentCyglSys implements Serializable {
|
|||
private String pdfPath;
|
||||
|
||||
private String jgh;
|
||||
private String atype;
|
||||
private String ywId;
|
||||
}
|
||||
|
|
|
@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.StudentCyglSys;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxDj;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -44,4 +41,8 @@ public interface WjxDjxxMapper extends BaseMapper<WjxDjxx> {
|
|||
IPage<StudentCyglSys> sysList(Page<StudentCyglSys> page,@Param(Constants.WRAPPER) QueryWrapper<StudentCyglSys> queryWrapper, StudentCyglSys studentCyglSys);
|
||||
|
||||
List<StudentCyglSys> exportSysXls(@Param(Constants.WRAPPER) QueryWrapper<StudentCyglSys> queryWrapper, StudentCyglSys studentCyglSys);
|
||||
|
||||
List<StudentWjglSys> exportWjglSysXls(@Param(Constants.WRAPPER)QueryWrapper<StudentWjglSys> queryWrapper, StudentWjglSys studentWjglSys);
|
||||
|
||||
IPage<StudentWjglSys> sysWjglList(Page<StudentWjglSys> page,@Param(Constants.WRAPPER) QueryWrapper<StudentWjglSys> queryWrapper, StudentWjglSys studentWjglSys);
|
||||
}
|
||||
|
|
|
@ -232,7 +232,7 @@
|
|||
|
||||
|
||||
<select id="sysList" resultType="org.jeecg.modules.kc.wjxDjxx.entity.StudentCyglSys">
|
||||
select distinct a.id,b.xqxn,t.kcmc,t.skjs,b.title,b.create_by as stuNo,c.xm as stuName,'已提交' as status , a.score,b.create_time
|
||||
select distinct a.id,b.xqxn,t.kcmc,t.skjs,b.title,a.create_by as stuNo,c.xm as stuName,'已提交' as status , a.score,b.create_time
|
||||
from wjx_djxx a
|
||||
inner join wjx_wjxx b on a.vid = b.vid
|
||||
inner JOIN (
|
||||
|
@ -245,16 +245,19 @@
|
|||
inner JOIN xxhbbks c on a.create_by = c.xh
|
||||
<where>
|
||||
<if test="studentCyglSys.stuNo!=null and studentCyglSys.stuNo != ''">
|
||||
and b.create_by like concat('%',#{studentCyglSys.stuNo},'%')
|
||||
and a.create_by like concat('%',#{studentCyglSys.stuNo},'%')
|
||||
</if>
|
||||
<if test="studentCyglSys.stuName!=null and studentCyglSys.stuName != ''">
|
||||
and c.xm like concat('%',#{studentCyglSys.stuName},'%')
|
||||
</if>
|
||||
<if test="studentCyglSys.atype!=null and studentCyglSys.atype != ''">
|
||||
and b.atype like concat('%',#{studentCyglSys.atype},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="exportSysXls" resultType="org.jeecg.modules.kc.wjxDjxx.entity.StudentCyglSys">
|
||||
select distinct a.id,b.xqxn,t.kcmc,t.skjs,b.title,b.create_by as stuNo,c.xm as stuName,'已提交' as status , a.score,b.create_time
|
||||
select distinct a.id,b.xqxn,t.kcmc,t.skjs,b.title,a.create_by as stuNo,c.xm as stuName,'已提交' as status , a.score,b.create_time
|
||||
from wjx_djxx a
|
||||
inner join wjx_wjxx b on a.vid = b.vid
|
||||
inner JOIN (
|
||||
|
@ -267,11 +270,66 @@
|
|||
inner JOIN xxhbbks c on a.create_by = c.xh
|
||||
<where>
|
||||
<if test="studentCyglSys.stuNo!=null and studentCyglSys.stuNo != ''">
|
||||
and b.create_by like concat('%',#{studentCyglSys.stuNo},'%')
|
||||
and a.create_by like concat('%',#{studentCyglSys.stuNo},'%')
|
||||
</if>
|
||||
<if test="studentCyglSys.stuName!=null and studentCyglSys.stuName != ''">
|
||||
and c.xm like concat('%',#{studentCyglSys.stuName},'%')
|
||||
</if>
|
||||
<if test="studentCyglSys.atype!=null and studentCyglSys.atype != ''">
|
||||
and b.atype like concat('%',#{studentCyglSys.atype},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="sysWjglList" resultType="org.jeecg.modules.kc.wjxDjxx.entity.StudentWjglSys">
|
||||
select distinct a.id,b.xqxn,t.kcmc,t.skjs,b.title,a.create_by as stuNo,c.xm as stuName,'已提交' as status , a.score,b.create_time
|
||||
from wjx_djxx a
|
||||
inner join wjx_wjxx b on a.vid = b.vid
|
||||
inner JOIN (
|
||||
SELECT DISTINCT
|
||||
kcbh,kcmc,kkdw,kcxz,szkc,xqxn, rwbh, skdd, xkrs, jgh,concat(WEEK,REPLACE ( hh, '、', '' )) AS sksj,skjs
|
||||
FROM
|
||||
kc_kechengbiao
|
||||
${ew.customSqlSegment}
|
||||
) t on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xqxn
|
||||
inner JOIN xxhbbks c on a.create_by = c.xh
|
||||
<where>
|
||||
<if test="studentWjglSys.stuNo!=null and studentWjglSys.stuNo != ''">
|
||||
and a.create_by like concat('%',#{studentWjglSys.stuNo},'%')
|
||||
</if>
|
||||
<if test="studentWjglSys.stuName!=null and studentWjglSys.stuName != ''">
|
||||
and c.xm like concat('%',#{studentWjglSys.stuName},'%')
|
||||
</if>
|
||||
<if test="studentWjglSys.atype!=null and studentWjglSys.atype != ''">
|
||||
and b.atype like concat('%',#{studentWjglSys.atype},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="exportWjglSysXls" resultType="org.jeecg.modules.kc.wjxDjxx.entity.StudentWjglSys">
|
||||
select distinct a.id,b.xqxn,t.kcmc,t.skjs,b.title,a.create_by as stuNo,c.xm as stuName,'已提交' as status , a.score,b.create_time
|
||||
from wjx_djxx a
|
||||
inner join wjx_wjxx b on a.vid = b.vid
|
||||
inner JOIN (
|
||||
SELECT DISTINCT
|
||||
kcbh,kcmc,kkdw,kcxz,szkc,xqxn, rwbh, skdd, xkrs, jgh,concat(WEEK,REPLACE ( hh, '、', '' )) AS sksj,skjs
|
||||
FROM
|
||||
kc_kechengbiao
|
||||
${ew.customSqlSegment}
|
||||
) t on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xqxn
|
||||
inner JOIN xxhbbks c on a.create_by = c.xh
|
||||
<where>
|
||||
<if test="studentWjglSys.stuNo!=null and studentWjglSys.stuNo != ''">
|
||||
and a.create_by like concat('%',#{studentWjglSys.stuNo},'%')
|
||||
</if>
|
||||
<if test="studentWjglSys.stuName!=null and studentWjglSys.stuName != ''">
|
||||
and c.xm like concat('%',#{studentWjglSys.stuName},'%')
|
||||
</if>
|
||||
<if test="studentWjglSys.atype!=null and studentWjglSys.atype != ''">
|
||||
and b.atype like concat('%',#{studentWjglSys.atype},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
|
@ -3,10 +3,7 @@ package org.jeecg.modules.kc.wjxDjxx.service;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.StudentCyglSys;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxDj;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmlbPage;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.*;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -30,4 +27,8 @@ public interface IWjxDjxxService extends IService<WjxDjxx> {
|
|||
IPage<StudentCyglSys> sysList(Page<StudentCyglSys> page, QueryWrapper<StudentCyglSys> queryWrapper, StudentCyglSys studentCyglSys);
|
||||
|
||||
List<StudentCyglSys> exportSysXls(QueryWrapper<StudentCyglSys> queryWrapper, StudentCyglSys studentCyglSys);
|
||||
|
||||
List<StudentWjglSys> exportWjglSysXls(QueryWrapper<StudentWjglSys> queryWrapper, StudentWjglSys studentWjglSys);
|
||||
|
||||
IPage<StudentWjglSys> sysWjglList(Page<StudentWjglSys> page, QueryWrapper<StudentWjglSys> queryWrapper, StudentWjglSys studentWjglSys);
|
||||
}
|
||||
|
|
|
@ -462,4 +462,14 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
|||
return baseMapper.exportSysXls(queryWrapper, studentCyglSys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StudentWjglSys> exportWjglSysXls(QueryWrapper<StudentWjglSys> queryWrapper, StudentWjglSys studentWjglSys) {
|
||||
return baseMapper.exportWjglSysXls(queryWrapper, studentWjglSys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<StudentWjglSys> sysWjglList(Page<StudentWjglSys> page, QueryWrapper<StudentWjglSys> queryWrapper, StudentWjglSys studentWjglSys) {
|
||||
return baseMapper.sysWjglList(page, queryWrapper, studentWjglSys);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public class KccyglSys implements Serializable {
|
|||
private String skdd;
|
||||
@Excel(name = "选课学生", width = 15)
|
||||
private String xkrs;
|
||||
@Excel(name = "测验数量", width = 15)
|
||||
@Excel(name = "数量", width = 15)
|
||||
private String num;
|
||||
|
||||
private String jgh;
|
||||
|
|
|
@ -322,21 +322,31 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
|||
JSONObject jsonResult = JSONObject.parseObject(result);
|
||||
System.out.println("1----------->"+jsonResult.toString());
|
||||
if(StringUtils.equals("true",jsonResult.getString("result"))){
|
||||
try {
|
||||
Thread.sleep(2000L);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
for(int i=0;i<10;i++){
|
||||
try {
|
||||
Thread.sleep(1000L);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
JSONObject data = jsonResult.getJSONObject("data");
|
||||
String taskid = data.getString("taskid");
|
||||
Map<String,Object> map2 = new HashMap<>();
|
||||
map2.put("vid",Integer.valueOf(vid));
|
||||
map2.put("suffix",2);
|
||||
map2.put("taskid",taskid);
|
||||
String result2 = wjxUtil.openapi(map2,"1001004");
|
||||
System.out.println("result2----------->"+result2);
|
||||
JSONObject jsonResult2 = JSONObject.parseObject(result2);
|
||||
String result3 = jsonResult2.getString("data");
|
||||
System.out.println("result3----------->"+result3);
|
||||
JSONObject jsonResult3 = JSONObject.parseObject(result3);
|
||||
System.out.println("jsonResult3----------->"+jsonResult3);
|
||||
if(StringUtils.isNotEmpty(jsonResult3.getString("download_url"))){
|
||||
jsonResult = jsonResult2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
JSONObject data = jsonResult.getJSONObject("data");
|
||||
String taskid = data.getString("taskid");
|
||||
Map<String,Object> map2 = new HashMap<>();
|
||||
map2.put("vid",Integer.valueOf(vid));
|
||||
map2.put("suffix",2);
|
||||
map2.put("taskid",taskid);
|
||||
// map.put("suffix",2);
|
||||
String result2 = wjxUtil.openapi(map2,"1001004");
|
||||
JSONObject jsonResult2 = JSONObject.parseObject(result2);
|
||||
System.out.println("2----------->"+jsonResult2.toString());
|
||||
|
||||
}
|
||||
return jsonResult;
|
||||
}
|
||||
|
|
|
@ -370,6 +370,7 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
|||
zyInfoStudent.setPdfPath(pdfName);
|
||||
}
|
||||
}
|
||||
zyInfoStudent.setPublishTime(new Date());
|
||||
boolean bol = zyInfoStudentService.updateById(zyInfoStudent, response);
|
||||
if(bol == false){
|
||||
return Result.error("文件存储失败,请重新上传作业!");
|
||||
|
@ -452,6 +453,12 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
|||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
|
||||
|
||||
//查询作业查重结果
|
||||
zyCcjgService.getCcjg();
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
|
|
|
@ -55,6 +55,12 @@ public class ZyInfoStudent implements Serializable {
|
|||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private java.util.Date createTime;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@Excel(name = "发布时间", width = 15)
|
||||
private java.util.Date publishTime;
|
||||
|
||||
@Excel(name = "评分", width = 15)
|
||||
private java.lang.String score;
|
||||
/**外网相似律*/
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
package org.jeecg.modules.kc.zyInfoStudent.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
@ -35,7 +37,10 @@ public class ZyInfoStudentSys implements Serializable {
|
|||
private String stuNo;
|
||||
@Excel(name = "作业状态", width = 15)
|
||||
private String status;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@Excel(name = "发布时间", width = 15)
|
||||
private java.util.Date publishTime;
|
||||
|
||||
@Excel(name = "网络相似率", width = 15)
|
||||
private String wwxsl;
|
||||
|
@ -64,4 +69,10 @@ public class ZyInfoStudentSys implements Serializable {
|
|||
|
||||
private String jgh;
|
||||
private String ywId;
|
||||
|
||||
private String wwcc;
|
||||
private String nwcc;
|
||||
private String aigccc;
|
||||
private String xncc;
|
||||
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
|
||||
|
||||
<select id="sysList" resultType="org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys">
|
||||
select distinct a.id,b.xnxq,t.kcmc,t.skjs,b.title,b.create_by as stuNo,c.xm as stuName,if(score != null,'已评分',if(a.file_path != null ,'已提交','未提交')) as status ,
|
||||
wwxsl,nwxsl,aigcxsl,wwsftg,nwsftg,aigcsftg,xnxsl,xnsftg,a.file_path,a.pdf_path
|
||||
select distinct a.id,b.xnxq,t.kcmc,t.skjs,b.title,a.create_by as stuNo,c.xm as stuName,if(score is not null,'已评分',if(a.file_path is not null ,'已提交','未提交')) as status ,a.publish_time,a.score,
|
||||
wwxsl,nwxsl,aigcxsl,wwsftg,nwsftg,aigcsftg,xnxsl,xnsftg,a.file_path,a.pdf_path,b.wwcc,b.nwcc,b.aigccc,b.xncc
|
||||
from zy_info_student a
|
||||
inner join zy_info b on a.main_id = b.id
|
||||
inner JOIN (
|
||||
|
@ -44,14 +44,14 @@
|
|||
inner JOIN xxhbbks c on a.create_by = c.xh
|
||||
<where>
|
||||
<if test="zyInfoStudentSys.stuNo!=null and zyInfoStudentSys.stuNo != ''">
|
||||
and b.create_by like concat('%',#{zyInfoStudentSys.stuNo},'%')
|
||||
and a.create_by like concat('%',#{zyInfoStudentSys.stuNo},'%')
|
||||
</if>
|
||||
<if test="zyInfoStudentSys.stuName!=null and zyInfoStudentSys.stuName != ''">
|
||||
and c.xm like concat('%',#{zyInfoStudentSys.stuName},'%')
|
||||
</if>
|
||||
<if test="zyInfoStudentSys.status != null and zyInfoStudentSys.status != '' ">
|
||||
<if test='zyInfoStudentSys.status == "已评分"'>
|
||||
and a.score != null
|
||||
and a.score is not null and a.file_path != ''
|
||||
</if>
|
||||
<if test='zyInfoStudentSys.status == "已提交"'>
|
||||
and a.file_path is not null and a.file_path != ''
|
||||
|
@ -76,8 +76,8 @@
|
|||
</select>
|
||||
|
||||
<select id="exportSysXls" resultType="org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys">
|
||||
select distinct a.id,b.xnxq,t.kcmc,t.skjs,b.title,b.create_by as stuNo,c.xm as stuName,if(score != null,'已评分',if(a.file_path != null ,'已提交','未提交')) as status ,
|
||||
wwxsl,nwxsl,aigcxsl,wwsftg,nwsftg,aigcsftg,xnxsl,xnsftg
|
||||
select distinct a.id,b.xnxq,t.kcmc,t.skjs,b.title,a.create_by as stuNo,c.xm as stuName,if(score is not null,'已评分',if(a.file_path is not null ,'已提交','未提交')) as status,a.publish_time,a.score,
|
||||
wwxsl,nwxsl,aigcxsl,wwsftg,nwsftg,aigcsftg,xnxsl,xnsftg,b.wwcc,b.nwcc,b.aigccc,b.xncc
|
||||
from zy_info_student a
|
||||
inner join zy_info b on a.main_id = b.id
|
||||
inner JOIN (
|
||||
|
@ -90,14 +90,14 @@
|
|||
inner JOIN xxhbbks c on a.create_by = c.xh
|
||||
<where>
|
||||
<if test="zyInfoStudentSys.stuNo!=null and zyInfoStudentSys.stuNo != ''">
|
||||
and b.create_by like concat('%',#{zyInfoStudentSys.stuNo},'%')
|
||||
and a.create_by like concat('%',#{zyInfoStudentSys.stuNo},'%')
|
||||
</if>
|
||||
<if test="zyInfoStudentSys.stuName!=null and zyInfoStudentSys.stuName != ''">
|
||||
and c.xm like concat('%',#{zyInfoStudentSys.stuName},'%')
|
||||
</if>
|
||||
<if test="zyInfoStudentSys.status != null and zyInfoStudentSys.status != '' ">
|
||||
<if test='zyInfoStudentSys.status == "已评分"'>
|
||||
and a.score != null
|
||||
and a.score is not null and a.file_path != ''
|
||||
</if>
|
||||
<if test='zyInfoStudentSys.status == "已提交"'>
|
||||
and a.file_path != null
|
||||
|
|
|
@ -93,26 +93,26 @@ public class LoginController {
|
|||
//update-begin--Author:scott Date:20190805 for:暂时注释掉密码加密逻辑,有点问题
|
||||
|
||||
//update-begin-author:taoyan date:20190828 for:校验验证码
|
||||
String captcha = sysLoginModel.getCaptcha();
|
||||
if(captcha==null){
|
||||
result.error500("验证码无效");
|
||||
return result;
|
||||
}
|
||||
String lowerCaseCaptcha = captcha.toLowerCase();
|
||||
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||
// 加入密钥作为混淆,避免简单的拼接,被外部利用,用户自定义该密钥即可
|
||||
String origin = lowerCaseCaptcha+sysLoginModel.getCheckKey()+jeecgBaseConfig.getSignatureSecret();
|
||||
String realKey = Md5Util.md5Encode(origin, "utf-8");
|
||||
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||
Object checkCode = redisUtil.get(realKey);
|
||||
//当进入登录页时,有一定几率出现验证码错误 #1714
|
||||
if(checkCode==null || !checkCode.toString().equals(lowerCaseCaptcha)) {
|
||||
log.warn("验证码错误,key= {} , Ui checkCode= {}, Redis checkCode = {}", sysLoginModel.getCheckKey(), lowerCaseCaptcha, checkCode);
|
||||
result.error500("验证码错误");
|
||||
// 改成特殊的code 便于前端判断
|
||||
result.setCode(HttpStatus.PRECONDITION_FAILED.value());
|
||||
return result;
|
||||
}
|
||||
// String captcha = sysLoginModel.getCaptcha();
|
||||
// if(captcha==null){
|
||||
// result.error500("验证码无效");
|
||||
// return result;
|
||||
// }
|
||||
// String lowerCaseCaptcha = captcha.toLowerCase();
|
||||
// //update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||
// // 加入密钥作为混淆,避免简单的拼接,被外部利用,用户自定义该密钥即可
|
||||
// String origin = lowerCaseCaptcha+sysLoginModel.getCheckKey()+jeecgBaseConfig.getSignatureSecret();
|
||||
// String realKey = Md5Util.md5Encode(origin, "utf-8");
|
||||
// //update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||
// Object checkCode = redisUtil.get(realKey);
|
||||
// //当进入登录页时,有一定几率出现验证码错误 #1714
|
||||
// if(checkCode==null || !checkCode.toString().equals(lowerCaseCaptcha)) {
|
||||
// log.warn("验证码错误,key= {} , Ui checkCode= {}, Redis checkCode = {}", sysLoginModel.getCheckKey(), lowerCaseCaptcha, checkCode);
|
||||
// result.error500("验证码错误");
|
||||
// // 改成特殊的code 便于前端判断
|
||||
// result.setCode(HttpStatus.PRECONDITION_FAILED.value());
|
||||
// return result;
|
||||
// }
|
||||
//update-end-author:taoyan date:20190828 for:校验验证码
|
||||
|
||||
//1. 校验用户是否有效
|
||||
|
@ -140,7 +140,7 @@ public class LoginController {
|
|||
//用户登录信息
|
||||
userInfo(sysUser, result);
|
||||
//update-begin--Author:liusq Date:20210126 for:登录成功,删除redis中的验证码
|
||||
redisUtil.del(realKey);
|
||||
// redisUtil.del(realKey);
|
||||
//update-begin--Author:liusq Date:20210126 for:登录成功,删除redis中的验证码
|
||||
redisUtil.del(CommonConstant.LOGIN_FAIL + username);
|
||||
LoginUser loginUser = new LoginUser();
|
||||
|
|
|
@ -134,6 +134,7 @@ spring:
|
|||
datasource:
|
||||
master:
|
||||
url: jdbc:mysql://127.0.0.1:3306/course_information_center_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
# url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: root
|
||||
# password: ABCabc@123
|
||||
|
@ -311,7 +312,7 @@ ffmpeg:
|
|||
# 是否开启压缩【true:开启压缩 | false:关闭压缩 】
|
||||
enable: false
|
||||
# 日志等级,【 quiet | panic | fatal | error | warning | info | verbose | debug | trace】默认值为info
|
||||
loglevel: error
|
||||
loglevel: debug
|
||||
# 压缩比,正整数,数越大压缩比越高
|
||||
compressionRatio: 50
|
||||
# 是否覆盖输出文件【 y:覆盖 | n:不覆盖 】
|
||||
|
|
Loading…
Reference in New Issue