|
|
|
@ -8,6 +8,7 @@ import com.xydl.cac.model.ColumnModel;
|
|
|
|
|
import com.xydl.cac.model.Response;
|
|
|
|
|
import com.xydl.cac.repository.*;
|
|
|
|
|
import com.xydl.cac.service.DataService;
|
|
|
|
|
import com.xydl.cac.service.ModevTypeService;
|
|
|
|
|
import com.xydl.cac.service.ParamBindService;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
@ -36,6 +37,8 @@ public class ParamBindServiceImpl implements ParamBindService {
|
|
|
|
|
@Resource
|
|
|
|
|
NSensorRepository sensorRepository;
|
|
|
|
|
@Resource
|
|
|
|
|
ModevTypeService modevTypeService;
|
|
|
|
|
@Resource
|
|
|
|
|
IcdConfigTypeRepository typeRepository;
|
|
|
|
|
@Resource
|
|
|
|
|
IcdConfigTypeInstRepository instRepository;
|
|
|
|
@ -136,6 +139,12 @@ public class ParamBindServiceImpl implements ParamBindService {
|
|
|
|
|
throw new BusinessException("未找到该监测装置, eqmid=" + item.getEqmid());
|
|
|
|
|
}
|
|
|
|
|
NSensor sensor = optionalNSensor.get();
|
|
|
|
|
if (sensor.getTypeId() == null) {
|
|
|
|
|
throw new BusinessException("该装置缺少类型id信息");
|
|
|
|
|
}
|
|
|
|
|
ModevType modevType = modevTypeService.detail(sensor.getTypeId());
|
|
|
|
|
sensor.setTableName(modevType.getTablename());
|
|
|
|
|
sensor.setTypeName(modevType.getMc());
|
|
|
|
|
Optional<IcdConfigTypeInst> optionalInst = instRepository.findById(item.getIcdid());
|
|
|
|
|
if (!optionalInst.isPresent()) {
|
|
|
|
|
throw new BusinessException("未找到该ICD逻辑设备实例, icdid=" + item.getIcdid());
|
|
|
|
@ -152,7 +161,7 @@ public class ParamBindServiceImpl implements ParamBindService {
|
|
|
|
|
List<IcdConfigTypeAtt> attList = attRepository.findByIcdConfigTypeId(type.getId());
|
|
|
|
|
List<String> msgList = new ArrayList<>();
|
|
|
|
|
for (IcdConfigTypeAtt att : attList) {
|
|
|
|
|
if (StringUtils.isBlank(att.getColName())) {
|
|
|
|
|
if (StringUtils.isBlank(att.getColName()) && att.containInst(inst.getInst())) {
|
|
|
|
|
msgList.add(att.getDoName() + "该属性还未配置绑定字段");
|
|
|
|
|
} else {
|
|
|
|
|
// String paramindex = param + "$" + att.getParam();
|
|
|
|
@ -298,7 +307,7 @@ public class ParamBindServiceImpl implements ParamBindService {
|
|
|
|
|
+ inst.getInst();
|
|
|
|
|
List<IcdConfigTypeAtt> attList = attRepository.findByIcdConfigTypeId(type.getId());
|
|
|
|
|
for (IcdConfigTypeAtt att : attList) {
|
|
|
|
|
if (StringUtils.isNotBlank(att.getColName())) {
|
|
|
|
|
if (StringUtils.isNotBlank(att.getColName()) && att.containInst(inst.getInst())) {
|
|
|
|
|
String paramindex = param + "$" + att.getParam();
|
|
|
|
|
Optional<Rptparamindex> optionalRpt = rptparamindexRepository.findById(paramindex);
|
|
|
|
|
if (!optionalRpt.isPresent()) {
|
|
|
|
|