修改bug

This commit is contained in:
yangjun 2024-11-22 19:38:27 +08:00
parent 7eadfc2b0e
commit 039eed185a
18 changed files with 274 additions and 6 deletions

View File

@ -1255,7 +1255,7 @@ select max(id) as id,gh,xqxn from KC_EXPORT_CONFIG_TPKWCQKJZGLX where xqxn = #{x
AND EVS.ANSID = ANS.ID
AND EV.evaluationver = '5'
AND EVS.EVALUATIONID = #{col00}
AND EVS.QUEID = '31') AS COL14,
AND EVS.QUEID = '75') AS COL14,
CASE EV.EVALUATIONVER
WHEN '2' THEN
'线上听课表'

View File

@ -54,6 +54,8 @@ public class WjxDjxxTmlbPage {
private Double wjScore;
private String sfxysdpy;
private String picPath;
private java.lang.Integer wjSubtype;
private String id;
}

View File

@ -79,4 +79,6 @@ public class WjxDjxxTmxx implements Serializable {
private String djid;
@TableField(exist = false)
private String djtmid;
@TableField(exist = false)
private String wjSubtype;
}

View File

@ -116,9 +116,9 @@
</select>
<select id="findDjtmxx" parameterType="String" resultType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx">
select x.id,x.wj_index,x.wj_type,x.wj_title,x.wj_score,y.item_selected,y.item_score,y.answer_text,y.pic_path
select x.id,x.wj_index,x.wj_type,x.wj_title,x.wj_score,y.item_selected,y.item_score,y.answer_text,y.pic_path,x.wj_subtype
from (
select c.id,c.wj_index,c.wj_type,c.wj_title,c.wj_score
select c.id,c.wj_index,c.wj_type,c.wj_title,c.wj_score,c.wj_subtype
from wjx_djxx a
inner join wjx_wjxx b on a.vid = b.vid
inner join wjx_wjxx_tmlb c on c.main_id = b.id
@ -137,9 +137,9 @@
</select>
<select id="findDjtmxx2" parameterType="String" resultType="org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx">
select x.id,x.wj_index,x.wj_type,x.wj_title,x.wj_score,y.item_selected,y.item_score,y.answer_text,y.pic_path,x.djid,y.djtmid
select x.id,x.wj_index,x.wj_type,x.wj_title,x.wj_score,y.item_selected,y.item_score,y.answer_text,y.pic_path,x.djid,y.djtmid,x.wj_subtype
from (
select c.id,c.wj_index,c.wj_type,c.wj_title,c.wj_score,a.id as djid
select c.id,c.wj_index,c.wj_type,c.wj_title,c.wj_score,a.id as djid,c.wj_subtype
from wjx_djxx a
inner join wjx_wjxx b on a.vid = b.vid
inner join wjx_wjxx_tmlb c on c.main_id = b.id

View File

@ -86,6 +86,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
for(WjxDjxxTmlbPage wjxDjxxTmlbPage:list){
Integer WjIndex = wjxDjxxTmlbPage.getWjIndex();
Integer wjType = wjxDjxxTmlbPage.getWjType();
Integer wjSubtype = wjxDjxxTmlbPage.getWjSubtype();
String itemSelected = "";
if(wjType == 3 || wjType == 4){
itemSelected = wjxDjxxTmlbPage.getItemSelected().replaceAll(",","|").trim();
@ -98,6 +99,11 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
if(itemSelected == null || itemSelected.equals("null") || itemSelected.equals("")){
itemSelected = "(跳过)";
}
if(wjSubtype!= null ){
if(wjSubtype==5){
itemSelected = "(跳过)";
}
}
}
if(wjType == 8){
itemSelected = "-3";
@ -281,6 +287,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
for(WjxDjxxTmlbPage wjxDjxxTmlbPage:list){
Integer WjIndex = wjxDjxxTmlbPage.getWjIndex();
Integer wjType = wjxDjxxTmlbPage.getWjType();
Integer wjSubtype = wjxDjxxTmlbPage.getWjSubtype();
if(wjType == 8){
sfxgdjscore = "1";
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
@ -294,6 +301,22 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
wjxDjxxTmxx.setWjTitle(wjxDjxxTmlbPage.getWjTitle());
wjxDjxxTmxx.setWjIndex(WjIndex);
wjxDjxxTmxx.setAnswerText(wjxDjxxTmlbPage.getWjAnswer());
// wjxDjxxTmxx.setItemScore(wjxDjxxTmlbPage.getWjScore());
wjxDjxxTmxx.setPicPath(wjxDjxxTmlbPage.getPicPath());
baseMapper.addDjTmxx(wjxDjxxTmxx);
}else if(wjType==5&&wjSubtype!=null && wjSubtype == 5){
sfxgdjscore = "1";
String id = new DefaultIdentifierGenerator().nextId(new WjxDjxxTmxx()).toString();
WjxDjxxTmxx wjxDjxxTmxx = new WjxDjxxTmxx();
wjxDjxxTmxx.setVid(vid);
wjxDjxxTmxx.setJid(jidRes);
wjxDjxxTmxx.setUserId(user.getUsername());
wjxDjxxTmxx.setCreateBy(user.getUsername());
wjxDjxxTmxx.setCreateTime(new Date());
wjxDjxxTmxx.setId(id);
wjxDjxxTmxx.setWjTitle(wjxDjxxTmlbPage.getWjTitle());
wjxDjxxTmxx.setWjIndex(WjIndex);
wjxDjxxTmxx.setAnswerText(wjxDjxxTmlbPage.getWjAnswer());
// wjxDjxxTmxx.setItemScore(wjxDjxxTmlbPage.getWjScore());
wjxDjxxTmxx.setPicPath(wjxDjxxTmlbPage.getPicPath());
baseMapper.addDjTmxx(wjxDjxxTmxx);

View File

@ -260,6 +260,9 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
map.put("q_index",wWjxWjxxTmlb.getWjIndex());
map.put("q_type",wWjxWjxxTmlb.getWjType());
map.put("q_title",wWjxWjxxTmlb.getWjTitle());
if(wWjxWjxxTmlb.getWjSubtype() != null){
map.put("q_subtype",wWjxWjxxTmlb.getWjSubtype());
}
if(wjlx.equals("6")){
if(wWjxWjxxTmlb.getWjType() != 8){
if(wWjxWjxxTmlb.getWjScore()!=null){
@ -291,6 +294,8 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
//填空
if(wWjxWjxxTmlb.getWjAnswer()!=null){
map.put("answer",wWjxWjxxTmlb.getWjAnswer());
}else{
map.put("answer","跳过");
}
}else if(wWjxWjxxTmlb.getWjType() == 6){
//多项填空,预留之后有需求再开发

View File

@ -470,7 +470,7 @@ public class WjxWjxxTmlbController extends JeecgController<WjxWjxxTmlb, IWjxWjxx
List<WjxWjxxImportPage> list = ExcelImportUtil.importExcel(file.getInputStream(), WjxWjxxImportPage.class, params);
int i=0;
for (WjxWjxxImportPage page : list) {
if(StringUtils.isNotBlank(page.getWjTitle())){
if(StringUtils.isNotBlank(page.getWjTitle()) && StringUtils.isNotBlank(page.getWjType()+"")){
i = i+1;
WjxWjxxTmlb po = new WjxWjxxTmlb();
po.setWjLeixing("6");
@ -481,6 +481,11 @@ public class WjxWjxxTmlbController extends JeecgController<WjxWjxxTmlb, IWjxWjxx
if(StringUtils.isNotBlank(mainId)){
po.setMainId(mainId);
}
//判断是否是简答题
if(StringUtils.equals(page.getWjType()+"","5") && StringUtils.isBlank(page.getWjAnswer())){
po.setWjSubtype(5);
}
List<WjxWjxxTmxx> wjxWjxxTmxxList = new ArrayList<>();
if(StringUtils.equals(page.getWjType()+"","5")){
String ansA = page.getWjAnswer();

View File

@ -26,4 +26,6 @@ public interface IZyCcjgService extends IService<ZyCcjg> {
List<ZyCcjg> ccjglist(QueryWrapper<ZyCcjg> queryWrapper);
void updateCcjg(String paperId);
void delByPaperId(String paperId);
}

View File

@ -166,6 +166,11 @@ public class ZyCcjgServiceImpl extends ServiceImpl<ZyCcjgMapper, ZyCcjg> impleme
}
}
@Override
public void delByPaperId(String paperId) {
}
public Map<String,String> aigcCxjcjg(ZyCcjg zyCcjg) {
String url = "https://vims.fanyu.com/tool/AIGCCheck/searchPaper";

View File

@ -1100,4 +1100,25 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
return mv;
}
@ApiOperation(value="作业发布-分页列表查询", notes="作业发布-分页列表查询")
@GetMapping(value = "/listKhcl")
public Result<IPage<ZyInfo>> listKhcl(ZyInfo zyInfo,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<ZyInfo> queryWrapper = QueryGenerator.initQueryWrapper(zyInfo, req.getParameterMap());
Page<ZyInfo> page = new Page<ZyInfo>(pageNo, pageSize);
queryWrapper.eq("create_by",sysUser.getUsername());
queryWrapper.orderByDesc("xnxq");
queryWrapper.orderByAsc("sort - 0");
IPage<ZyInfo> pageList = zyInfoService.listKhcl(page, queryWrapper);
return Result.OK(pageList);
}
}

View File

@ -146,6 +146,8 @@ public class ZyInfo implements Serializable {
private java.lang.String hpsfwcone;//第1次互评是否完成1是 0否
private java.lang.String hpsfwctwo;//第2次互评是否完成1是 0否
private String sfcc;//是否查重0不查重 1查重
@Dict(dicCode = "yn")
private String sfsckhcl;//是否上传考核材料0否 1是
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")

View File

@ -45,4 +45,6 @@ public interface ZyInfoMapper extends BaseMapper<ZyInfo> {
IPage<CyInfoSys> sysStaticCyList(Page<CyInfoSys> page, @Param("zyInfoSys") CyInfoSys cyInfoSys);
List<CyInfoSys> getStaticCyExportUrl( @Param("zyInfoSys") CyInfoSys cyInfoSys);
IPage<ZyInfo> listKhcl(Page<ZyInfo> page, @Param(Constants.WRAPPER) QueryWrapper<ZyInfo> queryWrapper);
}

View File

@ -255,4 +255,13 @@
and a.qpublish = #{zyInfoSys.sfwc}
</if>
</select>
<select id="listKhcl" resultType="org.jeecg.modules.kc.zyInfo.entity.ZyInfo">
SELECT
*
FROM
zy_info
${ew.customSqlSegment}
</select>
</mapper>

View File

@ -42,4 +42,6 @@ public interface IZyInfoService extends IService<ZyInfo> {
IPage<CyInfoSys> sysStaticCyList(Page<CyInfoSys> page, CyInfoSys cyInfoSys);
List<CyInfoSys> getStaticCyExportUrl(CyInfoSys cyInfoSys);
IPage<ZyInfo> listKhcl(Page<ZyInfo> page, QueryWrapper<ZyInfo> queryWrapper);
}

View File

@ -239,6 +239,11 @@ public class ZyInfoServiceImpl extends ServiceImpl<ZyInfoMapper, ZyInfo> impleme
return baseMapper.getStaticCyExportUrl(cyInfoSys);
}
@Override
public IPage<ZyInfo> listKhcl(Page<ZyInfo> page, QueryWrapper<ZyInfo> queryWrapper) {
return baseMapper.listKhcl(page,queryWrapper);
}
// appId
private static final String appId = "wx031697a8ca09a5ce";//东师

View File

@ -593,6 +593,42 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
}
/**
* 批量上传考核材料
* @param ids
*/
@AutoLog(value = "批量上传考核材料")
@ApiOperation(value="批量上传考核材料", notes="批量上传考核材料")
@PostMapping(value = "/batchZyinfoKhcl")
public void batchZyinfoKhcl(@RequestParam(name="ids",required=true) String ids) {
zyInfoStudentService.batchZyinfoKhcl(ids);
}
@PostMapping(value = "/uploadSckhcl")
public Result<String> uploadSckhcl(@RequestBody ZyInfoStudent zyInfoStudent) {
try {
System.out.println("ids:"+zyInfoStudent.getId());
zyInfoStudentService.batchZyinfoKhcl(zyInfoStudent.getId());
}catch (Exception e) {
e.printStackTrace();
}
return Result.OK("上传成功!");
}
@PostMapping(value = "/uploadSckhcl2")
public Result<String> uploadSckhcl2(@RequestParam(name="ids",required=true) String ids) {
try {
zyInfoStudentService.batchZyinfoKhcl(ids);
}catch (Exception e) {
e.printStackTrace();
}
return Result.OK("上传成功!");
}
@AutoLog(value = "学生提交作业-批量删除")
@ApiOperation(value="学生提交作业-批量删除", notes="学生提交作业-批量删除")
@RequiresPermissions("zyInfoStudent:zy_info_student:deleteBatch")
@ -1104,4 +1140,73 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
}
@ApiOperation(value="重新提交作业查重信息", notes="重新提交作业查重信息")
@GetMapping(value = "/Scccjg")
public Result<IPage<ZyInfoStudent>> Scccjg(ZyInfoStudent zyInfoStudent, HttpServletRequest req, HttpServletResponse response) {
ZyInfoStudent zyInfoStudent1 = zyInfoStudentService.scccjg(zyInfoStudent,req,response);
return null;
}
@AutoLog(value = "学生提交作业-批量发布考核材料")
@ApiOperation(value="学生提交作业-批量发布考核材料", notes="学生提交作业-批量发布考核材料")
@PostMapping(value = "/batchKhclZyid")
public Result<String> batchKhclZyid(@RequestParam(name="ids",required=true) String ids) {
try {
String idsList[] = ids.split(",");
if(idsList.length>0){
ZyInfoStudent zyInfoStudentPar = zyInfoStudentService.getById(idsList[0]);
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudentPar.getMainId());
QueryWrapper<KcKechengbiao> kcKechengbiaoQueryWrapper = new QueryWrapper<>();
kcKechengbiaoQueryWrapper.eq("rwbh",zyInfo.getRwbh());
kcKechengbiaoQueryWrapper.eq("jgh",zyInfo.getCreateBy());
kcKechengbiaoQueryWrapper.eq("xqxn",zyInfo.getXnxq());
kcKechengbiaoQueryWrapper.last("limit 1");
KcKechengbiao kcKechengbiao = kcKechengbiaoService.getOne(kcKechengbiaoQueryWrapper);
zyInfo.setSfsckhcl("1");
zyInfo.setSfsckhclTime(new Date());
zyInfoService.updateById(zyInfo);
for(int i=0;i< idsList.length;i++){
ZyInfoStudent zyInfoStudentPar2 = zyInfoStudentService.getById(idsList[i]);
if(StringUtils.isNotEmpty(zyInfoStudentPar2.getFilePath())){
//上传文件
Map<String,String> uploadMap = SFTPUtil.upload(sftpConfig,upLoadPath+"/"+zyInfoStudentPar2.getFilePath(),zyInfoStudentPar2.getFilePath());
zyInfoStudentPar2.setSfsckhcl("1");
zyInfoStudentPar2.setFwqPath(uploadMap.get("data"));
zyInfoStudentPar2.setKhclTime(new Date());
zyInfoStudentService.updateById(zyInfoStudentPar2);
ZyInfoScjl zyInfoScjl = new ZyInfoScjl();
zyInfoScjl.setZyId(zyInfo.getId());
zyInfoScjl.setZyName(zyInfo.getTitle());
zyInfoScjl.setZyLeixing(zyInfo.getZyLeixing());
zyInfoScjl.setZyZb(zyInfo.getScore());
zyInfoScjl.setJgh(kcKechengbiao.getJgh());
zyInfoScjl.setSkjs(kcKechengbiao.getSkjs());
zyInfoScjl.setSkdd(kcKechengbiao.getSkdd());
zyInfoScjl.setKkdw(kcKechengbiao.getKkdw());
zyInfoScjl.setKkdwid(kcKechengbiao.getKkdwid());
zyInfoScjl.setKcxz(kcKechengbiao.getKcxz());
zyInfoScjl.setXnxq(zyInfo.getXnxq());
zyInfoScjl.setFilePath(zyInfoStudentPar2.getFwqPath());
zyInfoScjl.setStudentNo(zyInfoStudentPar2.getCreateBy());
zyInfoScjl.setStudentName(zyInfoStudentPar2.getStudentName());
zyInfoScjlService.save(zyInfoScjl);
}
}
}
}catch (Exception e) {
e.printStackTrace();
}
return Result.OK("上传成功!");
}
}

View File

@ -50,4 +50,8 @@ public interface IZyInfoStudentService extends IService<ZyInfoStudent> {
List<ZyInfoStudent> xnccBatchWeipu(ZyInfoStudent zyInfoStudent, HttpServletResponse response);
List<ZyInfoStudent> cxccByZyId(ZyInfoStudent zyInfoStudent2);
ZyInfoStudent scccjg(ZyInfoStudent zyInfoStudent, HttpServletRequest req, HttpServletResponse response);
void batchZyinfoKhcl(String ids);
}

View File

@ -19,6 +19,8 @@ import org.jeecg.modules.kc.zyCcjg.entity.ZyCcjg;
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.zyInfoScjl.entity.ZyInfoScjl;
import org.jeecg.modules.kc.zyInfoScjl.service.IZyInfoScjlService;
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys;
import org.jeecg.modules.kc.zyInfoStudent.mapper.ZyInfoStudentMapper;
@ -28,10 +30,12 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.test.annotation.Rollback;
import javax.activation.MimetypesFileTypeMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
@ -88,6 +92,14 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
@Value(value = "${jeecg.path.webapp}")
private String downloadpath;
@Value("${jeecg.path.upload}")
private String upLoadPath;
@Autowired
private IZyInfoScjlService zyInfoScjlService;
@Override
public boolean save(ZyInfoStudent zyInfoStudent) {
baseMapper.insert(zyInfoStudent);
@ -258,6 +270,68 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
return baseMapper.cxccByZyId(zyInfoStudent2);
}
@Override
public ZyInfoStudent scccjg(ZyInfoStudent zyInfoStudent, HttpServletRequest req, HttpServletResponse response) {
ZyInfoStudent zyInfoStudent1 = baseMapper.selectById(zyInfoStudent.getId());
// delweipulunwen(zyInfoStudent1, response);
return null;
}
@Override
public void batchZyinfoKhcl(String ids) {
try {
String idsList[] = ids.split(",");
if(idsList.length>0){
for(String zyId:idsList){
ZyInfo zyInfo = zyInfoService.getById(zyId);
QueryWrapper<KcKechengbiao> kcKechengbiaoQueryWrapper = new QueryWrapper<>();
kcKechengbiaoQueryWrapper.eq("rwbh",zyInfo.getRwbh());
kcKechengbiaoQueryWrapper.eq("jgh",zyInfo.getCreateBy());
kcKechengbiaoQueryWrapper.eq("xqxn",zyInfo.getXnxq());
kcKechengbiaoQueryWrapper.last("limit 1");
KcKechengbiao kcKechengbiao = kcKechengbiaoService.getOne(kcKechengbiaoQueryWrapper);
zyInfo.setSfsckhcl("1");
zyInfo.setSfsckhclTime(new Date());
zyInfoService.updateById(zyInfo);
QueryWrapper<ZyInfoStudent> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("main_id",zyId);
queryWrapper.isNotNull("file_path");
List<ZyInfoStudent> list = baseMapper.selectList(queryWrapper);
for(ZyInfoStudent zyInfoStudentPar2:list){
if(StringUtils.isNotEmpty(zyInfoStudentPar2.getFilePath())){
//上传文件
Map<String,String> uploadMap = SFTPUtil.upload(sftpConfig,upLoadPath+"/"+zyInfoStudentPar2.getFilePath(),zyInfoStudentPar2.getFilePath());
zyInfoStudentPar2.setSfsckhcl("1");
zyInfoStudentPar2.setFwqPath(uploadMap.get("data"));
zyInfoStudentPar2.setKhclTime(new Date());
baseMapper.updateById(zyInfoStudentPar2);
ZyInfoScjl zyInfoScjl = new ZyInfoScjl();
zyInfoScjl.setZyId(zyInfo.getId());
zyInfoScjl.setZyName(zyInfo.getTitle());
zyInfoScjl.setZyLeixing(zyInfo.getZyLeixing());
zyInfoScjl.setZyZb(zyInfo.getScore());
zyInfoScjl.setJgh(kcKechengbiao.getJgh());
zyInfoScjl.setSkjs(kcKechengbiao.getSkjs());
zyInfoScjl.setSkdd(kcKechengbiao.getSkdd());
zyInfoScjl.setKkdw(kcKechengbiao.getKkdw());
zyInfoScjl.setKkdwid(kcKechengbiao.getKkdwid());
zyInfoScjl.setKcxz(kcKechengbiao.getKcxz());
zyInfoScjl.setXnxq(zyInfo.getXnxq());
zyInfoScjl.setFilePath(zyInfoStudentPar2.getFwqPath());
zyInfoScjl.setStudentNo(zyInfoStudentPar2.getCreateBy());
zyInfoScjl.setStudentName(zyInfoStudentPar2.getStudentName());
zyInfoScjlService.save(zyInfoScjl);
}
}
}
}
}catch (Exception e) {
e.printStackTrace();
}
}
private void delweipulunwen(ZyInfoStudent zyInfoStudent, HttpServletResponse response) {
zyInfoStudent.setQueryType("0");//外网查重数据
String paperids = baseMapper.getWpFile(zyInfoStudent);