|
@ -137,6 +137,10 @@ public class DataInputService {
|
|
|
if(StringUtils.isBlank(deviceSn)){
|
|
|
throw new ServiceException("设备编码不能为空");
|
|
|
}
|
|
|
String hospital = jsonObject.getString("hospital");
|
|
|
if(StringUtils.isBlank(hospital)){
|
|
|
throw new ServiceException("医院编码不能为空");
|
|
|
}
|
|
|
IotDeviceDO iotDeviceDO = iotDeviceService.findByDeviceSn(deviceSn);
|
|
|
if(iotDeviceDO==null){
|
|
|
throw new ServiceException("请先注册设备后在上传");
|
|
@ -144,6 +148,7 @@ public class DataInputService {
|
|
|
try {
|
|
|
IotDeviceUploadRecordDO recordDO = new IotDeviceUploadRecordDO();
|
|
|
recordDO.setDeviceSn(deviceSn);
|
|
|
recordDO.setHospital(hospital);
|
|
|
recordDO.setJsonData(json);
|
|
|
recordDO.setCategoryCode("uploadDeviceInfo");
|
|
|
recordDO.setStatus(0);
|