Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
yn-health-science
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐俊
yn-health-science
Commits
9c32f97f
Commit
9c32f97f
authored
Sep 22, 2025
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5f40c5ee
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
ComProjectTaskServiceImpl.java
...boshi/science/service/impl/ComProjectTaskServiceImpl.java
+3
-0
TaskInfoToPDFUtil.java
...ain/java/com/yiboshi/science/utils/TaskInfoToPDFUtil.java
+17
-14
No files found.
science-admin/src/main/java/com/yiboshi/science/service/impl/ComProjectTaskServiceImpl.java
View file @
9c32f97f
...
@@ -67,6 +67,8 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
...
@@ -67,6 +67,8 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
private
ComProjectKpitService
comProjectKpitService
;
private
ComProjectKpitService
comProjectKpitService
;
@Autowired
@Autowired
private
SystemParameterService
systemParameterService
;
private
SystemParameterService
systemParameterService
;
@Autowired
private
ComBatchService
comBatchService
;
@Override
@Override
protected
void
setCriteriaForQuery
(
ComProjectTaskQueryVO
vo
,
QueryWrapper
<
ComProjectTaskQueryVO
>
criteria
)
{
protected
void
setCriteriaForQuery
(
ComProjectTaskQueryVO
vo
,
QueryWrapper
<
ComProjectTaskQueryVO
>
criteria
)
{
...
@@ -154,6 +156,7 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
...
@@ -154,6 +156,7 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
public
ComProjectTaskDTO
getTaskByProjId
(
String
projId
)
{
public
ComProjectTaskDTO
getTaskByProjId
(
String
projId
)
{
ComProjectTaskDTO
dto
=
ComProjectTaskDAO
.
getByProjId
(
projId
);
ComProjectTaskDTO
dto
=
ComProjectTaskDAO
.
getByProjId
(
projId
);
dto
.
setReportYear
(
DateUtils
.
getYear
());
BigDecimal
total
=
new
BigDecimal
(
0
);
BigDecimal
total
=
new
BigDecimal
(
0
);
BigDecimal
gov
=
new
BigDecimal
(
0
);
BigDecimal
gov
=
new
BigDecimal
(
0
);
BigDecimal
self
=
new
BigDecimal
(
0
);
BigDecimal
self
=
new
BigDecimal
(
0
);
...
...
science-admin/src/main/java/com/yiboshi/science/utils/TaskInfoToPDFUtil.java
View file @
9c32f97f
...
@@ -173,7 +173,7 @@ public class TaskInfoToPDFUtil {
...
@@ -173,7 +173,7 @@ public class TaskInfoToPDFUtil {
Font
normalFont
=
new
Font
(
bfChinese
,
10.5f
,
Font
.
NORMAL
);
Font
normalFont
=
new
Font
(
bfChinese
,
10.5f
,
Font
.
NORMAL
);
// 添加项目内容章节
// 添加项目内容章节
addSection
(
document
,
"一、
项目
基本情况"
,
titleFont
);
addSection
(
document
,
"一、
单位
基本情况"
,
titleFont
);
// 创建表格
// 创建表格
PdfPTable
table
=
new
PdfPTable
(
8
);
PdfPTable
table
=
new
PdfPTable
(
8
);
...
@@ -255,10 +255,10 @@ public class TaskInfoToPDFUtil {
...
@@ -255,10 +255,10 @@ public class TaskInfoToPDFUtil {
timeCell
.
setBorderColor
(
new
BaseColor
(
0
,
0
,
0
));
timeCell
.
setBorderColor
(
new
BaseColor
(
0
,
0
,
0
));
projTable
.
addCell
(
timeCell
);
projTable
.
addCell
(
timeCell
);
String
terms
=
"立项报告 份数 "
+
dto
.
getProjectReport
(
)
+
String
terms
=
"立项报告 份数 "
+
(
Objects
.
nonNull
(
dto
.
getProjectReport
())
?
dto
.
getProjectReport
()
:
"0"
)
+
" 进展报告 份数 "
+
dto
.
getProgressReport
(
)
+
" 进展报告 份数 "
+
(
Objects
.
nonNull
(
dto
.
getProgressReport
())
?
dto
.
getProgressReport
()
:
"0"
)
+
" 专题报告 份数 "
+
dto
.
getSpecialReport
(
)
+
" 专题报告 份数 "
+
(
Objects
.
nonNull
(
dto
.
getSpecialReport
())
?
dto
.
getSpecialReport
()
:
"0"
)
+
" 最终报告 份数 "
+
dto
.
getFinalReport
(
);
" 最终报告 份数 "
+
(
Objects
.
nonNull
(
dto
.
getFinalReport
())
?
dto
.
getFinalReport
()
:
"0"
);
Paragraph
para2
=
new
Paragraph
(
terms
,
normalFont
);
Paragraph
para2
=
new
Paragraph
(
terms
,
normalFont
);
para
.
setAlignment
(
Element
.
ALIGN_LEFT
);
para
.
setAlignment
(
Element
.
ALIGN_LEFT
);
PdfPCell
timeCell2
=
new
PdfPCell
(
para2
);
PdfPCell
timeCell2
=
new
PdfPCell
(
para2
);
...
@@ -346,7 +346,7 @@ public class TaskInfoToPDFUtil {
...
@@ -346,7 +346,7 @@ public class TaskInfoToPDFUtil {
addValueCell
(
table
,
"联系电话"
,
2
,
dto
.
getTelephone
(),
2
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addValueCell
(
table
,
"联系电话"
,
2
,
dto
.
getTelephone
(),
2
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addValueCell
(
table
,
"电子邮箱"
,
2
,
dto
.
getEmail
(),
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
.
setColspan
(
16
);
// 合并6行
cell
.
setHorizontalAlignment
(
Element
.
ALIGN_CENTER
);
cell
.
setHorizontalAlignment
(
Element
.
ALIGN_CENTER
);
cell
.
setVerticalAlignment
(
Element
.
ALIGN_MIDDLE
);
cell
.
setVerticalAlignment
(
Element
.
ALIGN_MIDDLE
);
...
@@ -391,11 +391,11 @@ public class TaskInfoToPDFUtil {
...
@@ -391,11 +391,11 @@ public class TaskInfoToPDFUtil {
addCell
(
table
,
""
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
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
,
"项目组人数"
,
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
.
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
.
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
,
"初级"
,
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
,
"0 人"
,
2
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
table
,
"--"
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
table
,
"--"
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
document
.
add
(
table
);
document
.
add
(
table
);
}
}
...
@@ -877,11 +877,11 @@ public class TaskInfoToPDFUtil {
...
@@ -877,11 +877,11 @@ public class TaskInfoToPDFUtil {
// Paragraph para = new Paragraph("\n", normalFont);
// Paragraph para = new Paragraph("\n", normalFont);
// para.setAlignment(Element.ALIGN_LEFT);
// para.setAlignment(Element.ALIGN_LEFT);
// document.add(para);
// document.add(para);
Paragraph
para1
=
new
Paragraph
(
"注:1.单位类型为项目承担单位、项目参加单位"
,
normalFont
);
Paragraph
para1
=
new
Paragraph
(
"注:1.单位类型为项目承担单位、项目参加单位
;
"
,
normalFont
);
para1
.
setAlignment
(
Element
.
ALIGN_LEFT
);
para1
.
setAlignment
(
Element
.
ALIGN_LEFT
);
para1
.
setFirstLineIndent
(
28
f
);
// 设置首行缩进
para1
.
setFirstLineIndent
(
28
f
);
// 设置首行缩进
document
.
add
(
para1
);
document
.
add
(
para1
);
Paragraph
para2
=
new
Paragraph
(
"2.任务分工的描述应该简洁,不超过300字"
,
normalFont
);
Paragraph
para2
=
new
Paragraph
(
"2.任务分工的描述应该简洁,不超过300字
。
"
,
normalFont
);
para2
.
setAlignment
(
Element
.
ALIGN_LEFT
);
para2
.
setAlignment
(
Element
.
ALIGN_LEFT
);
para2
.
setFirstLineIndent
(
49
f
);
// 设置首行缩进
para2
.
setFirstLineIndent
(
49
f
);
// 设置首行缩进
document
.
add
(
para2
);
document
.
add
(
para2
);
...
@@ -927,9 +927,11 @@ public class TaskInfoToPDFUtil {
...
@@ -927,9 +927,11 @@ public class TaskInfoToPDFUtil {
timePara
.
setAlignment
(
Element
.
ALIGN_CENTER
);
timePara
.
setAlignment
(
Element
.
ALIGN_CENTER
);
PdfPCell
timeCell
=
new
PdfPCell
(
timePara
);
PdfPCell
timeCell
=
new
PdfPCell
(
timePara
);
timeCell
.
setCellEvent
(
new
UniformBorderEvent
());
timeCell
.
setMinimumHeight
(
120
f
);
timeCell
.
setMinimumHeight
(
120
f
);
timeCell
.
setVerticalAlignment
(
Element
.
ALIGN_MIDDLE
);
timeCell
.
setVerticalAlignment
(
Element
.
ALIGN_MIDDLE
);
timeCell
.
setHorizontalAlignment
(
Element
.
ALIGN_CENTER
);
timeCell
.
setHorizontalAlignment
(
Element
.
ALIGN_CENTER
);
timeCell
.
setBorderColor
(
new
BaseColor
(
0
,
0
,
0
));
table
.
addCell
(
timeCell
);
table
.
addCell
(
timeCell
);
addCell
(
table
,
e
.
getTarget
(),
null
,
null
,
normalFont
,
120
f
,
Element
.
ALIGN_CENTER
,
Element
.
ALIGN_CENTER
);
addCell
(
table
,
e
.
getTarget
(),
null
,
null
,
normalFont
,
120
f
,
Element
.
ALIGN_CENTER
,
Element
.
ALIGN_CENTER
);
...
@@ -1454,7 +1456,8 @@ public class TaskInfoToPDFUtil {
...
@@ -1454,7 +1456,8 @@ public class TaskInfoToPDFUtil {
valueCell
.
setPadding
(
5
f
);
valueCell
.
setPadding
(
5
f
);
valueCell
.
setMinimumHeight
(
height
);
valueCell
.
setMinimumHeight
(
height
);
valueCell
.
setVerticalAlignment
(
vertical
);
valueCell
.
setVerticalAlignment
(
vertical
);
valueCell
.
setHorizontalAlignment
(
horizontal
);
// 设置边框宽度
valueCell
.
setHorizontalAlignment
(
horizontal
);
// 设置边框宽度
valueCell
.
setBorderColor
(
new
BaseColor
(
0
,
0
,
0
));
valueCell
.
setBorderColor
(
new
BaseColor
(
0
,
0
,
0
));
// valueCell.setBorderWidth(0.5f); // 设置边框宽度
// valueCell.setBorderWidth(0.5f); // 设置边框宽度
table
.
addCell
(
valueCell
);
table
.
addCell
(
valueCell
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment