|
|
@@ -132,9 +132,11 @@ public class IsMotorServiceImpl extends ServiceImpl<IsMotorMapper, IsMotor> impl
|
|
|
update(Wrappers.<IsMotor>lambdaUpdate()
|
|
|
.eq(IsMotor::getMotorId, isMotor.getMotorId())
|
|
|
.set(IsMotor::getMotorName, isMotor.getMotorName())
|
|
|
+ .set(IsMotor::getMotorType, isMotor.getMotorType())
|
|
|
+ .set(IsMotor::getMotorCode, isMotor.getMotorCode())
|
|
|
.set(IsMotor::getPointId, isMotor.getPointId() != null ? isMotor.getPointId() : null));
|
|
|
// 开始执行删除is_map_point数据
|
|
|
- if (!byId.getPointId().equals(isMotor.getPointId()) || isMotor.getPointId() == null) {
|
|
|
+ if (isMotor.getPointId() == null || !byId.getPointId().equals(isMotor.getPointId())) {
|
|
|
isMapPointService.remove(Wrappers.<IsMapPoint>lambdaQuery()
|
|
|
.eq(IsMapPoint::getMapType, "4")
|
|
|
.eq(IsMapPoint::getEntityId, byId.getMotorId()));
|
|
|
@@ -142,4 +144,17 @@ public class IsMotorServiceImpl extends ServiceImpl<IsMotorMapper, IsMotor> impl
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public IsMotor selectIsMotorById(Long motorId) {
|
|
|
+ IsMotor byId = getById(motorId);
|
|
|
+ if (byId != null && byId.getPointId() != null) {
|
|
|
+ IsIsolationPoint point = iIsIsolationPointService.getById(motorId);
|
|
|
+ if (point != null) {
|
|
|
+ byId.setPointName(point.getPointName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return byId;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+
|