CZT
2023-10-30 b5a5795a5a64d9a5b78b338de74909e240fe73c3
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
package com.ld.igds.view;
 
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.Expose;
import com.ld.igds.models.DeviceSer;
import com.ld.igds.util.ContextUtil;
import com.ld.igds.view.service.DeviceSerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
import java.util.List;
 
/**
 * 避免系统错误 deviceSerPR2
 * 
 * @author: andy.jia
 * @description:
 * @version:
 * @data:2019年12月21日
 *
 */
@Component("deviceSerPR2")
public class DeviceSerPR2 {
 
    @Autowired
    private DeviceSerService deviceService;
 
    // ${dorado.getDataProvider("deviceSerPR2#getSerCacheByType").getResult("01")}
    @DataProvider
    public List<DeviceSer> getSerCacheByType(String type) {
        List<DeviceSer> listAll = deviceService.getAllSerCache(ContextUtil
                .getDefaultCompanyId());
        if (null == listAll || listAll.isEmpty())
            return null;
        return listAll;
    }
    /**
     * deviceSerPR2#updateSer
     * 
     * @param data
     * @throws Exception
     */
    @Expose
    public void updateSer(DeviceSer data) throws Exception {
        deviceService.saveSer(data);
    }
}