Commit 0a488fb9 authored by duanruiming's avatar duanruiming

[update] 相位空放返回编码优化

parent f716d8f9
......@@ -41,7 +41,6 @@ public class CrossStrategyOptServiceImpl implements CrossStrategyOptService {
Integer countDown = idx.getCountDown();
Integer rtnType = idx.getRtnType();
// rtnType大于0时,未执行
if (rtnType < 0) {
Long signalMachineStamp = idx.getSignalMachineStamp();
Long createStamp = idx.getCreateStamp();
Date date = new Date(curStamp);
......@@ -55,7 +54,19 @@ public class CrossStrategyOptServiceImpl implements CrossStrategyOptService {
entity.setInsertTime(new Date(createStamp));
entity.setCountDown(countDown);
entity.setExtendTime(countDown);
if (rtnType < 0) {
if (Objects.nonNull(idx.getResponseCode()) && !Objects.equals(-1, idx.getResponseCode())) {
entity.setResponseCode(idx.getResponseCode());
} else {
entity.setResponseCode(200);
}
} else {
if (Objects.nonNull(idx.getResponseCode()) && !Objects.equals(-1, idx.getResponseCode())) {
entity.setResponseCode(idx.getResponseCode());
} else {
entity.setResponseCode(500);
}
}
entity.setRtnType(rtnType);
String name = CrossInfoCache.getName(crossId);
entity.setCrossName(name);
......@@ -64,7 +75,6 @@ public class CrossStrategyOptServiceImpl implements CrossStrategyOptService {
entity.setResponseContent(idx.getResponseContent());
crossStrategyResultMapper.insert(entity);
}
}
} catch (Exception e) {
log.error("相位空放优化结果入库异常:", e);
throw new Exception(e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment