Merge remote-tracking branch 'origin/main'

This commit is contained in:
cwchen 2025-05-08 09:49:16 +08:00
commit f95d8040ed
3 changed files with 37 additions and 42 deletions

View File

@ -197,7 +197,7 @@ public class EpcServiceImpl implements EpcService {
personFileGroup(item, comOtherList);
});
//将数据转换为模版数据
dealWithWordData(request,response,data,"EPC.ftl");
dealWithWordData(request,response,data,"EPC_DOC.ftl");
}
}
@ -315,8 +315,8 @@ public class EpcServiceImpl implements EpcService {
if (item.getIdCardFileList() != null) {
for (TbFileSourceVo file : item.getIdCardFileList()) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("width", "4959860");
imgMap.put("height", "3492375");
imgMap.put("width", "375.35");
imgMap.put("height", "207.85");
imgMap.put("index", (100 * (i + 1)) + imgIndex++);
imgMap.put("base64Url", file.getFilePath() != null ?
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
@ -327,8 +327,8 @@ public class EpcServiceImpl implements EpcService {
if (item.getDiplomaFileList() != null) {
for (TbFileSourceVo file : item.getDiplomaFileList()) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("width", "5325745");
imgMap.put("height", "7534910");
imgMap.put("width", "481.15");
imgMap.put("height", "634.5");
imgMap.put("index", (100 * (i + 1)) + imgIndex++);
imgMap.put("base64Url", file.getFilePath() != null ?
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
@ -340,8 +340,8 @@ public class EpcServiceImpl implements EpcService {
if (item.getOtherFileList() != null) {
for (TbFileSourceVo file : item.getOtherFileList()) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("width", "5325745");
imgMap.put("height", "7534910");
imgMap.put("width", "481.15");
imgMap.put("height", "634.5");
imgMap.put("index", (100 * (i + 1)) + imgIndex++);
imgMap.put("base64Url", file.getFilePath() != null ?
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
@ -363,8 +363,8 @@ public class EpcServiceImpl implements EpcService {
TbFileSourceVo file = item.getOtherFileList().get(k);
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("index", (10000 * (j + 1)) + (k + 1));
imgMap.put("width", "5325745");
imgMap.put("height", "7534910");
imgMap.put("width", "481.15");
imgMap.put("height", "634.5");
imgMap.put("base64Url", file.getFilePath() != null ?
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
imgList2.add(imgMap);
@ -398,8 +398,8 @@ public class EpcServiceImpl implements EpcService {
if (item.getIdCardFileList() != null) {
for (TbFileSourceVo file : item.getIdCardFileList()) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("width", "4959860");
imgMap.put("height", "3492375");
imgMap.put("width", "375.35");
imgMap.put("height", "207.85");
imgMap.put("index", (100 * (i + 1)) + imgIndex++);
imgMap.put("base64Url", file.getFilePath() != null ?
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
@ -410,8 +410,8 @@ public class EpcServiceImpl implements EpcService {
if (item.getDiplomaFileList() != null) {
for (TbFileSourceVo file : item.getDiplomaFileList()) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("width", "5325745");
imgMap.put("height", "7534910");
imgMap.put("width", "481.15");
imgMap.put("height", "634.5");
imgMap.put("index", (100 * (i + 1)) + imgIndex++);
imgMap.put("base64Url", file.getFilePath() != null ?
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
@ -422,8 +422,8 @@ public class EpcServiceImpl implements EpcService {
if (item.getOtherFileList() != null) {
for (TbFileSourceVo file : item.getOtherFileList()) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("width", "5325745");
imgMap.put("height", "7534910");
imgMap.put("width", "481.15");
imgMap.put("height", "634.5");
imgMap.put("index", (100 * (i + 1)) + imgIndex++);
imgMap.put("base64Url", file.getFilePath() != null ?
FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : "");
@ -439,8 +439,8 @@ public class EpcServiceImpl implements EpcService {
List<Map<String, Object>> imgList2 = new ArrayList<>();
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("index", 10000) ;
imgMap.put("width", "5325745");
imgMap.put("height", "7534910");
imgMap.put("width", "481.15");
imgMap.put("height", "634.5");
imgMap.put("base64Url", "");
imgList2.add(imgMap);
yjMap.put("imgList", imgList2);

View File

@ -199,7 +199,7 @@ public class SouthServiceImpl implements SouthService {
List<TbFileSourceVo> comOtherList = stateGridMapper.getFileSourceList(item.getId(),TableType.TB_SUB_PEOPLE.getCode());
personFileGroup(item, comOtherList);
});
epcServiceImpl.dealWithWordData(request, response, data, "NW.ftl");
epcServiceImpl.dealWithWordData(request, response, data, "NW_DOC.ftl");
}
}

View File

@ -269,11 +269,6 @@ public class StateGridServiceImpl implements StateGridService {
@Value("${file.path}")
private String filePath;
public static void main(String[] args) throws Exception {
String bast64= FreeMarkerUtil.getImageBase("F:\\File\\tool\\2025\\05\\07\\3_20250507104937A005.png");
System.err.println(bast64);
}
/**
* 将数据转换为模版数据
* @param request
@ -316,8 +311,8 @@ public class StateGridServiceImpl implements StateGridService {
for (TbFileSourceVo file : item.getFileList()) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("index", 100 * index + imgIndex++);
imgMap.put("width", "5325745");
imgMap.put("height", "7534910");
imgMap.put("width", "481.15");
imgMap.put("height", "634.5");
String bast64=FreeMarkerUtil.getImageBase(filePath+file.getFilePath());
imgMap.put("base64Url", file.getFilePath() != null ? bast64: "");
imgList.add(imgMap);
@ -370,8 +365,8 @@ public class StateGridServiceImpl implements StateGridService {
for (TbFileSourceVo file : perfItem.getSubPerfFileList()) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("index", 100000 * perfIndex + imgIndex++);
imgMap.put("width", "5325745");
imgMap.put("height", "7534910");
imgMap.put("width", "481.15");
imgMap.put("height", "634.5");
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
imgList.add(imgMap);
}
@ -386,8 +381,8 @@ public class StateGridServiceImpl implements StateGridService {
for (TbFileSourceVo file : item.getSubFileList()) {
Map<String, Object> zzMap = new HashMap<>();
zzMap.put("index", 1000 * subIndex + zzIndex++);
zzMap.put("width", "5325745");
zzMap.put("height", "7534910");
zzMap.put("width", "481.15");
zzMap.put("height", "634.5");
zzMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
zzList.add(zzMap);
}
@ -415,8 +410,8 @@ public class StateGridServiceImpl implements StateGridService {
for (TbFileSourceVo file : personItem.getIdCardFileList()) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("index", 10000 * personIndex + imgIndex++);
imgMap.put("width", "4959860");
imgMap.put("height", "3492375");
imgMap.put("width", "375.35");
imgMap.put("height", "207.85");
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
imgList.add(imgMap);
}
@ -426,8 +421,8 @@ public class StateGridServiceImpl implements StateGridService {
for (TbFileSourceVo file : personItem.getDiplomaFileList()) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("index", 10000 * personIndex + imgIndex++);
imgMap.put("width", "5325745");
imgMap.put("height", "7534910");
imgMap.put("width", "481.15");
imgMap.put("height", "634.5");
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
imgList.add(imgMap);
}
@ -437,8 +432,8 @@ public class StateGridServiceImpl implements StateGridService {
for (TbFileSourceVo file : personItem.getOtherFileList()) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("index", 10000 * personIndex + imgIndex++);
imgMap.put("width", "5325745");
imgMap.put("height", "7534910");
imgMap.put("width", "481.15");
imgMap.put("height", "634.5");
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
imgList.add(imgMap);
}
@ -497,8 +492,8 @@ public class StateGridServiceImpl implements StateGridService {
for (TbFileSourceVo file : item.getIdCardFileList()) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("index", 1000000 * otherIndex + imgIndex++);
imgMap.put("width", "4959860");
imgMap.put("height", "3492375");
imgMap.put("width", "375.35");
imgMap.put("height", "207.85");
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
personImgList.add(imgMap);
}
@ -514,8 +509,8 @@ public class StateGridServiceImpl implements StateGridService {
for (TbFileSourceVo file : allImages) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("index", 1000000 * otherIndex + imgIndex++);
imgMap.put("width", "5325745");
imgMap.put("height", "7534910");
imgMap.put("width", "481.15");
imgMap.put("height", "634.5");
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
personImgList.add(imgMap);
}
@ -632,8 +627,8 @@ public class StateGridServiceImpl implements StateGridService {
for (TbFileSourceVo file : allImages) {
Map<String, Object> imgMap = new HashMap<>();
imgMap.put("index", imgIndex++);
imgMap.put("width", "5325745");
imgMap.put("height", "7534910");
imgMap.put("width", "481.15");
imgMap.put("height", "634.5");
imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : "");
imgList.add(imgMap);
}
@ -652,7 +647,7 @@ public class StateGridServiceImpl implements StateGridService {
data.put("list3", list3);
data.put("list4", list4);
data.put("list5", list5);
WordUtils.exportMillCertificateWord(request,response,data,tbData.getName(),"GW.ftl" );
WordUtils.exportMillCertificateWord(request,response,data,tbData.getName(),"GW_DOC.ftl" );
} catch (Exception e) {
log.error("处理国网模版下载数据失败", e);
}