Commit ff3650a1 authored by lisong's avatar lisong

Merge remote-tracking branch 'origin/developer' into developer

parents ec536c21 fa0e1c65
...@@ -571,7 +571,7 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -571,7 +571,7 @@ public class FireFightingSystemController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(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); return fireFightingSystemService.getSpeIndex(id,1);
} }
......
...@@ -190,9 +190,6 @@ public class MaintenanceResourceDataController extends AbstractBaseController { ...@@ -190,9 +190,6 @@ public class MaintenanceResourceDataController extends AbstractBaseController {
if (!CollectionUtils.isEmpty(buildingIds)) { if (!CollectionUtils.isEmpty(buildingIds)) {
queryWrapper.in("building_id", buildingIds); queryWrapper.in("building_id", buildingIds);
} }
if (!ValidationUtil.isEmpty(fireFacilityId)) {
queryWrapper.eq("fire_fight_sys_id", fireFacilityId);
}
IPage<MaintenanceResourceData> page; IPage<MaintenanceResourceData> page;
if (pageNum != null && pageSize != null) { if (pageNum != null && pageSize != null) {
pageBean = new Page<>(pageNum, pageSize); pageBean = new Page<>(pageNum, pageSize);
......
...@@ -92,7 +92,7 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE ...@@ -92,7 +92,7 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
* *
* @return * @return
*/ */
List<SpeIndexVo> getSpeIndex(Long id); List<SpeIndexVo> getSpeIndex(Long id,int flag);
/** /**
* 列表查询 * 列表查询
......
...@@ -40,6 +40,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -40,6 +40,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.net.Inet4Address; import java.net.Inet4Address;
...@@ -404,8 +405,22 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste ...@@ -404,8 +405,22 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
} }
@Override @Override
public List<SpeIndexVo> getSpeIndex(Long id) { public List<SpeIndexVo> getSpeIndex(Long id,int flag) {
return makeStatus(fireFightingSystemMapper.getSpeIndex(id)); // 因此处代码其他地方有调用 增加表示判断 flag == 1 为 消防点位图处需要iot编码所用
if (flag == 1){
List<SpeIndexVo> speIndexVos = makeStatus(fireFightingSystemMapper.getSpeIndex(id));
if (!ValidationUtil.isEmpty(speIndexVos)){
EquipmentSpecific equipmentSpecific = equipmentSpecificSerivce.getBaseMapper().selectById(id);
if (!ValidationUtil.isEmpty(equipmentSpecific)){
SpeIndexVo speIndexVo = new SpeIndexVo();
speIndexVo.setName("设备编码");
speIndexVo.setValue(equipmentSpecific.getCode());
speIndexVos.add(0,speIndexVo);
}
}
return speIndexVos;
}
return makeStatus(fireFightingSystemMapper.getSpeIndex(id));
} }
private void insertFiles(FireFightingSystemVo vo) { private void insertFiles(FireFightingSystemVo vo) {
......
...@@ -323,7 +323,10 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -323,7 +323,10 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
equipmentStateVo.setStatus(""); equipmentStateVo.setStatus("");
equipmentStateVo.setColor(index.getEmergencyLevelColor()); equipmentStateVo.setColor(index.getEmergencyLevelColor());
// 添加性能指标项 // 添加性能指标项
equipmentStateVo.setSpeindexList(fireFightingSystemService.getSpeIndex(index.getEquipmentSpecificId())); //flag 无意义 getSpeIndex 方法其他地方共用 做了额外封装 为0时走原逻辑
int flag = 0;
equipmentStateVo.setSpeindexList(fireFightingSystemService.getSpeIndex(index.getEquipmentSpecificId(),flag));
Map<String, Object> topicObject = new HashMap<>(); Map<String, Object> topicObject = new HashMap<>();
topicObject.put("equipCode", equipmentStateVo.getEquipCode()); topicObject.put("equipCode", equipmentStateVo.getEquipCode());
if (TrueOrFalseEnum.real.value.toUpperCase().equals(index.getValue().toUpperCase())) { if (TrueOrFalseEnum.real.value.toUpperCase().equals(index.getValue().toUpperCase())) {
......
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
fire_fight_sys_id AS id, fire_fight_sys_id AS id,
fire_fight_sys_name name , fire_fight_sys_name name ,
owner_unit_id as parentId, owner_unit_id as parentId,
IFNULL(classify_type,3) IFNULL(classify_type,3) as type
FROM FROM
`mt_maintenance_resource_data` `mt_maintenance_resource_data`
GROUP BY GROUP BY
......
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