31 changed files with 1388 additions and 339 deletions
@ -0,0 +1,17 @@ |
|||
package com.kms.yxgh.base; |
|||
|
|||
import com.shuili.common.exception.BaseException; |
|||
|
|||
/** |
|||
* 用户信息异常类 |
|||
* |
|||
* @author shuili |
|||
*/ |
|||
public class SzException extends BaseException { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public SzException(String message) { |
|||
super("SZ", "500", null, message); |
|||
} |
|||
} |
@ -0,0 +1,104 @@ |
|||
package com.kms.yxgh.sz.controller; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.kms.yxgh.base.Response; |
|||
import com.kms.yxgh.sz.domain.dto.SzPlanDetailDto; |
|||
import com.kms.yxgh.sz.domain.dto.SzPointDto; |
|||
import com.kms.yxgh.sz.domain.entity.SzPlan; |
|||
import com.kms.yxgh.sz.service.SzPlanService; |
|||
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 java.util.List; |
|||
import lombok.AllArgsConstructor; |
|||
import org.springframework.web.bind.annotation.DeleteMapping; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.PutMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
|
|||
/** |
|||
* 水闸巡视检查计划Controller |
|||
* |
|||
* @author sy |
|||
* @date 2023-11-09 |
|||
*/ |
|||
@RestController |
|||
@AllArgsConstructor |
|||
@RequestMapping("/run/sz/plan") |
|||
@Api(tags = "水闸巡视检查计划") |
|||
public class SzPlanController { |
|||
|
|||
private final SzPlanService szPlanService; |
|||
|
|||
/** |
|||
* 查询水闸巡视检查计划列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ApiOperation("水闸巡视检查计划列表") |
|||
public IPage<SzPlan> list(@RequestBody SearchParam<SzPlan> sp) { |
|||
return szPlanService.selectPage(sp); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 获取水闸巡视检查计划详细信息 |
|||
*/ |
|||
@ApiOperation(" 水闸巡视检查计划详情") |
|||
@GetMapping(value = "/{id}") |
|||
public Response<SzPlanDetailDto> getInfo(@PathVariable("id") String id) { |
|||
return Response.ok(szPlanService.getDetailById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增水闸巡视检查计划 |
|||
*/ |
|||
@Log(title = "水闸巡视检查计划新增", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
@ApiOperation("水闸巡视检查计划新增") |
|||
public Response<SzPlanDetailDto> add(@RequestBody SzPlanDetailDto SzPlan) { |
|||
return Response.ok(szPlanService.add(SzPlan)); |
|||
} |
|||
|
|||
/** |
|||
* 修改水闸巡视检查计划 |
|||
*/ |
|||
@ApiOperation("水闸巡视检查计划修改") |
|||
@Log(title = "水闸巡视检查计划修改", businessType = BusinessType.UPDATE) |
|||
@PutMapping |
|||
public Response<SzPlanDetailDto> edit(@RequestBody SzPlanDetailDto SzPlan) { |
|||
return Response.ok(szPlanService.update(SzPlan)); |
|||
} |
|||
|
|||
/** |
|||
* 删除水闸巡视检查计划 |
|||
*/ |
|||
@ApiOperation("水闸巡视检查计划删除") |
|||
@Log(title = "水闸巡视检查计划删除", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{id}") |
|||
public Response<Boolean> remove(@PathVariable String id) { |
|||
return Response.ok(szPlanService.deleteById(id)); |
|||
} |
|||
|
|||
@ApiOperation("水闸巡视检查计划巡查点设置") |
|||
@Log(title = "水闸巡视检查计划巡查点设置", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/points/{id}") |
|||
public Response<Boolean> addPoints(@PathVariable("id") String id, |
|||
@RequestBody List<SzPointDto> points) { |
|||
return Response.ok(szPlanService.addPoints(id, points)); |
|||
} |
|||
|
|||
|
|||
@ApiOperation("水闸巡视检查计划巡查点位数据") |
|||
@Log(title = "水闸巡视检查计划巡查点位数据", businessType = BusinessType.SEARCH) |
|||
@GetMapping("/points/{id}") |
|||
public Response<List<SzPointDto>> addPoints(@PathVariable("id") String id) { |
|||
return Response.ok(szPlanService.getPoints(id)); |
|||
} |
|||
} |
@ -0,0 +1,88 @@ |
|||
package com.kms.yxgh.sz.controller; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.kms.yxgh.base.Response; |
|||
import com.kms.yxgh.sz.domain.dto.SzRecordDetailDto; |
|||
import com.kms.yxgh.sz.domain.dto.StartPlan; |
|||
import com.kms.yxgh.sz.domain.entity.SzRecord; |
|||
import com.kms.yxgh.sz.service.SzRecordService; |
|||
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.web.bind.annotation.DeleteMapping; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.PutMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
|
|||
/** |
|||
* 水闸巡视检查记录Controller |
|||
* |
|||
* @author sy |
|||
* @date 2023-11-09 |
|||
*/ |
|||
@RestController |
|||
@AllArgsConstructor |
|||
@RequestMapping("/run/sz/record") |
|||
@Api(tags = "水闸巡视检查记录") |
|||
public class SzRecordController { |
|||
|
|||
private final SzRecordService szRecordService; |
|||
|
|||
/** |
|||
* 查询水闸巡视检查记录列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ApiOperation("水闸巡视检查记录列表") |
|||
public IPage<SzRecord> list(@RequestBody SearchParam<SzRecord> sp) { |
|||
return szRecordService.selectPage(sp); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 获取水闸巡视检查记录详细信息 |
|||
*/ |
|||
@ApiOperation(" 水闸巡视检查记录详情") |
|||
@GetMapping(value = "/{id}") |
|||
public Response<SzRecordDetailDto> getInfo(@PathVariable("id") String id) { |
|||
return Response.ok(szRecordService.getDetailById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增水闸巡视检查记录 |
|||
*/ |
|||
@Log(title = "水闸巡视检查记录新增", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
@ApiOperation("水闸巡视检查记录新增") |
|||
public Response<SzRecordDetailDto> add(@RequestBody StartPlan startPlan) { |
|||
return Response.ok(szRecordService.start(startPlan)); |
|||
} |
|||
|
|||
/** |
|||
* 修改水闸巡视检查记录 |
|||
*/ |
|||
@ApiOperation("水闸巡视检查记录修改") |
|||
@Log(title = "水闸巡视检查记录修改", businessType = BusinessType.UPDATE) |
|||
@PutMapping |
|||
public Response<SzRecordDetailDto> edit(@RequestBody SzRecordDetailDto SzRecord) { |
|||
return Response.ok(szRecordService.update(SzRecord)); |
|||
} |
|||
|
|||
/** |
|||
* 删除水闸巡视检查记录 |
|||
*/ |
|||
@ApiOperation("水闸巡视检查记录删除") |
|||
@Log(title = "水闸巡视检查记录删除", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{id}") |
|||
public Response<Boolean> remove(@PathVariable String id) { |
|||
return Response.ok(szRecordService.deleteById(id)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.kms.yxgh.sz.controller; |
|||
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.kms.common.utils.BaseEntityUtils; |
|||
import com.kms.yxgh.base.Response; |
|||
import com.kms.yxgh.sz.domain.entity.SzTrace; |
|||
import com.kms.yxgh.sz.service.SzTraceService; |
|||
import com.shuili.common.annotation.Log; |
|||
import com.shuili.common.core.controller.BaseController; |
|||
import com.shuili.common.core.domain.SearchParam; |
|||
import com.shuili.common.enums.BusinessType; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
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; |
|||
|
|||
|
|||
/** |
|||
* 水闸巡视检查检查记录轨迹Controller |
|||
* |
|||
* @author sy |
|||
* @date 2023-11-09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/run/sz/trace") |
|||
@Api(tags = "水闸巡视检查检查记录轨迹") |
|||
public class SzTraceController extends BaseController { |
|||
|
|||
@Autowired |
|||
private SzTraceService szTraceService; |
|||
|
|||
/** |
|||
* 查询水闸巡视检查检查记录轨迹列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ApiOperation("水闸巡视检查检查记录轨迹列表") |
|||
public IPage list(@RequestBody SearchParam<SzTrace> sp) { |
|||
return szTraceService.selectPage(sp); |
|||
} |
|||
|
|||
/** |
|||
* 新增水闸巡视检查检查记录轨迹 |
|||
*/ |
|||
@Log(title = "水闸巡视检查检查记录轨迹新增", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
@ApiOperation("水闸巡视检查检查记录轨迹新增") |
|||
public Response<Boolean> add(@RequestBody SzTrace SzTrace) { |
|||
BaseEntityUtils.preInsert(SzTrace); |
|||
szTraceService.save(SzTrace); |
|||
return Response.ok(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.kms.yxgh.sz.domain.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 水闸巡视检查简短信息 |
|||
* |
|||
* @author sy |
|||
* @date 2023-11-09 |
|||
*/ |
|||
@Data |
|||
@ApiModel("水闸巡视检查") |
|||
public class SimpleSzCheckingDto { |
|||
|
|||
@ApiModelProperty("主键") |
|||
private String id; |
|||
|
|||
@ApiModelProperty("巡查名称") |
|||
private String name; |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.kms.yxgh.sz.domain.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @ClassName: StartPlan |
|||
* @Description: TODO |
|||
* @Date: 2023/11/15 上午10:43 * |
|||
* @author: hxh |
|||
* @version: 1.0 |
|||
*/ |
|||
@ApiModel("开启水闸巡视检查计划") |
|||
@Data |
|||
public class StartPlan { |
|||
|
|||
@ApiModelProperty("计划id") |
|||
private String planId; |
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.kms.yxgh.sz.domain.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import java.util.List; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @ClassName: CheckingVo |
|||
* @Description: TODO |
|||
* @Date: 2023/11/10 上午11:56 * |
|||
* @author: hxh |
|||
* @version: 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel("水闸巡视检查详情") |
|||
public class SzCheckingDetailDto { |
|||
|
|||
@ApiModelProperty("主键") |
|||
private String id; |
|||
|
|||
@ApiModelProperty("巡查名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("巡查类型") |
|||
private Long type; |
|||
|
|||
@ApiModelProperty("检查项") |
|||
private List<SzCheckingItemDto> items; |
|||
|
|||
|
|||
@Data |
|||
public static class SzCheckingItemDto { |
|||
|
|||
@ApiModelProperty("主键") |
|||
private String id; |
|||
|
|||
@ApiModelProperty("检查部位") |
|||
private List<String> parts; |
|||
|
|||
@ApiModelProperty("检查内容") |
|||
private String content; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,64 @@ |
|||
package com.kms.yxgh.sz.domain.dto; |
|||
|
|||
import com.alibaba.fastjson.JSONObject; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 水闸巡视检查计划详情 |
|||
* |
|||
* @author sy |
|||
* @date 2023-11-09 |
|||
*/ |
|||
@Data |
|||
@ApiModel("水闸巡视检查计划详情") |
|||
public class SzPlanDetailDto { |
|||
|
|||
@ApiModelProperty("主键") |
|||
private String id; |
|||
|
|||
@ApiModelProperty("名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("巡查ID") |
|||
private String xcId; |
|||
|
|||
@ApiModelProperty("巡查类型") |
|||
private Long type; |
|||
|
|||
@ApiModelProperty("检查次数") |
|||
private Long frequency; |
|||
|
|||
@ApiModelProperty("周期") |
|||
private Long cycleType; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty("提醒时间") |
|||
private Date reminderTime; |
|||
|
|||
@ApiModelProperty("附加配置") |
|||
private JSONObject otherConfig; |
|||
|
|||
@ApiModelProperty("执行人") |
|||
private List<OperatorDto> operators; |
|||
|
|||
|
|||
@Data |
|||
public static class OperatorDto { |
|||
|
|||
@ApiModelProperty("主键") |
|||
private String id; |
|||
|
|||
@ApiModelProperty("用户id") |
|||
private String uid; |
|||
@ApiModelProperty("用户名称") |
|||
private String name; |
|||
|
|||
} |
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.kms.yxgh.sz.domain.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 水闸巡视检查计划点位 |
|||
* |
|||
* @author sy |
|||
* @date 2023-11-09 |
|||
*/ |
|||
@Data |
|||
@ApiModel("水闸巡视检查计划点位") |
|||
public class SzPointDto { |
|||
|
|||
@ApiModelProperty("主键") |
|||
private String id; |
|||
|
|||
@ApiModelProperty("经度") |
|||
private Double longitude; |
|||
|
|||
@ApiModelProperty("纬度") |
|||
private Double latitude; |
|||
|
|||
@ApiModelProperty("海拔") |
|||
private Double altitude; |
|||
} |
@ -0,0 +1,54 @@ |
|||
package com.kms.yxgh.sz.domain.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import java.util.List; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @ClassName: SzRecordDetailDto |
|||
* @Description: TODO |
|||
* @Date: 2023/11/15 上午10:36 * |
|||
* @author: hxh |
|||
* @version: 1.0 |
|||
*/ |
|||
|
|||
@Data |
|||
@ApiModel("水闸巡视检查记录详情") |
|||
public class SzRecordDetailDto { |
|||
|
|||
@ApiModelProperty("巡查记录") |
|||
private String id; |
|||
|
|||
@ApiModelProperty("巡查计划ID") |
|||
private String planId; |
|||
|
|||
@ApiModelProperty("巡查记录名称") |
|||
private String name; |
|||
|
|||
@ApiModelProperty("状态") |
|||
private Long status; |
|||
|
|||
@ApiModelProperty("巡查项") |
|||
private List<SzRecordItemDto> items; |
|||
|
|||
@Data |
|||
|
|||
public static class SzRecordItemDto { |
|||
|
|||
@ApiModelProperty("主键") |
|||
private String id; |
|||
|
|||
@ApiModelProperty("检查部位") |
|||
private List<String> parts; |
|||
|
|||
@ApiModelProperty("检查内容") |
|||
private String content; |
|||
|
|||
@ApiModelProperty("状态") |
|||
private Integer status; |
|||
|
|||
@ApiModelProperty("存在问题") |
|||
private String problem; |
|||
} |
|||
} |
Loading…
Reference in new issue