|
@@ -515,7 +515,7 @@ func (p *ProjectTask) NewProject(tmp map[string]interface{}, thisinfo *Info) (st
|
|
|
if thisinfo.TopType == "招标" {
|
|
|
if thisinfo.SubType != "变更" && thisinfo.SubType != "其它" {
|
|
|
set["zbtime"] = tmp["publishtime"]
|
|
|
- p1.Zbtime = tmp["publishtime"].(int64)
|
|
|
+ p1.Zbtime = qu.Int64All(tmp["publishtime"])
|
|
|
}
|
|
|
} else if thisinfo.TopType == "结果" || thisinfo.SubType == "合同" {
|
|
|
set["jgtime"] = tmp["publishtime"]
|
|
@@ -542,6 +542,11 @@ func (p *ProjectTask) NewProject(tmp map[string]interface{}, thisinfo *Info) (st
|
|
|
p1.Bidamounttag = 1
|
|
|
set["bidamounttag"] = 1
|
|
|
}
|
|
|
+ if p1.Bidamount > 0 {
|
|
|
+ set["sortprice"] = p1.Bidamount
|
|
|
+ }else if p1.Budget > 0 {
|
|
|
+ set["sortprice"] = p1.Budget
|
|
|
+ }
|
|
|
|
|
|
if len(thisinfo.Winners) > 0 {
|
|
|
set["s_winner"] = strings.Join(thisinfo.Winners, ",")
|
|
@@ -698,18 +703,33 @@ func (p *ProjectTask) UpdateProject(tmp map[string]interface{}, thisinfo *Info,
|
|
|
}
|
|
|
} else if thisinfo.TopType == "结果" {
|
|
|
if thisinfo.SubType == "中标" || thisinfo.SubType == "成交" || thisinfo.SubType == "流标" || thisinfo.SubType == "废标" {
|
|
|
- jg1 := int64(math.Abs(float64(pInfo.Jgtime - thisinfo.Publishtime)))
|
|
|
- if pInfo.Jgtime <= 0 {
|
|
|
- set["jgtime"] = tmp["publishtime"]
|
|
|
- pInfo.Jgtime = thisinfo.Publishtime
|
|
|
- }else if jg1 > p.jgTime {
|
|
|
+ if pInfo.Jgtime > 0 {
|
|
|
+ jg1 := int64(math.Abs(float64(pInfo.Jgtime - thisinfo.Publishtime)))
|
|
|
+ //公告状态和项目状态同样都是中标或者成交,
|
|
|
+ if (thisinfo.SubType == "中标" || thisinfo.SubType == "成交") && (pInfo.Bidstatus == "中标" || pInfo.Bidstatus == "成交") {
|
|
|
+ if jg1 > p.jgTime {
|
|
|
+ set["jgtime"] = tmp["publishtime"]
|
|
|
+ pInfo.Jgtime = thisinfo.Publishtime
|
|
|
+ }
|
|
|
+ //公告状态和项目状态同样是流标或者废标
|
|
|
+ }else if (thisinfo.SubType == "流标" || thisinfo.SubType == "废标") && (pInfo.Bidstatus == "流标" || pInfo.Bidstatus == "废标") {
|
|
|
+ if jg1 > p.jgTime {
|
|
|
+ set["jgtime"] = tmp["publishtime"]
|
|
|
+ pInfo.Jgtime = thisinfo.Publishtime
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
set["jgtime"] = tmp["publishtime"]
|
|
|
pInfo.Jgtime = thisinfo.Publishtime
|
|
|
}
|
|
|
- }else if thisinfo.SubType == "合同" {
|
|
|
- set["jgtime"] = tmp["publishtime"]
|
|
|
- pInfo.Jgtime = thisinfo.Publishtime
|
|
|
}
|
|
|
+ } else if thisinfo.SubType == "合同" {
|
|
|
+ if pInfo.Bidstatus == "中标" || pInfo.Bidstatus == "成交" {
|
|
|
+ //中标、成交不更新jgtime
|
|
|
+ return
|
|
|
+ }
|
|
|
+ set["jgtime"] = tmp["publishtime"]
|
|
|
+ pInfo.Jgtime = thisinfo.Publishtime
|
|
|
}
|
|
|
if thisinfo.Bidopentime > pInfo.Bidopentime {
|
|
|
pInfo.Bidopentime = thisinfo.Bidopentime
|
|
@@ -842,9 +862,7 @@ func (p *ProjectTask) UpdateProject(tmp map[string]interface{}, thisinfo *Info,
|
|
|
for _, k := range thisinfo.Winners {
|
|
|
if thisinfo.SubType == "流标" || thisinfo.SubType == "废标" {
|
|
|
if BinarySearch(pInfo.Winners, k) != -1 {
|
|
|
- arr := strings.Split(pInfo.Winners, ",")
|
|
|
- deleteSlice(arr, k, "")
|
|
|
- pInfo.Winners = strings.Join(pInfo.Winners, ",")
|
|
|
+ deleteSlice(pInfo.Winners, k, "")
|
|
|
sort.Strings(pInfo.Winners)
|
|
|
}
|
|
|
}else {
|
|
@@ -877,6 +895,11 @@ func (p *ProjectTask) UpdateProject(tmp map[string]interface{}, thisinfo *Info,
|
|
|
} else {
|
|
|
set["bidamounttag"] = 1
|
|
|
}
|
|
|
+ if pInfo.Bidamount > 0 {
|
|
|
+ set["sortprice"] = pInfo.Bidamount
|
|
|
+ }else if pInfo.Budget > 0 {
|
|
|
+ set["sortprice"] = pInfo.Budget
|
|
|
+ }
|
|
|
|
|
|
infofiled := InfoField{
|
|
|
Budget: thisinfo.Budget,
|