装置注册逻辑判断添加
This commit is contained in:
@@ -14,7 +14,8 @@ public enum AccessResponseEnum {
|
|||||||
* A0301 ~ A0399 用于用户模块的枚举
|
* A0301 ~ A0399 用于用户模块的枚举
|
||||||
* <p>
|
* <p>
|
||||||
*/
|
*/
|
||||||
NDID_NO_FIND("A0301", "此设备未录入或已注册!"),
|
NDID_NO_FIND("A0301", "此设备未录入!"),
|
||||||
|
NDID_SAME_STEP("A0301", "此设备已注册!"),
|
||||||
|
|
||||||
MISSING_CLIENT("A0302","设备客户端不在线!"),
|
MISSING_CLIENT("A0302","设备客户端不在线!"),
|
||||||
MODEL_REPEAT("A0302", "模板存在,请勿重复录入!"),
|
MODEL_REPEAT("A0302", "模板存在,请勿重复录入!"),
|
||||||
|
|||||||
@@ -113,6 +113,13 @@ public class CsDeviceServiceImpl implements ICsDeviceService {
|
|||||||
csLogsFeignClient.addUserLog(logDto);
|
csLogsFeignClient.addUserLog(logDto);
|
||||||
throw new BusinessException(AccessResponseEnum.NDID_NO_FIND);
|
throw new BusinessException(AccessResponseEnum.NDID_NO_FIND);
|
||||||
}
|
}
|
||||||
|
//判断是否重复注册
|
||||||
|
if (!Objects.isNull(csEquipmentDeliveryVO.getNdid()) && Objects.equals(type,csEquipmentDeliveryVO.getProcess())){
|
||||||
|
logDto.setResult(0);
|
||||||
|
logDto.setFailReason(AccessResponseEnum.NDID_SAME_STEP.getMessage());
|
||||||
|
csLogsFeignClient.addUserLog(logDto);
|
||||||
|
throw new BusinessException(AccessResponseEnum.NDID_SAME_STEP);
|
||||||
|
}
|
||||||
//2.判断设备是否是直连设备
|
//2.判断设备是否是直连设备
|
||||||
SysDicTreePO sysDicTreePo = dictTreeFeignClient.queryById(csEquipmentDeliveryVO.getDevType()).getData();
|
SysDicTreePO sysDicTreePo = dictTreeFeignClient.queryById(csEquipmentDeliveryVO.getDevType()).getData();
|
||||||
if (Objects.isNull(sysDicTreePo)){
|
if (Objects.isNull(sysDicTreePo)){
|
||||||
|
|||||||
Reference in New Issue
Block a user