Browse Source

Merge remote-tracking branch 'origin/dev'

dev
yinzuomei 4 years ago
parent
commit
226b39fef1
  1. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java
  2. 30
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/NeighborHoodManageDelFormDTO.java
  3. 22
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodManageDelResultDTO.java
  4. 1
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerGridConstant.java
  5. 13
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
  6. 26
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java
  7. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java
  8. 87
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  9. 43
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml
  10. 8
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DelIcResiUserFormDTO.java
  11. 9
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java
  12. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java
  13. 33
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java
  14. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java
  15. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java
  16. 11
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  17. 13
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java

@ -250,6 +250,7 @@ public enum EpmetErrorCode {
ORG_ADD_FAILED(8919,"添加失败"), ORG_ADD_FAILED(8919,"添加失败"),
ORG_EDIT_FAILED(8920,"编辑失败"), ORG_EDIT_FAILED(8920,"编辑失败"),
ORG_DEL_FAILED(8921,"删除失败"), ORG_DEL_FAILED(8921,"删除失败"),
NEIGHBORHOOD_DEL_FAILED(8922,""),
//通用错误码 start //通用错误码 start

30
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/NeighborHoodManageDelFormDTO.java

@ -0,0 +1,30 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2022/3/1 4:35 下午
* @DESC
*/
@Data
public class NeighborHoodManageDelFormDTO implements Serializable {
private static final long serialVersionUID = 405799151478155056L;
public interface NeighborHoodManageDelForm{}
@NotNull(message = "ids不能为空" , groups = NeighborHoodManageDelForm.class)
private List<String> ids;
/**
* 小区neighborHood楼栋building房屋house
*/
@NotBlank(message = "type不能为空" , groups = NeighborHoodManageDelForm.class)
private String type;
}

22
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodManageDelResultDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/3/2 10:05 上午
* @DESC
*/
@Data
public class NeighborHoodManageDelResultDTO implements Serializable {
private static final long serialVersionUID = -4248802585738319974L;
private String neighborHoodId;
private String buildingId;
private String houseId;
private String name;
}

1
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/constant/CustomerGridConstant.java

@ -19,4 +19,5 @@ public interface CustomerGridConstant {
String NEIGHBORHOOD = "neighborHood"; String NEIGHBORHOOD = "neighborHood";
String BUILDING = "building"; String BUILDING = "building";
String HOUSE = "house";
} }

13
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java

@ -289,4 +289,17 @@ public class HouseController implements ResultDataResolver {
return new Result<>(); return new Result<>();
} }
/**
* Desc 小区管理中批量删除
* @param formDTO
* @author zxc
* @date 2022/3/1 4:57 下午
*/
@PostMapping("delete")
public Result allDelete(@RequestBody NeighborHoodManageDelFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO, NeighborHoodManageDelFormDTO.NeighborHoodManageDelForm.class);
houseService.allDelete(formDTO);
return new Result();
}
} }

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

@ -20,6 +20,7 @@ package com.epmet.dao;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.HouseInfoDTO; import com.epmet.dto.result.HouseInfoDTO;
import com.epmet.dto.result.NeighborHoodManageDelResultDTO;
import com.epmet.entity.IcHouseEntity; import com.epmet.entity.IcHouseEntity;
import com.epmet.excel.IcHouseExcel; import com.epmet.excel.IcHouseExcel;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -74,4 +75,29 @@ public interface IcHouseDao extends BaseDao<IcHouseEntity> {
@Param("buildingUnitId")String buildingUnitId, @Param("buildingUnitId")String buildingUnitId,
@Param("doorName")String doorName, @Param("doorName")String doorName,
@Param("houseId")String houseId); @Param("houseId")String houseId);
/**
* Desc: 根据小区IDs查询小区下是否有存在楼栋的
* @param ids
* @author zxc
* @date 2022/3/2 9:51 上午
*/
List<NeighborHoodManageDelResultDTO> selectExistBuildingByNeighborHoodIds(@Param("ids")List<String> ids);
/**
* Desc: 根据楼栋IDs查询楼栋下是否有存在房屋的
* @param ids
* @author zxc
* @date 2022/3/2 9:53 上午
*/
List<NeighborHoodManageDelResultDTO> selectExistHouseByBuildingIds(@Param("ids")List<String> ids);
/**
* Desc: 根据房屋ID查询名字
* @param ids
* @author zxc
* @date 2022/3/2 11:00 上午
*/
List<String> selectHouseNames(@Param("ids")List<String> ids);
} }

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java

