package com.fzzy.igds;
|
|
import com.bstek.dorado.annotation.DataProvider;
|
import com.bstek.dorado.annotation.Expose;
|
import com.fzzy.igds.service.InoutConfService;
|
import com.fzzy.igds.domain.InoutConf;
|
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 09:23
|
*/
|
@Component
|
public class InoutConfPR {
|
|
@Resource
|
private InoutConfService inoutConfService;
|
|
/**
|
* inoutConfPR#getData 获取当前人所在的分库下的配置信息
|
*
|
* @return
|
*/
|
@DataProvider
|
public List<InoutConf> getData() {
|
|
return inoutConfService.getInoutConfList(null,null);
|
}
|
|
/**
|
* inoutConfPR#saveData 保存配置
|
*
|
* @return
|
*/
|
@Expose
|
public String saveData(InoutConf data) {
|
|
InoutConf inoutConf = new InoutConf();
|
BeanUtils.copyProperties(data, inoutConf);
|
return inoutConfService.saveData(inoutConf);
|
}
|
|
/**
|
* inoutConfPR#delData 删除配置
|
*
|
* @param data
|
* @return
|
*/
|
@Expose
|
public String delData(InoutConf data) {
|
InoutConf inoutConf = new InoutConf();
|
BeanUtils.copyProperties(data, inoutConf);
|
return inoutConfService.delData(inoutConf);
|
}
|
|
|
/**
|
* inoutConfPR#flushCache
|
*
|
* @return
|
*/
|
@Expose
|
public void flushCache(InoutConf data) {
|
inoutConfService.flushInoutConfCache(data.getCompanyId(), data.getDeptId());
|
}
|
|
}
|