Commit 9c32f97f authored by wangxl's avatar wangxl

1

parent 5f40c5ee
......@@ -67,6 +67,8 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
private ComProjectKpitService comProjectKpitService;
@Autowired
private SystemParameterService systemParameterService;
@Autowired
private ComBatchService comBatchService;
@Override
protected void setCriteriaForQuery(ComProjectTaskQueryVO vo, QueryWrapper<ComProjectTaskQueryVO> criteria) {
......@@ -154,6 +156,7 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
public ComProjectTaskDTO getTaskByProjId(String projId) {
ComProjectTaskDTO dto = ComProjectTaskDAO.getByProjId(projId);
dto.setReportYear(DateUtils.getYear());
BigDecimal total = new BigDecimal(0);
BigDecimal gov = new BigDecimal(0);
BigDecimal self = new BigDecimal(0);
......
......@@ -173,7 +173,7 @@ public class TaskInfoToPDFUtil {
Font normalFont = new Font(bfChinese, 10.5f, Font.NORMAL);
// 添加项目内容章节
addSection(document, "一、项目基本情况", titleFont);
addSection(document, "一、单位基本情况", titleFont);
// 创建表格
PdfPTable table = new PdfPTable(8);
......@@ -255,10 +255,10 @@ public class TaskInfoToPDFUtil {
timeCell.setBorderColor(new BaseColor(0, 0, 0));
projTable.addCell(timeCell);
String terms = "立项报告 份数 " + dto.getProjectReport() +
" 进展报告 份数 " + dto.getProgressReport() +
" 专题报告 份数 " + dto.getSpecialReport() +
" 最终报告 份数 " + dto.getFinalReport();
String terms = "立项报告 份数 " + (Objects.nonNull(dto.getProjectReport()) ? dto.getProjectReport() : "0") +
" 进展报告 份数 " + (Objects.nonNull(dto.getProgressReport()) ? dto.getProgressReport() : "0") +
" 专题报告 份数 " + (Objects.nonNull(dto.getSpecialReport()) ? dto.getSpecialReport() : "0") +
" 最终报告 份数 " + (Objects.nonNull(dto.getFinalReport()) ? dto.getFinalReport() : "0");
Paragraph para2 = new Paragraph(terms, normalFont);
para.setAlignment(Element.ALIGN_LEFT);
PdfPCell timeCell2 = new PdfPCell(para2);
......@@ -346,7 +346,7 @@ public class TaskInfoToPDFUtil {
addValueCell(table, "联系电话", 2, dto.getTelephone(), 2, normalFont, null, null, Element.ALIGN_CENTER);
addValueCell(table, "电子邮箱", 2, dto.getEmail(), 2, normalFont, null, null, Element.ALIGN_CENTER);
PdfPCell cell = new PdfPCell(new Phrase("项目负责人", new Font(bfChinese, 10.5f, Font.BOLD)));
PdfPCell cell = new PdfPCell(new Phrase("项目组主要成员", new Font(bfChinese, 10.5f, Font.BOLD)));
cell.setColspan(16);// 合并6行
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
......@@ -391,11 +391,11 @@ public class TaskInfoToPDFUtil {
addCell(table, "", null, null, normalFont, null, null, Element.ALIGN_CENTER);
}
addValueCell(table, "项目组人数", 2, Objects.nonNull(dto.getMemCount()) ? dto.getMemCount().toString() : "0" + "人", null, normalFont, null, null, Element.ALIGN_CENTER);
addValueCell(table, "高级", null, Objects.nonNull(dto.getMemHighCount()) ? dto.getMemHighCount().toString() : "0" + "人", 2, normalFont, null, null, Element.ALIGN_CENTER);
addValueCell(table, "中级", null, Objects.nonNull(dto.getMemMiddleCount()) ? dto.getMemMiddleCount().toString() : "0" + "人", 2, normalFont, null, null, Element.ALIGN_CENTER);
addValueCell(table, "初级", null, Objects.nonNull(dto.getMemLowCount()) ? dto.getMemLowCount().toString() : "0" + "人", null, normalFont, null, null, Element.ALIGN_CENTER);
addValueCell(table, "其他", 2, 0 + "人", null, normalFont, null, null, Element.ALIGN_CENTER);
addValueCell(table, "项目组人数", 2, Objects.nonNull(dto.getMemCount()) ? dto.getMemCount().toString()+ "人" : "0" + "人", null, normalFont, null, null, Element.ALIGN_CENTER);
addValueCell(table, "高级", null, Objects.nonNull(dto.getMemHighCount()) ? dto.getMemHighCount().toString() + "人": "0" + "人", 2, normalFont, null, null, Element.ALIGN_CENTER);
addValueCell(table, "中级", null, Objects.nonNull(dto.getMemMiddleCount()) ? dto.getMemMiddleCount().toString()+ "人" : "0" + "人", 2, normalFont, null, null, Element.ALIGN_CENTER);
addValueCell(table, "初级", null, Objects.nonNull(dto.getMemLowCount()) ? dto.getMemLowCount().toString()+ "人" : "0" + "人", null, normalFont, null, null, Element.ALIGN_CENTER);
addValueCell(table, "其他", 2, "0 人", 2, normalFont, null, null, Element.ALIGN_CENTER);
addCell(table, "--", null, null, normalFont, null, null, Element.ALIGN_CENTER);
document.add(table);
}
......@@ -877,11 +877,11 @@ public class TaskInfoToPDFUtil {
// Paragraph para = new Paragraph("\n", normalFont);
// para.setAlignment(Element.ALIGN_LEFT);
// document.add(para);
Paragraph para1 = new Paragraph("注:1.单位类型为项目承担单位、项目参加单位", normalFont);
Paragraph para1 = new Paragraph("注:1.单位类型为项目承担单位、项目参加单位", normalFont);
para1.setAlignment(Element.ALIGN_LEFT);
para1.setFirstLineIndent(28f); // 设置首行缩进
document.add(para1);
Paragraph para2 = new Paragraph("2.任务分工的描述应该简洁,不超过300字", normalFont);
Paragraph para2 = new Paragraph("2.任务分工的描述应该简洁,不超过300字", normalFont);
para2.setAlignment(Element.ALIGN_LEFT);
para2.setFirstLineIndent(49f); // 设置首行缩进
document.add(para2);
......@@ -927,9 +927,11 @@ public class TaskInfoToPDFUtil {
timePara.setAlignment(Element.ALIGN_CENTER);
PdfPCell timeCell = new PdfPCell(timePara);
timeCell.setCellEvent(new UniformBorderEvent());
timeCell.setMinimumHeight(120f);
timeCell.setVerticalAlignment(Element.ALIGN_MIDDLE);
timeCell.setHorizontalAlignment(Element.ALIGN_CENTER);
timeCell.setBorderColor(new BaseColor(0, 0, 0));
table.addCell(timeCell);
addCell(table, e.getTarget(), null, null, normalFont, 120f, Element.ALIGN_CENTER, Element.ALIGN_CENTER);
......@@ -1454,7 +1456,8 @@ public class TaskInfoToPDFUtil {
valueCell.setPadding(5f);
valueCell.setMinimumHeight(height);
valueCell.setVerticalAlignment(vertical);
valueCell.setHorizontalAlignment(horizontal);// 设置边框宽度
valueCell.setHorizontalAlignment(horizontal);
// 设置边框宽度
valueCell.setBorderColor(new BaseColor(0, 0, 0));
// valueCell.setBorderWidth(0.5f); // 设置边框宽度
table.addCell(valueCell);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment