public String showVehicleDetail() { try { AnnouncementInfo info = (AnnouncementInfo) service.getObject("WxManage.getGonggaoInfoById", announcementInfo); String vins = info.getGonggao_veh(); if (vins != null && !"".equals(vins)) { String vinStr = ""; String[] tmp = vins.split(","); for (String v : tmp) { vinStr += "'" + v + "',"; } if (!"".equals(vinStr)) vinStr = vinStr.substring(0, vinStr.length() - 1); UserInfo user = getCurrentUser(); VehcileInfo vehinfo = new VehcileInfo(); vehinfo.setOrganization_id(user.getOrganizationID()); if (vehicle_ln != null && vehicle_ln != "") { vehinfo.setVehicle_ln(vehicle_ln.trim()); } vehinfo.setVehicle_vin(vinStr); vehicleList = (List<VehcileInfo>) service.getObjects("WxManage.getInfosVeh", vehinfo); } } catch (BusinessException e) { super.addActionError(getText("info.db.error")); log.error(e.getMessage()); return ERROR; } catch (Exception e) { super.addActionError(getText("info.db.error")); log.error(e.getMessage()); return ERROR; } return SUCCESS; }
public String queryVehicle() { try { UserInfo user = getCurrentUser(); VehcileInfo vehinfo = new VehcileInfo(); vehinfo.setOrganization_id(user.getOrganizationID()); if (vehicle_ln != null && vehicle_ln != "") { vehinfo.setVehicle_ln(vehicle_ln.trim()); } vehicleList = (List<VehcileInfo>) service.getObjects("WxManage.getInfosVeh", vehinfo); if (vehicleList != null && vehicleList.size() == 0) { // 无用户信息 addActionError(getText("nodata.list")); return ERROR; } } catch (BusinessException e) { super.addActionError(getText("info.db.error")); log.error(e.getMessage()); return ERROR; } catch (Exception e) { super.addActionError(getText("info.db.error")); log.error(e.getMessage()); return ERROR; } return SUCCESS; }