diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/utils/uuid/Seq.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/utils/uuid/Seq.java index 5b145c10..26f05f6f 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/utils/uuid/Seq.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/utils/uuid/Seq.java @@ -34,6 +34,26 @@ public class Seq { // 计划编号标识 public static final String mesPlanCodeCode = "PL"; + // 润滑计划序列类型 + public static final String dmsPlanLubeSeqType = "PLANLUBE"; + + // 润滑计划接口序列数 + private static AtomicInteger dmsPlanLubeSeq = new AtomicInteger(1); + + // 润滑记录标识 + public static final String dmsPlanLubeCode = "PL"; + + + // 润滑工单序列类型 + public static final String dmsLubeInstanceSeqType = "LUBEINSTANCE"; + + // 润滑工单接口序列数 + private static AtomicInteger dmsLubeInstanceSeq = new AtomicInteger(1); + + // 润滑工单标识 + public static final String dmsLubeInstanceCode = "LI"; + + /** * 获取通用序列号 * @@ -98,6 +118,10 @@ public class Seq { AtomicInteger atomicInt = commSeq; if (mesPlanCodeSeqType.equals(type)) { atomicInt = mesPlanCodeSeq; + }else if (dmsPlanLubeSeqType.equals(type)) { + atomicInt = dmsPlanLubeSeq; + }else if (dmsLubeInstanceSeqType.equals(type)) { + atomicInt = dmsLubeInstanceSeq; } return getId(atomicInt, 4, code); } diff --git a/ruoyi-modules/hwmom-dms/pom.xml b/ruoyi-modules/hwmom-dms/pom.xml index 2dda9049..7b29c815 100644 --- a/ruoyi-modules/hwmom-dms/pom.xml +++ b/ruoyi-modules/hwmom-dms/pom.xml @@ -114,6 +114,20 @@ mssql-jdbc + + + net.sf.jxls + jxls-core + 1.0.3 + + + + + org.quartz-scheduler + quartz + + + diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/controller/DmsBaseMachineInfoController.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/controller/DmsBaseMachineInfoController.java index c6a8f15b..85cfb7cf 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/controller/DmsBaseMachineInfoController.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/controller/DmsBaseMachineInfoController.java @@ -24,7 +24,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; /** - * 机台信息 + * 设备信息 * 前端访问路由地址为:/dms/dmsBaseMachineInfo * * @author zangch @@ -39,7 +39,7 @@ public class DmsBaseMachineInfoController extends BaseController { private final IDmsBaseMachineInfoService dmsBaseMachineInfoService; /** - * 查询机台信息列表 + * 查询设备信息列表 */ @SaCheckPermission("dms:dmsBaseMachineInfo:list") @GetMapping("/list") @@ -48,18 +48,18 @@ public class DmsBaseMachineInfoController extends BaseController { } /** - * 导出机台信息列表 + * 导出设备信息列表 */ @SaCheckPermission("dms:dmsBaseMachineInfo:export") - @Log(title = "机台信息", businessType = BusinessType.EXPORT) + @Log(title = "设备信息", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(DmsBaseMachineInfoBo bo, HttpServletResponse response) { List list = dmsBaseMachineInfoService.queryList(bo); - ExcelUtil.exportExcel(list, "机台信息", DmsBaseMachineInfoVo.class, response); + ExcelUtil.exportExcel(list, "设备信息", DmsBaseMachineInfoVo.class, response); } /** - * 获取机台信息详细信息 + * 获取设备信息详细信息 * * @param machineId 主键 */ @@ -71,10 +71,10 @@ public class DmsBaseMachineInfoController extends BaseController { } /** - * 新增机台信息 + * 新增设备信息 */ /* @SaCheckPermission("dms:dmsBaseMachineInfo:add") - @Log(title = "机台信息", businessType = BusinessType.INSERT) + @Log(title = "设备信息", businessType = BusinessType.INSERT) @RepeatSubmit() @PostMapping() public R add(@Validated(AddGroup.class) @RequestBody DmsBaseMachineInfoBo bo) { @@ -82,10 +82,10 @@ public class DmsBaseMachineInfoController extends BaseController { }*/ /** - * 修改机台信息 + * 修改设备信息 */ /* @SaCheckPermission("dms:dmsBaseMachineInfo:edit") - @Log(title = "机台信息", businessType = BusinessType.UPDATE) + @Log(title = "设备信息", businessType = BusinessType.UPDATE) @RepeatSubmit() @PutMapping() public R edit(@Validated(EditGroup.class) @RequestBody DmsBaseMachineInfoBo bo) { @@ -93,12 +93,12 @@ public class DmsBaseMachineInfoController extends BaseController { }*/ /** - * 删除机台信息 + * 删除设备信息 * * @param machineIds 主键串 */ /* @SaCheckPermission("dms:dmsBaseMachineInfo:remove") - @Log(title = "机台信息", businessType = BusinessType.DELETE) + @Log(title = "设备信息", businessType = BusinessType.DELETE) @DeleteMapping("/{machineIds}") public R remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] machineIds) { @@ -107,7 +107,7 @@ public class DmsBaseMachineInfoController extends BaseController { /** - * 下拉框查询机台信息列表 + * 下拉框查询设备信息列表 */ @GetMapping("getDmsBaseMachineInfoList") diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/controller/DmsInspectProjectDeviceController.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/controller/DmsInspectProjectDeviceController.java index 31dc4249..c0611b99 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/controller/DmsInspectProjectDeviceController.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/controller/DmsInspectProjectDeviceController.java @@ -23,7 +23,7 @@ import org.dromara.dms.service.IDmsInspectProjectDeviceService; import org.dromara.common.mybatis.core.page.TableDataInfo; /** - * 点巡检项目关联物料信息 + * 点巡检项目关联设备信息 * 前端访问路由地址为:/dms/dmsInspectProjectDevice * * @author zch @@ -38,7 +38,7 @@ public class DmsInspectProjectDeviceController extends BaseController { private final IDmsInspectProjectDeviceService dmsInspectProjectDeviceService; /** - * 查询点巡检项目关联物料信息列表 + * 查询点巡检项目关联设备信息列表 */ @SaCheckPermission("dms:dmsInspectProjectDevice:list") @GetMapping("/list") @@ -47,18 +47,18 @@ public class DmsInspectProjectDeviceController extends BaseController { } /** - * 导出点巡检项目关联物料信息列表 + * 导出点巡检项目关联设备信息列表 */ @SaCheckPermission("dms:dmsInspectProjectDevice:export") - @Log(title = "点巡检项目关联物料信息", businessType = BusinessType.EXPORT) + @Log(title = "点巡检项目关联设备信息", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(DmsInspectProjectDeviceBo bo, HttpServletResponse response) { List list = dmsInspectProjectDeviceService.queryList(bo); - ExcelUtil.exportExcel(list, "点巡检项目关联物料信息", DmsInspectProjectDeviceVo.class, response); + ExcelUtil.exportExcel(list, "点巡检项目关联设备信息", DmsInspectProjectDeviceVo.class, response); } /** - * 获取点巡检项目关联物料信息详细信息 + * 获取点巡检项目关联设备信息详细信息 * * @param inspectProjectId 主键 */ @@ -70,10 +70,10 @@ public class DmsInspectProjectDeviceController extends BaseController { } /** - * 新增点巡检项目关联物料信息 + * 新增点巡检项目关联设备信息 */ @SaCheckPermission("dms:dmsInspectProjectDevice:add") - @Log(title = "点巡检项目关联物料信息", businessType = BusinessType.INSERT) + @Log(title = "点巡检项目关联设备信息", businessType = BusinessType.INSERT) @RepeatSubmit() @PostMapping() public R add(@Validated(AddGroup.class) @RequestBody DmsInspectProjectDeviceBo bo) { @@ -81,10 +81,10 @@ public class DmsInspectProjectDeviceController extends BaseController { } /** - * 修改点巡检项目关联物料信息 + * 修改点巡检项目关联设备信息 */ @SaCheckPermission("dms:dmsInspectProjectDevice:edit") - @Log(title = "点巡检项目关联物料信息", businessType = BusinessType.UPDATE) + @Log(title = "点巡检项目关联设备信息", businessType = BusinessType.UPDATE) @RepeatSubmit() @PutMapping() public R edit(@Validated(EditGroup.class) @RequestBody DmsInspectProjectDeviceBo bo) { @@ -92,12 +92,12 @@ public class DmsInspectProjectDeviceController extends BaseController { } /** - * 删除点巡检项目关联物料信息 + * 删除点巡检项目关联设备信息 * * @param inspectProjectIds 主键串 */ @SaCheckPermission("dms:dmsInspectProjectDevice:remove") - @Log(title = "点巡检项目关联物料信息", businessType = BusinessType.DELETE) + @Log(title = "点巡检项目关联设备信息", businessType = BusinessType.DELETE) @DeleteMapping("/{inspectProjectIds}") public R remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] inspectProjectIds) { @@ -106,7 +106,7 @@ public class DmsInspectProjectDeviceController extends BaseController { /** - * 下拉框查询点巡检项目关联物料信息列表 + * 下拉框查询点巡检项目关联设备信息列表 */ @GetMapping("/getDmsInspectProjectDeviceList") diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/BaseDeviceType.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/BaseDeviceType.java index 1e5adc0b..8ae73523 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/BaseDeviceType.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/BaseDeviceType.java @@ -25,7 +25,7 @@ public class BaseDeviceType extends TenantEntity { private static final long serialVersionUID = 1L; /** - * 物料类型ID + * 设备类型ID */ @TableId(value = "device_type_id", type = IdType.AUTO) private Long deviceTypeId; diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceBom.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceBom.java index 939ffeb7..acf40e59 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceBom.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceBom.java @@ -60,7 +60,7 @@ public class DmsBaseDeviceBom extends TenantEntity { /** - * 机台名称 + * 设备名称 */ @TableField(exist = false) private String machineName;//join映射字段 diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceDebugging.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceDebugging.java index e5c7bc07..3b1d9e2b 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceDebugging.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceDebugging.java @@ -60,7 +60,7 @@ public class DmsBaseDeviceDebugging extends TenantEntity { private String remark; /** - * 机台名称 + * 设备名称 */ @TableField(exist = false) private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceDepreciation.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceDepreciation.java index a3257c7f..af2199f6 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceDepreciation.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceDepreciation.java @@ -72,7 +72,7 @@ public class DmsBaseDeviceDepreciation extends TenantEntity { private String activeFlag; /** - * 机台名称 + * 设备名称 */ @TableField(exist = false) private String machineName;//join diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceFiles.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceFiles.java index 37dcbde3..fd7ee319 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceFiles.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceFiles.java @@ -58,7 +58,7 @@ public class DmsBaseDeviceFiles extends TenantEntity { private String remark; /** - * 机台名称 + * 设备名称 */ @TableField(exist = false) private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceInstall.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceInstall.java index d3d2b2c8..66b05ce8 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceInstall.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceInstall.java @@ -56,7 +56,7 @@ public class DmsBaseDeviceInstall extends TenantEntity { /** - * 机台名称 + * 设备名称 */ @TableField(exist = false) private String machineName;//join diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDevicePurchase.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDevicePurchase.java index d74c58bf..8c75646d 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDevicePurchase.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDevicePurchase.java @@ -60,7 +60,7 @@ public class DmsBaseDevicePurchase extends TenantEntity { private String remark; /** - * 机台名称 + * 设备名称 */ @TableField(exist = false) private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceSupplies.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceSupplies.java index eb469e2d..078dba9b 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceSupplies.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseDeviceSupplies.java @@ -54,7 +54,7 @@ public class DmsBaseDeviceSupplies extends TenantEntity { private String remark; /** - * 机台名称 + * 设备名称 */ @TableField(exist = false) private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseMachineInfo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseMachineInfo.java index bb0bdba5..90e8f20a 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseMachineInfo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseMachineInfo.java @@ -11,7 +11,7 @@ import org.dromara.common.tenant.core.TenantEntity; import java.io.Serial; /** - * 机台信息对象 prod_base_machine_info + * 设备信息对象 prod_base_machine_info * * @author zangch * @date 2025-01-20 @@ -31,12 +31,12 @@ public class DmsBaseMachineInfo extends TenantEntity { private Long machineId; /** - * 机台编号 + * 设备编号 */ private String machineCode; /** - * 机台名称 + * 设备名称 */ private String machineName; @@ -46,17 +46,17 @@ public class DmsBaseMachineInfo extends TenantEntity { private String assetNumber; /** - * 机台位置 + * 设备位置 */ private String machineLocation; /** - * 机台类型 + * 设备类型 */ private String machineType; /** - * 机台规格 + * 设备规格 */ private String machineSpec; @@ -66,7 +66,7 @@ public class DmsBaseMachineInfo extends TenantEntity { private String supplierId; /** - * 机台状态(0停用 1启用 2报废) + * 设备状态(0停用 1启用 2报废) */ private String machineStatus; diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseShutReason.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseShutReason.java index d05c2599..c2ef53af 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseShutReason.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseShutReason.java @@ -58,7 +58,7 @@ public class DmsBaseShutReason extends BaseEntity { private String remark; /** - * 机台名称 + * 设备名称 */ @TableField(exist = false) private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseTransferInfo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseTransferInfo.java index 56545fe1..4b6cd493 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseTransferInfo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsBaseTransferInfo.java @@ -70,7 +70,7 @@ public class DmsBaseTransferInfo extends TenantEntity { private String activeFlag; /** - * 机台名称 + * 设备名称 */ @TableField(exist = false) private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsInspectProjectDevice.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsInspectProjectDevice.java index 63d97103..e99eac59 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsInspectProjectDevice.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsInspectProjectDevice.java @@ -8,7 +8,7 @@ import lombok.EqualsAndHashCode; import java.io.Serial; /** - * 点巡检项目关联物料信息对象 dms_inspect_project_device + * 点巡检项目关联设备信息对象 dms_inspect_project_device * * @author zch * @date 2025-03-24 diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsInspectRouteDetail.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsInspectRouteDetail.java index c24ffc03..c0d6b72d 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsInspectRouteDetail.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsInspectRouteDetail.java @@ -59,7 +59,7 @@ public class DmsInspectRouteDetail extends TenantEntity { private String routeName;//JOIN /** - * 机台名称 + * 设备名称 */ @TableField(exist = false) private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsPlanMaintDetail.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsPlanMaintDetail.java index bac00f31..bf05b223 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsPlanMaintDetail.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsPlanMaintDetail.java @@ -70,7 +70,7 @@ public class DmsPlanMaintDetail extends TenantEntity { private String maintStandardCode;//JOIN /** - * 机台名称 + * 设备名称 */ @TableField(exist = false) private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsRealtimeStatus.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsRealtimeStatus.java index 1df684f8..11a9967e 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsRealtimeStatus.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsRealtimeStatus.java @@ -48,7 +48,7 @@ public class DmsRealtimeStatus extends TenantEntity { private String statusValue; /** - * 机台名称 + * 设备名称 */ @TableField(exist = false) private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsRecordShutDown.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsRecordShutDown.java index 2a792c0f..330d9af1 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsRecordShutDown.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/DmsRecordShutDown.java @@ -82,7 +82,7 @@ public class DmsRecordShutDown extends TenantEntity { private String remark; /** - * 机台名称 + * 设备名称 */ @TableField(exist = false) private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/bo/BaseDeviceTypeBo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/bo/BaseDeviceTypeBo.java index 13dfe631..ee8b9541 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/bo/BaseDeviceTypeBo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/bo/BaseDeviceTypeBo.java @@ -18,9 +18,9 @@ import org.dromara.dms.domain.BaseDeviceType; public class BaseDeviceTypeBo extends BaseEntity { /** - * 物料类型ID + * 设备类型ID */ -/* @NotNull(message = "物料类型ID不能为空", groups = { AddGroup.class, EditGroup.class })*/ +/* @NotNull(message = "设备类型ID不能为空", groups = { AddGroup.class, EditGroup.class })*/ private Long deviceTypeId; /** diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/bo/DmsBaseMachineInfoBo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/bo/DmsBaseMachineInfoBo.java index fe1f238e..0806f4dc 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/bo/DmsBaseMachineInfoBo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/bo/DmsBaseMachineInfoBo.java @@ -13,7 +13,7 @@ import org.dromara.dms.domain.DmsBaseMachineInfo; import java.util.List; /** - * 机台信息业务对象 prod_base_machine_info + * 设备信息业务对象 prod_base_machine_info * * @author zangch * @date 2025-01-20 @@ -29,15 +29,15 @@ public class DmsBaseMachineInfoBo extends BaseEntity { private Long machineId; /** - * 机台编号 + * 设备编号 */ - @NotBlank(message = "机台编号不能为空", groups = { AddGroup.class, EditGroup.class }) + @NotBlank(message = "设备编号不能为空", groups = { AddGroup.class, EditGroup.class }) private String machineCode; /** - * 机台名称 + * 设备名称 */ - @NotBlank(message = "机台名称不能为空", groups = { AddGroup.class, EditGroup.class }) + @NotBlank(message = "设备名称不能为空", groups = { AddGroup.class, EditGroup.class }) private String machineName; /** @@ -46,17 +46,17 @@ public class DmsBaseMachineInfoBo extends BaseEntity { private String assetNumber; /** - * 机台位置 + * 设备位置 */ private String machineLocation; /** - * 机台类型 + * 设备类型 */ private String machineType; /** - * 机台规格 + * 设备规格 */ private String machineSpec; @@ -66,7 +66,7 @@ public class DmsBaseMachineInfoBo extends BaseEntity { private String supplierId; /** - * 机台状态(0停用 1启用 2报废) + * 设备状态(0停用 1启用 2报废) */ private String machineStatus; diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/bo/DmsInspectProjectDeviceBo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/bo/DmsInspectProjectDeviceBo.java index e46a62cb..e308f9da 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/bo/DmsInspectProjectDeviceBo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/bo/DmsInspectProjectDeviceBo.java @@ -10,7 +10,7 @@ import lombok.EqualsAndHashCode; import jakarta.validation.constraints.*; /** - * 点巡检项目关联物料信息业务对象 dms_inspect_project_device + * 点巡检项目关联设备信息业务对象 dms_inspect_project_device * * @author zch * @date 2025-03-24 diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/BaseDeviceTypeVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/BaseDeviceTypeVo.java index 0bed3a34..bc048002 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/BaseDeviceTypeVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/BaseDeviceTypeVo.java @@ -27,9 +27,9 @@ public class BaseDeviceTypeVo implements Serializable { private static final long serialVersionUID = 1L; /** - * 物料类型ID + * 设备类型ID */ - @ExcelProperty(value = "物料类型ID") + @ExcelProperty(value = "设备类型ID") private Long deviceTypeId; /** diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceBomVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceBomVo.java index a889461d..e5dc918f 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceBomVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceBomVo.java @@ -72,9 +72,9 @@ public class DmsBaseDeviceBomVo implements Serializable { private String remark; /** - * 机台名称 + * 设备名称 */ - @ExcelProperty(value = "机台名称") + @ExcelProperty(value = "设备名称") private String machineName;//join映射字段 } diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceDebuggingVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceDebuggingVo.java index e966ea7f..f56fb50a 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceDebuggingVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceDebuggingVo.java @@ -74,7 +74,7 @@ public class DmsBaseDeviceDebuggingVo implements Serializable { private String remark; /** - * 机台名称 + * 设备名称 */ private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceDepreciationVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceDepreciationVo.java index 635744f4..d0b5814e 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceDepreciationVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceDepreciationVo.java @@ -87,9 +87,9 @@ public class DmsBaseDeviceDepreciationVo implements Serializable { private String activeFlag; /** - * 机台名称 + * 设备名称 */ - @ExcelProperty(value = "机台名称") + @ExcelProperty(value = "设备名称") private String machineName;//join } diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceFilesVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceFilesVo.java index b84131c5..c65065f4 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceFilesVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceFilesVo.java @@ -72,7 +72,7 @@ public class DmsBaseDeviceFilesVo implements Serializable { private String remark; /** - * 机台名称 + * 设备名称 */ private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceInstallVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceInstallVo.java index 197d846e..454d60c4 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceInstallVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceInstallVo.java @@ -68,9 +68,9 @@ public class DmsBaseDeviceInstallVo implements Serializable { private String activeFlag; /** - * 机台名称 + * 设备名称 */ - @ExcelProperty(value = "机台名称") + @ExcelProperty(value = "设备名称") private String machineName;//join } diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDevicePurchaseVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDevicePurchaseVo.java index dbe2d8a9..806786d6 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDevicePurchaseVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDevicePurchaseVo.java @@ -73,9 +73,9 @@ public class DmsBaseDevicePurchaseVo implements Serializable { private String remark; /** - * 机台名称 + * 设备名称 */ - @ExcelProperty(value = "机台名称") + @ExcelProperty(value = "设备名称") private String machineName;//JOIN } diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceSuppliesVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceSuppliesVo.java index 5d82beae..6157bf69 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceSuppliesVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseDeviceSuppliesVo.java @@ -66,7 +66,7 @@ public class DmsBaseDeviceSuppliesVo implements Serializable { private String remark; /** - * 机台名称 + * 设备名称 */ private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseMachineInfoVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseMachineInfoVo.java index 137c3728..ece91281 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseMachineInfoVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseMachineInfoVo.java @@ -15,7 +15,7 @@ import java.util.List; /** - * 机台信息视图对象 prod_base_machine_info + * 设备信息视图对象 prod_base_machine_info * * @author zangch * @date 2025-01-20 @@ -41,15 +41,15 @@ public class DmsBaseMachineInfoVo implements Serializable { private String tenantId; /** - * 机台编号 + * 设备编号 */ - @ExcelProperty(value = "机台编号") + @ExcelProperty(value = "设备编号") private String machineCode; /** - * 机台名称 + * 设备名称 */ - @ExcelProperty(value = "机台名称") + @ExcelProperty(value = "设备名称") private String machineName; /** @@ -59,21 +59,21 @@ public class DmsBaseMachineInfoVo implements Serializable { private String assetNumber; /** - * 机台位置 + * 设备位置 */ - @ExcelProperty(value = "机台位置") + @ExcelProperty(value = "设备位置") private String machineLocation; /** - * 机台类型 + * 设备类型 */ - @ExcelProperty(value = "机台类型") + @ExcelProperty(value = "设备类型") private String machineType; /** - * 机台规格 + * 设备规格 */ - @ExcelProperty(value = "机台规格") + @ExcelProperty(value = "设备规格") private String machineSpec; /** @@ -83,9 +83,9 @@ public class DmsBaseMachineInfoVo implements Serializable { private String supplierId; /** - * 机台状态(0停用 1启用 2报废) + * 设备状态(0停用 1启用 2报废) */ - @ExcelProperty(value = "机台状态(0停用 1启用 2报废)", converter = ExcelDictConvert.class) + @ExcelProperty(value = "设备状态(0停用 1启用 2报废)", converter = ExcelDictConvert.class) @ExcelDictFormat(dictType = "machine_status") private String machineStatus; diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseShutReasonVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseShutReasonVo.java index c2871a95..2838f38d 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseShutReasonVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseShutReasonVo.java @@ -72,7 +72,7 @@ public class DmsBaseShutReasonVo implements Serializable { private String remark; /** - * 机台名称 + * 设备名称 */ private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseTransferInfoVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseTransferInfoVo.java index d61f1669..e7dafd39 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseTransferInfoVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsBaseTransferInfoVo.java @@ -86,9 +86,9 @@ public class DmsBaseTransferInfoVo implements Serializable { private String activeFlag; /** - * 机台名称 + * 设备名称 */ - @ExcelProperty(value = "机台名称") + @ExcelProperty(value = "设备名称") private String machineName;//JOIN } diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsInspectProjectDeviceVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsInspectProjectDeviceVo.java index 56c4ac68..24d8e93d 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsInspectProjectDeviceVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsInspectProjectDeviceVo.java @@ -15,7 +15,7 @@ import java.util.Date; /** - * 点巡检项目关联物料信息视图对象 dms_inspect_project_device + * 点巡检项目关联设备信息视图对象 dms_inspect_project_device * * @author zch * @date 2025-03-24 diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsInspectRouteDetailVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsInspectRouteDetailVo.java index 6c675ad5..34a3290d 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsInspectRouteDetailVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsInspectRouteDetailVo.java @@ -71,7 +71,7 @@ public class DmsInspectRouteDetailVo implements Serializable { private String routeName;//JOIN /** - * 机台名称 + * 设备名称 */ private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsPlanMaintDetailVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsPlanMaintDetailVo.java index 43e8a5da..7b00b559 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsPlanMaintDetailVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsPlanMaintDetailVo.java @@ -81,7 +81,7 @@ public class DmsPlanMaintDetailVo implements Serializable { private String maintStandardCode;//JOIN /** - * 机台名称 + * 设备名称 */ private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsRealtimeStatusVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsRealtimeStatusVo.java index 5b36c55e..e3e8a7e5 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsRealtimeStatusVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsRealtimeStatusVo.java @@ -59,7 +59,7 @@ public class DmsRealtimeStatusVo implements Serializable { private String statusValue; /** - * 机台名称 + * 设备名称 */ private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsRecordShutDownVo.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsRecordShutDownVo.java index b808d7f2..ddef0479 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsRecordShutDownVo.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/domain/vo/DmsRecordShutDownVo.java @@ -97,7 +97,7 @@ public class DmsRecordShutDownVo implements Serializable { private String remark; /** - * 机台名称 + * 设备名称 */ private String machineName;//JOIN diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/mapper/DmsBaseMachineInfoMapper.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/mapper/DmsBaseMachineInfoMapper.java index 9f9b690a..29e1623c 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/mapper/DmsBaseMachineInfoMapper.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/mapper/DmsBaseMachineInfoMapper.java @@ -5,7 +5,7 @@ import org.dromara.dms.domain.DmsBaseMachineInfo; import org.dromara.dms.domain.vo.DmsBaseMachineInfoVo; /** - * 机台信息Mapper接口 + * 设备信息Mapper接口 * * @author zangch * @date 2025-01-20 diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/mapper/DmsBaseMachineMapper.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/mapper/DmsBaseMachineMapper.java index a0a835ae..af532a96 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/mapper/DmsBaseMachineMapper.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/mapper/DmsBaseMachineMapper.java @@ -4,7 +4,7 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; import org.dromara.dms.domain.DmsBaseMachineInfo; /** - * 设备(机台)Mapper接口 + * 设备(设备)Mapper接口 * * @author Yinq * @date 2025-03-11 diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/mapper/DmsInspectProjectDeviceMapper.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/mapper/DmsInspectProjectDeviceMapper.java index 01480bc9..6635e577 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/mapper/DmsInspectProjectDeviceMapper.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/mapper/DmsInspectProjectDeviceMapper.java @@ -5,7 +5,7 @@ import org.dromara.dms.domain.vo.DmsInspectProjectDeviceVo; import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; /** - * 点巡检项目关联物料信息Mapper接口 + * 点巡检项目关联设备信息Mapper接口 * * @author zch * @date 2025-03-24 diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/IDmsBaseMachineInfoService.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/IDmsBaseMachineInfoService.java index 9e2d4f8d..64952493 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/IDmsBaseMachineInfoService.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/IDmsBaseMachineInfoService.java @@ -9,7 +9,7 @@ import java.util.Collection; import java.util.List; /** - * 机台信息Service接口 + * 设备信息Service接口 * * @author zangch * @date 2025-01-20 @@ -17,48 +17,48 @@ import java.util.List; public interface IDmsBaseMachineInfoService { /** - * 查询机台信息 + * 查询设备信息 * * @param machineId 主键 - * @return 机台信息 + * @return 设备信息 */ DmsBaseMachineInfoVo queryById(Long machineId); /** - * 分页查询机台信息列表 + * 分页查询设备信息列表 * * @param bo 查询条件 * @param pageQuery 分页参数 - * @return 机台信息分页列表 + * @return 设备信息分页列表 */ TableDataInfo queryPageList(DmsBaseMachineInfoBo bo, PageQuery pageQuery); /** - * 查询符合条件的机台信息列表 + * 查询符合条件的设备信息列表 * * @param bo 查询条件 - * @return 机台信息列表 + * @return 设备信息列表 */ List queryList(DmsBaseMachineInfoBo bo); /* *//** - * 新增机台信息 + * 新增设备信息 * - * @param bo 机台信息 + * @param bo 设备信息 * @return 是否新增成功 *//* Boolean insertByBo(DmsBaseMachineInfoBo bo); *//** - * 修改机台信息 + * 修改设备信息 * - * @param bo 机台信息 + * @param bo 设备信息 * @return 是否修改成功 *//* Boolean updateByBo(DmsBaseMachineInfoBo bo); *//** - * 校验并批量删除机台信息信息 + * 校验并批量删除设备信息信息 * * @param ids 待删除的主键集合 * @param isValid 是否进行有效性校验 diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/impl/DmsBaseMachineInfoServiceImpl.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/impl/DmsBaseMachineInfoServiceImpl.java index ea6a16fe..ff64fb9d 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/impl/DmsBaseMachineInfoServiceImpl.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/impl/DmsBaseMachineInfoServiceImpl.java @@ -1,13 +1,9 @@ package org.dromara.dms.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.yulichang.toolkit.JoinWrappers; import com.github.yulichang.wrapper.MPJLambdaWrapper; import lombok.RequiredArgsConstructor; -import org.dromara.common.core.exception.ServiceException; -import org.dromara.common.core.utils.MapstructUtils; import org.dromara.common.core.utils.StringUtils; import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.TableDataInfo; @@ -15,16 +11,14 @@ import org.dromara.dms.domain.DmsBaseMachineInfo; import org.dromara.dms.domain.bo.DmsBaseMachineInfoBo; import org.dromara.dms.domain.vo.DmsBaseMachineInfoVo; import org.dromara.dms.mapper.DmsBaseMachineInfoMapper; - import org.dromara.dms.service.IDmsBaseMachineInfoService; import org.springframework.stereotype.Service; -import java.util.Collection; import java.util.List; import java.util.Map; /** - * 机台信息Service业务层处理 + * 设备信息Service业务层处理 * * @author zangch * @date 2025-01-20 @@ -37,10 +31,10 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService /** - * 查询机台信息 + * 查询设备信息 * * @param machineId 主键 - * @return 机台信息 + * @return 设备信息 */ @Override public DmsBaseMachineInfoVo queryById(Long machineId) { @@ -48,16 +42,22 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService bo.setMachineId(machineId); MPJLambdaWrapper lqw = buildQueryWrapper(bo); DmsBaseMachineInfoVo prodBaseMachineInfoVo = baseMapper.selectVoOne(lqw); - + //机台关联工序 +/* MPJLambdaWrapper lqwRelation = JoinWrappers.lambda(ProdBaseMachineProcess.class) + .selectAll(ProdBaseMachineProcess.class) + .eq(bo.getMachineId() != null, ProdBaseMachineProcess::getMachineId, bo.getMachineId()) + .orderByAsc(ProdBaseMachineProcess::getCreateTime); + List prodBaseMachineProcesses = prodBaseMachineProcessMapper.selectList(lqwRelation); + prodBaseMachineInfoVo.setBaseMachineProcessList(prodBaseMachineProcesses);*/ return prodBaseMachineInfoVo; } /** - * 分页查询机台信息列表 + * 分页查询设备信息列表 * * @param bo 查询条件 * @param pageQuery 分页参数 - * @return 机台信息分页列表 + * @return 设备信息分页列表 */ @Override public TableDataInfo queryPageList(DmsBaseMachineInfoBo bo, PageQuery pageQuery) { @@ -67,10 +67,10 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService } /** - * 查询符合条件的机台信息列表 + * 查询符合条件的设备信息列表 * * @param bo 查询条件 - * @return 机台信息列表 + * @return 设备信息列表 */ @Override public List queryList(DmsBaseMachineInfoBo bo) { @@ -83,6 +83,10 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService Map params = bo.getParams(); MPJLambdaWrapper lqw = JoinWrappers.lambda(DmsBaseMachineInfo.class) .selectAll(DmsBaseMachineInfo.class) +/* .select(ProdBaseWorkshopInfo::getWorkshopName) + .select(ProdBaseDeviceMode::getDeviceModeName) + .leftJoin(ProdBaseWorkshopInfo.class, ProdBaseWorkshopInfo::getWorkshopId, ProdBaseMachineInfo::getWorkshopId) + .leftJoin(ProdBaseDeviceMode.class, ProdBaseDeviceMode::getDeviceModeId, ProdBaseMachineInfo::getDeviceModeId)*/ .eq(bo.getMachineId() != null, DmsBaseMachineInfo::getMachineId, bo.getMachineId()) .like(StringUtils.isNotBlank(bo.getMachineCode()), DmsBaseMachineInfo::getMachineCode, bo.getMachineCode()) .like(StringUtils.isNotBlank(bo.getMachineName()), DmsBaseMachineInfo::getMachineName, bo.getMachineName()) @@ -97,9 +101,9 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService } /* *//** - * 新增机台信息 + * 新增设备信息 * - * @param bo 机台信息 + * @param bo 设备信息 * @return 是否新增成功 *//* @Override @@ -114,9 +118,9 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService } *//** - * 修改机台信息 + * 修改设备信息 * - * @param bo 机台信息 + * @param bo 设备信息 * @return 是否修改成功 *//* @Override @@ -145,7 +149,7 @@ public class DmsBaseMachineInfoServiceImpl implements IDmsBaseMachineInfoService } *//** - * 校验并批量删除机台信息信息 + * 校验并批量删除设备信息信息 * * @param ids 待删除的主键集合 * @param isValid 是否进行有效性校验 diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/impl/DmsBaseTransferInfoServiceImpl.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/impl/DmsBaseTransferInfoServiceImpl.java index 541df530..86c7f510 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/impl/DmsBaseTransferInfoServiceImpl.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/impl/DmsBaseTransferInfoServiceImpl.java @@ -1,33 +1,31 @@ package org.dromara.dms.service.impl; -import org.dromara.common.core.utils.MapstructUtils; -import org.dromara.common.core.utils.StringUtils; -import org.dromara.common.mybatis.core.page.TableDataInfo; -import org.dromara.common.mybatis.core.page.PageQuery; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.yulichang.toolkit.JoinWrappers; import com.github.yulichang.wrapper.MPJLambdaWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.RequiredArgsConstructor; +import org.dromara.common.core.exception.ServiceException; +import org.dromara.common.core.utils.MapstructUtils; +import org.dromara.common.core.utils.StringUtils; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.dms.domain.DmsBaseDeviceInstall; import org.dromara.dms.domain.DmsBaseMachineInfo; -import org.dromara.dms.mapper.DmsBaseDeviceInstallMapper; -import org.dromara.dms.mapper.DmsBaseMachineInfoMapper; -import org.springframework.stereotype.Service; +import org.dromara.dms.domain.DmsBaseTransferInfo; import org.dromara.dms.domain.bo.DmsBaseTransferInfoBo; import org.dromara.dms.domain.vo.DmsBaseTransferInfoVo; -import org.dromara.dms.domain.DmsBaseTransferInfo; +import org.dromara.dms.mapper.DmsBaseDeviceInstallMapper; +import org.dromara.dms.mapper.DmsBaseMachineInfoMapper; import org.dromara.dms.mapper.DmsBaseTransferInfoMapper; import org.dromara.dms.service.IDmsBaseTransferInfoService; -import org.dromara.common.core.exception.ServiceException; +import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import org.springframework.util.ObjectUtils; -import com.baomidou.mybatisplus.core.metadata.IPage; +import java.util.Collection; import java.util.List; import java.util.Map; -import java.util.Collection; -import java.util.stream.Collectors; /** * 设备转移信息Service业务层处理 @@ -153,6 +151,7 @@ public class DmsBaseTransferInfoServiceImpl implements IDmsBaseTransferInfoServi } // 2. 校验转移前必须有安装位置 + //设备安装时会赋值给设备信息表的设备位置;新增或修改转移信息时,前端会将设备信息的设备位置赋值给转移信息的旧位置(自动赋值,不可编辑) if (StringUtils.isBlank(entity.getDevicePosition())) { throw new ServiceException("转移前必须有安装位置"); } @@ -161,11 +160,12 @@ public class DmsBaseTransferInfoServiceImpl implements IDmsBaseTransferInfoServi if (entity.getDeviceTransferTime() != null) { //校验转移时间不能小于之前记录的安装时间 + //理论上安装记录只有一条,即使不止一条,只是查询时间最晚的实体也可以完成逻辑,保险点用列表,后续影响性能再优化 List installRecords = dmsBaseDeviceInstallMapper.selectList( JoinWrappers.lambda(DmsBaseDeviceInstall.class) .eq(DmsBaseDeviceInstall::getMachineId, entity.getMachineId()) .select(DmsBaseDeviceInstall::getInstallTime) - .orderByAsc(DmsBaseDeviceInstall::getInstallTime) + .orderByDesc(DmsBaseDeviceInstall::getInstallTime) ); boolean hasInvalidInstallTime = installRecords.stream() @@ -178,7 +178,7 @@ public class DmsBaseTransferInfoServiceImpl implements IDmsBaseTransferInfoServi } // 使用分页功能限制记录数量 - Page page = new Page<>(1, 100); + Page page = new Page<>(1, 30); IPage resultPage = baseMapper.selectPage(page, Wrappers.lambdaQuery() .select(DmsBaseTransferInfo::getDeviceTransferTime) diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/impl/DmsInspectProjectDeviceServiceImpl.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/impl/DmsInspectProjectDeviceServiceImpl.java index b839fb4f..85dbb2af 100644 --- a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/impl/DmsInspectProjectDeviceServiceImpl.java +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/service/impl/DmsInspectProjectDeviceServiceImpl.java @@ -21,7 +21,7 @@ import java.util.Map; import java.util.Collection; /** - * 点巡检项目关联物料信息Service业务层处理 + * 点巡检项目关联设备信息Service业务层处理 * * @author zch * @date 2025-03-24 @@ -33,10 +33,10 @@ public class DmsInspectProjectDeviceServiceImpl implements IDmsInspectProjectDev private final DmsInspectProjectDeviceMapper baseMapper; /** - * 查询点巡检项目关联物料信息 + * 查询点巡检项目关联设备信息 * * @param inspectProjectId 主键 - * @return 点巡检项目关联物料信息 + * @return 点巡检项目关联设备信息 */ @Override public DmsInspectProjectDeviceVo queryById(Long inspectProjectId){ @@ -44,11 +44,11 @@ public class DmsInspectProjectDeviceServiceImpl implements IDmsInspectProjectDev } /** - * 分页查询点巡检项目关联物料信息列表 + * 分页查询点巡检项目关联设备信息列表 * * @param bo 查询条件 * @param pageQuery 分页参数 - * @return 点巡检项目关联物料信息分页列表 + * @return 点巡检项目关联设备信息分页列表 */ @Override public TableDataInfo queryPageList(DmsInspectProjectDeviceBo bo, PageQuery pageQuery) { @@ -58,10 +58,10 @@ public class DmsInspectProjectDeviceServiceImpl implements IDmsInspectProjectDev } /** - * 查询符合条件的点巡检项目关联物料信息列表 + * 查询符合条件的点巡检项目关联设备信息列表 * * @param bo 查询条件 - * @return 点巡检项目关联物料信息列表 + * @return 点巡检项目关联设备信息列表 */ @Override public List queryList(DmsInspectProjectDeviceBo bo) { @@ -81,9 +81,9 @@ public class DmsInspectProjectDeviceServiceImpl implements IDmsInspectProjectDev } /** - * 新增点巡检项目关联物料信息 + * 新增点巡检项目关联设备信息 * - * @param bo 点巡检项目关联物料信息 + * @param bo 点巡检项目关联设备信息 * @return 是否新增成功 */ @Override @@ -98,9 +98,9 @@ public class DmsInspectProjectDeviceServiceImpl implements IDmsInspectProjectDev } /** - * 修改点巡检项目关联物料信息 + * 修改点巡检项目关联设备信息 * - * @param bo 点巡检项目关联物料信息 + * @param bo 点巡检项目关联设备信息 * @return 是否修改成功 */ @Override @@ -118,7 +118,7 @@ public class DmsInspectProjectDeviceServiceImpl implements IDmsInspectProjectDev } /** - * 校验并批量删除点巡检项目关联物料信息信息 + * 校验并批量删除点巡检项目关联设备信息信息 * * @param ids 待删除的主键集合 * @param isValid 是否进行有效性校验 diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/utils/CronUtils.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/utils/CronUtils.java new file mode 100644 index 00000000..31b3927d --- /dev/null +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/utils/CronUtils.java @@ -0,0 +1,63 @@ +package org.dromara.dms.utils; + +import org.quartz.CronExpression; +import java.text.ParseException; +import java.util.Date; + +/** + * cron表达式工具类 + * + * @author ruoyi + * + */ +public class CronUtils +{ + /** + * 返回一个布尔值代表一个给定的Cron表达式的有效性 + * + * @param cronExpression Cron表达式 + * @return boolean 表达式是否有效 + */ + public static boolean isValid(String cronExpression) + { + return CronExpression.isValidExpression(cronExpression); + } + + /** + * 返回一个字符串值,表示该消息无效Cron表达式给出有效性 + * + * @param cronExpression Cron表达式 + * @return String 无效时返回表达式错误描述,如果有效返回null + */ + public static String getInvalidMessage(String cronExpression) + { + try + { + new CronExpression(cronExpression); + return null; + } + catch (ParseException pe) + { + return pe.getMessage(); + } + } + + /** + * 返回下一个执行时间根据给定的Cron表达式 + * + * @param cronExpression Cron表达式 + * @return Date 下次Cron表达式执行时间 + */ + public static Date getNextExecution(String cronExpression) + { + try + { + CronExpression cron = new CronExpression(cronExpression); + return cron.getNextValidTimeAfter(new Date(System.currentTimeMillis())); + } + catch (ParseException e) + { + throw new IllegalArgumentException(e.getMessage()); + } + } +} diff --git a/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/utils/TemplateExcelUtils.java b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/utils/TemplateExcelUtils.java new file mode 100644 index 00000000..91054fd7 --- /dev/null +++ b/ruoyi-modules/hwmom-dms/src/main/java/org/dromara/dms/utils/TemplateExcelUtils.java @@ -0,0 +1,73 @@ +package org.dromara.dms.utils; + +import jakarta.servlet.http.HttpServletResponse; +import org.apache.poi.ss.usermodel.Workbook; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URLEncoder; +import java.util.Map; +import net.sf.jxls.transformer.XLSTransformer; + +public class TemplateExcelUtils { + + /** + * 根据模板导出数据 + * @param fileName 文件名 + * @param sourcePath resource/template文件夹下路径 + * @param beanParams 模板参数 + * @param response HTTP响应对象 + * @throws Exception 抛出异常 + */ + public static void downLoadExcel(String fileName, String sourcePath, Map beanParams, HttpServletResponse response) + throws Exception { + try{ + // 获取输出流,用于写入生成的Excel文件 + OutputStream os = getOutputStream(fileName,response); + // 读取模板文件 + InputStream is = TemplateExcelUtils.class.getResourceAsStream("/weixiu.xlsx"); + XLSTransformer transformer = new XLSTransformer(); + // 向模板中写入内容,生成新的Workbook对象 + Workbook workbook = transformer.transformXLS(is, beanParams); + // 将生成的Workbook对象写入输出流 + workbook.write(os); + }catch (Exception e){ + // 捕获并打印异常信息 + e.printStackTrace(); + // 抛出异常 + throw e; + } + } + + /** + * 导出文件时为Writer生成OutputStream. + * @param fileName 文件名 + * @param response response + * @return "" + */ + private static OutputStream getOutputStream(String fileName, + HttpServletResponse response) throws Exception { + try { + // 对文件名进行URL编码,防止特殊字符导致的问题 + fileName = URLEncoder.encode(fileName, "UTF-8"); + // 设置响应内容类型为Excel文件格式 + response.setContentType("application/vnd.ms-excel"); + // 设置响应的字符编码为UTF-8 + response.setCharacterEncoding("utf8"); + // 设置响应头,指示浏览器以附件形式下载文件,并指定文件名 + response.setHeader("Content-Disposition", "attachment; filename=" + fileName + ".xls"); + // 设置响应头,指示缓存策略为公共缓存 + response.setHeader("Pragma", "public"); + // 设置响应头,指示不缓存 + response.setHeader("Cache-Control", "no-store"); + // 添加响应头,指示缓存的最大年龄为0 + response.addHeader("Cache-Control", "max-age=0"); + // 返回响应的输出流,用于写入数据到客户端 + return response.getOutputStream(); + } catch (IOException e) { + // 捕获IO异常,抛出自定义异常信息 + throw new Exception("导出excel表格失败!", e); + } + } +} diff --git a/ruoyi-modules/hwmom-dms/src/main/resources/mapper/BaseDeviceCategoryMapper.xml b/ruoyi-modules/hwmom-dms/src/main/resources/mapper/dms/BaseDeviceCategoryMapper.xml similarity index 100% rename from ruoyi-modules/hwmom-dms/src/main/resources/mapper/BaseDeviceCategoryMapper.xml rename to ruoyi-modules/hwmom-dms/src/main/resources/mapper/dms/BaseDeviceCategoryMapper.xml diff --git a/ruoyi-modules/hwmom-dms/src/main/resources/mapper/BaseDeviceTypeMapper.xml b/ruoyi-modules/hwmom-dms/src/main/resources/mapper/dms/BaseDeviceTypeMapper.xml similarity index 100% rename from ruoyi-modules/hwmom-dms/src/main/resources/mapper/BaseDeviceTypeMapper.xml rename to ruoyi-modules/hwmom-dms/src/main/resources/mapper/dms/BaseDeviceTypeMapper.xml diff --git a/ruoyi-modules/hwmom-dms/src/main/resources/weixiu.xlsx b/ruoyi-modules/hwmom-dms/src/main/resources/weixiu.xlsx new file mode 100644 index 00000000..167ee73b Binary files /dev/null and b/ruoyi-modules/hwmom-dms/src/main/resources/weixiu.xlsx differ