|
@@ -808,14 +808,6 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
|
|
|
if isDis && tmp["winner_type"] == "集成商" {
|
|
|
return
|
|
|
}
|
|
|
- if noticeFilter == 1 && (dataTable == 0 || dataTable == 1) && isOk {
|
|
|
- ok := checkBidId(appid, id, dataTable)
|
|
|
- if !ok {
|
|
|
- isOk = false
|
|
|
- tmp["chongfu"] = id
|
|
|
- MgoSave.Save(SaveCollbid, tmp)
|
|
|
- }
|
|
|
- }
|
|
|
//匹配公告附件
|
|
|
info := MgoBidding.FindOne(BiddingColl, map[string]interface{}{"_id": mongodb.StringTOBsonId(id)})
|
|
|
if info != nil && len(info) > 0 {
|
|
@@ -867,6 +859,7 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
|
|
|
}
|
|
|
}
|
|
|
tmp["details"] = qu.ObjToString(info["detail"])
|
|
|
+ tmp["bidtype"] = qu.ObjToString(info["bidtype"])
|
|
|
tmp["owner"] = qu.ObjToString(info["owner"])
|
|
|
tmp["total_investment"] = qu.ObjToString(info["total_investment"])
|
|
|
tmp["approvestatus"] = qu.ObjToString(info["approvestatus"])
|
|
@@ -923,6 +916,7 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
|
|
|
}
|
|
|
}
|
|
|
tmp["details"] = qu.ObjToString(info["detail"])
|
|
|
+ tmp["bidtype"] = qu.ObjToString(info["bidtype"])
|
|
|
tmp["owner"] = qu.ObjToString(info["owner"])
|
|
|
tmp["total_investment"] = qu.ObjToString(info["total_investment"])
|
|
|
tmp["approvestatus"] = qu.ObjToString(info["approvestatus"])
|
|
@@ -1080,6 +1074,15 @@ func AssembelSave(tmp map[string]interface{}, IsSearchHosp, IsSearchEnps bool, h
|
|
|
}
|
|
|
tmp["contact"] = contactAllInfo
|
|
|
}
|
|
|
+ if noticeFilter == 1 && (dataTable == 0 || dataTable == 1) && isOk {
|
|
|
+ ok := checkBidId(appid, id, dataTable)
|
|
|
+ log.Println("公告去重结果", id, dataTable, ok)
|
|
|
+ if !ok {
|
|
|
+ isOk = false
|
|
|
+ tmp["chongfu"] = id
|
|
|
+ MgoSave.Save(SaveCollbid, tmp)
|
|
|
+ }
|
|
|
+ }
|
|
|
if isOk {
|
|
|
if dataSave != "" {
|
|
|
MgoSave.Save(dataSave, tmp)
|
|
@@ -2320,7 +2323,7 @@ func GetXlsxs(mMap []map[string]interface{}, i_contact int, fn, email, id string
|
|
|
//生文件
|
|
|
//t := strconv.FormatInt(time.Now().Unix(), 10)
|
|
|
t := time.Now().Format("20060102")
|
|
|
- dir := "./web/res/xlsx/" + t + "/"
|
|
|
+ dir := "/nas/jyqyfw/datatag/xlsx/" + t + "/"
|
|
|
if b, _ := PathExists(dir); !b {
|
|
|
err1 := os.MkdirAll(dir, os.ModePerm)
|
|
|
if err1 != nil {
|
|
@@ -2373,7 +2376,7 @@ func GetXlsxs(mMap []map[string]interface{}, i_contact int, fn, email, id string
|
|
|
//生文件
|
|
|
//t := strconv.FormatInt(time.Now().Unix(), 10)
|
|
|
t := time.Now().Format("20060102")
|
|
|
- dir := "./web/res/xlsx/" + t + "/"
|
|
|
+ dir := "/nas/jyqyfw/datatag/xlsx/" + t + "/"
|
|
|
if b, _ := PathExists(dir); !b {
|
|
|
err1 := os.MkdirAll(dir, os.ModePerm)
|
|
|
if err1 != nil {
|
|
@@ -2495,15 +2498,15 @@ func InitUsermailProjectId(appid string) {
|
|
|
func checkBidId(appid, id string, dataTable int) bool {
|
|
|
isOk := true
|
|
|
if dataTable == 1 {
|
|
|
- count := MgoCus.Count(SaveUserMail, bson.M{"appid": appid, "id": id})
|
|
|
- if count > 0 {
|
|
|
+ countData, ok := MgoSave.FindOne(SaveUserMail, map[string]interface{}{"appid": appid, "id": id})
|
|
|
+ if ok && countData != nil && len(*countData) > 0 {
|
|
|
log.Println("用户 ", appid, " 在 ", SaveUserMail, " 中找到重复公告id ", id)
|
|
|
isOk = false
|
|
|
}
|
|
|
}
|
|
|
if dataTable == 0 {
|
|
|
- count := Mgo.Count(SaveColl, bson.M{"appid": appid, "id": id})
|
|
|
- if count > 0 {
|
|
|
+ countData, ok := MgoSave.FindOne(SaveColl, map[string]interface{}{"appid": appid, "id": id})
|
|
|
+ if ok && countData != nil && len(*countData) > 0 {
|
|
|
log.Println("用户 ", appid, " 在 ", SaveColl, " 中找到重复公告id ", id)
|
|
|
isOk = false
|
|
|
}
|