Commit 7cd9874a authored by zhangsen's avatar zhangsen

三小概览信息

parent a6fb06c7
......@@ -135,14 +135,22 @@ public class ConfigureController extends AbstractBaseController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取消防力量信息(队伍值班等)")
@GetMapping("/getFireTeamInfo")
public ResponseModel getFireTeamInfo() {
@ApiOperation(value = "获取消防力量信息(队伍值班等(专职))")
@GetMapping("/getFireTeamInfoBy116")
public ResponseModel getFireTeamInfoBy116() {
ReginParams reginParams = getSelectedOrgInfo();
String bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
return CommonResponseUtil.success(fireFightingSystemMapper.getFireTeamInfo(bizOrgCode));
return CommonResponseUtil.success(fireFightingSystemMapper.getFireTeamInfoBy116(bizOrgCode));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取消防力量信息(队伍值班等(志愿消防队))")
@GetMapping("/getFireTeamInfoBy117")
public ResponseModel getFireTeamInfoBy117() {
ReginParams reginParams = getSelectedOrgInfo();
String bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
return CommonResponseUtil.success(fireFightingSystemMapper.getFireTeamInfoBy117(bizOrgCode));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "消防车辆信息")
......
......@@ -268,7 +268,15 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
* @param bizOrgCode
* @return
*/
List<Map<String, Object>> getFireTeamInfo(@Param("bizOrgCode") String bizOrgCode);
Map<String, Object> getFireTeamInfoBy117(@Param("bizOrgCode") String bizOrgCode);
/**
* 获取消防力量信息(队伍值班等)
*
* @param bizOrgCode
* @return
*/
Map<String, Object> getFireTeamInfoBy116(@Param("bizOrgCode") String bizOrgCode);
/**
* 消防车辆信息
......@@ -276,7 +284,7 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
* @param bizOrgCode
* @return
*/
List<Map<String, Object>> getFireCarInfo(@Param("bizOrgCode") String bizOrgCode);
Map<String, Object> getFireCarInfo(@Param("bizOrgCode") String bizOrgCode);
/**
* 物联监控页面消防车辆信息
......
......@@ -2422,29 +2422,33 @@
) AS unConfirmInfoNum
</select>
<select id="getFireTeamInfo" resultType="java.util.Map">
<select id="getFireTeamInfoBy117" resultType="java.util.Map">
SELECT
ifnull( count( 0 ), 0 ) AS `total`,
ifnull( sum(( SELECT count( 0 ) FROM `d_duty_details` `duty` WHERE ( `duty`.`user_id` = `cou`.`sequence_nbr` ))), 0 ) AS `on_duty`,
'志愿消防队'
'志愿消防队' as typeName
FROM
( SELECT * FROM `cb_org_usr` WHERE `cb_org_usr`.`is_firefighters` = 1 AND `cb_org_usr`.`type_code` = 117
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
</if> ) `cou` UNION ALL
</if> ) `cou`
</select>
<select id="getFireTeamInfoBy116" resultType="java.util.Map">
SELECT
ifnull( count( 0 ), 0 ) AS `total`,
ifnull( sum(( SELECT count( 0 ) FROM `d_duty_details` `duty` WHERE ( `duty`.`user_id` = `cou`.`sequence_nbr` ))), 0 ) AS `on_duty`,
'专职驻站消防队'
ifnull( count( 0 ), 0 ) AS `total`,
ifnull( sum(( SELECT count( 0 ) FROM `d_duty_details` `duty` WHERE ( `duty`.`user_id` = `cou`.`sequence_nbr` ))), 0 ) AS `on_duty`,
'专职驻站消防队' as typeName
FROM
( SELECT * FROM `cb_org_usr` WHERE `cb_org_usr`.`is_firefighters` = 1 AND `cb_org_usr`.`type_code` = 116
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
</if> ) `cou`
( SELECT * FROM `cb_org_usr` WHERE `cb_org_usr`.`is_firefighters` = 1 AND `cb_org_usr`.`type_code` = 116
<if test="bizOrgCode!=null and bizOrgCode!=''">
AND biz_org_code = #{bizOrgCode,jdbcType=VARCHAR}
</if> ) `cou`
</select>
<select id="getFireCarInfo" resultType="java.util.Map">
SELECT
a.total,
IFNULL( sum( a.carStartState ), 0 ) AS carStartNum,
IFNULL( sum( a.carCloseState ), 0 ) AS carCloseNum
FROM
......@@ -2452,6 +2456,7 @@
SELECT
`wc`.`id` AS `id`,
`wc`.`name` AS `name`,
count(wc.id) as total,
max(
CASE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment