Browse Source

添加查询条件,查询字段,楼栋构造树结构

master
HAHA 3 years ago
parent
commit
21b15c0a57
  1. 34
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/LouDongTreeNodeUtils.java
  2. 48
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/LoudongTreeNode.java
  3. 5
      epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java
  4. 5
      epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java
  5. 5
      epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java
  6. 5
      epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java
  7. 5
      epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java
  8. 28
      epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/LouDongCascadeResultDTO.java
  9. 15
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java
  10. 7
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java
  11. 3
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java
  12. 3
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java
  13. 3
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java
  14. 3
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java
  15. 13
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java
  16. 20
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java
  17. 2
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java
  18. 3
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java
  19. 3
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java
  20. 3
      epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java
  21. 83
      epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml
  22. 71
      epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml
  23. 65
      epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml
  24. 93
      epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml
  25. 95
      epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml

34
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/LouDongTreeNodeUtils.java

@ -0,0 +1,34 @@
package com.epmet.commons.tools.utils;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class LouDongTreeNodeUtils {
/**
* 构建树节点
*/
public static <T extends LoudongTreeNode> List<T> build(List<T> treeNodes) {
List<T> result = new ArrayList<>();
//list转map
Map<Long, T> nodeMap = new LinkedHashMap<>(treeNodes.size());
for(T treeNode : treeNodes){
nodeMap.put(treeNode.getId(), treeNode);
}
for(T node : nodeMap.values()) {
T parent = nodeMap.get(node.getPid());
if(parent != null && !(node.getId().equals(parent.getId()))){
parent.getChildren().add(node);
continue;
}
result.add(node);
}
return result;
}
}

48
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/utils/LoudongTreeNode.java

@ -0,0 +1,48 @@
package com.epmet.commons.tools.utils;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class LoudongTreeNode<T> implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 上级ID
*/
private String pid;
/**
* 子节点列表
*/
private List<T> children = new ArrayList<>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPid() {
return pid;
}
public void setPid(String pid) {
this.pid = pid;
}
public List<T> getChildren() {
return children;
}
public void setChildren(List<T> children) {
this.children = children;
}
}

5
epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaLoudongFormDTO.java

