|
@@ -6,10 +6,12 @@ import com.persagy.proxy.object.model.AdmEquipment;
|
|
import com.persagy.proxy.object.model.AdmShaft;
|
|
import com.persagy.proxy.object.model.AdmShaft;
|
|
import com.persagy.proxy.adm.request.AdmQueryCriteria;
|
|
import com.persagy.proxy.adm.request.AdmQueryCriteria;
|
|
import com.persagy.proxy.adm.request.AdmResponse;
|
|
import com.persagy.proxy.adm.request.AdmResponse;
|
|
|
|
+import com.persagy.proxy.object.model.AdmSystem;
|
|
import com.persagy.proxy.object.service.IAdmEquipmentService;
|
|
import com.persagy.proxy.object.service.IAdmEquipmentService;
|
|
import com.persagy.proxy.object.service.IAdmShaftService;
|
|
import com.persagy.proxy.object.service.IAdmShaftService;
|
|
import com.persagy.proxy.adm.utils.AdmContextUtil;
|
|
import com.persagy.proxy.adm.utils.AdmContextUtil;
|
|
import com.persagy.proxy.common.entity.InstanceUrlParam;
|
|
import com.persagy.proxy.common.entity.InstanceUrlParam;
|
|
|
|
+import com.persagy.proxy.object.service.IAdmSystemService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -25,20 +27,27 @@ import java.util.List;
|
|
public class AdmShaftServiceImpl extends AbstractAdmBaseServiceImpl<AdmShaft> implements IAdmShaftService {
|
|
public class AdmShaftServiceImpl extends AbstractAdmBaseServiceImpl<AdmShaft> implements IAdmShaftService {
|
|
@Autowired
|
|
@Autowired
|
|
private IAdmEquipmentService equipmentService;
|
|
private IAdmEquipmentService equipmentService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IAdmSystemService systemService;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void ensureSpecialValues(InstanceUrlParam context, List<AdmShaft> vos) {
|
|
public void ensureSpecialValues(InstanceUrlParam context, List<AdmShaft> vos) {
|
|
if(CollUtil.isEmpty(vos)) {
|
|
if(CollUtil.isEmpty(vos)) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- //收集设备对象
|
|
|
|
|
|
+ //收集设备对象、系统对象
|
|
List<AdmEquipment> equipmentList = new ArrayList<>();
|
|
List<AdmEquipment> equipmentList = new ArrayList<>();
|
|
|
|
+ List<AdmSystem> systemList = new ArrayList<>();
|
|
vos.stream().forEach(admShaft -> {
|
|
vos.stream().forEach(admShaft -> {
|
|
if(CollUtil.isNotEmpty(admShaft.getEquipmentList())){
|
|
if(CollUtil.isNotEmpty(admShaft.getEquipmentList())){
|
|
equipmentList.addAll(admShaft.getEquipmentList());
|
|
equipmentList.addAll(admShaft.getEquipmentList());
|
|
}
|
|
}
|
|
|
|
+ if(CollUtil.isNotEmpty(admShaft.getSystemList())){
|
|
|
|
+ systemList.addAll(admShaft.getSystemList());
|
|
|
|
+ }
|
|
});
|
|
});
|
|
equipmentService.ensureSpecialValues(AdmContextUtil.toDmpContext(), equipmentList);
|
|
equipmentService.ensureSpecialValues(AdmContextUtil.toDmpContext(), equipmentList);
|
|
|
|
+ systemService.ensureSpecialValues(AdmContextUtil.toDmpContext(), systemList);
|
|
}
|
|
}
|
|
@Override
|
|
@Override
|
|
public AdmResponse doQuery(InstanceUrlParam context, AdmQueryCriteria request, Class<AdmShaft> clazz) {
|
|
public AdmResponse doQuery(InstanceUrlParam context, AdmQueryCriteria request, Class<AdmShaft> clazz) {
|