作者 yangfu

Merge branch 'dev' of http://gitlab.fjmaimaimai.com/allied-creation/allied-creat…

…ion-cooperation into dev
正在显示 61 个修改的文件 包含 274 行增加233 行删除
@@ -16,11 +16,11 @@ type GetContractUndertakerFeedbackQuery struct { @@ -16,11 +16,11 @@ type GetContractUndertakerFeedbackQuery struct {
16 // 公司ID,通过集成REST上下文获取 16 // 公司ID,通过集成REST上下文获取
17 CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 17 CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"`
18 // 组织机构ID 18 // 组织机构ID
19 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 19 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
20 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 20 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
21 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 21 + UserId int64 `cname:"用户ID" json:"userId"`
22 // 用户基础数据id 22 // 用户基础数据id
23 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 23 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
24 } 24 }
25 25
26 func (getContractUndertakerFeedbackQuery *GetContractUndertakerFeedbackQuery) Valid(validation *validation.Validation) { 26 func (getContractUndertakerFeedbackQuery *GetContractUndertakerFeedbackQuery) Valid(validation *validation.Validation) {
@@ -18,11 +18,13 @@ type ListContractUndertakerFeedbackQuery struct { @@ -18,11 +18,13 @@ type ListContractUndertakerFeedbackQuery struct {
18 // 公司ID,通过集成REST上下文获取 18 // 公司ID,通过集成REST上下文获取
19 CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 19 CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"`
20 // 组织机构ID 20 // 组织机构ID
21 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 21 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  22 + // 关联的组织机构ID列表
  23 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
22 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 24 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
23 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 25 + UserId int64 `cname:"用户ID" json:"userId"`
24 // 用户基础数据id 26 // 用户基础数据id
25 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 27 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
26 } 28 }
27 29
28 func (listContractUndertakerFeedbackQuery *ListContractUndertakerFeedbackQuery) Valid(validation *validation.Validation) { 30 func (listContractUndertakerFeedbackQuery *ListContractUndertakerFeedbackQuery) Valid(validation *validation.Validation) {
@@ -10,11 +10,13 @@ import ( @@ -10,11 +10,13 @@ import (
10 10
11 type SearchContractUndertakerFeedbackQuery struct { 11 type SearchContractUndertakerFeedbackQuery struct {
12 // 公司ID,通过集成REST上下文获取 12 // 公司ID,通过集成REST上下文获取
13 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 13 + CompanyId int64 `cname:"公司ID" json:"companyId"`
14 // 组织机构ID 14 // 组织机构ID
15 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 15 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  16 + // 关联的组织机构ID列表
  17 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
16 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 18 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
17 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 19 + UserId int64 `cname:"用户ID" json:"userId"`
18 // 用户基础数据id 20 // 用户基础数据id
19 UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 21 UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"`
20 // 共创合约名称 22 // 共创合约名称
@@ -14,13 +14,15 @@ type ListCooperationApplicationQuery struct { @@ -14,13 +14,15 @@ type ListCooperationApplicationQuery struct {
14 // 页面大小 14 // 页面大小
15 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` 15 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
16 // 公司ID,通过集成REST上下文获取 16 // 公司ID,通过集成REST上下文获取
17 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 17 + CompanyId int64 `cname:"公司ID" json:"companyId"`
18 // 组织机构ID 18 // 组织机构ID
19 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 19 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  20 + // 关联的组织机构ID列表
  21 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
20 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 22 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
21 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 23 + UserId int64 `cname:"用户ID" json:"userId"`
22 // 用户基础数据id 24 // 用户基础数据id
23 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 25 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
24 } 26 }
25 27
26 func (listCooperationApplicationQuery *ListCooperationApplicationQuery) Valid(validation *validation.Validation) { 28 func (listCooperationApplicationQuery *ListCooperationApplicationQuery) Valid(validation *validation.Validation) {
@@ -24,11 +24,13 @@ type SearchCooperationApplicationQuery struct { @@ -24,11 +24,13 @@ type SearchCooperationApplicationQuery struct {
24 // 公司ID,通过集成REST上下文获取 24 // 公司ID,通过集成REST上下文获取
25 CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 25 CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"`
26 // 组织机构ID 26 // 组织机构ID
27 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 27 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  28 + // 关联的组织机构ID列表
  29 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
28 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 30 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
29 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 31 + UserId int64 `cname:"用户ID" json:"userId"`
30 // 用户基础数据id 32 // 用户基础数据id
31 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 33 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
32 } 34 }
33 35
34 func (searchCooperationApplicationQuery *SearchCooperationApplicationQuery) Valid(validation *validation.Validation) { 36 func (searchCooperationApplicationQuery *SearchCooperationApplicationQuery) Valid(validation *validation.Validation) {
@@ -16,11 +16,13 @@ type ListCooperationContractQuery struct { @@ -16,11 +16,13 @@ type ListCooperationContractQuery struct {
16 // 公司ID,通过集成REST上下文获取 16 // 公司ID,通过集成REST上下文获取
17 CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 17 CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"`
18 // 组织机构ID 18 // 组织机构ID
19 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 19 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  20 + // 关联的组织机构ID列表
  21 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
20 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 22 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
21 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 23 + UserId int64 `cname:"用户ID" json:"userId"`
22 // 用户基础数据id 24 // 用户基础数据id
23 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 25 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
24 } 26 }
25 27
26 func (listCooperationContractQuery *ListCooperationContractQuery) Valid(validation *validation.Validation) { 28 func (listCooperationContractQuery *ListCooperationContractQuery) Valid(validation *validation.Validation) {
@@ -18,13 +18,13 @@ type SearchCooperationContractQuery struct { @@ -18,13 +18,13 @@ type SearchCooperationContractQuery struct {
18 // 发起人姓名 18 // 发起人姓名
19 SponsorName string `cname:"发起人姓名" json:"sponsorName,omitempty"` 19 SponsorName string `cname:"发起人姓名" json:"sponsorName,omitempty"`
20 // 公司ID,通过集成REST上下文获取 20 // 公司ID,通过集成REST上下文获取
21 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 21 + CompanyId int64 `cname:"公司ID" json:"companyId"`
22 // 组织机构ID 22 // 组织机构ID
23 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 23 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
24 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 24 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
25 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 25 + UserId int64 `cname:"用户ID" json:"userId"`
26 // 用户基础数据id 26 // 用户基础数据id
27 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 27 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
28 } 28 }
29 29
30 func (searchCooperationContractQuery *SearchCooperationContractQuery) Valid(validation *validation.Validation) { 30 func (searchCooperationContractQuery *SearchCooperationContractQuery) Valid(validation *validation.Validation) {
@@ -18,13 +18,13 @@ type SearchCooperationContractByUndertakerQuery struct { @@ -18,13 +18,13 @@ type SearchCooperationContractByUndertakerQuery struct {
18 // 项目发起人姓名 18 // 项目发起人姓名
19 SponsorName string `cname:"项目发起人姓名" json:"sponsorName,omitempty"` 19 SponsorName string `cname:"项目发起人姓名" json:"sponsorName,omitempty"`
20 // 公司ID,通过集成REST上下文获取 20 // 公司ID,通过集成REST上下文获取
21 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 21 + CompanyId int64 `cname:"公司ID" json:"companyId"`
22 // 组织机构ID 22 // 组织机构ID
23 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 23 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
24 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 24 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
25 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 25 + UserId int64 `cname:"用户ID" json:"userId"`
26 // 用户基础数据id 26 // 用户基础数据id
27 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 27 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
28 } 28 }
29 29
30 func (searchCooperationContractByUndertakerQuery *SearchCooperationContractByUndertakerQuery) Valid(validation *validation.Validation) { 30 func (searchCooperationContractByUndertakerQuery *SearchCooperationContractByUndertakerQuery) Valid(validation *validation.Validation) {
@@ -14,13 +14,15 @@ type ListCooperationContractChangeLogQuery struct { @@ -14,13 +14,15 @@ type ListCooperationContractChangeLogQuery struct {
14 // 页面大小 14 // 页面大小
15 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` 15 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
16 // 公司ID,通过集成REST上下文获取 16 // 公司ID,通过集成REST上下文获取
17 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 17 + CompanyId int64 `cname:"公司ID" json:"companyId"`
18 // 组织机构ID 18 // 组织机构ID
19 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 19 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  20 + // 关联的组织机构ID列表
  21 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
20 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 22 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
21 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 23 + UserId int64 `cname:"用户ID" json:"userId"`
22 // 用户基础数据id 24 // 用户基础数据id
23 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 25 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
24 } 26 }
25 27
26 func (listCooperationContractChangeLogQuery *ListCooperationContractChangeLogQuery) Valid(validation *validation.Validation) { 28 func (listCooperationContractChangeLogQuery *ListCooperationContractChangeLogQuery) Valid(validation *validation.Validation) {
@@ -18,13 +18,15 @@ type SearchCooperationContractChangeLogQuery struct { @@ -18,13 +18,15 @@ type SearchCooperationContractChangeLogQuery struct {
18 // 页面大小 18 // 页面大小
19 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` 19 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
20 // 公司ID,通过集成REST上下文获取 20 // 公司ID,通过集成REST上下文获取
21 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 21 + CompanyId int64 `cname:"公司ID" json:"companyId"`
22 // 组织机构ID 22 // 组织机构ID
23 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 23 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  24 + // 关联的组织机构ID列表
  25 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
24 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 26 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
25 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 27 + UserId int64 `cname:"用户ID" json:"userId"`
26 // 用户基础数据id 28 // 用户基础数据id
27 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 29 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
28 } 30 }
29 31
30 func (searchCooperationContractChangeLogQuery *SearchCooperationContractChangeLogQuery) Valid(validation *validation.Validation) { 32 func (searchCooperationContractChangeLogQuery *SearchCooperationContractChangeLogQuery) Valid(validation *validation.Validation) {
@@ -14,11 +14,13 @@ type ListCooperationModeQuery struct { @@ -14,11 +14,13 @@ type ListCooperationModeQuery struct {
14 // 页面大小 14 // 页面大小
15 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` 15 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
16 // 公司ID,通过集成REST上下文获取 16 // 公司ID,通过集成REST上下文获取
17 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 17 + CompanyId int64 `cname:"公司ID" json:"companyId"`
18 // 组织机构ID 18 // 组织机构ID
19 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 19 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  20 + // 关联的组织机构ID列表
  21 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
20 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 22 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
21 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 23 + UserId int64 `cname:"用户ID" json:"userId"`
22 // 用户基础数据id 24 // 用户基础数据id
23 UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId"` 25 UserBaseId int64 `cname:"用户基础数据is" json:"userBaseId"`
24 } 26 }
@@ -18,11 +18,13 @@ type SearchCooperationModeQuery struct { @@ -18,11 +18,13 @@ type SearchCooperationModeQuery struct {
18 // 组织机构名称 18 // 组织机构名称
19 OrganizationName string `cname:"组织机构名称" json:"organizationName,omitempty"` 19 OrganizationName string `cname:"组织机构名称" json:"organizationName,omitempty"`
20 // 公司ID,通过集成REST上下文获取 20 // 公司ID,通过集成REST上下文获取
21 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 21 + CompanyId int64 `cname:"公司ID" json:"companyId"`
22 // 组织机构ID 22 // 组织机构ID
23 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 23 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  24 + // 关联的组织机构ID列表
  25 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
24 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 26 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
25 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 27 + UserId int64 `cname:"用户ID" json:"userId"`
26 // 用户基础数据id 28 // 用户基础数据id
27 UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"` 29 UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
28 } 30 }
@@ -115,6 +115,7 @@ func (cooperationModeService *CooperationModeService) CreateCooperationMode(crea @@ -115,6 +115,7 @@ func (cooperationModeService *CooperationModeService) CreateCooperationMode(crea
115 CooperationModeName: createCooperationModeCommand.CooperationModeName, 115 CooperationModeName: createCooperationModeCommand.CooperationModeName,
116 CooperationModeNumber: createCooperationModeCommand.CooperationModeNumber, 116 CooperationModeNumber: createCooperationModeCommand.CooperationModeNumber,
117 Remarks: createCooperationModeCommand.Remarks, 117 Remarks: createCooperationModeCommand.Remarks,
  118 + Status: 1,
118 Company: company, 119 Company: company,
119 Org: organization, 120 Org: organization,
120 Operator: operator, 121 Operator: operator,
@@ -13,16 +13,18 @@ type ListCooperationProjectQuery struct { @@ -13,16 +13,18 @@ type ListCooperationProjectQuery struct {
13 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` 13 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
14 // 页面大小 14 // 页面大小
15 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` 15 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
16 - // 公司ID,通过集成REST上下文获取  
17 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"`  
18 - // 组织机构ID  
19 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"`  
20 // 项目状态 1招标中,2结束 0全部 16 // 项目状态 1招标中,2结束 0全部
21 Status int32 `json:"status"` 17 Status int32 `json:"status"`
  18 + // 公司ID,通过集成REST上下文获取
  19 + CompanyId int64 `cname:"公司ID" json:"companyId"`
  20 + // 组织机构ID
  21 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  22 + // 关联的组织机构ID列表
  23 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
22 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 24 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
23 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 25 + UserId int64 `cname:"用户ID" json:"userId"`
24 // 用户基础数据id 26 // 用户基础数据id
25 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 27 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
26 } 28 }
27 29
28 func (listCooperationProjectQuery *ListCooperationProjectQuery) Valid(validation *validation.Validation) { 30 func (listCooperationProjectQuery *ListCooperationProjectQuery) Valid(validation *validation.Validation) {
@@ -20,13 +20,15 @@ type SearchCooperationProjectQuery struct { @@ -20,13 +20,15 @@ type SearchCooperationProjectQuery struct {
20 // 共创项目状态,根据共创项目状态筛选项目数据 20 // 共创项目状态,根据共创项目状态筛选项目数据
21 Status int32 `cname:"共创项目状态" json:"status,omitempty"` 21 Status int32 `cname:"共创项目状态" json:"status,omitempty"`
22 // 公司ID,通过集成REST上下文获取 22 // 公司ID,通过集成REST上下文获取
23 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 23 + CompanyId int64 `cname:"公司ID" json:"companyId"`
24 // 组织机构ID 24 // 组织机构ID
25 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 25 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  26 + // 关联的组织机构ID列表
  27 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
26 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 28 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
27 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 29 + UserId int64 `cname:"用户ID" json:"userId"`
28 // 用户基础数据id 30 // 用户基础数据id
29 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 31 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
30 } 32 }
31 33
32 func (searchCooperationProjectQuery *SearchCooperationProjectQuery) Valid(validation *validation.Validation) { 34 func (searchCooperationProjectQuery *SearchCooperationProjectQuery) Valid(validation *validation.Validation) {
@@ -238,14 +238,39 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec @@ -238,14 +238,39 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec
238 } else { 238 } else {
239 cooperationProjectDao = value 239 cooperationProjectDao = value
240 } 240 }
241 - // 获取可删除的承接对象类型  
242 - undertakerTypesUncheckedAvailable, err := cooperationProjectDao.CheckUndertakerTypesUncheckedAvailable(map[string]interface{}{ 241 +
  242 + // 可以去除勾选的承接人对象列表
  243 + var undertakerTypesUncheckedAvailable []int32
  244 +
  245 + // 判断承接对象是否存在员工
  246 + gotUser, err := cooperationProjectDao.CheckUndertakerTypesUncheckedAvailable(map[string]interface{}{
243 "cooperationProjectNumber": cooperationProject.CooperationProjectNumber, 247 "cooperationProjectNumber": cooperationProject.CooperationProjectNumber,
244 - "cooperationProjectUndertakerTypes": cooperationProject.CooperationProjectUndertakerTypes, 248 + "user": true,
245 }) 249 })
246 if err != nil { 250 if err != nil {
247 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 251 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
248 } 252 }
  253 + if !gotUser {
  254 + undertakerTypesUncheckedAvailable = append(undertakerTypesUncheckedAvailable, 1)
  255 + }
  256 +
  257 + // 判断承接对象是否存在共创用户
  258 + gotPartner, err := cooperationProjectDao.CheckUndertakerTypesUncheckedAvailable(map[string]interface{}{
  259 + "cooperationProjectNumber": cooperationProject.CooperationProjectNumber,
  260 + "partner": true,
  261 + })
  262 + if err != nil {
  263 + return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
  264 + }
  265 + if !gotPartner {
  266 + undertakerTypesUncheckedAvailable = append(undertakerTypesUncheckedAvailable, 2)
  267 + }
  268 +
  269 + // 判断承接人是否存在公开用户
  270 + if !gotUser && !gotPartner {
  271 + undertakerTypesUncheckedAvailable = append(undertakerTypesUncheckedAvailable, 3)
  272 + }
  273 +
249 cooperationProjectDto := &dto.CooperationProjectsDto{} 274 cooperationProjectDto := &dto.CooperationProjectsDto{}
250 if err := cooperationProjectDto.LoadDto(cooperationProject, nil, undertakerTypesUncheckedAvailable); err != nil { 275 if err := cooperationProjectDto.LoadDto(cooperationProject, nil, undertakerTypesUncheckedAvailable); err != nil {
251 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 276 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
@@ -283,39 +308,10 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje @@ -283,39 +308,10 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje
283 if count, cooperationProjects, err := cooperationProjectRepository.Find(tool_funs.SimpleStructToMap(listCooperationProjectQuery)); err != nil { 308 if count, cooperationProjects, err := cooperationProjectRepository.Find(tool_funs.SimpleStructToMap(listCooperationProjectQuery)); err != nil {
284 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 309 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
285 } else { 310 } else {
286 - //var cooperationModeRepository domain.CooperationModeRepository  
287 - //if value, err := factory.CreateCooperationProjectRepository(map[string]interface{}{  
288 - // "transactionContext": transactionContext,  
289 - //}); err != nil {  
290 - // return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
291 - //} else {  
292 - // cooperationProjectRepository = value  
293 - //}  
294 - //var modeMap = make(map[string]*domain.CooperationMode)  
295 - //if _, cooperationProjects, err := cooperationModeRepository.Find(map[string]interface{}{"companyId":listCooperationProjectQuery.CompanyId,"orgId":listCooperationProjectQuery.OrgId}); err != nil {  
296 - // return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())  
297 - //}else{  
298 - // for i:=range cooperationProjects{  
299 - // p :=cooperationProjects[i]  
300 - // modeMap[p.CooperationModeNumber]=p  
301 - // }  
302 - //}  
303 - //  
304 - //var res []*dto.CooperationProjectsDto  
305 - //for i := range cooperationProjects {  
306 - // p := cooperationProjects[i]  
307 - // tp := &dto.CooperationProjectsDto{}  
308 - // tp.LoadDto(p, &domain.CooperationMode{})  
309 - // res = append(res, tp)  
310 - //}  
311 if err := transactionContext.CommitTransaction(); err != nil { 311 if err := transactionContext.CommitTransaction(); err != nil {
312 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 312 return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
313 } 313 }
314 return map[string]interface{}{ 314 return map[string]interface{}{
315 - //"grid": map[string]interface{}{  
316 - //"total": count,  
317 - //"list": res,  
318 - //},  
319 "list": cooperationProjects, 315 "list": cooperationProjects,
320 "total": count, 316 "total": count,
321 }, nil 317 }, nil
@@ -14,13 +14,15 @@ type ListCreditAccountQuery struct { @@ -14,13 +14,15 @@ type ListCreditAccountQuery struct {
14 // 页面大小 14 // 页面大小
15 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` 15 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
16 // 公司ID,通过集成REST上下文获取 16 // 公司ID,通过集成REST上下文获取
17 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 17 + CompanyId int64 `cname:"公司ID" json:"companyId"`
18 // 组织机构ID 18 // 组织机构ID
19 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 19 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  20 + // 关联的组织机构ID列表
  21 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
20 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 22 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
21 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 23 + UserId int64 `cname:"用户ID" json:"userId"`
22 // 用户基础数据id 24 // 用户基础数据id
23 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 25 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
24 } 26 }
25 27
26 func (listCreditAccountQuery *ListCreditAccountQuery) Valid(validation *validation.Validation) { 28 func (listCreditAccountQuery *ListCreditAccountQuery) Valid(validation *validation.Validation) {
@@ -18,18 +18,20 @@ type SearchCreditAccountQuery struct { @@ -18,18 +18,20 @@ type SearchCreditAccountQuery struct {
18 CreditAccountOrderNum string `cname:"账期结算单号" json:"creditAccountOrderNum,omitempty"` 18 CreditAccountOrderNum string `cname:"账期结算单号" json:"creditAccountOrderNum,omitempty"`
19 // 参与人姓名 19 // 参与人姓名
20 ParticipatorName string `cname:"参与人姓名" json:"participatorName,omitempty"` 20 ParticipatorName string `cname:"参与人姓名" json:"participatorName,omitempty"`
21 - // 公司ID,通过集成REST上下文获取  
22 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"`  
23 - // 组织机构ID  
24 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"`  
25 - // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员  
26 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"`  
27 - // 用户基础数据id  
28 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"`  
29 // 账期结算支付状态,1待支付,2已支付,APP端结算记录返回已结算的账期结算单 21 // 账期结算支付状态,1待支付,2已支付,APP端结算记录返回已结算的账期结算单
30 PaymentStatus int32 `cname:"账期结算支付状态" json:"paymentStatus"` 22 PaymentStatus int32 `cname:"账期结算支付状态" json:"paymentStatus"`
31 // 结算周期,按年“2021”或者按月结算”2021-07“ 23 // 结算周期,按年“2021”或者按月结算”2021-07“
32 Period time.Time `cname:"结算周期" json:"period,omitempty"` 24 Period time.Time `cname:"结算周期" json:"period,omitempty"`
  25 + // 公司ID,通过集成REST上下文获取
  26 + CompanyId int64 `cname:"公司ID" json:"companyId"`
  27 + // 组织机构ID
  28 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  29 + // 关联的组织机构ID列表
  30 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
  31 + // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
  32 + UserId int64 `cname:"用户ID" json:"userId"`
  33 + // 用户基础数据id
  34 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
33 } 35 }
34 36
35 func (searchCreditAccountQuery *SearchCreditAccountQuery) Valid(validation *validation.Validation) { 37 func (searchCreditAccountQuery *SearchCreditAccountQuery) Valid(validation *validation.Validation) {
@@ -112,13 +112,36 @@ func (creditAccountService *CreditAccountService) CreateCreditAccount(createCred @@ -112,13 +112,36 @@ func (creditAccountService *CreditAccountService) CreateCreditAccount(createCred
112 } else { 112 } else {
113 dividendsEstimateRepository = value 113 dividendsEstimateRepository = value
114 } 114 }
115 - dividendsEstimateIds, _ := utils.SliceAtoi(createCreditAccountCommand.DividendsEstimateIds) 115 +
  116 + // 批量转换分红预算单号列表
  117 + dividendsEstimateIds, err := utils.SliceAtoi(createCreditAccountCommand.DividendsEstimateIds)
  118 + if err != nil {
  119 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "分红预算单号错误")
  120 + }
116 // 获取所选分红预算单 121 // 获取所选分红预算单
117 if _, dividendsEstimates, err := dividendsEstimateRepository.Find(map[string]interface{}{ 122 if _, dividendsEstimates, err := dividendsEstimateRepository.Find(map[string]interface{}{
118 "dividendsEstimateIds": dividendsEstimateIds, 123 "dividendsEstimateIds": dividendsEstimateIds,
119 }); err != nil { 124 }); err != nil {
120 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 125 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
121 } else { 126 } else {
  127 + // 校验共创用户是否一致
  128 + for i, _ := range dividendsEstimates {
  129 + if dividendsEstimates[i].DividendsUser.UserId != dividendsEstimates[i+1].DividendsUser.UserId {
  130 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "请勾选同一个共创用户进行结算")
  131 + }
  132 + }
  133 +
  134 + // 校验分红预算单是否可以进行预算
  135 + for _, dividendsEstimate := range dividendsEstimates {
  136 + if dividendsEstimate.DividendsAccountStatus == 2 {
  137 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "请勾选“待结算”的分红单结算")
  138 + }
  139 + if dividendsEstimate.IsCanceled {
  140 + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "请勾选未取消的分红单结算")
  141 + }
  142 + }
  143 +
  144 + // 预算操作
122 var creditAccounts []*domain.CreditAccount 145 var creditAccounts []*domain.CreditAccount
123 for _, dividendsEstimate := range dividendsEstimates { 146 for _, dividendsEstimate := range dividendsEstimates {
124 // 生成账期结算单号 147 // 生成账期结算单号
@@ -18,6 +18,8 @@ type DividendsIncentivesEstimateDto struct { @@ -18,6 +18,8 @@ type DividendsIncentivesEstimateDto struct {
18 CustomerName string `json:"customerName"` 18 CustomerName string `json:"customerName"`
19 // 订单区域 19 // 订单区域
20 RegionName string `json:"region"` 20 RegionName string `json:"region"`
  21 + // 订单产品名称
  22 + OrderGoodName string `json:"orderGoodName"`
21 // 订单金额 23 // 订单金额
22 OrderAmount float64 `json:"orderAmount"` 24 OrderAmount float64 `json:"orderAmount"`
23 // 订单/退货单日期 25 // 订单/退货单日期
@@ -31,6 +33,7 @@ func (dto *DividendsIncentivesEstimateDto) LoadDto(orderGood *domain.OrderGood, @@ -31,6 +33,7 @@ func (dto *DividendsIncentivesEstimateDto) LoadDto(orderGood *domain.OrderGood,
31 dto.OriginalOrderNum = originalOrderNum 33 dto.OriginalOrderNum = originalOrderNum
32 dto.CustomerName = customerName 34 dto.CustomerName = customerName
33 dto.RegionName = regionName 35 dto.RegionName = regionName
  36 + dto.OrderGoodName = orderGood.OrderGoodName
34 dto.OrderAmount = orderGood.OrderGoodAmount 37 dto.OrderAmount = orderGood.OrderGoodAmount
35 dto.OrderDate = orderDate 38 dto.OrderDate = orderDate
36 return nil 39 return nil
@@ -15,13 +15,15 @@ type ListDividendsEstimateQuery struct { @@ -15,13 +15,15 @@ type ListDividendsEstimateQuery struct {
15 // 页面大小 15 // 页面大小
16 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` 16 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
17 // 公司ID,通过集成REST上下文获取 17 // 公司ID,通过集成REST上下文获取
18 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 18 + CompanyId int64 `cname:"公司ID" json:"companyId"`
19 // 组织机构ID 19 // 组织机构ID
20 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 20 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  21 + // 关联的组织机构ID列表
  22 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
21 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 23 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
22 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 24 + UserId int64 `cname:"用户ID" json:"userId"`
23 // 用户基础数据id 25 // 用户基础数据id
24 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 26 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
25 } 27 }
26 28
27 func (listDividendsEstimateQuery *ListDividendsEstimateQuery) Valid(validation *validation.Validation) { 29 func (listDividendsEstimateQuery *ListDividendsEstimateQuery) Valid(validation *validation.Validation) {
@@ -15,13 +15,15 @@ type ListDividendsIncentivesEstimateQuery struct { @@ -15,13 +15,15 @@ type ListDividendsIncentivesEstimateQuery struct {
15 // 页面大小 15 // 页面大小
16 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` 16 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
17 // 公司ID,通过集成REST上下文获取 17 // 公司ID,通过集成REST上下文获取
18 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 18 + CompanyId int64 `cname:"公司ID" json:"companyId"`
19 // 组织机构ID 19 // 组织机构ID
20 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 20 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  21 + // 关联的组织机构ID列表
  22 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
21 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 23 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
22 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 24 + UserId int64 `cname:"用户ID" json:"userId"`
23 // 用户基础数据id 25 // 用户基础数据id
24 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 26 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
25 } 27 }
26 28
27 func (listDividendsIncentivesEstimateQuery *ListDividendsIncentivesEstimateQuery) Valid(validation *validation.Validation) { 29 func (listDividendsIncentivesEstimateQuery *ListDividendsIncentivesEstimateQuery) Valid(validation *validation.Validation) {
@@ -14,16 +14,18 @@ type ListMoneyIncentivesEstimateQuery struct { @@ -14,16 +14,18 @@ type ListMoneyIncentivesEstimateQuery struct {
14 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` 14 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
15 // 页面大小 15 // 页面大小
16 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` 16 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
  17 + // 激励方式
  18 + IncentivesType int32 `cname:"激励方式" json:"incentivesType,omitempty"`
17 // 公司ID,通过集成REST上下文获取 19 // 公司ID,通过集成REST上下文获取
18 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 20 + CompanyId int64 `cname:"公司ID" json:"companyId"`
19 // 组织机构ID 21 // 组织机构ID
20 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 22 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  23 + // 关联的组织机构ID列表
  24 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
21 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 25 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
22 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 26 + UserId int64 `cname:"用户ID" json:"userId"`
23 // 用户基础数据id 27 // 用户基础数据id
24 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"`  
25 - // 激励方式  
26 - IncentivesType int32 `cname:"激励方式" json:"incentivesType,omitempty"` 28 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
27 } 29 }
28 30
29 func (listMoneyIncentivesEstimateQuery *ListMoneyIncentivesEstimateQuery) Valid(validation *validation.Validation) { 31 func (listMoneyIncentivesEstimateQuery *ListMoneyIncentivesEstimateQuery) Valid(validation *validation.Validation) {
@@ -15,13 +15,15 @@ type SearchDividendsEstimateQuery struct { @@ -15,13 +15,15 @@ type SearchDividendsEstimateQuery struct {
15 // 分红类型,1订单分红,2退货冲销,3金额激励 15 // 分红类型,1订单分红,2退货冲销,3金额激励
16 DividendsType int32 `cname:"分红类型" json:"dividendsType,omitempty"` 16 DividendsType int32 `cname:"分红类型" json:"dividendsType,omitempty"`
17 // 公司ID,通过集成REST上下文获取 17 // 公司ID,通过集成REST上下文获取
18 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 18 + CompanyId int64 `cname:"公司ID" json:"companyId"`
19 // 组织机构ID 19 // 组织机构ID
20 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 20 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  21 + // 关联的组织机构ID列表
  22 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
21 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 23 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
22 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 24 + UserId int64 `cname:"用户ID" json:"userId"`
23 // 用户基础数据id 25 // 用户基础数据id
24 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 26 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
25 // 页面大小 27 // 页面大小
26 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` 28 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
27 // 页面大小 29 // 页面大小
@@ -15,13 +15,15 @@ type SearchDividendsIncentivesEstimateQuery struct { @@ -15,13 +15,15 @@ type SearchDividendsIncentivesEstimateQuery struct {
15 // 分红订单号/退货单号 15 // 分红订单号/退货单号
16 OrderOrReturnedOrderNum string `cname:"分红订单号/退货单号" json:"orderOrReturnedOrderNum,omitempty"` 16 OrderOrReturnedOrderNum string `cname:"分红订单号/退货单号" json:"orderOrReturnedOrderNum,omitempty"`
17 // 公司ID,通过集成REST上下文获取 17 // 公司ID,通过集成REST上下文获取
18 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 18 + CompanyId int64 `cname:"公司ID" json:"companyId"`
19 // 组织机构ID 19 // 组织机构ID
20 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 20 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  21 + // 关联的组织机构ID列表
  22 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
21 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 23 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
22 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 24 + UserId int64 `cname:"用户ID" json:"userId"`
23 // 用户基础数据id 25 // 用户基础数据id
24 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 26 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
25 // 页面大小 27 // 页面大小
26 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` 28 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
27 // 页面大小 29 // 页面大小
@@ -15,13 +15,15 @@ type SearchMoneyIncentivesEstimateQuery struct { @@ -15,13 +15,15 @@ type SearchMoneyIncentivesEstimateQuery struct {
15 // 发起部门名称 15 // 发起部门名称
16 DepartmentName string `cname:"发起部门名称" json:"departmentName,omitempty"` 16 DepartmentName string `cname:"发起部门名称" json:"departmentName,omitempty"`
17 // 公司ID,通过集成REST上下文获取 17 // 公司ID,通过集成REST上下文获取
18 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 18 + CompanyId int64 `cname:"公司ID" json:"companyId"`
19 // 组织机构ID 19 // 组织机构ID
20 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 20 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  21 + // 关联的组织机构ID列表
  22 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
21 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 23 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
22 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 24 + UserId int64 `cname:"用户ID" json:"userId"`
23 // 用户基础数据id 25 // 用户基础数据id
24 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 26 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
25 // 页面大小 27 // 页面大小
26 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` 28 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
27 // 页面大小 29 // 页面大小
@@ -140,6 +140,8 @@ func (dividendsEstimateService *DividendsEstimateService) ListMoneyIncentivesEst @@ -140,6 +140,8 @@ func (dividendsEstimateService *DividendsEstimateService) ListMoneyIncentivesEst
140 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) 140 return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
141 } else { 141 } else {
142 // TODO 判断承接人是否已分红 142 // TODO 判断承接人是否已分红
  143 +
  144 + // 数据传输对象
143 var moneyIncentivesEstimateDtos []*dto.MoneyIncentivesEstimateDto 145 var moneyIncentivesEstimateDtos []*dto.MoneyIncentivesEstimateDto
144 for _, cooperationContract := range cooperationContracts { 146 for _, cooperationContract := range cooperationContracts {
145 moneyIncentivesEstimateDto := &dto.MoneyIncentivesEstimateDto{} 147 moneyIncentivesEstimateDto := &dto.MoneyIncentivesEstimateDto{}
@@ -14,13 +14,15 @@ type ListDividendsOrdersQuery struct { @@ -14,13 +14,15 @@ type ListDividendsOrdersQuery struct {
14 // 页面大小 14 // 页面大小
15 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"` 15 PageSize int64 `cname:"页面大小" json:"pageSize,omitempty"`
16 // 公司ID,通过集成REST上下文获取 16 // 公司ID,通过集成REST上下文获取
17 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 17 + CompanyId int64 `cname:"公司ID" json:"companyId"`
18 // 组织机构ID 18 // 组织机构ID
19 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 19 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  20 + // 关联的组织机构ID列表
  21 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
20 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 22 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
21 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 23 + UserId int64 `cname:"用户ID" json:"userId"`
22 // 用户基础数据id 24 // 用户基础数据id
23 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 25 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
24 } 26 }
25 27
26 func (listDividendsOrdersQuery *ListDividendsOrdersQuery) Valid(validation *validation.Validation) { 28 func (listDividendsOrdersQuery *ListDividendsOrdersQuery) Valid(validation *validation.Validation) {
@@ -18,13 +18,15 @@ type SearchDividendsOrderQuery struct { @@ -18,13 +18,15 @@ type SearchDividendsOrderQuery struct {
18 // 页面大小 18 // 页面大小
19 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` 19 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
20 // 公司ID,通过集成REST上下文获取 20 // 公司ID,通过集成REST上下文获取
21 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 21 + CompanyId int64 `cname:"公司ID" json:"companyId"`
22 // 组织机构ID 22 // 组织机构ID
23 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 23 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  24 + // 关联的组织机构ID列表
  25 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
24 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 26 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
25 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 27 + UserId int64 `cname:"用户ID" json:"userId"`
26 // 用户基础数据id 28 // 用户基础数据id
27 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 29 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
28 } 30 }
29 31
30 func (searchDividendsOrderQuery *SearchDividendsOrderQuery) Valid(validation *validation.Validation) { 32 func (searchDividendsOrderQuery *SearchDividendsOrderQuery) Valid(validation *validation.Validation) {
@@ -12,13 +12,15 @@ type SearchDividendsOrderNumberQuery struct { @@ -12,13 +12,15 @@ type SearchDividendsOrderNumberQuery struct {
12 // 分红订单号 12 // 分红订单号
13 DividendsOrderNumber string `cname:"分红订单号" json:"dividendsOrderNumber,omitempty"` 13 DividendsOrderNumber string `cname:"分红订单号" json:"dividendsOrderNumber,omitempty"`
14 // 公司ID,通过集成REST上下文获取 14 // 公司ID,通过集成REST上下文获取
15 - CompanyId int64 `cname:"公司ID" json:"companyId" valid:"Required"` 15 + CompanyId int64 `cname:"公司ID" json:"companyId"`
16 // 组织机构ID 16 // 组织机构ID
17 - OrgId int64 `cname:"组织机构ID" json:"orgId" valid:"Required"` 17 + OrgId int64 `cname:"组织机构ID" json:"orgId"`
  18 + // 关联的组织机构ID列表
  19 + OrgIds []int64 `cname:"关联的组织机构ID列表" json:"orgIds"`
18 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员 20 // 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
19 - UserId int64 `cname:"用户ID" json:"userId" valid:"Required"` 21 + UserId int64 `cname:"用户ID" json:"userId"`
20 // 用户基础数据id 22 // 用户基础数据id
21 - UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId" valid:"Required"` 23 + UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
22 // 页面大小 24 // 页面大小
23 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"` 25 PageNumber int64 `cname:"页码" json:"pageNumber,omitempty"`
24 // 页面大小 26 // 页面大小
@@ -19,7 +19,7 @@ import ( @@ -19,7 +19,7 @@ import (
19 type DividendsOrderService struct { 19 type DividendsOrderService struct {
20 } 20 }
21 21
22 -// CreateDividendsOrder 创建分红订单实体对象 22 +// CreateDividendsOrder 新增分红订单实体对象
23 func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createDividendsOrderCommand *command.CreateDividendsOrderCommand) (interface{}, error) { 23 func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createDividendsOrderCommand *command.CreateDividendsOrderCommand) (interface{}, error) {
24 if err := createDividendsOrderCommand.ValidateCommand(); err != nil { 24 if err := createDividendsOrderCommand.ValidateCommand(); err != nil {
25 return nil, application.ThrowError(application.ARG_ERROR, err.Error()) 25 return nil, application.ThrowError(application.ARG_ERROR, err.Error())
@@ -140,6 +140,7 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD @@ -140,6 +140,7 @@ func (dividendsOrderService *DividendsOrderService) CreateDividendsOrder(createD
140 orderTimeInt, _ := strconv.ParseInt(createDividendsOrderCommand.OrderTime, 10, 64) 140 orderTimeInt, _ := strconv.ParseInt(createDividendsOrderCommand.OrderTime, 10, 64)
141 orderTime := utils.TransformTimestampToTime(orderTimeInt) 141 orderTime := utils.TransformTimestampToTime(orderTimeInt)
142 142
  143 + // 新增分红订单
143 newDividendsOrder := &domain.DividendsOrder{ 144 newDividendsOrder := &domain.DividendsOrder{
144 DividendsOrderId: 0, 145 DividendsOrderId: 0,
145 DividendsOrderNumber: dividendsOrderNumber, 146 DividendsOrderNumber: dividendsOrderNumber,
@@ -45,3 +45,11 @@ func CreateConfirmMoneyIncentivesEstimateService(options map[string]interface{}) @@ -45,3 +45,11 @@ func CreateConfirmMoneyIncentivesEstimateService(options map[string]interface{})
45 } 45 }
46 return domain_service.NewConfirmMoneyIncentivesEstimateService(transactionContext) 46 return domain_service.NewConfirmMoneyIncentivesEstimateService(transactionContext)
47 } 47 }
  48 +
  49 +func CreateCancelDividendsEstimateService(options map[string]interface{}) (*domain_service.CancelDividendsEstimateService, error) {
  50 + var transactionContext *pgTransaction.TransactionContext
  51 + if value, ok := options["transactionContext"]; ok {
  52 + transactionContext = value.(*pgTransaction.TransactionContext)
  53 + }
  54 + return domain_service.NewCancelDividendsEstimateService(transactionContext)
  55 +}
1 package service 1 package service
2 2
  3 +import (
  4 + coreDomain "github.com/linmadan/egglib-go/core/domain"
  5 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
  6 +)
  7 +
3 type CancelDividendsEstimate interface { 8 type CancelDividendsEstimate interface {
4 - CancelEstimate() 9 + coreDomain.DomainEventPublisher
  10 + CancelEstimate(dividendsEstimateId int64, operatorId int64) ([]*domain.DividendsEstimate, error)
5 } 11 }
@@ -35,10 +35,42 @@ func (dao *CooperationProjectDao) GenerateProjectNumber() (string, error) { @@ -35,10 +35,42 @@ func (dao *CooperationProjectDao) GenerateProjectNumber() (string, error) {
35 } 35 }
36 } 36 }
37 37
38 -// CheckUndertakerTypesUncheckedAvailable TODO 校验项目承接对象是否可以删除  
39 -func (dao *CooperationProjectDao) CheckUndertakerTypesUncheckedAvailable(queryOptions map[string]interface{}) ([]int32, error) {  
40 -  
41 - return []int32{}, nil 38 +// CheckUndertakerTypesUncheckedAvailable 校验项目承接对象是否可以删除
  39 +func (dao *CooperationProjectDao) CheckUndertakerTypesUncheckedAvailable(queryOptions map[string]interface{}) (bool, error) {
  40 + tx := dao.transactionContext.PgTx
  41 + var cooperationContractModels []*models.CooperationContract
  42 + // 获取和项目关联的合约
  43 + query := tx.Model(&cooperationContractModels)
  44 + if cooperationProjectNumber, ok := queryOptions["cooperationProjectNumber"]; ok && cooperationProjectNumber != "" {
  45 + query = query.Where("cooperation_project_number = ?", cooperationProjectNumber)
  46 + }
  47 + if companyId, ok := queryOptions["companyId"]; ok && companyId.(int64) != 0 {
  48 + query = query.Where(`cooperation_contract.company @> '{"companyId":"?"}'`, companyId)
  49 + }
  50 + if orgId, ok := queryOptions["orgId"]; ok && orgId.(int64) != 0 {
  51 + query = query.Where(`cooperation_contract.org @> '{"orgId":"?"}'`, orgId)
  52 + }
  53 + if user, ok := queryOptions["user"]; ok && user.(bool) != false {
  54 + query = query.Where("user_type = ?", 1)
  55 + }
  56 + if partner, ok := queryOptions["partner"]; ok && partner.(bool) != false {
  57 + query = query.Where("user_type = ?", 2)
  58 + }
  59 + if count, err := query.SelectAndCount(); err != nil {
  60 + return false, err
  61 + } else {
  62 + if count > 0 {
  63 + for _, cooperationContractModel := range cooperationContractModels {
  64 + // 获取合约相关承接人
  65 + var cooperationContractUndertakerModels []*models.CooperationContractUndertaker
  66 + queryUndertaker := tx.Model(&cooperationContractUndertakerModels)
  67 + queryUndertaker.Where("cooperation_contract_number = ?", cooperationContractModel.CooperationContractNumber)
  68 + ok, err2 := queryUndertaker.Exists()
  69 + return !ok, err2
  70 + }
  71 + }
  72 + }
  73 + return false, nil
42 } 74 }
43 75
44 // CheckProjectNumberAvailable 校验项目编号唯一性 76 // CheckProjectNumberAvailable 校验项目编号唯一性
@@ -4,6 +4,7 @@ import ( @@ -4,6 +4,7 @@ import (
4 "fmt" 4 "fmt"
5 coreDomain "github.com/linmadan/egglib-go/core/domain" 5 coreDomain "github.com/linmadan/egglib-go/core/domain"
6 pgTransaction "github.com/linmadan/egglib-go/transaction/pg" 6 pgTransaction "github.com/linmadan/egglib-go/transaction/pg"
  7 + "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
7 ) 8 )
8 9
9 type CancelDividendsEstimateService struct { 10 type CancelDividendsEstimateService struct {
@@ -11,8 +12,8 @@ type CancelDividendsEstimateService struct { @@ -11,8 +12,8 @@ type CancelDividendsEstimateService struct {
11 transactionContext *pgTransaction.TransactionContext 12 transactionContext *pgTransaction.TransactionContext
12 } 13 }
13 14
14 -func (c *CancelDividendsEstimateService) CancelEstimate() {  
15 - panic("implement me") 15 +func (domainService *CancelDividendsEstimateService) CancelEstimate(dividendsEstimateId int64, operatorId int64) ([]*domain.DividendsEstimate, error) {
  16 + return nil, nil
16 } 17 }
17 18
18 func NewCancelDividendsEstimateService(transactionContext *pgTransaction.TransactionContext) (*CancelDividendsEstimateService, error) { 19 func NewCancelDividendsEstimateService(transactionContext *pgTransaction.TransactionContext) (*CancelDividendsEstimateService, error) {
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type ContractUndertakerFeedback struct { 8 type ContractUndertakerFeedback struct {
9 tableName string `comment:"承接人反馈信息" pg:"contract_undertaker_feedbacks,alias:contract_undertaker_feedback"` 9 tableName string `comment:"承接人反馈信息" pg:"contract_undertaker_feedbacks,alias:contract_undertaker_feedback"`
10 // 合约承接方反馈记录ID 10 // 合约承接方反馈记录ID
11 - FeedbackId int64 `comment:"合约承接方反馈记录ID" pg:",pk:feedback_id"` 11 + FeedbackId int64 `comment:"合约承接方反馈记录ID" pg:",pk"`
12 // 合约承接方反馈内容附件 12 // 合约承接方反馈内容附件
13 FeedbackAttachment []*domain.Attachment `comment:"合约承接方反馈内容附件"` 13 FeedbackAttachment []*domain.Attachment `comment:"合约承接方反馈内容附件"`
14 // 合约承接方反馈内容 14 // 合约承接方反馈内容
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type CooperationApplication struct { 8 type CooperationApplication struct {
9 tableName string `comment:"共创申请实体" pg:"cooperation_applications,alias:cooperation_application"` 9 tableName string `comment:"共创申请实体" pg:"cooperation_applications,alias:cooperation_application"`
10 // 共创申请ID 10 // 共创申请ID
11 - CooperationApplicationId int64 `comment:"共创申请ID" pg:",pk:cooperation_application_id"` 11 + CooperationApplicationId int64 `comment:"共创申请ID" pg:",pk"`
12 // 共创申请人 12 // 共创申请人
13 CooperationApplicationApplicant *domain.User `comment:"共创申请人"` 13 CooperationApplicationApplicant *domain.User `comment:"共创申请人"`
14 // 共创申请描述附件 14 // 共创申请描述附件
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type CooperationContract struct { 8 type CooperationContract struct {
9 tableName string `comment:"共创项目合约实体" pg:"cooperation_contracts,alias:cooperation_contract"` 9 tableName string `comment:"共创项目合约实体" pg:"cooperation_contracts,alias:cooperation_contract"`
10 // 共创合约ID 10 // 共创合约ID
11 - CooperationContractId int64 `comment:"共创合约ID" pg:",pk:cooperation_contract_id"` 11 + CooperationContractId int64 `comment:"共创合约ID" pg:",pk"`
12 // 共创合约描述 12 // 共创合约描述
13 CooperationContractDescription string `comment:"共创合约描述"` 13 CooperationContractDescription string `comment:"共创合约描述"`
14 // 共创合约名称 14 // 共创合约名称
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type CooperationContractChangeLog struct { 8 type CooperationContractChangeLog struct {
9 tableName string `comment:"共创合约变更日志" pg:"cooperation_contract_change_logs,alias:cooperation_contract_change_log"` 9 tableName string `comment:"共创合约变更日志" pg:"cooperation_contract_change_logs,alias:cooperation_contract_change_log"`
10 // 共创合约变更记录id 10 // 共创合约变更记录id
11 - CooperationContractChangeLogId int64 `comment:"共创合约变更记录id" pg:",pk:cooperation_contract_change_log_id"` 11 + CooperationContractChangeLogId int64 `comment:"共创合约变更记录id" pg:",pk"`
12 // 激励规则 12 // 激励规则
13 IncentivesRule string `comment:"激励规则"` 13 IncentivesRule string `comment:"激励规则"`
14 // 激励规则明细 14 // 激励规则明细
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type CooperationContractRelevant struct { 8 type CooperationContractRelevant struct {
9 tableName string `comment:"共创合约相关人" pg:"cooperation_contract_relevants,alias:cooperation_contract_relevant"` 9 tableName string `comment:"共创合约相关人" pg:"cooperation_contract_relevants,alias:cooperation_contract_relevant"`
10 // 共创合约相关人id 10 // 共创合约相关人id
11 - CooperationContractRelevantId int64 `comment:"共创合约相关人id" pg:",pk:cooperation_contract_relevant_id"` 11 + CooperationContractRelevantId int64 `comment:"共创合约相关人id" pg:",pk"`
12 // 共创合约编号 12 // 共创合约编号
13 CooperationContractNumber string `comment:"共创合约编号"` 13 CooperationContractNumber string `comment:"共创合约编号"`
14 // 合约人userId 14 // 合约人userId
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type CooperationContractUndertaker struct { 8 type CooperationContractUndertaker struct {
9 tableName string `comment:"共创合约承接人" pg:"cooperation_contract_undertakers,alias:cooperation_contract_undertaker"` 9 tableName string `comment:"共创合约承接人" pg:"cooperation_contract_undertakers,alias:cooperation_contract_undertaker"`
10 // 共创合约承接人id 10 // 共创合约承接人id
11 - CooperationContractUndertakerId int64 `comment:"共创合约承接人id" pg:",pk:cooperation_contract_undertaker_id"` 11 + CooperationContractUndertakerId int64 `comment:"共创合约承接人id" pg:",pk"`
12 // 共创合约编号 12 // 共创合约编号
13 CooperationContractNumber string `comment:"共创合约编号"` 13 CooperationContractNumber string `comment:"共创合约编号"`
14 // 共创合约承接人uid 14 // 共创合约承接人uid
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type CooperationMode struct { 8 type CooperationMode struct {
9 tableName string `comment:"共创模式实体" pg:"cooperation_modes,alias:cooperation_mode"` 9 tableName string `comment:"共创模式实体" pg:"cooperation_modes,alias:cooperation_mode"`
10 // 共创模式ID 10 // 共创模式ID
11 - CooperationModeId int64 `comment:"共创模式ID" pg:",pk:cooperation_mode_id"` 11 + CooperationModeId int64 `comment:"共创模式ID" pg:",pk"`
12 // 共创模式编码,唯一确定 12 // 共创模式编码,唯一确定
13 CooperationModeNumber string `comment:"共创模式编码,唯一确定"` 13 CooperationModeNumber string `comment:"共创模式编码,唯一确定"`
14 // 模式名称,唯一确定 14 // 模式名称,唯一确定
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type CooperationProject struct { 8 type CooperationProject struct {
9 tableName string `comment:"共创项目实体" pg:"cooperation_projects,alias:cooperation_project"` 9 tableName string `comment:"共创项目实体" pg:"cooperation_projects,alias:cooperation_project"`
10 // 共创项目ID 10 // 共创项目ID
11 - CooperationProjectId int64 `comment:"共创项目ID" pg:",pk:cooperation_project_id"` 11 + CooperationProjectId int64 `comment:"共创项目ID" pg:",pk"`
12 // 共创项目编号 12 // 共创项目编号
13 CooperationProjectNumber string `comment:"共创项目编号"` 13 CooperationProjectNumber string `comment:"共创项目编号"`
14 // 共创项目描述 14 // 共创项目描述
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type CreditAccount struct { 8 type CreditAccount struct {
9 tableName string `comment:"账期结算单实体" pg:"credit_accounts,alias:credit_account"` 9 tableName string `comment:"账期结算单实体" pg:"credit_accounts,alias:credit_account"`
10 // 账期结算单ID 10 // 账期结算单ID
11 - CreditAccountId int64 `comment:"账期结算单ID" pg:"pk:credit_account_id"` 11 + CreditAccountId int64 `comment:"账期结算单ID" pg:",pk"`
12 // 账期结算实付金额 12 // 账期结算实付金额
13 ActuallyPaidAmount float64 `comment:"账期结算实付金额"` 13 ActuallyPaidAmount float64 `comment:"账期结算实付金额"`
14 // 账期结算单号 14 // 账期结算单号
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type DividendsEstimate struct { 8 type DividendsEstimate struct {
9 tableName string `comment:"分红预算实体" pg:"dividends_estimates,alias:dividends_estimate"` 9 tableName string `comment:"分红预算实体" pg:"dividends_estimates,alias:dividends_estimate"`
10 // 承接人分红预算记录ID 10 // 承接人分红预算记录ID
11 - DividendsEstimateId int64 `comment:"承接人分红预算记录ID" pg:",pk:dividends_estimate_id"` 11 + DividendsEstimateId int64 `comment:"承接人分红预算记录ID" pg:",pk"`
12 // 分红结算状态 12 // 分红结算状态
13 DividendsAccountStatus int32 `comment:"分红结算状态"` 13 DividendsAccountStatus int32 `comment:"分红结算状态"`
14 // 分红金额 14 // 分红金额
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type DividendsIncentivesRule struct { 8 type DividendsIncentivesRule struct {
9 tableName string `comment:"金额激励规则实体" pg:"dividends_incentives_rules,alias:dividends_incentives_rule"` 9 tableName string `comment:"金额激励规则实体" pg:"dividends_incentives_rules,alias:dividends_incentives_rule"`
10 // 分红规则ID 10 // 分红规则ID
11 - DividendsIncentivesRuleId int64 `comment:"分红规则ID" pg:",pk:dividends_incentives_rule_id"` 11 + DividendsIncentivesRuleId int64 `comment:"分红规则ID" pg:",pk"`
12 // 关联的项目合约编号 12 // 关联的项目合约编号
13 CooperationContractNumber string `comment:"关联的项目合约编号"` 13 CooperationContractNumber string `comment:"关联的项目合约编号"`
14 // 推荐人抽成比例 14 // 推荐人抽成比例
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type DividendsOrder struct { 8 type DividendsOrder struct {
9 tableName string `comment:"分红订单实体" pg:"dividends_orders,alias:dividends_order"` 9 tableName string `comment:"分红订单实体" pg:"dividends_orders,alias:dividends_order"`
10 // 分红订单ID 10 // 分红订单ID
11 - DividendsOrderId int64 `comment:"分红订单ID" pg:"pk:dividends_order_id"` 11 + DividendsOrderId int64 `comment:"分红订单ID" pg:",pk"`
12 // 分红订单号 12 // 分红订单号
13 DividendsOrderNumber string `comment:"分红订单号"` 13 DividendsOrderNumber string `comment:"分红订单号"`
14 // 分红订单原单号 14 // 分红订单原单号
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type DividendsReturnedOrder struct { 8 type DividendsReturnedOrder struct {
9 tableName string `comment:"分红退货单实体" pg:"dividends_returned_orders,alias:dividends_returned_order"` 9 tableName string `comment:"分红退货单实体" pg:"dividends_returned_orders,alias:dividends_returned_order"`
10 // 分红退货单记录ID 10 // 分红退货单记录ID
11 - DividendsReturnedOrderId int64 `comment:"分红退货单记录ID" pg:"pk:dividends_returned_order_id"` 11 + DividendsReturnedOrderId int64 `comment:"分红退货单记录ID" pg:",pk"`
12 // 分红退货单号 12 // 分红退货单号
13 DividendsReturnedOrderNumber string `comment:"分红退货单号"` 13 DividendsReturnedOrderNumber string `comment:"分红退货单号"`
14 // 退货金额 14 // 退货金额
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 type MoneyIncentivesRule struct { 8 type MoneyIncentivesRule struct {
9 tableName string `comment:"金额激励规则实体" pg:"money_incentives_rules,alias:money_incentives_rule"` 9 tableName string `comment:"金额激励规则实体" pg:"money_incentives_rules,alias:money_incentives_rule"`
10 // 金额激励规则ID 10 // 金额激励规则ID
11 - MoneyIncentivesRuleId int64 `comment:"金额激励规则ID" pg:",pk:money_incentives_rule_id"` 11 + MoneyIncentivesRuleId int64 `comment:"金额激励规则ID" pg:",pk"`
12 // 关联的共创合约编号 12 // 关联的共创合约编号
13 CooperationContractNumber string `comment:"关联的共创合约编号"` 13 CooperationContractNumber string `comment:"关联的共创合约编号"`
14 // 激励金额 14 // 激励金额
@@ -5,7 +5,7 @@ import "time" @@ -5,7 +5,7 @@ import "time"
5 type OrderGood struct { 5 type OrderGood struct {
6 tableName string `comment:"订单产品领域实体(包括分红订单、分红退货单)" pg:"order_goods,alias:order_good"` 6 tableName string `comment:"订单产品领域实体(包括分红订单、分红退货单)" pg:"order_goods,alias:order_good"`
7 // 订单产品 7 // 订单产品
8 - OrderGoodId int64 `comment:"订单产品" pg:"pk:order_good_id"` 8 + OrderGoodId int64 `comment:"订单产品" pg:",pk"`
9 // 订单产品金额 9 // 订单产品金额
10 OrderGoodAmount float64 `comment:"订单产品金额"` 10 OrderGoodAmount float64 `comment:"订单产品金额"`
11 // 订单产品名称 11 // 订单产品名称
@@ -13,20 +13,6 @@ func TransformToContractUndertakerFeedbackDomainModelFromPgModels( @@ -13,20 +13,6 @@ func TransformToContractUndertakerFeedbackDomainModelFromPgModels(
13 FeedbackContent: contractUndertakerFeedbackModel.FeedbackContent, 13 FeedbackContent: contractUndertakerFeedbackModel.FeedbackContent,
14 CooperationContractNumber: contractUndertakerFeedbackModel.CooperationContractNumber, 14 CooperationContractNumber: contractUndertakerFeedbackModel.CooperationContractNumber,
15 ContractUndertaker: contractUndertakerFeedbackModel.ContractUndertaker, 15 ContractUndertaker: contractUndertakerFeedbackModel.ContractUndertaker,
16 - //CooperationMode: &domain.CooperationMode{  
17 - // CooperationModeId: cooperationMode.CooperationModeId,  
18 - // CooperationModeNumber: cooperationMode.CooperationModeNumber,  
19 - // CooperationModeName: cooperationMode.CooperationModeName,  
20 - // Status: cooperationMode.Status,  
21 - // Org: cooperationMode.Org,  
22 - // Company: cooperationMode.Company,  
23 - // Remarks: cooperationMode.Remarks,  
24 - // Operator: cooperationMode.Operator,  
25 - // OperateTime: cooperationMode.OperateTime,  
26 - // UpdatedAt: cooperationMode.UpdatedAt,  
27 - // DeletedAt: cooperationMode.DeletedAt,  
28 - // CreatedAt: cooperationMode.CreatedAt,  
29 - //},  
30 Org: contractUndertakerFeedbackModel.Org, 16 Org: contractUndertakerFeedbackModel.Org,
31 Company: contractUndertakerFeedbackModel.Company, 17 Company: contractUndertakerFeedbackModel.Company,
32 UpdatedAt: contractUndertakerFeedbackModel.UpdatedAt, 18 UpdatedAt: contractUndertakerFeedbackModel.UpdatedAt,
@@ -71,11 +71,6 @@ func (controller *ContractUndertakerFeedbackController) SearchContractUndertaker @@ -71,11 +71,6 @@ func (controller *ContractUndertakerFeedbackController) SearchContractUndertaker
71 contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil) 71 contractUndertakerFeedbackService := service.NewContractUndertakerFeedbackService(nil)
72 searchContractUndertakerFeedbackQuery := &query.SearchContractUndertakerFeedbackQuery{} 72 searchContractUndertakerFeedbackQuery := &query.SearchContractUndertakerFeedbackQuery{}
73 _ = controller.Unmarshal(searchContractUndertakerFeedbackQuery) 73 _ = controller.Unmarshal(searchContractUndertakerFeedbackQuery)
74 - header := controller.GetRequestHeader(controller.Ctx)  
75 - searchContractUndertakerFeedbackQuery.CompanyId = header.CompanyId  
76 - searchContractUndertakerFeedbackQuery.OrgId = header.OrgId  
77 - searchContractUndertakerFeedbackQuery.UserId = header.UserId  
78 - searchContractUndertakerFeedbackQuery.UserBaseId = header.UserBaseId  
79 data, err := contractUndertakerFeedbackService.SearchContractUndertakerFeedback(searchContractUndertakerFeedbackQuery) 74 data, err := contractUndertakerFeedbackService.SearchContractUndertakerFeedback(searchContractUndertakerFeedbackQuery)
80 controller.Response(data, err) 75 controller.Response(data, err)
81 } 76 }
@@ -137,15 +137,6 @@ func (controller *CooperationApplicationController) RemoveCooperationApplication @@ -137,15 +137,6 @@ func (controller *CooperationApplicationController) RemoveCooperationApplication
137 func (controller *CooperationApplicationController) SearchCooperationApplication() { 137 func (controller *CooperationApplicationController) SearchCooperationApplication() {
138 cooperationApplicationService := service.NewCooperationApplicationService(nil) 138 cooperationApplicationService := service.NewCooperationApplicationService(nil)
139 searchCooperationApplicationQuery := &query.SearchCooperationApplicationQuery{} 139 searchCooperationApplicationQuery := &query.SearchCooperationApplicationQuery{}
140 - header := controller.GetRequestHeader(controller.Ctx)  
141 - searchCooperationApplicationQuery.CompanyId = header.CompanyId  
142 - searchCooperationApplicationQuery.OrgId = header.OrgId  
143 - searchCooperationApplicationQuery.UserId = header.UserId  
144 - searchCooperationApplicationQuery.UserBaseId = header.UserBaseId  
145 - pageSize, _ := controller.GetInt64("pageSize")  
146 - searchCooperationApplicationQuery.PageSize = pageSize  
147 - pageNumber, _ := controller.GetInt64("pageNumber")  
148 - searchCooperationApplicationQuery.PageNumber = pageNumber  
149 data, err := cooperationApplicationService.SearchCooperationApplication(searchCooperationApplicationQuery) 140 data, err := cooperationApplicationService.SearchCooperationApplication(searchCooperationApplicationQuery)
150 controller.Response(data, err) 141 controller.Response(data, err)
151 } 142 }
@@ -87,11 +87,6 @@ func (controller *CooperationContractChangeLogController) SearchCooperationContr @@ -87,11 +87,6 @@ func (controller *CooperationContractChangeLogController) SearchCooperationContr
87 cooperationContractChangeLogService := service.NewCooperationContractChangeLogService(nil) 87 cooperationContractChangeLogService := service.NewCooperationContractChangeLogService(nil)
88 searchCooperationContractChangeLogQuery := &query.SearchCooperationContractChangeLogQuery{} 88 searchCooperationContractChangeLogQuery := &query.SearchCooperationContractChangeLogQuery{}
89 _ = controller.Unmarshal(searchCooperationContractChangeLogQuery) 89 _ = controller.Unmarshal(searchCooperationContractChangeLogQuery)
90 - header := controller.GetRequestHeader(controller.Ctx)  
91 - searchCooperationContractChangeLogQuery.CompanyId = header.CompanyId  
92 - searchCooperationContractChangeLogQuery.OrgId = header.OrgId  
93 - searchCooperationContractChangeLogQuery.UserId = header.UserId  
94 - searchCooperationContractChangeLogQuery.UserBaseId = header.UserBaseId  
95 data, err := cooperationContractChangeLogService.SearchCooperationContractChangeLog(searchCooperationContractChangeLogQuery) 90 data, err := cooperationContractChangeLogService.SearchCooperationContractChangeLog(searchCooperationContractChangeLogQuery)
96 controller.Response(data, err) 91 controller.Response(data, err)
97 } 92 }
@@ -122,15 +122,6 @@ func (controller *CooperationContractController) SearchCooperationContract() { @@ -122,15 +122,6 @@ func (controller *CooperationContractController) SearchCooperationContract() {
122 func (controller *CooperationContractController) SearchCooperationContractByUndertaker() { 122 func (controller *CooperationContractController) SearchCooperationContractByUndertaker() {
123 cooperationContractService := service.NewCooperationContractService(nil) 123 cooperationContractService := service.NewCooperationContractService(nil)
124 searchCooperationContractByUndertakerQuery := &query.SearchCooperationContractByUndertakerQuery{} 124 searchCooperationContractByUndertakerQuery := &query.SearchCooperationContractByUndertakerQuery{}
125 - header := controller.GetRequestHeader(controller.Ctx)  
126 - searchCooperationContractByUndertakerQuery.CompanyId = header.CompanyId  
127 - searchCooperationContractByUndertakerQuery.OrgId = header.OrgId  
128 - searchCooperationContractByUndertakerQuery.UserId = header.UserId  
129 - searchCooperationContractByUndertakerQuery.UserBaseId = header.UserBaseId  
130 - pageSize, _ := controller.GetInt64("pageSize")  
131 - searchCooperationContractByUndertakerQuery.PageSize = pageSize  
132 - pageNumber, _ := controller.GetInt64("pageNumber")  
133 - searchCooperationContractByUndertakerQuery.PageNumber = pageNumber  
134 data, err := cooperationContractService.SearchCooperationContractByUndertaker(searchCooperationContractByUndertakerQuery) 125 data, err := cooperationContractService.SearchCooperationContractByUndertaker(searchCooperationContractByUndertakerQuery)
135 controller.Response(data, err) 126 controller.Response(data, err)
136 } 127 }
@@ -84,11 +84,6 @@ func (controller *CooperationModeController) SearchCooperationMode() { @@ -84,11 +84,6 @@ func (controller *CooperationModeController) SearchCooperationMode() {
84 cooperationModeService := service.NewCooperationModeService(nil) 84 cooperationModeService := service.NewCooperationModeService(nil)
85 searchCooperationModeQuery := &query.SearchCooperationModeQuery{} 85 searchCooperationModeQuery := &query.SearchCooperationModeQuery{}
86 _ = controller.Unmarshal(searchCooperationModeQuery) 86 _ = controller.Unmarshal(searchCooperationModeQuery)
87 - header := controller.GetRequestHeader(controller.Ctx)  
88 - searchCooperationModeQuery.CompanyId = header.CompanyId  
89 - searchCooperationModeQuery.OrgId = header.OrgId  
90 - searchCooperationModeQuery.UserId = header.UserId  
91 - searchCooperationModeQuery.UserBaseId = header.UserBaseId  
92 data, err := cooperationModeService.SearchCooperationMode(searchCooperationModeQuery) 87 data, err := cooperationModeService.SearchCooperationMode(searchCooperationModeQuery)
93 controller.Response(data, err) 88 controller.Response(data, err)
94 } 89 }
@@ -84,11 +84,6 @@ func (controller *CooperationProjectController) SearchCooperationProject() { @@ -84,11 +84,6 @@ func (controller *CooperationProjectController) SearchCooperationProject() {
84 cooperationProjectService := service.NewCooperationProjectService(nil) 84 cooperationProjectService := service.NewCooperationProjectService(nil)
85 searchCooperationProjectQuery := &query.SearchCooperationProjectQuery{} 85 searchCooperationProjectQuery := &query.SearchCooperationProjectQuery{}
86 _ = controller.Unmarshal(searchCooperationProjectQuery) 86 _ = controller.Unmarshal(searchCooperationProjectQuery)
87 - header := controller.GetRequestHeader(controller.Ctx)  
88 - searchCooperationProjectQuery.CompanyId = header.CompanyId  
89 - searchCooperationProjectQuery.OrgId = header.OrgId  
90 - searchCooperationProjectQuery.UserId = header.UserId  
91 - searchCooperationProjectQuery.UserBaseId = header.UserBaseId  
92 data, err := cooperationProjectService.SearchCooperationProject(searchCooperationProjectQuery) 87 data, err := cooperationProjectService.SearchCooperationProject(searchCooperationProjectQuery)
93 controller.Response(data, err) 88 controller.Response(data, err)
94 } 89 }
@@ -70,11 +70,6 @@ func (controller *CreditAccountController) RemoveCreditAccount() { @@ -70,11 +70,6 @@ func (controller *CreditAccountController) RemoveCreditAccount() {
70 func (controller *CreditAccountController) SearchCreditAccount() { 70 func (controller *CreditAccountController) SearchCreditAccount() {
71 creditAccountService := service.NewCreditAccountService(nil) 71 creditAccountService := service.NewCreditAccountService(nil)
72 searchCreditAccountQuery := &query.SearchCreditAccountQuery{} 72 searchCreditAccountQuery := &query.SearchCreditAccountQuery{}
73 - header := controller.GetRequestHeader(controller.Ctx)  
74 - searchCreditAccountQuery.CompanyId = header.CompanyId  
75 - searchCreditAccountQuery.OrgId = header.OrgId  
76 - searchCreditAccountQuery.UserId = header.UserId  
77 - searchCreditAccountQuery.UserBaseId = header.UserBaseId  
78 data, err := creditAccountService.SearchCreditAccount(searchCreditAccountQuery) 73 data, err := creditAccountService.SearchCreditAccount(searchCreditAccountQuery)
79 controller.Response(data, err) 74 controller.Response(data, err)
80 } 75 }
@@ -106,15 +106,6 @@ func (controller *DividendsEstimateController) SearchDividendsEstimate() { @@ -106,15 +106,6 @@ func (controller *DividendsEstimateController) SearchDividendsEstimate() {
106 dividendsEstimateService := service.NewDividendsEstimateService(nil) 106 dividendsEstimateService := service.NewDividendsEstimateService(nil)
107 searchDividendsEstimateQuery := &query.SearchDividendsEstimateQuery{} 107 searchDividendsEstimateQuery := &query.SearchDividendsEstimateQuery{}
108 _ = controller.Unmarshal(searchDividendsEstimateQuery) 108 _ = controller.Unmarshal(searchDividendsEstimateQuery)
109 - header := controller.GetRequestHeader(controller.Ctx)  
110 - searchDividendsEstimateQuery.CompanyId = header.CompanyId  
111 - searchDividendsEstimateQuery.OrgId = header.OrgId  
112 - searchDividendsEstimateQuery.UserId = header.UserId  
113 - searchDividendsEstimateQuery.UserBaseId = header.UserBaseId  
114 - pageSize, _ := controller.GetInt64("pageSize")  
115 - searchDividendsEstimateQuery.PageSize = pageSize  
116 - pageNumber, _ := controller.GetInt64("pageNumber")  
117 - searchDividendsEstimateQuery.PageNumber = pageNumber  
118 data, err := dividendsEstimateService.SearchDividendsEstimate(searchDividendsEstimateQuery) 109 data, err := dividendsEstimateService.SearchDividendsEstimate(searchDividendsEstimateQuery)
119 controller.Response(data, err) 110 controller.Response(data, err)
120 } 111 }
@@ -84,11 +84,6 @@ func (controller *DividendsOrderController) SearchDividendsOrder() { @@ -84,11 +84,6 @@ func (controller *DividendsOrderController) SearchDividendsOrder() {
84 dividendsOrderService := service.NewDividendsOrderService(nil) 84 dividendsOrderService := service.NewDividendsOrderService(nil)
85 searchDividendsOrderQuery := &query.SearchDividendsOrderQuery{} 85 searchDividendsOrderQuery := &query.SearchDividendsOrderQuery{}
86 _ = controller.Unmarshal(searchDividendsOrderQuery) 86 _ = controller.Unmarshal(searchDividendsOrderQuery)
87 - header := controller.GetRequestHeader(controller.Ctx)  
88 - searchDividendsOrderQuery.CompanyId = header.CompanyId  
89 - searchDividendsOrderQuery.OrgId = header.OrgId  
90 - searchDividendsOrderQuery.UserId = header.UserId  
91 - searchDividendsOrderQuery.UserBaseId = header.UserBaseId  
92 data, err := dividendsOrderService.SearchDividendsOrder(searchDividendsOrderQuery) 87 data, err := dividendsOrderService.SearchDividendsOrder(searchDividendsOrderQuery)
93 controller.Response(data, err) 88 controller.Response(data, err)
94 } 89 }
@@ -84,11 +84,6 @@ func (controller *DividendsReturnedOrderController) SearchDividendsReturnedOrder @@ -84,11 +84,6 @@ func (controller *DividendsReturnedOrderController) SearchDividendsReturnedOrder
84 dividendsReturnedOrderService := service.NewDividendsReturnedOrderService(nil) 84 dividendsReturnedOrderService := service.NewDividendsReturnedOrderService(nil)
85 searchDividendsReturnedOrderQuery := &query.SearchDividendsReturnedOrderQuery{} 85 searchDividendsReturnedOrderQuery := &query.SearchDividendsReturnedOrderQuery{}
86 _ = controller.Unmarshal(searchDividendsReturnedOrderQuery) 86 _ = controller.Unmarshal(searchDividendsReturnedOrderQuery)
87 - header := controller.GetRequestHeader(controller.Ctx)  
88 - searchDividendsReturnedOrderQuery.CompanyId = header.CompanyId  
89 - searchDividendsReturnedOrderQuery.OrgId = header.OrgId  
90 - searchDividendsReturnedOrderQuery.UserId = header.UserId  
91 - searchDividendsReturnedOrderQuery.UserBaseId = header.UserBaseId  
92 data, err := dividendsReturnedOrderService.SearchDividendsReturnedOrder(searchDividendsReturnedOrderQuery) 87 data, err := dividendsReturnedOrderService.SearchDividendsReturnedOrder(searchDividendsReturnedOrderQuery)
93 controller.Response(data, err) 88 controller.Response(data, err)
94 } 89 }