车辆类型筛选
This commit is contained in:
parent
3effa96125
commit
9470a7913f
@ -66,6 +66,7 @@ public class CarInfoController {
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "body", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "body", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "carModuleType", value = "车辆类型(1、固定车,2、预约车辆(临时)、3外来车辆)", paramType = "body", required = false, dataType = "Integer"),
|
||||
})
|
||||
@PostMapping(value = "/selectCarList")
|
||||
public Result<IPage<EntityMap>> selectCarList(@RequestBody Map<String,Object> map) {
|
||||
|
||||
@ -3,29 +3,32 @@
|
||||
<mapper namespace="com.zhgd.xmgl.modules.car.mapper.CarInfoMapper">
|
||||
|
||||
<select id="selectCarList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT if(a.car_module_type=1 or a.car_module_type=2,wi.id_card,a.outside_driver_id_card) as
|
||||
SELECT if(t.car_module_type=1 or t.car_module_type=2,wi.id_card,t.outside_driver_id_card) as
|
||||
outside_driver_id_card,
|
||||
a.*,b.car_type_name,ei.enterprise_name
|
||||
FROM car_info a LEFT JOIN car_type b ON (a.car_type=b.id and a.project_sn=b.project_sn)
|
||||
left join enterprise_info ei on ei.id=a.enterprise_id
|
||||
left join worker_info wi on a.driver_worker_id = wi.id
|
||||
WHERE a.project_sn=#{param.projectSn}
|
||||
t.*,b.car_type_name,ei.enterprise_name
|
||||
FROM car_info t LEFT JOIN car_type b ON (t.car_type=b.id and t.project_sn=b.project_sn)
|
||||
left join enterprise_info ei on ei.id=t.enterprise_id
|
||||
left join worker_info wi on t.driver_worker_id = wi.id
|
||||
WHERE t.project_sn=#{param.projectSn}
|
||||
<if test="param.carNumber != null and param.carNumber != ''">
|
||||
and a.car_number like CONCAT(CONCAT('%',#{param.carNumber}),'%')
|
||||
and t.car_number like CONCAT(CONCAT('%',#{param.carNumber}),'%')
|
||||
</if>
|
||||
<if test="param.isBlack != null">
|
||||
and a.is_black=#{param.isBlack}
|
||||
and t.is_black=#{param.isBlack}
|
||||
</if>
|
||||
<if test="param.carModuleType != null and param.carModuleType != ''">
|
||||
and t.car_module_type = #{param.carModuleType}
|
||||
</if>
|
||||
<if test="param.enterpriseIds != null and param.enterpriseIds.size() != 0">
|
||||
and a.enterprise_id in
|
||||
and t.enterprise_id in
|
||||
<foreach collection="param.enterpriseIds" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param.sendSuccessStatus != null">
|
||||
and a.send_success_status = #{param.sendSuccessStatus}
|
||||
and t.send_success_status = #{param.sendSuccessStatus}
|
||||
</if>
|
||||
order by a.id desc
|
||||
order by t.id desc
|
||||
</select>
|
||||
<select id="selectCarTypeCount" resultType="java.util.Map">
|
||||
SELECT b.car_type_name carTypeName,COUNT(1) carTypeNum,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user