Browse Source

群众满意度关联联建单位

dev
曲树通 2 years ago
parent
commit
d09b57d096
  1. 9
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java
  2. 21
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  3. 20
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml
  4. 1
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java
  5. 14
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java

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

@ -147,4 +147,13 @@ public interface IcUserDemandRecDao extends BaseDao<IcUserDemandRecEntity> {
* @return * @return
*/ */
Integer selectCountByServerId(String serverId); Integer selectCountByServerId(String serverId);
/***
* 根据需求id查详情
* @param demandRecId
* @return void
* @author qushutong
* @date 2023/3/30 17:37
*/
IcUserDemandRecDTO selectInfoByDemandRecId(@Param("customerId") String customerId, @Param("demandRecId") String demandRecId);
} }

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

@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO;
import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.ServiceConstant;
@ -45,10 +46,7 @@ import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.commons.tools.utils.ScanContentUtils;
import com.epmet.constant.ReadFlagConstant; import com.epmet.constant.*;
import com.epmet.constant.SmsTemplateConstant;
import com.epmet.constant.UserDemandConstant;
import com.epmet.constant.UserMessageTypeConstant;
import com.epmet.dao.IcUserDemandOperateLogDao; import com.epmet.dao.IcUserDemandOperateLogDao;
import com.epmet.dao.IcUserDemandRecDao; import com.epmet.dao.IcUserDemandRecDao;
import com.epmet.dao.IcUserDemandSatisfactionDao; import com.epmet.dao.IcUserDemandSatisfactionDao;
@ -2016,6 +2014,21 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
entity.setFinishResult("resolved"); entity.setFinishResult("resolved");
entity.setEvaluateFlag(true); entity.setEvaluateFlag(true);
baseDao.updateById(entity); baseDao.updateById(entity);
// 3/30 计算更新平均值
IcUserDemandRecDTO icUserDemandRecDTO = baseDao.selectInfoByDemandRecId(formDTO.getCustomerId(),formDTO.getDemandRecId());
if("party_unit".equals(icUserDemandRecDTO.getServiceType())){
ServerSatisfactionCalFormDTO mqMsg = new ServerSatisfactionCalFormDTO();
mqMsg.setCustomerId(formDTO.getCustomerId());
mqMsg.setServerId(icUserDemandRecDTO.getServerId());
mqMsg.setServiceType(icUserDemandRecDTO.getServiceType());
SystemMsgFormDTO form = new SystemMsgFormDTO();
form.setMessageType(SystemMessageType.CAL_PARTY_UNIT_SATISFACTION);
form.setContent(mqMsg);
messageOpenFeignClient.sendSystemMsgByMQ(form);
}
} }
@Override @Override

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

@ -706,4 +706,24 @@
AND s.SERVER_ID = #{serverId} AND s.SERVER_ID = #{serverId}
AND r.`STATUS` = 'assigned' AND r.`STATUS` = 'assigned'
</select> </select>
<select id="selectInfoByDemandRecId" resultType="com.epmet.dto.IcUserDemandRecDTO">
SELECT
r.*,
s.SERVER_ID,
s.SERVICE_TYPE
FROM
ic_user_demand_rec r
INNER JOIN ic_user_demand_service s ON ( r.id = s.demand_rec_id )
WHERE
r.DEL_FLAG = '0'
AND r.`STATUS` = 'finished'
<if test="null !=customerId and customerId !='' ">
AND r.customer_id =#{customerId}
</if>
<if test="null != demandRecId and demandRecId != '' ">
and r.id = #{demandRecId}
</if>
LIMIT 1
</select>
</mapper> </mapper>

1
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java

@ -46,6 +46,7 @@ public class IcEventReplyFormDTO implements Serializable {
/** /**
* 满意度 - 不满意:bad基本满意:good非常满意:perfect * 满意度 - 不满意:bad基本满意:good非常满意:perfect
* v2版本 12,3,4,5
*/ */
@NotBlank(message = "满意度不能为空", groups = {Comment.class}) @NotBlank(message = "满意度不能为空", groups = {Comment.class})
private String satisfaction; private String satisfaction;

14
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java

@ -301,6 +301,20 @@ public class IcEventController {
return new Result(); return new Result();
} }
/**
* @Author sun
* @Description 事件管理-评价 关联 联建单位
**/
@PostMapping("commentv2")
public Result commentv2(@LoginUser TokenDto tokenDto, @RequestBody IcEventReplyFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO, IcEventReplyFormDTO.Comment.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
icEventService.comment(formDTO);
return new Result();
}
/** /**
* @Author sun * @Author sun
* @Description 事件管理-详情 * @Description 事件管理-详情

Loading…
Cancel
Save