现场调度修改

This commit is contained in:
liuhanqing
2026-03-11 09:02:58 +08:00
parent 03e30d1db0
commit 9b008f5fe7
30 changed files with 533 additions and 270 deletions

View File

@@ -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";
}