Commit 7cd9874a authored by zhangsen's avatar zhangsen

三小概览信息

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