diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java index 2ae5794..616fc1d 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/rent/service/impl/RentContractInfoServiceImpl.java @@ -31,6 +31,7 @@ import com.epmet.plugin.power.dto.rent.RentTenantInfoDTO; import com.epmet.plugin.power.modules.hik.service.HikCommunityInfoService; import com.epmet.plugin.power.modules.hik.service.HikDeviceInfoService; import com.epmet.plugin.power.modules.hik.service.HikErrorInfoService; +import com.epmet.plugin.power.modules.hik.utils.HkDeviceUtil; import com.epmet.plugin.power.modules.rent.dao.RentContractInfoDao; import com.epmet.plugin.power.modules.rent.entity.RentContractFileEntity; import com.epmet.plugin.power.modules.rent.entity.RentContractInfoEntity; @@ -39,11 +40,11 @@ import com.epmet.plugin.power.modules.rent.redis.RentContractInfoRedis; import com.epmet.plugin.power.modules.rent.service.RentContractFileService; import com.epmet.plugin.power.modules.rent.service.RentContractInfoService; import com.epmet.plugin.power.modules.rent.service.RentTenantInfoService; -import com.epmet.plugin.power.modules.hik.utils.HkDeviceUtil; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import java.util.*; import java.util.stream.Collectors; @@ -301,17 +302,21 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl agencyInfo = govOrgOpenFeignClient.getAgencyById(contractDto.getCommunityId()); user.setPids(agencyInfo.getData().getPids()); @@ -340,6 +345,9 @@ public class RentContractInfoServiceImpl extends BaseServiceImpl delParams = new HashMap<>(); delParams.put("idCard", item.getIdCard()); hikErrorInfoService.deletePhysical(delParams); + if (CollectionUtils.isEmpty(item.getImgList())) { + return; + } HikPersonFormDTO person = new HikPersonFormDTO(); person.setFaceUrl(item.getImgList().get(0).getFileUrl());