parent
e3154dfe0f
commit
d0805510da
|
|
@ -47,10 +47,25 @@ public class CarDriverController {
|
|||
@DecryptAndVerify(decryptedClass = CarDriverVo.class)
|
||||
public PageInfo<CarDriverVo> getDriverList(EncryptedReq<CarDriverVo> dto) {
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
List<CarDriverVo> list = service.getDriverPageList(dto.getData());;
|
||||
List<CarDriverVo> list = service.getDriverPageList(dto.getData());
|
||||
PageInfo<CarDriverVo> pageInfo = new PageInfo<>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询类型数据接口--查询白名单
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getDriverPageWhiteList")
|
||||
@DecryptAndVerify(decryptedClass = CarDriverVo.class)
|
||||
public PageInfo<CarDriverVo> getDriverPageWhiteList(EncryptedReq<CarDriverVo> dto) {
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
List<CarDriverVo> list = service.getDriverPageWhiteList(dto.getData());;
|
||||
PageInfo<CarDriverVo> pageInfo = new PageInfo<>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出需求计划
|
||||
* @param
|
||||
|
|
@ -76,6 +91,31 @@ public class CarDriverController {
|
|||
log.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出--驾驶员白名单
|
||||
* @param
|
||||
*/
|
||||
@PostMapping("exportWhiteList")
|
||||
public void exportWhiteList(HttpServletResponse response, @RequestBody CarDriverVo dto) {
|
||||
try {
|
||||
List<CarDriverVo> list = service.getDriverPageWhiteList(dto);
|
||||
final int[] num = {1};
|
||||
list.forEach(vo->{
|
||||
if (vo.getIsWhiteList()==1){
|
||||
vo.setIsWhiteStr("是");
|
||||
} else {
|
||||
vo.setIsWhiteStr("否");
|
||||
}
|
||||
vo.setXh(num[0]);
|
||||
num[0]++;
|
||||
});
|
||||
ExportExcelUtil.export(response,"驾驶员", CarDriverVo.class,list);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增车辆信息
|
||||
* @param
|
||||
|
|
|
|||
|
|
@ -17,6 +17,13 @@ public interface CarDriverMapper {
|
|||
*/
|
||||
List<CarDriverVo> getDriverPageList(CarDriverVo data);
|
||||
|
||||
/**
|
||||
* 驾驶员白名单列表查询
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<CarDriverVo> getDriverPageWhiteList(CarDriverVo data);
|
||||
|
||||
/**
|
||||
* 新增驾驶人员
|
||||
* @param driverVo
|
||||
|
|
@ -51,4 +58,5 @@ public interface CarDriverMapper {
|
|||
* @return
|
||||
*/
|
||||
List<CarDriverVo> getDriverListBySup(CarDriverVo data);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,13 @@ public interface CarDriverService {
|
|||
*/
|
||||
List<CarDriverVo> getDriverPageList(CarDriverVo data);
|
||||
|
||||
/**
|
||||
* 获取驾驶员白名单列表
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<CarDriverVo> getDriverPageWhiteList(CarDriverVo data);
|
||||
|
||||
/**
|
||||
* 新增人员信息
|
||||
* @param request
|
||||
|
|
@ -62,4 +69,5 @@ public interface CarDriverService {
|
|||
* @return
|
||||
*/
|
||||
ServerResponse getDriverImageList(CarDriverVo data);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,17 @@ public class CarDriverServiceImpl implements CarDriverService{
|
|||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CarDriverVo> getDriverPageWhiteList(CarDriverVo data) {
|
||||
try{
|
||||
return mapper.getDriverPageWhiteList(data);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增驾驶员细腻些
|
||||
* @param request
|
||||
|
|
|
|||
|
|
@ -17,33 +17,62 @@
|
|||
where id=#{id}
|
||||
</update>
|
||||
|
||||
<select id="getDriverPageList" resultType="com.bonus.gzcar.business.backstage.entity.CarDriverVo">
|
||||
select cdi.id, cdi.name, cdi.phone, cdi.sup_id supId,file1.num sfzNum,file2.num jszNum,file3.num otherNum,cs.name supName,cdi.is_white as isWhiteList
|
||||
from car_driver_info cdi
|
||||
left join car_supplier cs on cs.id=cdi.sup_id
|
||||
left join(
|
||||
SELECT count(1) num ,own_id id,type from bm_file_upload
|
||||
where model_table='car_driver_info' AND type in(2,3)
|
||||
GROUP BY own_id
|
||||
)file1 on file1.id=cdi.id
|
||||
left join(
|
||||
SELECT count(1) num ,own_id id,type from bm_file_upload
|
||||
where model_table='car_driver_info' AND type in(4,5)
|
||||
GROUP BY own_id
|
||||
)file2 on file2.id=cdi.id
|
||||
left join(
|
||||
SELECT count(1) num ,own_id id,type from bm_file_upload
|
||||
where model_table='car_driver_info' AND type=6
|
||||
GROUP BY own_id
|
||||
)file3 on file3.id=cdi.id
|
||||
where cdi.is_active=1
|
||||
<select id="getDriverPageList" resultType="com.bonus.gzcar.business.backstage.entity.CarDriverVo">
|
||||
select cdi.id, cdi.name, cdi.phone, cdi.sup_id supId,file1.num sfzNum,file2.num jszNum,file3.num
|
||||
otherNum,cs.name supName,cdi.is_white as isWhiteList
|
||||
from car_driver_info cdi
|
||||
left join car_supplier cs on cs.id=cdi.sup_id
|
||||
left join(
|
||||
SELECT count(1) num ,own_id id,type from bm_file_upload
|
||||
where model_table='car_driver_info' AND type in(2,3)
|
||||
GROUP BY own_id
|
||||
)file1 on file1.id=cdi.id
|
||||
left join(
|
||||
SELECT count(1) num ,own_id id,type from bm_file_upload
|
||||
where model_table='car_driver_info' AND type in(4,5)
|
||||
GROUP BY own_id
|
||||
)file2 on file2.id=cdi.id
|
||||
left join(
|
||||
SELECT count(1) num ,own_id id,type from bm_file_upload
|
||||
where model_table='car_driver_info' AND type=6
|
||||
GROUP BY own_id
|
||||
)file3 on file3.id=cdi.id
|
||||
where cdi.is_active=1
|
||||
<if test="name!=null and name!=''">
|
||||
and cdi.name like concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="supName!=null and supName!=''">
|
||||
and cs.name like concat('%',#{supName},'%')
|
||||
</if>
|
||||
ORDER BY cdi.create_time desc
|
||||
</select>
|
||||
<select id="getDriverPageWhiteList" resultType="com.bonus.gzcar.business.backstage.entity.CarDriverVo">
|
||||
select cdi.id, cdi.name, cdi.phone, cdi.sup_id supId,file1.num sfzNum,file2.num jszNum,file3.num otherNum,cs.name supName,cdi.is_white as isWhiteList
|
||||
from car_driver_info cdi
|
||||
left join car_supplier cs on cs.id=cdi.sup_id
|
||||
left join(
|
||||
SELECT count(1) num ,own_id id,type from bm_file_upload
|
||||
where model_table='car_driver_info' AND type in(2,3)
|
||||
GROUP BY own_id
|
||||
)file1 on file1.id=cdi.id
|
||||
left join(
|
||||
SELECT count(1) num ,own_id id,type from bm_file_upload
|
||||
where model_table='car_driver_info' AND type in(4,5)
|
||||
GROUP BY own_id
|
||||
)file2 on file2.id=cdi.id
|
||||
left join(
|
||||
SELECT count(1) num ,own_id id,type from bm_file_upload
|
||||
where model_table='car_driver_info' AND type=6
|
||||
GROUP BY own_id
|
||||
)file3 on file3.id=cdi.id
|
||||
where cdi.is_active=1 and cdi.is_white=1
|
||||
<if test="name!=null and name!=''">
|
||||
and cdi.name like concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="supName!=null and supName!=''">
|
||||
and cs.name like concat('%',#{supName},'%')
|
||||
</if>
|
||||
ORDER BY cdi.create_time desc
|
||||
ORDER BY cdi.create_time desc
|
||||
</select>
|
||||
<select id="getDriverDetails" resultType="com.bonus.gzcar.business.backstage.entity.CarDriverVo">
|
||||
select cdi.id, cdi.name, cdi.phone, cdi.sup_id supId,cs.name supName,cdi.is_white as isWhiteList
|
||||
|
|
@ -52,7 +81,7 @@
|
|||
where cdi.id=#{id}
|
||||
</select>
|
||||
<select id="getDriverListBySup" resultType="com.bonus.gzcar.business.backstage.entity.CarDriverVo">
|
||||
select cdi.id,cdi.name,cdi.phone,cdi.sup_id supId ,cs.name supName
|
||||
select cdi.id,cdi.name,cdi.phone,cdi.sup_id supId ,cs.name supName,cdi.is_white as isWhiteList
|
||||
FROM car_driver_info cdi
|
||||
left join car_supplier cs on cs.id=cdi.sup_id
|
||||
where cdi.is_active=1
|
||||
|
|
@ -62,5 +91,10 @@
|
|||
<if test="name!=null and name!=''">
|
||||
AND INSTR(cdi.name,#{name}) > 0
|
||||
</if>
|
||||
<if test="isWhiteList!=null">
|
||||
<if test="isWhiteList!=2">
|
||||
and cdi.is_white=#{isWhiteList}
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue