Browse Source

Merge branch 'dev' of http://git.elinkit.com.cn:7070/r/epmet-cloud into develop

 Conflicts:
	epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java
	epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml
dev
zxc 4 years ago
parent
commit
bf242d650d
  1. 10
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java
  2. 98
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

10
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java

@ -80,11 +80,6 @@ public interface IcHouseDao extends BaseDao<IcHouseEntity> {
*/ */
List<HousesNameResultDTO> getHousesNameByIdCards(@Param("idCards") List<String> idCards); List<HousesNameResultDTO> getHousesNameByIdCards(@Param("idCards") List<String> idCards);
/**
* @Author sun
* @Description 人房房屋总数饼图
**/
List<HouseChartResultDTO> houseChart(@Param("orgId") String orgId, @Param("orgType") String orgType);
/** /**
* Desc: 根据楼栋ID修改房屋名 * Desc: 根据楼栋ID修改房屋名
* @param buildingId * @param buildingId
@ -93,4 +88,9 @@ public interface IcHouseDao extends BaseDao<IcHouseEntity> {
*/ */
void houseUpdateHouseName(@Param("buildingId")String buildingId); void houseUpdateHouseName(@Param("buildingId")String buildingId);
/**
* @Author sun
* @Description 人房房屋总数饼图
**/
List<HouseChartResultDTO> houseChart(@Param("orgId") String orgId, @Param("orgType") String orgType);
} }

98
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

