|
@ -1,11 +1,11 @@ |
|
|
package db |
|
|
package db |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"bufio" |
|
|
|
|
|
"github.com/360EntSecGroup-Skylar/excelize/v2" |
|
|
|
|
|
"LAPP_PRN_Service/common" |
|
|
"LAPP_PRN_Service/common" |
|
|
conf "LAPP_PRN_Service/config" |
|
|
conf "LAPP_PRN_Service/config" |
|
|
"LAPP_PRN_Service/glog" |
|
|
"LAPP_PRN_Service/glog" |
|
|
|
|
|
"bufio" |
|
|
|
|
|
"github.com/360EntSecGroup-Skylar/excelize/v2" |
|
|
"os" |
|
|
"os" |
|
|
"path" |
|
|
"path" |
|
|
"path/filepath" |
|
|
"path/filepath" |
|
@ -74,7 +74,7 @@ func (t *PrintTask) GenPrintFile(conf *conf.EnvConfig) error { |
|
|
linetext := scanner.Text() |
|
|
linetext := scanner.Text() |
|
|
for _, pd := range t.PrintDetailList { |
|
|
for _, pd := range t.PrintDetailList { |
|
|
// -1 替换所有; 1 替换第一个; 5 替换前5个
|
|
|
// -1 替换所有; 1 替换第一个; 5 替换前5个
|
|
|
linetext = strings.Replace(linetext, pd.VarName, pd.VarPos, -1) |
|
|
|
|
|
|
|
|
linetext = strings.Replace(linetext, pd.VarName, pd.VarValue, -1) |
|
|
} |
|
|
} |
|
|
results = append(results, linetext) |
|
|
results = append(results, linetext) |
|
|
} |
|
|
} |
|
|