Commit 819d7972 authored by libin's avatar libin

调度调整

parent 76e8998f
......@@ -46,12 +46,10 @@ public class VehicleJobHandler extends IJobHandler {
List<String> existVehicleIds = vehicleBiz.findExistVehicleIds();
Dictionary dictionary = thirdFeign.findDictionaryByTypeAndCode(DIC_VEHICLE_TYPE, DIC_VEHICLE_CODE);
LocalDate date = LocalDate.now();
date = date.plusMonths(Integer.valueOf(dictionary.getDetail()));
int year = date.getYear();
int nowMonth = date.getMonthValue();
int betweenMonth = Integer.valueOf(dictionary.getDetail()).intValue();
int month = nowMonth + betweenMonth> 12 ? (betweenMonth + nowMonth) - 12 : nowMonth + betweenMonth;
year = month > nowMonth ? year : year + 1;
String yearAndMonth = String.format("%d-%s", year, month>=10?month:"0"+month);
int month = date.getMonthValue();
String yearAndMonth = String.format("%d-%02d", year,month);
XxlJobLogger.log("----查询到的车型ids:【{}】",existVehicleIds);
if (CollectionUtils.isNotEmpty(existVehicleIds)) {
List<VehicleBookInfo> bookInfos = existVehicleIds.stream().map(vehicleId -> {
......
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