Commit bf2fdeb7 authored by 周健威's avatar 周健威

Merge branch 'dev' into base-modify

# Conflicts:
#	xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleActiveService.java
parents 851a07f8 c4c48db5
......@@ -209,7 +209,7 @@
<artifactId>spring-boot</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>
<dependency>
<!-- <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-openfeign-core</artifactId>
<version>2.1.0.RELEASE</version>
......@@ -226,12 +226,12 @@
<artifactId>feign-core</artifactId>
<version>10.1.0</version>
<scope>compile</scope>
</dependency>
<!-- <dependency>
</dependency>-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<scope>compile</scope>
</dependency>-->
</dependency>
</dependencies>
......
......@@ -176,15 +176,14 @@ public class VehicleActiveService {
VehicleBookRecordVo vehicleBookRecordVo = iterator.next();
if (vehicleBookRecordVo.getVehicleDepartureLogVo() != null && vehicleBookRecordVo.getVehicleDepartureLogVo().getState() != 1 ) { //已经出车
stringBuilder.append("中,使用人:");
stringBuilder.append(vehicleBookRecordVos.get(0).getVehicleUsername());
stringBuilder.append(vehicleBookRecordVo.getVehicleUsername());
stringBuilder.append(" 使用人电话:");
stringBuilder.append(vehicleBookRecordVos.get(0).getVehicleUserPhone());
stringBuilder.append(vehicleBookRecordVo.getVehicleUserPhone());
return stringBuilder.toString();
}
}
} else {
stringBuilder.append(", 请联系管理员修改车辆状态为正常状态");
}
stringBuilder.append(", 请联系管理员修改车辆状态为正常状态");
return stringBuilder.toString();
}
......@@ -321,7 +320,7 @@ public class VehicleActiveService {
Iterator<VehicleBookRecordVo> iterator = list.iterator();
while (iterator.hasNext()) {
VehicleBookRecordVo vehicleBookRecordVo = iterator.next();
if(vehicleBookRecordVo.getVehicleDepartureLogVo() == null && (vehicleBookRecordVo.getBookEndDate().getTime() - new Date().getTime()) < 0) {
if(vehicleBookRecordVo.getVehicleDepartureLogVo() == null && vehicleBookRecordVo.getBookEndDate().getTime() - new Date().getTime() < 0) {
iterator.remove();
}
}
......
......@@ -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 -> {
......
......@@ -380,7 +380,7 @@
</select>
<select id="selectByVehicleId" parameterType="java.lang.String"
resultType="com.xxfc.platform.vehicle.pojo.VehicleBookRecordVo">
resultMap="searchBookRecord">
SELECT v1.*,bc2.name retCompanyName from vehicle_book_record v1
LEFT JOIN branch_company bc2 on v1.ret_company = bc2.id
where v1.vehicle_id = #{vehicleId} and v1.status BETWEEN 1 and 2
......
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