修改0711问题
This commit is contained in:
parent
1895c8ba3a
commit
f36b70b8b9
|
@ -1,6 +1,8 @@
|
||||||
package org.jeecg.modules.kc.teachingunitcontent.controller;
|
package org.jeecg.modules.kc.teachingunitcontent.controller;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -9,8 +11,12 @@ import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import cn.hutool.core.io.FileUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.DateUtils;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
import org.jeecg.modules.kc.teachingunitcontent.entity.KcTeachingUnitContentOne;
|
import org.jeecg.modules.kc.teachingunitcontent.entity.KcTeachingUnitContentOne;
|
||||||
import org.jeecg.modules.kc.teachingunitcontent.entity.KcTeachingUnitContentThree;
|
import org.jeecg.modules.kc.teachingunitcontent.entity.KcTeachingUnitContentThree;
|
||||||
|
@ -21,6 +27,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecg.modules.tools.Global;
|
||||||
|
import org.jeecg.modules.tools.pdf.PDFUtil;
|
||||||
|
import org.jeecg.modules.zyk.entity.ZykInfo;
|
||||||
|
import org.jeecg.modules.zyk.service.IZykService;
|
||||||
|
import org.jeecg.modules.zyk.utils.WjlxEnum;
|
||||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
@ -28,6 +39,7 @@ import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
@ -52,6 +64,15 @@ public class KcTeachingUnitContentThreeController extends JeecgController<KcTeac
|
||||||
@Autowired
|
@Autowired
|
||||||
private IKcTeachingUnitContentThreeService kcTeachingUnitContentThreeService;
|
private IKcTeachingUnitContentThreeService kcTeachingUnitContentThreeService;
|
||||||
|
|
||||||
|
@Value("${jeecg.path.upload}")
|
||||||
|
private String upLoadPath;
|
||||||
|
@Autowired
|
||||||
|
private IZykService zykService;
|
||||||
|
@Autowired
|
||||||
|
private Global global;
|
||||||
|
@Value(value="${jeecg.uploadType}")
|
||||||
|
private String uploadType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
*
|
*
|
||||||
|
@ -86,6 +107,19 @@ public class KcTeachingUnitContentThreeController extends JeecgController<KcTeac
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<?> add(@RequestBody KcTeachingUnitContentThree kcTeachingUnitContentThree) {
|
public Result<?> add(@RequestBody KcTeachingUnitContentThree kcTeachingUnitContentThree) {
|
||||||
kcTeachingUnitContentThreeService.save(kcTeachingUnitContentThree);
|
kcTeachingUnitContentThreeService.save(kcTeachingUnitContentThree);
|
||||||
|
|
||||||
|
if(StringUtils.equals("sftp",uploadType)){
|
||||||
|
ZykInfo zykInfo = new ZykInfo();
|
||||||
|
zykInfo.setBizId(kcTeachingUnitContentThree.getId());
|
||||||
|
zykInfo.setBizTable("kc_teaching_unit_content_three");
|
||||||
|
zykInfo.setWjlx(WjlxEnum.JXDY.getType());
|
||||||
|
zykInfo.setRwbh(kcTeachingUnitContentThree.getRwbh());
|
||||||
|
zykInfo.setFileName(kcTeachingUnitContentThree.getFilePath());
|
||||||
|
Map<String,String> map = zykService.saveToZykJxdg(zykInfo);
|
||||||
|
zykService.disConnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Result<KcTeachingUnitContentThree> r = Result.OK("添加成功!");
|
Result<KcTeachingUnitContentThree> r = Result.OK("添加成功!");
|
||||||
r.setResult(kcTeachingUnitContentThree);
|
r.setResult(kcTeachingUnitContentThree);
|
||||||
return r;
|
return r;
|
||||||
|
|
|
@ -167,9 +167,9 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
||||||
baseMapper.updateById(zyCcjg);
|
baseMapper.updateById(zyCcjg);
|
||||||
|
|
||||||
//----------计算通过率--------------
|
//----------计算通过率--------------
|
||||||
if(StringUtils.equals("2",object2.getString("filestateid"))){
|
|
||||||
String stuId = zyCcjg.getZyStuId();
|
String stuId = zyCcjg.getZyStuId();
|
||||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
|
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
|
||||||
|
if(StringUtils.equals("2",object2.getString("filestateid"))){
|
||||||
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
|
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
|
||||||
Double tgl = 0.0;
|
Double tgl = 0.0;
|
||||||
if(zyInfo.getAigctgl()>0){
|
if(zyInfo.getAigctgl()>0){
|
||||||
|
@ -186,6 +186,10 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
||||||
}
|
}
|
||||||
zyInfoStudent.setAigcxsl(cctgl+"");
|
zyInfoStudent.setAigcxsl(cctgl+"");
|
||||||
zyInfoStudentService.updateById(zyInfoStudent);
|
zyInfoStudentService.updateById(zyInfoStudent);
|
||||||
|
}else if(StringUtils.equals("3",object2.getString("filestateid"))){
|
||||||
|
zyInfoStudent.setWwsftg("失败:"+object.getString("message"));
|
||||||
|
}else{
|
||||||
|
zyInfoStudent.setWwsftg("检测中");
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------计算通过率--------------
|
//----------计算通过率--------------
|
||||||
|
@ -262,9 +266,9 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
||||||
baseMapper.updateById(zyCcjg);
|
baseMapper.updateById(zyCcjg);
|
||||||
|
|
||||||
//----------计算通过率--------------
|
//----------计算通过率--------------
|
||||||
if(StringUtils.equals("2",object2.getString("filestateid"))) {
|
|
||||||
String stuId = zyCcjg.getZyStuId();
|
String stuId = zyCcjg.getZyStuId();
|
||||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
|
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
|
||||||
|
if(StringUtils.equals("2",object2.getString("filestateid"))) {
|
||||||
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
|
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
|
||||||
Double tgl = 0.0;
|
Double tgl = 0.0;
|
||||||
if (zyInfo.getWwtgl() > 0) {
|
if (zyInfo.getWwtgl() > 0) {
|
||||||
|
@ -281,6 +285,10 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
||||||
}
|
}
|
||||||
zyInfoStudent.setWwxsl(cctgl + "");
|
zyInfoStudent.setWwxsl(cctgl + "");
|
||||||
zyInfoStudentService.updateById(zyInfoStudent);
|
zyInfoStudentService.updateById(zyInfoStudent);
|
||||||
|
}else if(StringUtils.equals("3",object2.getString("filestateid"))){
|
||||||
|
zyInfoStudent.setWwsftg("失败:"+object.getString("message"));
|
||||||
|
}else{
|
||||||
|
zyInfoStudent.setWwsftg("检测中");
|
||||||
}
|
}
|
||||||
//----------计算通过率--------------
|
//----------计算通过率--------------
|
||||||
|
|
||||||
|
@ -357,9 +365,9 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
||||||
|
|
||||||
baseMapper.updateById(zyCcjg);
|
baseMapper.updateById(zyCcjg);
|
||||||
//----------计算通过率--------------
|
//----------计算通过率--------------
|
||||||
if(StringUtils.equals("2",object2.getString("filestateid"))) {
|
|
||||||
String stuId = zyCcjg.getZyStuId();
|
String stuId = zyCcjg.getZyStuId();
|
||||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
|
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
|
||||||
|
if(StringUtils.equals("2",object2.getString("filestateid"))) {
|
||||||
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
|
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
|
||||||
Double tgl = 0.0;
|
Double tgl = 0.0;
|
||||||
if (zyInfo.getNwtgl() > 0) {
|
if (zyInfo.getNwtgl() > 0) {
|
||||||
|
@ -376,6 +384,10 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
||||||
}
|
}
|
||||||
zyInfoStudent.setNwxsl(cctgl + "");
|
zyInfoStudent.setNwxsl(cctgl + "");
|
||||||
zyInfoStudentService.updateById(zyInfoStudent);
|
zyInfoStudentService.updateById(zyInfoStudent);
|
||||||
|
}else if(StringUtils.equals("3",object2.getString("filestateid"))){
|
||||||
|
zyInfoStudent.setWwsftg("失败:"+object.getString("message"));
|
||||||
|
}else{
|
||||||
|
zyInfoStudent.setWwsftg("检测中");
|
||||||
}
|
}
|
||||||
//----------计算通过率--------------
|
//----------计算通过率--------------
|
||||||
|
|
||||||
|
@ -452,9 +464,9 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
||||||
|
|
||||||
baseMapper.updateById(zyCcjg);
|
baseMapper.updateById(zyCcjg);
|
||||||
//----------计算通过率--------------
|
//----------计算通过率--------------
|
||||||
if(StringUtils.equals("2",object2.getString("filestateid"))) {
|
|
||||||
String stuId = zyCcjg.getZyStuId();
|
String stuId = zyCcjg.getZyStuId();
|
||||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
|
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
|
||||||
|
if(StringUtils.equals("2",object2.getString("filestateid"))) {
|
||||||
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
|
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
|
||||||
Double tgl = 0.0;
|
Double tgl = 0.0;
|
||||||
if (zyInfo.getNwtgl() > 0) {
|
if (zyInfo.getNwtgl() > 0) {
|
||||||
|
@ -471,6 +483,10 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
||||||
}
|
}
|
||||||
zyInfoStudent.setXnxsl(cctgl + "");
|
zyInfoStudent.setXnxsl(cctgl + "");
|
||||||
zyInfoStudentService.updateById(zyInfoStudent);
|
zyInfoStudentService.updateById(zyInfoStudent);
|
||||||
|
}else if(StringUtils.equals("3",object2.getString("filestateid"))){
|
||||||
|
zyInfoStudent.setWwsftg("失败:"+object.getString("message"));
|
||||||
|
}else{
|
||||||
|
zyInfoStudent.setWwsftg("检测中");
|
||||||
}
|
}
|
||||||
//----------计算通过率--------------
|
//----------计算通过率--------------
|
||||||
|
|
||||||
|
|
|
@ -151,13 +151,25 @@ public class ZyInfo implements Serializable {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String aigcxsl;
|
private String aigcxsl;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
private String xnxsl;
|
||||||
|
@TableField(exist = false)
|
||||||
private String teano;
|
private String teano;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String kcmc;
|
private String kcmc;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String skjs;
|
private String skjs;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String stuscore;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String wwsftg;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String nwsftg;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String aigcsftg;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String xnsftg;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,16 +3,15 @@
|
||||||
<mapper namespace="org.jeecg.modules.kc.zyInfo.mapper.ZyInfoMapper">
|
<mapper namespace="org.jeecg.modules.kc.zyInfo.mapper.ZyInfoMapper">
|
||||||
|
|
||||||
<select id="stuList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
<select id="stuList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
||||||
select a.*,b.id as stuId ,b.file_path as stuFilePath,b.score,b.wwxsl,b.nwxsl,b.aigcxsl,b.pdf_path as stuPdfPath
|
select a.*,b.id as stuId ,b.file_path as stuFilePath,b.score as stuscore,b.wwxsl,b.nwxsl,b.aigcxsl,b.xnxsl,b.pdf_path as stuPdfPath,
|
||||||
|
b.wwsftg,b.nwsftg,b.aigcsftg,b.xnsftg
|
||||||
from zy_info a ,zy_info_student b
|
from zy_info a ,zy_info_student b
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="selectPage" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
<select id="selectPage" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
|
||||||
SELECT
|
SELECT
|
||||||
id, create_by, create_time, update_by, update_time, title, zy_type,
|
a.*,
|
||||||
content, start_time, end_time, zy_status, xnxq,
|
|
||||||
wwcc, wwtgl, nwcc, nwtgl, aigccc, aigctgl,xncc, xntgl, rwbh, file_path, xkxs,
|
|
||||||
ifnull(b.num,0) as wtjnum,ifnull(c.num,0) as ytjnum,ifnull(d.num,0) as wpynum,ifnull(e.num,0) as ypynum
|
ifnull(b.num,0) as wtjnum,ifnull(c.num,0) as ytjnum,ifnull(d.num,0) as wpynum,ifnull(e.num,0) as ypynum
|
||||||
FROM
|
FROM
|
||||||
zy_info a
|
zy_info a
|
||||||
|
|
|
@ -121,8 +121,8 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
|
|
||||||
//查询作业查重结果
|
// //查询作业查重结果
|
||||||
zyCcjgService.getCcjg();
|
// zyCcjgService.getCcjg();
|
||||||
|
|
||||||
QueryWrapper<ZyInfoStudent> queryWrapper = QueryGenerator.initQueryWrapper("a",zyInfoStudent, req.getParameterMap());
|
QueryWrapper<ZyInfoStudent> queryWrapper = QueryGenerator.initQueryWrapper("a",zyInfoStudent, req.getParameterMap());
|
||||||
Page<ZyInfoStudent> page = new Page<ZyInfoStudent>(pageNo, pageSize);
|
Page<ZyInfoStudent> page = new Page<ZyInfoStudent>(pageNo, pageSize);
|
||||||
|
@ -224,7 +224,7 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
||||||
zyInfoService.update(zyInfo);
|
zyInfoService.update(zyInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("操作成功!");
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 通过id删除
|
* 通过id删除
|
||||||
|
|
Loading…
Reference in New Issue