| | |
| | | select |
| | | jh.id,jh.house_code,jh.name,jh.phone_number,jh.associated_user_id, |
| | | jh.role_type,jh.associated_user_name,jh.relationship,jh.is_primary_contact, |
| | | jh.residential_status,jh.gender,jh.birthday,jh.id_card,jh.card_type,jh.hkmt_pass,jh.passport, |
| | | jh.residential_status,jh.gender,jh.birthday,jh.id_card, |
| | | jh.card_type,jh.card_no,jh.hkmt_pass,jh.passport, |
| | | jh.ethnicity,jh.education,jh.resident_type, |
| | | jh.hukou_registration,jh.resident_adcode,jh.native_place_adcode, |
| | | jh.religious_belief,jh.health_status,jh.disease_name, |
| | |
| | | WHERE |
| | | jpe.is_deleted = 0 |
| | | <if test="placeExt.communityCode != null and placeExt.communityCode != ''"> |
| | | and jg.community_code=#{placeExt.communityCode} |
| | | and jg.community_code like concat('%',#{placeExt.communityCode},'%') |
| | | </if> |
| | | |
| | | <if test="placeExt.placeName != null and placeExt.placeName != ''"> |
| | | and jp.place_name like concat('%',#{placeExt.placeName},'%') |
| | | </if> |
| | | <if test="placeExt.placeId != null"> |
| | | and jp.id = #{placeExt.placeId} |
| | | </if> |
| | | <if test="placeExt.houseCode != null and placeExt.houseCode != ''"> |
| | | and jp.house_code = #{placeExt.houseCode} |
| | |
| | | <if test="placeExt.startTime != null and placeExt.startTime != '' and placeExt.endTime != null and placeExt.endTime != '' "> |
| | | AND jpe.create_time BETWEEN #{placeExt.startTime} and #{placeExt.endTime} |
| | | </if> |
| | | <if test="placeExt.roleName!=null and placeExt.roleName!='' and placeExt.createUser!=null"> |
| | | <choose> |
| | | <when test="placeExt.roleName=='网格员'"> |
| | | and |
| | | ( |
| | | jp.create_user = #{placeExt.createUser} |
| | | <if test="houseCodeList != null and houseCodeList.size()>0"> |
| | | or jp.house_code in |
| | | <foreach collection="houseCodeList" item="houseCode" separator="," open="(" close=")"> |
| | | #{houseCode} |
| | | </foreach> |
| | | </if> |
| | | ) |
| | | </when> |
| | | <otherwise> |
| | | and jp.principal_user_id = #{placeExt.createUser} |
| | | </otherwise> |
| | | </choose> |
| | | <if test="houseCodeList != null and houseCodeList.size()>0"> |
| | | and jp.house_code in |
| | | <foreach collection="houseCodeList" item="houseCode" separator="," open="(" close=")"> |
| | | #{houseCode} |
| | | </foreach> |
| | | </if> |
| | | order by jpe.create_time desc,jpe.id desc |
| | | </select> |
| | |
| | | ) b on a.id = b.id |
| | | ) jppl on jppl.place_id = jp.id |
| | | where jp.is_deleted = 0 and jp.source!=3 |
| | | <if test="place.roleName!=null and place.roleName!='' and place.createUser!=null"> |
| | | <choose> |
| | | <when test="place.roleName=='网格员'"> |
| | | and |
| | | ( |
| | | jp.create_user = #{place.createUser} |
| | | <if test="houseCodeList != null and houseCodeList.size()>0"> |
| | | or jp.house_code in |
| | | <foreach collection="houseCodeList" item="houseCode" separator ="," open="(" close=")"> |
| | | #{houseCode} |
| | | </foreach> |
| | | </if> |
| | | ) |
| | | </when> |
| | | <otherwise> |
| | | and jp.principal_user_id = #{place.createUser} |
| | | </otherwise> |
| | | </choose> |
| | | <if test="houseCodeList != null and houseCodeList.size()>0"> |
| | | and jp.house_code in |
| | | <foreach collection="houseCodeList" item="houseCode" separator ="," open="(" close=")"> |
| | | #{houseCode} |
| | | </foreach> |
| | | </if> |
| | | <if test="place.placeName!=null and place.placeName!=''"> |
| | | and jp.place_name like concat('%',#{place.placeName},'%') |
| | |
| | | if (place.getRoleName().equals("网格员")){ |
| | | // 查询对应的房屋地址code |
| | | list = gridService.getAddressCodeListByUserId(AuthUtil.getUserId()); |
| | | place.setCreateUser(AuthUtil.getUserId()); |
| | | } |
| | | if (!place.getRoleName().equals("系统管理员")){ |
| | | place.setCreateUser(AuthUtil.getUserId()); |
| | | } |
| | | } |
| | | List<PlaceVO> placeVOS = baseMapper.selectPlacePage(page, place, list); |
| | |
| | | GridVO gridVO = gridService.getGridDetailByHouseCode(placeVO.getHouseCode()); |
| | | if (null!= gridVO){ |
| | | placeVO.setGridName(gridVO.getGridName()); |
| | | // placeVO.setNeiName(gridVO.getCommunityName()); |
| | | // placeVO.setTownStreetName(gridVO.getTownStreetName()); |
| | | } |
| | | } |
| | | // 返回 |