|  | @ -3,6 +3,7 @@ package com.yihu.iot.controller.third;
 | 
	
		
			
				|  |  | import com.alibaba.fastjson.JSONObject;
 | 
	
		
			
				|  |  | import com.yihu.iot.aop.IntefaceLogRequired;
 | 
	
		
			
				|  |  | import com.yihu.iot.datainput.service.DataInputService;
 | 
	
		
			
				|  |  | import com.yihu.iot.datainput.service.DataSearchService;
 | 
	
		
			
				|  |  | import com.yihu.iot.datainput.util.ConstantUtils;
 | 
	
		
			
				|  |  | import com.yihu.jw.exception.ApiException;
 | 
	
		
			
				|  |  | import com.yihu.jw.restmodel.web.MixEnvelop;
 | 
	
	
		
			
				|  | @ -11,8 +12,8 @@ import com.yihu.jw.rm.iot.IotRequestMapping;
 | 
	
		
			
				|  |  | import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  | import io.swagger.annotations.ApiParam;
 | 
	
		
			
				|  |  | import org.apache.commons.lang.StringUtils;
 | 
	
		
			
				|  |  | import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | import org.springframework.util.StringUtils;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.PostMapping;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  | import org.springframework.web.bind.annotation.RequestParam;
 | 
	
	
		
			
				|  | @ -27,6 +28,8 @@ public class ThirdDataInputController {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private DataInputService dataInputService;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private DataSearchService dataSearchService;
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @PostMapping(value = IotRequestMapping.ThirdOpen.bindUser)
 | 
	
		
			
				|  |  |     @ApiOperation(value = "设备注册绑定", notes = "设备注册并绑定用户")
 | 
	
	
		
			
				|  | @ -38,6 +41,23 @@ public class ThirdDataInputController {
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @PostMapping(value = IotRequestMapping.ThirdOpen.updateData)
 | 
	
		
			
				|  |  |     @ApiOperation(value = "更新体征记录", notes = "根据id更新体征记录(包括体征值、上传时间等)")
 | 
	
		
			
				|  |  |     @IntefaceLogRequired
 | 
	
		
			
				|  |  |     public MixEnvelop updateData(
 | 
	
		
			
				|  |  |             @ApiParam(name = "jsonData", value = "", defaultValue = "")
 | 
	
		
			
				|  |  |             @RequestParam String jsonData) throws IOException {
 | 
	
		
			
				|  |  |         try{
 | 
	
		
			
				|  |  |             String str = dataSearchService.updateData(jsonData);
 | 
	
		
			
				|  |  |             if(!StringUtils.equalsIgnoreCase("true",str)){
 | 
	
		
			
				|  |  |                 return MixEnvelop.getSuccess(DataRequestMapping.DataSearch.message_fail,str);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             return MixEnvelop.getSuccess(DataRequestMapping.DataSearch.update_success,str);
 | 
	
		
			
				|  |  |         } catch (ApiException e){
 | 
	
		
			
				|  |  |             return MixEnvelop.getError(e.getMessage(), e.getErrorCode());
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @PostMapping(value = IotRequestMapping.ThirdOpen.uploadData)
 | 
	
		
			
				|  |  |     @ApiOperation(value = "体征数据上传", notes = "数据上传入库")
 | 
	
		
			
				|  |  |     @IntefaceLogRequired
 |