|
@@ -205,7 +205,8 @@ type ProjectData struct {
|
|
|
EndNumb map[string]interface{} //终止数量
|
|
|
participateProjectNumb map[string]interface{} // 参标数量
|
|
|
Stage map[string]map[string]interface{}
|
|
|
- StageStr map[string]string // 字符串处理
|
|
|
+ StageStr map[string]string // 字符串处理
|
|
|
+ EndProject map[string]struct{} // 终止参标项目不参与统计
|
|
|
}
|
|
|
|
|
|
func PushHandle(data *[]map[string]interface{}, users *[]map[string]interface{}, isAdmin bool, isManager bool) []*bxcore.PushStatisticsData {
|
|
@@ -359,7 +360,13 @@ func ProjectHandle(data *[]map[string]interface{}, users *[]map[string]interface
|
|
|
(*result)[userId].StageStr = map[string]string{}
|
|
|
}
|
|
|
(*result)[userId].StageStr[project_id] = stage
|
|
|
+ isEnd_ := common.IntAll(v["is_end"])
|
|
|
+ if isEnd_ == 1 {
|
|
|
+ // 标记成已结束
|
|
|
+ (*result)[userId].EndProject[project_id] = struct{}{}
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
existProject := map[string]struct{}{}
|
|
|
for _, v := range *data {
|
|
@@ -371,6 +378,14 @@ func ProjectHandle(data *[]map[string]interface{}, users *[]map[string]interface
|
|
|
}
|
|
|
project_id := common.InterfaceToStr(common.InterfaceToStr(v["project_id"]))
|
|
|
if (*result)[userId] != nil {
|
|
|
+ //终止参保统计
|
|
|
+ if common.Int64All(v["isend"]) != 0 {
|
|
|
+ (*result)[userId].EndNumb = DataHanle((*result)[userId].EndNumb, project_id)
|
|
|
+ }
|
|
|
+ // 已经终止的不参与统计数量
|
|
|
+ if _, ok := (*result)[userId].EndProject[project_id]; ok {
|
|
|
+ continue
|
|
|
+ }
|
|
|
// 参标数量
|
|
|
(*result)[userId].participateProjectNumb = DataHanle((*result)[userId].participateProjectNumb, project_id)
|
|
|
//投标数量
|
|
@@ -411,10 +426,7 @@ func ProjectHandle(data *[]map[string]interface{}, users *[]map[string]interface
|
|
|
delete((*result)[userId].DirectWinNumb, project_id)
|
|
|
}
|
|
|
}
|
|
|
- //终止参保统计
|
|
|
- if common.Int64All(v["isend"]) != 0 {
|
|
|
- (*result)[userId].EndNumb = DataHanle((*result)[userId].EndNumb, project_id)
|
|
|
- }
|
|
|
+
|
|
|
if bidWay == 0 {
|
|
|
// 投标类型为全部时不需要统计勾选的数量
|
|
|
continue
|