作者 yangfu

导出修改

... ... @@ -20,6 +20,7 @@ func (srv ExcelDataService) ExportCompanyUser(companyUserListQuery *query.Compan
Phone: "",
UserType: domain.UserTypeEmployee,
InOrgIds: companyUserListQuery.Operator.OrgIds,
PullRealTime: true,
})
if err != nil {
return ExportCompanyUserData{}, fmt.Errorf("获取企业用户数据失败:%w", err)
... ...
... ... @@ -204,8 +204,8 @@ func (srv ExcelDataService) FileImportTemplate(importDataCommand *command.Import
domain.ImportCompanyUser: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210916/object/1631807485_EaxECeRz23WpzrMZmbwdEPRJ3Pdxpx5X.xlsx",
domain.ImportOrganization: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210916/object/1631807490_r2XWhGmbWWmpbeePBkZ3EJQFKcZEMpEm.xlsx",
domain.ImportDividendsOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210917/object/1631843469_DykNwexeYYtzxzbwsER5RrzCS7QRwGmd.xlsx",
domain.ImportCooperationUser: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210924/object/1632465394_kRTz5FfjXABF2hb6d2Nd3JMJ3Xz7zBE2.xlsx",
domain.ImportDividendsReturnOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210924/object/1632472672_hbFG5Ad3JFZM7fCerb5eShaRneCRkHsY.xlsx",
domain.ImportCooperationUser: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210926/object/1632635345_SbfzmkXjQHhCwPw4MB7zb5EBBtdp2MSE.xlsx",
domain.ImportDividendsReturnOrders: "https://timeless-world.oss-cn-shenzhen.aliyuncs.com/open-api/dev_online/20210926/object/1632635351_EbDmBxjRf2hNCfZsZWK26fDctTJ4Qzht.xlsx",
}
var url string
var ok bool
... ...
... ... @@ -34,7 +34,7 @@ func (data ExportCompanyUserData) CellValue(index int, enName string) (value int
return data[index].UserInfo.Phone
case "DepartmentName":
if data[index].Department != nil {
return data[index].Department.DepartmentName
return data[index].Department.DepartmentNumber
} else {
return ""
}
... ... @@ -53,7 +53,7 @@ func (data ExportCompanyUserData) CellValue(index int, enName string) (value int
return statusName
case "OrgName":
if data[index].Org != nil {
return data[index].Org.OrgName
return data[index].Org.OrgCode
} else {
return ""
}
... ... @@ -97,6 +97,9 @@ func (data ExportCooperationUserData) CellValue(index int, enName string) (value
case "CooperationCompany":
return data[index].CooperationInfo.CooperationCompany
case "CooperationDeadline":
if data[index].CooperationInfo.CooperationDeadline.IsZero() {
return ""
}
return data[index].CooperationInfo.CooperationDeadline.Format("2006-01-02")
case "Phone":
return data[index].UserInfo.Phone
... ...
... ... @@ -43,6 +43,8 @@ type UserDetail struct {
Department *struct {
DepartmentId int `json:"departmentId"`
DepartmentName string `json:"departmentName"`
// 部门编号
DepartmentNumber string `json:"departmentNumber"`
} `json:"department,omitempty"`
UserRole []struct {
RoleID int `json:"roleId"`
... ...