Exemplo n.º 1
0
  /**
   * 通过校验受理情况,确认操作按钮是否可见
   *
   * @param centercorpid
   * @param date
   */
  public static boolean isMakeBtnVisible() {
    if (!isSettleCenter()) {
      return true; // 结算单位按钮可见
    }

    ICommon icom = NCLocator.getInstance().lookup(ICommon.class);
    String pk_corp = ClientEnvironment.getInstance().getCorporation().getPrimaryKey();
    UFDate date = ClientEnvironment.getInstance().getDate();
    try {
      return icom.isStartProcess(pk_corp, date).booleanValue();
    } catch (BusinessException e) {
      Logger.error(e.getMessage(), e);
    }
    return true;
  }
Exemplo n.º 2
0
 @Override
 public void setDefaultData() throws Exception {
   getBillCardPanel()
       .getHeadItem("billdate")
       .setValue(ClientEnvironment.getInstance().getBusinessDate());
   getBillCardPanel().getHeadItem("statusflag").setValue(MPOS_GlobalVariable.ACTIVITY_STATUS_INIT);
 }
Exemplo n.º 3
0
  /* (non-Javadoc)
   * @see nc.ui.tm.framework.ref.filter.AbstractRefModelFilter#getSelfFilterString()
   */
  @Override
  protected String getSelfFilterString() {
    String ret = null;
    if (getBillItem() != null) {
      UIComboBox opBillType = (UIComboBox) getBillItem().getComponent();
      String opType = (String) opBillType.getSelectdItemValue();

      if (opType == null) {
        return null;
      }

      if (FbmBusConstant.BILL_PRIVACY.equals(opType)) { // 如果选择的是私有票据,则加入pk_corp的条件,只选本公司的
        ret =
            " pk_corp = '"
                + ClientEnvironment.getInstance().getCorporation().getPk_corp()
                + "' and (registerstatus='register' or registerstatus='has_bank_keep') ";
      } else {
        ret = " pk_corp != '" + ClientEnvironment.getInstance().getCorporation().getPk_corp() + "'";
      }
    }
    return ret;
  }
Exemplo n.º 4
0
 /**
  * 判断当前公司是否是结算单位
  *
  * <p>作者:lpf 日期:2007-11-28
  *
  * @param corpPk
  * @return
  */
 public static boolean isSettleUnit(String corpPk) {
   // try {
   // SettleunitHeaderVO[] headVos =
   // OuterProxy.getSettleUnitQryService().getSettleUnitByEntityPk(corpPk,
   // ISettleUnitConst.ENTTITY_TYPE_CORP);
   // if (!CommonUtil.isNull(headVos)) {
   //
   // return true;
   // }
   // } catch (BusinessException e) {
   // Logger.error(e.getMessage(), e);
   // }
   //
   // return false;
   String pk_corp = ClientEnvironment.getInstance().getCorporation().getPk_corp();
   return CenterUnitUtil.instance.isCorpCenter(pk_corp);
 }
Exemplo n.º 5
0
 /**
  * 判断当前公司是否是结算中心。
  *
  * <p>作者:qbh <br>
  * 日期:2006-2-13
  *
  * @return
  */
 public static boolean isSettleCenter() {
   String pk_corp = ClientEnvironment.getInstance().getCorporation().getPk_corp();
   return CenterUnitUtil.instance.isCorpCenter(pk_corp);
 }