修改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 from wjx_wjxx a
inner join wjx_djxx b on a.vid = b.vid inner join wjx_djxx b on a.vid = b.vid
where a.id = #{params.id} 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 order by b.user_id
</select> </select>
@ -132,6 +138,12 @@
) y ) y
on y.KCAPZBBH = x.rwbh on y.KCAPZBBH = x.rwbh
WHERE x.id = #{params.id} 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( and y.xh not in(
select user_id from wjx_djxx c where c.vid = x.vid select user_id from wjx_djxx c where c.vid = x.vid
) )
@ -149,6 +161,12 @@
on y.KCAPZBBH = a.rwbh on y.KCAPZBBH = a.rwbh
left join wjx_djxx b on a.vid = b.vid and y.xh = b.user_id left join wjx_djxx b on a.vid = b.vid and y.xh = b.user_id
where a.id = #{params.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 order by b.total_score desc
</select> </select>
</mapper> </mapper>

View File

@ -112,6 +112,24 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
QueryWrapper<ZyInfoStudent> queryWrapper = QueryGenerator.initQueryWrapper("a",zyInfoStudent, req.getParameterMap()); QueryWrapper<ZyInfoStudent> queryWrapper = QueryGenerator.initQueryWrapper("a",zyInfoStudent, req.getParameterMap());
Page<ZyInfoStudent> page = new Page<ZyInfoStudent>(pageNo, pageSize); Page<ZyInfoStudent> page = new Page<ZyInfoStudent>(pageNo, pageSize);
IPage<ZyInfoStudent> pageList = zyInfoStudentService.page(page, queryWrapper); 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); return Result.OK(pageList);
} }
@ -235,7 +253,6 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
* @param request * @param request
* @param zyInfoStudent * @param zyInfoStudent
*/ */
@RequiresPermissions("zyInfoStudent:zy_info_student:exportXls")
@RequestMapping(value = "/exportXls") @RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyInfoStudent zyInfoStudent) { public ModelAndView exportXls(HttpServletRequest request, ZyInfoStudent zyInfoStudent) {
return super.exportXls(request, zyInfoStudent, ZyInfoStudent.class, "学生提交作业"); return super.exportXls(request, zyInfoStudent, ZyInfoStudent.class, "学生提交作业");

View File

@ -34,14 +34,6 @@ public class ZyInfoStudent implements Serializable {
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private java.lang.String 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*/ /**updateBy*/
@ApiModelProperty(value = "updateBy") @ApiModelProperty(value = "updateBy")
private java.lang.String updateBy; private java.lang.String updateBy;
@ -50,14 +42,21 @@ public class ZyInfoStudent implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "updateTime") @ApiModelProperty(value = "updateTime")
private java.util.Date updateTime; private java.util.Date updateTime;
/**作业名称*/
@Excel(name = "作业名称", width = 15)
@ApiModelProperty(value = "作业名称") @Excel(name = "学生姓名", width = 15)
private java.lang.String mainId; @ApiModelProperty(value = "studentName")
/**作业附件*/ private java.lang.String studentName;
@Excel(name = "作业附件", width = 15) @Excel(name = "学生学号", width = 15)
@ApiModelProperty(value = "作业附件") @ApiModelProperty(value = "createBy")
private java.lang.String filePath; 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) @Excel(name = "外网相似律", width = 15)
@ApiModelProperty(value = "外网相似律") @ApiModelProperty(value = "外网相似律")
@ -70,24 +69,30 @@ public class ZyInfoStudent implements Serializable {
@Excel(name = "aigc相似律", width = 15) @Excel(name = "aigc相似律", width = 15)
@ApiModelProperty(value = "aigc相似律") @ApiModelProperty(value = "aigc相似律")
private java.lang.String aigcxsl; private java.lang.String aigcxsl;
@Excel(name = "存档类型", width = 15)
@Dict(dicCode = "cdlx")
private String cdlx;//存档类型
/**作业名称*/
@ApiModelProperty(value = "作业名称")
private java.lang.String mainId;
/**作业附件*/
@ApiModelProperty(value = "作业附件")
private java.lang.String filePath;
/**外网是否通过*/ /**外网是否通过*/
@Excel(name = "外网是否通过", width = 15)
@ApiModelProperty(value = "外网是否通过") @ApiModelProperty(value = "外网是否通过")
private java.lang.String wwsftg; private java.lang.String wwsftg;
/**内网是否通过*/ /**内网是否通过*/
@Excel(name = "内网是否通过", width = 15)
@ApiModelProperty(value = "内网是否通过") @ApiModelProperty(value = "内网是否通过")
private java.lang.String nwsftg; private java.lang.String nwsftg;
/**aigc是否通过*/ /**aigc是否通过*/
@Excel(name = "aigc是否通过", width = 15)
@ApiModelProperty(value = "aigc是否通过") @ApiModelProperty(value = "aigc是否通过")
private java.lang.String aigcsftg; private java.lang.String aigcsftg;
private java.lang.String studentName;
private java.lang.String score;
private java.lang.String pdfPath; private java.lang.String pdfPath;
private String scoreFabu; private String scoreFabu;
@Dict(dicCode = "cdlx")
private String cdlx;//存档类型
@TableField(exist = false) @TableField(exist = false)
private String catename; private String catename;
@ -104,4 +109,29 @@ public class ZyInfoStudent implements Serializable {
private String zyname; private String zyname;
@TableField(exist = false) @TableField(exist = false)
private String teacherNo; 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.apache.ibatis.annotations.Param;
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
import java.util.List;
/** /**
* @Description: 学生提交作业 * @Description: 学生提交作业
* @Author: jeecg-boot * @Author: jeecg-boot
@ -19,4 +21,6 @@ public interface ZyInfoStudentMapper extends BaseMapper<ZyInfoStudent> {
void deleteMainId(@Param("mainId") String id); void deleteMainId(@Param("mainId") String id);
IPage<ZyInfoStudent> cdxxlist(Page<ZyInfoStudent> page,@Param(Constants.WRAPPER) QueryWrapper<ZyInfoStudent> queryWrapper); 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 left join zy_info b on a.main_id = b.id
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </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 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 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 left join zy_info b on a.main_id = b.id
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </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> </mapper>

View File

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/** /**
* @Description: 学生提交作业 * @Description: 学生提交作业
* @Author: jeecg-boot * @Author: jeecg-boot
@ -23,4 +25,6 @@ public interface IZyInfoStudentService extends IService<ZyInfoStudent> {
void editFabu(ZyInfoStudent zyInfoStudent); void editFabu(ZyInfoStudent zyInfoStudent);
IPage<ZyInfoStudent> cdxxlist(Page<ZyInfoStudent> page, QueryWrapper<ZyInfoStudent> queryWrapper); 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.net.URL;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.*;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/** /**
* @Description: 学生提交作业 * @Description: 学生提交作业
@ -131,6 +128,11 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
return baseMapper.cdxxlist(page,queryWrapper); return baseMapper.cdxxlist(page,queryWrapper);
} }
@Override
public List<ZyInfoStudent> getCcjg(ZyInfoStudent zyInfoStudent) {
return baseMapper.getCcjg(zyInfoStudent);
}
//aigc提交 //aigc提交
private void aigcSave(ZyInfoStudent zyInfoStudent) { private void aigcSave(ZyInfoStudent zyInfoStudent) {
String url = "https://vims.fanyu.com/tool/AIGCCheck/paperSubmit"; String url = "https://vims.fanyu.com/tool/AIGCCheck/paperSubmit";