春风项目四线(合箱线、总装线)
yyt
2024-02-19 0b14225915932f0f5c88bc3e44302bf1c309de1a
jcdm-main/src/main/java/com/jcdm/main/da/opcuaconfig/controller/DaOpcuaConfigController.java
@@ -3,7 +3,9 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.jcdm.main.da.opcuaconfig.client.ClientHandler;
import com.jcdm.main.da.opcuaconfig.domain.DaOpcuaConfig;
import com.jcdm.main.da.opcuaconfig.domain.NodeEntity;
import com.jcdm.main.da.opcuaconfig.service.IDaOpcuaConfigService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
@@ -102,4 +104,21 @@
    {
        return toAjax(daOpcuaConfigService.deleteDaOpcuaConfigByIds(ids));
    }
    /**
     * 获取交互信号配置详细信息
     */
    @PreAuthorize("@ss.hasPermi('da:opcuaconfig:query')")
    @GetMapping(value = "/SNCode/{SNCode}/{locationCode}")
    public AjaxResult setSNCode(@PathVariable("SNCode") String SNCode,@PathVariable("locationCode") String locationCode) {
        NodeEntity node= NodeEntity.builder().index(2).identifier("CFL4CVT"+"."+locationCode+".SNCode").value(SNCode).type("string").build();
        Boolean out= null;
        try {
            out = ClientHandler.write(node);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return toAjax(out);
    }
}