Package ru.bitel.bgbilling.modules.bill.server.bean

# Class BillUtil

java.lang.Object
ru.bitel.bgbilling.modules.bill.server.bean.BillUtil

public class BillUtil extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BillUtil()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `addInline(Element rootNode, Preferences moduleSetup, int userID)`
  `static void`
  `addTariffInfo(Connection con, XMLStreamWriter node, DocType docType, int contractId, Date date1, Date date2)`
  `static void`
  `buildParamsAndAttributesList(Connection con, int moduleId, Preferences moduleSetup, int contractId, XMLStreamWriter node, DocType docType, String userName)`
  `static void`
  `convertDocument(Setup setup, Connection con, int mid, Document doc, String patternName, OutputStream baos)`
  `protected static BigDecimal`
  `getCharge(Calendar month, String cids, String pt, Connection con)`
  `protected static BigDecimal`
  `getDebt(Calendar month, int cid, Connection con)`
  `protected static BigDecimal`
  `getInrest(Calendar month, int cid, Connection con)`
  `static String`
  `getPatternName(DocumentSendParameters.SendingDataType type, Connection con, int moduleId, int docId)`
  `protected static BigDecimal`
  `getPayment(Calendar month, String cids, String pt, Connection con)`
  `static List<PositionValue>`
  `getPositionList(Connection con, Calendar month, Contract contract, String cids, DocType docType, Map<Integer,Position> positionMap)`
  `protected static void`
  `getServiceAccount(Calendar month, String cids, String sid, Connection con, BigDecimal[] sum)`
  `protected static void`
  `getTariffDetailCost(int mid, Calendar month, String monthMacro, String cids, String costTypes, Connection con, BigDecimal[] sum)`
  `static boolean`
  `isPast(int yy, int mm)`
  Для того чтобы не создавать счета за будущий месяц и не добавлять в базу пересчитанный баланс за месяц, который еще не начался
  `static Calendar`
  `moveDate(Calendar month, String monthMacro)`
  `static String`
  `parsePositionName(String name, Calendar _month)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### BillUtil

    public BillUtil()

- ## Method Details

  - ### parsePositionName

    public static String parsePositionName(String name, Calendar _month)

  - ### isPast

    public static boolean isPast(int yy, int mm)
    Для того чтобы не создавать счета за будущий месяц и не добавлять в базу пересчитанный баланс за месяц, который еще не начался
    Parameters:
      `yy` -
      `mm` -
    Returns:

  - ### getInrest

    protected static BigDecimal getInrest(Calendar month, int cid, Connection con)

  - ### getDebt

    protected static BigDecimal getDebt(Calendar month, int cid, Connection con)

  - ### getPayment

    protected static BigDecimal getPayment(Calendar month, String cids, String pt, Connection con)

  - ### getCharge

    protected static BigDecimal getCharge(Calendar month, String cids, String pt, Connection con)

  - ### getServiceAccount

    protected static void getServiceAccount(Calendar month, String cids, String sid, Connection con, BigDecimal[] sum)
    Parameters:
      `month` -
      `cids` -
      `sid` -
      `con` -
      `sum` - [0] - unscaled, [1] - scaled

  - ### getTariffDetailCost

    protected static void getTariffDetailCost(int mid, Calendar month, String monthMacro, String cids, String costTypes, Connection con, BigDecimal[] sum)

  - ### buildParamsAndAttributesList

    public static void buildParamsAndAttributesList(Connection con, int moduleId, Preferences moduleSetup, int contractId, XMLStreamWriter node, DocType docType, String userName) throws Exception
    Throws:
      `Exception`

  - ### addTariffInfo

    public static void addTariffInfo(Connection con, XMLStreamWriter node, DocType docType, int contractId, Date date1, Date date2) throws Exception
    Throws:
      `Exception`

  - ### getPositionList

    public static List<PositionValue> getPositionList(Connection con, Calendar month, Contract contract, String cids, DocType docType, Map<Integer,Position> positionMap)

  - ### getPatternName

    public static String getPatternName(DocumentSendParameters.SendingDataType type, Connection con, int moduleId, int docId)

  - ### moveDate

    public static Calendar moveDate(Calendar month, String monthMacro)

  - ### addInline

    public static void addInline(Element rootNode, Preferences moduleSetup, int userID)

  - ### convertDocument

    public static void convertDocument(Setup setup, Connection con, int mid, Document doc, String patternName, OutputStream baos) throws org.apache.fop.apps.FOPException, ru.bitel.bgbilling.common.BGException
    Throws:
      `org.apache.fop.apps.FOPException`
      `ru.bitel.bgbilling.common.BGException`