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
ec09224f
Commit
ec09224f
authored
Oct 18, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步接口修改
parent
c6d81d91
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
28 deletions
+53
-28
CylCylinderFillingCheckMapper.java
...ylinder/flc/api/mapper/CylCylinderFillingCheckMapper.java
+3
-1
CylCylinderFillingCheckMapper.xml
...c/main/resources/mapper/CylCylinderFillingCheckMapper.xml
+23
-18
CylSyncServiceImpl.java
...ule/cylinder/flc/biz/service/impl/CylSyncServiceImpl.java
+25
-7
CylinderSyncServiceImpl.java
...ylinder/flc/biz/service/impl/CylinderSyncServiceImpl.java
+2
-2
No files found.
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/api/mapper/CylCylinderFillingCheckMapper.java
View file @
ec09224f
...
...
@@ -29,8 +29,10 @@ public interface CylCylinderFillingCheckMapper extends BaseMapper<CylinderFillin
List
<
CylinderInfo
>
getCylinderInfoList
();
void
updateBatch
(
@Param
(
"sequenceNbrS"
)
List
<
Long
>
sequenceNbrS
);
List
<
CylinderFilling
>
queryUnSyncFilling
();
boolean
updataSyncFilling
(
List
<
String
>
appIds
,
List
<
String
>
fillingBeforeIds
,
List
<
String
>
sequenceCodes
);
boolean
updataSyncFilling
(
@Param
(
"ids"
)
List
<
Long
>
appIds
);
boolean
saveAndBatchInsert
(
@Param
(
"list"
)
List
<
CylinderFilling
>
list
);
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/resources/mapper/CylCylinderFillingCheckMapper.xml
View file @
ec09224f
...
...
@@ -71,24 +71,29 @@
<update
id=
"updataSyncFilling"
>
update tm_cylinder_filling set sync_state = 3
<where>
<if
test=
"appIds != null and appIds.size() > 0"
>
app_id in
<foreach
collection=
"appIds"
item=
"appId"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{appId}
</foreach>
</if>
<if
test=
"fillingBeforeIds != null and fillingBeforeIds.size() > 0"
>
and filling_before_id in
<foreach
collection=
"fillingBeforeIds"
item=
"fillingBeforeId"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{fillingBeforeId}
</foreach>
</if>
<if
test=
"sequenceCodes != null and sequenceCodes.size() > 0"
>
and sequence_code in
<foreach
collection=
"sequenceCodes"
item=
"sequenceCode"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{sequenceCode}
</foreach>
</if>
<!-- <if test="appIds != null and appIds.size() > 0">-->
<!-- app_id in-->
<!-- <foreach collection="appIds" item="appId" index="index" open="(" close=")" separator=",">-->
<!-- #{appId}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <if test="fillingBeforeIds != null and fillingBeforeIds.size() > 0">-->
<!-- and filling_before_id in-->
<!-- <foreach collection="fillingBeforeIds" item="fillingBeforeId" index="index" open="(" close=")" separator=",">-->
<!-- #{fillingBeforeId}-->
<!-- </foreach>-->
<!-- </if>-->
<!-- <if test="sequenceCodes != null and sequenceCodes.size() > 0">-->
<!-- and sequence_code in-->
<!-- <foreach collection="sequenceCodes" item="sequenceCode" index="index" open="(" close=")" separator=",">-->
<!-- #{sequenceCode}-->
<!-- </foreach>-->
<!-- </if>-->
sequence_nbr in
<foreach
collection=
"ids"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</where>
</update>
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/biz/service/impl/CylSyncServiceImpl.java
View file @
ec09224f
...
...
@@ -127,10 +127,18 @@ public class CylSyncServiceImpl {
public
Object
fillingSync
()
{
try
{
StopWatch
stopWatch
=
new
StopWatch
();
stopWatch
.
start
();
List
<
CylinderFilling
>
unSyncFilling
=
sourceFillingCheckServiceImpl
.
queryUnSyncFilling
();
stopWatch
.
stop
();
System
.
out
.
println
(
"查询时间:"
+
stopWatch
.
getTotalTimeSeconds
());
while
(!
unSyncFilling
.
isEmpty
())
{
fillingDataProcessing
(
unSyncFilling
);
StopWatch
stopWatch1
=
new
StopWatch
();
stopWatch1
.
start
();
unSyncFilling
=
sourceFillingCheckServiceImpl
.
queryUnSyncFilling
();
stopWatch1
.
stop
();
System
.
out
.
println
(
"查询2时间:"
+
stopWatch
.
getTotalTimeSeconds
());
}
}
catch
(
Exception
ex
)
{
return
"failed"
;
...
...
@@ -140,13 +148,14 @@ public class CylSyncServiceImpl {
@Transactional
(
rollbackFor
=
{
Exception
.
class
})
public
void
fillingDataProcessing
(
List
<
CylinderFilling
>
data
)
{
List
<
String
>
appIds
=
new
ArrayList
<>();
List
<
String
>
fillingBeforeIds
=
new
ArrayList
<>();
List
<
String
>
sequenceCodes
=
new
ArrayList
<>();
// List<String> appIds = new ArrayList<>();
// List<String> fillingBeforeIds = new ArrayList<>();
// List<String> sequenceCodes = new ArrayList<>();
List
<
Long
>
ids
=
data
.
stream
().
map
(
CylinderFilling:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
data
.
forEach
(
e
->
{
appIds
.
add
(
e
.
getAppId
());
fillingBeforeIds
.
add
(
e
.
getFillingBeforeId
());
sequenceCodes
.
add
(
e
.
getSequenceCode
());
//
appIds.add(e.getAppId());
//
fillingBeforeIds.add(e.getFillingBeforeId());
//
sequenceCodes.add(e.getSequenceCode());
String
isValid
=
e
.
getIsValid
();
if
(!
ObjectUtil
.
isEmpty
(
isValid
)
&&
(
"1"
.
equals
(
isValid
)
||
"0"
.
equals
(
isValid
)))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
Integer
.
valueOf
(
isValid
),
"isValid"
);
...
...
@@ -204,8 +213,17 @@ public class CylSyncServiceImpl {
}
});
StopWatch
stopWatch
=
new
StopWatch
();
stopWatch
.
start
();
cylCylinderFillingCheckMapper
.
saveAndBatchInsert
(
data
);
sourceFillingCheckServiceImpl
.
updataSyncFilling
(
appIds
,
fillingBeforeIds
,
sequenceCodes
);
stopWatch
.
stop
();
System
.
out
.
println
(
"插入时间:"
+
stopWatch
.
getTotalTimeSeconds
());
StopWatch
stopWatch1
=
new
StopWatch
();
stopWatch1
.
start
();
sourceFillingCheckServiceImpl
.
updataSyncFilling
(
ids
);
stopWatch1
.
stop
();
System
.
out
.
println
(
"更新时间:"
+
stopWatch1
.
getTotalTimeSeconds
());
}
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/biz/service/impl/CylinderSyncServiceImpl.java
View file @
ec09224f
...
...
@@ -54,8 +54,8 @@ public class CylinderSyncServiceImpl {
return
fillingCheckMapper
.
queryUnSyncFilling
();
}
public
boolean
updataSyncFilling
(
List
<
String
>
appIds
,
List
<
String
>
fillingBeforeIds
,
List
<
String
>
sequenceCode
s
){
return
fillingCheckMapper
.
updataSyncFilling
(
appIds
,
fillingBeforeIds
,
sequenceCode
s
);
public
boolean
updataSyncFilling
(
List
<
Long
>
id
s
){
return
fillingCheckMapper
.
updataSyncFilling
(
id
s
);
}
public
Long
fillingRecordSync
(){
...
...
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