From 47d9e42f61d53b0ab862a840cf72ec6630920340 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Thu, 8 Aug 2024 22:11:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=9A=E5=8A=A1=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/KcKechengbiaoController.java | 1 - .../ktgl/mapper/xml/KcKechengbiaoMapper.xml | 23 ++++++- .../zyInfo/controller/ZyInfoController.java | 38 +++++++++-- .../modules/kc/zyInfo/entity/ZyInfo.java | 8 +++ .../kc/zyInfo/mapper/xml/ZyInfoMapper.xml | 5 +- .../controller/ZyInfoStudentController.java | 65 +++++++++++++++---- .../zyInfoStudent/entity/ZyInfoStudent.java | 2 +- .../mapper/xml/ZyInfoStudentMapper.xml | 2 +- .../controller/ZyInfoStudentHpController.java | 24 ++++++- .../zyJxdg/controller/ZyJxdgController.java | 4 +- 10 files changed, 145 insertions(+), 27 deletions(-) diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/controller/KcKechengbiaoController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/controller/KcKechengbiaoController.java index 37f01840..d49860ac 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/controller/KcKechengbiaoController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/controller/KcKechengbiaoController.java @@ -298,7 +298,6 @@ public class KcKechengbiaoController extends JeecgController page = new Page(pageNo, pageSize); IPage pageList = kcKechengbiaoService.getStudentKclist(page, queryWrapper); diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/xml/KcKechengbiaoMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/xml/KcKechengbiaoMapper.xml index ac6917d0..98e6e983 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/xml/KcKechengbiaoMapper.xml +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/mapper/xml/KcKechengbiaoMapper.xml @@ -192,9 +192,28 @@ select a.*,b.id as stuId ,b.file_path as stuFilePath,b.score as stuscore,b.wwxsl,b.nwxsl,b.aigcxsl,b.xnxsl,b.pdf_path as stuPdfPath,b.zzdf,b.xshpfs, - b.wwsftg,b.nwsftg,b.aigcsftg,b.xnsftg,ifnull(b.jxfs,'0') + ifnull(b.jxfs2,'0') as jxfs + b.wwsftg,b.nwsftg,b.aigcsftg,b.xnsftg,round(ifnull(b.jxfs,'0') + ifnull(b.jxfs2,'0'),1) as jxfs, GREATEST(ifnull(b.wwxsl,0),ifnull(b.nwxsl,0),ifnull(b.aigcxsl,0),ifnull(b.xnxsl,0)) as zgccl,a.score as zyzb,b.score_fabu from zy_info a ,zy_info_student b ${ew.customSqlSegment} @@ -12,13 +12,14 @@ diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java index 3533d462..e7ad55f8 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java @@ -157,6 +157,9 @@ public class ZyInfoStudentController extends JeecgController pageList = zyInfoStudentService.page(page, queryWrapper); @@ -220,22 +223,22 @@ public class ZyInfoStudentController extends JeecgController editFabu(@RequestBody ZyInfoStudent zyInfoStudent) { + public Result editFabu(@RequestBody ZyInfoStudent zyInfoStudent) { String score = zyInfoStudent.getScore(); zyInfoStudentService.editFabu(zyInfoStudent); Integer hpcjjl = Integer.parseInt(dictUtils.translateDictValue("hpcjsz","1")); //计算评分人的互评次数,计算互评人的绩效分数 - QueryWrapper zyInfoStudentQueryWrapper = new QueryWrapper<>(); - zyInfoStudentQueryWrapper.eq("a.main_id",zyInfoStudent.getMainId()); - zyInfoStudentQueryWrapper.eq("a.create_by",zyInfoStudent.getCreateBy()); - List listPfr = zyInfoStudentService.list(zyInfoStudentQueryWrapper); - if(listPfr.size()>0){ - ZyInfoStudent hprInfo = listPfr.get(0); +// QueryWrapper zyInfoStudentQueryWrapper = new QueryWrapper<>(); +// zyInfoStudentQueryWrapper.eq("a.main_id",zyInfoStudent.getMainId()); +// zyInfoStudentQueryWrapper.eq("a.create_by",zyInfoStudent.getCreateBy()); +// List listPfr = zyInfoStudentService.list(zyInfoStudentQueryWrapper); +// if(listPfr.size()>0){ + ZyInfoStudent hprInfo = zyInfoStudentService.getById(zyInfoStudent.getId()); //计算绩效分数 QueryWrapper zyInfoStudentHpQueryWrapper3 = new QueryWrapper<>(); zyInfoStudentHpQueryWrapper3.eq("main_id",hprInfo.getMainId()); - zyInfoStudentHpQueryWrapper3.eq("stu_id",zyInfoStudent.getCreateBy()); + zyInfoStudentHpQueryWrapper3.eq("stu_id",hprInfo.getCreateBy()); List list3 = zyInfoStudentHpService.list(zyInfoStudentHpQueryWrapper3); if(list3.size()>4){ if(StringUtils.isNotEmpty(hprInfo.getScore())){ @@ -256,10 +259,13 @@ public class ZyInfoStudentController extends JeecgController100){ + zzcj = 100; + } hprInfo.setZzdf(String.format("%.1f",zzcj)); } zyInfoStudentService.updateById(hprInfo); - } +// } @@ -302,7 +308,7 @@ public class ZyInfoStudentController extends JeecgController zyDbtx = new UpdateWrapper<>(); + zyDbtx.set("flag","1"); + zyDbtx.eq("main_id",zyInfo.getId()); + zyDbtx.eq("create_by",stuPar.getCreateBy()); + zyDbtx.eq("type","0"); + zyDbtxService.update(zyDbtx); + } + + + QueryWrapper zyInfoStudentHpQueryWrapper3 = new QueryWrapper<>(); + zyInfoStudentHpQueryWrapper3.eq("main_id",stuPar.getMainId()); + zyInfoStudentHpQueryWrapper3.eq("stu_id",stuPar.getCreateBy()); + List list3 = zyInfoStudentHpService.list(zyInfoStudentHpQueryWrapper3); + if(list3.size()>4){ + UpdateWrapper zyDbtx = new UpdateWrapper<>(); + zyDbtx.set("flag","1"); + zyDbtx.eq("main_id",stuPar.getMainId()); + zyDbtx.eq("create_by",stuPar.getCreateBy()); + zyDbtx.eq("type","0"); + zyDbtxService.update(zyDbtx); + } + String nameLast = zyInfoStudent.getFilePath().substring(zyInfoStudent.getFilePath().lastIndexOf(".")+1); if(StringUtils.equals("pdf",nameLast)){ zyInfoStudent.setPdfPath(zyInfoStudent.getFilePath()); @@ -542,10 +572,21 @@ public class ZyInfoStudentController extends JeecgController().eq("zy_stu_id",zyInfoStudent.getId())); - - + ZyInfoStudent zyInfoStudent1 = zyInfoStudentService.getById(zyInfoStudent.getId()); + ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent1.getMainId()); + //作业代办提醒 + ZyDbtx zyDbtx = new ZyDbtx(); + zyDbtx.setCreateBy(zyInfoStudent1.getCreateBy()); + zyDbtx.setType("0");//0发布作业 1评分 2测验 3问卷 4讨论 + zyDbtx.setMainId(zyInfoStudent1.getMainId()); + zyDbtx.setRwbh(zyInfo.getRwbh()); + zyDbtx.setContent( "你提交的作业已经被老师驳回,请尽快重新提交作业!驳回时间:"+DateUtils.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss")); + zyDbtx.setFlag("0"); + zyDbtx.setFbr(zyInfo.getCreateBy()); + zyDbtxService.save(zyDbtx); diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/entity/ZyInfoStudent.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/entity/ZyInfoStudent.java index e711354c..3391f326 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/entity/ZyInfoStudent.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/entity/ZyInfoStudent.java @@ -68,7 +68,7 @@ public class ZyInfoStudent implements Serializable { @Excel(name = "教师评分", width = 15) private java.lang.String score; - @Excel(name = "学生评分", width = 15) + @Excel(name = "互评分数", width = 15) private String xshpfs; @Excel(name = "绩效分", width = 15) private String jxfs; diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml index 59c1587e..7afcce13 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml @@ -147,7 +147,7 @@ - update zy_info_student set jxfs2 = '0' where main_id=#{id} and create_by = #{createBy} + update zy_info_student set jxfs2 = '0' where main_id=#{id} \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudentHp/controller/ZyInfoStudentHpController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudentHp/controller/ZyInfoStudentHpController.java index 4ee05cc5..f94adb0b 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudentHp/controller/ZyInfoStudentHpController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudentHp/controller/ZyInfoStudentHpController.java @@ -11,12 +11,15 @@ import java.net.URLDecoder; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.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.zyDbtx.entity.ZyDbtx; +import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService; import org.jeecg.modules.kc.zyInfo.entity.ZyInfo; import org.jeecg.modules.kc.zyInfo.service.IZyInfoService; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent; @@ -70,6 +73,9 @@ public class ZyInfoStudentHpController extends JeecgController=3){ zyInfoStudent.setScore(zyInfoStudent.getXshpfs()); @@ -311,10 +316,27 @@ public class ZyInfoStudentHpController extends JeecgController100){ + zzcj = 100; + } par.setZzdf(String.format("%.1f",zzcj)); } zyInfoStudentService.updateById(par); } + + + QueryWrapper zyInfoStudentHpQueryWrapper3 = new QueryWrapper<>(); + zyInfoStudentHpQueryWrapper3.eq("main_id",zyInfoStudentPar.getMainId()); + zyInfoStudentHpQueryWrapper3.eq("stu_id",sysUser.getUsername()); + List list3 = zyInfoStudentHpService.list(zyInfoStudentHpQueryWrapper3); + if(list3.size()>4){ + UpdateWrapper zyDbtx = new UpdateWrapper<>(); + zyDbtx.set("flag","1"); + zyDbtx.eq("main_id",zyInfoStudentPar.getMainId()); + zyDbtx.eq("create_by",sysUser.getUsername()); + zyDbtx.eq("type","0"); + zyDbtxService.update(zyDbtx); + } return Result.OK("互评成功!"); } }else{ diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyJxdg/controller/ZyJxdgController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyJxdg/controller/ZyJxdgController.java index 0ee10db8..4446858d 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyJxdg/controller/ZyJxdgController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyJxdg/controller/ZyJxdgController.java @@ -328,7 +328,9 @@ public class ZyJxdgController extends JeecgController { QueryWrapper queryWrapper = new QueryWrapper(); queryWrapper.eq("rwbh",rwbh); queryWrapper.eq("xqxn",xqxn); - queryWrapper.eq("create_by",teano); + if(StringUtils.isNotEmpty(teano)){ + queryWrapper.eq("create_by",teano); + } // LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // queryWrapper.eq("create_by",sysUser.getUsername()); queryWrapper.last("limit 1");