添加新功能
This commit is contained in:
parent
4cb7757ed5
commit
b00b4b1673
|
@ -88,20 +88,21 @@ public class SyncJwxt extends BaseSync {
|
||||||
in1DataList.forEach(x -> out1DataList.add(BeanUtil.toBean(x, Xxhbjwxtscwjxx.class)));
|
in1DataList.forEach(x -> out1DataList.add(BeanUtil.toBean(x, Xxhbjwxtscwjxx.class)));
|
||||||
// in2DataList.forEach(x -> out2DataList.add(BeanUtil.toBean(x, Xxhbjwxtxsmd.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 {
|
try {
|
||||||
System.out.println("---------------------------------------------------------------------------");
|
System.out.println("---------------------------------------------------------------------------");
|
||||||
System.out.println("--------------第一个"+outDataList.size()+"--------------------");
|
System.out.println("--------------第一个"+outDataList.size()+"--------------------");
|
||||||
System.out.println("---------------------------------------------------------------------------");
|
System.out.println("---------------------------------------------------------------------------");
|
||||||
QueryWrapper dqw = new QueryWrapper();
|
|
||||||
impJxrwService.remove(dqw);
|
|
||||||
impJxrwService.syncList(outDataList);
|
impJxrwService.syncList(outDataList);
|
||||||
|
|
||||||
System.out.println("---------------------------------------------------------------------------");
|
System.out.println("---------------------------------------------------------------------------");
|
||||||
System.out.println("--------------第二个"+out1DataList.size()+"--------------------");
|
System.out.println("--------------第二个"+out1DataList.size()+"--------------------");
|
||||||
System.out.println("---------------------------------------------------------------------------");
|
System.out.println("---------------------------------------------------------------------------");
|
||||||
QueryWrapper dqw1 = new QueryWrapper();
|
|
||||||
impScwjxxService.remove(dqw1);
|
|
||||||
impScwjxxService.syncList(out1DataList);
|
impScwjxxService.syncList(out1DataList);
|
||||||
|
|
||||||
// System.out.println("---------------------------------------------------------------------------");
|
// System.out.println("---------------------------------------------------------------------------");
|
||||||
|
|
|
@ -88,4 +88,8 @@ public class JwxtJxrw implements Serializable {
|
||||||
@Excel(name = "jxbrs", width = 15)
|
@Excel(name = "jxbrs", width = 15)
|
||||||
@ApiModelProperty(value = "jxbrs")
|
@ApiModelProperty(value = "jxbrs")
|
||||||
private String jxbrs;
|
private String jxbrs;
|
||||||
|
/**jxbrs*/
|
||||||
|
@Excel(name = "fileShztmc", width = 15)
|
||||||
|
@ApiModelProperty(value = "fileShztmc")
|
||||||
|
private String fileShztmc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,4 +96,8 @@ public class Xxhbjwxtjxrw implements Serializable {
|
||||||
@Excel(name = "jxbrs", width = 15)
|
@Excel(name = "jxbrs", width = 15)
|
||||||
@ApiModelProperty(value = "jxbrs")
|
@ApiModelProperty(value = "jxbrs")
|
||||||
private String jxbrs;
|
private String jxbrs;
|
||||||
|
/**jxbrs*/
|
||||||
|
@Excel(name = "fileShztmc", width = 15)
|
||||||
|
@ApiModelProperty(value = "fileShztmc")
|
||||||
|
private String fileShztmc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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<String, Object> param){
|
||||||
|
|
||||||
|
if(param != null){
|
||||||
|
String paperId = (String)param.get("paperId");
|
||||||
|
zyCcjgService.updateCcjg(paperId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无参定时任务实现
|
||||||
|
*/
|
||||||
|
public void run(){
|
||||||
|
run(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -248,8 +248,8 @@ public class WjxWjxxController extends JeecgController<WjxWjxx, IWjxWjxxService>
|
||||||
|
|
||||||
|
|
||||||
List<WjxWjxxTmlbPage> list =wjxWjxx.getList();
|
List<WjxWjxxTmlbPage> list =wjxWjxx.getList();
|
||||||
|
String mainId = wjxWjxx.getId();
|
||||||
if(list.size()>0){
|
if(list.size()>0){
|
||||||
String mainId = list.get(0).getMainId();
|
|
||||||
|
|
||||||
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<WjxWjxxTmlb>();
|
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<WjxWjxxTmlb>();
|
||||||
wjxWjxxTmlbQueryWrapper.eq("main_id",mainId);
|
wjxWjxxTmlbQueryWrapper.eq("main_id",mainId);
|
||||||
|
@ -259,8 +259,10 @@ public class WjxWjxxController extends JeecgController<WjxWjxx, IWjxWjxxService>
|
||||||
}
|
}
|
||||||
|
|
||||||
for(WjxWjxxTmlbPage wjxWjxxTmlbPage:list){
|
for(WjxWjxxTmlbPage wjxWjxxTmlbPage:list){
|
||||||
|
wjxWjxxTmlbPage.setId(null);
|
||||||
WjxWjxxTmlb wjxWjxxTmlb = new WjxWjxxTmlb();
|
WjxWjxxTmlb wjxWjxxTmlb = new WjxWjxxTmlb();
|
||||||
BeanUtils.copyProperties(wjxWjxxTmlbPage, wjxWjxxTmlb);
|
BeanUtils.copyProperties(wjxWjxxTmlbPage, wjxWjxxTmlb);
|
||||||
|
wjxWjxxTmlb.setMainId(mainId);
|
||||||
wjxWjxxTmlbService.saveMain(wjxWjxxTmlb, wjxWjxxTmlbPage.getWjxWjxxTmxxList());
|
wjxWjxxTmlbService.saveMain(wjxWjxxTmlb, wjxWjxxTmlbPage.getWjxWjxxTmxxList());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,6 +137,10 @@ public class WjxWjxx implements Serializable {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String num;
|
private String num;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String titleNull;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
List<WjxWjxxTmlbPage> list;
|
List<WjxWjxxTmlbPage> list;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
<if test="param.id != null and param.id != ''">
|
<if test="param.id != null and param.id != ''">
|
||||||
and a.id = #{param.id}
|
and a.id = #{param.id}
|
||||||
</if>
|
</if>
|
||||||
|
<if test='param.titleNull != null and param.titleNull == "1"'>
|
||||||
|
and (a.title != null or a.title != '')
|
||||||
|
</if>
|
||||||
order by sort asc
|
order by sort asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,7 @@ public class WjxWjxxTmlb implements Serializable {
|
||||||
private java.lang.String wjSfqh;//是否切换 0系统 1自定义
|
private java.lang.String wjSfqh;//是否切换 0系统 1自定义
|
||||||
|
|
||||||
private String picPath;
|
private String picPath;
|
||||||
|
private String sftjtk;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String itemSelected;
|
private String itemSelected;
|
||||||
|
|
|
@ -50,6 +50,7 @@ public class WjxWjxxTmlbServiceImpl extends ServiceImpl<WjxWjxxTmlbMapper, WjxWj
|
||||||
wjxWjxxTmlbMapper.insert(wjxWjxxTmlb);
|
wjxWjxxTmlbMapper.insert(wjxWjxxTmlb);
|
||||||
if(wjxWjxxTmxxList!=null && wjxWjxxTmxxList.size()>0) {
|
if(wjxWjxxTmxxList!=null && wjxWjxxTmxxList.size()>0) {
|
||||||
for(WjxWjxxTmxx entity:wjxWjxxTmxxList) {
|
for(WjxWjxxTmxx entity:wjxWjxxTmxxList) {
|
||||||
|
entity.setId(null);
|
||||||
//外键设置
|
//外键设置
|
||||||
entity.setMainId(wjxWjxxTmlb.getId());
|
entity.setMainId(wjxWjxxTmlb.getId());
|
||||||
entity.setWjIndex(wjxWjxxTmlb.getWjIndex());
|
entity.setWjIndex(wjxWjxxTmlb.getWjIndex());
|
||||||
|
|
|
@ -85,6 +85,7 @@ public class WjxWjxxTmlbPage {
|
||||||
|
|
||||||
private String itemSelected;
|
private String itemSelected;
|
||||||
private String picPath;
|
private String picPath;
|
||||||
|
private String sftjtk;
|
||||||
|
|
||||||
private java.lang.String wjSfqh;//是否切换 0系统 1自定义
|
private java.lang.String wjSfqh;//是否切换 0系统 1自定义
|
||||||
|
|
||||||
|
|
|
@ -24,4 +24,6 @@ public interface IZyCcjgService extends IService<ZyCcjg> {
|
||||||
void deleteByZystuid(String id, HttpServletResponse response);
|
void deleteByZystuid(String id, HttpServletResponse response);
|
||||||
|
|
||||||
List<ZyCcjg> ccjglist(QueryWrapper<ZyCcjg> queryWrapper);
|
List<ZyCcjg> ccjglist(QueryWrapper<ZyCcjg> queryWrapper);
|
||||||
|
|
||||||
|
void updateCcjg(String paperId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,6 +129,43 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
||||||
return baseMapper.ccjglist(queryWrapper);
|
return baseMapper.ccjglist(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//更新指定查重结果
|
||||||
|
@Override
|
||||||
|
public void updateCcjg(String paperId) {
|
||||||
|
QueryWrapper<ZyCcjg> 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<String,String> aigcCxjcjg(ZyCcjg zyCcjg) {
|
public Map<String,String> aigcCxjcjg(ZyCcjg zyCcjg) {
|
||||||
String url = "https://vims.fanyu.com/tool/AIGCCheck/searchPaper";
|
String url = "https://vims.fanyu.com/tool/AIGCCheck/searchPaper";
|
||||||
|
@ -496,6 +533,22 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
||||||
}
|
}
|
||||||
zyInfoStudent.setXnxsl(cctgl + "");
|
zyInfoStudent.setXnxsl(cctgl + "");
|
||||||
zyInfoStudentService.updateById(zyInfoStudent);
|
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"))){
|
}else if(StringUtils.equals("3",object2.getString("filestateid"))){
|
||||||
zyInfoStudent.setWwsftg("失败:"+object.getString("message"));
|
zyInfoStudent.setWwsftg("失败:"+object.getString("message"));
|
||||||
}else{
|
}else{
|
||||||
|
@ -518,6 +571,27 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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");
|
||||||
|
System.out.println(message);
|
||||||
|
return "success";
|
||||||
|
}else{
|
||||||
|
return "false";
|
||||||
|
}
|
||||||
|
}
|
||||||
//生成sign
|
//生成sign
|
||||||
public static String getSign() {
|
public static String getSign() {
|
||||||
String userid = weipuId;
|
String userid = weipuId;
|
||||||
|
|
|
@ -181,6 +181,9 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
|
||||||
String xkrs = kcKechengbiao.getXkrs();
|
String xkrs = kcKechengbiao.getXkrs();
|
||||||
zyInfo1.setXkxs(xkrs);
|
zyInfo1.setXkxs(xkrs);
|
||||||
int wtj = Integer.parseInt(xkrs)-Integer.parseInt(zyInfo1.getDpynum())-Integer.parseInt(zyInfo1.getYpynum());
|
int wtj = Integer.parseInt(xkrs)-Integer.parseInt(zyInfo1.getDpynum())-Integer.parseInt(zyInfo1.getYpynum());
|
||||||
|
if(wtj<0){
|
||||||
|
wtj = 0;
|
||||||
|
}
|
||||||
zyInfo1.setWtjnum(wtj+"");
|
zyInfo1.setWtjnum(wtj+"");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -424,6 +424,103 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
||||||
return Result.OK("批量发布成功!");
|
return Result.OK("批量发布成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@AutoLog(value = "学生提交作业-批量发布")
|
||||||
|
@ApiOperation(value="学生提交作业-批量发布", notes="学生提交作业-批量发布")
|
||||||
|
@PostMapping(value = "/fabuBatch2")
|
||||||
|
public Result<String> fabuBatch2(@RequestBody ZyInfoStudent zyInfoStudent) {
|
||||||
|
|
||||||
|
|
||||||
|
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getId());
|
||||||
|
if(zyInfo == null){
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryWrapper<ZyInfoStudent> zyInfoStudentQueryWrapper = new QueryWrapper<>();
|
||||||
|
// zyInfoStudentQueryWrapper.isNull("a.score");
|
||||||
|
zyInfoStudentQueryWrapper.eq("b.id",zyInfo.getId());
|
||||||
|
zyInfoStudentQueryWrapper.eq("c.KCAPZBBH",zyInfo.getRwbh());
|
||||||
|
Page<ZyInfoStudent> page = new Page<ZyInfoStudent>(1, -1);
|
||||||
|
IPage<ZyInfoStudent> 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<ZyInfoStudent> 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<ZyInfoStudent> zyInfoStudentQueryWrapper = new QueryWrapper<>();
|
||||||
|
// zyInfoStudentQueryWrapper.eq("a.main_id",zyInfoStudent.getId());
|
||||||
|
// List<ZyInfoStudent> list = zyInfoStudentService.list(zyInfoStudentQueryWrapper);
|
||||||
|
// for(ZyInfoStudent par:list){
|
||||||
|
// UpdateWrapper<ZyInfoStudent> 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<ZyInfoStudent> zyInfoStudentQueryWrapper2 = new QueryWrapper<>();
|
||||||
|
// zyInfoStudentQueryWrapper2.eq("main_id",zyInfoStudent.getId());
|
||||||
|
// zyInfoStudentQueryWrapper2.eq("score_fabu","1");
|
||||||
|
// List<ZyInfoStudent> list2 = zyInfoStudentService.list(zyInfoStudentQueryWrapper2);
|
||||||
|
// int b = list2.size();
|
||||||
|
// if(a==b){
|
||||||
|
// UpdateWrapper<ZyInfo> 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<List<ZyInfoStudent>> xnccBatchWeipu(@RequestBody ZyInfoStudent zyInfoStudent, HttpServletResponse response) {
|
||||||
|
List<ZyInfoStudent> list = zyInfoStudentService.xnccBatchWeipu(zyInfoStudent, response);
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@AutoLog(value = "学生提交作业-批量发布")
|
||||||
|
@ApiOperation(value="学生提交作业-批量发布", notes="学生提交作业-批量发布")
|
||||||
|
@PostMapping(value = "/getNoScore")
|
||||||
|
public Result<List<ZyInfoStudent>> getNoScore(@RequestBody ZyInfoStudent zyInfoStudent) {
|
||||||
|
|
||||||
|
|
||||||
|
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getId());
|
||||||
|
if(zyInfo == null){
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryWrapper<ZyInfoStudent> zyInfoStudentQueryWrapper = new QueryWrapper<>();
|
||||||
|
zyInfoStudentQueryWrapper.isNull("a.score");
|
||||||
|
zyInfoStudentQueryWrapper.eq("b.id",zyInfo.getId());
|
||||||
|
zyInfoStudentQueryWrapper.eq("c.KCAPZBBH",zyInfo.getRwbh());
|
||||||
|
Page<ZyInfoStudent> page = new Page<ZyInfoStudent>(1, -1);
|
||||||
|
IPage<ZyInfoStudent> list = zyInfoStudentService.getList2(page,zyInfoStudentQueryWrapper);
|
||||||
|
return Result.OK(list.getRecords());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量发布
|
* 批量发布
|
||||||
*
|
*
|
||||||
|
@ -642,7 +739,7 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
||||||
System.out.println("filPath:"+zyInfoStudent.getFilePath());
|
System.out.println("filPath:"+zyInfoStudent.getFilePath());
|
||||||
System.out.println("docPath:"+docPath);
|
System.out.println("docPath:"+docPath);
|
||||||
System.out.println("pdfPath:"+pdfPath);
|
System.out.println("pdfPath:"+pdfPath);
|
||||||
PDFUtil.office2PDF(docPath,pdfPath);
|
// PDFUtil.office2PDF(docPath,pdfPath);
|
||||||
zyInfoStudent.setPdfPath("contract/"+namePath);
|
zyInfoStudent.setPdfPath("contract/"+namePath);
|
||||||
}else{
|
}else{
|
||||||
ZykInfo zykInfo = new ZykInfo();
|
ZykInfo zykInfo = new ZykInfo();
|
||||||
|
|
|
@ -46,4 +46,6 @@ public interface IZyInfoStudentService extends IService<ZyInfoStudent> {
|
||||||
IPage<ZyInfoStudent> getList2(Page<ZyInfoStudent> page, QueryWrapper<ZyInfoStudent> queryWrapper);
|
IPage<ZyInfoStudent> getList2(Page<ZyInfoStudent> page, QueryWrapper<ZyInfoStudent> queryWrapper);
|
||||||
|
|
||||||
List<ZyInfoStudent> getDocNoPdfList();
|
List<ZyInfoStudent> getDocNoPdfList();
|
||||||
|
|
||||||
|
List<ZyInfoStudent> xnccBatchWeipu(ZyInfoStudent zyInfoStudent, HttpServletResponse response);
|
||||||
}
|
}
|
||||||
|
|
|
@ -230,6 +230,29 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
||||||
return baseMapper.getDocNoPdfList();
|
return baseMapper.getDocNoPdfList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//校内查重批量提交
|
||||||
|
@Override
|
||||||
|
public List<ZyInfoStudent> 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<ZyInfoStudent> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("a.main_id",zyInfoStudent.getId());
|
||||||
|
queryWrapper.isNotNull("a.file_path");
|
||||||
|
List<ZyInfoStudent> 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) {
|
private void delweipulunwen(ZyInfoStudent zyInfoStudent, HttpServletResponse response) {
|
||||||
zyInfoStudent.setQueryType("0");//外网查重数据
|
zyInfoStudent.setQueryType("0");//外网查重数据
|
||||||
String paperids = baseMapper.getWpFile(zyInfoStudent);
|
String paperids = baseMapper.getWpFile(zyInfoStudent);
|
||||||
|
@ -460,6 +483,67 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主要用于教师发布评分后,统一发往维普留存比对库
|
||||||
|
* @param zyInfoStudent
|
||||||
|
* @param type
|
||||||
|
* @param response
|
||||||
|
*/
|
||||||
|
private void xnccUpdate(ZyInfoStudent zyInfoStudent,String type,HttpServletResponse response) {
|
||||||
|
|
||||||
|
ZyCcjg zyCcjg = new ZyCcjg();
|
||||||
|
try {
|
||||||
|
QueryWrapper<ZyCcjg> 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<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
|
||||||
|
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) {
|
public String xfwbdKsjc(ZyCcjg zyCcjg,String sfpj) {
|
||||||
String url = "https://vims.fanyu.com/toole/smallcheck/beginCheck";
|
String url = "https://vims.fanyu.com/toole/smallcheck/beginCheck";
|
||||||
|
|
Loading…
Reference in New Issue