iscs bas 大系统
This commit is contained in:
parent
aa6d80c73e
commit
df69a319d5
@ -28,7 +28,7 @@ func (p *AirPavilion) PortNum() int {
|
||||
// implement DevicePort
|
||||
type AirPavilionPort struct {
|
||||
port proto.Port
|
||||
device *CircuitBreaker
|
||||
device *AirPavilion
|
||||
}
|
||||
|
||||
func (p *AirPavilionPort) Port() proto.Port {
|
||||
|
@ -137,6 +137,86 @@ func buildIscsPipeModelRelationship(source *proto.Repository, repository *Reposi
|
||||
}
|
||||
var pipePortRelatedDevice DevicePort
|
||||
switch portRelatedDevice.DeviceType {
|
||||
case proto.DeviceType_DeviceType_AirPavilion: //管线关联风亭
|
||||
{
|
||||
airPavilion := relatedDevice.(*AirPavilion)
|
||||
pipePortRelatedDevice = &AirPavilionPort{port: portRelatedDevice.Port, device: airPavilion}
|
||||
airPavilion.PortA = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
}
|
||||
case proto.DeviceType_DeviceType_Valve: //管线关联风阀
|
||||
{
|
||||
valve := relatedDevice.(*Valve)
|
||||
pipePortRelatedDevice = &ValvePort{port: portRelatedDevice.Port, device: valve}
|
||||
switch portRelatedDevice.Port {
|
||||
case proto.Port_A:
|
||||
valve.PortA = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
case proto.Port_B:
|
||||
valve.PortB = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
}
|
||||
}
|
||||
case proto.DeviceType_DeviceType_GasMixingChamber:
|
||||
{
|
||||
gasMixingChamber := relatedDevice.(*GasMixingChamber)
|
||||
pipePortRelatedDevice = &GasMixingChamberPort{port: portRelatedDevice.Port, device: gasMixingChamber}
|
||||
switch portRelatedDevice.Port {
|
||||
case proto.Port_A:
|
||||
gasMixingChamber.PortA = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
case proto.Port_B:
|
||||
gasMixingChamber.PortB = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
case proto.Port_C:
|
||||
gasMixingChamber.PortC = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
case proto.Port_D:
|
||||
gasMixingChamber.PortD = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
}
|
||||
}
|
||||
case proto.DeviceType_DeviceType_CombinationAirConditioner:
|
||||
{
|
||||
combinationAirConditioner := relatedDevice.(*CombinationAirConditioner)
|
||||
pipePortRelatedDevice = &CombinationAirConditionerPort{port: portRelatedDevice.Port, device: combinationAirConditioner}
|
||||
switch portRelatedDevice.Port {
|
||||
case proto.Port_A:
|
||||
combinationAirConditioner.PortA = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
case proto.Port_B:
|
||||
combinationAirConditioner.PortB = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
case proto.Port_C:
|
||||
combinationAirConditioner.PortC = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
case proto.Port_D:
|
||||
combinationAirConditioner.PortD = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
}
|
||||
}
|
||||
case proto.DeviceType_DeviceType_AirPurificationDevice:
|
||||
{
|
||||
airPurificationDevice := relatedDevice.(*AirPurificationDevice)
|
||||
pipePortRelatedDevice = &AirPurificationDevicePort{port: portRelatedDevice.Port, device: airPurificationDevice}
|
||||
switch portRelatedDevice.Port {
|
||||
case proto.Port_A:
|
||||
airPurificationDevice.PortA = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
case proto.Port_B:
|
||||
airPurificationDevice.PortB = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
}
|
||||
}
|
||||
case proto.DeviceType_DeviceType_Fan:
|
||||
{
|
||||
fan := relatedDevice.(*Fan)
|
||||
pipePortRelatedDevice = &FanPort{port: portRelatedDevice.Port, device: fan}
|
||||
switch portRelatedDevice.Port {
|
||||
case proto.Port_A:
|
||||
fan.PortA = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
case proto.Port_B:
|
||||
fan.PortB = &PipePort{port: pipePort, pipe: pipeModel}
|
||||
}
|
||||
}
|
||||
case proto.DeviceType_DeviceType_GasEnvironment:
|
||||
{
|
||||
gasEnvironment := relatedDevice.(*GasEnvironment)
|
||||
pipePortRelatedDevice = &GasEnvironmentPort{port: portRelatedDevice.Port, device: gasEnvironment}
|
||||
switch portRelatedDevice.Port {
|
||||
case proto.Port_A:
|
||||
gasEnvironment.PortsA = append(gasEnvironment.PortsA, &PipePort{port: pipePort, pipe: pipeModel})
|
||||
case proto.Port_B:
|
||||
gasEnvironment.PortsB = append(gasEnvironment.PortsB, &PipePort{port: pipePort, pipe: pipeModel})
|
||||
}
|
||||
}
|
||||
case proto.DeviceType_DeviceType_PipeFitting:
|
||||
{
|
||||
pipeFitting := relatedDevice.(*PipeFitting)
|
||||
|
Loading…
Reference in New Issue
Block a user