ws183
2025-04-28 b306d1106b915bb13fd7a02217ae9c65de2fd03d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package com.ld.igds.weather;
 
import com.bstek.dorado.data.provider.Page;
import com.ld.igds.models.WeatherCity;
import com.ld.igds.models.WeatherConf;
import com.ld.igds.models.WeatherInfo;
 
import java.util.List;
 
/**
 * 气象服务接口
 *
 * @author jiazx
 */
public interface CoreWeatherService {
 
    static String BEAN_ID = "core.weatherService";
 
    /**
     * 从缓存获取气象信息,整个库区就一个气象信息
     *
     * @return
     */
    public WeatherInfo getCacheWeather(String companyId);
 
    /**
     * 更新缓存并在直接新增,新增数据的频率为一天两次
     *
     * @param weather
     */
    public void updateCacheAndSave(WeatherInfo weather);
 
    /**
     * 气象站连接成功
     *
     * @param address
     * @param port
     */
    public void onCreate(String address, Integer port);
 
    /**
     * 气象分机掉线销毁
     *
     * @param address
     * @param port
     */
    public void onDestroy(String address, Integer port);
 
 
    /**
     * 获取气象配置信息
     *
     * @param companyId 组织编码,为空获取所有配置信息
     * @param deptId    分库编码,为空获取所有分开配置
     * @return
     */
    public List<WeatherConf> getConfData(String companyId, String deptId);
 
    /**
     * 保存气象配置信息
     *
     * @param data
     * @return
     */
    public String saveConf(WeatherConf data);
 
    /**
     * 删除气象配置信息
     *
     * @param data
     * @return
     */
    public String delConf(WeatherConf data);
 
    /**
     * 分页获取气象记录信息
     *
     * @param page
     * @throws Exception
     */
    public void getInfoData(Page<WeatherInfo> page) throws Exception;
 
    /**
     * 获取外网气象城市列表
     *
     * @param key
     * @return
     */
    public void pageCity(Page<WeatherCity> page, String key) throws Exception;
}