| | |
| | | "encoding/json" |
| | | "errors" |
| | | "github.com/jinzhu/gorm" |
| | | "github.com/spf13/cast" |
| | | "time" |
| | | ) |
| | | |
| | |
| | | WorkerID: params.WorkerID, |
| | | WorkerName: workerName, |
| | | WorkerTime: nowTs - startTs, |
| | | BarCode: snowflake.GenerateIdStr(), |
| | | BarCode: cast.ToString(snowflake.GenerateID()), |
| | | } |
| | | err = model.WithTransaction(func(db *gorm.DB) error { |
| | | err = model.NewReportWorkSearch(db).Create(record) |
| | |
| | | return err |
| | | } |
| | | |
| | | err = NewProgressService().UpdateProgressByProceduresId(procedure.ID, int64(params.ReportAmount)) |
| | | err = NewProgressService().UpdateProgressByProceduresId(procedure.ID, params.ReportAmount) |
| | | |
| | | return nil |
| | | } |