Selaa lähdekoodia

1.业务利润增加字段未收金额

纪新园 7 kuukautta sitten
vanhempi
commit
d29b016ddf

+ 18 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/statisticAnalysis/FinanceProfitDtoList.java

@@ -159,6 +159,12 @@ public class FinanceProfitDtoList {
 	private BigDecimal realAmountDrUsd;
 
 	/**
+	 * 未收美元
+	 */
+	@ExcelProperty(value = "未收美元")
+	private BigDecimal notReceivedDrUsd;
+
+	/**
 	 * 应收(CNY)
 	 */
 	@ExcelProperty(value = "应收人民币")
@@ -171,6 +177,12 @@ public class FinanceProfitDtoList {
 	private BigDecimal realAmountDr;
 
 	/**
+	 * 未收人民币
+	 */
+	@ExcelProperty(value = "未收人民币")
+	private BigDecimal notReceivedDr;
+
+	/**
 	 * 合计应收
 	 */
 	@ExcelProperty(value = "合计应收")
@@ -183,6 +195,12 @@ public class FinanceProfitDtoList {
 	private BigDecimal realAmountDrLoc;
 
 	/**
+	 * 实际未收
+	 */
+	@ExcelProperty(value = "未收合计")
+	private BigDecimal notReceivedLoc;
+
+	/**
 	 * 应付(USD)
 	 */
 	@ExcelProperty(value = "应付美元")

+ 12 - 4
blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/mapper/FinAccBillsMapper.xml

@@ -571,8 +571,12 @@
             los_fin_acc_bills acc
         WHERE
         acc.is_deleted = '0'
-          and acc.stl_amount_dr_loc != acc.amount_dr_loc
-          and acc.stl_amount_cr_loc != acc.amount_cr_loc
+        <if test='fee.dc != null and fee.dc != "" and fee.dc == "D"'>
+            and acc.stl_amount_dr_loc != acc.amount_dr_loc
+        </if>
+        <if test='fee.dc != null and fee.dc != "" and fee.dc == "C"'>
+            and acc.stl_amount_cr_loc != acc.amount_cr_loc
+        </if>
         <if test='fee.tenantId != null and fee.tenantId != ""'>
             and acc.tenant_id = #{fee.tenantId}
         </if>
@@ -672,8 +676,12 @@
         los_fin_acc_bills acc
         WHERE
         acc.is_deleted = '0'
-        and acc.stl_amount_dr_loc != acc.amount_dr_loc
-        and acc.stl_amount_cr_loc != acc.amount_cr_loc
+        <if test='fee.dc != null and fee.dc != "" and fee.dc == "D"'>
+            and acc.stl_amount_dr_loc != acc.amount_dr_loc
+        </if>
+        <if test='fee.dc != null and fee.dc != "" and fee.dc == "C"'>
+            and acc.stl_amount_cr_loc != acc.amount_cr_loc
+        </if>
         <if test='fee.tenantId != null and fee.tenantId != ""'>
             and acc.tenant_id = #{fee.tenantId}
         </if>

+ 6 - 0
blade-service/blade-los/src/main/java/org/springblade/los/statisticAnalysis/service/impl/StatisticAnalysisServiceImpl.java

@@ -321,6 +321,9 @@ public class StatisticAnalysisServiceImpl implements IStatisticAnalysisService {
 			item.setRealAmountDrLoc(item.getRealAmountDrUsd().multiply(exrateC).add(item.getRealAmountDr()).setScale(2, RoundingMode.HALF_UP));
 			item.setAmountProfitLoc(item.getAmountDrLoc().subtract(item.getAmountCrLoc()).setScale(2, RoundingMode.HALF_UP));
 			item.setRealAmountProfitLoc(item.getRealAmountDrLoc().subtract(item.getRealAmountCrLoc()).setScale(2, RoundingMode.HALF_UP));
+			item.setNotReceivedDr(item.getAmountDr().subtract(item.getRealAmountDr()).setScale(2, RoundingMode.HALF_UP));
+			item.setNotReceivedDrUsd(item.getAmountDrUsd().subtract(item.getRealAmountDrUsd()).setScale(2, RoundingMode.HALF_UP));
+			item.setNotReceivedLoc(item.getAmountDrLoc().subtract(item.getRealAmountDrLoc()).setScale(2, RoundingMode.HALF_UP));
 		}
 		return R.data(page.setRecords(financeProfitList));
 	}
@@ -1498,6 +1501,9 @@ public class StatisticAnalysisServiceImpl implements IStatisticAnalysisService {
 			item.setRealAmountDrLoc(item.getRealAmountDrUsd().multiply(exrateC).add(item.getRealAmountDr()).setScale(2, RoundingMode.HALF_UP));
 			item.setAmountProfitLoc(item.getAmountDrLoc().subtract(item.getAmountCrLoc()).setScale(2, RoundingMode.HALF_UP));
 			item.setRealAmountProfitLoc(item.getRealAmountDrLoc().subtract(item.getRealAmountCrLoc()).setScale(2, RoundingMode.HALF_UP));
+			item.setNotReceivedDr(item.getAmountDr().subtract(item.getRealAmountDr()).setScale(2, RoundingMode.HALF_UP));
+			item.setNotReceivedDrUsd(item.getAmountDrUsd().subtract(item.getRealAmountDrUsd()).setScale(2, RoundingMode.HALF_UP));
+			item.setNotReceivedLoc(item.getAmountDrLoc().subtract(item.getRealAmountDrLoc()).setScale(2, RoundingMode.HALF_UP));
 		}
 		return financeProfitList;
 	}