czt
2025-05-30 9bc5f4d58da606c6a465e152d05a1c31b0611f74
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
package com.fzzy.igds.sys.pr;
 
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.fzzy.igds.dzhwk.domain.DepotConf;
import com.fzzy.igds.sys.DepotConfService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
 
import javax.annotation.Resource;
import java.util.List;
 
/**
 * @author jiazx
 */
@Slf4j
@Component
public class DepotConfPR {
 
    @Resource
    private DepotConfService depotConfService;
 
    /**
     * 参数配置列表 depotConfPR#getConfList
     *
     * @return
     */
    @DataProvider
    public List<DepotConf> getConfList() {
        return depotConfService.getConfList(null,null);
    }
 
    /**
     * depotConfPR#saveConf 参数配置更新,包括新增和修改
     *
     * @param conf
     */
    @DataResolver
    public void saveConf(DepotConf conf) {
        DepotConf depotConf = new DepotConf();
        BeanUtils.copyProperties(conf, depotConf);
        depotConfService.saveConf(depotConf);
    }
 
    /**
     * depotConfPR#delDepotConf 删除参数配置
     *
     * @param conf
     */
    @Expose
    public void delDepotConf(DepotConf conf) {
        DepotConf depotConf = new DepotConf();
        BeanUtils.copyProperties(conf, depotConf);
        depotConfService.deleteDepotConf(depotConf);
    }
 
    /**
     * depotConfPR#flushConfCache 刷新配置缓存
     */
    @Expose
    public void flushConfCache() {
        depotConfService.flushConfCache(null);
    }
 
    /**
     * depotConfPR#updateFreq 更新所有粮库的粮情频率
     */
    @Expose
    public void updateFreq(String freq) {
        depotConfService.updateFreq(freq);
    }
 
}