Yikoo %!s(int64=5) %!d(string=hai) anos
pai
achega
afb929a163

+ 13 - 9
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,15 +182,19 @@ 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