23 lines
859 B
Go
23 lines
859 B
Go
package excel
|
|
|
|
import (
|
|
"electricity_bill_calc/model"
|
|
"io"
|
|
)
|
|
|
|
var meter04kVExcelRecognizers = []*ColumnRecognizer{
|
|
{Pattern: []string{"表号"}, Tag: "code", MatchIndex: -1},
|
|
{Pattern: []string{"户名"}, Tag: "name", MatchIndex: -1},
|
|
{Pattern: []string{"户址"}, Tag: "address", MatchIndex: -1},
|
|
{Pattern: []string{"联系人"}, Tag: "contact", MatchIndex: -1},
|
|
{Pattern: []string{"电话"}, Tag: "phone", MatchIndex: -1},
|
|
{Pattern: []string{"倍率"}, Tag: "ratio", MatchIndex: -1},
|
|
{Pattern: []string{"序号"}, Tag: "seq", MatchIndex: -1},
|
|
{Pattern: []string{"公用设备"}, Tag: "public", MatchIndex: -1},
|
|
{Pattern: []string{"摊薄"}, Tag: "dilute", MatchIndex: -1},
|
|
}
|
|
|
|
func NewMeterArchiveExcelAnalyzer(file io.Reader) (*ExcelAnalyzer[model.Meter04KV], error) {
|
|
return NewExcelAnalyzer[model.Meter04KV](file, meter04kVExcelRecognizers)
|
|
}
|