Administrator
2024-06-03 620c3af4bb8c53d5ec4c4d0127c9d92dc8aa4f65
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandResultCtrl.java
@@ -3,6 +3,7 @@
import com.dy.common.mw.protocol.Data;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.pipIrrGlobal.command.ComSupport;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
@@ -25,10 +26,11 @@
public class CommandResultCtrl extends ComSupport {
    @PostMapping(path = "receive", consumes = MediaType.APPLICATION_JSON_VALUE)
    public BaseResponse<String> receive(@RequestBody Data data) {
        String comId = "0";
        Long comId = 0L;
        if(data.getCommandId() != null) {
            comId = data.getCommandId();
            comId = Long.parseLong(data.getCommandId());
        }
        CompletableFuture<Data> feature = (CompletableFuture<Data>) features.get(comId);
        if(feature != null) {
            feature.complete(data);