|
|
@ -61,7 +61,20 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<DcEmergencyPlans> selectDcEmergencyPlansList(DcEmergencyPlans dcEmergencyPlans) { |
|
|
|
return dcEmergencyPlansMapper.selectDcEmergencyPlansList(dcEmergencyPlans); |
|
|
|
List<DcEmergencyPlans> dcEmergencyPlansList = dcEmergencyPlansMapper.selectDcEmergencyPlansList(dcEmergencyPlans); |
|
|
|
dcEmergencyPlansList.stream() |
|
|
|
.filter(dcEmergencyPlans1 -> StringUtils.isNotEmpty(dcEmergencyPlans1.getControllableDevice())) |
|
|
|
.forEach(dcEmergencyPlans1 -> { |
|
|
|
List<String> deviceIds = Arrays.asList(dcEmergencyPlans1.getControllableDevice().split(",")); |
|
|
|
List<DcDevice> deviceList = dcDeviceService.listByIds(deviceIds); |
|
|
|
StringBuilder stringBuilder = new StringBuilder(); |
|
|
|
deviceList.forEach(dcDevice -> { |
|
|
|
stringBuilder.append(","); |
|
|
|
stringBuilder.append(dcDevice.getDeviceName()); |
|
|
|
}); |
|
|
|
dcEmergencyPlans1.setControllableDeviceName(stringBuilder.toString().replaceFirst(",","")); |
|
|
|
}); |
|
|
|
return dcEmergencyPlansList; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|