package com.ld.igds.m.view;
|
|
import com.bstek.dorado.annotation.DataProvider;
|
import com.bstek.dorado.annotation.Expose;
|
import com.ld.igds.m.service.HInoutConfService;
|
import com.ld.igds.m.service.InoutCommonService;
|
import com.ld.igds.models.InoutConf;
|
|
import org.apache.commons.lang.StringUtils;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Component;
|
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* @author:
|
*/
|
@Component
|
public class InoutConfPR {
|
|
@Autowired
|
private HInoutConfService inoutConfService;
|
|
@Autowired
|
private InoutCommonService inoutManagerService;
|
|
/**
|
* inoutConfPR#getData 获取当前人所在的分库下的配置信息
|
*
|
* @return
|
* @throws Exception
|
*/
|
@DataProvider
|
public List<InoutConf> getData(Map<String, Object> param) {
|
|
return inoutConfService.getInoutConfData(param);
|
}
|
|
/**
|
* inoutConfPR#saveData 保存配置
|
*
|
* @return
|
* @throws Exception
|
*/
|
@Expose
|
public String saveData(InoutConf data) {
|
|
if (0 == data.getInOrder()) {
|
data.setInOrder(1);
|
}
|
if (StringUtils.isEmpty(data.getSort())) {
|
data.setSort("1");
|
}
|
return inoutConfService.saveData(data);
|
}
|
|
/**
|
* inoutConfPR#delData 删除配置
|
*
|
* @param data
|
* @return
|
*/
|
@Expose
|
public String delData(InoutConf data) {
|
|
return inoutConfService.delData(data);
|
}
|
|
|
/**
|
* inoutConfPR#flushCache
|
*
|
* @return
|
*/
|
@Expose
|
public void flushCache(InoutConf data) {
|
inoutManagerService.flushInoutConfCache(data.getCompanyId(), data.getDeptId());
|
}
|
|
}
|