修改bug
This commit is contained in:
parent
664767407f
commit
00b8b19f3d
|
@ -64,16 +64,16 @@ public class ZyInfoStudent implements Serializable {
|
|||
@Excel(name = "评分", width = 15)
|
||||
private java.lang.String score;
|
||||
/**外网相似律*/
|
||||
@Excel(name = "外网相似律", width = 15)
|
||||
@ApiModelProperty(value = "外网相似律")
|
||||
@Excel(name = "维普查重(%)", width = 15)
|
||||
@ApiModelProperty(value = "维普查重(%)")
|
||||
private java.lang.String wwxsl;
|
||||
/**内网相似律*/
|
||||
@Excel(name = "内网相似律", width = 15)
|
||||
@ApiModelProperty(value = "内网相似律")
|
||||
@Excel(name = "作业查重(%)", width = 15)
|
||||
@ApiModelProperty(value = "作业查重(%)")
|
||||
private java.lang.String nwxsl;
|
||||
/**aigc相似律*/
|
||||
@Excel(name = "aigc相似律", width = 15)
|
||||
@ApiModelProperty(value = "aigc相似律")
|
||||
@Excel(name = "aigc查重(%)", width = 15)
|
||||
@ApiModelProperty(value = "aigc查重(%)")
|
||||
private java.lang.String aigcxsl;
|
||||
@Excel(name = "存档类型", width = 15,dicCode = "cdlx")
|
||||
@Dict(dicCode = "cdlx")
|
||||
|
@ -99,8 +99,8 @@ public class ZyInfoStudent implements Serializable {
|
|||
@ApiModelProperty(value = "校内是否通过")
|
||||
private java.lang.String xnsftg;
|
||||
/**校内相似律*/
|
||||
@Excel(name = "校内相似律", width = 15)
|
||||
@ApiModelProperty(value = "校内相似律")
|
||||
@Excel(name = "校内查重(%)", width = 15)
|
||||
@ApiModelProperty(value = "校内查重(%)")
|
||||
private java.lang.String xnxsl;
|
||||
|
||||
private java.lang.String pdfPath;
|
||||
|
|
|
@ -10,6 +10,7 @@ import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
|||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @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);
|
||||
|
||||
List<ZyInfoStudentSys> exportSysXls(@Param(Constants.WRAPPER) QueryWrapper<ZyInfoStudentSys> queryWrapper, ZyInfoStudentSys zyInfoStudentSys);
|
||||
|
||||
String getWpFile(ZyInfoStudent zyInfoStudent);
|
||||
|
||||
Map<String, String> getXfwWpFile(ZyInfoStudent zyInfoStudent);
|
||||
}
|
||||
|
|
|
@ -121,4 +121,17 @@
|
|||
</where>
|
||||
</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>
|
|
@ -121,6 +121,37 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
zyInfoStudent.setCateid(cateid);
|
||||
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")){
|
||||
wwccSave(zyInfoStudent,response);
|
||||
|
@ -550,7 +581,47 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
}
|
||||
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的name,value
|
||||
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的name,value
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue