Merge branch 'dev' of http://gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway into dev
正在显示
6 个修改的文件
包含
63 行增加
和
12 行删除
@@ -4,10 +4,9 @@ import ( | @@ -4,10 +4,9 @@ import ( | ||
4 | "github.com/beego/beego/v2/server/web" | 4 | "github.com/beego/beego/v2/server/web" |
5 | "github.com/linmadan/egglib-go/log/logrus" | 5 | "github.com/linmadan/egglib-go/log/logrus" |
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" | 6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" |
7 | - _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/constant" | ||
8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/cache" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/cache" |
9 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
10 | - _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 9 | + |
11 | _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego" | 10 | _ "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego" |
12 | ) | 11 | ) |
13 | 12 |
@@ -48,6 +48,30 @@ type CooperationProjectInfo struct { | @@ -48,6 +48,30 @@ type CooperationProjectInfo struct { | ||
48 | DepartmentName string `json:"departmentName"` | 48 | DepartmentName string `json:"departmentName"` |
49 | } `json:"department"` //项目发起部门 | 49 | } `json:"department"` //项目发起部门 |
50 | Status int `json:"status"` // 共创项目状态,1招标中,2结束 | 50 | Status int `json:"status"` // 共创项目状态,1招标中,2结束 |
51 | + // 可以去除勾选的共创项目承接对象列表 | ||
52 | + UndertakerTypesUncheckedAvailable []int `json:"undertakerTypesUncheckedAvailable"` | ||
53 | + // 承接人 | ||
54 | + Applicants []struct { | ||
55 | + UserId int64 `json:"userId,string"` | ||
56 | + UserBaseId int64 `json:"userBaseId,string"` // 用户基本id | ||
57 | + Org struct { | ||
58 | + OrgId int64 `json:"orgId,string"` // 组织机构ID | ||
59 | + OrgName string `json:"orgName"` // 组织名称 | ||
60 | + } `json:"org"` // 用户所属组织机构 | ||
61 | + Department struct { | ||
62 | + DepartmentId int64 `json:"departmentId,string"` // 部门ID, | ||
63 | + DepartmentName string `json:"departmentName"` // 部门名称 | ||
64 | + DepartmentNumber string `json:"departmentNumber"` // 部门编码 | ||
65 | + } `json:"department"` // 用户所属的部门 | ||
66 | + UserInfo struct { | ||
67 | + UserAvatar string `json:"userAvatar"` // 用户头像 | ||
68 | + UserEmail string `json:"userEmail"` // 用户邮箱 | ||
69 | + UserName string `json:"userName"` // 共创人员姓名 | ||
70 | + UserPhone string `json:"userPhone"` // 用户手机号 | ||
71 | + UserAccount string `json:"userAccount"` // 用户账号, | ||
72 | + UserCode string `json:"userCode"` // 用户编码 | ||
73 | + } `json:"userInfo,omitempty"` | ||
74 | + } `json:"applicants"` | ||
51 | } | 75 | } |
52 | 76 | ||
53 | func ToCooperationProjectInfo(param *allied_creation_cooperation.CooperationProject) *CooperationProjectInfo { | 77 | func ToCooperationProjectInfo(param *allied_creation_cooperation.CooperationProject) *CooperationProjectInfo { |
@@ -65,6 +89,8 @@ func ToCooperationProjectInfo(param *allied_creation_cooperation.CooperationProj | @@ -65,6 +89,8 @@ func ToCooperationProjectInfo(param *allied_creation_cooperation.CooperationProj | ||
65 | Department: param.Department, | 89 | Department: param.Department, |
66 | Status: param.Status, | 90 | Status: param.Status, |
67 | Images: param.Attachment, | 91 | Images: param.Attachment, |
92 | + UndertakerTypesUncheckedAvailable: param.UndertakerTypesUncheckedAvailable, | ||
93 | + Applicants: param.Applicants, | ||
68 | } | 94 | } |
69 | 95 | ||
70 | data.CooperationProjectSponsor.UsersCode = param.CooperationProjectSponsor.UserInfo.UsersCode | 96 | data.CooperationProjectSponsor.UsersCode = param.CooperationProjectSponsor.UserInfo.UsersCode |
@@ -3,6 +3,7 @@ package pg | @@ -3,6 +3,7 @@ package pg | ||
3 | import ( | 3 | import ( |
4 | "context" | 4 | "context" |
5 | "fmt" | 5 | "fmt" |
6 | + | ||
6 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/pg/models" | 7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/pg/models" |
7 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" | 8 | "gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/log" |
8 | 9 |
@@ -152,6 +152,7 @@ func (repository *LoginAccessRepository) Find(queryOptions map[string]interface{ | @@ -152,6 +152,7 @@ func (repository *LoginAccessRepository) Find(queryOptions map[string]interface{ | ||
152 | } | 152 | } |
153 | return int64(count), loginAccesss, nil | 153 | return int64(count), loginAccesss, nil |
154 | } | 154 | } |
155 | + | ||
155 | } | 156 | } |
156 | func NewLoginAccessRepository(transactionContext *pgTransaction.TransactionContext) (*LoginAccessRepository, error) { | 157 | func NewLoginAccessRepository(transactionContext *pgTransaction.TransactionContext) (*LoginAccessRepository, error) { |
157 | if transactionContext == nil { | 158 | if transactionContext == nil { |
@@ -387,26 +387,26 @@ func (gateway HttplibAlliedCreationCooperation) CooperationApplicationsOneclickA | @@ -387,26 +387,26 @@ func (gateway HttplibAlliedCreationCooperation) CooperationApplicationsOneclickA | ||
387 | url := gateway.baseUrL + "/cooperation-applications/oneclick-approval" | 387 | url := gateway.baseUrL + "/cooperation-applications/oneclick-approval" |
388 | method := "POST" | 388 | method := "POST" |
389 | req := gateway.CreateRequest(url, method) | 389 | req := gateway.CreateRequest(url, method) |
390 | - log.Logger.Debug("向业务模块请求数据:共创申请批量审核。", map[string]interface{}{ | 390 | + log.Logger.Debug("向业务模块请求数据:共创申请一键审核。", map[string]interface{}{ |
391 | "api": method + ":" + url, | 391 | "api": method + ":" + url, |
392 | "param": param, | 392 | "param": param, |
393 | }) | 393 | }) |
394 | req, err := req.JSONBody(param) | 394 | req, err := req.JSONBody(param) |
395 | if err != nil { | 395 | if err != nil { |
396 | - return nil, fmt.Errorf("请求共创申请批量审核失败:%w", err) | 396 | + return nil, fmt.Errorf("请求共创申请一键审核失败:%w", err) |
397 | } | 397 | } |
398 | 398 | ||
399 | byteResult, err := req.Bytes() | 399 | byteResult, err := req.Bytes() |
400 | if err != nil { | 400 | if err != nil { |
401 | - return nil, fmt.Errorf("获取共创申请批量审核失败:%w", err) | 401 | + return nil, fmt.Errorf("获取共创申请一键审核失败:%w", err) |
402 | } | 402 | } |
403 | - log.Logger.Debug("获取业务模块请求数据:共创申请批量审核。", map[string]interface{}{ | 403 | + log.Logger.Debug("获取业务模块请求数据:共创申请一键审核。", map[string]interface{}{ |
404 | "result": string(byteResult), | 404 | "result": string(byteResult), |
405 | }) | 405 | }) |
406 | var result service_gateway.GatewayResponse | 406 | var result service_gateway.GatewayResponse |
407 | err = json.Unmarshal(byteResult, &result) | 407 | err = json.Unmarshal(byteResult, &result) |
408 | if err != nil { | 408 | if err != nil { |
409 | - return nil, fmt.Errorf("解析共创申请批量审核:%w", err) | 409 | + return nil, fmt.Errorf("解析共创申请一键审核:%w", err) |
410 | } | 410 | } |
411 | var data DataCooperationApplicationOneclickApproval | 411 | var data DataCooperationApplicationOneclickApproval |
412 | err = gateway.GetResponseData(result, &data) | 412 | err = gateway.GetResponseData(result, &data) |
@@ -418,26 +418,26 @@ func (gateway HttplibAlliedCreationCooperation) ApplyForCooperation(param ReqApp | @@ -418,26 +418,26 @@ func (gateway HttplibAlliedCreationCooperation) ApplyForCooperation(param ReqApp | ||
418 | url := gateway.baseUrL + "/cooperation-applications/" + strconv.Itoa(param.CooperationProjectId) + "/apply-for-cooperation" | 418 | url := gateway.baseUrL + "/cooperation-applications/" + strconv.Itoa(param.CooperationProjectId) + "/apply-for-cooperation" |
419 | method := "POST" | 419 | method := "POST" |
420 | req := gateway.CreateRequest(url, method) | 420 | req := gateway.CreateRequest(url, method) |
421 | - log.Logger.Debug("向业务模块请求数据:创建共创申请。", map[string]interface{}{ | 421 | + log.Logger.Debug("向业务模块请求数据:申请共创项目。", map[string]interface{}{ |
422 | "api": method + ":" + url, | 422 | "api": method + ":" + url, |
423 | "param": param, | 423 | "param": param, |
424 | }) | 424 | }) |
425 | req, err := req.JSONBody(param) | 425 | req, err := req.JSONBody(param) |
426 | if err != nil { | 426 | if err != nil { |
427 | - return nil, fmt.Errorf("请求创建共创申请失败:%w", err) | 427 | + return nil, fmt.Errorf("请求申请共创项目失败:%w", err) |
428 | } | 428 | } |
429 | 429 | ||
430 | byteResult, err := req.Bytes() | 430 | byteResult, err := req.Bytes() |
431 | if err != nil { | 431 | if err != nil { |
432 | - return nil, fmt.Errorf("获取创建共创申请失败:%w", err) | 432 | + return nil, fmt.Errorf("获取申请共创项目失败:%w", err) |
433 | } | 433 | } |
434 | - log.Logger.Debug("获取业务模块请求数据:创建共创申请。", map[string]interface{}{ | 434 | + log.Logger.Debug("获取业务模块请求数据:申请共创项目。", map[string]interface{}{ |
435 | "result": string(byteResult), | 435 | "result": string(byteResult), |
436 | }) | 436 | }) |
437 | var result service_gateway.GatewayResponse | 437 | var result service_gateway.GatewayResponse |
438 | err = json.Unmarshal(byteResult, &result) | 438 | err = json.Unmarshal(byteResult, &result) |
439 | if err != nil { | 439 | if err != nil { |
440 | - return nil, fmt.Errorf("解析创建共创申请:%w", err) | 440 | + return nil, fmt.Errorf("解析申请共创项目:%w", err) |
441 | } | 441 | } |
442 | var data DataApplyForCooperation | 442 | var data DataApplyForCooperation |
443 | err = gateway.GetResponseData(result, &data) | 443 | err = gateway.GetResponseData(result, &data) |
@@ -60,6 +60,30 @@ type CooperationProject struct { | @@ -60,6 +60,30 @@ type CooperationProject struct { | ||
60 | DepartmentName string `json:"departmentName"` | 60 | DepartmentName string `json:"departmentName"` |
61 | } `json:"department"` //项目发起部门 | 61 | } `json:"department"` //项目发起部门 |
62 | Status int `json:"status"` // 共创项目状态,1招标中,2结束 | 62 | Status int `json:"status"` // 共创项目状态,1招标中,2结束 |
63 | + // 可以去除勾选的共创项目承接对象列表 | ||
64 | + UndertakerTypesUncheckedAvailable []int `json:"undertakerTypesUncheckedAvailable"` | ||
65 | + // 承接人 | ||
66 | + Applicants []struct { | ||
67 | + UserId int64 `json:"userId,string"` | ||
68 | + UserBaseId int64 `json:"userBaseId,string"` // 用户基本id | ||
69 | + Org struct { | ||
70 | + OrgId int64 `json:"orgId,string"` // 组织机构ID | ||
71 | + OrgName string `json:"orgName"` // 组织名称 | ||
72 | + } `json:"org"` // 用户所属组织机构 | ||
73 | + Department struct { | ||
74 | + DepartmentId int64 `json:"departmentId,string"` // 部门ID, | ||
75 | + DepartmentName string `json:"departmentName"` // 部门名称 | ||
76 | + DepartmentNumber string `json:"departmentNumber"` // 部门编码 | ||
77 | + } `json:"department"` // 用户所属的部门 | ||
78 | + UserInfo struct { | ||
79 | + UserAvatar string `json:"userAvatar"` // 用户头像 | ||
80 | + UserEmail string `json:"userEmail"` // 用户邮箱 | ||
81 | + UserName string `json:"userName"` // 共创人员姓名 | ||
82 | + UserPhone string `json:"userPhone"` // 用户手机号 | ||
83 | + UserAccount string `json:"userAccount"` // 用户账号, | ||
84 | + UserCode string `json:"userCode"` // 用户编码 | ||
85 | + } `json:"userInfo,omitempty"` | ||
86 | + } `json:"applicants"` | ||
63 | } | 87 | } |
64 | 88 | ||
65 | //创建共创项目 | 89 | //创建共创项目 |
-
请 注册 或 登录 后发表评论