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
eb9865b5
Commit
eb9865b5
authored
Aug 13, 2025
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ffca6161
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
169 additions
and
0 deletions
+169
-0
TaskInfoToPDFUtil.java
...ain/java/com/yiboshi/science/utils/TaskInfoToPDFUtil.java
+169
-0
No files found.
science-admin/src/main/java/com/yiboshi/science/utils/TaskInfoToPDFUtil.java
View file @
eb9865b5
...
@@ -73,6 +73,15 @@ public class TaskInfoToPDFUtil {
...
@@ -73,6 +73,15 @@ public class TaskInfoToPDFUtil {
//项目课题设置
//项目课题设置
projectSubInfo
(
document
,
dto
,
sfChinese
,
fsChinese
);
projectSubInfo
(
document
,
dto
,
sfChinese
,
fsChinese
);
// 添加项目绩效目标表
addProjectKPITable
(
document
,
dto
,
sfChinese
,
fsChinese
);
// 共同条款
addCommonTerms
(
document
,
dto
,
sfChinese
,
fsChinese
);
// 合同书各责任方
addResponsibleParty
(
document
,
dto
,
sfChinese
,
fsChinese
);
}
finally
{
}
finally
{
if
(
document
!=
null
&&
document
.
isOpen
())
{
if
(
document
!=
null
&&
document
.
isOpen
())
{
document
.
close
();
document
.
close
();
...
@@ -916,6 +925,166 @@ public class TaskInfoToPDFUtil {
...
@@ -916,6 +925,166 @@ public class TaskInfoToPDFUtil {
document
.
add
(
table
);
document
.
add
(
table
);
}
}
private
static
void
addProjectKPITable
(
Document
document
,
ComProjectTaskDTO
dto
,
BaseFont
bfChinese
,
BaseFont
fsChinese
)
throws
DocumentException
{
}
private
static
void
addCommonTerms
(
Document
document
,
ComProjectTaskDTO
dto
,
BaseFont
bfChinese
,
BaseFont
fsChinese
)
throws
DocumentException
{
document
.
newPage
();
Font
titleFont
=
new
Font
(
bfChinese
,
14
f
,
Font
.
BOLD
);
Font
normalFont
=
new
Font
(
bfChinese
,
10.5f
,
Font
.
NORMAL
);
Font
contentFont
=
new
Font
(
bfChinese
,
12
f
,
Font
.
NORMAL
);
// 添加标题
addSection
(
document
,
"十、共同条款"
,
titleFont
);
// 共同条款内容
String
[]
commonTerms
=
{
"第一条 签约各方本着平等互利、诚实信用的原则,依据《中华人民共和国合同法》和国家有关法律、法规,经协商一致,订立本合同,作为甲、乙双方在项目实施和管理过程中共同遵守的依据。"
,
"第二条 甲方权利和义务:\n1. 按合同约定拨付资金,协调相关工作。\n2. 按合同约定对乙方项目实施情况和资金到位使用情况进行监督检查。"
,
"第三条 乙方权利和义务:\n1. 落实自筹资金,为项目实施提供技术和条件保障。\n2. 规范财务管理,确保甲方拨付资金专款专用,设立专账进行明细核算,并与预算进行核对。\n3. 接受甲方对项目实施和资金使用情况的中期评估、绩效考核和现场检查。\n4. 在项目期间按要求向甲方提交年度项目及预算执行报告。\n5. 按规定申请项目验收或终止,配合甲方项目验收要求。"
,
"第四条 在合同履行过程中,如遇有关政策法规重大变化或不可抗力事件,甲方有权调整拨付资金的数量和时机。对分期拨付的项目,甲方有权根据项目研究进展、中期评估、乙方信用、审计结果和运行状况等情况,减少或停止后续拨付。如因非不可抗力因素导致项目未履行或未完成,或因乙方责任导致项目终止,甲方有权终止项目合同。甲方可收回未使用和不符合规定的财政资金。如乙方拒不退回资金,甲方可通过法律途径追回。"
,
"第五条 在合同履行过程中,一方发现可能导致项目整体或部分失败的情况时,应及时通知另一方,并采取适当措施减少损失。如未及时通知并采取适当措施,导致损失扩大的,应就扩大的损失承担责任。"
,
"第六条 在合同履行过程中,任何一方不得擅自变更或修改合同内容。"
,
"第七条 项目获得的科技成果(知识产权)归属、成果转让、实施技术成果产生的经济效益分享等事项,除双方另有约定外,按国家和云南省有关规定执行。如项目涉及多个(含两个)参与单位,乙方应在签订本合同前与涉及单位就合作任务和知识产权分配等事项签订相关合同或协议,并作为本合同附件。"
,
"第八条 乙方应依法依规、诚实守信地开展相关科研活动。如发生严重科研诚信失信行为,甲方将按照《云南省科技厅项目管理办法》《云南省科技计划项目资金管理办法》等相关规定处理。甲方有权按照相关规定将乙方和项目负责人的科研诚信信息向其他行政管理部门或社会公开。"
,
"第九条 涉及技术保密的项目,甲方和乙方应另行签订技术保密条款,作为本合同正式内容的组成部分,具有同等法律效力。"
,
"第十条 本合同未尽事宜,按国家和省有关科技项目和经费管理的相关规定执行。"
,
"第十一条 因本合同引起的争议,双方应协商解决。协商不成的,由甲方所在地法院管辖。"
,
"第十二条 本合同经甲方、乙方、丙方签字盖章后生效。甲方执两份,乙方、丙方各执一份,具有同等法律效力。"
,
"第十三条 各方补充条款:"
};
for
(
String
term
:
commonTerms
)
{
Paragraph
para
=
new
Paragraph
(
term
,
contentFont
);
para
.
setAlignment
(
Element
.
ALIGN_LEFT
);
para
.
setFirstLineIndent
(
28
f
);
// 设置首行缩进
para
.
setLeading
(
24
f
);
// 设置行间距
document
.
add
(
para
);
document
.
add
(
new
Paragraph
(
"\n"
));
// 添加段落间距
}
}
private
static
void
addResponsibleParty
(
Document
document
,
ComProjectTaskDTO
dto
,
BaseFont
bfChinese
,
BaseFont
fsChinese
)
throws
DocumentException
{
document
.
newPage
();
Font
titleFont
=
new
Font
(
bfChinese
,
14
f
,
Font
.
BOLD
);
Font
normalFont
=
new
Font
(
bfChinese
,
12
f
,
Font
.
NORMAL
);
Font
labelFont
=
new
Font
(
bfChinese
,
11
f
,
Font
.
NORMAL
);
// 添加标题
addSection
(
document
,
"十一、合同书各责任方"
,
titleFont
);
// 甲方部分
Paragraph
partyATitle
=
new
Paragraph
(
"甲方(项目下达单位)"
,
new
Font
(
bfChinese
,
13
f
,
Font
.
BOLD
));
partyATitle
.
setSpacingBefore
(
20
f
);
partyATitle
.
setSpacingAfter
(
15
f
);
document
.
add
(
partyATitle
);
// 创建甲方表格
PdfPTable
partyATable
=
new
PdfPTable
(
4
);
partyATable
.
setWidths
(
new
float
[]{
120
f
,
200
f
,
120
f
,
200
f
});
partyATable
.
setWidthPercentage
(
100
);
// 甲方经办人签字
addCell
(
partyATable
,
"经办人签字:"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyATable
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyATable
,
"年 月 日"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_CENTER
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyATable
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
// 甲方法定代表人签字
addCell
(
partyATable
,
"法定代表人(或授权代表):"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyATable
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyATable
,
"年 月 日"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_CENTER
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyATable
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
document
.
add
(
partyATable
);
// 乙方部分
Paragraph
partyBTitle
=
new
Paragraph
(
"乙方(项目承担单位)"
,
new
Font
(
bfChinese
,
13
f
,
Font
.
BOLD
));
partyBTitle
.
setSpacingBefore
(
30
f
);
partyBTitle
.
setSpacingAfter
(
15
f
);
document
.
add
(
partyBTitle
);
// 创建乙方表格 - 第一行:签字部分
PdfPTable
partyBTable1
=
new
PdfPTable
(
6
);
partyBTable1
.
setWidths
(
new
float
[]{
120
f
,
200
f
,
120
f
,
200
f
,
120
f
,
200
f
});
partyBTable1
.
setWidthPercentage
(
100
);
// 乙方法定代表人签字
addCell
(
partyBTable1
,
"法定代表人(或授权代表):"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
"年 月 日"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_CENTER
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
// 项目负责人签字
addCell
(
partyBTable1
,
"项目负责人(签字):"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
"年 月 日"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_CENTER
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
// 财务负责人签字
addCell
(
partyBTable1
,
"财务负责人(签字):"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
"年 月 日"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_CENTER
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable1
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
document
.
add
(
partyBTable1
);
// 创建乙方表格 - 第二行:银行信息
PdfPTable
partyBTable2
=
new
PdfPTable
(
4
);
partyBTable2
.
setWidths
(
new
float
[]{
120
f
,
200
f
,
120
f
,
200
f
});
partyBTable2
.
setWidthPercentage
(
100
);
// 银行信息
addCell
(
partyBTable2
,
"开户银行:"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable2
,
dto
.
getDepositBank
()
!=
null
?
dto
.
getDepositBank
()
:
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable2
,
"账号名称:"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable2
,
dto
.
getAppUnitName
()
!=
null
?
dto
.
getAppUnitName
()
:
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable2
,
"银行账号:"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable2
,
dto
.
getBankAccount
()
!=
null
?
dto
.
getBankAccount
()
:
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable2
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable2
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
document
.
add
(
partyBTable2
);
// 创建乙方表格 - 第三行:公章和日期
PdfPTable
partyBTable3
=
new
PdfPTable
(
4
);
partyBTable3
.
setWidths
(
new
float
[]{
120
f
,
200
f
,
120
f
,
200
f
});
partyBTable3
.
setWidthPercentage
(
100
);
// 公章和日期
addCell
(
partyBTable3
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable3
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable3
,
"(承担单位公章)"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_CENTER
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable3
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable3
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable3
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable3
,
"年 月 日"
,
null
,
null
,
labelFont
,
40
f
,
Element
.
ALIGN_CENTER
,
Element
.
ALIGN_MIDDLE
);
addCell
(
partyBTable3
,
""
,
null
,
null
,
normalFont
,
40
f
,
Element
.
ALIGN_LEFT
,
Element
.
ALIGN_MIDDLE
);
document
.
add
(
partyBTable3
);
}
private
static
String
numberTo
(
int
number
)
{
private
static
String
numberTo
(
int
number
)
{
char
[]
cs
=
"零一二三四五六七八九"
.
toCharArray
();
char
[]
cs
=
"零一二三四五六七八九"
.
toCharArray
();
String
temp
=
""
;
String
temp
=
""
;
...
...
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