Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
4a9616d6
Commit
4a9616d6
authored
May 18, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_upgrade' into dev_upgrade
parents
46858363
20891247
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
13 deletions
+29
-13
EmergencyTaskController.java
...amos/fas/business/controller/EmergencyTaskController.java
+29
-13
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/EmergencyTaskController.java
View file @
4a9616d6
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.fas.core.common.request.CommonPageable;
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import
com.yeejoin.amos.fas.dao.entity.Dict
;
import
com.yeejoin.amos.fas.dao.entity.Dict
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyRelation
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyRelation
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyRelationTree
;
import
com.yeejoin.amos.fas.dao.entity.EmergencyRelationTree
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
...
@@ -105,20 +106,35 @@ public class EmergencyTaskController extends BaseController{
...
@@ -105,20 +106,35 @@ public class EmergencyTaskController extends BaseController{
@PostMapping
(
value
=
"/savePerson"
,
produces
=
"application/json;charset=UTF-8"
)
@PostMapping
(
value
=
"/savePerson"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
savePerson
(
@RequestBody
EmergencyRelationVo
vo
){
public
CommonResponse
savePerson
(
@RequestBody
EmergencyRelationVo
vo
){
List
<
Long
>
personIds
=
vo
.
getPersonIds
();
List
<
Long
>
personIds
=
vo
.
getPersonIds
();
List
<
Long
>
oldPersonIds
=
iEmergencyTaskService
.
getPersonIds
(
vo
.
getObligationId
());
String
ids
=
StringUtils
.
join
(
oldPersonIds
,
","
);
List
<
Object
>
objects
=
jcsFeign
.
listCompanyByIds
(
personIds
);
List
<
Object
>
objects
=
jcsFeign
.
listCompanyByIds
(
personIds
);
objects
.
forEach
(
e
->
StringBuffer
stringBuffer
=
new
StringBuffer
();
{
for
(
Object
e
:
objects
)
{
String
json
=
JSONObject
.
toJSONString
(
e
);
String
json
=
JSONObject
.
toJSONString
(
e
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
json
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
json
);
EmergencyRelation
emergencyRelation
=
new
EmergencyRelation
();
if
(
ids
.
contains
(
jsonObject
.
get
(
"sequenceNbr"
).
toString
())){
emergencyRelation
.
setObligationId
(
vo
.
getObligationId
());
stringBuffer
.
append
(
jsonObject
.
get
(
"bizOrgName"
).
toString
()+
" "
);
emergencyRelation
.
setPersonId
(
Long
.
valueOf
(
jsonObject
.
get
(
"sequenceNbr"
).
toString
()));
continue
;
emergencyRelation
.
setPersonName
(
jsonObject
.
get
(
"bizOrgName"
).
toString
());
}
emergencyRelation
.
setAmosOrgId
(
Long
.
valueOf
(
jsonObject
.
get
(
"amosOrgId"
).
toString
()));
EmergencyRelation
emergencyRelation
=
new
EmergencyRelation
();
emergencyRelation
.
setCreateDate
(
new
Date
());
emergencyRelation
.
setObligationId
(
vo
.
getObligationId
());
iEmergencyTaskService
.
save
(
emergencyRelation
);
emergencyRelation
.
setPersonId
(
Long
.
valueOf
(
jsonObject
.
get
(
"sequenceNbr"
).
toString
()));
}
emergencyRelation
.
setPersonName
(
jsonObject
.
get
(
"bizOrgName"
).
toString
());
);
emergencyRelation
.
setAmosOrgId
(
Long
.
valueOf
(
jsonObject
.
get
(
"amosOrgId"
).
toString
()));
emergencyRelation
.
setCreateDate
(
new
Date
());
iEmergencyTaskService
.
save
(
emergencyRelation
);
}
if
(
stringBuffer
.
length
()>
0
){
stringBuffer
.
append
(
"已存在"
);
return
CommonResponseUtil
.
failure
(
stringBuffer
.
toString
());
}
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
}
}
...
...
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