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 fabc566b..745e11ac 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 @@ -263,6 +263,24 @@ public class KcKechengbiaoController extends JeecgController page = new Page(pageNo, pageSize); IPage pageList = kcKechengbiaoService.getKechengbiaolist(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/wjxDjxx/controller/WjxDjxxController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxDjxx/controller/WjxDjxxController.java index c34a212e..7a5d68ed 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxDjxx/controller/WjxDjxxController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxDjxx/controller/WjxDjxxController.java @@ -44,6 +44,7 @@ public class WjxDjxxController extends JeecgController if(list.size()>0) { res = wjxDjxxService.djtj(list); } + return Result.OK(res); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxDjxx/service/impl/WjxDjxxServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxDjxx/service/impl/WjxDjxxServiceImpl.java index 761a6cbb..e368f3f6 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxDjxx/service/impl/WjxDjxxServiceImpl.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxDjxx/service/impl/WjxDjxxServiceImpl.java @@ -19,6 +19,8 @@ import org.jeecg.modules.kc.wjxWjxx.mapper.WjxWjxxMapper; import org.jeecg.modules.kc.wjxWjxx.utils.WjxUtil; import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx; import org.jeecg.modules.kc.wjxWjxxTmlb.mapper.WjxWjxxTmxxMapper; +import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx; +import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -43,6 +45,9 @@ public class WjxDjxxServiceImpl extends ServiceImpl impl @Autowired private WjxWjxxMapper wjxWjxxMapper; + @Autowired + private IZyDbtxService zyDbtxService; + /** * 提交问卷,并查询答卷 * @param list @@ -222,6 +227,29 @@ public class WjxDjxxServiceImpl extends ServiceImpl impl wjxWjxxMapper.updateById(wjxWjxx); } + + + String type = ""; + String content = ""; + if(StringUtils.equals("6",wjxWjxx.getAtype())){ + type = "6"; + content = "您有一条新的测验待查阅"; + }else{ + type = "7"; + content = "您有一条新的问卷待查阅"; + } + //作业代办提醒 + ZyDbtx zyDbtx = new ZyDbtx(); + zyDbtx.setCreateBy(wjxWjxx.getCreateBy()); + zyDbtx.setType(type);//0发布作业 1评分 2测验 3问卷 4讨论 5学生提交作业 6学生提交测验 7学生提交问卷 + zyDbtx.setMainId(wjxWjxx.getId()); + zyDbtx.setRwbh(wjxWjxx.getRwbh()); + zyDbtx.setContent(content); + zyDbtx.setFlag("0"); + zyDbtxService.save(zyDbtx); + + + return "提交成功!"; } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/controller/ZyDbtxController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/controller/ZyDbtxController.java new file mode 100644 index 00000000..073a9b96 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/controller/ZyDbtxController.java @@ -0,0 +1,192 @@ +package org.jeecg.modules.kc.zyDbtx.controller; + +import java.util.Arrays; +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 com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +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 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.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 org.apache.shiro.authz.annotation.RequiresPermissions; + + /** + * @Description: 代办提醒 + * @Author: jeecg-boot + * @Date: 2024-05-24 + * @Version: V1.0 + */ +@Api(tags="代办提醒") +@RestController +@RequestMapping("/zyDbtx/zyDbtx") +@Slf4j +public class ZyDbtxController extends JeecgController { + @Autowired + private IZyDbtxService zyDbtxService; + + /** + * 分页列表查询 + * + * @param zyDbtx + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "代办提醒-分页列表查询") + @ApiOperation(value="代办提醒-分页列表查询", notes="代办提醒-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(ZyDbtx zyDbtx, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(zyDbtx, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = zyDbtxService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param zyDbtx + * @return + */ + @AutoLog(value = "代办提醒-添加") + @ApiOperation(value="代办提醒-添加", notes="代办提醒-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody ZyDbtx zyDbtx) { + zyDbtxService.save(zyDbtx); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param zyDbtx + * @return + */ + @AutoLog(value = "代办提醒-编辑") + @ApiOperation(value="代办提醒-编辑", notes="代办提醒-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody ZyDbtx zyDbtx) { + zyDbtxService.updateById(zyDbtx); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "代办提醒-通过id删除") + @ApiOperation(value="代办提醒-通过id删除", notes="代办提醒-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + zyDbtxService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "代办提醒-批量删除") + @ApiOperation(value="代办提醒-批量删除", notes="代办提醒-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.zyDbtxService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "代办提醒-通过id查询") + @ApiOperation(value="代办提醒-通过id查询", notes="代办提醒-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + ZyDbtx zyDbtx = zyDbtxService.getById(id); + if(zyDbtx==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(zyDbtx); + } + + /** + * 导出excel + * + * @param request + * @param zyDbtx + */ + @RequiresPermissions("zyDbtx:zy_dbtx:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ZyDbtx zyDbtx) { + return super.exportXls(request, zyDbtx, ZyDbtx.class, "代办提醒"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("zyDbtx:zy_dbtx:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, ZyDbtx.class); + } + + + @AutoLog(value = "代办提醒-通过rwbh") + @ApiOperation(value="代办提醒-通过rwbh删除", notes="代办提醒-通过rwbh删除") + @PostMapping(value = "/deleteByRwbhCreate") + public Result deleteByRwbhCreate(@RequestBody ZyDbtx zyDbtx) { + String rwbh = zyDbtx.getRwbh(); + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + UpdateWrapper zyDbtxDeleteMapping = new UpdateWrapper<>(); + zyDbtxDeleteMapping.eq("rwbh", rwbh); + zyDbtxDeleteMapping.eq("create_by", sysUser.getUsername()); + zyDbtxService.remove(zyDbtxDeleteMapping); + return Result.OK(null); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/entity/ZyDbtx.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/entity/ZyDbtx.java new file mode 100644 index 00000000..c0b57986 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/entity/ZyDbtx.java @@ -0,0 +1,77 @@ +package org.jeecg.modules.kc.zyDbtx.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableLogic; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 代办提醒 + * @Author: jeecg-boot + * @Date: 2024-05-24 + * @Version: V1.0 + */ +@Data +@TableName("zy_dbtx") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="zy_dbtx对象", description="代办提醒") +public class ZyDbtx implements Serializable { + private static final long serialVersionUID = 1L; + + /**id*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "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*/ + @ApiModelProperty(value = "updateBy") + private java.lang.String updateBy; + /**updateTime*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "updateTime") + private java.util.Date updateTime; + /**通知类型(0发布作业 1评分 2测验 3问卷 4讨论)*/ + @Excel(name = "通知类型(0发布作业 1评分 2测验 3问卷 4讨论)", width = 15, dicCode = "dbtx_type") + @Dict(dicCode = "dbtx_type") + @ApiModelProperty(value = "通知类型(0发布作业 1评分 2测验 3问卷 4讨论)") + private java.lang.String type; + /**任务编号*/ + @Excel(name = "任务编号", width = 15) + @ApiModelProperty(value = "任务编号") + private java.lang.String rwbh; + /**任务id*/ + @Excel(name = "任务id", width = 15) + @ApiModelProperty(value = "任务id") + private java.lang.String mainId; + /**内容*/ + @Excel(name = "内容", width = 15) + @ApiModelProperty(value = "内容") + private java.lang.String content; + /**标识*/ + @Excel(name = "标识", width = 15, dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "标识") + private java.lang.String flag; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/mapper/ZyDbtxMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/mapper/ZyDbtxMapper.java new file mode 100644 index 00000000..fec31b12 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/mapper/ZyDbtxMapper.java @@ -0,0 +1,18 @@ +package org.jeecg.modules.kc.zyDbtx.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 代办提醒 + * @Author: jeecg-boot + * @Date: 2024-05-24 + * @Version: V1.0 + */ +public interface ZyDbtxMapper extends BaseMapper { + + List getDbtxList(ZyDbtx zyDbtx); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/mapper/xml/ZyDbtxMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/mapper/xml/ZyDbtxMapper.xml new file mode 100644 index 00000000..cf334bfc --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/mapper/xml/ZyDbtxMapper.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/service/IZyDbtxService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/service/IZyDbtxService.java new file mode 100644 index 00000000..157d3a14 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/service/IZyDbtxService.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.kc.zyDbtx.service; + +import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * @Description: 代办提醒 + * @Author: jeecg-boot + * @Date: 2024-05-24 + * @Version: V1.0 + */ +public interface IZyDbtxService extends IService { + + List getDbtxList(ZyDbtx zyDbtx); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/service/impl/ZyDbtxServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/service/impl/ZyDbtxServiceImpl.java new file mode 100644 index 00000000..f0ab3273 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyDbtx/service/impl/ZyDbtxServiceImpl.java @@ -0,0 +1,25 @@ +package org.jeecg.modules.kc.zyDbtx.service.impl; + +import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx; +import org.jeecg.modules.kc.zyDbtx.mapper.ZyDbtxMapper; +import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import java.util.List; + +/** + * @Description: 代办提醒 + * @Author: jeecg-boot + * @Date: 2024-05-24 + * @Version: V1.0 + */ +@Service +public class ZyDbtxServiceImpl extends ServiceImpl implements IZyDbtxService { + + @Override + public List getDbtxList(ZyDbtx zyDbtx) { + return baseMapper.getDbtxList(zyDbtx); + } +} 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 a2e770a2..f43d6cc8 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 @@ -269,6 +269,23 @@ public class ZyInfoStudentController extends JeecgController