Browse Source

环节处理改为批处理

dev
yfh 1 month ago
parent
commit
e35519c889
  1. 9
      et_print/printHandler.go

9
et_print/printHandler.go

@ -19,10 +19,17 @@ func NewPrintHandler() *PrintHandler {
stage: stages.NewStage("测试打印"),
}
the.stage.AddProcess(the.print)
the.stage.AddProcess(the.printDatas)
return the
}
func (the *PrintHandler) printDatas(data []*common_models.ProcessData) []*common_models.ProcessData {
for _, processData := range data {
the.print(processData)
}
return data
}
func (the *PrintHandler) print(p *common_models.ProcessData) *common_models.ProcessData {
log.Printf("处理设备[%s]数据", p.DeviceData.Name)

Loading…
Cancel
Save