package com.ld.igds.common;
|
|
import java.util.List;
|
|
import com.ld.igds.models.DeviceSer;
|
|
/**
|
* 分机业务接口
|
*
|
* @author jiazx
|
*/
|
public interface CoreSerService {
|
|
String BEAN_ID = "core.SerService";
|
|
/**
|
* 控制柜分机存放缓存
|
*
|
* @param data 需要缓存的数据
|
* @param companyId 当前组织编码
|
*/
|
void setCacheSer(List<DeviceSer> data, String companyId);
|
|
/**
|
* 根据组织编号获取缓存中的数据
|
*
|
* @param companyId 当前组织编码
|
* @return
|
*/
|
List<DeviceSer> getCacheSerList(String companyId);
|
|
/**
|
* 根据组织编码和仓库编码获取仓库信息
|
*
|
* @param companyId
|
* @param serId
|
* @return
|
*/
|
DeviceSer getCacheSer(String companyId, String serId);
|
|
/**
|
* 根据分机IP信息更新状态,仅仅限于独立服务器使用当前接口
|
*
|
* @param status
|
* @param ip
|
* @param port
|
*/
|
void updateStatusByIp(String status, String ip,Integer port);
|
|
/**
|
* 根据对象进行更新
|
*
|
* @param deviceSer
|
*/
|
void updateByData(DeviceSer deviceSer);
|
|
/**
|
* 通过IP获取分机信息,要求分机IP都不重复
|
*
|
* @param companyId
|
* @param ip
|
* @return
|
*/
|
DeviceSer getCacheSerByIp(String companyId, String ip);
|
|
/**
|
*
|
* @param companyId
|
* @param ip
|
* @param port
|
* @return
|
*/
|
DeviceSer getCacheSerByIp(String companyId, String ip,Integer port);
|
|
/**
|
* 根据参数更新控制柜的操作模式,并刷新缓存
|
*
|
* @param companyId
|
* @param id
|
* @param controlModel
|
*/
|
void updateControlModel(String companyId, String id, String controlModel);
|
|
/**
|
* 更新分机参数
|
*
|
* @param ser
|
*/
|
void updateSerById(DeviceSer ser);
|
|
DeviceSer getCacheSerBySn(String companyId, String sn);
|
|
/**
|
* 刷新缓存,分机
|
*
|
* @param companyId
|
*/
|
void refreshCache(String companyId);
|
|
void delCache(String companyId, String id);
|
|
/**
|
* 设置所有的分机为离线状态
|
* @param companyId
|
*/
|
void allOffLine(String companyId);
|
|
/**
|
* 设置上线,并设置IP信息
|
* @param ip
|
* @param port
|
* @param sn
|
*/
|
void onlineBySn(String ip, Integer port, String sn, String status);
|
}
|