Browse Source

no message

zhangchuanxing 3 days ago
parent
commit
13cf030b20
1 changed files with 12 additions and 11 deletions
  1. 12 11
      controllers/statistic/rai_data_summary.go

+ 12 - 11
controllers/statistic/rai_data_summary.go

@@ -158,6 +158,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 		isCustomizeDate = true
 		startYear = 1
 		endYear = 1
+		dataTypeArr = []string{""}
 	}
 
 	//新签部分的数据
@@ -356,17 +357,17 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 
 	//续约部分的数据(服务组)
 	for _, v := range listInheritData {
-		if len(serviceAdminIdArr) > 0 && !utils.InArrayByStr(serviceAdminIdArr, strconv.Itoa(v.ShareSellerIdLast)) {
+		if len(serviceAdminIdArr) > 0 && !utils.InArrayByStr(serviceAdminIdArr, strconv.Itoa(v.ShareSellerIdInit)) {
 			continue
 		}
-		if !mapsellerService[v.ShareSellerIdLast] {
+		if !mapsellerService[v.ShareSellerIdInit] {
 			continue
 		}
 		yearStr := getYearStar(utils.StrDateToDate(v.InheritEndDate), dataType, isCustomizeDate)
 
-		keyMap = fmt.Sprint(yearStr, "_Server_", v.ShareSellerIdLast)
-		keyMapCompany = fmt.Sprint(yearStr, "_Server_", v.ShareSellerIdLast, "_CID_", v.CompanyId)
-		keySigned = fmt.Sprint(yearStr, "_Server_", v.CompanyId, "_SID_", v.ShareSellerIdLast)
+		keyMap = fmt.Sprint(yearStr, "_Server_", v.ShareSellerIdInit)
+		keyMapCompany = fmt.Sprint(yearStr, "_Server_", v.ShareSellerIdInit, "_CID_", v.CompanyId)
+		keySigned = fmt.Sprint(yearStr, "_Server_", v.CompanyId, "_SID_", v.ShareSellerIdInit)
 		keyMapTtoal = fmt.Sprint(yearStr, "_Server_")
 
 		//续约合同 数据
@@ -1145,9 +1146,9 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryDetail() {
 	case "续约合同":
 		if sellerId != "" {
 			if isServerSeller {
-				condition += ` AND a.share_seller_id_last  IN (` + sellerId + `) `
+				condition += ` AND a.share_seller_id_init  IN (` + sellerId + `) `
 			} else {
-				condition += ` AND a.seller_id_last  IN (` + sellerId + `) `
+				condition += ` AND a.seller_id_init  IN (` + sellerId + `) `
 			}
 		}
 		condition += ` AND  a.status = 1  AND a.inherit_end_date >= ?  AND a.inherit_end_date <= ?  AND  a.inherit_company_contract_id > 0  AND a.rai_contract_type = '续约合同'  AND a.company_contract_id NOT  IN (` + utils.GetOrmInReplace(lenArrCompany) + `)  `
@@ -1208,10 +1209,10 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryDetail() {
 		var parsEnd []interface{}
 		if sellerId != "" {
 			if isServerSeller {
-				condition += ` AND a.share_seller_id_last IN (` + sellerId + `) `
+				condition += ` AND a.share_seller_id_init IN (` + sellerId + `) `
 				conditionEnd += ` AND a.share_seller_id_last  IN (` + sellerId + `) `
 			} else {
-				condition += ` AND a.seller_id_last IN (` + sellerId + `) `
+				condition += ` AND a.seller_id_init IN (` + sellerId + `) `
 				conditionEnd += ` AND a.seller_id_last  IN (` + sellerId + `) `
 			}
 		}
@@ -1364,10 +1365,10 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryDetail() {
 		var parsEnd []interface{}
 		if sellerId != "" {
 			if isServerSeller {
-				condition += ` AND a.share_seller_id_last  IN (` + sellerId + `) `
+				condition += ` AND a.share_seller_id_init  IN (` + sellerId + `) `
 				conditionEnd += ` AND a.share_seller_id_last  IN (` + sellerId + `) `
 			} else {
-				condition += ` AND a.seller_id_last  IN (` + sellerId + `) `
+				condition += ` AND a.seller_id_init  IN (` + sellerId + `) `
 				conditionEnd += ` AND a.seller_id_last  IN (` + sellerId + `) `
 			}