|
@@ -510,6 +510,7 @@ func (controller *SuMoneyController) ImportExchangeList () { |
|
@@ -510,6 +510,7 @@ func (controller *SuMoneyController) ImportExchangeList () { |
510
|
// 新增成功计数
|
510
|
// 新增成功计数
|
511
|
var successDataCount int64
|
511
|
var successDataCount int64
|
512
|
|
512
|
|
|
|
513
|
+ // 导入命令
|
513
|
var createExchangeCashPersonCommands []*command.CreateExchangeCashPersonCommand
|
514
|
var createExchangeCashPersonCommands []*command.CreateExchangeCashPersonCommand
|
514
|
|
515
|
|
515
|
for i, row := range rows {
|
516
|
for i, row := range rows {
|
|
@@ -534,10 +535,8 @@ func (controller *SuMoneyController) ImportExchangeList () { |
|
@@ -534,10 +535,8 @@ func (controller *SuMoneyController) ImportExchangeList () { |
534
|
controller.ServeJSON()
|
535
|
controller.ServeJSON()
|
535
|
return
|
536
|
return
|
536
|
} else {
|
537
|
} else {
|
537
|
- successDataCount = int64(len(rows) - 3 - len(failureDataList))
|
|
|
538
|
- }
|
|
|
539
|
-
|
|
|
540
|
- // 导入失败返回
|
538
|
+ if len(failureDataList) > 0 { // 导入失败返回
|
|
|
539
|
+ successDataCount = 0
|
541
|
ret = map[string]interface{}{
|
540
|
ret = map[string]interface{}{
|
542
|
"successCount": successDataCount,
|
541
|
"successCount": successDataCount,
|
543
|
"fail": map[string]interface{}{
|
542
|
"fail": map[string]interface{}{
|
|
@@ -545,14 +544,16 @@ func (controller *SuMoneyController) ImportExchangeList () { |
|
@@ -545,14 +544,16 @@ func (controller *SuMoneyController) ImportExchangeList () { |
545
|
"tableData": failureDataList,
|
544
|
"tableData": failureDataList,
|
546
|
},
|
545
|
},
|
547
|
}
|
546
|
}
|
548
|
-
|
|
|
549
|
- // 导入成功返回
|
547
|
+ } else { // 导入成功返回
|
|
|
548
|
+ successDataCount = int64(len(rows) - 3 - len(failureDataList))
|
550
|
if successDataCount == int64(len(rows) - 3) {
|
549
|
if successDataCount == int64(len(rows) - 3) {
|
551
|
ret = map[string]interface{}{
|
550
|
ret = map[string]interface{}{
|
552
|
"successCount": successDataCount,
|
551
|
"successCount": successDataCount,
|
553
|
"fail": nil,
|
552
|
"fail": nil,
|
554
|
}
|
553
|
}
|
555
|
}
|
554
|
}
|
|
|
555
|
+ }
|
|
|
556
|
+ }
|
556
|
|
557
|
|
557
|
response = utils.ResponseData(controller.Ctx, ret)
|
558
|
response = utils.ResponseData(controller.Ctx, ret)
|
558
|
controller.Data["json"] = response
|
559
|
controller.Data["json"] = response
|