数据字典查询接口 多加一个根据key查询
This commit is contained in:
@@ -52,8 +52,9 @@ public class exportWkExcel {
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.HSSF);
|
||||
exportParams.setSheetName(exportName);
|
||||
|
||||
Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCode();
|
||||
List<String> types=new ArrayList<>();
|
||||
types.add("BUSSSTANDCLASS");
|
||||
Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCodeByType(types);
|
||||
workbook = ExcelExportUtilByWk.getHSSFWorkbook(exportParams, exportExcel.class,workbook,"1",dicTypeEO);
|
||||
os = response.getOutputStream();
|
||||
workbook.write(os);
|
||||
|
||||
+5
-2
@@ -44,9 +44,12 @@ public class IExportServiceImpl implements IExportService {
|
||||
// //获取数据字典数据
|
||||
// Map<String, Object> dicTypeEO = dicTypeEOService.getDicTypeListCode();
|
||||
//获取机构数据
|
||||
List<TsInstitution> tsInstitutions=tsInstitutionService.list();
|
||||
QueryWrapper<TsInstitution> wrapper=new QueryWrapper<>();
|
||||
wrapper.select("id","name");
|
||||
List<TsInstitution> tsInstitutions=tsInstitutionService.list(wrapper);
|
||||
//获取人员数据
|
||||
QueryWrapper<TsUser> tsUserQueryWrapper=new QueryWrapper<>();
|
||||
tsUserQueryWrapper.select("ACCOUNT","UNAME");
|
||||
tsUserQueryWrapper.eq("VALID_FLAG","0");
|
||||
List<TsUser> tsUsers=tsUserService.list(tsUserQueryWrapper);
|
||||
|
||||
@@ -58,7 +61,7 @@ public class IExportServiceImpl implements IExportService {
|
||||
//获取user工具集合
|
||||
Map<String,String> tsUserMap=new HashMap<>();
|
||||
tsUsers.forEach(tsUser -> {
|
||||
tsUserMap.put(tsUser.getUserId(),tsUser.getUname());
|
||||
tsUserMap.put(tsUser.getAccount(),tsUser.getUname());
|
||||
});
|
||||
List<importExcelDTO> res= ExcelImportUtilByWk.readExcelpublic(importExcelDTO.class,file);
|
||||
DateFormat formater = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
@@ -23,6 +23,8 @@ public interface DicEODao extends BaseMapper<DictionaryEO> {
|
||||
//gaoyan
|
||||
public List<DictionaryEO> getDictionaryEO();
|
||||
|
||||
public List<DictionaryEO> getDictionaryEOByType(@Param("types") List<String> types);
|
||||
|
||||
public Integer countByCodeOrName(DictionaryEOPage page);
|
||||
|
||||
public List<DictionaryEO> queryAllDicByPage(DictionaryEOPage page);
|
||||
|
||||
@@ -22,6 +22,8 @@ public interface IDicEOService extends IService<DictionaryEO> {
|
||||
//gaoyan
|
||||
public List<DictionaryEO> getDictionaryEO();
|
||||
|
||||
public List<DictionaryEO> getDictionaryEOByType(List<String> types);
|
||||
|
||||
public Integer countByCodeOrName(DictionaryEOPage page);
|
||||
|
||||
public List<DictionaryEO> queryAllDicByPage(DictionaryEOPage page);
|
||||
|
||||
@@ -84,6 +84,8 @@ public interface IDicTypeEOService extends IService<DicTypeEO> {
|
||||
|
||||
public Map<String,Object> getDicTypeListCode();
|
||||
|
||||
public Map<String,Object> getDicTypeListCodeByType(List<String> types);
|
||||
|
||||
public List<Map<String,String>> getDicTypeByParentCodes(String dicTypeCode);
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.adc.da.sys.service.IDicEOService;
|
||||
import com.adc.da.sys.service.IDicTypeEOService;
|
||||
import com.adc.da.util.LoginUserUtil;
|
||||
import com.adc.da.util.UUIDUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
@@ -82,6 +83,11 @@ public class DicEOServiceImpl extends ServiceImpl<DicEODao,DictionaryEO> impleme
|
||||
return dicEODao.getDictionaryEO();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictionaryEO> getDictionaryEOByType(List<String> types) {
|
||||
return dicEODao.getDictionaryEOByType(types);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countByCodeOrName(DictionaryEOPage page) {
|
||||
return dicEODao.countByCodeOrName(page);
|
||||
|
||||
@@ -190,6 +190,34 @@ public class DicTypeEOServiceImpl extends ServiceImpl<DicTypeEODao,DicTypeEO> im
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author gaoyan
|
||||
* @Description
|
||||
* Date 2018/9/11 19:12
|
||||
* @Param [dictionaryCode]
|
||||
* @return java.util.List<com.adc.da.sys.entity.DicTypeEO>
|
||||
**/
|
||||
@Override
|
||||
public Map<String,Object> getDicTypeListCodeByType(List<String> types){
|
||||
Map<String,Object> resultMap = new HashMap<>();
|
||||
List<DictionaryEO> diclist = dicEODao.getDictionaryEOByType(types);
|
||||
for (DictionaryEO dictionaryEO : diclist){
|
||||
if(dictionaryEO.getDictionType().equals("TREE")){
|
||||
List<SarMenuStandard> treeList = iSarMenuStandardService.getAll(dictionaryEO.getId());
|
||||
resultMap.put(dictionaryEO.getDictionaryCode(),treeList);
|
||||
}else {
|
||||
List<Map<String,String >> relist = getDicTypeByDicCode(dictionaryEO.getDictionaryCode());
|
||||
resultMap.put(dictionaryEO.getDictionaryCode(),relist);
|
||||
}
|
||||
}
|
||||
// 查询细类
|
||||
List<Map<String,String >> relist = getDicTypeByDicCode("BUSSFINECLASSSHOW");
|
||||
resultMap.put("BUSSFINECLASSSHOW",relist);
|
||||
List<Map<String,String >> arr = new ArrayList<>();
|
||||
resultMap.put("STANDCLASSIFYSHOW",arr);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
//liwenxuan:国家地区新增
|
||||
public List<DicTypeEO> queryByPageNoParentId(DicTypeEOPage page){
|
||||
Integer rowCount = dicTypeEODao.queryByCountCounter(page);
|
||||
|
||||
@@ -244,6 +244,19 @@
|
||||
where dn.VALID_FLAG = 0
|
||||
</select>
|
||||
|
||||
<select id="getDictionaryEOByType" parameterType="java.lang.String" resultMap="ListMap">
|
||||
select
|
||||
*
|
||||
from TS_DICTIONARY dn
|
||||
where dn.VALID_FLAG = 0
|
||||
<if test="null!=types and types.size()>0">
|
||||
and dn.DICTIONARY_CODE in
|
||||
<foreach item="msgId" collection="types" open="(" separator="," close=")" index="index">
|
||||
#{msgId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="countByCodeOrName" resultType="java.lang.Integer" parameterType="com.adc.da.base.page.BasePage">
|
||||
select count(1) from TS_DICTIONARY
|
||||
where valid_flag='0'
|
||||
|
||||
Reference in New Issue
Block a user