添加业务流程

This commit is contained in:
yangjun 2024-08-08 22:11:47 +08:00
parent 1305e9ba76
commit 47d9e42f61
10 changed files with 145 additions and 27 deletions

View File

@ -298,7 +298,6 @@ public class KcKechengbiaoController extends JeecgController<KcKechengbiao, IKcK
queryWrapper.apply("kc.rwbh = xkb.kcapzbbh and kc.flag = '0'"); queryWrapper.apply("kc.rwbh = xkb.kcapzbbh and kc.flag = '0'");
queryWrapper.eq("xkb.xh",sysUser.getUsername()); queryWrapper.eq("xkb.xh",sysUser.getUsername());
queryWrapper.eq("kc.xqxn",kcSysConfig.getFlag1()); queryWrapper.eq("kc.xqxn",kcSysConfig.getFlag1());
queryWrapper.orderByAsc("kc.kcmc");
Page<KcKechengbiao> page = new Page<KcKechengbiao>(pageNo, pageSize); Page<KcKechengbiao> page = new Page<KcKechengbiao>(pageNo, pageSize);
IPage<KcKechengbiao> pageList = kcKechengbiaoService.getStudentKclist(page, queryWrapper); IPage<KcKechengbiao> pageList = kcKechengbiaoService.getStudentKclist(page, queryWrapper);

View File

@ -192,9 +192,28 @@
</select> </select>
<select id="getStudentKclist" resultType="org.jeecg.modules.kc.ktgl.entity.KcKechengbiao"> <select id="getStudentKclist" resultType="org.jeecg.modules.kc.ktgl.entity.KcKechengbiao">
select distinct xkb.xh,kc.kcbh,kc.rwbh,kc.kcmc,kc.skjs,kc.skdd,kc.xkrs,kc.xqxn,kc.jgh SELECT
from kc_kechengbiao kc,xxhbxsxkb xkb a.xh, a.kcbh, a.rwbh, a.kcmc, a.skdd, a.xkrs, a.xqxn, GROUP_CONCAT( a.jgh ) AS jgh, GROUP_CONCAT( a.skjs ) AS skjs, func_jc ( a.sksj ) AS sksj
FROM
(
SELECT
c.xh, c.kcbh, c.rwbh, c.kcmc, c.skdd, c.xkrs, c.xqxn, c.skjs, c.jgh, GROUP_CONCAT( c.sksj ) AS sksj
FROM
(
SELECT DISTINCT
xkb.xh, kc.kcbh, kc.rwbh, kc.kcmc, kc.skdd, kc.xkrs, kc.xqxn, kc.skjs, kc.jgh, kc.sksj
FROM
kc_kechengbiao kc,
xxhbxsxkb xkb
${ew.customSqlSegment} ${ew.customSqlSegment}
GROUP BY
xkb.xh, kc.kcbh, kc.rwbh, kc.kcmc, kc.skdd, kc.xkrs, kc.xqxn, kc.skjs, kc.jgh, kc.sksj
) c
GROUP BY
c.xh, c.kcbh, c.rwbh, c.kcmc, c.skdd, c.xkrs, c.xqxn, c.skjs, c.jgh ) a
GROUP BY a.xh, a.kcbh, a.rwbh, a.kcmc, a.skdd, a.xkrs, a.xqxn, a.sksj
ORDER BY
a.kcmc ASC
</select> </select>
<select id="getKcbhByRwbh" resultType="org.jeecg.modules.kc.ktgl.entity.KcKechengbiao"> <select id="getKcbhByRwbh" resultType="org.jeecg.modules.kc.ktgl.entity.KcKechengbiao">

View File

