Browse Source

no message

zhangchuanxing 1 week ago
parent
commit
1d12c03300

+ 10 - 8
controllers/statistic/rai_data_summary.go

@@ -58,20 +58,16 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 	serverButton, _ := this.GetInt("ServerButton")
 
 	dataTypeArr := []string{}
-	var dateIntervalArr []statistic_report.DateInterval //时间区间
+	//var dateIntervalArr []statistic_report.DateInterval //时间区间
 	if dataType == "季度" {
 		dataTypeArr = []string{"Q1", "Q2", "Q3", "Q4"}
-		dateIntervalArr = []statistic_report.DateInterval{statistic_report.DateInterval{StartDate: "01-01", EndDate: "03-31"}, statistic_report.DateInterval{StartDate: "04-01", EndDate: "06-30"}, statistic_report.DateInterval{StartDate: "07-01", EndDate: "09-30"}, statistic_report.DateInterval{StartDate: "10-01", EndDate: "12-31"}}
+		//dateIntervalArr = []statistic_report.DateInterval{statistic_report.DateInterval{StartDate: "01-01", EndDate: "03-31"}, statistic_report.DateInterval{StartDate: "04-01", EndDate: "06-30"}, statistic_report.DateInterval{StartDate: "07-01", EndDate: "09-30"}, statistic_report.DateInterval{StartDate: "10-01", EndDate: "12-31"}}
 	} else if dataType == "半年度" {
 		dataTypeArr = []string{"H1", "H2"}
-		dateIntervalArr = []statistic_report.DateInterval{statistic_report.DateInterval{StartDate: "01-01", EndDate: "06-30"}, statistic_report.DateInterval{StartDate: "07-01", EndDate: "12-31"}}
+		//dateIntervalArr = []statistic_report.DateInterval{statistic_report.DateInterval{StartDate: "01-01", EndDate: "06-30"}, statistic_report.DateInterval{StartDate: "07-01", EndDate: "12-31"}}
 	} else {
 		dataTypeArr = []string{""}
-		dateIntervalArr = []statistic_report.DateInterval{statistic_report.DateInterval{StartDate: "01-01", EndDate: "12-31"}}
-	}
-
-	for _, v := range dateIntervalArr {
-		fmt.Println(v)
+		//dateIntervalArr = []statistic_report.DateInterval{statistic_report.DateInterval{StartDate: "01-01", EndDate: "12-31"}}
 	}
 
 	condition := " AND role_type_code IN ('rai_seller','rai_group') AND enabled = 1 AND  rai_enabled = 1"
@@ -197,6 +193,10 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 		}
 	}
 
+	//for _, v := range dateIntervalArr {
+	//	fmt.Println(v)
+	//}
+
 	resp := new(statistic_report.RaiDataSummaryListResp)
 	var items []*statistic_report.RaiDataSummaryResp
 	for i := startYear; i <= endYear; i++ {
@@ -204,6 +204,8 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 		for _, Dv := range dataTypeArr {
 			item := new(statistic_report.RaiDataSummaryResp)
 			item.DataType = fmt.Sprint(i, Dv)
+			//fmt.Println("DataType", item.DataType)
+
 			for _, vS := range sellerDevelop {
 				keyMap := fmt.Sprint(item.DataType, "_", vS.AdminId)
 				sellerItem := new(statistic_report.RaiDataSummaryDetail)

+ 2 - 0
models/statistic_report/rai_data_summary.go

@@ -37,6 +37,8 @@ type RaiDataSummaryDetail struct {
 	UnpaidRatioCount                 string `description:"未到款比例"`
 	NewCustomerInvoicingCount        string `description:"新客开票"`
 	NewCustomerPaymentsReceivedCount string `description:"新客到款"`
+	StartDate                        string `description:"合同开始日期"`
+	EndDate                          string `description:"合同结束日期"`
 }
 
 // 增量客户统计报表列表数据结构