@ -20,6 +20,11 @@ public class CaLoudongFormDTO implements Serializable {
*/
private String buildingName;
/**
* 网格id
*/
private String gridId;
private Integer page;
private Integer limit;

5
epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaPingfangFormDTO.java

@ -19,6 +19,11 @@ public class CaPingfangFormDTO implements Serializable {
*/
private String communityName;
/**
* 网格id
*/
private String gridId;
private Integer page;
private Integer limit;

5
epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRentalFormtDTO.java

@ -19,6 +19,11 @@ public class CaRentalFormtDTO implements Serializable {
*/
private String houseName;
/**
* 网格id
*/
private String gridId;
/**
* 承租人姓名
*/

5
epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaResidentFormDTO.java

@ -28,4 +28,9 @@ public class CaResidentFormDTO implements Serializable {
*/
private String telephone;
/**
* 网格id
*/
private String gridId;
}

5
epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/form/CaRotatorsFormDTO.java

@ -25,6 +25,11 @@ public class CaRotatorsFormDTO implements Serializable {
*/
private String telephone;
/**
* 网格id
*/
private String gridId;
private Integer page;
private Integer limit;
}

28
epmet-module/open-data-worker/open-data-worker-client/src/main/java/com/epmet/opendata/dto/result/LouDongCascadeResultDTO.java

@ -0,0 +1,28 @@
package com.epmet.opendata.dto.result;
import com.epmet.commons.tools.utils.LoudongTreeNode;
import com.epmet.commons.tools.utils.TreeNode;
import lombok.Data;
import java.io.Serializable;
@Data
public class LouDongCascadeResultDTO extends LoudongTreeNode implements Serializable {
private static final long serialVersionUID = -359443782589013555L;
private String gridId;
private String gridName;
private String communityId;
private String communityName;
private String streetId;
private String streetName;
private String pid;
}

15
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/controller/CaLoudongController.java

@ -17,6 +17,7 @@ import com.epmet.opendata.dto.form.CaLoudongFormDTO;
import com.epmet.opendata.dto.form.PreserVationFormDTO;
import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO;
import com.epmet.opendata.dto.result.CaLoudongResultDTO;
import com.epmet.opendata.dto.result.LouDongCascadeResultDTO;
import com.epmet.opendata.excel.CaLoudongExcel;
import com.epmet.opendata.service.CaLoudongService;
import org.springframework.beans.factory.annotation.Autowired;
@ -128,4 +129,18 @@ public class CaLoudongController {
return new Result();
}
/**
* 获取级联菜单
*
* @param
* @return com.epmet.commons.tools.utils.Result
* @author LZN
* @date 2022/6/15 14:01
*/
@PostMapping("getLouDongCascade")
public Result getLouDongCascade(){
List<LouDongCascadeResultDTO> dto = caLoudongService.getLouDongCascade();
return new Result().ok(dto);
}
}

7
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaLoudongDao.java

@ -5,6 +5,7 @@ import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.opendata.dto.ca.CaLoudongDTO;
import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO;
import com.epmet.opendata.dto.result.CaLoudongResultDTO;
import com.epmet.opendata.dto.result.LouDongCascadeResultDTO;
import com.epmet.opendata.entity.CaLoudongEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -32,7 +33,8 @@ public interface CaLoudongDao extends BaseDao<CaLoudongEntity> {
* @date 2022/5/31 18:57
*/
List<CaLoudongResultDTO> getPage(@Param("communityName") String communityName,
@Param("buildingName") String buildingName);
@Param("buildingName") String buildingName,
@Param("gridId") String gridId);
/**
* 楼栋基本信息详情
@ -43,4 +45,7 @@ public interface CaLoudongDao extends BaseDao<CaLoudongEntity> {
CaLoudongDetailsResultDTO getLouDongDetails(@Param("buildingId") BigInteger buildingId);
int deleteAll();
List<LouDongCascadeResultDTO> getLouDongCascade();
}

3
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaPingfangDao.java

@ -23,7 +23,8 @@ public interface CaPingfangDao extends BaseDao<CaPingfangEntity> {
* @return
*/
List<CaPingfangResultDTO> getPage(@Param("buildingName") String buildingName,
@Param("communityName") String communityName);
@Param("communityName") String communityName,
@Param("gridId") String gridId);
int deleteAll();

3
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRentalDao.java

@ -28,7 +28,8 @@ public interface CaRentalDao extends BaseDao<CaRentalEntity> {
*/
List<CaRentalResultDTO> getPage(@Param("residentName") String residentName,
@Param("houseName") String houseName,
@Param("renterName") String renterName);
@Param("renterName") String renterName,
@Param("gridId") String gridId);
int deleteAll();

3
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaResidentDao.java

@ -27,7 +27,8 @@ public interface CaResidentDao extends BaseDao<CaResidentEntity> {
*/
List<CaResidentResultDTO> getPage(@Param("residentName") String residentName,
@Param("idCard") String idCard,
@Param("telephone") String telephone);
@Param("telephone") String telephone,
@Param("gridId") String gridId);
int deleteAll();

3
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/CaRotatorsDao.java

@ -28,7 +28,8 @@ public interface CaRotatorsDao extends BaseDao<CaRotatorsEntity> {
*/
List<CaRotatorsResultDTO> getPage(@Param("rotatorsName") String rotatorsName,
@Param("idCard") String idCard,
@Param("telephone") String telephone);
@Param("telephone") String telephone,
@Param("gridId") String gridId);
int deleteAll();

13
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/CaLoudongService.java

@ -9,6 +9,7 @@ import com.epmet.opendata.dto.form.CaLoudongFormDTO;
import com.epmet.opendata.dto.form.PreserVationFormDTO;
import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO;
import com.epmet.opendata.dto.result.CaLoudongResultDTO;
import com.epmet.opendata.dto.result.LouDongCascadeResultDTO;
import com.epmet.opendata.entity.CaLoudongEntity;
@ -107,4 +108,14 @@ public interface CaLoudongService extends BaseService<CaLoudongEntity> {
* @param dto
*/
void preserLouDongVation(PreserVationFormDTO dto);
}
/**
* 获取级联菜单
*
* @param
* @return java.util.List<com.epmet.opendata.dto.result.LouDongCascadeResultDTO>
* @author LZN
* @date 2022/6/15 14:01
*/
List<LouDongCascadeResultDTO> getLouDongCascade();
}

