|
@@ -17,6 +17,7 @@ import org.springblade.business.entity.*;
|
|
|
import org.springblade.business.mapper.TaskMapper;
|
|
|
import org.springblade.business.service.*;
|
|
|
import org.springblade.business.vo.*;
|
|
|
+import org.springblade.common.constant.CommonConstant;
|
|
|
import org.springblade.common.utils.CommonUtil;
|
|
|
import org.springblade.common.utils.FileUtils;
|
|
|
import org.springblade.common.utils.SnowFlakeUtil;
|
|
@@ -45,6 +46,7 @@ import org.springblade.manager.entity.*;
|
|
|
import org.springblade.manager.feign.*;
|
|
|
import org.springblade.manager.vo.AppWbsTreeContractVO;
|
|
|
import org.springblade.resource.feign.CommonFileClient;
|
|
|
+import org.springblade.system.cache.ParamCache;
|
|
|
import org.springblade.system.user.cache.UserCache;
|
|
|
import org.springblade.system.user.entity.User;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -226,17 +228,19 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
//首件,首件的资料由三个部分组成:封面、关联资料、总结报告
|
|
|
if (StringUtils.isNotEmpty(query.getEVisaPdfUrl()) || StringUtils.isNotEmpty(query.getPdfUrl())) {
|
|
|
//封面
|
|
|
- vo.setApprovalFileList(query.getName(), StringUtils.isNotEmpty(query.getEVisaPdfUrl()) ? query.getEVisaPdfUrl() : query.getPdfUrl());
|
|
|
+ String url = StringUtils.isNotEmpty(query.getEVisaPdfUrl()) ? query.getEVisaPdfUrl() : query.getPdfUrl();
|
|
|
+ String s = getHppsToHttp(url);
|
|
|
+ vo.setApprovalFileList(query.getName(), s);
|
|
|
}
|
|
|
//不是签章时再查关联资料,因为关联资料都是审批好的pdf,存在关键字,不能再执行签 字/章
|
|
|
if (!isTask) {
|
|
|
//关联资料
|
|
|
if (StringUtils.isNotEmpty(query.getLinkMergePdfUrl())) {
|
|
|
- vo.setApprovalFileList("首件关联资料", query.getLinkMergePdfUrl());
|
|
|
+ vo.setApprovalFileList("首件关联资料", this.getHppsToHttp(query.getLinkMergePdfUrl()));
|
|
|
}
|
|
|
InformationQueryFile queryFile = this.informationQueryFileService.getOne(Wrappers.<InformationQueryFile>lambdaQuery().eq(InformationQueryFile::getQueryId, query.getId()));
|
|
|
if (queryFile != null) {
|
|
|
- vo.setApprovalFileList(queryFile.getName(), queryFile.getPdfUrl());
|
|
|
+ vo.setApprovalFileList(queryFile.getName(), getHppsToHttp(queryFile.getPdfUrl()));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -257,7 +261,8 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
}
|
|
|
|
|
|
//资料填报原始pdf
|
|
|
- vo.setApprovalFileList(query.getName(), StringUtils.isNotEmpty(query.getEVisaPdfUrl()) ? query.getEVisaPdfUrl() : query.getPdfUrl());
|
|
|
+ String approvalPdf = StringUtils.isNotEmpty(query.getEVisaPdfUrl()) ? query.getEVisaPdfUrl() : query.getPdfUrl();
|
|
|
+ vo.setApprovalFileList(query.getName(), this.getHppsToHttp(approvalPdf));
|
|
|
|
|
|
//试验关联文件合并pdf
|
|
|
if (StringUtils.isNotEmpty(query.getPdfTrialUrl())) {
|
|
@@ -265,7 +270,8 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
if (StringUtils.isNotEmpty(replaceHTTPURL)) {
|
|
|
query.setPdfTrialUrl(replaceHTTPURL);
|
|
|
}
|
|
|
- vo.setApprovalFileList(query.getName() + "(关联试验文件)", StringUtils.isNotEmpty(query.getPdfTrialUrl()) ? query.getPdfTrialUrl() : null);
|
|
|
+ String trialPdf = StringUtils.isNotEmpty(query.getPdfTrialUrl()) ? query.getPdfTrialUrl() : null;
|
|
|
+ vo.setApprovalFileList(query.getName() + "(关联试验文件)", getHppsToHttp(trialPdf));
|
|
|
}
|
|
|
|
|
|
//试验关联的工程部位信息合并pdf
|
|
@@ -274,7 +280,9 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
if (StringUtils.isNotEmpty(replaceHTTPURL)) {
|
|
|
query.setPdfTrialUrlPosition(replaceHTTPURL);
|
|
|
}
|
|
|
- vo.setApprovalFileList(query.getName() + "(关联试验工程部位信息文件)", StringUtils.isNotEmpty(query.getPdfTrialUrlPosition()) ? query.getPdfTrialUrlPosition() : null);
|
|
|
+
|
|
|
+ String trailpdf = StringUtils.isNotEmpty(query.getPdfTrialUrlPosition()) ? query.getPdfTrialUrlPosition() : null;
|
|
|
+ vo.setApprovalFileList(query.getName() + "(关联试验工程部位信息文件)", getHppsToHttp(trailpdf));
|
|
|
}
|
|
|
|
|
|
/** 任务审批查看时,把节点附件列表跟在上报文件后面*/
|
|
@@ -282,7 +290,6 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
if (ObjectUtil.isNotEmpty(files)){
|
|
|
List<TaskApprovalVO.ApprovalFile> fileList = vo.getApprovalFileList();
|
|
|
fileList.addAll(files);
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
} else if (new Integer("2").equals(query.getType())) {
|
|
@@ -302,7 +309,8 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
}
|
|
|
|
|
|
//试验原始pdf
|
|
|
- vo.setApprovalFileList(query.getName(), StringUtils.isNotEmpty(query.getEVisaPdfUrl()) ? query.getEVisaPdfUrl() : query.getPdfUrl());
|
|
|
+ String approvalPdf = StringUtils.isNotEmpty(query.getEVisaPdfUrl()) ? query.getEVisaPdfUrl() : query.getPdfUrl();
|
|
|
+ vo.setApprovalFileList(query.getName(), getHppsToHttp(approvalPdf));
|
|
|
|
|
|
//试验关联的原材料检测报告合并pdf (wbsId=试验记录id)
|
|
|
String sqlRecord = "select old_pdf_url from u_trial_raw_material_self_record where self_record_id =" + query.getWbsId();
|
|
@@ -314,7 +322,8 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
recordObj.setOldPdfUrl(replaceHTTPURL);
|
|
|
}
|
|
|
}
|
|
|
- vo.setApprovalFileList(query.getName() + "(原材料检测报告)", StringUtils.isNotEmpty(recordObj.getOldPdfUrl()) ? recordObj.getOldPdfUrl() : null);
|
|
|
+ String clPdf = StringUtils.isNotEmpty(recordObj.getOldPdfUrl()) ? recordObj.getOldPdfUrl() : null;
|
|
|
+ vo.setApprovalFileList(query.getName() + "(原材料检测报告)", getHppsToHttp(clPdf));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -344,7 +353,14 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
|
|
|
if (!url.contains("https:")) {
|
|
|
return url.replace("http:", "https:");
|
|
|
}
|
|
|
- return "";
|
|
|
+ return url;
|
|
|
+ }
|
|
|
+ private String getHppsToHttp(String url) {
|
|
|
+ String sys_isonline = ParamCache.getValue(CommonConstant.SYS_ISONLINE);
|
|
|
+ if (url.contains("https:") && sys_isonline.equals("20")) {
|
|
|
+ return url.replace("https:", "http:");
|
|
|
+ }
|
|
|
+ return url;
|
|
|
}
|
|
|
|
|
|
@Override
|