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);
|
}
|
}
|