修改bug

This commit is contained in:
yangjun 2024-07-23 15:25:19 +08:00
parent 664767407f
commit 00b8b19f3d
4 changed files with 98 additions and 9 deletions

View File

@ -64,16 +64,16 @@ public class ZyInfoStudent implements Serializable {
@Excel(name = "评分", width = 15) @Excel(name = "评分", width = 15)
private java.lang.String score; private java.lang.String score;
/**外网相似律*/ /**外网相似律*/
@Excel(name = "外网相似律", width = 15) @Excel(name = "维普查重(%", width = 15)
@ApiModelProperty(value = "外网相似律") @ApiModelProperty(value = "维普查重(%")
private java.lang.String wwxsl; private java.lang.String wwxsl;
/**内网相似律*/ /**内网相似律*/
@Excel(name = "内网相似律", width = 15) @Excel(name = "作业查重(%", width = 15)
@ApiModelProperty(value = "内网相似律") @ApiModelProperty(value = "作业查重(%")
private java.lang.String nwxsl; private java.lang.String nwxsl;
/**aigc相似律*/ /**aigc相似律*/
@Excel(name = "aigc相似律", width = 15) @Excel(name = "aigc查重(%", width = 15)
@ApiModelProperty(value = "aigc相似律") @ApiModelProperty(value = "aigc查重(%")
private java.lang.String aigcxsl; private java.lang.String aigcxsl;
@Excel(name = "存档类型", width = 15,dicCode = "cdlx") @Excel(name = "存档类型", width = 15,dicCode = "cdlx")
@Dict(dicCode = "cdlx") @Dict(dicCode = "cdlx")
@ -99,8 +99,8 @@ public class ZyInfoStudent implements Serializable {
@ApiModelProperty(value = "校内是否通过") @ApiModelProperty(value = "校内是否通过")
private java.lang.String xnsftg; private java.lang.String xnsftg;
/**校内相似律*/ /**校内相似律*/
@Excel(name = "校内相似律", width = 15) @Excel(name = "校内查重(%", width = 15)
@ApiModelProperty(value = "校内相似律") @ApiModelProperty(value = "校内查重(%")
private java.lang.String xnxsl; private java.lang.String xnxsl;
private java.lang.String pdfPath; private java.lang.String pdfPath;

View File

@ -10,6 +10,7 @@ import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @Description: 学生提交作业 * @Description: 学生提交作业
@ -28,4 +29,8 @@ public interface ZyInfoStudentMapper extends BaseMapper<ZyInfoStudent> {
IPage<ZyInfoStudentSys> sysList(Page<ZyInfoStudentSys> page,@Param(Constants.WRAPPER) QueryWrapper<ZyInfoStudentSys> queryWrapper, ZyInfoStudentSys zyInfoStudentSys); IPage<ZyInfoStudentSys> sysList(Page<ZyInfoStudentSys> page,@Param(Constants.WRAPPER) QueryWrapper<ZyInfoStudentSys> queryWrapper, ZyInfoStudentSys zyInfoStudentSys);
List<ZyInfoStudentSys> exportSysXls(@Param(Constants.WRAPPER) QueryWrapper<ZyInfoStudentSys> queryWrapper, ZyInfoStudentSys zyInfoStudentSys); List<ZyInfoStudentSys> exportSysXls(@Param(Constants.WRAPPER) QueryWrapper<ZyInfoStudentSys> queryWrapper, ZyInfoStudentSys zyInfoStudentSys);
String getWpFile(ZyInfoStudent zyInfoStudent);
Map<String, String> getXfwWpFile(ZyInfoStudent zyInfoStudent);
} }

View File

@ -121,4 +121,17 @@
</where> </where>
</select> </select>
<select id="getWpFile" resultType="java.lang.String">
select GROUP_CONCAT(paperid) as paperid,bdkbs FROM
zy_info_student a
LEFT JOIN zy_ccjg b on a.id = b.zy_stu_id
where a.main_id = #{mainId} and a.create_by = #{createBy} and b.cc_type = #{queryType}
</select>
<select id="getXfwWpFile" resultType="java.util.HashMap">
select GROUP_CONCAT(paperid) as paperid,bdkbs FROM
zy_info_student a
LEFT JOIN zy_ccjg b on a.id = b.zy_stu_id
where a.main_id = #{mainId} and a.create_by = #{createBy} and b.cc_type = #{queryType}
</select>
</mapper> </mapper>

View File

@ -121,6 +121,37 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
zyInfoStudent.setCateid(cateid); zyInfoStudent.setCateid(cateid);
zyInfoStudent.setCatename(catename); zyInfoStudent.setCatename(catename);
//删除维普已经提交的文档
zyInfoStudent.setQueryType("0");//外网查重数据
String paperids = baseMapper.getWpFile(zyInfoStudent);
if(StringUtils.isNotEmpty(paperids)){
String url = "https://vims.fanyu.com/toole/jianceorgan/paperdel.aspx";
delWpFile(url,paperids,response);
}
zyInfoStudent.setQueryType("1");//内网查重数据-作业内查重
Map<String,String> paperids1 = baseMapper.getXfwWpFile(zyInfoStudent);
if(paperids1 != null){
String dataids = paperids1.get("paperid");
String bdkbs = paperids1.get("bdkbs");
String url = "https://vims.fanyu.com/toole/smallcheck/delData";
delXfwWpFile(url,bdkbs,dataids,response);
}
zyInfoStudent.setQueryType("3");//内网查重数据-全校内比对
Map<String,String> paperids3 = baseMapper.getXfwWpFile(zyInfoStudent);
if(paperids3 != null){
String dataids = paperids3.get("paperid");
String bdkbs = paperids3.get("bdkbs");
String url = "https://vims.fanyu.com/toole/smallcheck/delData";
delXfwWpFile(url,bdkbs,dataids,response);
}
zyInfoStudent.setQueryType("2");//aigc查重数据
String paperids2 = baseMapper.getWpFile(zyInfoStudent);
if(StringUtils.isNotEmpty(paperids2)){
String url = "https://vims.fanyu.com/tool/AIGCCheck/paperDel";
delWpFile(url,paperids2,response);
}
//外网查重及提交检测 //外网查重及提交检测
if(StringUtils.equals(zyInfo.getWwcc(),"1")){ if(StringUtils.equals(zyInfo.getWwcc(),"1")){
wwccSave(zyInfoStudent,response); wwccSave(zyInfoStudent,response);
@ -550,7 +581,47 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
} }
return fileName; return fileName;
} }
private String delWpFile(String url,String paperids,HttpServletResponse response) {
// String url = "https://vims.fanyu.com/toole/jianceorgan/paperdel.aspx";
Map<String, String> textMap = new HashMap<String, String>();
//可以设置多个input的namevalue
String sign = getSign();
textMap.put("sign", sign);
textMap.put("userid", weipuId);
textMap.put("paperids", paperids);//文档paperid集合,多个请用英文逗号隔开
String contentType = "";//image/png
String ret = formUpload(url, textMap, null,contentType);
log.error("1-------->"+ret);
JSONObject object= JSONObject.parseObject(ret);
if("true".equals(object.getString("success"))){
String message = object.getString("message");
log.info("2-------->"+message);
return "success";
}else{
return "false";
}
}
private String delXfwWpFile(String url,String cateid,String paperids,HttpServletResponse response) {
// String url = "https://vims.fanyu.com/toole/jianceorgan/paperdel.aspx";
Map<String, String> textMap = new HashMap<String, String>();
//可以设置多个input的namevalue
String sign = getSign();
textMap.put("sign", sign);
textMap.put("userid", weipuId);
textMap.put("cateid", cateid);
textMap.put("dataid", paperids);//文档paperid集合,多个请用英文逗号隔开
String contentType = "";//image/png
String ret = formUpload(url, textMap, null,contentType);
log.error("1-------->"+ret);
JSONObject object= JSONObject.parseObject(ret);
if("true".equals(object.getString("success"))){
String message = object.getString("message");
log.info("2-------->"+message);
return "success";
}else{
return "false";
}
}
/** /**
* 获取文件真实路径 * 获取文件真实路径
* @param path * @param path