| | |
| | | import com.whyc.dto.*; |
| | | import com.whyc.factory.ThreadPoolExecutorFactory; |
| | | import com.whyc.mapper.DevActmTestParamMapper; |
| | | import com.whyc.mapper.DevInfMapper; |
| | | import com.whyc.mapper.DevLithiumInfMapper; |
| | | import com.whyc.pojo.db_lithium_ram_db.DevActmTestParam; |
| | | import com.whyc.pojo.db_lithium_ram_db.DevInf; |
| | | import com.whyc.pojo.db_lithium_ram_db.DevLithiumInf; |
| | | import com.whyc.util.TestParamHttpUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private DevActmTestParamMapper mapper; |
| | | |
| | | @Autowired(required = false) |
| | | private DevInfMapper devInfMapper; |
| | | private DevLithiumInfMapper devLithiumInfMapper; |
| | | |
| | | private final RestTemplate restTemplate; |
| | | |
| | |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("dev_id",devId); |
| | | wrapper.last("limit 1"); |
| | | DevInf dinf=devInfMapper.selectOne(wrapper); |
| | | DevLithiumInf dinf= devLithiumInfMapper.selectOne(wrapper); |
| | | String url="http://"+dinf.getDevIp()+":8080/webService/getTestParameter"; |
| | | //将请求头部和参数合成一个请求 |
| | | MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<>(); |
| | |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("dev_id",param.getDevId()); |
| | | wrapper.last("limit 1"); |
| | | DevInf dinf=devInfMapper.selectOne(wrapper); |
| | | DevLithiumInf dinf= devLithiumInfMapper.selectOne(wrapper); |
| | | String url="http://"+dinf.getDevIp()+":8080/webService/setTestParameter"; |
| | | //将请求头部和参数合成一个请求 |
| | | MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<>(); |
| | |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("dev_id",devId); |
| | | wrapper.last("limit 1"); |
| | | DevInf dinf=devInfMapper.selectOne(wrapper); |
| | | DevLithiumInf dinf= devLithiumInfMapper.selectOne(wrapper); |
| | | String url="http://"+dinf.getDevIp()+":8080/webService"; |
| | | //将请求头部和参数合成一个请求 |
| | | MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<>(); |
| | |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | wrapper.eq("dev_id",devId); |
| | | wrapper.set("batch_state",1); |
| | | devInfMapper.update(null,wrapper); |
| | | devLithiumInfMapper.update(null,wrapper); |
| | | } |
| | | map.put(devId,dto); |
| | | } |
| | |
| | | QueryWrapper wrapper=new QueryWrapper(); |
| | | wrapper.eq("dev_id",param.getDevId()); |
| | | wrapper.last("limit 1"); |
| | | DevInf dinf=devInfMapper.selectOne(wrapper); |
| | | DevLithiumInf dinf= devLithiumInfMapper.selectOne(wrapper); |
| | | String url="http://"+dinf.getDevIp()+":8080/webService/setBatteryStorageNumber"; |
| | | //将请求头部和参数合成一个请求 |
| | | MultiValueMap<String, Object> paramMap = new LinkedMultiValueMap<>(); |