@Override
  public String save() throws Exception {
    SystemContext context = this.getSystyemContext();

    // 设置最后更新人的信息
    Cert4RoadTransport e = this.getE();
    e.setModifier(context.getUserHistory());
    e.setModifiedDate(Calendar.getInstance());
    this.getCrudService().save(e);

    // 保存证件与车辆的关联表信息
    if (carId != null) {
      this.certService.carNCert4Save(carId, getE().getId());
    }

    return "saveSuccess";
  }
  @SuppressWarnings("static-access")
  public String create() throws Exception {
    String r = super.create();
    Cert4RoadTransport e = this.getE();
    // 根据carId查找car信息
    if (carId != null) {
      carMessMap = this.certService.findCarByCarId(carId);

      String factory = "";
      if (carMessMap.get("factory_type") != null
          && carMessMap.get("factory_type").toString().length() > 0) {
        factory = carMessMap.get("factory_type") + "." + carMessMap.get("factory_model");
      }
      e.setPlate(isNullObject(carMessMap.get("plate_type") + "" + carMessMap.get("plate_no")));
      e.setFactory(factory);
      e.setLevel(isNullObject(carMessMap.get("level_")));
      e.setDimLen(Integer.valueOf(isNullObject(carMessMap.get("dim_len"))));
      e.setDimWidth(Integer.valueOf(isNullObject(carMessMap.get("dim_width"))));
      e.setDimHeight(Integer.valueOf(isNullObject(carMessMap.get("dim_height"))));
    }

    this.getE().setUid(this.getIdGeneratorService().next(this.getE().ATTACH_TYPE));
    // 自动生成自编号
    this.getE().setCertCode(this.getIdGeneratorService().nextSN4Month(Cert4RoadTransport.KEY_CODE));
    this.getE().setType(Cert.TYPE_ROADTRANSPORT);
    this.getE().setStatus(BCConstants.STATUS_ENABLED);
    statusesValue = this.getEntityStatuses();

    attachsUI = buildAttachsUI(true, false);
    return r;
  }