修改成工院实训室项目生成设备配置的逻辑
This commit is contained in:
parent
352ef75923
commit
57209785ad
|
@ -583,14 +583,22 @@ public class DeviceServiceImpl implements DeviceService {
|
|||
plcGateway.setConfig(plcGatewayConfigVO.toJson());
|
||||
list.add(plcGateway);
|
||||
//SIGNAL
|
||||
ProjectDevice signal = new ProjectDevice();
|
||||
signal.setProjectCode(projectCode);
|
||||
signal.setCode(prefix + "signal");
|
||||
signal.setType(ProjectDeviceType.SIGNAL.name());
|
||||
signal.setCreator(accountVO.getId());
|
||||
signal.setCreateTime(now);
|
||||
signal.setConfig(new CgySignalConfigVO().toJson());
|
||||
list.add(signal);
|
||||
ProjectDevice signal1 = new ProjectDevice();
|
||||
signal1.setProjectCode(projectCode);
|
||||
signal1.setCode(prefix + "signal");
|
||||
signal1.setType(ProjectDeviceType.SIGNAL.name());
|
||||
signal1.setCreator(accountVO.getId());
|
||||
signal1.setCreateTime(now);
|
||||
signal1.setConfig(new CgySignalConfigVO(null, 2, 3, 4, 11, 12, 13).toJson());
|
||||
list.add(signal1);
|
||||
ProjectDevice signal2 = new ProjectDevice();
|
||||
signal2.setProjectCode(projectCode);
|
||||
signal2.setCode(prefix + "signal");
|
||||
signal2.setType(ProjectDeviceType.SIGNAL.name());
|
||||
signal2.setCreator(accountVO.getId());
|
||||
signal2.setCreateTime(now);
|
||||
signal2.setConfig(new CgySignalConfigVO(null, 5, 6, 7, 14, 15, 16).toJson());
|
||||
list.add(signal2);
|
||||
//SWITCH
|
||||
ProjectDevice aSwitch = new ProjectDevice();
|
||||
aSwitch.setProjectCode(projectCode);
|
||||
|
|
|
@ -13,26 +13,38 @@ public class CgySignalConfigVO extends RealConfigVO {
|
|||
/**
|
||||
* 红
|
||||
*/
|
||||
private Integer r_red = 3;
|
||||
private Integer r_red;
|
||||
|
||||
/**
|
||||
* 绿
|
||||
*/
|
||||
private Integer r_green = 4;
|
||||
private Integer r_green;
|
||||
|
||||
/**
|
||||
* 黄
|
||||
*/
|
||||
private Integer r_yellow = 5;
|
||||
private Integer r_yellow;
|
||||
|
||||
private Integer w_red = 12;
|
||||
private Integer w_red;
|
||||
|
||||
private Integer w_green = 13;
|
||||
private Integer w_green;
|
||||
|
||||
private Integer w_yellow = 14;
|
||||
private Integer w_yellow;
|
||||
|
||||
public CgySignalConfigVO(String signalCode, Integer r_red,
|
||||
Integer r_green, Integer r_yellow, Integer w_red, Integer w_green, Integer w_yellow) {
|
||||
super(0, 24);
|
||||
this.signalCode = signalCode;
|
||||
this.r_red = r_red;
|
||||
this.r_green = r_green;
|
||||
this.r_yellow = r_yellow;
|
||||
this.w_red = w_red;
|
||||
this.w_green = w_green;
|
||||
this.w_yellow = w_yellow;
|
||||
}
|
||||
|
||||
public CgySignalConfigVO() {
|
||||
super(0, 16);
|
||||
super(0, 32);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,20 +23,20 @@ public class CgySwitchConfigVO extends RealConfigVO {
|
|||
/**
|
||||
* 锁接
|
||||
*/
|
||||
private Integer w_sj = 9;
|
||||
private Integer w_sj = 8;
|
||||
|
||||
/**
|
||||
* 定操
|
||||
*/
|
||||
private Integer w_dc = 10;
|
||||
private Integer w_dc = 9;
|
||||
|
||||
/**
|
||||
* 反操
|
||||
*/
|
||||
private Integer w_fc = 11;
|
||||
private Integer w_fc = 10;
|
||||
|
||||
public CgySwitchConfigVO() {
|
||||
super(0, 40);
|
||||
super(0, 32);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue