Example usage for java.lang NumberFormatException printStackTrace

List of usage examples for java.lang NumberFormatException printStackTrace

Introduction

In this page you can find the example usage for java.lang NumberFormatException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:com.znsx.cms.web.controller.TmDeviceController.java

@InterfaceDescription(logon = true, method = "List_Push_Button", cmd = "2264")
@RequestMapping("/list_push_button.json")
public void listPushButton(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String organId = request.getParameter("organId");
    if (StringUtils.isBlank(organId)) {
        throw new BusinessException(ErrorCode.PARAMETER_NOT_FOUND, "missing [organId]");
    }/*from w  w  w. j  a va 2 s . c om*/

    String name = request.getParameter("name");
    name = StringUtils.replace(name, " ", "+");
    String standardNumber = request.getParameter("standardNumber");
    String stakeNumber = request.getParameter("stakeNumber");
    stakeNumber = StringUtils.replace(stakeNumber, " ", "+");
    Integer startIndex = 0;
    String start = request.getParameter("startIndex");
    if (StringUtils.isNotBlank(start)) {
        try {
            startIndex = Integer.parseInt(start);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter startIndex[" + start + "] invalid !");
        }
    }

    Integer limit = 1000;
    String limitString = request.getParameter("limit");
    if (StringUtils.isNotBlank(limitString)) {
        try {
            limit = Integer.parseInt(limitString);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter limit[" + limitString + "] invalid !");
        }
    }

    Integer totalCount = deviceManager.countPushButton(organId, name, standardNumber, stakeNumber);

    if (startIndex != 0 && totalCount.intValue() != 0) {
        if (startIndex.intValue() >= totalCount.intValue()) {
            startIndex -= ((startIndex.intValue() - totalCount.intValue()) / limit + 1) * limit;
        }
    }

    List<GetPushButtonVO> pushButtonList = deviceManager.listPushButton(organId, name, standardNumber,
            stakeNumber, startIndex, limit);

    ListPushButtonDTO dto = new ListPushButtonDTO();
    dto.setCmd("2264");
    dto.setPushButtonList(pushButtonList);
    dto.setMethod("List_Push_Button");
    dto.setTotalCount(totalCount + "");

    writePage(response, dto);
}

From source file:com.znsx.cms.web.controller.TmDeviceController.java

@InterfaceDescription(logon = true, method = "List_No_Detector", cmd = "2254")
@RequestMapping("/list_no_detector.json")
public void listNoDetector(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String organId = request.getParameter("organId");
    if (StringUtils.isBlank(organId)) {
        throw new BusinessException(ErrorCode.PARAMETER_NOT_FOUND, "missing [organId]");
    }/*from  w w  w .  j av  a  2  s.c  o m*/

    String name = request.getParameter("name");
    name = StringUtils.replace(name, " ", "+");
    String standardNumber = request.getParameter("standardNumber");
    String stakeNumber = request.getParameter("stakeNumber");
    stakeNumber = StringUtils.replace(stakeNumber, " ", "+");
    Integer startIndex = 0;
    String start = request.getParameter("startIndex");
    if (StringUtils.isNotBlank(start)) {
        try {
            startIndex = Integer.parseInt(start);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter startIndex[" + start + "] invalid !");
        }
    }

    Integer limit = 1000;
    String limitString = request.getParameter("limit");
    if (StringUtils.isNotBlank(limitString)) {
        try {
            limit = Integer.parseInt(limitString);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter limit[" + limitString + "] invalid !");
        }
    }

    Integer totalCount = deviceManager.countNoDetector(organId, name, standardNumber, stakeNumber);

    if (startIndex != 0 && totalCount.intValue() != 0) {
        if (startIndex.intValue() >= totalCount.intValue()) {
            startIndex -= ((startIndex.intValue() - totalCount.intValue()) / limit + 1) * limit;
        }
    }

    List<GetNoDetectorVO> noDetectorList = deviceManager.listNoDetector(organId, name, standardNumber,
            stakeNumber, startIndex, limit);

    ListNoDetectorDTO dto = new ListNoDetectorDTO();
    dto.setCmd("2254");
    dto.setNoDetectorList(noDetectorList);
    dto.setMethod("List_No_Detector");
    dto.setTotalCount(totalCount + "");

    writePage(response, dto);
}

From source file:com.znsx.cms.web.controller.TmDeviceController.java

@InterfaceDescription(logon = true, method = "List_Loli", cmd = "2224")
@RequestMapping("/list_loli.json")
public void listLoli(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String organId = request.getParameter("organId");
    if (StringUtils.isBlank(organId)) {
        throw new BusinessException(ErrorCode.PARAMETER_NOT_FOUND, "missing [organId]");
    }//from w  w w. j ava 2  s.  c o m

    String name = request.getParameter("name");
    name = StringUtils.replace(name, " ", "+");
    String standardNumber = request.getParameter("standardNumber");
    String stakeNumber = request.getParameter("stakeNumber");
    stakeNumber = StringUtils.replace(stakeNumber, " ", "+");
    Integer startIndex = 0;
    String start = request.getParameter("startIndex");
    if (StringUtils.isNotBlank(start)) {
        try {
            startIndex = Integer.parseInt(start);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter startIndex[" + start + "] invalid !");
        }
    }

    Integer limit = 1000;
    String limitString = request.getParameter("limit");
    if (StringUtils.isNotBlank(limitString)) {
        try {
            limit = Integer.parseInt(limitString);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter limit[" + limitString + "] invalid !");
        }
    }

    Integer totalCount = deviceManager.countLoli(organId, name, standardNumber, stakeNumber);

    if (startIndex != 0 && totalCount.intValue() != 0) {
        if (startIndex.intValue() >= totalCount.intValue()) {
            startIndex -= ((startIndex.intValue() - totalCount.intValue()) / limit + 1) * limit;
        }
    }

    List<GetLoliVO> loliList = deviceManager.listLoli(organId, name, standardNumber, stakeNumber, startIndex,
            limit);

    ListLoliDTO dto = new ListLoliDTO();
    dto.setCmd("2224");
    dto.setLoliList(loliList);
    dto.setMethod("List_Loli");
    dto.setTotalCount(totalCount + "");

    writePage(response, dto);
}

From source file:com.znsx.cms.web.controller.TmDeviceController.java

@InterfaceDescription(logon = true, method = "List_Weather_Stat", cmd = "2214")
@RequestMapping("/list_weather_stat.json")
public void listWeatherStat(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String organId = request.getParameter("organId");
    if (StringUtils.isBlank(organId)) {
        throw new BusinessException(ErrorCode.PARAMETER_NOT_FOUND, "missing [organId]");
    }/*from   ww  w  . ja v a2  s .c o  m*/

    String name = request.getParameter("name");
    name = StringUtils.replace(name, " ", "+");
    String standardNumber = request.getParameter("standardNumber");
    String stakeNumber = request.getParameter("stakeNumber");
    stakeNumber = StringUtils.replace(stakeNumber, " ", "+");
    Integer startIndex = 0;
    String start = request.getParameter("startIndex");
    if (StringUtils.isNotBlank(start)) {
        try {
            startIndex = Integer.parseInt(start);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter startIndex[" + start + "] invalid !");
        }
    }

    Integer limit = 1000;
    String limitString = request.getParameter("limit");
    if (StringUtils.isNotBlank(limitString)) {
        try {
            limit = Integer.parseInt(limitString);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter limit[" + limitString + "] invalid !");
        }
    }

    Integer totalCount = deviceManager.countWeatherStat(organId, name, standardNumber, stakeNumber);

    if (startIndex != 0 && totalCount.intValue() != 0) {
        if (startIndex.intValue() >= totalCount.intValue()) {
            startIndex -= ((startIndex.intValue() - totalCount.intValue()) / limit + 1) * limit;
        }
    }

    List<GetWeatherStatVO> weatherStatList = deviceManager.listWeatherStat(organId, name, standardNumber,
            stakeNumber, startIndex, limit);

    ListWeatherStatDTO dto = new ListWeatherStatDTO();
    dto.setCmd("2214");
    dto.setWeatherStatList(weatherStatList);
    dto.setMethod("List_Weather_Stat");
    dto.setTotalCount(totalCount + "");

    writePage(response, dto);
}

From source file:com.znsx.cms.web.controller.TmDeviceController.java

@InterfaceDescription(logon = true, method = "List_Vehicle_Detector", cmd = "2204")
@RequestMapping("/list_vehicle_detector.json")
public void listVehicleDetector(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String organId = request.getParameter("organId");
    if (StringUtils.isBlank(organId)) {
        throw new BusinessException(ErrorCode.PARAMETER_NOT_FOUND, "missing [organId]");
    }//from w w w .  j a  v a2  s. c  o  m

    String name = request.getParameter("name");
    name = StringUtils.replace(name, " ", "+");
    String standardNumber = request.getParameter("standardNumber");
    String stakeNumber = request.getParameter("stakeNumber");
    stakeNumber = StringUtils.replace(stakeNumber, " ", "+");
    Integer startIndex = 0;
    String start = request.getParameter("startIndex");
    if (StringUtils.isNotBlank(start)) {
        try {
            startIndex = Integer.parseInt(start);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter startIndex[" + start + "] invalid !");
        }
    }

    Integer limit = 1000;
    String limitString = request.getParameter("limit");
    if (StringUtils.isNotBlank(limitString)) {
        try {
            limit = Integer.parseInt(limitString);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter limit[" + limitString + "] invalid !");
        }
    }

    Integer totalCount = deviceManager.countVehicleDetector(organId, name, standardNumber, stakeNumber);

    if (startIndex != 0 && totalCount.intValue() != 0) {
        if (startIndex.intValue() >= totalCount.intValue()) {
            startIndex -= ((startIndex.intValue() - totalCount.intValue()) / limit + 1) * limit;
        }
    }

    List<GetVehicleDetectorVO> vehicleDetectorList = deviceManager.listVehicleDetector(organId, name,
            standardNumber, stakeNumber, startIndex, limit);

    ListVehicleDetectorDTO dto = new ListVehicleDetectorDTO();
    dto.setCmd("2204");
    dto.setVehicleDetectorList(vehicleDetectorList);
    dto.setMethod("List_Vehicle_Detector");
    dto.setTotalCount(totalCount + "");

    writePage(response, dto);
}

From source file:com.znsx.cms.web.controller.TmDeviceController.java

@InterfaceDescription(logon = true, method = "List_Wind_Speed", cmd = "2194")
@RequestMapping("/list_wind_speed.json")
public void listWindSpeed(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String organId = request.getParameter("organId");
    if (StringUtils.isBlank(organId)) {
        throw new BusinessException(ErrorCode.PARAMETER_NOT_FOUND, "missing [organId]");
    }//ww  w .  j av a  2  s  . c o  m

    String name = request.getParameter("name");
    name = StringUtils.replace(name, " ", "+");
    String standardNumber = request.getParameter("standardNumber");
    String stakeNumber = request.getParameter("stakeNumber");
    stakeNumber = StringUtils.replace(stakeNumber, " ", "+");
    Integer startIndex = 0;
    String start = request.getParameter("startIndex");
    if (StringUtils.isNotBlank(start)) {
        try {
            startIndex = Integer.parseInt(start);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter startIndex[" + start + "] invalid !");
        }
    }

    Integer limit = 1000;
    String limitString = request.getParameter("limit");
    if (StringUtils.isNotBlank(limitString)) {
        try {
            limit = Integer.parseInt(limitString);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter limit[" + limitString + "] invalid !");
        }
    }

    Integer totalCount = deviceManager.countWindSpeed(organId, name, standardNumber, stakeNumber);

    if (startIndex != 0 && totalCount.intValue() != 0) {
        if (startIndex.intValue() >= totalCount.intValue()) {
            startIndex -= ((startIndex.intValue() - totalCount.intValue()) / limit + 1) * limit;
        }
    }

    List<GetWindSpeedVO> windSpeedList = deviceManager.listWindSpeed(organId, name, standardNumber, stakeNumber,
            startIndex, limit);

    ListWindSpeedDTO dto = new ListWindSpeedDTO();
    dto.setCmd("2194");
    dto.setWindSpeedList(windSpeedList);
    dto.setMethod("List_Wind_Speed");
    dto.setTotalCount(totalCount + "");

    writePage(response, dto);
}

From source file:com.znsx.cms.web.controller.TmDeviceController.java

@InterfaceDescription(logon = true, method = "List_Urgent_Phone", cmd = "2444")
@RequestMapping("/list_urgent_phone.json")
public void listUrgentPhone(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String organId = request.getParameter("organId");
    if (StringUtils.isBlank(organId)) {
        throw new BusinessException(ErrorCode.PARAMETER_NOT_FOUND, "missing [organId]");
    }// ww w . ja v  a  2 s  .co  m

    String name = request.getParameter("name");
    name = StringUtils.replace(name, " ", "+");
    String standardNumber = request.getParameter("standardNumber");
    String stakeNumber = request.getParameter("stakeNumber");
    stakeNumber = StringUtils.replace(stakeNumber, " ", "+");
    Integer startIndex = 0;
    String start = request.getParameter("startIndex");
    if (StringUtils.isNotBlank(start)) {
        try {
            startIndex = Integer.parseInt(start);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter startIndex[" + start + "] invalid !");
        }
    }

    Integer limit = 1000;
    String limitString = request.getParameter("limit");
    if (StringUtils.isNotBlank(limitString)) {
        try {
            limit = Integer.parseInt(limitString);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter limit[" + limitString + "] invalid !");
        }
    }

    Integer totalCount = deviceManager.countUrgentPhone(organId, name, standardNumber, stakeNumber);

    if (startIndex != 0 && totalCount.intValue() != 0) {
        if (startIndex.intValue() >= totalCount.intValue()) {
            startIndex -= ((startIndex.intValue() - totalCount.intValue()) / limit + 1) * limit;
        }
    }

    List<GetUrgentPhoneVO> urgentPhoneList = deviceManager.listUrgentPhone(organId, name, standardNumber,
            stakeNumber, startIndex, limit);

    ListUrgentPhoneDTO dto = new ListUrgentPhoneDTO();
    dto.setCmd("2444");
    dto.setUrgentPhoneList(urgentPhoneList);
    dto.setMethod("List_Urgent_Phone");
    dto.setTotalCount(totalCount + "");

    writePage(response, dto);
}

From source file:com.znsx.cms.web.controller.TmDeviceController.java

@InterfaceDescription(logon = true, method = "List_GPS_Bind_Device", cmd = "2456")
@RequestMapping("/list_gps_bind_device.json")
public void listSolarBindDevice(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String organId = request.getParameter("organId");
    if (StringUtils.isBlank(organId)) {
        throw new BusinessException(ErrorCode.PARAMETER_NOT_FOUND, "missing [organId]");
    }/*from w  w w .  j a  v  a2s .  c o m*/

    String gpsId = request.getParameter("gpsId");
    if (StringUtils.isBlank(gpsId)) {
        throw new BusinessException(ErrorCode.PARAMETER_NOT_FOUND, "missing [gpsId]");
    }

    String type = request.getParameter("type");
    if (StringUtils.isBlank(type)) {
        throw new BusinessException(ErrorCode.PARAMETER_NOT_FOUND, "missing [type]");
    }

    String name = request.getParameter("name");

    int startIndex = 0;
    String startIndexString = request.getParameter("startIndex");
    if (StringUtils.isNotBlank(startIndexString)) {
        try {
            startIndex = Integer.parseInt(startIndexString);
        } catch (NumberFormatException e) {
            e.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter startIndex[" + startIndexString + "] invalid !");
        }
    }

    int limit = 10;
    String limitString = request.getParameter("limit");
    if (StringUtils.isNotBlank(limitString)) {
        try {
            limit = Integer.parseInt(limitString);
        } catch (NumberFormatException e) {
            e.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter limit[" + limitString + "] invalid !");
        }
    }

    List<DevicePermissionVO> deviceList = null;
    int totalCount = 0;
    if ((TypeDefinition.DEVICE_TYPE_CAMERA + "").equals(type)) {
        totalCount = deviceManager.countOrganCamera(organId, gpsId, name);
        // omc?????
        if (startIndex != 0 && totalCount != 0) {
            if (startIndex >= totalCount) {
                startIndex -= ((startIndex - totalCount) / limit + 1) * limit;
            }
        }
        deviceList = deviceManager.listOrganCameraByGPS(organId, gpsId, name, startIndex, limit);
    } else {
        throw new BusinessException(ErrorCode.PARAMETER_INVALID, "Parameter type[" + type + "] invalid !");
    }

    ListGPSPrivilegeDTO dto = new ListGPSPrivilegeDTO();
    dto.setCmd("2456");
    dto.setMethod("List_GPS_Bind_Device");
    dto.setTotalCount(totalCount + "");
    dto.setGpsDevices(deviceList);
    writePage(response, dto);

}

