Commit f3411d23 by zhouhaibao

[+]试驾服务

1 parent 05251d0e
...@@ -46,6 +46,7 @@ public class ApprovalController extends Page { ...@@ -46,6 +46,7 @@ public class ApprovalController extends Page {
@Autowired @Autowired
private HttpServletResponse response; private HttpServletResponse response;
/** /**
* 修改审批流程信息 * 修改审批流程信息
* *
......
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
SELECT SELECT
t5.id as approvalId, t5.id as approvalId,
t1.id as vehicleId, t1.id as vehicleId,
t4.shop_name AS shopName, t6.username AS shopName,
t4.shop_code AS shopCode, t6.account AS shopCode,
t4.shop_level AS shopLevel, t4.shop_level AS shopLevel,
t4.area AS area, t4.area AS area,
t4.province AS province, t4.province AS province,
...@@ -90,30 +90,31 @@ ...@@ -90,30 +90,31 @@
t_approval t5 t_approval t5
LEFT JOIN t_vehicle t1 ON t1.ID = t5.biz_id LEFT JOIN t_vehicle t1 ON t1.ID = t5.biz_id
LEFT JOIN t_trial_drive_shop t4 ON t1.created_by = t4.created_by LEFT JOIN t_trial_drive_shop t4 ON t1.created_by = t4.created_by
LEFT JOIN t_user t6 ON t6.id = t1.created_by
left join t_electric_fence t7 on t4.fence_id=t7.id left join t_electric_fence t7 on t4.fence_id=t7.id
WHERE WHERE
t1.del_flag = 0 t1.del_flag = 0
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
t5.id
ORDER BY t5.updated_date desc
<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>
<if test="search.keywords !=null and search.keywords != ''"> <if test="search.keywords !=null and search.keywords != ''">
and (t4.shop_name like concat('%',#{search.keywords},'%') and (t6.username like concat('%',#{search.keywords},'%')
or t4.shop_code like concat('%',#{search.keywords},'%') or t6.account like concat('%',#{search.keywords},'%')
or t7.fence_name like concat('%',#{search.keywords},'%') or t7.fence_name like concat('%',#{search.keywords},'%')
) )
</if> </if>
GROUP BY
t5.id
ORDER BY t5.updated_date desc
</select> </select>
<select id="searchFenceApp" resultType="cn.com.glsx.admin.modules.model.FenceApproDto"> <select id="searchFenceApp" resultType="cn.com.glsx.admin.modules.model.FenceApproDto">
select select
app.id as approvalId, app.id as approvalId,
shop.shop_name AS shopName, t6.username AS shopName,
shop.shop_code AS shopCode, t6.account AS shopCode,
shop.shop_level AS shopLevel, shop.shop_level AS shopLevel,
shop.area AS area, shop.area AS area,
shop.province AS province, shop.province AS province,
...@@ -128,21 +129,22 @@ ...@@ -128,21 +129,22 @@
from t_approval app from t_approval app
left join t_electric_fence_copy tvd on app.biz_id = tvd.id and tvd.del_flag = 0 left join t_electric_fence_copy tvd on app.biz_id = tvd.id and tvd.del_flag = 0
left join t_trial_drive_shop shop on tvd.created_by=shop.created_by left join t_trial_drive_shop shop on tvd.created_by=shop.created_by
LEFT JOIN t_user t6 ON t6.id = tvd.created_by
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 t6.username is not null
GROUP BY
app.id
ORDER BY app.updated_date desc
<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>
<if test="search.keywords !=null and search.keywords != ''"> <if test="search.keywords !=null and search.keywords != ''">
and (shop.shop_name like concat('%',#{search.keywords},'%') and (t6.username like concat('%',#{search.keywords},'%')
or shop.shop_code like concat('%',#{search.keywords},'%') or t6.account like concat('%',#{search.keywords},'%')
or tvd.fence_name like concat('%',#{search.keywords},'%') or tvd.fence_name like concat('%',#{search.keywords},'%')
) )
</if> </if>
GROUP BY
app.id
ORDER BY app.updated_date desc
</select> </select>
<select id="selectByTypeAndId" resultMap="BaseResultMap" <select id="selectByTypeAndId" resultMap="BaseResultMap"
parameterType="cn.com.glsx.admin.modules.entity.Approval"> parameterType="cn.com.glsx.admin.modules.entity.Approval">
......
...@@ -39,13 +39,10 @@ ...@@ -39,13 +39,10 @@
<select id="search" resultType="cn.com.glsx.admin.modules.model.VehicleApproDto"> <select id="search" resultType="cn.com.glsx.admin.modules.model.VehicleApproDto">
SELECT SELECT
t4.shop_name AS shopName, t6.username AS shopName,
t4.shop_code AS shopCode, t6.account AS shopCode,
t4.shop_level AS shopLevel, t4.shop_level AS shopLevel,
t4.area AS area, t1.created_by as createdBy,
t4.province AS province,
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,
...@@ -61,10 +58,11 @@ ...@@ -61,10 +58,11 @@
t_vehicle t1 t_vehicle t1
LEFT JOIN (select * from (select * from t_approval ORDER BY id desc)t group by t.biz_id,t.biz_type) t5 ON (t1.ID = t5.biz_id AND t5.biz_type=2) LEFT JOIN (select * from (select * from t_approval ORDER BY id desc)t group by t.biz_id,t.biz_type) t5 ON (t1.ID = t5.biz_id AND t5.biz_type=2)
LEFT JOIN t_trial_drive_shop t4 ON t1.created_by = t4.created_by LEFT JOIN t_trial_drive_shop t4 ON t1.created_by = t4.created_by
LEFT JOIN t_user t6 ON t6.id = t1.created_by
left join t_electric_fence t7 on t4.fence_id=t7.id left join t_electric_fence t7 on t4.fence_id=t7.id
WHERE WHERE
t1.del_flag = 0 t1.del_flag = 0
and t4.shop_name is not null and t6.username is not null
<if test="search.approvalStatus !=null and search.approvalStatus != ''"> <if test="search.approvalStatus !=null and search.approvalStatus != ''">
and t5.status=#{search.approvalStatus} and t5.status=#{search.approvalStatus}
</if> </if>
...@@ -75,8 +73,8 @@ ...@@ -75,8 +73,8 @@
and t5.id is null and t5.id is null
</if> </if>
<if test="search.keywords !=null and search.keywords != ''"> <if test="search.keywords !=null and search.keywords != ''">
and (t4.shop_name like concat('%',#{search.keywords},'%') and (t6.username like concat('%',#{search.keywords},'%')
or t4.shop_code like concat('%',#{search.keywords},'%') or t6.account like concat('%',#{search.keywords},'%')
or t7.fence_name like concat('%',#{search.keywords},'%') or t7.fence_name like concat('%',#{search.keywords},'%')
) )
</if> </if>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!