| package com.dy.pipIrrMwTestRtu.p206V1_0_0; | 
|   | 
| import com.dy.common.webUtil.BaseResponse; | 
| import com.dy.pipIrrMwTestRtu.tcpClient.upData.UpCd38; | 
| import com.dy.pipIrrMwTestRtu.tcpClient.upData.UpCd83Close; | 
| import com.dy.pipIrrMwTestRtu.tcpClient.upData.UpCd83Open; | 
| import com.dy.pipIrrMwTestRtu.tcpClient.upData.UpCd84; | 
| import lombok.extern.slf4j.Slf4j; | 
| import org.springframework.web.bind.annotation.GetMapping; | 
| import org.springframework.web.bind.annotation.RequestMapping; | 
| import org.springframework.web.bind.annotation.RestController; | 
|   | 
| /** | 
|  * @Author: liurunyu | 
|  * @Date: 2024/6/29 6:46 | 
|  * @Description | 
|  */ | 
| @Slf4j | 
| @RestController | 
| @RequestMapping(path="rtuP206V1_0_0") | 
| @SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked") | 
| public class RtuP206V1_0_0Ctrl { | 
|   | 
|     @GetMapping(path = "test") | 
|     public BaseResponse<String> test(String com) { | 
|         if(com.equals("83Open")){ | 
|             UpCd83Open.upData(); | 
|         }else if(com.equals("83Close")){ | 
|             UpCd83Close.upData(); | 
|         }else if(com.equals("84")){ | 
|             UpCd84.upData(); | 
|         }else if(com.equals("38")){ | 
|             UpCd38.upData(); | 
|         } | 
|         BaseResponse<String> rt = new BaseResponse<String>() ; | 
|         rt.setCode("001") ; | 
|         rt.setMsg("已经上报数据") ; | 
|         rt.setSuccess(true) ; | 
|         return rt ; | 
|     } | 
|   | 
| } |