业务辅助表-业务字典管理平台 分页展示条件搜索,(新增修改部分功能未完善)
This commit is contained in:
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysMenu;
|
||||
import com.nis.domain.SysUser;
|
||||
import com.nis.domain.configuration.ServiceDictInfo;
|
||||
import com.nis.util.Constants;
|
||||
@@ -23,40 +24,51 @@ public class ServiceDictInfoService extends BaseService{
|
||||
private ServiceDictInfoDao serviceDictInfoDao;
|
||||
|
||||
/**
|
||||
* 查询分类性质字典分页
|
||||
* 查询分类性质字典分页(无条件查询)
|
||||
* @param page
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
public Page<ServiceDictInfo> findDictList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
public Page<ServiceDictInfo> findTopDictList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
// 设置分页参数
|
||||
serviceDictInfo.setPage(page);
|
||||
// 执行分页查询
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
List<ServiceDictInfo> sourcelist = serviceDictInfoDao.findDictList(serviceDictInfo);
|
||||
ServiceDictInfo.sortList(list, sourcelist, 0l, true);
|
||||
page.setList(sourcelist);
|
||||
//查出顶层分页查询
|
||||
List<ServiceDictInfo> parentList = serviceDictInfoDao.findTopDictList(serviceDictInfo);
|
||||
page.setList(parentList);
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询所有有效字典配置
|
||||
* @return
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllDictList() {
|
||||
|
||||
return serviceDictInfoDao.findAllDictList(new ServiceDictInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询标签分页
|
||||
* 查询所有的非叶子配置
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllNoLeafDictList() {
|
||||
return serviceDictInfoDao.findAllNoLeafDictList();
|
||||
}
|
||||
/**
|
||||
* 查询分类性质字典分页(含条件查询)
|
||||
* @param page
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
public Page<ServiceDictInfo> findDictMarkList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
public Page<ServiceDictInfo> findDictSearchList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
// 设置分页参数
|
||||
serviceDictInfo.setPage(page);
|
||||
// 执行分页查询
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
List<ServiceDictInfo> sourcelist = serviceDictInfoDao.findDictMarkList(serviceDictInfo);
|
||||
ServiceDictInfo.sortList(list, sourcelist, 0l, true);
|
||||
page.setList(sourcelist);
|
||||
return page;
|
||||
serviceDictInfo.setPage(page);
|
||||
List<ServiceDictInfo> parentList = serviceDictInfoDao.findDictSearchList(serviceDictInfo);
|
||||
page.setList(parentList);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键查询字典详细信息
|
||||
* @param serviceDictId
|
||||
@@ -99,19 +111,82 @@ public class ServiceDictInfoService extends BaseService{
|
||||
* 查询所有非叶子节点字典配置信息
|
||||
* @return
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllDict() {
|
||||
/* public List<ServiceDictInfo> findAllDict() {
|
||||
|
||||
return serviceDictInfoDao.findAllDict();
|
||||
}
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param serviceDictInfo
|
||||
*/
|
||||
public void deleteDict(ServiceDictInfo serviceDictInfo) {
|
||||
serviceDictInfo.setIsValid(0);
|
||||
serviceDictInfoDao.delete(serviceDictInfo);
|
||||
List<ServiceDictInfo> list = Lists.newArrayList();
|
||||
//找出所有下级
|
||||
//查出所有节点
|
||||
ServiceDictInfo.sortList(list, serviceDictInfoDao.findAllDictList(new ServiceDictInfo()), serviceDictInfo.getServiceDictId(), true);
|
||||
list.add(serviceDictInfo);
|
||||
for(ServiceDictInfo se:list){
|
||||
se.setIsValid(0);
|
||||
serviceDictInfoDao.delete(se);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//标签管理
|
||||
|
||||
/**
|
||||
* 查询标签分页(无条件查询)
|
||||
* @param page
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
public Page<ServiceDictInfo> findTopDictMarkList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
// 设置分页参数
|
||||
serviceDictInfo.setPage(page);
|
||||
//查出顶层分页查询
|
||||
List<ServiceDictInfo> parentList = serviceDictInfoDao.findTopDictMarkList(serviceDictInfo);
|
||||
page.setList(parentList);
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询所有有效标签配置
|
||||
* @return
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllDictMarkList() {
|
||||
|
||||
return serviceDictInfoDao.findAllDictMarkList(new ServiceDictInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询标签字典分页(含条件查询)
|
||||
* @param page
|
||||
* @param serviceDictInfo
|
||||
* @return
|
||||
*/
|
||||
public Page<ServiceDictInfo> findDictSearchMarkList(Page<ServiceDictInfo> page, ServiceDictInfo serviceDictInfo) {
|
||||
// 设置分页参数
|
||||
serviceDictInfo.setPage(page);
|
||||
List<ServiceDictInfo> parentList = serviceDictInfoDao.findDictSearchMarkList(serviceDictInfo);
|
||||
page.setList(parentList);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有的非叶子配置
|
||||
*/
|
||||
public List<ServiceDictInfo> findAllNoLeafDictMarkList() {
|
||||
return serviceDictInfoDao.findAllNoLeafDictMarkList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* findFlDict(查找所有有效的分类)
|
||||
@@ -185,5 +260,10 @@ public class ServiceDictInfoService extends BaseService{
|
||||
public List<ServiceDictInfo> findAllLableDict() {
|
||||
return serviceDictInfoDao.findAllItemDict(Constants.ITEM_TYPE_LABEL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user