Commit 899d71c1 authored by 高建强's avatar 高建强

item:预案接口优化

parent a9e71634
......@@ -22,5 +22,5 @@ public interface IEquipmentDao extends BaseDao<Equipment, Long> {
int countByStatus(int status);
@Query(value = "SELECT ss.equipment_specific_id FROM(SELECT si.equipment_specific_id, si.equipment_index_id FROM wl_equipment_specific_index si WHERE si.equipment_specific_id IN ( SELECT fe.fire_equipment_id FROM f_equipment_fire_equipment fe WHERE fe.equipment_id = ?1 ) ) ss LEFT JOIN wl_equipment_index ei ON ss.equipment_index_id = ei.id WHERE ei.type_code = ?2", nativeQuery = true)
List<EquipmentSpecificIndexVo> getReserveEquipById(Long id, String typeCode);
List<Object> getReserveEquipById(Long id, String typeCode);
}
......@@ -516,7 +516,7 @@ public class EquipmentServiceImpl implements IEquipmentService {
}
@Override
public List<EquipmentSpecificIndexVo> getReserveEquipById(Long id, String typeCode) {
public List<Object> getReserveEquipById(Long id, String typeCode) {
return iEquipmentDao.getReserveEquipById(id, typeCode);
}
......
......@@ -1052,10 +1052,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
if (count > NumberEnum.ZERO.getValue()) {
return ReserveEnum.RUNNING;
} else {
List<EquipmentSpecificIndexVo> list = equipmentService.getReserveEquipById(id, typeCode);
List<Object> list = equipmentService.getReserveEquipById(id, typeCode);
if (!CollectionUtils.isEmpty(list)) {
EquipmentSpecificIndexVo equipmentSpecificIndexVo = new EquipmentSpecificIndexVo();
equipmentSpecificIndexVo.setEquipmentSpecificId(list.get(NumberEnum.ZERO.getValue()).getEquipmentSpecificId());
equipmentSpecificIndexVo.setEquipmentSpecificId(Long.parseLong(list.get(NumberEnum.ZERO.getValue()).toString()));
equipmentSpecificIndexVo.setType(typeCode);
TopicEntityVo topicEntity = new TopicEntityVo();
......
......@@ -116,5 +116,5 @@ public interface IEquipmentService {
* @param firealarm
* @return
*/
List<EquipmentSpecificIndexVo> getReserveEquipById(Long id, String typeCode);
List<Object> getReserveEquipById(Long id, String typeCode);
}
......@@ -587,7 +587,7 @@
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_user_id` varchar(20) NULL COMMENT '驻站消防队队长';
</sql>
</changeSet>
<changeSet author="gaojianqiang" id="1609989888-1">
<changeSet author="gaojianqiang" id="1609989898-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_equipment" columnName="status" />
......@@ -595,7 +595,7 @@
</preConditions>
<comment>修改f_equipment表结构</comment>
<sql>
ALTER TABLE `f_equipment` ADD COLUMN `status` tinyint(4) NULL DEFAULT NULL COMMENT '预案状态:1-启动,0-未启动',
ALTER TABLE `f_equipment` ADD COLUMN `status` tinyint(4) NULL DEFAULT 0 COMMENT '预案状态:1-启动,0-未启动',
ALTER TABLE `f_equipment` ADD COLUMN `start_time` datetime(0) NULL DEFAULT NULL COMMENT '预案开始时间',
ALTER TABLE `f_equipment` ADD COLUMN `end_time` datetime(0) NULL DEFAULT NULL COMMENT '预案结束时间',
ALTER TABLE `f_equipment` ADD COLUMN `reserve_source` tinyint(4) NULL DEFAULT 0 COMMENT '预案来源:1-手动触发,0-自动触发(默认)';
......
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