Browse Source

联建单位详情返回分类名称、服务事项名称

master
yinzuomei 3 years ago
parent
commit
265d45de8f
  1. 9
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java
  2. 10
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java
  3. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java

9
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/EpmetHeartOpenFeignClient.java

@ -12,13 +12,11 @@ import com.epmet.dto.form.IcDemandFormDTO;
import com.epmet.dto.form.PartyUnitListFormDTO;
import com.epmet.dto.form.demand.DemandRecId;
import com.epmet.dto.form.demand.IcEventCommentToDemandFromDTO;
import com.epmet.dto.form.demand.ServiceItemSelectFormDTO;
import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO;
import com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO;
import com.epmet.dto.form.resi.VolunteerCommonFormDTO;
import com.epmet.dto.result.PartyUnitListResultDTO;
import com.epmet.dto.result.demand.IcResiDemandDictDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.dto.result.resi.PageVolunteerInfoResultDTO;
import com.epmet.feign.fallback.EpmetHeartOpenFeignClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
@ -160,11 +158,4 @@ public interface EpmetHeartOpenFeignClient {
@PostMapping("/heart/resi/volunteer/addVolunteer")
Result addVolunteer(@RequestBody ResiVolunteerAuthenticateFormDTO formDTO);
/**
* 联建单位查询可用的服务事项列表
* @param formDTO
* @return
*/
@PostMapping("/heart/serviceitem/dict-list")
Result<List<OptionDTO>> queryDictList(@RequestBody ServiceItemSelectFormDTO formDTO);
}

10
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/feign/fallback/EpmetHeartOpenFeignClientFallback.java

@ -161,14 +161,4 @@ public class EpmetHeartOpenFeignClientFallback implements EpmetHeartOpenFeignCli
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "addVolunteer", formDTO);
}
/**
* 联建单位查询可用的服务事项列表
*
* @param formDTO
* @return
*/
@Override
public Result<List<OptionDTO>> queryDictList(ServiceItemSelectFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_HEART_SERVER, "queryDictList", formDTO);
}
}

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

@ -51,7 +51,6 @@ import com.epmet.constants.ImportTaskConstants;
import com.epmet.dao.IcPartyUnitDao;
import com.epmet.dto.IcPartyUnitDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.ServiceItemSelectFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.*;
import com.epmet.dto.result.demand.OptionDTO;
@ -207,12 +206,9 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
dto.setType(MapUtils.isNotEmpty(typeDictMap) && typeDictMap.containsKey(dto.getType()) ? typeDictMap.get(dto.getType()) : StrConstant.EPMETY_STR);
// 服务事项
if(CollectionUtils.isNotEmpty(dto.getServiceMatterList())){
ServiceItemSelectFormDTO serviceItemSelectFormDTO=new ServiceItemSelectFormDTO();
serviceItemSelectFormDTO.setCustomerId(entity.getCustomerId());
serviceItemSelectFormDTO.setType("usable");
Result<List<OptionDTO>> serviceMateerRes=heartOpenFeignClient.queryDictList(serviceItemSelectFormDTO);
if(serviceMateerRes.success()&&CollectionUtils.isNotEmpty(serviceMateerRes.getData())){
Map<String,String> serviceMap=serviceMateerRes.getData().stream().collect(Collectors.toMap(OptionDTO::getValue,OptionDTO::getLabel));
List<OptionDTO> serviceMateerRes=icServiceItemDictService.queryDictList(entity.getCustomerId());
if(CollectionUtils.isNotEmpty(serviceMateerRes)){
Map<String,String> serviceMap=serviceMateerRes.stream().collect(Collectors.toMap(OptionDTO::getValue,OptionDTO::getLabel));
List<String> serviceMatterNameList=new ArrayList<>();
for(String serviceMatterCode:dto.getServiceMatterList()){
if(MapUtils.isNotEmpty(serviceMap)&&serviceMap.containsKey(serviceMatterCode)){

Loading…
Cancel
Save