Browse Source

/resievent/eventdetail-icdata

master
yinzuomei 4 years ago
parent
commit
b7b67c889a
  1. 18
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventDetailFormDTO.java
  2. 6
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventDetailResultDTO.java
  3. 12
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java
  4. 8
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java
  5. 31
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java

18
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventDetailFormDTO.java

@ -0,0 +1,18 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 数字赋能平台-个人档案-上报事件-事件详情
*/
@Data
public class ResiEventDetailFormDTO implements Serializable {
private static final long serialVersionUID = 4449275163195979994L;
public interface AddUserInternalGroup {
}
@NotBlank(message = "resiEventId不能为空",groups =AddUserInternalGroup.class )
private String resiEventId;
}

6
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventDetailResultDTO.java

@ -11,7 +11,7 @@ import java.util.List;
/**
* @Author zxc
* @DateTime 2021/8/3 1:30 下午
* @DESC
* @DESC 两端通用时间详情接口+个人档案-数据分析-事件详情
*/
@Data
public class EventDetailResultDTO implements Serializable {
@ -87,10 +87,10 @@ public class EventDetailResultDTO implements Serializable {
@JsonIgnore
private List<String> orgNameList;
@JsonIgnore
//@JsonIgnore
private String projectId;
@JsonIgnore
//@JsonIgnore
private Boolean isProject;
public EventDetailResultDTO() {

12
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java

@ -57,6 +57,18 @@ public class ResiEventController {
return new Result<EventDetailResultDTO>().ok(resiEventService.eventDetail(formDTO, tokenDto));
}
/**
* 数字赋能平台-个人档案-事件详情
*
* @param formDTO
* @return
*/
@PostMapping("eventdetail-icdata")
public Result<EventDetailResultDTO> eventDetailForIcData(@RequestBody ResiEventDetailFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO,ResiEventDetailFormDTO.AddUserInternalGroup.class);
return new Result<EventDetailResultDTO>().ok(resiEventService.eventDetailForIcData(formDTO));
}
/**
* 我要报事-提交
*

8
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java

@ -41,6 +41,14 @@ public interface ResiEventService extends BaseService<ResiEventEntity> {
*/
EventDetailResultDTO eventDetail(EventDetailFormDTO formDTO, TokenDto tokenDto);
/**
* 数字赋能平台-个人档案-事件详情
*
* @param formDTO
* @return
*/
EventDetailResultDTO eventDetailForIcData(ResiEventDetailFormDTO formDTO);
/**
* 我要报事-提交
*

31
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java

@ -163,7 +163,20 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
@Override
@Transactional(rollbackFor = Exception.class)
public EventDetailResultDTO eventDetail(EventDetailFormDTO formDTO, TokenDto tokenDto) {
EventDetailResultDTO dto = baseDao.selectEventDetail(formDTO.getEventId());
//单独抽出来一个方法,因为数据分析中,个人档案-事件详情也许要调用
EventDetailResultDTO dto =getEventDetailResultDTO(formDTO.getEventId());
// 更改已读状态 报事人的红点:resi_event,艾特人的:resi_event_mention,所代表的组织的:resi_event_report_org
if (tokenDto.getApp().equals(EventConstant.TYPE_RESI)){
baseDao.updateResiEvent(tokenDto.getUserId(),formDTO.getEventId());
baseDao.updateEventMention(tokenDto.getUserId(),formDTO.getEventId());
}else if (tokenDto.getApp().equals(EventConstant.TYPE_GOV)){
resiEventReportOrgDao.updateEventOrg(formDTO.getEventId(), formDTO.getOrgId());
}
return dto;
}
public EventDetailResultDTO getEventDetailResultDTO(String resiEventId){
EventDetailResultDTO dto = baseDao.selectEventDetail(resiEventId);
if (null == dto){
return new EventDetailResultDTO();
}
@ -205,15 +218,17 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
}
List<String> data = orgResult.getData();
dto.setEventOrg(data);
// 更改已读状态 报事人的红点:resi_event,艾特人的:resi_event_mention,所代表的组织的:resi_event_report_org
if (tokenDto.getApp().equals(EventConstant.TYPE_RESI)){
baseDao.updateResiEvent(tokenDto.getUserId(),formDTO.getEventId());
baseDao.updateEventMention(tokenDto.getUserId(),formDTO.getEventId());
}else if (tokenDto.getApp().equals(EventConstant.TYPE_GOV)){
resiEventReportOrgDao.updateEventOrg(formDTO.getEventId(), formDTO.getOrgId());
}
return dto;
}
/**
* 数字赋能平台-个人档案-事件详情
*
* @param formDTO
* @return
*/
public EventDetailResultDTO eventDetailForIcData(ResiEventDetailFormDTO formDTO){
return getEventDetailResultDTO(formDTO.getResiEventId());
}
/**
* 我要报事-提交

Loading…
Cancel
Save