コード例 #1
0
  /**
   * 通关
   *
   * @param passPortInfo
   */
  public void pass(PassPortInfo passPortInfo) {
    boolean flag = false;
    Long adultQuantity = 0l;
    Long childQuantity = 0l;
    long realTotal = passPortInfo.getAdult().intValue() + passPortInfo.getChild().intValue();
    if (passPortInfo.getTotalMan().intValue() != realTotal) {
      adultQuantity = passPortInfo.getAdult();
      childQuantity = passPortInfo.getChild();
    }
    if (passPortInfo.getSerialNo() != null) {
      // 二维码信息更新
      PassPortCode passPortCode =
          passCodeService.getPassPortCodeByCodeIdAndPortId(
              passPortInfo.getCodeId(), passPortInfo.getTargetId());
      passPortCode.setStatus(Constant.PASSCODE_USE_STATUS.USED.name());
      passPortCode.setUsedTime(new Date());
      // 更新通关点信息
      passCodeService.updatePassPortCode(passPortCode);
      flag =
          this.addPerform(
              passPortInfo.getOrderId(), passPortInfo.getTargetId(), adultQuantity, childQuantity);

    } else {
      flag =
          this.addPerform(
              passPortInfo.getOrderId(), passPortInfo.getTargetId(), adultQuantity, childQuantity);
    }
    if (flag) {
      ZkMessage.showInfo("凭证正常通关");
      this.closeWindow();
    } else {
      this.closeWindow();
      ZkMessage.showInfo("该订单已经履行");
    }
  }
コード例 #2
0
 @Override
 protected void doBefore() throws Exception {
   passPortInfo = (PassPortInfo) this.arg.get("passPortInfo");
   CompositeQuery compositeQuery = new CompositeQuery();
   compositeQuery.getMetaPerformRelate().setTargetId(String.valueOf(passPortInfo.getTargetId()));
   compositeQuery.getMetaPerformRelate().setOrderId(passPortInfo.getOrderId());
   orderItemMetas =
       orderServiceProxy.compositeQueryOrdOrderItemMetaByMetaPerformRelate(compositeQuery);
 }