@ -1,6 +1,7 @@
package org.jeecg.modules.kc.zyInfo.controller; package org.jeecg.modules.kc.zyInfo.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -140,9 +141,9 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
zyDbtx.setRwbh(zyInfo2.getRwbh()); zyDbtx.setRwbh(zyInfo2.getRwbh());
String hpts = ""; String hpts = "";
if(StringUtils.equals(zyInfo2.getXshpkg(),"1")){ if(StringUtils.equals(zyInfo2.getXshpkg(),"1")){
hpts = "此作业需要进行互评,互评时间:"+DateUtils.formatDate(zyInfo2.getXshpkssj(),"yyyy-MM-dd HH:mm")+" ~ "+ DateUtils.formatDate(zyInfo2.getXshpjssj(),"yyyy-MM-dd HH:mm"); hpts = "互评时间:"+DateUtils.formatDate(zyInfo2.getXshpkssj(),"yyyy-MM-dd HH:mm")+" ~ "+ DateUtils.formatDate(zyInfo2.getXshpjssj(),"yyyy-MM-dd HH:mm");
} }
zyDbtx.setContent(user.getRealname()+"老师["+kcKechengbiao.getKcmc()+"]课程于"+DateUtils.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss")+"发布了一篇题目为“"+zyInfo2.getTitle()+"”的作业,该作业完成时间为:"+ DateUtils.formatDate(zyInfo2.getStartTime(),"yyyy-MM-dd HH:mm")+" ~ "+ DateUtils.formatDate(zyInfo2.getEndTime(),"yyyy-MM-dd HH:mm")+",请按时完成! "+hpts); zyDbtx.setContent(user.getRealname()+"老师主讲的["+kcKechengbiao.getKcmc()+"]课程于"+DateUtils.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss")+"发布了一篇题目为“"+zyInfo2.getTitle()+"”的作业,该作业提交时间为:"+ DateUtils.formatDate(zyInfo2.getStartTime(),"yyyy-MM-dd HH:mm")+" ~ "+ DateUtils.formatDate(zyInfo2.getEndTime(),"yyyy-MM-dd HH:mm")+",请按时完成! "+hpts);
zyDbtx.setFlag("0"); zyDbtx.setFlag("0");
zyDbtx.setFbr(user.getUsername()); zyDbtx.setFbr(user.getUsername());
@ -230,6 +231,31 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }
@AutoLog(value = "撤回作业")
@ApiOperation(value="撤回作业", notes="撤回作业")
@RequestMapping(value = "/editChehui", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> editChehui(@RequestBody ZyInfo zyInfo) {
UpdateWrapper<ZyInfo> queryWrapper = new UpdateWrapper<>();
queryWrapper.set("start_time",null);
queryWrapper.set("zy_status","0");
queryWrapper.eq("id",zyInfo.getId());
zyInfoService.update(queryWrapper);
//删除学生列表
QueryWrapper<ZyInfoStudent> zyInfoStudentQueryWrapper = new QueryWrapper<>();
zyInfoStudentQueryWrapper.eq("main_id",zyInfo.getId());
zyInfoStudentService.remove(zyInfoStudentQueryWrapper);
//删除代办信息
QueryWrapper<ZyDbtx> zyDbtxQueryWrapper = new QueryWrapper<>();
zyDbtxQueryWrapper.eq("main_id",zyInfo.getId());
zyDbtxService.remove(zyDbtxQueryWrapper);
return Result.OK("编辑成功!");
}
/** /**
* 编辑 * 编辑
* *
@ -279,13 +305,12 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
zyDbtx.setType("0");//0发布作业 1评分 2测验 3问卷 4讨论 zyDbtx.setType("0");//0发布作业 1评分 2测验 3问卷 4讨论
zyDbtx.setMainId(zyInfo.getId()); zyDbtx.setMainId(zyInfo.getId());
zyDbtx.setRwbh(zyInfo.getRwbh()); zyDbtx.setRwbh(zyInfo.getRwbh());
// 郭坤老师战略管理课程发布了一篇题目为xxxx的作业作业完成时间为2024-07-18 20:00 ~ 2024-07-20 23:59请按时完成 作业发布时间
String hpts = ""; String hpts = "";
if(StringUtils.equals(zyInfo.getXshpkg(),"1")){ if(StringUtils.equals(zyInfo.getXshpkg(),"1")){
hpts = "此作业需要进行互评,互评时间:"+DateUtils.formatDate(zyInfo.getXshpkssj(),"yyyy-MM-dd HH:mm")+" ~ "+ DateUtils.formatDate(zyInfo.getXshpjssj(),"yyyy-MM-dd HH:mm"); hpts = "互评时间:"+DateUtils.formatDate(zyInfo.getXshpkssj(),"yyyy-MM-dd HH:mm")+" ~ "+ DateUtils.formatDate(zyInfo.getXshpjssj(),"yyyy-MM-dd HH:mm");
} }
zyDbtx.setContent(user.getRealname()+"老师["+kcKechengbiao.getKcmc()+"]课程于"+DateUtils.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss")+"发布了一篇题目为“"+zyInfo.getTitle()+"”的作业,该作业完成时间为:"+ DateUtils.formatDate(zyInfo.getStartTime(),"yyyy-MM-dd HH:mm")+" ~ "+ DateUtils.formatDate(zyInfo.getEndTime(),"yyyy-MM-dd HH:mm")+",请按时完成! "+hpts); zyDbtx.setContent(user.getRealname()+"老师主讲的["+kcKechengbiao.getKcmc()+"]课程于"+DateUtils.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss")+"发布了一篇题目为“"+zyInfo.getTitle()+"”的作业,该作业提交时间为:"+ DateUtils.formatDate(zyInfo.getStartTime(),"yyyy-MM-dd HH:mm")+" ~ "+ DateUtils.formatDate(zyInfo.getEndTime(),"yyyy-MM-dd HH:mm")+",请按时完成! "+hpts);
// zyDbtx.setContent(" ["+zyInfo.getKcmc()+"] "+zyInfo.getSkjs()+" 发布了一篇作业,请及时完成!");
zyDbtx.setFlag("0"); zyDbtx.setFlag("0");
zyDbtx.setFbr(user.getUsername()); zyDbtx.setFbr(user.getUsername());
zyDbtxService.save(zyDbtx); zyDbtxService.save(zyDbtx);
@ -391,6 +416,7 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
queryWrapper.eq("b.create_by",sysUser.getUsername()); queryWrapper.eq("b.create_by",sysUser.getUsername());
queryWrapper.eq(StringUtils.isNotBlank(zyInfo.getTeano()),"a.create_by",zyInfo.getTeano()); queryWrapper.eq(StringUtils.isNotBlank(zyInfo.getTeano()),"a.create_by",zyInfo.getTeano());
queryWrapper.orderByDesc("a.sort");
IPage<ZyInfo> pageList = zyInfoService.stuList(page, queryWrapper); IPage<ZyInfo> pageList = zyInfoService.stuList(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
} }

View File

@ -195,5 +195,13 @@ public class ZyInfo implements Serializable {
private String xshpfs; private String xshpfs;
@TableField(exist = false) @TableField(exist = false)
private String jxfs; private String jxfs;
@TableField(exist = false)
private String dpynum;
@TableField(exist = false)
private String zgccl;
@TableField(exist = false)
private String zyzb;
@TableField(exist = false)
private String scoreFabu;
} }

View File

@ -4,7 +4,7 @@
<select id="stuList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo"> <select id="stuList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
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, 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 from zy_info a ,zy_info_student b
${ew.customSqlSegment} ${ew.customSqlSegment}
@ -12,13 +12,14 @@
<select id="selectPage" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo"> <select id="selectPage" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
SELECT SELECT
a.*, a.*,
ifnull(b.num,0) as wtjnum,ifnull(c.num,0) as ytjnum,ifnull(d.num,0) as wpynum,ifnull(e.num,0) as ypynum ifnull(b.num,0) as wtjnum,ifnull(c.num,0) as ytjnum,ifnull(d.num,0) as wpynum,ifnull(e.num,0) as ypynum,ifnull(f.num,0) as dpynum
FROM FROM
zy_info a zy_info a
left join (select count(*) as num,main_id from zy_info_student where file_path is null GROUP BY main_id ) b on a.id = b.main_id left join (select count(*) as num,main_id from zy_info_student where file_path is null GROUP BY main_id ) b on a.id = b.main_id
left join (select count(*) as num,main_id from zy_info_student where file_path is not null GROUP BY main_id) c on a.id = c.main_id left join (select count(*) as num,main_id from zy_info_student where file_path is not null GROUP BY main_id) c on a.id = c.main_id
left join (select count(*) as num,main_id from zy_info_student where score is null GROUP BY main_id ) d on a.id = d.main_id left join (select count(*) as num,main_id from zy_info_student where score is null GROUP BY main_id ) d on a.id = d.main_id
left join (select count(*) as num,main_id from zy_info_student where score is not null GROUP BY main_id) e on a.id = e.main_id left join (select count(*) as num,main_id from zy_info_student where score is not null GROUP BY main_id) e on a.id = e.main_id
left join (select count(*) as num,main_id from zy_info_student where score is null and file_path is not null GROUP BY main_id) f on a.id = f.main_id
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </select>

View File

@ -157,6 +157,9 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
queryWrapper.isNull("a.score"); queryWrapper.isNull("a.score");
}else if(StringUtils.equals("4",zyInfoStudent.getQueryType())){//已评阅 }else if(StringUtils.equals("4",zyInfoStudent.getQueryType())){//已评阅
queryWrapper.isNotNull("a.score"); queryWrapper.isNotNull("a.score");
}else if(StringUtils.equals("5",zyInfoStudent.getQueryType())){//已评阅
queryWrapper.isNull("a.score");
queryWrapper.isNotNull("a.file_path");
} }
} }
IPage<ZyInfoStudent> pageList = zyInfoStudentService.page(page, queryWrapper); IPage<ZyInfoStudent> pageList = zyInfoStudentService.page(page, queryWrapper);
@ -220,22 +223,22 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
@AutoLog(value = "发布评分状态") @AutoLog(value = "发布评分状态")
@ApiOperation(value="发布评分状态", notes="发布评分状态") @ApiOperation(value="发布评分状态", notes="发布评分状态")
@RequestMapping(value = "/editFabu", method = {RequestMethod.PUT,RequestMethod.POST}) @RequestMapping(value = "/editFabu", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> editFabu(@RequestBody ZyInfoStudent zyInfoStudent) { public Result<ZyInfoStudent> editFabu(@RequestBody ZyInfoStudent zyInfoStudent) {
String score = zyInfoStudent.getScore(); String score = zyInfoStudent.getScore();
zyInfoStudentService.editFabu(zyInfoStudent); zyInfoStudentService.editFabu(zyInfoStudent);
Integer hpcjjl = Integer.parseInt(dictUtils.translateDictValue("hpcjsz","1")); Integer hpcjjl = Integer.parseInt(dictUtils.translateDictValue("hpcjsz","1"));
//计算评分人的互评次数计算互评人的绩效分数 //计算评分人的互评次数计算互评人的绩效分数
QueryWrapper<ZyInfoStudent> zyInfoStudentQueryWrapper = new QueryWrapper<>(); // QueryWrapper<ZyInfoStudent> zyInfoStudentQueryWrapper = new QueryWrapper<>();
zyInfoStudentQueryWrapper.eq("a.main_id",zyInfoStudent.getMainId()); // zyInfoStudentQueryWrapper.eq("a.main_id",zyInfoStudent.getMainId());
zyInfoStudentQueryWrapper.eq("a.create_by",zyInfoStudent.getCreateBy()); // zyInfoStudentQueryWrapper.eq("a.create_by",zyInfoStudent.getCreateBy());
List<ZyInfoStudent> listPfr = zyInfoStudentService.list(zyInfoStudentQueryWrapper); // List<ZyInfoStudent> listPfr = zyInfoStudentService.list(zyInfoStudentQueryWrapper);
if(listPfr.size()>0){ // if(listPfr.size()>0){
ZyInfoStudent hprInfo = listPfr.get(0); ZyInfoStudent hprInfo = zyInfoStudentService.getById(zyInfoStudent.getId());
//计算绩效分数 //计算绩效分数
QueryWrapper<ZyInfoStudentHp> zyInfoStudentHpQueryWrapper3 = new QueryWrapper<>(); QueryWrapper<ZyInfoStudentHp> zyInfoStudentHpQueryWrapper3 = new QueryWrapper<>();
zyInfoStudentHpQueryWrapper3.eq("main_id",hprInfo.getMainId()); zyInfoStudentHpQueryWrapper3.eq("main_id",hprInfo.getMainId());
zyInfoStudentHpQueryWrapper3.eq("stu_id",zyInfoStudent.getCreateBy()); zyInfoStudentHpQueryWrapper3.eq("stu_id",hprInfo.getCreateBy());
List<ZyInfoStudentHp> list3 = zyInfoStudentHpService.list(zyInfoStudentHpQueryWrapper3); List<ZyInfoStudentHp> list3 = zyInfoStudentHpService.list(zyInfoStudentHpQueryWrapper3);
if(list3.size()>4){ if(list3.size()>4){
if(StringUtils.isNotEmpty(hprInfo.getScore())){ if(StringUtils.isNotEmpty(hprInfo.getScore())){
@ -256,10 +259,13 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
jxcj2 = Double.parseDouble(hprInfo.getJxfs2());//获取教师的互评成绩 jxcj2 = Double.parseDouble(hprInfo.getJxfs2());//获取教师的互评成绩
} }
double zzcj = hpcj + jxcj + jxcj2; double zzcj = hpcj + jxcj + jxcj2;
if(zzcj>100){
zzcj = 100;
}
hprInfo.setZzdf(String.format("%.1f",zzcj)); hprInfo.setZzdf(String.format("%.1f",zzcj));
} }
zyInfoStudentService.updateById(hprInfo); zyInfoStudentService.updateById(hprInfo);
} // }
@ -302,7 +308,7 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
zyInfoService.update(zyInfo); zyInfoService.update(zyInfo);
} }
return Result.OK("操作成功!"); return Result.OK(zyInfoStudent);
} }
/** /**
* 通过id删除 * 通过id删除
@ -450,6 +456,30 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
ZyInfoStudent stuPar = zyInfoStudentService.getById(zyInfoStudent.getId()); ZyInfoStudent stuPar = zyInfoStudentService.getById(zyInfoStudent.getId());
ZyInfo zyInfo = zyInfoService.getById(stuPar.getMainId()); ZyInfo zyInfo = zyInfoService.getById(stuPar.getMainId());
//判断是否可以取消代办xshpkg
if(StringUtils.equals("0",zyInfo.getXshpkg())){
UpdateWrapper<ZyDbtx> 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<ZyInfoStudentHp> zyInfoStudentHpQueryWrapper3 = new QueryWrapper<>();
zyInfoStudentHpQueryWrapper3.eq("main_id",stuPar.getMainId());
zyInfoStudentHpQueryWrapper3.eq("stu_id",stuPar.getCreateBy());
List<ZyInfoStudentHp> list3 = zyInfoStudentHpService.list(zyInfoStudentHpQueryWrapper3);
if(list3.size()>4){
UpdateWrapper<ZyDbtx> 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); String nameLast = zyInfoStudent.getFilePath().substring(zyInfoStudent.getFilePath().lastIndexOf(".")+1);
if(StringUtils.equals("pdf",nameLast)){ if(StringUtils.equals("pdf",nameLast)){
zyInfoStudent.setPdfPath(zyInfoStudent.getFilePath()); zyInfoStudent.setPdfPath(zyInfoStudent.getFilePath());
@ -542,10 +572,21 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
//删除互评数据
zyInfoStudentHpService.remove(new QueryWrapper<ZyInfoStudentHp>().eq("zy_stu_id",zyInfoStudent.getId())); zyInfoStudentHpService.remove(new QueryWrapper<ZyInfoStudentHp>().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);

View File

@ -68,7 +68,7 @@ public class ZyInfoStudent implements Serializable {
@Excel(name = "教师评分", width = 15) @Excel(name = "教师评分", width = 15)
private java.lang.String score; private java.lang.String score;
@Excel(name = "学生评分", width = 15) @Excel(name = "互评分数", width = 15)
private String xshpfs; private String xshpfs;
@Excel(name = "绩效分", width = 15) @Excel(name = "绩效分", width = 15)
private String jxfs; private String jxfs;

View File

@ -147,7 +147,7 @@
</select> </select>
<update id="updateJxfs2"> <update id="updateJxfs2">
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}
</update> </update>
</mapper> </mapper>

View File

@ -11,12 +11,15 @@ import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils; 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.entity.ZyInfo;
import org.jeecg.modules.kc.zyInfo.service.IZyInfoService; import org.jeecg.modules.kc.zyInfo.service.IZyInfoService;
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
@ -70,6 +73,9 @@ public class ZyInfoStudentHpController extends JeecgController<ZyInfoStudentHp,
@Autowired @Autowired
private DictUtils dictUtils; private DictUtils dictUtils;
@Autowired
private IZyDbtxService zyDbtxService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -263,7 +269,6 @@ public class ZyInfoStudentHpController extends JeecgController<ZyInfoStudentHp,
double average = (double) sum / (numbers.size() - 2); double average = (double) sum / (numbers.size() - 2);
zyInfoStudent.setXshpfs(String.format("%.1f",average)+""); zyInfoStudent.setXshpfs(String.format("%.1f",average)+"");
} }
//判断互评成绩是否为最终成绩 //判断互评成绩是否为最终成绩
if(StringUtils.equals(zyInfo.getSfzzcj(),"1") && list2.size()>=3){ if(StringUtils.equals(zyInfo.getSfzzcj(),"1") && list2.size()>=3){
zyInfoStudent.setScore(zyInfoStudent.getXshpfs()); zyInfoStudent.setScore(zyInfoStudent.getXshpfs());
@ -311,10 +316,27 @@ public class ZyInfoStudentHpController extends JeecgController<ZyInfoStudentHp,
jxcj2 = Double.parseDouble(par.getJxfs2());//获取教师的互评成绩 jxcj2 = Double.parseDouble(par.getJxfs2());//获取教师的互评成绩
} }
double zzcj = hpcj + jxcj + jxcj2; double zzcj = hpcj + jxcj + jxcj2;
if(zzcj>100){
zzcj = 100;
}
par.setZzdf(String.format("%.1f",zzcj)); par.setZzdf(String.format("%.1f",zzcj));
} }
zyInfoStudentService.updateById(par); zyInfoStudentService.updateById(par);
} }
QueryWrapper<ZyInfoStudentHp> zyInfoStudentHpQueryWrapper3 = new QueryWrapper<>();
zyInfoStudentHpQueryWrapper3.eq("main_id",zyInfoStudentPar.getMainId());
zyInfoStudentHpQueryWrapper3.eq("stu_id",sysUser.getUsername());
List<ZyInfoStudentHp> list3 = zyInfoStudentHpService.list(zyInfoStudentHpQueryWrapper3);
if(list3.size()>4){
UpdateWrapper<ZyDbtx> 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("互评成功!"); return Result.OK("互评成功!");
} }
}else{ }else{

View File

@ -328,7 +328,9 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
QueryWrapper<ZyJxdg> queryWrapper = new QueryWrapper<ZyJxdg>(); QueryWrapper<ZyJxdg> queryWrapper = new QueryWrapper<ZyJxdg>();
queryWrapper.eq("rwbh",rwbh); queryWrapper.eq("rwbh",rwbh);
queryWrapper.eq("xqxn",xqxn); queryWrapper.eq("xqxn",xqxn);
if(StringUtils.isNotEmpty(teano)){
queryWrapper.eq("create_by",teano); queryWrapper.eq("create_by",teano);
}
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); // LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// queryWrapper.eq("create_by",sysUser.getUsername()); // queryWrapper.eq("create_by",sysUser.getUsername());
queryWrapper.last("limit 1"); queryWrapper.last("limit 1");