20
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaLoudongServiceImpl.java

@ -7,9 +7,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.*;
import com.epmet.opendata.dao.CaLoudongDao;
import com.epmet.opendata.dto.ca.CaLoudongDTO;
import com.epmet.opendata.dto.constant.CaWghDataConstant;
@ -18,6 +16,7 @@ import com.epmet.opendata.dto.form.CaLoudongFormDTO;
import com.epmet.opendata.dto.form.PreserVationFormDTO;
import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO;
import com.epmet.opendata.dto.result.CaLoudongResultDTO;
import com.epmet.opendata.dto.result.LouDongCascadeResultDTO;
import com.epmet.opendata.entity.CaLoudongEntity;
import com.epmet.opendata.redis.CaLoudongRedis;
import com.epmet.opendata.service.CaLoudongService;
@ -106,7 +105,7 @@ public class CaLoudongServiceImpl extends BaseServiceImpl<CaLoudongDao, CaLoudon
@Override
public PageData<CaLoudongResultDTO> getPage(CaLoudongFormDTO dto) {
PageHelper.startPage(dto.getPage(), dto.getLimit());
List<CaLoudongResultDTO> result = baseDao.getPage(dto.getCommunityName(), dto.getBuildingName());
List<CaLoudongResultDTO> result = baseDao.getPage(dto.getCommunityName(), dto.getBuildingName(),dto.getGridId());
PageInfo<CaLoudongResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal());
}
@ -162,6 +161,19 @@ public class CaLoudongServiceImpl extends BaseServiceImpl<CaLoudongDao, CaLoudon
}
/**
* 获取级联菜单
*
* @param
* @return java.util.List<com.epmet.opendata.dto.result.LouDongCascadeResultDTO>
* @author LZN
* @date 2022/6/15 14:01
*/
@Override
public List<LouDongCascadeResultDTO> getLouDongCascade() {
List<LouDongCascadeResultDTO> list = baseDao.getLouDongCascade();
return LouDongTreeNodeUtils.build(list);
}
private int listLouDong(PreserVationFormDTO dto) throws Exception {
String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY);

2
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaPingfangServiceImpl.java

@ -99,7 +99,7 @@ public class CaPingfangServiceImpl extends BaseServiceImpl<CaPingfangDao, CaPing
@Override
public PageData getPage(CaPingfangFormDTO dto) {
PageHelper.startPage(dto.getPage(), dto.getLimit());
List<CaPingfangResultDTO> result = baseDao.getPage(dto.getBuildingName(), dto.getCommunityName());
List<CaPingfangResultDTO> result = baseDao.getPage(dto.getBuildingName(), dto.getCommunityName(),dto.getGridId());
PageInfo<CaPingfangResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal());
}

3
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRentalServiceImpl.java

@ -104,7 +104,8 @@ public class CaRentalServiceImpl extends BaseServiceImpl<CaRentalDao, CaRentalEn
PageHelper.startPage(dto.getPage(), dto.getLimit());
List<CaRentalResultDTO> result = baseDao.getPage(dto.getResidentName(),
dto.getHouseName(),
dto.getRenterName());
dto.getRenterName(),
dto.getGridId());
PageInfo<CaRentalResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal());
}

3
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaResidentServiceImpl.java

@ -107,7 +107,8 @@ public class CaResidentServiceImpl extends BaseServiceImpl<CaResidentDao, CaResi
PageHelper.startPage(dto.getPage(), dto.getLimit());
List<CaResidentResultDTO> result = baseDao.getPage(dto.getResidentName(),
dto.getIdCard(),
dto.getTelephone());
dto.getTelephone(),
dto.getGridId());
PageInfo<CaResidentResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal());
}

3
epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/CaRotatorsServiceImpl.java