@ -21,6 +21,7 @@ import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.IcHouseFormDTO; import com.epmet.dto.form.IcHouseFormDTO;
import com.epmet.dto.form.ImportInfoFormDTO; import com.epmet.dto.form.ImportInfoFormDTO;
import com.epmet.dto.form.ListIcNeighborHoodFormDTO; import com.epmet.dto.form.ListIcNeighborHoodFormDTO;
import com.epmet.dto.form.NeighborHoodManageDelFormDTO;
import com.epmet.dto.result.HouseInfoDTO; import com.epmet.dto.result.HouseInfoDTO;
import com.epmet.dto.result.IcNeighborHoodResultDTO; import com.epmet.dto.result.IcNeighborHoodResultDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO;
@ -69,4 +70,12 @@ public interface HouseService {
List<HouseInfoDTO> queryListHouseInfo(Set<String> houseIds, String customerId); List<HouseInfoDTO> queryListHouseInfo(Set<String> houseIds, String customerId);
Result dispose(InputStream inputStream, ImportInfoFormDTO formDTO, Result<ImportTaskCommonResultDTO> importTask); Result dispose(InputStream inputStream, ImportInfoFormDTO formDTO, Result<ImportTaskCommonResultDTO> importTask);
/**
* Desc 小区管理中批量删除
* @param formDTO
* @author zxc
* @date 2022/3/1 4:57 下午
*/
void allDelete(NeighborHoodManageDelFormDTO formDTO);
} }

