审查视图

pkg/infrastructure/service_gateway/allied_creation_cooperation/param_cooperation_project.go 12.4 KB
1 2
package allied_creation_cooperation
tangxuhui authored
3
import (
tangxuhui authored
4 5
	"time"
tangxuhui authored
6
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
yangfu authored
7
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/util/jtime"
tangxuhui authored
8
)
9
10 11 12 13 14 15
type ProjectAttachment struct {
	FileType string `json:"fileType"`
	Name     string `json:"name"`
	Url      string `json:"url"`
	FileSize int    `json:"fileSize"`
} //图片附件
16 17 18 19 20 21 22
type CooperationProject struct {
	Company struct {
		CompanyId   int    `json:"companyId,string,"`
		CompanyLogo string `json:"companyLogo"`
		CompanyName string `json:"companyName"`
	} `json:"company"` //项目归属企业
	Org struct {
yangfu authored
23
		OrgId   int    `json:"orgId,string"`
24 25 26
		OrgName string `json:"orgName"`
	} `json:"org"` //项目创建时的组织
	CooperationMode struct {
27
		CooperationModeId     int    `json:"cooperationModeId,string"`
28 29 30
		CooperationModeName   string `json:"cooperationModeName"`
		CooperationModeNumber string `json:"cooperationModeNumber"`
	} `json:"cooperationMode"` //项目模式
31
	CooperationProjectDescription string              `json:"cooperationProjectDescription"`
tangxuhui authored
32
	Attachment                    []domain.Attachment `json:"attachment"`
33 34 35 36 37
	CooperationProjectId          int                 `json:"cooperationProjectId,string,"`
	CooperationProjectName        string              `json:"cooperationProjectName"`
	CooperationProjectNumber      string              `json:"cooperationProjectNumber"`
	CooperationProjectPublishTime time.Time           `json:"cooperationProjectPublishTime"`
	CreatedAt                     time.Time           `json:"createdAt"`
38
	CooperationProjectPublisher   struct {
yangfu authored
39
		UsersId  int `json:"userId,string"`
40
		UserInfo struct {
tangxuhui authored
41 42 43 44
			UsersName   string `json:"userName"`
			UsersCode   string `json:"userCode"`
			UserPhone   string `json:"userPhone"`
			UserAccount string `json:"userAccount"`
45 46 47
		} `json:"userInfo"`
	} `json:"cooperationProjectPublisher"` //项目发布人,即操作人
	CooperationProjectSponsor struct {
yangfu authored
48
		UsersId  int `json:"userId,string"`
49
		UserInfo struct {
tangxuhui authored
50 51 52 53
			UsersName   string `json:"userName"`
			UsersCode   string `json:"userCode"`
			UserPhone   string `json:"userPhone"`
			UserAccount string `json:"userAccount"`
54 55
		} `json:"userInfo"`
	} `json:"cooperationProjectSponsor"` //项目发起人
yangfu authored
56
	CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerTypes"` //共创合约承接对象,1员工,2共创用户,3公开
57 58 59 60 61
	Department                       struct {
		DepartmentNumber string `json:"departmentNumber"`
		DepartmentId     int    `json:"departmentId,string,"`
		DepartmentName   string `json:"departmentName"`
	} `json:"department"` //项目发起部门
tangxuhui authored
62
	Status int `json:"status"` // 共创项目状态,1招标中,2结束
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
	// 可以去除勾选的共创项目承接对象列表
	UndertakerTypesUncheckedAvailable []int `json:"undertakerTypesUncheckedAvailable"`
	//	 承接人
	Applicants []struct {
		UserId     int64 `json:"userId,string"`
		UserBaseId int64 `json:"userBaseId,string"` // 用户基本id
		Org        struct {
			OrgId   int64  `json:"orgId,string"` // 组织机构ID
			OrgName string `json:"orgName"`      // 组织名称
		} `json:"org"` // 用户所属组织机构
		Department struct {
			DepartmentId     int64  `json:"departmentId,string"` // 部门ID,
			DepartmentName   string `json:"departmentName"`      // 部门名称
			DepartmentNumber string `json:"departmentNumber"`    // 部门编码
		} `json:"department"` // 用户所属的部门
		UserInfo struct {
			UserAvatar  string `json:"userAvatar"`  // 用户头像
			UserEmail   string `json:"userEmail"`   // 用户邮箱
			UserName    string `json:"userName"`    // 共创人员姓名
			UserPhone   string `json:"userPhone"`   // 用户手机号
			UserAccount string `json:"userAccount"` // 用户账号,
			UserCode    string `json:"userCode"`    //	用户编码
		} `json:"userInfo,omitempty"`
	} `json:"applicants"`
87 88
}
89 90 91
//创建共创项目
type (
	ReqCooperationProjectAdd struct {
tangxuhui authored
92 93 94 95 96 97 98 99
		CooperationProjectDescription     string               `json:"cooperationProjectDescription"`
		CooperationProjectName            string               `json:"cooperationProjectName"`
		CooperationModeNumber             string               `json:"cooperationModeNumber"`
		PublisherUid                      int                  `json:"publisherUid,string"`
		SponsorUid                        int                  `json:"sponsorUid,string"`
		DepartmentId                      int                  `json:"departmentId"`
		CooperationProjectUndertakerTypes []int                `json:"cooperationProjectUndertakerTypes"`
		Attachment                        []*domain.Attachment `json:"attachment"`
100 101 102
	}

	DataCooperationProjectAdd struct {
103
		CooperationProject
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
	}
)

