From 2e64c232ab6b51b2cecf1ee96e1e9b709234f326 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期六, 21 八月 2021 16:35:14 +0800 Subject: [PATCH] 随手拍改版接口开发 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngCarDAO.java | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 42 insertions(+), 4 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngCarDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngCarDAO.java index 3b4505c..153e696 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngCarDAO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngCarDAO.java @@ -3,9 +3,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.panzhihua.common.model.dtos.community.ExportComMngCarExcelDTO; +import com.panzhihua.common.model.dtos.community.ExportRealCompanyExcelDTO; import com.panzhihua.common.model.dtos.community.PageComMngCarDTO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.ComMngCarExcelVO; import com.panzhihua.common.model.vos.community.ComMngCarVO; import com.panzhihua.common.model.vos.community.ComMngPopulationCarVO; +import com.panzhihua.common.model.vos.community.ComMngRealCompanyExcelVO; import com.panzhihua.service_community.model.dos.ComMngCarDO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -26,8 +31,9 @@ " t.id, " + " t.community_id AS communityId, " + " t1.`name` AS communityName, " + + " t.card_no AS cardNo, " + " t.area_id AS areaId, " + - " t2.area_name AS areaName, " + + " t.area_name AS areaName, " + " t.user_id userId, " + " t.user_name AS userName, " + " t.address, " + @@ -40,16 +46,18 @@ "FROM " + " com_mng_car t " + " LEFT JOIN com_act t1 ON t.community_id = t1.community_id " + - " LEFT JOIN com_mng_struct_area t2 ON t2.id = t.area_id " + " LEFT JOIN sys_user t3 ON t.create_by = t3.user_id " + " WHERE 1=1" + - "<if test='pageComMngCarDTO.name != null and pageComMngCarDTO.name.trim() != ""'>" + + "<if test='pageComMngCarDTO.name != null and pageComMngCarDTO.name != ""'>" + " and t.user_name LIKE concat( '%',#{pageComMngCarDTO.name}, '%' ) " + + " </if> " + + "<if test='pageComMngCarDTO.villageId != null and pageComMngCarDTO.villageId != ""'>" + + " and t.area_id = #{pageComMngCarDTO.villageId} " + " </if> " + "<if test='pageComMngCarDTO.communityId != null and pageComMngCarDTO.communityId != 0'>" + " and t.community_id = #{pageComMngCarDTO.communityId} " + " </if> " + - "<if test='pageComMngCarDTO.areaName != null'>" + + "<if test='pageComMngCarDTO.areaName != null and pageComMngCarDTO.areaName != ""'>" + " and t2.area_name LIKE concat( '%',#{pageComMngCarDTO.areaName}, '%' ) " + " </if> " + " order by t.create_at desc" + @@ -62,4 +70,34 @@ List<ComMngPopulationCarVO> getPopulationCarListByIdCard(@Param(value = "idCard") String idCard); + + @Select("<script> " + + " SELECT " + + " t.area_name AS areaName, " + + " t.user_name AS userName, " + + " t.card_no AS cardNo, " + + " t.brand, " + + " t.plate_num AS plateNum, " + + " t.color, " + + " t.mobile, " + + " t.address " + + "FROM " + + " com_mng_car t where 1=1 " + + "<if test='exportComMngCarExcelDTO.areaName != null and exportComMngCarExcelDTO.areaName.trim() != ""'>" + + " and t.area_name LIKE concat( #{exportComMngCarExcelDTO.areaName}, '%' ) " + + " </if> " + + "<if test='exportComMngCarExcelDTO.communityId != null and exportComMngCarExcelDTO.communityId != ""'>" + + " and t.community_id = #{exportComMngCarExcelDTO.communityId} " + + " </if> " + + "<if test='exportComMngCarExcelDTO.villageId != null and exportComMngCarExcelDTO.villageId != ""'>" + + " and t.area_id = #{exportComMngCarExcelDTO.villageId} " + + " </if> " + + "<if test='exportComMngCarExcelDTO.userName != null and exportComMngCarExcelDTO.userName.trim() != ""'>" + + " and t.user_name LIKE concat( #{exportComMngCarExcelDTO.userName}, '%' ) " + + " </if> " + + " order by t.create_at desc" + + "</script>") + List<ComMngCarExcelVO> exportRealCar(@Param(value = "exportComMngCarExcelDTO") ExportComMngCarExcelDTO exportComMngCarExcelDTO); + + } -- Gitblit v1.7.1