This commit is contained in:
parent
1beae8d9af
commit
7c9f400cfd
@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.property.domain.bo.InspectionItemBo;
|
||||
import org.dromara.property.domain.vo.InspectionItemVo;
|
||||
import org.dromara.property.service.IInspectionItemService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 巡检项目
|
||||
* 前端访问路由地址为:/property/item
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/item")
|
||||
public class InspectionItemController extends BaseController {
|
||||
|
||||
private final IInspectionItemService inspectionItemService;
|
||||
|
||||
/**
|
||||
* 查询巡检项目列表
|
||||
*/
|
||||
@SaCheckPermission("system:item:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<InspectionItemVo> list(InspectionItemBo bo, PageQuery pageQuery) {
|
||||
return inspectionItemService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出巡检项目列表
|
||||
*/
|
||||
@SaCheckPermission("system:item:export")
|
||||
@Log(title = "巡检项目", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(InspectionItemBo bo, HttpServletResponse response) {
|
||||
List<InspectionItemVo> list = inspectionItemService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "巡检项目", InspectionItemVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取巡检项目详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("system:item:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<InspectionItemVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(inspectionItemService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检项目
|
||||
*/
|
||||
@SaCheckPermission("system:item:add")
|
||||
@Log(title = "巡检项目", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody InspectionItemBo bo) {
|
||||
return toAjax(inspectionItemService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检项目
|
||||
*/
|
||||
@SaCheckPermission("system:item:edit")
|
||||
@Log(title = "巡检项目", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody InspectionItemBo bo) {
|
||||
return toAjax(inspectionItemService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除巡检项目
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:item:remove")
|
||||
@Log(title = "巡检项目", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(inspectionItemService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.InspectionPlanVo;
|
||||
import org.dromara.property.domain.bo.InspectionPlanBo;
|
||||
import org.dromara.property.service.IInspectionPlanService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 巡检计划
|
||||
* 前端访问路由地址为:/property/inspectionPlan
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/inspectionPlan")
|
||||
public class InspectionPlanController extends BaseController {
|
||||
|
||||
private final IInspectionPlanService inspectionPlanService;
|
||||
|
||||
/**
|
||||
* 查询巡检计划列表
|
||||
*/
|
||||
@SaCheckPermission("property:inspectionPlan:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<InspectionPlanVo> list(InspectionPlanBo bo, PageQuery pageQuery) {
|
||||
return inspectionPlanService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出巡检计划列表
|
||||
*/
|
||||
@SaCheckPermission("property:inspectionPlan:export")
|
||||
@Log(title = "巡检计划", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(InspectionPlanBo bo, HttpServletResponse response) {
|
||||
List<InspectionPlanVo> list = inspectionPlanService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "巡检计划", InspectionPlanVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取巡检计划详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:inspectionPlan:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<InspectionPlanVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(inspectionPlanService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检计划
|
||||
*/
|
||||
@SaCheckPermission("property:inspectionPlan:add")
|
||||
@Log(title = "巡检计划", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody InspectionPlanBo bo) {
|
||||
return toAjax(inspectionPlanService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检计划
|
||||
*/
|
||||
@SaCheckPermission("property:inspectionPlan:edit")
|
||||
@Log(title = "巡检计划", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody InspectionPlanBo bo) {
|
||||
return toAjax(inspectionPlanService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除巡检计划
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:inspectionPlan:remove")
|
||||
@Log(title = "巡检计划", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(inspectionPlanService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.property.domain.bo.InspectionPointBo;
|
||||
import org.dromara.property.domain.vo.InspectionPointVo;
|
||||
import org.dromara.property.service.IInspectionPointService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 巡检点
|
||||
* 前端访问路由地址为:/property/point
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/point")
|
||||
public class InspectionPointController extends BaseController {
|
||||
|
||||
private final IInspectionPointService inspectionPointService;
|
||||
|
||||
/**
|
||||
* 查询巡检点列表
|
||||
*/
|
||||
@SaCheckPermission("system:point:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<InspectionPointVo> list(InspectionPointBo bo, PageQuery pageQuery) {
|
||||
return inspectionPointService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出巡检点列表
|
||||
*/
|
||||
@SaCheckPermission("system:point:export")
|
||||
@Log(title = "巡检点", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(InspectionPointBo bo, HttpServletResponse response) {
|
||||
List<InspectionPointVo> list = inspectionPointService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "巡检点", InspectionPointVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取巡检点详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("system:point:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<InspectionPointVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(inspectionPointService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检点
|
||||
*/
|
||||
@SaCheckPermission("system:point:add")
|
||||
@Log(title = "巡检点", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody InspectionPointBo bo) {
|
||||
return toAjax(inspectionPointService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检点
|
||||
*/
|
||||
@SaCheckPermission("system:point:edit")
|
||||
@Log(title = "巡检点", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody InspectionPointBo bo) {
|
||||
return toAjax(inspectionPointService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除巡检点
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:point:remove")
|
||||
@Log(title = "巡检点", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(inspectionPointService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.property.domain.bo.InspectionRouteBo;
|
||||
import org.dromara.property.domain.vo.InspectionRouteVo;
|
||||
import org.dromara.property.service.IInspectionRouteService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 巡检路线
|
||||
* 前端访问路由地址为:/property/route
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/route")
|
||||
public class InspectionRouteController extends BaseController {
|
||||
|
||||
private final IInspectionRouteService inspectionRouteService;
|
||||
|
||||
/**
|
||||
* 查询巡检路线列表
|
||||
*/
|
||||
//@SaCheckPermission("system:route:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<InspectionRouteVo> list(InspectionRouteBo bo, PageQuery pageQuery) {
|
||||
return inspectionRouteService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出巡检路线列表
|
||||
*/
|
||||
@SaCheckPermission("system:route:export")
|
||||
@Log(title = "巡检路线", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(InspectionRouteBo bo, HttpServletResponse response) {
|
||||
List<InspectionRouteVo> list = inspectionRouteService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "巡检路线", InspectionRouteVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取巡检路线详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("system:route:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<InspectionRouteVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(inspectionRouteService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检路线
|
||||
*/
|
||||
@SaCheckPermission("system:route:add")
|
||||
@Log(title = "巡检路线", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody InspectionRouteBo bo) {
|
||||
return toAjax(inspectionRouteService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检路线
|
||||
*/
|
||||
@SaCheckPermission("system:route:edit")
|
||||
@Log(title = "巡检路线", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody InspectionRouteBo bo) {
|
||||
return toAjax(inspectionRouteService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除巡检路线
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:route:remove")
|
||||
@Log(title = "巡检路线", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(inspectionRouteService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.InspectionTaskVo;
|
||||
import org.dromara.property.domain.bo.InspectionTaskBo;
|
||||
import org.dromara.property.service.IInspectionTaskService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 巡检任务
|
||||
* 前端访问路由地址为:/property/inspectionTask
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/inspectionTask")
|
||||
public class InspectionTaskController extends BaseController {
|
||||
|
||||
private final IInspectionTaskService inspectionTaskService;
|
||||
|
||||
/**
|
||||
* 查询巡检任务列表
|
||||
*/
|
||||
@SaCheckPermission("property:inspectionTask:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<InspectionTaskVo> list(InspectionTaskBo bo, PageQuery pageQuery) {
|
||||
return inspectionTaskService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出巡检任务列表
|
||||
*/
|
||||
@SaCheckPermission("property:inspectionTask:export")
|
||||
@Log(title = "巡检任务", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(InspectionTaskBo bo, HttpServletResponse response) {
|
||||
List<InspectionTaskVo> list = inspectionTaskService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "巡检任务", InspectionTaskVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取巡检任务详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:inspectionTask:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<InspectionTaskVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(inspectionTaskService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检任务
|
||||
*/
|
||||
@SaCheckPermission("property:inspectionTask:add")
|
||||
@Log(title = "巡检任务", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody InspectionTaskBo bo) {
|
||||
return toAjax(inspectionTaskService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检任务
|
||||
*/
|
||||
@SaCheckPermission("property:inspectionTask:edit")
|
||||
@Log(title = "巡检任务", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody InspectionTaskBo bo) {
|
||||
return toAjax(inspectionTaskService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除巡检任务
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:inspectionTask:remove")
|
||||
@Log(title = "巡检任务", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(inspectionTaskService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 巡检项目对象 inspection_item
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("inspection_item")
|
||||
public class InspectionItem extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 巡检计划对象 inspection_plan
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("inspection_plan")
|
||||
public class InspectionPlan extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检计划名称
|
||||
*/
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 巡检路线id
|
||||
*/
|
||||
private Long inspectionRouteId;
|
||||
|
||||
/**
|
||||
* 巡检周期
|
||||
*/
|
||||
private String inspectionPlanPeriod;
|
||||
/**
|
||||
* 任务提前分组
|
||||
*/
|
||||
private Integer beforeTime;
|
||||
|
||||
/**
|
||||
* 巡检月
|
||||
*/
|
||||
private String inspectionMonth;
|
||||
/**
|
||||
* 巡检日
|
||||
*/
|
||||
private String inspectionDay;
|
||||
/**
|
||||
* 巡检周
|
||||
*/
|
||||
private String inspectionWorkday;
|
||||
|
||||
/**
|
||||
* 开始日期
|
||||
*/
|
||||
private Date startDate;
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
private Date endDate;
|
||||
|
||||
/**
|
||||
* 签到方式(0现场拍照(默认定位),1现场定位)
|
||||
*/
|
||||
private String signType;
|
||||
|
||||
/**
|
||||
* 允许补检(0允许1不允许)
|
||||
*/
|
||||
private String canReexamine;
|
||||
|
||||
/**
|
||||
* 选择员工
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 状态(0启用1停用)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 巡检点对象 inspection_point
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("inspection_point")
|
||||
public class InspectionPoint extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检项目id
|
||||
*/
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* 巡检点名称
|
||||
*/
|
||||
private String pointName;
|
||||
|
||||
/**
|
||||
* 巡检点类型
|
||||
*/
|
||||
private String pointType;
|
||||
|
||||
/**
|
||||
* nfc编码
|
||||
*/
|
||||
private String nfcCode;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 巡检路线对象 inspection_route
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("inspection_route")
|
||||
public class InspectionRoute extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 路线名称
|
||||
*/
|
||||
private String routeName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 巡检任务对象 inspection_task
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("inspection_task")
|
||||
public class InspectionTask extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检计划id
|
||||
*/
|
||||
private Long inspectionPlanId;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
*/
|
||||
private Date actInsTime;
|
||||
|
||||
/**
|
||||
* 当前巡检人
|
||||
*/
|
||||
private Long actUserId;
|
||||
|
||||
/**
|
||||
* 巡检方式
|
||||
*/
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 转移描述
|
||||
*/
|
||||
private String transferDesc;
|
||||
|
||||
/**
|
||||
* 巡检状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@ -62,20 +62,5 @@ public class MeetAttach extends TenantEntity {
|
||||
*/
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@ -42,20 +42,5 @@ public class MeetAttachOrder extends TenantEntity {
|
||||
*/
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@ -105,20 +105,4 @@ public class MeetBooking extends TenantEntity {
|
||||
*/
|
||||
private String descs;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,40 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.dromara.property.domain.InspectionItem;
|
||||
|
||||
/**
|
||||
* 巡检项目业务对象 inspection_item
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = InspectionItem.class, reverseConvertGenerate = false)
|
||||
public class InspectionItemBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@NotBlank(message = "项目名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.InspectionPlan;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 巡检计划业务对象 inspection_plan
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = InspectionPlan.class, reverseConvertGenerate = false)
|
||||
public class InspectionPlanBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检计划名称
|
||||
*/
|
||||
@NotBlank(message = "巡检计划名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 巡检路线id
|
||||
*/
|
||||
@NotNull(message = "巡检路线id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long inspectionRouteId;
|
||||
|
||||
/**
|
||||
* 巡检周期
|
||||
*/
|
||||
@NotBlank(message = "巡检周期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String inspectionPlanPeriod;
|
||||
|
||||
/**
|
||||
* 任务提前分组
|
||||
*/
|
||||
@NotNull(message = "任务提前分组不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer beforeTime;
|
||||
|
||||
/**
|
||||
* 开始日期
|
||||
*/
|
||||
@NotNull(message = "开始日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date startDate;
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
@NotNull(message = "结束日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date endDate;
|
||||
|
||||
/**
|
||||
* 签到方式(0现场拍照(默认定位),1现场定位)
|
||||
*/
|
||||
@NotBlank(message = "签到方式(0现场拍照(默认定位),1现场定位)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String signType;
|
||||
|
||||
/**
|
||||
* 允许补检(0允许1不允许)
|
||||
*/
|
||||
@NotBlank(message = "允许补检(0允许1不允许)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String canReexamine;
|
||||
|
||||
/**
|
||||
* 巡检月
|
||||
*/
|
||||
private String inspectionMonth;
|
||||
/**
|
||||
* 巡检日
|
||||
*/
|
||||
private String inspectionDay;
|
||||
/**
|
||||
* 巡检周
|
||||
*/
|
||||
private String inspectionWorkday;
|
||||
|
||||
/**
|
||||
* 选择员工
|
||||
*/
|
||||
@NotNull(message = "选择员工不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 状态(0启用1停用)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.dromara.property.domain.InspectionPoint;
|
||||
|
||||
/**
|
||||
* 巡检点业务对象 inspection_point
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = InspectionPoint.class, reverseConvertGenerate = false)
|
||||
public class InspectionPointBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检项目id
|
||||
*/
|
||||
@NotNull(message = "巡检项目id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* 巡检点名称
|
||||
*/
|
||||
@NotBlank(message = "巡检点名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String pointName;
|
||||
|
||||
/**
|
||||
* 巡检点类型
|
||||
*/
|
||||
@NotBlank(message = "巡检点类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String pointType;
|
||||
|
||||
/**
|
||||
* nfc编码
|
||||
*/
|
||||
private String nfcCode;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import org.dromara.property.domain.InspectionRoute;
|
||||
|
||||
/**
|
||||
* 巡检路线业务对象 inspection_route
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = InspectionRoute.class, reverseConvertGenerate = false)
|
||||
public class InspectionRouteBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 路线名称
|
||||
*/
|
||||
@NotBlank(message = "路线名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String routeName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@NotNull(message = "排序不能为空", groups = { EditGroup.class })
|
||||
private Integer sort;
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.InspectionTask;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 巡检任务业务对象 inspection_task
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = InspectionTask.class, reverseConvertGenerate = false)
|
||||
public class InspectionTaskBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检计划id
|
||||
*/
|
||||
private Long inspectionPlanId;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
*/
|
||||
private Date actInsTime;
|
||||
|
||||
/**
|
||||
* 当前巡检人
|
||||
*/
|
||||
private Long actUserId;
|
||||
|
||||
/**
|
||||
* 巡检方式
|
||||
*/
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 转移描述
|
||||
*/
|
||||
private String transferDesc;
|
||||
|
||||
/**
|
||||
* 巡检状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
@ -34,20 +34,5 @@ public class MeetAttachOrderBo extends BaseEntity {
|
||||
*/
|
||||
private Integer quantity;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createById;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updateById;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,60 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.property.domain.InspectionItem;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 巡检项目视图对象 inspection_item
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = InspectionItem.class)
|
||||
public class InspectionItemVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@ExcelProperty(value = "项目名称")
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import org.dromara.property.domain.InspectionPlan;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author:yuyongle
|
||||
* @Date:2025/7/11 17:10
|
||||
* @Description:
|
||||
**/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = InspectionPlan.class)
|
||||
public class InspectionPlanDetailVo implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检计划名称
|
||||
*/
|
||||
@ExcelProperty(value = "巡检计划名称")
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 巡检路线id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检路线id")
|
||||
private Long inspectionRouteId;
|
||||
|
||||
/**
|
||||
* 巡检周期
|
||||
*/
|
||||
@ExcelProperty(value = "巡检周期")
|
||||
private String inspectionPlanPeriod;
|
||||
|
||||
/**
|
||||
* 任务提前分组
|
||||
*/
|
||||
@ExcelProperty(value = "任务提前分组")
|
||||
private Integer beforeTime;
|
||||
|
||||
/**
|
||||
* 开始日期
|
||||
*/
|
||||
@ExcelProperty(value = "开始日期")
|
||||
private Date startDate;
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
@ExcelProperty(value = "结束日期")
|
||||
private Date endDate;
|
||||
|
||||
/**
|
||||
* 签到方式(0现场拍照(默认定位),1现场定位)
|
||||
*/
|
||||
@ExcelProperty(value = "签到方式(0现场拍照", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认定位")
|
||||
private String signType;
|
||||
|
||||
/**
|
||||
* 允许补检(0允许1不允许)
|
||||
*/
|
||||
@ExcelProperty(value = "允许补检(0允许1不允许)")
|
||||
private String canReexamine;
|
||||
|
||||
/**
|
||||
* 选择员工
|
||||
*/
|
||||
@ExcelProperty(value = "选择员工")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
/**
|
||||
* 巡检月
|
||||
*/
|
||||
private String inspectionMonth;
|
||||
/**
|
||||
* 巡检日
|
||||
*/
|
||||
private String inspectionDay;
|
||||
/**
|
||||
* 巡检周
|
||||
*/
|
||||
private String inspectionWorkday;
|
||||
/**
|
||||
* 状态(0启用1停用)
|
||||
*/
|
||||
private String state;
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.property.domain.InspectionPlan;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 巡检计划视图对象 inspection_plan
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = InspectionPlan.class)
|
||||
public class InspectionPlanVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检计划名称
|
||||
*/
|
||||
@ExcelProperty(value = "巡检计划名称")
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 巡检路线id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检路线id")
|
||||
private Long inspectionRouteId;
|
||||
|
||||
/**
|
||||
* 巡检周期
|
||||
*/
|
||||
@ExcelProperty(value = "巡检周期")
|
||||
private String inspectionPlanPeriod;
|
||||
|
||||
/**
|
||||
* 任务提前分组
|
||||
*/
|
||||
@ExcelProperty(value = "任务提前分组")
|
||||
private Integer beforeTime;
|
||||
|
||||
/**
|
||||
* 开始日期
|
||||
*/
|
||||
@ExcelProperty(value = "开始日期")
|
||||
private Date startDate;
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
@ExcelProperty(value = "结束日期")
|
||||
private Date endDate;
|
||||
|
||||
/**
|
||||
* 签到方式(0现场拍照(默认定位),1现场定位)
|
||||
*/
|
||||
@ExcelProperty(value = "签到方式(0现场拍照", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "默=认定位")
|
||||
private String signType;
|
||||
|
||||
/**
|
||||
* 允许补检(0允许1不允许)
|
||||
*/
|
||||
@ExcelProperty(value = "允许补检(0允许1不允许)")
|
||||
private String canReexamine;
|
||||
|
||||
/**
|
||||
* 选择员工
|
||||
*/
|
||||
@ExcelProperty(value = "选择员工")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
/**
|
||||
* 巡检月
|
||||
*/
|
||||
private String inspectionMonth;
|
||||
/**
|
||||
* 巡检日
|
||||
*/
|
||||
private String inspectionDay;
|
||||
/**
|
||||
* 巡检周
|
||||
*/
|
||||
private String inspectionWorkday;
|
||||
/**
|
||||
* 状态(0启用1停用)
|
||||
*/
|
||||
private String state;
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.property.domain.InspectionPoint;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 巡检点视图对象 inspection_point
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = InspectionPoint.class)
|
||||
public class InspectionPointVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检项目id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检项目id")
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* 巡检项目id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检项目id")
|
||||
private Long itemName;
|
||||
|
||||
/**
|
||||
* 巡检点名称
|
||||
*/
|
||||
@ExcelProperty(value = "巡检点名称")
|
||||
private String pointName;
|
||||
|
||||
/**
|
||||
* 巡检点类型
|
||||
*/
|
||||
@ExcelProperty(value = "巡检点类型")
|
||||
private String pointType;
|
||||
|
||||
/**
|
||||
* nfc编码
|
||||
*/
|
||||
@ExcelProperty(value = "nfc编码")
|
||||
private String nfcCode;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import org.dromara.property.domain.InspectionRoute;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 巡检路线视图对象 inspection_route
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = InspectionRoute.class)
|
||||
public class InspectionRouteVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 路线名称
|
||||
*/
|
||||
@ExcelProperty(value = "路线名称")
|
||||
private String routeName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ExcelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.property.domain.InspectionTask;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 巡检任务视图对象 inspection_task
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = InspectionTask.class)
|
||||
public class InspectionTaskVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 巡检计划id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检计划id")
|
||||
private Long inspectionPlanId;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
*/
|
||||
@ExcelProperty(value = "实际巡检时间")
|
||||
private Date actInsTime;
|
||||
|
||||
/**
|
||||
* 当前巡检人
|
||||
*/
|
||||
@ExcelProperty(value = "当前巡检人")
|
||||
private Long actUserId;
|
||||
|
||||
/**
|
||||
* 巡检方式
|
||||
*/
|
||||
@ExcelProperty(value = "巡检方式")
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 转移描述
|
||||
*/
|
||||
@ExcelProperty(value = "转移描述")
|
||||
private String transferDesc;
|
||||
|
||||
/**
|
||||
* 巡检状态
|
||||
*/
|
||||
@ExcelProperty(value = "巡检状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.property.domain.InspectionItem;
|
||||
import org.dromara.property.domain.vo.InspectionItemVo;
|
||||
|
||||
/**
|
||||
* 巡检项目Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Mapper
|
||||
public interface InspectionItemMapper extends BaseMapperPlus<InspectionItem, InspectionItemVo> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.property.domain.InspectionPlan;
|
||||
import org.dromara.property.domain.vo.InspectionPlanVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 巡检计划Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Mapper
|
||||
public interface InspectionPlanMapper extends BaseMapperPlus<InspectionPlan, InspectionPlanVo> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.property.domain.InspectionPoint;
|
||||
import org.dromara.property.domain.vo.InspectionPointVo;
|
||||
|
||||
/**
|
||||
* 巡检点Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Mapper
|
||||
public interface InspectionPointMapper extends BaseMapperPlus<InspectionPoint, InspectionPointVo> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.property.domain.InspectionRoute;
|
||||
import org.dromara.property.domain.vo.InspectionRouteVo;
|
||||
|
||||
/**
|
||||
* 巡检路线Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Mapper
|
||||
public interface InspectionRouteMapper extends BaseMapperPlus<InspectionRoute, InspectionRouteVo> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.InspectionTask;
|
||||
import org.dromara.property.domain.vo.InspectionTaskVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 巡检任务Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface InspectionTaskMapper extends BaseMapperPlus<InspectionTask, InspectionTaskVo> {
|
||||
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.property.domain.bo.InspectionItemBo;
|
||||
import org.dromara.property.domain.vo.InspectionItemVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 巡检项目Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface IInspectionItemService {
|
||||
|
||||
/**
|
||||
* 查询巡检项目
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 巡检项目
|
||||
*/
|
||||
InspectionItemVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询巡检项目列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 巡检项目分页列表
|
||||
*/
|
||||
TableDataInfo<InspectionItemVo> queryPageList(InspectionItemBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的巡检项目列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 巡检项目列表
|
||||
*/
|
||||
List<InspectionItemVo> queryList(InspectionItemBo bo);
|
||||
|
||||
/**
|
||||
* 新增巡检项目
|
||||
*
|
||||
* @param bo 巡检项目
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(InspectionItemBo bo);
|
||||
|
||||
/**
|
||||
* 修改巡检项目
|
||||
*
|
||||
* @param bo 巡检项目
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(InspectionItemBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除巡检项目信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.InspectionPlan;
|
||||
import org.dromara.property.domain.vo.InspectionPlanVo;
|
||||
import org.dromara.property.domain.bo.InspectionPlanBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 巡检计划Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface IInspectionPlanService {
|
||||
|
||||
/**
|
||||
* 查询巡检计划
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 巡检计划
|
||||
*/
|
||||
InspectionPlanVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询巡检计划列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 巡检计划分页列表
|
||||
*/
|
||||
TableDataInfo<InspectionPlanVo> queryPageList(InspectionPlanBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的巡检计划列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 巡检计划列表
|
||||
*/
|
||||
List<InspectionPlanVo> queryList(InspectionPlanBo bo);
|
||||
|
||||
/**
|
||||
* 新增巡检计划
|
||||
*
|
||||
* @param bo 巡检计划
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(InspectionPlanBo bo);
|
||||
|
||||
/**
|
||||
* 修改巡检计划
|
||||
*
|
||||
* @param bo 巡检计划
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(InspectionPlanBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除巡检计划信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package org.dromara.property.service;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.property.domain.bo.InspectionPointBo;
|
||||
import org.dromara.property.domain.vo.InspectionPointVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 巡检点Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface IInspectionPointService {
|
||||
|
||||
/**
|
||||
* 查询巡检点
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 巡检点
|
||||
*/
|
||||
InspectionPointVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询巡检点列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 巡检点分页列表
|
||||
*/
|
||||
TableDataInfo<InspectionPointVo> queryPageList(InspectionPointBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的巡检点列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 巡检点列表
|
||||
*/
|
||||
List<InspectionPointVo> queryList(InspectionPointBo bo);
|
||||
|
||||
/**
|
||||
* 新增巡检点
|
||||
*
|
||||
* @param bo 巡检点
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(InspectionPointBo bo);
|
||||
|
||||
/**
|
||||
* 修改巡检点
|
||||
*
|
||||
* @param bo 巡检点
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(InspectionPointBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除巡检点信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.property.domain.bo.InspectionRouteBo;
|
||||
import org.dromara.property.domain.vo.InspectionRouteVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 巡检路线Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface IInspectionRouteService {
|
||||
|
||||
/**
|
||||
* 查询巡检路线
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 巡检路线
|
||||
*/
|
||||
InspectionRouteVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询巡检路线列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 巡检路线分页列表
|
||||
*/
|
||||
TableDataInfo<InspectionRouteVo> queryPageList(InspectionRouteBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的巡检路线列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 巡检路线列表
|
||||
*/
|
||||
List<InspectionRouteVo> queryList(InspectionRouteBo bo);
|
||||
|
||||
/**
|
||||
* 新增巡检路线
|
||||
*
|
||||
* @param bo 巡检路线
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(InspectionRouteBo bo);
|
||||
|
||||
/**
|
||||
* 修改巡检路线
|
||||
*
|
||||
* @param bo 巡检路线
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(InspectionRouteBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除巡检路线信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.vo.InspectionTaskVo;
|
||||
import org.dromara.property.domain.bo.InspectionTaskBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 巡检任务Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
public interface IInspectionTaskService {
|
||||
|
||||
/**
|
||||
* 查询巡检任务
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 巡检任务
|
||||
*/
|
||||
InspectionTaskVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询巡检任务列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 巡检任务分页列表
|
||||
*/
|
||||
TableDataInfo<InspectionTaskVo> queryPageList(InspectionTaskBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的巡检任务列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 巡检任务列表
|
||||
*/
|
||||
List<InspectionTaskVo> queryList(InspectionTaskBo bo);
|
||||
|
||||
/**
|
||||
* 新增巡检任务
|
||||
*
|
||||
* @param bo 巡检任务
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(InspectionTaskBo bo);
|
||||
|
||||
/**
|
||||
* 修改巡检任务
|
||||
*
|
||||
* @param bo 巡检任务
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(InspectionTaskBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除巡检任务信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@ -0,0 +1,133 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.domain.InspectionItem;
|
||||
import org.dromara.property.domain.bo.InspectionItemBo;
|
||||
import org.dromara.property.domain.vo.InspectionItemVo;
|
||||
import org.dromara.property.mapper.InspectionItemMapper;
|
||||
import org.dromara.property.service.IInspectionItemService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 巡检项目Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class InspectionItemServiceImpl implements IInspectionItemService {
|
||||
|
||||
private final InspectionItemMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询巡检项目
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 巡检项目
|
||||
*/
|
||||
@Override
|
||||
public InspectionItemVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询巡检项目列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 巡检项目分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<InspectionItemVo> queryPageList(InspectionItemBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<InspectionItem> lqw = buildQueryWrapper(bo);
|
||||
Page<InspectionItemVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的巡检项目列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 巡检项目列表
|
||||
*/
|
||||
@Override
|
||||
public List<InspectionItemVo> queryList(InspectionItemBo bo) {
|
||||
LambdaQueryWrapper<InspectionItem> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<InspectionItem> buildQueryWrapper(InspectionItemBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<InspectionItem> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(InspectionItem::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getItemName()), InspectionItem::getItemName, bo.getItemName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), InspectionItem::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检项目
|
||||
*
|
||||
* @param bo 巡检项目
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(InspectionItemBo bo) {
|
||||
InspectionItem add = MapstructUtils.convert(bo, InspectionItem.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检项目
|
||||
*
|
||||
* @param bo 巡检项目
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(InspectionItemBo bo) {
|
||||
InspectionItem update = MapstructUtils.convert(bo, InspectionItem.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(InspectionItem entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除巡检项目信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,142 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.mapper.InspectionPlanMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.InspectionPlanBo;
|
||||
import org.dromara.property.domain.vo.InspectionPlanVo;
|
||||
import org.dromara.property.domain.InspectionPlan;
|
||||
import org.dromara.property.service.IInspectionPlanService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 巡检计划Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
|
||||
private final InspectionPlanMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询巡检计划
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 巡检计划
|
||||
*/
|
||||
@Override
|
||||
public InspectionPlanVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询巡检计划列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 巡检计划分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<InspectionPlanVo> queryPageList(InspectionPlanBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<InspectionPlan> lqw = buildQueryWrapper(bo);
|
||||
Page<InspectionPlanVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的巡检计划列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 巡检计划列表
|
||||
*/
|
||||
@Override
|
||||
public List<InspectionPlanVo> queryList(InspectionPlanBo bo) {
|
||||
LambdaQueryWrapper<InspectionPlan> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<InspectionPlan> buildQueryWrapper(InspectionPlanBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<InspectionPlan> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(InspectionPlan::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getPlanName()), InspectionPlan::getPlanName, bo.getPlanName());
|
||||
lqw.eq(bo.getInspectionRouteId() != null, InspectionPlan::getInspectionRouteId, bo.getInspectionRouteId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getInspectionPlanPeriod()), InspectionPlan::getInspectionPlanPeriod, bo.getInspectionPlanPeriod());
|
||||
lqw.eq(bo.getStartDate() != null, InspectionPlan::getStartDate, bo.getStartDate());
|
||||
lqw.eq(bo.getEndDate() != null, InspectionPlan::getEndDate, bo.getEndDate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSignType()), InspectionPlan::getSignType, bo.getSignType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getCanReexamine()), InspectionPlan::getCanReexamine, bo.getCanReexamine());
|
||||
lqw.eq(bo.getUserId() != null, InspectionPlan::getUserId, bo.getUserId());
|
||||
lqw.eq(bo.getUserId() != null, InspectionPlan::getUserId, bo.getUserId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getState()), InspectionPlan::getState, bo.getState());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), InspectionPlan::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检计划
|
||||
*
|
||||
* @param bo 巡检计划
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(InspectionPlanBo bo) {
|
||||
InspectionPlan add = MapstructUtils.convert(bo, InspectionPlan.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检计划
|
||||
*
|
||||
* @param bo 巡检计划
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(InspectionPlanBo bo) {
|
||||
InspectionPlan update = MapstructUtils.convert(bo, InspectionPlan.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(InspectionPlan entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除巡检计划信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,151 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.domain.InspectionPoint;
|
||||
import org.dromara.property.domain.bo.InspectionPointBo;
|
||||
import org.dromara.property.domain.vo.InspectionPlanVo;
|
||||
import org.dromara.property.domain.vo.InspectionPointVo;
|
||||
import org.dromara.property.mapper.InspectionPlanMapper;
|
||||
import org.dromara.property.mapper.InspectionPointMapper;
|
||||
import org.dromara.property.service.IInspectionPointService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 巡检点Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class InspectionPointServiceImpl implements IInspectionPointService {
|
||||
|
||||
private final InspectionPointMapper baseMapper;
|
||||
private final InspectionPlanMapper inspectionPlanMapper;
|
||||
|
||||
/**
|
||||
* 查询巡检点
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 巡检点
|
||||
*/
|
||||
@Override
|
||||
public InspectionPointVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询巡检点列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 巡检点分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<InspectionPointVo> queryPageList(InspectionPointBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<InspectionPoint> lqw = buildQueryWrapper(bo);
|
||||
Page<InspectionPointVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
if (CollectionUtil.isEmpty(result.getRecords())) {
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
List<Long> itemIdList = result.getRecords().stream()
|
||||
.map(vo -> vo.getItemId())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<InspectionPlanVo> inspectionPlanVos = inspectionPlanMapper.selectVoByIds(itemIdList);
|
||||
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的巡检点列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 巡检点列表
|
||||
*/
|
||||
@Override
|
||||
public List<InspectionPointVo> queryList(InspectionPointBo bo) {
|
||||
LambdaQueryWrapper<InspectionPoint> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<InspectionPoint> buildQueryWrapper(InspectionPointBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<InspectionPoint> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(InspectionPoint::getId);
|
||||
lqw.eq(bo.getItemId() != null, InspectionPoint::getItemId, bo.getItemId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getPointName()), InspectionPoint::getPointName, bo.getPointName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPointType()), InspectionPoint::getPointType, bo.getPointType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getNfcCode()), InspectionPoint::getNfcCode, bo.getNfcCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), InspectionPoint::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检点
|
||||
*
|
||||
* @param bo 巡检点
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(InspectionPointBo bo) {
|
||||
InspectionPoint add = MapstructUtils.convert(bo, InspectionPoint.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检点
|
||||
*
|
||||
* @param bo 巡检点
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(InspectionPointBo bo) {
|
||||
InspectionPoint update = MapstructUtils.convert(bo, InspectionPoint.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(InspectionPoint entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除巡检点信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,133 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.property.domain.InspectionRoute;
|
||||
import org.dromara.property.domain.bo.InspectionRouteBo;
|
||||
import org.dromara.property.domain.vo.InspectionRouteVo;
|
||||
import org.dromara.property.mapper.InspectionRouteMapper;
|
||||
import org.dromara.property.service.IInspectionRouteService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 巡检路线Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class InspectionRouteServiceImpl implements IInspectionRouteService {
|
||||
|
||||
private final InspectionRouteMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询巡检路线
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 巡检路线
|
||||
*/
|
||||
@Override
|
||||
public InspectionRouteVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询巡检路线列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 巡检路线分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<InspectionRouteVo> queryPageList(InspectionRouteBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<InspectionRoute> lqw = buildQueryWrapper(bo);
|
||||
Page<InspectionRouteVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的巡检路线列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 巡检路线列表
|
||||
*/
|
||||
@Override
|
||||
public List<InspectionRouteVo> queryList(InspectionRouteBo bo) {
|
||||
LambdaQueryWrapper<InspectionRoute> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<InspectionRoute> buildQueryWrapper(InspectionRouteBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<InspectionRoute> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(InspectionRoute::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getRouteName()), InspectionRoute::getRouteName, bo.getRouteName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), InspectionRoute::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检路线
|
||||
*
|
||||
* @param bo 巡检路线
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(InspectionRouteBo bo) {
|
||||
InspectionRoute add = MapstructUtils.convert(bo, InspectionRoute.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检路线
|
||||
*
|
||||
* @param bo 巡检路线
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(InspectionRouteBo bo) {
|
||||
InspectionRoute update = MapstructUtils.convert(bo, InspectionRoute.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(InspectionRoute entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除巡检路线信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,138 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.InspectionTaskBo;
|
||||
import org.dromara.property.domain.vo.InspectionTaskVo;
|
||||
import org.dromara.property.domain.InspectionTask;
|
||||
import org.dromara.property.mapper.InspectionTaskMapper;
|
||||
import org.dromara.property.service.IInspectionTaskService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 巡检任务Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class InspectionTaskServiceImpl implements IInspectionTaskService {
|
||||
|
||||
private final InspectionTaskMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询巡检任务
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 巡检任务
|
||||
*/
|
||||
@Override
|
||||
public InspectionTaskVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询巡检任务列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 巡检任务分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<InspectionTaskVo> queryPageList(InspectionTaskBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<InspectionTask> lqw = buildQueryWrapper(bo);
|
||||
Page<InspectionTaskVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的巡检任务列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 巡检任务列表
|
||||
*/
|
||||
@Override
|
||||
public List<InspectionTaskVo> queryList(InspectionTaskBo bo) {
|
||||
LambdaQueryWrapper<InspectionTask> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<InspectionTask> buildQueryWrapper(InspectionTaskBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<InspectionTask> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(InspectionTask::getId);
|
||||
lqw.eq(bo.getInspectionPlanId() != null, InspectionTask::getInspectionPlanId, bo.getInspectionPlanId());
|
||||
lqw.eq(bo.getActInsTime() != null, InspectionTask::getActInsTime, bo.getActInsTime());
|
||||
lqw.eq(bo.getActUserId() != null, InspectionTask::getActUserId, bo.getActUserId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTaskType()), InspectionTask::getTaskType, bo.getTaskType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTransferDesc()), InspectionTask::getTransferDesc, bo.getTransferDesc());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), InspectionTask::getStatus, bo.getStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), InspectionTask::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检任务
|
||||
*
|
||||
* @param bo 巡检任务
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(InspectionTaskBo bo) {
|
||||
InspectionTask add = MapstructUtils.convert(bo, InspectionTask.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检任务
|
||||
*
|
||||
* @param bo 巡检任务
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(InspectionTaskBo bo) {
|
||||
InspectionTask update = MapstructUtils.convert(bo, InspectionTask.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(InspectionTask entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除巡检任务信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package org.dromara.property.tasks;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.property.domain.InspectionPlan;
|
||||
import org.dromara.property.domain.bo.InspectionPlanBo;
|
||||
import org.dromara.property.domain.vo.InspectionPlanVo;
|
||||
import org.dromara.property.service.IInspectionPlanService;
|
||||
import org.dromara.property.service.IInspectionTaskService;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:yuyongle
|
||||
* @Date:2025/7/11 15:28
|
||||
* @Description:
|
||||
**/
|
||||
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class InspectionTasks {
|
||||
|
||||
private final IInspectionPlanService inspectionPlanService;
|
||||
private final IInspectionTaskService initiatingTaskService;
|
||||
|
||||
// 通过巡检计划定时生成巡检任务
|
||||
@Scheduled(cron = "0 0 2 * * ?")
|
||||
public void doInspectionPianTask() {
|
||||
//查询所有计划
|
||||
InspectionPlanBo inspectionPlanBo = new InspectionPlanBo();
|
||||
inspectionPlanBo.setState(String.valueOf(0));
|
||||
List<InspectionPlanVo> inspectionPlanVoList = inspectionPlanService.queryList(inspectionPlanBo);
|
||||
if (ObjectUtil.isEmpty(inspectionPlanVoList)) {
|
||||
return;
|
||||
}
|
||||
List<InspectionTasks> inspectionTasksList = new ArrayList<>();
|
||||
inspectionPlanVoList.stream().forEach(s -> {
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.property.mapper.InspectionTaskMapper">
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user