修改bug
This commit is contained in:
parent
4b9964f6d7
commit
fcde7c9ed8
|
@ -757,7 +757,7 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
|
|||
//删除老师留过的作业,重新生成新的
|
||||
QueryWrapper<ZyInfo> query = new QueryWrapper<>();
|
||||
query.eq("rwbh", zyInfo.getRwbh());
|
||||
query.eq("create_by", zyInfo.getCreateBy());
|
||||
// query.eq("create_by", zyInfo.getCreateBy());
|
||||
query.eq("zy_leixing", "0");
|
||||
List<ZyInfo> oldList = zyInfoService.list(query);
|
||||
zyInfoService.remove(query);
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.jeecg.modules.kc.kcSysConfig.entity.KcSysConfig;
|
|||
import org.jeecg.modules.kc.kcSysConfig.service.IKcSysConfigService;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
|
||||
import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService;
|
||||
import org.jeecg.modules.kc.zyCcjg.entity.ZyCcjg;
|
||||
import org.jeecg.modules.kc.zyCcjg.service.IZyCcjgService;
|
||||
import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx;
|
||||
import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService;
|
||||
|
@ -966,6 +967,20 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
|||
@ApiOperation(value="学生作业开始检测", notes="学生作业开始检测")
|
||||
@RequestMapping(value = "/stuWpKsjc", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> stuWpKsjc(@RequestBody ZyInfoStudent zyInfoStudent, HttpServletResponse response) {
|
||||
// Date date = new Date();
|
||||
// QueryWrapper<ZyCcjg> zyCcjgStudentQueryWrapper = new QueryWrapper<>();
|
||||
// zyCcjgStudentQueryWrapper.eq("zy_stu_id",zyInfoStudent.getId());
|
||||
// List<ZyCcjg> list = zyCcjgService.list(zyCcjgStudentQueryWrapper);
|
||||
// if(list.size()>0){
|
||||
// Date date1 = list.get(0).getCreateTime();
|
||||
// long msNum = date1.getTime() - date.getTime(); // 时间戳相差的毫秒数
|
||||
// long seconds = msNum / 1000; // 转换为秒
|
||||
// if(seconds<=5){//如果是5s内重复操作,则给出提示,不允许继续操作
|
||||
// return Result.error("不可以重复点击!");
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
boolean bol = zyInfoStudentService.stuWpKsjc(zyInfoStudent, response);
|
||||
return Result.OK("提交成功!");
|
||||
}
|
||||
|
@ -1397,4 +1412,57 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
|||
map.put("downPath",downPath);
|
||||
return Result.OK(map);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="学生手动更新查重结果", notes="学生手动更新查重结果")
|
||||
@GetMapping(value = "/getStudentCcjg")
|
||||
public Result<Map<String,String>> getStudentCcjg(@RequestParam(name="id",required=true) String id) {
|
||||
Map<String,String> map = new HashMap<>();
|
||||
ZyInfoStudent zyInfoStudent = zyInfoStudentService.getById(id);
|
||||
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
|
||||
QueryWrapper<ZyCcjg> zyCcjgStudentQueryWrapper = new QueryWrapper<>();
|
||||
zyCcjgStudentQueryWrapper.eq("zy_stu_id",zyInfoStudent.getId());
|
||||
List<ZyCcjg> list = zyCcjgService.list(zyCcjgStudentQueryWrapper);
|
||||
Double wwtgl = zyInfo.getWwtgl();
|
||||
for(ZyCcjg par:list){
|
||||
if(StringUtils.equals(par.getCcType(),"0")){//外网
|
||||
String percetage = par.getPercentage();
|
||||
zyInfoStudent.setWwxsl(par.getPercentage());
|
||||
if(Double.parseDouble(percetage) <= wwtgl){
|
||||
zyInfoStudent.setWwsftg("通过");
|
||||
}else{
|
||||
zyInfoStudent.setWwsftg("未通过");
|
||||
}
|
||||
}else if(StringUtils.equals(par.getCcType(),"1")){//作业
|
||||
String percetage = par.getPercentage();
|
||||
zyInfoStudent.setNwxsl(par.getPercentage());
|
||||
if(Double.parseDouble(percetage) <= wwtgl){
|
||||
zyInfoStudent.setNwsftg("通过");
|
||||
}else{
|
||||
zyInfoStudent.setNwsftg("未通过");
|
||||
}
|
||||
}else if(StringUtils.equals(par.getCcType(),"2")){//aigc
|
||||
String percetage = par.getAiRate();
|
||||
zyInfoStudent.setAigcxsl(par.getAiRate());
|
||||
if(Double.parseDouble(percetage) <= wwtgl){
|
||||
zyInfoStudent.setAigcsftg("通过");
|
||||
}else{
|
||||
zyInfoStudent.setAigcsftg("未通过");
|
||||
}
|
||||
}else if(StringUtils.equals(par.getCcType(),"3")){//学校
|
||||
String percetage = par.getPercentage();
|
||||
zyInfoStudent.setXnxsl(par.getPercentage());
|
||||
if(Double.parseDouble(percetage) <= wwtgl){
|
||||
zyInfoStudent.setXnsftg("通过");
|
||||
}else{
|
||||
zyInfoStudent.setXnsftg("未通过");
|
||||
}
|
||||
}
|
||||
}
|
||||
zyInfoStudentService.updateById(zyInfoStudent);
|
||||
map.put("success","true");
|
||||
map.put("message","更新成功");
|
||||
|
||||
return Result.OK(map);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1288,7 +1288,7 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
try {
|
||||
URL url = new URL(urlStr);
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setConnectTimeout(5000);
|
||||
conn.setConnectTimeout(60000);
|
||||
conn.setReadTimeout(30000);
|
||||
conn.setDoOutput(true);
|
||||
conn.setDoInput(true);
|
||||
|
|
Loading…
Reference in New Issue