|
@@ -1905,6 +1905,9 @@ func (table *Table) FindTdVal(td *TD, direct, vdirect int) (b bool) {
|
|
|
if val == nil || val == "" || key == "采购项目预算金额" {
|
|
|
return
|
|
|
}
|
|
|
+ if key == "单位名称" && len(near.TR.TDs) > 1 {
|
|
|
+ key = near.TR.TDs[0].Val
|
|
|
+ }
|
|
|
table.SortKV.AddKey(key, val)
|
|
|
//if table.SortKV.Map[key] != nil {
|
|
|
pos := table.SortKV.Index[key]
|
|
@@ -2552,7 +2555,7 @@ var saveThead = regexp.MustCompile("(?is)<thead>(.+?)</thead>")
|
|
|
var clearpkg = regexp.MustCompile("(标示|标识)")
|
|
|
|
|
|
func RepairCon(con string) string {
|
|
|
- con = clearpkg.ReplaceAllString(con,"")
|
|
|
+ con = clearpkg.ReplaceAllString(con, "")
|
|
|
res := saveThead.FindAllStringSubmatch(con, 1)
|
|
|
th := ""
|
|
|
if len(res) == 1 && len(res[0]) == 2 {
|
|
@@ -3610,7 +3613,7 @@ func initLineMapLineMapArr(table *Table) (lineMapArr map[string]*SortMap, lineMa
|
|
|
for _, key := range table.SortKV.Keys { //遍历table.SortKV.Keys而不是直接遍历table.SortKV.Map是为了得到table头的顺序
|
|
|
val := table.SortKV.Map[key]
|
|
|
key = regReplAllSpace.ReplaceAllString(key, "")
|
|
|
- key = strings.Replace(key, "", "", -1) //处理一个特殊的采购量 经上层处理空格后未处理掉
|
|
|
+ key = strings.Replace(key, "", "", -1) //处理一个特殊的采购量 经上层处理空格后未处理掉
|
|
|
//qutil.Debug(key, "---------------------------", val)
|
|
|
if realTypeVal, ok := val.([]string); ok { //val为数组 {"数量":["1","2","3"]}
|
|
|
/*
|