|
|
@ -226,18 +226,13 @@ public class EquOrderServiceImpl implements IEquOrderService {
|
|
|
|
int up = standard.getActualValue().compareTo(standard.getDetailUpLimit());
|
|
|
|
int up = standard.getActualValue().compareTo(standard.getDetailUpLimit());
|
|
|
|
int down = standard.getActualValue().compareTo(standard.getDetailDownLimit());
|
|
|
|
int down = standard.getActualValue().compareTo(standard.getDetailDownLimit());
|
|
|
|
standard.setDetailReach("1");
|
|
|
|
standard.setDetailReach("1");
|
|
|
|
standard.setErrorFlag("0");
|
|
|
|
|
|
|
|
if (!(up != 1 && down != -1)) {
|
|
|
|
if (!(up != 1 && down != -1)) {
|
|
|
|
hasError = true;
|
|
|
|
hasError = true;
|
|
|
|
standard.setErrorFlag("1");
|
|
|
|
|
|
|
|
standard.setDetailReach("0");
|
|
|
|
standard.setDetailReach("0");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// TODO 未达标
|
|
|
|
|
|
|
|
standard.setErrorFlag("0");
|
|
|
|
|
|
|
|
if (standard.getDetailReach().equals("0")) {
|
|
|
|
if (standard.getDetailReach().equals("0")) {
|
|
|
|
hasError = true;
|
|
|
|
hasError = true;
|
|
|
|
standard.setErrorFlag("1");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -310,6 +305,15 @@ public class EquOrderServiceImpl implements IEquOrderService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 保养逻辑
|
|
|
|
|
|
|
|
if (equOrder.getPlanType().equals("maintenance")) {
|
|
|
|
|
|
|
|
// 用时
|
|
|
|
|
|
|
|
if (equOrder.getOrderStart() != null) {
|
|
|
|
|
|
|
|
long diffSeconds = (equOrder.getOrderEnd().getTime() - equOrder.getOrderStart().getTime()) / 60000;
|
|
|
|
|
|
|
|
equOrder.setOrderCostTime(String.valueOf(diffSeconds));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 更新工单信息
|
|
|
|
// 更新工单信息
|
|
|
|
equOrderMapper.updateEquOrder(equOrder);
|
|
|
|
equOrderMapper.updateEquOrder(equOrder);
|
|
|
|
return success();
|
|
|
|
return success();
|
|
|
|