//返回共创项目列表
type (
	ReqCooperationProjectList struct {
	}

	DataCooperationProjectList struct {
	}
)

//返回共创项目详情
type (
	ReqCooperationProjectGet struct {
tangxuhui authored
119 120
		CooperationProjectId     int
		CooperationProjectNumber string
121 122
		OrgId                    int
		CompanyId                int
123 124 125
	}

	DataCooperationProjectGet struct {
yangfu authored
126
		CooperationProject
127 128 129 130 131 132
	}
)

//更新共创项目
type (
	ReqCooperationProjectUpdate struct {
133 134 135 136
		// 共创项目ID
		CooperationProjectId string `json:"cooperationProjectId" `
		// 共创项目名称
		CooperationProjectName string `json:"cooperationProjectName"`
137
		CooperationModeNumber  string `json:"cooperationModeNumber"`
138
		// 承接对象,1员工,2共创用户,3公开,可以多选
tangxuhui authored
139
		CooperationProjectUndertakerTypes []int32 `json:"cooperationProjectUndertakerTypes"`
140 141 142 143 144
		// 共创项目发起人uid
		SponsorUid string `json:"sponsorUid"`
		// 共创项目发布人uid
		PublisherUid string `json:"publisherUid"`
		// 共创项目描述
145
		CooperationProjectDescription string              `json:"cooperationProjectDescription"`
tangxuhui authored
146
		Attachment                    []domain.Attachment `json:"attachment"`
tangxuhui authored
147
		DepartmentId                  int                 `json:"departmentId"`
148 149 150
	}

	DataCooperationProjectUpdate struct {
151
		CooperationProject
152 153 154 155 156 157
	}
)

//移除共创项目
type (
	ReqCooperationProjectRemove struct {
tangxuhui authored
158
		CooperationProjectID int `json:"cooperationProjectId"`
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
	}

	DataCooperationProjectRemove struct {
	}
)

//发布共创项目
type (
	ReqCooperationProjectsRelease struct {
	}

	DataCooperationProjectsRelease struct {
	}
)

