修改0711问题

This commit is contained in:
yangjun 2024-07-11 22:11:18 +08:00
parent 1895c8ba3a
commit f36b70b8b9
5 changed files with 78 additions and 17 deletions

View File

@ -1,6 +1,8 @@
package org.jeecg.modules.kc.teachingunitcontent.controller;
import java.io.File;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@ -9,8 +11,12 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
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.system.query.QueryGenerator;
import org.jeecg.common.util.DateUtils;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.kc.teachingunitcontent.entity.KcTeachingUnitContentOne;
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 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.def.NormalExcelConstants;
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.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@ -52,7 +64,16 @@ public class KcTeachingUnitContentThreeController extends JeecgController<KcTeac
@Autowired
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;
/**
* 分页列表查询
*
* @param kcTeachingUnitContentThree
@ -86,6 +107,19 @@ public class KcTeachingUnitContentThreeController extends JeecgController<KcTeac
@PostMapping(value = "/add")
public Result<?> add(@RequestBody KcTeachingUnitContentThree 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("添加成功!");
r.setResult(kcTeachingUnitContentThree);
return r;

View File

@ -167,9 +167,9 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
baseMapper.updateById(zyCcjg);
//----------计算通过率--------------
String stuId = zyCcjg.getZyStuId();
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
if(StringUtils.equals("2",object2.getString("filestateid"))){
String stuId = zyCcjg.getZyStuId();
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
Double tgl = 0.0;
if(zyInfo.getAigctgl()>0){
@ -186,6 +186,10 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
}
zyInfoStudent.setAigcxsl(cctgl+"");
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);
//----------计算通过率--------------
String stuId = zyCcjg.getZyStuId();
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
if(StringUtils.equals("2",object2.getString("filestateid"))) {
String stuId = zyCcjg.getZyStuId();
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
Double tgl = 0.0;
if (zyInfo.getWwtgl() > 0) {
@ -281,6 +285,10 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
}
zyInfoStudent.setWwxsl(cctgl + "");
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);
//----------计算通过率--------------
String stuId = zyCcjg.getZyStuId();
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
if(StringUtils.equals("2",object2.getString("filestateid"))) {
String stuId = zyCcjg.getZyStuId();
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
Double tgl = 0.0;
if (zyInfo.getNwtgl() > 0) {
@ -376,6 +384,10 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
}
zyInfoStudent.setNwxsl(cctgl + "");
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);
//----------计算通过率--------------
String stuId = zyCcjg.getZyStuId();
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
if(StringUtils.equals("2",object2.getString("filestateid"))) {
String stuId = zyCcjg.getZyStuId();
ZyInfoStudent zyInfoStudent = zyInfoStudentService.selectById(stuId);
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
Double tgl = 0.0;
if (zyInfo.getNwtgl() > 0) {
@ -471,6 +483,10 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
}
zyInfoStudent.setXnxsl(cctgl + "");
zyInfoStudentService.updateById(zyInfoStudent);
}else if(StringUtils.equals("3",object2.getString("filestateid"))){
zyInfoStudent.setWwsftg("失败:"+object.getString("message"));
}else{
zyInfoStudent.setWwsftg("检测中");
}
//----------计算通过率--------------

View File

@ -151,13 +151,25 @@ public class ZyInfo implements Serializable {
@TableField(exist = false)
private String aigcxsl;
@TableField(exist = false)
private String xnxsl;
@TableField(exist = false)
private String teano;
@TableField(exist = false)
private String kcmc;
@TableField(exist = false)
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;
}

View File

@ -3,16 +3,15 @@
<mapper namespace="org.jeecg.modules.kc.zyInfo.mapper.ZyInfoMapper">
<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
${ew.customSqlSegment}
</select>
<select id="selectPage" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
SELECT
id, create_by, create_time, update_by, update_time, title, zy_type,
content, start_time, end_time, zy_status, xnxq,
wwcc, wwtgl, nwcc, nwtgl, aigccc, aigctgl,xncc, xntgl, rwbh, file_path, xkxs,
a.*,
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
zy_info a

View File

@ -121,8 +121,8 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
//查询作业查重结果
zyCcjgService.getCcjg();
// //查询作业查重结果
// zyCcjgService.getCcjg();
QueryWrapper<ZyInfoStudent> queryWrapper = QueryGenerator.initQueryWrapper("a",zyInfoStudent, req.getParameterMap());
Page<ZyInfoStudent> page = new Page<ZyInfoStudent>(pageNo, pageSize);
@ -224,7 +224,7 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
zyInfoService.update(zyInfo);
}
return Result.OK("编辑成功!");
return Result.OK("操作成功!");
}
/**
* 通过id删除