87
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -19,6 +19,8 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.constants.ImportTaskConstants; import com.epmet.constants.ImportTaskConstants;
import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.CustomerGridConstant;
import com.epmet.dao.IcBuildingDao; import com.epmet.dao.IcBuildingDao;
import com.epmet.dao.IcBuildingUnitDao; import com.epmet.dao.IcBuildingUnitDao;
import com.epmet.dao.IcHouseDao; import com.epmet.dao.IcHouseDao;
@ -31,15 +33,18 @@ import com.epmet.dto.form.IcHouseFormDTO;
import com.epmet.dto.form.ImportInfoFormDTO; import com.epmet.dto.form.ImportInfoFormDTO;
import com.epmet.dto.form.ImportTaskCommonFormDTO; import com.epmet.dto.form.ImportTaskCommonFormDTO;
import com.epmet.dto.form.ListIcNeighborHoodFormDTO; import com.epmet.dto.form.ListIcNeighborHoodFormDTO;
import com.epmet.dto.form.NeighborHoodManageDelFormDTO;
import com.epmet.dto.result.HouseInfoDTO; import com.epmet.dto.result.HouseInfoDTO;
import com.epmet.dto.result.IcNeighborHoodResultDTO; import com.epmet.dto.result.IcNeighborHoodResultDTO;
import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO;
import com.epmet.dto.result.NeighborHoodManageDelResultDTO;
import com.epmet.entity.IcHouseEntity; import com.epmet.entity.IcHouseEntity;
import com.epmet.enums.HousePurposeEnums; import com.epmet.enums.HousePurposeEnums;
import com.epmet.enums.HouseRentFlagEnums; import com.epmet.enums.HouseRentFlagEnums;
import com.epmet.enums.HouseTypeEnums; import com.epmet.enums.HouseTypeEnums;
import com.epmet.excel.IcHouseExcel; import com.epmet.excel.IcHouseExcel;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.model.HouseInfoModel; import com.epmet.model.HouseInfoModel;
import com.epmet.model.ImportHouseInfoListener; import com.epmet.model.ImportHouseInfoListener;
@ -101,6 +106,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
@Autowired @Autowired
private ExecutorService executorService; private ExecutorService executorService;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Override @Override
@ -382,4 +389,84 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
}); });
return new Result(); return new Result();
} }
/**
* Desc 小区管理中批量删除
* @param formDTO
* @author zxc
* @date 2022/3/1 4:57 下午
*/
@Override
public void allDelete(NeighborHoodManageDelFormDTO formDTO) {
if (CollectionUtils.isEmpty(formDTO.getIds())){
return;
}
List<String> ids = formDTO.getIds();
if (formDTO.getType().equals(CustomerGridConstant.NEIGHBORHOOD)){
List<NeighborHoodManageDelResultDTO> exists = icHouseDao.selectExistBuildingByNeighborHoodIds(ids);
if (!CollectionUtils.isEmpty(exists)){
exists.forEach(e -> {
for (int i = NumConstant.ZERO; i < ids.size(); i++) {
if (ids.get(i).equals(e.getNeighborHoodId())){
ids.remove(i);
continue;
}
}
});
}
if (!CollectionUtils.isEmpty(ids)){
icNeighborHoodDao.deleteBatchIds(ids);
}
if (!CollectionUtils.isEmpty(exists)){
String collect = exists.stream().map(m -> m.getName()).collect(Collectors.joining(","));
EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.setMsg(String.format("%s内包含楼宇信息,暂无法删除",collect));
throw new EpmetException(EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.getCode());
}
}else if (formDTO.getType().equals(CustomerGridConstant.BUILDING)){
List<NeighborHoodManageDelResultDTO> exists = icHouseDao.selectExistHouseByBuildingIds(ids);
if (!CollectionUtils.isEmpty(exists)){
exists.forEach(e -> {
for (int i = NumConstant.ZERO; i < ids.size(); i++) {
if (ids.get(i).equals(e.getBuildingId())){
ids.remove(i);
continue;
}
}
});
}
if (!CollectionUtils.isEmpty(ids)){
icBuildingDao.deleteBatchIds(ids);
}
if (!CollectionUtils.isEmpty(exists)){
String collect = exists.stream().map(m -> m.getName()).collect(Collectors.joining(","));
EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.setMsg(String.format("%s内包含房屋信息,暂无法删除",collect));
throw new EpmetException(EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.getCode());
}
}else if (formDTO.getType().equals(CustomerGridConstant.HOUSE)){
Result<List<String>> existUsers = epmetUserOpenFeignClient.getExistUserByHouseIds(ids);
if (!existUsers.success()){
throw new EpmetException("根据房屋IDs查询房屋下是否有存在居民失败...");
}
List<String> exists = existUsers.getData();
if (!CollectionUtils.isEmpty(exists)){
exists.forEach(e -> {
for (int i = NumConstant.ZERO; i < ids.size(); i++) {
if (ids.get(i).equals(e)){
ids.remove(i);
continue;
}
}
});
}
if (!CollectionUtils.isEmpty(ids)){
icHouseDao.deleteBatchIds(ids);
}
if (!CollectionUtils.isEmpty(exists)){
List<String> list = icHouseDao.selectHouseNames(exists);
String collect = list.stream().collect(Collectors.joining(","));
EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.setMsg(String.format("%s内包含居民信息,暂无法删除",collect));
throw new EpmetException(EpmetErrorCode.NEIGHBORHOOD_DEL_FAILED.getCode());
}
}
}
} }

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

@ -333,4 +333,47 @@
ih.DEL_FLAG = '0' ih.DEL_FLAG = '0'
AND ih.ID = #{houseId} AND ih.ID = #{houseId}
</select> </select>
<!-- 根据小区IDs查询小区下是否有存在楼栋的 -->
<select id="selectExistBuildingByNeighborHoodIds" resultType="com.epmet.dto.result.NeighborHoodManageDelResultDTO">
SELECT
nh.ID AS neighborHoodId,
nh.NEIGHBOR_HOOD_NAME AS name
FROM ic_neighbor_hood nh
INNER JOIN ic_building b ON (nh.id = b.NEIGHBOR_HOOD_ID AND b.DEL_FLAG = '0')
WHERE nh.DEL_FLAG = '0'
AND nh.ID IN (
<foreach collection="ids" item="id" separator=",">
#{id}
</foreach>
)
GROUP BY nh.id
</select>
<!-- 根据楼栋IDs查询楼栋下是否有存在房屋的 -->
<select id="selectExistHouseByBuildingIds" resultType="com.epmet.dto.result.NeighborHoodManageDelResultDTO">
SELECT
b.ID AS buildingId,
b.BUILDING_NAME AS name
FROM ic_building b
INNER JOIN ic_house h ON (h.BUILDING_ID = b.ID AND h.DEL_FLAG = '0')
WHERE b.DEL_FLAG = '0'
AND b.ID IN (
<foreach collection="ids" item="id" separator=",">
#{id}
</foreach>
)
GROUP BY b.id
</select>
<!-- 根据房屋ID查询名字 -->
<select id="selectHouseNames" resultType="java.lang.String">
SELECT HOUSE_NAME FROM ic_house
WHERE DEL_FLAG = '0'
AND id IN (
<foreach collection="ids" item="id" separator=",">
#{id}
</foreach>
)
</select>
</mapper> </mapper>

