Browse Source

暂存提交下

master
yinzuomei 4 years ago
parent
commit
7693814bf0
  1. 42
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ChooseResolveFormDTO.java
  2. 42
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportedFormDTO.java
  3. 34
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReCallEventFormDTO.java
  4. 34
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventFormDTO.java
  5. 55
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportedResultDTO.java
  6. 24
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventIdDTO.java
  7. 81
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/ResiEventController.java
  8. 47
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/ResiEventService.java
  9. 79
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java

42
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ChooseResolveFormDTO.java

@ -0,0 +1,42 @@
package com.epmet.dto.form;
import com.epmet.dto.result.ResiEventIdDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 选择已解决未解决
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 13:53
*/
@Data
public class ChooseResolveFormDTO extends ResiEventIdDTO implements Serializable {
private static final long serialVersionUID = 7888566055415227282L;
public interface AddUserInternalGroup {
}
/**
* 是否解决已解决 resolved未解决 un_solved
*/
@NotBlank(message = "resolveStatus不能为空",groups = AddUserInternalGroup.class)
private String resolveStatus;
//以下参数从token中获取
/**
* 当前用户id
*/
@NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
private String userId;
/**
* 当前客户id
*/
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
}

42
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/MyReportedFormDTO.java

@ -0,0 +1,42 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 我的报事列表查询
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 14:07
*/
@Data
public class MyReportedFormDTO implements Serializable {
private static final long serialVersionUID = 8426911903236849796L;
public interface AddUserInternalGroup {
}
/**
* 未处理:un_read处理中processing已办结closed_case
*/
@NotBlank(message = "statusCondition不能为空",groups = AddUserInternalGroup.class)
private String statusCondition;
private Integer pageNo;
private Integer pageSize;
//以下参数从token中获取
/**
* 当前用户id
*/
@NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
private String userId;
/**
* 当前客户id
*/
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
}

34
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ReCallEventFormDTO.java

@ -0,0 +1,34 @@
package com.epmet.dto.form;
import com.epmet.dto.result.ResiEventIdDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 撤回事件入参
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 11:28
*/
@Data
public class ReCallEventFormDTO extends ResiEventIdDTO implements Serializable {
private static final long serialVersionUID = 2127663703852717437L;
public interface AddUserInternalGroup {
}
//以下参数从token中获取
/**
* 当前用户id
*/
@NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class)
private String userId;
/**
* 当前客户id
*/
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
}

34
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventFormDTO.java

@ -0,0 +1,34 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 我要报事-提交
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 10:46
*/
@Data
public class ResiEventFormDTO implements Serializable {
private static final long serialVersionUID = -778643059131036832L;
public interface AddUserInternalGroup {
}
//以下参数从token中获取
/**
* 当前用户id
*/
@NotBlank(message = "userId不能为空",groups =AddUserInternalGroup.class)
private String userId;
/**
* 当前客户id
*/
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class)
private String customerId;
}

55
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyReportedResultDTO.java

@ -0,0 +1,55 @@
package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 报事列表
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 14:11
*/
@Data
public class MyReportedResultDTO implements Serializable {
private static final long serialVersionUID = -7372245830000262134L;
/**
* 事件id
*/
private String resiEventId;
/**
* 事件内容
*/
private String eventContent;
/**
* 图片列表可为空
*/
private List<String> imgList;
/**
* true展示false不展示
*/
private Boolean redDot;
/**
* 处理中processing已办结closed_case
*/
private String status;
/**
* true:已转项目false未立项
*/
private Boolean shiftProject;
/**
* 列表显示时间用此列yyyy-MM-dd HH:mm:ss处理中上报事件时间处理中最新一次处理事件已办结办结时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date showTime;
}

24
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventIdDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.result;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 事件id
*
* @author yinzuomei@elink-cn.com
* @date 2021/8/3 10:48
*/
@Data
public class ResiEventIdDTO implements Serializable {
private static final long serialVersionUID = 1553798655658549134L;
public interface ResiEventIdGroup {
}
/**
* 居民端报的事件id
*/
@NotBlank(message = "事件id不能为空",groups = ResiEventIdGroup.class)
private String resiEventId;
}

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

@ -17,11 +17,25 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.ChooseResolveFormDTO;
import com.epmet.dto.form.MyReportedFormDTO;
import com.epmet.dto.form.ReCallEventFormDTO;
import com.epmet.dto.form.ResiEventFormDTO;
import com.epmet.dto.result.MyReportedResultDTO;
import com.epmet.dto.result.ResiEventIdDTO;
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;
import java.util.List;
/**
* 居民报事表
@ -36,5 +50,72 @@ public class ResiEventController {
@Autowired
private ResiEventService resiEventService;
/**
* 我要报事-提交
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/8/3 10:46
*/
public Result<ResiEventIdDTO> report(@LoginUser TokenDto tokenDto, @RequestBody ResiEventFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
//校验参数
//todo
return new Result<ResiEventIdDTO>().ok(resiEventService.report(formDTO));
}
/**
* 我要报事-撤回
*
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/8/3 10:54
*/
@PostMapping("recall")
public Result recall(@LoginUser TokenDto tokenDto,@RequestBody ReCallEventFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,ResiEventIdDTO.ResiEventIdGroup.class,ReCallEventFormDTO.AddUserInternalGroup.class);
resiEventService.reCall(formDTO);
return new Result();
}
/**
* 选择已解决未解决
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @date 2021/8/3 13:57
*/
@PostMapping("chooseresolve")
public Result chooseResolve(@LoginUser TokenDto tokenDto,@RequestBody ChooseResolveFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,ResiEventIdDTO.ResiEventIdGroup.class,ChooseResolveFormDTO.AddUserInternalGroup.class);
resiEventService.chooseResolve(formDTO);
return new Result();
}
/**
* 我的报事列表查询
*
* @param tokenDto
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.MyReportedResultDTO>>
* @author yinzuomei
* @date 2021/8/3 14:27
*/
@PostMapping("myreported")
public Result<List<MyReportedResultDTO>> queryMyReported(@LoginUser TokenDto tokenDto, @RequestBody MyReportedFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
ValidatorUtils.validateEntity(formDTO,MyReportedFormDTO.AddUserInternalGroup.class);
return new Result<List<MyReportedResultDTO>>().ok(resiEventService.queryMyReported(formDTO));
}
}

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

