修改bug

This commit is contained in:
yangjun 2024-07-06 15:29:47 +08:00
parent 16e8785b43
commit 1895c8ba3a
20 changed files with 138 additions and 58 deletions

View File

@ -90,9 +90,9 @@ public class KcDetectionMainController extends JeecgController<KcDetectionMain,
queryWrapper.eq("ketangbiao_info -> '$.hh'", kcDetectionMain.getSearchHh());
}
if(StringUtils.isNotBlank(kcDetectionMain.getSearchHh())){
queryWrapper.eq("ketangbiao_info -> '$.hh'", kcDetectionMain.getSearchHh());
}
// if(StringUtils.isNotBlank(kcDetectionMain.getSearchHh())){
// queryWrapper.eq("ketangbiao_info -> '$.hh'", kcDetectionMain.getSearchHh());
// }
if(StringUtils.isNotBlank(kcDetectionMain.getSkjs())){
queryWrapper.like("ketangbiao_info -> '$.skjs'", kcDetectionMain.getSkjs());

View File

@ -271,12 +271,13 @@ public class KcKechengbiaoController extends JeecgController<KcKechengbiao, IKcK
zyDbtx.setCreateBy(sysUser.getUsername());
List<ZyDbtx> dbtxList = zyDbtxService.getDbtxList(zyDbtx);
for(KcKechengbiao par:pageList.getRecords()){
int i = 0;
for(ZyDbtx txPar : dbtxList){
if(StringUtils.equals(par.getRwbh(),txPar.getRwbh())){
par.setDbtxType(txPar.getType());
break;
i++;
}
}
par.setDbtxType(i+"");
}
}

View File

@ -142,6 +142,8 @@
SELECT
kcbh,
kcmc,
xf,
jkzc,
kkdw,
kcxz,
szkc,
@ -157,6 +159,8 @@
SELECT DISTINCT
kcbh,
kcmc,
xf,
jkzc,
kkdw,
kcxz,
szkc,

View File

@ -71,4 +71,7 @@ public class WjxDjxxTmxx implements Serializable {
@TableField(exist = false)
private List<WjxWjxxTmxx> wjxWjxxTmxxList;
@TableField(exist = false)
private String tktda;
}

View File

@ -16,7 +16,9 @@ import org.jeecg.modules.kc.wjxDjxx.service.IWjxDjxxService;
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
import org.jeecg.modules.kc.wjxWjxx.mapper.WjxWjxxMapper;
import org.jeecg.modules.kc.wjxWjxx.utils.WjxUtil;
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmlb;
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx;
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;
@ -42,6 +44,8 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
@Autowired
private WjxWjxxTmxxMapper wjxWjxxTmxxMapper;
@Autowired
private WjxWjxxTmlbMapper wjxWjxxTmlbMapper;
@Autowired
private WjxWjxxMapper wjxWjxxMapper;
@Autowired
@ -229,10 +233,11 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
String content = "";
if(StringUtils.equals("6",wjxWjxx.getAtype())){
type = "6";
content = "您有一条新的测验待查阅";
content = "["+wjxWjxx.getTitle()+"]"+user.getRealname()+"提交了一篇测验待查阅";
}else{
type = "7";
content = "您有一条新的问卷待查阅";
content = "["+wjxWjxx.getTitle()+"]"+user.getRealname()+"提交了一篇问卷待查阅";
}
//作业代办提醒
ZyDbtx zyDbtx = new ZyDbtx();
@ -242,7 +247,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
zyDbtx.setRwbh(wjxWjxx.getRwbh());
zyDbtx.setContent(content);
zyDbtx.setFlag("0");
zyDbtx.setFbr(user.getUsername());
zyDbtx.setFbr(wjxWjxx.getCreateBy());
zyDbtxService.save(zyDbtx);
@ -357,6 +362,9 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
for(WjxDjxxTmxx wjxDjxxTmxx:list){
List<WjxWjxxTmxx> list2= wjxWjxxTmxxMapper.selectByMainId(wjxDjxxTmxx.getId());
wjxDjxxTmxx.setWjxWjxxTmxxList(list2);
//获取填空题答案
WjxWjxxTmlb tmlb = wjxWjxxTmlbMapper.selectById(wjxDjxxTmxx.getId());
wjxDjxxTmxx.setTktda(tmlb.getWjAnswer());
}
djxx.setWjxDjxxTmxxList(list);

View File

