|
@@ -184,13 +184,20 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
|
|
|
public List<ModuleInfoDTO> getModuleInfo(GetModuleInfoVO getModuleInfoVO) {
|
|
|
//获取模板信息
|
|
|
QueryWrapper<ModuleInfo> moduleInfoQueryWrapper = new QueryWrapper<>();
|
|
|
- moduleInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
+ moduleInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("relation_id", "0");
|
|
|
if (getModuleInfoVO.getModuleType() != null) {
|
|
|
moduleInfoQueryWrapper.eq("module_type", getModuleInfoVO.getModuleType());
|
|
|
}
|
|
|
+ if(getModuleInfoVO.getType() != null) {
|
|
|
+ moduleInfoQueryWrapper.eq("type", getModuleInfoVO.getType());
|
|
|
+ }
|
|
|
if(ListUtil.isNotEmpty(getModuleInfoVO.getNoIds())){
|
|
|
moduleInfoQueryWrapper.notIn("id", getModuleInfoVO.getNoIds());
|
|
|
}
|
|
|
+ if(getModuleInfoVO.getRelationId() != null) {
|
|
|
+ moduleInfoQueryWrapper.eq("relation_id", getModuleInfoVO.getRelationId());
|
|
|
+ }
|
|
|
List<ModuleInfo> moduleInfoList = this.list(moduleInfoQueryWrapper);
|
|
|
List<Long> moduleIdList = moduleInfoList.stream().map(m -> m.getId()).collect(Collectors.toList());
|
|
|
//获取模板明细信息
|
|
@@ -275,7 +282,7 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
|
|
|
for (ModuleInfoListDTO moduleInfoListDTO : moduleInfoDTOIPage.getRecords()) {
|
|
|
moduleInfoListDTO.setUserName(respDTO.data.get(moduleInfoListDTO.getModifier()));
|
|
|
if(moduleInfoListDTO.getModuleType().intValue() != 3){
|
|
|
- moduleInfoListDTO.setAscriptionName(dictionaryInfoMap.get(String.valueOf(moduleInfoListDTO.getType().intValue())).getName());
|
|
|
+ moduleInfoListDTO.setAscriptionName(dictionaryInfoMap.get(moduleInfoListDTO.getType()).getName());
|
|
|
}
|
|
|
if(moduleInfoListDTO.getModuleType().intValue() == 1){
|
|
|
moduleInfoListDTO.setRelationName(deptInfoMap.get(moduleInfoListDTO.getRelationId()).getName());
|
|
@@ -393,10 +400,12 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
|
|
|
public List<GetModuleTypeDTO> getModuleType(GetModuleTypeVO getModuleTypeVO){
|
|
|
QueryWrapper<ModuleInfo> moduleInfoQueryWrapper = new QueryWrapper<>();
|
|
|
moduleInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("module_Type", getModuleTypeVO.getModuleType())
|
|
|
- .eq("relation_id", getModuleTypeVO.getRelationId());
|
|
|
+ .eq("module_Type", getModuleTypeVO.getModuleType());
|
|
|
+ if(getModuleTypeVO.getRelationId() != null){
|
|
|
+ moduleInfoQueryWrapper.eq("relation_id", getModuleTypeVO.getRelationId());
|
|
|
+ }
|
|
|
List<ModuleInfo> moduleInfos = this.list(moduleInfoQueryWrapper);
|
|
|
- List<Integer> types = moduleInfos.stream().map(moduleInfo -> moduleInfo.getType()).collect(Collectors.toList());
|
|
|
+ List<String> types = moduleInfos.stream().map(moduleInfo -> moduleInfo.getType()).collect(Collectors.toList());
|
|
|
//获取模板类型
|
|
|
QueryWrapper<DictionaryInfo> dictionaryInfoQueryWrapper = new QueryWrapper<>();
|
|
|
dictionaryInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -409,7 +418,7 @@ public class ModuleInfoFacade extends ModuleInfoServiceImpl {
|
|
|
for (DictionaryInfo dictionaryInfo: dictionaryInfoList) {
|
|
|
GetModuleTypeDTO getModuleTypeDTO = new GetModuleTypeDTO();
|
|
|
getModuleTypeDTO.setName(dictionaryInfo.getName());
|
|
|
- getModuleTypeDTO.setType(Integer.parseInt(dictionaryInfo.getVal()));
|
|
|
+ getModuleTypeDTO.setType(dictionaryInfo.getVal());
|
|
|
getModuleTypeDTOS.add(getModuleTypeDTO);
|
|
|
}
|
|
|
return getModuleTypeDTOS;
|