From b00b4b16731da80294309346742942247f2bd695 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Wed, 23 Oct 2024 19:47:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/jeecg/modules/demo/sync/SyncJwxt.java | 9 +- .../demo/xxhbjwxtjxrw/entity/JwxtJxrw.java | 4 + .../xxhbjwxtjxrw/entity/Xxhbjwxtjxrw.java | 4 + .../SyncZyParamsCcjg.java | 58 +++++++++++ .../wjxWjxx/controller/WjxWjxxController.java | 4 +- .../modules/kc/wjxWjxx/entity/WjxWjxx.java | 4 + .../kc/wjxWjxx/mapper/xml/WjxWjxxMapper.xml | 3 + .../kc/wjxWjxxTmlb/entity/WjxWjxxTmlb.java | 1 + .../service/impl/WjxWjxxTmlbServiceImpl.java | 1 + .../kc/wjxWjxxTmlb/vo/WjxWjxxTmlbPage.java | 1 + .../kc/zyCcjg/service/IZyCcjgService.java | 2 + .../service/impl/ZyCcjgServiceImpl.java | 74 ++++++++++++++ .../zyInfo/controller/ZyInfoController.java | 3 + .../controller/ZyInfoStudentController.java | 99 ++++++++++++++++++- .../service/IZyInfoStudentService.java | 2 + .../impl/ZyInfoStudentServiceImpl.java | 84 ++++++++++++++++ 16 files changed, 347 insertions(+), 6 deletions(-) create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncZyParamsCcjg.java diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/sync/SyncJwxt.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/sync/SyncJwxt.java index 014dd156..579d39ac 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/sync/SyncJwxt.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/sync/SyncJwxt.java @@ -88,20 +88,21 @@ public class SyncJwxt extends BaseSync { in1DataList.forEach(x -> out1DataList.add(BeanUtil.toBean(x, Xxhbjwxtscwjxx.class))); // in2DataList.forEach(x -> out2DataList.add(BeanUtil.toBean(x, Xxhbjwxtxsmd.class))); + //删除数据 + QueryWrapper dqw = new QueryWrapper(); + impJxrwService.remove(dqw); + QueryWrapper dqw1 = new QueryWrapper(); + impScwjxxService.remove(dqw1); //保存到胃 try { System.out.println("---------------------------------------------------------------------------"); System.out.println("--------------第一个"+outDataList.size()+"--------------------"); System.out.println("---------------------------------------------------------------------------"); - QueryWrapper dqw = new QueryWrapper(); - impJxrwService.remove(dqw); impJxrwService.syncList(outDataList); System.out.println("---------------------------------------------------------------------------"); System.out.println("--------------第二个"+out1DataList.size()+"--------------------"); System.out.println("---------------------------------------------------------------------------"); - QueryWrapper dqw1 = new QueryWrapper(); - impScwjxxService.remove(dqw1); impScwjxxService.syncList(out1DataList); // System.out.println("---------------------------------------------------------------------------"); diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/JwxtJxrw.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/JwxtJxrw.java index 28ed6c5a..3a7e8f42 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/JwxtJxrw.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/JwxtJxrw.java @@ -88,4 +88,8 @@ public class JwxtJxrw implements Serializable { @Excel(name = "jxbrs", width = 15) @ApiModelProperty(value = "jxbrs") private String jxbrs; + /**jxbrs*/ + @Excel(name = "fileShztmc", width = 15) + @ApiModelProperty(value = "fileShztmc") + private String fileShztmc; } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/Xxhbjwxtjxrw.java b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/Xxhbjwxtjxrw.java index 0df8aa1d..ec4972bd 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/Xxhbjwxtjxrw.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/demo/xxhbjwxtjxrw/entity/Xxhbjwxtjxrw.java @@ -96,4 +96,8 @@ public class Xxhbjwxtjxrw implements Serializable { @Excel(name = "jxbrs", width = 15) @ApiModelProperty(value = "jxbrs") private String jxbrs; + /**jxbrs*/ + @Excel(name = "fileShztmc", width = 15) + @ApiModelProperty(value = "fileShztmc") + private String fileShztmc; } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncZyParamsCcjg.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncZyParamsCcjg.java new file mode 100644 index 00000000..c5dfafcf --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncZyParamsCcjg.java @@ -0,0 +1,58 @@ +package org.jeecg.modules.kc.grab.SynchronizationService; + +import cn.hutool.core.date.DateUtil; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync; +import org.jeecg.modules.kc.zyCcjg.service.IZyCcjgService; +import org.jeecg.modules.kc.zyInfo.service.IZyInfoService; +import org.quartz.JobExecutionContext; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.Map; + +/** + * 作业查重接口 + */ +@Slf4j +public class SyncZyParamsCcjg extends BaseSync { + + @Autowired + private IZyCcjgService zyCcjgService; + + @Autowired + private IZyInfoService zyInfoService; + + /** + * 若参数变量名修改 QuartzJobController中也需对应修改 + */ + + @Override + public void execute(JobExecutionContext jobExecutionContext) { + start(); + run(getParamMap()); + end(); + } + + + /** + * 有参定时任务实现 + * @param param + */ + public void run(Map param){ + + if(param != null){ + String paperId = (String)param.get("paperId"); + zyCcjgService.updateCcjg(paperId); + } + + } + + /** + * 无参定时任务实现 + */ + public void run(){ + run(null); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/controller/WjxWjxxController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/controller/WjxWjxxController.java index 7fe35399..cf7bac90 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/controller/WjxWjxxController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/controller/WjxWjxxController.java @@ -248,8 +248,8 @@ public class WjxWjxxController extends JeecgController List list =wjxWjxx.getList(); + String mainId = wjxWjxx.getId(); if(list.size()>0){ - String mainId = list.get(0).getMainId(); QueryWrapper wjxWjxxTmlbQueryWrapper = new QueryWrapper(); wjxWjxxTmlbQueryWrapper.eq("main_id",mainId); @@ -259,8 +259,10 @@ public class WjxWjxxController extends JeecgController } for(WjxWjxxTmlbPage wjxWjxxTmlbPage:list){ + wjxWjxxTmlbPage.setId(null); WjxWjxxTmlb wjxWjxxTmlb = new WjxWjxxTmlb(); BeanUtils.copyProperties(wjxWjxxTmlbPage, wjxWjxxTmlb); + wjxWjxxTmlb.setMainId(mainId); wjxWjxxTmlbService.saveMain(wjxWjxxTmlb, wjxWjxxTmlbPage.getWjxWjxxTmxxList()); } } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/entity/WjxWjxx.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/entity/WjxWjxx.java index 3c8903f9..61442711 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/entity/WjxWjxx.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/entity/WjxWjxx.java @@ -137,6 +137,10 @@ public class WjxWjxx implements Serializable { @TableField(exist = false) private String num; + + @TableField(exist = false) + private String titleNull; + @TableField(exist = false) List list; @TableField(exist = false) diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/mapper/xml/WjxWjxxMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/mapper/xml/WjxWjxxMapper.xml index 456cf0f1..3aa49f75 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/mapper/xml/WjxWjxxMapper.xml +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/mapper/xml/WjxWjxxMapper.xml @@ -23,6 +23,9 @@ and a.id = #{param.id} + + and (a.title != null or a.title != '') + order by sort asc diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/entity/WjxWjxxTmlb.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/entity/WjxWjxxTmlb.java index e106dae0..be695484 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/entity/WjxWjxxTmlb.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/entity/WjxWjxxTmlb.java @@ -96,6 +96,7 @@ public class WjxWjxxTmlb implements Serializable { private java.lang.String wjSfqh;//是否切换 0系统 1自定义 private String picPath; + private String sftjtk; @TableField(exist = false) private String itemSelected; diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmlbServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmlbServiceImpl.java index 734dd2e9..ed893c72 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmlbServiceImpl.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmlbServiceImpl.java @@ -50,6 +50,7 @@ public class WjxWjxxTmlbServiceImpl extends ServiceImpl0) { for(WjxWjxxTmxx entity:wjxWjxxTmxxList) { + entity.setId(null); //外键设置 entity.setMainId(wjxWjxxTmlb.getId()); entity.setWjIndex(wjxWjxxTmlb.getWjIndex()); diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/vo/WjxWjxxTmlbPage.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/vo/WjxWjxxTmlbPage.java index 46b14dc2..055e722f 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/vo/WjxWjxxTmlbPage.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/vo/WjxWjxxTmlbPage.java @@ -85,6 +85,7 @@ public class WjxWjxxTmlbPage { private String itemSelected; private String picPath; + private String sftjtk; private java.lang.String wjSfqh;//是否切换 0系统 1自定义 diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyCcjg/service/IZyCcjgService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyCcjg/service/IZyCcjgService.java index 5a3aefe9..22214b00 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyCcjg/service/IZyCcjgService.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyCcjg/service/IZyCcjgService.java @@ -24,4 +24,6 @@ public interface IZyCcjgService extends IService { void deleteByZystuid(String id, HttpServletResponse response); List ccjglist(QueryWrapper queryWrapper); + + void updateCcjg(String paperId); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyCcjg/service/impl/ZyCcjgServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyCcjg/service/impl/ZyCcjgServiceImpl.java index 01c01051..f1e044f3 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyCcjg/service/impl/ZyCcjgServiceImpl.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyCcjg/service/impl/ZyCcjgServiceImpl.java @@ -129,6 +129,43 @@ public class ZyCcjgServiceImpl extends ServiceImpl impleme return baseMapper.ccjglist(queryWrapper); } + //更新指定查重结果 + @Override + public void updateCcjg(String paperId) { + QueryWrapper zyCcjgQueryWrapper = new QueryWrapper<>(); + zyCcjgQueryWrapper.eq("paperid",paperId);//检测状态(1:检测中,2:检测完成,3:检测失败,0:未检测) + zyCcjgQueryWrapper.last("limit 1"); + ZyCcjg par = baseMapper.selectOne(zyCcjgQueryWrapper); + if(par!=null){ + if(StringUtils.equals(par.getCcType(), "0")){ + try { + wwCxjcjg(par); + }catch (Exception e){ + e.printStackTrace(); + } + }else if(StringUtils.equals(par.getCcType(), "1")){ + try { + xfwbdCxjcjg(par); + }catch (Exception e){ + e.printStackTrace(); + } + + }else if(StringUtils.equals(par.getCcType(), "2")){ + try { + aigcCxjcjg(par); + }catch (Exception e){ + e.printStackTrace(); + } + }else if(StringUtils.equals(par.getCcType(), "3")){ + try { + xnCxjcjg(par); + }catch (Exception e){ + e.printStackTrace(); + } + } + } + } + public Map aigcCxjcjg(ZyCcjg zyCcjg) { String url = "https://vims.fanyu.com/tool/AIGCCheck/searchPaper"; @@ -496,6 +533,22 @@ public class ZyCcjgServiceImpl extends ServiceImpl impleme } zyInfoStudent.setXnxsl(cctgl + ""); zyInfoStudentService.updateById(zyInfoStudent); + + + + try { + if(paperid != null){ + String dataids = zyCcjg.getPaperid(); + String bdkbs = zyCcjg.getBdkbs(); + String url2 = "https://vims.fanyu.com/toole/smallcheck/delData"; + delXfwWpFile(url2,bdkbs,dataids, null); + } + } catch (Exception e) { + e.printStackTrace(); + } + + + }else if(StringUtils.equals("3",object2.getString("filestateid"))){ zyInfoStudent.setWwsftg("失败:"+object.getString("message")); }else{ @@ -518,6 +571,27 @@ public class ZyCcjgServiceImpl extends ServiceImpl impleme } } + private String delXfwWpFile(String url,String cateid,String paperids,HttpServletResponse response) { +// String url = "https://vims.fanyu.com/toole/jianceorgan/paperdel.aspx"; + Map textMap = new HashMap(); + //可以设置多个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"); + System.out.println(message); + return "success"; + }else{ + return "false"; + } + } //生成sign public static String getSign() { String userid = weipuId; diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/controller/ZyInfoController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/controller/ZyInfoController.java index fc080326..ff0ffb4e 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/controller/ZyInfoController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/controller/ZyInfoController.java @@ -181,6 +181,9 @@ public class ZyInfoController extends JeecgController { String xkrs = kcKechengbiao.getXkrs(); zyInfo1.setXkxs(xkrs); int wtj = Integer.parseInt(xkrs)-Integer.parseInt(zyInfo1.getDpynum())-Integer.parseInt(zyInfo1.getYpynum()); + if(wtj<0){ + wtj = 0; + } zyInfo1.setWtjnum(wtj+""); }); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java index 578dffa5..3f6ebf9d 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java @@ -424,6 +424,103 @@ public class ZyInfoStudentController extends JeecgController fabuBatch2(@RequestBody ZyInfoStudent zyInfoStudent) { + + + ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getId()); + if(zyInfo == null){ + return Result.error("未找到对应数据"); + } + + QueryWrapper zyInfoStudentQueryWrapper = new QueryWrapper<>(); +// zyInfoStudentQueryWrapper.isNull("a.score"); + zyInfoStudentQueryWrapper.eq("b.id",zyInfo.getId()); + zyInfoStudentQueryWrapper.eq("c.KCAPZBBH",zyInfo.getRwbh()); + Page page = new Page(1, -1); + IPage list = zyInfoStudentService.getList2(page,zyInfoStudentQueryWrapper); + for (ZyInfoStudent par:list.getRecords()){ + if(StringUtils.equals(par.getId(),par.getCreateBy())){//说明是伪数据,需要新增 + par.setId(null); + par.setCreateTime(new Date()); + par.setMainId(zyInfo.getId()); + par.setScore("0"); + par.setScoreFabu("1"); + zyInfoStudentService.save(par); + }else{//不相等则是帧数据,直接修改 + UpdateWrapper zyInfoStudentUp = new UpdateWrapper<>(); + zyInfoStudentUp.eq("id",par.getId()); + if(StringUtils.isEmpty(par.getScore())){ + zyInfoStudentUp.set("score","0"); + } + zyInfoStudentUp.set("score_fabu","1"); + zyInfoStudentService.update(zyInfoStudentUp); + } + } + zyInfo.setZyStatus("2"); + zyInfoService.updateById(zyInfo); + +// QueryWrapper zyInfoStudentQueryWrapper = new QueryWrapper<>(); +// zyInfoStudentQueryWrapper.eq("a.main_id",zyInfoStudent.getId()); +// List list = zyInfoStudentService.list(zyInfoStudentQueryWrapper); +// for(ZyInfoStudent par:list){ +// UpdateWrapper zyInfoStudentUp = new UpdateWrapper<>(); +// zyInfoStudentUp.eq("id",par.getId()); +// if(StringUtils.isEmpty(par.getScore())){ +// zyInfoStudentUp.set("score","0"); +// } +// zyInfoStudentUp.set("score_fabu","1"); +// zyInfoStudentService.update(zyInfoStudentUp); +// } +// +// int a = list.size(); +// +// QueryWrapper zyInfoStudentQueryWrapper2 = new QueryWrapper<>(); +// zyInfoStudentQueryWrapper2.eq("main_id",zyInfoStudent.getId()); +// zyInfoStudentQueryWrapper2.eq("score_fabu","1"); +// List list2 = zyInfoStudentService.list(zyInfoStudentQueryWrapper2); +// int b = list2.size(); +// if(a==b){ +// UpdateWrapper zyInfo = new UpdateWrapper<>(); +// zyInfo.eq("id",zyInfoStudent.getId()); +// zyInfo.set("zy_status","2"); +// zyInfoService.update(zyInfo); +// } + + return Result.OK("发布成功!"); + } + + + @AutoLog(value = "校内查重批量提交") + @ApiOperation(value="校内查重批量提交", notes="校内查重批量提交") + @PostMapping(value = "/xnccBatchWeipu") + public Result> xnccBatchWeipu(@RequestBody ZyInfoStudent zyInfoStudent, HttpServletResponse response) { + List list = zyInfoStudentService.xnccBatchWeipu(zyInfoStudent, response); + return Result.OK(list); + } + + @AutoLog(value = "学生提交作业-批量发布") + @ApiOperation(value="学生提交作业-批量发布", notes="学生提交作业-批量发布") + @PostMapping(value = "/getNoScore") + public Result> getNoScore(@RequestBody ZyInfoStudent zyInfoStudent) { + + + ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getId()); + if(zyInfo == null){ + return Result.error("未找到对应数据"); + } + + QueryWrapper zyInfoStudentQueryWrapper = new QueryWrapper<>(); + zyInfoStudentQueryWrapper.isNull("a.score"); + zyInfoStudentQueryWrapper.eq("b.id",zyInfo.getId()); + zyInfoStudentQueryWrapper.eq("c.KCAPZBBH",zyInfo.getRwbh()); + Page page = new Page(1, -1); + IPage list = zyInfoStudentService.getList2(page,zyInfoStudentQueryWrapper); + return Result.OK(list.getRecords()); + } + /** * 批量发布 * @@ -642,7 +739,7 @@ public class ZyInfoStudentController extends JeecgController { IPage getList2(Page page, QueryWrapper queryWrapper); List getDocNoPdfList(); + + List xnccBatchWeipu(ZyInfoStudent zyInfoStudent, HttpServletResponse response); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java index 2138156e..1ab9f70a 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java @@ -230,6 +230,29 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl xnccBatchWeipu(ZyInfoStudent zyInfoStudent, HttpServletResponse response) { + + + ZyInfo zyinfo = zyInfoService.getById(zyInfoStudent.getId()); + if(zyinfo!=null && StringUtils.equals(zyinfo.getSfcc(),"1") && StringUtils.equals(zyinfo.getXncc(),"true")){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("a.main_id",zyInfoStudent.getId()); + queryWrapper.isNotNull("a.file_path"); + List list = baseMapper.selectList(queryWrapper); + for(ZyInfoStudent par : list){ + par.setCateid("DBSDQXZYBDK001"); + par.setCatename("东北师大全校作业比对库"); + xnccUpdate(par,"1",response);//提交比对 + } + } + + + + return new ArrayList<>(); + } + private void delweipulunwen(ZyInfoStudent zyInfoStudent, HttpServletResponse response) { zyInfoStudent.setQueryType("0");//外网查重数据 String paperids = baseMapper.getWpFile(zyInfoStudent); @@ -460,6 +483,67 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl zyCcjgQueryWrapper = new QueryWrapper<>(); + zyCcjgQueryWrapper.eq("zy_stu_id",zyInfoStudent.getId()); + zyCcjgQueryWrapper.eq("create_by",zyInfoStudent.getCreateBy()); + zyCcjgQueryWrapper.eq("cc_type","3"); + zyCcjg = zyCcjgMapper.selectOne(zyCcjgQueryWrapper); + if(zyCcjg.getPaperid() != null){ + String dataids = zyCcjg.getPaperid(); + String bdkbs = zyCcjg.getBdkbs(); + String url2 = "https://vims.fanyu.com/toole/smallcheck/delData"; + delXfwWpFile(url2,bdkbs,dataids, null); + } + } catch (Exception e) { + e.printStackTrace(); + } + + String url = "https://vims.fanyu.com/toole/smallcheck/submitData"; + //文件路径,文件存在,不存在的话需要先下载下来 + String fileName = uploadpath+"/"+ zyInfoStudent.getFilePath(); + Map textMap = new HashMap(); + 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 fileMap = new HashMap(); + fileMap.put("file", fileName); + String contentType = "";//image/png + log.info("url--->"+url); + log.info("textMap--->"+textMap); + log.info("fileMap--->"+fileMap); + String ret = formUpload(url, textMap, fileMap,contentType); + log.info("ret--->"+ret); + 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.setPaperid(dataid); + zyCcjgMapper.updateById(zyCcjg); + } + } + //小范围对比开始检测 public String xfwbdKsjc(ZyCcjg zyCcjg,String sfpj) { String url = "https://vims.fanyu.com/toole/smallcheck/beginCheck";