Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
d060add7
Commit
d060add7
authored
Mar 05, 2019
by
gary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、fixbug
parent
1235d4d6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
EbsApiController.java
...in/java/pwc/taxtech/atms/controller/EbsApiController.java
+2
-2
EbsApiService.java
...src/main/java/pwc/taxtech/atms/service/EbsApiService.java
+1
-1
EbsApiServiceImpl.java
...java/pwc/taxtech/atms/service/impl/EbsApiServiceImpl.java
+16
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/EbsApiController.java
View file @
d060add7
...
...
@@ -142,13 +142,13 @@ public class EbsApiController {
return
ApiResultDto
.
fail
();
}
@RequestMapping
(
value
=
"/updateOrg"
,
method
=
RequestMethod
.
POST
)
public
ApiResultDto
updateOrg
(
@RequestBody
@Valid
List
<
OrganizationQueryDto
>
items
)
{
public
ApiResultDto
updateOrg
(
@Request
Param
(
"id"
)
Long
id
,
@Request
Body
@Valid
List
<
OrganizationQueryDto
>
items
)
{
if
(
CollectionUtils
.
isEmpty
(
items
))
{
logger
.
debug
(
"the updateOrg return items is empty"
);
return
ApiResultDto
.
success
(
Collections
.
emptyList
());
}
try
{
ebsApiService
.
queryRemoteServerThenUpdateOrg
(
items
);
ebsApiService
.
queryRemoteServerThenUpdateOrg
(
i
d
,
i
tems
);
return
ApiResultDto
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"updateOrg error."
,
e
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/EbsApiService.java
View file @
d060add7
...
...
@@ -67,5 +67,5 @@ public interface EbsApiService {
*
* @param items
*/
void
queryRemoteServerThenUpdateOrg
(
List
<
OrganizationQueryDto
>
items
);
void
queryRemoteServerThenUpdateOrg
(
L
ong
id
,
L
ist
<
OrganizationQueryDto
>
items
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/EbsApiServiceImpl.java
View file @
d060add7
...
...
@@ -48,6 +48,8 @@ public class EbsApiServiceImpl implements EbsApiService {
private
OrganizationEmployeeMapper
organizationEmployeeMapper
;
@Resource
private
OrganizationExtraMapper
organizationExtraMapper
;
@Resource
private
DataImportLogMapper
dataImportLogMapper
;
@Resource
private
DistributedIdService
distributedIdService
;
...
...
@@ -698,7 +700,7 @@ public class EbsApiServiceImpl implements EbsApiService {
result
.
setUpdateTime
(
new
Date
());
}
@Override
public
void
queryRemoteServerThenUpdateOrg
(
List
<
OrganizationQueryDto
>
items
)
{
public
void
queryRemoteServerThenUpdateOrg
(
L
ong
id
,
L
ist
<
OrganizationQueryDto
>
items
)
{
long
start
=
System
.
currentTimeMillis
();
logger
.
debug
(
"start queryRemoteServerThenUpdateOrg 机构表"
);
//判断数据是否存在
...
...
@@ -714,6 +716,7 @@ public class EbsApiServiceImpl implements EbsApiService {
logger
.
error
(
"break loop as catch:"
+
e
,
e
);
}
}
updateDataImportLog
(
id
,
items
.
size
());
logger
.
debug
(
"end queryRemoteServerThenUpdateOrg 机构表,took [{}] ms"
,
System
.
currentTimeMillis
()
-
start
);
}
...
...
@@ -766,6 +769,18 @@ public class EbsApiServiceImpl implements EbsApiService {
oe
.
setEmployeesNumEnd
(
a
.
getStaffSize
());
organizationEmployeeMapper
.
insertSelective
(
oe
);
}
private
void
updateDataImportLog
(
Long
id
,
int
size
)
{
DataImportLog
dataImportLog
=
new
DataImportLog
();
dataImportLog
.
setId
(
id
);
dataImportLog
.
setRecordSize
(
size
);
dataImportLog
.
setImportResult
(
true
);
dataImportLogMapper
.
updateByPrimaryKeySelective
(
dataImportLog
);
}
/**
* 获取格式化时间
* 返回时间类型 yyyy-MM-dd HH:mm:ss
...
...
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