|
@@ -128,15 +128,17 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
|
|
|
mapNoRenewedcompanyContractIds[v.CompanyContractId] = true
|
|
|
}
|
|
|
|
|
|
- mapNewContractMoney := make(map[string]float64) // 新签合同(金额)
|
|
|
- mapNewContractNum := make(map[string]int) // 新签合同(数量)
|
|
|
- mapExpiredContractMoney := make(map[string]float64) // 到期合同(金额)
|
|
|
- mapExpiredContractNum := make(map[string]int) // 到期合同(数量)
|
|
|
- mapRenewedContractMoney := make(map[string]float64) // 续约合同(金额)
|
|
|
- mapRenewedContractNum := make(map[string]int) // 续约合同(数量)
|
|
|
-
|
|
|
+ mapNewContractMoney := make(map[string]float64) // 新签合同(金额)
|
|
|
+ mapNewContractNum := make(map[string]int) // 新签合同(数量)
|
|
|
+ mapExpiredContractMoney := make(map[string]float64) // 到期合同(金额)
|
|
|
+ mapExpiredContractNum := make(map[string]int) // 到期合同(数量)
|
|
|
+ mapRenewedContractMoney := make(map[string]float64) // 续约合同(金额)
|
|
|
+ mapRenewedContractNum := make(map[string]int) // 续约合同(数量)
|
|
|
confirmedNoRenewalContractMoney := make(map[string]float64) // 确认不续约合同(金额)
|
|
|
confirmedNoRenewalContractNum := make(map[string]int) // 确认不续约合同(数量)
|
|
|
+ mapSignedClientNum := make(map[string]int) // 签约客户(数量)
|
|
|
+ mapSignedClientMoney := make(map[string]float64) // 签约客户(金额)
|
|
|
+
|
|
|
for _, v := range listRaiData {
|
|
|
startDateTime := utils.StrDateToDate(v.StartDate)
|
|
|
monthNum := startDateTime.Month()
|
|
@@ -178,6 +180,9 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
|
|
|
confirmedNoRenewalContractMoney[keyMap] += v.Money
|
|
|
confirmedNoRenewalContractNum[keyMap]++
|
|
|
}
|
|
|
+
|
|
|
+ mapSignedClientMoney[keyMap] += v.Money
|
|
|
+ mapSignedClientNum[keyMap]++
|
|
|
}
|
|
|
//fmt.Println(time.Now().AddDate(0, 0, -1))
|
|
|
//return
|
|
@@ -235,8 +240,13 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
|
|
|
}
|
|
|
sellerItem.ConfirmNonRenewalRateData = fmt.Sprint(confirmNonRenewalRateMoey, " / ", confirmNonRenewalRateNum) //确认不续约率(金额/数量)-(数据)"
|
|
|
|
|
|
- sellerItem.SignedClientCount = "签约客户数量-(数据)"
|
|
|
- sellerItem.AverageRevenueCount = "客单价-(数据)"
|
|
|
+ sellerItem.SignedClientCount = fmt.Sprint(mapSignedClientNum[keyMap]) // 签约客户数量
|
|
|
+ if mapSignedClientNum[keyMap] == 0 || mapSignedClientMoney[keyMap] == 0 {
|
|
|
+ sellerItem.AverageRevenueCount = "0"
|
|
|
+ } else {
|
|
|
+ sellerItem.AverageRevenueCount = utils.SubFloatToString(mapSignedClientMoney[keyMap]/float64(mapSignedClientNum[keyMap]), 2) //客单价
|
|
|
+ }
|
|
|
+
|
|
|
sellerItem.InvoiceAmountCount = "开票金额-(数据)"
|
|
|
sellerItem.PaymentReceivedCount = "到款金额-(数据)"
|
|
|
sellerItem.UnpaidRatioCount = "未到款比例-(数据)"
|