6 changed files with 207 additions and 17 deletions
@ -0,0 +1,29 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2021/8/3 10:43 上午 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class EventListFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 5882062169112022561L; |
||||
|
|
||||
|
public interface EventListForm extends CustomerClientShowGroup{} |
||||
|
|
||||
|
/** |
||||
|
* 报事列表类型【已处理:processed 未处理:undisposed 已办结:transferred】 |
||||
|
*/ |
||||
|
@NotBlank(message = "报事列表类型不能为空",groups = EventListForm.class) |
||||
|
private String eventType; |
||||
|
|
||||
|
@NotBlank(message = "",groups = EventListForm.class) |
||||
|
private String orgId; |
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2021/8/3 10:55 上午 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class UpdateViewTimeFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 7104400078458366322L; |
||||
|
|
||||
|
public interface UpdateViewTimeForm extends CustomerClientShowGroup{} |
||||
|
|
||||
|
/** |
||||
|
* 居民端用户:resi_user;工作人员:staff |
||||
|
*/ |
||||
|
@NotBlank(message = "viewType不能为空",groups = UpdateViewTimeForm.class) |
||||
|
private String viewType; |
||||
|
|
||||
|
@NotBlank(message = "事件ID不能为空",groups = UpdateViewTimeForm.class) |
||||
|
private String eventId; |
||||
|
} |
@ -0,0 +1,48 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2021/8/3 10:41 上午 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class EventListResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -8550265282744924930L; |
||||
|
|
||||
|
/** |
||||
|
* 报事标题 |
||||
|
*/ |
||||
|
private String eventTitle; |
||||
|
|
||||
|
/** |
||||
|
* 报事时间 |
||||
|
*/ |
||||
|
private String eventTime; |
||||
|
|
||||
|
/** |
||||
|
* 报事ID |
||||
|
*/ |
||||
|
private String eventId; |
||||
|
|
||||
|
/** |
||||
|
* 是否立项【true:是,false:否】 |
||||
|
*/ |
||||
|
private Boolean isProject; |
||||
|
|
||||
|
/** |
||||
|
* 红点显示【true:显示,false:不显示】 |
||||
|
*/ |
||||
|
private Boolean redDot; |
||||
|
|
||||
|
/** |
||||
|
* 报事图片 |
||||
|
*/ |
||||
|
private List<String> eventImgs; |
||||
|
|
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.dto.form.EventListFormDTO; |
||||
|
import com.epmet.dto.form.UpdateViewTimeFormDTO; |
||||
|
import com.epmet.dto.result.EventListResultDTO; |
||||
|
import com.epmet.service.ResiEventService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 居民报事表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-08-03 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("event") |
||||
|
public class EventController { |
||||
|
|
||||
|
@Autowired |
||||
|
private ResiEventService resiEventService; |
||||
|
|
||||
|
/** |
||||
|
* @Description 群众直报(待处理、处理中、已办结)列表 |
||||
|
* @Param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2021/8/3 10:53 上午 |
||||
|
*/ |
||||
|
@PostMapping("eventlist") |
||||
|
public Result<List<EventListResultDTO>> eventList(@RequestBody EventListFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO, EventListFormDTO.EventListForm.class); |
||||
|
return new Result<List<EventListResultDTO>>().ok(resiEventService.eventList(formDTO)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 查看报事时,更新时间操作 |
||||
|
* @Param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2021/8/3 11:01 上午 |
||||
|
*/ |
||||
|
@PostMapping("updateviewtime") |
||||
|
public Result updateViewTime(@RequestBody UpdateViewTimeFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO, UpdateViewTimeFormDTO.UpdateViewTimeForm.class); |
||||
|
resiEventService.updateViewTime(formDTO); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
} |
Loading…
Reference in new issue