Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
811d8f59
Commit
811d8f59
authored
Aug 19, 2024
by
邢磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)增加附件地址
parent
f4b84b1f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
MatinfoEnum.java
...in/amos/boot/module/statistics/api/enums/MatinfoEnum.java
+42
-0
DPSubServiceImpl.java
...t/module/statistcs/biz/service/impl/DPSubServiceImpl.java
+7
-0
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/enums/MatinfoEnum.java
0 → 100644
View file @
811d8f59
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistics
.
api
.
enums
;
import
java.util.function.Function
;
public
enum
MatinfoEnum
{
EXCEL
(
"/public/webico/resources/上传-excl.png"
,
(
str
)
->
str
.
equals
(
"xls"
)
||
str
.
equals
(
"xlsx"
)),
PDF
(
"/public/webico/resources/上传-pdf.png"
,
(
str
)
->
str
.
equals
(
"pdf"
)),
PPT
(
"/public/webico/resources/上传-ppt.png"
,
(
str
)
->
str
.
equals
(
"ppt"
)),
WOED
(
"/public/webico/resources/上传-word.png"
,
(
str
)
->
str
.
equals
(
"doc"
)
||
str
.
equals
(
"docx"
)
||
str
.
equals
(
"txt"
)),
IMAGE
(
"/public/webico/resources/上传-图片.png"
,
(
str
)
->
false
),
VIDEO
(
"/public/webico/resources/上传-视频.png"
,
(
str
)
->
str
.
equals
(
"mp4"
)
||
str
.
equals
(
"avi"
)
||
str
.
equals
(
"flv"
));
private
String
icon
;
private
Function
<
String
,
Boolean
>
buildFunction
;
MatinfoEnum
()
{
}
MatinfoEnum
(
String
icon
,
Function
<
String
,
Boolean
>
buildFunction
)
{
this
.
icon
=
icon
;
this
.
buildFunction
=
buildFunction
;
}
public
String
getIcon
()
{
return
icon
;
}
public
Function
<
String
,
Boolean
>
getBuildFunction
()
{
return
buildFunction
;
}
public
static
MatinfoEnum
getIconUrl
(
String
suffix
){
for
(
MatinfoEnum
value
:
values
())
{
if
(
value
.
getBuildFunction
().
apply
(
suffix
))
{
return
value
;
}
}
return
IMAGE
;
}
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/DPSubServiceImpl.java
View file @
811d8f59
...
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RestTemplateUtils;
import
com.yeejoin.amos.boot.biz.common.utils.StringUtils
;
import
com.yeejoin.amos.boot.module.statistcs.biz.utils.DpSubUtils
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.DPStatusEnum
;
import
com.yeejoin.amos.boot.module.statistics.api.enums.MatinfoEnum
;
import
com.yeejoin.amos.feign.morphic.Morphic
;
import
com.yeejoin.amos.feign.morphic.model.FormSceneModel
;
import
jdk.nashorn.api.scripting.ScriptObjectMirror
;
...
...
@@ -593,6 +594,12 @@ public class DPSubServiceImpl {
JSONArray
attachmentUploadDatas
=
matinfo
.
getJSONArray
(
"datas"
);
if
(!
ValidationUtil
.
isEmpty
(
value
))
{
JSONObject
attachmentUploadDatasObj
=
new
JSONObject
();
((
JSONArray
)
value
).
stream
().
forEach
(
y
->
{
JSONObject
yObj
=
(
JSONObject
)
y
;
String
[]
str
=
yObj
.
getString
(
"url"
).
split
(
"\\."
);
String
icon
=
MatinfoEnum
.
getIconUrl
(
str
[
1
]).
getIcon
();
yObj
.
put
(
"icon"
,
icon
);
});
attachmentUploadDatasObj
.
put
(
"value"
,
value
);
String
accept
=
visualParams
.
getString
(
"accept"
);
String
label
=
visualParams
.
getString
(
"label"
);
...
...
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