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; private String buildingName;
/**
* 网格id
*/
private String gridId;
private Integer page; private Integer page;
private Integer limit; 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; private String communityName;
/**
* 网格id
*/
private String gridId;
private Integer page; private Integer page;
private Integer limit; 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; 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; 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; private String telephone;
/**
* 网格id
*/
private String gridId;
private Integer page; private Integer page;
private Integer limit; 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.form.PreserVationFormDTO;
import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO;
import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO;
import com.epmet.opendata.dto.result.LouDongCascadeResultDTO;
import com.epmet.opendata.excel.CaLoudongExcel; import com.epmet.opendata.excel.CaLoudongExcel;
import com.epmet.opendata.service.CaLoudongService; import com.epmet.opendata.service.CaLoudongService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -128,4 +129,18 @@ public class CaLoudongController {
return new Result(); 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.ca.CaLoudongDTO;
import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO;
import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO;
import com.epmet.opendata.dto.result.LouDongCascadeResultDTO;
import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.CaLoudongEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -32,7 +33,8 @@ public interface CaLoudongDao extends BaseDao<CaLoudongEntity> {
* @date 2022/5/31 18:57 * @date 2022/5/31 18:57
*/ */
List<CaLoudongResultDTO> getPage(@Param("communityName") String communityName, 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); CaLoudongDetailsResultDTO getLouDongDetails(@Param("buildingId") BigInteger buildingId);
int deleteAll(); 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 * @return
*/ */
List<CaPingfangResultDTO> getPage(@Param("buildingName") String buildingName, List<CaPingfangResultDTO> getPage(@Param("buildingName") String buildingName,
@Param("communityName") String communityName); @Param("communityName") String communityName,
@Param("gridId") String gridId);
int deleteAll(); 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, List<CaRentalResultDTO> getPage(@Param("residentName") String residentName,
@Param("houseName") String houseName, @Param("houseName") String houseName,
@Param("renterName") String renterName); @Param("renterName") String renterName,
@Param("gridId") String gridId);
int deleteAll(); 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, List<CaResidentResultDTO> getPage(@Param("residentName") String residentName,
@Param("idCard") String idCard, @Param("idCard") String idCard,
@Param("telephone") String telephone); @Param("telephone") String telephone,
@Param("gridId") String gridId);
int deleteAll(); 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, List<CaRotatorsResultDTO> getPage(@Param("rotatorsName") String rotatorsName,
@Param("idCard") String idCard, @Param("idCard") String idCard,
@Param("telephone") String telephone); @Param("telephone") String telephone,
@Param("gridId") String gridId);
int deleteAll(); 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.form.PreserVationFormDTO;
import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO;
import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO;
import com.epmet.opendata.dto.result.LouDongCascadeResultDTO;
import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.CaLoudongEntity;
@ -107,4 +108,14 @@ public interface CaLoudongService extends BaseService<CaLoudongEntity> {
* @param dto * @param dto
*/ */
void preserLouDongVation(PreserVationFormDTO 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.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.utils.HttpClientManager;
import com.epmet.commons.tools.utils.Result;
import com.epmet.opendata.dao.CaLoudongDao; import com.epmet.opendata.dao.CaLoudongDao;
import com.epmet.opendata.dto.ca.CaLoudongDTO; import com.epmet.opendata.dto.ca.CaLoudongDTO;
import com.epmet.opendata.dto.constant.CaWghDataConstant; 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.form.PreserVationFormDTO;
import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO; import com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO;
import com.epmet.opendata.dto.result.CaLoudongResultDTO; import com.epmet.opendata.dto.result.CaLoudongResultDTO;
import com.epmet.opendata.dto.result.LouDongCascadeResultDTO;
import com.epmet.opendata.entity.CaLoudongEntity; import com.epmet.opendata.entity.CaLoudongEntity;
import com.epmet.opendata.redis.CaLoudongRedis; import com.epmet.opendata.redis.CaLoudongRedis;
import com.epmet.opendata.service.CaLoudongService; import com.epmet.opendata.service.CaLoudongService;
@ -106,7 +105,7 @@ public class CaLoudongServiceImpl extends BaseServiceImpl<CaLoudongDao, CaLoudon
@Override @Override
public PageData<CaLoudongResultDTO> getPage(CaLoudongFormDTO dto) { public PageData<CaLoudongResultDTO> getPage(CaLoudongFormDTO dto) {
PageHelper.startPage(dto.getPage(), dto.getLimit()); 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); PageInfo<CaLoudongResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal()); 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 { private int listLouDong(PreserVationFormDTO dto) throws Exception {
String aes = AesUtils.encryptByAES(JSONObject.toJSONString(dto), CaWghDataConstant.AESKEY); 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 @Override
public PageData getPage(CaPingfangFormDTO dto) { public PageData getPage(CaPingfangFormDTO dto) {
PageHelper.startPage(dto.getPage(), dto.getLimit()); 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); PageInfo<CaPingfangResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal()); 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()); PageHelper.startPage(dto.getPage(), dto.getLimit());
List<CaRentalResultDTO> result = baseDao.getPage(dto.getResidentName(), List<CaRentalResultDTO> result = baseDao.getPage(dto.getResidentName(),
dto.getHouseName(), dto.getHouseName(),
dto.getRenterName()); dto.getRenterName(),
dto.getGridId());
PageInfo<CaRentalResultDTO> info = new PageInfo<>(result); PageInfo<CaRentalResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal()); 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()); PageHelper.startPage(dto.getPage(), dto.getLimit());
List<CaResidentResultDTO> result = baseDao.getPage(dto.getResidentName(), List<CaResidentResultDTO> result = baseDao.getPage(dto.getResidentName(),
dto.getIdCard(), dto.getIdCard(),
dto.getTelephone()); dto.getTelephone(),
dto.getGridId());
PageInfo<CaResidentResultDTO> info = new PageInfo<>(result); PageInfo<CaResidentResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal()); 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()); PageHelper.startPage(dto.getPage(), dto.getLimit());
List<CaRotatorsResultDTO> result = baseDao.getPage(dto.getRotatorsName(), List<CaRotatorsResultDTO> result = baseDao.getPage(dto.getRotatorsName(),
dto.getIdCard(), dto.getIdCard(),
dto.getTelephone()); dto.getTelephone(),
dto.getGridId());
PageInfo<CaRotatorsResultDTO> info = new PageInfo<>(result); PageInfo<CaRotatorsResultDTO> info = new PageInfo<>(result);
return new PageData<>(result, info.getTotal()); 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>
<select id="getPage" resultType="com.epmet.opendata.dto.result.CaLoudongResultDTO"> <select id="getPage" resultType="com.epmet.opendata.dto.result.CaLoudongResultDTO">
SELECT SELECT
building_id, ca.building_id,
building_type, ca.building_type,
grid_id, ca.grid_id,
building_name, ca.building_name,
building_use, ca.building_use,
building_status, ca.building_status,
building_structure, ca.building_structure,
building_useage, ca.building_useage,
construction_time, ca.construction_time,
building_addr, ca.building_addr,
community_name, ca.community_name,
building_leader, ca.building_leader,
layer_count, ca.layer_count,
basement_layer_count, ca.basement_layer_count,
house_begin_layer, ca.house_begin_layer,
unit_count, ca.unit_count,
layer_room_count, ca.layer_room_count,
room_count, ca.room_count,
elevator_count, ca.elevator_count,
building_area, ca.building_area,
building_pmc, ca.building_pmc,
building_desc, ca.building_desc,
point_status, ca.point_status,
longitude, ca.longitude,
latitude, ca.latitude,
plat_code, ca.plat_code,
community_id ca.community_id,
vs.grid_name,
vs.community_name,
vs.street_name
FROM FROM
ca_loudong ca_loudong as ca
LEFT JOIN view_grid_comm_street as vs on ca.grid_id = vs.grid_id
<where> <where>
delete_flag = 'normal' ca.delete_flag = 'normal'
<if test="communityName != null and communityName != ''"> <if test="communityName != null and communityName != ''">
AND community_name like '%${communityName}%' AND ca.community_name like '%${communityName}%'
</if> </if>
<if test="buildingName != null and buildingName != ''"> <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> </if>
</where> </where>
order by grid_id,building_id,community_id desc order by ca.grid_id,ca.building_id,ca.community_id desc
</select> </select>
<select id="getLouDongDetails" resultType="com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO"> <select id="getLouDongDetails" resultType="com.epmet.opendata.dto.result.CaLoudongDetailsResultDTO">
SELECT SELECT
@ -108,6 +115,18 @@
</if> </if>
</where> </where>
</select> </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> </mapper>

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

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

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

