正在显示
9 个修改的文件
包含
18 行增加
和
23 行删除
| @@ -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 { |
| @@ -16,6 +16,7 @@ type CooperationContract struct { | @@ -16,6 +16,7 @@ type CooperationContract struct { | ||
| 16 | Department struct { | 16 | Department struct { |
| 17 | DepartmentId int `json:"departmentId,string"` | 17 | DepartmentId int `json:"departmentId,string"` |
| 18 | DepartmentName string `json:"departmentName"` | 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,11 +164,7 @@ type ( | @@ -164,11 +164,7 @@ type ( | ||
| 164 | // 用户基础数据id | 164 | // 用户基础数据id |
| 165 | UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"` | 165 | UserBaseId int64 `cname:"用户基础数据ID" json:"userBaseId"` |
| 166 | } | 166 | } |
| 167 | - | ||
| 168 | - DataCooperationProjectSearch struct { | ||
| 169 | - //Total int64 `json:"total"` | ||
| 170 | - //List []CooperationProject `json:"cooperationProjects"` | ||
| 171 | - List []struct { | 167 | + DataCooperationProjectSearchItem struct { |
| 172 | CooperationProjectID string `json:"cooperationProjectId"` | 168 | CooperationProjectID string `json:"cooperationProjectId"` |
| 173 | CooperationProjectNumber string `json:"cooperationProjectNumber"` | 169 | CooperationProjectNumber string `json:"cooperationProjectNumber"` |
| 174 | CooperationProjectDescription string `json:"cooperationProjectDescription"` | 170 | CooperationProjectDescription string `json:"cooperationProjectDescription"` |
| @@ -201,10 +197,6 @@ type ( | @@ -201,10 +197,6 @@ type ( | ||
| 201 | UserPhone string `json:"userPhone"` | 197 | UserPhone string `json:"userPhone"` |
| 202 | UserAccount string `json:"userAccount"` | 198 | UserAccount string `json:"userAccount"` |
| 203 | } `json:"userInfo"` | 199 | } `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"` | 200 | } `json:"cooperationProjectSponsor"` |
| 209 | CooperationMode struct { | 201 | CooperationMode struct { |
| 210 | CooperationModeId int `json:"cooperationModeId,string"` | 202 | CooperationModeId int `json:"cooperationModeId,string"` |
| @@ -215,7 +207,6 @@ type ( | @@ -215,7 +207,6 @@ type ( | ||
| 215 | DepartmentID string `json:"departmentId"` | 207 | DepartmentID string `json:"departmentId"` |
| 216 | DepartmentName string `json:"departmentName"` | 208 | DepartmentName string `json:"departmentName"` |
| 217 | DepartmentNumber string `json:"departmentNumber"` | 209 | DepartmentNumber string `json:"departmentNumber"` |
| 218 | - //IsOrganization bool `json:"isOrganization"` | ||
| 219 | } `json:"department"` | 210 | } `json:"department"` |
| 220 | CooperationProjectUndertakerTypes []int `json:"cooperationProjectUndertakerTypes"` | 211 | CooperationProjectUndertakerTypes []int `json:"cooperationProjectUndertakerTypes"` |
| 221 | CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` | 212 | CooperationProjectUndertakerType []int `json:"cooperationProjectUndertakerType"` |
| @@ -240,17 +231,12 @@ type ( | @@ -240,17 +231,12 @@ type ( | ||
| 240 | UserPhone string `json:"userPhone"` | 231 | UserPhone string `json:"userPhone"` |
| 241 | UserAccount string `json:"userAccount"` | 232 | UserAccount string `json:"userAccount"` |
| 242 | } `json:"userInfo"` | 233 | } `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"` | 234 | } `json:"operator"` |
| 248 | //OperateTime time.Time `json:"operateTime"` | 235 | //OperateTime time.Time `json:"operateTime"` |
| 249 | Status int `json:"status"` | 236 | 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"` | 237 | + } |
| 238 | + DataCooperationProjectSearch struct { | ||
| 239 | + List []DataCooperationProjectSearchItem `json:"list"` | ||
| 254 | Total int `json:"total"` | 240 | Total int `json:"total"` |
| 255 | } | 241 | } |
| 256 | ) | 242 | ) |
-
请 注册 或 登录 后发表评论