From source file:com.znsx.cms.web.controller.TmDeviceController.java

@InterfaceDescription(logon = true, method = "List_Control_Device", cmd = "2274")
@RequestMapping("/list_control_device.json")
public void listControlDevice(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String organId = request.getParameter("organId");
    if (StringUtils.isBlank(organId)) {
        throw new BusinessException(ErrorCode.PARAMETER_NOT_FOUND, "missing [organId]");
    }/*w w  w .  j  a va 2 s  .com*/

    String name = request.getParameter("name");
    name = StringUtils.replace(name, " ", "+");
    String standardNumber = request.getParameter("standardNumber");
    String stakeNumber = request.getParameter("stakeNumber");
    stakeNumber = StringUtils.replace(stakeNumber, " ", "+");
    Integer startIndex = 0;
    String start = request.getParameter("startIndex");
    if (StringUtils.isNotBlank(start)) {
        try {
            startIndex = Integer.parseInt(start);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter startIndex[" + start + "] invalid !");
        }
    }

    Integer limit = 1000;
    String limitString = request.getParameter("limit");
    if (StringUtils.isNotBlank(limitString)) {
        try {
            limit = Integer.parseInt(limitString);
        } catch (NumberFormatException n) {
            n.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter limit[" + limitString + "] invalid !");
        }
    }

    Short type = null;
    String typeString = request.getParameter("type");
    if (StringUtils.isNotBlank(typeString)) {
        try {
            type = Short.parseShort(typeString);
        } catch (NumberFormatException e) {
            e.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter coConctValue[" + typeString + "] invalid !");
        }
    }

    Short subType = null;
    String subTypeString = request.getParameter("subType");
    if (StringUtils.isNotBlank(subTypeString)) {
        try {
            subType = Short.parseShort(subTypeString);
        } catch (NumberFormatException e) {
            e.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter coConctValue[" + subTypeString + "] invalid !");
        }
    }

    Integer totalCount = deviceManager.countControlDevice(organId, name, standardNumber, stakeNumber, type,
            subType);

    if (startIndex != 0 && totalCount.intValue() != 0) {
        if (startIndex.intValue() >= totalCount.intValue()) {
            startIndex -= ((startIndex.intValue() - totalCount.intValue()) / limit + 1) * limit;
        }
    }

    List<GetControlDeviceVO> controlDeviceList = deviceManager.listControlDevice(organId, name, standardNumber,
            stakeNumber, startIndex, limit, type, subType);

    ListControlDeviceDTO dto = new ListControlDeviceDTO();
    dto.setCmd("2274");
    dto.setControlDeviceList(controlDeviceList);
    dto.setMethod("List_Control_Device");
    dto.setTotalCount(totalCount + "");

    writePage(response, dto);
}

From source file:com.znsx.cms.web.controller.TmDeviceController.java

