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
dea7726b
Commit
dea7726b
authored
Sep 05, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
气瓶总览页面-地图接口修改
parent
d658de41
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
19 deletions
+33
-19
CylinderUnitDto.java
...oin/amos/boot/module/tzs/flc/api/dto/CylinderUnitDto.java
+14
-0
CylinderInfoMapper.java
...os/boot/module/tzs/flc/api/mapper/CylinderInfoMapper.java
+1
-1
ICylinderInfoService.java
...boot/module/tzs/flc/api/service/ICylinderInfoService.java
+1
-1
CylinderInfoMapper.xml
...-tzs-api/src/main/resources/mapper/CylinderInfoMapper.xml
+10
-13
CylinderUnitController.java
...module/tzs/flc/biz/controller/CylinderUnitController.java
+6
-3
CylinderInfoServiceImpl.java
...ule/tzs/flc/biz/service/impl/CylinderInfoServiceImpl.java
+1
-1
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/api/dto/CylinderUnitDto.java
View file @
dea7726b
...
...
@@ -86,4 +86,18 @@ public class CylinderUnitDto extends BaseDto {
@ApiModelProperty
(
value
=
"所属区域"
)
private
String
regionName
;
/**
* 气瓶数量
*/
private
String
cylinderNumber
;
/**
* 检验过期气瓶数
*/
private
String
cylinderOutOfDate
;
/**
* 许可有限期
*/
private
String
fillingPermitDate
;
}
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 @
dea7726b
...
...
@@ -22,7 +22,7 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
* @param sequenceNbr
* @return
*/
Map
<
String
,
Lo
ng
>
queryNumAndOutOfDateNum
(
@Param
(
"sequenceNbr"
)
Long
sequenceNbr
);
Map
<
String
,
Stri
ng
>
queryNumAndOutOfDateNum
(
@Param
(
"sequenceNbr"
)
Long
sequenceNbr
);
/**
* 获取上个月气瓶总量
...
...
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 @
dea7726b
...
...
@@ -16,5 +16,5 @@ public interface ICylinderInfoService {
* @param unitId
* @return
*/
Map
<
String
,
Lo
ng
>
queryNumAndOutOfDateNum
(
Long
unitId
);
Map
<
String
,
Stri
ng
>
queryNumAndOutOfDateNum
(
Long
unitId
);
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/resources/mapper/CylinderInfoMapper.xml
View file @
dea7726b
...
...
@@ -4,21 +4,18 @@
<select
id=
"queryNumAndOutOfDateNum"
resultType=
"java.util.Map"
>
SELECT
count( t.sequence_nbr ) AS cylinderNum,
count( CASE WHEN i.next_inspection_date
<![CDATA[ < ]]>
now() THEN 1 ELSE 0 END ) AS outOfDateNum
count( t.sequence_nbr ) AS cylinderNum,
l.expiry_date AS fillingPermitDate,
count( CASE WHEN i.next_inspection_date
<![CDATA[ < ]]>
now() THEN 1 ELSE 0 END ) AS outOfDateNum
FROM
tz_cylinder_info t
LEFT JOIN tz_cylinder_inspection AS i ON i.sequence_code=t.sequence_code
tz_cylinder_unit U
LEFT JOIN tz_cylinder_info AS t ON u.credit_code = t.credit_code
LEFT JOIN tz_cylinder_inspection AS i ON i.sequence_code = t.sequence_code and t.app_id = u.app_id
LEFT JOIN tz_base_unit_licence AS l ON l.unit_code = u.credit_code
WHERE
t.sequence_nbr IN ( SELECT max( tt.sequence_nbr ) FROM tz_cylinder_info tt GROUP BY tt.sequence_code )
AND t.app_id = (
SELECT
u.app_id
FROM
tz_cylinder_unit u
WHERE
u.sequence_nbr = #{sequenceNbr}
)
t.sequence_nbr IN ( SELECT max( tt.sequence_nbr ) FROM tz_cylinder_info tt GROUP BY tt.sequence_code )
AND u.sequence_nbr = #{sequenceNbr}
GROUP BY t.sequence_nbr
</select>
<sql
id=
"selectAPPIdByRegionCode"
>
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/CylinderUnitController.java
View file @
dea7726b
...
...
@@ -79,13 +79,16 @@ public class CylinderUnitController extends BaseController {
public
ResponseModel
<
CylinderUnitDto
>
selectOne
(
@RequestParam
Long
id
)
{
CylinderUnitDto
unit
=
cylinderUnitServiceImpl
.
queryBySeq
(
id
);
// 查询气瓶数量以及过期数量
Map
<
String
,
Lo
ng
>
cylinderInfo
=
iCylinderInfoService
.
queryNumAndOutOfDateNum
(
unit
.
getSequenceNbr
());
Map
<
String
,
Stri
ng
>
cylinderInfo
=
iCylinderInfoService
.
queryNumAndOutOfDateNum
(
unit
.
getSequenceNbr
());
if
(
cylinderInfo
!=
null
)
{
if
(
cylinderInfo
.
get
(
"cylinderNum"
)
!=
null
)
{
// unit.setCylinderNumber(cylinderInfo.get("cylinderNum"
));
unit
.
setCylinderNumber
(
String
.
valueOf
(
cylinderInfo
.
get
(
"cylinderNum"
)
));
}
if
(
cylinderInfo
.
get
(
"outOfDateNum"
)
!=
null
)
{
// unit.setCylinderOutOfDate(cylinderInfo.get("outOfDateNum"));
unit
.
setCylinderOutOfDate
(
String
.
valueOf
(
cylinderInfo
.
get
(
"outOfDateNum"
)));
}
if
(
cylinderInfo
.
get
(
"fillingPermitDate"
)
!=
null
){
unit
.
setFillingPermitDate
(
String
.
valueOf
(
cylinderInfo
.
get
(
"fillingPermitDate"
)));
}
}
return
ResponseHelper
.
buildResponse
(
unit
);
...
...
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 @
dea7726b
...
...
@@ -126,7 +126,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
}
@Override
public
Map
<
String
,
Lo
ng
>
queryNumAndOutOfDateNum
(
Long
unitId
)
{
public
Map
<
String
,
Stri
ng
>
queryNumAndOutOfDateNum
(
Long
unitId
)
{
return
baseMapper
.
queryNumAndOutOfDateNum
(
unitId
);
}
...
...
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