|
|
@@ -119,11 +119,11 @@ public class WordService {
|
|
|
throw new ServiceException("生成失败,ID无效!");
|
|
|
}
|
|
|
|
|
|
- String baseUrl = request.getServerName();
|
|
|
+ /*String baseUrl = request.getServerName();
|
|
|
boolean isIntranet = false;
|
|
|
if(baseUrl.contains("192.168")){
|
|
|
isIntranet = true;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
LabCheckRecordDetails labCheckRecordDetails = new LabCheckRecordDetails();
|
|
|
labCheckRecordDetails.setCheckId(checkRecord.getId());
|
|
|
@@ -147,16 +147,17 @@ public class WordService {
|
|
|
if(deptSign == null){
|
|
|
deptSign = "";
|
|
|
}else {
|
|
|
- deptSign = (isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + deptSign;
|
|
|
+ //deptSign = (isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + deptSign;
|
|
|
+ //通过配置加载文件域名
|
|
|
+ deptSign = fileConfigUtils.getFileDomainApp() + deptSign;
|
|
|
}
|
|
|
|
|
|
-// word2.setCheck_dept_sign(new PictureRenderData(100, 100, PictureType.PNG, BufferedImageUtils.getUrlBufferedImage(deptSign)));
|
|
|
+ //word2.setCheck_dept_sign(new PictureRenderData(100, 100, PictureType.PNG, BufferedImageUtils.getUrlBufferedImage(deptSign)));
|
|
|
word2.setCheck_dept_sign(new SignPictureRenderData(100, 100, deptSign, "图片加载失败", 310 ,-35));
|
|
|
word2.setCheck_dept_name(checkRecord.getJcDwName());
|
|
|
word2.setCheck_result(checkRecord.getZgJg());
|
|
|
|
|
|
Date now = new Date();
|
|
|
-
|
|
|
word2.setNow_year(DateUtil.year(now) + "");
|
|
|
word2.setNow_month((DateUtil.month(now) + 1) + "");
|
|
|
word2.setNow_day(DateUtil.dayOfMonth(now) + "");
|
|
|
@@ -167,8 +168,10 @@ public class WordService {
|
|
|
|
|
|
String signature = labCheckRecordMapper.selectSignatureByUserId(checkRecord.getCreateUserId());
|
|
|
word2.setCheck_nick_name(new PictureRenderData(100, 30, PictureType.PNG, BufferedImageUtils.getUrlBufferedImage(
|
|
|
- (isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + signature
|
|
|
- )));
|
|
|
+ //(isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + signature
|
|
|
+ //通过配置加载文件域名
|
|
|
+ deptSign = fileConfigUtils.getFileDomainApp() + signature
|
|
|
+ )));
|
|
|
|
|
|
List<Word2.Detail> list = new ArrayList<>();
|
|
|
|
|
|
@@ -214,19 +217,25 @@ public class WordService {
|
|
|
String yhImgs = checkRecordDetails.get(i).getYhImg();
|
|
|
String[] imgs = yhImgs.split(",");
|
|
|
if(imgs.length > 0){
|
|
|
- detail.setCheck_img1((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[0]);
|
|
|
+ //detail.setCheck_img1((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[0]);
|
|
|
+ //通过配置加载文件域名
|
|
|
+ detail.setCheck_img1(fileConfigUtils.getFileDomainApp() + imgs[0]);
|
|
|
}
|
|
|
if(imgs.length > 1){
|
|
|
- detail.setCheck_img2((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[1]);
|
|
|
+ //detail.setCheck_img2((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[1]);
|
|
|
+ detail.setCheck_img2(fileConfigUtils.getFileDomainApp() + imgs[1]);
|
|
|
}
|
|
|
if(imgs.length > 2){
|
|
|
- detail.setCheck_img3((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[2]);
|
|
|
+ //detail.setCheck_img3((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[2]);
|
|
|
+ detail.setCheck_img3(fileConfigUtils.getFileDomainApp() + imgs[2]);
|
|
|
}
|
|
|
if(imgs.length > 3){
|
|
|
- detail.setCheck_img4((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[3]);
|
|
|
+ //detail.setCheck_img4((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[3]);
|
|
|
+ detail.setCheck_img4(fileConfigUtils.getFileDomainApp() + imgs[3]);
|
|
|
}
|
|
|
if(imgs.length > 4){
|
|
|
- detail.setCheck_img5((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[4]);
|
|
|
+ //detail.setCheck_img5((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[4]);
|
|
|
+ detail.setCheck_img5(fileConfigUtils.getFileDomainApp() + imgs[4]);
|
|
|
}
|
|
|
|
|
|
list.add(detail);
|
|
|
@@ -250,11 +259,11 @@ public class WordService {
|
|
|
throw new ServiceException("生成失败,ID无效!");
|
|
|
}
|
|
|
|
|
|
- String baseUrl = request.getServerName();
|
|
|
+ /*String baseUrl = request.getServerName();
|
|
|
boolean isIntranet = false;
|
|
|
if(baseUrl.contains("192.168")){
|
|
|
isIntranet = true;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
LabCheckRecordDetails labCheckRecordDetails = new LabCheckRecordDetails();
|
|
|
labCheckRecordDetails.setCheckId(checkRecord.getId());
|
|
|
@@ -281,7 +290,8 @@ public class WordService {
|
|
|
if(deptSign == null){
|
|
|
deptSign = "";
|
|
|
}else {
|
|
|
- deptSign = (isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + deptSign;
|
|
|
+ //deptSign = (isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + deptSign;
|
|
|
+ deptSign = fileConfigUtils.getFileDomainApp() + deptSign;
|
|
|
}
|
|
|
word3.setCheck_dept_sign(new SignPictureRenderData(100, 100, deptSign, "图片加载失败", 300 ,-55));
|
|
|
|
|
|
@@ -298,11 +308,6 @@ public class WordService {
|
|
|
// 添加检查项 编码之后补充
|
|
|
// 数据形式存在 1,2,3, 1,, 1, 31,,, 等形式,故需要特殊处理
|
|
|
if(checkRecordDetails.get(i).getJcxId() != null){
|
|
|
-// optionId = checkRecordDetails.get(i).getJcxId().substring(0, checkRecordDetails.get(i).getJcxId().lastIndexOf(","));
|
|
|
-// if(optionId.lastIndexOf(",") != -1){
|
|
|
-// optionId = optionId.substring(optionId.lastIndexOf(","));
|
|
|
-// }
|
|
|
-
|
|
|
String[] ids = checkRecordDetails.get(i).getJcxId().split(",");
|
|
|
List<String> list1 = Arrays.asList(ids);
|
|
|
for (int i1 = 0; i1 < list1.size(); i1++) {
|
|
|
@@ -349,19 +354,24 @@ public class WordService {
|
|
|
String yhImgs = checkRecordDetails.get(i).getYhImg();
|
|
|
String[] imgs = yhImgs.split(",");
|
|
|
if(imgs.length > 0){
|
|
|
- desc.setCheck_img1((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[0]);
|
|
|
+ //desc.setCheck_img1((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[0]);
|
|
|
+ desc.setCheck_img1(fileConfigUtils.getFileDomainApp() + imgs[0]);
|
|
|
}
|
|
|
if(imgs.length > 1){
|
|
|
- desc.setCheck_img2((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[1]);
|
|
|
+ //desc.setCheck_img2((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[1]);
|
|
|
+ desc.setCheck_img2(fileConfigUtils.getFileDomainApp() + imgs[1]);
|
|
|
}
|
|
|
if(imgs.length > 2){
|
|
|
- desc.setCheck_img3((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[2]);
|
|
|
+ //desc.setCheck_img3((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[2]);
|
|
|
+ desc.setCheck_img3(fileConfigUtils.getFileDomainApp() + imgs[2]);
|
|
|
}
|
|
|
if(imgs.length > 3){
|
|
|
- desc.setCheck_img4((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[3]);
|
|
|
+ //desc.setCheck_img4((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[3]);
|
|
|
+ desc.setCheck_img4(fileConfigUtils.getFileDomainApp() + imgs[3]);
|
|
|
}
|
|
|
if(imgs.length > 4){
|
|
|
- desc.setCheck_img5((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[4]);
|
|
|
+ //desc.setCheck_img5((isIntranet ? fileConfigUtils.getLocalUrl() : fileConfigUtils.getRemoteUrl()) + imgs[4]);
|
|
|
+ desc.setCheck_img5(fileConfigUtils.getFileDomainApp() + imgs[4]);
|
|
|
}
|
|
|
descs.add(desc);
|
|
|
}
|