Commit db69e2f5 authored by KeYong's avatar KeYong

提交系统信息查询接口

parent 96cb9c8b
...@@ -603,7 +603,7 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -603,7 +603,7 @@ public class FireFightingSystemController extends AbstractBaseController {
* @return * @return
*/ */
@RequestMapping(value = "/getSpeIndex", method = RequestMethod.GET) @RequestMapping(value = "/getSpeIndex", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询") @ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public List<SpeIndexVo> selectById(Long id) { public List<SpeIndexVo> selectById(Long id) {
return fireFightingSystemService.getSpeIndex(id,1); return fireFightingSystemService.getSpeIndex(id,1);
...@@ -881,7 +881,14 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -881,7 +881,14 @@ public class FireFightingSystemController extends AbstractBaseController {
ExcelUtil.createTemplate(response, "装备信息", "装备信息", list, EquipmentExportVO.class, null, false); ExcelUtil.createTemplate(response, "装备信息", "装备信息", list, EquipmentExportVO.class, null, false);
} }
/**
* 获取消防系统状态信息
* @throws Exception
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "获取消防系统状态信息", notes = "获取消防系统状态信息")
@GetMapping(value = "/state/info")
public Object getSystemInfoList() throws Exception {
return fireFightingSystemService.getSystemInfoList();
}
} }
...@@ -613,4 +613,6 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE ...@@ -613,4 +613,6 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Page<Map<String, String>> getEquipExpiryListByPage(@Param("page") Page page, @Param("bizOrgCode") String bizOrgCode, @Param("expiryDayNum") Integer expiryDayNum); Page<Map<String, String>> getEquipExpiryListByPage(@Param("page") Page page, @Param("bizOrgCode") String bizOrgCode, @Param("expiryDayNum") Integer expiryDayNum);
List<Map<String, Integer>> getStockEquipStatistics(@Param("bizOrgCode") String bizOrgCode); List<Map<String, Integer>> getStockEquipStatistics(@Param("bizOrgCode") String bizOrgCode);
List<Map<String, Object>> getSystemInfoList();
} }
...@@ -289,4 +289,6 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE ...@@ -289,4 +289,6 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
Page<Map<String, String>> getEquipExpiryListByPage(String bizOrgCode, Integer expiryDayNum, Page page); Page<Map<String, String>> getEquipExpiryListByPage(String bizOrgCode, Integer expiryDayNum, Page page);
List<Map<String, Integer>> getStockEquipStatistics(String bizOrgCode); List<Map<String, Integer>> getStockEquipStatistics(String bizOrgCode);
List<Map<String, Object>> getSystemInfoList();
} }
...@@ -2018,4 +2018,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -2018,4 +2018,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
public List<Map<String, Integer>> getStockEquipStatistics(String bizOrgCode) { public List<Map<String, Integer>> getStockEquipStatistics(String bizOrgCode) {
return fireFightingSystemMapper.getStockEquipStatistics(bizOrgCode); return fireFightingSystemMapper.getStockEquipStatistics(bizOrgCode);
} }
@Override
public List<Map<String, Object>> getSystemInfoList() {
return fireFightingSystemMapper.getSystemInfoList();
}
} }
...@@ -5172,4 +5172,21 @@ ...@@ -5172,4 +5172,21 @@
AND 60 >= DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE ) AND 60 >= DATEDIFF( DATE_ADD( DATE_FORMAT( ed.production_date, '%Y-%m-%d' ), INTERVAL e.expiry_date YEAR ), CURRENT_DATE )
) AS countNum ) AS countNum
</select> </select>
<select id="getSystemInfoList" resultType="java.util.Map">
SELECT
fs.id,
fs.`code`,
fs.`name`,
fs.system_type_code as 'sysTypeCode',
CASE WHEN (SELECT
count(1)
FROM
wl_equipment_specific_alarm
WHERE `status` = 1 AND find_in_set(fs.id,system_ids))>0 THEN
'异常'
ELSE '正常'
END as 'status'
FROM
f_fire_fighting_system fs
</select>
</mapper> </mapper>
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