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 @@ ...@@ -209,7 +209,7 @@
<artifactId>spring-boot</artifactId> <artifactId>spring-boot</artifactId>
<version>2.1.3.RELEASE</version> <version>2.1.3.RELEASE</version>
</dependency> </dependency>
<dependency> <!-- <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-openfeign-core</artifactId> <artifactId>spring-cloud-openfeign-core</artifactId>
<version>2.1.0.RELEASE</version> <version>2.1.0.RELEASE</version>
...@@ -226,12 +226,12 @@ ...@@ -226,12 +226,12 @@
<artifactId>feign-core</artifactId> <artifactId>feign-core</artifactId>
<version>10.1.0</version> <version>10.1.0</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>-->
<!-- <dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId> <artifactId>spring-cloud-starter-openfeign</artifactId>
<scope>compile</scope> <scope>compile</scope>
</dependency>--> </dependency>
</dependencies> </dependencies>
......
...@@ -176,15 +176,14 @@ public class VehicleActiveService { ...@@ -176,15 +176,14 @@ public class VehicleActiveService {
VehicleBookRecordVo vehicleBookRecordVo = iterator.next(); VehicleBookRecordVo vehicleBookRecordVo = iterator.next();
if (vehicleBookRecordVo.getVehicleDepartureLogVo() != null && vehicleBookRecordVo.getVehicleDepartureLogVo().getState() != 1 ) { //已经出车 if (vehicleBookRecordVo.getVehicleDepartureLogVo() != null && vehicleBookRecordVo.getVehicleDepartureLogVo().getState() != 1 ) { //已经出车
stringBuilder.append("中,使用人:"); stringBuilder.append("中,使用人:");
stringBuilder.append(vehicleBookRecordVos.get(0).getVehicleUsername()); stringBuilder.append(vehicleBookRecordVo.getVehicleUsername());
stringBuilder.append(" 使用人电话:"); stringBuilder.append(" 使用人电话:");
stringBuilder.append(vehicleBookRecordVos.get(0).getVehicleUserPhone()); stringBuilder.append(vehicleBookRecordVo.getVehicleUserPhone());
return stringBuilder.toString(); return stringBuilder.toString();
} }
} }
} else {
stringBuilder.append(", 请联系管理员修改车辆状态为正常状态");
} }
stringBuilder.append(", 请联系管理员修改车辆状态为正常状态");
return stringBuilder.toString(); return stringBuilder.toString();
} }
...@@ -321,7 +320,7 @@ public class VehicleActiveService { ...@@ -321,7 +320,7 @@ public class VehicleActiveService {
Iterator<VehicleBookRecordVo> iterator = list.iterator(); Iterator<VehicleBookRecordVo> iterator = list.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
VehicleBookRecordVo vehicleBookRecordVo = iterator.next(); 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(); iterator.remove();
} }
} }
......
...@@ -46,12 +46,10 @@ public class VehicleJobHandler extends IJobHandler { ...@@ -46,12 +46,10 @@ public class VehicleJobHandler extends IJobHandler {
List<String> existVehicleIds = vehicleBiz.findExistVehicleIds(); List<String> existVehicleIds = vehicleBiz.findExistVehicleIds();
Dictionary dictionary = thirdFeign.findDictionaryByTypeAndCode(DIC_VEHICLE_TYPE, DIC_VEHICLE_CODE); Dictionary dictionary = thirdFeign.findDictionaryByTypeAndCode(DIC_VEHICLE_TYPE, DIC_VEHICLE_CODE);
LocalDate date = LocalDate.now(); LocalDate date = LocalDate.now();
date = date.plusMonths(Integer.valueOf(dictionary.getDetail()));
int year = date.getYear(); int year = date.getYear();
int nowMonth = date.getMonthValue(); int month = date.getMonthValue();
int betweenMonth = Integer.valueOf(dictionary.getDetail()).intValue(); String yearAndMonth = String.format("%d-%02d", year,month);
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);
XxlJobLogger.log("----查询到的车型ids:【{}】",existVehicleIds); XxlJobLogger.log("----查询到的车型ids:【{}】",existVehicleIds);
if (CollectionUtils.isNotEmpty(existVehicleIds)) { if (CollectionUtils.isNotEmpty(existVehicleIds)) {
List<VehicleBookInfo> bookInfos = existVehicleIds.stream().map(vehicleId -> { List<VehicleBookInfo> bookInfos = existVehicleIds.stream().map(vehicleId -> {
......
...@@ -380,7 +380,7 @@ ...@@ -380,7 +380,7 @@
</select> </select>
<select id="selectByVehicleId" parameterType="java.lang.String" <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 SELECT v1.*,bc2.name retCompanyName from vehicle_book_record v1
LEFT JOIN branch_company bc2 on v1.ret_company = bc2.id LEFT JOIN branch_company bc2 on v1.ret_company = bc2.id
where v1.vehicle_id = #{vehicleId} and v1.status BETWEEN 1 and 2 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