添加上传考核材料功能
This commit is contained in:
parent
b5dbc4307a
commit
3eea37dbb7
|
@ -77,16 +77,16 @@
|
|||
SELECT tk.userid, tk.username, tksf1, tkyq, sjtksl, mltksl, tkdw
|
||||
FROM ( SELECT tk.userid, tk.username, count( tk.id ) sjtksl,
|
||||
count( CASE WHEN kt.kkdw = '马列教研室' THEN 1 END ) mltksl,
|
||||
cu.dwmc AS tkdw , kt.skrq,kt.kcxz
|
||||
FROM kc_tingke tk, kc_ketangbiao kt, kc_export_config_tpkwcqkjzglx cu
|
||||
WHERE tk.kechengbiaoid = kt.id AND tk.userid = cu.gh AND tk.tingketime > 1
|
||||
college AS tkdw , kt.skrq,kt.kcxz
|
||||
FROM kc_tingke tk
|
||||
LEFT JOIN kc_ketangbiao kt on tk.kechengbiaoid = kt.id
|
||||
LEFT JOIN kc_casusers cu on tk.userid = cu.`user`
|
||||
WHERE tk.tingketime > 1
|
||||
<if test="startTime!=null and startTime!=''">
|
||||
AND kt.skrq >= #{startTime}
|
||||
and cu.update_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null and endTime!=''">
|
||||
AND kt.skrq <= #{endTime}
|
||||
AND cu.update_time <= CONCAT(#{endTime},' 23:59:59')
|
||||
</if>
|
||||
<if test="szdw!=null and szdw!=''">
|
||||
AND college = #{szdw}
|
||||
|
@ -103,7 +103,7 @@
|
|||
<if test="userid!=null and userid!=''">
|
||||
AND tk.userid =#{userid}
|
||||
</if>
|
||||
GROUP BY tk.userid, tk.username, cu.dwmc
|
||||
GROUP BY tk.userid, tk.username, college
|
||||
) tk LEFT JOIN (
|
||||
|
||||
select gh as usercode,xm as username,GROUP_CONCAT( b.item_text SEPARATOR ',' ) as tksf1 ,max(ytkcs-0) as tkyq from kc_export_config_tpkwcqkjzglx a
|
||||
|
@ -113,12 +113,6 @@
|
|||
<if test="tksf!=null and tksf!=''">
|
||||
and b.item_value = #{tksf}
|
||||
</if>
|
||||
<if test="startTime!=null and startTime!=''">
|
||||
and a.update_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null and endTime!=''">
|
||||
AND a.update_time <= CONCAT(#{endTime},' 23:59:59')
|
||||
</if>
|
||||
GROUP BY gh,xm
|
||||
) au ON tk.userid = au.usercode
|
||||
ORDER BY sjtksl DESC
|
||||
|
|
|
@ -7,6 +7,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
|||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
|
@ -82,6 +83,12 @@ public class WjxDjxx {
|
|||
|
||||
private String sfxysdpy;//是否需要手动批阅
|
||||
|
||||
@Dict(dicCode = "sfsckhcl")
|
||||
private String sfsckhcl;//是否上传考核材料(0否 1是)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
|
||||
private Date sfsckhclTime;//上传考核材料时间
|
||||
|
||||
@ApiModelProperty(value = "学期学年")
|
||||
@TableField(exist = false)
|
||||
private String xqxn;
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.jeecg.modules.kc.kcSysConfig.service.IKcSysConfigService;
|
|||
import org.jeecg.modules.kc.kcWechatSendLog.entity.KcWechatSendLog;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
|
||||
import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService;
|
||||
import org.jeecg.modules.kc.tksf.kctkcstj.entity.KcTkcstj;
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.KccyglSys;
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
||||
import org.jeecg.modules.kc.wjxWjxx.service.IWjxWjxxService;
|
||||
|
@ -37,6 +38,7 @@ import org.jeecg.modules.kc.wjxWjxxTmlb.vo.WjxWjxxTmlbPage;
|
|||
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.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;
|
||||
|
@ -712,4 +714,29 @@ public class WjxWjxxController extends JeecgController<WjxWjxx, IWjxWjxxService>
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/khclList")
|
||||
public Result<IPage<WjxWjxx>> khclList(WjxWjxx wjxWjxx,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
QueryWrapper<WjxWjxx> queryWrapper = QueryGenerator.initQueryWrapper(wjxWjxx, req.getParameterMap());
|
||||
Page<WjxWjxx> page = new Page<WjxWjxx>(pageNo, pageSize);
|
||||
IPage<WjxWjxx> pageList = wjxWjxxService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(value = "/uploadSckhcl")
|
||||
public Result<String> uploadSckhcl(@RequestBody WjxWjxx wjxWjxx) {
|
||||
try {
|
||||
System.out.println("ids:"+wjxWjxx.getId());
|
||||
wjxWjxxService.batchZyinfoKhcl(wjxWjxx.getId());
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return Result.OK("考核材料上传成功!");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -110,6 +110,13 @@ public class WjxWjxx implements Serializable {
|
|||
private String score;//占比
|
||||
private String kcnr;//占比
|
||||
|
||||
@Dict(dicCode = "sfsckhcl")
|
||||
private String sfsckhcl;//是否上传考核材料(0否 1是)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
|
||||
private Date sfsckhclTime;//上传考核材料时间
|
||||
|
||||
|
||||
@ApiModelProperty(value = "答卷状态标识")
|
||||
@TableField(exist = false)
|
||||
private String flag;// -1 未答卷 0已答卷 1已答卷查询
|
||||
|
|
|
@ -40,4 +40,6 @@ public interface IWjxWjxxService extends IService<WjxWjxx> {
|
|||
void updateCeyanStatus();
|
||||
|
||||
Page<WjxWjxx> listOther(WjxWjxx wjxWjxx, Page<Object> objectPage);
|
||||
|
||||
void batchZyinfoKhcl(String id);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import com.xkcoding.http.HttpUtil;
|
|||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.common.util.SFTPUtil;
|
||||
import org.jeecg.common.util.text.StringUtils;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbbks;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbbksService;
|
||||
|
@ -32,6 +33,10 @@ import org.jeecg.modules.kc.wjxWjxxTmlb.mapper.WjxWjxxTmlbMapper;
|
|||
import org.jeecg.modules.kc.wjxWjxxTmlb.mapper.WjxWjxxTmxxMapper;
|
||||
import org.jeecg.modules.kc.zyDbtx.entity.ZyDbtx;
|
||||
import org.jeecg.modules.kc.zyDbtx.service.IZyDbtxService;
|
||||
import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
|
||||
import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl;
|
||||
import org.jeecg.modules.kc.zyInfoScjl.service.IZyInfoScjlService;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -71,6 +76,9 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
|||
|
||||
@Autowired
|
||||
private IKcKechengbiaoService kcKechengbiaoService;
|
||||
@Autowired
|
||||
private IZyInfoScjlService zyInfoScjlService;
|
||||
|
||||
@Override
|
||||
public Page<WjxWjxx> findPage(WjxWjxx wjxWjxx, Page<WjxWjxx> page){
|
||||
List<WjxWjxx> list = baseMapper.findPage(page,wjxWjxx);
|
||||
|
@ -520,6 +528,58 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
|
|||
return baseMapper.listOther(wjxWjxx,objectPage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchZyinfoKhcl(String ids) {
|
||||
try {
|
||||
String idsList[] = ids.split(",");
|
||||
if(idsList.length>0){
|
||||
for(String zyId:idsList){
|
||||
WjxWjxx wjxWjxx = baseMapper.selectById(zyId);
|
||||
|
||||
|
||||
QueryWrapper<KcKechengbiao> kcKechengbiaoQueryWrapper = new QueryWrapper<>();
|
||||
kcKechengbiaoQueryWrapper.eq("rwbh",wjxWjxx.getRwbh());
|
||||
kcKechengbiaoQueryWrapper.eq("jgh",wjxWjxx.getCreateBy());
|
||||
kcKechengbiaoQueryWrapper.eq("xqxn",wjxWjxx.getXqxn());
|
||||
kcKechengbiaoQueryWrapper.last("limit 1");
|
||||
KcKechengbiao kcKechengbiao = kcKechengbiaoService.getOne(kcKechengbiaoQueryWrapper);
|
||||
|
||||
QueryWrapper<WjxDjxx> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("vid",wjxWjxx.getVid());
|
||||
queryWrapper.eq("sfsckhcl","0");
|
||||
List<WjxDjxx> list = wjxDjxxMapper.selectList(queryWrapper);
|
||||
for(WjxDjxx wjxDjxx:list){
|
||||
wjxDjxx.setSfsckhcl("1");
|
||||
wjxDjxx.setSfsckhclTime(new Date());
|
||||
wjxDjxxMapper.updateById(wjxDjxx);
|
||||
|
||||
ZyInfoScjl zyInfoScjl = new ZyInfoScjl();
|
||||
zyInfoScjl.setZyId(wjxDjxx.getId());
|
||||
zyInfoScjl.setZyName(wjxDjxx.getTitle());
|
||||
zyInfoScjl.setZyLeixing(wjxDjxx.getAtype());
|
||||
zyInfoScjl.setJgh(wjxWjxx.getCreateBy());
|
||||
zyInfoScjl.setSkjs(kcKechengbiao.getSkjs());
|
||||
zyInfoScjl.setSkdd(kcKechengbiao.getSkdd());
|
||||
zyInfoScjl.setKkdw(kcKechengbiao.getKkdw());
|
||||
zyInfoScjl.setKkdwid(kcKechengbiao.getKkdwid());
|
||||
zyInfoScjl.setKcxz(kcKechengbiao.getKcxz());
|
||||
zyInfoScjl.setXnxq(wjxWjxx.getXqxn());
|
||||
zyInfoScjl.setStudentNo(wjxDjxx.getCreateBy());
|
||||
zyInfoScjl.setStudentName(wjxDjxx.getUserName());
|
||||
zyInfoScjlService.save(zyInfoScjl);
|
||||
}
|
||||
wjxWjxx.setSfsckhcl("1");
|
||||
wjxWjxx.setSfsckhclTime(new Date());
|
||||
baseMapper.updateById(wjxWjxx);
|
||||
|
||||
}
|
||||
}
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// appId
|
||||
private static final String appId = "wx031697a8ca09a5ce";//东师
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ import java.util.stream.Collectors;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbbks;
|
||||
|
@ -569,4 +570,19 @@ public class WjxWjxxTmlbController extends JeecgController<WjxWjxxTmlb, IWjxWjxx
|
|||
return Result.OK("文件导入失败!");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 移出题库
|
||||
* @param wjxWjxxTmlb
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/yctk")
|
||||
public Result<String> yctk(@RequestBody WjxWjxxTmlb wjxWjxxTmlb) {
|
||||
UpdateWrapper updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.set("sftjtk","0");
|
||||
updateWrapper.eq("wj_title",wjxWjxxTmlb.getWjTitle());
|
||||
updateWrapper.eq("create_by",wjxWjxxTmlb.getCreateBy());
|
||||
wjxWjxxTmlbService.update(updateWrapper);
|
||||
return Result.OK("移出成功!");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ public class ZyInfo implements Serializable {
|
|||
private java.lang.String hpsfwctwo;//第2次互评是否完成(1是 0否)
|
||||
private String sfcc;//是否查重(0不查重 1查重)
|
||||
|
||||
@Dict(dicCode = "yn")
|
||||
@Dict(dicCode = "sfsckhcl")
|
||||
private String sfsckhcl;//是否上传考核材料(0否 1是)
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
|
||||
|
|
Loading…
Reference in New Issue