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
85a2391c
Commit
85a2391c
authored
Aug 12, 2022
by
litengwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6
parents
a787c647
4c1793e0
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
351 additions
and
11 deletions
+351
-11
BigScreen1VO.java
...yeejoin/amos/boot/module/common/api/dto/BigScreen1VO.java
+13
-0
FirefightersMapper.java
...mos/boot/module/common/api/mapper/FirefightersMapper.java
+4
-0
IFirefightersService.java
.../boot/module/common/api/service/IFirefightersService.java
+3
-4
FirefightersMapper.xml
...mmon-api/src/main/resources/mapper/FirefightersMapper.xml
+52
-0
BigScreenVo.java
...n/java/com/yeejoin/equipmanage/common/vo/BigScreenVo.java
+16
-0
FirefightersServiceImpl.java
...dule/common/biz/service/impl/FirefightersServiceImpl.java
+10
-0
BigScreenController.java
...m/yeejoin/equipmanage/controller/BigScreenController.java
+32
-0
FireFightingSystemMapper.java
.../yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
+28
-0
IFireFightingSystemService.java
...ejoin/equipmanage/service/IFireFightingSystemService.java
+8
-7
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+13
-0
BigScreenController.java
...s/boot/module/jcs/biz/controller/BigScreenController.java
+30
-0
FireFightingSystemMapper.xml
...ip/src/main/resources/mapper/FireFightingSystemMapper.xml
+142
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/BigScreen1VO.java
0 → 100644
View file @
85a2391c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.Map
;
@Data
public
class
BigScreen1VO
{
private
Map
<
String
,
Object
>
firefightersInfo
;
private
Integer
teamNum
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/FirefightersMapper.java
View file @
85a2391c
...
@@ -42,4 +42,8 @@ public interface FirefightersMapper extends BaseMapper<Firefighters> {
...
@@ -42,4 +42,8 @@ public interface FirefightersMapper extends BaseMapper<Firefighters> {
List
<
Firefighters
>
getPersonByCodes
(
@Param
(
"list"
)
List
<
String
>
list
);
List
<
Firefighters
>
getPersonByCodes
(
@Param
(
"list"
)
List
<
String
>
list
);
List
<
OrgUsrFireExcelDto
>
exportToExcelNew
(
Boolean
isDelete
,
String
name
,
String
postQualification
,
String
fireTeamId
,
String
state
,
String
areasExpertise
,
String
jobTitle
,
String
bizOrgCode
);
List
<
OrgUsrFireExcelDto
>
exportToExcelNew
(
Boolean
isDelete
,
String
name
,
String
postQualification
,
String
fireTeamId
,
String
state
,
String
areasExpertise
,
String
jobTitle
,
String
bizOrgCode
);
Integer
getTeamCountByCode
(
@Param
(
"companyCode"
)
String
companyCode
);
Map
<
String
,
Object
>
getFireForceInfoByCode
(
@Param
(
"companyCode"
)
String
companyCode
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IFirefightersService.java
View file @
85a2391c
...
@@ -4,10 +4,7 @@ import java.util.List;
...
@@ -4,10 +4,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersInfoDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersZhDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.PeopleInfoDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.Firefighters
;
import
com.yeejoin.amos.boot.module.common.api.entity.Firefighters
;
...
@@ -37,4 +34,6 @@ public interface IFirefightersService {
...
@@ -37,4 +34,6 @@ public interface IFirefightersService {
Firefighters
getFirefightersByUserId
(
String
sequenceNbr
);
Firefighters
getFirefightersByUserId
(
String
sequenceNbr
);
void
saveFirefightersByUser
(
PeopleInfoDto
firefighters
);
void
saveFirefightersByUser
(
PeopleInfoDto
firefighters
);
BigScreen1VO
getFireForceInfoByCode
(
String
companyCode
);
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FirefightersMapper.xml
View file @
85a2391c
...
@@ -451,4 +451,56 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr
...
@@ -451,4 +451,56 @@ LEFT JOIN cb_fire_team cft ON cff.fire_team_id = cft.sequence_nbr
<if
test=
'jobTitle!=null'
>
and f.job_title_code = #{jobTitle}
</if>
<if
test=
'jobTitle!=null'
>
and f.job_title_code = #{jobTitle}
</if>
<if
test=
'bizOrgCode!=null'
>
and f.biz_org_code like concat ('%',#{bizOrgCode},'%')
</if>
<if
test=
'bizOrgCode!=null'
>
and f.biz_org_code like concat ('%',#{bizOrgCode},'%')
</if>
</select>
</select>
<select
id=
"getTeamCountByCode"
resultType=
"java.lang.Integer"
>
SELECT
count( cft.sequence_nbr ) as teamNum
FROM
cb_fire_team cft
LEFT JOIN cb_org_usr ou ON ou.biz_org_code = cft.biz_org_code
WHERE
cft.is_delete = 0
<if
test=
"companyCode != null and companyCode != ''"
>
AND ou.`code` = #{companyCode}
</if>
</select>
<select
id=
"getFireForceInfoByCode"
resultType=
"java.util.Map"
>
SELECT
b.*,
( b.firefightersNum - b.fireCer ) AS unfireCer,
( b.opertNum - b.operCer ) AS unoperCer,
TRUNCATE ( abs(( b.fireCer ) / IF (( b.firefightersNum ) = 0, 1, b.firefightersNum )), 2 ) * 100 AS fireAbs,
TRUNCATE ( abs(( b.operCer ) / IF (( b.opertNum ) = 0, 1, b.opertNum )), 2 ) * 100 AS operAbs
FROM
(
SELECT
count( a.is_firefighters = 1 OR NULL ) AS firefightersNum,
count( a.is_firefighters = 0 OR NULL ) AS opertNum,
COUNT(( a.is_firefighters = 1 AND a.certificate_type IS NOT NULL ) OR NULL ) AS fireCer,
COUNT(( a.is_firefighters = 0 AND a.certificate_type IS NOT NULL ) OR NULL ) AS operCer
FROM
(
SELECT
u.sequence_nbr,
cfp.fire_management_post,
( CASE WHEN cf.fire_team_id IS NULL THEN 0 ELSE 1 END ) AS is_firefighters,
cfp.certificate_type
FROM
cb_org_usr u
LEFT JOIN cb_firefighters_post cfp ON cfp.org_usr_id = u.sequence_nbr
AND cfp.is_delete = 0
LEFT JOIN cb_firefighters cf ON cf.org_usr_id = u.sequence_nbr
AND cf.is_delete = 0
WHERE
u.is_delete = 0
AND u.biz_org_type = 'PERSON'
<if
test=
"companyCode != null and companyCode != ''"
>
AND u.`code` = #{companyCode}
</if>
GROUP BY
u.sequence_nbr
) a
) b
</select>
</mapper>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/vo/BigScreenVo.java
0 → 100644
View file @
85a2391c
package
com
.
yeejoin
.
equipmanage
.
common
.
vo
;
import
lombok.Data
;
import
java.util.Map
;
@Data
public
class
BigScreenVo
{
private
Map
<
String
,
Object
>
systemAlarmInfoNum
;
private
Map
<
String
,
Object
>
pool
;
private
Map
<
String
,
Object
>
industryPool
;
private
Integer
carNum
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FirefightersServiceImpl.java
View file @
85a2391c
...
@@ -273,4 +273,14 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
...
@@ -273,4 +273,14 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
}
}
return
personGenderMap
;
return
personGenderMap
;
}
}
@Override
public
BigScreen1VO
getFireForceInfoByCode
(
String
companyCode
)
{
BigScreen1VO
bigScreen1VO
=
new
BigScreen1VO
();
Integer
teamCount
=
firefightersMapper
.
getTeamCountByCode
(
companyCode
);
Map
<
String
,
Object
>
fireForceInfoByCode
=
firefightersMapper
.
getFireForceInfoByCode
(
companyCode
);
bigScreen1VO
.
setTeamNum
(
teamCount
);
bigScreen1VO
.
setFirefightersInfo
(
fireForceInfoByCode
);
return
bigScreen1VO
;
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/BigScreenController.java
0 → 100644
View file @
85a2391c
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
com.yeejoin.equipmanage.common.utils.CommonResponseUtil
;
import
com.yeejoin.equipmanage.common.vo.BigScreenVo
;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
@RestController
@Api
(
tags
=
"一张图大屏API"
)
@RequestMapping
(
value
=
"/bigScreen"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
class
BigScreenController
{
@Autowired
private
IFireFightingSystemService
iFireFightingSystemService
;
@GetMapping
(
value
=
"/list"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"系统、消防水池、工业水池、水源总容积、消防车辆"
,
notes
=
"系统、消防水池、工业水池、水源总容积、消防车辆"
)
public
ResponseModel
<
BigScreenVo
>
getSystemAlarmInfoNum
(
@RequestParam
(
required
=
false
,
value
=
"companyCode"
)
String
companyCode
)
{
return
CommonResponseUtil
.
success
(
iFireFightingSystemService
.
getSystemAlarmInfoNum
(
companyCode
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FireFightingSystemMapper.java
View file @
85a2391c
...
@@ -371,4 +371,32 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
...
@@ -371,4 +371,32 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
* @return
* @return
*/
*/
List
<
EquipmentExportVO
>
exportEquipmentList
(
@Param
(
"dto"
)
EquipTypeAmountPageDTO
dto
);
List
<
EquipmentExportVO
>
exportEquipmentList
(
@Param
(
"dto"
)
EquipTypeAmountPageDTO
dto
);
/**
* 获取系统告警信息
* @param companyCode
* @return
*/
Map
<
String
,
Object
>
getSystemAlarmInfoNum
(
@Param
(
"companyCode"
)
String
companyCode
);
/**
* 消防水池或者工业水池信息
* @param companyCode
* @return
*/
Map
<
String
,
Object
>
getWaterPoolInfoNum
(
@Param
(
"companyCode"
)
String
companyCode
,
@Param
(
"poolType"
)
String
poolType
);
/**
* 消防水源总量统计
* @param companyCode
* @return
*/
Map
<
String
,
Object
>
getWaterPoolVolumeInfo
(
@Param
(
"companyCode"
)
String
companyCode
);
/**
* 获取车辆总数
* @param companyCode
* @return
*/
Integer
getCarNum
(
@Param
(
"companyCode"
)
String
companyCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java
View file @
85a2391c
...
@@ -17,13 +17,7 @@ import com.yeejoin.equipmanage.common.entity.vo.EquipTypeImgAmountVO;
...
@@ -17,13 +17,7 @@ import com.yeejoin.equipmanage.common.entity.vo.EquipTypeImgAmountVO;
import
com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquiplistSpecificBySystemVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentAlarmBySystemIdOrSourceIdVO
;
import
com.yeejoin.equipmanage.common.entity.vo.EquipmentAlarmBySystemIdOrSourceIdVO
;
import
com.yeejoin.equipmanage.common.entity.vo.PointTreeVo
;
import
com.yeejoin.equipmanage.common.entity.vo.PointTreeVo
;
import
com.yeejoin.equipmanage.common.vo.AlarmDataVO
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.common.vo.EquipmentManageVo
;
import
com.yeejoin.equipmanage.common.vo.FireFightingSystem3dVo
;
import
com.yeejoin.equipmanage.common.vo.FireFightingSystemTreeVo
;
import
com.yeejoin.equipmanage.common.vo.FireFightingSystemTypeTreeVo
;
import
com.yeejoin.equipmanage.common.vo.FireFightingSystemVo
;
import
com.yeejoin.equipmanage.common.vo.SpeIndexVo
;
public
interface
IFireFightingSystemService
extends
IService
<
FireFightingSystemEntity
>
{
public
interface
IFireFightingSystemService
extends
IService
<
FireFightingSystemEntity
>
{
...
@@ -254,4 +248,11 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
...
@@ -254,4 +248,11 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
Page
<
Map
<
String
,
Object
>>
equipmentState
(
Page
result
,
HashMap
<
String
,
Object
>
hashMap
);
Page
<
Map
<
String
,
Object
>>
equipmentState
(
Page
result
,
HashMap
<
String
,
Object
>
hashMap
);
/**
* 获取系统告警数量等信息
* @param companyCode
* @return
*/
BigScreenVo
getSystemAlarmInfoNum
(
String
companyCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
85a2391c
...
@@ -1322,4 +1322,17 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -1322,4 +1322,17 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return
fireFightingSystemMapper
.
getWaterInfo
(
page
,
bizOrgCode
,
systemCode
);
return
fireFightingSystemMapper
.
getWaterInfo
(
page
,
bizOrgCode
,
systemCode
);
}
}
@Override
public
BigScreenVo
getSystemAlarmInfoNum
(
String
companyCode
)
{
BigScreenVo
bigScreenVo
=
new
BigScreenVo
();
Map
<
String
,
Object
>
systemAlarmInfoNum
=
fireFightingSystemMapper
.
getSystemAlarmInfoNum
(
companyCode
);
bigScreenVo
.
setSystemAlarmInfoNum
(
systemAlarmInfoNum
);
Map
<
String
,
Object
>
pool
=
fireFightingSystemMapper
.
getWaterPoolInfoNum
(
companyCode
,
"pool"
);
bigScreenVo
.
setPool
(
pool
);
Map
<
String
,
Object
>
industryPool
=
fireFightingSystemMapper
.
getWaterPoolInfoNum
(
companyCode
,
"industryPool"
);
bigScreenVo
.
setIndustryPool
(
industryPool
);
Integer
carNum
=
fireFightingSystemMapper
.
getCarNum
(
companyCode
);
bigScreenVo
.
setCarNum
(
carNum
);
return
bigScreenVo
;
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/BigScreenController.java
0 → 100644
View file @
85a2391c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.common.api.service.IFirefightersService
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
@RestController
@Api
(
tags
=
"一张图大屏Api"
)
@RequestMapping
(
value
=
"/bigScreen"
)
public
class
BigScreenController
{
@Autowired
private
IFirefightersService
iFirefightersService
;
@GetMapping
(
value
=
"/getFireForceInfoByCode"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消防车、消防力量信息(专职消防队、运维人员)"
,
notes
=
"消防车、消防力量信息(专职消防队、运维人员)"
)
public
ResponseModel
getFireForceInfoByCode
(
@RequestParam
(
required
=
false
,
value
=
"companyCode"
)
String
companyCode
)
{
return
CommonResponseUtil
.
success
(
iFirefightersService
.
getFireForceInfoByCode
(
companyCode
));
}
}
amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
View file @
85a2391c
...
@@ -2654,4 +2654,146 @@
...
@@ -2654,4 +2654,146 @@
</select>
</select>
<select
id=
"getSystemAlarmInfoNum"
resultType=
"java.util.Map"
>
SELECT
count( a.alarmNum > 0 OR NULL ) AS exceptionNum,
count( a.id ) AS totalSystemNum,
(
count( a.id ) - count( a.alarmNum
>
0 OR NULL )) AS normalNum,
(
TRUNCATE (
abs(((
count( a.id ) - count( a.alarmNum > 0 OR NULL )) /
IF
(( count( a.id ) = 0 ), 1, count( a.id ) ))),
2
) * 100
) AS normalAbs
FROM
(
SELECT
fs.id,
IFNULL( sum( esa.`status` ), 0 ) AS alarmNum
FROM
f_fire_fighting_system fs
LEFT JOIN cb_org_usr ou ON ou.biz_org_code = fs.biz_org_code
LEFT JOIN wl_equipment_specific_alarm esa ON FIND_IN_SET( fs.id, esa.system_ids )
<where>
<if
test=
"companyCode != null and companyCode != ''"
>
ou.`code` = #{companyCode}
</if>
</where>
GROUP BY
fs.id
) a
</select>
<select
id=
"getWaterPoolInfoNum"
resultType=
"java.util.Map"
>
SELECT
count( 1 ) AS totalNum,
count( a.nowLevel
<
a.minLevel OR NULL ) AS abnomalNum,
count( a.nowLevel
>
= a.minLevel OR NULL ) AS nomalNum,
(
TRUNCATE (
abs(((
count( a.nowLevel
>
= a.minLevel OR NULL )) /
IF
(( count( 1 ) = 0 ), 1, count( 1 ) ))),
2
) * 100
) AS normalAbs
FROM
(
SELECT
`ou`.`code` AS `code`,
ifnull( `rp`.`min_water_level`, 0 ) AS `minLevel`,
ifnull( `rp`.`max_water_level`, 0 ) AS `maxLevel`,
ifnull(
max((
CASE
WHEN ( `ei`.`name_key` = 'FHS_WirelessliquidDetector_WaterLevel' ) THEN
`ei`.`perf_value`
END
)),
ifnull( `rp`.`min_water_level`, 0 )) AS `nowLevel`
FROM
`cb_water_resource` `r`
LEFT JOIN `cb_org_usr` `ou` ON `ou`.`biz_org_code` = `r`.`biz_org_code`
LEFT JOIN `cb_water_resource_pool` `rp` ON `rp`.`resource_id` = `r`.`sequence_nbr`
LEFT JOIN `wl_equipment_specific` `es` ON `es`.`id` = `rp`.`level_device_id`
LEFT JOIN `wl_equipment_detail` `ed` ON `ed`.`id` = `es`.`equipment_detail_id`
LEFT JOIN `wl_equipment_index` `ei` ON `ei`.`equipment_id` = `ed`.`equipment_id`
WHERE
`r`.`is_delete` = 1
AND `ou`.`code` IS NOT NULL
<if
test=
"companyCode != null and companyCode != ''"
>
AND ou.`code` = #{companyCode}
</if>
AND `r`.`resource_type` = #{poolType}
GROUP BY
`r`.`sequence_nbr`
) a
</select>
<select
id=
"getWaterPoolVolumeInfo"
resultType=
"java.util.Map"
>
SELECT
IFNULL( sum( a.margin ), 0 ) AS margin,
IFNULL( sum( volume ), 0 ) AS volume
FROM
(
SELECT
`ou`.`code` AS `code`,
ifnull((
abs((
ifnull(
max((
CASE
WHEN ( `ei`.`name_key` = 'FHS_WirelessliquidDetector_WaterLevel' ) THEN
`ei`.`perf_value`
END
)),
ifnull( `rp`.`min_water_level`, 0 )) /
IF
((
ifnull( `rp`.`max_water_level`, 0 ) = 0
),
1,
ifnull( `rp`.`max_water_level`, 0 )))) * ifnull( `rp`.`volume`, 0 )),
0
) AS `margin`,
ifnull( `rp`.`volume`, 0 ) AS `volume`
FROM
`cb_water_resource` `r`
LEFT JOIN `cb_org_usr` `ou` ON `ou`.`biz_org_code` = `r`.`biz_org_code`
LEFT JOIN `cb_water_resource_pool` `rp` ON `rp`.`resource_id` = `r`.`sequence_nbr`
LEFT JOIN `wl_equipment_specific` `es` ON `es`.`id` = `rp`.`level_device_id`
LEFT JOIN `wl_equipment_detail` `ed` ON `ed`.`id` = `es`.`equipment_detail_id`
LEFT JOIN `wl_equipment_index` `ei` ON `ei`.`equipment_id` = `ed`.`equipment_id`
WHERE
`r`.`resource_type` IN ( 'pool', 'industryPool' )
AND `r`.`is_delete` = 1
AND `ou`.`code` IS NOT NULL
<if
test=
"companyCode != null and companyCode != ''"
>
AND ou.`code` = #{companyCode}
</if>
GROUP BY
`r`.`sequence_nbr`
) a
</select>
<select
id=
"getCarNum"
resultType=
"java.lang.Integer"
>
SELECT
count( wc.id ) as carNum
FROM
wl_car wc
LEFT JOIN cb_org_usr ou ON ou.amos_org_code = wc.org_code
<where>
<if
test=
"companyCode != null and companyCode != ''"
>
ou.`code` = #{companyCode}
</if>
</where>
</select>
</mapper>
</mapper>
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