造数
This commit is contained in:
parent
36ae04dbb5
commit
7e245ba65d
File diff suppressed because one or more lines are too long
@ -76,7 +76,26 @@ public class IPCPlcDataSyncThread implements Runnable {
|
||||
if (plcParams.getFieldValue().equals("rstatus")) {
|
||||
plcParams.setData(status);
|
||||
} else {
|
||||
plcParams.setData(Math.random());
|
||||
// plcParams.setData(Math.random());
|
||||
if("pz4".equals(plcParams.getFieldValue())){
|
||||
plcParams.setData(String.format("%.2f",(11+Math.random())));
|
||||
}else if("pz6".equals(plcParams.getFieldValue())){
|
||||
plcParams.setData(String.format("%.2f",(13+Math.random())));
|
||||
}else if("pz14".equals(plcParams.getFieldValue())){
|
||||
plcParams.setData(String.format("%.2f",(16+Math.random())));
|
||||
}else if("pz21".equals(plcParams.getFieldValue())){
|
||||
plcParams.setData(String.format("%.2f",(18+Math.random())));
|
||||
}else if("owc".equals(plcParams.getFieldValue())){//油水含量
|
||||
plcParams.setData(String.format("%.2f",(1+Math.random())));
|
||||
}else if("ov".equals(plcParams.getFieldValue())){//油品粘度
|
||||
plcParams.setData(String.format("%.0f",(680+10*Math.random())));
|
||||
}else if("rot".equals(plcParams.getFieldValue())){//回油温度
|
||||
plcParams.setData(String.format("%.2f",(60+3*Math.random())));
|
||||
}else if("oip".equals(plcParams.getFieldValue())){//进油压力
|
||||
plcParams.setData(String.format("%.2f",(-0.4+0.1*Math.random())));
|
||||
}else if("od".equals(plcParams.getFieldValue())){//油液密度
|
||||
plcParams.setData(String.format("%.0f",(880+10*Math.random())));
|
||||
}
|
||||
}
|
||||
// plcParams.setData(results.getValue(plcParams.getSourceField()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user