Browse Source

获取待审核业务列表

shihang 6 năm trước cách đây
mục cha
commit
f220092767

+ 1 - 1
src/dashoo.cn/backend/api/business/oilsupplier/suppliercertsub/oilsuppliercertsub.go

@@ -14,7 +14,7 @@ type OilSupplierCertSub struct {
 	Name             string    `xorm:"not null default '' comment('分类名称') VARCHAR(50)"`
 	Remark           string    `xorm:"comment('备注') VARCHAR(500)"`
 	IsDelete         int       `xorm:"default 0 comment('删除状态,0正常,1已删除') INT(10)"`
-	CreateOn         time.Time `xorm:"DATETIME"`
+	CreateOn         time.Time `xorm:"DATETIME created"`
 	CreateUserId     int       `xorm:"INT(10)"`
 	CreateBy         string    `xorm:"VARCHAR(50)"`
 	ModifiedOn       time.Time `xorm:"DATETIME"`

+ 4 - 2
src/dashoo.cn/backend/api/business/oilsupplier/suppliercertsub/oilsuppliercertsubService.go

@@ -28,12 +28,14 @@ func (s *OilSupplierCertSubService) GetWaitAuditBusinesslist(pageIndex, itemsPer
 	}
 	//获取总记录数
 	sqlCount := `select count(*) from ` + certsub + ` a 
-	left join ` + orgsetting + ` b b on a.Id=b.ParentId and a.SupplierTypeCode = b.SupplierTypeCode
+	left join ` + orgsetting + ` b on a.SubClassId=b.ClassId and a.SupplierTypeCode = b.SupplierTypeCode
+	left join Base_User c on b.OrganizeId = c.DepartmentId
 	where ` + where
 	var sql string
 	sql = `select a.*
 	from ` + certsub + ` a 
-	left join ` + orgsetting + ` b on a.Id=b.ParentId and a.SupplierTypeCode = b.SupplierTypeCode
+	left join ` + orgsetting + ` b on a.SubClassId=b.ClassId and a.SupplierTypeCode = b.SupplierTypeCode
+	left join Base_User c on b.OrganizeId = c.DepartmentId
 	where ` + where + ` order by ` + order +
 		` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
 

+ 3 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertsub.go

@@ -453,13 +453,14 @@ func (this *OilSupplierCertSubController) AuditbusList() {
 		orderby = Prop + " " + Order
 	}
 	where := "1 = 1"
+	where += " and c.Id = '" + this.User.Id + "'"
 	SupplierCertId := this.GetString("SupplierCertId")
 	SupplierTypeCode := this.GetString("SupplierTypeCode")
 	if SupplierCertId != "" {
-		where = where + " and SupplierCertId = '" + SupplierCertId + "'"
+		where = where + " and a.SupplierCertId = '" + SupplierCertId + "'"
 	}
 	if SupplierTypeCode != "" {
-		where = where + " and SupplierTypeCode = '" + SupplierTypeCode + "'"
+		where = where + " and a.SupplierTypeCode = '" + SupplierTypeCode + "'"
 	}
 
 	total, list := svc.GetWaitAuditBusinesslist(page.CurrentPage, page.Size, orderby, OilSupplierCertSubName, OilClassOrgSettingName, where)