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
cc1553af
Commit
cc1553af
authored
Jun 20, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改气瓶基本信息、充装信息同步es接口
parent
5699726c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
87 additions
and
37 deletions
+87
-37
CylinderFillingRecordMapper.java
...odule/tzs/flc/api/mapper/CylinderFillingRecordMapper.java
+2
-0
CylinderInfoMapper.java
...os/boot/module/tzs/flc/api/mapper/CylinderInfoMapper.java
+3
-0
ICylinderFillingRecordService.java
...le/tzs/flc/api/service/ICylinderFillingRecordService.java
+2
-0
ICylinderInfoService.java
...boot/module/tzs/flc/api/service/ICylinderInfoService.java
+2
-0
CylinderFillingRecordMapper.xml
...src/main/resources/mapper/CylinderFillingRecordMapper.xml
+16
-0
CylinderInfoMapper.xml
...-tzs-api/src/main/resources/mapper/CylinderInfoMapper.xml
+14
-0
CylinderInfoController.java
...module/tzs/flc/biz/controller/CylinderInfoController.java
+36
-35
CylinderFillingRecordServiceImpl.java
...lc/biz/service/impl/CylinderFillingRecordServiceImpl.java
+6
-1
CylinderInfoServiceImpl.java
...ule/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
+6
-1
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/mapper/CylinderFillingRecordMapper.java
View file @
cc1553af
...
@@ -56,4 +56,6 @@ public interface CylinderFillingRecordMapper extends BaseMapper<CylinderFillingR
...
@@ -56,4 +56,6 @@ public interface CylinderFillingRecordMapper extends BaseMapper<CylinderFillingR
Double
getFillingSumByDate
(
@Param
(
"appId"
)
String
appId
,
@Param
(
"time"
)
Date
time
);
Double
getFillingSumByDate
(
@Param
(
"appId"
)
String
appId
,
@Param
(
"time"
)
Date
time
);
ESCylinderFillingRecordDto
getCyinderFillingRecordInfo
(
String
appId
,
String
sequenceCode
);
ESCylinderFillingRecordDto
getCyinderFillingRecordInfo
(
String
appId
,
String
sequenceCode
);
Integer
getCylinderFillingRecordTotal
();
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/mapper/CylinderInfoMapper.java
View file @
cc1553af
...
@@ -84,4 +84,7 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
...
@@ -84,4 +84,7 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
Page
<
CylinderInfoDto
>
getCyinderInfoList
(
Page
<
CylinderInfoDto
>
page
);
Page
<
CylinderInfoDto
>
getCyinderInfoList
(
Page
<
CylinderInfoDto
>
page
);
Page
<
CylinderInfoDto
>
cyinderOutInfoList
(
Page
<
CylinderInfoDto
>
page
,
CylinderInfoDto
cylinderInfoDto
,
String
sort
,
List
<
String
>
appids
);
Page
<
CylinderInfoDto
>
cyinderOutInfoList
(
Page
<
CylinderInfoDto
>
page
,
CylinderInfoDto
cylinderInfoDto
,
String
sort
,
List
<
String
>
appids
);
Integer
getInfoTotal
();
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/service/ICylinderFillingRecordService.java
View file @
cc1553af
...
@@ -21,4 +21,6 @@ public interface ICylinderFillingRecordService {
...
@@ -21,4 +21,6 @@ public interface ICylinderFillingRecordService {
Page
<
ESCylinderFillingRecordDto
>
queryByKeys
(
ESCylinderFillingRecordDto
esCylinderFillingRecordDto
,
int
pageNum
,
int
pageSize
);
Page
<
ESCylinderFillingRecordDto
>
queryByKeys
(
ESCylinderFillingRecordDto
esCylinderFillingRecordDto
,
int
pageNum
,
int
pageSize
);
void
saveCylinderFillingRecord2ES
(
List
<
ESCylinderFillingRecordDto
>
records
);
void
saveCylinderFillingRecord2ES
(
List
<
ESCylinderFillingRecordDto
>
records
);
Integer
getCylinderFillingRecordTotal
();
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/service/ICylinderInfoService.java
View file @
cc1553af
...
@@ -52,4 +52,6 @@ public interface ICylinderInfoService {
...
@@ -52,4 +52,6 @@ public interface ICylinderInfoService {
Page
<
ESCylinderInfoDto
>
queryByKeys
(
CylinderInfoDto
cylinderInfoDto
,
int
pageNum
,
int
pageSize
);
Page
<
ESCylinderInfoDto
>
queryByKeys
(
CylinderInfoDto
cylinderInfoDto
,
int
pageNum
,
int
pageSize
);
void
saveCylinderInfo2ES
(
List
<
CylinderInfoDto
>
records
);
void
saveCylinderInfo2ES
(
List
<
CylinderInfoDto
>
records
);
Integer
getInfoTotal
();
}
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/CylinderFillingRecordMapper.xml
View file @
cc1553af
...
@@ -209,4 +209,20 @@
...
@@ -209,4 +209,20 @@
ci.sequence_code = #{sequenceCode}
ci.sequence_code = #{sequenceCode}
and ci.app_id = #{appId}
and ci.app_id = #{appId}
</select>
</select>
<select
id=
"getCylinderFillingRecordTotal"
resultType=
"java.lang.Integer"
>
SELECT
COUNT(1)
FROM
tz_cylinder_filling_record r
LEFT JOIN tz_cylinder_filling b ON b.filling_before_id = r.filling_before_id
AND r.filling_before_id IS NOT NULL
AND date_format ( b.inspection_date, '%Y-%m-%d' ) = date_format ( r.filling_startTime, '%Y-%m-%d' )
LEFT JOIN tz_cylinder_filling_check af ON af.filling_check_id = r.filling_check_id
AND date_format ( af.inspection_date, '%Y-%m-%d' ) = date_format ( r.filling_startTime, '%Y-%m-%d' )
LEFT JOIN tz_cylinder_info i ON b.sequence_code = i.sequence_code
WHERE
r.is_not_es IS NULL
AND b.inspection_date NOT LIKE'16%'
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/CylinderInfoMapper.xml
View file @
cc1553af
...
@@ -324,4 +324,18 @@
...
@@ -324,4 +324,18 @@
where ci.is_not_es IS NULL
where ci.is_not_es IS NULL
AND region_code is not null
AND region_code is not null
</select>
</select>
<select
id=
"getInfoTotal"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM
tz_cylinder_info AS ci
LEFT JOIN cb_data_dictionary AS d1 ON d1.type = 'CZJZMC' AND d1.code = ci.filling_media
LEFT JOIN cb_data_dictionary AS d2 ON d2.sequence_nbr = ci.cylinder_variety
LEFT JOIN cb_data_dictionary AS d3 ON d3.sequence_nbr = ci.cylinder_status
LEFT JOIN tz_cylinder_tags AS ct ON ct.sequence_code = ci.sequence_code
LEFT JOIN tz_cylinder_unit AS cu ON ci.app_id = cu.app_id
where ci.is_not_es IS NULL
AND region_code is not null
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/CylinderInfoController.java
View file @
cc1553af
...
@@ -567,27 +567,29 @@ public class CylinderInfoController extends BaseController {
...
@@ -567,27 +567,29 @@ public class CylinderInfoController extends BaseController {
@GetMapping
(
value
=
"/saveCyinderInfo"
)
@GetMapping
(
value
=
"/saveCyinderInfo"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"气瓶基本信息存入es"
,
notes
=
"气瓶基本信息存入es"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"气瓶基本信息存入es"
,
notes
=
"气瓶基本信息存入es"
)
public
void
saveCyinderInfo
()
{
public
void
saveCyinderInfo
()
{
Page
<
CylinderInfoDto
>
cylinderInfoPage
=
new
Page
<>();
Page
<
CylinderInfoDto
>
cylinderInfoPage
=
new
Page
<>();
Integer
count
=
cylinderInfoServiceImpl
.
count
();
Integer
count
=
cylinderInfoServiceImpl
.
getInfoTotal
();
Integer
times
=
0
;
Integer
times
=
0
;
if
(
count
!=
0
)
{
if
(
count
!=
0
)
{
times
=
count
/
1000
;
times
=
count
/
1000
;
int
last
=
count
%
1000
;
int
last
=
count
%
1000
;
if
(
last
>
0
)
{
if
(
last
>
0
)
{
times
++;
times
++;
}
}
}
}
else
{
for
(
int
i
=
0
;
i
<=
times
;
i
++)
{
return
;
cylinderInfoPage
.
setCurrent
(
i
);
}
cylinderInfoPage
.
setSize
(
1000
);
for
(
int
i
=
0
;
i
<=
times
;
i
++)
{
cylinderInfoPage
=
cylinderInfoServiceImpl
.
getCyinderInfoList
(
cylinderInfoPage
);
cylinderInfoPage
.
setCurrent
(
i
);
if
(!
ObjectUtils
.
isEmpty
(
cylinderInfoPage
)){
cylinderInfoPage
.
setSize
(
1000
);
cylinderInfoPage
=
cylinderInfoServiceImpl
.
getCyinderInfoList
(
cylinderInfoPage
);
if
(!
ObjectUtils
.
isEmpty
(
cylinderInfoPage
))
{
cylinderInfoServiceImpl
.
saveCylinderInfo2ES
(
cylinderInfoPage
.
getRecords
());
cylinderInfoServiceImpl
.
saveCylinderInfo2ES
(
cylinderInfoPage
.
getRecords
());
}
}
// for (CylinderInfoDto ci : cylinderInfoPage.getRecords()) {
// for (CylinderInfoDto ci : cylinderInfoPage.getRecords()) {
// cylinderInfoServiceImpl.saveCylinderInfoToES(ci);
// cylinderInfoServiceImpl.saveCylinderInfoToES(ci);
// }
// }
}
}
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -640,31 +642,30 @@ public class CylinderInfoController extends BaseController {
...
@@ -640,31 +642,30 @@ public class CylinderInfoController extends BaseController {
@GetMapping
(
value
=
"/saveCyinderFillingRecord"
)
@GetMapping
(
value
=
"/saveCyinderFillingRecord"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"气瓶充装信息存入es"
,
notes
=
"气瓶充装信息存入es"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"气瓶充装信息存入es"
,
notes
=
"气瓶充装信息存入es"
)
public
void
saveCyinderFillingRecord
()
{
public
void
saveCyinderFillingRecord
()
{
Page
<
ESCylinderFillingRecordDto
>
recordDtoPage
=
new
Page
<>();
Page
<
ESCylinderFillingRecordDto
>
recordDtoPage
=
new
Page
<>();
Integer
count
=
cylinderFillingRecordServiceImpl
.
count
();
Integer
count
=
cylinderFillingRecordServiceImpl
.
getCylinderFillingRecordTotal
();
Integer
times
=
0
;
Integer
times
=
0
;
if
(
count
!=
0
)
{
if
(
count
!=
0
)
{
times
=
count
/
1000
;
times
=
count
/
1000
;
int
last
=
count
%
1000
;
int
last
=
count
%
1000
;
if
(
last
>
0
)
{
if
(
last
>
0
)
{
times
++;
times
++;
}
}
}
}
else
{
for
(
int
i
=
0
;
i
<=
times
;
i
++)
{
return
;
recordDtoPage
.
setCurrent
(
i
);
}
recordDtoPage
.
setSize
(
1000
);
for
(
int
i
=
0
;
i
<=
times
;
i
++)
{
recordDtoPage
.
setCurrent
(
1
);
recordDtoPage
.
setSize
(
1000
);
// CylinderFillingRecordDto cylinderFillingRecordDto = new CylinderFillingRecordDto();
// CylinderFillingRecordDto cylinderFillingRecordDto = new CylinderFillingRecordDto();
// if (StringUtils.isEmpty(cylinderFillingRecordDto.getSequenceCode())) {
// if (StringUtils.isEmpty(cylinderFillingRecordDto.getSequenceCode())) {
// cylinderFillingRecordDto.setAppId("9B150BB7D0C21A7A62BD6837E14A44BF");
// cylinderFillingRecordDto.setAppId("9B150BB7D0C21A7A62BD6837E14A44BF");
// }
// }
Page
<
ESCylinderFillingRecordDto
>
cyinderFillingRecord
=
cylinderFillingRecordServiceImpl
.
getCyinderFillingRecord
(
recordDtoPage
);
Page
<
ESCylinderFillingRecordDto
>
cyinderFillingRecord
=
cylinderFillingRecordServiceImpl
.
getCyinderFillingRecord
(
recordDtoPage
);
if
(!
ObjectUtils
.
isEmpty
(
cyinderFillingRecord
))
{
if
(!
ObjectUtils
.
isEmpty
(
cyinderFillingRecord
))
{
cylinderFillingRecordServiceImpl
.
saveCylinderFillingRecord2ES
(
cyinderFillingRecord
.
getRecords
());
cylinderFillingRecordServiceImpl
.
saveCylinderFillingRecord2ES
(
cyinderFillingRecord
.
getRecords
());
}
}
// for (ESCylinderFillingRecordDto ci : cyinderFillingRecord.getRecords()) {
}
// cylinderFillingRecordServiceImpl.saveCylinderFillingRecordToES(ci);
// }
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/CylinderFillingRecordServiceImpl.java
View file @
cc1553af
...
@@ -368,7 +368,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
...
@@ -368,7 +368,12 @@ public class CylinderFillingRecordServiceImpl extends BaseService<CylinderFillin
cylinderFillingRecordList
.
add
(
cylinderFillingRecord
);
cylinderFillingRecordList
.
add
(
cylinderFillingRecord
);
}
}
esCylinderFillingRecordRepository
.
saveAll
(
records
);
esCylinderFillingRecordRepository
.
saveAll
(
records
);
this
.
saveOrUpdateBatch
(
cylinderFillingRecordList
);
this
.
updateBatchById
(
cylinderFillingRecordList
);
}
@Override
public
Integer
getCylinderFillingRecordTotal
()
{
return
cylinderFillingRecordMapper
.
getCylinderFillingRecordTotal
();
}
}
@Override
@Override
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
View file @
cc1553af
...
@@ -733,7 +733,12 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
...
@@ -733,7 +733,12 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
CylinderInfoList
.
add
(
cylinderInfo
);
CylinderInfoList
.
add
(
cylinderInfo
);
}
}
esCylinderInfoRepository
.
saveAll
(
esCylinderInfoDto
);
esCylinderInfoRepository
.
saveAll
(
esCylinderInfoDto
);
this
.
saveOrUpdateBatch
(
CylinderInfoList
);
this
.
updateBatchById
(
CylinderInfoList
);
}
@Override
public
Integer
getInfoTotal
()
{
return
cylinderInfoMapper
.
getInfoTotal
();
}
}
@Override
@Override
...
...
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