예제 #1
0
 public void validateOnSave() throws BusinessException {
   if (getNquotationlower() == null) throw new BusinessException("合理报价偏差率不能为空");
   if (PuPubVO.getUFDouble_NullAsZero(getNquotationlower()).compareTo(UFDouble.ZERO_DBL) < 0)
     throw new BusinessException("合理报价偏差率不能小于零");
   if (PuPubVO.getUFDouble_NullAsZero(getNquotationlower()).compareTo(UFDouble.ONE_DBL) > 0)
     throw new BusinessException("合理报价偏差率不能大于壹");
 }
예제 #2
0
  public UFDouble getThreeParameters(String ccustmanid, String corp) throws DAOException {
    String sql1 =
        " select sum(f.dfybje) from arap_djzb z join arap_djfb f on z.vouchid = f.vouchid "
            + " where z.djlxbm in ('D1','2348') and isnull(z.dr, 0) = 0 and isnull(f.dr, 0) = 0 "
            + " and f.jsfsbm ='25'  and z.dwbm='"
            + corp
            + "' and z.zgyf=0 and f.hbbm= '"
            + ccustmanid
            + "' ";
    UFDouble d1 =
        PuPubVO.getUFDouble_NullAsZero(
            getBaseDao().executeQuery(sql1, HgBsPubTool.COLUMNPROCESSOR));

    String sql2 =
        " select sum(z.bbje) from arap_djzb z join arap_djfb f on z.vouchid = f.vouchid "
            + " where z.djlxbm in ('D3','2346') and isnull(z.dr, 0) = 0 and isnull(f.dr, 0) = 0 "
            + " and z.dwbm='"
            + corp
            + "' and z.prepay = 'Y' and f.hbbm= '"
            + ccustmanid
            + "' ";
    UFDouble d2 =
        PuPubVO.getUFDouble_NullAsZero(
            getBaseDao().executeQuery(sql2, HgBsPubTool.COLUMNPROCESSOR));

    UFDouble d3 = UFDouble.ZERO_DBL;

    if (d2.sub(d1).compareTo(d3) > 0) {
      d3 = d2.sub(d1);
    }
    return d3;
  }