修改bug
This commit is contained in:
parent
e049a36116
commit
664767407f
|
@ -1,20 +1,16 @@
|
|||
package org.jeecg.modules.kc.detection.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
import com.sun.org.apache.xpath.internal.operations.Bool;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
|
|
@ -117,6 +117,14 @@ public class KcTeachingUnitContentThreeController extends JeecgController<KcTeac
|
|||
zykInfo.setFileName(kcTeachingUnitContentThree.getFilePath());
|
||||
Map<String,String> map = zykService.saveToZykJxdg(zykInfo);
|
||||
zykService.disConnect();
|
||||
}else{
|
||||
ZykInfo zykInfo = new ZykInfo();
|
||||
zykInfo.setBizId(kcTeachingUnitContentThree.getId());
|
||||
zykInfo.setBizTable("kc_teaching_unit_content_three");
|
||||
zykInfo.setWjlx(WjlxEnum.JXDY.getType());
|
||||
zykInfo.setRwbh(kcTeachingUnitContentThree.getRwbh());
|
||||
zykInfo.setFileName(kcTeachingUnitContentThree.getFilePath());
|
||||
zykService.saveLocal(zykInfo);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -126,6 +126,19 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
|||
|
||||
QueryWrapper<ZyInfoStudent> queryWrapper = QueryGenerator.initQueryWrapper("a",zyInfoStudent, req.getParameterMap());
|
||||
Page<ZyInfoStudent> page = new Page<ZyInfoStudent>(pageNo, pageSize);
|
||||
|
||||
if(StringUtils.isNotEmpty(zyInfoStudent.getQueryType())){
|
||||
if(StringUtils.equals("1",zyInfoStudent.getQueryType())){//未提交
|
||||
queryWrapper.isNull("a.file_path");
|
||||
}else if(StringUtils.equals("2",zyInfoStudent.getQueryType())){//已提交
|
||||
queryWrapper.isNotNull("a.file_path");
|
||||
}else if(StringUtils.equals("3",zyInfoStudent.getQueryType())){//未评阅
|
||||
queryWrapper.isNull("a.score");
|
||||
}else if(StringUtils.equals("4",zyInfoStudent.getQueryType())){//已评阅
|
||||
queryWrapper.isNotNull("a.score");
|
||||
}
|
||||
}
|
||||
|
||||
IPage<ZyInfoStudent> pageList = zyInfoStudentService.page(page, queryWrapper);
|
||||
for(ZyInfoStudent ZyInfoStudentPar:pageList.getRecords()){
|
||||
List<ZyInfoStudent> list = zyInfoStudentService.getCcjg(ZyInfoStudentPar);
|
||||
|
|
|
@ -171,4 +171,6 @@ public class ZyInfoStudent implements Serializable {
|
|||
private String xxfilestateid;//学校状态
|
||||
@TableField(exist = false)
|
||||
private String xxmessage;//学校说明
|
||||
@TableField(exist = false)
|
||||
private String queryType;//作业状态查询
|
||||
}
|
||||
|
|
|
@ -351,51 +351,45 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
|
|||
@ApiOperation(value="教学大纲-上传附件", notes="教学大纲-上传附件")
|
||||
@PostMapping(value = "/jxdgScfj")
|
||||
public Result<ZyJxdg> jxdgScfj(@RequestBody ZyJxdg zyJxdg) {
|
||||
System.out.println("------------教学大纲开始-----------------------");
|
||||
boolean isAdd = false;
|
||||
if(StringUtils.isEmpty(zyJxdg.getId())){
|
||||
isAdd = true;
|
||||
zyJxdg.setId((new DefaultIdentifierGenerator().nextId(new ZyJxdg())).toString());
|
||||
}
|
||||
System.out.println("------------11111111111----------------");
|
||||
if(StringUtils.isNotEmpty(zyJxdg.getFilePath())){
|
||||
System.out.println("------------22222222222222----------------");
|
||||
String nameLast = zyJxdg.getFilePath().substring(zyJxdg.getFilePath().lastIndexOf(".")+1);
|
||||
System.out.println("nameLast-----------》"+nameLast);
|
||||
if(StringUtils.equals("pdf",nameLast)){
|
||||
System.out.println("------------33333333333333333----------------");
|
||||
zyJxdg.setPdfPath(zyJxdg.getFilePath());
|
||||
}else{
|
||||
|
||||
System.out.println("uploadType-----------》"+global.uploadType);
|
||||
if(StringUtils.equals("local",global.uploadType)) {
|
||||
System.out.println("------------44444444444444444----------------");
|
||||
FileUtil.mkdir(global.getContractDickPath());
|
||||
String dd = DateUtils.formatDate(new Date(), "yyyyMMddHHmmss");
|
||||
// String docPath = zyJxdg.getFilePath();
|
||||
String docPath = upLoadPath + File.separator + zyJxdg.getFilePath();
|
||||
System.out.println("docPath-----------》"+docPath);
|
||||
String namePath = dd + ".pdf";
|
||||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
System.out.println("pdfPath-----------》"+pdfPath);
|
||||
// Map<String, String> map = zykService.downloadRemoteFile(docPath);
|
||||
PDFUtil.office2PDF(docPath, pdfPath);
|
||||
System.out.println("------------5555555555----------------");
|
||||
zyJxdg.setPdfPath("contract/" + namePath);
|
||||
System.out.println("------------666666666----------------"+zyJxdg.getPdfPath());
|
||||
}else if(StringUtils.equals("sftp",global.uploadType)){
|
||||
System.out.println("------------7777777777777----------------");
|
||||
|
||||
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());
|
||||
zykInfo.setPdfName(zyJxdg.getPdfPath());
|
||||
zykService.saveLocal(zykInfo);
|
||||
|
||||
}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());
|
||||
System.out.println("zykInfo------------>"+zykInfo);
|
||||
Map<String,String> map = zykService.saveToZykJxdg(zykInfo);
|
||||
System.out.println("map------------>"+map);
|
||||
String fileName = map.get("data");
|
||||
System.out.println("fileName------------>"+fileName);
|
||||
String pdfName = map.get("pdfData");
|
||||
System.out.println("pdfName------------>"+pdfName);
|
||||
zyJxdg.setFilePath(fileName);
|
||||
|
@ -451,6 +445,18 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
|
|||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
PDFUtil.office2PDF(docPath, pdfPath);
|
||||
zyJxdg.setJxrlPdfPath("contract/" + namePath);
|
||||
|
||||
|
||||
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());
|
||||
zykInfo.setPdfName(zyJxdg.getJxrlPdfPath());
|
||||
zykService.saveLocal(zykInfo);
|
||||
|
||||
|
||||
}else if(StringUtils.equals("sftp",uploadType)){
|
||||
ZykInfo zykInfo = new ZykInfo();
|
||||
zykInfo.setBizId(zyJxdg.getId());
|
||||
|
|
|
@ -58,4 +58,5 @@ public interface IZykService extends IService<ZykInfo> {
|
|||
|
||||
void disConnect();
|
||||
|
||||
void saveLocal(ZykInfo zykInfo);
|
||||
}
|
||||
|
|
|
@ -337,4 +337,22 @@ public class ZykServiceImpl extends ServiceImpl<ZykMapper, ZykInfo> implements I
|
|||
public void disConnect(){
|
||||
fileHandleUtil.disConnect();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveLocal(ZykInfo zykInfo) {
|
||||
KcKechengbiao kcb = new KcKechengbiao();
|
||||
kcb.setRwbh(zykInfo.getRwbh());
|
||||
kcb = kcKechengbiaoService.getKcbhByRwbh(kcb);
|
||||
zykInfo.setXqxn(kcb.getXqxn());
|
||||
zykInfo.setKkdw(kcb.getKkdw());
|
||||
zykInfo.setKcmc(kcb.getKcmc());
|
||||
zykInfo.setSkjs(kcb.getSkjs());
|
||||
|
||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
zykInfo.setCreateBy(user.getUsername());
|
||||
zykInfo.setCreateTime(new Date());
|
||||
Long id = new DefaultIdentifierGenerator().nextId(new ZykInfo());
|
||||
zykInfo.setId(id.toString());
|
||||
zykMapper.addInfo(zykInfo);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue