|
@ -40,6 +40,7 @@ import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ExcelPoiUtils; |
|
|
import com.epmet.commons.tools.utils.ExcelPoiUtils; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
|
|
import com.epmet.constant.UserDemandConstant; |
|
|
import com.epmet.dao.IcPartyUnitDao; |
|
|
import com.epmet.dao.IcPartyUnitDao; |
|
|
import com.epmet.dto.IcPartyUnitDTO; |
|
|
import com.epmet.dto.IcPartyUnitDTO; |
|
|
import com.epmet.dto.form.PartyActivityFormDTO; |
|
|
import com.epmet.dto.form.PartyActivityFormDTO; |
|
@ -108,7 +109,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
//服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
|
|
|
//服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
|
|
|
List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); |
|
|
List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); |
|
|
Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
|
|
|
//获取单位积分
|
|
|
|
|
|
Map<String, Integer> pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); |
|
|
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())) { |
|
@ -122,6 +124,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
}else{ |
|
|
}else{ |
|
|
item.setSatisfaction(new BigDecimal(item.getSatisfaction()).setScale(2,BigDecimal.ROUND_HALF_UP).toString()); |
|
|
item.setSatisfaction(new BigDecimal(item.getSatisfaction()).setScale(2,BigDecimal.ROUND_HALF_UP).toString()); |
|
|
} |
|
|
} |
|
|
|
|
|
item.setScore(null == pointMap.get(item.getId())?NumConstant.ZERO:pointMap.get(item.getId())); |
|
|
}); |
|
|
}); |
|
|
return new PageData<>(dtoList, pageInfo.getTotal()); |
|
|
return new PageData<>(dtoList, pageInfo.getTotal()); |
|
|
} |
|
|
} |
|
@ -142,6 +145,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
//服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
|
|
|
//服务事项列表从需求分类中抽离出来,改为查询ic_service_item_dict表
|
|
|
List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); |
|
|
List<OptionDTO> serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); |
|
|
Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
Map<String, String> categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); |
|
|
|
|
|
//获取单位积分
|
|
|
|
|
|
Map<String, Integer> pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); |
|
|
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())) { |
|
@ -150,6 +155,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
} else { |
|
|
} else { |
|
|
item.setServiceMatterList(new ArrayList<>()); |
|
|
item.setServiceMatterList(new ArrayList<>()); |
|
|
} |
|
|
} |
|
|
|
|
|
item.setScore(null == pointMap.get(item.getId())?NumConstant.ZERO:pointMap.get(item.getId())); |
|
|
}); |
|
|
}); |
|
|
return dtoList; |
|
|
return dtoList; |
|
|
} |
|
|
} |
|
@ -168,7 +174,10 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
IcPartyUnitEntity entity = baseDao.selectById(id); |
|
|
IcPartyUnitEntity entity = baseDao.selectById(id); |
|
|
IcPartyUnitDTO dto = ConvertUtils.sourceToTarget(entity, IcPartyUnitDTO.class); |
|
|
IcPartyUnitDTO dto = ConvertUtils.sourceToTarget(entity, IcPartyUnitDTO.class); |
|
|
if (StringUtils.isNotBlank(dto.getServiceMatter())) { |
|
|
if (StringUtils.isNotBlank(dto.getServiceMatter())) { |
|
|
|
|
|
//获取单位积分
|
|
|
|
|
|
Map<String, Integer> pointMap = icUserDemandRecService.getServicePoint(entity.getCustomerId(), UserDemandConstant.PARTY_UNIT); |
|
|
dto.setServiceMatterList(Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA))); |
|
|
dto.setServiceMatterList(Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA))); |
|
|
|
|
|
dto.setScore(null == pointMap.get(id)?NumConstant.ZERO:pointMap.get(id)); |
|
|
} |
|
|
} |
|
|
return dto; |
|
|
return dto; |
|
|
} |
|
|
} |
|
|