Commit de5cd606 authored by jiaorz's avatar jiaorz

Merge branch 'master-vehicle-bg' into dev

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