Commit 881fd1bf by zhouhaibao

[+]试驾服务

1 parent 9198459e
...@@ -21,4 +21,5 @@ public class FenceApproDto extends BaseAreaDto{ ...@@ -21,4 +21,5 @@ public class FenceApproDto extends BaseAreaDto{
private String approvalResult; private String approvalResult;
private String fenceName; private String fenceName;
private String fenceType; private String fenceType;
private Long bizId;
} }
...@@ -2,6 +2,7 @@ package cn.com.glsx.admin.modules.model; ...@@ -2,6 +2,7 @@ package cn.com.glsx.admin.modules.model;
import com.alibaba.excel.annotation.ExcelIgnore; import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
...@@ -39,7 +40,7 @@ public class VehicleApproDto extends BaseAreaDto { ...@@ -39,7 +40,7 @@ public class VehicleApproDto extends BaseAreaDto {
private String saleManager; private String saleManager;
private String saleManagerPhone; private String saleManagerPhone;
private String velRemark; private String velRemark;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date submitTime; private Date submitTime;
private boolean isbutton; private boolean isbutton;
} }
...@@ -15,13 +15,13 @@ public class ApprovalBo implements Serializable { ...@@ -15,13 +15,13 @@ public class ApprovalBo implements Serializable {
/** /**
* 业务类型 * 业务类型
*/ */
@NotNull(message = "业务类型不能为空", groups = {ValidateGroups.Insert.class, ValidateGroups.Update.class}) @NotNull(message = "业务类型不能为空", groups = {ValidateGroups.Insert.class})
private Integer bizType; private Integer bizType;
/** /**
* 业务id * 业务id
*/ */
@NotNull(message = "业务id不能为空", groups = {ValidateGroups.Insert.class, ValidateGroups.Update.class}) @NotNull(message = "业务id不能为空", groups = {ValidateGroups.Insert.class})
private Long bizId; private Long bizId;
/** /**
...@@ -39,4 +39,8 @@ public class ApprovalBo implements Serializable { ...@@ -39,4 +39,8 @@ public class ApprovalBo implements Serializable {
this.bizType = bizType; this.bizType = bizType;
this.bizId = bizId; this.bizId = bizId;
} }
public ApprovalBo(){
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
and t5.status in (1,2,3) and t5.status in (1,2,3)
and t5.biz_type=2 and t5.biz_type=2
GROUP BY GROUP BY
t1.id t5.id
<if test="search.approvalStatus !=null and search.approvalStatus != ''"> <if test="search.approvalStatus !=null and search.approvalStatus != ''">
and t5.status=#{search.status} and t5.status=#{search.status}
</if> </if>
...@@ -126,13 +126,16 @@ ...@@ -126,13 +126,16 @@
tvd.fence_name as fenceName, tvd.fence_name as fenceName,
tvd.biz_fence_type as fenceType, tvd.biz_fence_type as fenceType,
app.status as approvalStatus, app.status as approvalStatus,
td.dict_label as approvalResult td.dict_label as approvalResult,
app.biz_id as bizId
from t_approval app from t_approval app
left join t_electric_fence tvd on app.biz_id = tvd.id and tvd.del_flag = 0 left join t_electric_fence tvd on app.biz_id = tvd.id and tvd.del_flag = 0
left join t_trial_drive_shop shop on tvd.id=shop.fence_id left join t_trial_drive_shop shop on tvd.id=shop.fence_id
left join t_dict_data td on app.status=td.dict_value left join t_dict_data td on app.status=td.dict_value
where app.del_flag = 0 and app.status in (1,2,3) and td.dict_type='approval_status' where app.del_flag = 0 and app.status in (1,2,3) and td.dict_type='approval_status'
AND APP.biz_type=1 and shop_name is not null AND APP.biz_type=1 and shop_name is not null
GROUP BY
app.id
<if test="search.approvalStatus !=null and search.approvalStatus != ''"> <if test="search.approvalStatus !=null and search.approvalStatus != ''">
and app.status=#{search.approvalStatus} and app.status=#{search.approvalStatus}
</if> </if>
...@@ -147,7 +150,7 @@ ...@@ -147,7 +150,7 @@
parameterType="cn.com.glsx.admin.modules.entity.Approval"> parameterType="cn.com.glsx.admin.modules.entity.Approval">
select * from t_approval select * from t_approval
where where
del_flag = 0 and status=1 del_flag = 0 and status in (1,2)
and biz_type=#{approval.bizType} and biz_type=#{approval.bizType}
and biz_id=#{approval.bizId} and biz_id=#{approval.bizId}
</select> </select>
......
...@@ -54,10 +54,12 @@ ...@@ -54,10 +54,12 @@
t1.id as vehicleId, t1.id as vehicleId,
t1.config_desc AS configDesc, t1.config_desc AS configDesc,
t5.status as status, t5.status as status,
(select dict_label from t_dict_data where dict_value=t5.status and dict_type = 'approval_status') AS approvalStatus (select dict_label from t_dict_data where dict_value=t5.status and dict_type = 'approval_status') AS approvalStatus,
max(t5.created_date) as created_date,
t5.id
FROM FROM
t_vehicle t1 t_vehicle t1
LEFT JOIN t_approval t5 ON (t1.ID = t5.biz_id AND t5.biz_type=2) LEFT JOIN (select * from t_approval ORDER BY created_date desc) t5 ON (t1.ID = t5.biz_id AND t5.biz_type=2)
LEFT JOIN t_vehicle_device t2 ON t1.id = t2.vehicle_id LEFT JOIN t_vehicle_device t2 ON t1.id = t2.vehicle_id
LEFT JOIN t_electric_fence_sns t3 ON t2.sn = t3.sn LEFT JOIN t_electric_fence_sns t3 ON t2.sn = t3.sn
LEFT JOIN t_trial_drive_shop t4 ON t3.fence_id = t4.fence_id LEFT JOIN t_trial_drive_shop t4 ON t3.fence_id = t4.fence_id
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
<result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate"/> <result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate"/>
<result column="updated_by" jdbcType="INTEGER" property="updatedBy"/> <result column="updated_by" jdbcType="INTEGER" property="updatedBy"/>
<result column="registration_date" jdbcType="TIMESTAMP" property="registrationDate"/> <result column="registration_date" jdbcType="TIMESTAMP" property="registrationDate"/>
<result column="sale_manager" jdbcType="VARCHAR" property="saleManager"/>
<result column="sale_manager_phone" jdbcType="VARCHAR" property="saleManagerPhone"/>
</resultMap> </resultMap>
<resultMap id="TearDownAlarmMap" type="cn.com.glsx.admin.modules.model.export.TearDownModelExport"> <resultMap id="TearDownAlarmMap" type="cn.com.glsx.admin.modules.model.export.TearDownModelExport">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!