@ -49,44 +49,51 @@
</delete> </delete>
<select id="getPage" resultType="com.epmet.opendata.dto.result.CaRentalResultDTO"> <select id="getPage" resultType="com.epmet.opendata.dto.result.CaRentalResultDTO">
SELECT SELECT
rental_id, ca.rental_id,
grid_id, ca.grid_id,
house_id, ca.house_id,
house_name, ca.house_name,
house_address, ca.house_address,
house_use, ca.house_use,
house_area, ca.house_area,
id_type, ca.id_type,
id_card, ca.id_card,
resident_name, ca.resident_name,
telephone, ca.telephone,
curlive_address, ca.curlive_address,
rent_use, ca.rent_use,
trouble_type, ca.trouble_type,
renter_id, ca.renter_id,
renter_card_number, ca.renter_card_number,
renter_card_type, ca.renter_card_type,
renter_name, ca.renter_name,
renter_phone, ca.renter_phone,
longitude, ca.longitude,
latitude, ca.latitude,
point_status, ca.point_status,
plat_code ca.plat_code,
vs.grid_name,
vs.community_name,
vs.street_name
FROM FROM
ca_rental ca_rental as ca
left join view_grid_comm_street as vs on ca.grid_id = vs.grid_id
<where> <where>
delete_flag = 'normal' ca.delete_flag = 'normal'
<if test="residentName != null and residentName != ''"> <if test="residentName != null and residentName != ''">
AND resident_name like '%${residentName}%' AND ca.resident_name like '%${residentName}%'
</if> </if>
<if test="houseName != null and houseName != ''"> <if test="houseName != null and houseName != ''">
AND house_name like '%${houseName}%' AND ca.house_name like '%${houseName}%'
</if> </if>
<if test="renterName != null and renterName != ''"> <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> </if>
</where> </where>
order by grid_id,rental_id,id_card desc order by ca.grid_id,ca.rental_id,ca.id_card desc
</select> </select>
<select id="getRentalDetails" resultType="com.epmet.opendata.dto.result.CaRentalDetailsResultDTO"> <select id="getRentalDetails" resultType="com.epmet.opendata.dto.result.CaRentalDetailsResultDTO">
SELECT 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 id="getPage" resultType="com.epmet.opendata.dto.result.CaResidentResultDTO">
SELECT SELECT
resident_id, ca.resident_id,
grid_id, ca.grid_id,
resident_property, ca.resident_property,
resident_type, ca.resident_type,
id_type, ca.id_type,
id_card, ca.id_card,
resident_name, ca.resident_name,
sex, ca.sex,
birthday, ca.birthday,
nation, ca.nation,
telephone, ca.telephone,
household_prov, ca.household_prov,
household_city, ca.household_city,
household_county, ca.household_county,
household_town, ca.household_town,
household_village, ca.household_village,
household_address_detail, ca.household_address_detail,
curlive_prov, ca.curlive_prov,
curlive_city, ca.curlive_city,
curlive_county, ca.curlive_county,
curlive_town, ca.curlive_town,
curlive_village, ca.curlive_village,
curlive_address_detail, ca.curlive_address_detail,
native_address_prov, ca.native_address_prov,
native_address_city, ca.native_address_city,
native_address_county, ca.native_address_county,
former_name, ca.former_name,
education, ca.education,
occupation, ca.occupation,
occupation_type, ca.occupation_type,
service_address, ca.service_address,
marriage_status, ca.marriage_status,
party, ca.party,
religious, ca.religious,
conversion_state, ca.conversion_state,
nationality, ca.nationality,
plat_code ca.plat_code,
vs.grid_name,
vs.community_name,
vs.street_name
FROM FROM
ca_resident ca_resident as ca
left join view_grid_comm_street as vs on ca.grid_id = vs.grid_id
<where> <where>
delete_flag = 'normal' ca.delete_flag = 'normal'
<if test="residentName != null and residentName != ''"> <if test="residentName != null and residentName != ''">
AND resident_name like '%${residentName}%' AND ca.resident_name like '%${residentName}%'
</if> </if>
<if test="idCard != null and idCard != ''"> <if test="idCard != null and idCard != ''">
AND id_card like '%${idCard}%' AND ca.id_card like '%${idCard}%'
</if> </if>
<if test="telephone != null and telephone != ''"> <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> </if>
</where> </where>
order by grid_id,resident_id,id_card desc order by ca.grid_id,ca.resident_id,ca.id_card desc
</select> </select>
<select id="getResidentDetails" resultType="com.epmet.opendata.dto.result.CaResidentDetailsResultDTO"> <select id="getResidentDetails" resultType="com.epmet.opendata.dto.result.CaResidentDetailsResultDTO">
select select

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

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

Loading…
Cancel
Save