Jianghan 4 лет назад
Родитель
Сommit
cc35105276
3 измененных файлов с 45 добавлено и 26 удалено
  1. 27 25
      fullproject/src_v1/init.go
  2. 17 0
      fullproject/src_v1/project.go
  3. 1 1
      fullproject/src_v1/task.go

+ 27 - 25
fullproject/src_v1/init.go

@@ -21,7 +21,7 @@ var (
 	Sysconfig                                      map[string]interface{} //读取配置文件
 	MongoTool                                      *MongodbSim            //mongodb连接
 	ExtractColl, ProjectColl, BackupColl, SiteColl string                 //抽取表、项目表、项目快照表、站点表
-	UpdateColl									   string				  // 金额修改数据表
+	UpdateColl                                     string                 // 金额修改数据表
 	Thread                                         int                    //配置项线程数
 	//NextNode                 []interface{}
 )
@@ -224,27 +224,28 @@ func NewKeyMap() *KeyMap {
 
 //招标信息实体类
 type Info struct {
-	Id           string                 `json:"_id"`
-	Href         string                 `json:"href"` //源地址
-	Publishtime  int64                  `json:"publishtime"`
-	Comeintime   int64                  `json:"comeintime"`
-	Title        string                 `json:"title"`
-	TopType      string                 `json:"toptype"`
-	SubType      string                 `json:"subtype"`
-	ProjectName  string                 `json:"projectname"`
-	ProjectCode  string                 `json:"projectcode"`
-	ProjectScope string                 `json:"projectscope"`
-	ContractCode string                 `json:"contractcode"`
-	Buyer        string                 `json:"buyer"`
-	Buyerperson  string                 `json:"buyerperson"`
-	Buyertel     string                 `json:"buyertel"`
-	Agency       string                 `json:"agency"`
-	Area         string                 `json:"area"`
-	City         string                 `json:"city"`
-	District     string                 `json:"district"`
-	Infoformat   int                    `json:"infoformat"`
-	HasPackage   bool                   // `json:"haspackage"`
-	Package      map[string]interface{} `json:"package"`
+	Id            string                 `json:"_id"`
+	Href          string                 `json:"href"` //源地址
+	Publishtime   int64                  `json:"publishtime"`
+	Comeintime    int64                  `json:"comeintime"`
+	Title         string                 `json:"title"`
+	TopType       string                 `json:"toptype"`
+	SubType       string                 `json:"subtype"`
+	ProjectName   string                 `json:"projectname"`
+	ProjectCode   string                 `json:"projectcode"`
+	ProjectScope  string                 `json:"projectscope"`
+	ContractCode  string                 `json:"contractcode"`
+	Buyer         string                 `json:"buyer"`
+	Buyerperson   string                 `json:"buyerperson"`
+	Buyertel      string                 `json:"buyertel"`
+	Agency        string                 `json:"agency"`
+	Area          string                 `json:"area"`
+	City          string                 `json:"city"`
+	District      string                 `json:"district"`
+	Infoformat    int                    `json:"infoformat"`
+	ReviewExperts []string               `json:"review_experts"`
+	HasPackage    bool                   // `json:"haspackage"`
+	Package       map[string]interface{} `json:"package"`
 	//PNum          string                 `json:"pnum"`
 	Topscopeclass []string `json:"topscopeclass"`
 	Subscopeclass []string `json:"subscopeclass"`
@@ -291,13 +292,14 @@ type ProjectInfo struct {
 	District      string             `json:"district"`                //区县
 	Bidstatus     string             `json:"bidstatus"`               //
 	Bidtype       string             `json:"bidtype"`                 //
+	ReviewExperts []string			 `json:"review_experts"`			 // 项目评审专家
 	//HasPackage    bool                   `json:"haspackage"`              //是否有分包
 	Package     map[string]interface{} `json:"package,omitempty"`     //分包的对比对象
 	Buyerclass  string                 `json:"buyerclass"`            //采购单位分类
 	Bidopentime int64                  `json:"bidopentime,omitempty"` //开标时间
 	//	Zbtime        int64                  `json:"zbtime"`        //招标时间
-	Jgtime		int64   `json:"jgtime"`              //结果中标时间
-	Zbtime		int64	`json:"zbtime"`				//招标时间
+	Jgtime    int64   `json:"jgtime"`              //结果中标时间
+	Zbtime    int64   `json:"zbtime"`              //招标时间
 	Bidamount float64 `json:"bidamount,omitempty"` //中标金额
 	Budget    float64 `json:"budget,omitempty"`    //预算
 	//Winnerorder []string `json:"winnerorder"` //中标候选人
@@ -327,7 +329,7 @@ type Site struct {
 	City     string `json:"city"`     //市
 	District string `json:"district"` //区、县
 	Domain   string `json:"domain"`   //地址
-	Status	 int	`json:"status"`	 //
+	Status   int    `json:"status"`   //
 }
 
 //二分字符串查找

+ 17 - 0
fullproject/src_v1/project.go

@@ -566,6 +566,11 @@ func (p *ProjectTask) NewProject(tmp map[string]interface{}, thisinfo *Info) (st
 		set["buyerclass"] = ""
 	}
 
+	//项目评审专家
+	if len(thisinfo.ReviewExperts) > 0 {
+		set["review_experts"] = thisinfo.ReviewExperts
+	}
+
 	p1.InfoFiled = make(map[string]InfoField)
 	infofield := InfoField{
 		Budget:       thisinfo.Budget,
@@ -671,6 +676,7 @@ func (p *ProjectTask) NewCachePinfo(id primitive.ObjectID, thisinfo *Info, bidty
 		Bidstatus:     bidstatus,
 		Bidtype:       bidtype,
 		Winners:       thisinfo.Winners,
+		ReviewExperts: thisinfo.ReviewExperts,
 	}
 	if thisinfo.LenPTC > 5 {
 		p1.MPC = append(p1.MPC, thisinfo.PTC)
@@ -846,6 +852,17 @@ func (p *ProjectTask) UpdateProject(tmp map[string]interface{}, thisinfo *Info,
 		set["topscopeclass"] = pInfo.Topscopeclass
 	}
 
+	//项目评审专家
+	if len(thisinfo.ReviewExperts) > 0 {
+		for _, k := range thisinfo.ReviewExperts {
+			if BinarySearch(pInfo.ReviewExperts, k) == -1 {
+				pInfo.ReviewExperts = append(pInfo.ReviewExperts, k)
+				sort.Strings(pInfo.ReviewExperts)
+			}
+		}
+		set["review_experts"] = pInfo.ReviewExperts
+	}
+
 	if len(thisinfo.Subscopeclass) > 0 {
 		sort.Strings(pInfo.Subscopeclass)
 		for _, k := range thisinfo.Subscopeclass {

+ 1 - 1
fullproject/src_v1/task.go

@@ -595,7 +595,7 @@ func (p *ProjectTask) enter(db, coll string, q map[string]interface{}) {
 	}()
 	fields := map[string]interface{} {"area": 1, "city": 1, "district": 1, "comeintime": 1, "publishtime": 1, "bidopentime": 1, "title": 1, "projectname": 1, "href": 1,
 		"projectcode": 1, "buyerclass": 1, "winner": 1, "s_winner": 1, "buyer": 1, "buyerperson": 1, "buyertel": 1, "infoformat": 1, "toptype": 1, "subtype": 1, "spidercode": 1,
-		"site": 1, "topscopeclass": 1, "subscopeclass": 1, "bidamount": 1, "budget": 1, "agency": 1, "package": 1, "jsondata": 1}
+		"site": 1, "topscopeclass": 1, "subscopeclass": 1, "bidamount": 1, "budget": 1, "agency": 1, "package": 1, "jsondata": 1, "review_experts": 1}
 	ms := sess.DB(db).C(coll).Find(q).Select(fields).Sort("publishtime")
 	if Sysconfig["hints"] != nil {
 		ms.Hint(Sysconfig["hints"])