...
|
...
|
@@ -46,11 +46,11 @@ func (controller *ExcelDataController) fieldValueAllEmpty(param map[string]strin |
|
|
}
|
|
|
|
|
|
// ImportDividendsOrder 导入分红订单
|
|
|
func (controller ExcelDataController) ImportDividendsOrder() {
|
|
|
func (controller *ExcelDataController) ImportDividendsOrder() {
|
|
|
importDividendsOrder(controller)
|
|
|
}
|
|
|
|
|
|
func importDividendsOrder(controller ExcelDataController) {
|
|
|
func importDividendsOrder(controller *ExcelDataController) {
|
|
|
|
|
|
fileReader, err := controller.GetExcelFile()
|
|
|
if err != nil {
|
...
|
...
|
@@ -109,11 +109,11 @@ func importDividendsOrder(controller ExcelDataController) { |
|
|
}
|
|
|
|
|
|
// ImportDividendsReturnedOrder 导入分红退货单
|
|
|
func (controller ExcelDataController) ImportDividendsReturnedOrder() {
|
|
|
func (controller *ExcelDataController) ImportDividendsReturnedOrder() {
|
|
|
importDividendsReturnedOrder(controller)
|
|
|
}
|
|
|
|
|
|
func importDividendsReturnedOrder(controller ExcelDataController) {
|
|
|
func importDividendsReturnedOrder(controller *ExcelDataController) {
|
|
|
|
|
|
fileReader, err := controller.GetExcelFile()
|
|
|
if err != nil {
|
...
|
...
|
@@ -172,7 +172,7 @@ func importDividendsReturnedOrder(controller ExcelDataController) { |
|
|
}
|
|
|
|
|
|
// FileImport 文件导入
|
|
|
func (controller ExcelDataController) FileImport() {
|
|
|
func (controller *ExcelDataController) FileImport() {
|
|
|
code := controller.GetString("code")
|
|
|
switch code {
|
|
|
case domain.ImportDividendsOrders:
|
...
|
...
|
@@ -184,7 +184,7 @@ func (controller ExcelDataController) FileImport() { |
|
|
}
|
|
|
}
|
|
|
|
|
|
func defaultImport(controller ExcelDataController) {
|
|
|
func defaultImport(controller *ExcelDataController) {
|
|
|
var (
|
|
|
data interface{}
|
|
|
err error
|
...
|
...
|
@@ -213,7 +213,7 @@ func defaultImport(controller ExcelDataController) { |
|
|
controller.Response(data, err)
|
|
|
}
|
|
|
|
|
|
func (controller ExcelDataController) FileImportTemplate() {
|
|
|
func (controller *ExcelDataController) FileImportTemplate() {
|
|
|
excelService := service.NewExcelDataService(nil)
|
|
|
cmd := &command.ImportDataCommand{}
|
|
|
code := controller.GetString(":code")
|
...
|
...
|
@@ -224,11 +224,11 @@ func (controller ExcelDataController) FileImportTemplate() { |
|
|
}
|
|
|
|
|
|
// FileExport 文件导出
|
|
|
func (controller ExcelDataController) FileExport() {
|
|
|
func (controller *ExcelDataController) FileExport() {
|
|
|
fileExport(controller, "")
|
|
|
}
|
|
|
|
|
|
func fileExport(controller ExcelDataController, code string) {
|
|
|
func fileExport(controller *ExcelDataController, code string) {
|
|
|
// 1.读取command
|
|
|
exportDataCommand := &command.ExportDataCommand{}
|
|
|
err := controller.Unmarshal(exportDataCommand)
|
...
|
...
|
@@ -280,11 +280,16 @@ func fileExport(controller ExcelDataController, code string) { |
|
|
}
|
|
|
|
|
|
// ExportCompanyUser 导出公司用户
|
|
|
func (controller ExcelDataController) ExportCompanyUser() {
|
|
|
func (controller *ExcelDataController) ExportCompanyUser() {
|
|
|
fileExport(controller, domain.ExportCompanyUser)
|
|
|
}
|
|
|
|
|
|
// ExportCooperationUser 导出共创用户
|
|
|
func (controller ExcelDataController) ExportCooperationUser() {
|
|
|
func (controller *ExcelDataController) ExportCooperationUser() {
|
|
|
fileExport(controller, domain.ExportCooperationUser)
|
|
|
}
|
|
|
|
|
|
//GetExcelDataFields 获取导出excel数据的可选字段
|
|
|
func (controller *ExcelDataController) GetExcelDataFields() {
|
|
|
|
|
|
} |
...
|
...
|
|