@ -107,7 +107,8 @@ public class CaRotatorsServiceImpl extends BaseServiceImpl<CaRotatorsDao, CaRota
PageHelper.startPage(dto.getPage(), dto.getLimit());
List<CaRotatorsResultDTO> result = baseDao.getPage(dto.getRotatorsName(),
dto.getIdCard(),
dto.getTelephone());
dto.getTelephone(),
dto.getGridId());
PageInfo<CaRotatorsResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal());
}

83
epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaLoudongDao.xml

@ -56,45 +56,52 @@
</select>
<select id="getPage" resultType="com.epmet.opendata.dto.result.CaLoudongResultDTO">
SELECT
building_id,
building_type,
grid_id,
building_name,
building_use,
building_status,
building_structure,
building_useage,
construction_time,
building_addr,
community_name,
building_leader,
layer_count,
basement_layer_count,
house_begin_layer,
unit_count,
layer_room_count,
room_count,
elevator_count,
building_area,
building_pmc,
building_desc,
point_status,
longitude,
latitude,
plat_code,
community_id
ca.building_id,
ca.building_type,
ca.grid_id,
ca.building_name,
ca.building_use,
ca.building_status,
ca.building_structure,
ca.building_useage,
ca.construction_time,
ca.building_addr,
ca.community_name,
ca.building_leader,
ca.layer_count,
ca.basement_layer_count,
ca.house_begin_layer,
ca.unit_count,
ca.layer_room_count,
ca.room_count,
ca.elevator_count,
ca.building_area,
ca.building_pmc,
ca.building_desc,
ca.point_status,
ca.longitude,
ca.latitude,
ca.plat_code,
ca.community_id,
vs.grid_name,
vs.community_name,
vs.street_name
FROM
ca_loudong
ca_loudong as ca
LEFT JOIN view_grid_comm_street as vs on ca.grid_id = vs.grid_id
<where>
delete_flag = 'normal'
ca.delete_flag = 'normal'
<if test="communityName != null and communityName != ''">
AND community_name like '%${communityName}%'
AND ca.community_name like '%${communityName}%'
</if>
<if test="buildingName != null and buildingName != ''">
AND building_name like '%${buildingName}%'
AND ca.building_name like '%${buildingName}%'
</if>
<if test="gridId != null and gridId != ''">
AND vs.grid_id_path like '%${gridId}%'
</if>
</where>
order by grid_id,building_id,community_id desc
order by ca.grid_id,ca.building_id,ca.community_id desc
</select>
<select id="getLouDongDetails" resultType="com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO">
SELECT
@ -108,6 +115,18 @@
</if>
</where>
</select>
<select id="getLouDongCascade" resultType="com.epmet.opendata.dto.result.LouDongCascadeResultDTO">
SELECT
GRID_ID,
GRID_NAME,
community_id,
community_name,
street_id,
street_name,
grid_id_path AS pid
FROM
view_grid_comm_street
</select>
</mapper>

71
epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaPingfangDao.xml

@ -53,45 +53,52 @@
</delete>
<select id="getPage" resultType="com.epmet.opendata.dto.result.CaPingfangResultDTO">
SELECT
building_id,
building_type,
grid_id,
building_name,
building_use,
building_status,
building_structure,
building_useage,
construction_time,
building_addr,
community_name,
building_leader,
layer_count,
basement_layer_count,
house_begin_layer,
unit_count,
layer_room_count,
room_count,
elevator_count,
building_area,
building_pmc,
building_desc,
point_status,
longitude,
latitude,
plat_code,
community_id
ca.building_id,
ca.building_type,
ca.grid_id,
ca.building_name,
ca.building_use,
ca.building_status,
ca.building_structure,
ca.building_useage,
ca.construction_time,
ca.building_addr,
ca.community_name,
ca.building_leader,
ca.layer_count,
ca.basement_layer_count,
ca.house_begin_layer,
ca.unit_count,
ca.layer_room_count,
ca.room_count,
ca.elevator_count,
ca.building_area,
ca.building_pmc,
ca.building_desc,
ca.point_status,
ca.longitude,
ca.latitude,
ca.plat_code,
ca.community_id,
vs.grid_name,
vs.community_name,
vs.street_name
FROM
ca_pingfang
ca_pingfang as ca
left join view_grid_comm_street as vs on ca.grid_id = vs.grid_id
<where>
delete_flag = 'normal'
ca.delete_flag = 'normal'
<if test="buildingName != null and buildingName != ''">
AND building_name like '%${buildingName}%'
AND ca.building_name like '%${buildingName}%'
</if>
<if test="communityName != null and communityName != ''">
AND community_name like '%${communityName}%'
AND ca.community_name like '%${communityName}%'
</if>
<if test="gridId != null and gridId != ''">
AND vs.grid_id_path like '%${gridId}%'
</if>
</where>
order by grid_id,building_id,community_id desc
order by ca.grid_id,ca.building_id,ca.community_id desc
</select>
<select id="getPingFangDetails" resultType="com.epmet.opendata.dto.result.CaPingFangDetailsResultDTO">
select

