作者 tangxvhui

筛选结果调整

... ... @@ -342,6 +342,9 @@ type RspCheckResultList struct {
DiscoveryScore string `json:"discovery_score"`
CommentTotal string `json:"comment_total"`
CheckResultStatusName string `json:"check_result_status_name"` //自查内容筛选状态
StoreType int8 `json:"store_type"` //机会类型
StoreTypeName string `json:"store_type_name"` //机会类型名称
ReserveType string `json:"reserve_type"` //机会池类型
}
//ResponseChanceReserveTypeList 机会储备池列表
... ...
... ... @@ -149,6 +149,8 @@ func GetChanceCheckResultList(pageIndex int, pageSize int, companyId int64, chec
CommentTotal string `orm:"column(comment_total)"`
Code string `orm:"column(code)"`
CheckResultStatus int8 `orm:"column(check_result_status)"`
StoreType int8 `orm:"column(type)"`
ReserveTypeId int `orm:"column(reserve_type_id)"`
}
returnData := protocol.ResponseChanceCheckResultList{
... ... @@ -161,6 +163,7 @@ func GetChanceCheckResultList(pageIndex int, pageSize int, companyId int64, chec
datasql := `SELECT a.id,a.department_id,a.audit_template_id,a.chance_type_id
,a.publish_status,a.create_at,a.review_status,a.status,a.check_result_status
,a.discovery_score,a.comment_total ,a.code,d.nick_name,d.id as user_id
,a.type,a.reserve_type_id
FROM chance AS a
LEFt JOIN user_company AS c ON c.id = a.user_id
LEFt JOIN user AS d ON c.user_id = d.id
... ... @@ -211,6 +214,9 @@ func GetChanceCheckResultList(pageIndex int, pageSize int, companyId int64, chec
UserName: v.NickName,
CreateTime: v.CreateAt,
CheckResultStatusName: models.CheckResultStatusMap[v.CheckResultStatus],
ReserveType: "未设置",
StoreType: v.StoreType,
StoreTypeName: models.ChanceStoreTypeMap[v.StoreType],
}
if d, err := models.GetDepartmentById(v.DepartmentId); err == nil {
item.Department = d.Name
... ... @@ -221,6 +227,9 @@ func GetChanceCheckResultList(pageIndex int, pageSize int, companyId int64, chec
if tp, err := models.GetAuditTemplateById(v.AuditTemplateId); err == nil {
item.TemplateName = tp.Name
}
if rt, err := models.GetChanceReserveTypeById(v.ReserveTypeId); err == nil {
item.ReserveType = rt.Name
}
returnData.List = append(returnData.List, item)
}
... ...