Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -25,9 +25,9 @@ import java.util.Map;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评标委员会签字表
|
* 评审专家签到
|
||||||
*/
|
*/
|
||||||
@Service("judgesSign")
|
@Service("judgesSignIn")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class JudgesSignImpl implements ExportService {
|
public class JudgesSignImpl implements ExportService {
|
||||||
|
|
||||||
@ -47,13 +47,13 @@ public class JudgesSignImpl implements ExportService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void doExport(ExportParam param, HttpServletRequest request, HttpServletResponse response) {
|
public void doExport(ExportParam param, HttpServletRequest request, HttpServletResponse response) {
|
||||||
log.info("评标委员会签字表,ExportParam = {}", JsonUtils.objectToJson(param));
|
log.info("评审专家签到,ExportParam = {}", JsonUtils.objectToJson(param));
|
||||||
//项目和招标名称数据
|
//项目和招标名称数据
|
||||||
ProjectSectionVO section = commonFeignService.projectGetSectionById(param.getSectionId());
|
ProjectSectionVO section = commonFeignService.projectGetSectionById(param.getSectionId());
|
||||||
log.info("评标委员会签字表 {},查询项目信息 = {}", param.getAssessRoomId(), JsonUtils.objectToJson(section));
|
log.info("评审专家签到 {},查询项目信息 = {}", param.getAssessRoomId(), JsonUtils.objectToJson(section));
|
||||||
//专家人员数据
|
//专家人员数据
|
||||||
List<JuryPrintVO> list = commonFeignService.rsmsQueryReportPrintByRoomId(param.getAssessRoomId());
|
List<JuryPrintVO> list = commonFeignService.rsmsQueryReportPrintByRoomId(param.getAssessRoomId());
|
||||||
log.info("评标委员会签字表 {},查询专家人员数据 = {}", param.getAssessRoomId(), JsonUtils.objectToJson(list));
|
log.info("评审专家签到 {},查询专家人员数据 = {}", param.getAssessRoomId(), JsonUtils.objectToJson(list));
|
||||||
ArrayList<Map<String, Object>> maps = new ArrayList<>();
|
ArrayList<Map<String, Object>> maps = new ArrayList<>();
|
||||||
|
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
@ -80,7 +80,7 @@ public class JudgesSignImpl implements ExportService {
|
|||||||
XWPFTemplate template = XWPFTemplate.compile(file, config).render(all);
|
XWPFTemplate template = XWPFTemplate.compile(file, config).render(all);
|
||||||
|
|
||||||
//导出的表格名称
|
//导出的表格名称
|
||||||
String dictName = commonFeignService.exportDictName(param.getId(), "评标委员会签字表") + ".docx";
|
String dictName = commonFeignService.exportDictName(param.getId(), "评审专家签到表") + ".docx";
|
||||||
String fileName = new String(dictName.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
|
String fileName = new String(dictName.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
|
||||||
|
|
||||||
this.write(template, fileName, response);
|
this.write(template, fileName, response);
|
||||||
|
@ -23,9 +23,9 @@ import java.util.*;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 评审专家签到表
|
* 评审承诺书确认记录
|
||||||
*/
|
*/
|
||||||
@Service("judgesSignIn")
|
@Service("judgesSign")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class JudgesSignInImpl implements ExportService {
|
public class JudgesSignInImpl implements ExportService {
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -43,10 +43,10 @@ public class JudgesSignInImpl implements ExportService {
|
|||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
@Override
|
@Override
|
||||||
public void doExport(ExportParam param, HttpServletRequest request, HttpServletResponse response) {
|
public void doExport(ExportParam param, HttpServletRequest request, HttpServletResponse response) {
|
||||||
log.info("评审专家签到表,ExportParam = {}", JsonUtils.objectToJson(param));
|
log.info("评审承诺书确认记录,ExportParam = {}", JsonUtils.objectToJson(param));
|
||||||
//专家人员数据
|
//专家人员数据
|
||||||
List<JuryPrintVO> list = commonFeignService.rsmsQueryReportPrintByRoomId(param.getAssessRoomId());
|
List<JuryPrintVO> list = commonFeignService.rsmsQueryReportPrintByRoomId(param.getAssessRoomId());
|
||||||
log.info("评标委员会签字表 {},查询专家人员数据 = {}", param.getAssessRoomId(), JsonUtils.objectToJson(list));
|
log.info("评审承诺书确认记录 {},查询专家人员数据 = {}", param.getAssessRoomId(), JsonUtils.objectToJson(list));
|
||||||
ArrayList<Map<String, Object>> maps = new ArrayList<>();
|
ArrayList<Map<String, Object>> maps = new ArrayList<>();
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
Map<String, Object> data = new HashMap<>();
|
Map<String, Object> data = new HashMap<>();
|
||||||
@ -69,7 +69,7 @@ public class JudgesSignInImpl implements ExportService {
|
|||||||
Configure config = Configure.builder().bind("table", policy).build();
|
Configure config = Configure.builder().bind("table", policy).build();
|
||||||
XWPFTemplate template = XWPFTemplate.compile(file, config).render(all);
|
XWPFTemplate template = XWPFTemplate.compile(file, config).render(all);
|
||||||
//导出的表格名称
|
//导出的表格名称
|
||||||
String dictName = commonFeignService.exportDictName(param.getId(), "评审专家签到表") + ".docx";
|
String dictName = commonFeignService.exportDictName(param.getId(), "评审承诺书确认记录表") + ".docx";
|
||||||
String fileName = new String(dictName.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
|
String fileName = new String(dictName.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
|
||||||
|
|
||||||
this.write(template, fileName, response);
|
this.write(template, fileName, response);
|
||||||
|
@ -124,20 +124,16 @@ public class ExpertSignatureServiceImpl implements ExpertSignatureService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
File f = new File(path + "merged.pdf");
|
File f = new File(path + "merged.pdf");
|
||||||
FileOutputStream fos = null;
|
|
||||||
try {
|
FontSettings.getDefaultInstance().setFontsFolder(fontAddress, true);
|
||||||
FontSettings.getDefaultInstance().setFontsFolder(fontAddress, true);
|
try (FileOutputStream fos = new FileOutputStream(f);) {
|
||||||
fos = new FileOutputStream(f);
|
|
||||||
com.aspose.words.Document doc = new com.aspose.words.Document(path + "merged.docx");
|
com.aspose.words.Document doc = new com.aspose.words.Document(path + "merged.docx");
|
||||||
doc.save(fos, SaveFormat.PDF);
|
doc.save(fos, SaveFormat.PDF);
|
||||||
fos.flush();
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info(ExceptionUtil.stacktraceToString(e));
|
log.info(ExceptionUtil.stacktraceToString(e));
|
||||||
} finally {
|
} finally {
|
||||||
IOUtils.closeQuietly(source);
|
source.close();
|
||||||
IOUtils.closeQuietly(addObj);
|
addObj.close();
|
||||||
IOUtils.closeQuietly(fos);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
long l1 = System.currentTimeMillis();
|
long l1 = System.currentTimeMillis();
|
||||||
|
Binary file not shown.
BIN
src/main/resources/model/评审承诺书确认记录表.docx
Normal file
BIN
src/main/resources/model/评审承诺书确认记录表.docx
Normal file
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user