Commit 9494d921 authored by KeYong's avatar KeYong

Merge branch 'develop_dl' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_dl

parents e5d03db1 abb3cce1
...@@ -240,4 +240,13 @@ public class Car extends BaseEntity { ...@@ -240,4 +240,13 @@ public class Car extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private Double monthTravel; private Double monthTravel;
@TableField(exist = false)
private Integer pageNum;
@TableField(exist = false)
private Integer pageSize;
@TableField(exist = false)
private String equipStatusFilter;
} }
...@@ -1599,4 +1599,18 @@ public class CarController extends AbstractBaseController { ...@@ -1599,4 +1599,18 @@ public class CarController extends AbstractBaseController {
return iCarService.getTankAndFireCarNum(code); return iCarService.getTankAndFireCarNum(code);
} }
/**
* 卡片列表分页查询API
*
* @return
*/
@RequestMapping(value = "/carListByPage", method = RequestMethod.POST)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "卡片列表分页查询API", notes = "卡片列表分页查询API")
public Page<Map<String, String>> carListByPage(@RequestBody Car car) {
Page<Map<String, String>> carListByPage = iCarService.carListByPage(car, new Page<>(car.getPageNum(), car.getPageSize()));
return carListByPage;
}
} }
package com.yeejoin.equipmanage.mapper; package com.yeejoin.equipmanage.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.equipmanage.common.entity.Car;
import com.yeejoin.equipmanage.common.entity.CarProperty; import com.yeejoin.equipmanage.common.entity.CarProperty;
import com.yeejoin.equipmanage.common.entity.vo.CarIndexVo; import com.yeejoin.equipmanage.common.entity.vo.CarIndexVo;
import com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo; import com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo;
...@@ -40,4 +42,6 @@ public interface CarPropertyMapper extends BaseMapper<CarProperty> { ...@@ -40,4 +42,6 @@ public interface CarPropertyMapper extends BaseMapper<CarProperty> {
List<Map<String, String>> selectIndexByTime(String carStartIndexKey); List<Map<String, String>> selectIndexByTime(String carStartIndexKey);
List<Map<String, String>> getTankAndFireCarNum(@Param("bizOrgCode") String bizOrgCode); List<Map<String, String>> getTankAndFireCarNum(@Param("bizOrgCode") String bizOrgCode);
Page<Map<String, String>> carListByPage(@Param("page")Page<Car> page, @Param("dto") Car car);
} }
...@@ -216,4 +216,5 @@ public interface ICarService extends IService<Car> { ...@@ -216,4 +216,5 @@ public interface ICarService extends IService<Car> {
List<Map<String, String>> getTankAndFireCarNum(String bizOrgCode); List<Map<String, String>> getTankAndFireCarNum(String bizOrgCode);
Page<Map<String, String>> carListByPage(Car car, Page<Car> objectPage);
} }
...@@ -1839,6 +1839,11 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS ...@@ -1839,6 +1839,11 @@ public class CarServiceImpl extends ServiceImpl<CarMapper, Car> implements ICarS
return carPropertyMapper.getTankAndFireCarNum(bizOrgCode); return carPropertyMapper.getTankAndFireCarNum(bizOrgCode);
} }
@Override
public Page<Map<String, String>> carListByPage(Car car, Page<Car> page) {
return carPropertyMapper.carListByPage(page, car);
}
class LossParams { class LossParams {
private Long carId; private Long carId;
......
...@@ -118,7 +118,8 @@ ...@@ -118,7 +118,8 @@
'消防车' AS `name`, '消防车' AS `name`,
count( 1 ) AS `value`, count( 1 ) AS `value`,
'辆' AS unit, '辆' AS unit,
IFNULL(( SELECT IFNULL( img, shbz_img ) AS img FROM wl_equipment WHERE `code` LIKE CONCAT( '21010000', '%' ) LIMIT 1 ), '') AS icon IFNULL(( SELECT IFNULL( img, shbz_img ) AS img FROM wl_equipment WHERE `code` LIKE CONCAT( '21010000', '%' ) LIMIT 1 ), '') AS icon,
'2101' as code
FROM FROM
`wl_car` wc `wl_car` wc
LEFT JOIN wl_equipment we ON we.`id` = wc.equipment_id LEFT JOIN wl_equipment we ON we.`id` = wc.equipment_id
...@@ -133,7 +134,8 @@ ...@@ -133,7 +134,8 @@
'消防坦克' AS `name`, '消防坦克' AS `name`,
count( 1 ) AS `value`, count( 1 ) AS `value`,
'辆' AS unit, '辆' AS unit,
IFNULL(( SELECT IFNULL( img, shbz_img ) AS img FROM wl_equipment WHERE `code` LIKE CONCAT( '21030000', '%' ) LIMIT 1 ), '') AS icon IFNULL(( SELECT IFNULL( img, shbz_img ) AS img FROM wl_equipment WHERE `code` LIKE CONCAT( '21030000', '%' ) LIMIT 1 ), '') AS icon,
'2103' as code
FROM FROM
`wl_car` wc `wl_car` wc
LEFT JOIN wl_equipment we ON we.`id` = wc.equipment_id LEFT JOIN wl_equipment we ON we.`id` = wc.equipment_id
...@@ -146,4 +148,29 @@ ...@@ -146,4 +148,29 @@
) a ) a
</select> </select>
<select id="carListByPage" resultType="java.util.Map">
SELECT
wc.`name` AS `name`,
wc.biz_org_code AS bizOrgCode,
wc.biz_org_name AS bizOrgName,
wec.`name` AS categoryName,
wc.equip_status AS equipStatus,
wc.id AS id,
wec.`code` AS `code`
FROM
wl_car wc
LEFT JOIN wl_equipment we ON we.`id` = wc.equipment_id
LEFT JOIN wl_equipment_category wec ON wec.id = we.category_id
<where>
<if test="dto.bizOrgCode != null and dto.bizOrgCode != ''">
AND wc.biz_org_code like concat (#{dto.bizOrgCode},'%')
</if>
<if test="dto.code != null and dto.code != ''">
AND wec.code like concat (#{dto.code},'%')
</if>
<if test="dto.equipStatusFilter != null and dto.equipStatusFilter != ''">
AND wc.equip_status = #{dto.equipStatusFilter}
</if>
</where>
</select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment