修改bug
This commit is contained in:
parent
f28653e020
commit
78e307e262
|
@ -3,7 +3,7 @@
|
|||
<mapper namespace="org.jeecg.modules.kc.wjxWjxxTmlb.mapper.WjxWjxxTmlbMapper">
|
||||
|
||||
<select id="distinctList" resultType="org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmlb">
|
||||
select distinct max(id) id,wj_title,wj_score,wj_sytype,wj_type from wjx_wjxx_tmlb
|
||||
select distinct max(id) id,wj_title,wj_score,wj_sytype,wj_type,wj_answer from wjx_wjxx_tmlb
|
||||
${ew.customSqlSegment}
|
||||
|
||||
</select>
|
||||
|
|
|
@ -84,6 +84,11 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
|||
|
||||
@Value("${jeecg.path.upload}")
|
||||
private String upLoadPath;
|
||||
|
||||
|
||||
@Value(value="${jeecg.uploadType}")
|
||||
private String uploadType;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
@ -262,37 +267,34 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
|
|||
if(StringUtils.equals("pdf",nameLast)){
|
||||
zyInfoStudent.setPdfPath(zyInfoStudent.getFilePath());
|
||||
}else{
|
||||
// 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);
|
||||
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
zyInfoStudentService.updateById(zyInfoStudent);
|
||||
|
||||
|
||||
|
||||
|
||||
//作业代办提醒
|
||||
ZyDbtx zyDbtx = new ZyDbtx();
|
||||
zyDbtx.setCreateBy(zyInfo.getCreateBy());
|
||||
|
|
|
@ -62,6 +62,10 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
|
|||
private String upLoadPath;
|
||||
@Autowired
|
||||
private IZykService zykService;
|
||||
|
||||
|
||||
@Value(value="${jeecg.uploadType}")
|
||||
private String uploadType;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
@ -107,17 +111,20 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
|
|||
if(StringUtils.equals("pdf",nameLast)){
|
||||
zyJxdg.setPdfPath(zyJxdg.getFilePath());
|
||||
}else{
|
||||
Global global = SpringContextHolder.getBean(Global.class);
|
||||
FileUtil.mkdir(global.getContractDickPath());
|
||||
String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss");
|
||||
String docPath = upLoadPath+ File.separator+ zyJxdg.getFilePath();
|
||||
String namePath = dd + ".pdf";
|
||||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
System.out.println("filPath:"+zyJxdg.getFilePath());
|
||||
System.out.println("docPath:"+docPath);
|
||||
System.out.println("pdfPath:"+pdfPath);
|
||||
PDFUtil.office2PDF(docPath,pdfPath);
|
||||
zyJxdg.setPdfPath("contract/"+namePath);
|
||||
|
||||
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+ zyJxdg.getFilePath();
|
||||
String namePath = dd + ".pdf";
|
||||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
PDFUtil.office2PDF(docPath,pdfPath);
|
||||
zyJxdg.setPdfPath("contract/"+namePath);
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}else if(StringUtils.isNotEmpty(zyJxdg.getJxrlFilePath())){
|
||||
|
@ -126,14 +133,20 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
|
|||
if(StringUtils.equals("pdf",nameLast)){
|
||||
zyJxdg.setJxrlPdfPath(zyJxdg.getJxrlFilePath());
|
||||
}else{
|
||||
Global global = SpringContextHolder.getBean(Global.class);
|
||||
FileUtil.mkdir(global.getContractDickPath());
|
||||
String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss");
|
||||
String docPath = upLoadPath+ File.separator+ zyJxdg.getJxrlFilePath();
|
||||
String namePath = dd + ".pdf";
|
||||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
PDFUtil.office2PDF(docPath,pdfPath);
|
||||
zyJxdg.setJxrlPdfPath("contract/"+namePath);
|
||||
|
||||
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+ zyJxdg.getJxrlFilePath();
|
||||
String namePath = dd + ".pdf";
|
||||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
PDFUtil.office2PDF(docPath,pdfPath);
|
||||
zyJxdg.setJxrlPdfPath("contract/"+namePath);
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -170,17 +183,22 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
|
|||
update.set("file_path",zyJxdg.getFilePath());
|
||||
update.set("pdf_path",zyJxdg.getFilePath());
|
||||
}else{
|
||||
Global global = SpringContextHolder.getBean(Global.class);
|
||||
FileUtil.mkdir(global.getContractDickPath());
|
||||
String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss");
|
||||
String docPath = upLoadPath+ File.separator+ zyJxdg.getFilePath();
|
||||
String namePath = dd + ".pdf";
|
||||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
System.out.println("filPath:"+zyJxdg.getFilePath());
|
||||
System.out.println("docPath:"+docPath);
|
||||
System.out.println("pdfPath:"+pdfPath);
|
||||
PDFUtil.office2PDF(docPath,pdfPath);
|
||||
zyJxdg.setPdfPath("contract/"+namePath);
|
||||
|
||||
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 + zyJxdg.getFilePath();
|
||||
String namePath = dd + ".pdf";
|
||||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
System.out.println("filPath:" + zyJxdg.getFilePath());
|
||||
System.out.println("docPath:" + docPath);
|
||||
System.out.println("pdfPath:" + pdfPath);
|
||||
PDFUtil.office2PDF(docPath, pdfPath);
|
||||
zyJxdg.setPdfPath("contract/" + namePath);
|
||||
}else {
|
||||
|
||||
}
|
||||
|
||||
update.set("file_path",zyJxdg.getFilePath());
|
||||
update.set("pdf_path",zyJxdg.getPdfPath());
|
||||
|
@ -193,14 +211,18 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
|
|||
update.set("jxrl_file_path",zyJxdg.getJxrlFilePath());
|
||||
update.set("jxrl_pdf_path",zyJxdg.getJxrlFilePath());
|
||||
}else{
|
||||
Global global = SpringContextHolder.getBean(Global.class);
|
||||
FileUtil.mkdir(global.getContractDickPath());
|
||||
String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss");
|
||||
String docPath = upLoadPath+ File.separator+ zyJxdg.getJxrlFilePath();
|
||||
String namePath = dd + ".pdf";
|
||||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
PDFUtil.office2PDF(docPath,pdfPath);
|
||||
zyJxdg.setJxrlPdfPath("contract/"+namePath);
|
||||
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 + zyJxdg.getJxrlFilePath();
|
||||
String namePath = dd + ".pdf";
|
||||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
PDFUtil.office2PDF(docPath, pdfPath);
|
||||
zyJxdg.setJxrlPdfPath("contract/" + namePath);
|
||||
}else {
|
||||
|
||||
}
|
||||
|
||||
update.set("jxrl_file_path",zyJxdg.getJxrlFilePath());
|
||||
update.set("jxrl_pdf_path",zyJxdg.getJxrlPdfPath());
|
||||
|
@ -323,50 +345,37 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
|
|||
if(StringUtils.equals("pdf",nameLast)){
|
||||
zyJxdg.setPdfPath(zyJxdg.getFilePath());
|
||||
}else{
|
||||
// Global global = SpringContextHolder.getBean(Global.class);
|
||||
// FileUtil.mkdir(global.getContractDickPath());
|
||||
// String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss");
|
||||
//// String docPath = upLoadPath+ File.separator+ zyJxdg.getFilePath();
|
||||
// String docPath = zyJxdg.getFilePath();
|
||||
// String namePath = dd + ".pdf";
|
||||
// String pdfPath = global.getContractDickPath() + namePath;
|
||||
// Map<String,String> map = zykService.downloadRemoteFile(docPath);
|
||||
// PDFUtil.office2PDF(map.get("data"),pdfPath);
|
||||
// zyJxdg.setPdfPath("contract/"+namePath);
|
||||
|
||||
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());
|
||||
Map<String,String> map = zykService.saveToZykJxdg(zykInfo);
|
||||
String fileName = map.get("data");
|
||||
String pdfName = map.get("pdfData");
|
||||
zyJxdg.setFilePath(fileName);
|
||||
zyJxdg.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 = zyJxdg.getFilePath();
|
||||
String docPath = upLoadPath + File.separator + zyJxdg.getFilePath();
|
||||
String namePath = dd + ".pdf";
|
||||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
// Map<String, String> map = zykService.downloadRemoteFile(docPath);
|
||||
PDFUtil.office2PDF(docPath, pdfPath);
|
||||
zyJxdg.setPdfPath("contract/" + namePath);
|
||||
}else {
|
||||
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());
|
||||
Map<String,String> map = zykService.saveToZykJxdg(zykInfo);
|
||||
String fileName = map.get("data");
|
||||
String pdfName = map.get("pdfData");
|
||||
zyJxdg.setFilePath(fileName);
|
||||
zyJxdg.setPdfPath(pdfName);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}else{
|
||||
zyJxdg.setPdfPath(null);
|
||||
}
|
||||
//--------上传ftp工具---------------
|
||||
// Map<String,String> saveToZyk(ZykInfo zykInfo);
|
||||
// if(StringUtils.isNotEmpty(zyJxdg.getFilePath())){
|
||||
// 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());
|
||||
// Map<String,String> map = zykService.saveToZyk(zykInfo);
|
||||
// String fileName = map.get("data");
|
||||
// String pdfName = map.get("pdfData");
|
||||
// zyJxdg.setFilePath(fileName);
|
||||
// zyJxdg.setPdfPath(pdfName);
|
||||
// }
|
||||
//--------上传ftp工具---------------
|
||||
|
||||
|
||||
if(isAdd){
|
||||
zyJxdgService.save(zyJxdg);
|
||||
|
@ -390,28 +399,32 @@ public class ZyJxdgController extends JeecgController<ZyJxdg, IZyJxdgService> {
|
|||
if(StringUtils.equals("pdf",nameLast)){
|
||||
zyJxdg.setJxrlPdfPath(zyJxdg.getJxrlFilePath());
|
||||
}else{
|
||||
// Global global = SpringContextHolder.getBean(Global.class);
|
||||
// FileUtil.mkdir(global.getContractDickPath());
|
||||
// String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss");
|
||||
// String docPath = upLoadPath+ File.separator+ zyJxdg.getJxrlFilePath();
|
||||
// String namePath = dd + ".pdf";
|
||||
// String pdfPath = global.getContractDickPath() + namePath;
|
||||
// PDFUtil.office2PDF(docPath,pdfPath);
|
||||
// zyJxdg.setJxrlPdfPath("contract/"+namePath);
|
||||
|
||||
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 + zyJxdg.getJxrlFilePath();
|
||||
String namePath = dd + ".pdf";
|
||||
String pdfPath = global.getContractDickPath() + namePath;
|
||||
PDFUtil.office2PDF(docPath, pdfPath);
|
||||
zyJxdg.setJxrlPdfPath("contract/" + namePath);
|
||||
}else{
|
||||
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());
|
||||
Map<String,String> map = zykService.saveToZykJxdg(zykInfo);
|
||||
String fileName = map.get("data");
|
||||
String pdfName = map.get("pdfData");
|
||||
zyJxdg.setJxrlFilePath(fileName);
|
||||
zyJxdg.setJxrlPdfPath(pdfName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
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());
|
||||
Map<String,String> map = zykService.saveToZykJxdg(zykInfo);
|
||||
String fileName = map.get("data");
|
||||
String pdfName = map.get("pdfData");
|
||||
zyJxdg.setJxrlFilePath(fileName);
|
||||
zyJxdg.setJxrlPdfPath(pdfName);
|
||||
|
||||
}
|
||||
}else{
|
||||
|
|
|
@ -136,6 +136,7 @@ spring:
|
|||
url: jdbc:mysql://127.0.0.1:3306/course_information_center_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: root
|
||||
# password: ABCabc@123
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# 多数据源配置
|
||||
# multi-oracle:
|
||||
|
@ -176,8 +177,8 @@ jeecg:
|
|||
# 签名拦截接口
|
||||
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
|
||||
#local、minio、alioss
|
||||
# uploadType: local
|
||||
uploadType: sftp
|
||||
uploadType: local
|
||||
# uploadType: sftp
|
||||
# 前端访问地址
|
||||
domainUrl:
|
||||
pc: http://localhost:3100
|
||||
|
|
|
@ -175,8 +175,8 @@ jeecg:
|
|||
# 签名拦截接口
|
||||
signUrls: /sys/dict/getDictItems/*,/sys/dict/loadDict/*,/sys/dict/loadDictOrderByValue/*,/sys/dict/loadDictItem/*,/sys/dict/loadTreeData,/sys/api/queryTableDictItemsByCode,/sys/api/queryFilterTableDictInfo,/sys/api/queryTableDictByKeys,/sys/api/translateDictFromTable,/sys/api/translateDictFromTableByKeys
|
||||
#local\minio\alioss
|
||||
# uploadType: local
|
||||
uploadType: sftp
|
||||
uploadType: local
|
||||
# uploadType: sftp
|
||||
# 前端访问地址
|
||||
domainUrl:
|
||||
pc: http://210.47.17.166
|
||||
|
@ -347,10 +347,10 @@ wjx:
|
|||
url: https://www.wjx.cn/openapi/default.aspx
|
||||
#SFTP
|
||||
sftp:
|
||||
hostname: 192.168.2.200
|
||||
hostname: 210.47.29.99
|
||||
port: 22
|
||||
username: sftp
|
||||
password: sftp
|
||||
password: Nenujwc@99
|
||||
timeout: 1000
|
||||
uploadpath: /kczx
|
||||
fullpath: /home/sftp
|
Loading…
Reference in New Issue