feat(eqp): 添加设备管理、参数及类型模块
- 新增设备管理域对象、业务对象、控制器、映射器及相关服务实现- 新增设备参数域对象、业务对象、控制器、映射器及相关服务实现 - 新增设备类型域对象、业务对象、控制器、映射器及相关服务实现 - 配置MyBatis XML映射文件支持新实体类字段映射- 提供完整的CRUD操作接口,包括分页查询、导出Excel等功能
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
package com.klp.mes.eqp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentManagementVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpEquipmentManagementBo;
|
||||
import com.klp.mes.eqp.service.IEqpEquipmentManagementService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备管理(合并在役和退役设备)
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/eqp/equipmentManagement")
|
||||
public class EqpEquipmentManagementController extends BaseController {
|
||||
|
||||
private final IEqpEquipmentManagementService iEqpEquipmentManagementService;
|
||||
|
||||
/**
|
||||
* 查询设备管理(合并在役和退役设备)列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EqpEquipmentManagementVo> list(EqpEquipmentManagementBo bo, PageQuery pageQuery) {
|
||||
return iEqpEquipmentManagementService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备管理(合并在役和退役设备)列表
|
||||
*/
|
||||
@Log(title = "设备管理(合并在役和退役设备)", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(EqpEquipmentManagementBo bo, HttpServletResponse response) {
|
||||
List<EqpEquipmentManagementVo> list = iEqpEquipmentManagementService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设备管理(合并在役和退役设备)", EqpEquipmentManagementVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备管理(合并在役和退役设备)详细信息
|
||||
*
|
||||
* @param equipmentId 主键
|
||||
*/
|
||||
@GetMapping("/{equipmentId}")
|
||||
public R<EqpEquipmentManagementVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long equipmentId) {
|
||||
return R.ok(iEqpEquipmentManagementService.queryById(equipmentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备管理(合并在役和退役设备)
|
||||
*/
|
||||
@Log(title = "设备管理(合并在役和退役设备)", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody EqpEquipmentManagementBo bo) {
|
||||
return toAjax(iEqpEquipmentManagementService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备管理(合并在役和退役设备)
|
||||
*/
|
||||
@Log(title = "设备管理(合并在役和退役设备)", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EqpEquipmentManagementBo bo) {
|
||||
return toAjax(iEqpEquipmentManagementService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备管理(合并在役和退役设备)
|
||||
*
|
||||
* @param equipmentIds 主键串
|
||||
*/
|
||||
@Log(title = "设备管理(合并在役和退役设备)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{equipmentIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] equipmentIds) {
|
||||
return toAjax(iEqpEquipmentManagementService.deleteWithValidByIds(Arrays.asList(equipmentIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.mes.eqp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentParamVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpEquipmentParamBo;
|
||||
import com.klp.mes.eqp.service.IEqpEquipmentParamService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备参数
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/eqp/equipmentParam")
|
||||
public class EqpEquipmentParamController extends BaseController {
|
||||
|
||||
private final IEqpEquipmentParamService iEqpEquipmentParamService;
|
||||
|
||||
/**
|
||||
* 查询设备参数列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EqpEquipmentParamVo> list(EqpEquipmentParamBo bo, PageQuery pageQuery) {
|
||||
return iEqpEquipmentParamService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备参数列表
|
||||
*/
|
||||
@Log(title = "设备参数", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(EqpEquipmentParamBo bo, HttpServletResponse response) {
|
||||
List<EqpEquipmentParamVo> list = iEqpEquipmentParamService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设备参数", EqpEquipmentParamVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备参数详细信息
|
||||
*
|
||||
* @param paramId 主键
|
||||
*/
|
||||
@GetMapping("/{paramId}")
|
||||
public R<EqpEquipmentParamVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long paramId) {
|
||||
return R.ok(iEqpEquipmentParamService.queryById(paramId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备参数
|
||||
*/
|
||||
@Log(title = "设备参数", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody EqpEquipmentParamBo bo) {
|
||||
return toAjax(iEqpEquipmentParamService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备参数
|
||||
*/
|
||||
@Log(title = "设备参数", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EqpEquipmentParamBo bo) {
|
||||
return toAjax(iEqpEquipmentParamService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备参数
|
||||
*
|
||||
* @param paramIds 主键串
|
||||
*/
|
||||
@Log(title = "设备参数", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{paramIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] paramIds) {
|
||||
return toAjax(iEqpEquipmentParamService.deleteWithValidByIds(Arrays.asList(paramIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.mes.eqp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentTypeVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpEquipmentTypeBo;
|
||||
import com.klp.mes.eqp.service.IEqpEquipmentTypeService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/eqp/equipmentType")
|
||||
public class EqpEquipmentTypeController extends BaseController {
|
||||
|
||||
private final IEqpEquipmentTypeService iEqpEquipmentTypeService;
|
||||
|
||||
/**
|
||||
* 查询设备类型列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EqpEquipmentTypeVo> list(EqpEquipmentTypeBo bo, PageQuery pageQuery) {
|
||||
return iEqpEquipmentTypeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备类型列表
|
||||
*/
|
||||
@Log(title = "设备类型", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(EqpEquipmentTypeBo bo, HttpServletResponse response) {
|
||||
List<EqpEquipmentTypeVo> list = iEqpEquipmentTypeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设备类型", EqpEquipmentTypeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备类型详细信息
|
||||
*
|
||||
* @param typeId 主键
|
||||
*/
|
||||
@GetMapping("/{typeId}")
|
||||
public R<EqpEquipmentTypeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long typeId) {
|
||||
return R.ok(iEqpEquipmentTypeService.queryById(typeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备类型
|
||||
*/
|
||||
@Log(title = "设备类型", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody EqpEquipmentTypeBo bo) {
|
||||
return toAjax(iEqpEquipmentTypeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备类型
|
||||
*/
|
||||
@Log(title = "设备类型", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EqpEquipmentTypeBo bo) {
|
||||
return toAjax(iEqpEquipmentTypeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备类型
|
||||
*
|
||||
* @param typeIds 主键串
|
||||
*/
|
||||
@Log(title = "设备类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{typeIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] typeIds) {
|
||||
return toAjax(iEqpEquipmentTypeService.deleteWithValidByIds(Arrays.asList(typeIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.mes.eqp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.eqp.domain.vo.EqpInspectedEquipmentVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpInspectedEquipmentBo;
|
||||
import com.klp.mes.eqp.service.IEqpInspectedEquipmentService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 待检设备
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/eqp/inspectedEquipment")
|
||||
public class EqpInspectedEquipmentController extends BaseController {
|
||||
|
||||
private final IEqpInspectedEquipmentService iEqpInspectedEquipmentService;
|
||||
|
||||
/**
|
||||
* 查询待检设备列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EqpInspectedEquipmentVo> list(EqpInspectedEquipmentBo bo, PageQuery pageQuery) {
|
||||
return iEqpInspectedEquipmentService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出待检设备列表
|
||||
*/
|
||||
@Log(title = "待检设备", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(EqpInspectedEquipmentBo bo, HttpServletResponse response) {
|
||||
List<EqpInspectedEquipmentVo> list = iEqpInspectedEquipmentService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "待检设备", EqpInspectedEquipmentVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取待检设备详细信息
|
||||
*
|
||||
* @param inspectId 主键
|
||||
*/
|
||||
@GetMapping("/{inspectId}")
|
||||
public R<EqpInspectedEquipmentVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long inspectId) {
|
||||
return R.ok(iEqpInspectedEquipmentService.queryById(inspectId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增待检设备
|
||||
*/
|
||||
@Log(title = "待检设备", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody EqpInspectedEquipmentBo bo) {
|
||||
return toAjax(iEqpInspectedEquipmentService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改待检设备
|
||||
*/
|
||||
@Log(title = "待检设备", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EqpInspectedEquipmentBo bo) {
|
||||
return toAjax(iEqpInspectedEquipmentService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除待检设备
|
||||
*
|
||||
* @param inspectIds 主键串
|
||||
*/
|
||||
@Log(title = "待检设备", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{inspectIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] inspectIds) {
|
||||
return toAjax(iEqpInspectedEquipmentService.deleteWithValidByIds(Arrays.asList(inspectIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.mes.eqp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.eqp.domain.vo.EqpInspectionRecordVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpInspectionRecordBo;
|
||||
import com.klp.mes.eqp.service.IEqpInspectionRecordService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 检修记录
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/eqp/inspectionRecord")
|
||||
public class EqpInspectionRecordController extends BaseController {
|
||||
|
||||
private final IEqpInspectionRecordService iEqpInspectionRecordService;
|
||||
|
||||
/**
|
||||
* 查询检修记录列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EqpInspectionRecordVo> list(EqpInspectionRecordBo bo, PageQuery pageQuery) {
|
||||
return iEqpInspectionRecordService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出检修记录列表
|
||||
*/
|
||||
@Log(title = "检修记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(EqpInspectionRecordBo bo, HttpServletResponse response) {
|
||||
List<EqpInspectionRecordVo> list = iEqpInspectionRecordService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "检修记录", EqpInspectionRecordVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检修记录详细信息
|
||||
*
|
||||
* @param recordId 主键
|
||||
*/
|
||||
@GetMapping("/{recordId}")
|
||||
public R<EqpInspectionRecordVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long recordId) {
|
||||
return R.ok(iEqpInspectionRecordService.queryById(recordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检修记录
|
||||
*/
|
||||
@Log(title = "检修记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody EqpInspectionRecordBo bo) {
|
||||
return toAjax(iEqpInspectionRecordService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检修记录
|
||||
*/
|
||||
@Log(title = "检修记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EqpInspectionRecordBo bo) {
|
||||
return toAjax(iEqpInspectionRecordService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检修记录
|
||||
*
|
||||
* @param recordIds 主键串
|
||||
*/
|
||||
@Log(title = "检修记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{recordIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] recordIds) {
|
||||
return toAjax(iEqpInspectionRecordService.deleteWithValidByIds(Arrays.asList(recordIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.mes.eqp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.eqp.domain.vo.EqpSparePartVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpSparePartBo;
|
||||
import com.klp.mes.eqp.service.IEqpSparePartService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 备品备件
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/eqp/sparePart")
|
||||
public class EqpSparePartController extends BaseController {
|
||||
|
||||
private final IEqpSparePartService iEqpSparePartService;
|
||||
|
||||
/**
|
||||
* 查询备品备件列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EqpSparePartVo> list(EqpSparePartBo bo, PageQuery pageQuery) {
|
||||
return iEqpSparePartService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出备品备件列表
|
||||
*/
|
||||
@Log(title = "备品备件", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(EqpSparePartBo bo, HttpServletResponse response) {
|
||||
List<EqpSparePartVo> list = iEqpSparePartService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "备品备件", EqpSparePartVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取备品备件详细信息
|
||||
*
|
||||
* @param partId 主键
|
||||
*/
|
||||
@GetMapping("/{partId}")
|
||||
public R<EqpSparePartVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long partId) {
|
||||
return R.ok(iEqpSparePartService.queryById(partId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增备品备件
|
||||
*/
|
||||
@Log(title = "备品备件", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody EqpSparePartBo bo) {
|
||||
return toAjax(iEqpSparePartService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改备品备件
|
||||
*/
|
||||
@Log(title = "备品备件", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EqpSparePartBo bo) {
|
||||
return toAjax(iEqpSparePartService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除备品备件
|
||||
*
|
||||
* @param partIds 主键串
|
||||
*/
|
||||
@Log(title = "备品备件", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{partIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] partIds) {
|
||||
return toAjax(iEqpSparePartService.deleteWithValidByIds(Arrays.asList(partIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.mes.eqp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.eqp.domain.vo.EqpSparePartsChangeVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpSparePartsChangeBo;
|
||||
import com.klp.mes.eqp.service.IEqpSparePartsChangeService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 备品备件变动记录
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/eqp/sparePartsChange")
|
||||
public class EqpSparePartsChangeController extends BaseController {
|
||||
|
||||
private final IEqpSparePartsChangeService iEqpSparePartsChangeService;
|
||||
|
||||
/**
|
||||
* 查询备品备件变动记录列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EqpSparePartsChangeVo> list(EqpSparePartsChangeBo bo, PageQuery pageQuery) {
|
||||
return iEqpSparePartsChangeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出备品备件变动记录列表
|
||||
*/
|
||||
@Log(title = "备品备件变动记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(EqpSparePartsChangeBo bo, HttpServletResponse response) {
|
||||
List<EqpSparePartsChangeVo> list = iEqpSparePartsChangeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "备品备件变动记录", EqpSparePartsChangeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取备品备件变动记录详细信息
|
||||
*
|
||||
* @param changeId 主键
|
||||
*/
|
||||
@GetMapping("/{changeId}")
|
||||
public R<EqpSparePartsChangeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long changeId) {
|
||||
return R.ok(iEqpSparePartsChangeService.queryById(changeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增备品备件变动记录
|
||||
*/
|
||||
@Log(title = "备品备件变动记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody EqpSparePartsChangeBo bo) {
|
||||
return toAjax(iEqpSparePartsChangeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改备品备件变动记录
|
||||
*/
|
||||
@Log(title = "备品备件变动记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EqpSparePartsChangeBo bo) {
|
||||
return toAjax(iEqpSparePartsChangeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除备品备件变动记录
|
||||
*
|
||||
* @param changeIds 主键串
|
||||
*/
|
||||
@Log(title = "备品备件变动记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{changeIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] changeIds) {
|
||||
return toAjax(iEqpSparePartsChangeService.deleteWithValidByIds(Arrays.asList(changeIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.klp.mes.eqp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.klp.common.annotation.RepeatSubmit;
|
||||
import com.klp.common.annotation.Log;
|
||||
import com.klp.common.core.controller.BaseController;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.domain.R;
|
||||
import com.klp.common.core.validate.AddGroup;
|
||||
import com.klp.common.core.validate.EditGroup;
|
||||
import com.klp.common.enums.BusinessType;
|
||||
import com.klp.common.utils.poi.ExcelUtil;
|
||||
import com.klp.mes.eqp.domain.vo.EqpTypeParamVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpTypeParamBo;
|
||||
import com.klp.mes.eqp.service.IEqpTypeParamService;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备类型参数(某类设备的通用参数标准)
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/eqp/typeParam")
|
||||
public class EqpTypeParamController extends BaseController {
|
||||
|
||||
private final IEqpTypeParamService iEqpTypeParamService;
|
||||
|
||||
/**
|
||||
* 查询设备类型参数(某类设备的通用参数标准)列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<EqpTypeParamVo> list(EqpTypeParamBo bo, PageQuery pageQuery) {
|
||||
return iEqpTypeParamService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备类型参数(某类设备的通用参数标准)列表
|
||||
*/
|
||||
@Log(title = "设备类型参数(某类设备的通用参数标准)", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(EqpTypeParamBo bo, HttpServletResponse response) {
|
||||
List<EqpTypeParamVo> list = iEqpTypeParamService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "设备类型参数(某类设备的通用参数标准)", EqpTypeParamVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备类型参数(某类设备的通用参数标准)详细信息
|
||||
*
|
||||
* @param typeParamId 主键
|
||||
*/
|
||||
@GetMapping("/{typeParamId}")
|
||||
public R<EqpTypeParamVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long typeParamId) {
|
||||
return R.ok(iEqpTypeParamService.queryById(typeParamId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备类型参数(某类设备的通用参数标准)
|
||||
*/
|
||||
@Log(title = "设备类型参数(某类设备的通用参数标准)", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody EqpTypeParamBo bo) {
|
||||
return toAjax(iEqpTypeParamService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备类型参数(某类设备的通用参数标准)
|
||||
*/
|
||||
@Log(title = "设备类型参数(某类设备的通用参数标准)", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody EqpTypeParamBo bo) {
|
||||
return toAjax(iEqpTypeParamService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备类型参数(某类设备的通用参数标准)
|
||||
*
|
||||
* @param typeParamIds 主键串
|
||||
*/
|
||||
@Log(title = "设备类型参数(某类设备的通用参数标准)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{typeParamIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] typeParamIds) {
|
||||
return toAjax(iEqpTypeParamService.deleteWithValidByIds(Arrays.asList(typeParamIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package com.klp.mes.eqp.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 设备管理(合并在役和退役设备)对象 eqp_equipment_management
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("eqp_equipment_management")
|
||||
public class EqpEquipmentManagement extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
@TableId(value = "equipment_id")
|
||||
private Long equipmentId;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String equipmentName;
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
private String model;
|
||||
/**
|
||||
* 设备类型ID
|
||||
*/
|
||||
private Long typeId;
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String equipmentCode;
|
||||
/**
|
||||
* 设备位置(在役时有效)
|
||||
*/
|
||||
private String location;
|
||||
/**
|
||||
* 设备数量
|
||||
*/
|
||||
private Long quantity;
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String manager;
|
||||
/**
|
||||
* 图片路径
|
||||
*/
|
||||
private String ossId;
|
||||
/**
|
||||
* 设备状态(in_service=在役,retired=退役)
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 停用原因(退役时必填)
|
||||
*/
|
||||
private String stopReason;
|
||||
/**
|
||||
* 设备去向(退役时必填)
|
||||
*/
|
||||
private String equipmentDestination;
|
||||
/**
|
||||
* 启用时间
|
||||
*/
|
||||
private Date enableTime;
|
||||
/**
|
||||
* 退役时间(状态变更为退役时记录)
|
||||
*/
|
||||
private Date retireTime;
|
||||
/**
|
||||
* 删除标志(0=存在 2=删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.klp.mes.eqp.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* 设备参数对象 eqp_equipment_param
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("eqp_equipment_param")
|
||||
public class EqpEquipmentParam extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 参数ID
|
||||
*/
|
||||
@TableId(value = "param_id")
|
||||
private Long paramId;
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
private String paramName;
|
||||
/**
|
||||
* 关联设备ID
|
||||
*/
|
||||
private Long equipmentId;
|
||||
/**
|
||||
* 参数类型(无需检修/离散值/连续值/范围)
|
||||
*/
|
||||
private String paramType;
|
||||
/**
|
||||
* 参数标准范围
|
||||
*/
|
||||
private String paramStandard;
|
||||
/**
|
||||
* 参数单位
|
||||
*/
|
||||
private String paramUnit;
|
||||
/**
|
||||
* 参数来源(设备/自定义/厂内标准等)
|
||||
*/
|
||||
private String paramSource;
|
||||
/**
|
||||
* 删除标志(0=存在 2=删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.klp.mes.eqp.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* 设备类型对象 eqp_equipment_type
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("eqp_equipment_type")
|
||||
public class EqpEquipmentType extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 设备类型ID
|
||||
*/
|
||||
@TableId(value = "type_id")
|
||||
private Long typeId;
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String typeName;
|
||||
/**
|
||||
* 分类描述
|
||||
*/
|
||||
private String typeDesc;
|
||||
/**
|
||||
* 删除标志(0=存在 2=删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.klp.mes.eqp.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 待检设备对象 eqp_inspected_equipment
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("eqp_inspected_equipment")
|
||||
public class EqpInspectedEquipment extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 待检ID
|
||||
*/
|
||||
@TableId(value = "inspect_id")
|
||||
private Long inspectId;
|
||||
/**
|
||||
* 关联设备ID
|
||||
*/
|
||||
private Long equipmentId;
|
||||
/**
|
||||
* 计划检修时间
|
||||
*/
|
||||
private Date inspectTime;
|
||||
/**
|
||||
* 检修厂商
|
||||
*/
|
||||
private String inspectVendor;
|
||||
/**
|
||||
* 剩余检修天数
|
||||
*/
|
||||
private Long remainTime;
|
||||
/**
|
||||
* 状态(正常/临近/超期)
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 删除标志(0=存在 2=删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.klp.mes.eqp.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 检修记录对象 eqp_inspection_record
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("eqp_inspection_record")
|
||||
public class EqpInspectionRecord extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@TableId(value = "record_id")
|
||||
private Long recordId;
|
||||
/**
|
||||
* 关联设备ID
|
||||
*/
|
||||
private Long equipmentId;
|
||||
/**
|
||||
* 实际检修时间
|
||||
*/
|
||||
private Date inspectTime;
|
||||
/**
|
||||
* 检修厂商
|
||||
*/
|
||||
private String inspectVendor;
|
||||
/**
|
||||
* 检修内容
|
||||
*/
|
||||
private String inspectContent;
|
||||
/**
|
||||
* 检修结果(合格/不合格/待观察)
|
||||
*/
|
||||
private String result;
|
||||
/**
|
||||
* 删除标志(0=存在 2=删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.klp.mes.eqp.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* 备品备件对象 eqp_spare_part
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("eqp_spare_part")
|
||||
public class EqpSparePart extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 备件ID
|
||||
*/
|
||||
@TableId(value = "part_id")
|
||||
private Long partId;
|
||||
/**
|
||||
* 备件名称
|
||||
*/
|
||||
private String partName;
|
||||
/**
|
||||
* 物料品类
|
||||
*/
|
||||
private String materialCategory;
|
||||
/**
|
||||
* 备件型号
|
||||
*/
|
||||
private String model;
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
private String unit;
|
||||
/**
|
||||
* 关联设备ID(可为空,通用备件)
|
||||
*/
|
||||
private Long equipmentId;
|
||||
/**
|
||||
* 当前库存数量
|
||||
*/
|
||||
private Long quantity;
|
||||
/**
|
||||
* 删除标志(0=存在 2=删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.klp.mes.eqp.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 备品备件变动记录对象 eqp_spare_parts_change
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("eqp_spare_parts_change")
|
||||
public class EqpSparePartsChange extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 变动记录ID
|
||||
*/
|
||||
@TableId(value = "change_id")
|
||||
private Long changeId;
|
||||
/**
|
||||
* 关联备件ID
|
||||
*/
|
||||
private Long partId;
|
||||
/**
|
||||
* 变动类型(增加/减少)
|
||||
*/
|
||||
private String changeType;
|
||||
/**
|
||||
* 变动数量
|
||||
*/
|
||||
private Long changeQuantity;
|
||||
/**
|
||||
* 变动原因
|
||||
*/
|
||||
private String reason;
|
||||
/**
|
||||
* 变动时间
|
||||
*/
|
||||
private Date changeTime;
|
||||
/**
|
||||
* 删除标志(0=存在 2=删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.klp.mes.eqp.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
|
||||
/**
|
||||
* 设备类型参数(某类设备的通用参数标准)对象 eqp_type_param
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("eqp_type_param")
|
||||
public class EqpTypeParam extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 类型参数ID
|
||||
*/
|
||||
@TableId(value = "type_param_id")
|
||||
private Long typeParamId;
|
||||
/**
|
||||
* 关联设备类型ID
|
||||
*/
|
||||
private Long typeId;
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
private String paramName;
|
||||
/**
|
||||
* 参数类型(无需检修/离散值/连续值/范围)
|
||||
*/
|
||||
private String paramType;
|
||||
/**
|
||||
* 参数标准范围(该类型设备的通用标准)
|
||||
*/
|
||||
private String paramStandard;
|
||||
/**
|
||||
* 参数单位
|
||||
*/
|
||||
private String paramUnit;
|
||||
/**
|
||||
* 参数来源(行业标准/厂内标准/自定义等)
|
||||
*/
|
||||
private String paramSource;
|
||||
/**
|
||||
* 是否为该类型设备的必选参数(0=否,1=是)
|
||||
*/
|
||||
private Integer isMandatory;
|
||||
/**
|
||||
* 删除标志(0=存在 2=删除)
|
||||
*/
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package com.klp.mes.eqp.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 设备管理(合并在役和退役设备)业务对象 eqp_equipment_management
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EqpEquipmentManagementBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
private Long equipmentId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String equipmentName;
|
||||
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 设备类型ID
|
||||
*/
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String equipmentCode;
|
||||
|
||||
/**
|
||||
* 设备位置(在役时有效)
|
||||
*/
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 设备数量
|
||||
*/
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
private String manager;
|
||||
|
||||
/**
|
||||
* 图片路径
|
||||
*/
|
||||
private String ossId;
|
||||
|
||||
/**
|
||||
* 设备状态(in_service=在役,retired=退役)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 停用原因(退役时必填)
|
||||
*/
|
||||
private String stopReason;
|
||||
|
||||
/**
|
||||
* 设备去向(退役时必填)
|
||||
*/
|
||||
private String equipmentDestination;
|
||||
|
||||
/**
|
||||
* 启用时间
|
||||
*/
|
||||
private Date enableTime;
|
||||
|
||||
/**
|
||||
* 退役时间(状态变更为退役时记录)
|
||||
*/
|
||||
private Date retireTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.klp.mes.eqp.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
/**
|
||||
* 设备参数业务对象 eqp_equipment_param
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EqpEquipmentParamBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 参数ID
|
||||
*/
|
||||
private Long paramId;
|
||||
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
private String paramName;
|
||||
|
||||
/**
|
||||
* 关联设备ID
|
||||
*/
|
||||
private Long equipmentId;
|
||||
|
||||
/**
|
||||
* 参数类型(无需检修/离散值/连续值/范围)
|
||||
*/
|
||||
private String paramType;
|
||||
|
||||
/**
|
||||
* 参数标准范围
|
||||
*/
|
||||
private String paramStandard;
|
||||
|
||||
/**
|
||||
* 参数单位
|
||||
*/
|
||||
private String paramUnit;
|
||||
|
||||
/**
|
||||
* 参数来源(设备/自定义/厂内标准等)
|
||||
*/
|
||||
private String paramSource;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.klp.mes.eqp.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
/**
|
||||
* 设备类型业务对象 eqp_equipment_type
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EqpEquipmentTypeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 设备类型ID
|
||||
*/
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 分类描述
|
||||
*/
|
||||
private String typeDesc;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.klp.mes.eqp.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 待检设备业务对象 eqp_inspected_equipment
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EqpInspectedEquipmentBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 待检ID
|
||||
*/
|
||||
private Long inspectId;
|
||||
|
||||
/**
|
||||
* 关联设备ID
|
||||
*/
|
||||
private Long equipmentId;
|
||||
|
||||
/**
|
||||
* 计划检修时间
|
||||
*/
|
||||
private Date inspectTime;
|
||||
|
||||
/**
|
||||
* 检修厂商
|
||||
*/
|
||||
private String inspectVendor;
|
||||
|
||||
/**
|
||||
* 剩余检修天数
|
||||
*/
|
||||
private Long remainTime;
|
||||
|
||||
/**
|
||||
* 状态(正常/临近/超期)
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.klp.mes.eqp.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 检修记录业务对象 eqp_inspection_record
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EqpInspectionRecordBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
private Long recordId;
|
||||
|
||||
/**
|
||||
* 关联设备ID
|
||||
*/
|
||||
private Long equipmentId;
|
||||
|
||||
/**
|
||||
* 实际检修时间
|
||||
*/
|
||||
private Date inspectTime;
|
||||
|
||||
/**
|
||||
* 检修厂商
|
||||
*/
|
||||
private String inspectVendor;
|
||||
|
||||
/**
|
||||
* 检修内容
|
||||
*/
|
||||
private String inspectContent;
|
||||
|
||||
/**
|
||||
* 检修结果(合格/不合格/待观察)
|
||||
*/
|
||||
private String result;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.klp.mes.eqp.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
/**
|
||||
* 备品备件业务对象 eqp_spare_part
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EqpSparePartBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 备件ID
|
||||
*/
|
||||
private Long partId;
|
||||
|
||||
/**
|
||||
* 备件名称
|
||||
*/
|
||||
private String partName;
|
||||
|
||||
/**
|
||||
* 物料品类
|
||||
*/
|
||||
private String materialCategory;
|
||||
|
||||
/**
|
||||
* 备件型号
|
||||
*/
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 关联设备ID(可为空,通用备件)
|
||||
*/
|
||||
private Long equipmentId;
|
||||
|
||||
/**
|
||||
* 当前库存数量
|
||||
*/
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.klp.mes.eqp.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
/**
|
||||
* 备品备件变动记录业务对象 eqp_spare_parts_change
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EqpSparePartsChangeBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 变动记录ID
|
||||
*/
|
||||
private Long changeId;
|
||||
|
||||
/**
|
||||
* 关联备件ID
|
||||
*/
|
||||
private Long partId;
|
||||
|
||||
/**
|
||||
* 变动类型(增加/减少)
|
||||
*/
|
||||
private String changeType;
|
||||
|
||||
/**
|
||||
* 变动数量
|
||||
*/
|
||||
private Long changeQuantity;
|
||||
|
||||
/**
|
||||
* 变动原因
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 变动时间
|
||||
*/
|
||||
private Date changeTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.klp.mes.eqp.domain.bo;
|
||||
|
||||
import com.klp.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
|
||||
/**
|
||||
* 设备类型参数(某类设备的通用参数标准)业务对象 eqp_type_param
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EqpTypeParamBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 类型参数ID
|
||||
*/
|
||||
private Long typeParamId;
|
||||
|
||||
/**
|
||||
* 关联设备类型ID
|
||||
*/
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
private String paramName;
|
||||
|
||||
/**
|
||||
* 参数类型(无需检修/离散值/连续值/范围)
|
||||
*/
|
||||
private String paramType;
|
||||
|
||||
/**
|
||||
* 参数标准范围(该类型设备的通用标准)
|
||||
*/
|
||||
private String paramStandard;
|
||||
|
||||
/**
|
||||
* 参数单位
|
||||
*/
|
||||
private String paramUnit;
|
||||
|
||||
/**
|
||||
* 参数来源(行业标准/厂内标准/自定义等)
|
||||
*/
|
||||
private String paramSource;
|
||||
|
||||
/**
|
||||
* 是否为该类型设备的必选参数(0=否,1=是)
|
||||
*/
|
||||
private Integer isMandatory;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.klp.mes.eqp.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 设备管理(合并在役和退役设备)视图对象 eqp_equipment_management
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EqpEquipmentManagementVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
@ExcelProperty(value = "设备ID")
|
||||
private Long equipmentId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@ExcelProperty(value = "设备名称")
|
||||
private String equipmentName;
|
||||
|
||||
/**
|
||||
* 设备型号
|
||||
*/
|
||||
@ExcelProperty(value = "设备型号")
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 设备类型ID
|
||||
*/
|
||||
@ExcelProperty(value = "设备类型ID")
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
@ExcelProperty(value = "设备编码")
|
||||
private String equipmentCode;
|
||||
|
||||
/**
|
||||
* 设备位置(在役时有效)
|
||||
*/
|
||||
@ExcelProperty(value = "设备位置", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "在=役时有效")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 设备数量
|
||||
*/
|
||||
@ExcelProperty(value = "设备数量")
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 负责人
|
||||
*/
|
||||
@ExcelProperty(value = "负责人")
|
||||
private String manager;
|
||||
|
||||
/**
|
||||
* 图片路径
|
||||
*/
|
||||
@ExcelProperty(value = "图片路径")
|
||||
private String ossId;
|
||||
|
||||
/**
|
||||
* 设备状态(in_service=在役,retired=退役)
|
||||
*/
|
||||
@ExcelProperty(value = "设备状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "i=n_service=在役,retired=退役")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 停用原因(退役时必填)
|
||||
*/
|
||||
@ExcelProperty(value = "停用原因", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "退=役时必填")
|
||||
private String stopReason;
|
||||
|
||||
/**
|
||||
* 设备去向(退役时必填)
|
||||
*/
|
||||
@ExcelProperty(value = "设备去向", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "退=役时必填")
|
||||
private String equipmentDestination;
|
||||
|
||||
/**
|
||||
* 启用时间
|
||||
*/
|
||||
@ExcelProperty(value = "启用时间")
|
||||
private Date enableTime;
|
||||
|
||||
/**
|
||||
* 退役时间(状态变更为退役时记录)
|
||||
*/
|
||||
@ExcelProperty(value = "退役时间", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "状=态变更为退役时记录")
|
||||
private Date retireTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package com.klp.mes.eqp.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 设备参数视图对象 eqp_equipment_param
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EqpEquipmentParamVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 参数ID
|
||||
*/
|
||||
@ExcelProperty(value = "参数ID")
|
||||
private Long paramId;
|
||||
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
@ExcelProperty(value = "参数名称")
|
||||
private String paramName;
|
||||
|
||||
/**
|
||||
* 关联设备ID
|
||||
*/
|
||||
@ExcelProperty(value = "关联设备ID")
|
||||
private Long equipmentId;
|
||||
|
||||
/**
|
||||
* 参数类型(无需检修/离散值/连续值/范围)
|
||||
*/
|
||||
@ExcelProperty(value = "参数类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "无=需检修/离散值/连续值/范围")
|
||||
private String paramType;
|
||||
|
||||
/**
|
||||
* 参数标准范围
|
||||
*/
|
||||
@ExcelProperty(value = "参数标准范围")
|
||||
private String paramStandard;
|
||||
|
||||
/**
|
||||
* 参数单位
|
||||
*/
|
||||
@ExcelProperty(value = "参数单位")
|
||||
private String paramUnit;
|
||||
|
||||
/**
|
||||
* 参数来源(设备/自定义/厂内标准等)
|
||||
*/
|
||||
@ExcelProperty(value = "参数来源", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "设=备/自定义/厂内标准等")
|
||||
private String paramSource;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.klp.mes.eqp.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 设备类型视图对象 eqp_equipment_type
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EqpEquipmentTypeVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 设备类型ID
|
||||
*/
|
||||
@ExcelProperty(value = "设备类型ID")
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 分类名称
|
||||
*/
|
||||
@ExcelProperty(value = "分类名称")
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 分类描述
|
||||
*/
|
||||
@ExcelProperty(value = "分类描述")
|
||||
private String typeDesc;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.klp.mes.eqp.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 待检设备视图对象 eqp_inspected_equipment
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EqpInspectedEquipmentVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 待检ID
|
||||
*/
|
||||
@ExcelProperty(value = "待检ID")
|
||||
private Long inspectId;
|
||||
|
||||
/**
|
||||
* 关联设备ID
|
||||
*/
|
||||
@ExcelProperty(value = "关联设备ID")
|
||||
private Long equipmentId;
|
||||
|
||||
/**
|
||||
* 计划检修时间
|
||||
*/
|
||||
@ExcelProperty(value = "计划检修时间")
|
||||
private Date inspectTime;
|
||||
|
||||
/**
|
||||
* 检修厂商
|
||||
*/
|
||||
@ExcelProperty(value = "检修厂商")
|
||||
private String inspectVendor;
|
||||
|
||||
/**
|
||||
* 剩余检修天数
|
||||
*/
|
||||
@ExcelProperty(value = "剩余检修天数")
|
||||
private Long remainTime;
|
||||
|
||||
/**
|
||||
* 状态(正常/临近/超期)
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "正=常/临近/超期")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.klp.mes.eqp.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 检修记录视图对象 eqp_inspection_record
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EqpInspectionRecordVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@ExcelProperty(value = "记录ID")
|
||||
private Long recordId;
|
||||
|
||||
/**
|
||||
* 关联设备ID
|
||||
*/
|
||||
@ExcelProperty(value = "关联设备ID")
|
||||
private Long equipmentId;
|
||||
|
||||
/**
|
||||
* 实际检修时间
|
||||
*/
|
||||
@ExcelProperty(value = "实际检修时间")
|
||||
private Date inspectTime;
|
||||
|
||||
/**
|
||||
* 检修厂商
|
||||
*/
|
||||
@ExcelProperty(value = "检修厂商")
|
||||
private String inspectVendor;
|
||||
|
||||
/**
|
||||
* 检修内容
|
||||
*/
|
||||
@ExcelProperty(value = "检修内容")
|
||||
private String inspectContent;
|
||||
|
||||
/**
|
||||
* 检修结果(合格/不合格/待观察)
|
||||
*/
|
||||
@ExcelProperty(value = "检修结果", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "合=格/不合格/待观察")
|
||||
private String result;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.klp.mes.eqp.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 备品备件视图对象 eqp_spare_part
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EqpSparePartVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 备件ID
|
||||
*/
|
||||
@ExcelProperty(value = "备件ID")
|
||||
private Long partId;
|
||||
|
||||
/**
|
||||
* 备件名称
|
||||
*/
|
||||
@ExcelProperty(value = "备件名称")
|
||||
private String partName;
|
||||
|
||||
/**
|
||||
* 物料品类
|
||||
*/
|
||||
@ExcelProperty(value = "物料品类")
|
||||
private String materialCategory;
|
||||
|
||||
/**
|
||||
* 备件型号
|
||||
*/
|
||||
@ExcelProperty(value = "备件型号")
|
||||
private String model;
|
||||
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
@ExcelProperty(value = "计量单位")
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 关联设备ID(可为空,通用备件)
|
||||
*/
|
||||
@ExcelProperty(value = "关联设备ID", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "可=为空,通用备件")
|
||||
private Long equipmentId;
|
||||
|
||||
/**
|
||||
* 当前库存数量
|
||||
*/
|
||||
@ExcelProperty(value = "当前库存数量")
|
||||
private Long quantity;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.klp.mes.eqp.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 备品备件变动记录视图对象 eqp_spare_parts_change
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EqpSparePartsChangeVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 变动记录ID
|
||||
*/
|
||||
@ExcelProperty(value = "变动记录ID")
|
||||
private Long changeId;
|
||||
|
||||
/**
|
||||
* 关联备件ID
|
||||
*/
|
||||
@ExcelProperty(value = "关联备件ID")
|
||||
private Long partId;
|
||||
|
||||
/**
|
||||
* 变动类型(增加/减少)
|
||||
*/
|
||||
@ExcelProperty(value = "变动类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "增=加/减少")
|
||||
private String changeType;
|
||||
|
||||
/**
|
||||
* 变动数量
|
||||
*/
|
||||
@ExcelProperty(value = "变动数量")
|
||||
private Long changeQuantity;
|
||||
|
||||
/**
|
||||
* 变动原因
|
||||
*/
|
||||
@ExcelProperty(value = "变动原因")
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 变动时间
|
||||
*/
|
||||
@ExcelProperty(value = "变动时间")
|
||||
private Date changeTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.klp.mes.eqp.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* 设备类型参数(某类设备的通用参数标准)视图对象 eqp_type_param
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class EqpTypeParamVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 类型参数ID
|
||||
*/
|
||||
@ExcelProperty(value = "类型参数ID")
|
||||
private Long typeParamId;
|
||||
|
||||
/**
|
||||
* 关联设备类型ID
|
||||
*/
|
||||
@ExcelProperty(value = "关联设备类型ID")
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 参数名称
|
||||
*/
|
||||
@ExcelProperty(value = "参数名称")
|
||||
private String paramName;
|
||||
|
||||
/**
|
||||
* 参数类型(无需检修/离散值/连续值/范围)
|
||||
*/
|
||||
@ExcelProperty(value = "参数类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "无=需检修/离散值/连续值/范围")
|
||||
private String paramType;
|
||||
|
||||
/**
|
||||
* 参数标准范围(该类型设备的通用标准)
|
||||
*/
|
||||
@ExcelProperty(value = "参数标准范围", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "该=类型设备的通用标准")
|
||||
private String paramStandard;
|
||||
|
||||
/**
|
||||
* 参数单位
|
||||
*/
|
||||
@ExcelProperty(value = "参数单位")
|
||||
private String paramUnit;
|
||||
|
||||
/**
|
||||
* 参数来源(行业标准/厂内标准/自定义等)
|
||||
*/
|
||||
@ExcelProperty(value = "参数来源", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "行=业标准/厂内标准/自定义等")
|
||||
private String paramSource;
|
||||
|
||||
/**
|
||||
* 是否为该类型设备的必选参数(0=否,1=是)
|
||||
*/
|
||||
@ExcelProperty(value = "是否为该类型设备的必选参数", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0==否,1=是")
|
||||
private Integer isMandatory;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.mes.eqp.mapper;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpEquipmentManagement;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentManagementVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 设备管理(合并在役和退役设备)Mapper接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface EqpEquipmentManagementMapper extends BaseMapperPlus<EqpEquipmentManagementMapper, EqpEquipmentManagement, EqpEquipmentManagementVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.mes.eqp.mapper;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpEquipmentParam;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentParamVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 设备参数Mapper接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface EqpEquipmentParamMapper extends BaseMapperPlus<EqpEquipmentParamMapper, EqpEquipmentParam, EqpEquipmentParamVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.mes.eqp.mapper;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpEquipmentType;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentTypeVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 设备类型Mapper接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface EqpEquipmentTypeMapper extends BaseMapperPlus<EqpEquipmentTypeMapper, EqpEquipmentType, EqpEquipmentTypeVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.mes.eqp.mapper;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpInspectedEquipment;
|
||||
import com.klp.mes.eqp.domain.vo.EqpInspectedEquipmentVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 待检设备Mapper接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface EqpInspectedEquipmentMapper extends BaseMapperPlus<EqpInspectedEquipmentMapper, EqpInspectedEquipment, EqpInspectedEquipmentVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.mes.eqp.mapper;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpInspectionRecord;
|
||||
import com.klp.mes.eqp.domain.vo.EqpInspectionRecordVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 检修记录Mapper接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface EqpInspectionRecordMapper extends BaseMapperPlus<EqpInspectionRecordMapper, EqpInspectionRecord, EqpInspectionRecordVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.mes.eqp.mapper;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpSparePart;
|
||||
import com.klp.mes.eqp.domain.vo.EqpSparePartVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 备品备件Mapper接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface EqpSparePartMapper extends BaseMapperPlus<EqpSparePartMapper, EqpSparePart, EqpSparePartVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.mes.eqp.mapper;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpSparePartsChange;
|
||||
import com.klp.mes.eqp.domain.vo.EqpSparePartsChangeVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 备品备件变动记录Mapper接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface EqpSparePartsChangeMapper extends BaseMapperPlus<EqpSparePartsChangeMapper, EqpSparePartsChange, EqpSparePartsChangeVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.klp.mes.eqp.mapper;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpTypeParam;
|
||||
import com.klp.mes.eqp.domain.vo.EqpTypeParamVo;
|
||||
import com.klp.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 设备类型参数(某类设备的通用参数标准)Mapper接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface EqpTypeParamMapper extends BaseMapperPlus<EqpTypeParamMapper, EqpTypeParam, EqpTypeParamVo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.mes.eqp.service;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpEquipmentManagement;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentManagementVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpEquipmentManagementBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备管理(合并在役和退役设备)Service接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface IEqpEquipmentManagementService {
|
||||
|
||||
/**
|
||||
* 查询设备管理(合并在役和退役设备)
|
||||
*/
|
||||
EqpEquipmentManagementVo queryById(Long equipmentId);
|
||||
|
||||
/**
|
||||
* 查询设备管理(合并在役和退役设备)列表
|
||||
*/
|
||||
TableDataInfo<EqpEquipmentManagementVo> queryPageList(EqpEquipmentManagementBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询设备管理(合并在役和退役设备)列表
|
||||
*/
|
||||
List<EqpEquipmentManagementVo> queryList(EqpEquipmentManagementBo bo);
|
||||
|
||||
/**
|
||||
* 新增设备管理(合并在役和退役设备)
|
||||
*/
|
||||
Boolean insertByBo(EqpEquipmentManagementBo bo);
|
||||
|
||||
/**
|
||||
* 修改设备管理(合并在役和退役设备)
|
||||
*/
|
||||
Boolean updateByBo(EqpEquipmentManagementBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除设备管理(合并在役和退役设备)信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.mes.eqp.service;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpEquipmentParam;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentParamVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpEquipmentParamBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备参数Service接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface IEqpEquipmentParamService {
|
||||
|
||||
/**
|
||||
* 查询设备参数
|
||||
*/
|
||||
EqpEquipmentParamVo queryById(Long paramId);
|
||||
|
||||
/**
|
||||
* 查询设备参数列表
|
||||
*/
|
||||
TableDataInfo<EqpEquipmentParamVo> queryPageList(EqpEquipmentParamBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询设备参数列表
|
||||
*/
|
||||
List<EqpEquipmentParamVo> queryList(EqpEquipmentParamBo bo);
|
||||
|
||||
/**
|
||||
* 新增设备参数
|
||||
*/
|
||||
Boolean insertByBo(EqpEquipmentParamBo bo);
|
||||
|
||||
/**
|
||||
* 修改设备参数
|
||||
*/
|
||||
Boolean updateByBo(EqpEquipmentParamBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除设备参数信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.mes.eqp.service;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpEquipmentType;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentTypeVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpEquipmentTypeBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备类型Service接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface IEqpEquipmentTypeService {
|
||||
|
||||
/**
|
||||
* 查询设备类型
|
||||
*/
|
||||
EqpEquipmentTypeVo queryById(Long typeId);
|
||||
|
||||
/**
|
||||
* 查询设备类型列表
|
||||
*/
|
||||
TableDataInfo<EqpEquipmentTypeVo> queryPageList(EqpEquipmentTypeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询设备类型列表
|
||||
*/
|
||||
List<EqpEquipmentTypeVo> queryList(EqpEquipmentTypeBo bo);
|
||||
|
||||
/**
|
||||
* 新增设备类型
|
||||
*/
|
||||
Boolean insertByBo(EqpEquipmentTypeBo bo);
|
||||
|
||||
/**
|
||||
* 修改设备类型
|
||||
*/
|
||||
Boolean updateByBo(EqpEquipmentTypeBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除设备类型信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.mes.eqp.service;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpInspectedEquipment;
|
||||
import com.klp.mes.eqp.domain.vo.EqpInspectedEquipmentVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpInspectedEquipmentBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 待检设备Service接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface IEqpInspectedEquipmentService {
|
||||
|
||||
/**
|
||||
* 查询待检设备
|
||||
*/
|
||||
EqpInspectedEquipmentVo queryById(Long inspectId);
|
||||
|
||||
/**
|
||||
* 查询待检设备列表
|
||||
*/
|
||||
TableDataInfo<EqpInspectedEquipmentVo> queryPageList(EqpInspectedEquipmentBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询待检设备列表
|
||||
*/
|
||||
List<EqpInspectedEquipmentVo> queryList(EqpInspectedEquipmentBo bo);
|
||||
|
||||
/**
|
||||
* 新增待检设备
|
||||
*/
|
||||
Boolean insertByBo(EqpInspectedEquipmentBo bo);
|
||||
|
||||
/**
|
||||
* 修改待检设备
|
||||
*/
|
||||
Boolean updateByBo(EqpInspectedEquipmentBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除待检设备信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.mes.eqp.service;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpInspectionRecord;
|
||||
import com.klp.mes.eqp.domain.vo.EqpInspectionRecordVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpInspectionRecordBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 检修记录Service接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface IEqpInspectionRecordService {
|
||||
|
||||
/**
|
||||
* 查询检修记录
|
||||
*/
|
||||
EqpInspectionRecordVo queryById(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询检修记录列表
|
||||
*/
|
||||
TableDataInfo<EqpInspectionRecordVo> queryPageList(EqpInspectionRecordBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询检修记录列表
|
||||
*/
|
||||
List<EqpInspectionRecordVo> queryList(EqpInspectionRecordBo bo);
|
||||
|
||||
/**
|
||||
* 新增检修记录
|
||||
*/
|
||||
Boolean insertByBo(EqpInspectionRecordBo bo);
|
||||
|
||||
/**
|
||||
* 修改检修记录
|
||||
*/
|
||||
Boolean updateByBo(EqpInspectionRecordBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除检修记录信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.mes.eqp.service;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpSparePart;
|
||||
import com.klp.mes.eqp.domain.vo.EqpSparePartVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpSparePartBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 备品备件Service接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface IEqpSparePartService {
|
||||
|
||||
/**
|
||||
* 查询备品备件
|
||||
*/
|
||||
EqpSparePartVo queryById(Long partId);
|
||||
|
||||
/**
|
||||
* 查询备品备件列表
|
||||
*/
|
||||
TableDataInfo<EqpSparePartVo> queryPageList(EqpSparePartBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询备品备件列表
|
||||
*/
|
||||
List<EqpSparePartVo> queryList(EqpSparePartBo bo);
|
||||
|
||||
/**
|
||||
* 新增备品备件
|
||||
*/
|
||||
Boolean insertByBo(EqpSparePartBo bo);
|
||||
|
||||
/**
|
||||
* 修改备品备件
|
||||
*/
|
||||
Boolean updateByBo(EqpSparePartBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除备品备件信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.mes.eqp.service;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpSparePartsChange;
|
||||
import com.klp.mes.eqp.domain.vo.EqpSparePartsChangeVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpSparePartsChangeBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 备品备件变动记录Service接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface IEqpSparePartsChangeService {
|
||||
|
||||
/**
|
||||
* 查询备品备件变动记录
|
||||
*/
|
||||
EqpSparePartsChangeVo queryById(Long changeId);
|
||||
|
||||
/**
|
||||
* 查询备品备件变动记录列表
|
||||
*/
|
||||
TableDataInfo<EqpSparePartsChangeVo> queryPageList(EqpSparePartsChangeBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询备品备件变动记录列表
|
||||
*/
|
||||
List<EqpSparePartsChangeVo> queryList(EqpSparePartsChangeBo bo);
|
||||
|
||||
/**
|
||||
* 新增备品备件变动记录
|
||||
*/
|
||||
Boolean insertByBo(EqpSparePartsChangeBo bo);
|
||||
|
||||
/**
|
||||
* 修改备品备件变动记录
|
||||
*/
|
||||
Boolean updateByBo(EqpSparePartsChangeBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除备品备件变动记录信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.klp.mes.eqp.service;
|
||||
|
||||
import com.klp.mes.eqp.domain.EqpTypeParam;
|
||||
import com.klp.mes.eqp.domain.vo.EqpTypeParamVo;
|
||||
import com.klp.mes.eqp.domain.bo.EqpTypeParamBo;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备类型参数(某类设备的通用参数标准)Service接口
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
public interface IEqpTypeParamService {
|
||||
|
||||
/**
|
||||
* 查询设备类型参数(某类设备的通用参数标准)
|
||||
*/
|
||||
EqpTypeParamVo queryById(Long typeParamId);
|
||||
|
||||
/**
|
||||
* 查询设备类型参数(某类设备的通用参数标准)列表
|
||||
*/
|
||||
TableDataInfo<EqpTypeParamVo> queryPageList(EqpTypeParamBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询设备类型参数(某类设备的通用参数标准)列表
|
||||
*/
|
||||
List<EqpTypeParamVo> queryList(EqpTypeParamBo bo);
|
||||
|
||||
/**
|
||||
* 新增设备类型参数(某类设备的通用参数标准)
|
||||
*/
|
||||
Boolean insertByBo(EqpTypeParamBo bo);
|
||||
|
||||
/**
|
||||
* 修改设备类型参数(某类设备的通用参数标准)
|
||||
*/
|
||||
Boolean updateByBo(EqpTypeParamBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除设备类型参数(某类设备的通用参数标准)信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.klp.mes.eqp.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.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 com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.mes.eqp.domain.bo.EqpEquipmentManagementBo;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentManagementVo;
|
||||
import com.klp.mes.eqp.domain.EqpEquipmentManagement;
|
||||
import com.klp.mes.eqp.mapper.EqpEquipmentManagementMapper;
|
||||
import com.klp.mes.eqp.service.IEqpEquipmentManagementService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 设备管理(合并在役和退役设备)Service业务层处理
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class EqpEquipmentManagementServiceImpl implements IEqpEquipmentManagementService {
|
||||
|
||||
private final EqpEquipmentManagementMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询设备管理(合并在役和退役设备)
|
||||
*/
|
||||
@Override
|
||||
public EqpEquipmentManagementVo queryById(Long equipmentId){
|
||||
return baseMapper.selectVoById(equipmentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备管理(合并在役和退役设备)列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<EqpEquipmentManagementVo> queryPageList(EqpEquipmentManagementBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EqpEquipmentManagement> lqw = buildQueryWrapper(bo);
|
||||
Page<EqpEquipmentManagementVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备管理(合并在役和退役设备)列表
|
||||
*/
|
||||
@Override
|
||||
public List<EqpEquipmentManagementVo> queryList(EqpEquipmentManagementBo bo) {
|
||||
LambdaQueryWrapper<EqpEquipmentManagement> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EqpEquipmentManagement> buildQueryWrapper(EqpEquipmentManagementBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EqpEquipmentManagement> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getEquipmentName()), EqpEquipmentManagement::getEquipmentName, bo.getEquipmentName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getModel()), EqpEquipmentManagement::getModel, bo.getModel());
|
||||
lqw.eq(bo.getTypeId() != null, EqpEquipmentManagement::getTypeId, bo.getTypeId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getEquipmentCode()), EqpEquipmentManagement::getEquipmentCode, bo.getEquipmentCode());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getLocation()), EqpEquipmentManagement::getLocation, bo.getLocation());
|
||||
lqw.eq(bo.getQuantity() != null, EqpEquipmentManagement::getQuantity, bo.getQuantity());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getManager()), EqpEquipmentManagement::getManager, bo.getManager());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getOssId()), EqpEquipmentManagement::getOssId, bo.getOssId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), EqpEquipmentManagement::getStatus, bo.getStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStopReason()), EqpEquipmentManagement::getStopReason, bo.getStopReason());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getEquipmentDestination()), EqpEquipmentManagement::getEquipmentDestination, bo.getEquipmentDestination());
|
||||
lqw.eq(bo.getEnableTime() != null, EqpEquipmentManagement::getEnableTime, bo.getEnableTime());
|
||||
lqw.eq(bo.getRetireTime() != null, EqpEquipmentManagement::getRetireTime, bo.getRetireTime());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备管理(合并在役和退役设备)
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(EqpEquipmentManagementBo bo) {
|
||||
EqpEquipmentManagement add = BeanUtil.toBean(bo, EqpEquipmentManagement.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setEquipmentId(add.getEquipmentId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备管理(合并在役和退役设备)
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(EqpEquipmentManagementBo bo) {
|
||||
EqpEquipmentManagement update = BeanUtil.toBean(bo, EqpEquipmentManagement.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(EqpEquipmentManagement entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备管理(合并在役和退役设备)
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.klp.mes.eqp.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.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 com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.mes.eqp.domain.bo.EqpEquipmentParamBo;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentParamVo;
|
||||
import com.klp.mes.eqp.domain.EqpEquipmentParam;
|
||||
import com.klp.mes.eqp.mapper.EqpEquipmentParamMapper;
|
||||
import com.klp.mes.eqp.service.IEqpEquipmentParamService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 设备参数Service业务层处理
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class EqpEquipmentParamServiceImpl implements IEqpEquipmentParamService {
|
||||
|
||||
private final EqpEquipmentParamMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询设备参数
|
||||
*/
|
||||
@Override
|
||||
public EqpEquipmentParamVo queryById(Long paramId){
|
||||
return baseMapper.selectVoById(paramId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备参数列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<EqpEquipmentParamVo> queryPageList(EqpEquipmentParamBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EqpEquipmentParam> lqw = buildQueryWrapper(bo);
|
||||
Page<EqpEquipmentParamVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备参数列表
|
||||
*/
|
||||
@Override
|
||||
public List<EqpEquipmentParamVo> queryList(EqpEquipmentParamBo bo) {
|
||||
LambdaQueryWrapper<EqpEquipmentParam> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EqpEquipmentParam> buildQueryWrapper(EqpEquipmentParamBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EqpEquipmentParam> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getParamName()), EqpEquipmentParam::getParamName, bo.getParamName());
|
||||
lqw.eq(bo.getEquipmentId() != null, EqpEquipmentParam::getEquipmentId, bo.getEquipmentId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getParamType()), EqpEquipmentParam::getParamType, bo.getParamType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getParamStandard()), EqpEquipmentParam::getParamStandard, bo.getParamStandard());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getParamUnit()), EqpEquipmentParam::getParamUnit, bo.getParamUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getParamSource()), EqpEquipmentParam::getParamSource, bo.getParamSource());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备参数
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(EqpEquipmentParamBo bo) {
|
||||
EqpEquipmentParam add = BeanUtil.toBean(bo, EqpEquipmentParam.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setParamId(add.getParamId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备参数
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(EqpEquipmentParamBo bo) {
|
||||
EqpEquipmentParam update = BeanUtil.toBean(bo, EqpEquipmentParam.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(EqpEquipmentParam entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备参数
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.klp.mes.eqp.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.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 com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.mes.eqp.domain.bo.EqpEquipmentTypeBo;
|
||||
import com.klp.mes.eqp.domain.vo.EqpEquipmentTypeVo;
|
||||
import com.klp.mes.eqp.domain.EqpEquipmentType;
|
||||
import com.klp.mes.eqp.mapper.EqpEquipmentTypeMapper;
|
||||
import com.klp.mes.eqp.service.IEqpEquipmentTypeService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 设备类型Service业务层处理
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class EqpEquipmentTypeServiceImpl implements IEqpEquipmentTypeService {
|
||||
|
||||
private final EqpEquipmentTypeMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询设备类型
|
||||
*/
|
||||
@Override
|
||||
public EqpEquipmentTypeVo queryById(Long typeId){
|
||||
return baseMapper.selectVoById(typeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备类型列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<EqpEquipmentTypeVo> queryPageList(EqpEquipmentTypeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EqpEquipmentType> lqw = buildQueryWrapper(bo);
|
||||
Page<EqpEquipmentTypeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备类型列表
|
||||
*/
|
||||
@Override
|
||||
public List<EqpEquipmentTypeVo> queryList(EqpEquipmentTypeBo bo) {
|
||||
LambdaQueryWrapper<EqpEquipmentType> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EqpEquipmentType> buildQueryWrapper(EqpEquipmentTypeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EqpEquipmentType> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getTypeName()), EqpEquipmentType::getTypeName, bo.getTypeName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getTypeDesc()), EqpEquipmentType::getTypeDesc, bo.getTypeDesc());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备类型
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(EqpEquipmentTypeBo bo) {
|
||||
EqpEquipmentType add = BeanUtil.toBean(bo, EqpEquipmentType.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setTypeId(add.getTypeId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备类型
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(EqpEquipmentTypeBo bo) {
|
||||
EqpEquipmentType update = BeanUtil.toBean(bo, EqpEquipmentType.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(EqpEquipmentType entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备类型
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.klp.mes.eqp.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.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 com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.mes.eqp.domain.bo.EqpInspectedEquipmentBo;
|
||||
import com.klp.mes.eqp.domain.vo.EqpInspectedEquipmentVo;
|
||||
import com.klp.mes.eqp.domain.EqpInspectedEquipment;
|
||||
import com.klp.mes.eqp.mapper.EqpInspectedEquipmentMapper;
|
||||
import com.klp.mes.eqp.service.IEqpInspectedEquipmentService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 待检设备Service业务层处理
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class EqpInspectedEquipmentServiceImpl implements IEqpInspectedEquipmentService {
|
||||
|
||||
private final EqpInspectedEquipmentMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询待检设备
|
||||
*/
|
||||
@Override
|
||||
public EqpInspectedEquipmentVo queryById(Long inspectId){
|
||||
return baseMapper.selectVoById(inspectId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待检设备列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<EqpInspectedEquipmentVo> queryPageList(EqpInspectedEquipmentBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EqpInspectedEquipment> lqw = buildQueryWrapper(bo);
|
||||
Page<EqpInspectedEquipmentVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待检设备列表
|
||||
*/
|
||||
@Override
|
||||
public List<EqpInspectedEquipmentVo> queryList(EqpInspectedEquipmentBo bo) {
|
||||
LambdaQueryWrapper<EqpInspectedEquipment> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EqpInspectedEquipment> buildQueryWrapper(EqpInspectedEquipmentBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EqpInspectedEquipment> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getEquipmentId() != null, EqpInspectedEquipment::getEquipmentId, bo.getEquipmentId());
|
||||
lqw.eq(bo.getInspectTime() != null, EqpInspectedEquipment::getInspectTime, bo.getInspectTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getInspectVendor()), EqpInspectedEquipment::getInspectVendor, bo.getInspectVendor());
|
||||
lqw.eq(bo.getRemainTime() != null, EqpInspectedEquipment::getRemainTime, bo.getRemainTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), EqpInspectedEquipment::getStatus, bo.getStatus());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增待检设备
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(EqpInspectedEquipmentBo bo) {
|
||||
EqpInspectedEquipment add = BeanUtil.toBean(bo, EqpInspectedEquipment.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setInspectId(add.getInspectId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改待检设备
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(EqpInspectedEquipmentBo bo) {
|
||||
EqpInspectedEquipment update = BeanUtil.toBean(bo, EqpInspectedEquipment.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(EqpInspectedEquipment entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除待检设备
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.klp.mes.eqp.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.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 com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.mes.eqp.domain.bo.EqpInspectionRecordBo;
|
||||
import com.klp.mes.eqp.domain.vo.EqpInspectionRecordVo;
|
||||
import com.klp.mes.eqp.domain.EqpInspectionRecord;
|
||||
import com.klp.mes.eqp.mapper.EqpInspectionRecordMapper;
|
||||
import com.klp.mes.eqp.service.IEqpInspectionRecordService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 检修记录Service业务层处理
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class EqpInspectionRecordServiceImpl implements IEqpInspectionRecordService {
|
||||
|
||||
private final EqpInspectionRecordMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询检修记录
|
||||
*/
|
||||
@Override
|
||||
public EqpInspectionRecordVo queryById(Long recordId){
|
||||
return baseMapper.selectVoById(recordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检修记录列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<EqpInspectionRecordVo> queryPageList(EqpInspectionRecordBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EqpInspectionRecord> lqw = buildQueryWrapper(bo);
|
||||
Page<EqpInspectionRecordVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检修记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<EqpInspectionRecordVo> queryList(EqpInspectionRecordBo bo) {
|
||||
LambdaQueryWrapper<EqpInspectionRecord> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EqpInspectionRecord> buildQueryWrapper(EqpInspectionRecordBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EqpInspectionRecord> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getEquipmentId() != null, EqpInspectionRecord::getEquipmentId, bo.getEquipmentId());
|
||||
lqw.eq(bo.getInspectTime() != null, EqpInspectionRecord::getInspectTime, bo.getInspectTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getInspectVendor()), EqpInspectionRecord::getInspectVendor, bo.getInspectVendor());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getInspectContent()), EqpInspectionRecord::getInspectContent, bo.getInspectContent());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getResult()), EqpInspectionRecord::getResult, bo.getResult());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检修记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(EqpInspectionRecordBo bo) {
|
||||
EqpInspectionRecord add = BeanUtil.toBean(bo, EqpInspectionRecord.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setRecordId(add.getRecordId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检修记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(EqpInspectionRecordBo bo) {
|
||||
EqpInspectionRecord update = BeanUtil.toBean(bo, EqpInspectionRecord.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(EqpInspectionRecord entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除检修记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package com.klp.mes.eqp.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.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 com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.mes.eqp.domain.bo.EqpSparePartBo;
|
||||
import com.klp.mes.eqp.domain.vo.EqpSparePartVo;
|
||||
import com.klp.mes.eqp.domain.EqpSparePart;
|
||||
import com.klp.mes.eqp.mapper.EqpSparePartMapper;
|
||||
import com.klp.mes.eqp.service.IEqpSparePartService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 备品备件Service业务层处理
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class EqpSparePartServiceImpl implements IEqpSparePartService {
|
||||
|
||||
private final EqpSparePartMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询备品备件
|
||||
*/
|
||||
@Override
|
||||
public EqpSparePartVo queryById(Long partId){
|
||||
return baseMapper.selectVoById(partId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询备品备件列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<EqpSparePartVo> queryPageList(EqpSparePartBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EqpSparePart> lqw = buildQueryWrapper(bo);
|
||||
Page<EqpSparePartVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询备品备件列表
|
||||
*/
|
||||
@Override
|
||||
public List<EqpSparePartVo> queryList(EqpSparePartBo bo) {
|
||||
LambdaQueryWrapper<EqpSparePart> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EqpSparePart> buildQueryWrapper(EqpSparePartBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EqpSparePart> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getPartName()), EqpSparePart::getPartName, bo.getPartName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMaterialCategory()), EqpSparePart::getMaterialCategory, bo.getMaterialCategory());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getModel()), EqpSparePart::getModel, bo.getModel());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), EqpSparePart::getUnit, bo.getUnit());
|
||||
lqw.eq(bo.getEquipmentId() != null, EqpSparePart::getEquipmentId, bo.getEquipmentId());
|
||||
lqw.eq(bo.getQuantity() != null, EqpSparePart::getQuantity, bo.getQuantity());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增备品备件
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(EqpSparePartBo bo) {
|
||||
EqpSparePart add = BeanUtil.toBean(bo, EqpSparePart.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setPartId(add.getPartId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改备品备件
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(EqpSparePartBo bo) {
|
||||
EqpSparePart update = BeanUtil.toBean(bo, EqpSparePart.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(EqpSparePart entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除备品备件
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.klp.mes.eqp.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.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 com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.mes.eqp.domain.bo.EqpSparePartsChangeBo;
|
||||
import com.klp.mes.eqp.domain.vo.EqpSparePartsChangeVo;
|
||||
import com.klp.mes.eqp.domain.EqpSparePartsChange;
|
||||
import com.klp.mes.eqp.mapper.EqpSparePartsChangeMapper;
|
||||
import com.klp.mes.eqp.service.IEqpSparePartsChangeService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 备品备件变动记录Service业务层处理
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class EqpSparePartsChangeServiceImpl implements IEqpSparePartsChangeService {
|
||||
|
||||
private final EqpSparePartsChangeMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询备品备件变动记录
|
||||
*/
|
||||
@Override
|
||||
public EqpSparePartsChangeVo queryById(Long changeId){
|
||||
return baseMapper.selectVoById(changeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询备品备件变动记录列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<EqpSparePartsChangeVo> queryPageList(EqpSparePartsChangeBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EqpSparePartsChange> lqw = buildQueryWrapper(bo);
|
||||
Page<EqpSparePartsChangeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询备品备件变动记录列表
|
||||
*/
|
||||
@Override
|
||||
public List<EqpSparePartsChangeVo> queryList(EqpSparePartsChangeBo bo) {
|
||||
LambdaQueryWrapper<EqpSparePartsChange> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EqpSparePartsChange> buildQueryWrapper(EqpSparePartsChangeBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EqpSparePartsChange> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getPartId() != null, EqpSparePartsChange::getPartId, bo.getPartId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getChangeType()), EqpSparePartsChange::getChangeType, bo.getChangeType());
|
||||
lqw.eq(bo.getChangeQuantity() != null, EqpSparePartsChange::getChangeQuantity, bo.getChangeQuantity());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getReason()), EqpSparePartsChange::getReason, bo.getReason());
|
||||
lqw.eq(bo.getChangeTime() != null, EqpSparePartsChange::getChangeTime, bo.getChangeTime());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增备品备件变动记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(EqpSparePartsChangeBo bo) {
|
||||
EqpSparePartsChange add = BeanUtil.toBean(bo, EqpSparePartsChange.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setChangeId(add.getChangeId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改备品备件变动记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(EqpSparePartsChangeBo bo) {
|
||||
EqpSparePartsChange update = BeanUtil.toBean(bo, EqpSparePartsChange.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(EqpSparePartsChange entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除备品备件变动记录
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.klp.mes.eqp.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.common.core.domain.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 com.klp.common.utils.StringUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.klp.mes.eqp.domain.bo.EqpTypeParamBo;
|
||||
import com.klp.mes.eqp.domain.vo.EqpTypeParamVo;
|
||||
import com.klp.mes.eqp.domain.EqpTypeParam;
|
||||
import com.klp.mes.eqp.mapper.EqpTypeParamMapper;
|
||||
import com.klp.mes.eqp.service.IEqpTypeParamService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 设备类型参数(某类设备的通用参数标准)Service业务层处理
|
||||
*
|
||||
* @author Joshi
|
||||
* @date 2025-10-17
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class EqpTypeParamServiceImpl implements IEqpTypeParamService {
|
||||
|
||||
private final EqpTypeParamMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询设备类型参数(某类设备的通用参数标准)
|
||||
*/
|
||||
@Override
|
||||
public EqpTypeParamVo queryById(Long typeParamId){
|
||||
return baseMapper.selectVoById(typeParamId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备类型参数(某类设备的通用参数标准)列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<EqpTypeParamVo> queryPageList(EqpTypeParamBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<EqpTypeParam> lqw = buildQueryWrapper(bo);
|
||||
Page<EqpTypeParamVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备类型参数(某类设备的通用参数标准)列表
|
||||
*/
|
||||
@Override
|
||||
public List<EqpTypeParamVo> queryList(EqpTypeParamBo bo) {
|
||||
LambdaQueryWrapper<EqpTypeParam> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<EqpTypeParam> buildQueryWrapper(EqpTypeParamBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<EqpTypeParam> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(bo.getTypeId() != null, EqpTypeParam::getTypeId, bo.getTypeId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getParamName()), EqpTypeParam::getParamName, bo.getParamName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getParamType()), EqpTypeParam::getParamType, bo.getParamType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getParamStandard()), EqpTypeParam::getParamStandard, bo.getParamStandard());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getParamUnit()), EqpTypeParam::getParamUnit, bo.getParamUnit());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getParamSource()), EqpTypeParam::getParamSource, bo.getParamSource());
|
||||
lqw.eq(bo.getIsMandatory() != null, EqpTypeParam::getIsMandatory, bo.getIsMandatory());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备类型参数(某类设备的通用参数标准)
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(EqpTypeParamBo bo) {
|
||||
EqpTypeParam add = BeanUtil.toBean(bo, EqpTypeParam.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setTypeParamId(add.getTypeParamId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备类型参数(某类设备的通用参数标准)
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(EqpTypeParamBo bo) {
|
||||
EqpTypeParam update = BeanUtil.toBean(bo, EqpTypeParam.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(EqpTypeParam entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备类型参数(某类设备的通用参数标准)
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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="com.klp.mes.eqp.mapper.EqpEquipmentManagementMapper">
|
||||
|
||||
<resultMap type="com.klp.mes.eqp.domain.EqpEquipmentManagement" id="EqpEquipmentManagementResult">
|
||||
<result property="equipmentId" column="equipment_id"/>
|
||||
<result property="equipmentName" column="equipment_name"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="typeId" column="type_id"/>
|
||||
<result property="equipmentCode" column="equipment_code"/>
|
||||
<result property="location" column="location"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="manager" column="manager"/>
|
||||
<result property="ossId" column="oss_id"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="stopReason" column="stop_reason"/>
|
||||
<result property="equipmentDestination" column="equipment_destination"/>
|
||||
<result property="enableTime" column="enable_time"/>
|
||||
<result property="retireTime" column="retire_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?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="com.klp.mes.eqp.mapper.EqpEquipmentParamMapper">
|
||||
|
||||
<resultMap type="com.klp.mes.eqp.domain.EqpEquipmentParam" id="EqpEquipmentParamResult">
|
||||
<result property="paramId" column="param_id"/>
|
||||
<result property="paramName" column="param_name"/>
|
||||
<result property="equipmentId" column="equipment_id"/>
|
||||
<result property="paramType" column="param_type"/>
|
||||
<result property="paramStandard" column="param_standard"/>
|
||||
<result property="paramUnit" column="param_unit"/>
|
||||
<result property="paramSource" column="param_source"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?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="com.klp.mes.eqp.mapper.EqpEquipmentTypeMapper">
|
||||
|
||||
<resultMap type="com.klp.mes.eqp.domain.EqpEquipmentType" id="EqpEquipmentTypeResult">
|
||||
<result property="typeId" column="type_id"/>
|
||||
<result property="typeName" column="type_name"/>
|
||||
<result property="typeDesc" column="type_desc"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?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="com.klp.mes.eqp.mapper.EqpInspectedEquipmentMapper">
|
||||
|
||||
<resultMap type="com.klp.mes.eqp.domain.EqpInspectedEquipment" id="EqpInspectedEquipmentResult">
|
||||
<result property="inspectId" column="inspect_id"/>
|
||||
<result property="equipmentId" column="equipment_id"/>
|
||||
<result property="inspectTime" column="inspect_time"/>
|
||||
<result property="inspectVendor" column="inspect_vendor"/>
|
||||
<result property="remainTime" column="remain_time"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?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="com.klp.mes.eqp.mapper.EqpInspectionRecordMapper">
|
||||
|
||||
<resultMap type="com.klp.mes.eqp.domain.EqpInspectionRecord" id="EqpInspectionRecordResult">
|
||||
<result property="recordId" column="record_id"/>
|
||||
<result property="equipmentId" column="equipment_id"/>
|
||||
<result property="inspectTime" column="inspect_time"/>
|
||||
<result property="inspectVendor" column="inspect_vendor"/>
|
||||
<result property="inspectContent" column="inspect_content"/>
|
||||
<result property="result" column="result"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
24
klp-mes/src/main/resources/mapper/eqp/EqpSparePartMapper.xml
Normal file
24
klp-mes/src/main/resources/mapper/eqp/EqpSparePartMapper.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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="com.klp.mes.eqp.mapper.EqpSparePartMapper">
|
||||
|
||||
<resultMap type="com.klp.mes.eqp.domain.EqpSparePart" id="EqpSparePartResult">
|
||||
<result property="partId" column="part_id"/>
|
||||
<result property="partName" column="part_name"/>
|
||||
<result property="materialCategory" column="material_category"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="equipmentId" column="equipment_id"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?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="com.klp.mes.eqp.mapper.EqpSparePartsChangeMapper">
|
||||
|
||||
<resultMap type="com.klp.mes.eqp.domain.EqpSparePartsChange" id="EqpSparePartsChangeResult">
|
||||
<result property="changeId" column="change_id"/>
|
||||
<result property="partId" column="part_id"/>
|
||||
<result property="changeType" column="change_type"/>
|
||||
<result property="changeQuantity" column="change_quantity"/>
|
||||
<result property="reason" column="reason"/>
|
||||
<result property="changeTime" column="change_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
25
klp-mes/src/main/resources/mapper/eqp/EqpTypeParamMapper.xml
Normal file
25
klp-mes/src/main/resources/mapper/eqp/EqpTypeParamMapper.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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="com.klp.mes.eqp.mapper.EqpTypeParamMapper">
|
||||
|
||||
<resultMap type="com.klp.mes.eqp.domain.EqpTypeParam" id="EqpTypeParamResult">
|
||||
<result property="typeParamId" column="type_param_id"/>
|
||||
<result property="typeId" column="type_id"/>
|
||||
<result property="paramName" column="param_name"/>
|
||||
<result property="paramType" column="param_type"/>
|
||||
<result property="paramStandard" column="param_standard"/>
|
||||
<result property="paramUnit" column="param_unit"/>
|
||||
<result property="paramSource" column="param_source"/>
|
||||
<result property="isMandatory" column="is_mandatory"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user