zhangchuanxing 2 هفته پیش
والد
کامیت
83feadfda5
1فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 6 2
      controllers/statistic/rai_data_summary.go

+ 6 - 2
controllers/statistic/rai_data_summary.go

@@ -195,9 +195,10 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 	mapCompanyData := make(map[string]bool)
 	//新签部分的数据
 	for _, v := range listRaiData {
-		if !mapsellerId[v.SellerIdLast] {
+		if !mapsellerId[v.SellerIdInit] {
 			continue
 		}
+
 		startDateTime := utils.StrDateToDate(v.StartDate)
 		monthNum := startDateTime.Month()
 		yearStr := strconv.Itoa(startDateTime.Year())
@@ -231,7 +232,6 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 		if v.RaiContractType == "新签合同" {
 			mapNewContractMoney[keyMap] += v.Money
 			mapNewContractNum[keyMap]++
-
 			mapNewContractMoney[keyMapTtoal] += v.Money
 			mapNewContractNum[keyMapTtoal]++
 		}
@@ -275,6 +275,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 
 		keyMap = fmt.Sprint(yearStr, "_", v.SellerIdLast)
 		keyMapCompany = fmt.Sprint(yearStr, "_", v.SellerIdLast, "_CID_", v.CompanyId)
+		keySigned = fmt.Sprint(yearStr, "_", "_CID_", v.CompanyId, "_SID_", v.SellerIdLast)
 		if sellerDevelopIds[v.SellerIdLast] == true {
 			keyMapTtoal = fmt.Sprint(yearStr, "_Develop")
 		} else {
@@ -286,6 +287,9 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 
 		mapRenewedContractMoney[keyMapTtoal] += v.Money
 
+		mapSignedClientMoney[keyMap] += v.Money
+		mapSignedClientMoney[keyMapTtoal] += v.Money
+
 		//一家公司同一个时间纬度,只统计一次
 		//if !mapKeyMapCompanyData[keyMapCompany] {
 		mapRenewedContractNum[keyMap]++