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 9183f801..fabc566b 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 @@ -29,6 +29,8 @@ 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.zyDbtx.entity.ZyDbtx; +import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; @@ -63,6 +65,8 @@ public class KcKechengbiaoController extends JeecgController page = new Page(pageNo, pageSize); IPage pageList = kcKechengbiaoService.getStudentKclist(page, queryWrapper); + + + //展示代办提醒 + if(pageList.getRecords().size()>0){ + ZyDbtx zyDbtx = new ZyDbtx(); + zyDbtx.setCreateBy(sysUser.getUsername()); + List dbtxList = zyDbtxService.getDbtxList(zyDbtx); + for(KcKechengbiao par:pageList.getRecords()){ + for(ZyDbtx txPar : dbtxList){ + if(StringUtils.equals(par.getRwbh(),txPar.getRwbh())){ + par.setDbtxType(txPar.getType()); + break; + } + } + } + } + + + return Result.OK(pageList); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/entity/KcKechengbiao.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/entity/KcKechengbiao.java index 38c0ba0c..27c1e643 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/entity/KcKechengbiao.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/ktgl/entity/KcKechengbiao.java @@ -254,5 +254,7 @@ public class KcKechengbiao implements Serializable { private java.lang.String ywcol; @TableField(exist = false) private java.lang.String checkType; + @TableField(exist = false) + private java.lang.String dbtxType; } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/controller/WjxWjxxController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/controller/WjxWjxxController.java index 234f9192..955d17fc 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/controller/WjxWjxxController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/controller/WjxWjxxController.java @@ -1,11 +1,15 @@ package org.jeecg.modules.kc.wjxWjxx.controller; import java.util.Arrays; +import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbbks; +import org.jeecg.modules.kc.grab.imports.service.IXxhbbksService; import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx; import org.jeecg.modules.kc.wjxWjxx.service.IWjxWjxxService; @@ -14,6 +18,9 @@ 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.zyDbtx.entity.ZyDbtx; +import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService; +import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent; import org.jeecg.modules.tools.WjxAuthService; import org.jeecg.common.system.base.controller.JeecgController; import org.springframework.beans.factory.annotation.Autowired; @@ -40,6 +47,12 @@ public class WjxWjxxController extends JeecgController @Autowired private WjxAuthService wjxAuthService; + + @Autowired + private IXxhbbksService xxhbbksService; + + @Autowired + private IZyDbtxService zyDbtxService; /** * 分页列表查询 * @@ -208,6 +221,37 @@ public class WjxWjxxController extends JeecgController @GetMapping(value = "/fbwj") public Result fbwj(@RequestParam(name="id",required=true) String id,@RequestParam(name="wjlx",required=true) String wjlx) { String res = wjxWjxxService.fbwj(id,wjlx); + + WjxWjxx wjxWjxx=wjxWjxxService.getById(id); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.apply("a.xh = b.xh"); + queryWrapper.eq("b.KCAPZBBH",wjxWjxx.getRwbh()); + List list = xxhbbksService.getXsxkbAllList(queryWrapper); + String type = ""; + String content = ""; + + if(StringUtils.equals(wjlx,"6")){ + type = "2"; + content = "您有一条测验需要提交!"; + }else{ + type = "3"; + content = "您有一条问卷需要提交!"; + } + for(Xxhbbks xxhbbks:list){ + + //作业代办提醒 + ZyDbtx zyDbtx = new ZyDbtx(); + zyDbtx.setCreateBy(xxhbbks.getXh()); + zyDbtx.setType(type);//0发布作业 1评分 2测验 3问卷 4讨论 + zyDbtx.setMainId(wjxWjxx.getId()); + zyDbtx.setRwbh(wjxWjxx.getRwbh()); + zyDbtx.setContent(content); + zyDbtx.setFlag("0"); + zyDbtxService.save(zyDbtx); + + } + + return Result.OK(res); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/controller/ZyInfoController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/controller/ZyInfoController.java index ca47b106..64b009ee 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/controller/ZyInfoController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfo/controller/ZyInfoController.java @@ -1,57 +1,38 @@ package org.jeecg.modules.kc.zyInfo.controller; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -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.DateUtils; -import org.jeecg.common.util.oConvertUtils; -import org.jeecg.modules.kc.grab.imports.entity.Xxhbbks; -import org.jeecg.modules.kc.grab.imports.service.IXxhbbksService; -import org.jeecg.modules.kc.kcSysConfig.entity.KcSysConfig; -import org.jeecg.modules.kc.kcSysConfig.service.IKcSysConfigService; -import org.jeecg.modules.kc.kcXqxnHistory.entity.KcXqxnHistory; -import org.jeecg.modules.kc.kcXqxnHistory.service.IKcXqxnHistoryService; -import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao; -import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService; -import org.jeecg.modules.kc.zyInfo.entity.ZyInfo; -import org.jeecg.modules.kc.zyInfo.service.IZyInfoService; - import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.zyInfoStudent.entity.ZyInfoStudent; -import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService; -import org.jeecgframework.poi.excel.ExcelImportUtil; -import org.jeecgframework.poi.excel.def.NormalExcelConstants; -import org.jeecgframework.poi.excel.entity.ExportParams; -import org.jeecgframework.poi.excel.entity.ImportParams; -import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; -import org.jeecg.common.system.base.controller.JeecgController; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.multipart.MultipartHttpServletRequest; -import org.springframework.web.servlet.ModelAndView; -import com.alibaba.fastjson.JSON; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.jeecg.common.aspect.annotation.AutoLog; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.SecurityUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbbks; +import org.jeecg.modules.kc.grab.imports.service.IXxhbbksService; +import org.jeecg.modules.kc.kcSysConfig.entity.KcSysConfig; +import org.jeecg.modules.kc.kcSysConfig.service.IKcSysConfigService; +import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao; +import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService; +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; +import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.List; /** * @Description: 作业发布 @@ -74,6 +55,9 @@ public class ZyInfoController extends JeecgController { private IXxhbbksService xxhbbksService; @Autowired private IZyInfoStudentService zyInfoStudentService; + + @Autowired + private IZyDbtxService zyDbtxService; /** * 分页列表查询 * @@ -150,6 +134,17 @@ public class ZyInfoController extends JeecgController { zyInfoStudent.setCreateBy(xxhbbks.getXh()); zyInfoStudent.setStudentName(xxhbbks.getXm()); zyInfoStudentService.save(zyInfoStudent); + + //作业代办提醒 + ZyDbtx zyDbtx = new ZyDbtx(); + zyDbtx.setCreateBy(xxhbbks.getXh()); + zyDbtx.setType("0");//0发布作业 1评分 2测验 3问卷 4讨论 + zyDbtx.setMainId(zyInfo.getId()); + zyDbtx.setRwbh(zyInfo.getRwbh()); + zyDbtx.setContent("您有一条作业需要提交!"); + zyDbtx.setFlag("0"); + zyDbtxService.save(zyDbtx); + } } return Result.OK(zyInfo); 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 97f7f25b..a2e770a2 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 @@ -21,6 +21,8 @@ import org.jeecg.common.util.DateUtils; import org.jeecg.common.util.SpringContextHolder; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.kc.zyCcjg.service.IZyCcjgService; +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; @@ -71,6 +73,9 @@ public class ZyInfoStudentController extends JeecgController editFabu(@RequestBody ZyInfoStudent zyInfoStudent) { + String score = zyInfoStudent.getScore(); zyInfoStudentService.editFabu(zyInfoStudent); - ZyInfoStudent zyInfoStudentPar = zyInfoStudentService.getById(zyInfoStudent.getId()); + if(StringUtils.isNotEmpty(score)){ + ZyInfo zyInfo = zyInfoService.getById(zyInfoStudentPar.getMainId()); + //作业代办提醒 + ZyDbtx zyDbtx = new ZyDbtx(); + zyDbtx.setCreateBy(zyInfoStudentPar.getCreateBy()); + zyDbtx.setType("1");//0发布作业 1评分 2测验 3问卷 4讨论 + zyDbtx.setMainId(zyInfoStudentPar.getId()); + zyDbtx.setRwbh(zyInfo.getRwbh()); + zyDbtx.setContent("您有一条新的评分,请及时查看!"); + zyDbtx.setFlag("0"); + zyDbtxService.save(zyDbtx); + } QueryWrapper zyInfoStudentQueryWrapper = new QueryWrapper<>(); zyInfoStudentQueryWrapper.eq("main_id",zyInfoStudentPar.getMainId()); diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyTlq/controller/ZyTlqController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyTlq/controller/ZyTlqController.java index 7aeac716..ceb9aedc 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyTlq/controller/ZyTlqController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyTlq/controller/ZyTlqController.java @@ -9,9 +9,16 @@ import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + +import com.baomidou.mybatisplus.core.toolkit.StringUtils; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbbks; +import org.jeecg.modules.kc.grab.imports.service.IXxhbbksService; +import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx; +import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx; +import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService; import org.jeecg.modules.kc.zyTlq.entity.ZyTlq; import org.jeecg.modules.kc.zyTlq.service.IZyTlqService; @@ -50,6 +57,12 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; public class ZyTlqController extends JeecgController { @Autowired private IZyTlqService zyTlqService; + + @Autowired + private IXxhbbksService xxhbbksService; + + @Autowired + private IZyDbtxService zyDbtxService; /** * 分页列表查询 @@ -172,4 +185,34 @@ public class ZyTlqController extends JeecgController { return super.importExcel(request, response, ZyTlq.class); } + + @AutoLog(value = "讨论区-发布") + @ApiOperation(value="讨论区-发布", notes="讨论区-发布") + @RequestMapping(value = "/editFbtl", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result editFbtl(@RequestBody ZyTlq zyTlq) { + zyTlqService.updateById(zyTlq); + + + + ZyTlq par=zyTlqService.getById(zyTlq.getId()); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.apply("a.xh = b.xh"); + queryWrapper.eq("b.KCAPZBBH",par.getRwbh()); + List list = xxhbbksService.getXsxkbAllList(queryWrapper); + for(Xxhbbks xxhbbks:list){ + + //作业代办提醒 + ZyDbtx zyDbtx = new ZyDbtx(); + zyDbtx.setCreateBy(xxhbbks.getXh()); + zyDbtx.setType("4");//0发布作业 1评分 2测验 3问卷 4讨论 + zyDbtx.setMainId(par.getId()); + zyDbtx.setRwbh(par.getRwbh()); + zyDbtx.setContent("您有一条新的讨论话题,请即时进行讨论"); + zyDbtx.setFlag("0"); + zyDbtxService.save(zyDbtx); + + } + + return Result.OK("编辑成功!"); + } }