修改bug
This commit is contained in:
parent
5d529622e5
commit
f1d366a3c6
|
@ -676,7 +676,6 @@ public class Export extends BaseExport {
|
|||
mainList.clear();
|
||||
|
||||
Map<String, Object> result2 = Maps.newHashMap();
|
||||
//result2.put("教学楼数", "0");
|
||||
Map<String, Integer> jxlMap = Maps.newHashMap();
|
||||
for (String key: mainLogMap.keySet()) {
|
||||
KcZhihuijiaoshiMonitorLog o = mainLogMap.get(key);
|
||||
|
|
|
@ -9,15 +9,23 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
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.config.entity.KcExportConfigTpkwcqkjzglx;
|
||||
import org.jeecg.modules.kc.config.service.IKcExportConfigTpkwcqkjzglxService;
|
||||
import org.jeecg.modules.kc.kcSysConfig.entity.KcSysConfig;
|
||||
import org.jeecg.modules.kc.kcSysConfig.service.IKcSysConfigService;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.StudentCyglSys;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmlbPage;
|
||||
import org.jeecg.modules.kc.wjxDjxx.service.IWjxDjxxService;
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmlb;
|
||||
import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
|
@ -37,6 +45,21 @@ public class WjxDjxxController extends JeecgController<WjxDjxx, IWjxDjxxService>
|
|||
@Autowired
|
||||
private IWjxDjxxService wjxDjxxService;
|
||||
|
||||
|
||||
@Value("${jeecg.path.upload}")
|
||||
private String upLoadPath;
|
||||
|
||||
|
||||
@Value(value="${jeecg.uploadType}")
|
||||
private String uploadType;
|
||||
|
||||
@Autowired
|
||||
private SysBaseApiImpl sysBaseApi;
|
||||
@Autowired
|
||||
private IKcExportConfigTpkwcqkjzglxService kcExportConfigTpkwcqkjzglxService;
|
||||
@Autowired
|
||||
private IKcSysConfigService kcSysConfigService;
|
||||
|
||||
@ApiOperation(value="答卷提交", notes="答卷提交")
|
||||
@PostMapping(value = "/djtj")
|
||||
public Result<String> djtj(@RequestBody List<WjxDjxxTmlbPage> list) {
|
||||
|
@ -65,4 +88,105 @@ public class WjxDjxxController extends JeecgController<WjxDjxx, IWjxDjxxService>
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="教学大纲-分页列表查询", notes="教学大纲-分页列表查询")
|
||||
@GetMapping(value = "/sysList")
|
||||
public Result<IPage<StudentCyglSys>> sysList(StudentCyglSys studentCyglSys,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
QueryWrapper<StudentCyglSys> queryWrapper = new QueryWrapper<StudentCyglSys>();
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapperCon = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
queryWrapperCon.eq("gh",sysUser.getUsername());
|
||||
queryWrapperCon.orderByDesc("create_time");
|
||||
queryWrapperCon.last("limit 1");
|
||||
KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx = kcExportConfigTpkwcqkjzglxService.getOne(queryWrapperCon);
|
||||
queryWrapper.eq("kkdw",kcExportConfigTpkwcqkjzglx.getDwmc());
|
||||
}
|
||||
|
||||
if(com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(studentCyglSys.getXqxn())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
||||
}else{
|
||||
queryWrapper.eq("xqxn",studentCyglSys.getXqxn());
|
||||
}
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentCyglSys.getKkdw()),"kkdw",studentCyglSys.getKkdw());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentCyglSys.getKcmc()),"kcmc",studentCyglSys.getKcmc());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentCyglSys.getKcbh()),"kcbh",studentCyglSys.getKcbh());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentCyglSys.getSkjs()),"skjs",studentCyglSys.getSkjs());
|
||||
|
||||
|
||||
Page<StudentCyglSys> page = new Page<StudentCyglSys>(pageNo, pageSize);
|
||||
IPage<StudentCyglSys> pageList = wjxDjxxService.sysList(page, queryWrapper,studentCyglSys);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/exportSysXls")
|
||||
public ModelAndView exportSysXls(HttpServletRequest request, StudentCyglSys studentCyglSys) {
|
||||
String title = "学生作业管理";
|
||||
// Step.1 组装查询条件
|
||||
QueryWrapper<StudentCyglSys> queryWrapper = new QueryWrapper<>();
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapperCon = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
queryWrapperCon.eq("gh",sysUser.getUsername());
|
||||
queryWrapperCon.orderByDesc("create_time");
|
||||
queryWrapperCon.last("limit 1");
|
||||
KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx = kcExportConfigTpkwcqkjzglxService.getOne(queryWrapperCon);
|
||||
queryWrapper.eq("kkdw",kcExportConfigTpkwcqkjzglx.getDwmc());
|
||||
}
|
||||
|
||||
if(com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(studentCyglSys.getXqxn())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
||||
}else{
|
||||
queryWrapper.eq("xqxn",studentCyglSys.getXqxn());
|
||||
}
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentCyglSys.getKkdw()),"kkdw",studentCyglSys.getKkdw());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentCyglSys.getKcmc()),"kcmc",studentCyglSys.getKcmc());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentCyglSys.getKcbh()),"kcbh",studentCyglSys.getKcbh());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(studentCyglSys.getSkjs()),"skjs",studentCyglSys.getSkjs());
|
||||
|
||||
// Step.2 获取导出数据
|
||||
List<StudentCyglSys> exportList = service.exportSysXls(queryWrapper,studentCyglSys);
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, title);
|
||||
mv.addObject(NormalExcelConstants.CLASS, StudentCyglSys.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title);
|
||||
exportParams.setImageBasePath(upLoadPath);
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
package org.jeecg.modules.kc.wjxDjxx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.StudentCyglSys;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxDj;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx;
|
||||
|
@ -36,4 +40,8 @@ public interface WjxDjxxMapper extends BaseMapper<WjxDjxx> {
|
|||
List<WjxDjxxDj> findUnDjjgsDJPage(WjxDjxxDj params);
|
||||
|
||||
List<WjxDjxxDj> findAllDjjgsDjPage(WjxDjxxDj params);
|
||||
|
||||
IPage<StudentCyglSys> sysList(Page<StudentCyglSys> page,@Param(Constants.WRAPPER) QueryWrapper<StudentCyglSys> queryWrapper, StudentCyglSys studentCyglSys);
|
||||
|
||||
List<StudentCyglSys> exportSysXls(@Param(Constants.WRAPPER) QueryWrapper<StudentCyglSys> queryWrapper, StudentCyglSys studentCyglSys);
|
||||
}
|
||||
|
|
|
@ -228,4 +228,50 @@
|
|||
</if>
|
||||
order by b.total_score desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="sysList" resultType="org.jeecg.modules.kc.wjxDjxx.entity.StudentCyglSys">
|
||||
select distinct a.id,b.xqxn,t.kcmc,t.skjs,b.title,b.create_by as stuNo,c.xm as stuName,'已提交' as status , a.score,b.create_time
|
||||
from wjx_djxx a
|
||||
inner join wjx_wjxx b on a.vid = b.vid
|
||||
inner JOIN (
|
||||
SELECT DISTINCT
|
||||
kcbh,kcmc,kkdw,kcxz,szkc,xqxn, rwbh, skdd, xkrs, jgh,concat(WEEK,REPLACE ( hh, '、', '' )) AS sksj,skjs
|
||||
FROM
|
||||
kc_kechengbiao
|
||||
${ew.customSqlSegment}
|
||||
) t on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xqxn
|
||||
inner JOIN xxhbbks c on a.create_by = c.xh
|
||||
<where>
|
||||
<if test="studentCyglSys.stuNo!=null and studentCyglSys.stuNo != ''">
|
||||
and b.create_by like concat('%',#{studentCyglSys.stuNo},'%')
|
||||
</if>
|
||||
<if test="studentCyglSys.stuName!=null and studentCyglSys.stuName != ''">
|
||||
and c.xm like concat('%',#{studentCyglSys.stuName},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="exportSysXls" resultType="org.jeecg.modules.kc.wjxDjxx.entity.StudentCyglSys">
|
||||
select distinct a.id,b.xqxn,t.kcmc,t.skjs,b.title,b.create_by as stuNo,c.xm as stuName,'已提交' as status , a.score,b.create_time
|
||||
from wjx_djxx a
|
||||
inner join wjx_wjxx b on a.vid = b.vid
|
||||
inner JOIN (
|
||||
SELECT DISTINCT
|
||||
kcbh,kcmc,kkdw,kcxz,szkc,xqxn, rwbh, skdd, xkrs, jgh,concat(WEEK,REPLACE ( hh, '、', '' )) AS sksj,skjs
|
||||
FROM
|
||||
kc_kechengbiao
|
||||
${ew.customSqlSegment}
|
||||
) t on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xqxn
|
||||
inner JOIN xxhbbks c on a.create_by = c.xh
|
||||
<where>
|
||||
<if test="studentCyglSys.stuNo!=null and studentCyglSys.stuNo != ''">
|
||||
and b.create_by like concat('%',#{studentCyglSys.stuNo},'%')
|
||||
</if>
|
||||
<if test="studentCyglSys.stuName!=null and studentCyglSys.stuName != ''">
|
||||
and c.xm like concat('%',#{studentCyglSys.stuName},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,6 +1,9 @@
|
|||
package org.jeecg.modules.kc.wjxDjxx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.StudentCyglSys;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxDj;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmlbPage;
|
||||
|
@ -23,4 +26,8 @@ public interface IWjxDjxxService extends IService<WjxDjxx> {
|
|||
List<WjxDjxx> exportList(WjxDjxx wjxDjxx);
|
||||
|
||||
List<WjxDjxxDj> exportDjXls(WjxDjxxDj wjxDjxxdj);
|
||||
|
||||
IPage<StudentCyglSys> sysList(Page<StudentCyglSys> page, QueryWrapper<StudentCyglSys> queryWrapper, StudentCyglSys studentCyglSys);
|
||||
|
||||
List<StudentCyglSys> exportSysXls(QueryWrapper<StudentCyglSys> queryWrapper, StudentCyglSys studentCyglSys);
|
||||
}
|
||||
|
|
|
@ -4,15 +4,13 @@ import com.alibaba.fastjson.JSONArray;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxDj;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmlbPage;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.*;
|
||||
import org.jeecg.modules.kc.wjxDjxx.mapper.WjxDjxxMapper;
|
||||
import org.jeecg.modules.kc.wjxDjxx.service.IWjxDjxxService;
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
||||
|
@ -454,4 +452,14 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
|
|||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<StudentCyglSys> sysList(Page<StudentCyglSys> page, QueryWrapper<StudentCyglSys> queryWrapper, StudentCyglSys studentCyglSys) {
|
||||
return baseMapper.sysList(page, queryWrapper, studentCyglSys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StudentCyglSys> exportSysXls(QueryWrapper<StudentCyglSys> queryWrapper, StudentCyglSys studentCyglSys) {
|
||||
return baseMapper.exportSysXls(queryWrapper, studentCyglSys);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,8 +12,13 @@ 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.modules.kc.config.entity.KcExportConfigTpkwcqkjzglx;
|
||||
import org.jeecg.modules.kc.config.service.IKcExportConfigTpkwcqkjzglxService;
|
||||
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.wjxWjxx.entity.KccyglSys;
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
||||
import org.jeecg.modules.kc.wjxWjxx.service.IWjxWjxxService;
|
||||
|
||||
|
@ -24,10 +29,14 @@ 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.system.service.impl.SysBaseApiImpl;
|
||||
import org.jeecg.modules.tools.WjxAuthService;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
|
@ -57,6 +66,18 @@ public class WjxWjxxController extends JeecgController<WjxWjxx, IWjxWjxxService>
|
|||
|
||||
@Autowired
|
||||
private IZyDbtxService zyDbtxService;
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private SysBaseApiImpl sysBaseApi;
|
||||
@Autowired
|
||||
private IKcExportConfigTpkwcqkjzglxService kcExportConfigTpkwcqkjzglxService;
|
||||
@Autowired
|
||||
private IKcSysConfigService kcSysConfigService;
|
||||
|
||||
@Value("${jeecg.path.upload}")
|
||||
private String upLoadPath;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
@ -78,10 +99,22 @@ public class WjxWjxxController extends JeecgController<WjxWjxx, IWjxWjxxService>
|
|||
// queryWrapper.orderByAsc("start_time");
|
||||
// Page<WjxWjxx> page = new Page<WjxWjxx>(pageNo, pageSize);
|
||||
// IPage<WjxWjxx> pageList = wjxWjxxService.page(page, queryWrapper);
|
||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
wjxWjxx.setCreateBy(user.getUsername());
|
||||
Page<WjxWjxx> pageList = wjxWjxxService.findPage(wjxWjxx, new Page<>(pageNo, pageSize));
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="问卷信息-分页列表查询", notes="问卷信息-分页列表查询")
|
||||
@GetMapping(value = "/newlist")
|
||||
public Result<IPage<WjxWjxx>> newlist(WjxWjxx wjxWjxx,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<WjxWjxx> pageList = wjxWjxxService.findPage(wjxWjxx, new Page<>(pageNo, pageSize));
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
/**
|
||||
* 学生问卷分页列表查询
|
||||
*
|
||||
|
@ -274,4 +307,105 @@ public class WjxWjxxController extends JeecgController<WjxWjxx, IWjxWjxxService>
|
|||
JSONObject res = wjxWjxxService.wjxxDownLoad(id);
|
||||
return Result.OK(res);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="教学大纲-分页列表查询", notes="教学大纲-分页列表查询")
|
||||
@GetMapping(value = "/sysList")
|
||||
public Result<IPage<KccyglSys>> sysList(KccyglSys kccyglSys,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
QueryWrapper<KccyglSys> queryWrapper = new QueryWrapper<KccyglSys>();
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapperCon = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
queryWrapperCon.eq("gh",sysUser.getUsername());
|
||||
queryWrapperCon.orderByDesc("create_time");
|
||||
queryWrapperCon.last("limit 1");
|
||||
KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx = kcExportConfigTpkwcqkjzglxService.getOne(queryWrapperCon);
|
||||
queryWrapper.eq("kkdw",kcExportConfigTpkwcqkjzglx.getDwmc());
|
||||
}
|
||||
|
||||
if(com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(kccyglSys.getXqxn())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
||||
}else{
|
||||
queryWrapper.eq("xqxn",kccyglSys.getXqxn());
|
||||
}
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(kccyglSys.getKkdw()),"kkdw",kccyglSys.getKkdw());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(kccyglSys.getKcmc()),"kcmc",kccyglSys.getKcmc());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(kccyglSys.getKcbh()),"kcbh",kccyglSys.getKcbh());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(kccyglSys.getSkjs()),"skjs",kccyglSys.getSkjs());
|
||||
|
||||
Page<KccyglSys> page = new Page<KccyglSys>(pageNo, pageSize);
|
||||
IPage<KccyglSys> pageList = wjxWjxxService.sysList(page, queryWrapper,kccyglSys);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/exportSysXls")
|
||||
public ModelAndView exportSysXls(HttpServletRequest request, KccyglSys KccyglSys) {
|
||||
String title = "课程测验";
|
||||
// Step.1 组装查询条件
|
||||
QueryWrapper<KccyglSys> queryWrapper = new QueryWrapper<>();
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapperCon = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
queryWrapperCon.eq("gh",sysUser.getUsername());
|
||||
queryWrapperCon.orderByDesc("create_time");
|
||||
queryWrapperCon.last("limit 1");
|
||||
KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx = kcExportConfigTpkwcqkjzglxService.getOne(queryWrapperCon);
|
||||
queryWrapper.eq("kkdw",kcExportConfigTpkwcqkjzglx.getDwmc());
|
||||
}
|
||||
|
||||
if(com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(KccyglSys.getXqxn())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
||||
}else{
|
||||
queryWrapper.eq("xqxn",KccyglSys.getXqxn());
|
||||
}
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(KccyglSys.getKkdw()),"kkdw",KccyglSys.getKkdw());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(KccyglSys.getKcmc()),"kcmc",KccyglSys.getKcmc());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(KccyglSys.getKcbh()),"kcbh",KccyglSys.getKcbh());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(KccyglSys.getSkjs()),"skjs",KccyglSys.getSkjs());
|
||||
|
||||
// Step.2 获取导出数据
|
||||
List<KccyglSys> exportList = service.exportSysXls(queryWrapper,KccyglSys);
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, title);
|
||||
mv.addObject(NormalExcelConstants.CLASS, KccyglSys.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title);
|
||||
exportParams.setImageBasePath(upLoadPath);
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
package org.jeecg.modules.kc.wjxWjxx.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.KccyglSys;
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
@ -17,4 +22,8 @@ public interface WjxWjxxMapper extends BaseMapper<WjxWjxx> {
|
|||
List<WjxWjxx> findStuPage(Page<WjxWjxx> page,WjxWjxx param);
|
||||
WjxWjxx kcxx(@Param("rwbh")String rwbh,@Param("xqxn")String xqxn);
|
||||
void updateVid(@Param("id")String id,@Param("vid")String vid);
|
||||
|
||||
IPage<KccyglSys> sysList(Page<KccyglSys> page, @Param(Constants.WRAPPER) QueryWrapper<KccyglSys> queryWrapper, KccyglSys kccyglSys);
|
||||
|
||||
List<KccyglSys> exportSysXls(@Param(Constants.WRAPPER) QueryWrapper<KccyglSys> queryWrapper, KccyglSys kccyglSys);
|
||||
}
|
||||
|
|
|
@ -29,13 +29,18 @@
|
|||
where rwbh = #{param.rwbh}
|
||||
and xqxn = #{param.xqxn}
|
||||
and atype = #{param.atype}
|
||||
and create_by = #{param.createBy}
|
||||
<if test="param.createBy != null and param.createBy != ''">
|
||||
and create_by = #{param.createBy}
|
||||
</if>
|
||||
<if test="param.title != null and param.title != ''">
|
||||
and a.title like CONCAT('%', #{param.title}, '%')
|
||||
</if>
|
||||
<if test="param.qpublish != null and param.qpublish != ''">
|
||||
and a.qpublish = #{param.qpublish}
|
||||
</if>
|
||||
<if test="param.id != null and param.id != ''">
|
||||
and a.id = #{param.id}
|
||||
</if>
|
||||
order by end_time desc
|
||||
</select>
|
||||
|
||||
|
@ -89,4 +94,51 @@
|
|||
qpublish = '1'
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="sysList" resultType="org.jeecg.modules.kc.wjxWjxx.entity.KccyglSys">
|
||||
SELECT t.kcbh, t.kcmc, t.kkdw, t.kcxz, t.szkc, t.xqxn, t.rwbh, t.skdd, t.xkrs, t.jgh, func_jc (GROUP_CONCAT( t.sksj)) AS sksj, t.skjs,b.num
|
||||
FROM (
|
||||
select xqxn,rwbh,create_by,count(*) as num,atype from wjx_wjxx GROUP BY xqxn,rwbh,create_by,atype
|
||||
) b
|
||||
inner join (
|
||||
SELECT DISTINCT
|
||||
kcbh,kcmc,kkdw,kcxz,szkc,xqxn, rwbh, skdd, xkrs, jgh,concat(WEEK,REPLACE ( hh, '、', '' )) AS sksj,skjs
|
||||
FROM
|
||||
kc_kechengbiao
|
||||
${ew.customSqlSegment}
|
||||
) t on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xqxn
|
||||
<where>
|
||||
<if test="kccyglSys.atype != null and kccyglSys.atype != ''">
|
||||
and b.atype = #{kccyglSys.atype}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
GROUP BY kcbh,kcmc,kkdw,kcxz,szkc,xqxn,rwbh,skjs
|
||||
|
||||
</select>
|
||||
|
||||
<select id="exportSysXls" resultType="org.jeecg.modules.kc.wjxWjxx.entity.KccyglSys">
|
||||
SELECT t.kcbh, t.kcmc, t.kkdw, t.kcxz, t.szkc, t.xqxn, t.rwbh, t.skdd, t.xkrs, t.jgh, func_jc (GROUP_CONCAT( t.sksj)) AS sksj, t.skjs,b.num
|
||||
FROM (
|
||||
select xqxn,rwbh,create_by,count(*) as num,atype from wjx_wjxx GROUP BY xqxn,rwbh,create_by,atype
|
||||
) b
|
||||
inner join (
|
||||
SELECT DISTINCT
|
||||
kcbh,kcmc,kkdw,kcxz,szkc,xqxn, rwbh, skdd, xkrs, jgh,concat(WEEK,REPLACE ( hh, '、', '' )) AS sksj,skjs
|
||||
FROM
|
||||
kc_kechengbiao
|
||||
${ew.customSqlSegment}
|
||||
) t on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xqxn
|
||||
<where>
|
||||
<if test="kccyglSys.atype != null and kccyglSys.atype != ''">
|
||||
and b.atype = #{kccyglSys.atype}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
GROUP BY kcbh,kcmc,kkdw,kcxz,szkc,xqxn,rwbh,skjs
|
||||
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,10 +1,14 @@
|
|||
package org.jeecg.modules.kc.wjxWjxx.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.KccyglSys;
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
@ -22,4 +26,8 @@ public interface IWjxWjxxService extends IService<WjxWjxx> {
|
|||
JSONObject wjxxTjfx(String id);
|
||||
|
||||
JSONObject wjxxDownLoad(String id);
|
||||
|
||||
IPage<KccyglSys> sysList(Page<KccyglSys> page, QueryWrapper<KccyglSys> queryWrapper,KccyglSys kccyglSys);
|
||||
|
||||
List<KccyglSys> exportSysXls(QueryWrapper<KccyglSys> queryWrapper,KccyglSys kccyglSys);
|
||||
}
|
||||
|
|
|
@ -2,13 +2,16 @@ package org.jeecg.modules.kc.wjxWjxx.service.impl;
|
|||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.text.StringUtils;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx;
|
||||
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx;
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.KccyglSys;
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
||||
import org.jeecg.modules.kc.wjxWjxx.mapper.WjxWjxxMapper;
|
||||
import org.jeecg.modules.kc.wjxWjxx.service.IWjxWjxxService;
|
||||
|
@ -42,8 +45,6 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
|||
|
||||
@Override
|
||||
public Page<WjxWjxx> findPage(WjxWjxx wjxWjxx, Page<WjxWjxx> page){
|
||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
wjxWjxx.setCreateBy(user.getUsername());
|
||||
List<WjxWjxx> list = baseMapper.findPage(page,wjxWjxx);
|
||||
page.setRecords(list);
|
||||
return page;
|
||||
|
@ -319,8 +320,36 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
|||
//调用接口,提交
|
||||
String result = wjxUtil.openapi(map,"1001004");
|
||||
JSONObject jsonResult = JSONObject.parseObject(result);
|
||||
System.out.println("1----------->"+jsonResult.toString());
|
||||
if(StringUtils.equals("true",jsonResult.getString("result"))){
|
||||
try {
|
||||
Thread.sleep(2000L);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
JSONObject data = jsonResult.getJSONObject("data");
|
||||
String taskid = data.getString("taskid");
|
||||
Map<String,Object> map2 = new HashMap<>();
|
||||
map2.put("vid",Integer.valueOf(vid));
|
||||
map2.put("suffix",2);
|
||||
map2.put("taskid",taskid);
|
||||
// map.put("suffix",2);
|
||||
String result2 = wjxUtil.openapi(map2,"1001004");
|
||||
JSONObject jsonResult2 = JSONObject.parseObject(result2);
|
||||
System.out.println("2----------->"+jsonResult2.toString());
|
||||
}
|
||||
return jsonResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<KccyglSys> sysList(Page<KccyglSys> page, QueryWrapper<KccyglSys> queryWrapper,KccyglSys kccyglSys) {
|
||||
return baseMapper.sysList(page,queryWrapper,kccyglSys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KccyglSys> exportSysXls(QueryWrapper<KccyglSys> queryWrapper,KccyglSys kccyglSys) {
|
||||
return baseMapper.exportSysXls(queryWrapper,kccyglSys);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -14,6 +14,8 @@ 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.config.entity.KcExportConfigTpkwcqkjzglx;
|
||||
import org.jeecg.modules.kc.config.service.IKcExportConfigTpkwcqkjzglxService;
|
||||
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;
|
||||
|
@ -23,10 +25,16 @@ 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.entity.ZyInfoSys;
|
||||
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.jeecg.modules.system.service.impl.SysBaseApiImpl;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
|
@ -59,7 +67,17 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
|
|||
|
||||
@Autowired
|
||||
private IZyDbtxService zyDbtxService;
|
||||
/**
|
||||
|
||||
@Autowired
|
||||
private SysBaseApiImpl sysBaseApi;
|
||||
@Autowired
|
||||
private IKcExportConfigTpkwcqkjzglxService kcExportConfigTpkwcqkjzglxService;
|
||||
|
||||
@Value("${jeecg.path.upload}")
|
||||
private String upLoadPath;
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param zyInfo
|
||||
|
@ -256,4 +274,102 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="教学大纲-分页列表查询", notes="教学大纲-分页列表查询")
|
||||
@GetMapping(value = "/sysList")
|
||||
public Result<IPage<ZyInfoSys>> sysList(ZyInfoSys zyInfoSys,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
QueryWrapper<ZyInfoSys> queryWrapper = new QueryWrapper<ZyInfoSys>();
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapperCon = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
queryWrapperCon.eq("gh",sysUser.getUsername());
|
||||
queryWrapperCon.orderByDesc("create_time");
|
||||
queryWrapperCon.last("limit 1");
|
||||
KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx = kcExportConfigTpkwcqkjzglxService.getOne(queryWrapperCon);
|
||||
queryWrapper.eq("kkdw",kcExportConfigTpkwcqkjzglx.getDwmc());
|
||||
}
|
||||
|
||||
if(com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(zyInfoSys.getXqxn())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
||||
}else{
|
||||
queryWrapper.eq("xqxn",zyInfoSys.getXqxn());
|
||||
}
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoSys.getKkdw()),"kkdw",zyInfoSys.getKkdw());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoSys.getKcmc()),"kcmc",zyInfoSys.getKcmc());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoSys.getKcbh()),"kcbh",zyInfoSys.getKcbh());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoSys.getSkjs()),"skjs",zyInfoSys.getSkjs());
|
||||
|
||||
Page<ZyInfoSys> page = new Page<ZyInfoSys>(pageNo, pageSize);
|
||||
IPage<ZyInfoSys> pageList = zyInfoService.sysList(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/exportSysXls")
|
||||
public ModelAndView exportSysXls(HttpServletRequest request, ZyInfoSys zyInfoSys) {
|
||||
String title = "课程作业";
|
||||
// Step.1 组装查询条件
|
||||
QueryWrapper<ZyInfoSys> queryWrapper = new QueryWrapper<>();
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapperCon = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
queryWrapperCon.eq("gh",sysUser.getUsername());
|
||||
queryWrapperCon.orderByDesc("create_time");
|
||||
queryWrapperCon.last("limit 1");
|
||||
KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx = kcExportConfigTpkwcqkjzglxService.getOne(queryWrapperCon);
|
||||
queryWrapper.eq("kkdw",kcExportConfigTpkwcqkjzglx.getDwmc());
|
||||
}
|
||||
|
||||
if(com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(zyInfoSys.getXqxn())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
||||
}else{
|
||||
queryWrapper.eq("xqxn",zyInfoSys.getXqxn());
|
||||
}
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoSys.getKkdw()),"kkdw",zyInfoSys.getKkdw());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoSys.getKcmc()),"kcmc",zyInfoSys.getKcmc());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoSys.getKcbh()),"kcbh",zyInfoSys.getKcbh());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoSys.getSkjs()),"skjs",zyInfoSys.getSkjs());
|
||||
|
||||
// Step.2 获取导出数据
|
||||
List<ZyInfoSys> exportList = service.exportSysXls(queryWrapper);
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, title);
|
||||
mv.addObject(NormalExcelConstants.CLASS, ZyInfoSys.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title);
|
||||
exportParams.setImageBasePath(upLoadPath);
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys;
|
||||
|
||||
/**
|
||||
* @Description: 作业发布
|
||||
|
@ -19,4 +20,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
public interface ZyInfoMapper extends BaseMapper<ZyInfo> {
|
||||
|
||||
IPage<ZyInfo> stuList(Page<ZyInfo> page,@Param(Constants.WRAPPER) QueryWrapper<ZyInfo> queryWrapper);
|
||||
|
||||
IPage<ZyInfoSys> sysList(Page<ZyInfoSys> page, @Param(Constants.WRAPPER) QueryWrapper<ZyInfoSys> queryWrapper);
|
||||
|
||||
List<ZyInfoSys> exportSysXls(@Param(Constants.WRAPPER) QueryWrapper<ZyInfoSys> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -23,4 +23,37 @@
|
|||
${ew.customSqlSegment}
|
||||
|
||||
</select>
|
||||
|
||||
<select id="sysList" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||
SELECT t.kcbh, t.kcmc, t.kkdw, t.kcxz, t.szkc, t.xqxn, t.rwbh, t.skdd, t.xkrs, t.jgh, func_jc (GROUP_CONCAT( t.sksj)) AS sksj, t.skjs,b.num
|
||||
FROM (
|
||||
select xnxq,rwbh,create_by,count(*) as num from zy_info GROUP BY xnxq,rwbh,create_by
|
||||
) b
|
||||
inner join (
|
||||
SELECT DISTINCT
|
||||
kcbh,kcmc,kkdw,kcxz,szkc,xqxn, rwbh, skdd, xkrs, jgh,concat(WEEK,REPLACE ( hh, '、', '' )) AS sksj,skjs
|
||||
FROM
|
||||
kc_kechengbiao
|
||||
${ew.customSqlSegment}
|
||||
) t on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xnxq
|
||||
GROUP BY kcbh,kcmc,kkdw,kcxz,szkc,xqxn,rwbh,skjs
|
||||
|
||||
</select>
|
||||
|
||||
<select id="exportSysXls" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys">
|
||||
SELECT t.kcbh, t.kcmc, t.kkdw, t.kcxz, t.szkc, t.xqxn, t.rwbh, t.skdd, t.xkrs, t.jgh, func_jc (GROUP_CONCAT( t.sksj)) AS sksj, t.skjs,b.num
|
||||
FROM (
|
||||
select xnxq,rwbh,create_by,count(*) as num from zy_info GROUP BY xnxq,rwbh,create_by
|
||||
) b
|
||||
inner join (
|
||||
SELECT DISTINCT
|
||||
kcbh,kcmc,kkdw,kcxz,szkc,xqxn, rwbh, skdd, xkrs, jgh,concat(WEEK,REPLACE ( hh, '、', '' )) AS sksj,skjs
|
||||
FROM
|
||||
kc_kechengbiao
|
||||
${ew.customSqlSegment}
|
||||
) t on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xnxq
|
||||
GROUP BY kcbh,kcmc,kkdw,kcxz,szkc,xqxn,rwbh,skjs
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 作业发布
|
||||
|
@ -15,4 +18,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
public interface IZyInfoService extends IService<ZyInfo> {
|
||||
|
||||
IPage<ZyInfo> stuList(Page<ZyInfo> page, QueryWrapper<ZyInfo> queryWrapper);
|
||||
|
||||
IPage<ZyInfoSys> sysList(Page<ZyInfoSys> page, QueryWrapper<ZyInfoSys> queryWrapper);
|
||||
|
||||
List<ZyInfoSys> exportSysXls(QueryWrapper<ZyInfoSys> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -4,12 +4,15 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfoSys;
|
||||
import org.jeecg.modules.kc.zyInfo.mapper.ZyInfoMapper;
|
||||
import org.jeecg.modules.kc.zyInfo.service.IZyInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 作业发布
|
||||
* @Author: jeecg-boot
|
||||
|
@ -23,4 +26,14 @@ public class ZyInfoServiceImpl extends ServiceImpl<ZyInfoMapper, ZyInfo> impleme
|
|||
public IPage<ZyInfo> stuList(Page<ZyInfo> page, QueryWrapper<ZyInfo> queryWrapper) {
|
||||
return baseMapper.stuList(page, queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<ZyInfoSys> sysList(Page<ZyInfoSys> page, QueryWrapper<ZyInfoSys> queryWrapper) {
|
||||
return baseMapper.sysList(page, queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZyInfoSys> exportSysXls(QueryWrapper<ZyInfoSys> queryWrapper) {
|
||||
return baseMapper.exportSysXls(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,12 +22,17 @@ import org.jeecg.common.system.vo.LoginUser;
|
|||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.common.util.SpringContextHolder;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.kc.config.entity.KcExportConfigTpkwcqkjzglx;
|
||||
import org.jeecg.modules.kc.config.service.IKcExportConfigTpkwcqkjzglxService;
|
||||
import org.jeecg.modules.kc.kcSysConfig.entity.KcSysConfig;
|
||||
import org.jeecg.modules.kc.kcSysConfig.service.IKcSysConfigService;
|
||||
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;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
|
@ -35,6 +40,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
|
||||
import org.jeecg.modules.tools.Global;
|
||||
import org.jeecg.modules.tools.pdf.PDFUtil;
|
||||
import org.jeecg.modules.zyk.entity.ZykInfo;
|
||||
|
@ -91,6 +97,13 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
|||
@Value(value="${jeecg.uploadType}")
|
||||
private String uploadType;
|
||||
|
||||
@Autowired
|
||||
private SysBaseApiImpl sysBaseApi;
|
||||
@Autowired
|
||||
private IKcExportConfigTpkwcqkjzglxService kcExportConfigTpkwcqkjzglxService;
|
||||
@Autowired
|
||||
private IKcSysConfigService kcSysConfigService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
@ -411,4 +424,102 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="教学大纲-分页列表查询", notes="教学大纲-分页列表查询")
|
||||
@GetMapping(value = "/sysList")
|
||||
public Result<IPage<ZyInfoStudentSys>> sysList(ZyInfoStudentSys zyInfoStudentSys,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
QueryWrapper<ZyInfoStudentSys> queryWrapper = new QueryWrapper<ZyInfoStudentSys>();
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapperCon = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
queryWrapperCon.eq("gh",sysUser.getUsername());
|
||||
queryWrapperCon.orderByDesc("create_time");
|
||||
queryWrapperCon.last("limit 1");
|
||||
KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx = kcExportConfigTpkwcqkjzglxService.getOne(queryWrapperCon);
|
||||
queryWrapper.eq("kkdw",kcExportConfigTpkwcqkjzglx.getDwmc());
|
||||
}
|
||||
|
||||
if(com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(zyInfoStudentSys.getXnxq())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
||||
}else{
|
||||
queryWrapper.eq("xqxn",zyInfoStudentSys.getXnxq());
|
||||
}
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoStudentSys.getKkdw()),"kkdw",zyInfoStudentSys.getKkdw());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoStudentSys.getKcmc()),"kcmc",zyInfoStudentSys.getKcmc());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoStudentSys.getKcbh()),"kcbh",zyInfoStudentSys.getKcbh());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoStudentSys.getSkjs()),"skjs",zyInfoStudentSys.getSkjs());
|
||||
|
||||
|
||||
Page<ZyInfoStudentSys> page = new Page<ZyInfoStudentSys>(pageNo, pageSize);
|
||||
IPage<ZyInfoStudentSys> pageList = zyInfoStudentService.sysList(page, queryWrapper,zyInfoStudentSys);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/exportSysXls")
|
||||
public ModelAndView exportSysXls(HttpServletRequest request, ZyInfoStudentSys zyInfoStudentSys) {
|
||||
String title = "学生作业管理";
|
||||
// Step.1 组装查询条件
|
||||
QueryWrapper<ZyInfoStudentSys> queryWrapper = new QueryWrapper<>();
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapperCon = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
queryWrapperCon.eq("gh",sysUser.getUsername());
|
||||
queryWrapperCon.orderByDesc("create_time");
|
||||
queryWrapperCon.last("limit 1");
|
||||
KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx = kcExportConfigTpkwcqkjzglxService.getOne(queryWrapperCon);
|
||||
queryWrapper.eq("kkdw",kcExportConfigTpkwcqkjzglx.getDwmc());
|
||||
}
|
||||
|
||||
if(com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(zyInfoStudentSys.getXnxq())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
||||
}else{
|
||||
queryWrapper.eq("xqxn",zyInfoStudentSys.getXnxq());
|
||||
}
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoStudentSys.getKkdw()),"kkdw",zyInfoStudentSys.getKkdw());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoStudentSys.getKcmc()),"kcmc",zyInfoStudentSys.getKcmc());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoStudentSys.getKcbh()),"kcbh",zyInfoStudentSys.getKcbh());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyInfoStudentSys.getSkjs()),"skjs",zyInfoStudentSys.getSkjs());
|
||||
|
||||
// Step.2 获取导出数据
|
||||
List<ZyInfoStudentSys> exportList = service.exportSysXls(queryWrapper,zyInfoStudentSys);
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, title);
|
||||
mv.addObject(NormalExcelConstants.CLASS, ZyInfoStudentSys.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title);
|
||||
exportParams.setImageBasePath(upLoadPath);
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -23,4 +24,8 @@ public interface ZyInfoStudentMapper extends BaseMapper<ZyInfoStudent> {
|
|||
IPage<ZyInfoStudent> cdxxlist(Page<ZyInfoStudent> page,@Param(Constants.WRAPPER) QueryWrapper<ZyInfoStudent> queryWrapper);
|
||||
|
||||
List<ZyInfoStudent> getCcjg(ZyInfoStudent zyInfoStudent);
|
||||
|
||||
IPage<ZyInfoStudentSys> sysList(Page<ZyInfoStudentSys> page,@Param(Constants.WRAPPER) QueryWrapper<ZyInfoStudentSys> queryWrapper, ZyInfoStudentSys zyInfoStudentSys);
|
||||
|
||||
List<ZyInfoStudentSys> exportSysXls(@Param(Constants.WRAPPER) QueryWrapper<ZyInfoStudentSys> queryWrapper, ZyInfoStudentSys zyInfoStudentSys);
|
||||
}
|
||||
|
|
|
@ -34,4 +34,52 @@
|
|||
and a.checkdate = t.checkdate
|
||||
and a.zy_stu_id = t.zy_stu_id
|
||||
</select>
|
||||
|
||||
|
||||
<select id="sysList" resultType="org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys">
|
||||
select distinct a.id,b.xnxq,t.kcmc,t.skjs,b.title,b.create_by as stuNo,c.xm as stuName,if(score != null,'已评分',if(a.file_path != null ,'已提交','未提交')) as status ,
|
||||
wwxsl,nwxsl,aigcxsl,wwsftg,nwsftg,aigcsftg,xnxsl,xnsftg,a.file_path,a.pdf_path
|
||||
from zy_info_student a
|
||||
inner join zy_info b on a.main_id = b.id
|
||||
inner JOIN (
|
||||
SELECT DISTINCT
|
||||
kcbh,kcmc,kkdw,kcxz,szkc,xqxn, rwbh, skdd, xkrs, jgh,concat(WEEK,REPLACE ( hh, '、', '' )) AS sksj,skjs
|
||||
FROM
|
||||
kc_kechengbiao
|
||||
${ew.customSqlSegment}
|
||||
) t on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xnxq
|
||||
inner JOIN xxhbbks c on a.create_by = c.xh
|
||||
<where>
|
||||
<if test="zyInfoStudentSys.stuNo!=null and zyInfoStudentSys.stuNo != ''">
|
||||
and b.create_by like concat('%',#{zyInfoStudentSys.stuNo},'%')
|
||||
</if>
|
||||
<if test="zyInfoStudentSys.stuName!=null and zyInfoStudentSys.stuName != ''">
|
||||
and c.xm like concat('%',#{zyInfoStudentSys.stuName},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="exportSysXls" resultType="org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys">
|
||||
select distinct a.id,b.xnxq,t.kcmc,t.skjs,b.title,b.create_by as stuNo,c.xm as stuName,if(score != null,'已评分',if(a.file_path != null ,'已提交','未提交')) as status ,
|
||||
wwxsl,nwxsl,aigcxsl,wwsftg,nwsftg,aigcsftg,xnxsl,xnsftg
|
||||
from zy_info_student a
|
||||
inner join zy_info b on a.main_id = b.id
|
||||
inner JOIN (
|
||||
SELECT DISTINCT
|
||||
kcbh,kcmc,kkdw,kcxz,szkc,xqxn, rwbh, skdd, xkrs, jgh,concat(WEEK,REPLACE ( hh, '、', '' )) AS sksj,skjs
|
||||
FROM
|
||||
kc_kechengbiao
|
||||
${ew.customSqlSegment}
|
||||
) t on t.jgh = b.create_by and t.rwbh = b.rwbh and t.xqxn = b.xnxq
|
||||
inner JOIN xxhbbks c on a.create_by = c.xh
|
||||
<where>
|
||||
<if test="zyInfoStudentSys.stuNo!=null and zyInfoStudentSys.stuNo != ''">
|
||||
and b.create_by like concat('%',#{zyInfoStudentSys.stuNo},'%')
|
||||
</if>
|
||||
<if test="zyInfoStudentSys.stuName!=null and zyInfoStudentSys.stuName != ''">
|
||||
and c.xm like concat('%',#{zyInfoStudentSys.stuName},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
@ -31,4 +32,8 @@ public interface IZyInfoStudentService extends IService<ZyInfoStudent> {
|
|||
List<ZyInfoStudent> getCcjg(ZyInfoStudent zyInfoStudent);
|
||||
|
||||
void fabuBatch(List<String> asList);
|
||||
|
||||
IPage<ZyInfoStudentSys> sysList(Page<ZyInfoStudentSys> page, QueryWrapper<ZyInfoStudentSys> queryWrapper, ZyInfoStudentSys zyInfoStudentSys);
|
||||
|
||||
List<ZyInfoStudentSys> exportSysXls(QueryWrapper<ZyInfoStudentSys> queryWrapper, ZyInfoStudentSys zyInfoStudentSys);
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ import org.jeecg.modules.kc.zyCcjg.mapper.ZyCcjgMapper;
|
|||
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.entity.ZyInfoStudentSys;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.mapper.ZyInfoStudentMapper;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -165,6 +166,16 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<ZyInfoStudentSys> sysList(Page<ZyInfoStudentSys> page, QueryWrapper<ZyInfoStudentSys> queryWrapper, ZyInfoStudentSys zyInfoStudentSys) {
|
||||
return baseMapper.sysList(page, queryWrapper, zyInfoStudentSys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZyInfoStudentSys> exportSysXls(QueryWrapper<ZyInfoStudentSys> queryWrapper, ZyInfoStudentSys zyInfoStudentSys) {
|
||||
return baseMapper.exportSysXls(queryWrapper, zyInfoStudentSys);
|
||||
}
|
||||
|
||||
//aigc提交
|
||||
private void aigcSave(ZyInfoStudent zyInfoStudent,HttpServletResponse response) {
|
||||
String url = "https://vims.fanyu.com/tool/AIGCCheck/paperSubmit";
|
||||
|
|
|
@ -20,15 +20,25 @@ import org.jeecg.common.system.vo.LoginUser;
|
|||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.common.util.SpringContextHolder;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.kc.config.entity.KcExportConfigTpkwcqkjzglx;
|
||||
import org.jeecg.modules.kc.config.service.IKcExportConfigTpkwcqkjzglxService;
|
||||
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.zyJxdg.entity.ZyJxdg;
|
||||
import org.jeecg.modules.kc.zyJxdg.entity.ZyJxdgSys;
|
||||
import org.jeecg.modules.kc.zyJxdg.service.IZyJxdgService;
|
||||
import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
|
||||
import org.jeecg.modules.tools.Global;
|
||||
import org.jeecg.modules.tools.pdf.PDFUtil;
|
||||
import org.jeecg.modules.zyk.entity.ZykInfo;
|
||||
import org.jeecg.modules.zyk.service.IZykService;
|
||||
import org.jeecg.modules.zyk.utils.WjlxEnum;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -39,6 +49,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
@ -70,6 +81,15 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
|
|||
|
||||
@Autowired
|
||||
private Global global;
|
||||
|
||||
@Autowired
|
||||
private SysBaseApiImpl sysBaseApi;
|
||||
@Autowired
|
||||
private IKcExportConfigTpkwcqkjzglxService kcExportConfigTpkwcqkjzglxService;
|
||||
|
||||
@Autowired
|
||||
private IKcSysConfigService kcSysConfigService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
@ -461,4 +481,200 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
|
|||
return Result.OK(zyJxdg);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="教学大纲-分页列表查询", notes="教学大纲-分页列表查询")
|
||||
@GetMapping(value = "/sysList")
|
||||
public Result<IPage<ZyJxdgSys>> sysList(ZyJxdgSys zyJxdg,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
QueryWrapper<ZyJxdgSys> queryWrapper = new QueryWrapper<ZyJxdgSys>();
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapperCon = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
queryWrapperCon.eq("gh",sysUser.getUsername());
|
||||
queryWrapperCon.orderByDesc("create_time");
|
||||
queryWrapperCon.last("limit 1");
|
||||
KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx = kcExportConfigTpkwcqkjzglxService.getOne(queryWrapperCon);
|
||||
queryWrapper.eq("kkdw",kcExportConfigTpkwcqkjzglx.getDwmc());
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(zyJxdg.getXqxn())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
||||
}else{
|
||||
queryWrapper.eq("xqxn",zyJxdg.getXqxn());
|
||||
}
|
||||
queryWrapper.like(StringUtils.isNotEmpty(zyJxdg.getKkdw()),"kkdw",zyJxdg.getKkdw());
|
||||
queryWrapper.like(StringUtils.isNotEmpty(zyJxdg.getKcmc()),"kcmc",zyJxdg.getKcmc());
|
||||
queryWrapper.like(StringUtils.isNotEmpty(zyJxdg.getKcbh()),"kcbh",zyJxdg.getKcbh());
|
||||
queryWrapper.like(StringUtils.isNotEmpty(zyJxdg.getSkjs()),"skjs",zyJxdg.getSkjs());
|
||||
|
||||
Page<ZyJxdgSys> page = new Page<ZyJxdgSys>(pageNo, pageSize);
|
||||
IPage<ZyJxdgSys> pageList = zyJxdgService.sysList(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@AutoLog(value = "学院管理员修改教学内容")
|
||||
@ApiOperation(value="学院管理员修改教学内容", notes="学院管理员修改教学内容")
|
||||
@PostMapping(value = "/sysUpdateJxnr")
|
||||
public Result<ZyJxdg> sysUpdateJxnr(@RequestBody ZyJxdg zyJxdg) {
|
||||
if(StringUtils.isEmpty(zyJxdg.getYwId())){
|
||||
zyJxdg.setCreateBy(zyJxdg.getTeano());
|
||||
zyJxdgService.save(zyJxdg);
|
||||
return Result.OK(zyJxdg);
|
||||
}else{
|
||||
UpdateWrapper<ZyJxdg> zyJxdgUw = new UpdateWrapper<>();
|
||||
zyJxdgUw.set("file_path", zyJxdg.getFilePath());
|
||||
zyJxdgUw.set("jxrl_file_path", zyJxdg.getJxrlFilePath());
|
||||
zyJxdgUw.eq("id", zyJxdg.getYwId());
|
||||
zyJxdgService.update(zyJxdgUw);
|
||||
zyJxdg = zyJxdgService.getById(zyJxdg.getYwId());
|
||||
return Result.OK(zyJxdg);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value="管理员word转pdf", notes="管理员word转pdf")
|
||||
@PostMapping(value = "/sysWordToPdf")
|
||||
public void sysWordToPdf(@RequestBody ZyJxdg zyJxdg) {
|
||||
if(StringUtils.isNotEmpty(zyJxdg.getJxrlFilePath())){
|
||||
String nameLast = zyJxdg.getJxrlFilePath().substring(zyJxdg.getJxrlFilePath().lastIndexOf(".")+1);
|
||||
if(StringUtils.equals("pdf",nameLast)){
|
||||
zyJxdg.setJxrlPdfPath(zyJxdg.getJxrlFilePath());
|
||||
}else{
|
||||
if(StringUtils.equals("local",uploadType)) {
|
||||
FileUtil.mkdir(global.getContractDickPath());
|
||||
String dd = DateUtils.formatDate(new Date(), "yyyyMMddHHmmss");
|
||||
String docPath = upLoadPath + File.separator + zyJxdg.getJxrlFilePath();
|
||||
String namePath = dd + ".pdf";
|
||||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
PDFUtil.office2PDF(docPath, pdfPath);
|
||||
zyJxdg.setJxrlPdfPath("contract/" + namePath);
|
||||
}else if(StringUtils.equals("sftp",uploadType)){
|
||||
ZykInfo zykInfo = new ZykInfo();
|
||||
zykInfo.setBizId(zyJxdg.getId());
|
||||
zykInfo.setBizTable("zy_jxdg");
|
||||
zykInfo.setWjlx(WjlxEnum.JXRL.getType());
|
||||
zykInfo.setRwbh(zyJxdg.getRwbh());
|
||||
zykInfo.setFileName(zyJxdg.getJxrlFilePath());
|
||||
Map<String,String> map = zykService.saveToZykJxdg(zykInfo);
|
||||
String fileName = map.get("data");
|
||||
String pdfName = map.get("pdfData");
|
||||
zyJxdg.setJxrlFilePath(fileName);
|
||||
zyJxdg.setJxrlPdfPath(pdfName);
|
||||
zykService.disConnect();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
zyJxdg.setJxrlFilePath(null);
|
||||
zyJxdg.setJxrlPdfPath(null);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(zyJxdg.getFilePath())){
|
||||
String nameLast = zyJxdg.getFilePath().substring(zyJxdg.getFilePath().lastIndexOf(".")+1);
|
||||
if(StringUtils.equals("pdf",nameLast)){
|
||||
zyJxdg.setPdfPath(zyJxdg.getFilePath());
|
||||
}else{
|
||||
|
||||
if(StringUtils.equals("local",global.uploadType)) {
|
||||
FileUtil.mkdir(global.getContractDickPath());
|
||||
String dd = DateUtils.formatDate(new Date(), "yyyyMMddHHmmss");
|
||||
String docPath = upLoadPath + File.separator + zyJxdg.getFilePath();
|
||||
String namePath = dd + ".pdf";
|
||||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
PDFUtil.office2PDF(docPath, pdfPath);
|
||||
zyJxdg.setPdfPath("contract/" + namePath);
|
||||
}else if(StringUtils.equals("sftp",global.uploadType)){
|
||||
ZykInfo zykInfo = new ZykInfo();
|
||||
zykInfo.setBizId(zyJxdg.getId());
|
||||
zykInfo.setBizTable("zy_jxdg");
|
||||
zykInfo.setWjlx(WjlxEnum.JXDG.getType());
|
||||
zykInfo.setRwbh(zyJxdg.getRwbh());
|
||||
zykInfo.setFileName(zyJxdg.getFilePath());
|
||||
Map<String,String> map = zykService.saveToZykJxdg(zykInfo);
|
||||
String fileName = map.get("data");
|
||||
String pdfName = map.get("pdfData");
|
||||
zyJxdg.setFilePath(fileName);
|
||||
zyJxdg.setPdfPath(pdfName);
|
||||
zykService.disConnect();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
zyJxdg.setFilePath(null);
|
||||
zyJxdg.setPdfPath(null);
|
||||
}
|
||||
UpdateWrapper<ZyJxdg> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.set("file_path",zyJxdg.getFilePath());
|
||||
updateWrapper.set("pdf_path",zyJxdg.getPdfPath());
|
||||
updateWrapper.set("jxrl_file_path",zyJxdg.getJxrlFilePath());
|
||||
updateWrapper.set("jxrl_pdf_path",zyJxdg.getJxrlPdfPath());
|
||||
updateWrapper.eq("id",zyJxdg.getId());
|
||||
zyJxdgService.update(updateWrapper);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/exportSysXls")
|
||||
public ModelAndView exportSysXls(HttpServletRequest request, ZyJxdgSys zyJxdg) {
|
||||
String title = "教学内容";
|
||||
// Step.1 组装查询条件
|
||||
QueryWrapper<ZyJxdgSys> queryWrapper = new QueryWrapper<>();
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapperCon = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
queryWrapperCon.eq("gh",sysUser.getUsername());
|
||||
queryWrapperCon.orderByDesc("create_time");
|
||||
queryWrapperCon.last("limit 1");
|
||||
KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx = kcExportConfigTpkwcqkjzglxService.getOne(queryWrapperCon);
|
||||
queryWrapper.eq("kkdw",kcExportConfigTpkwcqkjzglx.getDwmc());
|
||||
}
|
||||
|
||||
if(StringUtils.isEmpty(zyJxdg.getXqxn())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
||||
}else{
|
||||
queryWrapper.eq("xqxn",zyJxdg.getXqxn());
|
||||
}
|
||||
queryWrapper.like(StringUtils.isNotEmpty(zyJxdg.getKkdw()),"kkdw",zyJxdg.getKkdw());
|
||||
queryWrapper.like(StringUtils.isNotEmpty(zyJxdg.getKcmc()),"kcmc",zyJxdg.getKcmc());
|
||||
queryWrapper.like(StringUtils.isNotEmpty(zyJxdg.getKcbh()),"kcbh",zyJxdg.getKcbh());
|
||||
queryWrapper.like(StringUtils.isNotEmpty(zyJxdg.getSkjs()),"skjs",zyJxdg.getSkjs());
|
||||
|
||||
// Step.2 获取导出数据
|
||||
List<ZyJxdgSys> exportList = service.exportSysXls(queryWrapper);
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, title);
|
||||
mv.addObject(NormalExcelConstants.CLASS, ZyJxdgSys.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title);
|
||||
exportParams.setImageBasePath(upLoadPath);
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -87,4 +87,6 @@ public class ZyJxdg implements Serializable {
|
|||
private java.lang.String jxrlPdfPath;
|
||||
@TableField(exist = false)
|
||||
private String teano;
|
||||
@TableField(exist = false)
|
||||
private String ywId;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,14 @@ package org.jeecg.modules.kc.zyJxdg.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.zyJxdg.entity.ZyJxdg;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.kc.zyJxdg.entity.ZyJxdgSys;
|
||||
|
||||
/**
|
||||
* @Description: 教学大纲
|
||||
|
@ -14,4 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface ZyJxdgMapper extends BaseMapper<ZyJxdg> {
|
||||
|
||||
IPage<ZyJxdgSys> sysList(Page<ZyJxdgSys> page,@Param(Constants.WRAPPER) QueryWrapper<ZyJxdgSys> queryWrapper);
|
||||
|
||||
List<ZyJxdgSys> exportSysXls(@Param(Constants.WRAPPER) QueryWrapper<ZyJxdgSys> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -5,4 +5,37 @@
|
|||
<!-- <select id="selectPage" resultType="org.jeecg.modules.kc.zyJxdg.entity.ZyJxdg">-->
|
||||
|
||||
<!-- </select>-->
|
||||
<select id="sysList" resultType="org.jeecg.modules.kc.zyJxdg.entity.ZyJxdgSys">
|
||||
SELECT t.kcbh, t.kcmc, t.kkdw, t.kcxz, t.szkc, t.xqxn, t.rwbh, t.skdd, t.xkrs, t.jgh, func_jc(GROUP_CONCAT( t.sksj )) AS sksj,t.skjs,
|
||||
b.file_path,b.jxrl_file_path,b.kcjs,b.id as ywId,b.pdf_path,b.jxrl_pdf_path
|
||||
|
||||
FROM
|
||||
(
|
||||
SELECT DISTINCT
|
||||
kcbh, kcmc, kkdw, kcxz, szkc, xqxn, rwbh, skdd, xkrs, jgh,
|
||||
concat ( WEEK, REPLACE ( hh, '、', '' )) AS sksj,skjs
|
||||
FROM kc_kechengbiao
|
||||
${ew.customSqlSegment}
|
||||
) t
|
||||
left join zy_jxdg b on t.jgh = b.create_by and t.rwbh = b.rwbh
|
||||
GROUP BY kcbh, kcmc, kkdw, kcxz, szkc, xqxn, rwbh, skjs
|
||||
ORDER BY xqxn desc
|
||||
</select>
|
||||
|
||||
<select id="exportSysXls" resultType="org.jeecg.modules.kc.zyJxdg.entity.ZyJxdgSys">
|
||||
SELECT t.kcbh, t.kcmc, t.kkdw, t.kcxz, t.szkc, t.xqxn, t.rwbh, t.skdd, t.xkrs, t.jgh, func_jc(GROUP_CONCAT( t.sksj )) AS sksj,t.skjs,
|
||||
b.file_path,b.jxrl_file_path,b.kcjs,b.id as ywId,b.pdf_path,b.jxrl_pdf_path
|
||||
|
||||
FROM
|
||||
(
|
||||
SELECT DISTINCT
|
||||
kcbh, kcmc, kkdw, kcxz, szkc, xqxn, rwbh, skdd, xkrs, jgh,
|
||||
concat ( WEEK, REPLACE ( hh, '、', '' )) AS sksj,skjs
|
||||
FROM kc_kechengbiao
|
||||
${ew.customSqlSegment}
|
||||
) t
|
||||
left join zy_jxdg b on t.jgh = b.create_by and t.rwbh = b.rwbh
|
||||
GROUP BY kcbh, kcmc, kkdw, kcxz, szkc, xqxn, rwbh, skjs
|
||||
ORDER BY xqxn desc
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,7 +1,13 @@
|
|||
package org.jeecg.modules.kc.zyJxdg.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.zyJxdg.entity.ZyJxdg;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.kc.zyJxdg.entity.ZyJxdgSys;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 教学大纲
|
||||
|
@ -12,4 +18,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
public interface IZyJxdgService extends IService<ZyJxdg> {
|
||||
|
||||
void editJxdgyy(ZyJxdg zyJxdg);
|
||||
|
||||
IPage<ZyJxdgSys> sysList(Page<ZyJxdgSys> page, QueryWrapper<ZyJxdgSys> queryWrapper);
|
||||
|
||||
List<ZyJxdgSys> exportSysXls(QueryWrapper<ZyJxdgSys> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -1,16 +1,21 @@
|
|||
package org.jeecg.modules.kc.zyJxdg.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.modules.kc.zyJxdg.entity.ZyJxdg;
|
||||
import org.jeecg.modules.kc.zyJxdg.entity.ZyJxdgSys;
|
||||
import org.jeecg.modules.kc.zyJxdg.mapper.ZyJxdgMapper;
|
||||
import org.jeecg.modules.kc.zyJxdg.service.IZyJxdgService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 教学大纲
|
||||
* @Author: jeecg-boot
|
||||
|
@ -39,4 +44,14 @@ public class ZyJxdgServiceImpl extends ServiceImpl<ZyJxdgMapper, ZyJxdg> impleme
|
|||
baseMapper.updateById(zyJxdgNew);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<ZyJxdgSys> sysList(Page<ZyJxdgSys> page, QueryWrapper<ZyJxdgSys> queryWrapper) {
|
||||
return baseMapper.sysList(page, queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ZyJxdgSys> exportSysXls(QueryWrapper<ZyJxdgSys> queryWrapper) {
|
||||
return baseMapper.exportSysXls(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,12 +16,18 @@ 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.config.entity.KcExportConfigTpkwcqkjzglx;
|
||||
import org.jeecg.modules.kc.config.service.IKcExportConfigTpkwcqkjzglxService;
|
||||
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.wjxDjxx.entity.StudentCyglSys;
|
||||
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.entity.ZyTlqSys;
|
||||
import org.jeecg.modules.kc.zyTlq.service.IZyTlqService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
|
@ -29,6 +35,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
|
@ -65,6 +72,13 @@ public class ZyTlqController extends JeecgController<ZyTlq, IZyTlqService> {
|
|||
|
||||
@Autowired
|
||||
private IZyDbtxService zyDbtxService;
|
||||
|
||||
@Autowired
|
||||
private SysBaseApiImpl sysBaseApi;
|
||||
@Autowired
|
||||
private IKcExportConfigTpkwcqkjzglxService kcExportConfigTpkwcqkjzglxService;
|
||||
@Autowired
|
||||
private IKcSysConfigService kcSysConfigService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
|
@ -220,4 +234,49 @@ public class ZyTlqController extends JeecgController<ZyTlq, IZyTlqService> {
|
|||
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="教学大纲-分页列表查询", notes="教学大纲-分页列表查询")
|
||||
@GetMapping(value = "/sysList")
|
||||
public Result<IPage<ZyTlqSys>> sysList(ZyTlqSys zyTlqSys,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//-------------获取当前登陆人是否是管理员角色,如果不是都按照教务秘书处理---------------------------
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
QueryWrapper<ZyTlqSys> queryWrapper = new QueryWrapper<ZyTlqSys>();
|
||||
if(org.apache.commons.lang.StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapperCon = new QueryWrapper<KcExportConfigTpkwcqkjzglx>();
|
||||
queryWrapperCon.eq("gh",sysUser.getUsername());
|
||||
queryWrapperCon.orderByDesc("create_time");
|
||||
queryWrapperCon.last("limit 1");
|
||||
KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx = kcExportConfigTpkwcqkjzglxService.getOne(queryWrapperCon);
|
||||
queryWrapper.eq("kkdw",kcExportConfigTpkwcqkjzglx.getDwmc());
|
||||
}
|
||||
|
||||
if(com.baomidou.mybatisplus.core.toolkit.StringUtils.isEmpty(zyTlqSys.getXqxn())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.eq("xqxn",kcSysConfig.getFlag1());
|
||||
}else{
|
||||
queryWrapper.eq("xqxn",zyTlqSys.getXqxn());
|
||||
}
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyTlqSys.getKkdw()),"kkdw",zyTlqSys.getKkdw());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyTlqSys.getKcmc()),"kcmc",zyTlqSys.getKcmc());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyTlqSys.getKcbh()),"kcbh",zyTlqSys.getKcbh());
|
||||
queryWrapper.like(com.baomidou.mybatisplus.core.toolkit.StringUtils.isNotEmpty(zyTlqSys.getSkjs()),"skjs",zyTlqSys.getSkjs());
|
||||
|
||||
|
||||
Page<ZyTlqSys> page = new Page<ZyTlqSys>(pageNo, pageSize);
|
||||
IPage<ZyTlqSys> pageList = service.sysList(page, queryWrapper,zyTlqSys);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,9 +2,14 @@ package org.jeecg.modules.kc.zyTlq.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.zyTlq.entity.ZyTlq;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.kc.zyTlq.entity.ZyTlqSys;
|
||||
|
||||
/**
|
||||
* @Description: 讨论区
|
||||
|
@ -14,4 +19,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface ZyTlqMapper extends BaseMapper<ZyTlq> {
|
||||
|
||||
IPage<ZyTlqSys> sysList(Page<ZyTlqSys> page, @Param(Constants.WRAPPER) QueryWrapper<ZyTlqSys> queryWrapper, ZyTlqSys zyTlqSys);
|
||||
}
|
||||
|
|
|
@ -2,4 +2,27 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.kc.zyTlq.mapper.ZyTlqMapper">
|
||||
|
||||
<select id="sysList" resultType="org.jeecg.modules.kc.zyTlq.entity.ZyTlqSys">
|
||||
select distinct b.id,a.xqxn,t.kcmc,t.skjs,a.title,b.create_by as stuNo,b.student_name as stuName,b.content,b.file_path,b.pic_path
|
||||
from zy_tlq a
|
||||
inner join zy_tlq_content b on a.id = b.main_id
|
||||
LEFT JOIN (
|
||||
SELECT DISTINCT
|
||||
kcbh,kcmc,kkdw,kcxz,szkc,xqxn, rwbh, skdd, xkrs, jgh,concat(WEEK,REPLACE ( hh, '、', '' )) AS sksj,skjs
|
||||
FROM
|
||||
kc_kechengbiao
|
||||
${ew.customSqlSegment}
|
||||
) t on t.jgh = a.create_by and t.rwbh = a.rwbh and t.xqxn = a.xqxn
|
||||
<where>
|
||||
<if test="zyTlqSys.stuNo!=null and zyTlqSys.stuNo != ''">
|
||||
and b.create_by like concat('%',#{zyTlqSys.stuNo},'%')
|
||||
</if>
|
||||
<if test="zyTlqSys.stuName!=null and zyTlqSys.stuName != ''">
|
||||
and b.student_name like concat('%',#{zyTlqSys.stuName},'%')
|
||||
</if>
|
||||
<if test="zyTlqSys.title!=null and zyTlqSys.title != ''">
|
||||
and a.title like concat('%',#{zyTlqSys.title},'%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,7 +1,11 @@
|
|||
package org.jeecg.modules.kc.zyTlq.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.zyTlq.entity.ZyTlq;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.kc.zyTlq.entity.ZyTlqSys;
|
||||
|
||||
/**
|
||||
* @Description: 讨论区
|
||||
|
@ -11,4 +15,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
*/
|
||||
public interface IZyTlqService extends IService<ZyTlq> {
|
||||
|
||||
IPage<ZyTlqSys> sysList(Page<ZyTlqSys> page, QueryWrapper<ZyTlqSys> queryWrapper, ZyTlqSys zyTlqSys);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package org.jeecg.modules.kc.zyTlq.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.zyTlq.entity.ZyTlq;
|
||||
import org.jeecg.modules.kc.zyTlq.entity.ZyTlqSys;
|
||||
import org.jeecg.modules.kc.zyTlq.mapper.ZyTlqMapper;
|
||||
import org.jeecg.modules.kc.zyTlq.service.IZyTlqService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -16,4 +20,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
@Service
|
||||
public class ZyTlqServiceImpl extends ServiceImpl<ZyTlqMapper, ZyTlq> implements IZyTlqService {
|
||||
|
||||
@Override
|
||||
public IPage<ZyTlqSys> sysList(Page<ZyTlqSys> page, QueryWrapper<ZyTlqSys> queryWrapper, ZyTlqSys zyTlqSys) {
|
||||
return baseMapper.sysList(page, queryWrapper, zyTlqSys);
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
10
pom.xml
10
pom.xml
|
@ -158,7 +158,17 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.abel533</groupId>
|
||||
<artifactId>ECharts</artifactId>
|
||||
<version>3.0.0.6</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jfree</groupId>
|
||||
<artifactId>jfreechart</artifactId>
|
||||
<version>1.5.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
|
|
Loading…
Reference in New Issue