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
5f40c5ee
Commit
5f40c5ee
authored
Sep 16, 2025
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
172c6b69
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
34 deletions
+42
-34
ComProjectTaskController.java
...com/yiboshi/science/rest/v1/ComProjectTaskController.java
+4
-0
ComProjectTaskServiceImpl.java
...boshi/science/service/impl/ComProjectTaskServiceImpl.java
+7
-2
TaskInfoToPDFUtil.java
...ain/java/com/yiboshi/science/utils/TaskInfoToPDFUtil.java
+30
-31
ComProjectTaskDAO.xml
...nce-admin/src/main/resources/mapper/ComProjectTaskDAO.xml
+1
-1
No files found.
science-admin/src/main/java/com/yiboshi/science/rest/v1/ComProjectTaskController.java
View file @
5f40c5ee
...
@@ -10,6 +10,7 @@ import com.yiboshi.science.entity.ComProjectTask;
...
@@ -10,6 +10,7 @@ import com.yiboshi.science.entity.ComProjectTask;
import
com.yiboshi.science.entity.SelectListItem
;
import
com.yiboshi.science.entity.SelectListItem
;
import
com.yiboshi.science.entity.SystemParameter
;
import
com.yiboshi.science.entity.SystemParameter
;
import
com.yiboshi.science.enumeration.CommonEnum
;
import
com.yiboshi.science.enumeration.CommonEnum
;
import
com.yiboshi.science.param.dto.ComFileDTO
;
import
com.yiboshi.science.param.dto.ComProjectTaskDTO
;
import
com.yiboshi.science.param.dto.ComProjectTaskDTO
;
import
com.yiboshi.science.param.dto.DataStatisticsDTO
;
import
com.yiboshi.science.param.dto.DataStatisticsDTO
;
import
com.yiboshi.science.param.query.ComProjectTaskQueryVO
;
import
com.yiboshi.science.param.query.ComProjectTaskQueryVO
;
...
@@ -28,6 +29,7 @@ import javax.servlet.ServletOutputStream;
...
@@ -28,6 +29,7 @@ import javax.servlet.ServletOutputStream;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* 功能:任务书表 接口
* 功能:任务书表 接口
...
@@ -152,6 +154,8 @@ public class ComProjectTaskController extends BaseController<ComProjectTaskServi
...
@@ -152,6 +154,8 @@ public class ComProjectTaskController extends BaseController<ComProjectTaskServi
public
void
export
(
@PathVariable
String
id
)
throws
DocumentException
,
IOException
{
public
void
export
(
@PathVariable
String
id
)
throws
DocumentException
,
IOException
{
try
{
try
{
ComProjectTaskDTO
dto
=
ComProjectTaskService
.
getTaskByProjId
(
id
);
ComProjectTaskDTO
dto
=
ComProjectTaskService
.
getTaskByProjId
(
id
);
List
<
ComFileDTO
>
fileList
=
dto
.
getFileList
().
stream
().
filter
(
s
->
s
.
getFileExplain
().
equals
(
"课题组成员签名表"
)||
s
.
getFileExplain
().
equals
(
"经费预算书"
)).
collect
(
Collectors
.
toList
());
dto
.
setFileList
(
fileList
);
List
<
SystemParameter
>
list
=
systemParameterService
.
getListByType
(
67
);
List
<
SystemParameter
>
list
=
systemParameterService
.
getListByType
(
67
);
// WordUtils.getHtmlContent(dto, "C:\\Users\\kylin\\Desktop\\导出Pdf\\output.docx");
// WordUtils.getHtmlContent(dto, "C:\\Users\\kylin\\Desktop\\导出Pdf\\output.docx");
// 生成PDF文件字节数组
// 生成PDF文件字节数组
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/ComProjectTaskServiceImpl.java
View file @
5f40c5ee
...
@@ -399,9 +399,14 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
...
@@ -399,9 +399,14 @@ public class ComProjectTaskServiceImpl extends BaseServiceImpl<ComProjectTaskDAO
public
List
<
ComFileDTO
>
checkNecessaryAttachmentFile
(
Integer
systemType
,
List
<
ComFileDTO
>
fileList
)
{
public
List
<
ComFileDTO
>
checkNecessaryAttachmentFile
(
Integer
systemType
,
List
<
ComFileDTO
>
fileList
)
{
List
<
SystemParameter
>
parameterList
;
List
<
SystemParameter
>
parameterList
;
//健康领域科技项目
//健康领域科技项目
if
(
systemType
==
CommonEnum
.
systemType
.
num
.
getCode
())
if
(
systemType
==
CommonEnum
.
systemType
.
num
.
getCode
())
{
parameterList
=
systemParameterService
.
getListByType
(
61
);
parameterList
=
systemParameterService
.
getListByType
(
61
);
else
//临床科技项目
SystemParameter
pa
=
new
SystemParameter
();
pa
.
setName
(
"经费预算书"
);
pa
.
setIsRequired
(
true
);
pa
.
setDisplayOrder
(
4
);
parameterList
.
add
(
4
,
pa
);
}
else
//临床科技项目
parameterList
=
systemParameterService
.
getListByType
(
13
);
parameterList
=
systemParameterService
.
getListByType
(
13
);
AtomicInteger
allCount
=
new
AtomicInteger
(
parameterList
.
size
()
+
1
);
AtomicInteger
allCount
=
new
AtomicInteger
(
parameterList
.
size
()
+
1
);
...
...
science-admin/src/main/java/com/yiboshi/science/utils/TaskInfoToPDFUtil.java
View file @
5f40c5ee
...
@@ -128,7 +128,7 @@ public class TaskInfoToPDFUtil {
...
@@ -128,7 +128,7 @@ public class TaskInfoToPDFUtil {
document
.
add
(
title
);
document
.
add
(
title
);
document
.
add
(
new
Paragraph
(
"\n\n\n\n\n\n"
));
document
.
add
(
new
Paragraph
(
"\n\n\n\n\n\n"
));
Font
labelFont
=
new
Font
(
fs
Chinese
,
15
,
Font
.
NORMAL
);
Font
labelFont
=
new
Font
(
bf
Chinese
,
15
,
Font
.
NORMAL
);
// 创建表格
// 创建表格
PdfPTable
table
=
new
PdfPTable
(
5
);
PdfPTable
table
=
new
PdfPTable
(
5
);
table
.
setWidths
(
new
float
[]{
70
f
,
15
f
,
15
f
,
50
f
,
210
f
});
table
.
setWidths
(
new
float
[]{
70
f
,
15
f
,
15
f
,
50
f
,
210
f
});
...
@@ -137,14 +137,14 @@ public class TaskInfoToPDFUtil {
...
@@ -137,14 +137,14 @@ public class TaskInfoToPDFUtil {
addTablePageCell
(
table
,
"项目名称:"
,
null
,
dto
.
getProjName
(),
4
,
labelFont
);
addTablePageCell
(
table
,
"项目名称:"
,
null
,
dto
.
getProjName
(),
4
,
labelFont
);
addTablePageCell
(
table
,
"项目下达单位(甲方):"
,
4
,
dto
.
getAppUnitName
(),
null
,
labelFont
);
addTablePageCell
(
table
,
"项目下达单位(甲方):"
,
4
,
dto
.
getAppUnitName
(),
null
,
labelFont
);
addTablePageCell
(
table
,
"项目承担单位(乙方):"
,
4
,
dto
.
getAppUnitName
(),
null
,
labelFont
);
addTablePageCell
(
table
,
"项目承担单位(乙方):"
,
4
,
dto
.
getAppUnitName
(),
null
,
labelFont
);
addTablePageCell
(
table
,
"项目负责人:"
,
2
,
dto
.
getAppPersonName
(),
3
,
labelFont
);
addTablePageCell
(
table
,
"项目负责人:"
,
2
,
dto
.
getAppPersonName
()
+
" 电话:"
+
dto
.
getMobile
()
,
3
,
labelFont
);
addTablePageCell
(
table
,
"项目起止年限:"
,
3
,
fd
.
format
(
dto
.
getStartDate
())
+
" 至 "
+
fd
.
format
(
dto
.
getEndDate
()),
2
,
labelFont
);
addTablePageCell
(
table
,
"项目起止年限:"
,
3
,
fd
.
format
(
dto
.
getStartDate
())
+
" 至 "
+
fd
.
format
(
dto
.
getEndDate
()),
2
,
labelFont
);
document
.
add
(
table
);
document
.
add
(
table
);
}
}
private
static
void
fillInInstructions
(
Document
document
,
BaseFont
bfChinese
,
BaseFont
fsChinese
)
throws
DocumentException
{
private
static
void
fillInInstructions
(
Document
document
,
BaseFont
bfChinese
,
BaseFont
fsChinese
)
throws
DocumentException
{
document
.
newPage
();
document
.
newPage
();
Paragraph
instructionTitle
=
new
Paragraph
(
"填写说明"
,
new
Font
(
fs
Chinese
,
14
,
Font
.
BOLD
));
Paragraph
instructionTitle
=
new
Paragraph
(
"填写说明"
,
new
Font
(
bf
Chinese
,
14
,
Font
.
BOLD
));
instructionTitle
.
setAlignment
(
Element
.
ALIGN_CENTER
);
instructionTitle
.
setAlignment
(
Element
.
ALIGN_CENTER
);
document
.
add
(
instructionTitle
);
document
.
add
(
instructionTitle
);
// 添加填写说明内容
// 添加填写说明内容
...
@@ -185,7 +185,7 @@ public class TaskInfoToPDFUtil {
...
@@ -185,7 +185,7 @@ public class TaskInfoToPDFUtil {
table
.
isInline
();
table
.
isInline
();
// 添加表格内容
// 添加表格内容
addValueCell
(
table
,
"单位名称
:
"
,
null
,
dto
.
getAppUnitName
(),
7
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
table
,
"单位名称"
,
null
,
dto
.
getAppUnitName
(),
7
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
table
,
"注册单位类型"
,
null
,
"医疗机构"
,
4
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
table
,
"注册单位类型"
,
null
,
"医疗机构"
,
4
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
table
,
"组织机构代码/统一社会信用代码"
,
2
,
dto
.
getOrganizationCode
(),
null
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
table
,
"组织机构代码/统一社会信用代码"
,
2
,
dto
.
getOrganizationCode
(),
null
,
normalFont
,
null
,
null
,
null
);
...
@@ -217,14 +217,14 @@ public class TaskInfoToPDFUtil {
...
@@ -217,14 +217,14 @@ public class TaskInfoToPDFUtil {
// 设置表格默认边框宽度
// 设置表格默认边框宽度
projTable
.
getDefaultCell
().
setBorderWidth
(
0.5f
);
projTable
.
getDefaultCell
().
setBorderWidth
(
0.5f
);
addValueCell
(
projTable
,
"项目编号
:
"
,
2
,
dto
.
getProjNo
(),
8
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"项目编号"
,
2
,
dto
.
getProjNo
(),
8
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"项目名称"
,
2
,
dto
.
getProjName
(),
8
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"项目名称"
,
2
,
dto
.
getProjName
(),
8
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"所属我省重点领域"
,
2
,
dto
.
getKeyAreas
(),
8
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"所属我省重点领域"
,
2
,
dto
.
getKeyAreas
(),
8
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"项目开始时间"
,
2
,
sdf
.
format
(
dto
.
getStartDate
()),
2
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"项目开始时间"
,
2
,
fd
.
format
(
dto
.
getStartDate
()),
2
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"项目结束时间"
,
3
,
sdf
.
format
(
dto
.
getEndDate
()),
3
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"项目结束时间"
,
3
,
fd
.
format
(
dto
.
getEndDate
()),
3
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"项目负责人"
,
2
,
dto
.
getAppUnitName
(),
2
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"项目负责人"
,
2
,
dto
.
getAppUnitName
(),
2
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"联系电话"
,
3
,
dto
.
getMobile
(),
3
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"联系电话"
,
3
,
dto
.
getMobile
(),
3
,
normalFont
,
null
,
null
,
null
);
...
@@ -239,10 +239,10 @@ public class TaskInfoToPDFUtil {
...
@@ -239,10 +239,10 @@ public class TaskInfoToPDFUtil {
addValueCell
(
projTable
,
"财政经费(万元)"
,
2
,
Objects
.
nonNull
(
dto
.
getGovFunding
())
?
dto
.
getGovFunding
().
toString
()
:
""
,
null
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"财政经费(万元)"
,
2
,
Objects
.
nonNull
(
dto
.
getGovFunding
())
?
dto
.
getGovFunding
().
toString
()
:
""
,
null
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"自筹经费(万元)"
,
null
,
Objects
.
nonNull
(
dto
.
getSelfFunding
())
?
dto
.
getSelfFunding
().
toString
()
:
""
,
2
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"自筹经费(万元)"
,
null
,
Objects
.
nonNull
(
dto
.
getSelfFunding
())
?
dto
.
getSelfFunding
().
toString
()
:
""
,
2
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"是否科技报告
:
"
,
2
,
dto
.
getIsTechnologyReport
().
equals
(
1
)
?
"是"
:
"否"
,
8
,
normalFont
,
null
,
null
,
null
);
addValueCell
(
projTable
,
"是否科技报告"
,
2
,
dto
.
getIsTechnologyReport
().
equals
(
1
)
?
"是"
:
"否"
,
8
,
normalFont
,
null
,
null
,
null
);
if
(
Objects
.
nonNull
(
dto
.
getIsTechnologyReport
())
&&
dto
.
getIsTechnologyReport
().
equals
(
1
))
{
if
(
Objects
.
nonNull
(
dto
.
getIsTechnologyReport
())
&&
dto
.
getIsTechnologyReport
().
equals
(
1
))
{
String
commonTerms
=
"科技报告类型
:
"
;
String
commonTerms
=
"科技报告类型"
;
Paragraph
para
=
new
Paragraph
(
commonTerms
,
normalFont
);
Paragraph
para
=
new
Paragraph
(
commonTerms
,
normalFont
);
para
.
setAlignment
(
Element
.
ALIGN_LEFT
);
para
.
setAlignment
(
Element
.
ALIGN_LEFT
);
PdfPCell
timeCell
=
new
PdfPCell
(
para
);
PdfPCell
timeCell
=
new
PdfPCell
(
para
);
...
@@ -873,6 +873,18 @@ public class TaskInfoToPDFUtil {
...
@@ -873,6 +873,18 @@ public class TaskInfoToPDFUtil {
addCell
(
table
,
totalSelfAmount
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
table
,
totalSelfAmount
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
document
.
add
(
table
);
document
.
add
(
table
);
// Paragraph para = new Paragraph("\n", normalFont);
// para.setAlignment(Element.ALIGN_LEFT);
// document.add(para);
Paragraph
para1
=
new
Paragraph
(
"注:1.单位类型为项目承担单位、项目参加单位"
,
normalFont
);
para1
.
setAlignment
(
Element
.
ALIGN_LEFT
);
para1
.
setFirstLineIndent
(
28
f
);
// 设置首行缩进
document
.
add
(
para1
);
Paragraph
para2
=
new
Paragraph
(
"2.任务分工的描述应该简洁,不超过300字"
,
normalFont
);
para2
.
setAlignment
(
Element
.
ALIGN_LEFT
);
para2
.
setFirstLineIndent
(
49
f
);
// 设置首行缩进
document
.
add
(
para2
);
}
}
private
static
void
projectStageGoalsInfo
(
Document
document
,
ComProjectTaskDTO
dto
,
BaseFont
bfChinese
,
BaseFont
fsChinese
)
throws
DocumentException
{
private
static
void
projectStageGoalsInfo
(
Document
document
,
ComProjectTaskDTO
dto
,
BaseFont
bfChinese
,
BaseFont
fsChinese
)
throws
DocumentException
{
...
@@ -905,7 +917,7 @@ public class TaskInfoToPDFUtil {
...
@@ -905,7 +917,7 @@ public class TaskInfoToPDFUtil {
}
}
for
(
int
i
=
0
;
i
<
dto
.
getStageGoals
().
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
dto
.
getStageGoals
().
size
();
i
++)
{
ComProjectStageGoalDTO
e
=
dto
.
getStageGoals
().
get
(
i
);
ComProjectStageGoalDTO
e
=
dto
.
getStageGoals
().
get
(
i
);
addCell
(
table
,
String
.
valueOf
(
i
),
null
,
null
,
normalFont
,
120
f
,
Element
.
ALIGN_CENTER
,
Element
.
ALIGN_CENTER
);
addCell
(
table
,
String
.
valueOf
(
i
+
1
),
null
,
null
,
normalFont
,
120
f
,
Element
.
ALIGN_CENTER
,
Element
.
ALIGN_CENTER
);
Paragraph
timePara
=
new
Paragraph
();
Paragraph
timePara
=
new
Paragraph
();
timePara
.
add
(
new
Chunk
(
"第"
+
numberTo
(
i
+
1
)
+
"阶段\n"
,
normalFont
));
timePara
.
add
(
new
Chunk
(
"第"
+
numberTo
(
i
+
1
)
+
"阶段\n"
,
normalFont
));
if
(
Objects
.
nonNull
(
e
.
getStartTime
())
&&
Objects
.
nonNull
(
e
.
getEndTime
()))
if
(
Objects
.
nonNull
(
e
.
getStartTime
())
&&
Objects
.
nonNull
(
e
.
getEndTime
()))
...
@@ -969,29 +981,18 @@ public class TaskInfoToPDFUtil {
...
@@ -969,29 +981,18 @@ public class TaskInfoToPDFUtil {
document
.
add
(
table
);
document
.
add
(
table
);
}
}
// private static void addProjectKPITable(Document document, ComProjectTaskDTO dto, BaseFont bfChinese, BaseFont fsChinese) throws DocumentException {
// document.newPage();
// Font titleFont = new Font(bfChinese, 14f, Font.BOLD);
// Font normalFont = new Font(bfChinese, 12f, Font.NORMAL);
// // 添加标题
// addSection(document, "八、项目绩效目标表", titleFont);
// }
private
static
void
addProjectKPITable
(
Document
document
,
ComProjectTaskDTO
task
,
List
<
SystemParameter
>
projAttributeList
,
BaseFont
bfChinese
,
BaseFont
fsChinese
,
BaseFont
WINGDNG2
)
throws
DocumentException
{
private
static
void
addProjectKPITable
(
Document
document
,
ComProjectTaskDTO
task
,
List
<
SystemParameter
>
projAttributeList
,
BaseFont
bfChinese
,
BaseFont
fsChinese
,
BaseFont
WINGDNG2
)
throws
DocumentException
{
document
.
setPageSize
(
PageSize
.
A4
.
rotate
());
document
.
newPage
();
document
.
newPage
();
Font
titleFont
=
new
Font
(
bfChinese
,
12
,
Font
.
NORMAL
);
Font
titleFont
=
new
Font
(
bfChinese
,
12
,
Font
.
BOLD
);
Font
contentFont
=
new
Font
(
bfChinese
,
12
,
Font
.
NORMAL
);
Font
contentFont
=
new
Font
(
bfChinese
,
12
,
Font
.
NORMAL
);
Font
wingdng2Font
=
new
Font
(
WINGDNG2
,
12
,
Font
.
NORMAL
);
Font
wingdng2Font
=
new
Font
(
WINGDNG2
,
12
,
Font
.
NORMAL
);
ProjectKPIStatisticDTO
kpitDTO
=
task
.
getProjectKPI
();
ProjectKPIStatisticDTO
kpitDTO
=
task
.
getProjectKPI
();
List
<
ComProjectKpitDTO
>
detail
=
task
.
getProjectKPI
().
getThreeLevel
();
List
<
ComProjectKpitDTO
>
detail
=
task
.
getProjectKPI
().
getThreeLevel
();
// 添加表格标题
// 添加标题
Paragraph
title
=
new
Paragraph
(
"八、绩效目标表"
,
titleFont
);
addSection
(
document
,
"八、绩效目标表"
,
titleFont
);
title
.
setAlignment
(
Element
.
ALIGN_CENTER
);
title
.
setSpacingAfter
(
10
f
);
document
.
add
(
title
);
// 创建主表格
// 创建主表格
PdfPTable
mainTable
=
new
PdfPTable
(
5
);
PdfPTable
mainTable
=
new
PdfPTable
(
5
);
...
@@ -1006,11 +1007,8 @@ public class TaskInfoToPDFUtil {
...
@@ -1006,11 +1007,8 @@ public class TaskInfoToPDFUtil {
yearCell
.
setMinimumHeight
(
25
f
);
yearCell
.
setMinimumHeight
(
25
f
);
mainTable
.
addCell
(
yearCell
);
mainTable
.
addCell
(
yearCell
);
// 项目名称
// 项目名称和实施单位
addLabelValueRow
(
mainTable
,
"项目名称"
,
kpitDTO
.
getProjName
(),
5
,
titleFont
,
contentFont
);
addLabelValueRow
(
mainTable
,
"项目名称"
,
kpitDTO
.
getProjName
(),
2
,
titleFont
,
contentFont
);
// 主管处室和实施单位
addLabelValueRow
(
mainTable
,
"主管处室"
,
kpitDTO
.
getManagerDept
(),
2
,
titleFont
,
contentFont
);
addLabelValueRow
(
mainTable
,
"实施单位"
,
kpitDTO
.
getAppUnitName
(),
1
,
titleFont
,
contentFont
);
addLabelValueRow
(
mainTable
,
"实施单位"
,
kpitDTO
.
getAppUnitName
(),
1
,
titleFont
,
contentFont
);
// 项目属性
// 项目属性
...
@@ -1198,6 +1196,7 @@ public class TaskInfoToPDFUtil {
...
@@ -1198,6 +1196,7 @@ public class TaskInfoToPDFUtil {
}
}
private
static
void
addFileTable
(
Document
document
,
ComProjectTaskDTO
dto
,
BaseFont
bfChinese
,
BaseFont
fsChinese
)
throws
DocumentException
{
private
static
void
addFileTable
(
Document
document
,
ComProjectTaskDTO
dto
,
BaseFont
bfChinese
,
BaseFont
fsChinese
)
throws
DocumentException
{
document
.
setPageSize
(
PageSize
.
A4
);
document
.
newPage
();
document
.
newPage
();
Font
titleFont
=
new
Font
(
bfChinese
,
14
f
,
Font
.
BOLD
);
Font
titleFont
=
new
Font
(
bfChinese
,
14
f
,
Font
.
BOLD
);
Font
normalFont
=
new
Font
(
bfChinese
,
12
f
,
Font
.
NORMAL
);
Font
normalFont
=
new
Font
(
bfChinese
,
12
f
,
Font
.
NORMAL
);
...
@@ -1230,7 +1229,7 @@ public class TaskInfoToPDFUtil {
...
@@ -1230,7 +1229,7 @@ public class TaskInfoToPDFUtil {
ComFileDTO
e
=
dto
.
getFileList
().
get
(
i
);
ComFileDTO
e
=
dto
.
getFileList
().
get
(
i
);
addCell
(
fileTable
,
i
+
1
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
fileTable
,
i
+
1
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
fileTable
,
e
.
getFileExplain
(),
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
fileTable
,
e
.
getFileExplain
(),
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
fileTable
,
"1
"
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
fileTable
,
Objects
.
nonNull
(
e
.
getFileName
())
?
"1"
:
"0
"
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
fileTable
,
""
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
addCell
(
fileTable
,
""
,
null
,
null
,
normalFont
,
null
,
null
,
Element
.
ALIGN_CENTER
);
}
}
document
.
add
(
fileTable
);
document
.
add
(
fileTable
);
...
...
science-admin/src/main/resources/mapper/ComProjectTaskDAO.xml
View file @
5f40c5ee
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</select>
</select>
<select
id=
"getByProjId"
parameterType=
"java.lang.String"
resultType=
"com.yiboshi.science.param.dto.ComProjectTaskDTO"
>
<select
id=
"getByProjId"
parameterType=
"java.lang.String"
resultType=
"com.yiboshi.science.param.dto.ComProjectTaskDTO"
>
SELECT ifnull(pt.task_state,0) task_state,
SELECT ifnull(pt.task_state,0) task_state,
pt.id,
pt
.report_year,pt.start_date,pt.end_date,pt.unit_type,pt.organization_code,pt.unit_address,pt.registered_address,pt.post_code,
pt.id,
a
.report_year,pt.start_date,pt.end_date,pt.unit_type,pt.organization_code,pt.unit_address,pt.registered_address,pt.post_code,
pt.legal_person,pt.workforce,pt.specialized_personnel,pt.research_personnel,
pt.legal_person,pt.workforce,pt.specialized_personnel,pt.research_personnel,
pt.deposit_bank,pt.bank_account,pt.deposit_bank_address,pt.interbank_number,
pt.deposit_bank,pt.bank_account,pt.deposit_bank_address,pt.interbank_number,
pt.key_areas,pt.proj_work,pt.telephone,pt.fax,
pt.key_areas,pt.proj_work,pt.telephone,pt.fax,
...
...
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