diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/equip/EquipInfoController.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/equip/EquipInfoController.java index f3969e4..eb578ec 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/equip/EquipInfoController.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/controller/equip/EquipInfoController.java @@ -5,6 +5,7 @@ import com.inspur.module.system.controller.baseData.vo.CustomerInfoSelectionVO; import com.inspur.module.system.controller.baseData.vo.ModelInfoSelectionVO; import com.inspur.module.system.controller.equip.vo.*; import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO; +import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO; import com.inspur.module.system.service.baseData.CustomerInfoService; import com.inspur.module.system.service.baseData.ModelInfoService; import com.inspur.module.system.service.equip.EquipDashboardService; @@ -85,7 +86,7 @@ public class EquipInfoController { @Parameter(name = "id", description = "编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('imt:equip-info:query')") public CommonResult getEquipInfo(@RequestParam("id") String id) { - EquipInfoDO equipInfo = equipInfoService.getEquipInfo(id); + EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(id);// return success(BeanUtils.toBean(equipInfo, EquipInfoRespVO.class)); } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/dataobject/equip/EquipInfoDetailsDTO.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/dataobject/equip/EquipInfoDetailsDTO.java new file mode 100644 index 0000000..748f81d --- /dev/null +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/dataobject/equip/EquipInfoDetailsDTO.java @@ -0,0 +1,82 @@ +package com.inspur.module.system.dal.dataobject.equip; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +import java.util.Date; + +/** + * @Author zhangjunwen + * @create 2024/10/29 + */ +@Data +public class EquipInfoDetailsDTO { + /** + * 机床信息id + */ + @TableId(type = IdType.ASSIGN_UUID) + private String equipId; + /** + * 机床型号id + */ + private String modelId; + /** + * 客户信息id + */ + private String customerId; + + /** + * 机床设备名称 + */ + private String equipName; + + /** + * 机床设备编号 + */ + private String equipNo; + /** + * 生产日期 + */ + private Date productDate; + /** + * 出厂日期/购买日期 + */ + private Date purchaseDate; + /** + * 保修到期日期 + */ + private Date expireDate; + /** + * 机床状态 + * + */ + private Integer status; + + /** + * 机床运行状态 + */ + private Integer runStatus; + + /** + * 二维码图片路径 + */ + private String qrcodePicPath; + /** + * 备注 + */ + private String remark; + /** + * 租户 + */ + private Long tenantId; + + /** + * 客户名称 + */ + private String customerName; + /** + * 机床型号 + */ + private String modelName; +} diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/mysql/equip/EquipInfoMapper.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/mysql/equip/EquipInfoMapper.java index 951e431..b5ab429 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/mysql/equip/EquipInfoMapper.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/dal/mysql/equip/EquipInfoMapper.java @@ -1,15 +1,16 @@ package com.inspur.module.system.dal.mysql.equip; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.inspur.framework.common.pojo.PageResult; import com.inspur.framework.common.util.object.BeanUtils; import com.inspur.framework.mybatis.core.mapper.BaseMapperX; import com.inspur.framework.mybatis.core.query.LambdaQueryWrapperX; -import com.inspur.module.system.controller.baseData.vo.ModelInfoSelectionVO; +import com.inspur.framework.mybatis.core.query.MPJLambdaWrapperX; import com.inspur.module.system.controller.equip.vo.EquipInfoPageReqVO; import com.inspur.module.system.controller.equip.vo.EquipSelectionVO; +import com.inspur.module.system.dal.dataobject.baseData.CustomerInfoDO; import com.inspur.module.system.dal.dataobject.baseData.ModelInfoDO; import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO; +import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO; import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -35,4 +36,15 @@ public interface EquipInfoMapper extends BaseMapperX { List equipInfoList = selectList(); return BeanUtils.toBean(equipInfoList, EquipSelectionVO.class); } + + default EquipInfoDetailsDTO selectEquipInfoDetailsListById(String equipId) { + return selectJoinOne(EquipInfoDetailsDTO.class,new MPJLambdaWrapperX() + .selectAll(EquipInfoDO.class) + .selectAs(ModelInfoDO::getModelName, EquipInfoDetailsDTO::getModelName) + .selectAs(CustomerInfoDO::getCustomerName, EquipInfoDetailsDTO::getCustomerName) + .leftJoin(ModelInfoDO.class, ModelInfoDO::getModelId, EquipInfoDO::getModelId) + .leftJoin(CustomerInfoDO.class, CustomerInfoDO::getCustomerId, EquipInfoDO::getCustomerId) + .eq(EquipInfoDO::getEquipId,equipId) + ); + } } \ No newline at end of file diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/AlarmDataServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/AlarmDataServiceImpl.java index e1587eb..af7bfee 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/AlarmDataServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/AlarmDataServiceImpl.java @@ -8,6 +8,7 @@ import com.inspur.framework.tenant.core.aop.TenantIgnore; import com.inspur.module.system.dal.dataobject.alarm.AlarmDataDTO; import com.inspur.module.system.dal.dataobject.alarm.EquipAlarmDataDO; import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO; +import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO; import com.inspur.module.system.service.equip.EquipInfoService; import com.inspur.module.system.service.inspection.InspectionInfoServiceImpl; import org.springframework.stereotype.Service; @@ -53,7 +54,7 @@ public class AlarmDataServiceImpl implements AlarmDataService { // 插入 AlarmDataDO alarmData = BeanUtils.toBean(createReqVO, AlarmDataDO.class); if(Objects.nonNull(alarmData.getEquipId())){ - EquipInfoDO equipInfo = equipInfoService.getEquipInfo(alarmData.getEquipId()); + EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(alarmData.getEquipId()); Optional tenantIdOptional = Optional.ofNullable(equipInfo.getTenantId()); tenantIdOptional.ifPresent(alarmData::setTenantId); } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/AlarmRulesServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/AlarmRulesServiceImpl.java index 274ae0e..30f8b18 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/AlarmRulesServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/AlarmRulesServiceImpl.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.inspur.framework.tenant.core.aop.TenantIgnore; import com.inspur.module.system.dal.dataobject.alarm.AlarmRulesDTO; import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO; +import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO; import com.inspur.module.system.service.equip.EquipInfoService; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Service; @@ -49,7 +50,7 @@ public class AlarmRulesServiceImpl implements AlarmRulesService { AlarmRulesDO alarmRules = BeanUtils.toBean(createReqVO, AlarmRulesDO.class); alarmRules.setStatus(0);//默认开启 if(Objects.nonNull(alarmRules.getEquipId())){ - EquipInfoDO equipInfo = equipInfoService.getEquipInfo(alarmRules.getEquipId()); + EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(alarmRules.getEquipId()); Optional tenantIdOptional = Optional.ofNullable(equipInfo.getTenantId()); tenantIdOptional.ifPresent(alarmRules::setTenantId); } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/EquipAlarmDataServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/EquipAlarmDataServiceImpl.java index b0e10bb..9b6d40a 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/EquipAlarmDataServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/alarm/EquipAlarmDataServiceImpl.java @@ -9,6 +9,7 @@ import com.inspur.framework.tenant.core.aop.TenantIgnore; import com.inspur.module.system.dal.dataobject.alarm.AlarmRulesDO; import com.inspur.module.system.dal.dataobject.alarm.EquipAlarmDataDTO; import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO; +import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO; import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO; import com.inspur.module.system.dal.mysql.maintenance.MaintenanceOrderMapper; import com.inspur.module.system.service.equip.EquipInfoService; @@ -55,7 +56,7 @@ public class EquipAlarmDataServiceImpl implements EquipAlarmDataService { // 插入 EquipAlarmDataDO equipAlarmData = BeanUtils.toBean(createReqVO, EquipAlarmDataDO.class); if(Objects.nonNull(equipAlarmData.getEquipId())){ - EquipInfoDO equipInfo = equipInfoService.getEquipInfo(equipAlarmData.getEquipId()); + EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(equipAlarmData.getEquipId()); Optional tenantIdOptional = Optional.ofNullable(equipInfo.getTenantId()); tenantIdOptional.ifPresent(equipAlarmData::setTenantId); } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/ComponentInfoServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/ComponentInfoServiceImpl.java index 051b927..f87519e 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/ComponentInfoServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/ComponentInfoServiceImpl.java @@ -8,6 +8,7 @@ import com.inspur.module.system.controller.equip.vo.ComponentInfoSaveReqVO; import com.inspur.module.system.controller.equip.vo.ComponentSelectionVO; import com.inspur.module.system.dal.dataobject.equip.ComponentInfoDO; import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO; +import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO; import com.inspur.module.system.dal.mysql.equip.ComponentInfoMapper; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -43,7 +44,7 @@ public class ComponentInfoServiceImpl implements ComponentInfoService { ComponentInfoDO componentInfo = BeanUtils.toBean(createReqVO, ComponentInfoDO.class); //如果机床id不为空,进行租户传递 if (StrUtil.isNotBlank(componentInfo.getEquipId())){ - EquipInfoDO equipInfo = equipInfoService.getEquipInfo(componentInfo.getEquipId()); + EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(componentInfo.getEquipId()); if (Objects.nonNull(equipInfo)){ componentInfo.setTenantId(equipInfo.getTenantId()); } @@ -62,7 +63,7 @@ public class ComponentInfoServiceImpl implements ComponentInfoService { ComponentInfoDO updateObj = BeanUtils.toBean(updateReqVO, ComponentInfoDO.class); //如果机床id不为空,进行租户传递 if (StrUtil.isNotBlank(updateObj.getEquipId())){ - EquipInfoDO equipInfo = equipInfoService.getEquipInfo(updateObj.getEquipId()); + EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(updateObj.getEquipId()); if (Objects.nonNull(equipInfo)){ updateObj.setTenantId(equipInfo.getTenantId()); } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/EquipInfoService.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/EquipInfoService.java index eb49e28..c5e00ce 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/EquipInfoService.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/EquipInfoService.java @@ -3,6 +3,7 @@ package com.inspur.module.system.service.equip; import com.inspur.framework.common.pojo.PageResult; import com.inspur.module.system.controller.equip.vo.*; import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO; +import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO; import javax.validation.*; import java.util.List; @@ -42,7 +43,7 @@ public interface EquipInfoService { * @param id 编号 * @return 机床信息 */ - EquipInfoDO getEquipInfo(String id); + EquipInfoDetailsDTO getEquipInfo(String id); /** * 获得机床信息分页 diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/EquipInfoServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/EquipInfoServiceImpl.java index 3e2d07d..857323f 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/EquipInfoServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/equip/EquipInfoServiceImpl.java @@ -11,6 +11,7 @@ import com.inspur.module.system.controller.equip.vo.*; import com.inspur.module.system.dal.dataobject.baseData.CustomerInfoDO; import com.inspur.module.system.dal.dataobject.baseData.ModelInfoDO; import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO; +import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO; import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO; import com.inspur.module.system.dal.mysql.equip.EquipInfoMapper; import com.inspur.module.system.enums.ErrorCodeConstants; @@ -99,8 +100,8 @@ public class EquipInfoServiceImpl implements EquipInfoService { } @Override - public EquipInfoDO getEquipInfo(String id) { - return equipInfoMapper.selectById(id); + public EquipInfoDetailsDTO getEquipInfo(String id) { + return equipInfoMapper.selectEquipInfoDetailsListById(id); } @Override diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/gatewayinfo/GatewayCardInfoServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/gatewayinfo/GatewayCardInfoServiceImpl.java index d7f7b3b..cfdf03d 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/gatewayinfo/GatewayCardInfoServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/gatewayinfo/GatewayCardInfoServiceImpl.java @@ -2,6 +2,7 @@ package com.inspur.module.system.service.gatewayinfo; import com.inspur.framework.common.util.string.StrUtils; import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO; +import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO; import com.inspur.module.system.dal.dataobject.gatewayinfo.GatewayCardParamsDO; import com.inspur.module.system.dal.mysql.gatewayinfo.GatewayCardParamsMapper; import com.inspur.module.system.service.equip.EquipInfoService; @@ -48,7 +49,7 @@ public class GatewayCardInfoServiceImpl implements GatewayCardInfoService { // 插入 GatewayCardInfoDO gatewayCardInfo = BeanUtils.toBean(createReqVO, GatewayCardInfoDO.class); if(Objects.nonNull(gatewayCardInfo.getEquipId())){ - EquipInfoDO equipInfo = equipInfoService.getEquipInfo(gatewayCardInfo.getEquipId()); + EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(gatewayCardInfo.getEquipId()); Optional tenantIdOptional = Optional.ofNullable(equipInfo.getTenantId()); tenantIdOptional.ifPresent(gatewayCardInfo::setTenantId); } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/gatewayinfo/GatewayCardParamsServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/gatewayinfo/GatewayCardParamsServiceImpl.java index 45471b2..7387fb7 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/gatewayinfo/GatewayCardParamsServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/gatewayinfo/GatewayCardParamsServiceImpl.java @@ -1,6 +1,7 @@ package com.inspur.module.system.service.gatewayinfo; import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO; +import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO; import com.inspur.module.system.service.equip.EquipInfoService; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Service; @@ -46,7 +47,7 @@ public class GatewayCardParamsServiceImpl implements GatewayCardParamsService { // 插入 GatewayCardParamsDO gatewayCardParams = BeanUtils.toBean(createReqVO, GatewayCardParamsDO.class); if(Objects.nonNull(gatewayCardParams.getEquipId())){ - EquipInfoDO equipInfo = equipInfoService.getEquipInfo(gatewayCardParams.getEquipId()); + EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(gatewayCardParams.getEquipId()); Optional tenantIdOptional = Optional.ofNullable(equipInfo.getTenantId()); tenantIdOptional.ifPresent(gatewayCardParams::setTenantId); } @@ -70,7 +71,7 @@ public class GatewayCardParamsServiceImpl implements GatewayCardParamsService { } List gatewayCardParamsList = BeanUtils.toBean(paramsList, GatewayCardParamsDO.class); if(Objects.nonNull(equipId)){ - EquipInfoDO equipInfo = equipInfoService.getEquipInfo(equipId); + EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(equipId); Optional tenantIdOptional = Optional.ofNullable(equipInfo.getTenantId()); gatewayCardParamsList = gatewayCardParamsList.stream().peek(cardParamInfo -> tenantIdOptional.ifPresent(cardParamInfo::setTenantId)).collect(Collectors.toList()); } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/gatewayinfo/GatewayInfoServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/gatewayinfo/GatewayInfoServiceImpl.java index 0564e8b..0dea457 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/gatewayinfo/GatewayInfoServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/gatewayinfo/GatewayInfoServiceImpl.java @@ -3,6 +3,7 @@ package com.inspur.module.system.service.gatewayinfo; import com.inspur.framework.common.util.json.JsonUtils; import com.inspur.framework.tenant.core.aop.TenantIgnore; import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO; +import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO; import com.inspur.module.system.dal.dataobject.gatewayinfo.GatewayCardInfoDO; import com.inspur.module.system.dal.dataobject.gatewayinfo.GatewayCardParamsDO; import com.inspur.module.system.dal.dataobject.gatewayinfo.GatewayInfoDetailsDTO; @@ -70,7 +71,7 @@ public class GatewayInfoServiceImpl implements GatewayInfoService { // 插入 GatewayInfoDO gatewayInfo = BeanUtils.toBean(createReqVO, GatewayInfoDO.class); if(Objects.nonNull(gatewayInfo.getEquipId())){ - EquipInfoDO equipInfo = equipInfoService.getEquipInfo(gatewayInfo.getEquipId()); + EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(gatewayInfo.getEquipId()); Optional tenantIdOptional = Optional.ofNullable(equipInfo.getTenantId()); tenantIdOptional.ifPresent(gatewayInfo::setTenantId); } diff --git a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/maintenance/MaintenanceOrderServiceImpl.java b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/maintenance/MaintenanceOrderServiceImpl.java index 9b18284..e674e88 100644 --- a/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/maintenance/MaintenanceOrderServiceImpl.java +++ b/imt-server/imt-module-system/imt-module-system-biz/src/main/java/com/inspur/module/system/service/maintenance/MaintenanceOrderServiceImpl.java @@ -19,6 +19,7 @@ import com.inspur.module.system.controller.inspection.vo.InspectionInfoSaveReqVO import com.inspur.module.system.controller.maintenance.vo.*; import com.inspur.module.system.dal.dataobject.baseData.CustomerInfoDO; import com.inspur.module.system.dal.dataobject.equip.EquipInfoDO; +import com.inspur.module.system.dal.dataobject.equip.EquipInfoDetailsDTO; import com.inspur.module.system.dal.dataobject.inspection.InspectionInfoDO; import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceOrderDO; import com.inspur.module.system.dal.dataobject.maintenance.MaintenanceReportDO; @@ -111,7 +112,7 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService { } //如果设备id不是空,进行租户传递 if (StrUtil.isNotBlank(remoteMaintenanceOrder.getEquipId())){ - EquipInfoDO equipInfo = equipInfoService.getEquipInfo(remoteMaintenanceOrder.getEquipId()); + EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(remoteMaintenanceOrder.getEquipId()); if (Objects.nonNull(equipInfo)){ remoteMaintenanceOrder.setTenantId(equipInfo.getTenantId()); } @@ -158,7 +159,7 @@ public class MaintenanceOrderServiceImpl implements MaintenanceOrderService { MaintenanceOrderDO updateObj = BeanUtils.toBean(updateReqVO, MaintenanceOrderDO.class); //如果设备id不是空,进行租户传递 if (StrUtil.isNotBlank(updateObj.getEquipId())){ - EquipInfoDO equipInfo = equipInfoService.getEquipInfo(updateObj.getEquipId()); + EquipInfoDetailsDTO equipInfo = equipInfoService.getEquipInfo(updateObj.getEquipId()); if (Objects.nonNull(equipInfo)){ updateObj.setTenantId(equipInfo.getTenantId()); } diff --git a/imt-ui/src/components/VueOkrTree/vue-okr-tree/OkrTree.vue b/imt-ui/src/components/VueOkrTree/vue-okr-tree/OkrTree.vue index 80d2ead..3812a5f 100644 --- a/imt-ui/src/components/VueOkrTree/vue-okr-tree/OkrTree.vue +++ b/imt-ui/src/components/VueOkrTree/vue-okr-tree/OkrTree.vue @@ -26,6 +26,7 @@ :show-node-num="showNodeNum" :key="getNodeKey(child)" :props="props" + :isClickInput="isClickInput" > @@ -103,6 +104,10 @@ export default { type: Array, }, filterNodeMethod: Function, + isClickInput: { + type: Boolean, + default: false, + }, props: { default() { return { @@ -159,6 +164,7 @@ export default { direction: this.direction, animate: this.animate, animateName: this.animateName, + isClickInput: this.isClickInput, }); this.root = this.store.root; this.okrEventBus.$on("inputCompleted", this.handleInputCompleted); diff --git a/imt-ui/src/components/VueOkrTree/vue-okr-tree/OkrTreeNode.vue b/imt-ui/src/components/VueOkrTree/vue-okr-tree/OkrTreeNode.vue index aaf0c60..7e0fb3d 100644 --- a/imt-ui/src/components/VueOkrTree/vue-okr-tree/OkrTreeNode.vue +++ b/imt-ui/src/components/VueOkrTree/vue-okr-tree/OkrTreeNode.vue @@ -142,6 +142,7 @@ :key="getNodeKey(child)" :show-node-num="showNodeNum" :props="props" + :isClickInput="isClickInput" > @@ -217,6 +218,11 @@ export default { selectedKey: String, // 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的 nodeKey: String, + //是否启用输入 + isClickInput: { + type: Boolean, + default: false, + }, }, components: { NodeContent: { @@ -508,7 +514,7 @@ export default { const store = this.tree.store; store.setCurrentNode(this.node); this.tree.$emit("node-click", this.node.data, this.node, this); - if (this.node.isLeaf && this.node.childNodes) { + if (this.node.isLeaf && this.node.childNodes && this.isClickInput) { this.toggleInput(); } // 触发显示输入框 }, diff --git a/imt-ui/src/views/system/data/monitordatadashboard/index.vue b/imt-ui/src/views/system/data/monitordatadashboard/index.vue index d8046fc..2363e09 100644 --- a/imt-ui/src/views/system/data/monitordatadashboard/index.vue +++ b/imt-ui/src/views/system/data/monitordatadashboard/index.vue @@ -5,6 +5,16 @@ style="border-bottom:1px solid black" >
+
+ 设备名称: + {{ equipName }} +
{{ equipNo }}
-
- 报警等级: - -
@@ -273,9 +273,10 @@ export default { name: "EquipInfo", data() { return { - customerName: "济南机床厂", - modelName: "MK15806", - equipNo: "37089765", + equipName: "", + customerName: "", + modelName: "", + equipNo: "", alarmLevel: 1, datetimeRange: this.getDefaultTimeRange(), loading1: false, @@ -336,7 +337,9 @@ export default { }; }, created() { - this.getParamsTree("2e3d0190e63eda526da89d6c751f08f3"); + this.queryParams.equipId = this.$route.query.equipId; + this.getParamsTree(this.$route.query.equipId); + this.getEquipInfo(this.$route.query.equipId); }, methods: { /** 查询列表 */ @@ -369,6 +372,15 @@ export default { } finally { } }, + async getEquipInfo(equipId) { + const res = await EquipInfoApi.getEquipInfo(equipId); + const data = res.data; + console.log("设备信息:", res); + this.customerName = data.customerName; + this.modelName = data.modelName; + this.equipNo = data.equipNo; + this.equipName = data.equipName; + }, async getParamsTree(equipId) { const cardTree = await getGatewayCardTree(equipId); var treeData = []; diff --git a/imt-ui/src/views/system/equip/equipdashboard/index.vue b/imt-ui/src/views/system/equip/equipdashboard/index.vue index 09e8747..8f19f58 100644 --- a/imt-ui/src/views/system/equip/equipdashboard/index.vue +++ b/imt-ui/src/views/system/equip/equipdashboard/index.vue @@ -25,6 +25,22 @@ 设备编号: {{ item.equipNo }}
+
+ 设备详情 + + 监控数据看板 + +
@@ -201,6 +217,32 @@ export default { return "dashboard"; } }, + handleToDataDash(item) { + if (item.equipId) { + this.$router.push({ + path: "/equip/datadashboard", + query: { equipId: item.equipId }, + }); + } else { + this.$message({ + message: "设备" + item.equipName + "不存在,无法跳转详情", + type: "warning", + }); + } + }, + handleDetails(item) { + if (item.equipId) { + this.$router.push({ + path: "/equip/equipdetails", + query: { equipId: item.equipId }, + }); + } else { + this.$message({ + message: "设备" + item.equipName + "不存在,无法跳转详情", + type: "warning", + }); + } + }, }, }; @@ -222,6 +264,8 @@ export default { .title { display: flex; justify-content: space-around; + cursor: pointer; + align-items: center; } /* .equ-info { } */ @@ -259,4 +303,7 @@ export default { font-size: 20px; font-weight: 700; } +.title-button { + display: grid; +} diff --git a/imt-ui/src/views/system/inspectionPlan/inspectionPlanTree.vue b/imt-ui/src/views/system/inspectionPlan/inspectionPlanTree.vue index 5a5c8a5..57c3333 100644 --- a/imt-ui/src/views/system/inspectionPlan/inspectionPlanTree.vue +++ b/imt-ui/src/views/system/inspectionPlan/inspectionPlanTree.vue @@ -45,6 +45,7 @@ :props="props" show-collapsable default-expand-all + :isClickInput="true" :current-lable-class-name="renderCurrentClass" @node-click="nodeClick" @comment-submitted="handleCommentSubmitted"