修改bug
This commit is contained in:
parent
5976b7a1da
commit
f6b02406c0
|
@ -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<KcKechengbiao, IKcK
|
|||
private IKcSzkcService kcSzkcService;
|
||||
@Autowired
|
||||
private IKcSysConfigService kcSysConfigService;
|
||||
@Autowired
|
||||
private IZyDbtxService zyDbtxService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
@ -277,6 +281,25 @@ public class KcKechengbiaoController extends JeecgController<KcKechengbiao, IKcK
|
|||
queryWrapper.orderByAsc("kc.kcmc");
|
||||
Page<KcKechengbiao> page = new Page<KcKechengbiao>(pageNo, pageSize);
|
||||
IPage<KcKechengbiao> pageList = kcKechengbiaoService.getStudentKclist(page, queryWrapper);
|
||||
|
||||
|
||||
//展示代办提醒
|
||||
if(pageList.getRecords().size()>0){
|
||||
ZyDbtx zyDbtx = new ZyDbtx();
|
||||
zyDbtx.setCreateBy(sysUser.getUsername());
|
||||
List<ZyDbtx> 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
@ -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<WjxWjxx, IWjxWjxxService>
|
|||
|
||||
@Autowired
|
||||
private WjxAuthService wjxAuthService;
|
||||
|
||||
@Autowired
|
||||
private IXxhbbksService xxhbbksService;
|
||||
|
||||
@Autowired
|
||||
private IZyDbtxService zyDbtxService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
@ -208,6 +221,37 @@ public class WjxWjxxController extends JeecgController<WjxWjxx, IWjxWjxxService>
|
|||
@GetMapping(value = "/fbwj")
|
||||
public Result<String> 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<Xxhbbks> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.apply("a.xh = b.xh");
|
||||
queryWrapper.eq("b.KCAPZBBH",wjxWjxx.getRwbh());
|
||||
List<Xxhbbks> 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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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<ZyInfo, IZyInfoService> {
|
|||
private IXxhbbksService xxhbbksService;
|
||||
@Autowired
|
||||
private IZyInfoStudentService zyInfoStudentService;
|
||||
|
||||
@Autowired
|
||||
private IZyDbtxService zyDbtxService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
@ -150,6 +134,17 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
|
|||
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);
|
||||
|
|
|
@ -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<ZyInfoStudent, IZyI
|
|||
@Autowired
|
||||
private IZyCcjgService zyCcjgService;
|
||||
|
||||
@Autowired
|
||||
private IZyDbtxService zyDbtxService;
|
||||
|
||||
@Value("${jeecg.path.upload}")
|
||||
private String upLoadPath;
|
||||
/**
|
||||
|
@ -131,10 +136,22 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
|||
@ApiOperation(value="发布评分状态", notes="发布评分状态")
|
||||
@RequestMapping(value = "/editFabu", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> 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<ZyInfoStudent> zyInfoStudentQueryWrapper = new QueryWrapper<>();
|
||||
zyInfoStudentQueryWrapper.eq("main_id",zyInfoStudentPar.getMainId());
|
||||
|
|
|
@ -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<ZyTlq, IZyTlqService> {
|
||||
@Autowired
|
||||
private IZyTlqService zyTlqService;
|
||||
|
||||
@Autowired
|
||||
private IXxhbbksService xxhbbksService;
|
||||
|
||||
@Autowired
|
||||
private IZyDbtxService zyDbtxService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
|
@ -172,4 +185,34 @@ public class ZyTlqController extends JeecgController<ZyTlq, IZyTlqService> {
|
|||
return super.importExcel(request, response, ZyTlq.class);
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "讨论区-发布")
|
||||
@ApiOperation(value="讨论区-发布", notes="讨论区-发布")
|
||||
@RequestMapping(value = "/editFbtl", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> editFbtl(@RequestBody ZyTlq zyTlq) {
|
||||
zyTlqService.updateById(zyTlq);
|
||||
|
||||
|
||||
|
||||
ZyTlq par=zyTlqService.getById(zyTlq.getId());
|
||||
QueryWrapper<Xxhbbks> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.apply("a.xh = b.xh");
|
||||
queryWrapper.eq("b.KCAPZBBH",par.getRwbh());
|
||||
List<Xxhbbks> 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("编辑成功!");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue