修改bug
This commit is contained in:
parent
3ffe7c3a17
commit
04fa67adf1
|
@ -518,6 +518,7 @@ public class BlZyccServiceImpl extends ServiceImpl<BlZyccMapper, BlZycc> impleme
|
|||
String inputName = (String) entry.getKey();
|
||||
String inputValue = (String) entry.getValue();
|
||||
if (inputValue == null) {
|
||||
|
||||
continue;
|
||||
}
|
||||
strBuf.append("\r\n").append("--").append(BOUNDARY).append("\r\n");
|
||||
|
|
|
@ -15,8 +15,10 @@ import com.beust.jcommander.internal.Sets;
|
|||
import com.google.common.collect.Maps;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.kc.detection.entity.KcDetectionDetailed;
|
||||
import org.jeecg.modules.kc.detection.entity.KcDetectionMain;
|
||||
|
@ -28,7 +30,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbuser;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbuserService;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
|
@ -63,6 +68,10 @@ public class KcDetectionMainController extends JeecgController<KcDetectionMain,
|
|||
@Autowired
|
||||
private IKcDetectionDetailedService kcDetectionDetailedService;
|
||||
|
||||
@Autowired
|
||||
private SysBaseApiImpl sysBaseApi;
|
||||
@Autowired
|
||||
private IXxhbuserService xxhbuserService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
@ -173,6 +182,131 @@ public class KcDetectionMainController extends JeecgController<KcDetectionMain,
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping(value = "/syslist")
|
||||
public Result<IPage<KcDetectionMain>> syslist(KcDetectionMain kcDetectionMain,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcDetectionMain> queryWrapper = QueryGenerator.initQueryWrapper(kcDetectionMain, req.getParameterMap());
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<Xxhbuser> uqw = new QueryWrapper<>();
|
||||
uqw.eq("gh",sysUser.getUsername());
|
||||
uqw.last("limit 1");
|
||||
Xxhbuser xxhbUser = xxhbuserService.getOne(uqw);
|
||||
if(xxhbUser == null) {
|
||||
return Result.OK(new Page<>());
|
||||
}
|
||||
queryWrapper.eq("ketangbiao_info ->'$.kkdw'",xxhbUser.getDwmc());
|
||||
}
|
||||
|
||||
|
||||
//补充搜索
|
||||
if(StringUtils.isNotBlank(kcDetectionMain.getSearchSkrq())){
|
||||
//线上数据库不支持
|
||||
//queryWrapper.eq("JSON_VALUE(ketangbiao_info,'$.skrq')", kcDetectionMain.getSearchSkrq());
|
||||
queryWrapper.eq("ketangbiao_info ->'$.skrq'", kcDetectionMain.getSearchSkrq());
|
||||
}
|
||||
if(StringUtils.isNotBlank(kcDetectionMain.getSearchHh())){
|
||||
queryWrapper.eq("ketangbiao_info -> '$.hh'", kcDetectionMain.getSearchHh());
|
||||
}
|
||||
|
||||
// if(StringUtils.isNotBlank(kcDetectionMain.getSearchHh())){
|
||||
// queryWrapper.eq("ketangbiao_info -> '$.hh'", kcDetectionMain.getSearchHh());
|
||||
// }
|
||||
|
||||
if(StringUtils.isNotBlank(kcDetectionMain.getSkjs())){
|
||||
queryWrapper.like("ketangbiao_info -> '$.skjs'", kcDetectionMain.getSkjs());
|
||||
}
|
||||
Page<KcDetectionMain> page = new Page<>(pageNo, pageSize);
|
||||
IPage<KcDetectionMain> pageList = kcDetectionMainService.page(page, queryWrapper);
|
||||
//补充查询子列表
|
||||
if(kcDetectionMain.getIsSelectKcDetailed() != null && kcDetectionMain.getIsSelectKcDetailed()){
|
||||
Set<String> pidSet = Sets.newHashSet();
|
||||
Map<String, KcDetectionMain> detectionMainMap = Maps.newHashMap();
|
||||
pageList.getRecords().forEach(x -> {
|
||||
pidSet.add(x.getId());
|
||||
detectionMainMap.put(x.getId(),x);
|
||||
x.setDetectionDetailedList(Lists.newArrayList());
|
||||
if(x.getKetangbiaoInfo() == null){
|
||||
x.setKetangbiaoInfo(new KcKetangbiao());
|
||||
}
|
||||
} );
|
||||
if(!pidSet.isEmpty()){
|
||||
QueryWrapper<KcDetectionDetailed> qw = new QueryWrapper<>();
|
||||
qw.lambda().in(KcDetectionDetailed::getPid,pidSet);
|
||||
// qw.orderByAsc("detection_num");
|
||||
qw.orderByAsc("create_time");
|
||||
List<KcDetectionDetailed> detailedList = kcDetectionDetailedService.list(qw);
|
||||
detailedList.forEach(x -> {
|
||||
if(detectionMainMap.containsKey(x.getPid())){
|
||||
KcDetectionMain pData = detectionMainMap.get(x.getPid());
|
||||
pData.getDetectionDetailedList().add(x);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
List<KcDetectionMain> alist = pageList.getRecords();
|
||||
for(KcDetectionMain par: alist){
|
||||
List<KcDetectionDetailed> blist = par.getDetectionDetailedList();
|
||||
int anum = 0;//第一次抓取人数
|
||||
int bnum = 0;//第二次抓取人数
|
||||
int cnum = 0;//第三次抓取人数
|
||||
if(blist.size()>=2){
|
||||
for(int i=0;i<blist.size();i++){
|
||||
KcDetectionDetailed bpar = blist.get(i);
|
||||
if(i==0){
|
||||
anum = bpar.getNum();
|
||||
}else if (i==1){
|
||||
bnum = bpar.getNum();
|
||||
}else if (i==2){
|
||||
cnum = bpar.getNum();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(bnum!=0){
|
||||
if(anum!=0){
|
||||
if(bnum-anum<0){
|
||||
par.setCdrs("0");
|
||||
}else{
|
||||
par.setCdrs(String.valueOf(bnum-anum));
|
||||
}
|
||||
}else{
|
||||
par.setCdrs("0");
|
||||
}
|
||||
if(cnum!=0){
|
||||
if(bnum-cnum<0){
|
||||
par.setZtrs("0");
|
||||
}else{
|
||||
par.setZtrs(String.valueOf(bnum-cnum));
|
||||
}
|
||||
}else{
|
||||
par.setZtrs("0");
|
||||
}
|
||||
}else{
|
||||
par.setCdrs("0");
|
||||
par.setZtrs("0");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 添加
|
||||
// *
|
||||
|
|
|
@ -85,7 +85,7 @@ public class ZyCcjgController extends JeecgController<ZyCcjg, IZyCcjgService> {
|
|||
HttpServletRequest req) {
|
||||
|
||||
//查询作业查重结果
|
||||
zyCcjgService.getCcjg();
|
||||
// zyCcjgService.getCcjg();
|
||||
|
||||
QueryWrapper<ZyCcjg> queryWrapper = QueryGenerator.initQueryWrapper("a",zyCcjg, req.getParameterMap());
|
||||
if(StringUtils.isEmpty(zyCcjg.getFilestateid())){
|
||||
|
|
|
@ -28,4 +28,6 @@ public interface IZyCcjgService extends IService<ZyCcjg> {
|
|||
void updateCcjg(String paperId);
|
||||
|
||||
void delByPaperId(String paperId);
|
||||
|
||||
void getCxtj();
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
|||
import org.jeecg.modules.kc.zyInfo.service.IZyInfoService;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.mapper.ZyInfoStudentMapper;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudent2Service;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
@ -73,12 +74,15 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
|||
|
||||
@Autowired
|
||||
private IZyInfoStudentService zyInfoNewStudentService;
|
||||
@Autowired
|
||||
private IZyInfoStudent2Service zyInfoNewStudent2Service;
|
||||
|
||||
|
||||
@Override
|
||||
public void getCcjg() {
|
||||
QueryWrapper<ZyCcjg> zyCcjgQueryWrapper = new QueryWrapper<>();
|
||||
zyCcjgQueryWrapper.in("filestateid",0,1);//检测状态(1:检测中,2:检测完成,3:检测失败,0:未检测)
|
||||
|
||||
List<ZyCcjg> list = baseMapper.selectList(zyCcjgQueryWrapper);
|
||||
for(ZyCcjg par : list){
|
||||
//查重类型(0外网 1内网 2aigc 3校内)
|
||||
|
@ -171,6 +175,17 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCxtj() {
|
||||
List<ZyInfoStudent> list = zyInfoStudentService.getDtjzyxx();
|
||||
HttpServletResponse response = null;
|
||||
for(ZyInfoStudent zyInfoStudent:list){
|
||||
if(zyInfoStudent!=null && StringUtils.isNotBlank(zyInfoStudent.getFilePath())){
|
||||
zyInfoNewStudent2Service.stuWpKsjc(zyInfoStudent,response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Map<String,String> aigcCxjcjg(ZyCcjg zyCcjg) {
|
||||
String url = "https://vims.fanyu.com/tool/AIGCCheck/searchPaper";
|
||||
|
|
|
@ -751,6 +751,9 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
|||
}
|
||||
|
||||
}else{
|
||||
if(StringUtils.isNotEmpty(stuPar.getFilePath())){
|
||||
return Result.error("您已上传了作业,请刷新后尝试");
|
||||
}
|
||||
stuPar.setFilePath(zyInfoStudent.getFilePath());
|
||||
|
||||
zyInfoStudent =stuPar;
|
||||
|
|
|
@ -129,6 +129,7 @@ public class ZyInfoStudent implements Serializable {
|
|||
private String hpcs;
|
||||
private String jxfs2;
|
||||
private String zyLeixing;//作业类型 0课程作业 1期末作业
|
||||
// @Excel(name = "批阅内容", width = 15 )
|
||||
private String pyContent;//批阅内容
|
||||
private String pyFilePath;//批阅附件
|
||||
private String sfsckhcl;//是否上传考核材料(0否 1是)
|
||||
|
|
|
@ -58,4 +58,6 @@ public interface ZyInfoStudentMapper extends BaseMapper<ZyInfoStudent> {
|
|||
List<ZyInfoStudent> getZyStuIdById(@Param("dto") ZyXzryInfo zyXzryInfo);
|
||||
|
||||
void insertXbkhcl(ZyInfoStudentXbkhcl zyInfoStudentXbkhcl);
|
||||
|
||||
List<ZyInfoStudent> getDtjzyxx();
|
||||
}
|
||||
|
|
|
@ -236,4 +236,10 @@
|
|||
</insert>
|
||||
|
||||
|
||||
<select id="getDtjzyxx" resultType="org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent">
|
||||
select a.*,a.id as stu_id from (select * from zy_info_student where main_id in (select id from zy_info where wwtgl is not null and create_time >='2025-01-01')) a
|
||||
LEFT JOIN zy_ccjg b on a.id = b.zy_stu_id
|
||||
where a.file_path is not null and a.wwxsl is null and b.id is null
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -699,6 +699,10 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
textMap.put("title", title);
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if(sysUser==null){
|
||||
sysUser.setUsername(zyInfoStudent.getCreateBy());
|
||||
sysUser.setRealname(zyInfoStudent.getStudentName());
|
||||
}
|
||||
textMap.put("number", sysUser.getUsername());
|
||||
textMap.put("author", sysUser.getRealname());
|
||||
//设置file的name,路径
|
||||
|
@ -775,6 +779,10 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
//可以设置多个input的name,value
|
||||
String sign = getSign();
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if(sysUser==null){
|
||||
sysUser.setUsername(zyInfoStudent.getCreateBy());
|
||||
sysUser.setRealname(zyInfoStudent.getStudentName());
|
||||
}
|
||||
textMap.put("sign", sign);
|
||||
textMap.put("userid", weipuId);
|
||||
textMap.put("title", title);//标题
|
||||
|
@ -831,6 +839,10 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
//可以设置多个input的name,value
|
||||
String sign = getSign();
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if(sysUser==null){
|
||||
sysUser.setUsername(zyInfoStudent.getCreateBy());
|
||||
sysUser.setRealname(zyInfoStudent.getStudentName());
|
||||
}
|
||||
textMap.put("sign", sign);
|
||||
textMap.put("userid", weipuId);
|
||||
textMap.put("title", title);//标题
|
||||
|
@ -914,6 +926,10 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
//可以设置多个input的name,value
|
||||
String sign = getSign();
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if(sysUser==null){
|
||||
sysUser.setUsername(zyInfoStudent.getCreateBy());
|
||||
sysUser.setRealname(zyInfoStudent.getStudentName());
|
||||
}
|
||||
textMap.put("sign", sign);
|
||||
textMap.put("userid", weipuId);
|
||||
textMap.put("title", title);//标题
|
||||
|
@ -964,6 +980,10 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
//外网查重提交方法
|
||||
private String wwccSave(ZyInfoStudent zyInfoStudent, HttpServletResponse response) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if(sysUser==null){
|
||||
sysUser.setUsername(zyInfoStudent.getCreateBy());
|
||||
sysUser.setRealname(zyInfoStudent.getStudentName());
|
||||
}
|
||||
String url = "https://vims.fanyu.com/toole/jianceorgan/papersubmit.aspx";
|
||||
//文件路径,文件存在,不存在的话需要先下载下来
|
||||
// String fileName = downloadpath+"/"+ zyInfoStudent.getFilePath();
|
||||
|
|
|
@ -105,9 +105,9 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
|
|||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ZyJxdg> queryWrapper = new QueryWrapper<ZyJxdg>();
|
||||
queryWrapper.eq("create_by",sysUser.getUsername());
|
||||
queryWrapper.eq("kcbh",zyJxdg.getKcbh());
|
||||
queryWrapper.ne("rwbh",zyJxdg.getRwbh());
|
||||
queryWrapper.ne("xqxn",zyJxdg.getXqxn());
|
||||
queryWrapper.eq(StringUtils.isNotEmpty(zyJxdg.getKcbh()),"kcbh",zyJxdg.getKcbh());
|
||||
queryWrapper.ne(StringUtils.isNotEmpty(zyJxdg.getRwbh()),"rwbh",zyJxdg.getRwbh());
|
||||
queryWrapper.ne(StringUtils.isNotEmpty(zyJxdg.getXqxn()),"xqxn",zyJxdg.getXqxn());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
Page<ZyJxdg> page = new Page<ZyJxdg>(pageNo, pageSize);
|
||||
IPage<ZyJxdg> pageList = zyJxdgService.page(page, queryWrapper);
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -29,15 +30,29 @@ public class ZyJxdgServiceImpl extends ServiceImpl<ZyJxdgMapper, ZyJxdg> impleme
|
|||
public void editJxdgyy(ZyJxdg zyJxdg) {
|
||||
|
||||
QueryWrapper<ZyJxdg> queryWrapper = new QueryWrapper<ZyJxdg>();
|
||||
queryWrapper.eq("rwbh",zyJxdg.getRwbh());
|
||||
queryWrapper.eq("xqxn",zyJxdg.getXqxn());
|
||||
queryWrapper.eq(StringUtils.isNotEmpty(zyJxdg.getRwbh()),"rwbh",zyJxdg.getRwbh());
|
||||
queryWrapper.eq(StringUtils.isNotEmpty(zyJxdg.getXqxn()),"xqxn",zyJxdg.getXqxn());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
queryWrapper.eq("create_by",sysUser.getUsername());
|
||||
queryWrapper.last("limit 1");
|
||||
ZyJxdg zyJxdgNew = baseMapper.selectOne(queryWrapper);
|
||||
// zyJxdgNew.setFilePath(zyJxdg.getFilePath());
|
||||
// zyJxdgNew.setSkjs(zyJxdg.getSkjs());
|
||||
if(zyJxdgNew==null){
|
||||
queryWrapper = new QueryWrapper<ZyJxdg>();
|
||||
queryWrapper.eq("create_by",sysUser.getUsername());
|
||||
queryWrapper.last("limit 1");
|
||||
zyJxdgNew = baseMapper.selectOne(queryWrapper);
|
||||
zyJxdgNew.setId(null);
|
||||
zyJxdgNew.setCreateTime(new Date());
|
||||
zyJxdgNew.setUpdateBy(null);
|
||||
zyJxdgNew.setUpdateTime(null);
|
||||
zyJxdgNew.setFilePath(null);
|
||||
zyJxdgNew.setKcjs(null);
|
||||
}
|
||||
zyJxdgNew.setKcjs(zyJxdg.getKcjs());
|
||||
zyJxdgNew.setXqxn(zyJxdg.getXqxn());
|
||||
zyJxdgNew.setRwbh(zyJxdg.getRwbh());
|
||||
if(StringUtils.isEmpty(zyJxdgNew.getId())){
|
||||
baseMapper.insert(zyJxdgNew);
|
||||
}else{
|
||||
|
|
Loading…
Reference in New Issue