|
@@ -221,7 +221,7 @@ func AddEdbInspectionRecord(cont context.Context) (err error) {
|
|
config.Source, config.TerminalCode, err))
|
|
config.Source, config.TerminalCode, err))
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
- if dashboard == nil {
|
|
|
|
|
|
+ if tempErr != nil && utils.IsErrNoRow(tempErr) {
|
|
dashboard = &edb_inspection.EdbInspectionDashboard{
|
|
dashboard = &edb_inspection.EdbInspectionDashboard{
|
|
Source: config.Source,
|
|
Source: config.Source,
|
|
TerminalCode: config.TerminalCode,
|
|
TerminalCode: config.TerminalCode,
|
|
@@ -238,7 +238,7 @@ func AddEdbInspectionRecord(cont context.Context) (err error) {
|
|
record.InspectionRecordId, err))
|
|
record.InspectionRecordId, err))
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
|
|
+ } else if tempErr == nil && dashboard.DashboardId > 0 {
|
|
dashboard.InspectionRecordId = record.InspectionRecordId
|
|
dashboard.InspectionRecordId = record.InspectionRecordId
|
|
dashboard.InspectionTime = now
|
|
dashboard.InspectionTime = now
|
|
dashboard.InspectionResult = record.InspectionResult
|
|
dashboard.InspectionResult = record.InspectionResult
|