65
epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRentalDao.xml

@ -49,44 +49,51 @@
</delete>
<select id="getPage" resultType="com.epmet.opendata.dto.result.CaRentalResultDTO">
SELECT
rental_id,
grid_id,
house_id,
house_name,
house_address,
house_use,
house_area,
id_type,
id_card,
resident_name,
telephone,
curlive_address,
rent_use,
trouble_type,
renter_id,
renter_card_number,
renter_card_type,
renter_name,
renter_phone,
longitude,
latitude,
point_status,
plat_code
ca.rental_id,
ca.grid_id,
ca.house_id,
ca.house_name,
ca.house_address,
ca.house_use,
ca.house_area,
ca.id_type,
ca.id_card,
ca.resident_name,
ca.telephone,
ca.curlive_address,
ca.rent_use,
ca.trouble_type,
ca.renter_id,
ca.renter_card_number,
ca.renter_card_type,
ca.renter_name,
ca.renter_phone,
ca.longitude,
ca.latitude,
ca.point_status,
ca.plat_code,
vs.grid_name,
vs.community_name,
vs.street_name
FROM
ca_rental
ca_rental as ca
left join view_grid_comm_street as vs on ca.grid_id = vs.grid_id
<where>
delete_flag = 'normal'
ca.delete_flag = 'normal'
<if test="residentName != null and residentName != ''">
AND resident_name like '%${residentName}%'
AND ca.resident_name like '%${residentName}%'
</if>
<if test="houseName != null and houseName != ''">
AND house_name like '%${houseName}%'
AND ca.house_name like '%${houseName}%'
</if>
<if test="renterName != null and renterName != ''">
AND renter_name like '%${renterName}%'
AND ca.renter_name like '%${renterName}%'
</if>
<if test="gridId != null and gridId != ''">
AND vs.grid_id_path like '%${gridId}%'
</if>
</where>
order by grid_id,rental_id,id_card desc
order by ca.grid_id,ca.rental_id,ca.id_card desc
</select>
<select id="getRentalDetails" resultType="com.epmet.opendata.dto.result.CaRentalDetailsResultDTO">
SELECT

93
epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaResidentDao.xml

@ -64,58 +64,65 @@
<select id="getPage" resultType="com.epmet.opendata.dto.result.CaResidentResultDTO">
SELECT
resident_id,
grid_id,
resident_property,
resident_type,
id_type,
id_card,
resident_name,
sex,
birthday,
nation,
telephone,
household_prov,
household_city,
household_county,
household_town,
household_village,
household_address_detail,
curlive_prov,
curlive_city,
curlive_county,
curlive_town,
curlive_village,
curlive_address_detail,
native_address_prov,
native_address_city,
native_address_county,
former_name,
education,
occupation,
occupation_type,
service_address,
marriage_status,
party,
religious,
conversion_state,
nationality,
plat_code
ca.resident_id,
ca.grid_id,
ca.resident_property,
ca.resident_type,
ca.id_type,
ca.id_card,
ca.resident_name,
ca.sex,
ca.birthday,
ca.nation,
ca.telephone,
ca.household_prov,
ca.household_city,
ca.household_county,
ca.household_town,
ca.household_village,
ca.household_address_detail,
ca.curlive_prov,
ca.curlive_city,
ca.curlive_county,
ca.curlive_town,
ca.curlive_village,
ca.curlive_address_detail,
ca.native_address_prov,
ca.native_address_city,
ca.native_address_county,
ca.former_name,
ca.education,
ca.occupation,
ca.occupation_type,
ca.service_address,
ca.marriage_status,
ca.party,
ca.religious,
ca.conversion_state,
ca.nationality,
ca.plat_code,
vs.grid_name,
vs.community_name,
vs.street_name
FROM
ca_resident
ca_resident as ca
left join view_grid_comm_street as vs on ca.grid_id = vs.grid_id
<where>
delete_flag = 'normal'
ca.delete_flag = 'normal'
<if test="residentName != null and residentName != ''">
AND resident_name like '%${residentName}%'
AND ca.resident_name like '%${residentName}%'
</if>
<if test="idCard != null and idCard != ''">
AND id_card like '%${idCard}%'
AND ca.id_card like '%${idCard}%'
</if>
<if test="telephone != null and telephone != ''">
AND telephone like '%${telephone}%'
AND ca.telephone like '%${telephone}%'
</if>
<if test="gridId != null and gridId != ''">
AND vs.grid_id_path like '%${gridId}%'
</if>
</where>
order by grid_id,resident_id,id_card desc
order by ca.grid_id,ca.resident_id,ca.id_card desc
</select>
<select id="getResidentDetails" resultType="com.epmet.opendata.dto.result.CaResidentDetailsResultDTO">
select

