Bläddra i källkod

年度汇总当年

Yikoo 5 år sedan
förälder
incheckning
13043df23e
1 ändrade filer med 27 tillägg och 22 borttagningar
  1. 27 22
      src/dashoo.cn/backend/api/controllers/oilcontract/contractSumScore.go

+ 27 - 22
src/dashoo.cn/backend/api/controllers/oilcontract/contractSumScore.go

@@ -61,7 +61,7 @@ func (this *OilContractSumScoreController) GetEntityList() {
 	Content5 := this.GetString("Content5")
 	ConclusionReason := this.GetString("ConclusionReason")
 	Conclusion := this.GetString("Conclusion")
-	//CreateOn := this.GetString("CreateOn")
+	CreateOn := this.GetString("CreateOn")
 	CreateUserId := this.GetString("CreateUserId")
 	CreateBy := this.GetString("CreateBy")
 	ModifiedOn := this.GetString("ModifiedOn")
@@ -182,19 +182,15 @@ func (this *OilContractSumScoreController) GetEntityList() {
 		where = where + " and ModifiedBy like '%" + ModifiedBy + "%'"
 	}
 
-	year   := strconv.Itoa(time.Now().Year())
-	month  := "01"
-	day    := "01"
-	where = where + " and CreateOn>='" + year + "-" + month + "-" + day + "' "
 
-	//if CreateOn != "" {
-	//	dates := strings.Split(CreateOn, ",")
-	//	if len(dates) == 2 {
-	//		minDate := dates[0]
-	//		maxDate := dates[1]
-	//		where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
-	//	}
-	//}
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
 
 	svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
 	var list []contractSumScore.OilContractSumScore
@@ -227,7 +223,7 @@ func (this *OilContractSumScoreController) GetComputeEntityList(){
 		}
 	}
 	SupplierName := this.GetString("SupplierName")
-	CreateOn     := this.GetString("CreateOn")
+	//CreateOn     := this.GetString("CreateOn")
 	Type         := this.GetString("Type","01")
 
 	if SupplierName != "" {
@@ -236,14 +232,23 @@ func (this *OilContractSumScoreController) GetComputeEntityList(){
 	if Type != ""{
 		where = where + " and contract.ContractClass = '" + Type + "'"
 	}
-	if CreateOn != "" {
-		dates := strings.Split(CreateOn, ",")
-		if len(dates) == 2 {
-			minDate := dates[0]
-			maxDate := dates[1]
-			where = where + " and review.CreateOn>='" + minDate + "' and review.CreateOn<='" + maxDate + "'"
-		}
-	}
+
+
+	// 今年的汇总
+	year   := strconv.Itoa(time.Now().Year())
+	month  := "01"
+	day    := "01"
+	where = where + " and CreateOn>='" + year + "-" + month + "-" + day + "' "
+
+	//if CreateOn != "" {
+	//	dates := strings.Split(CreateOn, ",")
+	//	if len(dates) == 2 {
+	//		minDate := dates[0]
+	//		maxDate := dates[1]
+	//		where = where + " and review.CreateOn>='" + minDate + "' and review.CreateOn<='" + maxDate + "'"
+	//	}
+	//}
+
 	svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
 	var list []contractSumScore.OilContractComputeSumScoreVo
 	total := svc.GetPagingComputeEntitiesWithOrderBytbl(page.CurrentPage, page.Size, orderby, asc, &list, where)