|
@@ -57,7 +57,7 @@ func (p *ParticipateBid) GetProjectByInfoId(infoIds []string) *[]map[string]inte
|
|
|
}
|
|
|
nowTime := time.Now()
|
|
|
query := `{"_source":["_id","list.infoid"],"query": {"bool": {"must": [{"terms": {"list.infoid": [` + fmt.Sprint(infoIds) + `]}},
|
|
|
- {"bool": {"should": [{"range": {"bidopentime": {"lte": ` + fmt.Sprint(nowTime) + `}}},
|
|
|
+ {"bool": {"should": [{"range": {"bidopentime": {"gte": ` + fmt.Sprint(nowTime) + `}}},
|
|
|
{"constant_score": {"filter": {"missing": {"field": "projectset.bidopentime"
|
|
|
} } } }] }}]}}}`
|
|
|
|
|
@@ -206,6 +206,8 @@ func (p ParticipateBid) ListEntFormat(existProjectMap, infoM map[string]string,
|
|
|
return formatList
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+// DetailEntFormat 企业版 详情页数据格式化
|
|
|
func (p ParticipateBid) DetailEntFormat(existProjectMap map[string]string, isAllow bool) (formatData bxcore.ParticipateDetailInfo) {
|
|
|
// 处理成 要返回的返回数据
|
|
|
formatData = bxcore.ParticipateDetailInfo{
|
|
@@ -217,13 +219,14 @@ func (p ParticipateBid) DetailEntFormat(existProjectMap map[string]string, isAll
|
|
|
return
|
|
|
}
|
|
|
persons := ""
|
|
|
- for _, v := range existProjectMap {
|
|
|
+ for _, v := range existProjectMap { // 这个是为了取参标人信息 列表页是多条数据 详情页这里 map里面只会有一条数据
|
|
|
persons = v
|
|
|
break
|
|
|
}
|
|
|
+ // todo 参标人信息 处理成姓名
|
|
|
+
|
|
|
// 判断是不是自己
|
|
|
// 是自己则展示终止参标
|
|
|
-
|
|
|
if ContainId(persons, fmt.Sprint(p.EntUserId)) {
|
|
|
formatData.ShowValue = ButtonValueParticipated
|
|
|
return
|
|
@@ -233,7 +236,6 @@ func (p ParticipateBid) DetailEntFormat(existProjectMap map[string]string, isAll
|
|
|
case RoleEntManager:
|
|
|
// 如果是企业管理员 显示 终止参标
|
|
|
formatData.ShowValue = ButtonValueParticipated
|
|
|
-
|
|
|
case RoleDepartManager:
|
|
|
// 如果是部门管理员 判断是否包含该部门下的 如果是 显示终止参标 如果不是 判断是否允许多人参标 允许 显示参标 不允许 则不显示
|
|
|
|