|
|
|
@ -231,6 +231,9 @@ public class DeviceServiceImpl implements IDeviceService { |
|
|
|
if (StringUtils.isNotBlank(deviceAddParams.getDataMapping()) && !CommonUtil.isJson(deviceAddParams.getDataMapping())){ |
|
|
|
return new SimpleDataResponse(ResponseCode.MSG_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "dataMappingFormatError")); |
|
|
|
} |
|
|
|
if (null == deviceAddParams.getAssetId()){ |
|
|
|
return new SimpleDataResponse(ResponseCode.MSG_ERROR, "assetId is null"); |
|
|
|
} |
|
|
|
/** Some validation operations **/ |
|
|
|
try { |
|
|
|
List<Long> selfAndSubCompanyList = commonOpt.getSelfAndSubCompanyId(companyId); |
|
|
|
@ -316,6 +319,9 @@ public class DeviceServiceImpl implements IDeviceService { |
|
|
|
if (ObjectUtils.isEmpty(deviceUpdateParams.getId())) { |
|
|
|
return new SimpleDataResponse(ResponseCode.MSG_ERROR, "id is null"); |
|
|
|
} |
|
|
|
if (null == deviceUpdateParams.getAssetId()){ |
|
|
|
return new SimpleDataResponse(ResponseCode.MSG_ERROR, "assetId is null"); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(deviceUpdateParams.getDataMapping()) && !CommonUtil.isJson(deviceUpdateParams.getDataMapping())){ |
|
|
|
return new SimpleDataResponse(ResponseCode.MSG_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "dataMappingFormatError")); |
|
|
|
} |
|
|
|
|