车辆bug修改
This commit is contained in:
parent
cdb12bc9e0
commit
fd6ad14792
@ -44,6 +44,39 @@ public class CarPassRecordController {
|
|||||||
|
|
||||||
public static Map<String, Object> openCarMap = new HashMap<>();
|
public static Map<String, Object> openCarMap = new HashMap<>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "分页列表查询车辆通行记录信息", notes = "分页列表查询车辆通行记录信息", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "carType", value = "查询类型,1白名单,2黑名单,3临时车辆", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "type", value = "进出类型1为出 0为进", paramType = "body", required = false, dataType = "Integer"),
|
||||||
|
@ApiImplicitParam(name = "carNumber", value = "车牌号", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "startTime", value = "开始时间时间,格式2021-06-01", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "endTime", value = "结束时间,格式2021-06-01", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@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 = "timeType", value = "1今日2历史", paramType = "body", required = true, dataType = "Integer"),
|
||||||
|
})
|
||||||
|
@PostMapping(value = {"/list", "/page"})
|
||||||
|
public Result<IPage<CarPassRecord>> queryPageList(@RequestBody Map<String, Object> map) {
|
||||||
|
return Result.success(carPassRecordService.selectProjectCarPassPageList(map));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询当日车辆通行记录列表", notes = "查询当日车辆通行记录列表", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "cameraId", value = "相机ID", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "type", value = "类型,1查询临时车通行记录,2查询白名单车通行记录,不传查所有", paramType = "body", required = false, dataType = "String"),
|
||||||
|
})
|
||||||
|
@PostMapping(value = "/getCarPassRecordList")
|
||||||
|
public Result<List<CarPassRecord>> getCarPassRecordList(@RequestBody Map<String, Object> map) {
|
||||||
|
return Result.success(carPassRecordService.getCarPassRecordList(map));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
*
|
*
|
||||||
@ -81,39 +114,6 @@ public class CarPassRecordController {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页列表查询
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "分页列表查询车辆通行记录信息", notes = "分页列表查询车辆通行记录信息", httpMethod = "POST")
|
|
||||||
@ApiImplicitParams({
|
|
||||||
@ApiImplicitParam(name = "carType", value = "查询类型,1白名单,2黑名单,3临时车辆", paramType = "body", required = false, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "type", value = "进出类型1为出 0为进", paramType = "body", required = false, dataType = "Integer"),
|
|
||||||
@ApiImplicitParam(name = "carNumber", value = "车牌号", paramType = "body", required = false, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "startTime", value = "开始时间时间,格式2021-06-01", paramType = "body", required = false, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "endTime", value = "结束时间,格式2021-06-01", paramType = "body", required = false, dataType = "String"),
|
|
||||||
@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 = "timeType", value = "1今日2历史", paramType = "body", required = true, dataType = "Integer"),
|
|
||||||
})
|
|
||||||
@PostMapping(value = {"/list", "/page"})
|
|
||||||
public Result<IPage<CarPassRecord>> queryPageList(@RequestBody Map<String, Object> map) {
|
|
||||||
return Result.success(carPassRecordService.selectProjectCarPassPageList(map));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "查询当日车辆通行记录列表", notes = "查询当日车辆通行记录列表", httpMethod = "POST")
|
|
||||||
@ApiImplicitParams({
|
|
||||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "body", required = true, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "cameraId", value = "相机ID", paramType = "body", required = false, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "type", value = "类型,1查询临时车通行记录,2查询白名单车通行记录,不传查所有", paramType = "body", required = false, dataType = "String"),
|
|
||||||
})
|
|
||||||
@PostMapping(value = "/getCarPassRecordList")
|
|
||||||
public Result<List<CarPassRecord>> getCarPassRecordList(@RequestBody Map<String, Object> map) {
|
|
||||||
return Result.success(carPassRecordService.getCarPassRecordList(map));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "车辆通行记录统计", notes = "车辆通行记录统计", httpMethod = "POST")
|
@ApiOperation(value = "车辆通行记录统计", notes = "车辆通行记录统计", httpMethod = "POST")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
|
|||||||
@ -100,7 +100,7 @@ public class CarInfo implements Serializable {
|
|||||||
@ApiModelProperty(value = "报警推送人")
|
@ApiModelProperty(value = "报警推送人")
|
||||||
private java.lang.String alarmPushWorkerId;
|
private java.lang.String alarmPushWorkerId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "车辆类型(1、固定车,2、预约车辆(临时)3、外来车辆)")
|
@ApiModelProperty(value = "车辆类型(1、固定车,2、预约车辆(长期)3、预约车辆(临时)")
|
||||||
private Integer carModuleType;
|
private Integer carModuleType;
|
||||||
|
|
||||||
@ApiModelProperty(value = "预约开始时间")
|
@ApiModelProperty(value = "预约开始时间")
|
||||||
|
|||||||
@ -121,4 +121,15 @@ public class CarPassRecord implements Serializable {
|
|||||||
@ApiModelProperty(value = "车辆状态名称(未出场、已出场、已进场、未进场)")
|
@ApiModelProperty(value = "车辆状态名称(未出场、已出场、已进场、未进场)")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private java.lang.String vehicleStateName;
|
private java.lang.String vehicleStateName;
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "合作单位名称")
|
||||||
|
private java.lang.String enterpriseName;
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
|
private java.lang.String driverWorkerName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "车辆类型(1、固定车,2、预约车辆(长期)3、预约车辆(临时)、4外来车辆")
|
||||||
|
private Integer carModuleType;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,14 +1,17 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.zhgd.xmgl.modules.car.mapper.CarInfoMapper">
|
<mapper namespace="com.zhgd.xmgl.modules.car.mapper.CarInfoMapper">
|
||||||
|
<sql id="all">
|
||||||
<select id="selectCarList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
SELECT
|
||||||
SELECT if(t.car_module_type=1 or t.car_module_type=2,wi.id_card,t.outside_driver_id_card) as
|
if(t.car_module_type=1 or t.car_module_type=2,wi.id_card,t.outside_driver_id_card) as outsideDriverIdCard,
|
||||||
outside_driver_id_card,
|
if(t.car_module_type=1 or t.car_module_type=2,wi.worker_name,t.driver_worker_name) as driverWorkerName,
|
||||||
t.*,b.car_type_name,ei.enterprise_name
|
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)
|
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 enterprise_info ei on ei.id=t.enterprise_id
|
||||||
left join worker_info wi on t.driver_worker_id = wi.id
|
left join worker_info wi on t.driver_worker_id = wi.id and t.car_module_type=1 or t.car_module_type=2
|
||||||
|
left join worker_info wi1 on wi1.id_card=t.outside_driver_id_card and t.car_module_type=3
|
||||||
WHERE t.project_sn=#{param.projectSn}
|
WHERE t.project_sn=#{param.projectSn}
|
||||||
<if test="param.carNumber != null and param.carNumber != ''">
|
<if test="param.carNumber != null and param.carNumber != ''">
|
||||||
and t.car_number like CONCAT(CONCAT('%',#{param.carNumber}),'%')
|
and t.car_number like CONCAT(CONCAT('%',#{param.carNumber}),'%')
|
||||||
@ -29,6 +32,10 @@
|
|||||||
and t.send_success_status = #{param.sendSuccessStatus}
|
and t.send_success_status = #{param.sendSuccessStatus}
|
||||||
</if>
|
</if>
|
||||||
order by t.id desc
|
order by t.id desc
|
||||||
|
</sql>
|
||||||
|
<select id="selectCarList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||||
|
<include refid="all">
|
||||||
|
</include>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCarTypeCount" resultType="java.util.Map">
|
<select id="selectCarTypeCount" resultType="java.util.Map">
|
||||||
SELECT b.car_type_name carTypeName,COUNT(1) carTypeNum,
|
SELECT b.car_type_name carTypeName,COUNT(1) carTypeNum,
|
||||||
|
|||||||
@ -155,15 +155,24 @@
|
|||||||
order by a.pass_time desc
|
order by a.pass_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="selectProjectCarPassPageList" resultType="com.zhgd.xmgl.modules.car.entity.CarPassRecord">
|
<select id="selectProjectCarPassPageList" resultType="com.zhgd.xmgl.modules.car.entity.CarPassRecord">
|
||||||
select a.*,
|
select t.*,
|
||||||
(case
|
(case
|
||||||
when b.id is not null AND b.is_black = 0 then 1
|
when b.id is not null AND b.is_black = 0 then 1
|
||||||
when b.id is not null AND b.is_black = 1 then 2
|
when b.id is not null AND b.is_black = 1 then 2
|
||||||
else 3 end) car_type
|
else 3 end) car_type,
|
||||||
FROM car_pass_record a
|
ifnull(b.car_module_type,4) as carModuleType,
|
||||||
LEFT JOIN car_info b ON (a.project_sn = b.project_sn AND a.car_number = b.car_number)
|
b.enterprise_name,
|
||||||
left join enterprise_info ei on ei.id=b.enterprise_id
|
b.driver_worker_name
|
||||||
where a.project_sn = #{param.projectSn}
|
FROM car_pass_record as t
|
||||||
|
left join (<include refid="com.zhgd.xmgl.modules.car.mapper.CarInfoMapper.all"/>) as b ON (t.project_sn =
|
||||||
|
b.project_sn AND t.car_number = b.car_number)
|
||||||
|
where t.project_sn = #{param.projectSn}
|
||||||
|
<if test="param.carModuleType != null and param.carModuleType != ''">
|
||||||
|
and b.car_module_type = #{param.carModuleType}
|
||||||
|
</if>
|
||||||
|
<if test="param.carModuleType == '4'.toString()">
|
||||||
|
and b.id is null
|
||||||
|
</if>
|
||||||
<if test="param.carType == '1'.toString()">
|
<if test="param.carType == '1'.toString()">
|
||||||
and b.id is not null
|
and b.id is not null
|
||||||
AND b.is_black = 0
|
AND b.is_black = 0
|
||||||
@ -176,21 +185,21 @@
|
|||||||
and b.id is null
|
and b.id is null
|
||||||
</if>
|
</if>
|
||||||
<if test="param.startTime != null and param.startTime != ''">
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
AND a.pass_time >= CONCAT(DATE_FORMAT(#{param.startTime}, '%Y-%m-%d'), ' 00:00:00')
|
AND t.pass_time >= CONCAT(DATE_FORMAT(#{param.startTime}, '%Y-%m-%d'), ' 00:00:00')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.endTime != null and param.endTime != ''">
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
AND a.pass_time <= CONCAT(DATE_FORMAT(#{param.endTime}, '%Y-%m-%d'), ' 23:59:59')
|
AND t.pass_time <= CONCAT(DATE_FORMAT(#{param.endTime}, '%Y-%m-%d'), ' 23:59:59')
|
||||||
</if>
|
</if>
|
||||||
<if test="param.carNumber != null and param.carNumber != ''">
|
<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>
|
||||||
<if test="param.type != null">
|
<if test="param.type != null">
|
||||||
and a.type = #{param.type}
|
and t.type = #{param.type}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.timeType == '1'.toString()">
|
<if test="param.timeType == '1'.toString()">
|
||||||
and a.pass_time >= current_date
|
and t.pass_time >= current_date
|
||||||
</if>
|
</if>
|
||||||
order by a.pass_time desc
|
order by t.pass_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCarEnterTime" resultType="java.lang.String">
|
<select id="selectCarEnterTime" resultType="java.lang.String">
|
||||||
select pass_time
|
select pass_time
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user