|
|
@@ -1127,6 +1127,29 @@ public class SendDeviceServiceImpl implements ISendDeviceService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 增量上传用户信息到指定设备
|
|
|
+ *
|
|
|
+ * @param termNo 指定设备编号
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void increaseSend(Long termNo) {
|
|
|
+ XfTermVo byTermNo = xfTermService.getByTermNo(termNo);
|
|
|
+ if(byTermNo == null){
|
|
|
+ throw new ServiceException("设备不存在"+termNo);
|
|
|
+ }
|
|
|
+ String ipAddress = byTermNo.getTermIp();
|
|
|
+ String termMac = byTermNo.getTermMac();
|
|
|
+ Long cacheObject = RedisUtils.getCacheObject(CacheNames.XF_TERM_IP + ipAddress);
|
|
|
+ if(cacheObject == null){
|
|
|
+ // 第一次上线,下发最近一天的
|
|
|
+ throw new ServiceException("设备从未上传过心跳,请等上传过心跳后执行:"+termNo);
|
|
|
+ }
|
|
|
+ Date last = new Date(cacheObject);
|
|
|
+ upLoadEmpToDevice(termMac, last, true);
|
|
|
+ RedisUtils.setCacheObject(CacheNames.XF_TERM_IP + ipAddress, System.currentTimeMillis());
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取在线设备列表
|
|
|
* @return 列表
|