|
@@ -153,6 +153,8 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
@@ -153,6 +153,8 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
153
|
DiscoveryScore string `orm:"column(discovery_score)"`
|
153
|
DiscoveryScore string `orm:"column(discovery_score)"`
|
|
154
|
CommentTotal string `orm:"column(comment_total)"`
|
154
|
CommentTotal string `orm:"column(comment_total)"`
|
|
155
|
Code string `orm:"column(code)"`
|
155
|
Code string `orm:"column(code)"`
|
|
|
|
156
|
+ StoreType int8 `orm:"column(type)"`
|
|
|
|
157
|
+ ReserveTypeId int `orm:"column(reserve_type_id)"`
|
|
156
|
}
|
158
|
}
|
|
157
|
var (
|
159
|
var (
|
|
158
|
datasql = strings.Builder{}
|
160
|
datasql = strings.Builder{}
|
|
@@ -180,6 +182,7 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
@@ -180,6 +182,7 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
180
|
s1 := `SELECT a.id,a.department_id,a.audit_template_id,a.chance_type_id
|
182
|
s1 := `SELECT a.id,a.department_id,a.audit_template_id,a.chance_type_id
|
|
181
|
,a.publish_status,a.create_at,a.review_status,a.status
|
183
|
,a.publish_status,a.create_at,a.review_status,a.status
|
|
182
|
,a.discovery_score,a.comment_total ,a.code,d.nick_name,d.id as user_id
|
184
|
,a.discovery_score,a.comment_total ,a.code,d.nick_name,d.id as user_id
|
|
|
|
185
|
+ ,a.type,a.reserve_type_id
|
|
183
|
FROM chance AS a
|
186
|
FROM chance AS a
|
|
184
|
JOIN user_company AS c ON c.id = a.user_id
|
187
|
JOIN user_company AS c ON c.id = a.user_id
|
|
185
|
JOIN user AS d ON c.user_id = d.id
|
188
|
JOIN user AS d ON c.user_id = d.id
|
|
@@ -298,6 +301,9 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
@@ -298,6 +301,9 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
298
|
CommentTotal: v.CommentTotal,
|
301
|
CommentTotal: v.CommentTotal,
|
|
299
|
UserName: v.NickName,
|
302
|
UserName: v.NickName,
|
|
300
|
CreateTime: 0,
|
303
|
CreateTime: 0,
|
|
|
|
304
|
+ ReserveType: "",
|
|
|
|
305
|
+ StoreType: v.StoreType,
|
|
|
|
306
|
+ StoreTypeName: models.ChanceStoreTypeMap[v.StoreType],
|
|
301
|
}
|
307
|
}
|
|
302
|
t, err := time.ParseInLocation("2006-01-02 15:04:05", v.CreateAt, time.Local)
|
308
|
t, err := time.ParseInLocation("2006-01-02 15:04:05", v.CreateAt, time.Local)
|
|
303
|
if err == nil {
|
309
|
if err == nil {
|
|
@@ -312,6 +318,9 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
@@ -312,6 +318,9 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
312
|
if tp, err := models.GetAuditTemplateById(v.AuditTemplateId); err == nil {
|
318
|
if tp, err := models.GetAuditTemplateById(v.AuditTemplateId); err == nil {
|
|
313
|
item.TemplateName = tp.Name
|
319
|
item.TemplateName = tp.Name
|
|
314
|
}
|
320
|
}
|
|
|
|
321
|
+ if rt, err := models.GetChanceReserveTypeById(v.ReserveTypeId); err == nil {
|
|
|
|
322
|
+ item.ReserveType = rt.Name
|
|
|
|
323
|
+ }
|
|
315
|
returnData.List = append(returnData.List, item)
|
324
|
returnData.List = append(returnData.List, item)
|
|
316
|
|
325
|
|
|
317
|
}
|
326
|
}
|