8
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/DelIcResiUserFormDTO.java

@ -4,7 +4,9 @@ import com.epmet.commons.tools.enums.IcFormCodeEnum;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
/** /**
* @Description 删除居民 * @Description 删除居民
@ -18,10 +20,14 @@ public class DelIcResiUserFormDTO implements Serializable {
public interface IdGroup { public interface IdGroup {
} }
@NotBlank(message = "icResiUserId不能为空", groups = IdGroup.class)
private String icResiUserId; private String icResiUserId;
@NotNull(message = "userIds不能为空", groups = IdGroup.class)
private List<String> userIds;
@NotBlank(message = "token获取的customerId不能为空", groups = IdGroup.class) @NotBlank(message = "token获取的customerId不能为空", groups = IdGroup.class)
private String customerId; private String customerId;
private String formCode= IcFormCodeEnum.RESI_BASE_INFO.getCode(); private String formCode= IcFormCodeEnum.RESI_BASE_INFO.getCode();
} }

9
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java

@ -712,4 +712,13 @@ public interface EpmetUserOpenFeignClient {
@PostMapping("/epmetuser/statsresiwarn/list2") @PostMapping("/epmetuser/statsresiwarn/list2")
Result<List<IcStatsResiResultDTO>> getPersonCategoryList(@RequestBody StatsResiListFormDTO formDTO); Result<List<IcStatsResiResultDTO>> getPersonCategoryList(@RequestBody StatsResiListFormDTO formDTO);
/**
* Desc: 根据房屋IDs查询房屋下是否有存在居民的
* @param ids
* @author zxc
* @date 2022/3/2 10:32 上午
*/
@PostMapping("/epmetuser/icresiuser/getexistuserbyhouseids")
Result<List<String>> getExistUserByHouseIds(@RequestBody List<String> ids);
} }

5
epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java

@ -527,4 +527,9 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien
public Result<List<IcStatsResiResultDTO>> getPersonCategoryList(StatsResiListFormDTO formDTO) { public Result<List<IcStatsResiResultDTO>> getPersonCategoryList(StatsResiListFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getPersonCategoryList", formDTO); return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getPersonCategoryList", formDTO);
} }
@Override
public Result<List<String>> getExistUserByHouseIds(List<String> ids) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getExistUserByHouseIds", ids);
}
} }

33
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java