@InterfaceDescription(logon = true, method = "Update_Vehicle_Detector", cmd = "2201")
@RequestMapping("/update_vehicle_detector.json")
public void updateVehicleDetector(HttpServletRequest request, HttpServletResponse response) throws Exception {
    String id = request.getParameter("id");
    if (StringUtils.isBlank(id)) {
        throw new BusinessException(ErrorCode.PARAMETER_NOT_FOUND, "missing [id]");
    }//from ww w .j  a va2s . co m

    String standardNumber = request.getParameter("standardNumber");

    String name = request.getParameter("name");
    if (null != name && StringUtils.isBlank(name)) {
        throw new BusinessException(ErrorCode.PARAMETER_INVALID, "Can not modify name to empty !");
    }
    name = StringUtils.replace(name, " ", "+");
    String dasId = request.getParameter("dasId");
    String organId = request.getParameter("organId");
    Integer period = null;
    String periodString = request.getParameter("period");
    if (StringUtils.isNotBlank(periodString)) {
        try {
            period = Integer.parseInt(periodString);
        } catch (NumberFormatException e) {
            e.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter period[" + periodString + "] invalid !");
        }
    }
    String stakeNumber = request.getParameter("stakeNumber");
    stakeNumber = StringUtils.replace(stakeNumber, " ", "+");
    String longitude = request.getParameter("longitude");
    String latitude = request.getParameter("latitude");

    Integer sUpLimit = null;
    String sUpLimitString = request.getParameter("sUpLimit");
    if (StringUtils.isNotBlank(sUpLimitString)) {
        try {
            sUpLimit = Integer.parseInt(sUpLimitString);
        } catch (NumberFormatException e) {
            e.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter coConctValue[" + sUpLimitString + "] invalid !");
        }
    }

    Integer sLowLimit = null;
    String sLowLimitString = request.getParameter("sLowLimit");
    if (StringUtils.isNotBlank(sLowLimitString)) {
        try {
            sLowLimit = Integer.parseInt(sLowLimitString);
        } catch (NumberFormatException e) {
            e.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter visibilityValue[" + sLowLimitString + "] invalid !");
        }
    }

    Integer oUpLimit = null;
    String oUpLimitString = request.getParameter("oUpLimit");
    if (StringUtils.isNotBlank(oUpLimitString)) {
        try {
            oUpLimit = Integer.parseInt(oUpLimitString);
        } catch (NumberFormatException e) {
            e.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter visibilityValue[" + oUpLimitString + "] invalid !");
        }
    }

    Integer oLowLimit = null;
    String oLowLimitString = request.getParameter("oLowLimit");
    if (StringUtils.isNotBlank(oLowLimitString)) {
        try {
            oLowLimit = Integer.parseInt(oLowLimitString);
        } catch (NumberFormatException e) {
            e.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter visibilityValue[" + oLowLimitString + "] invalid !");
        }
    }

    Integer vUpLimit = null;
    String vUpLimitString = request.getParameter("vUpLimit");
    if (StringUtils.isNotBlank(vUpLimitString)) {
        try {
            vUpLimit = Integer.parseInt(vUpLimitString);
        } catch (NumberFormatException e) {
            e.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter visibilityValue[" + vUpLimitString + "] invalid !");
        }
    }

    Integer vLowLimit = null;
    String vLowLimitString = request.getParameter("vLowLimit");
    if (StringUtils.isNotBlank(vLowLimitString)) {
        try {
            vLowLimit = Integer.parseInt(vLowLimitString);
        } catch (NumberFormatException e) {
            e.printStackTrace();
            throw new BusinessException(ErrorCode.PARAMETER_INVALID,
                    "Parameter visibilityValue[" + vLowLimitString + "] invalid !");
        }
    }

    String note = request.getParameter("note");
    String navigation = request.getParameter("navigation");
    String ip = request.getParameter("ip");
    String port = request.getParameter("port");
    String laneNumber = request.getParameter("laneNumber");
    String reserve = request.getParameter("reserve");

    deviceManager.updateVehicleDetector(id, name, standardNumber, dasId, organId, period, stakeNumber,
            longitude, latitude, sUpLimit, sLowLimit, oUpLimit, oLowLimit, vUpLimit, vLowLimit, note,
            navigation, ip, port, laneNumber, reserve);

    BaseDTO dto = new BaseDTO();
    dto.setCmd("2201");
    dto.setMethod("Update_Vehicle_Detector");

    writePage(response, dto);
}