Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RuoYi-Vue-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
融通安全管理系统
RuoYi-Vue-master
Commits
721b428e
Commit
721b428e
authored
Aug 01, 2023
by
周昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、修改pc端导出word多个危险标识报错问题
parent
73fef44f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
118 additions
and
57 deletions
+118
-57
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/dto/RiskNotificationExportWordDto.java
...oftrongtong/domain/dto/RiskNotificationExportWordDto.java
+8
-0
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/impl/RiskPlanInherentListServiceImpl.java
...ongtong/service/impl/RiskPlanInherentListServiceImpl.java
+10
-5
ruoyi-admin/src/main/resources/templates/ftl/word.ftl
ruoyi-admin/src/main/resources/templates/ftl/word.ftl
+100
-52
No files found.
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/dto/RiskNotificationExportWordDto.java
View file @
721b428e
...
@@ -3,6 +3,9 @@ package com.censoft.censoftrongtong.domain.dto;
...
@@ -3,6 +3,9 @@ package com.censoft.censoftrongtong.domain.dto;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.HashMap
;
import
java.util.List
;
/**
/**
* @author 周昊
* @author 周昊
* @desc ...
* @desc ...
...
@@ -41,6 +44,11 @@ public class RiskNotificationExportWordDto {
...
@@ -41,6 +44,11 @@ public class RiskNotificationExportWordDto {
*/
*/
private
String
safetyWarningSigns
;
private
String
safetyWarningSigns
;
/**
* 安全警示标志list
*/
private
List
<
HashMap
<
String
,
String
>>
safetyWarningSignsList
;
/**
/**
* 应采取的管理措施
* 应采取的管理措施
*/
*/
...
...
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/service/impl/RiskPlanInherentListServiceImpl.java
View file @
721b428e
...
@@ -30,10 +30,7 @@ import java.io.IOException;
...
@@ -30,10 +30,7 @@ import java.io.IOException;
import
java.io.OutputStream
;
import
java.io.OutputStream
;
import
java.io.UnsupportedEncodingException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -239,7 +236,15 @@ public class RiskPlanInherentListServiceImpl
...
@@ -239,7 +236,15 @@ public class RiskPlanInherentListServiceImpl
public
RiskNotificationExportWordDto
getRiskNotificationExportWordDto
(
Long
inherentId
)
{
public
RiskNotificationExportWordDto
getRiskNotificationExportWordDto
(
Long
inherentId
)
{
RiskNotificationExportWordDto
dto
=
riskPlanInherentListMapper
.
getRiskNotificationExportWordDto
(
inherentId
);
RiskNotificationExportWordDto
dto
=
riskPlanInherentListMapper
.
getRiskNotificationExportWordDto
(
inherentId
);
if
(
StrUtil
.
isNotBlank
(
dto
.
getSafetyWarningSigns
())){
if
(
StrUtil
.
isNotBlank
(
dto
.
getSafetyWarningSigns
())){
dto
.
setSafetyWarningSigns
(
WordUtil
.
getImageStr
(
"D:\\ruoyi\\uploadPath\\upload\\警告标志\\"
+
dto
.
getSafetyWarningSigns
()+
".png"
));
List
<
HashMap
<
String
,
String
>>
safetyWarningSignsList
=
Arrays
.
stream
(
dto
.
getSafetyWarningSigns
().
split
(
","
))
.
map
(
sign
->{
HashMap
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"url"
,
WordUtil
.
getImageStr
(
"D:\\ruoyi\\uploadPath\\upload\\警告标志\\"
+
sign
+
".png"
));
return
map
;
}).
collect
(
Collectors
.
toList
());
dto
.
setSafetyWarningSignsList
(
safetyWarningSignsList
);
}
else
{
dto
.
setSafetyWarningSignsList
(
new
ArrayList
<>());
}
}
return
dto
;
return
dto
;
}
}
...
...
ruoyi-admin/src/main/resources/templates/ftl/word.ftl
View file @
721b428e
...
@@ -838,58 +838,106 @@
...
@@ -838,58 +838,106 @@
w:val=
"2"
/>
w:val=
"2"
/>
<w:shd
w:val=
"clear"
w:color=
"auto"
w:fill=
"auto"
/>
<w:shd
w:val=
"clear"
w:color=
"auto"
w:fill=
"auto"
/>
</w:tcPr>
</w:tcPr>
<w:p
wsp:rsidR=
"00566CAE"
<
#if safetyWarningSignsList??
&&
(safetyWarningSignsList?size > 0)>
wsp:rsidRPr=
"009370A0"
<
#list safetyWarningSignsList as useritem>
wsp:rsidRDefault=
"000B0B97"
<w:p
wsp:rsidR=
"00060D20"
wsp:rsidRDefault=
"006A2E97"
>
wsp:rsidP=
"009370A0"
>
<w:pPr>
<w:pPr>
<w:jc
w:val=
"center"
/>
<w:jc
w:val=
"center"
/>
<w:rPr>
</w:pPr>
<w:rFonts
w:ascii=
"Times New Roman"
w:h-ansi=
"Times New Roman"
/>
<w:r
wsp:rsidRPr=
"000B0B97"
>
<wx:font
wx:val=
"Times New Roman"
/>
<w:rPr>
<w:color
w:val=
"000000"
/>
<w:rFonts
w:ascii=
"Helvetica"
w:h-ansi=
"Helvetica"
w:cs=
"Helvetica"
/>
<w:kern
w:val=
"0"
/>
<wx:font
<w:sz
w:val=
"16"
/>
wx:val=
"Helvetica"
/>
<w:sz-cs
w:val=
"16"
/>
<w:noProof/>
</w:rPr>
<w:color
w:val=
"333333"
/>
</w:pPr>
<w:kern
w:val=
"0"
/>
<w:r
wsp:rsidRPr=
"006A2E97"
>
<w:sz
w:val=
"30"
/>
<w:rPr>
<w:sz-cs
<w:rFonts
w:ascii=
"宋体"
w:h-ansi=
"宋体"
w:cs=
"宋体"
/>
w:val=
"30"
/>
<wx:font
wx:val=
"宋体"
/>
</w:rPr>
<w:color
w:val=
"000000"
/>
<w:pict>
<w:kern
w:val=
"0"
/>
<v:shapetype
id=
"_x0000_t75"
coordsize=
"21600,21600"
o:spt=
"75"
<w:sz
w:val=
"16"
/>
o:preferrelative=
"t"
path=
"m@4@5l@4@11@9@11@9@5xe"
filled=
"f"
<w:sz-cs
w:val=
"16"
/>
stroked=
"f"
>
</w:rPr>
<v:stroke
joinstyle=
"miter"
/>
<w:pict>
<v:formulas>
<v:shapetype
id=
"_x0000_t75"
coordsize=
"21600,21600"
o:spt=
"75"
o:preferrelative=
"t"
<v:f
eqn=
"if lineDrawn pixelLineWidth 0"
/>
path=
"m@4@5l@4@11@9@11@9@5xe"
filled=
"f"
stroked=
"f"
>
<v:f
eqn=
"sum @0 1 0"
/>
<v:stroke
joinstyle=
"miter"
/>
<v:f
eqn=
"sum 0 0 @1"
/>
<v:formulas>
<v:f
eqn=
"prod @2 1 2"
/>
<v:f
eqn=
"if lineDrawn pixelLineWidth 0"
/>
<v:f
eqn=
"prod @3 21600 pixelWidth"
/>
<v:f
eqn=
"sum @0 1 0"
/>
<v:f
eqn=
"prod @3 21600 pixelHeight"
/>
<v:f
eqn=
"sum 0 0 @1"
/>
<v:f
eqn=
"sum @0 0 1"
/>
<v:f
eqn=
"prod @2 1 2"
/>
<v:f
eqn=
"prod @6 1 2"
/>
<v:f
eqn=
"prod @3 21600 pixelWidth"
/>
<v:f
eqn=
"prod @7 21600 pixelWidth"
/>
<v:f
eqn=
"prod @3 21600 pixelHeight"
/>
<v:f
eqn=
"sum @8 21600 0"
/>
<v:f
eqn=
"sum @0 0 1"
/>
<v:f
eqn=
"prod @7 21600 pixelHeight"
/>
<v:f
eqn=
"prod @6 1 2"
/>
<v:f
eqn=
"sum @10 21600 0"
/>
<v:f
eqn=
"prod @7 21600 pixelWidth"
/>
</v:formulas>
<v:f
eqn=
"sum @8 21600 0"
/>
<v:path
o:extrusionok=
"f"
gradientshapeok=
"t"
<v:f
eqn=
"prod @7 21600 pixelHeight"
/>
o:connecttype=
"rect"
/>
<v:f
eqn=
"sum @10 21600 0"
/>
<o:lock
v:ext=
"edit"
</v:formulas>
aspectratio=
"t"
/>
<v:path
o:extrusionok=
"f"
gradientshapeok=
"t"
o:connecttype=
"rect"
/>
</v:shapetype>
<o:lock
v:ext=
"edit"
aspectratio=
"t"
/>
<w:binData
w:name=
"wordml://03000001.png"
xml:space=
"preserve"
>
${safetyWarningSigns}
</w:binData>
</v:shapetype>
<v:shape
id=
"图片 1"
o:spid=
"_x0000_i1025"
type=
"#_x0000_t75"
<w:binData
w:name=
"wordml://${useritem_index+1!''}.png"
style=
"width:66.6pt;height:58.8pt;visibility:visible;mso-wrap-style:square"
>
xml:space=
"preserve"
>
${useritem.url!''}
</w:binData>
<v:imagedata
src=
"wordml://03000001.png"
o:title=
""
cropleft=
"2313f"
<v:shape
id=
"_x0000_i1036"
type=
"#_x0000_t75"
style=
"width:64pt;height:77pt"
>
cropright=
"1808f"
/>
<v:imagedata
src=
"wordml://${useritem_index+1!''}.png"
o:title=
"20220114094601"
/>
</v:shape>
</v:shape>
</w:pict>
</w:pict>
</w:r>
</w:r>
</w:p>
</w:p>
<
/#list>
<
#else>
<w:p
wsp:rsidR=
"00060D20"
wsp:rsidRDefault=
"006A2E97"
>
<w:pPr>
<w:jc
w:val=
"center"
/>
<w:rPr>
<w:rFonts
w:ascii=
"Times New Roman"
w:h-ansi=
"Times New Roman"
/>
<wx:font
wx:val=
"Times New Roman"
/>
<w:color
w:val=
"000000"
/>
<w:kern
w:val=
"0"
/>
<w:sz
w:val=
"16"
/>
<w:sz-cs
w:val=
"16"
/>
</w:rPr>
</w:pPr>
<w:r
wsp:rsidRPr=
"006A2E97"
>
<w:rPr>
<w:rFonts
w:ascii=
"宋体"
w:h-ansi=
"宋体"
w:cs=
"宋体"
/>
<wx:font
wx:val=
"宋体"
/>
<w:color
w:val=
"000000"
/>
<w:kern
w:val=
"0"
/>
<w:sz
w:val=
"16"
/>
<w:sz-cs
w:val=
"16"
/>
</w:rPr>
<w:pict>
<v:shapetype
id=
"_x0000_t75"
coordsize=
"21600,21600"
o:spt=
"75"
o:preferrelative=
"t"
path=
"m@4@5l@4@11@9@11@9@5xe"
filled=
"f"
stroked=
"f"
>
<v:stroke
joinstyle=
"miter"
/>
<v:formulas>
<v:f
eqn=
"if lineDrawn pixelLineWidth 0"
/>
<v:f
eqn=
"sum @0 1 0"
/>
<v:f
eqn=
"sum 0 0 @1"
/>
<v:f
eqn=
"prod @2 1 2"
/>
<v:f
eqn=
"prod @3 21600 pixelWidth"
/>
<v:f
eqn=
"prod @3 21600 pixelHeight"
/>
<v:f
eqn=
"sum @0 0 1"
/>
<v:f
eqn=
"prod @6 1 2"
/>
<v:f
eqn=
"prod @7 21600 pixelWidth"
/>
<v:f
eqn=
"sum @8 21600 0"
/>
<v:f
eqn=
"prod @7 21600 pixelHeight"
/>
<v:f
eqn=
"sum @10 21600 0"
/>
</v:formulas>
<v:path
o:extrusionok=
"f"
gradientshapeok=
"t"
o:connecttype=
"rect"
/>
<o:lock
v:ext=
"edit"
aspectratio=
"t"
/>
</v:shapetype>
</w:pict>
</w:r>
</w:p>
<
/#if>
</w:tc>
</w:tc>
<w:tc>
<w:tc>
<w:tcPr>
<w:tcPr>
...
...
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