修改bug

This commit is contained in:
yangjun 2024-05-28 15:06:38 +08:00
parent 873d80fe19
commit 342e37594a
7 changed files with 127 additions and 34 deletions

View File

@ -119,6 +119,12 @@
from wjx_wjxx a
inner join wjx_djxx b on a.vid = b.vid
where a.id = #{params.id}
<if test="params.userId!=null and params.userId != ''">
and b.user_id like concat('%',#{params.userId},'%')
</if>
<if test="params.userName!=null and params.userName != ''">
and b.user_name like concat('%',#{params.userName},'%')
</if>
order by b.user_id
</select>
@ -132,6 +138,12 @@
) y
on y.KCAPZBBH = x.rwbh
WHERE x.id = #{params.id}
<if test="params.userId!=null and params.userId != ''">
and y.xh like concat('%',#{params.userId},'%')
</if>
<if test="params.userName!=null and params.userName != ''">
and y.xm like concat('%',#{params.userName},'%')
</if>
and y.xh not in(
select user_id from wjx_djxx c where c.vid = x.vid
)
@ -149,6 +161,12 @@
on y.KCAPZBBH = a.rwbh
left join wjx_djxx b on a.vid = b.vid and y.xh = b.user_id
where a.id = #{params.id}
<if test="params.userId!=null and params.userId != ''">
and y.xh like concat('%',#{params.userId},'%')
</if>
<if test="params.userName!=null and params.userName != ''">
and y.xm like concat('%',#{params.userName},'%')
</if>
order by b.total_score desc
</select>
</mapper>

View File

@ -112,6 +112,24 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
QueryWrapper<ZyInfoStudent> queryWrapper = QueryGenerator.initQueryWrapper("a",zyInfoStudent, req.getParameterMap());
Page<ZyInfoStudent> page = new Page<ZyInfoStudent>(pageNo, pageSize);
IPage<ZyInfoStudent> pageList = zyInfoStudentService.page(page, queryWrapper);
for(ZyInfoStudent ZyInfoStudentPar:pageList.getRecords()){
List<ZyInfoStudent> list = zyInfoStudentService.getCcjg(ZyInfoStudentPar);
for(ZyInfoStudent par:list){
if(StringUtils.equals(par.getCcType(),"0")){//外网
ZyInfoStudentPar.setWwpaperdownurl(par.getPaperdownurl());
ZyInfoStudentPar.setWwpaperviewurl(par.getPaperviewurl());
}else if(StringUtils.equals(par.getCcType(),"1")){//作业
ZyInfoStudentPar.setZypaperdownurl(par.getPaperdownurl());
ZyInfoStudentPar.setZypaperviewurl(par.getPaperviewurl());
}else if(StringUtils.equals(par.getCcType(),"2")){//aigc
ZyInfoStudentPar.setAigcpaperdownurl(par.getPaperdownurl());
ZyInfoStudentPar.setAigcpaperviewurl(par.getPaperviewurl());
}else if(StringUtils.equals(par.getCcType(),"3")){//学校
ZyInfoStudentPar.setXxpaperdownurl(par.getPaperdownurl());
ZyInfoStudentPar.setXxpaperviewurl(par.getPaperviewurl());
}
}
}
return Result.OK(pageList);
}
@ -235,7 +253,6 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
* @param request
* @param zyInfoStudent
*/
@RequiresPermissions("zyInfoStudent:zy_info_student:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyInfoStudent zyInfoStudent) {
return super.exportXls(request, zyInfoStudent, ZyInfoStudent.class, "学生提交作业");

View File

@ -34,14 +34,6 @@ public class ZyInfoStudent implements Serializable {
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**createBy*/
@ApiModelProperty(value = "createBy")
private java.lang.String createBy;
/**createTime*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "createTime")
private java.util.Date createTime;
/**updateBy*/
@ApiModelProperty(value = "updateBy")
private java.lang.String updateBy;
@ -50,44 +42,57 @@ public class ZyInfoStudent implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "updateTime")
private java.util.Date updateTime;
@Excel(name = "学生姓名", width = 15)
@ApiModelProperty(value = "studentName")
private java.lang.String studentName;
@Excel(name = "学生学号", width = 15)
@ApiModelProperty(value = "createBy")
private java.lang.String createBy;
@Excel(name = "提交时间", width = 15,format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "createTime")
private java.util.Date createTime;
@Excel(name = "评分", width = 15)
private java.lang.String score;
/**外网相似律*/
@Excel(name = "外网相似律", width = 15)
@ApiModelProperty(value = "外网相似律")
private java.lang.String wwxsl;
/**内网相似律*/
@Excel(name = "内网相似律", width = 15)
@ApiModelProperty(value = "内网相似律")
private java.lang.String nwxsl;
/**aigc相似律*/
@Excel(name = "aigc相似律", width = 15)
@ApiModelProperty(value = "aigc相似律")
private java.lang.String aigcxsl;
@Excel(name = "存档类型", width = 15)
@Dict(dicCode = "cdlx")
private String cdlx;//存档类型
/**作业名称*/
@Excel(name = "作业名称", width = 15)
@ApiModelProperty(value = "作业名称")
private java.lang.String mainId;
/**作业附件*/
@Excel(name = "作业附件", width = 15)
@ApiModelProperty(value = "作业附件")
private java.lang.String filePath;
/**外网相似律*/
@Excel(name = "外网相似律", width = 15)
@ApiModelProperty(value = "外网相似律")
private java.lang.String wwxsl;
/**内网相似律*/
@Excel(name = "内网相似律", width = 15)
@ApiModelProperty(value = "内网相似律")
private java.lang.String nwxsl;
/**aigc相似律*/
@Excel(name = "aigc相似律", width = 15)
@ApiModelProperty(value = "aigc相似律")
private java.lang.String aigcxsl;
/**外网是否通过*/
@Excel(name = "外网是否通过", width = 15)
@ApiModelProperty(value = "外网是否通过")
private java.lang.String wwsftg;
/**内网是否通过*/
@Excel(name = "内网是否通过", width = 15)
@ApiModelProperty(value = "内网是否通过")
private java.lang.String nwsftg;
/**aigc是否通过*/
@Excel(name = "aigc是否通过", width = 15)
@ApiModelProperty(value = "aigc是否通过")
private java.lang.String aigcsftg;
private java.lang.String studentName;
private java.lang.String score;
private java.lang.String pdfPath;
private String scoreFabu;
@Dict(dicCode = "cdlx")
private String cdlx;//存档类型
@TableField(exist = false)
private String catename;
@ -104,4 +109,29 @@ public class ZyInfoStudent implements Serializable {
private String zyname;
@TableField(exist = false)
private String teacherNo;
@TableField(exist = false)
private String ccType;
@TableField(exist = false)
private String paperviewurl;
@TableField(exist = false)
private String paperdownurl;
@TableField(exist = false)
private String wwpaperviewurl;//外网预览
@TableField(exist = false)
private String wwpaperdownurl;//外网下载
@TableField(exist = false)
private String zypaperviewurl;//作业预览
@TableField(exist = false)
private String zypaperdownurl;//作业下载
@TableField(exist = false)
private String xxpaperviewurl;//学校预览
@TableField(exist = false)
private String xxpaperdownurl;//学校下载
@TableField(exist = false)
private String aigcpaperviewurl;//aigc预览
@TableField(exist = false)
private String aigcpaperdownurl;//aigc外网下载
}

View File

@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
import java.util.List;
/**
* @Description: 学生提交作业
* @Author: jeecg-boot
@ -19,4 +21,6 @@ public interface ZyInfoStudentMapper extends BaseMapper<ZyInfoStudent> {
void deleteMainId(@Param("mainId") String id);
IPage<ZyInfoStudent> cdxxlist(Page<ZyInfoStudent> page,@Param(Constants.WRAPPER) QueryWrapper<ZyInfoStudent> queryWrapper);
List<ZyInfoStudent> getCcjg(ZyInfoStudent zyInfoStudent);
}

View File

@ -10,10 +10,28 @@
left join zy_info b on a.main_id = b.id
${ew.customSqlSegment}
</select>
<select id="selectList" resultType="org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent">
select a.*,b.wwcc,b.nwcc,b.aigccc,b.title as zyname from zy_info_student a
left join zy_info b on a.main_id = b.id
${ew.customSqlSegment}
</select>
<select id="cdxxlist" resultType="org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent">
select a.*,b.wwcc,b.nwcc,b.aigccc,b.title as zyname from zy_info_student a
left join zy_info b on a.main_id = b.id
${ew.customSqlSegment}
</select>
<select id="getCcjg" resultType="org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent">
select * from zy_ccjg a
inner join
(SELECT cc_type,max(checkdate) checkdate,zy_stu_id
FROM zy_ccjg
WHERE zy_stu_id = #{id} AND filestateid = '2'
GROUP BY cc_type,zy_stu_id) t
on a.cc_type = t.cc_type
and a.checkdate = t.checkdate
and a.zy_stu_id = t.zy_stu_id
</select>
</mapper>

View File

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 学生提交作业
* @Author: jeecg-boot
@ -23,4 +25,6 @@ public interface IZyInfoStudentService extends IService<ZyInfoStudent> {
void editFabu(ZyInfoStudent zyInfoStudent);
IPage<ZyInfoStudent> cdxxlist(Page<ZyInfoStudent> page, QueryWrapper<ZyInfoStudent> queryWrapper);
List<ZyInfoStudent> getCcjg(ZyInfoStudent zyInfoStudent);
}

View File

@ -33,10 +33,7 @@ import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.*;
/**
* @Description: 学生提交作业
@ -131,6 +128,11 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
return baseMapper.cdxxlist(page,queryWrapper);
}
@Override
public List<ZyInfoStudent> getCcjg(ZyInfoStudent zyInfoStudent) {
return baseMapper.getCcjg(zyInfoStudent);
}
//aigc提交
private void aigcSave(ZyInfoStudent zyInfoStudent) {
String url = "https://vims.fanyu.com/tool/AIGCCheck/paperSubmit";