|
@@ -149,6 +149,8 @@ func GetChanceCheckResultList(pageIndex int, pageSize int, companyId int64, chec |
|
@@ -149,6 +149,8 @@ func GetChanceCheckResultList(pageIndex int, pageSize int, companyId int64, chec |
149
|
CommentTotal string `orm:"column(comment_total)"`
|
149
|
CommentTotal string `orm:"column(comment_total)"`
|
150
|
Code string `orm:"column(code)"`
|
150
|
Code string `orm:"column(code)"`
|
151
|
CheckResultStatus int8 `orm:"column(check_result_status)"`
|
151
|
CheckResultStatus int8 `orm:"column(check_result_status)"`
|
|
|
152
|
+ StoreType int8 `orm:"column(type)"`
|
|
|
153
|
+ ReserveTypeId int `orm:"column(reserve_type_id)"`
|
152
|
}
|
154
|
}
|
153
|
|
155
|
|
154
|
returnData := protocol.ResponseChanceCheckResultList{
|
156
|
returnData := protocol.ResponseChanceCheckResultList{
|
|
@@ -161,6 +163,7 @@ func GetChanceCheckResultList(pageIndex int, pageSize int, companyId int64, chec |
|
@@ -161,6 +163,7 @@ func GetChanceCheckResultList(pageIndex int, pageSize int, companyId int64, chec |
161
|
datasql := `SELECT a.id,a.department_id,a.audit_template_id,a.chance_type_id
|
163
|
datasql := `SELECT a.id,a.department_id,a.audit_template_id,a.chance_type_id
|
162
|
,a.publish_status,a.create_at,a.review_status,a.status,a.check_result_status
|
164
|
,a.publish_status,a.create_at,a.review_status,a.status,a.check_result_status
|
163
|
,a.discovery_score,a.comment_total ,a.code,d.nick_name,d.id as user_id
|
165
|
,a.discovery_score,a.comment_total ,a.code,d.nick_name,d.id as user_id
|
|
|
166
|
+ ,a.type,a.reserve_type_id
|
164
|
FROM chance AS a
|
167
|
FROM chance AS a
|
165
|
LEFt JOIN user_company AS c ON c.id = a.user_id
|
168
|
LEFt JOIN user_company AS c ON c.id = a.user_id
|
166
|
LEFt JOIN user AS d ON c.user_id = d.id
|
169
|
LEFt JOIN user AS d ON c.user_id = d.id
|
|
@@ -211,6 +214,9 @@ func GetChanceCheckResultList(pageIndex int, pageSize int, companyId int64, chec |
|
@@ -211,6 +214,9 @@ func GetChanceCheckResultList(pageIndex int, pageSize int, companyId int64, chec |
211
|
UserName: v.NickName,
|
214
|
UserName: v.NickName,
|
212
|
CreateTime: v.CreateAt,
|
215
|
CreateTime: v.CreateAt,
|
213
|
CheckResultStatusName: models.CheckResultStatusMap[v.CheckResultStatus],
|
216
|
CheckResultStatusName: models.CheckResultStatusMap[v.CheckResultStatus],
|
|
|
217
|
+ ReserveType: "未设置",
|
|
|
218
|
+ StoreType: v.StoreType,
|
|
|
219
|
+ StoreTypeName: models.ChanceStoreTypeMap[v.StoreType],
|
214
|
}
|
220
|
}
|
215
|
if d, err := models.GetDepartmentById(v.DepartmentId); err == nil {
|
221
|
if d, err := models.GetDepartmentById(v.DepartmentId); err == nil {
|
216
|
item.Department = d.Name
|
222
|
item.Department = d.Name
|
|
@@ -221,6 +227,9 @@ func GetChanceCheckResultList(pageIndex int, pageSize int, companyId int64, chec |
|
@@ -221,6 +227,9 @@ func GetChanceCheckResultList(pageIndex int, pageSize int, companyId int64, chec |
221
|
if tp, err := models.GetAuditTemplateById(v.AuditTemplateId); err == nil {
|
227
|
if tp, err := models.GetAuditTemplateById(v.AuditTemplateId); err == nil {
|
222
|
item.TemplateName = tp.Name
|
228
|
item.TemplateName = tp.Name
|
223
|
}
|
229
|
}
|
|
|
230
|
+ if rt, err := models.GetChanceReserveTypeById(v.ReserveTypeId); err == nil {
|
|
|
231
|
+ item.ReserveType = rt.Name
|
|
|
232
|
+ }
|
224
|
returnData.List = append(returnData.List, item)
|
233
|
returnData.List = append(returnData.List, item)
|
225
|
|
234
|
|
226
|
}
|
235
|
}
|