czt
9 天以前 db67639449287bcec461916a7dca6003ee5dd03c
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
package com.fzzy.igds;
 
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.fzzy.igds.domain.QuantityConf;
import com.fzzy.igds.service.DepotService;
import com.fzzy.igds.service.QuantityService;
import com.fzzy.igds.utils.ContextUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
 
/**
 * @Description
 * @Author CZT
 * @Date 2025/11/28 16:58
 */
@Component
public class QuantityConfPR {
 
    @Resource
    private QuantityService quantityService;
    @Resource
    private DepotService depotService;
 
    /**
     * 参数配置列表 quantityConfPR#getConfList
     *
     * @return
     */
    @DataProvider
    public List<QuantityConf> getConfList() {
        return quantityService.getConfList(null, ContextUtil.subDeptId(null));
    }
 
    /**
     * quantityConfPR#saveConf 参数配置更新,包括新增和修改
     *
     * @param conf
     */
    @DataResolver
    public void saveConf(QuantityConf conf) {
        QuantityConf quantityConf = new QuantityConf();
        BeanUtils.copyProperties(conf, quantityConf);
        quantityService.saveConf(quantityConf);
    }
 
    /**
     * quantityConfPR#delQuantityConf
     *
     * @return
     */
    @Expose
    public String delQuantityConf(QuantityConf conf) {
        QuantityConf quantityConf = new QuantityConf();
        BeanUtils.copyProperties(conf, quantityConf);
        return quantityService.delQuantityConf(quantityConf);
    }
 
    /**
     * quantityConfPR#flushConfCache 刷新配置缓存
     */
    @Expose
    public void flushConfCache() {
        quantityService.flushConfCache(null, null);
    }
 
}