Browse Source

物业管理,管理小区数量

master
yinzuomei 2 years ago
parent
commit
fbefe607e5
  1. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java
  2. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java
  3. 1
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPropertyManagementDao.java

@ -62,5 +62,6 @@ public interface IcPropertyManagementDao extends BaseDao<IcPropertyManagementEnt
List<IcPropertyManagementDTO> queryList(@Param("customerId") String customerId,
@Param("name")String name,
@Param("contactName") String contactName,
@Param("contactMobile") String contactMobile);
@Param("contactMobile") String contactMobile,
@Param("agencyId")String agencyId);
}

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/PropertyManagementServiceImpl.java

@ -5,10 +5,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.*;
import com.epmet.constants.ImportTaskConstants;
import com.epmet.dao.IcNeighborHoodPropertyDao;
@ -183,8 +185,9 @@ public class PropertyManagementServiceImpl implements PropertyManagementService
*/
@Override
public PageData<IcPropertyManagementDTO> page(Integer pageNo, Integer pageSize, String name, String contactName, String contactMobile, String queryType) {
CustomerStaffInfoCacheResult staffInfoCacheResult= CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(),EpmetRequestHolder.getLoginUserId());
PageHelper.startPage(pageNo, pageSize);
List<IcPropertyManagementDTO> list = icPropertyManagementDao.queryList(EpmetRequestHolder.getLoginUserCustomerId(), name, contactName, contactMobile);
List<IcPropertyManagementDTO> list = icPropertyManagementDao.queryList(EpmetRequestHolder.getLoginUserCustomerId(), name, contactName, contactMobile,staffInfoCacheResult.getAgencyId());
PageInfo<IcPropertyManagementDTO> pageInfo = new PageInfo<>(list);
// 导出时需要导出关联的小区名称
if ("export".equals(queryType)) {
@ -219,6 +222,7 @@ public class PropertyManagementServiceImpl implements PropertyManagementService
.distinct().collect(Collectors.toList());
resultDto.setNeighborHoodNames(CollectionUtils.isNotEmpty(neighborHoodList) ? StringUtils.join(neighborHoodNames, StrConstant.COMMA_ZH) : StrConstant.EPMETY_STR);
resultDto.setNeighborHoodList(neighborHoodList);
resultDto.setTotalNeighborHood(CollectionUtils.isNotEmpty(neighborHoodList)?neighborHoodList.size():NumConstant.ZERO);
return resultDto;
}

1
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPropertyManagementDao.xml

@ -78,6 +78,7 @@
where pr.PROPERTY_ID=m.id
and pr.del_flag='0'
and h.del_flag='0'
and (pr.AGENCY_ID=#{agencyId} or pr.AGENCY_PIDS like concat('%',#{agencyId},'%') )
)as totalNeighborHood
from ic_property_management m
where m.del_flag='0'

Loading…
Cancel
Save