@ -81,51 +81,12 @@
AND h.BUILDING_ID = #{buildingId} AND h.BUILDING_ID = #{buildingId}
</update> </update>
<!--<select id="searchHouseByPage" resultType="map"> <select id="searchHouseByPage" resultType="com.epmet.dto.result.IcHouseListResultDTO">
select
a.ID as houseId,
a.HOUSE_NAME as houseName,
a.DOOR_NAME as doorName,
a.HOUSE_TYPE as houseType,
a.PURPOSE as purpose,
a.RENT_FLAG as rentFlag,
a.OWNER_NAME as ownerName,
a.OWNER_PHONE as ownerPhone,
a.OWNER_ID_CARD as ownerIdCard,
b.BUILDING_NAME as buildingName,
c.NEIGHBOR_HOOD_NAME as neighborHoodName,
d.UNIT_NUM as unitName
from ic_house a
INNER JOIN ic_building b on a.BUILDING_ID = b.ID
and c.ID in (select e.ID from ic_building e ${ew1.customSqlSegment})
INNER JOIN ic_neighbor_hood c on a.NEIGHBOR_HOOD_ID = c.ID
and c.ID in (select f.ID from ic_neighbor_hood f
INNER JOIN customer_agency g on f.AGENCY_ID = g.ID
INNER JOIN customer_grid h on f.GRID_ID = h.ID
${ew2.customSqlSegment}
)
LEFT JOIN ic_building_unit d on a.BUILDING_UNIT_ID = d.ID
${ew.customSqlSegment}
</select>-->
<!--<select id="searchHouseByPage" resultType="map">
select
a.ID as houseId,
a.HOUSE_NAME as houseName,
a.DOOR_NAME as doorName,
a.HOUSE_TYPE as houseType,
a.PURPOSE as purpose,
a.RENT_FLAG as rentFlag,
a.OWNER_NAME as ownerName,
a.OWNER_PHONE as ownerPhone,
a.OWNER_ID_CARD as ownerIdCard,
b.BUILDING_NAME as buildingName,
CONCAT(d.UNIT_NUM,'单元') as unitNum,
<select id="searchHouseByPage" resultType="map">
select select
a.HOUSE_NAME as houseName, concat(b.BUILDING_NAME,'-',d.UNIT_NUM,'-',a.DOOR_NAME) as houseName,
c.NEIGHBOR_HOOD_NAME as neighborHoodName, c.NEIGHBOR_HOOD_NAME as neighborHoodName,
b.BUILDING_NAME as buildingName, b.BUILDING_NAME as buildingName,
d.UNIT_NUM as unitNum, CONCAT(d.UNIT_NUM,'单元') as unitNum,
a.DOOR_NAME as doorName, a.DOOR_NAME as doorName,
(case when a.RENT_FLAG = '0' then '自住' (case when a.RENT_FLAG = '0' then '自住'
when a.RENT_FLAG = '1' then '出租' when a.RENT_FLAG = '1' then '出租'
@ -185,57 +146,6 @@
<if test="buildingName != null and buildingName.trim() != ''"> <if test="buildingName != null and buildingName.trim() != ''">
AND b.BUILDING_NAME like CONCAT('%',#{buildingName},'%') AND b.BUILDING_NAME like CONCAT('%',#{buildingName},'%')
</if> </if>
</where>
/*排序规则:如果是社区查询则根据小区、楼栋、单元、房屋名字分别升序排序*/
<choose>
<when test="queryScene == 'community_search'">
ORDER BY CONVERT(c.NEIGHBOR_HOOD_NAME using gbk) ASC,
CONVERT(b.BUILDING_NAME USING gbk) ASC,
CONVERT(d.UNIT_NAME USING gbk) ASC,
CONVERT(a.HOUSE_NAME using gbk) ASC
</when>
<when test="queryScene == 'house_manage'">
ORDER BY CAST(d.UNIT_NUM AS SIGNED), a.DOOR_NAME
</when>
<otherwise>
ORDER BY CAST(d.UNIT_NUM AS SIGNED), a.DOOR_NAME
</otherwise>
</choose>
</select>
<select id="searchAllHouse" resultType="com.epmet.excel.IcHouseExcel">
select
a.HOUSE_NAME as houseName,
a.DOOR_NAME as doorName,
a.HOUSE_TYPE as houseType,
a.PURPOSE as purpose,
if(a.RENT_FLAG=1,'是','否') as rentFlag,
a.OWNER_NAME as ownerName,
a.OWNER_PHONE as ownerPhone,
a.OWNER_ID_CARD as ownerIdCard,
b.BUILDING_NAME as buildingName,
c.NEIGHBOR_HOOD_NAME as neighborHoodName,
d.UNIT_NUM as buildingUnit
from ic_house a
INNER JOIN ic_building b on a.BUILDING_ID = b.ID and b.DEL_FLAG = '0'
INNER JOIN ic_neighbor_hood c on a.NEIGHBOR_HOOD_ID = c.ID and c.DEL_FLAG = '0'
LEFT JOIN ic_building_unit d on a.BUILDING_UNIT_ID = d.ID and d.DEL_FLAG = '0'
<where>
<if test="house.buildingId != null and house.buildingId.trim() != ''">
AND a.BUILDING_ID = #{house.buildingId}
</if>
<if test="house.ownerName != null and house.ownerName.trim() != ''">
AND a.OWNER_NAME like concat('%',#{house.ownerName},'%')
</if>
<if test="house.ownerPhone != null and house.ownerPhone.trim() != ''">
AND a.OWNER_PHONE like concat('%',#{house.ownerPhone},'%')
</if>
<if test="house.delFlag != null and house.delFlag.trim() != ''">
AND a.DEL_FLAG = #{house.delFlag}
</if>
</where>
</select>
<if test="rentFlag != null and rentFlag.trim() != ''"> <if test="rentFlag != null and rentFlag.trim() != ''">
AND a.rent_flag = #{rentFlag} AND a.rent_flag = #{rentFlag}
</if> </if>
@ -247,7 +157,7 @@
CONVERT(d.UNIT_NAME USING gbk), CONVERT(d.UNIT_NAME USING gbk),
CAST(a.DOOR_NAME AS SIGNED), CAST(a.DOOR_NAME AS SIGNED),
CONVERT(a.DOOR_NAME using gbk) CONVERT(a.DOOR_NAME using gbk)
</select>--> </select>
<select id="queryHouseInfo" parameterType="map" resultType="com.epmet.dto.result.HouseInfoDTO"> <select id="queryHouseInfo" parameterType="map" resultType="com.epmet.dto.result.HouseInfoDTO">
SELECT SELECT

Loading…
Cancel
Save