添加新功能
This commit is contained in:
parent
390e10e3bc
commit
b03a545894
|
@ -11,7 +11,7 @@ import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl;
|
|||
import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent;
|
||||
import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService;
|
||||
import org.jeecg.modules.tools.Global;
|
||||
import org.jeecg.modules.tools.pdf.PDFUtil;
|
||||
import org.jeecg.modules.tools.office.pdf.PDFUtil;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
@ -58,7 +58,9 @@ public class SyncZyStudentPdf extends BaseSync {
|
|||
System.out.println("filPath:"+zyInfoStudent.getFilePath());
|
||||
System.out.println("docPath:"+docPath);
|
||||
System.out.println("pdfPath:"+pdfPath);
|
||||
PDFUtil.office2PDF(docPath,pdfPath);
|
||||
|
||||
PDFUtil pdfUtil = SpringContextHolder.getBean(PDFUtil.class);
|
||||
pdfUtil.office2PDF(docPath,pdfPath);
|
||||
zyInfoStudent.setPdfPath("contract/"+namePath);
|
||||
zyInfoStudent.setPublishTime(new Date());
|
||||
zyInfoStudentService.updateById(zyInfoStudent);
|
||||
|
|
|
@ -952,4 +952,32 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
|||
}
|
||||
|
||||
|
||||
@AutoLog(value = "教师批阅作业")
|
||||
@ApiOperation(value="教师批阅作业", notes="教师批阅作业")
|
||||
@RequestMapping(value = "/SyncZyStudentPdf", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<ZyInfoStudent> SyncZyStudentPdf() {
|
||||
List<ZyInfoStudent> ybtkblist = zyInfoStudentService.getDocNoPdfList();
|
||||
for(ZyInfoStudent zyInfoStudent:ybtkblist){
|
||||
try {
|
||||
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);
|
||||
zyInfoStudent.setPublishTime(new Date());
|
||||
zyInfoStudentService.updateById(zyInfoStudent);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
return Result.OK("批阅完成!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue