zhangchuanxing 4 dní pred
rodič
commit
08183975f6

+ 1 - 2
controllers/cygx/user.go

@@ -2512,7 +2512,7 @@ func (this *UserController) CompanyTableDetail() {
 			endDate += " 23:59:59"
 			condition += ` AND r.create_time <= '` + endDate + `' `
 		}
-		condition += " AND r.source = 'article'  "
+		//condition += " AND r.source = 'article'  "
 		if classType == 1 {
 			condition += " AND art.article_type_id = 0  "
 		} else {
@@ -3824,7 +3824,6 @@ func (this *UserController) CompanyList() {
 			condition += " AND art.article_type_id > 0  "
 		}
 
-		condition += " AND r.source =  'article' "
 		var pars []interface{}
 		condition += "  ORDER BY r.create_time DESC "
 		var listRecord []*cygx.CygxArticleAndYanxuanRecordResp

+ 4 - 4
controllers/statistic/rai_data_summary.go

@@ -386,9 +386,9 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryList() {
 		if !mapsellerService[v.ShareSellerIdInit] {
 			continue
 		}
-		if v.Status != "永续" || v.ContractType != "打分派点" {
-			mapRenewedContractId[v.CompanyContractId] = true
-		}
+		//if v.Status != "永续" || v.ContractType != "打分派点" {
+		//	mapRenewedContractId[v.CompanyContractId] = true
+		//}
 		yearStr := getYearStar(utils.StrDateToDate(v.InheritEndDate), dataType, isCustomizeDate)
 
 		keyMap = fmt.Sprint(yearStr, "_Server_", v.ShareSellerIdInit)
@@ -1461,7 +1461,7 @@ func (this *StatisticRaiDataSummaryController) RaiDataSummaryDetail() {
 				renewedContractCompany++
 				maprenewedContractCompany[v.CompanyId] = true
 			}
-			mapRenewedContractId[v.CompanyContractId] = true
+			//mapRenewedContractId[v.CompanyContractId] = true
 			//startDateTime := utils.StrDateToDate(v.StartDate)
 			//if startDateTime.Before(time.Now().AddDate(0, 0, -1)) { //到期合同数据
 			//	expiredContractMoney += v.Money

+ 8 - 8
models/cygx/article_and_yanxuan_record.go

@@ -26,8 +26,8 @@ type CygxArticleAndYanxuanRecordResp struct {
 // 获取数量
 func GetCygxArticleAndYanxuanRecordCount(condition string, pars []interface{}) (count int, err error) {
 	o := orm.NewOrmUsingDB("hz_cygx")
-	sqlCount := ` SELECT COUNT(1) AS count  FROM cygx_article_and_yanxuan_record as r
-                  INNER JOIN cygx_article  as art  ON  art.article_id = r.source_id 
+	sqlCount := ` SELECT COUNT(1) AS count  FROM cygx_article_history_record_all as r
+                  INNER JOIN cygx_article  as art  ON  art.article_id = r.article_id 
                   WHERE 1= 1  `
 	if condition != "" {
 		sqlCount += condition
@@ -40,8 +40,8 @@ func GetCygxArticleAndYanxuanRecordCount(condition string, pars []interface{}) (
 func GetCygxArticleAndYanxuanRecordCountWeekly(condition string, pars []interface{}) (count int, err error) {
 	o := orm.NewOrmUsingDB("hz_cygx")
 	databaseName := utils.GetWeeklyDatabase()
-	sqlCount := ` SELECT COUNT(1) AS count  FROM cygx_article_and_yanxuan_record as r 
-                             INNER JOIN cygx_article  as art  ON  art.article_id = r.source_id
+	sqlCount := ` SELECT COUNT(1) AS count  FROM cygx_article_history_record_all as r 
+                             INNER JOIN cygx_article  as art  ON  art.article_id = r.article_id
 				  INNER JOIN %s.user_seller_relation AS us ON us.user_id = r.user_id   AND us.product_id = 2 
 		WHERE 1= 1  `
 	sqlCount = fmt.Sprintf(sqlCount, databaseName)
@@ -55,8 +55,8 @@ func GetCygxArticleAndYanxuanRecordCountWeekly(condition string, pars []interfac
 // 列表
 func GetCygxArticleAndYanxuanRecordRespList(condition string, pars []interface{}, startSize, pageSize int) (items []*CygxArticleAndYanxuanRecordResp, err error) {
 	o := orm.NewOrmUsingDB("hz_cygx")
-	sql := `SELECT r.* ,art.title  FROM cygx_article_and_yanxuan_record as r 
-          INNER JOIN cygx_article  as art  ON  art.article_id = r.source_id  WHERE 1= 1 `
+	sql := `SELECT r.* ,art.title  FROM cygx_article_history_record_all as r 
+          INNER JOIN cygx_article  as art  ON  art.article_id = r.article_id  WHERE 1= 1 `
 	if condition != "" {
 		sql += condition
 	}
@@ -69,8 +69,8 @@ func GetCygxArticleAndYanxuanRecordRespList(condition string, pars []interface{}
 func GetCygxArticleAndYanxuanRecordRespListWeekly(condition string, pars []interface{}, startSize, pageSize int) (items []*CygxArticleAndYanxuanRecordResp, err error) {
 	o := orm.NewOrmUsingDB("hz_cygx")
 	databaseName := utils.GetWeeklyDatabase()
-	sql := `SELECT r.* FROM cygx_article_and_yanxuan_record as r 
-     		INNER JOIN cygx_article  as art  ON  art.article_id = r.source_id 
+	sql := `SELECT r.* FROM cygx_article_history_record_all as r 
+     		INNER JOIN cygx_article  as art  ON  art.article_id = r.article_id 
 			INNER JOIN %s.user_seller_relation AS us ON us.user_id = r.user_id   AND us.product_id = 2 
 		WHERE 1= 1   `
 	sql = fmt.Sprintf(sql, databaseName)