@ -18,8 +18,16 @@
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.form.ChooseResolveFormDTO;
import com.epmet.dto.form.MyReportedFormDTO;
import com.epmet.dto.form.ReCallEventFormDTO;
import com.epmet.dto.form.ResiEventFormDTO;
import com.epmet.dto.result.MyReportedResultDTO;
import com.epmet.dto.result.ResiEventIdDTO;
import com.epmet.entity.ResiEventEntity;
import java.util.List;
/**
* 居民报事表
*
@ -27,4 +35,43 @@ import com.epmet.entity.ResiEventEntity;
* @since v1.0.0 2021-08-03
*/
public interface ResiEventService extends BaseService<ResiEventEntity> {
/**
* 我要报事-提交
*
* @param formDTO
* @return com.epmet.dto.result.ResiEventResultDTO
* @author yinzuomei
* @date 2021/8/3 10:51
*/
ResiEventIdDTO report(ResiEventFormDTO formDTO);
/**
* 撤回事件
*
* @param formDTO
* @return void
* @author yinzuomei
* @date 2021/8/3 13:45
*/
void reCall(ReCallEventFormDTO formDTO);
/**
* 选择已解决未解决
*
* @param formDTO
* @return void
* @author yinzuomei
* @date 2021/8/3 13:58
*/
void chooseResolve(ChooseResolveFormDTO formDTO);
/**
* 我的报事列表查询
*
* @param formDTO
* @return java.util.List<com.epmet.dto.result.MyReportedResultDTO>
* @author yinzuomei
* @date 2021/8/3 14:28
*/
List<MyReportedResultDTO> queryMyReported(MyReportedFormDTO formDTO);
}

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

@ -19,10 +19,18 @@ package com.epmet.service.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.dao.ResiEventDao;
import com.epmet.dto.form.ChooseResolveFormDTO;
import com.epmet.dto.form.MyReportedFormDTO;
import com.epmet.dto.form.ReCallEventFormDTO;
import com.epmet.dto.form.ResiEventFormDTO;
import com.epmet.dto.result.MyReportedResultDTO;
import com.epmet.dto.result.ResiEventIdDTO;
import com.epmet.entity.ResiEventEntity;
import com.epmet.service.ResiEventService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 居民报事表
*
@ -33,4 +41,75 @@ import org.springframework.stereotype.Service;
public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEventEntity> implements ResiEventService {
/**
* 我要报事-提交
*
* @param formDTO
* @return com.epmet.dto.result.ResiEventResultDTO
* @author yinzuomei
* @date 2021/8/3 10:51
*/
@Override
public ResiEventIdDTO report(ResiEventFormDTO formDTO) {
//todo
return null;
}
/**
* 撤回事件
*
* @param formDTO
* @return void
* @author yinzuomei
* @date 2021/8/3 13:45
*/
@Override
public void reCall(ReCallEventFormDTO formDTO) {
// todo
}
/**
* 选择已解决未解决
*
* @param formDTO
* @return void
* @author yinzuomei
* @date 2021/8/3 13:58
*/
@Override
public void chooseResolve(ChooseResolveFormDTO formDTO) {
// todo
}
/**
* 我的报事列表查询
*
* @param formDTO
* @return java.util.List<com.epmet.dto.result.MyReportedResultDTO>
* @author yinzuomei
* @date 2021/8/3 14:28
*/
@Override
public List<MyReportedResultDTO> queryMyReported(MyReportedFormDTO formDTO) {
// todo
return null;
}
}
Loading…
Cancel
Save