Merge branch 'master' of http://47.109.37.87:3000/by2025/SmartParks
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
@@ -20,5 +20,11 @@ public interface RemoteFloorService {
|
||||
*/
|
||||
List<TreeNode<Long>> queryTreeList();
|
||||
|
||||
|
||||
/**
|
||||
* 根据单元ID查询楼层
|
||||
*
|
||||
* @param unitId 单元ID
|
||||
* @return 楼层
|
||||
*/
|
||||
List<RemoteFloorVo> queryByUnitId(Long unitId);
|
||||
}
|
||||
|
@@ -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.InspectionTaskDetailBo;
|
||||
import org.dromara.property.domain.vo.InspectionTaskDetailVo;
|
||||
import org.dromara.property.service.IInspectionTaskDetailService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 巡检明细
|
||||
* 前端访问路由地址为:/system/taskDetail
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/taskDetail")
|
||||
public class InspectionTaskDetailController extends BaseController {
|
||||
|
||||
private final IInspectionTaskDetailService inspectionTaskDetailService;
|
||||
|
||||
/**
|
||||
* 查询巡检明细列表
|
||||
*/
|
||||
@SaCheckPermission("system:taskDetail:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<InspectionTaskDetailVo> list(InspectionTaskDetailBo bo, PageQuery pageQuery) {
|
||||
return inspectionTaskDetailService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出巡检明细列表
|
||||
*/
|
||||
@SaCheckPermission("system:taskDetail:export")
|
||||
@Log(title = "巡检明细", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(InspectionTaskDetailBo bo, HttpServletResponse response) {
|
||||
List<InspectionTaskDetailVo> list = inspectionTaskDetailService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "巡检明细", InspectionTaskDetailVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取巡检明细详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("system:taskDetail:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<InspectionTaskDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(inspectionTaskDetailService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检明细
|
||||
*/
|
||||
@SaCheckPermission("system:taskDetail:add")
|
||||
@Log(title = "巡检明细", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody InspectionTaskDetailBo bo) {
|
||||
return toAjax(inspectionTaskDetailService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检明细
|
||||
*/
|
||||
@SaCheckPermission("system:taskDetail:edit")
|
||||
@Log(title = "巡检明细", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody InspectionTaskDetailBo bo) {
|
||||
return toAjax(inspectionTaskDetailService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除巡检明细
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:taskDetail:remove")
|
||||
@Log(title = "巡检明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(inspectionTaskDetailService.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.MachineVo;
|
||||
import org.dromara.property.domain.bo.MachineBo;
|
||||
import org.dromara.property.service.IMachineService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备列表
|
||||
* 前端访问路由地址为:/property/machine
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/machine")
|
||||
public class MachineController extends BaseController {
|
||||
|
||||
private final IMachineService machineService;
|
||||
|
||||
/**
|
||||
* 查询设备列表列表
|
||||
*/
|
||||
@SaCheckPermission("property:machine:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MachineVo> list(MachineBo bo, PageQuery pageQuery) {
|
||||
return machineService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备列表列表
|
||||
*/
|
||||
@SaCheckPermission("property:machine:export")
|
||||
@Log(title = "设备列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(MachineBo bo, HttpServletResponse response) {
|
||||
List<MachineVo> list = machineService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设备列表", MachineVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备列表详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:machine:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<MachineVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(machineService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备列表
|
||||
*/
|
||||
@SaCheckPermission("property:machine:add")
|
||||
@Log(title = "设备列表", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MachineBo bo) {
|
||||
return toAjax(machineService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备列表
|
||||
*/
|
||||
@SaCheckPermission("property:machine:edit")
|
||||
@Log(title = "设备列表", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MachineBo bo) {
|
||||
return toAjax(machineService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备列表
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:machine:remove")
|
||||
@Log(title = "设备列表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(machineService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.property.domain.bo.MachineLocationBo;
|
||||
import org.dromara.property.domain.vo.MachineLocationDetailVo;
|
||||
import org.dromara.property.domain.vo.MachineLocationVo;
|
||||
import org.dromara.property.service.IMachineLocationService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备位置
|
||||
* 前端访问路由地址为:/property/deviceLocation
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/deviceLocation")
|
||||
public class MachineLocationController extends BaseController {
|
||||
|
||||
private final IMachineLocationService machineLocationService;
|
||||
|
||||
/**
|
||||
* 查询设备位置列表
|
||||
*/
|
||||
@SaCheckPermission("property:deviceLocation:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MachineLocationVo> list(MachineLocationBo bo, PageQuery pageQuery) {
|
||||
return machineLocationService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
///**
|
||||
// * 导出设备位置列表
|
||||
// */
|
||||
//@SaCheckPermission("property:deviceLocation:export")
|
||||
//@Log(title = "设备位置", businessType = BusinessType.EXPORT)
|
||||
//@PostMapping("/export")
|
||||
//public void export(MachineLocationBo bo, HttpServletResponse response) {
|
||||
// List<MachineLocationVo> list = machineLocationService.queryList(bo);
|
||||
// ExcelUtil.exportExcel(list, "设备位置", MachineLocationVo.class, response);
|
||||
//}
|
||||
|
||||
/**
|
||||
* 获取设备位置详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:deviceLocation:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<MachineLocationDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(machineLocationService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备位置
|
||||
*/
|
||||
@SaCheckPermission("property:deviceLocation:add")
|
||||
@Log(title = "设备位置", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MachineLocationBo bo) {
|
||||
return toAjax(machineLocationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备位置
|
||||
*/
|
||||
@SaCheckPermission("property:deviceLocation:edit")
|
||||
@Log(title = "设备位置", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MachineLocationBo bo) {
|
||||
return toAjax(machineLocationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备位置
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:deviceLocation:remove")
|
||||
@Log(title = "设备位置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(machineLocationService.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.MachineMaintainPlanBo;
|
||||
import org.dromara.property.domain.vo.MachineMaintainPlanVo;
|
||||
import org.dromara.property.service.IMachineMaintainPlanService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 设备保养计划
|
||||
* 前端访问路由地址为:/system/maintainPlan
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/maintainPlan")
|
||||
public class MachineMaintainPlanController extends BaseController {
|
||||
|
||||
private final IMachineMaintainPlanService machineMaintainPlanService;
|
||||
|
||||
/**
|
||||
* 查询设备保养计划列表
|
||||
*/
|
||||
@SaCheckPermission("system:maintainPlan:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MachineMaintainPlanVo> list(MachineMaintainPlanBo bo, PageQuery pageQuery) {
|
||||
return machineMaintainPlanService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备保养计划列表
|
||||
*/
|
||||
@SaCheckPermission("system:maintainPlan:export")
|
||||
@Log(title = "设备保养计划", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(MachineMaintainPlanBo bo, HttpServletResponse response) {
|
||||
List<MachineMaintainPlanVo> list = machineMaintainPlanService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设备保养计划", MachineMaintainPlanVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备保养计划详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("system:maintainPlan:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<MachineMaintainPlanVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(machineMaintainPlanService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备保养计划
|
||||
*/
|
||||
@SaCheckPermission("system:maintainPlan:add")
|
||||
@Log(title = "设备保养计划", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MachineMaintainPlanBo bo) {
|
||||
return toAjax(machineMaintainPlanService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备保养计划
|
||||
*/
|
||||
@SaCheckPermission("system:maintainPlan:edit")
|
||||
@Log(title = "设备保养计划", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MachineMaintainPlanBo bo) {
|
||||
return toAjax(machineMaintainPlanService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备保养计划
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:maintainPlan:remove")
|
||||
@Log(title = "设备保养计划", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(machineMaintainPlanService.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.MachineMaintainPlanStaffVo;
|
||||
import org.dromara.property.domain.bo.MachineMaintainPlanStaffBo;
|
||||
import org.dromara.property.service.IMachineMaintainPlanStaffService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 保养计划执行人信息
|
||||
* 前端访问路由地址为:/domain/maintainPlanStaff
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/maintainPlanStaff")
|
||||
public class MachineMaintainPlanStaffController extends BaseController {
|
||||
|
||||
private final IMachineMaintainPlanStaffService machineMaintainPlanStaffService;
|
||||
|
||||
/**
|
||||
* 查询保养计划执行人信息列表
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainPlanStaff:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MachineMaintainPlanStaffVo> list(MachineMaintainPlanStaffBo bo, PageQuery pageQuery) {
|
||||
return machineMaintainPlanStaffService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出保养计划执行人信息列表
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainPlanStaff:export")
|
||||
@Log(title = "保养计划执行人信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(MachineMaintainPlanStaffBo bo, HttpServletResponse response) {
|
||||
List<MachineMaintainPlanStaffVo> list = machineMaintainPlanStaffService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "保养计划执行人信息", MachineMaintainPlanStaffVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取保养计划执行人信息详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainPlanStaff:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<MachineMaintainPlanStaffVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(machineMaintainPlanStaffService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保养计划执行人信息
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainPlanStaff:add")
|
||||
@Log(title = "保养计划执行人信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MachineMaintainPlanStaffBo bo) {
|
||||
return toAjax(machineMaintainPlanStaffService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保养计划执行人信息
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainPlanStaff:edit")
|
||||
@Log(title = "保养计划执行人信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MachineMaintainPlanStaffBo bo) {
|
||||
return toAjax(machineMaintainPlanStaffService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除保养计划执行人信息
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainPlanStaff:remove")
|
||||
@Log(title = "保养计划执行人信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(machineMaintainPlanStaffService.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.MachineMaintainTaskVo;
|
||||
import org.dromara.property.domain.bo.MachineMaintainTaskBo;
|
||||
import org.dromara.property.service.IMachineMaintainTaskService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备保养任务
|
||||
* 前端访问路由地址为:/domain/maintainTask
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/maintainTask")
|
||||
public class MachineMaintainTaskController extends BaseController {
|
||||
|
||||
private final IMachineMaintainTaskService machineMaintainTaskService;
|
||||
|
||||
/**
|
||||
* 查询设备保养任务列表
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainTask:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MachineMaintainTaskVo> list(MachineMaintainTaskBo bo, PageQuery pageQuery) {
|
||||
return machineMaintainTaskService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备保养任务列表
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainTask:export")
|
||||
@Log(title = "设备保养任务", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(MachineMaintainTaskBo bo, HttpServletResponse response) {
|
||||
List<MachineMaintainTaskVo> list = machineMaintainTaskService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设备保养任务", MachineMaintainTaskVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备保养任务详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainTask:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<MachineMaintainTaskVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(machineMaintainTaskService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备保养任务
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainTask:add")
|
||||
@Log(title = "设备保养任务", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MachineMaintainTaskBo bo) {
|
||||
return toAjax(machineMaintainTaskService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备保养任务
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainTask:edit")
|
||||
@Log(title = "设备保养任务", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MachineMaintainTaskBo bo) {
|
||||
return toAjax(machineMaintainTaskService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备保养任务
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainTask:remove")
|
||||
@Log(title = "设备保养任务", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(machineMaintainTaskService.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.MachineMaintainTaskDetailVo;
|
||||
import org.dromara.property.domain.bo.MachineMaintainTaskDetailBo;
|
||||
import org.dromara.property.service.IMachineMaintainTaskDetailService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备保养任务明细
|
||||
* 前端访问路由地址为:/domain/maintainTaskDetail
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/maintainTaskDetail")
|
||||
public class MachineMaintainTaskDetailController extends BaseController {
|
||||
|
||||
private final IMachineMaintainTaskDetailService machineMaintainTaskDetailService;
|
||||
|
||||
/**
|
||||
* 查询设备保养任务明细列表
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainTaskDetail:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MachineMaintainTaskDetailVo> list(MachineMaintainTaskDetailBo bo, PageQuery pageQuery) {
|
||||
return machineMaintainTaskDetailService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备保养任务明细列表
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainTaskDetail:export")
|
||||
@Log(title = "设备保养任务明细", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(MachineMaintainTaskDetailBo bo, HttpServletResponse response) {
|
||||
List<MachineMaintainTaskDetailVo> list = machineMaintainTaskDetailService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设备保养任务明细", MachineMaintainTaskDetailVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备保养任务明细详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainTaskDetail:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<MachineMaintainTaskDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(machineMaintainTaskDetailService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备保养任务明细
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainTaskDetail:add")
|
||||
@Log(title = "设备保养任务明细", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MachineMaintainTaskDetailBo bo) {
|
||||
return toAjax(machineMaintainTaskDetailService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备保养任务明细
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainTaskDetail:edit")
|
||||
@Log(title = "设备保养任务明细", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MachineMaintainTaskDetailBo bo) {
|
||||
return toAjax(machineMaintainTaskDetailService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备保养任务明细
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("domain:maintainTaskDetail:remove")
|
||||
@Log(title = "设备保养任务明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(machineMaintainTaskDetailService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -0,0 +1,104 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.dromara.property.domain.vo.MachineTypeTreeVo;
|
||||
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.MachineTypeVo;
|
||||
import org.dromara.property.domain.bo.MachineTypeBo;
|
||||
import org.dromara.property.service.IMachineTypeService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
* 前端访问路由地址为:/property/machineType
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/machineType")
|
||||
public class MachineTypeController extends BaseController {
|
||||
|
||||
private final IMachineTypeService machineTypeService;
|
||||
|
||||
/**
|
||||
* 查询设备类型列表
|
||||
*/
|
||||
@SaCheckPermission("property:machineType:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<MachineTypeVo> list(MachineTypeBo bo, PageQuery pageQuery) {
|
||||
return machineTypeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
/**
|
||||
* 获取设备类型树列表
|
||||
*/
|
||||
@GetMapping("/typeTree")
|
||||
public R<List<MachineTypeTreeVo>> deptTree(MachineTypeBo type) {
|
||||
return R.ok(machineTypeService.selectmachineTypeList(type));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备类型详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:machineType:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<MachineTypeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(machineTypeService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备类型
|
||||
*/
|
||||
@SaCheckPermission("property:machineType:add")
|
||||
@Log(title = "设备类型", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody MachineTypeBo bo) {
|
||||
return toAjax(machineTypeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备类型
|
||||
*/
|
||||
@SaCheckPermission("property:machineType:edit")
|
||||
@Log(title = "设备类型", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody MachineTypeBo bo) {
|
||||
return toAjax(machineTypeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备类型
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:machineType:remove")
|
||||
@Log(title = "设备类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(machineTypeService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -69,9 +69,13 @@ public class InspectionTask extends TenantEntity {
|
||||
private String planInsTime;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
* 计划巡检人id
|
||||
*/
|
||||
private String searchValue;
|
||||
private String planUserId;
|
||||
/**
|
||||
* 计划巡检人姓名
|
||||
*/
|
||||
private String planUserName;
|
||||
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,92 @@
|
||||
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 java.io.Serial;
|
||||
|
||||
/**
|
||||
* 巡检明细对象 inspection_task_detail
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("inspection_task_detail")
|
||||
public class InspectionTaskDetail extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 路线id
|
||||
*/
|
||||
private Long routeId;
|
||||
|
||||
/**
|
||||
* 巡检计划id
|
||||
*/
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 巡检点id
|
||||
*/
|
||||
private Long pointId;
|
||||
|
||||
/**
|
||||
* 巡检方式
|
||||
*/
|
||||
private String patrolType;
|
||||
|
||||
/**
|
||||
* 签到类型
|
||||
*/
|
||||
private String signType;
|
||||
|
||||
/**
|
||||
* 巡检状态(0未完成,1已完成)
|
||||
*/
|
||||
private String inspectionState;
|
||||
|
||||
/**
|
||||
* 巡检照片
|
||||
*/
|
||||
private String inspectionImage;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
*/
|
||||
private Date inspectionTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 点开始时间
|
||||
*/
|
||||
private Date pointStartTime;
|
||||
|
||||
/**
|
||||
* 点结束时间
|
||||
*/
|
||||
private Date pointEndTime;
|
||||
|
||||
}
|
@@ -0,0 +1,98 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 设备列表对象 machine
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("machine")
|
||||
public class Machine extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String machineName;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String machineCode;
|
||||
|
||||
/**
|
||||
* 设备品牌
|
||||
*/
|
||||
private String machineBrand;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private Long machineTypeId;
|
||||
|
||||
/**
|
||||
* 位置详情
|
||||
*/
|
||||
private Long locationId;
|
||||
|
||||
/**
|
||||
* 采购价格
|
||||
*/
|
||||
private Long purchasePrice;
|
||||
|
||||
/**
|
||||
* 启用时间
|
||||
*/
|
||||
private Date activationTime;
|
||||
|
||||
/**
|
||||
* 保修截至时间
|
||||
*/
|
||||
private Date deadline;
|
||||
|
||||
/**
|
||||
* 使用年限(年)
|
||||
*/
|
||||
private Long serviceLife;
|
||||
|
||||
/**
|
||||
* 保修周期
|
||||
*/
|
||||
private String maintenanceCycle;
|
||||
|
||||
/**
|
||||
* 使用状态
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 责任人
|
||||
*/
|
||||
private Long personId;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,53 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 设备位置对象 machine_location
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("machine_location")
|
||||
public class MachineLocation extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 位置名称
|
||||
*/
|
||||
private String locationName;
|
||||
|
||||
/**
|
||||
* 位置编号
|
||||
*/
|
||||
private String locationCode;
|
||||
|
||||
/**
|
||||
* 位置对象id
|
||||
*/
|
||||
private Long locationObjId;
|
||||
|
||||
/**
|
||||
* 位置类型
|
||||
*/
|
||||
private String locationType;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
@@ -0,0 +1,86 @@
|
||||
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 java.io.Serial;
|
||||
|
||||
/**
|
||||
* 设备保养计划对象 machine_maintain_plan
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("machine_maintain_plan")
|
||||
public class MachineMaintainPlan extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 计划名称
|
||||
*/
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 计划编号
|
||||
*/
|
||||
private String planNo;
|
||||
|
||||
/**
|
||||
* 保养周期(1月/天2.固定天)
|
||||
*/
|
||||
private String planPeriod;
|
||||
|
||||
/**
|
||||
* 保养设备类型id
|
||||
*/
|
||||
private Long machineTypeId;
|
||||
|
||||
/**
|
||||
* 保养天
|
||||
*/
|
||||
private String maintainDay;
|
||||
|
||||
/**
|
||||
* 保养月
|
||||
*/
|
||||
private String maintainMonth;
|
||||
|
||||
/**
|
||||
* 固定天
|
||||
*/
|
||||
private String maintainEveryday;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endDate;
|
||||
|
||||
/**
|
||||
* 状态(0启用,1停用)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,46 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 保养计划执行人信息对象 machine_maintain_plan_staff
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("machine_maintain_plan_staff")
|
||||
public class MachineMaintainPlanStaff extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 保养执行计划人id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 保养计划id
|
||||
*/
|
||||
private Long maintainPlanId;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,84 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 设备保养任务对象 machine_maintain_task
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("machine_maintain_task")
|
||||
public class MachineMaintainTask extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 保养计划id
|
||||
*/
|
||||
private Long maintainPlanId;
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
private String maintainTaskNo;
|
||||
|
||||
/**
|
||||
* 计划保养人
|
||||
*/
|
||||
private String planUserId;
|
||||
|
||||
/**
|
||||
* 实际保养人
|
||||
|
||||
*/
|
||||
private String actUserId;
|
||||
|
||||
/**
|
||||
* 实际保养时间
|
||||
*/
|
||||
private Date actInsTime;
|
||||
|
||||
/**
|
||||
* 计划开始时间
|
||||
*/
|
||||
private Date planStartTime;
|
||||
|
||||
/**
|
||||
* 计划结束时间
|
||||
*/
|
||||
private Date planEndTime;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 转移描述
|
||||
*/
|
||||
private String transferDesc;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,61 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 设备保养任务明细对象 machine_maintain_task_detail
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("machine_maintain_task_detail")
|
||||
public class MachineMaintainTaskDetail extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 位置编号
|
||||
*/
|
||||
private Long machineId;
|
||||
|
||||
/**
|
||||
* 保养情况
|
||||
*/
|
||||
private String sendFlag;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sortNumber;
|
||||
|
||||
/**
|
||||
* 状态(0未开始,1已完成)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,61 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 设备类型对象 machine_type
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("machine_type")
|
||||
public class MachineType extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
private String machineTypeName;
|
||||
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
private String machineTypeCode;
|
||||
|
||||
/**
|
||||
* 上级类型
|
||||
*/
|
||||
private Long parentTypeId;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private String isEnable;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,98 @@
|
||||
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.InspectionTaskDetail;
|
||||
|
||||
import java.util.Date;
|
||||
/**
|
||||
* 巡检明细业务对象 inspection_task_detail
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = InspectionTaskDetail.class, reverseConvertGenerate = false)
|
||||
public class InspectionTaskDetailBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "主键id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@NotNull(message = "任务id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 路线id
|
||||
*/
|
||||
private Long routeId;
|
||||
|
||||
/**
|
||||
* 巡检计划id
|
||||
*/
|
||||
@NotNull(message = "巡检计划id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 巡检点id
|
||||
*/
|
||||
private Long pointId;
|
||||
|
||||
/**
|
||||
* 巡检方式
|
||||
*/
|
||||
private String patrolType;
|
||||
|
||||
/**
|
||||
* 签到类型
|
||||
*/
|
||||
private String signType;
|
||||
|
||||
/**
|
||||
* 巡检状态(0未完成,1已完成)
|
||||
*/
|
||||
private String inspectionState;
|
||||
|
||||
/**
|
||||
* 巡检照片
|
||||
*/
|
||||
private String inspectionImage;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
*/
|
||||
private Date inspectionTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 点开始时间
|
||||
*/
|
||||
private Date pointStartTime;
|
||||
|
||||
/**
|
||||
* 点结束时间
|
||||
*/
|
||||
private Date pointEndTime;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,97 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.Machine;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 设备列表业务对象 machine
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = Machine.class, reverseConvertGenerate = false)
|
||||
public class MachineBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@NotBlank(message = "设备名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String machineName;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
@NotBlank(message = "设备编码不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String machineCode;
|
||||
|
||||
/**
|
||||
* 设备品牌
|
||||
*/
|
||||
@NotBlank(message = "设备品牌不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String machineBrand;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
@NotNull(message = "设备类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long machineTypeId;
|
||||
|
||||
/**
|
||||
* 位置详情
|
||||
*/
|
||||
@NotNull(message = "位置详情不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long locationId;
|
||||
|
||||
/**
|
||||
* 采购价格
|
||||
*/
|
||||
@NotNull(message = "采购价格不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long purchasePrice;
|
||||
|
||||
/**
|
||||
* 启用时间
|
||||
*/
|
||||
private Date activationTime;
|
||||
|
||||
/**
|
||||
* 保修截至时间
|
||||
*/
|
||||
private Date deadline;
|
||||
|
||||
/**
|
||||
* 使用年限(年)
|
||||
*/
|
||||
private Long serviceLife;
|
||||
|
||||
/**
|
||||
* 保修周期
|
||||
*/
|
||||
private String maintenanceCycle;
|
||||
|
||||
/**
|
||||
* 使用状态
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 责任人
|
||||
*/
|
||||
private Long personId;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,55 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.MachineLocation;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 设备位置业务对象 machine_location
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = MachineLocation.class, reverseConvertGenerate = false)
|
||||
public class MachineLocationBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 位置名称
|
||||
*/
|
||||
@NotBlank(message = "位置名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String locationName;
|
||||
|
||||
/**
|
||||
* 位置编号
|
||||
*/
|
||||
private String locationCode;
|
||||
|
||||
/**
|
||||
* 位置对象id
|
||||
*/
|
||||
@NotNull(message = "位置对象id", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long locationObjId;
|
||||
|
||||
/**
|
||||
* 位置类型
|
||||
*/
|
||||
@NotBlank(message = "位置类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String locationType;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
}
|
@@ -0,0 +1,89 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.property.domain.MachineMaintainPlan;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备保养计划业务对象 machine_maintain_plan
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = MachineMaintainPlan.class, reverseConvertGenerate = false)
|
||||
public class MachineMaintainPlanBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 计划名称
|
||||
*/
|
||||
@NotBlank(message = "计划名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 计划编号
|
||||
*/
|
||||
private String planNo;
|
||||
|
||||
/**
|
||||
* 保养周期(1月/天2.固定天)
|
||||
*/
|
||||
private String planPeriod;
|
||||
|
||||
/**
|
||||
* 保养设备类型id
|
||||
*/
|
||||
private Long machineTypeId;
|
||||
|
||||
/**
|
||||
* 保养天
|
||||
*/
|
||||
private String maintainDay;
|
||||
|
||||
/**
|
||||
* 保养月
|
||||
*/
|
||||
private String maintainMonth;
|
||||
|
||||
/**
|
||||
* 固定天
|
||||
*/
|
||||
private String maintainEveryday;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endDate;
|
||||
|
||||
/**
|
||||
* 状态(0启用,1停用)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.MachineMaintainPlanStaff;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 保养计划执行人信息业务对象 machine_maintain_plan_staff
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = MachineMaintainPlanStaff.class, reverseConvertGenerate = false)
|
||||
public class MachineMaintainPlanStaffBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 保养执行计划人id
|
||||
*/
|
||||
@NotNull(message = "保养执行计划人id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 保养计划id
|
||||
*/
|
||||
@NotNull(message = "保养计划id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long maintainPlanId;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,84 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.MachineMaintainTask;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 设备保养任务业务对象 machine_maintain_task
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = MachineMaintainTask.class, reverseConvertGenerate = false)
|
||||
public class MachineMaintainTaskBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 保养计划id
|
||||
*/
|
||||
@NotNull(message = "保养计划id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long maintainPlanId;
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
private String maintainTaskNo;
|
||||
|
||||
/**
|
||||
* 计划保养人
|
||||
*/
|
||||
private String planUserId;
|
||||
|
||||
/**
|
||||
* 实际保养人
|
||||
|
||||
*/
|
||||
private String actUserId;
|
||||
|
||||
/**
|
||||
* 实际保养时间
|
||||
*/
|
||||
private Date actInsTime;
|
||||
|
||||
/**
|
||||
* 计划开始时间
|
||||
*/
|
||||
private Date planStartTime;
|
||||
|
||||
/**
|
||||
* 计划结束时间
|
||||
*/
|
||||
private Date planEndTime;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 转移描述
|
||||
*/
|
||||
private String transferDesc;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,62 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.MachineMaintainTaskDetail;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 设备保养任务明细业务对象 machine_maintain_task_detail
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = MachineMaintainTaskDetail.class, reverseConvertGenerate = false)
|
||||
public class MachineMaintainTaskDetailBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@NotNull(message = "任务id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 位置编号
|
||||
*/
|
||||
@NotNull(message = "位置编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long machineId;
|
||||
|
||||
/**
|
||||
* 保养情况
|
||||
*/
|
||||
private String sendFlag;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Long sortNumber;
|
||||
|
||||
/**
|
||||
* 状态(0未开始,1已完成)
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,67 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.MachineType;
|
||||
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.*;
|
||||
|
||||
/**
|
||||
* 设备类型业务对象 machine_type
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = MachineType.class, reverseConvertGenerate = false)
|
||||
public class MachineTypeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
@NotBlank(message = "类型名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String machineTypeName;
|
||||
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
@NotBlank(message = "类型编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String machineTypeCode;
|
||||
|
||||
/**
|
||||
* 上级类型
|
||||
*/
|
||||
private Long parentTypeId;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@NotBlank(message = "是否启用不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String isEnable;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
private String searchValue;
|
||||
/**
|
||||
* 归属类型id(类型树)
|
||||
*/
|
||||
private Long belongDeptId;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
package org.dromara.property.domain.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @Author:yuyongle
|
||||
* @Date:2025/7/16 17:07
|
||||
* @Description:
|
||||
**/
|
||||
@Getter
|
||||
public enum MachineLocationTypeEnum {
|
||||
/**
|
||||
* 待确认
|
||||
*/
|
||||
PARK("园区", "0"),
|
||||
/**
|
||||
* 待提货
|
||||
*/
|
||||
BUILDING("建筑", "1"),
|
||||
UNIT("单元", "2"),
|
||||
FLOOR("楼层", "3"),
|
||||
ROOM("房间", "4");
|
||||
|
||||
|
||||
private final String name;
|
||||
private final String value;
|
||||
|
||||
MachineLocationTypeEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
@@ -42,7 +42,11 @@ public class InspectionPlanDetailVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "巡检路线id")
|
||||
private Long inspectionRouteId;
|
||||
|
||||
/**
|
||||
* 巡检路线名称
|
||||
*/
|
||||
@ExcelProperty(value = "巡检路线名称")
|
||||
private String inspectionRouteName;
|
||||
/**
|
||||
* 巡检周期
|
||||
*/
|
||||
|
@@ -123,5 +123,9 @@ public class InspectionPlanVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
|
@@ -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.property.domain.InspectionTaskDetail;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 巡检明细视图对象 inspection_task_detail
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = InspectionTaskDetail.class)
|
||||
public class InspectionTaskDetailVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ExcelProperty(value = "主键id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@ExcelProperty(value = "任务id")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 路线id
|
||||
*/
|
||||
@ExcelProperty(value = "路线id")
|
||||
private Long routeId;
|
||||
|
||||
/**
|
||||
* 巡检计划id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检计划id")
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 巡检点id
|
||||
*/
|
||||
@ExcelProperty(value = "巡检点id")
|
||||
private Long pointId;
|
||||
|
||||
/**
|
||||
* 巡检方式
|
||||
*/
|
||||
@ExcelProperty(value = "巡检方式")
|
||||
private String patrolType;
|
||||
|
||||
/**
|
||||
* 签到类型
|
||||
*/
|
||||
@ExcelProperty(value = "签到类型")
|
||||
private String signType;
|
||||
|
||||
/**
|
||||
* 巡检状态(0未完成,1已完成)
|
||||
*/
|
||||
@ExcelProperty(value = "巡检状态(0未完成,1已完成)")
|
||||
private String inspectionState;
|
||||
|
||||
/**
|
||||
* 巡检照片
|
||||
*/
|
||||
@ExcelProperty(value = "巡检照片")
|
||||
private String inspectionImage;
|
||||
|
||||
/**
|
||||
* 实际巡检时间
|
||||
*/
|
||||
@ExcelProperty(value = "实际巡检时间")
|
||||
private Date inspectionTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 点开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "点开始时间")
|
||||
private Date pointStartTime;
|
||||
|
||||
/**
|
||||
* 点结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "点结束时间")
|
||||
private Date pointEndTime;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -92,6 +92,14 @@ public class InspectionTaskVo implements Serializable {
|
||||
* 计划巡检时间范围
|
||||
*/
|
||||
private String planInsTime;
|
||||
/**
|
||||
* 计划巡检人id
|
||||
*/
|
||||
private String planUserId;
|
||||
/**
|
||||
* 计划巡检人姓名
|
||||
*/
|
||||
private String planUserName;
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
|
@@ -0,0 +1,72 @@
|
||||
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.MachineLocation;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
/**
|
||||
* 设备位置详情视图对象 machine_location
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MachineLocation.class)
|
||||
public class MachineLocationDetailVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 位置名称
|
||||
*/
|
||||
@ExcelProperty(value = "位置名称")
|
||||
private String locationName;
|
||||
|
||||
/**
|
||||
* 位置编号
|
||||
*/
|
||||
@ExcelProperty(value = "位置编号")
|
||||
private String locationCode;
|
||||
|
||||
/**
|
||||
* 位置对象id
|
||||
*/
|
||||
@ExcelProperty(value = "位置对象id")
|
||||
private Long locationObjId;
|
||||
/**
|
||||
* 位置对象名称
|
||||
*/
|
||||
@ExcelProperty(value = "位置对象名称")
|
||||
private String locationObjName;
|
||||
|
||||
/**
|
||||
* 位置类型
|
||||
*/
|
||||
@ExcelProperty(value = "位置类型")
|
||||
private String locationType;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@@ -0,0 +1,72 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.MachineLocation;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设备位置视图对象 machine_location
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MachineLocation.class)
|
||||
public class MachineLocationVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 位置名称
|
||||
*/
|
||||
@ExcelProperty(value = "位置名称")
|
||||
private String locationName;
|
||||
|
||||
/**
|
||||
* 位置编号
|
||||
*/
|
||||
@ExcelProperty(value = "位置编号")
|
||||
private String locationCode;
|
||||
|
||||
/**
|
||||
* 位置对象id
|
||||
*/
|
||||
@ExcelProperty(value = "位置对象id")
|
||||
private Long locationObjId;
|
||||
|
||||
/**
|
||||
* 位置类型
|
||||
*/
|
||||
@ExcelProperty(value = "位置类型")
|
||||
private String locationType;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
@@ -0,0 +1,56 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.MachineMaintainPlanStaff;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 保养计划执行人信息视图对象 machine_maintain_plan_staff
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MachineMaintainPlanStaff.class)
|
||||
public class MachineMaintainPlanStaffVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 保养执行计划人id
|
||||
*/
|
||||
@ExcelProperty(value = "保养执行计划人id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 保养计划id
|
||||
*/
|
||||
@ExcelProperty(value = "保养计划id")
|
||||
private Long maintainPlanId;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,102 @@
|
||||
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.MachineMaintainPlan;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设备保养计划视图对象 machine_maintain_plan
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MachineMaintainPlan.class)
|
||||
public class MachineMaintainPlanVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 计划名称
|
||||
*/
|
||||
@ExcelProperty(value = "计划名称")
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 计划编号
|
||||
*/
|
||||
@ExcelProperty(value = "计划编号")
|
||||
private String planNo;
|
||||
|
||||
/**
|
||||
* 保养周期(1月/天2.固定天)
|
||||
*/
|
||||
@ExcelProperty(value = "保养周期(1月/天2.固定天)")
|
||||
private String planPeriod;
|
||||
|
||||
/**
|
||||
* 保养设备类型id
|
||||
*/
|
||||
@ExcelProperty(value = "保养设备类型id")
|
||||
private Long machineTypeId;
|
||||
|
||||
/**
|
||||
* 保养天
|
||||
*/
|
||||
@ExcelProperty(value = "保养天")
|
||||
private String maintainDay;
|
||||
|
||||
/**
|
||||
* 保养月
|
||||
*/
|
||||
@ExcelProperty(value = "保养月")
|
||||
private String maintainMonth;
|
||||
|
||||
/**
|
||||
* 固定天
|
||||
*/
|
||||
@ExcelProperty(value = "固定天")
|
||||
private String maintainEveryday;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "开始时间")
|
||||
private Date startDate;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "结束时间")
|
||||
private Date endDate;
|
||||
|
||||
/**
|
||||
* 状态(0启用,1停用)
|
||||
*/
|
||||
@ExcelProperty(value = "状态(0启用,1停用)")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,74 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.MachineMaintainTaskDetail;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设备保养任务明细视图对象 machine_maintain_task_detail
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MachineMaintainTaskDetail.class)
|
||||
public class MachineMaintainTaskDetailVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@ExcelProperty(value = "任务id")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 位置编号
|
||||
*/
|
||||
@ExcelProperty(value = "位置编号")
|
||||
private Long machineId;
|
||||
|
||||
/**
|
||||
* 保养情况
|
||||
*/
|
||||
@ExcelProperty(value = "保养情况")
|
||||
private String sendFlag;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ExcelProperty(value = "排序")
|
||||
private Long sortNumber;
|
||||
|
||||
/**
|
||||
* 状态(0未开始,1已完成)
|
||||
*/
|
||||
@ExcelProperty(value = "状态(0未开始,1已完成)")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,101 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.property.domain.MachineMaintainTask;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设备保养任务视图对象 machine_maintain_task
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MachineMaintainTask.class)
|
||||
public class MachineMaintainTaskVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 保养计划id
|
||||
*/
|
||||
@ExcelProperty(value = "保养计划id")
|
||||
private Long maintainPlanId;
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
@ExcelProperty(value = "任务编号")
|
||||
private String maintainTaskNo;
|
||||
|
||||
/**
|
||||
* 计划保养人
|
||||
*/
|
||||
@ExcelProperty(value = "计划保养人")
|
||||
private String planUserId;
|
||||
|
||||
/**
|
||||
* 实际保养人
|
||||
|
||||
*/
|
||||
@ExcelProperty(value = "实际保养人")
|
||||
private String actUserId;
|
||||
|
||||
/**
|
||||
* 实际保养时间
|
||||
*/
|
||||
@ExcelProperty(value = "实际保养时间")
|
||||
private Date actInsTime;
|
||||
|
||||
/**
|
||||
* 计划开始时间
|
||||
*/
|
||||
@ExcelProperty(value = "计划开始时间")
|
||||
private Date planStartTime;
|
||||
|
||||
/**
|
||||
* 计划结束时间
|
||||
*/
|
||||
@ExcelProperty(value = "计划结束时间")
|
||||
private Date planEndTime;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@ExcelProperty(value = "类型")
|
||||
private String taskType;
|
||||
|
||||
/**
|
||||
* 转移描述
|
||||
*/
|
||||
@ExcelProperty(value = "转移描述")
|
||||
private String transferDesc;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
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.MachineType;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 设备类型视图对象 machine_type
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MachineType.class)
|
||||
public class MachineTypeTreeVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
@ExcelProperty(value = "类型名称")
|
||||
private String machineTypeName;
|
||||
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
@ExcelProperty(value = "类型编号")
|
||||
private String machineTypeCode;
|
||||
|
||||
/**
|
||||
* 上级类型
|
||||
*/
|
||||
@ExcelProperty(value = "上级类型")
|
||||
private Long parentTypeId;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@ExcelProperty(value = "是否启用", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "wy_kg")
|
||||
private String isEnable;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
/**
|
||||
* 子菜单
|
||||
*/
|
||||
private List<MachineTypeTreeVo> children = new ArrayList<>();
|
||||
|
||||
}
|
@@ -0,0 +1,75 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.MachineType;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设备类型视图对象 machine_type
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = MachineType.class)
|
||||
public class MachineTypeVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
@ExcelProperty(value = "类型名称")
|
||||
private String machineTypeName;
|
||||
|
||||
/**
|
||||
* 类型编号
|
||||
*/
|
||||
@ExcelProperty(value = "类型编号")
|
||||
private String machineTypeCode;
|
||||
|
||||
/**
|
||||
* 上级类型
|
||||
*/
|
||||
@ExcelProperty(value = "上级类型")
|
||||
private Long parentTypeId;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@ExcelProperty(value = "是否启用", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "wy_kg")
|
||||
private String isEnable;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 搜索值
|
||||
*/
|
||||
@ExcelProperty(value = "搜索值")
|
||||
private String searchValue;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,113 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.dromara.property.domain.Machine;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设备列表视图对象 machine
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = Machine.class)
|
||||
public class MachineVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@ExcelProperty(value = "设备名称")
|
||||
private String machineName;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
@ExcelProperty(value = "设备编码")
|
||||
private String machineCode;
|
||||
|
||||
/**
|
||||
* 设备品牌
|
||||
*/
|
||||
@ExcelProperty(value = "设备品牌")
|
||||
private String machineBrand;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
@ExcelProperty(value = "设备类型")
|
||||
private Long machineTypeId;
|
||||
|
||||
/**
|
||||
* 位置详情
|
||||
*/
|
||||
@ExcelProperty(value = "位置详情")
|
||||
private Long locationId;
|
||||
|
||||
/**
|
||||
* 采购价格
|
||||
*/
|
||||
@ExcelProperty(value = "采购价格")
|
||||
private Long purchasePrice;
|
||||
|
||||
/**
|
||||
* 启用时间
|
||||
*/
|
||||
@ExcelProperty(value = "启用时间")
|
||||
private Date activationTime;
|
||||
|
||||
/**
|
||||
* 保修截至时间
|
||||
*/
|
||||
@ExcelProperty(value = "保修截至时间")
|
||||
private Date deadline;
|
||||
|
||||
/**
|
||||
* 使用年限(年)
|
||||
*/
|
||||
@ExcelProperty(value = "使用年限", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "年=")
|
||||
private Long serviceLife;
|
||||
|
||||
/**
|
||||
* 保修周期
|
||||
*/
|
||||
@ExcelProperty(value = "保修周期")
|
||||
private String maintenanceCycle;
|
||||
|
||||
/**
|
||||
* 使用状态
|
||||
*/
|
||||
@ExcelProperty(value = "使用状态")
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 责任人
|
||||
*/
|
||||
@ExcelProperty(value = "责任人")
|
||||
private Long personId;
|
||||
|
||||
|
||||
}
|
@@ -101,4 +101,16 @@ public class RemoteFloorServiceImpl implements RemoteFloorService {
|
||||
treeList.addAll(l4);
|
||||
return treeList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据单元ID查询楼层
|
||||
*
|
||||
* @param unitId 单元ID
|
||||
* @return 楼层
|
||||
*/
|
||||
@Override
|
||||
public List<RemoteFloorVo> queryByUnitId(Long unitId){
|
||||
List<TbFloorVo> tbFloorVo = floorService.queryByUnitId(unitId);
|
||||
return MapstructUtils.convert(tbFloorVo, RemoteFloorVo.class);
|
||||
}
|
||||
}
|
||||
|
@@ -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.InspectionTaskDetail;
|
||||
import org.dromara.property.domain.vo.InspectionTaskDetailVo;
|
||||
|
||||
/**
|
||||
* 巡检明细Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Mapper
|
||||
public interface InspectionTaskDetailMapper extends BaseMapperPlus<InspectionTaskDetail, InspectionTaskDetailVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.property.domain.MachineLocation;
|
||||
import org.dromara.property.domain.vo.MachineLocationVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 设备位置Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface MachineLocationMapper extends BaseMapperPlus<MachineLocation, MachineLocationVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
package org.dromara.property.mapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.property.domain.MachineMaintainPlan;
|
||||
import org.dromara.property.domain.vo.MachineMaintainPlanVo;
|
||||
|
||||
/**
|
||||
* 设备保养计划Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface MachineMaintainPlanMapper extends BaseMapperPlus<MachineMaintainPlan, MachineMaintainPlanVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.property.domain.MachineMaintainPlanStaff;
|
||||
import org.dromara.property.domain.vo.MachineMaintainPlanStaffVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 保养计划执行人信息Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface MachineMaintainPlanStaffMapper extends BaseMapperPlus<MachineMaintainPlanStaff, MachineMaintainPlanStaffVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.property.domain.MachineMaintainTaskDetail;
|
||||
import org.dromara.property.domain.vo.MachineMaintainTaskDetailVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
|
||||
/**
|
||||
* 设备保养任务明细Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface MachineMaintainTaskDetailMapper extends BaseMapperPlus<MachineMaintainTaskDetail, MachineMaintainTaskDetailVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.property.domain.MachineMaintainTask;
|
||||
import org.dromara.property.domain.vo.MachineMaintainTaskVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 设备保养任务Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface MachineMaintainTaskMapper extends BaseMapperPlus<MachineMaintainTask, MachineMaintainTaskVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.Machine;
|
||||
import org.dromara.property.domain.vo.MachineVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 设备列表Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
public interface MachineMapper extends BaseMapperPlus<Machine, MachineVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,27 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.common.mybatis.annotation.DataColumn;
|
||||
import org.dromara.common.mybatis.annotation.DataPermission;
|
||||
import org.dromara.common.mybatis.helper.DataBaseHelper;
|
||||
import org.dromara.property.domain.MachineType;
|
||||
import org.dromara.property.domain.vo.MachineTypeTreeVo;
|
||||
import org.dromara.property.domain.vo.MachineTypeVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备类型Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Mapper
|
||||
public interface MachineTypeMapper extends BaseMapperPlus<MachineType, MachineTypeVo> {
|
||||
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
package org.dromara.property.mapperMPJ;
|
||||
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.dromara.property.domain.InspectionTask;
|
||||
import org.dromara.property.domain.vo.InspectionTaskVo;
|
||||
|
||||
/**
|
||||
* 巡检任务Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-11
|
||||
*/
|
||||
@Mapper
|
||||
public interface InspectionTaskMPJMapper extends MPJBaseMapper<InspectionTask> {
|
||||
|
||||
}
|
@@ -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.InspectionTaskDetailBo;
|
||||
import org.dromara.property.domain.vo.InspectionTaskDetailVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 巡检明细Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface IInspectionTaskDetailService {
|
||||
|
||||
/**
|
||||
* 查询巡检明细
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 巡检明细
|
||||
*/
|
||||
InspectionTaskDetailVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询巡检明细列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 巡检明细分页列表
|
||||
*/
|
||||
TableDataInfo<InspectionTaskDetailVo> queryPageList(InspectionTaskDetailBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的巡检明细列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 巡检明细列表
|
||||
*/
|
||||
List<InspectionTaskDetailVo> queryList(InspectionTaskDetailBo bo);
|
||||
|
||||
/**
|
||||
* 新增巡检明细
|
||||
*
|
||||
* @param bo 巡检明细
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(InspectionTaskDetailBo bo);
|
||||
|
||||
/**
|
||||
* 修改巡检明细
|
||||
*
|
||||
* @param bo 巡检明细
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(InspectionTaskDetailBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除巡检明细信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@@ -0,0 +1,70 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.MachineLocation;
|
||||
import org.dromara.property.domain.vo.MachineLocationDetailVo;
|
||||
import org.dromara.property.domain.vo.MachineLocationVo;
|
||||
import org.dromara.property.domain.bo.MachineLocationBo;
|
||||
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-16
|
||||
*/
|
||||
public interface IMachineLocationService {
|
||||
|
||||
/**
|
||||
* 查询设备位置
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备位置
|
||||
*/
|
||||
MachineLocationDetailVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询设备位置列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备位置分页列表
|
||||
*/
|
||||
TableDataInfo<MachineLocationVo> queryPageList(MachineLocationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备位置列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备位置列表
|
||||
*/
|
||||
List<MachineLocationVo> queryList(MachineLocationBo bo);
|
||||
|
||||
/**
|
||||
* 新增设备位置
|
||||
*
|
||||
* @param bo 设备位置
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(MachineLocationBo bo);
|
||||
|
||||
/**
|
||||
* 修改设备位置
|
||||
*
|
||||
* @param bo 设备位置
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(MachineLocationBo 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.MachineMaintainPlanBo;
|
||||
import org.dromara.property.domain.vo.MachineMaintainPlanVo;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备保养计划Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
public interface IMachineMaintainPlanService {
|
||||
|
||||
/**
|
||||
* 查询设备保养计划
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备保养计划
|
||||
*/
|
||||
MachineMaintainPlanVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询设备保养计划列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备保养计划分页列表
|
||||
*/
|
||||
TableDataInfo<MachineMaintainPlanVo> queryPageList(MachineMaintainPlanBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备保养计划列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备保养计划列表
|
||||
*/
|
||||
List<MachineMaintainPlanVo> queryList(MachineMaintainPlanBo bo);
|
||||
|
||||
/**
|
||||
* 新增设备保养计划
|
||||
*
|
||||
* @param bo 设备保养计划
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(MachineMaintainPlanBo bo);
|
||||
|
||||
/**
|
||||
* 修改设备保养计划
|
||||
*
|
||||
* @param bo 设备保养计划
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(MachineMaintainPlanBo 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.MachineMaintainPlanStaff;
|
||||
import org.dromara.property.domain.vo.MachineMaintainPlanStaffVo;
|
||||
import org.dromara.property.domain.bo.MachineMaintainPlanStaffBo;
|
||||
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-16
|
||||
*/
|
||||
public interface IMachineMaintainPlanStaffService {
|
||||
|
||||
/**
|
||||
* 查询保养计划执行人信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 保养计划执行人信息
|
||||
*/
|
||||
MachineMaintainPlanStaffVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询保养计划执行人信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 保养计划执行人信息分页列表
|
||||
*/
|
||||
TableDataInfo<MachineMaintainPlanStaffVo> queryPageList(MachineMaintainPlanStaffBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的保养计划执行人信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 保养计划执行人信息列表
|
||||
*/
|
||||
List<MachineMaintainPlanStaffVo> queryList(MachineMaintainPlanStaffBo bo);
|
||||
|
||||
/**
|
||||
* 新增保养计划执行人信息
|
||||
*
|
||||
* @param bo 保养计划执行人信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(MachineMaintainPlanStaffBo bo);
|
||||
|
||||
/**
|
||||
* 修改保养计划执行人信息
|
||||
*
|
||||
* @param bo 保养计划执行人信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(MachineMaintainPlanStaffBo 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.MachineMaintainTaskDetail;
|
||||
import org.dromara.property.domain.vo.MachineMaintainTaskDetailVo;
|
||||
import org.dromara.property.domain.bo.MachineMaintainTaskDetailBo;
|
||||
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-16
|
||||
*/
|
||||
public interface IMachineMaintainTaskDetailService {
|
||||
|
||||
/**
|
||||
* 查询设备保养任务明细
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备保养任务明细
|
||||
*/
|
||||
MachineMaintainTaskDetailVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询设备保养任务明细列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备保养任务明细分页列表
|
||||
*/
|
||||
TableDataInfo<MachineMaintainTaskDetailVo> queryPageList(MachineMaintainTaskDetailBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备保养任务明细列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备保养任务明细列表
|
||||
*/
|
||||
List<MachineMaintainTaskDetailVo> queryList(MachineMaintainTaskDetailBo bo);
|
||||
|
||||
/**
|
||||
* 新增设备保养任务明细
|
||||
*
|
||||
* @param bo 设备保养任务明细
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(MachineMaintainTaskDetailBo bo);
|
||||
|
||||
/**
|
||||
* 修改设备保养任务明细
|
||||
*
|
||||
* @param bo 设备保养任务明细
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(MachineMaintainTaskDetailBo 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.MachineMaintainTask;
|
||||
import org.dromara.property.domain.vo.MachineMaintainTaskVo;
|
||||
import org.dromara.property.domain.bo.MachineMaintainTaskBo;
|
||||
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-16
|
||||
*/
|
||||
public interface IMachineMaintainTaskService {
|
||||
|
||||
/**
|
||||
* 查询设备保养任务
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备保养任务
|
||||
*/
|
||||
MachineMaintainTaskVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询设备保养任务列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备保养任务分页列表
|
||||
*/
|
||||
TableDataInfo<MachineMaintainTaskVo> queryPageList(MachineMaintainTaskBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备保养任务列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备保养任务列表
|
||||
*/
|
||||
List<MachineMaintainTaskVo> queryList(MachineMaintainTaskBo bo);
|
||||
|
||||
/**
|
||||
* 新增设备保养任务
|
||||
*
|
||||
* @param bo 设备保养任务
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(MachineMaintainTaskBo bo);
|
||||
|
||||
/**
|
||||
* 修改设备保养任务
|
||||
*
|
||||
* @param bo 设备保养任务
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(MachineMaintainTaskBo 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.Machine;
|
||||
import org.dromara.property.domain.vo.MachineVo;
|
||||
import org.dromara.property.domain.bo.MachineBo;
|
||||
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-16
|
||||
*/
|
||||
public interface IMachineService {
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备列表
|
||||
*/
|
||||
MachineVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询设备列表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备列表分页列表
|
||||
*/
|
||||
TableDataInfo<MachineVo> queryPageList(MachineBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备列表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备列表列表
|
||||
*/
|
||||
List<MachineVo> queryList(MachineBo bo);
|
||||
|
||||
/**
|
||||
* 新增设备列表
|
||||
*
|
||||
* @param bo 设备列表
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(MachineBo bo);
|
||||
|
||||
/**
|
||||
* 修改设备列表
|
||||
*
|
||||
* @param bo 设备列表
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(MachineBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除设备列表信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@@ -0,0 +1,77 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.vo.MachineTypeTreeVo;
|
||||
import org.dromara.property.domain.vo.MachineTypeVo;
|
||||
import org.dromara.property.domain.bo.MachineTypeBo;
|
||||
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-16
|
||||
*/
|
||||
public interface IMachineTypeService {
|
||||
|
||||
/**
|
||||
* 查询设备类型
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备类型
|
||||
*/
|
||||
MachineTypeVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询设备类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备类型分页列表
|
||||
*/
|
||||
TableDataInfo<MachineTypeVo> queryPageList(MachineTypeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备类型列表
|
||||
*/
|
||||
List<MachineTypeVo> queryList(MachineTypeBo bo);
|
||||
|
||||
/**
|
||||
* 新增设备类型
|
||||
*
|
||||
* @param bo 设备类型
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(MachineTypeBo bo);
|
||||
|
||||
/**
|
||||
* 修改设备类型
|
||||
*
|
||||
* @param bo 设备类型
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(MachineTypeBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除设备类型信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 获取设备类型树列表
|
||||
*
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
List<MachineTypeTreeVo> selectmachineTypeList(MachineTypeBo type);
|
||||
}
|
@@ -1,5 +1,6 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.api.domain.vo.RemoteFloorVo;
|
||||
import org.dromara.property.domain.TbFloor;
|
||||
import org.dromara.property.domain.vo.TbFloorVo;
|
||||
import org.dromara.property.domain.bo.TbFloorBo;
|
||||
@@ -67,7 +68,18 @@ public interface ITbFloorService {
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有楼层
|
||||
*
|
||||
* @return 楼层列表
|
||||
*/
|
||||
List<TbFloorVo> queryAll();
|
||||
|
||||
/**
|
||||
* 根据单元ID查询楼层
|
||||
*
|
||||
* @param unitId 单元ID
|
||||
* @return 楼层
|
||||
*/
|
||||
List<TbFloorVo> queryByUnitId(Long unitId);
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@ package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -14,6 +15,7 @@ import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.property.domain.InspectionPlan;
|
||||
import org.dromara.property.domain.InspectionPlanStaff;
|
||||
import org.dromara.property.domain.InspectionRoute;
|
||||
import org.dromara.property.domain.bo.InspectionPlanBo;
|
||||
import org.dromara.property.domain.bo.InspectionPlanStaffBo;
|
||||
import org.dromara.property.domain.vo.InspectionPlanDetailVo;
|
||||
@@ -22,6 +24,7 @@ import org.dromara.property.domain.vo.InspectionPlanVo;
|
||||
import org.dromara.property.domain.vo.ResidentPersonVo;
|
||||
import org.dromara.property.mapper.InspectionPlanMapper;
|
||||
import org.dromara.property.mapper.InspectionPlanStaffMapper;
|
||||
import org.dromara.property.mapper.InspectionRouteMapper;
|
||||
import org.dromara.property.mapper.ResidentPersonMapper;
|
||||
import org.dromara.property.service.IInspectionPlanService;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -46,6 +49,7 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
private final InspectionPlanMapper baseMapper;
|
||||
private final ResidentPersonMapper residentPersonMapper;
|
||||
private final InspectionPlanStaffMapper inspectionPlanStaffMapper;
|
||||
private final InspectionRouteMapper inspectionRouteMapper;
|
||||
|
||||
/**
|
||||
* 查询巡检计划
|
||||
@@ -54,29 +58,32 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
* @return 巡检计划
|
||||
*/
|
||||
@Override
|
||||
public InspectionPlanDetailVo queryById(Long id){
|
||||
public InspectionPlanDetailVo queryById(Long id) {
|
||||
InspectionPlanVo inspectionPlanVo = baseMapper.selectVoById(id);
|
||||
InspectionPlanDetailVo inspectionPlanDetailVo = BeanUtil.copyProperties(inspectionPlanVo, InspectionPlanDetailVo.class);
|
||||
LambdaQueryWrapper<InspectionPlanStaff> staffQueryWrapper= new LambdaQueryWrapper<>();
|
||||
staffQueryWrapper.eq(InspectionPlanStaff::getInspectionPlanId, id);
|
||||
List<InspectionPlanStaffVo> inspectionPlanStaffVos =inspectionPlanStaffMapper.selectVoList(staffQueryWrapper);
|
||||
List<Long> userIdlist = inspectionPlanStaffVos.stream()
|
||||
LambdaQueryWrapper<InspectionPlanStaff> staffQueryWrapper = new LambdaQueryWrapper<>();
|
||||
staffQueryWrapper.eq(InspectionPlanStaff::getInspectionPlanId, id);
|
||||
List<InspectionPlanStaffVo> inspectionPlanStaffVos = inspectionPlanStaffMapper.selectVoList(staffQueryWrapper);
|
||||
List<Long> userIdlist = inspectionPlanStaffVos.stream()
|
||||
.map(vo -> vo.getUserId())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
if(CollectionUtil.isNotEmpty(userIdlist)){
|
||||
new ServiceException("执行计划人不存在");
|
||||
if (CollectionUtil.isNotEmpty(userIdlist)) {
|
||||
new ServiceException("执行计划人不存在");
|
||||
}
|
||||
List<ResidentPersonVo> residentPersonVolist = residentPersonMapper.selectVoByIds(userIdlist);
|
||||
if(CollectionUtil.isNotEmpty(residentPersonVolist)){
|
||||
inspectionPlanStaffVos.stream().forEach(s->{
|
||||
List<ResidentPersonVo> residentPersonVolist = residentPersonMapper.selectVoByIds(userIdlist);
|
||||
if (CollectionUtil.isNotEmpty(residentPersonVolist)) {
|
||||
inspectionPlanStaffVos.stream().forEach(s -> {
|
||||
ResidentPersonVo residentPersonVo = residentPersonVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && vo.getId().equals(s.getUserId())).findFirst().orElse(null);
|
||||
s.setUserName(residentPersonVo.getUserName());
|
||||
});
|
||||
inspectionPlanDetailVo.setInspectionPlanStaffVoList(inspectionPlanStaffVos);
|
||||
}
|
||||
|
||||
InspectionRoute inspectionRoute = inspectionRouteMapper.selectById(inspectionPlanDetailVo.getInspectionRouteId());
|
||||
if (ObjectUtil.isNotEmpty(inspectionRoute)) {
|
||||
inspectionPlanDetailVo.setInspectionRouteName(inspectionRoute.getRouteName());
|
||||
}
|
||||
return inspectionPlanDetailVo;
|
||||
}
|
||||
|
||||
@@ -137,11 +144,11 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
List<InspectionPlanStaffBo> inspectionPlanStaffBoList = bo.getInspectionPlanStaffBoList();
|
||||
if(CollectionUtil.isNotEmpty(inspectionPlanStaffBoList)){
|
||||
if (CollectionUtil.isNotEmpty(inspectionPlanStaffBoList)) {
|
||||
for (InspectionPlanStaffBo staffBo : inspectionPlanStaffBoList) {
|
||||
staffBo.setInspectionPlanId(add.getId());
|
||||
}
|
||||
inspectionPlanStaffMapper.insertBatch(BeanUtil.copyToList(inspectionPlanStaffBoList, InspectionPlanStaff.class ));
|
||||
inspectionPlanStaffMapper.insertBatch(BeanUtil.copyToList(inspectionPlanStaffBoList, InspectionPlanStaff.class));
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
@@ -163,7 +170,7 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(InspectionPlan entity){
|
||||
private void validEntityBeforeSave(InspectionPlan entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
@@ -176,7 +183,7 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(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.domain.InspectionTaskDetail;
|
||||
import org.dromara.property.domain.bo.InspectionTaskDetailBo;
|
||||
import org.dromara.property.domain.vo.InspectionTaskDetailVo;
|
||||
import org.dromara.property.mapper.InspectionTaskDetailMapper;
|
||||
import org.dromara.property.service.IInspectionTaskDetailService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 巡检明细Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class InspectionTaskDetailServiceImpl implements IInspectionTaskDetailService {
|
||||
|
||||
private final InspectionTaskDetailMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询巡检明细
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 巡检明细
|
||||
*/
|
||||
@Override
|
||||
public InspectionTaskDetailVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询巡检明细列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 巡检明细分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<InspectionTaskDetailVo> queryPageList(InspectionTaskDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<InspectionTaskDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<InspectionTaskDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的巡检明细列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 巡检明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<InspectionTaskDetailVo> queryList(InspectionTaskDetailBo bo) {
|
||||
LambdaQueryWrapper<InspectionTaskDetail> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<InspectionTaskDetail> buildQueryWrapper(InspectionTaskDetailBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<InspectionTaskDetail> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(InspectionTaskDetail::getId);
|
||||
lqw.eq(bo.getTaskId() != null, InspectionTaskDetail::getTaskId, bo.getTaskId());
|
||||
lqw.eq(bo.getRouteId() != null, InspectionTaskDetail::getRouteId, bo.getRouteId());
|
||||
lqw.eq(bo.getPlanId() != null, InspectionTaskDetail::getPlanId, bo.getPlanId());
|
||||
lqw.eq(bo.getPointId() != null, InspectionTaskDetail::getPointId, bo.getPointId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPatrolType()), InspectionTaskDetail::getPatrolType, bo.getPatrolType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSignType()), InspectionTaskDetail::getSignType, bo.getSignType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getInspectionState()), InspectionTaskDetail::getInspectionState, bo.getInspectionState());
|
||||
lqw.eq(bo.getInspectionTime() != null, InspectionTaskDetail::getInspectionTime, bo.getInspectionTime());
|
||||
lqw.eq(bo.getPointStartTime() != null, InspectionTaskDetail::getPointStartTime, bo.getPointStartTime());
|
||||
lqw.eq(bo.getPointEndTime() != null, InspectionTaskDetail::getPointEndTime, bo.getPointEndTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), InspectionTaskDetail::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增巡检明细
|
||||
*
|
||||
* @param bo 巡检明细
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(InspectionTaskDetailBo bo) {
|
||||
InspectionTaskDetail add = MapstructUtils.convert(bo, InspectionTaskDetail.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改巡检明细
|
||||
*
|
||||
* @param bo 巡检明细
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(InspectionTaskDetailBo bo) {
|
||||
InspectionTaskDetail update = MapstructUtils.convert(bo, InspectionTaskDetail.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(InspectionTaskDetail entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除巡检明细信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@@ -12,6 +12,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.property.domain.InspectionPlan;
|
||||
import org.dromara.property.domain.InspectionTask;
|
||||
import org.dromara.property.domain.bo.InspectionTaskBo;
|
||||
import org.dromara.property.domain.vo.InspectionPlanVo;
|
||||
import org.dromara.property.domain.vo.InspectionTaskVo;
|
||||
import org.dromara.property.mapper.InspectionPlanMapper;
|
||||
import org.dromara.property.mapper.InspectionTaskMapper;
|
||||
@@ -50,7 +51,10 @@ public class InspectionTaskServiceImpl implements IInspectionTaskService {
|
||||
*/
|
||||
@Override
|
||||
public InspectionTaskVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
InspectionTaskVo inspectionTaskVo = baseMapper.selectVoById(id);
|
||||
InspectionPlanVo inspectionPlanVo = inspectionPlanMapper.selectVoById(inspectionTaskVo.getInspectionPlanId());
|
||||
inspectionTaskVo.setPlanName(inspectionPlanVo.getPlanName());
|
||||
return inspectionTaskVo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -0,0 +1,163 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
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.enums.MachineLocationTypeEnum;
|
||||
import org.dromara.property.domain.vo.MachineLocationDetailVo;
|
||||
import org.dromara.property.mapper.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.MachineLocationBo;
|
||||
import org.dromara.property.domain.vo.MachineLocationVo;
|
||||
import org.dromara.property.domain.MachineLocation;
|
||||
import org.dromara.property.service.IMachineLocationService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
import static org.dromara.property.domain.enums.MachineLocationTypeEnum.PARK;
|
||||
|
||||
/**
|
||||
* 设备位置Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MachineLocationServiceImpl implements IMachineLocationService {
|
||||
|
||||
private final MachineLocationMapper baseMapper;
|
||||
private final TbCommunityMapper tbCommunityMapper;
|
||||
private final TbBuildingMapper tbBuildingMapper;
|
||||
private final TbUnitMapper tbUnitMapper;
|
||||
private final TbFloorMapper tbFloorMapper;
|
||||
private final TbRoomMapper tbRoomMapper;
|
||||
|
||||
/**
|
||||
* 查询设备位置
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备位置
|
||||
*/
|
||||
@Override
|
||||
public MachineLocationDetailVo queryById(Long id) {
|
||||
MachineLocationVo machineLocationVo = baseMapper.selectVoById(id);
|
||||
MachineLocationDetailVo machineLocationDetailVo = BeanUtil.copyProperties(machineLocationVo, MachineLocationDetailVo.class);
|
||||
Long locationObjId = Long.valueOf(machineLocationDetailVo.getLocationObjId());
|
||||
switch (machineLocationDetailVo.getLocationType()) {
|
||||
case "0":
|
||||
machineLocationDetailVo.setLocationObjName(tbCommunityMapper.selectVoById(locationObjId).getCommunityName());
|
||||
case "1":
|
||||
machineLocationDetailVo.setLocationObjName(tbBuildingMapper.selectVoById(locationObjId).getBuildingName());
|
||||
case "2":
|
||||
machineLocationDetailVo.setLocationObjName(tbUnitMapper.selectVoById(locationObjId).getUnitName());
|
||||
case "3":
|
||||
machineLocationDetailVo.setLocationObjName(tbFloorMapper.selectVoById(locationObjId).getFloorName());
|
||||
case "4":
|
||||
machineLocationDetailVo.setLocationObjName(tbRoomMapper.selectVoById(locationObjId).getRoomNumber());
|
||||
}
|
||||
return machineLocationDetailVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询设备位置列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备位置分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MachineLocationVo> queryPageList(MachineLocationBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MachineLocation> lqw = buildQueryWrapper(bo);
|
||||
Page<MachineLocationVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备位置列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备位置列表
|
||||
*/
|
||||
@Override
|
||||
public List<MachineLocationVo> queryList(MachineLocationBo bo) {
|
||||
LambdaQueryWrapper<MachineLocation> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MachineLocation> buildQueryWrapper(MachineLocationBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MachineLocation> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(MachineLocation::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getLocationName()), MachineLocation::getLocationName, bo.getLocationName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLocationCode()), MachineLocation::getLocationCode, bo.getLocationCode());
|
||||
lqw.eq(bo.getLocationObjId() != null, MachineLocation::getLocationObjId, bo.getLocationObjId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLocationType()), MachineLocation::getLocationType, bo.getLocationType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), MachineLocation::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备位置
|
||||
*
|
||||
* @param bo 设备位置
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MachineLocationBo bo) {
|
||||
MachineLocation add = MapstructUtils.convert(bo, MachineLocation.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备位置
|
||||
*
|
||||
* @param bo 设备位置
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MachineLocationBo bo) {
|
||||
MachineLocation update = MapstructUtils.convert(bo, MachineLocation.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MachineLocation entity) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
entity.setLocationCode(RandomUtil.randomNumbers(11));
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除设备位置信息
|
||||
*
|
||||
* @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,143 @@
|
||||
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.MachineMaintainPlan;
|
||||
import org.dromara.property.domain.bo.MachineMaintainPlanBo;
|
||||
import org.dromara.property.domain.vo.MachineMaintainPlanVo;
|
||||
import org.dromara.property.mapper.MachineMaintainPlanMapper;
|
||||
import org.dromara.property.service.IMachineMaintainPlanService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 设备保养计划Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MachineMaintainPlanServiceImpl implements IMachineMaintainPlanService {
|
||||
|
||||
private final MachineMaintainPlanMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询设备保养计划
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备保养计划
|
||||
*/
|
||||
@Override
|
||||
public MachineMaintainPlanVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询设备保养计划列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备保养计划分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MachineMaintainPlanVo> queryPageList(MachineMaintainPlanBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MachineMaintainPlan> lqw = buildQueryWrapper(bo);
|
||||
Page<MachineMaintainPlanVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备保养计划列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备保养计划列表
|
||||
*/
|
||||
@Override
|
||||
public List<MachineMaintainPlanVo> queryList(MachineMaintainPlanBo bo) {
|
||||
LambdaQueryWrapper<MachineMaintainPlan> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MachineMaintainPlan> buildQueryWrapper(MachineMaintainPlanBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MachineMaintainPlan> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(MachineMaintainPlan::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getPlanName()), MachineMaintainPlan::getPlanName, bo.getPlanName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPlanNo()), MachineMaintainPlan::getPlanNo, bo.getPlanNo());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPlanPeriod()), MachineMaintainPlan::getPlanPeriod, bo.getPlanPeriod());
|
||||
lqw.eq(bo.getMachineTypeId() != null, MachineMaintainPlan::getMachineTypeId, bo.getMachineTypeId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMaintainDay()), MachineMaintainPlan::getMaintainDay, bo.getMaintainDay());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMaintainMonth()), MachineMaintainPlan::getMaintainMonth, bo.getMaintainMonth());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMaintainEveryday()), MachineMaintainPlan::getMaintainEveryday, bo.getMaintainEveryday());
|
||||
lqw.eq(bo.getStartDate() != null, MachineMaintainPlan::getStartDate, bo.getStartDate());
|
||||
lqw.eq(bo.getEndDate() != null, MachineMaintainPlan::getEndDate, bo.getEndDate());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getState()), MachineMaintainPlan::getState, bo.getState());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), MachineMaintainPlan::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备保养计划
|
||||
*
|
||||
* @param bo 设备保养计划
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MachineMaintainPlanBo bo) {
|
||||
MachineMaintainPlan add = MapstructUtils.convert(bo, MachineMaintainPlan.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备保养计划
|
||||
*
|
||||
* @param bo 设备保养计划
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MachineMaintainPlanBo bo) {
|
||||
MachineMaintainPlan update = MapstructUtils.convert(bo, MachineMaintainPlan.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MachineMaintainPlan entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
entity.setState("0");
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除设备保养计划信息
|
||||
*
|
||||
* @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,134 @@
|
||||
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.MachineMaintainPlanStaffBo;
|
||||
import org.dromara.property.domain.vo.MachineMaintainPlanStaffVo;
|
||||
import org.dromara.property.domain.MachineMaintainPlanStaff;
|
||||
import org.dromara.property.mapper.MachineMaintainPlanStaffMapper;
|
||||
import org.dromara.property.service.IMachineMaintainPlanStaffService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 保养计划执行人信息Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MachineMaintainPlanStaffServiceImpl implements IMachineMaintainPlanStaffService {
|
||||
|
||||
private final MachineMaintainPlanStaffMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询保养计划执行人信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 保养计划执行人信息
|
||||
*/
|
||||
@Override
|
||||
public MachineMaintainPlanStaffVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询保养计划执行人信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 保养计划执行人信息分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MachineMaintainPlanStaffVo> queryPageList(MachineMaintainPlanStaffBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MachineMaintainPlanStaff> lqw = buildQueryWrapper(bo);
|
||||
Page<MachineMaintainPlanStaffVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的保养计划执行人信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 保养计划执行人信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<MachineMaintainPlanStaffVo> queryList(MachineMaintainPlanStaffBo bo) {
|
||||
LambdaQueryWrapper<MachineMaintainPlanStaff> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MachineMaintainPlanStaff> buildQueryWrapper(MachineMaintainPlanStaffBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MachineMaintainPlanStaff> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(MachineMaintainPlanStaff::getId);
|
||||
lqw.eq(bo.getUserId() != null, MachineMaintainPlanStaff::getUserId, bo.getUserId());
|
||||
lqw.eq(bo.getMaintainPlanId() != null, MachineMaintainPlanStaff::getMaintainPlanId, bo.getMaintainPlanId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), MachineMaintainPlanStaff::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保养计划执行人信息
|
||||
*
|
||||
* @param bo 保养计划执行人信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MachineMaintainPlanStaffBo bo) {
|
||||
MachineMaintainPlanStaff add = MapstructUtils.convert(bo, MachineMaintainPlanStaff.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保养计划执行人信息
|
||||
*
|
||||
* @param bo 保养计划执行人信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MachineMaintainPlanStaffBo bo) {
|
||||
MachineMaintainPlanStaff update = MapstructUtils.convert(bo, MachineMaintainPlanStaff.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MachineMaintainPlanStaff 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,137 @@
|
||||
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.MachineMaintainTaskDetailBo;
|
||||
import org.dromara.property.domain.vo.MachineMaintainTaskDetailVo;
|
||||
import org.dromara.property.domain.MachineMaintainTaskDetail;
|
||||
import org.dromara.property.mapper.MachineMaintainTaskDetailMapper;
|
||||
import org.dromara.property.service.IMachineMaintainTaskDetailService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 设备保养任务明细Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MachineMaintainTaskDetailServiceImpl implements IMachineMaintainTaskDetailService {
|
||||
|
||||
private final MachineMaintainTaskDetailMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询设备保养任务明细
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备保养任务明细
|
||||
*/
|
||||
@Override
|
||||
public MachineMaintainTaskDetailVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询设备保养任务明细列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备保养任务明细分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MachineMaintainTaskDetailVo> queryPageList(MachineMaintainTaskDetailBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MachineMaintainTaskDetail> lqw = buildQueryWrapper(bo);
|
||||
Page<MachineMaintainTaskDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备保养任务明细列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备保养任务明细列表
|
||||
*/
|
||||
@Override
|
||||
public List<MachineMaintainTaskDetailVo> queryList(MachineMaintainTaskDetailBo bo) {
|
||||
LambdaQueryWrapper<MachineMaintainTaskDetail> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MachineMaintainTaskDetail> buildQueryWrapper(MachineMaintainTaskDetailBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MachineMaintainTaskDetail> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(MachineMaintainTaskDetail::getId);
|
||||
lqw.eq(bo.getTaskId() != null, MachineMaintainTaskDetail::getTaskId, bo.getTaskId());
|
||||
lqw.eq(bo.getMachineId() != null, MachineMaintainTaskDetail::getMachineId, bo.getMachineId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSendFlag()), MachineMaintainTaskDetail::getSendFlag, bo.getSendFlag());
|
||||
lqw.eq(bo.getSortNumber() != null, MachineMaintainTaskDetail::getSortNumber, bo.getSortNumber());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getState()), MachineMaintainTaskDetail::getState, bo.getState());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), MachineMaintainTaskDetail::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备保养任务明细
|
||||
*
|
||||
* @param bo 设备保养任务明细
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MachineMaintainTaskDetailBo bo) {
|
||||
MachineMaintainTaskDetail add = MapstructUtils.convert(bo, MachineMaintainTaskDetail.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备保养任务明细
|
||||
*
|
||||
* @param bo 设备保养任务明细
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MachineMaintainTaskDetailBo bo) {
|
||||
MachineMaintainTaskDetail update = MapstructUtils.convert(bo, MachineMaintainTaskDetail.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MachineMaintainTaskDetail 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,141 @@
|
||||
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.MachineMaintainTaskBo;
|
||||
import org.dromara.property.domain.vo.MachineMaintainTaskVo;
|
||||
import org.dromara.property.domain.MachineMaintainTask;
|
||||
import org.dromara.property.mapper.MachineMaintainTaskMapper;
|
||||
import org.dromara.property.service.IMachineMaintainTaskService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 设备保养任务Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MachineMaintainTaskServiceImpl implements IMachineMaintainTaskService {
|
||||
|
||||
private final MachineMaintainTaskMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询设备保养任务
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备保养任务
|
||||
*/
|
||||
@Override
|
||||
public MachineMaintainTaskVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询设备保养任务列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备保养任务分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MachineMaintainTaskVo> queryPageList(MachineMaintainTaskBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MachineMaintainTask> lqw = buildQueryWrapper(bo);
|
||||
Page<MachineMaintainTaskVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备保养任务列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备保养任务列表
|
||||
*/
|
||||
@Override
|
||||
public List<MachineMaintainTaskVo> queryList(MachineMaintainTaskBo bo) {
|
||||
LambdaQueryWrapper<MachineMaintainTask> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MachineMaintainTask> buildQueryWrapper(MachineMaintainTaskBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MachineMaintainTask> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(MachineMaintainTask::getId);
|
||||
lqw.eq(bo.getMaintainPlanId() != null, MachineMaintainTask::getMaintainPlanId, bo.getMaintainPlanId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMaintainTaskNo()), MachineMaintainTask::getMaintainTaskNo, bo.getMaintainTaskNo());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPlanUserId()), MachineMaintainTask::getPlanUserId, bo.getPlanUserId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getActUserId()), MachineMaintainTask::getActUserId, bo.getActUserId());
|
||||
lqw.eq(bo.getActInsTime() != null, MachineMaintainTask::getActInsTime, bo.getActInsTime());
|
||||
lqw.eq(bo.getPlanStartTime() != null, MachineMaintainTask::getPlanStartTime, bo.getPlanStartTime());
|
||||
lqw.eq(bo.getPlanEndTime() != null, MachineMaintainTask::getPlanEndTime, bo.getPlanEndTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTaskType()), MachineMaintainTask::getTaskType, bo.getTaskType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTransferDesc()), MachineMaintainTask::getTransferDesc, bo.getTransferDesc());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), MachineMaintainTask::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备保养任务
|
||||
*
|
||||
* @param bo 设备保养任务
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MachineMaintainTaskBo bo) {
|
||||
MachineMaintainTask add = MapstructUtils.convert(bo, MachineMaintainTask.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备保养任务
|
||||
*
|
||||
* @param bo 设备保养任务
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MachineMaintainTaskBo bo) {
|
||||
MachineMaintainTask update = MapstructUtils.convert(bo, MachineMaintainTask.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MachineMaintainTask 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,143 @@
|
||||
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.MachineBo;
|
||||
import org.dromara.property.domain.vo.MachineVo;
|
||||
import org.dromara.property.domain.Machine;
|
||||
import org.dromara.property.mapper.MachineMapper;
|
||||
import org.dromara.property.service.IMachineService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 设备列表Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MachineServiceImpl implements IMachineService {
|
||||
|
||||
private final MachineMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询设备列表
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备列表
|
||||
*/
|
||||
@Override
|
||||
public MachineVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询设备列表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备列表分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MachineVo> queryPageList(MachineBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<Machine> lqw = buildQueryWrapper(bo);
|
||||
Page<MachineVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备列表列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备列表列表
|
||||
*/
|
||||
@Override
|
||||
public List<MachineVo> queryList(MachineBo bo) {
|
||||
LambdaQueryWrapper<Machine> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<Machine> buildQueryWrapper(MachineBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<Machine> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(Machine::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getMachineName()), Machine::getMachineName, bo.getMachineName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMachineCode()), Machine::getMachineCode, bo.getMachineCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMachineBrand()), Machine::getMachineBrand, bo.getMachineBrand());
|
||||
lqw.eq(bo.getMachineTypeId() != null, Machine::getMachineTypeId, bo.getMachineTypeId());
|
||||
lqw.eq(bo.getLocationId() != null, Machine::getLocationId, bo.getLocationId());
|
||||
lqw.eq(bo.getPurchasePrice() != null, Machine::getPurchasePrice, bo.getPurchasePrice());
|
||||
lqw.eq(bo.getActivationTime() != null, Machine::getActivationTime, bo.getActivationTime());
|
||||
lqw.eq(bo.getDeadline() != null, Machine::getDeadline, bo.getDeadline());
|
||||
lqw.eq(bo.getServiceLife() != null, Machine::getServiceLife, bo.getServiceLife());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMaintenanceCycle()), Machine::getMaintenanceCycle, bo.getMaintenanceCycle());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getState()), Machine::getState, bo.getState());
|
||||
lqw.eq(bo.getPersonId() != null, Machine::getPersonId, bo.getPersonId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备列表
|
||||
*
|
||||
* @param bo 设备列表
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MachineBo bo) {
|
||||
Machine add = MapstructUtils.convert(bo, Machine.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备列表
|
||||
*
|
||||
* @param bo 设备列表
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MachineBo bo) {
|
||||
Machine update = MapstructUtils.convert(bo, Machine.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(Machine 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,188 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
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.vo.MachineTypeTreeVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.MachineTypeBo;
|
||||
import org.dromara.property.domain.vo.MachineTypeVo;
|
||||
import org.dromara.property.domain.MachineType;
|
||||
import org.dromara.property.mapper.MachineTypeMapper;
|
||||
import org.dromara.property.service.IMachineTypeService;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 设备类型Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-07-16
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class MachineTypeServiceImpl implements IMachineTypeService {
|
||||
|
||||
private final MachineTypeMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询设备类型
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 设备类型
|
||||
*/
|
||||
@Override
|
||||
public MachineTypeVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询设备类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 设备类型分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<MachineTypeVo> queryPageList(MachineTypeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<MachineType> lqw = buildQueryWrapper(bo);
|
||||
Page<MachineTypeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的设备类型列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 设备类型列表
|
||||
*/
|
||||
@Override
|
||||
public List<MachineTypeVo> queryList(MachineTypeBo bo) {
|
||||
LambdaQueryWrapper<MachineType> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<MachineType> buildQueryWrapper(MachineTypeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<MachineType> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(MachineType::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getMachineTypeName()), MachineType::getMachineTypeName, bo.getMachineTypeName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMachineTypeCode()), MachineType::getMachineTypeCode, bo.getMachineTypeCode());
|
||||
lqw.eq(bo.getParentTypeId() != null, MachineType::getParentTypeId, bo.getParentTypeId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getIsEnable()), MachineType::getIsEnable, bo.getIsEnable());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSearchValue()), MachineType::getSearchValue, bo.getSearchValue());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备类型
|
||||
*
|
||||
* @param bo 设备类型
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(MachineTypeBo bo) {
|
||||
MachineType add = MapstructUtils.convert(bo, MachineType.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备类型
|
||||
*
|
||||
* @param bo 设备类型
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(MachineTypeBo bo) {
|
||||
MachineType update = MapstructUtils.convert(bo, MachineType.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(MachineType entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除设备类型信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
/**
|
||||
* 获取设备类型树列表
|
||||
*
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<MachineTypeTreeVo> selectmachineTypeList(MachineTypeBo type) {
|
||||
LambdaQueryWrapper<MachineType> lqw = buildQueryWrapper(type);
|
||||
List<MachineTypeVo> machineTypeVoList = baseMapper.selectVoList(lqw);
|
||||
if (CollUtil.isEmpty(machineTypeVoList)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<MachineTypeTreeVo> machineTypeTreeVoList = BeanUtil.copyToList(machineTypeVoList, MachineTypeTreeVo.class);
|
||||
// 2. 构建树结构
|
||||
return buildMachineTypeTree(machineTypeTreeVoList);
|
||||
|
||||
}
|
||||
/**
|
||||
* 构建设备类型树
|
||||
* @param nodeList 所有节点
|
||||
* @return 树形结构列表
|
||||
*/
|
||||
private List<MachineTypeTreeVo> buildMachineTypeTree(List<MachineTypeTreeVo> nodeList) {
|
||||
if (nodeList == null || nodeList.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
Map<Long, MachineTypeTreeVo> nodeMap = new HashMap<>();
|
||||
List<MachineTypeTreeVo> treeList = new ArrayList<>();
|
||||
// 初始化所有节点的 children,并放入 map 中
|
||||
for (MachineTypeTreeVo node : nodeList) {
|
||||
node.setChildren(new ArrayList<>());
|
||||
nodeMap.put(node.getId(), node);
|
||||
}
|
||||
// 组装父子关系
|
||||
for (MachineTypeTreeVo node : nodeList) {
|
||||
Long parentId = node.getParentTypeId();
|
||||
|
||||
if (parentId == null || parentId.equals(0L)) {
|
||||
// 根节点:加入树列表
|
||||
treeList.add(node);
|
||||
} else {
|
||||
// 子节点:尝试找到父节点并加入其 children
|
||||
MachineTypeTreeVo parentNode = nodeMap.get(parentId);
|
||||
if (parentNode != null) {
|
||||
parentNode.getChildren().add(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
return treeList;
|
||||
}}
|
@@ -18,6 +18,7 @@ import org.dromara.property.mapper.TbFloorMapper;
|
||||
import org.dromara.property.service.ITbFloorService;
|
||||
import org.dromara.property.service.ITbUnitService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@@ -94,18 +95,25 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(TbFloorBo bo) {
|
||||
// 验证单元是否存在
|
||||
TbUnitVo tbUnitVo = tbUnitService.queryById(bo.getUnitId());
|
||||
Assert.notNull(tbUnitVo, "单元:{},不存在。", bo.getUnitId());
|
||||
|
||||
// 验证同一单元楼层是否已经存在
|
||||
LambdaQueryWrapper<TbFloor> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(TbFloor::getUnitId, bo.getUnitId())
|
||||
.eq(TbFloor::getFloorNumber, bo.getFloorNumber());
|
||||
boolean numberExists = baseMapper.selectCount(lqw) > 0;
|
||||
Assert.isFalse(numberExists, "单元:{},楼层:{}已存在。", bo.getUnitId(), bo.getFloorNumber());
|
||||
|
||||
TbFloor add = MapstructUtils.convert(bo, TbFloor.class);
|
||||
add.setCommunityId(tbUnitVo.getCommunityId());
|
||||
add.setBuildingId(tbUnitVo.getBuildingId());
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
Assert.isTrue(flag, "新增楼层失败");
|
||||
return flag;
|
||||
}
|
||||
|
||||
@@ -148,4 +156,17 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
public List<TbFloorVo> queryAll() {
|
||||
return baseMapper.selectVoList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据单元ID查询楼层
|
||||
*
|
||||
* @param unitId 单元ID
|
||||
* @return 楼层
|
||||
*/
|
||||
@Override
|
||||
public List<TbFloorVo> queryByUnitId(Long unitId){
|
||||
LambdaQueryWrapper<TbFloor> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(TbFloor::getUnitId, unitId);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
}
|
||||
|
@@ -1,54 +1,57 @@
|
||||
|
||||
package org.dromara.property.tasks;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.property.domain.InspectionPlanStaff;
|
||||
import org.dromara.property.domain.InspectionTask;
|
||||
import org.dromara.property.domain.bo.InspectionPlanBo;
|
||||
import org.dromara.property.domain.vo.InspectionPlanStaffVo;
|
||||
import org.dromara.property.domain.vo.InspectionPlanVo;
|
||||
import org.dromara.property.domain.vo.ResidentPersonVo;
|
||||
import org.dromara.property.mapper.InspectionPlanStaffMapper;
|
||||
import org.dromara.property.mapper.InspectionTaskMapper;
|
||||
import org.dromara.property.mapper.ResidentPersonMapper;
|
||||
import org.dromara.property.service.IInspectionPlanService;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.dromara.common.mybatis.core.mapper.BaseMapperPlus.log;
|
||||
import static org.dromara.property.domain.enums.InspectionPlanPeriodEnum.MONTHANDDAY;
|
||||
import static org.dromara.property.domain.enums.InspectionPlanPeriodEnum.WEEK;
|
||||
|
||||
/**
|
||||
* @Author:yuyongle
|
||||
* @Date:2025/7/11 15:28
|
||||
* @Description: 巡检任务定时处理器
|
||||
**/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
//@Validated
|
||||
//@Component
|
||||
//@RequiredArgsConstructor
|
||||
//@RestController
|
||||
//@RequestMapping("/task")
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/task")
|
||||
public class InspectionTasks {
|
||||
|
||||
private final IInspectionPlanService inspectionPlanService;
|
||||
private final InspectionPlanStaffMapper inspectionPlanStaffMapper;
|
||||
private final InspectionTaskMapper inspectionTaskMapper;
|
||||
|
||||
private final ResidentPersonMapper residentPersonMapper;
|
||||
// 通过巡检计划定时生成巡检任务
|
||||
@Scheduled(cron = "0 0 2 * * ?")
|
||||
@PostConstruct
|
||||
//@GetMapping("/taskId")
|
||||
//@Scheduled(cron = "0 0 2 * * ?")
|
||||
//@PostConstruct
|
||||
@GetMapping("/taskId")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void doInspectionPianTask() {
|
||||
// 查询所有启用状态的巡检计划
|
||||
@@ -92,7 +95,14 @@ public class InspectionTasks {
|
||||
* @param plan 巡检计划信息
|
||||
*/
|
||||
private void handleMonthlyDailyPlan(InspectionPlanVo plan) {
|
||||
|
||||
LambdaQueryWrapper<InspectionPlanStaff> staffQueryWrapper = Wrappers.lambdaQuery();
|
||||
staffQueryWrapper .eq(InspectionPlanStaff::getInspectionPlanId, plan.getId());
|
||||
//查询该计划巡查人员
|
||||
List<InspectionPlanStaffVo> inspectionPlanStaffVos = inspectionPlanStaffMapper.selectVoList(staffQueryWrapper);
|
||||
List<Long> userIdList = inspectionPlanStaffVos.stream().map(vo -> vo.getUserId())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<ResidentPersonVo> residentPersonVoList = residentPersonMapper.selectVoByIds(userIdList);
|
||||
// 使用Optional安全处理可能为null的对象
|
||||
Optional.ofNullable(plan).ifPresent(p -> {
|
||||
DateTime today = DateUtil.date();
|
||||
@@ -103,10 +113,21 @@ public class InspectionTasks {
|
||||
if(DateUtil.isIn(today, startDate, endDate)&&inspectionDayList.contains(day)){
|
||||
InspectionTask task = new InspectionTask();
|
||||
task.setInspectionPlanId(p.getId());
|
||||
task.setInspectionPlanId(p.getId());
|
||||
task.setTaskType(plan.getSignType());
|
||||
task.setPlanInsTime(startDate+"~"+p.getEndTime());
|
||||
task.setTenantId(plan.getTenantId());
|
||||
task.setStatus("0");
|
||||
if (CollectionUtil.isNotEmpty(inspectionPlanStaffVos)) {
|
||||
String userIds = residentPersonVoList.stream()
|
||||
.map(vo -> vo.getId().toString())
|
||||
.collect(Collectors.joining(","));
|
||||
|
||||
String userNames = residentPersonVoList.stream()
|
||||
.map(vo -> vo.getUserName())
|
||||
.collect(Collectors.joining(","));
|
||||
task.setPlanUserId(ObjectUtil.isNotEmpty(userIds)?userIds:"");
|
||||
task.setPlanUserName(ObjectUtil.isNotEmpty(userNames)?userNames:"");
|
||||
}
|
||||
inspectionTaskMapper.insert(task);
|
||||
}
|
||||
});
|
||||
@@ -116,7 +137,10 @@ public class InspectionTasks {
|
||||
* @param plan 巡检计划信息
|
||||
*/
|
||||
private void handleWeeklyDailyPlan(InspectionPlanVo plan) {
|
||||
|
||||
LambdaQueryWrapper<InspectionPlanStaff> staffQueryWrapper = Wrappers.lambdaQuery();
|
||||
staffQueryWrapper .eq(InspectionPlanStaff::getInspectionPlanId, plan.getId());
|
||||
//查询该计划巡查人员
|
||||
List<InspectionPlanStaffVo> inspectionPlanStaffVos = inspectionPlanStaffMapper.selectVoList(staffQueryWrapper);
|
||||
// 使用Optional安全处理可能为null的对象
|
||||
Optional.ofNullable(plan).ifPresent(p -> {
|
||||
DateTime today = DateUtil.date();
|
||||
@@ -130,7 +154,23 @@ public class InspectionTasks {
|
||||
task.setInspectionPlanId(p.getId());
|
||||
task.setTaskType(plan.getSignType());
|
||||
task.setPlanInsTime(startDate+"~"+p.getEndTime());
|
||||
task.setTenantId(plan.getTenantId());
|
||||
task.setStatus("0");
|
||||
if (CollectionUtil.isNotEmpty(inspectionPlanStaffVos)) {
|
||||
String userIds = inspectionPlanStaffVos.stream()
|
||||
.map(vo -> vo.getUserId().toString())
|
||||
.collect(Collectors.joining(","));
|
||||
|
||||
String userNames = inspectionPlanStaffVos.stream()
|
||||
.map(InspectionPlanStaffVo::getUserName)
|
||||
.collect(Collectors.joining(","));
|
||||
|
||||
task.setPlanUserId(userIds);
|
||||
task.setPlanUserName(userNames);
|
||||
} else {
|
||||
task.setPlanUserId("");
|
||||
task.setPlanUserName("");
|
||||
}
|
||||
inspectionTaskMapper.insert(task);
|
||||
|
||||
}
|
||||
|
@@ -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.MachineTypeMapper">
|
||||
|
||||
</mapper>
|
@@ -3,7 +3,10 @@ package org.dromara.sis.runner;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.utils.SpringUtils;
|
||||
import org.dromara.property.api.RemoteFloorService;
|
||||
import org.dromara.property.api.domain.vo.RemoteFloorVo;
|
||||
import org.dromara.sis.domain.bo.SisDeviceManageBo;
|
||||
import org.dromara.sis.domain.vo.SisDeviceManageVo;
|
||||
import org.dromara.sis.domain.vo.SisElevatorInfoVo;
|
||||
@@ -16,7 +19,6 @@ import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@@ -28,6 +30,9 @@ public class HikDeviceApplicationRunner implements ApplicationRunner {
|
||||
private final ISisDeviceManageService deviceManageService;
|
||||
private final ISisElevatorInfoService elevatorInfoService;
|
||||
|
||||
@DubboReference
|
||||
private RemoteFloorService remoteFloorService;
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
// 先布放,在登录
|
||||
@@ -47,14 +52,14 @@ public class HikDeviceApplicationRunner implements ApplicationRunner {
|
||||
sisElevatorInfoVos.forEach(item -> {
|
||||
// 执行设备登录操作
|
||||
HikApiService.getInstance().login(item.getControlIp(), item.getControlPort().shortValue(), item.getControlAccount(), item.getControlPwd());
|
||||
// 根据建筑ID获取楼层信息
|
||||
// SisFloorInfoVo floorInfo = floorInfoService.queryByBuildingId(item.getBuildingId());
|
||||
// 获取楼层数组
|
||||
// List<Integer> layerArray = generateFloorArray(floorInfo.getMinLayer().intValue(), floorInfo.getMaxLayer().intValue());
|
||||
// 根据单元ID获取楼层信息
|
||||
List<RemoteFloorVo> floorInfo = remoteFloorService.queryByUnitId(item.getUnitId());
|
||||
|
||||
// 下发权限
|
||||
// for (int i = 0; i < layerArray.size(); i++) {
|
||||
// HikApiService.getInstance().controlGateway(item.getControlIp(), (i + 1), layerArray.get(i));
|
||||
// }
|
||||
for (int i = 0; i < floorInfo.size(); i++) {
|
||||
// 初始权限默认禁用状态
|
||||
HikApiService.getInstance().controlGateway(item.getControlIp(), (i + 1), 3);
|
||||
}
|
||||
});
|
||||
}
|
||||
// String ip = "192.168.24.188";
|
||||
@@ -68,27 +73,6 @@ public class HikDeviceApplicationRunner implements ApplicationRunner {
|
||||
// }
|
||||
}
|
||||
|
||||
//输入最低层,最高层,返回楼层数组
|
||||
public List<Integer> generateFloorArray(int minLayer, int maxLayer) {
|
||||
// 验证输入范围
|
||||
if (minLayer > maxLayer) {
|
||||
throw new IllegalArgumentException("最低层不能大于最高层");
|
||||
}
|
||||
|
||||
// 使用List动态收集楼层
|
||||
List<Integer> layerList = new ArrayList<>();
|
||||
|
||||
// 遍历所有楼层,跳过0层
|
||||
for (int layer = minLayer; layer <= maxLayer; layer++) {
|
||||
if (layer != 0) {
|
||||
// 初始数组赋值为3,不下发权限
|
||||
layerList.add(3);
|
||||
}
|
||||
}
|
||||
|
||||
return layerList;
|
||||
}
|
||||
|
||||
@Async
|
||||
public void hikNetCameraLogin() {
|
||||
List<SisDeviceManageVo> deviceList = deviceManageService.queryList(new SisDeviceManageBo());
|
||||
|
@@ -5,6 +5,9 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import com.sun.jna.Pointer;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.property.api.RemoteFloorService;
|
||||
import org.dromara.property.api.domain.vo.RemoteFloorVo;
|
||||
import org.dromara.sis.domain.vo.*;
|
||||
import org.dromara.sis.sdk.e8.AccessControlService;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.req.RemoteOpenDoorReq;
|
||||
@@ -15,7 +18,6 @@ import org.dromara.sis.service.*;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -33,6 +35,9 @@ public class HikAlarmCallBack implements HCNetSDK.FMSGCallBack_V31 {
|
||||
|
||||
private final AccessControlService e8AccessControlService;
|
||||
|
||||
@DubboReference
|
||||
private RemoteFloorService remoteFloorService;
|
||||
|
||||
private static final int COMM_UPLOAD_FACESNAP_RESULT = 0x1112;
|
||||
|
||||
@Override
|
||||
@@ -87,7 +92,7 @@ public class HikAlarmCallBack implements HCNetSDK.FMSGCallBack_V31 {
|
||||
Long deviceId = bindRefList.stream().filter(vo -> vo.getBindId().equals(id)).findFirst().map(SisDeviceBindRefVo::getDeviceId).orElse(null);
|
||||
SisAccessControlVo ac = accessControlService.queryById(deviceId);
|
||||
if (ac != null) {
|
||||
log.info("调用门禁服务远程开门");
|
||||
log.info("调用门禁服务远程开门,doorName:{}", ac.getAccessName());
|
||||
RemoteOpenDoorReq req = new RemoteOpenDoorReq();
|
||||
req.setType(0);
|
||||
RemoteOpenDoorReq.ControlData data = new RemoteOpenDoorReq.ControlData();
|
||||
@@ -102,44 +107,38 @@ public class HikAlarmCallBack implements HCNetSDK.FMSGCallBack_V31 {
|
||||
|
||||
|
||||
// 获取电梯ids
|
||||
// Collection<Long> eleIds = authVoList.stream().filter(vo -> vo.getDeviceType() == 2).map(SisAuthRecordVo::getDeviceId).toList();
|
||||
// if (CollUtil.isNotEmpty(eleIds)) {
|
||||
// eleIds.forEach(id -> {
|
||||
// Long deviceId = bindRefList.stream().filter(vo -> vo.getBindId().equals(id)).findFirst().map(SisDeviceBindRefVo::getDeviceId).orElse(null);
|
||||
// SisElevatorInfoVo ele = elevatorInfoService.queryById(deviceId);
|
||||
// if (ele != null) {
|
||||
// log.info("下发电梯权限");
|
||||
// // 根据建筑ID获取楼层信息
|
||||
// SisFloorInfoVo floorInfo = floorInfoService.queryByBuildingId(ele.getBuildingId());
|
||||
// // 获取电梯⇄楼层关联信息
|
||||
// List<SisElevatorFloorRefVo> floorRefList = elevatorFloorRefService.queryByElevatorId(deviceId);
|
||||
// // 获取楼层数组
|
||||
// List<Integer> layerArray = generateFloorArray(floorInfo.getMinLayer().intValue(), floorInfo.getMaxLayer().intValue());
|
||||
//
|
||||
//
|
||||
// layerArray.forEach(layer -> {
|
||||
// SisElevatorFloorRefVo floorRef = floorRefList.stream()
|
||||
// .filter(vo -> vo.getLayerNum().intValue() == layer) // 直接使用 layer
|
||||
// .findFirst()
|
||||
// .orElse(null);
|
||||
//
|
||||
// if (floorRef == null) {
|
||||
// HikApiService.getInstance().controlGateway(ele.getControlIp(), layer, 3);
|
||||
// } else {
|
||||
// HikApiService.getInstance().controlGateway(ele.getControlIp(), layer, 2);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// });
|
||||
// }
|
||||
Collection<Long> eleIds = authVoList.stream().filter(vo -> vo.getDeviceType() == 2).map(SisAuthRecordVo::getDeviceId).toList();
|
||||
if (CollUtil.isNotEmpty(eleIds)) {
|
||||
eleIds.forEach(id -> {
|
||||
Long deviceId = bindRefList.stream().filter(vo -> vo.getBindId().equals(id)).findFirst().map(SisDeviceBindRefVo::getDeviceId).orElse(null);
|
||||
SisElevatorInfoVo ele = elevatorInfoService.queryById(deviceId);
|
||||
if (ele != null) {
|
||||
log.info("下发电梯权限");
|
||||
// 根据单元ID获取楼层信息
|
||||
List<RemoteFloorVo> floorInfo = remoteFloorService.queryByUnitId(ele.getUnitId());
|
||||
// 获取电梯⇄楼层关联信息
|
||||
List<SisElevatorFloorRefVo> floorRefList = elevatorFloorRefService.queryByElevatorId(deviceId);
|
||||
// 获取楼层数组
|
||||
List<Long> layerArray = floorInfo.stream().map(RemoteFloorVo::getFloorNumber).sorted().toList();
|
||||
|
||||
layerArray.forEach(layer -> {
|
||||
SisElevatorFloorRefVo floorRef = floorRefList.stream()
|
||||
.filter(vo -> vo.getLayerNum().intValue() == layer) // 直接使用 layer
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
if (floorRef == null) {
|
||||
HikApiService.getInstance().controlGateway(ele.getControlIp(), layer.intValue(), 3);
|
||||
} else {
|
||||
HikApiService.getInstance().controlGateway(ele.getControlIp(), layer.intValue(), 2);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
log.info("权限下发执行完成,耗时:{}", System.currentTimeMillis() - s);
|
||||
|
||||
|
||||
// List<Integer> arrs = Arrays.asList(2, 2, 2, 3, 3, 3 ,3, 3, 3, 3, 3, 3, 3, 3, 3, 3);
|
||||
// List<Integer> arrs = Arrays.asList(3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
|
||||
// for (int i = 0; i < arrs.size(); i++) {
|
||||
// HikApiService.getInstance().controlGateway("192.168.24.188", (i + 1), arrs.get(i));
|
||||
// }
|
||||
// log.info("权限下发执行完成,耗时:{}", System.currentTimeMillis() - s);
|
||||
// try {
|
||||
// Thread.sleep(10000L);
|
||||
// List<Integer> ass = Arrays.asList(3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3);
|
||||
@@ -149,29 +148,9 @@ public class HikAlarmCallBack implements HCNetSDK.FMSGCallBack_V31 {
|
||||
// } catch (InterruptedException e) {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
|
||||
} else {
|
||||
log.info("未知报警类型,lCommand={}", lCommand);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//输入最低层,最高层,返回楼层数组
|
||||
public List<Integer> generateFloorArray(int minLayer, int maxLayer) {
|
||||
|
||||
// 验证输入范围
|
||||
if (minLayer > maxLayer) {
|
||||
throw new IllegalArgumentException("最低层不能大于最高层");
|
||||
}
|
||||
// 使用List动态收集楼层
|
||||
List<Integer> layerList = new ArrayList<>();
|
||||
// 遍历所有楼层,跳过0层
|
||||
for (int layer = minLayer; layer <= maxLayer; layer++) {
|
||||
if (layer != 0) {
|
||||
layerList.add(layer);
|
||||
}
|
||||
}
|
||||
|
||||
return layerList;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user