Browse Source

接口框

dev_shibei_match
zxc 4 years ago
parent
commit
cc7b6d4a2d
  1. 43
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/EventProjectInfoDTO.java
  2. 22
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventDetailFormDTO.java
  3. 82
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventDetailResultDTO.java
  4. 17
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java
  5. 11
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java
  6. 13
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java

43
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/EventProjectInfoDTO.java

@ -0,0 +1,43 @@
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/8/3 1:38 下午
* @DESC
*/
@Data
public class EventProjectInfoDTO implements Serializable {
private static final long serialVersionUID = 5622220354099001615L;
/**
* 项目ID
*/
private String projectId;
/**
* 操作人xxx社区-张三
*/
private String operationName;
/**
* 操作时间
*/
private String operationTime;
/**
* 报事说明
*/
private String projectDeclare;
public EventProjectInfoDTO() {
this.projectId = "";
this.operationName = "";
this.operationTime = "";
this.projectDeclare = "";
}
}

22
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/EventDetailFormDTO.java

@ -0,0 +1,22 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2021/8/3 1:27 下午
* @DESC
*/
@Data
public class EventDetailFormDTO implements Serializable {
private static final long serialVersionUID = -297495947153154171L;
public interface EventDetailForm{}
@NotBlank(message = "报事ID不能为空",groups = EventDetailForm.class)
private String eventId;
}

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

@ -0,0 +1,82 @@
package com.epmet.dto.result;
import com.epmet.dto.EventProjectInfoDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Author zxc
* @DateTime 2021/8/3 1:30 下午
* @DESC
*/
@Data
public class EventDetailResultDTO implements Serializable {
private static final long serialVersionUID = 3905105043326445613L;
/**
* 报事时间
*/
private String eventTime;
/**
* 报事内容
*/
private String eventContent;
/**
* 报事地址
*/
private String eventAddress;
/**
* 所属网格xx社区-xx网格
*/
private String gridName;
/**
* 是否办结truefalse
*/
private Boolean isClosed;
/**
* 是否解决truefalse
*/
private Boolean isResolve;
/**
* 是否可以撤回truefalse
*/
private Boolean isRollback;
/**
* 报事图片
*/
private List<String> eventImgs;
/**
* 报事提到的人
*/
private List<String> eventPerson;
/**
* 项目信息
*/
private EventProjectInfoDTO projectInfo;
public EventDetailResultDTO() {
this.eventTime = "";
this.eventContent = "";
this.eventAddress = "";
this.gridName = "";
this.isClosed = false;
this.isResolve = false;
this.isRollback = false;
this.eventImgs = new ArrayList<>();
this.eventPerson = new ArrayList<>();
this.projectInfo = new EventProjectInfoDTO();
}
}

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

@ -17,8 +17,14 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.EventDetailFormDTO;
import com.epmet.dto.result.EventDetailResultDTO;
import com.epmet.service.ResiEventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -36,5 +42,16 @@ public class ResiEventController {
@Autowired
private ResiEventService resiEventService;
/**
* @Description 报事详情-两端通用
* @Param formDTO
* @author zxc
* @date 2021/8/3 1:47 下午
*/
@PostMapping("eventdetail")
public Result<EventDetailResultDTO> eventDetail(@RequestBody EventDetailFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return new Result<EventDetailResultDTO>().ok(resiEventService.eventDetail(formDTO));
}
}

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

@ -1,11 +1,12 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.form.EventDetailFormDTO;
import com.epmet.dto.form.EventListFormDTO;
import com.epmet.dto.form.UpdateViewTimeFormDTO;
import com.epmet.dto.result.EventDetailResultDTO;
import com.epmet.dto.result.EventListResultDTO;
import com.epmet.entity.ResiEventEntity;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@ -33,4 +34,12 @@ public interface ResiEventService extends BaseService<ResiEventEntity> {
*/
void updateViewTime(UpdateViewTimeFormDTO formDTO);
/**
* @Description 报事详情-两端通用
* @Param formDTO
* @author zxc
* @date 2021/8/3 1:47 下午
*/
EventDetailResultDTO eventDetail(EventDetailFormDTO formDTO);
}

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

@ -19,8 +19,10 @@ package com.epmet.service.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.dao.ResiEventDao;
import com.epmet.dto.form.EventDetailFormDTO;
import com.epmet.dto.form.EventListFormDTO;
import com.epmet.dto.form.UpdateViewTimeFormDTO;
import com.epmet.dto.result.EventDetailResultDTO;
import com.epmet.dto.result.EventListResultDTO;
import com.epmet.entity.ResiEventEntity;
import com.epmet.service.ResiEventService;
@ -58,4 +60,15 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
public void updateViewTime(UpdateViewTimeFormDTO formDTO) {
}
/**
* @Description 报事详情-两端通用
* @Param formDTO
* @author zxc
* @date 2021/8/3 1:47 下午
*/
@Override
public EventDetailResultDTO eventDetail(EventDetailFormDTO formDTO) {
return null;
}
}
Loading…
Cancel
Save