@ -8,6 +8,7 @@ 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.DateUtils;
import org.jeecg.common.util.text.StringUtils;
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxx;
import org.jeecg.modules.kc.wjxDjxx.entity.WjxDjxxTmxx;
@ -15,6 +16,7 @@ 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;
import org.jeecg.modules.kc.wjxWjxx.utils.WjxConfig;
import org.jeecg.modules.kc.wjxWjxx.utils.WjxUtil;
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmlb;
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx;
@ -43,6 +45,9 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
@Autowired
private WjxUtil wjxUtil;
@Autowired
private WjxConfig wjxConfig;
@Override
public Page<WjxWjxx> findPage(WjxWjxx wjxWjxx, Page<WjxWjxx> page){
List<WjxWjxx> list = baseMapper.findPage(page,wjxWjxx);
@ -232,6 +237,7 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<>();
wjxWjxxTmlbQueryWrapper.eq("main_id", id);
wjxWjxxTmlbQueryWrapper.orderByAsc("wj_index");
List<WjxWjxxTmlb> wjxWjxxTmlbList =wjxWjxxTmlbMapper.selectList(wjxWjxxTmlbQueryWrapper);
List<Map<String,Object>> questionsList = new ArrayList<>();
@ -277,6 +283,7 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
Map<String,Object> map = new HashMap<>();
//-----------题目必穿参数-------------
map.put("creater","jwctest");
map.put("atype",wjxWjxx.getAtype());
map.put("title",wjxWjxx.getTitle());
map.put("desc",wjxWjxx.getContent());
@ -316,38 +323,39 @@ public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> impl
String vid = wjxWjxx.getVid();
Map<String,Object> map = new HashMap<>();
map.put("vid",Integer.valueOf(vid));
map.put("suffix",2);
// map.put("suffix",2);
//调用接口,提交
String result = wjxUtil.openapi(map,"1001004");
JSONObject jsonResult = JSONObject.parseObject(result);
System.out.println("1----------->"+jsonResult.toString());
if(StringUtils.equals("true",jsonResult.getString("result"))){
for(int i=0;i<10;i++){
try {
Thread.sleep(1000L);
}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);
String result2 = wjxUtil.openapi(map2,"1001004");
System.out.println("result2----------->"+result2);
JSONObject jsonResult2 = JSONObject.parseObject(result2);
String result3 = jsonResult2.getString("data");
System.out.println("result3----------->"+result3);
JSONObject jsonResult3 = JSONObject.parseObject(result3);
System.out.println("jsonResult3----------->"+jsonResult3);
if(StringUtils.isNotEmpty(jsonResult3.getString("download_url"))){
jsonResult = jsonResult2;
break;
}
}
}
// if(StringUtils.equals("true",jsonResult.getString("result"))){
// JSONObject data = jsonResult.getJSONObject("data");
// String taskid = data.getString("taskid");
// for(int i=0;i<10;i++){
// try {
// System.out.println("datatime--------->"+ DateUtils.formatDate(new Date(),"yyyy-MM-dd HH:mm:ss"));
// Thread.sleep(2000L);
// }catch (Exception e){
// e.printStackTrace();
// }
// Map<String,Object> map2 = new HashMap<>();
// map2.put("vid",Integer.valueOf(vid));
//// map2.put("suffix",2);
// map2.put("taskid",taskid);
// String result2 = wjxUtil.openapi(map2,"1001004");
// System.out.println("result2----------->"+result2);
// JSONObject jsonResult2 = JSONObject.parseObject(result2);
// String result3 = jsonResult2.getString("data");
// System.out.println("result3----------->"+result3);
// JSONObject jsonResult3 = JSONObject.parseObject(result3);
// System.out.println("jsonResult3----------->"+jsonResult3);
// if(StringUtils.isNotEmpty(jsonResult3.getString("download_url"))){
// jsonResult = jsonResult2;
// break;
// }
// }
//
// }
return jsonResult;
}

View File

