Browse Source

Merge branch 'dev_2021_12_30_bug' into develop

dev
zhaoqifeng 4 years ago
parent
commit
8c25b05f00
  1. 9
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java
  2. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java
  3. 21
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

9
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java

@ -114,6 +114,15 @@ public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
*/
List<OptionDTO> option(IcPartyUnitDTO dto);
/**
* @Description 获取组织以及下级单位列表
* @Param dto
* @Return {@link List< OptionDTO>}
* @Author zhaoqifeng
* @Date 2021/11/22 14:35
*/
List<OptionDTO> options(IcPartyUnitDTO dto);
/**
* 导入数据
* @Param tokenDto

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java

@ -366,7 +366,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl<IcPartyActivityD
unitDTO.setAgencyId(formDTO.getAgencyId());
if (CollectionUtils.isNotEmpty(dtoList)) {
//获取联建单位
Map<String, String> option = icPartyUnitService.option(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
Map<String, String> option = icPartyUnitService.options(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
//获取服务事项字典
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO();
codeFormDTO.setCustomerId(tokenDto.getCustomerId());

21
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

@ -193,7 +193,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
}
insert(entity);
} else {
if (CollectionUtils.isNotEmpty(list) && list.get(0).getId().equals(entity.getId())) {
if (CollectionUtils.isNotEmpty(list) && !list.get(0).getId().equals(entity.getId())) {
throw new EpmetException(EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getCode(), EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getMsg(), EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getMsg());
}
updateById(entity);
@ -261,6 +261,25 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
}).collect(Collectors.toList());
}
@Override
public List<OptionDTO> options(IcPartyUnitDTO dto) {
LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.and(wp -> wp.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId()).or().
like(IcPartyUnitEntity::getPids, dto.getAgencyId()));
wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime);
wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter());
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper);
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyList();
}
return list.stream().map(item -> {
OptionDTO option = new OptionDTO();
option.setValue(item.getId());
option.setLabel(item.getUnitName());
return option;
}).collect(Collectors.toList());
}
/**
* 导入数据
*

Loading…
Cancel
Save