Commit 6388fa99 by zhouhaibao

[+]试驾服务

1 parent c2aef12f
package cn.com.glsx.admin.modules.model; package cn.com.glsx.admin.modules.model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
...@@ -24,6 +25,7 @@ public class ApprovalDto { ...@@ -24,6 +25,7 @@ public class ApprovalDto {
/** /**
* 创建时间 * 创建时间
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdDate; private Date createdDate;
/** /**
......
...@@ -22,4 +22,5 @@ public class FenceApproDto { ...@@ -22,4 +22,5 @@ public class FenceApproDto {
private String submitStatus; private String submitStatus;
private String fenceName; private String fenceName;
private String fenceType; private String fenceType;
private Long createdBy;
} }
...@@ -61,6 +61,8 @@ public class VehicleApproDto { ...@@ -61,6 +61,8 @@ public class VehicleApproDto {
private String saleManagerPhone; private String saleManagerPhone;
@ExcelIgnore @ExcelIgnore
private String velRemark; private String velRemark;
@ExcelIgnore
private Long createdBy;
@ExcelProperty(value = "提交时间", index = 13) @ExcelProperty(value = "提交时间", index = 13)
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date submitTime; private Date submitTime;
......
...@@ -149,7 +149,7 @@ public class ApprovalService { ...@@ -149,7 +149,7 @@ public class ApprovalService {
Type type = new TypeToken<List<Organization>>() { Type type = new TypeToken<List<Organization>>() {
}.getType(); }.getType();
vehicleDtoPageInfo.forEach(efd -> { vehicleDtoPageInfo.forEach(efd -> {
R<List<Organization>> listR = organizationService.getTenantPathsByUserId(ShieldContextHolder.getUserId()); R<List<Organization>> listR = organizationService.getTenantPathsByUserId(efd.getCreatedBy());
List<Organization> orgList = listR.getDataList(type); List<Organization> orgList = listR.getDataList(type);
if (CollectionUtils.isNotEmpty(orgList)) { if (CollectionUtils.isNotEmpty(orgList)) {
efd.setArea(orgList.get(1).getOrgName()); efd.setArea(orgList.get(1).getOrgName());
...@@ -172,7 +172,7 @@ public class ApprovalService { ...@@ -172,7 +172,7 @@ public class ApprovalService {
Type type = new TypeToken<List<Organization>>() { Type type = new TypeToken<List<Organization>>() {
}.getType(); }.getType();
fenceApproDtoList.forEach(efd -> { fenceApproDtoList.forEach(efd -> {
R<List<Organization>> listR = organizationService.getTenantPathsByUserId(ShieldContextHolder.getUserId()); R<List<Organization>> listR = organizationService.getTenantPathsByUserId(efd.getCreatedBy());
List<Organization> orgList = listR.getDataList(type); List<Organization> orgList = listR.getDataList(type);
if (CollectionUtils.isNotEmpty(orgList)) { if (CollectionUtils.isNotEmpty(orgList)) {
efd.setArea(orgList.get(1).getOrgName()); efd.setArea(orgList.get(1).getOrgName());
......
...@@ -109,7 +109,7 @@ public class VehicleDocService { ...@@ -109,7 +109,7 @@ public class VehicleDocService {
Type type = new TypeToken<List<Organization>>() { Type type = new TypeToken<List<Organization>>() {
}.getType(); }.getType();
vehicleDtoPageInfo.forEach(efd -> { vehicleDtoPageInfo.forEach(efd -> {
R<List<Organization>> listR = organizationService.getTenantPathsByUserId(ShieldContextHolder.getDepartmentId()); R<List<Organization>> listR = organizationService.getTenantPathsByUserId(efd.getCreatedBy());
List<Organization> orgList = listR.getDataList(type); List<Organization> orgList = listR.getDataList(type);
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(orgList)) { if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(orgList)) {
efd.setArea(orgList.get(1).getOrgName()); efd.setArea(orgList.get(1).getOrgName());
......
...@@ -163,6 +163,20 @@ public class VehicleService { ...@@ -163,6 +163,20 @@ public class VehicleService {
} }
/** /**
* 查询车辆绑定了哪些设备
* @param vehicleId
* @return
*/
public List<VehicleDevice> listVehicleDeviceByVehicleIdStatus(Long vehicleId) {
VehicleDevice param = new VehicleDevice();
param.setBindStatus(ConstantsDevice.BIND_VEHICLE_STATUS);
param.setVehicleId(vehicleId);
//匹配设备
List<VehicleDevice> bindVehicleDevice = vehicleDeviceMapper.getVehicleDeviceByVehicleIdStatus(param);
return bindVehicleDevice;
}
/**
* 编辑回显车辆数据 * 编辑回显车辆数据
* *
* @param tempId * @param tempId
...@@ -193,20 +207,6 @@ public class VehicleService { ...@@ -193,20 +207,6 @@ public class VehicleService {
} }
/** /**
* 查询车辆绑定了哪些设备
* @param vehicleId
* @return
*/
public List<VehicleDevice> listVehicleDeviceByVehicleIdStatus(Long vehicleId) {
VehicleDevice param = new VehicleDevice();
param.setBindStatus(ConstantsDevice.BIND_VEHICLE_STATUS);
param.setVehicleId(vehicleId);
//匹配设备
List<VehicleDevice> bindVehicleDevice = vehicleDeviceMapper.getVehicleDeviceByVehicleIdStatus(param);
return bindVehicleDevice;
}
/**
* 解绑车辆设备 * 解绑车辆设备
* *
* @param tempId * @param tempId
......
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
t4.province AS province, t4.province AS province,
t4.city AS city, t4.city AS city,
t1.vin, t1.vin,
t4.created_by as createdBy,
t1.inner_color AS innerColor, t1.inner_color AS innerColor,
t1.color AS color, t1.color AS color,
t1.model_name AS modelName, t1.model_name AS modelName,
...@@ -117,6 +118,7 @@ ...@@ -117,6 +118,7 @@
shop.area AS area, shop.area AS area,
shop.province AS province, shop.province AS province,
shop.city AS city, shop.city AS city,
shop.created_by as createdBy,
app.remark as remark, app.remark as remark,
tvd.fence_name as fenceName, tvd.fence_name as fenceName,
tvd.biz_fence_type as fenceType, tvd.biz_fence_type as fenceType,
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
t4.area AS area, t4.area AS area,
t4.province AS province, t4.province AS province,
t4.city AS city, t4.city AS city,
t4.created_by as createdBy,
t1.vin, t1.vin,
t1.inner_color AS innerColor, t1.inner_color AS innerColor,
t1.color AS color, t1.color AS color,
...@@ -52,7 +53,7 @@ ...@@ -52,7 +53,7 @@
t1.vehicle_type AS vehicleType, t1.vehicle_type AS vehicleType,
t1.config_desc AS configDesc, t1.config_desc AS configDesc,
t6.dict_label AS approvalStatus, t6.dict_label AS approvalStatus,
if(dict_label=null,"未提交","已提交") as submitStatus if(dict_label=null,"0","1") as submitStatus
FROM FROM
t_vehicle t1 t_vehicle t1
LEFT JOIN t_vehicle_device t2 ON t1.id = t2.vehicle_id LEFT JOIN t_vehicle_device t2 ON t1.id = t2.vehicle_id
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!