|
|
@@ -2056,18 +2056,18 @@ func (this *OilSupplierController) GetJurisdiction() {
|
|
|
func (this *OilSupplierController) GetEntityListInterface () {
|
|
|
|
|
|
//获取分页信息
|
|
|
- page := this.GetPageInfoForm()
|
|
|
+ //page := this.GetPageInfoForm()
|
|
|
where := " 1=1 "
|
|
|
- orderby := "Id"
|
|
|
- asc := false
|
|
|
- Order := this.GetString("Order")
|
|
|
- Prop := this.GetString("Prop")
|
|
|
- if Order != "" && Prop != "" {
|
|
|
- orderby = Prop
|
|
|
- if Order == "asc" {
|
|
|
- asc = true
|
|
|
- }
|
|
|
- }
|
|
|
+ //orderby := "Id"
|
|
|
+ //asc := false
|
|
|
+ //Order := this.GetString("Order")
|
|
|
+ //Prop := this.GetString("Prop")
|
|
|
+ //if Order != "" && Prop != "" {
|
|
|
+ // orderby = Prop
|
|
|
+ // if Order == "asc" {
|
|
|
+ // asc = true
|
|
|
+ // }
|
|
|
+ //}
|
|
|
status := this.GetString("status")
|
|
|
|
|
|
if status == "1" {
|
|
|
@@ -2082,42 +2082,23 @@ func (this *OilSupplierController) GetEntityListInterface () {
|
|
|
where += "b.InStyle=''"
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- //企业用户只看自己的数据记录
|
|
|
- /*parameterSvc := baseparameter.GetBaseparameterService(utils.DBE) //取出外部门ID
|
|
|
- extOrganizeId := parameterSvc.GetBaseparameterMessage("GFGL", "paramset", "ExtOrganizeId")
|
|
|
- if extOrganizeId == this.User.DepartmentId {
|
|
|
- where = where + " and a.CreateUserId = '" + this.User.Id + "'"
|
|
|
- }*/
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
- var registerUser register.OilCorporateInfo
|
|
|
- sql := " UserName='" + this.User.Username + "'"
|
|
|
- svc.GetEntity(®isterUser,sql)
|
|
|
- //企业用户必须加创建人条件
|
|
|
- if this.User.IsCompanyUser == 1 {
|
|
|
- where = where + " and (a.CreateUserId = '" + this.User.Id + "' or a.CommercialNo='"+registerUser.CommercialNo+"')"
|
|
|
- } 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 b.CreateUserId = '" + this.User.Id + "'"
|
|
|
- }
|
|
|
+ var interfaceData []supplier.InterfaceData
|
|
|
+ err := svc.GetInterfaceData(OilSupplierName, OilSupplierFileName, &interfaceData, where)
|
|
|
|
|
|
+ var errinfo ErrorDataInfo
|
|
|
+ if err == nil {
|
|
|
+ errinfo.Message = "成功!"
|
|
|
+ errinfo.Code = 0
|
|
|
+ errinfo.Item = &interfaceData
|
|
|
+ this.Data["json"] = &errinfo
|
|
|
+ this.ServeJSON()
|
|
|
+ } else {
|
|
|
+ errinfo.Message = "失败!"
|
|
|
+ errinfo.Code = -1
|
|
|
+ this.Data["json"] = &errinfo
|
|
|
+ this.ServeJSON()
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- var list []supplier.OilSupplierView
|
|
|
-
|
|
|
- total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
|
|
|
-
|
|
|
- var datainfo DataInfo
|
|
|
- datainfo.Items = list
|
|
|
- datainfo.CurrentItemCount = total
|
|
|
- datainfo.PageIndex = page.CurrentPage
|
|
|
- datainfo.ItemsPerPage = page.Size
|
|
|
- this.Data["json"] = &datainfo
|
|
|
- this.ServeJSON()
|
|
|
}
|
|
|
|
|
|
|