模版下载接口

This commit is contained in:
fl 2025-04-30 10:27:54 +08:00
parent 3bedec4993
commit 67af9e28ca
5 changed files with 14 additions and 14 deletions

View File

@ -196,10 +196,8 @@ public class EpcServiceImpl implements EpcService {
List<TbFileSourceVo> comOtherList = stateGridMapper.getFileSourceList(item.getId(),TableType.TB_SUB_PEOPLE.getCode());
personFileGroup(item, comOtherList);
});
//将数据转换为模版数据
dealWithWordData(request,response,data);
dealWithWordData(request,response,data,"EPC.ftl");
}
}
@ -215,7 +213,7 @@ public class EpcServiceImpl implements EpcService {
* @param response
* @param tbData
*/
private void dealWithWordData(HttpServletRequest request, HttpServletResponse response,TbGwModelVo tbData) {
public void dealWithWordData(HttpServletRequest request, HttpServletResponse response, TbGwModelVo tbData, String fileName) {
try {
Map<String, Object> data = new HashMap<>(16);
List<Map<String, Object>> list = new ArrayList<>();
@ -283,9 +281,6 @@ public class EpcServiceImpl implements EpcService {
}
}
// 处理公司核心人员简历信息
if (tbData.getComCoreList() != null && !tbData.getComCoreList().isEmpty()) {
for (int i = 0; i < tbData.getComCoreList().size(); i++) {
@ -462,7 +457,7 @@ public class EpcServiceImpl implements EpcService {
data.put("list2", list2);
data.put("tbr", tbData.getCreateUser() != null ? tbData.getCreateUser() : "");
// 导出Word文档
WordUtils.exportMillCertificateWord(request, response, data, tbData.getName(), "EPC.ftl");
WordUtils.exportMillCertificateWord(request, response, data, tbData.getName(), fileName);
} catch (Exception e) {
log.error("处理EPC模版下载数据失败", e);
}

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.downloadEpcTemp(request, response, o);
epcServiceImpl.dealWithWordData(request, response, data, "NW.ftl");
}
}

View File

@ -565,6 +565,7 @@ public class StateGridServiceImpl implements StateGridService {
personMap.put("jlTitle", (item.getPostName() != null ? item.getPostName() : "项目经理") + "简历及证明材料");
personMap.put("userType", item.getPostName() != null ? item.getPostName() : "项目经理");
personMap.put("zmcl", "");
// 处理简历信息
Map<String, Object> jlMap = new HashMap<>();
@ -586,9 +587,9 @@ public class StateGridServiceImpl implements StateGridService {
TbCompanyPerfVo tbCompanyPerfVo = peoplePerfList.get(i);
Map<String, Object> yjMap = new HashMap<>();
yjMap.put("date", tbCompanyPerfVo.getStartTime()+""+tbCompanyPerfVo.getEndTime());
yjMap.put("proName", tbCompanyPerfVo.getProName());
yjMap.put("gm", tbCompanyPerfVo.getLineScale()+"km");
yjMap.put("content", tbCompanyPerfVo.getContractRang());
yjMap.put("proName", tbCompanyPerfVo.getProName() != null ? tbCompanyPerfVo.getProName() : "");
yjMap.put("gm", tbCompanyPerfVo.getLineScale() != null ? tbCompanyPerfVo.getLineScale()+"km" : "");
yjMap.put("content", tbCompanyPerfVo.getContractRang() != null ? tbCompanyPerfVo.getContractRang() : "");
yjMap.put("zw", item.getPostName() != null ? item.getPostName() : "");
yjList.add(yjMap);
}

View File

@ -7146,7 +7146,7 @@
<w:b/>
<w:lang w:val="en-US" w:eastAsia="zh-CN"/>
</w:rPr>
<w:t>${vo.zmcl}</w:t>
<w:t>${vo.zmcl!"zmcl异常"}</w:t>
</w:r>
</w:p>
<#if vo.imgList ?? && (vo.imgList?size>0)>

View File

@ -85,6 +85,10 @@
tcp.pro_name,
tcp.start_time,
tcp.end_time,
tcp.line_scale,
tcp.contract_rang,
tcp.owner_unit,
tcp.owner_phone,
tcp.voltage
FROM
tb_key_people tkp
@ -99,7 +103,7 @@
</if>
<if test="perfIds != '' and perfIds != null">
and tcp.id in
<foreach collection="list" item="item" open="(" close=")" separator=",">
<foreach collection="perfIds" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>