...
|
...
|
@@ -510,6 +510,7 @@ func (controller *SuMoneyController) ImportExchangeList () { |
|
|
// 新增成功计数
|
|
|
var successDataCount int64
|
|
|
|
|
|
// 导入命令
|
|
|
var createExchangeCashPersonCommands []*command.CreateExchangeCashPersonCommand
|
|
|
|
|
|
for i, row := range rows {
|
...
|
...
|
@@ -534,23 +535,23 @@ func (controller *SuMoneyController) ImportExchangeList () { |
|
|
controller.ServeJSON()
|
|
|
return
|
|
|
} else {
|
|
|
successDataCount = int64(len(rows) - 3 - len(failureDataList))
|
|
|
}
|
|
|
|
|
|
// 导入失败返回
|
|
|
ret = map[string]interface{}{
|
|
|
"successCount": successDataCount,
|
|
|
"fail": map[string]interface{}{
|
|
|
"tableHeader": tableHeader,
|
|
|
"tableData": failureDataList,
|
|
|
},
|
|
|
}
|
|
|
|
|
|
// 导入成功返回
|
|
|
if successDataCount == int64(len(rows) - 3) {
|
|
|
ret = map[string]interface{}{
|
|
|
"successCount": successDataCount,
|
|
|
"fail": nil,
|
|
|
if len(failureDataList) > 0 { // 导入失败返回
|
|
|
successDataCount = 0
|
|
|
ret = map[string]interface{}{
|
|
|
"successCount": successDataCount,
|
|
|
"fail": map[string]interface{}{
|
|
|
"tableHeader": tableHeader,
|
|
|
"tableData": failureDataList,
|
|
|
},
|
|
|
}
|
|
|
} else { // 导入成功返回
|
|
|
successDataCount = int64(len(rows) - 3 - len(failureDataList))
|
|
|
if successDataCount == int64(len(rows) - 3) {
|
|
|
ret = map[string]interface{}{
|
|
|
"successCount": successDataCount,
|
|
|
"fail": nil,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|