...
|
...
|
@@ -46,12 +46,12 @@ func buildSqlForAuditList(usercompanyid int64, companyid int64, userid int64) st |
|
|
//公开到自己部门的
|
|
|
sql3 string = ` SELECT a.id FROM chance AS a
|
|
|
JOIN chance_department AS b ON a.id=b.chance_id
|
|
|
WHERE b.department_id IN (%s) AND a.review_status = 3 `
|
|
|
WHERE b.department_id IN (%s) AND a.review_status = 3 AND a.publish_status=` + fmt.Sprint(models.ChancePublishStatus2)
|
|
|
//指定提交的部门
|
|
|
sql4 string = ` SELECT id FROM chance WHERE department_id IN (%s) and review_status =3 `
|
|
|
|
|
|
//全公司公开的
|
|
|
sql5 string = fmt.Sprintf(` SELECT id FROM chance where publish_status = 1 AND review_status = 3 AND company_id=%d `, companyid)
|
|
|
sql5 string = fmt.Sprintf(` SELECT id FROM chance where publish_status = %d AND review_status = 3 AND company_id=%d `, models.ChancePublishStatus2, companyid)
|
|
|
//查看所有公开的
|
|
|
sql6 string = fmt.Sprintf(`SELECT id FROM chance WHERE review_status =3 And company_id=%d `, companyid)
|
|
|
|
...
|
...
|
@@ -189,6 +189,9 @@ func GetAuditList(param protocol.RequestAuditList, companyid int64, userid int64 |
|
|
temp := fmt.Sprintf(`JOIN (%s) AS tt ON tt.id=a.id`, sqlFromPermission)
|
|
|
s1 = fmt.Sprintf(s1, temp)
|
|
|
s2 = fmt.Sprintf(s2, temp)
|
|
|
} else {
|
|
|
s1 = fmt.Sprintf(s1, "")
|
|
|
s2 = fmt.Sprintf(s2, "")
|
|
|
}
|
|
|
datasql.WriteString(s1)
|
|
|
countsql.WriteString(s2)
|
...
|
...
|
|