|
@@ -44,12 +44,7 @@ public class WindTurbineInfoService extends BaseService {
|
|
|
@Transactional(propagation = Propagation.SUPPORTS)
|
|
|
public void add(WindTurbineInfo windTurbine) throws BusinessException {
|
|
|
this.windTurbineInfoRepository.save(windTurbine);
|
|
|
-// boolean b = this.windTurbineRepository.existsById(windTurbine.getNo());
|
|
|
-// if (b) {// 编号已存在
|
|
|
-// throw new BusinessException("风机编号已存在!");
|
|
|
-// } else {
|
|
|
-// this.windTurbineRepository.save(windTurbine);
|
|
|
-// }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -160,10 +155,7 @@ public class WindTurbineInfoService extends BaseService {
|
|
|
|
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public void saveCloud(WindTurbineInfo bean) {
|
|
|
-// WindTurbineInfo beanOld = windTurbineInfoRepository.findByName(bean.getName());
|
|
|
-// if (null != beanOld) {
|
|
|
-// bean.setId(beanOld.getId());
|
|
|
-// }
|
|
|
+
|
|
|
windTurbineInfoRepository.save(bean);
|
|
|
}
|
|
|
|
|
@@ -217,12 +209,7 @@ public class WindTurbineInfoService extends BaseService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-// boolean b = this.inverterRepository.existsById(inverter.getNo());
|
|
|
-// if (b) {// 逆变器编号已存在
|
|
|
-// throw new BusinessException("逆变器编号已存在!");
|
|
|
-// } else {
|
|
|
-//
|
|
|
-// }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|