package com.doumee.service.business; import com.doumee.core.model.LoginUserInfo; import java.util.List; import java.util.Map; /** * 根据商户租赁合同自动关联电表/空调设备 */ public interface YwCustomerDeviceAutoBindService { /** 按合同同步设备关联(创建/生效时调用) */ void syncByContractId(Integer contractId, LoginUserInfo user); /** 按商户同步所有有效合同下的设备 */ void syncByCustomerId(Integer customerId, LoginUserInfo user); /** 合同退租/到期时解除自动关联 */ void unbindByContractId(Integer contractId, LoginUserInfo user); /** 刷新商户设备:清理失效合同绑定并按有效合同重新关联 */ void refreshCustomerDevices(Integer customerId, LoginUserInfo user); /** 有效合同租赁房源 ID */ List listActiveContractRoomIds(Integer customerId); /** 有效合同关联的电表 ID */ List listElectricalIdsByActiveContracts(Integer customerId); /** 有效合同关联的空调内机 ID */ List listConditionerIdsByActiveContracts(Integer customerId); Map> batchListElectricalIdsByActiveContracts(List customerIds); Map> batchListConditionerIdsByActiveContracts(List customerIds); }