//查询共创项目
type (
yangfu authored
176 177 178 179 180 181 182 183 184 185 186 187 188 189
	SearchCooperationProjectExtQuery struct {
		// 公司ID,通过集成REST上下文获取
		ExtCompanyId int64 `cname:"公司ID" json:"extCompanyId,omitempty"`
		// 组织机构ID
		ExtOrgId int64 `cname:"组织机构ID" json:"extOrgId,omitempty"`
		// 关联的组织机构ID列表
		ExtOrgIds []int64 `cname:"关联的组织机构ID列表" json:"extOrgIds,omitempty"`
		// 用户ID,通过集成REST上下文获取,可翻译成发起人、承接人、推荐人、业务员
		ExtUserId int64 `cname:"用户ID" json:"extUserId,omitempty"`
		// 用户基础数据id
		ExtUserBaseId int64 `cname:"用户基础数据ID" json:"extUserBaseId,omitempty"`
		// 共创项目承接对象,1员工,2共创用户,3公开,可多选
		ExtCooperationProjectUndertakerTypes []int32 `json:"extCooperationProjectUndertakerTypes"`
	}
190
	ReqCooperationProjectSearch struct {
191 192 193 194 195 196
		PageNumber int `json:"pageNumber"`
		PageSize   int `json:"pageSize"`
		//发起部门名称
		DepartmentName string `json:"departmentName"`
		//项目名称
		CooperationProjectName string `json:"cooperationProjectName"`
197 198
		// 共创项目状态,1招标中,2结束 0 全部
		Status int `json:"status"`
tangxuhui authored
199 200
		// 关键字搜索
		Keyword string `cname:"关键字" json:"keyword"`
yangfu authored
201
		// 组织机构ID
202 203 204 205
		OrgId                    int64   `cname:"组织机构ID" json:"orgId"`
		OrgIds                   []int64 `json:"orgIds"`
		CompanyId                int64   `json:"companyId"`
		CooperationProjectNumber string  `json:"cooperationProjectNumber"`
yangfu authored
206
		//OffsetLimitFlag bool `json:"offsetLimitFlag"`
yangfu authored
207 208
		// 用户基础数据id
		UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"`
yangfu authored
209 210
		// 共创项目承接对象,1员工,2共创用户,4公开,可以多选
		CooperationProjectUndertakerType int32 `json:"cooperationProjectUndertakerType"`
211 212
		// 额外的查询条件 0:不需要额外查询 1:额外查询
		SearchCooperationProjectExtQueriesFlag int `cname:"额外的查询条件标识" json:"searchCooperationProjectExtQueriesFlag"`
yangfu authored
213 214
		// 额外的查询条件
		SearchCooperationProjectExtQueries []*SearchCooperationProjectExtQuery `cname:"额外的查询条件" json:"searchCooperationProjectExtQueries"`
yangfu authored
215 216
		// 按共创项目状态排序
		SortByStatus int32 `cname:"按共创项目状态排序" json:"sortByStatus,omitempty"`
yangfu authored
217 218
		// 是否跳过获取共创模式
		IsSkipFetchProjectModel bool `cname:"是否跳过获取共创模式" json:"isSkipFetchProjectModel,omitempty"`
219
	}
tangxuhui authored
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284
	DataCooperationProjectSearchItem struct {
		CooperationProjectID          string               `json:"cooperationProjectId"`
		CooperationProjectNumber      string               `json:"cooperationProjectNumber"`
		CooperationProjectDescription string               `json:"cooperationProjectDescription"`
		CooperationProjectName        string               `json:"cooperationProjectName"`
		CooperationProjectPublishTime jtime.TimeToUnixMsec `json:"cooperationProjectPublishTime"`
		CooperationProjectPublisher   struct {
			UserID     string      `json:"userId"`
			UserBaseID string      `json:"userBaseId"`
			Department interface{} `json:"department"`
			UserInfo   struct {
				UserAvatar  string `json:"userAvatar"`
				UserEmail   string `json:"userEmail"`
				UserName    string `json:"userName"`
				UserPhone   string `json:"userPhone"`
				UserAccount string `json:"userAccount"`
			} `json:"userInfo"`
		} `json:"cooperationProjectPublisher"`
		CooperationProjectSponsor struct {
			UserID     string      `json:"userId"`
			UserBaseID string      `json:"userBaseId"`
			Department interface{} `json:"department"`
			UserInfo   struct {
				UserAvatar  string `json:"userAvatar"`
				UserEmail   string `json:"userEmail"`
				UserName    string `json:"userName"`
				UserPhone   string `json:"userPhone"`
				UserAccount string `json:"userAccount"`
			} `json:"userInfo"`
		} `json:"cooperationProjectSponsor"`
		CooperationMode struct {
			CooperationModeId     int    `json:"cooperationModeId,string"`
			CooperationModeName   string `json:"cooperationModeName"`
			CooperationModeNumber string `json:"cooperationModeNumber"`
		} `json:"cooperationMode"` //项目模式
		Department struct {
			DepartmentID     string `json:"departmentId"`
			DepartmentName   string `json:"departmentName"`
			DepartmentNumber string `json:"departmentNumber"`
		} `json:"department"`
		CooperationProjectUndertakerTypes []int `json:"cooperationProjectUndertakerTypes"`
		CooperationProjectUndertakerType  []int `json:"cooperationProjectUndertakerType"`
		Org                               struct {
			OrgID   string `json:"orgId"`
			OrgName string `json:"orgName"`
		} `json:"org"`
		Attachment interface{} `json:"attachment"`
		Company    struct {
			CompanyID   string `json:"companyId"`
			CompanyLogo string `json:"companyLogo"`
			CompanyName string `json:"companyName"`
		} `json:"company"`
		Operator struct {
			UserID     string      `json:"userId"`
			UserBaseID string      `json:"userBaseId"`
			Department interface{} `json:"department"`
			UserInfo   struct {
				UserAvatar  string `json:"userAvatar"`
				UserEmail   string `json:"userEmail"`
				UserName    string `json:"userName"`
				UserPhone   string `json:"userPhone"`
				UserAccount string `json:"userAccount"`
			} `json:"userInfo"`
		} `json:"operator"`
		//OperateTime time.Time `json:"operateTime"`
tangxuhui authored
285 286
		Status         int `json:"status"`
		ApplicantCount int `json:"applicantCount"` //	共创申请人计数
287 288
		//	合约计数
		ContractCount int32 `json:"contractCount"`
tangxuhui authored
289
	}
290
	DataCooperationProjectSearch struct {
tangxuhui authored
291 292
		List  []DataCooperationProjectSearchItem `json:"list"`
		Total int                                `json:"total"`
293 294 295 296 297 298
	}
)

//判断当前勾选的承接对象是否存在用户
type (
	ReqCooperationProjectsCheck struct {
tangxuhui authored
299 300
		CooperationProjectId              int   `json:"cooperationProjectId"`
		CooperationProjectUndertakerTypes []int `json:"cooperationProjectUndertakerTypes"`
301 302 303 304 305
	}

	DataCooperationProjectsCheck struct {
	}
)
306 307 308 309

// 批量结束项目
type (
	ReqCooperationProjectBatchEnd struct {
tangxuhui authored
310
		CooperationProjectIds []string `json:"cooperationProjectIds"`
311 312 313 314 315
	}

	DataCooperationProjectBatchEnd struct {
	}
)
yangfu authored
316 317 318 319 320 321 322 323 324 325

// 结束项目
type (
	ReqCooperationProjectEnd struct {
		CooperationProjectId string `json:"cooperationProjectId"`
	}

	DataCooperationProjectEnd struct {
	}
)