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
980abfad
Commit
980abfad
authored
Jun 01, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(cylinder):气瓶区域信息查询
parent
6ac5532b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
CylinderUnitMapper.xml
...nder-api/src/main/resources/mapper/CylinderUnitMapper.xml
+13
-11
CylinderUnitController.java
...e/cylinder/flc/biz/controller/CylinderUnitController.java
+1
-1
No files found.
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-api/src/main/resources/mapper/CylinderUnitMapper.xml
View file @
980abfad
...
@@ -15,18 +15,20 @@
...
@@ -15,18 +15,20 @@
</select>
</select>
<select
id=
"getCylinderDataByLevel"
resultType=
"com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CityCylinderInfoDto"
>
<select
id=
"getCylinderDataByLevel"
resultType=
"com.yeejoin.amos.boot.module.cylinder.flc.api.dto.CityCylinderInfoDto"
>
SELECT
SELECT SUBSTRING_INDEX ( SUBSTRING_INDEX ( cu.region_code, '#', #{level} ), '#', - 1 ) AS regionCode,
SUBSTRING_INDEX(SUBSTRING_INDEX(cu.region_code, '#', #{level}), '#', -1) AS regionCode,
COUNT ( DISTINCT cu.sequence_nbr ) AS stationCount,
COUNT(DISTINCT cu.sequence_nbr) AS stationCount,
COUNT ( ci.app_id ) AS cylindersCount,
COUNT(ci.app_id) AS cylindersCount,
CASE
CASE
WHEN (SELECT COUNT(1) FROM tz_cylinder_inspection ins WHERE ins.app_id = cu.app_id
WHEN EXISTS (SELECT 1 FROM tz_cylinder_inspection ins
AND LENGTH(ins.next_inspection_date) >= 10
WHERE ins.app_id = cu.app_id
AND TO_DAYS(ins.next_inspection_date) - TO_DAYS(NOW())
<
= 30) > 0 THEN 1
AND LENGTH ( ins.next_inspection_date ) >= 10
WHEN (SELECT COUNT(1) FROM view_unit_outofdate v WHERE v.credit_code = cu.credit_code) > 0 THEN 1
AND TO_DAYS ( ins.next_inspection_date ) - TO_DAYS (NOW())
<
= 30)
ELSE 0
THEN 1
END AS "isAlarm"
WHEN EXISTS ( SELECT 1 FROM view_unit_outofdate v WHERE v.credit_code = cu.credit_code )
FROM tz_cylinder_unit cu LEFT JOIN tz_cylinder_info ci ON cu.app_id = ci.app_id GROUP BY regionCode
THEN 1 ELSE 0
END AS isAlarm
FROM tz_cylinder_unit cu LEFT JOIN tz_cylinder_info ci ON cu.app_id = ci.app_id
GROUP BY regionCode
</select>
</select>
<select
id=
"getWarnNum"
resultType=
"java.lang.Integer"
>
<select
id=
"getWarnNum"
resultType=
"java.lang.Integer"
>
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/biz/controller/CylinderUnitController.java
View file @
980abfad
...
@@ -84,7 +84,7 @@ public class CylinderUnitController extends BaseController {
...
@@ -84,7 +84,7 @@ public class CylinderUnitController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个气瓶企业信息"
,
notes
=
"根据sequenceNbr查询单个气瓶企业信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个气瓶企业信息"
,
notes
=
"根据sequenceNbr查询单个气瓶企业信息"
)
public
ResponseModel
<
CylinderUnitDto
>
selectOne
(
@RequestParam
Long
id
)
{
public
ResponseModel
<
CylinderUnitDto
>
selectOne
(
@RequestParam
Long
id
)
{
CylinderUnitDto
unit
=
cylinderUnitServiceImpl
.
queryBySeq
(
id
);
CylinderUnitDto
unit
=
cylinderUnitServiceImpl
.
queryBySeq
(
id
);
unit
.
setEvaluate
(
"
★★★★★
"
);
unit
.
setEvaluate
(
"
5
"
);
// 查询气瓶数量以及过期数量
// 查询气瓶数量以及过期数量
Map
<
String
,
String
>
cylinderInfo
=
iCylinderInfoService
.
queryNumAndOutOfDateNum
(
unit
.
getSequenceNbr
());
Map
<
String
,
String
>
cylinderInfo
=
iCylinderInfoService
.
queryNumAndOutOfDateNum
(
unit
.
getSequenceNbr
());
...
...
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