diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java index 1782ddf316..ef85be1d31 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyUnitDTO.java @@ -115,6 +115,11 @@ public class IcPartyUnitDTO implements Serializable { */ private String satisfaction; + /** + * 评分 + */ + private Integer score; + /** * 备注 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java index 47b2c02df8..522da610d1 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/CommunitySelfOrganizationListDTO.java @@ -67,7 +67,10 @@ public class CommunitySelfOrganizationListDTO implements Serializable { * 社区自组织ID */ private String orgId; - + /** + * 积分 + */ + private Integer score; /** * 社区自组织人员 */ @@ -84,6 +87,7 @@ public class CommunitySelfOrganizationListDTO implements Serializable { this.longitude = ""; this.latitude = ""; this.orgId = ""; + this.score = NumConstant.ZERO; this.organizationPersonnel = new ArrayList<>(); } } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java index 376078ab10..0130b246a7 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/GetListSocietyOrgResultDTO.java @@ -68,6 +68,10 @@ public class GetListSocietyOrgResultDTO implements Serializable { private String longitude; //维度 private String latitude; + /** + * 积分 + */ + private Integer score; } } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServicePointDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServicePointDTO.java new file mode 100644 index 0000000000..5f043c1f16 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServicePointDTO.java @@ -0,0 +1,17 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description + * @Author zhaoqifeng + * @Date 2022/1/21 15:47 + */ +@Data +public class ServicePointDTO implements Serializable { + private static final long serialVersionUID = -1127819263685687151L; + private String serviceId; + private Integer point; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java index 1650882b84..38a081d2bc 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/SocietyOrgListResultDTO.java @@ -59,5 +59,5 @@ public class SocietyOrgListResultDTO implements Serializable { private String longitude; //维度 private String latitude; - + private Integer score; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java index fa34fd7497..f3781ceea6 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java @@ -24,6 +24,7 @@ import com.epmet.dto.form.demand.IcResiUserDemandFromDTO; import com.epmet.dto.form.demand.PageListAnalysisFormDTO; import com.epmet.dto.form.demand.UserDemandPageFormDTO; import com.epmet.dto.result.PointRecordDTO; +import com.epmet.dto.result.ServicePointDTO; import com.epmet.dto.result.demand.*; import com.epmet.entity.IcUserDemandRecEntity; import org.apache.ibatis.annotations.Mapper; @@ -129,4 +130,14 @@ public interface IcUserDemandRecDao extends BaseDao { List getPointRecordList(PointRecordFormDTO formDTO); Integer getTotalPoint(PointRecordFormDTO formDTO); + + /** + * 组织单位积分 + * @Param agencyId + * @Param serviceType + * @Return {@link List< ServicePointDTO>} + * @Author zhaoqifeng + * @Date 2022/1/21 15:53 + */ + List getServicePoint(@Param("customerId")String customerId, @Param("serviceType")String serviceType); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index 6497e96139..5e86b438ed 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -27,6 +27,7 @@ import com.epmet.dto.result.demand.*; import com.epmet.entity.IcUserDemandRecEntity; import java.util.List; +import java.util.Map; /** * 居民需求记录表 @@ -235,4 +236,15 @@ public interface IcUserDemandRecService extends BaseService} + * @Author zhaoqifeng + * @Date 2022/1/21 16:02 + */ + Map getServicePoint(String customerId, String serviceType); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java index 1bc6fae202..5176518aa2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcCommunitySelfOrganizationServiceImpl.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.ExcelPoiUtils; import com.epmet.commons.tools.validator.PhoneValidatorUtils; import com.epmet.constant.IcCommunitySelfOrganizationConstant; +import com.epmet.constant.UserDemandConstant; import com.epmet.dao.IcCommunitySelfOrganizationDao; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; @@ -279,6 +280,8 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl pointMap = icUserDemandRecService.getServicePoint(tokenDto.getCustomerId(), UserDemandConstant.COMMUNITY_ORG); formDTO.setAgencyId(staffInfo.getAgencyId()); formDTO.setCustomerId(tokenDto.getCustomerId()); final int[] i = {(formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize() + NumConstant.ONE}; @@ -290,6 +293,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl { l.setSort(i[NumConstant.ZERO]); i[NumConstant.ZERO]++; + l.setScore(null == pointMap.get(l.getOrgId())?NumConstant.ZERO:pointMap.get(l.getOrgId())); }); result.setList(objectPageInfo.getList()); } @@ -301,6 +305,7 @@ public class IcCommunitySelfOrganizationServiceImpl extends BaseServiceImpl sort = new AtomicReference<>(NumConstant.ONE); resultDTOs.forEach(r -> { r.setSort(sort.getAndSet(sort.get() + NumConstant.ONE)); + r.setScore(null == pointMap.get(r.getOrgId())?NumConstant.ZERO:pointMap.get(r.getOrgId())); }); result.setList(resultDTOs); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java index 383b5e58fa..a41e154560 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java @@ -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.ExcelPoiUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.UserDemandConstant; import com.epmet.dao.IcPartyUnitDao; import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.form.PartyActivityFormDTO; @@ -108,7 +109,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); - + //获取单位积分 + Map pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); dtoList.forEach(item -> { item.setType(unitTypeMap.getData().get(item.getType())); if (StringUtils.isNotBlank(item.getServiceMatter())) { @@ -122,6 +124,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl(dtoList, pageInfo.getTotal()); } @@ -142,6 +145,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl serviceItemList=icServiceItemDictService.queryDictList(formDTO.getCustomerId()); Map categoryMap=serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); + //获取单位积分 + Map pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.PARTY_UNIT); dtoList.forEach(item -> { item.setType(unitTypeMap.getData().get(item.getType())); if (StringUtils.isNotBlank(item.getServiceMatter())) { @@ -150,6 +155,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl()); } + item.setScore(null == pointMap.get(item.getId())?NumConstant.ZERO:pointMap.get(item.getId())); }); return dtoList; } @@ -168,7 +174,10 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl pointMap = icUserDemandRecService.getServicePoint(entity.getCustomerId(), UserDemandConstant.PARTY_UNIT); dto.setServiceMatterList(Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA))); + dto.setScore(null == pointMap.get(id)?NumConstant.ZERO:pointMap.get(id)); } return dto; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java index 5d2a554c60..e0470c14dd 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java @@ -25,12 +25,16 @@ import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; +import com.epmet.constant.UserDemandConstant; import com.epmet.dao.IcSocietyOrgDao; import com.epmet.dto.CustomerStaffDTO; import com.epmet.dto.IcSocietyOrgDTO; import com.epmet.dto.form.*; import com.epmet.dto.form.demand.ServiceQueryFormDTO; -import com.epmet.dto.result.*; +import com.epmet.dto.result.GetListSocietyOrgResultDTO; +import com.epmet.dto.result.OrgInfoResultDTO; +import com.epmet.dto.result.SocietyOrgListResultDTO; +import com.epmet.dto.result.StaffSinGridResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcSocietyOrgEntity; import com.epmet.excel.IcSocietyOrgExcel; @@ -127,7 +131,8 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl pointMap = icUserDemandRecService.getServicePoint(formDTO.getCustomerId(), UserDemandConstant.SOCIAL_ORG); //2.查询被绑定管理员信息 UserIdsFormDTO dto = new UserIdsFormDTO(); List staffIdList = result.getList().stream().map(SocietyOrgListResultDTO::getAdminStaffId).collect(Collectors.toList()); @@ -150,7 +155,9 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl orgResult.getData().stream().filter(u -> r.getAgencyId().equals(u.getOrgId())).forEach(u -> r.setAgencyName(u.getOrgName()))); - + result.getList().forEach(item -> { + item.setScore(null == pointMap.get(item.getSocietyId())?NumConstant.ZERO:pointMap.get(item.getSocietyId())); + }); resultDTO.setList(result.getList()); return resultDTO; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index ffb5bac51c..73e4e939f6 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -1684,5 +1684,25 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl} + * @Author zhaoqifeng + * @Date 2022/1/21 16:02 + */ + @Override + public Map getServicePoint(String customerId, String serviceType) { + List list = baseDao.getServicePoint(customerId, serviceType); + if (CollectionUtils.isEmpty(list)) { + return Collections.emptyMap(); + } + return list.stream().collect(Collectors.toMap(ServicePointDTO::getServiceId, ServicePointDTO::getPoint)); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index eb1260f58b..7ea8f22256 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -618,4 +618,24 @@ AND c.EVALUATE_TIME <= #{endTime} + + \ No newline at end of file