本月应付

xiaoxiao2025-02-10  22

/** * 取portal页面右上角应付金额 * * @param map * @return */ @SuppressWarnings("unchecked") public String getThisTermAmount(Map map) { map.put("billDate", "thisMonth"); List amountList = null; amountList = defaultDao.getObjList(SqlMapPostFix.BILL_NAME_SPACE, map, SqlMapPostFix.BILL_SUM_DATE_AMOUNT); //如果无本月数据则取上月 if (amountList == null || amountList.size() == 0) { map.put("billDate", "lastMonth"); amountList = defaultDao.getObjList(SqlMapPostFix.BILL_NAME_SPACE, map, SqlMapPostFix.BILL_SUM_DATE_AMOUNT); } DecimalFormat format = new DecimalFormat(); format.applyPattern("##,###,##0.00"); List<AccountItemSumm> itemSummList = new ArrayList<AccountItemSumm>(); //1:按币种排序 for (Object obj : amountList) { NaqBillSumm sum = (NaqBillSumm) obj; AccountItemSumm itemSumm = new AccountItemSumm(); if (BizConstant.CURRENCY_TYPE_CNY.equals(sum.getCurrencyType())) { itemSumm.setSortId(1); } else if (BizConstant.CURRENCY_TYPE_USD.equals(sum.getCurrencyType())) { itemSumm.setSortId(2); } else if (BizConstant.CURRENCY_TYPE_HKD.equals(sum.getCurrencyType())) { itemSumm.setSortId(3); } else if (BizConstant.CURRENCY_TYPE_NTD.equals(sum.getCurrencyType())) { itemSumm.setSortId(4); } itemSumm.setItemCurrency(sum.getCurrencyType()); if (sum.getTotalAmount() == null) { itemSumm.setAmount("0.00"); } else { itemSumm.setAmount(format.format((sum.getLastTotalAmount().subtract(sum .getLastTotalReceiptAmount())).add(sum.getTotalAmount()))); } itemSummList.add(itemSumm); } Collections.sort(itemSummList, new AccountItemSumm()); //2:页面展示应付金额String串按币种排序中间用";"隔开最后一个去掉";"号 String strAmount = ""; int count = 0; if (itemSummList != null && itemSummList.size() > 0) { for (AccountItemSumm s : itemSummList) { count++; if (itemSummList.size() == count) { strAmount = strAmount + s.getItemCurrency() + s.getAmount(); } else { strAmount = strAmount + s.getItemCurrency() + s.getAmount() + ";"; } } } return strAmount; } 杭州市滨江区网商路699号阿里巴巴园区 邮编310052 相关资源:应收应付会计的工作职责有哪些_精选.doc
转载请注明原文地址: https://www.6miu.com/read-5024423.html

最新回复(0)