|
@ -8,9 +8,11 @@ |
|
|
|
|
|
|
|
|
package com.epmet.service.impl; |
|
|
package com.epmet.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
|
|
import com.epmet.commons.tools.dto.result.OptionResultDTO; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.dao.SysDictDataDao; |
|
|
import com.epmet.dao.SysDictDataDao; |
|
@ -22,7 +24,9 @@ import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
import java.util.Arrays; |
|
|
|
|
|
import java.util.List; |
|
|
import java.util.Map; |
|
|
import java.util.Map; |
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 字典类型 |
|
|
* 字典类型 |
|
@ -85,4 +89,114 @@ public class SysDictDataServiceImpl extends BaseServiceImpl<SysDictDataDao, SysD |
|
|
deleteBatchIds(Arrays.asList(ids)); |
|
|
deleteBatchIds(Arrays.asList(ids)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 九小场所 |
|
|
|
|
|
* |
|
|
|
|
|
* @Param |
|
|
|
|
|
* @Return {@link List < OptionResultDTO >} |
|
|
|
|
|
* @Author zhaoqifeng |
|
|
|
|
|
* @Date 2021/10/26 17:11 |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
public List<OptionResultDTO> getNineSmallPlacesOption() { |
|
|
|
|
|
LambdaQueryWrapper<SysDictDataEntity> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
wrapper.eq(SysDictDataEntity::getDictTypeId, 1000000000000000001L); |
|
|
|
|
|
wrapper.orderByAsc(SysDictDataEntity::getSort); |
|
|
|
|
|
List<SysDictDataEntity> list = baseDao.selectList(wrapper); |
|
|
|
|
|
return list.stream().map(item -> { |
|
|
|
|
|
OptionResultDTO dto = new OptionResultDTO(); |
|
|
|
|
|
dto.setValue(item.getDictValue()); |
|
|
|
|
|
dto.setLabel(item.getDictLabel()); |
|
|
|
|
|
return dto; |
|
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 文化程度 |
|
|
|
|
|
* |
|
|
|
|
|
* @Param |
|
|
|
|
|
* @Return {@link List<OptionResultDTO>} |
|
|
|
|
|
* @Author zhaoqifeng |
|
|
|
|
|
* @Date 2021/10/26 17:12 |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
public List<OptionResultDTO> getEducationOption() { |
|
|
|
|
|
LambdaQueryWrapper<SysDictDataEntity> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
wrapper.eq(SysDictDataEntity::getDictTypeId, 1000000000000000002L); |
|
|
|
|
|
wrapper.orderByAsc(SysDictDataEntity::getSort); |
|
|
|
|
|
List<SysDictDataEntity> list = baseDao.selectList(wrapper); |
|
|
|
|
|
return list.stream().map(item -> { |
|
|
|
|
|
OptionResultDTO dto = new OptionResultDTO(); |
|
|
|
|
|
dto.setValue(item.getDictValue()); |
|
|
|
|
|
dto.setLabel(item.getDictLabel()); |
|
|
|
|
|
return dto; |
|
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 民族 |
|
|
|
|
|
* |
|
|
|
|
|
* @Param |
|
|
|
|
|
* @Return {@link List<OptionResultDTO>} |
|
|
|
|
|
* @Author zhaoqifeng |
|
|
|
|
|
* @Date 2021/10/26 17:12 |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
public List<OptionResultDTO> getNationOption() { |
|
|
|
|
|
LambdaQueryWrapper<SysDictDataEntity> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
wrapper.eq(SysDictDataEntity::getDictTypeId, 1000000000000000003L); |
|
|
|
|
|
wrapper.orderByAsc(SysDictDataEntity::getSort); |
|
|
|
|
|
List<SysDictDataEntity> list = baseDao.selectList(wrapper); |
|
|
|
|
|
return list.stream().map(item -> { |
|
|
|
|
|
OptionResultDTO dto = new OptionResultDTO(); |
|
|
|
|
|
dto.setValue(item.getDictValue()); |
|
|
|
|
|
dto.setLabel(item.getDictLabel()); |
|
|
|
|
|
return dto; |
|
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 人员关系 |
|
|
|
|
|
* |
|
|
|
|
|
* @Param |
|
|
|
|
|
* @Return {@link List<OptionResultDTO>} |
|
|
|
|
|
* @Author zhaoqifeng |
|
|
|
|
|
* @Date 2021/10/26 17:12 |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
public List<OptionResultDTO> getRelationshipOption() { |
|
|
|
|
|
LambdaQueryWrapper<SysDictDataEntity> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
wrapper.eq(SysDictDataEntity::getDictTypeId, 1000000000000000004L); |
|
|
|
|
|
wrapper.orderByAsc(SysDictDataEntity::getSort); |
|
|
|
|
|
List<SysDictDataEntity> list = baseDao.selectList(wrapper); |
|
|
|
|
|
return list.stream().map(item -> { |
|
|
|
|
|
OptionResultDTO dto = new OptionResultDTO(); |
|
|
|
|
|
dto.setValue(item.getDictValue()); |
|
|
|
|
|
dto.setLabel(item.getDictLabel()); |
|
|
|
|
|
return dto; |
|
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 住房性质 |
|
|
|
|
|
* |
|
|
|
|
|
* @Param |
|
|
|
|
|
* @Return {@link List<OptionResultDTO>} |
|
|
|
|
|
* @Author zhaoqifeng |
|
|
|
|
|
* @Date 2021/10/26 17:12 |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
public List<OptionResultDTO> getHouseOption() { |
|
|
|
|
|
LambdaQueryWrapper<SysDictDataEntity> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
wrapper.eq(SysDictDataEntity::getDictTypeId, 1000000000000000005L); |
|
|
|
|
|
wrapper.orderByAsc(SysDictDataEntity::getSort); |
|
|
|
|
|
List<SysDictDataEntity> list = baseDao.selectList(wrapper); |
|
|
|
|
|
return list.stream().map(item -> { |
|
|
|
|
|
OptionResultDTO dto = new OptionResultDTO(); |
|
|
|
|
|
dto.setValue(item.getDictValue()); |
|
|
|
|
|
dto.setLabel(item.getDictLabel()); |
|
|
|
|
|
return dto; |
|
|
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|