Commit 56b4b783 authored by libin's avatar libin

Merge branch 'order_received_statistics' into dev

# Conflicts:
#	xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/constant/DictionaryKey.java
#	xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/DictionaryBiz.java
#	xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleBookRecordBiz.java
#	xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleDepartureService.java
#	xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehicleDepartureLogMapper.java
#	xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleDepartureController.java
#	xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleDepartureLogMapper.xml
parents 82294f58 7c4fcab7
...@@ -225,7 +225,7 @@ public class BranchCompanyStockService { ...@@ -225,7 +225,7 @@ public class BranchCompanyStockService {
//文件存放路径 //文件存放路径
String filePath = baseUploadPath + realFileRelPath; String filePath = baseUploadPath + realFileRelPath;
//将文件写入指定位置 //将文件写入指定位置
// FileUtils.copyInputStreamToFile(file.getInputStream(), new File(filePath)); FileUtils.copyInputStreamToFile(file.getInputStream(), new File(filePath));
return RestResponse.suc(realFileRelPath); return RestResponse.suc(realFileRelPath);
} }
......
...@@ -176,7 +176,7 @@ public class CampsiteBiz extends BaseBiz<CampsiteMapper, Campsite> { ...@@ -176,7 +176,7 @@ public class CampsiteBiz extends BaseBiz<CampsiteMapper, Campsite> {
//文件存放路径 //文件存放路径
String filePath = baseUploadPath + realFileRelPath; String filePath = baseUploadPath + realFileRelPath;
//将文件写入指定位置 //将文件写入指定位置
// FileUtils.copyInputStreamToFile(file.getInputStream(), new File(filePath)); FileUtils.copyInputStreamToFile(file.getInputStream(), new File(filePath));
return RestResponse.suc(realFileRelPath); return RestResponse.suc(realFileRelPath);
} }
......
...@@ -249,7 +249,7 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic ...@@ -249,7 +249,7 @@ public class VehicleBookRecordBiz extends BaseBiz<VehicleBookRecordMapper, Vehic
} }
if (vehicleBookRecordVo.getBookUser() != null) { if (vehicleBookRecordVo.getBookUser() != null) {
UserDTO userDTO = userFeign.userinfoByUid(vehicleBookRecordVo.getBookUser()).getData(); UserDTO userDTO = userFeign.userinfoByUid(vehicleBookRecordVo.getBookUser()).getData();
if(userDTO != null) { if (userDTO != null) {
BranchCompany branchCompany = branchCompanyBiz.getById(userDTO.getCompanyId()); BranchCompany branchCompany = branchCompanyBiz.getById(userDTO.getCompanyId());
if (branchCompany != null) { if (branchCompany != null) {
vehicleBookRecordVo.setUserCompanyName(branchCompany.getName()); vehicleBookRecordVo.setUserCompanyName(branchCompany.getName());
......
...@@ -201,7 +201,7 @@ public class BranchCompanyController extends BaseController<BranchCompanyBiz> { ...@@ -201,7 +201,7 @@ public class BranchCompanyController extends BaseController<BranchCompanyBiz> {
} }
@GetMapping("/findByAreaId") @GetMapping("/findByAreaId")
public List<Integer> findCompanyIdsByAreaId(@RequestParam(value = "areaId",required = false) Integer areaId){ public List<Integer> findCompanyIdsByAreaId(@RequestParam(value = "areaId") Integer areaId){
return baseBiz.selectCompanyIdsByAreaId(areaId); return baseBiz.selectCompanyIdsByAreaId(areaId);
} }
......
...@@ -618,10 +618,4 @@ public class VehicleController extends BaseController<VehicleBiz> implements Use ...@@ -618,10 +618,4 @@ public class VehicleController extends BaseController<VehicleBiz> implements Use
public List<String> findbyPlateNumberAndVehicleCod(@RequestParam(value = "plateNumber",required = false) String plateNumber,@RequestParam(value = "vehicleCode",required = false) String vehicleCode){ public List<String> findbyPlateNumberAndVehicleCod(@RequestParam(value = "plateNumber",required = false) String plateNumber,@RequestParam(value = "vehicleCode",required = false) String vehicleCode){
return vehicleBiz.findbyPlateNumberAndVehicleCod(plateNumber,vehicleCode); return vehicleBiz.findbyPlateNumberAndVehicleCod(plateNumber,vehicleCode);
} }
@GetMapping("/app/unauth/findDictionaryMaps")
@IgnoreUserToken
public ObjectRestResponse findbyDictionaryMaps(@RequestParam(value = "plateNumber",required = false) String plateNumber,@RequestParam(value = "vehicleCode",required = false) String vehicleCode){
return vehicleBookRecordBiz.getOrderDetail();
}
} }
...@@ -9,6 +9,8 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; ...@@ -9,6 +9,8 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.order.pojo.order.OrderPageVO; import com.xxfc.platform.order.pojo.order.OrderPageVO;
import com.xxfc.platform.universal.entity.Dictionary; import com.xxfc.platform.universal.entity.Dictionary;
import com.xxfc.platform.universal.feign.ThirdFeign; import com.xxfc.platform.universal.feign.ThirdFeign;
import com.xxfc.platform.order.pojo.order.OrderPageVO;
import com.xxfc.platform.universal.entity.Dictionary;
import com.xxfc.platform.vehicle.biz.VehicleBiz; import com.xxfc.platform.vehicle.biz.VehicleBiz;
import com.xxfc.platform.vehicle.biz.VehicleDepartureService; import com.xxfc.platform.vehicle.biz.VehicleDepartureService;
import com.xxfc.platform.vehicle.common.RestResponse; import com.xxfc.platform.vehicle.common.RestResponse;
...@@ -20,6 +22,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -20,6 +22,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map;
import static com.xxfc.platform.universal.constant.DictionaryKey.RESERVE; import static com.xxfc.platform.universal.constant.DictionaryKey.RESERVE;
import static com.xxfc.platform.universal.constant.DictionaryKey.VEHICE_ORDER; import static com.xxfc.platform.universal.constant.DictionaryKey.VEHICE_ORDER;
......
...@@ -88,21 +88,15 @@ ...@@ -88,21 +88,15 @@
<select id="selectVoAll" resultMap="searchBookRecord"> <select id="selectVoAll" resultMap="searchBookRecord">
select vehicle_departure_log.*,vehicle.number_plate,bc2.actual_end_date,bc2.actual_start_date,bc2.book_start_date,bc2.book_end_date, select vehicle_departure_log.*,vehicle.number_plate,bc2.actual_end_date,bc2.actual_start_date,bc2.book_start_date,bc2.book_end_date,
/* IFNULL(DATEDIFF(vehicle_departure_log.arrival_time,vehicle_departure_log.departure_time),0)*/ /* IFNULL(DATEDIFF(vehicle_departure_log.arrival_time,vehicle_departure_log.departure_time),0)*/
CONCAT(IFNULL(floor((unix_timestamp(vehicle_departure_log.arrival_time) - CONCAT(IFNULL(floor((unix_timestamp(vehicle_departure_log.arrival_time) - unix_timestamp(vehicle_departure_log.departure_time)) / 86400),0),'天',
unix_timestamp(vehicle_departure_log.departure_time)) / 86400),0),'天', IFNULL(floor(IF((unix_timestamp(vehicle_departure_log.arrival_time) - unix_timestamp(vehicle_departure_log.departure_time))>86400,(unix_timestamp(vehicle_departure_log.arrival_time)
IFNULL(floor(IF((unix_timestamp(vehicle_departure_log.arrival_time) - - unix_timestamp(vehicle_departure_log.departure_time)) MOD 86400/3600,(unix_timestamp(vehicle_departure_log.arrival_time) - unix_timestamp(vehicle_departure_log.departure_time))/3600)),0),'小时')
unix_timestamp(vehicle_departure_log.departure_time))>86400,(unix_timestamp(vehicle_departure_log.arrival_time)
- unix_timestamp(vehicle_departure_log.departure_time)) MOD
86400/3600,(unix_timestamp(vehicle_departure_log.arrival_time) -
unix_timestamp(vehicle_departure_log.departure_time))/3600)),0),'小时')
as departureDay,bc.name as departureName,bc1.name as arrivalName, as departureDay,bc.name as departureName,bc1.name as arrivalName,
IF((IFNULL(vehicle_departure_log.mileage_end,0)-IFNULL(vehicle_departure_log.mileage_start,0))>0,IFNULL(vehicle_departure_log.mileage_end,0)-IFNULL(vehicle_departure_log.mileage_start,0),0) IF((IFNULL(vehicle_departure_log.mileage_end,0)-IFNULL(vehicle_departure_log.mileage_start,0))>0,IFNULL(vehicle_departure_log.mileage_end,0)-IFNULL(vehicle_departure_log.mileage_start,0),0) as mileage
as mileage
from vehicle_departure_log from vehicle_departure_log
left join vehicle on vehicle_departure_log.vehicle_id = vehicle.id left join vehicle on vehicle_departure_log.vehicle_id = vehicle.id
LEFT JOIN branch_company bc ON vehicle_departure_log.departure_branch_company_id = bc.id LEFT JOIN branch_company bc ON vehicle_departure_log.departure_branch_company_id = bc.id
LEFT JOIN branch_company bc1 ON vehicle_departure_log.arrival_branch_company_id = bc1.id LEFT JOIN branch_company bc1 ON vehicle_departure_log.arrival_branch_company_id = bc1.id
LEFT JOIN vehicle_book_record bc2 ON vehicle_departure_log.book_record_id = bc2.id
<trim prefix="where"> <trim prefix="where">
1=1 1=1
<if test="numberPlate != null and numberPlate != ''"> <if test="numberPlate != null and numberPlate != ''">
...@@ -124,33 +118,21 @@ ...@@ -124,33 +118,21 @@
<if test="departureId!=null"> <if test="departureId!=null">
and vehicle_departure_log.departure_branch_company_id=#{departureId} and vehicle_departure_log.departure_branch_company_id=#{departureId}
</if> </if>
<if test="use!=null">
and bc2.book_type=#{use}
</if>
<if test="arrivalBranchCompanyId!=null">
and vehicle_departure_log.arrival_branch_company_id=#{arrivalBranchCompanyId}
</if>
</trim> </trim>
order by create_time desc order by create_time desc
</select> </select>
<select id="selectVoAllNotAllData" resultMap="searchBookRecord"> <select id="selectVoAllNotAllData" resultType="com.xxfc.platform.vehicle.pojo.VehicleDepartureLogVo">
select vehicle_departure_log.*,vehicle.number_plate,bc2.actual_end_date,bc2.actual_start_date,bc2.book_start_date,bc2.book_end_date, select vehicle_departure_log.*,vehicle.number_plate,
/*IFNULL(DATEDIFF(vehicle_departure_log.arrival_time,vehicle_departure_log.departure_time),0)*/ /*IFNULL(DATEDIFF(vehicle_departure_log.arrival_time,vehicle_departure_log.departure_time),0)*/
CONCAT(IFNULL(floor((unix_timestamp(vehicle_departure_log.arrival_time) - CONCAT(IFNULL(floor((unix_timestamp(vehicle_departure_log.arrival_time) - unix_timestamp(vehicle_departure_log.departure_time)) / 86400),0),'天',
unix_timestamp(vehicle_departure_log.departure_time)) / 86400),0),'天', IFNULL(floor(IF((unix_timestamp(vehicle_departure_log.arrival_time) - unix_timestamp(vehicle_departure_log.departure_time))>86400,(unix_timestamp(vehicle_departure_log.arrival_time)
IFNULL(floor(IF((unix_timestamp(vehicle_departure_log.arrival_time) - - unix_timestamp(vehicle_departure_log.departure_time)) MOD 86400/3600,(unix_timestamp(vehicle_departure_log.arrival_time) - unix_timestamp(vehicle_departure_log.departure_time))/3600)),0),'小时')
unix_timestamp(vehicle_departure_log.departure_time))>86400,(unix_timestamp(vehicle_departure_log.arrival_time)
- unix_timestamp(vehicle_departure_log.departure_time)) MOD
86400/3600,(unix_timestamp(vehicle_departure_log.arrival_time) -
unix_timestamp(vehicle_departure_log.departure_time))/3600)),0),'小时')
as departureDay,bc.name as departureName,bc1.name as arrivalName, as departureDay,bc.name as departureName,bc1.name as arrivalName,
IF((IFNULL(vehicle_departure_log.mileage_end,0)-IFNULL(vehicle_departure_log.mileage_start,0))>0,IFNULL(vehicle_departure_log.mileage_end,0)-IFNULL(vehicle_departure_log.mileage_start,0),0) IF((IFNULL(vehicle_departure_log.mileage_end,0)-IFNULL(vehicle_departure_log.mileage_start,0))>0,IFNULL(vehicle_departure_log.mileage_end,0)-IFNULL(vehicle_departure_log.mileage_start,0),0) as mileage
as mileage
from vehicle_departure_log from vehicle_departure_log
left join vehicle on vehicle_departure_log.vehicle_id = vehicle.id left join vehicle on vehicle_departure_log.vehicle_id = vehicle.id
LEFT JOIN branch_company bc ON vehicle_departure_log.departure_branch_company_id = bc.id LEFT JOIN branch_company bc ON vehicle_departure_log.departure_branch_company_id = bc.id
LEFT JOIN branch_company bc1 ON vehicle_departure_log.arrival_branch_company_id = bc1.id LEFT JOIN branch_company bc1 ON vehicle_departure_log.arrival_branch_company_id = bc1.id
LEFT JOIN vehicle_book_record bc2 ON vehicle_departure_log.book_record_id = bc2.id
<trim prefix="where" suffixOverrides="and"> <trim prefix="where" suffixOverrides="and">
<if test="numberPlate != null and numberPlate != ''"> <if test="numberPlate != null and numberPlate != ''">
vehicle.number_plate = #{numberPlate} and vehicle.number_plate = #{numberPlate} and
...@@ -193,12 +175,6 @@ ...@@ -193,12 +175,6 @@
<if test="departureId!=null"> <if test="departureId!=null">
and vehicle_departure_log.departure_branch_company_id=#{departureId} and vehicle_departure_log.departure_branch_company_id=#{departureId}
</if> </if>
<if test="use!=null">
and bc2.book_type=#{use}
</if>
<if test="arrivalBranchCompanyId!=null">
and vehicle_departure_log.arrival_branch_company_id=#{arrivalBranchCompanyId}
</if>
</trim> </trim>
order by create_time desc order by create_time desc
</select> </select>
......
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