...
|
...
|
@@ -736,6 +736,9 @@ func (c *OrderInfoController) ImportOrderFromExcel() { |
|
|
return
|
|
|
}
|
|
|
|
|
|
// 数据行计数
|
|
|
rowCnt := 0
|
|
|
|
|
|
// 空文件校验
|
|
|
if len(rows) < 3 {
|
|
|
c.ResponseError(errors.New("导入的excel文件为空文件,请上传正确的文件"))
|
...
|
...
|
@@ -746,6 +749,7 @@ func (c *OrderInfoController) ImportOrderFromExcel() { |
|
|
nullFlag := false
|
|
|
for i, row := range rows {
|
|
|
if i > 2 && row != nil {
|
|
|
rowCnt++
|
|
|
if len(row) == constant.EXCEL_COLUMN { // 中间空字符校验
|
|
|
var tmpRow = row
|
|
|
var myRow []string
|
...
|
...
|
@@ -1111,8 +1115,8 @@ func (c *OrderInfoController) ImportOrderFromExcel() { |
|
|
},
|
|
|
}
|
|
|
} else { // 导入成功返回
|
|
|
successDataCount = int64(len(rows) - 3 - len(failureDataList))
|
|
|
if successDataCount == int64(len(rows)-3) {
|
|
|
successDataCount = int64(rowCnt - len(failureDataList))
|
|
|
if successDataCount == int64(rowCnt) {
|
|
|
ret = map[string]interface{}{
|
|
|
"successCount": successDataCount,
|
|
|
"fail": nil,
|
...
|
...
|
|