|
@@ -47,6 +47,19 @@ func biddingPurchaingTask(q map[string]interface{}) {
|
|
|
newTmp["purchasing"] = tmp["purchasing"]
|
|
|
//purchasinglist
|
|
|
newTmp["purchasinglist"] = tmp["purchasinglist"]
|
|
|
+
|
|
|
+ //处理数据
|
|
|
+ if tmp["supervisorrate"] != nil { //临时处理supervisorrate抽取类型为string不生索引
|
|
|
+ if _, ok := tmp["supervisorrate"].(string); ok { //supervisorrate数据为string类型
|
|
|
+ delete(tmp, "supervisorrate")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //对projectscope字段的索引处理
|
|
|
+ ps, _ := tmp["projectscope"].(string)
|
|
|
+ if len(ps) > ESLEN {
|
|
|
+ tmp["projectscope"] = string(([]rune(ps))[:4000])
|
|
|
+ }
|
|
|
+ SaveUpdageLock.Lock()
|
|
|
for _, v := range biddingIndexFields { //索引字段
|
|
|
if tmp[v] != nil {
|
|
|
if "projectinfo" == v {
|
|
@@ -89,8 +102,6 @@ func biddingPurchaingTask(q map[string]interface{}) {
|
|
|
}
|
|
|
}
|
|
|
arrEs = append(arrEs, newTmp)
|
|
|
-
|
|
|
- SaveUpdageLock.Lock()
|
|
|
arrMgo = append(arrMgo, []map[string]interface{}{ //要更新数据
|
|
|
map[string]interface{}{
|
|
|
"_id": tmp["_id"],
|