修改bug
This commit is contained in:
parent
86d7b05fe8
commit
964122f60f
|
@ -310,7 +310,7 @@ public class SFTPUtil {
|
|||
OutputStream output = null;
|
||||
try {
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("开始获取远程文件:[{}]---->[{}]", new Object[]{directory, saveFile});
|
||||
logger.info("开始获取远程文件:[{}]---->[{}]", new Object[]{directory, newDownloadFile});
|
||||
}
|
||||
// sftp.cd(directory);
|
||||
if (logger.isInfoEnabled()) {
|
||||
|
|
|
@ -131,13 +131,13 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
zyInfoStudent.setCatename("东北师大全校作业比对库");
|
||||
xnccSave(zyInfoStudent,"0",response);//提交比对
|
||||
}else{
|
||||
// zyInfoStudent.setCateid("DBSDQXZYBDK001");
|
||||
// zyInfoStudent.setCatename("东北师大全校作业比对库");
|
||||
// zyInfoStudent.setCateid(cateid);
|
||||
// zyInfoStudent.setCatename(catename);
|
||||
// xnccSave(zyInfoStudent,"1");//不提交比对
|
||||
zyInfoStudent.setCateid("DBSDQXZYBDK001");
|
||||
zyInfoStudent.setCatename("东北师大全校作业比对库");
|
||||
zyInfoStudent.setCateid(cateid);
|
||||
zyInfoStudent.setCatename(catename);
|
||||
xnccSave(zyInfoStudent,"1",response);//不提交比对
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -263,7 +263,7 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
zyCcjgMapper.insert(zyCcjg);
|
||||
|
||||
//提交后直接开始检测
|
||||
String message = xfwbdKsjc(zyCcjg);
|
||||
String message = xfwbdKsjc(zyCcjg,"1");
|
||||
System.out.println("21-------->"+message);
|
||||
}else{
|
||||
System.out.println("3-------->");
|
||||
|
@ -314,7 +314,7 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
//判断是否开始查重 1的时候进行查重,0不查重
|
||||
if(StringUtils.equals("1",type)){
|
||||
//提交后直接开始检测
|
||||
String message = xfwbdKsjc(zyCcjg);
|
||||
String message = xfwbdKsjc(zyCcjg,"0");
|
||||
System.out.println("21-------->"+message);
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
}
|
||||
|
||||
//小范围对比开始检测
|
||||
public String xfwbdKsjc(ZyCcjg zyCcjg) {
|
||||
public String xfwbdKsjc(ZyCcjg zyCcjg,String sfpj) {
|
||||
String url = "https://vims.fanyu.com/toole/smallcheck/beginCheck";
|
||||
//文件路径,文件存在,不存在的话需要先下载下来
|
||||
String paperid = zyCcjg.getPaperid();
|
||||
|
@ -335,6 +335,7 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
textMap.put("userid", weipuId);
|
||||
textMap.put("cateid", zyCcjg.getBdkbs());//比对库的id
|
||||
textMap.put("dataids", paperid);//资源id
|
||||
textMap.put("exclude", sfpj);//是否排已(1:排已, 0:不排已)
|
||||
String contentType = "";//image/png
|
||||
Map<String, String> fileMap = new HashMap<String, String>();
|
||||
String ret = formUpload(url, textMap, fileMap,contentType);
|
||||
|
@ -433,13 +434,13 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
System.out.println("map----------->"+map);
|
||||
if(!map.get("code").equals("0")){
|
||||
response.setStatus(404);
|
||||
throw new RuntimeException(map.get("msg"));
|
||||
// throw new RuntimeException(map.get("msg"));
|
||||
}
|
||||
String localFilePath = map.get("fileName");
|
||||
File file = new File(localFilePath);
|
||||
if(!file.exists()){
|
||||
response.setStatus(404);
|
||||
throw new RuntimeException("文件["+imgPath+"]不存在..");
|
||||
// throw new RuntimeException("文件["+imgPath+"]不存在..");
|
||||
}
|
||||
System.out.println("localFilePath----------->"+localFilePath);
|
||||
// 设置强制下载不打开
|
||||
|
|
|
@ -177,8 +177,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://localhost:3100
|
||||
|
@ -346,5 +346,5 @@ sftp:
|
|||
username: sftp
|
||||
password: sftp
|
||||
timeout: 1000
|
||||
uploadpath: /kczx
|
||||
uploadpath: kczx
|
||||
fullpath: /home/sftp
|
|
@ -352,5 +352,5 @@ sftp:
|
|||
username: sftp
|
||||
password: Nenujwc@99
|
||||
timeout: 1000
|
||||
uploadpath: /kczx
|
||||
uploadpath: kczx
|
||||
fullpath: /home/sftp
|
Loading…
Reference in New Issue