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
727a8b9e
Commit
727a8b9e
authored
Oct 18, 2022
by
wanglong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
f4ce035f
56877241
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
EquipmentController.java
...s/boot/module/ugp/biz/controller/EquipmentController.java
+4
-1
EquipmentServiceImpl.java
...oot/module/ugp/biz/service/impl/EquipmentServiceImpl.java
+12
-5
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/EquipmentController.java
View file @
727a8b9e
...
...
@@ -168,7 +168,10 @@ public class EquipmentController extends BaseController {
public
ResponseModel
<
EquipmentDto
>
saveEquipment
(
@RequestBody
JSONObject
object
)
{
EquipmentDto
equipmentDto
=
equipmentServiceImpl
.
saveEI
(
object
);
Long
sequenceNbr
=
equipmentDto
.
getSequenceNbr
();
equipmentServiceImpl
.
saveAttachment
(
object
,
sequenceNbr
);
if
(
object
.
containsKey
(
"subForm"
)){
JSONArray
subForm
=
object
.
getJSONArray
(
"subForm"
);
equipmentServiceImpl
.
saveAttachment
(
subForm
,
sequenceNbr
);
}
return
ResponseHelper
.
buildResponse
(
equipmentDto
);
}
/**
...
...
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 @
727a8b9e
...
...
@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -90,11 +91,12 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
/**
* 根据sourceId添加附件
* @param object
* @param subForm
* @param SequenceNbr
*
*/
public
void
saveAttachment
(
JSON
Object
object
,
Long
SequenceNbr
){
public
void
saveAttachment
(
JSON
Array
subForm
,
Long
SequenceNbr
){
AttachmentDto
attachmentDto
=
new
AttachmentDto
();
JSONArray
subForm
=
object
.
getJSONArray
(
"subForm"
);
if
(!
subForm
.
isEmpty
()){
for
(
Object
o:
subForm
){
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
o
));
...
...
@@ -160,10 +162,15 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
model
.
setVerifyStatus
(
object
.
getString
(
"verifyStatus"
));
updateById
(
model
);
JSONArray
subForm
=
object
.
getJSONArray
(
"subForm"
);
attachment
.
setInfo
(
JSON
.
toJSONString
(
subForm
));
if
(
ValidationUtil
.
isEmpty
(
attachment
)){
saveAttachment
(
subForm
,
sequenceNbr
);
}
else
{
attachment
.
setInfo
(
JSON
.
toJSONString
(
subForm
));
attachmentServiceImpl
.
updateById
(
attachment
);
}
// new Attachment();
// BeanUtils.copyProperties(attachmentDto,attachment);
attachmentServiceImpl
.
updateById
(
attachment
);
}
...
...
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