@ -38,7 +38,7 @@ public class WjxUtil {
}
// System.out.println("sign: "+sign);
data.put("sign",sign);
// System.out.println("map:"+data.toString());
System.out.println("wjx_data--->:"+data.toString());
String url = "https://www.wjx.cn/openapi/default.aspx";
try {
JSONObject json = new JSONObject(data);

View File

@ -98,6 +98,7 @@ public class WjxWjxxTmlb implements Serializable {
private java.lang.String wjLeixing;//问卷类型0作业1问卷
private java.lang.String wjSfqh;//是否切换 0系统 1自定义
@TableField(exist = false)
private String itemSelected;

View File

@ -12,5 +12,5 @@
SELECT *
FROM wjx_wjxx_tmxx
WHERE
main_id = #{mainId} </select>
main_id = #{mainId} order by wj_index asc </select>
</mapper>

View File

@ -101,6 +101,7 @@ public class WjxWjxxTmlbServiceImpl extends ServiceImpl<WjxWjxxTmlbMapper, WjxWj
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<WjxWjxxTmlb>();
wjxWjxxTmlbQueryWrapper.eq("main_id",id);
wjxWjxxTmlbQueryWrapper.orderByAsc("wj_index");
List<WjxWjxxTmlb> list = wjxWjxxTmlbMapper.selectList(wjxWjxxTmlbQueryWrapper);
for(WjxWjxxTmlb WjxWjxxTmlb:list){
List<WjxWjxxTmxx> list2= wjxWjxxTmxxMapper.selectByMainId(WjxWjxxTmlb.getId());

View File

@ -90,6 +90,7 @@ public class WjxWjxxTmlbPage {
private String itemSelected;
private java.lang.String wjSfqh;//是否切换 0系统 1自定义
private java.lang.String wjSytype;//私有类型0私有1共有
private java.lang.String wjLeixing;//问卷类型6作业1问卷

View File

@ -101,7 +101,7 @@ public class ZyCjwtController extends JeecgController<ZyCjwt, IZyCjwtService> {
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ZyCjwt zyCjwt) {
zyCjwtService.updateById(zyCjwt);
return Result.OK("编辑成功!");
return Result.OK("操作成功!");
}
/**

View File

@ -66,6 +66,9 @@ public class ZyCjwt implements Serializable {
@Excel(name = "答案", width = 15)
@ApiModelProperty(value = "答案")
private java.lang.String answer;
/**答案*/
@ApiModelProperty(value = "是否发布")
private java.lang.String sffb;
@TableField(exist = false)

View File

@ -372,4 +372,14 @@ public class ZyInfoController extends JeecgController<ZyInfo, IZyInfoService> {
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
return mv;
}
@ApiOperation(value="作业发布-通过id查询", notes="作业发布-通过id查询")
@GetMapping(value = "/queryZyinfoByStuId")
public Result<ZyInfo> queryZyinfoByStuId(@RequestParam(name="id",required=true) String id) {
ZyInfoStudent zyInfoStudent = zyInfoStudentService.getById(id);
ZyInfo zyInfo = zyInfoService.getById(zyInfoStudent.getMainId());
return Result.OK(zyInfo);
}
}

View File

@ -64,15 +64,15 @@ public class ZyInfo implements Serializable {
@ApiModelProperty(value = "描述")
private java.lang.String content;
/**开始时间*/
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Excel(name = "开始时间", width = 15, format = "yyyy-MM-dd HH:mm")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
@ApiModelProperty(value = "开始时间")
private java.util.Date startTime;
/**结束时间*/
@Excel(name = "结束时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Excel(name = "结束时间", width = 15, format = "yyyy-MM-dd HH:mm")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
@ApiModelProperty(value = "结束时间")
private java.util.Date endTime;
/**状态*/
@ -120,6 +120,8 @@ public class ZyInfo implements Serializable {
@Excel(name = "校内通过率", width = 15)
@ApiModelProperty(value = "校内通过率")
private java.lang.Double xntgl;
//作业分值
private String score;
private java.lang.String rwbh;
private java.lang.String filePath;
@ -135,8 +137,6 @@ public class ZyInfo implements Serializable {
@TableField(exist = false)
private String stuPdfPath;
@TableField(exist = false)
private String score;
@TableField(exist = false)
private String wtjnum;
@TableField(exist = false)
private String ytjnum;

View File

@ -381,10 +381,10 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
zyDbtx.setType("5");//0发布作业 1评分 2测验 3问卷 4讨论 5学生提交作业 6学生提交测验 7学生提交问卷
zyDbtx.setMainId(zyInfo.getId());
zyDbtx.setRwbh(zyInfo.getRwbh());
zyDbtx.setContent("您有一条新的作业待审批!");
zyDbtx.setFlag("0");
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
zyDbtx.setFbr(user.getUsername());
zyDbtx.setContent("["+zyInfo.getTitle()+"]"+user.getRealname()+"提交了一篇作业需要您进行审批!");
zyDbtx.setFlag("0");
zyDbtx.setFbr(zyInfo.getCreateBy());
zyDbtxService.save(zyDbtx);

View File

@ -50,7 +50,7 @@ public class ZyInfoStudent implements Serializable {
@Excel(name = "学生学号", width = 15)
@ApiModelProperty(value = "createBy")
private java.lang.String createBy;
@Excel(name = "提交时间", width = 15,format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "createTime")
@ -58,7 +58,7 @@ public class ZyInfoStudent implements Serializable {
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@Excel(name = "发布时间", width = 15)
@Excel(name = "提交时间", width = 15)
private java.util.Date publishTime;
@Excel(name = "评分", width = 15)

View File

@ -136,10 +136,10 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
zyInfoStudent.setCateid("DBSDQXZYBDK001");
zyInfoStudent.setCatename("东北师大全校作业比对库");
xnccSave(zyInfoStudent,"1",response);//提交比对
}else{
zyInfoStudent.setCateid("DBSDQXZYBDK001");
zyInfoStudent.setCatename("东北师大全校作业比对库");
xnccSave(zyInfoStudent,"0",response);//不提交比对
// }else{
// zyInfoStudent.setCateid("DBSDQXZYBDK001");
// zyInfoStudent.setCatename("东北师大全校作业比对库");
// xnccSave(zyInfoStudent,"0",response);//不提交比对
}
return true;
}
@ -186,6 +186,10 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
// String fileName = uploadpath+"/"+ zyInfoStudent.getFilePath();
// String fileName = getFileName(zyInfoStudent.getFilePath(),response);
String fileName = downloadpath+"/"+ zyInfoStudent.getFilePath();
if(CommonConstant.UPLOAD_TYPE_LOCAL.equals(uploadType)) {
fileName = uploadpath+"/"+ zyInfoStudent.getFilePath();
System.out.println("1111111111111111----------->");
}
Map<String, String> textMap = new HashMap<String, String>();
//可以设置多个input的namevalue
String sign = getSign();
@ -263,6 +267,10 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
// String fileName = uploadpath+"/"+ zyInfoStudent.getFilePath();
// String fileName = getFileName(zyInfoStudent.getFilePath(),response);
String fileName = downloadpath+"/"+ zyInfoStudent.getFilePath();
if(CommonConstant.UPLOAD_TYPE_LOCAL.equals(uploadType)) {
fileName = uploadpath+"/"+ zyInfoStudent.getFilePath();
System.out.println("1111111111111111----------->");
}
Map<String, String> textMap = new HashMap<String, String>();
String titlePar =fileName.substring(fileName.lastIndexOf("/")+1,fileName.length());
String title = titlePar.split("_")[0];
@ -317,6 +325,9 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
// String filePath = zyInfoStudent.getFilePath();
// String fileName = getFileName(filePath,response);
String fileName = downloadpath+"/"+ zyInfoStudent.getFilePath();
if(CommonConstant.UPLOAD_TYPE_LOCAL.equals(uploadType)) {
fileName = uploadpath+"/"+ zyInfoStudent.getFilePath();
}
Map<String, String> textMap = new HashMap<String, String>();
String titlePar =fileName.substring(fileName.lastIndexOf("/")+1,fileName.length());
String title = titlePar.split("_")[0];
@ -395,7 +406,11 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String url = "https://vims.fanyu.com/toole/jianceorgan/papersubmit.aspx";
//文件路径文件存在不存在的话需要先下载下来
String fileName = downloadpath+"/"+ zyInfoStudent.getFilePath();
String fileName = downloadpath+"/"+ zyInfoStudent.getFilePath();
if(CommonConstant.UPLOAD_TYPE_LOCAL.equals(uploadType)) {
fileName = uploadpath+"/"+ zyInfoStudent.getFilePath();
System.out.println("1111111111111111----------->");
}
// String fileName = getFileName(zyInfoStudent.getFilePath(),response);
Map<String, String> textMap = new HashMap<String, String>();
//可以设置多个input的namevalue
@ -465,7 +480,7 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
private String getFileName(String imgPath, HttpServletResponse response){
String fileName = "";
if(CommonConstant.UPLOAD_TYPE_LOCAL.equals(uploadType)) {
fileName = uploadpath+"/"+ imgPath;
fileName = imgPath;
System.out.println("1111111111111111----------->");
}else if(CommonConstant.UPLOAD_TYPE_SFTP.equals(uploadType)){
System.out.println("22222222222222----------->");

View File

@ -677,4 +677,27 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
}
@AutoLog(value = "删除教学大纲及日历附件")
@ApiOperation(value="删除教学大纲及日历附件", notes="删除教学大纲及日历附件")
@PostMapping(value = "/deleteJxdgJxrl")
public Result<ZyJxdg> deleteJxdgJxrl(@RequestBody ZyJxdg zyJxdg) {
String id = zyJxdg.getId();
String type = zyJxdg.getType();
UpdateWrapper<ZyJxdg> update = new UpdateWrapper<ZyJxdg>();
if(StringUtils.equals("1",type)){
update.set("file_path",null);
update.set("pdf_path",null);
update.eq("id",id);
service.update(update);
}else if(StringUtils.equals("2",type)){
update.set("jxrl_file_path",null);
update.set("jxrl_pdf_path",null);
update.eq("id",id);
service.update(update);
}
return Result.OK("删除成功!");
}
}

View File

@ -89,4 +89,6 @@ public class ZyJxdg implements Serializable {
private String teano;
@TableField(exist = false)
private String ywId;
@TableField(exist = false)
private String type;
}