|
|
@ -36,41 +36,7 @@ public class EtcSchedule { |
|
|
|
private EtcCarMsgService etcCarMsgService; |
|
|
|
private EtcCarMsgService etcCarMsgService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return void |
|
|
|
|
|
|
|
* @Author Sum1Dream |
|
|
|
|
|
|
|
* @name cancelOrder.java |
|
|
|
|
|
|
|
* @Description // 定时发起
|
|
|
|
|
|
|
|
* @Date 14:18 2022/5/31 |
|
|
|
|
|
|
|
* @Param [] |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Scheduled(cron = "0 0/10 * * * ?") //每10分钟执行一次
|
|
|
|
@Scheduled(cron = "0 0/10 * * * ?") //每10分钟执行一次
|
|
|
|
public void getEtcCarList() { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String , Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
map.put("status" , "11,12,13,15"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<EtcCarMsg> list = etcCarMsgService.getEtcCarList(map); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (EtcCarMsg carMsg : list) { |
|
|
|
|
|
|
|
JSONObject object = EtcService.getVehStatus(carMsg); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (Objects.equals(object.getString("errCode"), "0") && object.getJSONObject("result") != null) { |
|
|
|
|
|
|
|
carMsg.setVehStatus(object.getJSONObject("result").getInteger("vehStatus")); |
|
|
|
|
|
|
|
carMsg.setUpdateTime(object.getJSONObject("result").getDate("activeTime")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
etcCarMsgService.updateEtcCar(carMsg); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("HighUserController --> findByUserId() error!", e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 0/60 * * * ?") //每60分钟执行一次
|
|
|
|
|
|
|
|
public void etcCarMsg() { |
|
|
|
public void etcCarMsg() { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
@ -82,10 +48,12 @@ public class EtcSchedule { |
|
|
|
Map<String , Object> map = new HashMap<>(); |
|
|
|
Map<String , Object> map = new HashMap<>(); |
|
|
|
map.put("vehPlateNo" , jsonArray.getJSONObject(i).getString("vehPlateNo")); |
|
|
|
map.put("vehPlateNo" , jsonArray.getJSONObject(i).getString("vehPlateNo")); |
|
|
|
map.put("vehPlateColor" , CarTypeEnum.getNameByName(jsonArray.getJSONObject(i).getString("vehPlateColor"))); |
|
|
|
map.put("vehPlateColor" , CarTypeEnum.getNameByName(jsonArray.getJSONObject(i).getString("vehPlateColor"))); |
|
|
|
|
|
|
|
map.put("vehStatus" , 20); |
|
|
|
|
|
|
|
|
|
|
|
EtcCarMsg carMsg = etcCarMsgService.findEtcCarByMap(map); |
|
|
|
EtcCarMsg carMsg = etcCarMsgService.findEtcCarByMap(map); |
|
|
|
carMsg.setCardNo(jsonArray.getJSONObject(i).getString("cardNo")); |
|
|
|
carMsg.setCardNo(jsonArray.getJSONObject(i).getString("cardNo")); |
|
|
|
carMsg.setObuNo(jsonArray.getJSONObject(i).getString("obuNo")); |
|
|
|
carMsg.setObuNo(jsonArray.getJSONObject(i).getString("obuNo")); |
|
|
|
|
|
|
|
carMsg.setUpdateTime(jsonArray.getJSONObject(i).getDate("activeTime")); |
|
|
|
|
|
|
|
|
|
|
|
etcCarMsgService.updateEtcCar(carMsg); |
|
|
|
etcCarMsgService.updateEtcCar(carMsg); |
|
|
|
|
|
|
|
|
|
|
|