package com.ld.igds.view;
|
|
import com.bstek.dorado.annotation.DataProvider;
|
import com.bstek.dorado.annotation.DataResolver;
|
import com.bstek.dorado.annotation.Expose;
|
import com.ld.igds.models.SnapSer;
|
import com.ld.igds.util.ContextUtil;
|
import com.ld.igds.view.service.SnapSerService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Component;
|
|
import java.util.List;
|
|
|
@Component
|
public class SnapSerPR {
|
|
@Autowired
|
private SnapSerService serService;
|
|
/**
|
* snapSerPR#getAllSer
|
*
|
* @return
|
* @throws Exception
|
*/
|
@DataProvider
|
public List<SnapSer> getAllSer() throws Exception {
|
return serService.getAllSer(ContextUtil.getCompanyId());
|
}
|
|
|
/**
|
* snapSerPR#updateSer
|
*
|
* @param ser
|
* @throws Exception
|
*/
|
@DataResolver
|
public void updateSer(SnapSer ser) throws Exception {
|
serService.updateSer(ser);
|
}
|
|
|
/**
|
* snapSerPR#delSer
|
* 根据分机id和名称删除分机
|
*/
|
@Expose
|
public void delSer(SnapSer ser) {
|
serService.delSerById(ser);
|
}
|
|
|
/**
|
* snapSerPR#refreshCache
|
*/
|
@Expose
|
public void refreshCache() {
|
serService.refreshCache(ContextUtil.getCompanyId());
|
}
|
}
|