作者 tangxuhui

还原 修改

@@ -183,15 +183,17 @@ func GetAuditListSql(param protocol.RequestAuditList, companyid int64, userid in @@ -183,15 +183,17 @@ func GetAuditListSql(param protocol.RequestAuditList, companyid int64, userid in
183 ) 183 )
184 s1 := `SELECT a.id,a.department_id,a.audit_template_id,a.chance_type_id 184 s1 := `SELECT a.id,a.department_id,a.audit_template_id,a.chance_type_id
185 ,a.publish_status,a.create_at,a.review_status,a.status 185 ,a.publish_status,a.create_at,a.review_status,a.status
186 - ,a.discovery_score,a.comment_total ,a.code,c.nick_name 186 + ,a.discovery_score,a.comment_total ,a.code,d.nick_name,d.id as user_id
187 ,a.type,a.reserve_type_id,a.source_content,a.approve_time,a.check_result 187 ,a.type,a.reserve_type_id,a.source_content,a.approve_time,a.check_result
188 ,a.self_checks,a.check_result_status 188 ,a.self_checks,a.check_result_status
189 FROM chance AS a 189 FROM chance AS a
190 JOIN user_company AS c ON c.id = a.user_id 190 JOIN user_company AS c ON c.id = a.user_id
  191 + JOIN user AS d ON c.user_id = d.id
191 %s 192 %s
192 where a.company_id=? AND a.enable_status=1 ` 193 where a.company_id=? AND a.enable_status=1 `
193 s2 := ` SELECT count(*) FROM chance as a 194 s2 := ` SELECT count(*) FROM chance as a
194 JOIN user_company AS c ON c.id = a.user_id 195 JOIN user_company AS c ON c.id = a.user_id
  196 + JOIN user AS d ON c.user_id = d.id
195 %s 197 %s
196 where a.company_id=? AND a.enable_status=1 ` 198 where a.company_id=? AND a.enable_status=1 `
197 if companyinfo, err := models.GetCompanyById(companyid); err == nil { 199 if companyinfo, err := models.GetCompanyById(companyid); err == nil {
@@ -297,7 +299,7 @@ func GetAuditListSql(param protocol.RequestAuditList, companyid int64, userid in @@ -297,7 +299,7 @@ func GetAuditListSql(param protocol.RequestAuditList, companyid int64, userid in
297 func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64) (protocol.ResponseAuditList, error) { 299 func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64) (protocol.ResponseAuditList, error) {
298 type SqlData struct { 300 type SqlData struct {
299 Id int64 `orm:"column(id)"` 301 Id int64 `orm:"column(id)"`
300 - // UserId int64 `orm:"column(user_id)"` 302 + UserId int64 `orm:"column(user_id)"`
301 NickName string `orm:"column(nick_name)"` 303 NickName string `orm:"column(nick_name)"`
302 DepartmentId int64 `orm:"column(department_id)"` 304 DepartmentId int64 `orm:"column(department_id)"`
303 AuditTemplateId int64 `orm:"column(audit_template_id)"` 305 AuditTemplateId int64 `orm:"column(audit_template_id)"`