|
@ -45,7 +45,6 @@ import com.epmet.dto.IcPartyUnitDTO; |
|
|
import com.epmet.dto.form.PartyActivityFormDTO; |
|
|
import com.epmet.dto.form.PartyActivityFormDTO; |
|
|
import com.epmet.dto.form.PartyUnitFormDTO; |
|
|
import com.epmet.dto.form.PartyUnitFormDTO; |
|
|
import com.epmet.dto.form.demand.ServiceQueryFormDTO; |
|
|
import com.epmet.dto.form.demand.ServiceQueryFormDTO; |
|
|
import com.epmet.dto.form.demand.SubCodeFormDTO; |
|
|
|
|
|
import com.epmet.dto.result.PartyUnitDistributionResultDTO; |
|
|
import com.epmet.dto.result.PartyUnitDistributionResultDTO; |
|
|
import com.epmet.dto.result.demand.OptionDTO; |
|
|
import com.epmet.dto.result.demand.OptionDTO; |
|
|
import com.epmet.dto.result.demand.ServiceStatDTO; |
|
|
import com.epmet.dto.result.demand.ServiceStatDTO; |
|
@ -54,6 +53,7 @@ import com.epmet.excel.IcPartyUnitImportExcel; |
|
|
import com.epmet.feign.EpmetAdminOpenFeignClient; |
|
|
import com.epmet.feign.EpmetAdminOpenFeignClient; |
|
|
import com.epmet.service.IcPartyUnitService; |
|
|
import com.epmet.service.IcPartyUnitService; |
|
|
import com.epmet.service.IcResiDemandDictService; |
|
|
import com.epmet.service.IcResiDemandDictService; |
|
|
|
|
|
import com.epmet.service.IcServiceItemDictService; |
|
|
import com.epmet.service.IcUserDemandRecService; |
|
|
import com.epmet.service.IcUserDemandRecService; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.github.pagehelper.PageInfo; |
|
@ -87,7 +87,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
private IcUserDemandRecService icUserDemandRecService; |
|
|
private IcUserDemandRecService icUserDemandRecService; |
|
|
@Resource |
|
|
@Resource |
|
|
private IcResiDemandDictService icResiDemandDictService; |
|
|
private IcResiDemandDictService icResiDemandDictService; |
|
|
|
|
|
@Resource |
|
|
|
|
|
private IcServiceItemDictService icServiceItemDictService; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO) { |
|
|
public PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO) { |
|
@ -104,10 +105,10 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
PageInfo<IcPartyUnitEntity> pageInfo = new PageInfo<>(list); |
|
|
PageInfo<IcPartyUnitEntity> pageInfo = new PageInfo<>(list); |
|
|
List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); |
|
|
List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); |
|
|
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); |
|
|
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); |
|
|
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); |
|
|
//服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
|
|
|
codeFormDTO.setCustomerId(formDTO.getCustomerId()); |
|
|
List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); |
|
|
codeFormDTO.setParentCategoryCode("1010"); |
|
|
Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
|
|
|
dtoList.forEach(item -> { |
|
|
dtoList.forEach(item -> { |
|
|
item.setType(unitTypeMap.getData().get(item.getType())); |
|
|
item.setType(unitTypeMap.getData().get(item.getType())); |
|
|
if (StringUtils.isNotBlank(item.getServiceMatter())) { |
|
|
if (StringUtils.isNotBlank(item.getServiceMatter())) { |
|
@ -138,10 +139,9 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); |
|
|
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); |
|
|
List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); |
|
|
List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); |
|
|
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); |
|
|
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); |
|
|
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); |
|
|
//服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
|
|
|
codeFormDTO.setCustomerId(formDTO.getCustomerId()); |
|
|
List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); |
|
|
codeFormDTO.setParentCategoryCode("1010"); |
|
|
Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
|
|
|
dtoList.forEach(item -> { |
|
|
dtoList.forEach(item -> { |
|
|
item.setType(unitTypeMap.getData().get(item.getType())); |
|
|
item.setType(unitTypeMap.getData().get(item.getType())); |
|
|
if (StringUtils.isNotBlank(item.getServiceMatter())) { |
|
|
if (StringUtils.isNotBlank(item.getServiceMatter())) { |
|
@ -312,10 +312,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
if (null == staffInfoCache) { |
|
|
if (null == staffInfoCache) { |
|
|
throw new EpmetException(8000, "获取用户缓存失败"); |
|
|
throw new EpmetException(8000, "获取用户缓存失败"); |
|
|
} |
|
|
} |
|
|
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO(); |
|
|
List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); |
|
|
codeFormDTO.setCustomerId(tokenDto.getCustomerId()); |
|
|
Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
codeFormDTO.setParentCategoryCode("1010"); |
|
|
|
|
|
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getLabel, OptionDTO::getValue)); |
|
|
|
|
|
//1.数据校验
|
|
|
//1.数据校验
|
|
|
Iterator<IcPartyUnitImportExcel> iterator = result.iterator(); |
|
|
Iterator<IcPartyUnitImportExcel> iterator = result.iterator(); |
|
|
while (iterator.hasNext()) { |
|
|
while (iterator.hasNext()) { |
|
|