|
@@ -16,6 +16,7 @@ import com.xy.device.EnumDeviceBusyStatus;
|
|
|
import com.xy.dto.*;
|
|
|
import com.xy.dto.be.MercDto;
|
|
|
import com.xy.dto.nfc.ActiveDeviceDTO;
|
|
|
+import com.xy.dto.nfc.ResetDeviceDTO;
|
|
|
import com.xy.entity.*;
|
|
|
import com.xy.enums.SysCodeConfigureEnum;
|
|
|
import com.xy.mapper.DeviceCreateIdsMapper;
|
|
@@ -231,7 +232,16 @@ public class OpenDeviceFactoryImpl implements DeviceFactory {
|
|
|
|
|
|
@Override
|
|
|
public R restActive(MercMiniDeviceDto.RestActive restActive) {
|
|
|
- deviceChargingService.removeById(restActive.getDeviceId());
|
|
|
+ Long deviceId = restActive.getDeviceId();
|
|
|
+ String nfcSn = restActive.getNfcSn();
|
|
|
+ //nfc解绑重置
|
|
|
+ if (StrUtil.isNotEmpty(nfcSn)) {
|
|
|
+ String loginId = AuthorizeUtils.getLoginId(String.class);
|
|
|
+ ResetDeviceDTO resetParams = new ResetDeviceDTO().setOperatorId(loginId).setOperatorName(loginId).setRemark("设备激活重置").setTerminalId(String.valueOf(deviceId));
|
|
|
+ alipayDeviceService.nfcDeviceReset(resetParams);
|
|
|
+ R.feignCheckData(alipayDeviceService.nfcDeviceReset(resetParams));
|
|
|
+ }
|
|
|
+ deviceChargingService.removeById(deviceId);
|
|
|
deviceAlgorithmChargingService.remove(new LambdaQueryWrapper<DeviceAlgorithmCharging>()
|
|
|
.eq(DeviceAlgorithmCharging::getDeviceId, restActive.getDeviceId())
|
|
|
);
|
|
@@ -240,6 +250,7 @@ public class OpenDeviceFactoryImpl implements DeviceFactory {
|
|
|
.set(DeviceInfo::getActiveTime, null)
|
|
|
.eq(DeviceInfo::getDeviceId, restActive.getDeviceId())
|
|
|
);
|
|
|
+
|
|
|
return R.ok();
|
|
|
}
|
|
|
|