parent
76696205b0
commit
1aef6bf19e
|
@ -277,7 +277,15 @@ public enum ErrorCode {
|
|||
*/
|
||||
ERR_ADDBUSINESS(302, "添加客户业务失败"),
|
||||
|
||||
/**
|
||||
* Err delbusiness error code.
|
||||
*/
|
||||
ERR_DELBUSINESS(303, "删除客户业务失败"),
|
||||
|
||||
/**
|
||||
* Err not found device error code.
|
||||
*/
|
||||
ERR_NOTFOUNDDEVICE(304, "找不到设备先添加设备"),
|
||||
;
|
||||
|
||||
/**
|
||||
|
|
|
@ -190,6 +190,10 @@ public class DisposeAbilityRouterServiceImpl implements DisposeAbilityRouterServ
|
|||
*/
|
||||
@Override
|
||||
public ErrorCode verifyDisposeCapacity(Long deviceId, String disposeIp, DisposeCapacityType capacityType) {
|
||||
//处置平台无处置设备,直接报错
|
||||
if(getAllAbilityDevices().size() == 0 ) {
|
||||
return ErrorCode.ERR_NOTFOUNDDEVICE;
|
||||
}
|
||||
|
||||
if (getAllAbilityDevices().stream()
|
||||
.noneMatch(f -> deviceId == -1 || f.getDev().getId().equals(deviceId))) {
|
||||
|
|
Loading…
Reference in New Issue