现场调度修改
This commit is contained in:
@@ -99,8 +99,17 @@ public class GetDeviceSsjMap {
|
||||
dto.setRotationDirection(calcRotationDirection(d.getTaskNo()));
|
||||
dto.setAlarm(String.valueOf(d.getException()));
|
||||
dto.setAlarmMsg(DictUtils.getDictLabel("ssj_ex", String.valueOf(d.getException())));
|
||||
dto.setDW(String.valueOf(d.getDw()));
|
||||
dto.setKX(String.valueOf(d.getKx()));
|
||||
if (!dto.getTaskNo().equals("0")){
|
||||
if (dto.getKX().equals("0")){
|
||||
dto.setDW("1");
|
||||
}else {
|
||||
dto.setDW("0");
|
||||
}
|
||||
}else {
|
||||
dto.setDW("0");
|
||||
}
|
||||
|
||||
if (d.getTaskNo() > 0) {
|
||||
try {
|
||||
MydoJob job = mydoJobService.selectMydoJobByTaskNo(Long.valueOf(d.getTaskNo()));
|
||||
@@ -128,16 +137,10 @@ public class GetDeviceSsjMap {
|
||||
*/
|
||||
private String calcRotationDirection(int taskNo) {
|
||||
try {
|
||||
if (taskNo <= 0) return "0";
|
||||
MydoJob job = mydoJobService.selectMydoJobByTaskNo((long) taskNo);
|
||||
if (job == null || job.getInOrOut() == null) return "0";
|
||||
int val;
|
||||
try {
|
||||
val = Integer.parseInt(job.getInOrOut());
|
||||
} catch (NumberFormatException e) {
|
||||
if (taskNo <= 0) {
|
||||
return "0";
|
||||
}
|
||||
return val >= 20 ? "2" : "1";
|
||||
return taskNo <= 50000 ? "1" : "2";
|
||||
} catch (Exception e) {
|
||||
return "0";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user