| 
					
				 | 
			
			
				@ -97,12 +97,12 @@ public class DataInputService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(StringUtils.isBlank(categoryName)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            throw new ServiceException("设备类型名称不能为空"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        int count = iotDeviceService.countByDeviceSn(deviceSn); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(count > 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            throw new ServiceException("设备唯一码已存在,请检查是否已经上传过,或者换一个编码"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String result = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            int count = iotDeviceService.countByDeviceSn(deviceSn); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(count > 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                throw new ServiceException("设备唯一码已存在,请检查是否已经上传过,或者换一个编码"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            IotDeviceDO iotDeviceDO = new IotDeviceDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            iotDeviceDO.setDeviceSn(deviceSn); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            iotDeviceDO.setCategoryCode(categoryCode); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -127,12 +127,19 @@ public class DataInputService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONObject jsonObject = JSONObject.parseObject(json); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String deviceSn = jsonObject.getString("deviceSn"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String hospital = jsonObject.getString("hospital"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String data = jsonObject.getJSONArray("data").toJSONString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(StringUtils.isBlank(data)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            throw new ServiceException("设备数据data不能为空"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(data.length()>60000){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            throw new ServiceException("设备数据data超过最大允许字符"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String categoryCode = jsonObject.getString("categoryCode"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            IotDeviceUploadRecordDO recordDO = new IotDeviceUploadRecordDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            recordDO.setDeviceSn(deviceSn); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            recordDO.setHospital(hospital); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            recordDO.setJsonData(jsonObject.getJSONArray("data").toJSONString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            recordDO.setJsonData(data); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            recordDO.setCategoryCode(categoryCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            recordDO.setStatus(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            recordDO.setCreateTime(new Date()); 
			 |