瀏覽代碼

no message

zhangchuanxing 2 周之前
父節點
當前提交
5bbdb94c36
共有 1 個文件被更改,包括 12 次插入7 次删除
  1. 12 7
      controllers/statistic/rai_data_summary.go

+ 12 - 7
controllers/statistic/rai_data_summary.go

@@ -88,7 +88,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 	mapsellerService := make(map[int]bool) // 服务组销售Map
 	var sellerIds []string
 	var sellerServiceIds []string
-	condition = " AND role_type_code IN ('rai_seller','rai_group')   "
+	condition = " AND role_type_code IN ('rai_seller','rai_group')  AND  admin_id NOT IN(100,194,533,707) "
 	sellerListAll, err := system.GetSysUserItemsOrderByCreated(condition, pars)
 	if err != nil {
 		br.Msg = "获取管理账号失败"
@@ -106,7 +106,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 		}
 	}
 
-	condition = " AND role_type_code IN ('rai_seller','rai_group') AND enabled = 1 AND  rai_enabled = 1  "
+	condition = " AND role_type_code IN ('rai_seller','rai_group') AND enabled = 1 AND  rai_enabled = 1 AND  admin_id NOT IN(100,194,533,707)  "
 
 	if adminId != "" {
 		serviceAdminId = ""
@@ -499,13 +499,14 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 		if !mapsellerDevelop[v.RaiSellerId] {
 			continue
 		}
+
 		yearStr := getYearStar(utils.StrDateToDate(v.InvoiceTime), dataType, isCustomizeDate)
 
 		keyMap = fmt.Sprint(yearStr, "_", v.RaiSellerId)
 		keyMapTtoal = fmt.Sprint(yearStr, "_Develop")
 
 		//开票记录
-		if v.InvoiceType == 1 {
+		if v.InvoiceType == 1 || v.InvoiceType == 3 {
 			mapInvoiceAmountMoney[keyMap] += v.Amount
 			mapInvoiceAmountMoney[keyMapTtoal] += v.Amount
 			if v.ContractType == 1 {
@@ -515,7 +516,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 		}
 
 		//到款记录
-		if v.InvoiceType == 2 {
+		if v.InvoiceType == 2 || v.InvoiceType == 4 {
 			mapPaymentAmountMoney[keyMap] += v.Amount
 			mapPaymentAmountMoney[keyMapTtoal] += v.Amount
 			if v.ContractType == 1 {
@@ -539,7 +540,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 		keyMapTtoal = fmt.Sprint(yearStr, "_Server_")
 
 		//开票记录
-		if v.InvoiceType == 1 {
+		if v.InvoiceType == 1 || v.InvoiceType == 3 {
 			mapInvoiceAmountMoney[keyMap] += v.Amount
 			mapInvoiceAmountMoney[keyMapTtoal] += v.Amount
 			if v.ContractType == 1 {
@@ -549,7 +550,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 		}
 
 		//到款记录
-		if v.InvoiceType == 2 {
+		if v.InvoiceType == 2 || v.InvoiceType == 4 {
 			mapPaymentAmountMoney[keyMap] += v.Amount
 			mapPaymentAmountMoney[keyMapTtoal] += v.Amount
 			if v.ContractType == 1 {
@@ -570,6 +571,10 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 		return
 	}
 	for _, v := range tryList {
+		sysUserId, _ := strconv.Atoi(v.SysUserId)
+		if !mapsellerId[sysUserId] {
+			continue
+		}
 		startDateTime := utils.StrTimeToTime(v.CreateTime)
 		monthNum := startDateTime.Month()
 		yearStr := strconv.Itoa(startDateTime.Year())
@@ -598,7 +603,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 		mapAddTrialNum[keyMap]++
 
 		//var keyMapTtoal string
-		sysUserId, _ := strconv.Atoi(v.SysUserId)
+
 		if sellerDevelopIds[sysUserId] == true {
 			keyMapTtoal = fmt.Sprint(yearStr, "_Develop")
 		} else {