|
@@ -16,6 +16,7 @@ import com.xy.entity.DeviceAdminActivate;
|
|
|
import com.xy.entity.DeviceAlgorithmCharging;
|
|
|
import com.xy.entity.DeviceCharging;
|
|
|
import com.xy.entity.DeviceInfo;
|
|
|
+import com.xy.error.CommRuntimeException;
|
|
|
import com.xy.mapper.DeviceAdminActivateMapper;
|
|
|
import com.xy.service.be.MercService;
|
|
|
import com.xy.utils.*;
|
|
@@ -76,6 +77,9 @@ public class DeviceAdminActivateServiceImpl extends ServiceImpl<DeviceAdminActiv
|
|
|
List<DeviceCharging> deviceChargings = new ArrayList<>(deviceInfos.size());
|
|
|
List<DeviceAlgorithmCharging> deviceAlgorithmChargings = new ArrayList<>(deviceInfos.size());
|
|
|
deviceInfos.forEach(deviceInfo -> {
|
|
|
+ if (deviceInfo.getActiveState() == 1) {
|
|
|
+ throw new CommRuntimeException(deviceInfo.getDeviceId() + "已经激活,操作失败");
|
|
|
+ }
|
|
|
//激活对象
|
|
|
deviceInfo.setActiveState(activeState)
|
|
|
.setBusyState(busyState)
|