java110
2021-05-10 3835848b28f3cf605aa1fbda443024ee11740493
service-job/src/main/java/com/java110/job/adapt/hcIot/RestartMachineAdapt.java
old mode 100644 new mode 100755
@@ -17,6 +17,7 @@
import com.alibaba.fastjson.JSONObject;
import com.java110.core.client.RestTemplate;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.job.adapt.DatabusAdaptImpl;
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
@@ -42,8 +43,9 @@
    @Override
    public ResultVo restartMachine(JSONObject paramIn) {
        JSONObject postParameters = new JSONObject();
        postParameters.put("taskId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_machineTranslateId));
        postParameters.put("machineCode", paramIn.getString("machineCode"));
        HttpEntity<MultiValueMap<String, Object>> httpEntity = new HttpEntity(postParameters, getHeaders(outRestTemplate));
        HttpEntity<MultiValueMap<String, Object>> httpEntity = new HttpEntity(postParameters.toJSONString(), getHeaders(outRestTemplate));
        ResponseEntity<String> responseEntity = outRestTemplate.exchange(IotConstant.getUrl(IotConstant.RESTART_MACHINE), HttpMethod.POST, httpEntity, String.class);
        if (responseEntity.getStatusCode() != HttpStatus.OK) {
            return new ResultVo(ResultVo.CODE_ERROR, responseEntity.getBody());