Commit e5c3263c by 杨林龙

修复车辆列表调频状态关闭调频默认为调频关闭状态

1 parent 1f52c194
...@@ -95,7 +95,7 @@ public class DeviceFreqService { ...@@ -95,7 +95,7 @@ public class DeviceFreqService {
deviceFreq.setResponseStatus(Constants.STATUS_RESPONSE_SENDING); deviceFreq.setResponseStatus(Constants.STATUS_RESPONSE_SENDING);
deviceFreqMapper.insert(deviceFreq); deviceFreqMapper.insert(deviceFreq);
// 向大数据侧发送调频请求 // 向大数据侧发送调频请求
sendRequest(resetAdjFreqBO.getSn(), value); sendRequest(resetAdjFreqBO.getSn(), value, deviceFreq.getId());
} }
/** /**
...@@ -104,13 +104,12 @@ public class DeviceFreqService { ...@@ -104,13 +104,12 @@ public class DeviceFreqService {
* @param sn 设备号 * @param sn 设备号
* @param value 调频指令 * @param value 调频指令
*/ */
private void sendRequest(String sn, String value) { private void sendRequest(String sn, String value, Long freqId) {
String url = PropertiesUtils.getProperty("bsj.adjFreq.location"); String url = PropertiesUtils.getProperty("bsj.adjFreq.location");
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
DeviceFreq freq = deviceFreqMapper.selectEffectFreqBySn(sn);
params.put("DeviceNO", sn); params.put("DeviceNO", sn);
params.put("FacID", Constants.BSJ_FACTORY_ID); params.put("FacID", Constants.BSJ_FACTORY_ID);
params.put("Seq", String.valueOf(freq.getId())); params.put("Seq", String.valueOf(freqId));
params.put("PosRepInfo", value); params.put("PosRepInfo", value);
log.info("调频参数为:" + JSONUtil.toJsonStr(params)); log.info("调频参数为:" + JSONUtil.toJsonStr(params));
String result = null; String result = null;
...@@ -165,7 +164,7 @@ public class DeviceFreqService { ...@@ -165,7 +164,7 @@ public class DeviceFreqService {
public void closeDeviceFreqFromCache() { public void closeDeviceFreqFromCache() {
Collection<String> snList = redisDelayQueue.getAndRemoveBusinessNo(TASK_KEY_FREQ_TIMING_CLOSE); Collection<String> snList = redisDelayQueue.getAndRemoveBusinessNo(TASK_KEY_FREQ_TIMING_CLOSE);
if (CollectionUtils.isEmpty(snList)) { if (CollectionUtils.isEmpty(snList)) {
if(log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug(DateUtil.getNowDateTimeFormat() + "没有需要关闭的调频"); log.debug(DateUtil.getNowDateTimeFormat() + "没有需要关闭的调频");
} }
return; return;
...@@ -181,7 +180,7 @@ public class DeviceFreqService { ...@@ -181,7 +180,7 @@ public class DeviceFreqService {
public void closeDeviceFreqFromDB() { public void closeDeviceFreqFromDB() {
List<String> snList = deviceFreqMapper.listToCloseFreq(); List<String> snList = deviceFreqMapper.listToCloseFreq();
if (CollectionUtils.isEmpty(snList)) { if (CollectionUtils.isEmpty(snList)) {
if(log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug(DateUtil.getNowDateTimeFormat() + "没有需要关闭的调频"); log.debug(DateUtil.getNowDateTimeFormat() + "没有需要关闭的调频");
} }
return; return;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!