| | |
| | | type ReportWork struct { |
| | | ProcedureId uint `json:"procedureId,string" binding:"required"` //工序id |
| | | ReportAmount int `json:"reportAmount" binding:"required"` //报工数量 |
| | | WorkerID string `json:"workerID" binding:"required"` //报告者id |
| | | WorkerID string `json:"workerID"` //报告者id |
| | | } |
| | | |
| | | type ReportWorkList struct { |
| | |
| | | nowTs := time.Now().Unix() |
| | | var startTs int64 |
| | | var workerName string |
| | | if params.WorkerID != "" { |
| | | for _, worker := range procedure.ProceduresInfo.Workers { |
| | | if params.WorkerID == worker.WorkerID { |
| | | workerName = worker.WorkerName |
| | | } |
| | | } |
| | | if workerName == "" { |
| | | return errors.New("没有找到当前值班人员") |
| | | } |
| | | |
| | | finishAmount := params.ReportAmount |