|
|
@ -1,13 +1,7 @@
|
|
|
|
package com.xydl.cac.service.impl;
|
|
|
|
package com.xydl.cac.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import com.xydl.cac.entity.Bdz;
|
|
|
|
import com.xydl.cac.entity.*;
|
|
|
|
import com.xydl.cac.entity.Jg;
|
|
|
|
import com.xydl.cac.repository.*;
|
|
|
|
import com.xydl.cac.entity.Modev;
|
|
|
|
|
|
|
|
import com.xydl.cac.entity.Zsb;
|
|
|
|
|
|
|
|
import com.xydl.cac.repository.BdzRepository;
|
|
|
|
|
|
|
|
import com.xydl.cac.repository.JgRepository;
|
|
|
|
|
|
|
|
import com.xydl.cac.repository.ModevRepository;
|
|
|
|
|
|
|
|
import com.xydl.cac.repository.ZsbRepository;
|
|
|
|
|
|
|
|
import com.xydl.cac.service.ParamBindService;
|
|
|
|
import com.xydl.cac.service.ParamBindService;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@ -15,6 +9,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
@ -30,6 +25,10 @@ public class ParamBindServiceImpl implements ParamBindService {
|
|
|
|
ZsbRepository zsbRepository;
|
|
|
|
ZsbRepository zsbRepository;
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
ModevRepository modevRepository;
|
|
|
|
ModevRepository modevRepository;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
IcdConfigTypeRepository typeRepository;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
IcdConfigTypeInstRepository typeInstRepository;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<Bdz> getTree() throws Exception {
|
|
|
|
public List<Bdz> getTree() throws Exception {
|
|
|
@ -51,4 +50,20 @@ public class ParamBindServiceImpl implements ParamBindService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return bdzList;
|
|
|
|
return bdzList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public List<IcdConfigTypeInst> instList(String iedName) {
|
|
|
|
|
|
|
|
List<IcdConfigTypeInst> result = new ArrayList<>();
|
|
|
|
|
|
|
|
List<IcdConfigType> typeList = typeRepository.findByIedName(iedName);
|
|
|
|
|
|
|
|
for (IcdConfigType type : typeList) {
|
|
|
|
|
|
|
|
List<IcdConfigTypeInst> instList = typeInstRepository.findByIcdConfigTypeId(type.getId());
|
|
|
|
|
|
|
|
for (IcdConfigTypeInst inst : instList) {
|
|
|
|
|
|
|
|
String param = type.getIedName() + type.getLdeviceInst() + "/" + type.getLnClass()
|
|
|
|
|
|
|
|
+ inst.getInst();
|
|
|
|
|
|
|
|
inst.setParamIndex(param);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
result.addAll(instList);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|