作者 Your Name

添加班别字段

@@ -9,7 +9,7 @@ type ProductCapacitiesList struct { @@ -9,7 +9,7 @@ type ProductCapacitiesList struct {
9 WorkerName string `json:"workerName"` // 用户姓名 9 WorkerName string `json:"workerName"` // 用户姓名
10 EmployeeType int `json:"employeeType"` // 员工类型 1:固定 2:派遣 3.临时 10 EmployeeType int `json:"employeeType"` // 员工类型 1:固定 2:派遣 3.临时
11 ProductName string `json:"productName"` //品名 11 ProductName string `json:"productName"` //品名
12 - ParticipateType int `json:"participateType"` // 参与类型 1:正常 2:支援 12 + WorkerOn int `json:"workerOn"` //班别
13 ProductWeigh float64 `json:"productWeigh"` // 产能 13 ProductWeigh float64 `json:"productWeigh"` // 产能
14 CreatedAt string `json:"createdAt"` // 创建时间 14 CreatedAt string `json:"createdAt"` // 创建时间
15 ApproveStatus int `json:"approveStatus"` //0:未审核 1:已审核 2.自动审核 15 ApproveStatus int `json:"approveStatus"` //0:未审核 1:已审核 2.自动审核
@@ -195,7 +195,7 @@ func (productRecordService *ProductRecordService) ListProductCapacities(operateI @@ -195,7 +195,7 @@ func (productRecordService *ProductRecordService) ListProductCapacities(operateI
195 WorkerName: v.ProductWorker.UserName, 195 WorkerName: v.ProductWorker.UserName,
196 EmployeeType: v.ProductWorker.EmployeeType, 196 EmployeeType: v.ProductWorker.EmployeeType,
197 ProductName: v.ProductRecordInfo.PlanProductName, 197 ProductName: v.ProductRecordInfo.PlanProductName,
198 - // ParticipateType: v.ParticipateType, 198 + WorkerOn: v.ProductRecordInfo.WorkOn,
199 ProductWeigh: v.ProductRecordInfo.Weigh, 199 ProductWeigh: v.ProductRecordInfo.Weigh,
200 CreatedAt: v.CreatedAt.Format("2006-01-02"), 200 CreatedAt: v.CreatedAt.Format("2006-01-02"),
201 ApproveStatus: v.ProductRecordInfo.ApproveStatus, 201 ApproveStatus: v.ProductRecordInfo.ApproveStatus,
@@ -125,8 +125,7 @@ func (repo *ProductTroubleRepository) Find(queryOptions map[string]interface{}) @@ -125,8 +125,7 @@ func (repo *ProductTroubleRepository) Find(queryOptions map[string]interface{})
125 query.Where(fmt.Sprintf(`product_worker->>'userName' like '%%%v%%'`, v)) 125 query.Where(fmt.Sprintf(`product_worker->>'userName' like '%%%v%%'`, v))
126 } 126 }
127 127
128 - //TODO  
129 - 128 + query.Order("id", "DESC")
130 cnt, err := query.SelectAndCount() 129 cnt, err := query.SelectAndCount()
131 if err != nil { 130 if err != nil {
132 return 0, nil, err 131 return 0, nil, err