Browse Source

导入设备的时候巡检项目机构需要和设备相同

设备答题结束绑定模型标识逻辑调整
zhongwei
tanghaihao 1 year ago
parent
commit
e407f34389
  1. 3
      hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/entity/EmInfoEntity.java
  2. 1
      hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java
  3. 8
      hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/server/impl/EquipmentInstanceServiceImpl.java

3
hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/entity/EmInfoEntity.java

@ -234,6 +234,9 @@ public class EmInfoEntity extends TenantEntity {
@ApiModelProperty("站点编码")
private String stationCode;
@ApiModelProperty(value = "模型标识")
private String modelSignage;
@TableField(exist = false)
@ApiModelProperty("站点名称")
private String stationName;

1
hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java

@ -841,6 +841,7 @@ public class EmInfoServiceImpl extends BaseServiceImpl<EmInfoMapper, EmInfoEntit
ProjectDTO projectDTO = new ProjectDTO();
projectDTO.setEmCode(emInfo.getNumber());
projectDTO.setName(emInfo.getName());
projectDTO.setCreateDept(station.getRefDept());
// 获取设备树中绑定的巡检内容
LambdaQueryWrapper<EmTreeInspectEntity> inspectWrapper = new LambdaQueryWrapper();

8
hzims-service/equipment/src/main/java/com/hnac/hzims/monitor/server/impl/EquipmentInstanceServiceImpl.java

@ -2,8 +2,12 @@ package com.hnac.hzims.monitor.server.impl;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.equipment.entity.EmDefinitionEntity;
import com.hnac.hzims.equipment.entity.EmInfoEntity;
import com.hnac.hzims.equipment.entity.EmTreeEntity;
import com.hnac.hzims.equipment.service.IEmDefinitionService;
import com.hnac.hzims.equipment.service.IEmInfoService;
import com.hnac.hzims.equipment.service.IEmTreeService;
import com.hnac.hzims.fdp.request.AnswerFormatReq;
import com.hnac.hzims.fdp.request.SubmitAnswerReq;
import com.hnac.hzims.fdp.service.IFdpQuestionService;
@ -78,6 +82,10 @@ public class EquipmentInstanceServiceImpl implements IEquipmentInstanceService {
}
private String getModelSignageByAnswer(SubmitAnswerReq submitAnswerReq) {
EmInfoEntity emInfoEntity = emInfoService.getEmInfoByEmCode(submitAnswerReq.getEmCode());
if (Func.isNotEmpty(emInfoEntity.getModelSignage())) {
return emInfoEntity.getModelSignage();
}
if(IFdpQuestionService.COMMON_TYPE.equals(submitAnswerReq.getDeviceType())) {
return commonSignage;
}

Loading…
Cancel
Save