Browse Source

voice:duration

dev
yinzuomei 3 years ago
parent
commit
10513cdeb2
  1. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java
  2. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java
  3. 46
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java

2
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java

@ -83,7 +83,7 @@ public class IcEventAddEditFormDTO implements Serializable {
*/
private String longitude;
/**
* 处理方式[0:已回复 1:已转项目 1:已转需求]
* 处理方式[0:已回复 1:已转项目 2:已转需求]
*/
private String operationType;
/**

2
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportIcEvResDTO.java

@ -38,7 +38,7 @@ public class MyReportIcEvResDTO implements Serializable {
/**
* 音频[url集合]
*/
private List<String> voiceList;
private List<IcEventAttachmentDTO> voiceList;
/**
* 地址

46
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java

@ -1,6 +1,5 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.*;
@ -96,14 +95,18 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
@Autowired
private ProjectSatisfactionDetailService projectSatisfactionDetailService;
public CustomerStaffInfoCacheResult getStaffInfo(String customerId,String staffId){
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, staffId);
if (null == staffInfo) {
throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", staffId));
}
return staffInfo;
}
@Override
public PageData<IcEventListResultDTO> list(IcEventListFormDTO formDTO) {
//获取当前工作人员缓存信息
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
if (null == staffInfo) {
throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getStaffId()));
}
CustomerStaffInfoCacheResult staffInfo = getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
formDTO.setAgencyId(staffInfo.getAgencyId());
//分页查询当前组织下网格内事件数据
@ -149,14 +152,6 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
return new PageData<>(list, pageInfo.getTotal());
}
private QueryWrapper<IcEventEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcEventEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IcEventDTO get(String id) {
@ -168,10 +163,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
@Transactional(rollbackFor = Exception.class)
public void save(IcEventAddEditFormDTO formDTO) {
//获取当前工作人员缓存信息
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
if (null == staffInfo) {
throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId()));
}
CustomerStaffInfoCacheResult staffInfo = getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
//获取网格缓存信息
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(formDTO.getGridId());
if (null == gridInfo) {
@ -694,10 +686,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
//3.新增回复数据
//获取当前工作人员缓存信息
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
if (null == staffInfo) {
throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId()));
}
CustomerStaffInfoCacheResult staffInfo = getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
IcEventReplyEntity replyEntity = new IcEventReplyEntity();
replyEntity.setCustomerId(formDTO.getCustomerId());
replyEntity.setIcEventId(formDTO.getIcEventId());
@ -834,10 +823,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
messageFormDTO.setUserId(entity.getCreatedBy());
messageFormDTO.setTitle(UserMessageConstant.EVENT_TITILE);
//获取当前工作人员缓存信息
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
if (null == staffInfo) {
throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getUserId()));
}
CustomerStaffInfoCacheResult staffInfo = getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
messageFormDTO.setMessageContent(String.format("%s将您上报的事件转为项目,请查看。", staffInfo.getAgencyName()));
messageFormDTO.setReadFlag(Constant.UNREAD);
messageFormDTO.setMessageType(UserMessageTypeConstant.IC_EVENT);
@ -919,10 +905,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
messageFormDTO.setGridId(entity.getGridId());
messageFormDTO.setUserId(entity.getCreatedBy());
messageFormDTO.setTitle(UserMessageConstant.EVENT_TITILE);
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getDemandUserId());
if (null == staffInfo) {
throw new EpmetException(String.format("查询工作人员%s缓存信息失败...", formDTO.getDemandUserId()));
}
CustomerStaffInfoCacheResult staffInfo = getStaffInfo(formDTO.getCustomerId(), formDTO.getDemandUserId());
messageFormDTO.setMessageContent(String.format("%s将您上报的事件转为服务,请查看。", staffInfo.getAgencyName()));
messageFormDTO.setReadFlag(Constant.UNREAD);
messageFormDTO.setMessageType(UserMessageTypeConstant.IC_EVENT);
@ -1359,6 +1342,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
attachment.setAttachmentFormat(a.getFormat());
attachment.setAttachmentType(a.getType());
attachment.setAttachmentUrl(a.getUrl());
attachment.setDuration(a.getDuration());
attachment.setStatus(TopicConstant.AUTO_PASSED);
attachment.setSort(sort++);
attachmentEntityList.add(attachment);
@ -1385,12 +1369,12 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
//每个事件对应的图片数据
if (!CollectionUtils.isEmpty(dto.getAttachmentList())) {
List<String> imageList = new ArrayList<>();
List<String> voiceList = new ArrayList<>();
List<IcEventAttachmentDTO> voiceList = new ArrayList<>();
for (IcEventAttachmentDTO file : dto.getAttachmentList()) {
if ("image".equals(file.getAttachmentType())) {
imageList.add(file.getAttachmentUrl());
} else if ("voice".equals(file.getAttachmentType())) {
voiceList.add(file.getAttachmentUrl());
voiceList.add(file);
}
}
dto.setImageList(imageList);

Loading…
Cancel
Save