| 
					
				 | 
			
			
				@@ -0,0 +1,59 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+package com.zcxk.rmcp.web.controller; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.zcxk.core.common.pojo.AjaxMessage; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.zcxk.rmcp.api.dto.install.InstallPlanInputDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.zcxk.rmcp.api.dto.install.MeterSyncDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.zcxk.rmcp.api.dto.install.MeterSyncInputDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.zcxk.rmcp.core.dao.DeviceMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.zcxk.rmcp.web.logAdvice.LogAnnotation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.zcxk.rmcp.web.service.install.InstallPlanService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import io.swagger.annotations.ApiOperation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import io.swagger.annotations.ApiParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.stereotype.Controller; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.web.bind.annotation.PostMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.web.bind.annotation.RequestBody; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.web.bind.annotation.RequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.web.bind.annotation.ResponseBody; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import javax.validation.Valid; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @author linqingwei 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ * @date 2021-09-07 14:12 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@Controller 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@ResponseBody 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@RequestMapping("/syncData") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+@Api(tags = "计费数据同步接口类") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+public class SyncDataApi { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private InstallPlanService installPlanService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private DeviceMapper deviceMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @ResponseBody 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PostMapping("syncPlan") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @ApiOperation(value = "同步计划") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public AjaxMessage syncPlan( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            @ApiParam(value = "安装计划", required = true) @RequestBody(required = true) @Valid InstallPlanInputDto installPlanInput 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    ) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        installPlanService.add(installPlanInput); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return AjaxMessage.success(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @ResponseBody 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @PostMapping("meterSync") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @ApiOperation(value = "水表同步接口") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public AjaxMessage<List<MeterSyncDto>> meterSync( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            @ApiParam(value = "参数", required = true) @RequestBody(required = true) MeterSyncInputDto meterSync 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    ){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<MeterSyncDto> list = deviceMapper.meterSync(meterSync); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return AjaxMessage.success(list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 |