Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
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
竹天卫
tianjin-cement
Commits
6c727004
Commit
6c727004
authored
Jan 26, 2021
by
qinhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报告模板修改
parent
faefeaf7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
73 deletions
+110
-73
ReportController.java
.../wise/sc/cement/business/controller/ReportController.java
+4
-3
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+57
-2
DateUtil.java
...c/main/java/cn/wise/sc/cement/business/util/DateUtil.java
+0
-3
report_new.ftl
cement-business/src/main/resources/templates/report_new.ftl
+49
-65
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/ReportController.java
View file @
6c727004
...
...
@@ -39,6 +39,7 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
...
...
@@ -121,9 +122,9 @@ public class ReportController {
beanParams
.
put
(
"projectName"
,
rts
.
getProjectName
());
beanParams
.
put
(
"printDate"
,
rts
.
getPrintDate
());
beanParams
.
put
(
"year"
,
DateUtil
.
year
(
DateUtil
.
date
()));
beanParams
.
put
(
"month"
,
DateUtil
.
month
(
DateUtil
.
date
()));
beanParams
.
put
(
"day"
,
DateUtil
.
today
(
));
beanParams
.
put
(
"year"
,
DateUtil
.
year
(
DateUtil
.
date
())
+
""
);
beanParams
.
put
(
"month"
,
DateUtil
.
month
(
DateUtil
.
date
())
+
1
);
beanParams
.
put
(
"day"
,
DateUtil
.
dayOfMonth
(
DateUtil
.
date
()
));
beanParams
.
put
(
"reportNo"
,
StrUtil
.
isEmpty
(
rts
.
getReportNo
())
?
""
:
rts
.
getReportNo
());
beanParams
.
put
(
"firstMethodName"
,
getFirstSet
(
rts
.
getMethodNames
()));
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
6c727004
...
...
@@ -2782,10 +2782,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
int
id
=
Integer
.
parseInt
(
idStr
);
teams
.
forEach
(
opt
->
{
if
(
opt
.
getId
()
==
id
&&
1
==
opt
.
getQualifications
())
{
String
teamName
=
replaceSub
(
opt
.
getName
());
if
(
StrUtil
.
isBlank
(
arg
.
getTeamName
()))
{
arg
.
setTeamName
(
opt
.
getName
()
);
arg
.
setTeamName
(
teamName
);
}
else
{
arg
.
setTeamName
(
arg
.
getTeamName
()
+
"、"
+
opt
.
getName
()
);
arg
.
setTeamName
(
arg
.
getTeamName
()
+
"、"
+
teamName
);
}
}
});
...
...
@@ -2988,6 +2989,59 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
/**
* 替换特殊角标
*
* @param teamName 待替换元素名
* @return 新元素名
*/
private
String
replaceSub
(
String
teamName
)
{
String
[]
subs
=
{
"₀"
,
"₁"
,
"₂"
,
"₃"
,
"₄"
,
"₅"
,
"₆"
,
"₇"
,
"₈"
,
"₉"
,
"₊"
,
"₋"
};
String
[]
sups
=
{
"⁰"
,
"¹"
,
"²"
,
"³"
,
"⁴"
,
"⁵"
,
"⁶"
,
"⁷"
,
"⁸"
,
"⁹"
,
"⁺"
,
"⁻"
,
"⁼"
,
"⁽"
,
"⁾"
,
"ⁿ"
};
String
rts
=
teamName
;
if
(
StringUtils
.
isEmpty
(
teamName
))
{
return
rts
;
}
if
(
teamName
.
contains
(
"<sub>1</sub>"
)){
rts
=
rts
.
replace
(
"<sub>1</sub>"
,
"₁"
);
}
if
(
teamName
.
contains
(
"<sub>2</sub>"
)){
rts
=
rts
.
replace
(
"<sub>2</sub>"
,
"₂"
);
}
if
(
teamName
.
contains
(
"<sub>3</sub>"
)){
rts
=
rts
.
replace
(
"<sub>3</sub>"
,
"₃"
);
}
if
(
teamName
.
contains
(
"<sub>4</sub>"
)){
rts
=
rts
.
replace
(
"<sub>4</sub>"
,
"₄"
);
}
if
(
teamName
.
contains
(
"<sub>5</sub>"
)){
rts
=
rts
.
replace
(
"<sub>5</sub>"
,
"₅"
);
}
if
(
teamName
.
contains
(
"<sub>6</sub>"
)){
rts
=
rts
.
replace
(
"<sub>6</sub>"
,
"₆"
);
}
if
(
teamName
.
contains
(
"<sub>7</sub>"
)){
rts
=
rts
.
replace
(
"<sub>7</sub>"
,
"₇"
);
}
if
(
teamName
.
contains
(
"<sub>8</sub>"
)){
rts
=
rts
.
replace
(
"<sub>8</sub>"
,
"₈"
);
}
if
(
teamName
.
contains
(
"<sub>9</sub>"
)){
rts
=
rts
.
replace
(
"<sub>9</sub>"
,
"₉"
);
}
if
(
teamName
.
contains
(
"<sup>-</sup>"
)){
rts
=
rts
.
replace
(
"<sup>-</sup>"
,
"⁻"
);
}
if
(
teamName
.
contains
(
"<sup>+</sup>"
)){
rts
=
rts
.
replace
(
"<sup>+</sup>"
,
"⁺"
);
}
return
rts
;
}
/**
* 根据样品检测列表获取报告管理首页
...
...
@@ -3008,6 +3062,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
rts
.
setSender
(
firstReportDetail
.
getSendName
());
rts
.
setSendDate
(
DateUtil
.
format
(
firstReportDetail
.
getSendTime
(),
"yyyy年MM月dd日"
));
rts
.
setProjectName
(
firstReportDetail
.
getProjectName
());
rts
.
setReportNo
(
firstReportDetail
.
getEntrustCode
());
rts
.
setSendName
(
"\\"
);
//获取检测项目、检测仪器、检测依据
rts
.
setEquipmentNames
(
new
HashSet
<>(
source
.
size
()));
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/util/DateUtil.java
View file @
6c727004
package
cn
.
wise
.
sc
.
cement
.
business
.
util
;
import
cn.hutool.core.date.DateTime
;
import
java.time.LocalDateTime
;
import
java.time.temporal.WeekFields
;
import
java.util.Date
;
...
...
cement-business/src/main/resources/templates/report_new.ftl
View file @
6c727004
...
...
@@ -1664,7 +1664,7 @@
</Style>
<Style
ss:ID=
"s128"
>
<Alignment
ss:Horizontal=
"Left"
ss:Vertical=
"Bottom"
/>
<Font
ss:FontName=
"楷体"
x:CharSet=
"134"
x:Family=
"Modern"
ss:Size=
"12"
/>
<Font
ss:FontName=
"楷体"
x:CharSet=
"134"
x:Family=
"Modern"
ss:Size=
"12"
ss:Color=
"#FF0000"
/>
</Style>
<Style
ss:ID=
"s129"
>
<Alignment
ss:Vertical=
"Center"
/>
...
...
@@ -1933,8 +1933,8 @@
</Style>
<Style
ss:ID=
"s227"
>
<Alignment
ss:Horizontal=
"Center"
ss:Vertical=
"Bottom"
/>
<Font
ss:FontName=
"黑体"
x:CharSet=
"134"
x:Family=
"Modern"
ss:Size=
"26"
ss:Bold=
"1"
/>
<Font
ss:FontName=
"黑体"
x:CharSet=
"134"
x:Family=
"Modern"
ss:Size=
"26"
ss:Bold=
"1"
/>
</Style>
<Style
ss:ID=
"s228"
>
<Alignment
ss:Horizontal=
"Center"
ss:Vertical=
"Bottom"
/>
...
...
@@ -3667,7 +3667,7 @@
<Cell
ss:Index=
"13"
ss:StyleID=
"s79"
/>
</Row>
<Row
ss:AutoFitHeight=
"0"
ss:Height=
"25"
>
<Cell
ss:MergeAcross=
"5"
ss:StyleID=
"s105"
><Data
ss:Type=
"String"
>
(承担法律责任机构:
中材装备集团
有限公司)
</Data><NamedCell
<Cell
ss:MergeAcross=
"5"
ss:StyleID=
"s105"
><Data
ss:Type=
"String"
>
(承担法律责任机构:
天津水泥工业设计研究院
有限公司)
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s106"
/>
<Cell
ss:StyleID=
"s107"
/>
...
...
@@ -3829,7 +3829,7 @@
ss:Name=
"_FilterDatabase"
/></Cell>
<Cell
ss:StyleID=
"s127"
><ss:Data
ss:Type=
"String"
xmlns=
"http://www.w3.org/TR/REC-html40"
><Font
html:Color=
"#FF0000"
>
共
</Font><Font
html:Face=
"宋体"
x:CharSet=
"134"
html:Color=
"#FF0000"
>
2
</Font><Font
html:Face=
"宋体"
x:CharSet=
"134"
html:Color=
"#FF0000"
>
3
</Font><Font
html:Color=
"#FF0000"
>
页
</Font></ss:Data><NamedCell
ss:Name=
"_FilterDatabase"
/></Cell>
<Cell
ss:StyleID=
"s128"
><ss:Data
ss:Type=
"String"
xmlns=
"http://www.w3.org/TR/REC-html40"
>
第
<Font
html:Face=
"宋体"
...
...
@@ -4246,52 +4246,36 @@
</Row>
<Row
ss:AutoFitHeight=
"0"
ss:Height=
"15"
>
<Cell
ss:MergeAcross=
"15"
ss:StyleID=
"s223"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:StyleID=
"s225"
/>
</Row>
<Row
ss:AutoFitHeight=
"0"
ss:Height=
"31.5"
>
<Cell
ss:MergeAcross=
"15"
ss:StyleID=
"s227"
><Data
ss:Type=
"String"
>
检 测 报 告
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:StyleID=
"s225"
/>
<Row
ss:AutoFitHeight=
"0"
ss:Height=
"43.5"
>
<Cell
ss:MergeAcross=
"15"
ss:StyleID=
"s227"
><Data
ss:Type=
"String"
>
检 测 报 告1
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
</Row>
<Row
ss:AutoFitHeight=
"0"
ss:Height=
"15"
>
<Cell
ss:MergeAcross=
"15"
ss:StyleID=
"s228"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:MergeAcross=
"16"
ss:StyleID=
"s228"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
</Row>
<Row
ss:AutoFitHeight=
"0"
>
<Cell
ss:StyleID=
"s230"
><Data
ss:Type=
"String"
>
报告编号:
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s231"
ss:Formula=
"=封面!R[2]C[2]"
><Data
ss:Type=
"String"
>
${reportNo}
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s232"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s232"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s232"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s232"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s232"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s232"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s232"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s232"
><Data
ss:Type=
"String"
>
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s232"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s232"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s233"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s72"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s76"
ss:Formula=
"=首页!R[-2]C[-12]"
><Data
ss:Type=
"String"
>
共2页
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s76"
><Data
ss:Type=
"String"
>
第2页
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:StyleID=
"s225"
/>
<Cell
ss:StyleID=
"s329"
><Data
ss:Type=
"String"
>
报告编号:
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s126"
ss:Formula=
"=封面!R[2]C[2]"
><Data
ss:Type=
"String"
>
${reportNo}
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s63"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s63"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s63"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s63"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s63"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s63"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s63"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s63"
><Data
ss:Type=
"String"
>
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s63"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s63"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s63"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s63"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s290"
ss:Formula=
""
><Data
ss:Type=
"String"
>
共3页
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Cell
ss:StyleID=
"s291"
><Data
ss:Type=
"String"
>
第2页
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
</Row>
<Row
ss:AutoFitHeight=
"0"
ss:Height=
"25.5"
>
<Cell
ss:MergeDown=
"1"
ss:StyleID=
"m2194692797824"
><Data
ss:Type=
"String"
>
样品名称
</Data><NamedCell
...
...
@@ -6237,9 +6221,9 @@
<Row
ss:AutoFitHeight=
"0"
ss:Height=
"15"
>
<Cell
ss:MergeAcross=
"16"
ss:StyleID=
"s223"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
</Row>
<Row
ss:AutoFitHeight=
"0"
ss:Height=
"
31
.5"
>
<Cell
ss:MergeAcross=
"1
6"
ss:StyleID=
"s227"
><Data
ss:Type=
"String"
>
检 测 报 告
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
<Row
ss:AutoFitHeight=
"0"
ss:Height=
"
43
.5"
>
<Cell
ss:MergeAcross=
"1
5"
ss:StyleID=
"s227"
><Data
ss:Type=
"String"
>
检 测 报 告1
</Data><NamedCell
ss:Name=
"Print_Area"
/></Cell>
</Row>
<Row
ss:AutoFitHeight=
"0"
ss:Height=
"15"
>
<Cell
ss:MergeAcross=
"16"
ss:StyleID=
"s228"
><NamedCell
ss:Name=
"Print_Area"
/></Cell>
...
...
@@ -6320,22 +6304,22 @@
<
#list list2 as item>
<Row
ss:AutoFitHeight=
"0"
ss:Height=
"25.5"
ss:StyleID=
"s225"
>
<Cell
ss:StyleID=
"s263"
><Data
ss:Type=
"String"
>
${item.sampleName}
</Data></Cell>
<Cell
ss:StyleID=
"s263"
><Data
ss:Type=
"String"
>
${item.sample
Name
}
</Data></Cell>
<Cell
ss:StyleID=
"s263"
><Data
ss:Type=
"String"
>
${item.sample
Nam
e}
</Data></Cell>
<Cell
ss:StyleID=
"s263"
><Data
ss:Type=
"String"
>
${item.
sampleName
}
</Data></Cell>
<Cell
ss:StyleID=
"s263"
><Data
ss:Type=
"String"
>
${item.
sampleNam
e}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.
sampleName
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.s
ampleName
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.
sampleName
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.
sampleName
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.
sampleName
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.
sampleName
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.
sampleName
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.sampleName}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.sampleName}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.s
ampleName
}
</Data></Cell>
<Cell
ss:StyleID=
"s265"
><Data
ss:Type=
"String"
>
${item.
sampleName
}
</Data></Cell>
<Cell
ss:StyleID=
"s248"
><Data
ss:Type=
"String"
>
${item.sampleName}
</Data></Cell>
<Cell
ss:StyleID=
"s263"
><Data
ss:Type=
"String"
>
${item.sample
Form
}
</Data></Cell>
<Cell
ss:StyleID=
"s263"
><Data
ss:Type=
"String"
>
${item.sample
Cod
e}
</Data></Cell>
<Cell
ss:StyleID=
"s263"
><Data
ss:Type=
"String"
>
${item.
weight
}
</Data></Cell>
<Cell
ss:StyleID=
"s263"
><Data
ss:Type=
"String"
>
${item.
cementCod
e}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.
loi
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.s
io2
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.
al2o3
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.
fe2o3
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.
cao
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.
mgo
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.
tio2
}
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
-
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
-
</Data></Cell>
<Cell
ss:StyleID=
"s264"
><Data
ss:Type=
"String"
>
${item.s
o3
}
</Data></Cell>
<Cell
ss:StyleID=
"s265"
><Data
ss:Type=
"String"
>
${item.
cl
}
</Data></Cell>
<Cell
ss:StyleID=
"s248"
><Data
ss:Type=
"String"
>
-
</Data></Cell>
</Row>
<
/#list>
<Row
ss:AutoFitHeight=
"0"
ss:Height=
"25.5"
ss:StyleID=
"s223"
>
...
...
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