|
@@ -2909,15 +2909,13 @@ handlingProportion,
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public HttpResult<List<HashMap<String,Object>>> monthTotalReceivables(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ public HttpResult<List<HashMap<String, Object>>> monthTotalReceivables(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
|
params.put("agreementType", insPlyIncomeVo.getAgreementType());
|
|
params.put("agreementType", insPlyIncomeVo.getAgreementType());
|
|
|
if ("1".equals(insPlyIncomeVo.getAgreementType())) { //平台
|
|
if ("1".equals(insPlyIncomeVo.getAgreementType())) { //平台
|
|
|
params.put("year", insPlyIncomeVo.getYear());
|
|
params.put("year", insPlyIncomeVo.getYear());
|
|
|
List<HashMap<String, Object>> ptResultList = baseMapper.ptSumGroupByMonth(params);
|
|
List<HashMap<String, Object>> ptResultList = baseMapper.ptSumGroupByMonth(params);
|
|
|
params.put("handlingFeesStatus", "1");
|
|
params.put("handlingFeesStatus", "1");
|
|
|
-
|
|
|
|
|
List<HashMap<String, Object>> ptSettleResultList = baseMapper.ptSumGroupByMonth(params);
|
|
List<HashMap<String, Object>> ptSettleResultList = baseMapper.ptSumGroupByMonth(params);
|
|
|
Map<String, BigDecimal> ptMap = new HashMap<>(); // 假设commissionFeevalue是BigDecimal类型
|
|
Map<String, BigDecimal> ptMap = new HashMap<>(); // 假设commissionFeevalue是BigDecimal类型
|
|
|
for (HashMap<String, Object> ptSettleResultListItem : ptSettleResultList) {
|
|
for (HashMap<String, Object> ptSettleResultListItem : ptSettleResultList) {
|
|
@@ -2935,12 +2933,40 @@ handlingProportion,
|
|
|
}
|
|
}
|
|
|
for (HashMap<String, Object> ptResultListItem : ptResultList) {
|
|
for (HashMap<String, Object> ptResultListItem : ptResultList) {
|
|
|
BigDecimal bigDecimal1 = ptMap.get(ptResultListItem.get("year"));
|
|
BigDecimal bigDecimal1 = ptMap.get(ptResultListItem.get("year"));
|
|
|
- ptResultListItem.put("readyCommissionFeevalue",bigDecimal1);
|
|
|
|
|
|
|
+ ptResultListItem.put("readyCommissionFeevalue", bigDecimal1);
|
|
|
BigDecimal commissionFeevalue = BigDecimal.valueOf(Long.valueOf(ptResultListItem.get("commissionFeevalue").toString()));
|
|
BigDecimal commissionFeevalue = BigDecimal.valueOf(Long.valueOf(ptResultListItem.get("commissionFeevalue").toString()));
|
|
|
BigDecimal subtract = commissionFeevalue.subtract(bigDecimal1);
|
|
BigDecimal subtract = commissionFeevalue.subtract(bigDecimal1);
|
|
|
- ptResultListItem.put("noInvoicCommissionFeevalue",subtract);
|
|
|
|
|
|
|
+ ptResultListItem.put("noInvoicCommissionFeevalue", subtract);
|
|
|
}
|
|
}
|
|
|
return HttpResult.ok(ptResultList);
|
|
return HttpResult.ok(ptResultList);
|
|
|
|
|
+ } else if ("2".equals(insPlyIncomeVo.getAgreementType())) {
|
|
|
|
|
+ params.put("year", insPlyIncomeVo.getYear());
|
|
|
|
|
+ List<HashMap<String, Object>> bxResultList = baseMapper.ptSumGroupByMonth(params);
|
|
|
|
|
+ params.clear();
|
|
|
|
|
+ params.put("settlementStatus", "2");
|
|
|
|
|
+ List<HashMap<String, Object>> bxReadyCommissionFeevalue = settlementDocumentaryFeesService.bxSumGroupByMonth(params);
|
|
|
|
|
+ Map<String, BigDecimal> bxMap = new HashMap<>(); // 假设commissionFeevalue是BigDecimal类型
|
|
|
|
|
+ for (HashMap<String, Object> bxSettleResultListItem : bxReadyCommissionFeevalue) {
|
|
|
|
|
+ String month = (String) bxSettleResultListItem.get("month");
|
|
|
|
|
+ if (month == null) {
|
|
|
|
|
+ // 处理month为null的情况
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ BigDecimal commissionFeevalue = (BigDecimal) bxSettleResultListItem.get("commissionFeevalue");
|
|
|
|
|
+ if (commissionFeevalue == null) {
|
|
|
|
|
+ // 处理commissionFeevalue为null的情况
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ bxMap.put(month, commissionFeevalue);
|
|
|
|
|
+ }
|
|
|
|
|
+ for (HashMap<String, Object> bxResultListItem : bxResultList) {
|
|
|
|
|
+ BigDecimal bigDecimal1 = bxMap.get(bxResultListItem.get("year"));
|
|
|
|
|
+ bxResultListItem.put("readyCommissionFeevalue", bigDecimal1);
|
|
|
|
|
+ BigDecimal commissionFeevalue = BigDecimal.valueOf(Long.valueOf(bxResultListItem.get("commissionFeevalue").toString()));
|
|
|
|
|
+ BigDecimal subtract = commissionFeevalue.subtract(bigDecimal1);
|
|
|
|
|
+ bxResultListItem.put("noInvoicCommissionFeevalue", subtract);
|
|
|
|
|
+ }
|
|
|
|
|
+ return HttpResult.ok(bxReadyCommissionFeevalue);
|
|
|
}
|
|
}
|
|
|
return HttpResult.ok();
|
|
return HttpResult.ok();
|
|
|
}
|
|
}
|