Exemplo n.º 1
0
  @Override
  public BusinessComponent query(BOProperty sourceBop) throws Exception {
    if (sourceBop instanceof DeliveryModeBOP) {
      if (StringUtils.isEqual(ConstantsValue.VALUE_1.getValue(), sourceBop.getValue().getValue()))
        getStatus().setHidden(false);
      else getStatus().setHidden(true);
    }
    setValue(getConsoleText());

    return super.query(sourceBop);
  }
Exemplo n.º 2
0
  /**
   * 变量影响表单中的细粒度组件的值、状态
   *
   * @param fcList
   * @param simpleContainer
   */
  public static final void var2FC(
      Map<String, FinegrainedComponent> fcList, SimpleContainer simpleContainer) {
    Map<String, SimpleFC> simpleFCList = simpleContainer.getFcList();
    if (ContainerUtil.isNull(simpleFCList) || ContainerUtil.isNull(fcList)) return;

    for (Entry<String, SimpleFC> entry : simpleFCList.entrySet()) {
      if (!fcList.containsKey(entry.getKey())) continue;
      BOProperty bop = fcList.get(entry.getKey()).getBc();
      if (bop == null) continue;

      if (entry.getValue().isDisable() != null)
        bop.getStatus().setDisable(entry.getValue().isDisable());
      if (entry.getValue().isHidden() != null)
        bop.getStatus().setHidden(entry.getValue().isHidden());
      if (entry.getValue().isReadonly() != null)
        bop.getStatus().setReadonly(entry.getValue().isReadonly());
      if (StringUtils.isNotEmpty(entry.getValue().getValueStr()))
        bop.setValue(entry.getValue().getValueStr());
    }
  }
Exemplo n.º 3
0
  /**
   * @param sourceBCList
   * @return
   */
  @Override
  public BusinessComponent query(BOProperty sourceBop) {
    Map<String, String> streetMap = new LinkedHashMap<String, String>();
    EnumRange.addPlease(streetMap);
    if (StringUtils.isEqual(sourceBop.getValue().getValue(), "9905")) {
      streetMap.put("1", "街道1");
      streetMap.put("2", "街道2");
      streetMap.put("3", "街道3");
      streetMap.put("4", "街道4");
    }

    EnumRange streetRange = new EnumRange();
    streetRange.setResult(streetMap);
    BCRange bcRange = new BCRange();
    bcRange.addRange(streetRange);
    setRange(bcRange);
    return this;
  }