24282 3 months ago
parent
commit
129615f461

+ 3 - 2
jy-business/src/main/java/com/jy/business/contract/dao/ContractInfoDao.java

@@ -56,8 +56,9 @@ public class ContractInfoDao extends BaseDao<ContractInfoMapper, ContractInfo> {
                         ci.sellerCompany,
                         _count(0).as(ContractStatisticsVo::getContractQuantity),
                         _sum(ci.amount.multiply(ci.exchangeRate)).as(ContractStatisticsVo::getContractAmount),
-                        t.field(ContractStatisticsVo::getFundReceivedAmount),
-                        t.field(ContractStatisticsVo::getFundReceivedAmount)
+                        t.field(ContractStatisticsVo::getFundReceivedAmount).multiply(ci.exchangeRate)
+                                .as(ContractStatisticsVo::getFundReceivedAmount),
+                        t.field(ContractStatisticsVo::getFundReceivedAmount).multiply(ci.exchangeRate)
                                 .subtract(_ifNull(t2.field("amount"), 0)).as(ContractStatisticsVo::getProfit)
                 )
                 .from(ci)

+ 2 - 0
jy-business/src/main/java/com/jy/business/contract/service/impl/ContractInfoServiceImpl.java

@@ -106,6 +106,8 @@ public class ContractInfoServiceImpl implements ContractInfoService {
                 record.setReceivedAmount(BigDecimal.ZERO);
                 record.setCapitalTransactionsList(Collections.emptyList());
             } else {
+                capitalTransactionsList.forEach(item ->
+                        item.setAmount(item.getAmount().multiply(record.getExchangeRate())));
                 record.setReceivedAmount(
                         capitalTransactionsList.stream()
                                 .map(CapitalTransactions::getAmount)

+ 12 - 3
jy-ui/src/views/business/contract/info/index.vue

@@ -86,15 +86,24 @@ const columnConfig: ColumnConfigType[] = [
   },
   {
     prop: 'signingDate',
-    label: '签订日期'
+    label: '签订日期',
+    formatter: (row) => {
+      return row.signingDate.substr(0, 10)
+    }
   },
   {
     prop: 'startDate',
-    label: '开始日期'
+    label: '开始日期',
+    formatter: (row) => {
+      return row.startDate.substr(0, 10)
+    }
   },
   {
     prop: 'endDate',
-    label: '结束日期'
+    label: '结束日期',
+    formatter: (row) => {
+      return row.endDate.substr(0, 10)
+    }
   },
   {
     prop: 'sellerCompany',