@ -189,15 +189,19 @@ public class IcResiUserController implements ResultDataResolver {
public Result delete(@LoginUser TokenDto tokenDto, @RequestBody DelIcResiUserFormDTO formDTO) { public Result delete(@LoginUser TokenDto tokenDto, @RequestBody DelIcResiUserFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO, DelIcResiUserFormDTO.IdGroup.class); ValidatorUtils.validateEntity(formDTO, DelIcResiUserFormDTO.IdGroup.class);
icResiUserService.delete(formDTO); formDTO.getUserIds().forEach(userId -> {
//推送MQ事件 formDTO.setIcResiUserId(userId);
IcResiUserAddMQMsg mqMsg = new IcResiUserAddMQMsg(); icResiUserService.delete(formDTO);
mqMsg.setCustomerId(tokenDto.getCustomerId()); //推送MQ事件
mqMsg.setIcResiUser(formDTO.getIcResiUserId()); IcResiUserAddMQMsg mqMsg = new IcResiUserAddMQMsg();
SystemMsgFormDTO form = new SystemMsgFormDTO(); mqMsg.setCustomerId(tokenDto.getCustomerId());
form.setMessageType(SystemMessageType.IC_RESI_USER_DEL); mqMsg.setIcResiUser(userId);
form.setContent(mqMsg); SystemMsgFormDTO form = new SystemMsgFormDTO();
epmetMessageOpenFeignClient.sendSystemMsgByMQ(form); form.setMessageType(SystemMessageType.IC_RESI_USER_DEL);
form.setContent(mqMsg);
epmetMessageOpenFeignClient.sendSystemMsgByMQ(form);
});
return new Result(); return new Result();
} }
@ -748,4 +752,15 @@ public class IcResiUserController implements ResultDataResolver {
ValidatorUtils.validateEntity(formDTO, PersonWarnRightListFormDTO.PersonWarnRightListForm.class); ValidatorUtils.validateEntity(formDTO, PersonWarnRightListFormDTO.PersonWarnRightListForm.class);
return new Result<PersonWarnRightListResultDTO>().ok(icResiUserService.personWarnRightList(formDTO,tokenDto)); return new Result<PersonWarnRightListResultDTO>().ok(icResiUserService.personWarnRightList(formDTO,tokenDto));
} }
/**
* Desc: 根据房屋IDs查询房屋下是否有存在居民的
* @param ids
* @author zxc
* @date 2022/3/2 10:32 上午
*/
@PostMapping("getexistuserbyhouseids")
public Result<List<String>> getExistUserByHouseIds(@RequestBody List<String> ids){
return new Result<List<String>>().ok(icResiUserService.getExistUserByHouseIds(ids));
}
} }

9
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java

@ -261,4 +261,13 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
*/ */
Map<String, BigDecimal> getDataAnalyseCount(@Param("customerId") String customerId, @Param("tableName") String tableName, Map<String, BigDecimal> getDataAnalyseCount(@Param("customerId") String customerId, @Param("tableName") String tableName,
@Param("columnList") List<String> columnList, @Param("id") String id, @Param("level") String level); @Param("columnList") List<String> columnList, @Param("id") String id, @Param("level") String level);
/**
* Desc: 根据房屋IDs查询房屋下是否有存在居民的
* @param ids
* @author zxc
* @date 2022/3/2 10:32 上午
*/
List<String> getExistUserByHouseIds(@Param("ids") List<String> ids);
} }

7
epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java

@ -209,4 +209,11 @@ public interface IcResiUserService extends BaseService<IcResiUserEntity> {
*/ */
PersonWarnRightListResultDTO personWarnRightList(PersonWarnRightListFormDTO formDTO, TokenDto tokenDto); PersonWarnRightListResultDTO personWarnRightList(PersonWarnRightListFormDTO formDTO, TokenDto tokenDto);
/**
* Desc: 根据房屋IDs查询房屋下是否有存在居民的
* @param ids
* @author zxc
* @date 2022/3/2 10:32 上午
*/
List<String> getExistUserByHouseIds(List<String> ids);
} }

11
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -1204,6 +1204,17 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
return result; return result;
} }
/**
* Desc: 根据房屋IDs查询房屋下是否有存在居民的
* @param ids
* @author zxc
* @date 2022/3/2 10:32 上午
*/
@Override
public List<String> getExistUserByHouseIds(List<String> ids) {
return baseDao.getExistUserByHouseIds(ids);
}
/** /**
* @Description 居民分类 网格名 处理 * @Description 居民分类 网格名 处理
* @param list * @param list

13
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -628,4 +628,17 @@
) )
</if> </if>
</select> </select>
<!-- 根据房屋IDs查询房屋下是否有存在居民的 -->
<select id="getExistUserByHouseIds" resultType="java.lang.String">
SELECT
DISTINCT home_id
FROM ic_resi_user
WHERE DEL_FLAG = '0'
AND home_id IN (
<foreach collection="ids" item="id" separator=",">
#{id}
</foreach>
)
</select>
</mapper> </mapper>

Loading…
Cancel
Save