正在显示
9 个修改的文件
包含
89 行增加
和
94 行删除
| @@ -83,6 +83,9 @@ func (cooperationApplicationService *CooperationApplicationService) ListCooperat | @@ -83,6 +83,9 @@ func (cooperationApplicationService *CooperationApplicationService) ListCooperat | ||
| 83 | // item := dto.ToCooperationApplicationItem(&result.Grid.List[i]) | 83 | // item := dto.ToCooperationApplicationItem(&result.Grid.List[i]) |
| 84 | // dataList = append(dataList, *item) | 84 | // dataList = append(dataList, *item) |
| 85 | //} | 85 | //} |
| 86 | + if len(result.Grid.List) == 0 { | ||
| 87 | + result.Grid.List = []allied_creation_cooperation.CooperationApplication{} | ||
| 88 | + } | ||
| 86 | return int64(result.Grid.Total), result.Grid.List, nil | 89 | return int64(result.Grid.Total), result.Grid.List, nil |
| 87 | } | 90 | } |
| 88 | 91 |
| @@ -45,6 +45,7 @@ func ToCooperationContractItem(param *allied_creation_cooperation.CooperationCon | @@ -45,6 +45,7 @@ func ToCooperationContractItem(param *allied_creation_cooperation.CooperationCon | ||
| 45 | data.CooperationContractSponsor.UserName = param.CooperationContractSponsor.UserInfo.UserName | 45 | data.CooperationContractSponsor.UserName = param.CooperationContractSponsor.UserInfo.UserName |
| 46 | data.Department.DepartmentId = param.Department.DepartmentId | 46 | data.Department.DepartmentId = param.Department.DepartmentId |
| 47 | data.Department.DepartmentName = param.Department.DepartmentName | 47 | data.Department.DepartmentName = param.Department.DepartmentName |
| 48 | + data.Department.DepartmentNumber = param.Department.DepartmentNumber | ||
| 48 | data.Org.OrgID = int(param.Org.OrgId) | 49 | data.Org.OrgID = int(param.Org.OrgId) |
| 49 | data.Org.OrgName = param.Org.OrgName | 50 | data.Org.OrgName = param.Org.OrgName |
| 50 | data.CooperationMode.CooperationModeId = param.CooperationMode.CooperationModeId | 51 | data.CooperationMode.CooperationModeId = param.CooperationMode.CooperationModeId |
| @@ -128,6 +128,9 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje | @@ -128,6 +128,9 @@ func (cooperationProjectService *CooperationProjectService) ListCooperationProje | ||
| 128 | // item := dto.ToCooperationProjectInfo(&result.List[i]) | 128 | // item := dto.ToCooperationProjectInfo(&result.List[i]) |
| 129 | // dataList = append(dataList, *item) | 129 | // dataList = append(dataList, *item) |
| 130 | //} | 130 | //} |
| 131 | + if len(result.List) == 0 { | ||
| 132 | + result.List = []allied_creation_cooperation.DataCooperationProjectSearchItem{} | ||
| 133 | + } | ||
| 131 | return int64(result.Total), result.List, nil | 134 | return int64(result.Total), result.List, nil |
| 132 | } | 135 | } |
| 133 | 136 |
| @@ -22,11 +22,12 @@ func (srv *CreditAccountService) ListCreditAccount(listQuery *query.ListCreditAc | @@ -22,11 +22,12 @@ func (srv *CreditAccountService) ListCreditAccount(listQuery *query.ListCreditAc | ||
| 22 | PageSize: int64(listQuery.PageSize), | 22 | PageSize: int64(listQuery.PageSize), |
| 23 | CreditAccountOrderNum: listQuery.CreditAccountOrderNum, | 23 | CreditAccountOrderNum: listQuery.CreditAccountOrderNum, |
| 24 | ParticipatorName: listQuery.Participator, | 24 | ParticipatorName: listQuery.Participator, |
| 25 | + CompanyId: listQuery.Operator.CompanyId, | ||
| 25 | }) | 26 | }) |
| 26 | if err != nil { | 27 | if err != nil { |
| 27 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 28 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| 28 | } | 29 | } |
| 29 | - var listData []dto.CreditAccountItem | 30 | + listData := []dto.CreditAccountItem{} |
| 30 | for i := range result.Grid.List { | 31 | for i := range result.Grid.List { |
| 31 | item := dto.ToCreditAccountItem(&result.Grid.List[i]) | 32 | item := dto.ToCreditAccountItem(&result.Grid.List[i]) |
| 32 | listData = append(listData, *item) | 33 | listData = append(listData, *item) |
| @@ -18,7 +18,7 @@ type DividendsEstimateDividendItem struct { | @@ -18,7 +18,7 @@ type DividendsEstimateDividendItem struct { | ||
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | func ToDividendsEstimateDividendItem(param *allied_creation_cooperation.DataDividendsEstimateSearchDividend) []DividendsEstimateDividendItem { | 20 | func ToDividendsEstimateDividendItem(param *allied_creation_cooperation.DataDividendsEstimateSearchDividend) []DividendsEstimateDividendItem { |
| 21 | - var listdata []DividendsEstimateDividendItem | 21 | + listdata := []DividendsEstimateDividendItem{} |
| 22 | for _, v := range param.List { | 22 | for _, v := range param.List { |
| 23 | item := DividendsEstimateDividendItem{ | 23 | item := DividendsEstimateDividendItem{ |
| 24 | OrderGoodId: v.OrderGoodId, | 24 | OrderGoodId: v.OrderGoodId, |
| @@ -52,7 +52,7 @@ type DividendsEstimateMoneyItem struct { | @@ -52,7 +52,7 @@ type DividendsEstimateMoneyItem struct { | ||
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | func ToDividendsEstimateMoneyItem(param *allied_creation_cooperation.DataDividendsEstimateSearchMoney) []DividendsEstimateMoneyItem { | 54 | func ToDividendsEstimateMoneyItem(param *allied_creation_cooperation.DataDividendsEstimateSearchMoney) []DividendsEstimateMoneyItem { |
| 55 | - var listdata []DividendsEstimateMoneyItem | 55 | + listdata := []DividendsEstimateMoneyItem{} |
| 56 | for _, v := range param.Grid.List { | 56 | for _, v := range param.Grid.List { |
| 57 | item := DividendsEstimateMoneyItem{ | 57 | item := DividendsEstimateMoneyItem{ |
| 58 | CooperationContractId: v.CooperationContractId, | 58 | CooperationContractId: v.CooperationContractId, |
| @@ -97,7 +97,7 @@ func (dividendsOrderService *DividendsOrderService) SearchDividendsOrder(searchD | @@ -97,7 +97,7 @@ func (dividendsOrderService *DividendsOrderService) SearchDividendsOrder(searchD | ||
| 97 | if err != nil { | 97 | if err != nil { |
| 98 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 98 | return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| 99 | } | 99 | } |
| 100 | - var dataList []dto.DividendsOrder | 100 | + dataList := []dto.DividendsOrder{} |
| 101 | for i := range result.Grid.List { | 101 | for i := range result.Grid.List { |
| 102 | item := dto.ToDividendsOrder(&result.Grid.List[i]) | 102 | item := dto.ToDividendsOrder(&result.Grid.List[i]) |
| 103 | dataList = append(dataList, *item) | 103 | dataList = append(dataList, *item) |
| @@ -95,7 +95,7 @@ func (orgsService *OrgsService) OrgList(orgListQuery *query.OrgListQuery) (inter | @@ -95,7 +95,7 @@ func (orgsService *OrgsService) OrgList(orgListQuery *query.OrgListQuery) (inter | ||
| 95 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) | 95 | return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) |
| 96 | } | 96 | } |
| 97 | var ( | 97 | var ( |
| 98 | - dataList []dto.OrgItem | 98 | + dataList = []dto.OrgItem{} |
| 99 | item dto.OrgItem | 99 | item dto.OrgItem |
| 100 | ) | 100 | ) |
| 101 | for _, v := range result.Orgs { | 101 | for _, v := range result.Orgs { |
| @@ -14,8 +14,9 @@ type CooperationContract struct { | @@ -14,8 +14,9 @@ type CooperationContract struct { | ||
| 14 | CooperationProjectNumber string `json:"cooperationProjectNumber"` | 14 | CooperationProjectNumber string `json:"cooperationProjectNumber"` |
| 15 | CooperationContractUndertakerTypes []int `json:"cooperationContractUndertakerTypes"` // 共创合约承接对象,1员工,2共创用户,3公开 | 15 | CooperationContractUndertakerTypes []int `json:"cooperationContractUndertakerTypes"` // 共创合约承接对象,1员工,2共创用户,3公开 |
| 16 | Department struct { | 16 | Department struct { |
| 17 | - DepartmentId int `json:"departmentId,string"` | ||
| 18 | - DepartmentName string `json:"departmentName"` | 17 | + DepartmentId int `json:"departmentId,string"` |
| 18 | + DepartmentName string `json:"departmentName"` | ||
| 19 | + DepartmentNumber string `json:"departmentNumber"` | ||
| 19 | } `jsopn:"department" json:"department"` //发起部门 | 20 | } `jsopn:"department" json:"department"` //发起部门 |
| 20 | CooperationContractSponsor struct { | 21 | CooperationContractSponsor struct { |
| 21 | UserId int `json:"userId,string"` //id | 22 | UserId int `json:"userId,string"` //id |
| @@ -164,94 +164,80 @@ type ( | @@ -164,94 +164,80 @@ type ( | ||
| 164 | // 用户基础数据id | 164 | // 用户基础数据id |
| 165 | UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"` | 165 | UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"` |
| 166 | } | 166 | } |
| 167 | - | 167 | + DataCooperationProjectSearchItem struct { |
| 168 | + CooperationProjectID string `json:"cooperationProjectId"` | ||
| 169 | + CooperationProjectNumber string `json:"cooperationProjectNumber"` | ||
| 170 | + CooperationProjectDescription string `json:"cooperationProjectDescription"` | ||
| 171 | + CooperationProjectName string `json:"cooperationProjectName"` | ||
| 172 | + CooperationProjectPublishTime jtime.TimeToUnixMsec `json:"cooperationProjectPublishTime"` | ||
| 173 | + CooperationProjectPublisher struct { | ||
| 174 | + UserID string `json:"userId"` | ||
| 175 | + UserBaseID string `json:"userBaseId"` | ||
| 176 | + Department interface{} `json:"department"` | ||
| 177 | + UserInfo struct { | ||
| 178 | + UserAvatar string `json:"userAvatar"` | ||
| 179 | + UserEmail string `json:"userEmail"` | ||
| 180 | + UserName string `json:"userName"` | ||
| 181 | + UserPhone string `json:"userPhone"` | ||
| 182 | + UserAccount string `json:"userAccount"` | ||
| 183 | + } `json:"userInfo"` | ||
| 184 | + //UserType int `json:"userType"` | ||
| 185 | + //UserName string `json:"userName"` | ||
| 186 | + //UserPhone string `json:"userPhone"` | ||
| 187 | + //Status int `json:"status"` | ||
| 188 | + } `json:"cooperationProjectPublisher"` | ||
| 189 | + CooperationProjectSponsor struct { | ||
| 190 | + UserID string `json:"userId"` | ||
| 191 | + UserBaseID string `json:"userBaseId"` | ||
| 192 | + Department interface{} `json:"department"` | ||
| 193 | + UserInfo struct { | ||
| 194 | + UserAvatar string `json:"userAvatar"` | ||
| 195 | + UserEmail string `json:"userEmail"` | ||
| 196 | + UserName string `json:"userName"` | ||
| 197 | + UserPhone string `json:"userPhone"` | ||
| 198 | + UserAccount string `json:"userAccount"` | ||
| 199 | + } `json:"userInfo"` | ||
| 200 | + } `json:"cooperationProjectSponsor"` | ||
| 201 | + CooperationMode struct { | ||
| 202 | + CooperationModeId int `json:"cooperationModeId,string"` | ||
| 203 | + CooperationModeName string `json:"cooperationModeName"` | ||
| 204 | + CooperationModeNumber string `json:"cooperationModeNumber"` | ||
| 205 | + } `json:"cooperationMode"` //项目模式 | ||
| 206 | + Department struct { | ||
| 207 | + DepartmentID string `json:"departmentId"` | ||
| 208 | + DepartmentName string `json:"departmentName"` | ||
| 209 | + DepartmentNumber string `json:"departmentNumber"` | ||
| 210 | + } `json:"department"` | ||
| 211 | + CooperationProjectUndertakerTypes []int `json:"cooperationProjectUndertakerTypes"` | ||
| 212 | + CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` | ||
| 213 | + Org struct { | ||
| 214 | + OrgID string `json:"orgId"` | ||
| 215 | + OrgName string `json:"orgName"` | ||
| 216 | + } `json:"org"` | ||
| 217 | + Attachment interface{} `json:"attachment"` | ||
| 218 | + Company struct { | ||
| 219 | + CompanyID string `json:"companyId"` | ||
| 220 | + CompanyLogo string `json:"companyLogo"` | ||
| 221 | + CompanyName string `json:"companyName"` | ||
| 222 | + } `json:"company"` | ||
| 223 | + Operator struct { | ||
| 224 | + UserID string `json:"userId"` | ||
| 225 | + UserBaseID string `json:"userBaseId"` | ||
| 226 | + Department interface{} `json:"department"` | ||
| 227 | + UserInfo struct { | ||
| 228 | + UserAvatar string `json:"userAvatar"` | ||
| 229 | + UserEmail string `json:"userEmail"` | ||
| 230 | + UserName string `json:"userName"` | ||
| 231 | + UserPhone string `json:"userPhone"` | ||
| 232 | + UserAccount string `json:"userAccount"` | ||
| 233 | + } `json:"userInfo"` | ||
| 234 | + } `json:"operator"` | ||
| 235 | + //OperateTime time.Time `json:"operateTime"` | ||
| 236 | + Status int `json:"status"` | ||
| 237 | + } | ||
| 168 | DataCooperationProjectSearch struct { | 238 | DataCooperationProjectSearch struct { |
| 169 | - //Total int64 `json:"total"` | ||
| 170 | - //List []CooperationProject `json:"cooperationProjects"` | ||
| 171 | - List []struct { | ||
| 172 | - CooperationProjectID string `json:"cooperationProjectId"` | ||
| 173 | - CooperationProjectNumber string `json:"cooperationProjectNumber"` | ||
| 174 | - CooperationProjectDescription string `json:"cooperationProjectDescription"` | ||
| 175 | - CooperationProjectName string `json:"cooperationProjectName"` | ||
| 176 | - CooperationProjectPublishTime jtime.TimeToUnixMsec `json:"cooperationProjectPublishTime"` | ||
| 177 | - CooperationProjectPublisher struct { | ||
| 178 | - UserID string `json:"userId"` | ||
| 179 | - UserBaseID string `json:"userBaseId"` | ||
| 180 | - Department interface{} `json:"department"` | ||
| 181 | - UserInfo struct { | ||
| 182 | - UserAvatar string `json:"userAvatar"` | ||
| 183 | - UserEmail string `json:"userEmail"` | ||
| 184 | - UserName string `json:"userName"` | ||
| 185 | - UserPhone string `json:"userPhone"` | ||
| 186 | - UserAccount string `json:"userAccount"` | ||
| 187 | - } `json:"userInfo"` | ||
| 188 | - //UserType int `json:"userType"` | ||
| 189 | - //UserName string `json:"userName"` | ||
| 190 | - //UserPhone string `json:"userPhone"` | ||
| 191 | - //Status int `json:"status"` | ||
| 192 | - } `json:"cooperationProjectPublisher"` | ||
| 193 | - CooperationProjectSponsor struct { | ||
| 194 | - UserID string `json:"userId"` | ||
| 195 | - UserBaseID string `json:"userBaseId"` | ||
| 196 | - Department interface{} `json:"department"` | ||
| 197 | - UserInfo struct { | ||
| 198 | - UserAvatar string `json:"userAvatar"` | ||
| 199 | - UserEmail string `json:"userEmail"` | ||
| 200 | - UserName string `json:"userName"` | ||
| 201 | - UserPhone string `json:"userPhone"` | ||
| 202 | - UserAccount string `json:"userAccount"` | ||
| 203 | - } `json:"userInfo"` | ||
| 204 | - //UserType int `json:"userType"` | ||
| 205 | - //UserName string `json:"userName"` | ||
| 206 | - //UserPhone string `json:"userPhone"` | ||
| 207 | - //Status int `json:"status"` | ||
| 208 | - } `json:"cooperationProjectSponsor"` | ||
| 209 | - CooperationMode struct { | ||
| 210 | - CooperationModeId int `json:"cooperationModeId,string"` | ||
| 211 | - CooperationModeName string `json:"cooperationModeName"` | ||
| 212 | - CooperationModeNumber string `json:"cooperationModeNumber"` | ||
| 213 | - } `json:"cooperationMode"` //项目模式 | ||
| 214 | - Department struct { | ||
| 215 | - DepartmentID string `json:"departmentId"` | ||
| 216 | - DepartmentName string `json:"departmentName"` | ||
| 217 | - DepartmentNumber string `json:"departmentNumber"` | ||
| 218 | - //IsOrganization bool `json:"isOrganization"` | ||
| 219 | - } `json:"department"` | ||
| 220 | - CooperationProjectUndertakerTypes []int `json:"cooperationProjectUndertakerTypes"` | ||
| 221 | - CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` | ||
| 222 | - Org struct { | ||
| 223 | - OrgID string `json:"orgId"` | ||
| 224 | - OrgName string `json:"orgName"` | ||
| 225 | - } `json:"org"` | ||
| 226 | - Attachment interface{} `json:"attachment"` | ||
| 227 | - Company struct { | ||
| 228 | - CompanyID string `json:"companyId"` | ||
| 229 | - CompanyLogo string `json:"companyLogo"` | ||
| 230 | - CompanyName string `json:"companyName"` | ||
| 231 | - } `json:"company"` | ||
| 232 | - Operator struct { | ||
| 233 | - UserID string `json:"userId"` | ||
| 234 | - UserBaseID string `json:"userBaseId"` | ||
| 235 | - Department interface{} `json:"department"` | ||
| 236 | - UserInfo struct { | ||
| 237 | - UserAvatar string `json:"userAvatar"` | ||
| 238 | - UserEmail string `json:"userEmail"` | ||
| 239 | - UserName string `json:"userName"` | ||
| 240 | - UserPhone string `json:"userPhone"` | ||
| 241 | - UserAccount string `json:"userAccount"` | ||
| 242 | - } `json:"userInfo"` | ||
| 243 | - //UserType int `json:"userType"` | ||
| 244 | - //UserName string `json:"userName"` | ||
| 245 | - //UserPhone string `json:"userPhone"` | ||
| 246 | - //Status int `json:"status"` | ||
| 247 | - } `json:"operator"` | ||
| 248 | - //OperateTime time.Time `json:"operateTime"` | ||
| 249 | - Status int `json:"status"` | ||
| 250 | - //UpdatedAt time.Time `json:"updatedAt"` | ||
| 251 | - //DeletedAt time.Time `json:"deletedAt"` | ||
| 252 | - //CreatedAt time.Time `json:"createdAt"` | ||
| 253 | - } `json:"list"` | ||
| 254 | - Total int `json:"total"` | 239 | + List []DataCooperationProjectSearchItem `json:"list"` |
| 240 | + Total int `json:"total"` | ||
| 255 | } | 241 | } |
| 256 | ) | 242 | ) |
| 257 | 243 |
-
请 注册 或 登录 后发表评论