...
|
...
|
@@ -183,15 +183,17 @@ func GetAuditListSql(param protocol.RequestAuditList, companyid int64, userid in |
|
|
)
|
|
|
s1 := `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.discovery_score,a.comment_total ,a.code,c.nick_name
|
|
|
,a.discovery_score,a.comment_total ,a.code,d.nick_name,d.id as user_id
|
|
|
,a.type,a.reserve_type_id,a.source_content,a.approve_time,a.check_result
|
|
|
,a.self_checks,a.check_result_status
|
|
|
FROM chance AS a
|
|
|
JOIN user_company AS c ON c.id = a.user_id
|
|
|
JOIN user AS d ON c.user_id = d.id
|
|
|
%s
|
|
|
where a.company_id=? AND a.enable_status=1 `
|
|
|
s2 := ` SELECT count(*) FROM chance as a
|
|
|
JOIN user_company AS c ON c.id = a.user_id
|
|
|
JOIN user AS d ON c.user_id = d.id
|
|
|
%s
|
|
|
where a.company_id=? AND a.enable_status=1 `
|
|
|
if companyinfo, err := models.GetCompanyById(companyid); err == nil {
|
...
|
...
|
@@ -297,7 +299,7 @@ func GetAuditListSql(param protocol.RequestAuditList, companyid int64, userid in |
|
|
func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64) (protocol.ResponseAuditList, error) {
|
|
|
type SqlData struct {
|
|
|
Id int64 `orm:"column(id)"`
|
|
|
// UserId int64 `orm:"column(user_id)"`
|
|
|
UserId int64 `orm:"column(user_id)"`
|
|
|
NickName string `orm:"column(nick_name)"`
|
|
|
DepartmentId int64 `orm:"column(department_id)"`
|
|
|
AuditTemplateId int64 `orm:"column(audit_template_id)"`
|
...
|
...
|
|