Commit ff855602 authored by duanruiming's avatar duanruiming

[update] 优化方案号

parent b73d2e44
......@@ -46,8 +46,7 @@ public class SignalStatusServiceImpl implements SignalStatusService {
public void receiveLightStatus(HisenseLightStatusPojo hisenseLightStatusPojo) throws Exception {
ObjectMapper jackson = JacksonUtils.getInstance();
String bodyStr = hisenseLightStatusPojo.getBody();
List<HisenseLightStatusPojo.Body> bodies = jackson.readValue(bodyStr, new TypeReference<List<HisenseLightStatusPojo.Body>>() {
});
List<HisenseLightStatusPojo.Body> bodies = jackson.readValue(bodyStr, new TypeReference<List<HisenseLightStatusPojo.Body>>() {});
if (!CollectionUtils.isEmpty(bodies)) {
for (HisenseLightStatusPojo.Body body : bodies) {
HisenseLightStatusPojo.ContentBody content = body.getContent();
......@@ -78,7 +77,7 @@ public class SignalStatusServiceImpl implements SignalStatusService {
int hiControlMode = content.getControlMode();
int period = content.getPeriod();
int planId = content.getPlanId();
int planId = (content.getPlanId() + 2) / 3;
Long signalMachineStamp = content.getSignalMachineStamp();
lightsStatusVO.setCrossId(crossId);
lightsStatusVO.setSchemeId(String.valueOf(planId));
......
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