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
a922791a
Commit
a922791a
authored
Oct 17, 2023
by
H2T
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filling表 完善同步接口
parent
c2efdfe3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
25 deletions
+62
-25
CylCylinderFillingCheckMapper.java
...ylinder/flc/api/mapper/CylCylinderFillingCheckMapper.java
+2
-2
CylCylinderFillingCheckMapper.xml
...c/main/resources/mapper/CylCylinderFillingCheckMapper.xml
+6
-2
CylSyncServiceImpl.java
...ule/cylinder/flc/biz/service/impl/CylSyncServiceImpl.java
+52
-19
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 @
a922791a
...
...
@@ -30,9 +30,9 @@ public interface CylCylinderFillingCheckMapper extends BaseMapper<CylinderFillin
void
updateBatch
(
@Param
(
"sequenceNbrS"
)
List
<
Long
>
sequenceNbrS
);
List
<
CylinderFilling
>
queryUnSyncFilling
();
void
updataSyncFilling
(
List
<
String
>
appIds
,
List
<
String
>
fillingBeforeIds
,
List
<
String
>
sequenceCodes
);
boolean
updataSyncFilling
(
List
<
String
>
appIds
,
List
<
String
>
fillingBeforeIds
,
List
<
String
>
sequenceCodes
);
void
batchInsert
(
@Param
(
"list"
)
List
<
CylinderFilling
>
list
);
boolean
batchInsert
(
@Param
(
"list"
)
List
<
CylinderFilling
>
list
);
Long
selectCountTotal
();
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/resources/mapper/CylCylinderFillingCheckMapper.xml
View file @
a922791a
...
...
@@ -122,10 +122,14 @@
) / 16 AS DECIMAL(10, 2)
) integrity
FROM tm_cylinder_filling cf
WHERE cf.sync_state != 3
WHERE
cf.sync_state != 3
and cf.filling_before_id is not null
and cf.sequence_code is not null
and cf.app_id is not null
ORDER BY
cf.sync_date DESC
LIMIT 10
LIMIT 10
000
</select>
<insert
id=
"batchInsert"
>
INSERT INTO tz_cylinder_filling (
...
...
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 @
a922791a
...
...
@@ -124,7 +124,6 @@ public class CylSyncServiceImpl {
public
Object
fillingSync
()
{
try
{
List
<
CylinderFilling
>
unSyncFilling
=
sourceFillingCheckServiceImpl
.
queryUnSyncFilling
();
while
(!
unSyncFilling
.
isEmpty
())
{
fillingDataProcessing
(
unSyncFilling
);
...
...
@@ -142,35 +141,69 @@ public class CylSyncServiceImpl {
List
<
String
>
fillingBeforeIds
=
new
ArrayList
<>();
List
<
String
>
sequenceCodes
=
new
ArrayList
<>();
data
.
forEach
(
e
->
{
CylinderFilling
clf
=
new
CylinderFilling
();
BeanUtils
.
copyProperties
(
e
,
clf
);
appIds
.
add
(
e
.
getAppId
());
fillingBeforeIds
.
add
(
e
.
getFillingBeforeId
());
sequenceCodes
.
add
(
e
.
getSequenceCode
());
if
(!
ObjectUtil
.
isEmpty
(
e
.
getIsValid
())
&&
(
"1"
==
e
.
getIsValid
()
||
"0"
==
e
.
getIsValid
())){
e
.
setIsValid
(
CylDictEnum
.
getEnum
(
Integer
.
valueOf
(
e
.
getIsValid
()),
"isValid"
).
getSeqNbr
().
toString
());
String
isValid
=
e
.
getIsValid
();
if
(!
ObjectUtil
.
isEmpty
(
isValid
)
&&
(
"1"
.
equals
(
isValid
)
||
"0"
.
equals
(
isValid
)))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
Integer
.
valueOf
(
isValid
),
"isValid"
);
if
(
cylDictEnum
!=
null
)
{
e
.
setIsValid
(
cylDictEnum
.
getSeqNbr
().
toString
());
}
}
if
(!
ObjectUtil
.
isEmpty
(
e
.
getSame
())
&&
(
1
==
e
.
getSame
()
||
0
==
e
.
getSame
())){
e
.
setSame
(
CylDictEnum
.
getEnum
(
e
.
getSame
(),
"same"
).
getSeqNbr
());
Integer
same
=
e
.
getSame
();
if
(!
ObjectUtil
.
isEmpty
(
same
)
&&
(
1
==
same
||
0
==
same
))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
same
,
"same"
);
if
(
cylDictEnum
!=
null
)
{
e
.
setSame
(
cylDictEnum
.
getSeqNbr
());
}
}
if
(!
ObjectUtil
.
isEmpty
(
e
.
getIsRegulations
())
&&
(
1
==
e
.
getIsRegulations
()
||
0
==
e
.
getIsRegulations
())){
e
.
setIsRegulations
(
CylDictEnum
.
getEnum
(
e
.
getIsRegulations
(),
"isRegulations"
).
getSeqNbr
());
Integer
isRegulations
=
e
.
getIsRegulations
();
if
(!
ObjectUtil
.
isEmpty
(
isRegulations
)
&&
(
1
==
isRegulations
||
0
==
isRegulations
))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
isRegulations
,
"isRegulations"
);
if
(
cylDictEnum
!=
null
)
{
e
.
setIsRegulations
(
cylDictEnum
.
getSeqNbr
());
}
}
if
(!
ObjectUtil
.
isEmpty
(
e
.
getIsComplianceWithgbt
())
&&
(
1
==
e
.
getIsComplianceWithgbt
()
||
0
==
e
.
getIsComplianceWithgbt
())){
e
.
setIsComplianceWithgbt
(
CylDictEnum
.
getEnum
(
e
.
getIsComplianceWithgbt
(),
"isComplianceWithGBT"
).
getSeqNbr
());
Integer
isComplianceWithgbt
=
e
.
getIsComplianceWithgbt
();
if
(!
ObjectUtil
.
isEmpty
(
isComplianceWithgbt
)
&&
(
1
==
isComplianceWithgbt
||
0
==
isComplianceWithgbt
))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
isComplianceWithgbt
,
"isComplianceWithGBT"
);
if
(
cylDictEnum
!=
null
)
{
e
.
setIsComplianceWithgbt
(
cylDictEnum
.
getSeqNbr
());
}
}
if
(!
ObjectUtil
.
isEmpty
(
e
.
getHaveStillPressure
())
&&
(
1
==
e
.
getHaveStillPressure
()
||
0
==
e
.
getHaveStillPressure
())){
e
.
setHaveStillPressure
(
CylDictEnum
.
getEnum
(
e
.
getHaveStillPressure
(),
"haveStillPressure"
).
getSeqNbr
());
Integer
haveStillPressure
=
e
.
getHaveStillPressure
();
if
(!
ObjectUtil
.
isEmpty
(
haveStillPressure
)
&&
(
1
==
haveStillPressure
||
0
==
haveStillPressure
))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
haveStillPressure
,
"haveStillPressure"
);
if
(
cylDictEnum
!=
null
)
{
e
.
setHaveStillPressure
(
cylDictEnum
.
getSeqNbr
());
}
}
if
(!
ObjectUtil
.
isEmpty
(
e
.
getIsComplete
())
&&
(
1
==
e
.
getIsComplete
()
||
0
==
e
.
getIsComplete
())){
e
.
setIsComplete
(
CylDictEnum
.
getEnum
(
e
.
getIsComplete
(),
"isComplete"
).
getSeqNbr
());
Integer
isComplete
=
e
.
getIsComplete
();
if
(!
ObjectUtil
.
isEmpty
(
isComplete
)
&&
(
1
==
isComplete
||
0
==
isComplete
))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
isComplete
,
"isComplete"
);
if
(
cylDictEnum
!=
null
)
{
e
.
setIsComplete
(
cylDictEnum
.
getSeqNbr
());
}
}
if
(!
ObjectUtil
.
isEmpty
(
e
.
getHaveSecurityDocuments
())
&&
(
1
==
e
.
getHaveSecurityDocuments
()
||
0
==
e
.
getHaveSecurityDocuments
())){
e
.
setHaveSecurityDocuments
(
CylDictEnum
.
getEnum
(
e
.
getHaveSecurityDocuments
(),
"SecurityDocuments"
).
getSeqNbr
());
Integer
haveSecurityDocuments
=
e
.
getHaveSecurityDocuments
();
if
(!
ObjectUtil
.
isEmpty
(
haveSecurityDocuments
)
&&
(
1
==
haveSecurityDocuments
||
0
==
haveSecurityDocuments
))
{
CylDictEnum
cylDictEnum
=
CylDictEnum
.
getEnum
(
haveSecurityDocuments
,
"SecurityDocuments"
);
if
(
cylDictEnum
!=
null
)
{
e
.
setHaveSecurityDocuments
(
cylDictEnum
.
getSeqNbr
());
}
}
});
sourceFillingCheckServiceImpl
.
updataSyncFilling
(
appIds
,
fillingBeforeIds
,
sequenceCodes
);
cylCylinderFillingCheckMapper
.
batchInsert
(
data
);
if
(
sourceFillingCheckServiceImpl
.
updataSyncFilling
(
appIds
,
fillingBeforeIds
,
sequenceCodes
)){
cylCylinderFillingCheckMapper
.
batchInsert
(
data
);
}
}
...
...
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 @
a922791a
...
...
@@ -54,8 +54,8 @@ public class CylinderSyncServiceImpl {
return
fillingCheckMapper
.
queryUnSyncFilling
();
}
public
void
updataSyncFilling
(
List
<
String
>
appIds
,
List
<
String
>
fillingBeforeIds
,
List
<
String
>
sequenceCodes
){
fillingCheckMapper
.
updataSyncFilling
(
appIds
,
fillingBeforeIds
,
sequenceCodes
);
public
boolean
updataSyncFilling
(
List
<
String
>
appIds
,
List
<
String
>
fillingBeforeIds
,
List
<
String
>
sequenceCodes
){
return
fillingCheckMapper
.
updataSyncFilling
(
appIds
,
fillingBeforeIds
,
sequenceCodes
);
}
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