|
@@ -4,7 +4,6 @@ import (
|
|
|
"context"
|
|
|
"database/sql"
|
|
|
"fmt"
|
|
|
- "log"
|
|
|
"math"
|
|
|
"sort"
|
|
|
"strings"
|
|
@@ -483,10 +482,6 @@ func (n *network) List(in *types.NetWorkListReq) *types.Reply {
|
|
|
}
|
|
|
sqlAppendArgs := []interface{}{}
|
|
|
sqlAppend1 := ""
|
|
|
- if in.Type != "" {
|
|
|
- sqlAppend1 += ` and a.itype=?`
|
|
|
- sqlAppendArgs = append(sqlAppendArgs, n.TypeStrConvert(in.Type))
|
|
|
- }
|
|
|
if in.Starttime != "" {
|
|
|
sqlAppend1 += ` and a.create_time>=?`
|
|
|
sqlAppendArgs = append(sqlAppendArgs, in.Starttime+" 00:00:00")
|
|
@@ -507,7 +502,7 @@ func (n *network) List(in *types.NetWorkListReq) *types.Reply {
|
|
|
var count int64
|
|
|
start := (in.Current_page - 1) * in.Page_size
|
|
|
end := start + in.Page_size
|
|
|
- dbPaging := in.Buyercount_start == 0 && in.Buyercount_end == 0 && in.Monitor == 0 && in.Monitorcount_start == 0 && in.Monitorcount_end == 0 && in.Project_matchme == 0 && in.Order_amount == 0
|
|
|
+ dbPaging := in.Buyercount_start == 0 && in.Buyercount_end == 0 && in.Monitor == 0 && in.Monitorcount_start == 0 && in.Monitorcount_end == 0 && in.Project_matchme == 0 && in.Order_amount == 0 && in.Type == ""
|
|
|
args := []interface{}{in.PositionId, in.PositionId, in.PositionId}
|
|
|
args = append(args, sqlAppendArgs...)
|
|
|
sqlAppend2 := ""
|
|
@@ -531,7 +526,6 @@ func (n *network) List(in *types.NetWorkListReq) *types.Reply {
|
|
|
}
|
|
|
if isTjProject {
|
|
|
entMonitor := NetworkCom.EntMonitor(in.UserId)
|
|
|
- log.Println(entMonitor)
|
|
|
aio := n.AllIntroduceOwner(sqlAppend1, sqlAppend2, args, isTjProject, probusfors, entMonitor)
|
|
|
for _, v := range aio.Networks {
|
|
|
itype := ""
|
|
@@ -640,6 +634,9 @@ func (n *network) List(in *types.NetWorkListReq) *types.Reply {
|
|
|
case 5:
|
|
|
agency_count++
|
|
|
}
|
|
|
+ if in.Type != "" && v.Itype != n.TypeStrConvert(in.Type) {
|
|
|
+ continue
|
|
|
+ }
|
|
|
export_url := ""
|
|
|
if len(export_id) > 0 {
|
|
|
exportIdRepeat := map[string]bool{}
|
|
@@ -971,7 +968,7 @@ func (n *network) Introduce_Middleman(values []string, entMonitor map[string]boo
|
|
|
}
|
|
|
|
|
|
//
|
|
|
-func (n *network) TypeStrConvert(itype string) int {
|
|
|
+func (n *network) TypeStrConvert(itype string) int64 {
|
|
|
//firstparty:甲方 supplier:供应商 adiffb:同甲异业 middleman:中间人 agency:招标代理机构
|
|
|
switch itype {
|
|
|
case "firstparty":
|