Class BillUtil
java.lang.Object
ru.bitel.bgbilling.modules.bill.server.bean.BillUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 final String
getPatternName
(Setup setup, String type, Connection con, int mid, 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
static String
parsePositionName
(String name, Calendar _month)
-
Constructor Details
-
BillUtil
public BillUtil()
-
-
Method Details
-
parsePositionName
-
isPast
public static boolean isPast(int yy, int mm) Для того чтобы не создавать счета за будущий месяц и не добавлять в базу пересчитанный баланс за месяц, который еще не начался- Parameters:
yy
-mm
-- Returns:
-
getInrest
-
getDebt
-
getPayment
-
getCharge
-
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 XMLStreamException - Throws:
XMLStreamException
-
addTariffInfo
public static void addTariffInfo(Connection con, XMLStreamWriter node, DocType docType, int contractId, Date date1, Date date2) throws XMLStreamException, SQLException - Throws:
XMLStreamException
SQLException
-
getPositionList
public static List<PositionValue> getPositionList(Connection con, Calendar month, Contract contract, String cids, DocType docType, Map<Integer, Position> positionMap) -
getPatternName
public static final String getPatternName(Setup setup, String type, Connection con, int mid, int docId) -
moveDate
-
addInline
-
convertDocument
public static void convertDocument(Setup setup, Connection con, int mid, Document doc, String patternName, OutputStream baos) throws org.apache.fop.apps.FOPException, TransformerException, ru.bitel.bgbilling.common.BGException - Throws:
org.apache.fop.apps.FOPException
TransformerException
ru.bitel.bgbilling.common.BGException
-