|
|
@@ -4,6 +4,7 @@ import (
|
|
|
"dashoo.cn/backend/api/business/auditsetting"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
|
|
|
"dashoo.cn/backend/api/business/workflow"
|
|
|
+ "dashoo.cn/business2/permission"
|
|
|
"dashoo.cn/business2/userRole"
|
|
|
"encoding/json"
|
|
|
"strconv"
|
|
|
@@ -86,6 +87,18 @@ func (this *OilSupplierCertAppendController) GetList() {
|
|
|
where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
|
|
|
}
|
|
|
}
|
|
|
+ //企业用户必须加创建人条件
|
|
|
+ if this.User.IsCompanyUser == 1 {
|
|
|
+ where = where + " and a.CreateUserId = '" + this.User.Id + "'"
|
|
|
+ } else {
|
|
|
+ //超级管理员和有查看所有数据权限的用户不加条件
|
|
|
+ svcPerm := permission.GetPermissionService(utils.DBE)
|
|
|
+ isauth := svcPerm.IsAuthorized(this.User.Id, "oil_supplier.marketAccess.AllRecord")
|
|
|
+ if !svcPerm.IsAdmin(this.User.Id) && !isauth {
|
|
|
+ where = where + " and a.CreateUserId = '" + this.User.Id + "'"
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
var list []suppliercertappend.OilSupplierCertAppend
|