4 changed files with 164 additions and 1 deletions
@ -0,0 +1,57 @@ |
|||
package com.kms.yxgh.df.controller.v2; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|||
import com.kms.yxgh.base.Response; |
|||
import com.kms.yxgh.base.UpdateGroup; |
|||
import com.kms.yxgh.df.dto.v2.DfRecordDetailV2Dto; |
|||
import com.kms.yxgh.df.dto.v2.DfRecordSearchV2Dto; |
|||
import com.kms.yxgh.df.dto.v2.DfYhDetailV2Dto; |
|||
import com.kms.yxgh.df.dto.v2.DfYhListV2Dto; |
|||
import com.shuili.common.annotation.Log; |
|||
import com.shuili.common.core.domain.SearchParam; |
|||
import com.shuili.common.enums.BusinessType; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import lombok.AllArgsConstructor; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
|
|||
@RestController |
|||
@AllArgsConstructor |
|||
@RequestMapping("/run/df/v2/yh") |
|||
@Api(tags = "堤防养护v2") |
|||
public class DfYhV2Controller { |
|||
|
|||
|
|||
@PostMapping("/list") |
|||
@ApiOperation("堤防养护列表v2") |
|||
public IPage<DfYhListV2Dto> list(@RequestBody SearchParam<DfRecordSearchV2Dto> sp) { |
|||
return new Page<>(); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("堤防养护详情v2") |
|||
@GetMapping(value = "/{id}") |
|||
public Response<DfYhDetailV2Dto> getInfo(@PathVariable("id") String id) { |
|||
return Response.ok(); |
|||
} |
|||
|
|||
@ApiOperation("堤防养护新增或修改v2") |
|||
@Log(title = "堤防养护新增或修改v2", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/{commit}") |
|||
public Response<DfYhDetailV2Dto> edit(@Validated(UpdateGroup.class) |
|||
@RequestBody DfRecordDetailV2Dto dfYh, |
|||
@PathVariable("commit") Boolean commit) { |
|||
return Response.ok(); |
|||
} |
|||
|
|||
@ApiOperation("堤防养护删除v2") |
|||
@Log(title = "堤防养护删除v2", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public Response<Boolean> remove(@PathVariable("ids") String[] ids) { |
|||
return Response.ok(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,52 @@ |
|||
package com.kms.yxgh.df.dto.v2; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.kms.yxgh.base.AddGroup; |
|||
import com.kms.yxgh.base.UpdateGroup; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@ApiModel("堤防巡视检查记录详情v2") |
|||
public class DfYhDetailV2Dto { |
|||
|
|||
@NotBlank(message = "巡查养护记录ID不能为空", groups = {UpdateGroup.class}) |
|||
@ApiModelProperty("巡查维养记录") |
|||
private String id; |
|||
|
|||
@ApiModelProperty("问题id") |
|||
private String problemId; |
|||
|
|||
@ApiModelProperty("巡查记录id") |
|||
private String recordId; |
|||
|
|||
@NotBlank(message = "巡查项目ID不能为空", groups = {AddGroup.class, UpdateGroup.class}) |
|||
@ApiModelProperty("巡查项目ID") |
|||
private String checkingId; |
|||
|
|||
@NotNull(message = "开始时间", groups = {AddGroup.class, UpdateGroup.class}) |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
@ApiModelProperty("开始时间") |
|||
private Date startDate; |
|||
|
|||
@NotNull(message = "结束时间", groups = {AddGroup.class, UpdateGroup.class}) |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
@ApiModelProperty("结束时间") |
|||
private Date endDate; |
|||
|
|||
@ApiModelProperty("维养详情") |
|||
private String content; |
|||
|
|||
@ApiModelProperty("图片") |
|||
private List<String> images; |
|||
|
|||
@ApiModelProperty("巡查责任人") |
|||
private String dutyHolder; |
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
package com.kms.yxgh.df.dto.v2; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.kms.yxgh.base.AddGroup; |
|||
import com.kms.yxgh.base.UpdateGroup; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@ApiModel("堤防巡查养护列表v2") |
|||
public class DfYhListV2Dto { |
|||
|
|||
@ApiModelProperty("主键") |
|||
private String id; |
|||
|
|||
@ApiModelProperty("问题Id") |
|||
private String problemId; |
|||
|
|||
@ApiModelProperty("巡查项目ID") |
|||
private String checkingId; |
|||
|
|||
@ApiModelProperty("记录id") |
|||
private String recordId; |
|||
|
|||
@ApiModelProperty("巡查项目名称") |
|||
private String checkingName; |
|||
|
|||
@ApiModelProperty("状态") |
|||
private String status; |
|||
|
|||
@ApiModelProperty("巡查类型") |
|||
private String type; |
|||
|
|||
@ApiModelProperty("巡查类别") |
|||
private String category; |
|||
|
|||
@NotNull(message = "开始时间", groups = {AddGroup.class, UpdateGroup.class}) |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
@ApiModelProperty("开始时间") |
|||
private Date startDate; |
|||
|
|||
@NotNull(message = "结束时间", groups = {AddGroup.class, UpdateGroup.class}) |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
@ApiModelProperty("结束时间") |
|||
private Date endDate; |
|||
|
|||
@ApiModelProperty("巡查责任人") |
|||
private String dutyHolder; |
|||
|
|||
} |
Loading…
Reference in new issue