|
@@ -514,25 +514,26 @@ func ParticipateListSql(in *bxcore.ParticipateListReq) string {
|
|
endTime := strings.Split(in.BidEndTime, "-")[1]
|
|
endTime := strings.Split(in.BidEndTime, "-")[1]
|
|
startTimeInt, _ := strconv.ParseInt(startTime, 10, 64)
|
|
startTimeInt, _ := strconv.ParseInt(startTime, 10, 64)
|
|
endTimeInt, _ := strconv.ParseInt(endTime, 10, 64)
|
|
endTimeInt, _ := strconv.ParseInt(endTime, 10, 64)
|
|
|
|
+ bidEndTimeSql := ``
|
|
if startTimeInt > 0 && endTimeInt > 0 && startTimeInt > endTimeInt {
|
|
if startTimeInt > 0 && endTimeInt > 0 && startTimeInt > endTimeInt {
|
|
log.Println(fmt.Sprintf("投标截止日期 %d 开始时间 大于 结束时间%d!!!", startTimeInt, endTimeInt))
|
|
log.Println(fmt.Sprintf("投标截止日期 %d 开始时间 大于 结束时间%d!!!", startTimeInt, endTimeInt))
|
|
} else {
|
|
} else {
|
|
|
|
+ if startTimeInt > 0 {
|
|
|
|
+ bidEndTimeSql += ` AND pt.bid_end_time > '` + date.FormatDateByInt64(&startTimeInt, date.Date_Full_Layout) + `'`
|
|
|
|
+ }
|
|
|
|
+ if endTimeInt > 0 {
|
|
|
|
+ bidEndTimeSql += ` AND pt.bid_end_time < '` + date.FormatDateByInt64(&endTimeInt, date.Date_Full_Layout) + `'`
|
|
|
|
+ }
|
|
switch in.BidEndStatus {
|
|
switch in.BidEndStatus {
|
|
- case 0:
|
|
|
|
- if startTimeInt > 0 {
|
|
|
|
- conditionSql += ` AND pt.bid_end_time > '` + date.FormatDateByInt64(&startTimeInt, date.Date_Full_Layout) + `'`
|
|
|
|
- }
|
|
|
|
- if endTimeInt > 0 {
|
|
|
|
- conditionSql += ` AND pt.bid_end_time < '` + date.FormatDateByInt64(&endTimeInt, date.Date_Full_Layout) + `'`
|
|
|
|
- }
|
|
|
|
case 1: //投标截止状态:1:未截止;2:已截止;3:终止参标
|
|
case 1: //投标截止状态:1:未截止;2:已截止;3:终止参标
|
|
|
|
+ bidEndTimeSql = ``
|
|
//未截止:
|
|
//未截止:
|
|
var (
|
|
var (
|
|
endBool = true
|
|
endBool = true
|
|
)
|
|
)
|
|
//如果结束时间存在且小于当前时间,投标截止日期 范围都是已截止 不会存在未截止的数据
|
|
//如果结束时间存在且小于当前时间,投标截止日期 范围都是已截止 不会存在未截止的数据
|
|
if endTimeInt > 0 {
|
|
if endTimeInt > 0 {
|
|
- conditionSql += ` AND pt.bid_end_time < '` + date.FormatDateByInt64(&endTimeInt, date.Date_Full_Layout) + `'`
|
|
|
|
|
|
+ bidEndTimeSql += ` AND pt.bid_end_time < '` + date.FormatDateByInt64(&endTimeInt, date.Date_Full_Layout) + `'`
|
|
endBool = endTimeInt > now.Unix()
|
|
endBool = endTimeInt > now.Unix()
|
|
}
|
|
}
|
|
//开始时间小于 当前时间
|
|
//开始时间小于 当前时间
|
|
@@ -541,15 +542,16 @@ func ParticipateListSql(in *bxcore.ParticipateListReq) string {
|
|
}
|
|
}
|
|
//存在开始时间为0的情况
|
|
//存在开始时间为0的情况
|
|
if startTimeInt > 0 {
|
|
if startTimeInt > 0 {
|
|
- conditionSql += ` AND pt.bid_end_time > '` + date.FormatDateByInt64(&startTimeInt, date.Date_Full_Layout) + `'`
|
|
|
|
|
|
+ bidEndTimeSql += ` AND pt.bid_end_time > '` + date.FormatDateByInt64(&startTimeInt, date.Date_Full_Layout) + `'`
|
|
}
|
|
}
|
|
case 2: //投标截止状态:1:未截止;2:已截止;3:终止参标
|
|
case 2: //投标截止状态:1:未截止;2:已截止;3:终止参标
|
|
//如果开始时间存在且大于当前时间,投标截止日期 范围都是未截止 不会存在已截止的数据
|
|
//如果开始时间存在且大于当前时间,投标截止日期 范围都是未截止 不会存在已截止的数据
|
|
var (
|
|
var (
|
|
startBool = true
|
|
startBool = true
|
|
)
|
|
)
|
|
|
|
+ bidEndTimeSql = ``
|
|
if startTimeInt > 0 {
|
|
if startTimeInt > 0 {
|
|
- conditionSql += ` AND pt.bid_end_time > '` + date.FormatDateByInt64(&startTimeInt, date.Date_Full_Layout) + `'`
|
|
|
|
|
|
+ bidEndTimeSql += ` AND pt.bid_end_time > '` + date.FormatDateByInt64(&startTimeInt, date.Date_Full_Layout) + `'`
|
|
startBool = startTimeInt < now.Unix()
|
|
startBool = startTimeInt < now.Unix()
|
|
}
|
|
}
|
|
if startBool && (endTimeInt == 0 || now.Unix() < endTimeInt) {
|
|
if startBool && (endTimeInt == 0 || now.Unix() < endTimeInt) {
|
|
@@ -557,12 +559,15 @@ func ParticipateListSql(in *bxcore.ParticipateListReq) string {
|
|
}
|
|
}
|
|
//存在结束时间为0的情况
|
|
//存在结束时间为0的情况
|
|
if endTimeInt > 0 {
|
|
if endTimeInt > 0 {
|
|
- conditionSql += ` AND pt.bid_end_time < '` + date.FormatDateByInt64(&endTimeInt, date.Date_Full_Layout) + `'`
|
|
|
|
|
|
+ bidEndTimeSql += ` AND pt.bid_end_time < '` + date.FormatDateByInt64(&endTimeInt, date.Date_Full_Layout) + `'`
|
|
}
|
|
}
|
|
case 3:
|
|
case 3:
|
|
- conditionSql += ` AND pug.state < 0 `
|
|
|
|
|
|
+ bidEndTimeSql += ` AND pug.state < 0 `
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if bidEndTimeSql != "" {
|
|
|
|
+ conditionSql += bidEndTimeSql
|
|
|
|
+ }
|
|
} else if in.BidEndStatus > 0 { //投标截止状态1:未截止;2:已截止;3:终止参标
|
|
} else if in.BidEndStatus > 0 { //投标截止状态1:未截止;2:已截止;3:终止参标
|
|
switch in.BidEndStatus {
|
|
switch in.BidEndStatus {
|
|
case 1:
|
|
case 1:
|