<%@ page import="org.apache.log4j.Logger"%>
<%@ page import="ro.emid.common.utils.ObjectUtils" %>
<%@ page import="ro.emid.common.utils.ReclamatiiUtils" %>
<%
    final Logger LOG = Logger.getLogger("checkCIR_jsp");
    final long codStrada = ObjectUtils.getLongValue(request.getParameter("codStrada"));
    final String localitate = ObjectUtils.getStringValue(request.getParameter("loc"));
    final String tipArtera = ObjectUtils.getStringValue(request.getParameter("tipArtera"));
    final String strada = ObjectUtils.getStringValue(request.getParameter("strada"));

    final long nr = ObjectUtils.getLongValue(request.getParameter("nr"), -1);
    final String bloc  = ObjectUtils.getStringValue( request.getParameter("bloc"));
    final String scara = ObjectUtils.getStringValue( request.getParameter("scara"));
    
    LOG.debug(" codStrada = " + codStrada);
    final StringBuffer responseMessage = new StringBuffer();
    try {
        LOG.debug("Check Cir - [Localitate:"+localitate+",tipArtera:"+tipArtera+",strada:"+strada+",nr:"+nr+",bloc:"+bloc+",scara:"+scara+ ']');
        ReclamatiiUtils.getCir( localitate, tipArtera, strada, nr,  bloc, scara, responseMessage);
    } catch (Throwable t) {
        LOG.error("Eroare check CIR", t);
        responseMessage.append("Eroare Identificare CIR \n").append(t.getMessage());
    }
    LOG.debug(responseMessage);
%>
<respmesg><%=responseMessage%></respmesg>