Commit f49101e4 authored by jiaorz's avatar jiaorz

车辆信息统计

parent e39bdc8f
...@@ -7,7 +7,7 @@ public enum CrosstownTypeEnum { ...@@ -7,7 +7,7 @@ public enum CrosstownTypeEnum {
DEPARTURE(1, "交车"), DEPARTURE(1, "交车"),
ARRIVE(2, "还车"), ARRIVE(2, "还车"),
FIXED_LOSS(3, "定损"), FIXED_LOSS(3, "定损"),
FIXED_LOSS_NOW(4, "定损"), FIXED_LOSS_NOW(4, "立即定损"),
; ;
/** /**
* 编码 * 编码
......
...@@ -299,7 +299,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp ...@@ -299,7 +299,7 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
} catch (Exception e) { } catch (Exception e) {
return ObjectRestResponse.createFailedResult(1001, e.getMessage()); return ObjectRestResponse.createFailedResult(1001, e.getMessage());
} }
} else if (orderVehicleCrosstownDto.getType() == CrosstownTypeEnum.ARRIVE.getCode() || orderVehicleCrosstownDto.getType() == CrosstownTypeEnum.FIXED_LOSS.getCode()) { //还车 } else if (orderVehicleCrosstownDto.getType() == CrosstownTypeEnum.ARRIVE.getCode() || orderVehicleCrosstownDto.getType() == CrosstownTypeEnum.FIXED_LOSS.getCode() || orderVehicleCrosstownDto.getType() == CrosstownTypeEnum.FIXED_LOSS_NOW.getCode()) { //还车
VehicleArrivalVo vehicleArrivalVo = new VehicleArrivalVo(); VehicleArrivalVo vehicleArrivalVo = new VehicleArrivalVo();
vehicleArrivalVo.setVehicleId(orderRentVehicleDetail.getVehicleId()); vehicleArrivalVo.setVehicleId(orderRentVehicleDetail.getVehicleId());
vehicleArrivalVo.setArrivalBranchCompanyId(userDTO.getCompanyId()); vehicleArrivalVo.setArrivalBranchCompanyId(userDTO.getCompanyId());
......
...@@ -86,7 +86,7 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo ...@@ -86,7 +86,7 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
Integer page = branchCompanyVehicleCountDTO.getPage() == null ? 1 : branchCompanyVehicleCountDTO.getPage(); Integer page = branchCompanyVehicleCountDTO.getPage() == null ? 1 : branchCompanyVehicleCountDTO.getPage();
Integer limit = branchCompanyVehicleCountDTO.getLimit() == null ? 10 : branchCompanyVehicleCountDTO.getLimit(); Integer limit = branchCompanyVehicleCountDTO.getLimit() == null ? 10 : branchCompanyVehicleCountDTO.getLimit();
Integer type = branchCompanyVehicleCountDTO.getType() == null ? 1 : branchCompanyVehicleCountDTO.getType(); Integer type = branchCompanyVehicleCountDTO.getType() == null ? 1 : branchCompanyVehicleCountDTO.getType();
branchCompanyVehicleCountDTO.setPage(--page); branchCompanyVehicleCountDTO.setPage(page);
branchCompanyVehicleCountDTO.setLimit(limit); branchCompanyVehicleCountDTO.setLimit(limit);
Query query = new Query(branchCompanyVehicleCountDTO); Query query = new Query(branchCompanyVehicleCountDTO);
if (type == 1) {//按天 if (type == 1) {//按天
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<mapper namespace="com.xxfc.platform.vehicle.mapper.BranchCompanyVehicleCountMapper" > <mapper namespace="com.xxfc.platform.vehicle.mapper.BranchCompanyVehicleCountMapper" >
<select id="getAllCountInfo" parameterType="Map" resultType="com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo"> <select id="getAllCountInfo" parameterType="Map" resultType="com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo">
SELECT c.*, b.`name` as companyName from branch_company_vehicle_count c SELECT c.company_id, c.count_year, c.count_month,c.count_date, b.`name` as companyName,sum(c.vehicle_num) as vehicle_num from branch_company_vehicle_count c
LEFT JOIN branch_company b on b.id = c.company_id LEFT JOIN branch_company b on b.id = c.company_id
<where> <where>
<if test = "companyId != null"> <if test = "companyId != null">
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
and c.count_date &lt;= #{endTime} and c.count_date &lt;= #{endTime}
</if> </if>
</where> </where>
order by c.count_date GROUP BY c.company_id,c.count_date
</select> </select>
<select id="countByMonth" resultType="com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo" parameterType="Map"> <select id="countByMonth" resultType="com.xxfc.platform.vehicle.pojo.BranchCompanyVehicleCountVo" parameterType="Map">
......
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