Commit d376de7f authored by jiaorz's avatar jiaorz

Merge branch 'master-vehicle-bg' into base-modify

parents ea4f8190 4ba206b8
package com.xxfc.platform.vehicle.entity; package com.xxfc.platform.vehicle.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Id; import javax.persistence.Id;
...@@ -32,6 +34,10 @@ public class BranchCompanyVehicleCount { ...@@ -32,6 +34,10 @@ public class BranchCompanyVehicleCount {
* 统计日期 * 统计日期
*/ */
@Column(name = "count_date") @Column(name = "count_date")
@DateTimeFormat(pattern="yyyy-MM-dd")
@JsonFormat(
pattern = "yyyy-MM-dd"
)
private Date countDate; private Date countDate;
......
...@@ -31,16 +31,17 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo ...@@ -31,16 +31,17 @@ public class BranchCompanyVehicleCountBiz extends BaseBiz<BranchCompanyVehicleCo
} }
public ObjectRestResponse<PageDataVO<BranchCompanyVehicleCount>> findAll(BranchCompanyVehicleCountDTO branchCompanyVehicleCountDTO) { public ObjectRestResponse<PageDataVO<BranchCompanyVehicleCount>> findAll(BranchCompanyVehicleCountDTO branchCompanyVehicleCountDTO) {
vehicleInformationDownloadBiz.add();
Integer pageNo = branchCompanyVehicleCountDTO.getPage() == null ? 1 : branchCompanyVehicleCountDTO.getPage(); Integer pageNo = branchCompanyVehicleCountDTO.getPage() == null ? 1 : branchCompanyVehicleCountDTO.getPage();
Integer pageSize = branchCompanyVehicleCountDTO.getLimit() == null ? 10 : branchCompanyVehicleCountDTO.getLimit(); Integer pageSize = branchCompanyVehicleCountDTO.getLimit() == null ? 10 : branchCompanyVehicleCountDTO.getLimit();
Integer type = branchCompanyVehicleCountDTO.getType() == null ? 1 : branchCompanyVehicleCountDTO.getType();
branchCompanyVehicleCountDTO.setPage(pageNo); branchCompanyVehicleCountDTO.setPage(pageNo);
branchCompanyVehicleCountDTO.setLimit(pageSize); branchCompanyVehicleCountDTO.setLimit(pageSize);
if (branchCompanyVehicleCountDTO.getType() == 1) { branchCompanyVehicleCountDTO.setType(type);
if (type == 1) {
branchCompanyVehicleCountDTO.setDayNum(1); branchCompanyVehicleCountDTO.setDayNum(1);
} else if (branchCompanyVehicleCountDTO.getType() == 2) { } else if (type == 2) {
branchCompanyVehicleCountDTO.setDayNum(7); branchCompanyVehicleCountDTO.setDayNum(7);
} else if (branchCompanyVehicleCountDTO.getType() == 3) { } else if (type == 3) {
branchCompanyVehicleCountDTO.setDayNum(getCurrentMonthLastDay()); branchCompanyVehicleCountDTO.setDayNum(getCurrentMonthLastDay());
} }
Query query = new Query(branchCompanyVehicleCountDTO); Query query = new Query(branchCompanyVehicleCountDTO);
......
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
( (
CASE CASE
WHEN #{type} = 1 THEN WHEN #{type} = 1 THEN
vehicle_num / #{dayNum}, vehicle_num / #{dayNum}
WHEN #{type} = 2 THEN WHEN #{type} = 2 THEN
vehicle_num / #{dayNum}, vehicle_num / #{dayNum}
WHEN #{type} = 3 THEN WHEN #{type} = 3 THEN
vehicle_num / #{dayNum} vehicle_num / #{dayNum}
END END
) )
) AS count from branch_company_vehicle_count ) AS vehicleNum from branch_company_vehicle_count
<where> <where>
<if test="companyName != null and companyName != ''"> <if test="companyName != null and companyName != ''">
and company_name like concat('%', #{companyName}, '%') and company_name like concat('%', #{companyName}, '%')
......
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