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
8fedbbad
Commit
8fedbbad
authored
Sep 23, 2025
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8a63499d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
98 deletions
+61
-98
ComProjectTaskServiceImpl.java
...boshi/science/service/impl/ComProjectTaskServiceImpl.java
+35
-76
TaskInfoToPDFUtil.java
...ain/java/com/yiboshi/science/utils/TaskInfoToPDFUtil.java
+26
-22
No files found.
science-admin/src/main/java/com/yiboshi/science/service/impl/ComProjectTaskServiceImpl.java
View file @
8fedbbad
...
...
@@ -304,14 +304,45 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
List
<
ComFileDTO
>
fileList
=
ComFileService
.
getListByObjectId
(
dto
.
getId
(),
CommonEnum
.
fileType
.
projectTask
.
getCode
());
if
(
null
==
fileList
||
fileList
.
size
()
==
0
)
fileList
=
ComFileService
.
getListByObjectId
(
dto
.
getProjId
(),
CommonEnum
.
fileType
.
project
.
getCode
());
if
(
null
==
fileList
||
fileList
.
size
()
==
0
)
fileList
=
configureFileList
(
dto
.
getSystemType
());
else
fileList
=
checkNecessaryAttachmentFile
(
dto
.
getSystemType
(),
fileList
);
fileList
=
configureFileList
(
fileList
);
dto
.
setFileList
(
fileList
);
return
dto
;
}
private
List
<
ComFileDTO
>
configureFileList
(
List
<
ComFileDTO
>
list
)
{
List
<
ComFileDTO
>
fileList
=
new
ArrayList
<>();
if
(
null
!=
list
&&
list
.
size
()
>
0
)
{
fileList
=
list
.
stream
().
filter
(
e
->
null
!=
e
.
getFileExplain
()
&&
(
e
.
getFileExplain
().
equals
(
"课题组成员签名表"
)
||
e
.
getFileExplain
().
equals
(
"项目资金预算编制说明"
))).
collect
(
Collectors
.
toList
());
}
if
(
null
==
fileList
||
fileList
.
size
()
==
0
)
{
List
<
SystemParameter
>
parameterList
=
systemParameterService
.
getListByType
(
70
);
List
<
ComFileDTO
>
finalFileList
=
fileList
;
parameterList
.
forEach
(
e
->
{
finalFileList
.
add
(
configureFile
(
e
.
getName
(),
e
.
getDisplayOrder
(),
e
.
getIsRequired
()));
});
}
fileList
.
forEach
(
p
->
{
p
.
setRequired
(
true
);
p
.
setIsRequired
(
true
);
});
return
fileList
;
}
private
ComFileDTO
configureFile
(
String
FileExplain
,
int
showIndex
,
Boolean
isRequired
)
{
ComFileDTO
file
=
new
ComFileDTO
();
file
.
setFileType
(
CommonEnum
.
fileType
.
project
.
getCode
());
file
.
setFileExplain
(
FileExplain
);
file
.
setShowIndex
(
showIndex
);
file
.
setRequired
(
true
);
if
(!
isRequired
.
equals
(
null
))
file
.
setIsRequired
(
isRequired
);
else
file
.
setIsRequired
(
false
);
return
file
;
}
private
void
LoadProjectKPIInfo
(
ComProjectTaskDTO
dto
)
{
List
<
ComProjectKpitDTO
>
ProjectKPIList
=
comProjectKpitDetailService
.
getProjectKpitDetailStatistic
(
dto
.
getId
());
if
(
null
==
ProjectKPIList
||
ProjectKPIList
.
size
()
==
0
)
...
...
@@ -374,78 +405,6 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
dto
.
setProjectKPI
(
kpiDTO
);
}
private
List
<
ComFileDTO
>
configureFileList
(
Integer
systemType
)
{
List
<
ComFileDTO
>
fileList
=
new
ArrayList
<>();
List
<
SystemParameter
>
parameterList
;
//健康领域科技项目
if
(
systemType
==
CommonEnum
.
systemType
.
num
.
getCode
())
parameterList
=
systemParameterService
.
getListByType
(
61
);
else
//临床科技项目
parameterList
=
systemParameterService
.
getListByType
(
13
);
parameterList
.
forEach
(
e
->
{
fileList
.
add
(
configureFile
(
e
.
getName
(),
e
.
getDisplayOrder
(),
e
.
getIsRequired
()));
});
return
fileList
;
}
private
ComFileDTO
configureFile
(
String
FileExplain
,
int
showIndex
,
Boolean
isRequired
)
{
ComFileDTO
file
=
new
ComFileDTO
();
file
.
setFileType
(
CommonEnum
.
fileType
.
project
.
getCode
());
file
.
setFileExplain
(
FileExplain
);
file
.
setShowIndex
(
showIndex
);
file
.
setRequired
(
true
);
if
(!
isRequired
.
equals
(
null
))
file
.
setIsRequired
(
isRequired
);
else
file
.
setIsRequired
(
false
);
return
file
;
}
public
List
<
ComFileDTO
>
checkNecessaryAttachmentFile
(
Integer
systemType
,
List
<
ComFileDTO
>
fileList
)
{
List
<
SystemParameter
>
parameterList
;
//健康领域科技项目
if
(
systemType
==
CommonEnum
.
systemType
.
num
.
getCode
())
{
parameterList
=
systemParameterService
.
getListByType
(
61
);
SystemParameter
pa
=
new
SystemParameter
();
pa
.
setName
(
"经费预算书"
);
pa
.
setIsRequired
(
true
);
pa
.
setDisplayOrder
(
4
);
parameterList
.
add
(
4
,
pa
);
}
else
//临床科技项目
parameterList
=
systemParameterService
.
getListByType
(
13
);
AtomicInteger
allCount
=
new
AtomicInteger
(
parameterList
.
size
()
+
1
);
fileList
.
forEach
(
e
->
{
AtomicInteger
num
=
new
AtomicInteger
(
1
);
int
i
=
num
.
get
();
parameterList
.
forEach
(
p
->
{
if
(
null
!=
e
.
getFileExplain
()
&&
e
.
getFileExplain
().
equals
(
p
.
getName
()))
{
e
.
setShowIndex
(
p
.
getDisplayOrder
());
e
.
setRequired
(
true
);
if
(
e
.
getFileExplain
().
equals
(
"课题组成员签名表"
))
e
.
setIsRequired
(
true
);
num
.
incrementAndGet
();
}
});
if
(
i
==
num
.
get
())
{
e
.
setShowIndex
(
allCount
.
get
());
e
.
setRequired
(
false
);
allCount
.
incrementAndGet
();
}
});
parameterList
.
forEach
(
p
->
{
List
<
ComFileDTO
>
findList
=
fileList
.
stream
().
filter
(
e
->
null
!=
e
.
getFileExplain
()
&&
e
.
getFileExplain
().
equals
(
p
.
getName
())).
collect
(
Collectors
.
toList
());
if
(
findList
.
size
()
==
0
)
{
ComFileDTO
fileDTO
=
configureFile
(
p
.
getName
(),
p
.
getDisplayOrder
(),
p
.
getIsRequired
());
fileList
.
add
(
fileDTO
);
}
});
fileList
.
sort
(
Comparator
.
comparingInt
(
ComFileDTO:
:
getShowIndex
));
return
fileList
;
}
@Transactional
public
String
save
(
ComProjectTaskDTO
dto
)
{
...
...
science-admin/src/main/java/com/yiboshi/science/utils/TaskInfoToPDFUtil.java
View file @
8fedbbad
...
...
@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -196,7 +197,7 @@ public class TaskInfoToPDFUtil {
addValueCell
(
table
,
"邮编"
,
null
,
dto
.
getPostCode
(),
null
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
table
,
"法定代表人"
,
null
,
dto
.
getLegalPerson
(),
2
,
normalFont
,
null
,
null
,
null
);
addCell
(
table
,
"职工总数 "
+
dto
.
getWork
Count
()
+
" (人)"
,
2
,
null
,
normalFont
,
null
,
null
,
null
);
addCell
(
table
,
"职工总数 "
+
dto
.
getWork
force
()
+
" (人)"
,
2
,
null
,
normalFont
,
null
,
null
,
null
);
addCell
(
table
,
"其中专科以上人员 "
+
dto
.
getSpecializedPersonnel
()
+
" (人)"
,
4
,
null
,
normalFont
,
null
,
null
,
null
);
addCell
(
table
,
"研究开发人员 "
+
dto
.
getResearchPersonnel
()
+
" (人)"
,
2
,
null
,
normalFont
,
null
,
null
,
null
);
...
...
@@ -391,11 +392,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 人"
,
2
,
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
);
}
...
...
@@ -976,9 +977,9 @@ public class TaskInfoToPDFUtil {
addCell
(
table
,
e
.
getProjName
(),
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
table
,
e
.
getUndertakingUnit
(),
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
table
,
e
.
getDirector
(),
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
table
,
e
.
getTotalBudget
(),
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
table
,
e
.
getGovBudget
(),
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
table
,
e
.
getSelfBudget
(),
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
table
,
e
.
getTotalBudget
()
!=
null
?
e
.
getTotalBudget
().
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
()
:
""
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
table
,
e
.
getGovBudget
()
!=
null
?
e
.
getGovBudget
().
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
()
:
""
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
table
,
e
.
getSelfBudget
()
!=
null
?
e
.
getSelfBudget
().
setScale
(
2
,
RoundingMode
.
HALF_UP
).
toString
()
:
""
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
}
document
.
add
(
table
);
}
...
...
@@ -1247,21 +1248,24 @@ public class TaskInfoToPDFUtil {
// 添加标题
addSection
(
document
,
"十、共同条款"
,
titleFont
);
Paragraph
instructionTitle
=
new
Paragraph
(
"合同书各责任方"
,
new
Font
(
bfChinese
,
14
,
Font
.
BOLD
));
instructionTitle
.
setAlignment
(
Element
.
ALIGN_CENTER
);
document
.
add
(
instructionTitle
);
// 共同条款内容
String
[]
commonTerms
=
{
"第一条
签约各方本着平等互利、诚实信用的原则,依据《中华人民共和国合同法》和国家有关法律、法规,经协商一致,订立本合同,作为甲、乙双方在项目实施和
管理过程中共同遵守的依据。"
,
"第二条 甲方
权利和义务:1. 按合同约定拨付资金,协调相关工作。2. 按合同约定对乙方项目实施情况和资金到位使用情况进行监督
检查。"
,
"第三条 乙方
权利和义务:1. 落实自筹资金,为项目实施提供技术和条件保障。2. 规范财务管理,确保甲方拨付资金专款专用,设立专账进行明细核算,并与预算进行核对。3. 接受甲方对项目实施和资金使用情况的中期评估、绩效考核和现场检查。4. 在项目期间按要求向甲方提交年度项目及预算执行报告。5. 按规定申请项目验收或终止,配合甲方项目验收要求
。"
,
"第四条 在
合同履行过程中,如遇有关政策法规重大变化或不可抗力事件,甲方有权调整拨付资金的数量和时机。对分期拨付的项目,甲方有权根据项目研究进展、中期评估、乙方信用、审计结果和运行状况等情况,减少或停止后续拨付。如因非不可抗力因素导致项目未履行或未完成,或因乙方责任导致项目终止,甲方有权终止项目合同。甲方可收回未使用和不符合规定的财政资金。如乙方拒不退回资金,甲方可通过法律途径追回
。"
,
"第五条 在
合同履行过程中,一方发现可能导致项目整体或部分失败的情况时,应及时通知另一方,并采取适当措施减少损失。如未及时通知并采取适当措施,导致损失扩大的,应
就扩大的损失承担责任。"
,
"第六条 在
合同履行过程中,任何一方不得擅自变更或修改合同内容
。"
,
"第七条
项目获得的科技成果(知识产权)归属、成果转让、实施技术成果产生的经济效益分享等事项,除双方另有约定外,按国家和云南省有关规定执行。如项目涉及多个(含两个)参与单位,乙方应在签订本合同前与涉及单位就合作任务和知识产权分配等事项签订相关合同或协议,并作为本合同
附件。"
,
"第八条 乙方应
依法依规、诚实守信地开展相关科研活动。如发生严重科研诚信失信行为,甲方将按照《云南省科技厅项目管理办法》《云南省科技计划项目资金管理办法》等相关规定处理。甲方有权按照相关规定将乙方和项目负责人的科研诚信信息向其他行政管理部门或社会公开
。"
,
"第九条
涉及技术保密的项目,甲方和乙方应另行签订技术保密条款,作为本合同正式内容的组成部分,具有同等法律
效力。"
,
"第十条
本合同未尽事宜,按国家和省有关科技项目和经费管理的相关
规定执行。"
,
"第十一条
因本合同引起的争议,双方应协商解决。协商不成的,由甲方所在地法院
管辖。"
,
"第十二条 本合同经甲
方、乙方、丙方签字盖章后生效。甲方执两份,乙方、丙方各执一份,
具有同等法律效力。"
,
"第十三条
各方补充条款。
"
"第一条
合同签约各方根据《中华人民共和国合同法》及国家有关法规和规定,经协商一致,特订立本合同,作为甲乙两方在项目实施
管理过程中共同遵守的依据。"
,
"第二条 甲方
的权利义务:1.按合同书规定进行经费核拨及有关工作协调。2.按照合同约定,对乙方项目的实施情况和经费到位、使用情况进行监督、
检查。"
,
"第三条 乙方
的权利义务:1.落实自筹经费,为项目实施提供技术与条件保障。2.规范财务管理,按合同书规定,对甲方核拨的经费做到专款专用,设置会计明细帐单独核算,并结合预算据实核算。3.甲方对乙方项目实施情况及经费使用情况进行中期评估、绩效评价和巡视检查。4.按要求于项目实施期内按年度向甲方报送项目及预算执行情况报告。5.按规定提出验收或终止项目的申请,并按甲方要求做好项目验收工作
。"
,
"第四条 在
履行本合同的过程中,如出现相关政策法规重大改变等不可抗力情况,甲方有权对所核拨经费的数量和时间进行相应调整。对分期拨款项目,根据项目研究进展或中期评估、乙方信用、审计及经营等情况,甲方有权减拨或停拨后续经费。因非不可抗力因素导致的项目未履行或未履行完毕,或因乙方责任造成项目终止的,甲方有权终止项目合同,收回尚未使用和使用不符合规定的财政经费,乙方拒不退回经费的,甲方通过司法途径收回财政经费
。"
,
"第五条 在
履行本合同的过程中,当事人一方发现可能导致项目整体或部分失败的情形时,应及时通知另一方,并采取适当措施减少损失,没有及时通知并采取适当措施,致使损失扩大的,应当
就扩大的损失承担责任。"
,
"第六条 在
履行本合同过程中,合同内容各方不得擅自变更和修改
。"
,
"第七条
实施项目所获得的科技成果(知识产权)归属、成果转让和实施技术成果所产生的经济利益的分享,除双方另有约定外,按照国家和云南省有关规定执行。项目如涉及多家(包含两家)单位参加,乙方应在签订本合同前与有关单位就合作任务和知识产权分配等问题签订有关合同或协议,作为本合同的
附件。"
,
"第八条 乙方应
守法诚信开展相关科研活动,如发生严重不良科研诚信行为,甲方将参照《云南省科技厅科技计划项目管理办法》及《云南省科技计划项目资金管理办法》有关规定处理。甲方有权就乙方及项目负责人的科研诚信信息,按照有关规定向其他行政管理部门或社会公布
。"
,
"第九条
属技术保密的项目,甲乙双方应另行订立技术保密条款,作为本合同正式内容的一部分,与本合同具有同等
效力。"
,
"第十条
有关合同的未尽事宜,按照国家、省有关科技计划与经费管理的
规定执行。"
,
"第十一条
本合同若发生争议,双方应协商解决,协商不成的,由甲方所在地法院进行
管辖。"
,
"第十二条 本合同经甲
乙丙三方签字盖章后生效,甲方执两份,乙方、丙方各执一份,均
具有同等法律效力。"
,
"第十三条
有关各方补充条款(作为本合同正式内容的一部分,与本合同具有同等效力)
"
};
for
(
String
term
:
commonTerms
)
{
...
...
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