修改学生提交功能
This commit is contained in:
parent
fed517eede
commit
783cf90c9a
|
@ -80,6 +80,10 @@
|
||||||
<artifactId>hutool-http</artifactId>
|
<artifactId>hutool-http</artifactId>
|
||||||
<version>${hutool.version}</version>
|
<version>${hutool.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-test</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
|
@ -484,44 +484,31 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
||||||
if(StringUtils.equals("pdf",nameLast)){
|
if(StringUtils.equals("pdf",nameLast)){
|
||||||
zyInfoStudent.setPdfPath(zyInfoStudent.getFilePath());
|
zyInfoStudent.setPdfPath(zyInfoStudent.getFilePath());
|
||||||
}else{
|
}else{
|
||||||
//目前作业都需要上传到文件服务器
|
if(StringUtils.equals("local",uploadType)){
|
||||||
|
Global global = SpringContextHolder.getBean(Global.class);
|
||||||
|
FileUtil.mkdir(global.getContractDickPath());
|
||||||
|
String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss");
|
||||||
|
String docPath = upLoadPath+ File.separator+ zyInfoStudent.getFilePath();
|
||||||
|
String namePath = dd + ".pdf";
|
||||||
|
String pdfPath = global.getContractDickPath() + namePath;
|
||||||
|
System.out.println("filPath:"+zyInfoStudent.getFilePath());
|
||||||
|
System.out.println("docPath:"+docPath);
|
||||||
|
System.out.println("pdfPath:"+pdfPath);
|
||||||
|
PDFUtil.office2PDF(docPath,pdfPath);
|
||||||
|
zyInfoStudent.setPdfPath("contract/"+namePath);
|
||||||
|
}else{
|
||||||
ZykInfo zykInfo = new ZykInfo();
|
ZykInfo zykInfo = new ZykInfo();
|
||||||
zykInfo.setBizId(zyInfoStudent.getId());
|
zykInfo.setBizId(zyInfoStudent.getId());
|
||||||
zykInfo.setBizTable("zy_jxdg");
|
zykInfo.setBizTable("zy_jxdg");
|
||||||
zykInfo.setWjlx(WjlxEnum.JXDG.getType());
|
zykInfo.setWjlx(WjlxEnum.JXDG.getType());
|
||||||
zykInfo.setRwbh(zyInfo.getRwbh());
|
zykInfo.setRwbh(zyInfo.getRwbh());
|
||||||
zykInfo.setFileName(zyInfoStudent.getFilePath());
|
zykInfo.setFileName(zyInfoStudent.getFilePath());
|
||||||
Map<String,String> map = zykService.saveToStufile(zykInfo);
|
Map<String,String> map = zykService.saveToZykJxdg(zykInfo);
|
||||||
String fileName = map.get("data");
|
String fileName = map.get("data");
|
||||||
String pdfName = map.get("pdfData");
|
String pdfName = map.get("pdfData");
|
||||||
zyInfoStudent.setFilePath(fileName);
|
zyInfoStudent.setFilePath(fileName);
|
||||||
zyInfoStudent.setPdfPath(pdfName);
|
zyInfoStudent.setPdfPath(pdfName);
|
||||||
|
}
|
||||||
// if(StringUtils.equals("local",uploadType)){
|
|
||||||
// Global global = SpringContextHolder.getBean(Global.class);
|
|
||||||
// FileUtil.mkdir(global.getContractDickPath());
|
|
||||||
// String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss");
|
|
||||||
// String docPath = upLoadPath+ File.separator+ zyInfoStudent.getFilePath();
|
|
||||||
// String namePath = dd + ".pdf";
|
|
||||||
// String pdfPath = global.getContractDickPath() + namePath;
|
|
||||||
// System.out.println("filPath:"+zyInfoStudent.getFilePath());
|
|
||||||
// System.out.println("docPath:"+docPath);
|
|
||||||
// System.out.println("pdfPath:"+pdfPath);
|
|
||||||
// PDFUtil.office2PDF(docPath,pdfPath);
|
|
||||||
// zyInfoStudent.setPdfPath("contract/"+namePath);
|
|
||||||
// }else{
|
|
||||||
// ZykInfo zykInfo = new ZykInfo();
|
|
||||||
// zykInfo.setBizId(zyInfoStudent.getId());
|
|
||||||
// zykInfo.setBizTable("zy_jxdg");
|
|
||||||
// zykInfo.setWjlx(WjlxEnum.JXDG.getType());
|
|
||||||
// zykInfo.setRwbh(zyInfo.getRwbh());
|
|
||||||
// zykInfo.setFileName(zyInfoStudent.getFilePath());
|
|
||||||
// Map<String,String> map = zykService.saveToZykJxdg(zykInfo);
|
|
||||||
// String fileName = map.get("data");
|
|
||||||
// String pdfName = map.get("pdfData");
|
|
||||||
// zyInfoStudent.setFilePath(fileName);
|
|
||||||
// zyInfoStudent.setPdfPath(pdfName);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
zyInfoStudent.setPublishTime(new Date());
|
zyInfoStudent.setPublishTime(new Date());
|
||||||
boolean bol = zyInfoStudentService.updateById(zyInfoStudent, response);
|
boolean bol = zyInfoStudentService.updateById(zyInfoStudent, response);
|
||||||
|
|
Loading…
Reference in New Issue