修改bug
This commit is contained in:
parent
f71fa463d8
commit
3f70c75353
|
@ -40,48 +40,61 @@ public class WjxDjxx {
|
|||
private Date updateTime;
|
||||
@ApiModelProperty(value = "vid")
|
||||
private String vid;
|
||||
@ApiModelProperty(value = "答卷人ID")
|
||||
private String userId;
|
||||
@ApiModelProperty(value = "答卷人姓名")
|
||||
private String userName;
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "打开时间")
|
||||
private Date openTime;
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "提交时间")
|
||||
private Date commitTime;
|
||||
@Excel(name = "提交内容", width = 15)
|
||||
@ApiModelProperty(value = "提交内容")
|
||||
private String submitData;
|
||||
@Excel(name = "答卷编号", width = 15)
|
||||
@ApiModelProperty(value = "答卷编号")
|
||||
private String jid;
|
||||
@Excel(name = "考试分数", width = 15)
|
||||
@ApiModelProperty(value = "考试分数")
|
||||
private double score;
|
||||
@Excel(name = "考卷总分", width = 15)
|
||||
@ApiModelProperty(value = "考卷总分")
|
||||
private double totalScore;
|
||||
@Excel(name = "问卷作答用时", width = 15)
|
||||
@ApiModelProperty(value = "问卷作答用时")
|
||||
private int answerSeconds;
|
||||
@Excel(name = "问卷类型", width = 15)
|
||||
@ApiModelProperty(value = "问卷类型")
|
||||
@TableField(exist = false)
|
||||
private String atype;
|
||||
@Excel(name = "问卷名称", width = 15)
|
||||
@ApiModelProperty(value = "问卷名称")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Excel(name = "名称", width = 15)
|
||||
@ApiModelProperty(value = "名称")
|
||||
@TableField(exist = false)
|
||||
private String title;
|
||||
@Excel(name = "问卷描述", width = 15)
|
||||
@ApiModelProperty(value = "问卷描述")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String content;
|
||||
@Excel(name = "学号", width = 15)
|
||||
@ApiModelProperty(value = "学号")
|
||||
private String userId;
|
||||
@Excel(name = "学生", width = 15)
|
||||
@ApiModelProperty(value = "学生")
|
||||
private String userName;
|
||||
@Excel(name = "得分", width = 15)
|
||||
@ApiModelProperty(value = "得分")
|
||||
private double score;
|
||||
@Excel(name = "总分", width = 15)
|
||||
@ApiModelProperty(value = "总分")
|
||||
private double totalScore;
|
||||
@Excel(name = "答卷时间", width = 15)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "答卷时间")
|
||||
private Date openTime;
|
||||
@Excel(name = "交卷时间", width = 15)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "交卷时间")
|
||||
private Date commitTime;
|
||||
@Excel(name = "答卷用时", width = 15)
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "问卷作答用时时分秒")
|
||||
private String answerSfm;
|
||||
@Excel(name = "学期学年", width = 15)
|
||||
@ApiModelProperty(value = "学期学年")
|
||||
@TableField(exist = false)
|
||||
private String xqxn;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "提交内容")
|
||||
private String submitData;
|
||||
@ApiModelProperty(value = "答卷编号")
|
||||
private String jid;
|
||||
@ApiModelProperty(value = "问卷作答用时")
|
||||
private int answerSeconds;
|
||||
@ApiModelProperty(value = "问卷类型")
|
||||
@TableField(exist = false)
|
||||
private String atype;
|
||||
@ApiModelProperty(value = "问卷描述")
|
||||
@TableField(exist = false)
|
||||
private java.lang.String content;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<WjxDjxxTmxx> wjxDjxxTmxxList;
|
||||
|
@ -89,9 +102,6 @@ public class WjxDjxx {
|
|||
@ApiModelProperty(value = "任务编号")
|
||||
@TableField(exist = false)
|
||||
private String rwbh;
|
||||
@ApiModelProperty(value = "学期学年")
|
||||
@TableField(exist = false)
|
||||
private String xqxn;
|
||||
@ApiModelProperty(value = "课程名称")
|
||||
@TableField(exist = false)
|
||||
private String kcmc;
|
||||
|
|
|
@ -19,4 +19,5 @@ public interface IWjxDjxxService extends IService<WjxDjxx> {
|
|||
WjxDjxx queryByMainId(String id);
|
||||
Page<WjxDjxx> findDjjgsPage(WjxDjxx wjxDjxx, Page<WjxDjxx> page);
|
||||
|
||||
List<WjxDjxx> exportList(WjxDjxx wjxDjxx);
|
||||
}
|
||||
|
|
|
@ -404,4 +404,28 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
|||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WjxDjxx> exportList(WjxDjxx wjxDjxx) {
|
||||
List<WjxDjxx> list = new ArrayList<>();
|
||||
if(StringUtils.equals("1",wjxDjxx.getIsFinished())){
|
||||
//完成答卷的
|
||||
list = baseMapper.findDjjgsPage(null,wjxDjxx);
|
||||
for(WjxDjxx djxx:list){
|
||||
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
||||
}
|
||||
}else if(StringUtils.equals("0",wjxDjxx.getIsFinished())){
|
||||
//未完成答卷的
|
||||
list = baseMapper.findUnDjjgsPage(null,wjxDjxx);
|
||||
}else{
|
||||
//全部
|
||||
list = baseMapper.findAllDjjgsPage(null,wjxDjxx);
|
||||
for(WjxDjxx djxx:list){
|
||||
if(djxx.getAnswerSeconds()!=-1){
|
||||
djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,12 @@ import java.util.stream.Collectors;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx;
|
||||
import org.jeecg.modules.kc.wjxDjxx.service.IWjxDjxxService;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
|
@ -54,12 +60,13 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|||
@RestController
|
||||
@RequestMapping("/wjxWjxxTmlb/wjxWjxxTmlb")
|
||||
@Slf4j
|
||||
public class WjxWjxxTmlbController {
|
||||
public class WjxWjxxTmlbController extends JeecgController<WjxWjxxTmlb, IWjxWjxxTmlbService> {
|
||||
@Autowired
|
||||
private IWjxWjxxTmlbService wjxWjxxTmlbService;
|
||||
@Autowired
|
||||
private IWjxWjxxTmxxService wjxWjxxTmxxService;
|
||||
|
||||
@Autowired
|
||||
private IWjxDjxxService wjxDjxxService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
@ -221,39 +228,52 @@ public class WjxWjxxTmlbController {
|
|||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param wjxWjxxTmlb
|
||||
*/
|
||||
@RequiresPermissions("wjxWjxxTmlb:wjx_wjxx_tmlb:exportXls")
|
||||
|
||||
// @RequestMapping(value = "/exportXls")
|
||||
// public ModelAndView exportXls(HttpServletRequest request, WjxWjxxTmlb wjxWjxxTmlb) {
|
||||
// return super.exportXls(request, wjxWjxxTmlb, WjxWjxxTmlb.class, "测验信息");
|
||||
// }
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, WjxWjxxTmlb wjxWjxxTmlb) {
|
||||
// Step.1 组装查询条件查询数据
|
||||
QueryWrapper<WjxWjxxTmlb> queryWrapper = QueryGenerator.initQueryWrapper(wjxWjxxTmlb, request.getParameterMap());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
public ModelAndView exportXls(HttpServletRequest request, WjxDjxx wjxDjxx) {
|
||||
|
||||
//配置选中数据查询条件
|
||||
String selections = request.getParameter("selections");
|
||||
if(oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
queryWrapper.in("id",selectionList);
|
||||
}
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//Step.2 获取导出数据
|
||||
List<WjxWjxxTmlb> wjxWjxxTmlbList = wjxWjxxTmlbService.list(queryWrapper);
|
||||
// if(StringUtils.equals("1",wjxDjxx.getIsFinished())){
|
||||
// //完成答卷的
|
||||
// List<WjxDjxx> list = baseMapper.findDjjgsPage(page,wjxDjxx);
|
||||
// for(WjxDjxx djxx:list){
|
||||
// djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
||||
// }
|
||||
// }else if(StringUtils.equals("0",wjxDjxx.getIsFinished())){
|
||||
// //未完成答卷的
|
||||
// List<WjxDjxx> list = baseMapper.findUnDjjgsPage(page,wjxDjxx);
|
||||
// }else{
|
||||
// //全部
|
||||
// List<WjxDjxx> list = baseMapper.findAllDjjgsPage(page,wjxDjxx);
|
||||
// for(WjxDjxx djxx:list){
|
||||
// if(djxx.getAnswerSeconds()!=-1){
|
||||
// djxx.setAnswerSfm(convertSecondsToHMS(djxx.getAnswerSeconds()));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
List<WjxDjxx> pageList = wjxDjxxService.exportList(wjxDjxx);
|
||||
// Step.3 组装pageList
|
||||
List<WjxWjxxTmlbPage> pageList = new ArrayList<WjxWjxxTmlbPage>();
|
||||
for (WjxWjxxTmlb main : wjxWjxxTmlbList) {
|
||||
WjxWjxxTmlbPage vo = new WjxWjxxTmlbPage();
|
||||
BeanUtils.copyProperties(main, vo);
|
||||
List<WjxWjxxTmxx> wjxWjxxTmxxList = wjxWjxxTmxxService.selectByMainId(main.getId());
|
||||
vo.setWjxWjxxTmxxList(wjxWjxxTmxxList);
|
||||
pageList.add(vo);
|
||||
}
|
||||
// List<WjxWjxxTmlbPage> pageList = new ArrayList<WjxWjxxTmlbPage>();
|
||||
// for (WjxWjxxTmlb main : wjxWjxxTmlbList) {
|
||||
// WjxWjxxTmlbPage vo = new WjxWjxxTmlbPage();
|
||||
// BeanUtils.copyProperties(main, vo);
|
||||
// List<WjxWjxxTmxx> wjxWjxxTmxxList = wjxWjxxTmxxService.selectByMainId(main.getId());
|
||||
// vo.setWjxWjxxTmxxList(wjxWjxxTmxxList);
|
||||
// pageList.add(vo);
|
||||
// }
|
||||
|
||||
// Step.4 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "题目信息列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, WjxWjxxTmlbPage.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("题目信息数据", "导出人:"+sysUser.getRealname(), "题目信息"));
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "问卷信息");
|
||||
mv.addObject(NormalExcelConstants.CLASS, WjxDjxx.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("问卷信息", "导出人:"+sysUser.getRealname(), "问卷信息"));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||
return mv;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.common.util.text.StringUtils;
|
||||
import org.jeecg.modules.kc.zyCcjg.entity.ZyCcjg;
|
||||
import org.jeecg.modules.kc.zyCcjg.service.IZyCcjgService;
|
||||
|
||||
|
@ -72,7 +73,30 @@ public class ZyCcjgController extends JeecgController<ZyCcjg, IZyCcjgService> {
|
|||
IPage<ZyCcjg> pageList = zyCcjgService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="查询作业检测问题数据", notes="查询作业检测问题数据")
|
||||
@GetMapping(value = "/getQuaList")
|
||||
public Result<IPage<ZyCcjg>> getQuaList(ZyCcjg zyCcjg,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ZyCcjg> queryWrapper = QueryGenerator.initQueryWrapper("a",zyCcjg, req.getParameterMap());
|
||||
if(StringUtils.isEmpty(zyCcjg.getFilestateid())){
|
||||
queryWrapper.in("a.filestateid",1,3);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(zyCcjg.getStuNo())){
|
||||
queryWrapper.like("b.create_by",zyCcjg.getStuNo());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(zyCcjg.getStuName())){
|
||||
queryWrapper.like("b.student_name",zyCcjg.getStuName());
|
||||
}
|
||||
Page<ZyCcjg> page = new Page<ZyCcjg>(pageNo, pageSize);
|
||||
IPage<ZyCcjg> pageList = zyCcjgService.getQuaList(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
|
|
|
@ -143,4 +143,21 @@ public class ZyCcjg implements Serializable {
|
|||
|
||||
@TableField(exist = false)
|
||||
private String cateid;
|
||||
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String xnxq;
|
||||
@TableField(exist = false)
|
||||
private String title;
|
||||
@TableField(exist = false)
|
||||
private String teaNo;
|
||||
@TableField(exist = false)
|
||||
private String teaName;
|
||||
@TableField(exist = false)
|
||||
private String stuNo;
|
||||
@TableField(exist = false)
|
||||
private String stuName;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@ package org.jeecg.modules.kc.zyCcjg.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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.zyCcjg.entity.ZyCcjg;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
@ -14,4 +18,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface ZyCcjgMapper extends BaseMapper<ZyCcjg> {
|
||||
|
||||
IPage<ZyCcjg> getQuaList(Page<ZyCcjg> page,@Param(Constants.WRAPPER) QueryWrapper<ZyCcjg> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -2,4 +2,13 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.kc.zyCcjg.mapper.ZyCcjgMapper">
|
||||
|
||||
<select id="getQuaList" resultType="org.jeecg.modules.kc.zyCcjg.entity.ZyCcjg">
|
||||
select c.title,c.xnxq,c.create_by as tea_no,d.realname as tea_name,b.create_by as stu_no,b.student_name as stu_name,b.create_time,a.cc_type,a.filestateid,a.message,a.paperid
|
||||
from zy_ccjg a
|
||||
LEFT JOIN zy_info_student b on a.zy_stu_id = b.id
|
||||
LEFT JOIN zy_info c on b.main_id = c.id
|
||||
LEFT JOIN sys_user d on c.create_by = d.username
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,5 +1,8 @@
|
|||
package org.jeecg.modules.kc.zyCcjg.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.zyCcjg.entity.ZyCcjg;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
@ -12,4 +15,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
public interface IZyCcjgService extends IService<ZyCcjg> {
|
||||
|
||||
void getCcjg();
|
||||
|
||||
IPage<ZyCcjg> getQuaList(Page<ZyCcjg> page, QueryWrapper<ZyCcjg> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ package org.jeecg.modules.kc.zyCcjg.service.impl;
|
|||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.modules.kc.blZycc.entity.BlZycc;
|
||||
import org.jeecg.modules.kc.zyCcjg.entity.ZyCcjg;
|
||||
|
@ -74,17 +76,23 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
|||
zyCcjgQueryWrapper.in("filestateid",0,1,3);//检测状态(1:检测中,2:检测完成,3:检测失败,0:未检测)
|
||||
List<ZyCcjg> list = baseMapper.selectList(zyCcjgQueryWrapper);
|
||||
for(ZyCcjg par : list){
|
||||
//查重类型(0外网 1内网 2aigc)
|
||||
//查重类型(0外网 1内网 2aigc 3校内)
|
||||
if(StringUtils.equals(par.getCcType(), "0")){
|
||||
wwCxjcjg(par);
|
||||
}else if(StringUtils.equals(par.getCcType(), "1")){
|
||||
xfwbdCxjcjg(par);
|
||||
}else if(StringUtils.equals(par.getCcType(), "2")){
|
||||
aigcCxjcjg(par);
|
||||
}else if(StringUtils.equals(par.getCcType(), "3")){
|
||||
xfwbdCxjcjg(par);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<ZyCcjg> getQuaList(Page<ZyCcjg> page, QueryWrapper<ZyCcjg> queryWrapper) {
|
||||
return baseMapper.getQuaList(page, queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
public Map<String,String> aigcCxjcjg(ZyCcjg zyCcjg) {
|
||||
|
|
|
@ -111,6 +111,15 @@ public class ZyInfo implements Serializable {
|
|||
@Excel(name = "aigc通过率", width = 15)
|
||||
@ApiModelProperty(value = "aigc通过率")
|
||||
private java.lang.Double aigctgl;
|
||||
/**校内查重*/
|
||||
@Excel(name = "校内查重", width = 15, dicCode = "yn")
|
||||
@Dict(dicCode = "yn")
|
||||
@ApiModelProperty(value = "校内查重")
|
||||
private java.lang.String xncc;
|
||||
/**校内通过率*/
|
||||
@Excel(name = "校内通过率", width = 15)
|
||||
@ApiModelProperty(value = "校内通过率")
|
||||
private java.lang.Double xntgl;
|
||||
|
||||
private java.lang.String rwbh;
|
||||
private java.lang.String filePath;
|
||||
|
|
|
@ -69,12 +69,11 @@ public class ZyInfoStudent implements Serializable {
|
|||
@Excel(name = "aigc相似律", width = 15)
|
||||
@ApiModelProperty(value = "aigc相似律")
|
||||
private java.lang.String aigcxsl;
|
||||
@Excel(name = "存档类型", width = 15)
|
||||
@Excel(name = "存档类型", width = 15,dicCode = "cdlx")
|
||||
@Dict(dicCode = "cdlx")
|
||||
private String cdlx;//存档类型
|
||||
|
||||
|
||||
|
||||
/**作业名称*/
|
||||
@ApiModelProperty(value = "作业名称")
|
||||
private java.lang.String mainId;
|
||||
|
|
|
@ -115,6 +115,18 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
if(StringUtils.equals(zyInfo.getAigccc(),"1")){
|
||||
aigcSave(zyInfoStudent);
|
||||
}
|
||||
//校内查重及提交检测
|
||||
if(StringUtils.equals(zyInfo.getXncc(),"1")){
|
||||
zyInfoStudent.setCateid("DBSDQXZYBDK001");
|
||||
zyInfoStudent.setCatename("东北师大全校作业比对库");
|
||||
xnccSave(zyInfoStudent,"0");//提交比对
|
||||
}else{
|
||||
// zyInfoStudent.setCateid("DBSDQXZYBDK001");
|
||||
// zyInfoStudent.setCatename("东北师大全校作业比对库");
|
||||
// zyInfoStudent.setCateid(cateid);
|
||||
// zyInfoStudent.setCatename(catename);
|
||||
// xnccSave(zyInfoStudent,"1");//不提交比对
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -246,6 +258,54 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
}
|
||||
}
|
||||
|
||||
//小范围提交(校园内网提交)
|
||||
private void xnccSave(ZyInfoStudent zyInfoStudent,String type) {
|
||||
String url = "https://vims.fanyu.com/toole/smallcheck/submitData";
|
||||
//文件路径,文件存在,不存在的话需要先下载下来
|
||||
String fileName = uploadpath+"/"+ zyInfoStudent.getFilePath();
|
||||
Map<String, String> textMap = new HashMap<String, String>();
|
||||
String titlePar =fileName.substring(fileName.lastIndexOf("/")+1,fileName.length());
|
||||
String title = titlePar.split("_")[0];
|
||||
//可以设置多个input的name,value
|
||||
String sign = getSign();
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
textMap.put("sign", sign);
|
||||
textMap.put("userid", weipuId);
|
||||
textMap.put("title", title);//标题
|
||||
textMap.put("author", sysUser.getRealname());//作者
|
||||
textMap.put("cateid", zyInfoStudent.getCateid());//范围库唯一标识
|
||||
textMap.put("catename", zyInfoStudent.getCatename());//范围库名称
|
||||
textMap.put("number", sysUser.getUsername());//学号
|
||||
//设置file的name,路径
|
||||
Map<String, String> fileMap = new HashMap<String, String>();
|
||||
fileMap.put("file", fileName);
|
||||
String contentType = "";//image/png
|
||||
String ret = formUpload(url, textMap, fileMap,contentType);
|
||||
JSONObject object= JSONObject.parseObject(ret);
|
||||
if("true".equals(object.getString("success"))){
|
||||
String listpaper = object.getString("datainfo");
|
||||
JSONObject object2= JSON.parseObject(listpaper);
|
||||
String dataid = object2.getString("dataid");//资源id 后续提交比对/删除文档会试用
|
||||
|
||||
ZyCcjg zyCcjg = new ZyCcjg();
|
||||
zyCcjg.setZyStuId(zyInfoStudent.getId());
|
||||
zyCcjg.setPaperid(dataid);
|
||||
zyCcjg.setCcType("1");//查重类型(0外网 1内网 2aigc)
|
||||
zyCcjg.setFilestateid("1");
|
||||
zyCcjg.setBdkbs(zyInfoStudent.getCateid());
|
||||
zyCcjgMapper.insert(zyCcjg);
|
||||
//判断是否开始查重 1的时候进行查重,0不查重
|
||||
if(StringUtils.equals("1",type)){
|
||||
//提交后直接开始检测
|
||||
String message = xfwbdKsjc(zyCcjg);
|
||||
System.out.println("21-------->"+message);
|
||||
}
|
||||
|
||||
}else{
|
||||
System.out.println("3-------->");
|
||||
}
|
||||
}
|
||||
|
||||
//小范围对比开始检测
|
||||
public String xfwbdKsjc(ZyCcjg zyCcjg) {
|
||||
String url = "https://vims.fanyu.com/toole/smallcheck/beginCheck";
|
||||
|
|
|
@ -175,8 +175,8 @@ jeecg:
|
|||
# 签名拦截接口
|
||||
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
|
||||
#local\minio\alioss
|
||||
uploadType: local
|
||||
# uploadType: sftp
|
||||
# uploadType: local
|
||||
uploadType: sftp
|
||||
# 前端访问地址
|
||||
domainUrl:
|
||||
pc: http://210.47.17.166
|
||||
|
|
Loading…
Reference in New Issue