Browse Source

change topic

dev_shibei_match
yinzuomei 4 years ago
parent
commit
8e92658b0d
  1. 7
      epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java
  2. 10
      epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java
  3. 19
      epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/CalPartyUnitSatisfactionFormDTO.java
  4. 28
      epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/ServerSatisfactionCalFormDTO.java
  5. 11
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/FinishResultDTO.java
  6. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java
  7. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java
  8. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java
  9. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java
  10. 8
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/mq/RocketMQConsumerRegister.java
  11. 32
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/mq/listener/ServerSatisfactionCalEventListener.java
  12. 4
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyUnitService.java
  13. 5
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java
  14. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyUnitServiceImpl.java
  15. 9
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  16. 11
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java
  17. 9
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml
  18. 13
      epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java
  19. 6
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java

7
epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/ConsomerGroupConstants.java

@ -54,6 +54,11 @@ public interface ConsomerGroupConstants {
*/
String RESI_GROUP_POINT_OPERATION_GROUP = "resi_group_point_operation_group";
/**
* 社区服务(原居民需求)积分操作消费组
*/
String COMMUNITY_SERVICE_POINT_OPERATION_GROUP = "community_service_point_operation_group";
/**
* 开放的对接数据(中间库) 组织变更事件监听器分组
*/
@ -82,5 +87,5 @@ public interface ConsomerGroupConstants {
/**
* 需求完成如果服务方是区域化党建单位重新计算这个单位的满意度
*/
String CAL_PARTY_UNIT_SATISFACTION = "cal_party_unit_satisfaction";
String USER_DEMAND_FINISH_GROUP = "user_demand_finish_group";
}

10
epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/constants/TopicConstants.java

@ -55,9 +55,10 @@ public interface TopicConstants {
String IC_RESI_USER = "ic_resi_user";
/**
* 需求完成如果服务方是区域化党建单位重新计算这个单位的满意度
* 需求完成
* 1如果服务方是区域化党建单位重新计算这个单位的满意度
*/
String CAL_PARTY_UNIT_SATISFACTION = "cal_party_unit_satisfaction";
String USER_DEMAND = "user_demand";
/**
* 爱心互助
@ -68,4 +69,9 @@ public interface TopicConstants {
* 楼院小组
*/
String RESI_GROUP = "resi_group";
/**
* 社区服务原居民需求
*/
String COMMUNITY_SERVICE="community_service";
}

19
epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/CalPartyUnitSatisfactionFormDTO.java

@ -1,19 +0,0 @@
package com.epmet.commons.rocketmq.messages;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 需求完成如果服务方是区域化党建单位重新计算这个单位的满意度,或者直接计算整个客户
*/
@Data
public class CalPartyUnitSatisfactionFormDTO implements Serializable {
public interface AddUserInternalGroup {
}
@NotBlank(message = "客户id不能为空",groups = AddUserInternalGroup.class)
private String customerId;
private String partyUnitId;
}

28
epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/ServerSatisfactionCalFormDTO.java

@ -0,0 +1,28 @@
package com.epmet.commons.rocketmq.messages;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 需求完成如果服务方是区域化党建单位重新计算这个单位的满意度,或者直接计算整个客户
*/
@Data
public class ServerSatisfactionCalFormDTO implements Serializable {
public interface AddUserInternalGroup {
}
@NotBlank(message = "客户id不能为空",groups = AddUserInternalGroup.class)
private String customerId;
/**
* 服务方id可以值区域化党建单位id
* 后面也可以是社会组织社区自组织id...
*/
private String serverId;
/**
* 服务方类型志愿者volunteer社会组织social_org社区自组织community_org区域党建单位party_unit
*/
@NotBlank(message = "serviceType不能为空",groups = AddUserInternalGroup.class)
private String serviceType;
}

11
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/FinishResultDTO.java

@ -6,12 +6,19 @@ import java.io.Serializable;
/**
* 完成需求时是否需要计算 区域化党建单位的满意度
*
*/
@Data
public class FinishResultDTO implements Serializable {
/**
* 服务方id可以值区域化党建单位id也可以是社会组织社区自组织id爱心互助的志愿者用户id
*/
private String serverId;
/**
* 服务方类型志愿者volunteer社会组织social_org社区自组织community_org区域党建单位party_unit
*/
private String serviceType;
private Boolean grantPoint;
/**
* 奖励积分只有服务方是志愿者且积分大于0时才发放积分
*/
private Integer awardPoint;
}

6
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyUnitController.java

@ -17,7 +17,7 @@
package com.epmet.controller;
import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO;
import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
@ -189,8 +189,8 @@ public class IcPartyUnitController {
* @return
*/
@PostMapping("cal-partyunit-satisfation")
public Result calPartyUnitSatisfation(@RequestBody CalPartyUnitSatisfactionFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO,CalPartyUnitSatisfactionFormDTO.AddUserInternalGroup.class);
public Result calPartyUnitSatisfation(@RequestBody ServerSatisfactionCalFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO,ServerSatisfactionCalFormDTO.AddUserInternalGroup.class);
icPartyUnitService.calPartyUnitSatisfation(formDTO);
return new Result();
}

7
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java

@ -17,7 +17,7 @@
package com.epmet.controller;
import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO;
import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.page.PageData;
@ -191,9 +191,10 @@ public class IcUserDemandRecController {
FinishResultDTO finishResultDTO=icUserDemandRecService.finish(formDTO);
//如果服务方是区域化党建单位,需要实时去计算他的群众满意度=服务过的需求的评价分数相加➗ 需求的总个数。
if(UserDemandConstant.PARTY_UNIT.equals(finishResultDTO.getServiceType())){
CalPartyUnitSatisfactionFormDTO mqMsg = new CalPartyUnitSatisfactionFormDTO();
ServerSatisfactionCalFormDTO mqMsg = new ServerSatisfactionCalFormDTO();
mqMsg.setCustomerId(formDTO.getCustomerId());
mqMsg.setPartyUnitId(finishResultDTO.getServerId());
mqMsg.setServerId(finishResultDTO.getServerId());
mqMsg.setServiceType(finishResultDTO.getServiceType());
SystemMsgFormDTO form = new SystemMsgFormDTO();
form.setMessageType(SystemMessageType.CAL_PARTY_UNIT_SATISFACTION);
form.setContent(mqMsg);

8
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java

@ -1,7 +1,7 @@
package com.epmet.controller;
import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO;
import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.aop.NoRepeatSubmit;
import com.epmet.commons.tools.constant.NumConstant;
@ -122,9 +122,10 @@ public class ResiDemandController {
FinishResultDTO finishResultDTO = icUserDemandRecService.evaluate(formDTO);
//如果服务方是区域化党建单位,需要实时去计算他的群众满意度=服务过的需求的评价分数相加➗ 需求的总个数。
if (UserDemandConstant.PARTY_UNIT.equals(finishResultDTO.getServiceType())) {
CalPartyUnitSatisfactionFormDTO mqMsg = new CalPartyUnitSatisfactionFormDTO();
ServerSatisfactionCalFormDTO mqMsg = new ServerSatisfactionCalFormDTO();
mqMsg.setCustomerId(formDTO.getCustomerId());
mqMsg.setPartyUnitId(finishResultDTO.getServerId());
mqMsg.setServerId(finishResultDTO.getServerId());
mqMsg.setServiceType(finishResultDTO.getServiceType());
SystemMsgFormDTO form = new SystemMsgFormDTO();
form.setMessageType(SystemMessageType.CAL_PARTY_UNIT_SATISFACTION);
form.setContent(mqMsg);
@ -132,6 +133,7 @@ public class ResiDemandController {
} else if (UserDemandConstant.VOLUNTEER.equals(finishResultDTO.getServiceType()) && finishResultDTO.getAwardPoint() > NumConstant.ZERO) {
// todo
// 志愿者发放积分
}
return new Result();
}

4
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java

@ -85,7 +85,9 @@ public interface IcUserDemandRecDao extends BaseDao<IcUserDemandRecEntity> {
@Param("startDateId") String startDateId,
@Param("endDateId") String endDateId);
List<ServiceStatDTO> selectGroupByPartyUnit(@Param("customerId") String customerId, @Param("partyUnitId") String partyUnitId);
List<ServiceStatDTO> selectGroupByServer(@Param("customerId") String customerId,
@Param("serverId") String serverId,
@Param("serviceType") String serviceType);
/**
* 居民端-需求大厅未处理处理中已完成

8
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/mq/RocketMQConsumerRegister.java

@ -4,7 +4,7 @@ import com.epmet.commons.rocketmq.constants.ConsomerGroupConstants;
import com.epmet.commons.rocketmq.constants.TopicConstants;
import com.epmet.commons.rocketmq.register.MQAbstractRegister;
import com.epmet.commons.rocketmq.register.MQConsumerProperties;
import com.epmet.mq.listener.PartyUnitSatisfactionCalEventListener;
import com.epmet.mq.listener.ServerSatisfactionCalEventListener;
import org.apache.rocketmq.common.protocol.heartbeat.MessageModel;
import org.springframework.stereotype.Component;
@ -20,11 +20,11 @@ public class RocketMQConsumerRegister extends MQAbstractRegister {
public void registerAllListeners(String env, MQConsumerProperties consumerProperties) {
// 客户初始化监听器注册
register(consumerProperties,
ConsomerGroupConstants.CAL_PARTY_UNIT_SATISFACTION,
ConsomerGroupConstants.USER_DEMAND_FINISH_GROUP,
MessageModel.CLUSTERING,
TopicConstants.CAL_PARTY_UNIT_SATISFACTION,
TopicConstants.USER_DEMAND,
"*",
new PartyUnitSatisfactionCalEventListener());
new ServerSatisfactionCalEventListener());
// ...其他监听器类似
}

32
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/mq/listener/PartyUnitSatisfactionCalEventListener.java → epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/mq/listener/ServerSatisfactionCalEventListener.java

@ -2,13 +2,14 @@ package com.epmet.mq.listener;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.rocketmq.constants.MQUserPropertys;
import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO;
import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO;
import com.epmet.commons.tools.distributedlock.DistributedLock;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.utils.SpringContextUtils;
import com.epmet.constant.SystemMessageType;
import com.epmet.service.IcPartyUnitService;
import org.apache.commons.lang.StringUtils;
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext;
@ -22,13 +23,7 @@ import org.slf4j.LoggerFactory;
import java.util.List;
import java.util.concurrent.TimeUnit;
/**
* @Description 计算区域化党建单位群众满意度=分数相加 需求的总个数
* @author wxz
* @date 2021.10.13 15:21:48
*/
public class PartyUnitSatisfactionCalEventListener implements MessageListenerConcurrently {
public class ServerSatisfactionCalEventListener implements MessageListenerConcurrently {
private Logger logger = LoggerFactory.getLogger(getClass());
private RedisUtils redisUtils;
@ -57,23 +52,28 @@ public class PartyUnitSatisfactionCalEventListener implements MessageListenerCon
String tags = messageExt.getTags();
String pendingMsgLabel = messageExt.getUserProperty(MQUserPropertys.BLOCKED_MSG_LABEL);
logger.info("【计算区域化党建单位群众满意度事件监听器】-需求完成-收到消息内容:{},操作:{}", msg, tags);
CalPartyUnitSatisfactionFormDTO obj = JSON.parseObject(msg, CalPartyUnitSatisfactionFormDTO.class);
logger.info("【需求完成计算服务方群众满意度事件监听器】-需求完成-收到消息内容:{},操作:{}", msg, tags);
ServerSatisfactionCalFormDTO obj = JSON.parseObject(msg, ServerSatisfactionCalFormDTO.class);
DistributedLock distributedLock = null;
RLock lock = null;
try {
distributedLock = SpringContextUtils.getBean(DistributedLock.class);
lock = distributedLock.getLock(String.format("lock:ic_warn_stats:%s", obj.getCustomerId()),
lock = distributedLock.getLock(String.format("lock:user_demand:%s", obj.getCustomerId()),
30L, 30L, TimeUnit.SECONDS);
//待执行方法
SpringContextUtils.getBean(IcPartyUnitService.class).calPartyUnitSatisfation(obj);
switch (tags) {
case SystemMessageType.CAL_PARTY_UNIT_SATISFACTION:
//区域化党建单位-计算群众满意度
SpringContextUtils.getBean(IcPartyUnitService.class).calPartyUnitSatisfation(obj);
break;
//后面社会组织、社区自组织可能都会计算....先预备着
}
} catch (RenException e) {
// 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试
logger.error("【计算区域化党建单位群众满意度事件监听器】-MQ失败:".concat(ExceptionUtils.getErrorStackTrace(e)));
logger.error("【需求完成计算服务方群众满意度事件监听器】-MQ失败:".concat(ExceptionUtils.getErrorStackTrace(e)));
} catch (Exception e) {
// 不是我们自己抛出的异常,可以让MQ重试
logger.error("【计算区域化党建单位群众满意度监听器】-MQ失败:".concat(ExceptionUtils.getErrorStackTrace(e)));
logger.error("【需求完成计算服务方群众满意度监听器】-MQ失败:".concat(ExceptionUtils.getErrorStackTrace(e)));
throw e;
} finally {
distributedLock.unLock(lock);
@ -83,7 +83,7 @@ public class PartyUnitSatisfactionCalEventListener implements MessageListenerCon
try {
removePendingMqMsgCache(pendingMsgLabel);
} catch (Exception e) {
logger.error("【计算区域化党建单位群众满意度监听器】-删除mq阻塞消息缓存失败:{}", ExceptionUtils.getErrorStackTrace(e));
logger.error("【需求完成计算服务方群众满意度监听器】-删除mq阻塞消息缓存失败:{}", ExceptionUtils.getErrorStackTrace(e));
}
}
}

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

@ -18,8 +18,8 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
@ -147,7 +147,7 @@ public interface IcPartyUnitService extends BaseService<IcPartyUnitEntity> {
* 计算区域化党建单位的群众满意度
* @param formDTO
*/
void calPartyUnitSatisfation(CalPartyUnitSatisfactionFormDTO formDTO);
void calPartyUnitSatisfation(ServerSatisfactionCalFormDTO formDTO);
List<IcPartyUnitEntity> queryListById(List<String> partyUnitIds);
}

5
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java

@ -141,10 +141,11 @@ public interface IcUserDemandRecService extends BaseService<IcUserDemandRecEntit
* 计算出服务方评价总分服务的需求个数
*
* @param customerId
* @param partyUnitId
* @param serverId
* @param serviceType
* @return
*/
List<ServiceStatDTO> groupByPartyUnit(String customerId, String partyUnitId);
List<ServiceStatDTO> groupByServer(String customerId, String serverId,String serviceType);
/**
* 居民端-需求大厅未处理处理中已完成

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

@ -22,7 +22,7 @@ import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO;
import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
@ -440,10 +440,11 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa
* 总分需求个数
* @param formDTO
*/
@Transactional(rollbackFor = Exception.class)
@Override
public void calPartyUnitSatisfation(CalPartyUnitSatisfactionFormDTO formDTO) {
public void calPartyUnitSatisfation(ServerSatisfactionCalFormDTO formDTO) {
log.info("收到消息内容啦...." + JSON.toJSONString(formDTO));
List<ServiceStatDTO> list = icUserDemandRecService.groupByPartyUnit(formDTO.getCustomerId(), formDTO.getPartyUnitId());
List<ServiceStatDTO> list = icUserDemandRecService.groupByServer(formDTO.getCustomerId(), formDTO.getServerId(),formDTO.getServiceType());
for (ServiceStatDTO serviceStatDTO : list) {
if (0 != serviceStatDTO.getDemandCount()) {
BigDecimal result = serviceStatDTO.getTotalScore().divide(new BigDecimal(serviceStatDTO.getDemandCount()), 4, BigDecimal.ROUND_HALF_UP);

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

@ -906,15 +906,16 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
* 计算出服务方评价总分服务的需求个数
*
* @param customerId
* @param partyUnitId
* @param serverId
* @param serviceType
* @return
*/
@Override
public List<ServiceStatDTO> groupByPartyUnit(String customerId, String partyUnitId) {
if(StringUtils.isBlank(customerId)&&StringUtils.isBlank(partyUnitId)){
public List<ServiceStatDTO> groupByServer(String customerId, String serverId,String serviceType) {
if(StringUtils.isBlank(customerId)&&StringUtils.isBlank(serverId)){
return new ArrayList<>();
}
return baseDao.selectGroupByPartyUnit(customerId,partyUnitId);
return baseDao.selectGroupByServer(customerId,serverId,serviceType);
}

11
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java

@ -6,9 +6,7 @@ import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.MqConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO;
import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg;
import com.epmet.commons.tools.enums.EventEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.scan.param.ImgScanParamDTO;
@ -17,7 +15,10 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO;
import com.epmet.commons.tools.scan.param.TextTaskDTO;
import com.epmet.commons.tools.scan.result.SyncScanResult;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.ScanContentUtils;
import com.epmet.constant.*;
import com.epmet.dao.*;
import com.epmet.dto.*;
@ -843,7 +844,7 @@ public class WorkActServiceImpl implements WorkActService {
if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) {
//获取服务事项
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO();
codeFormDTO.setCustomerId(customerId);
codeFormDTO.setCustomerId(formDTO.getCustomerId());
codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE);
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter()));
@ -924,7 +925,7 @@ public class WorkActServiceImpl implements WorkActService {
if (StringUtils.isNotBlank(resultDTO.getServiceMatter())) {
//获取服务事项
SubCodeFormDTO codeFormDTO = new SubCodeFormDTO();
codeFormDTO.setCustomerId(formDTO.getCustomerId());
codeFormDTO.setCustomerId(customerId);
codeFormDTO.setParentCategoryCode(SERVICE_MATTER_CODE);
Map<String, String> categoryMap = icResiDemandDictService.querySubCodeList(codeFormDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel));
resultDTO.setServiceMatterName(categoryMap.get(resultDTO.getServiceMatter()));

9
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml

@ -397,7 +397,8 @@
</select>
<select id="selectGroupByPartyUnit" parameterType="map" resultType="com.epmet.dto.result.demand.ServiceStatDTO">
<!-- 服务评价后 ,计算服务方(区域化党建单位、社会组织、社区自组织)群众满意度 -->
<select id="selectGroupByServer" parameterType="map" resultType="com.epmet.dto.result.demand.ServiceStatDTO">
SELECT
S.SERVER_ID AS serverId,
SUM( M.SCORE ) AS totalScore,
@ -411,9 +412,9 @@
AND r.DEL_FLAG = '0'
AND m.CUSTOMER_ID = #{customerId}
AND r.`STATUS` = 'finished'
and s.SERVICE_TYPE ='party_unit'
<if test="null !=partyUnitId and partyUnitId!='' ">
and s.server_id=#{partyUnitId}
and s.SERVICE_TYPE='#{serviceType}
<if test="null !=serverId and serverId!='' ">
and s.server_id=#{serverId}
</if>
group by s.SERVER_ID
</select>

13
epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/constant/SystemMessageType.java

@ -129,14 +129,14 @@ public interface SystemMessageType {
* 发布话题
*/
String PUBLISH_ONE_TOPIC = "publish_one_topic";
/**
* 对小组内话题进行15字以上评论
*/
String PARTICIPATE_ONE_TOPIC = "participate_one_topic";
/**
* 话题被转为议题(小组中发布的话题被组长转为议题)
*/
String TOPIC_TO_ISSUE = "topic_to_issue";
/**
* 对小组内话题进行15字以上评论
*/
String PARTICIPATE_ONE_TOPIC = "participate_one_topic";
/**
* 转话题为议题(将自建小组中话题转为议题)
*/
@ -149,4 +149,9 @@ public interface SystemMessageType {
* 组长解决组内话题
*/
String LEADER_RESOLVE_TOPIC = "leader_resolve_topic";
/**
* 完成用户需求需求人提交评价
*/
String FINISH_USER_DEMAND="finish_user_demand";
}

6
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SystemMessageServiceImpl.java

@ -193,7 +193,7 @@ public class SystemMessageServiceImpl implements SystemMessageService {
topic = TopicConstants.IC_RESI_USER;
break;
case SystemMessageType.CAL_PARTY_UNIT_SATISFACTION:
topic=TopicConstants.CAL_PARTY_UNIT_SATISFACTION;
topic=TopicConstants.USER_DEMAND;
break;
case SystemMessageType.INVITE_NEW_INTO_GROUP:
case SystemMessageType.INVITE_RESI_INTO_GROUP:
@ -210,6 +210,10 @@ public class SystemMessageServiceImpl implements SystemMessageService {
case SystemMessageType.ACTIVE_INSERT_LIVE:
topic = TopicConstants.EPMET_HEART;
break;
//社区服务相关积分
case SystemMessageType.FINISH_USER_DEMAND:
topic=TopicConstants.COMMUNITY_SERVICE;
break;
}
return topic;
}

Loading…
Cancel
Save