Class BillUtil
java.lang.Object
ru.bitel.bgbilling.modules.bill.server.bean.BillUtil
public class BillUtil
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description BillUtil()
-
Method Summary
Modifier and Type Method Description static void
addInline(org.w3c.dom.Element rootNode, Preferences moduleSetup, int userID)
static void
addTariffInfo(java.sql.Connection con, javax.xml.stream.XMLStreamWriter node, DocType docType, int contractId, java.util.Date date1, java.util.Date date2)
static void
buildParamsAndAttributesList(java.sql.Connection con, int moduleId, Preferences moduleSetup, int contractId, javax.xml.stream.XMLStreamWriter node, DocType docType, java.lang.String userName)
static void
convertDocument(Setup setup, java.sql.Connection con, int mid, org.w3c.dom.Document doc, java.lang.String patternName, java.io.OutputStream baos)
protected static java.math.BigDecimal
getCharge(java.util.Calendar month, java.lang.String cids, java.lang.String pt, java.sql.Connection con)
protected static java.math.BigDecimal
getDebt(java.util.Calendar month, int cid, java.sql.Connection con)
protected static java.math.BigDecimal
getInrest(java.util.Calendar month, int cid, java.sql.Connection con)
static java.lang.String
getPatternName(Setup setup, java.lang.String type, java.sql.Connection con, int mid, int docId)
protected static java.math.BigDecimal
getPayment(java.util.Calendar month, java.lang.String cids, java.lang.String pt, java.sql.Connection con)
static java.util.List<PositionValue>
getPositionList(java.sql.Connection con, java.util.Calendar month, Contract contract, java.lang.String cids, DocType docType, java.util.Map<java.lang.Integer,Position> positionMap)
protected static void
getServiceAccount(java.util.Calendar month, java.lang.String cids, java.lang.String sid, java.sql.Connection con, java.math.BigDecimal[] sum)
protected static void
getTariffDetailCost(int mid, java.util.Calendar month, java.lang.String monthMacro, java.lang.String cids, java.lang.String costTypes, java.sql.Connection con, java.math.BigDecimal[] sum)
static boolean
isPast(int yy, int mm)
Для того чтобы не создавать счета за будущий месяц и не добавлять в базу пересчитанный баланс за месяц, который еще не началсяstatic java.util.Calendar
moveDate(java.util.Calendar month, java.lang.String monthMacro)
static java.lang.String
parsePositionName(java.lang.String name, java.util.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 java.lang.String parsePositionName(java.lang.String name, java.util.Calendar _month) -
isPast
public static boolean isPast(int yy, int mm)Для того чтобы не создавать счета за будущий месяц и не добавлять в базу пересчитанный баланс за месяц, который еще не начался- Parameters:
yy
-mm
-- Returns:
-
getInrest
protected static java.math.BigDecimal getInrest(java.util.Calendar month, int cid, java.sql.Connection con) -
getDebt
protected static java.math.BigDecimal getDebt(java.util.Calendar month, int cid, java.sql.Connection con) -
getPayment
protected static java.math.BigDecimal getPayment(java.util.Calendar month, java.lang.String cids, java.lang.String pt, java.sql.Connection con) -
getCharge
protected static java.math.BigDecimal getCharge(java.util.Calendar month, java.lang.String cids, java.lang.String pt, java.sql.Connection con) -
getServiceAccount
protected static void getServiceAccount(java.util.Calendar month, java.lang.String cids, java.lang.String sid, java.sql.Connection con, java.math.BigDecimal[] sum)- Parameters:
month
-cids
-sid
-con
-sum
- [0] - unscaled, [1] - scaled
-
getTariffDetailCost
protected static void getTariffDetailCost(int mid, java.util.Calendar month, java.lang.String monthMacro, java.lang.String cids, java.lang.String costTypes, java.sql.Connection con, java.math.BigDecimal[] sum) -
buildParamsAndAttributesList
public static void buildParamsAndAttributesList(java.sql.Connection con, int moduleId, Preferences moduleSetup, int contractId, javax.xml.stream.XMLStreamWriter node, DocType docType, java.lang.String userName) throws javax.xml.stream.XMLStreamException- Throws:
javax.xml.stream.XMLStreamException
-
addTariffInfo
public static void addTariffInfo(java.sql.Connection con, javax.xml.stream.XMLStreamWriter node, DocType docType, int contractId, java.util.Date date1, java.util.Date date2) throws javax.xml.stream.XMLStreamException, java.sql.SQLException- Throws:
javax.xml.stream.XMLStreamException
java.sql.SQLException
-
getPositionList
public static java.util.List<PositionValue> getPositionList(java.sql.Connection con, java.util.Calendar month, Contract contract, java.lang.String cids, DocType docType, java.util.Map<java.lang.Integer,Position> positionMap) -
getPatternName
public static final java.lang.String getPatternName(Setup setup, java.lang.String type, java.sql.Connection con, int mid, int docId) -
moveDate
public static java.util.Calendar moveDate(java.util.Calendar month, java.lang.String monthMacro) -
addInline
-
convertDocument
public static void convertDocument(Setup setup, java.sql.Connection con, int mid, org.w3c.dom.Document doc, java.lang.String patternName, java.io.OutputStream baos) throws org.apache.fop.apps.FOPException, javax.xml.transform.TransformerException, ru.bitel.bgbilling.common.BGException- Throws:
org.apache.fop.apps.FOPException
javax.xml.transform.TransformerException
ru.bitel.bgbilling.common.BGException
-