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
df4e62ab
Commit
df4e62ab
authored
Nov 01, 2022
by
limei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备管理附件上传
parent
a5103e4c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+13
-13
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
View file @
df4e62ab
...
...
@@ -101,31 +101,31 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
*/
public
void
saveAttachment
(
JSONArray
subForm
,
Long
SequenceNbr
){
AttachmentDto
attachmentDto
=
new
AttachmentDto
();
attachmentDto
.
setInfo
(
JSON
.
toJSONString
(
subForm
));
attachmentDto
.
setSourceId
(
SequenceNbr
);
if
(!
subForm
.
isEmpty
()){
for
(
Object
o:
subForm
){
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
));
jsonObject
.
getString
(
"Symbol_key"
);
JSONArray
jsonArray
=
jsonObject
.
getJSONArray
(
"info"
);
for
(
Object
j:
jsonArray
){
JSONObject
info
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
j
));
String
name
=
info
.
getString
(
"name"
);
attachmentDto
.
setSourceId
(
SequenceNbr
);
attachmentDto
.
setName
(
info
.
getString
(
"name"
));
// attachmentDto.setInfo("name: "+name+","+
// "type: "+name.substring(name.lastIndexOf(".")+1)+","+
// "path: "+info.getString("url")+","+
// "certCode: "+jsonObject.getString("certCode")+","+
// "certType: "+jsonObject.getString("certType"));
attachmentDto
.
setInfo
(
JSON
.
toJSONString
(
subForm
));
attachmentDto
.
setType
(
name
.
substring
(
name
.
lastIndexOf
(
"."
)+
1
));
attachmentServiceImpl
.
createWithModel
(
attachmentDto
);
if
(!
ValidationUtil
.
isEmpty
(
jsonArray
))
{
for
(
Object
j
:
jsonArray
)
{
JSONObject
info
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
j
));
String
name
=
info
.
getString
(
"name"
);
attachmentDto
.
setName
(
info
.
getString
(
"name"
));
attachmentDto
.
setType
(
name
.
substring
(
name
.
lastIndexOf
(
"."
)+
1
));
break
;
}
break
;
}
}
attachmentServiceImpl
.
createWithModel
(
attachmentDto
);
}
}
@Override
public
EquipmentDto
saveEI
(
JSONObject
object
)
{
EquipmentDto
model
=
new
EquipmentDto
();
...
...
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