95
epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/CaRotatorsDao.xml

@ -66,59 +66,66 @@
</delete>
<select id="getPage" resultType="com.epmet.opendata.dto.result.CaRotatorsResultDTO">
SELECT
rotators_id,
id_card,
id_type,
rotators_name,
former_name,
sex,
birthday,
nation,
native_address_prov,
native_address_city,
native_address_country,
marriage_status,
party,
education,
religious,
occupation_type,
occupation,
service_address,
telephone,
household_address_prov,
household_address_city,
household_address_country,
household_address_town,
household_address_village,
household_address_detail,
curlive_address_prov,
curlive_address_city,
curlive_address_country,
curlive_address_town,
curlive_address_village,
curlive_address_detail,
inflow_reason,
certificate_type,
certificate_number,
sign_date,
end_date,
residence_type,
is_focus_person
ca.rotators_id,
ca.id_card,
ca.id_type,
ca.rotators_name,
ca.former_name,
ca.sex,
ca.birthday,
ca.nation,
ca.native_address_prov,
ca.native_address_city,
ca.native_address_country,
ca.marriage_status,
ca.party,
ca.education,
ca.religious,
ca.occupation_type,
ca.occupation,
ca.service_address,
ca.telephone,
ca.household_address_prov,
ca.household_address_city,
ca.household_address_country,
ca.household_address_town,
ca.household_address_village,
ca.household_address_detail,
ca.curlive_address_prov,
ca.curlive_address_city,
ca.curlive_address_country,
ca.curlive_address_town,
ca.curlive_address_village,
ca.curlive_address_detail,
ca.inflow_reason,
ca.certificate_type,
ca.certificate_number,
ca.sign_date,
ca.end_date,
ca.residence_type,
ca.is_focus_person,
vs.grid_name,
vs.community_name,
vs.street_name
FROM
ca_rotators
ca_rotators as ca
left join view_grid_comm_street as vs on vs.grid_id = ca.grid_id
<where>
delete_flag = 'normal'
ca.delete_flag = 'normal'
<if test="rotatorsName != null and rotatorsName != ''">
AND rotators_name like '%${rotatorsName}%'
AND ca.rotators_name like '%${rotatorsName}%'
</if>
<if test="idCard != null and idCard != ''">
AND id_card like '%${idCard}%'
AND ca.id_card like '%${idCard}%'
</if>
<if test="telephone != null and telephone != ''">
AND telephone like '%${telephone}%'
AND ca.telephone like '%${telephone}%'
</if>
<if test="gridId != null and gridId != ''">
AND vs.grid_id_path like '%${gridId}%'
</if>
</where>
order by grid_id,rotators_id,id_card desc
order by ca.grid_id,ca.rotators_id,ca.id_card desc
</select>
<select id="getRotatorsDetails" resultType="com.epmet.opendata.dto.result.CaRotatorsDetailsResultDTO">
select

Loading…
Cancel
Save