|
@@ -21,7 +21,7 @@ func GetSelectService(xormEngine *xorm.Engine) *SelectService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, supplierCertTableName, OilInfoChangeName, OilCorporateInfoName, OilSupplierCertSubName,
|
|
func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, supplierCertTableName, OilInfoChangeName, OilCorporateInfoName, OilSupplierCertSubName,
|
|
|
- OilSupplierFileName string, pageIndex, itemsPerPage int64, orderby string, asc bool, entitiesPtr interface{}, where,having, liftjoon string) (total int64) {
|
|
|
|
|
|
|
+ OilSupplierFileName string, pageIndex, itemsPerPage int64, orderby string, asc bool, entitiesPtr interface{}, where,having, CerSubName string, Ids string) (total int64) {
|
|
|
|
|
|
|
|
//获取总记录数
|
|
//获取总记录数
|
|
|
/*sqlCount := `select count(*) from (`
|
|
/*sqlCount := `select count(*) from (`
|
|
@@ -44,18 +44,18 @@ func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, sup
|
|
|
sql += `a.LinkAddress,a.LinkProvince,a.LinkCity,a.LinkStreet,a.BusinessScope, `
|
|
sql += `a.LinkAddress,a.LinkProvince,a.LinkCity,a.LinkStreet,a.BusinessScope, `
|
|
|
sql += `b.InStyle, b.Id CertId, f.FullName, b.RecUnitName as CheckUnitName, b.Remark, `
|
|
sql += `b.InStyle, b.Id CertId, f.FullName, b.RecUnitName as CheckUnitName, b.Remark, `
|
|
|
sql += `group_concat(distinct e.NeedFileType) NeedFileType `
|
|
sql += `group_concat(distinct e.NeedFileType) NeedFileType `
|
|
|
- if liftjoon != "" {
|
|
|
|
|
- sql += `,group_concat(distinct d.Name) CerSubName `
|
|
|
|
|
- }
|
|
|
|
|
sql += `from ` + supplierTableName + ` a `
|
|
sql += `from ` + supplierTableName + ` a `
|
|
|
sql += `left join ` + supplierCertTableName + ` b on b.SupplierId = a.Id `
|
|
sql += `left join ` + supplierCertTableName + ` b on b.SupplierId = a.Id `
|
|
|
sql += `left join Base_Organize f on f.Id = b.ThirdAudit `
|
|
sql += `left join Base_Organize f on f.Id = b.ThirdAudit `
|
|
|
// sql += `left join OilCorporateInfo g on g.CommercialNo = a.CommercialNo `
|
|
// sql += `left join OilCorporateInfo g on g.CommercialNo = a.CommercialNo `
|
|
|
// sql += `left join ` + OilInfoChangeName + ` c on c.SupplierId = a.Id `
|
|
// sql += `left join ` + OilInfoChangeName + ` c on c.SupplierId = a.Id `
|
|
|
- sql += liftjoon
|
|
|
|
|
sql += `left join ` + OilSupplierFileName + ` e on e.SupplierId = a.Id `
|
|
sql += `left join ` + OilSupplierFileName + ` e on e.SupplierId = a.Id `
|
|
|
sql += `where ` + where
|
|
sql += `where ` + where
|
|
|
|
|
|
|
|
|
|
+ if CerSubName != "" && Ids != "" {
|
|
|
|
|
+ sql += " and b.Id in (" + Ids + ")"
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
sql += ` group by a.Id,b.Id ` + having
|
|
sql += ` group by a.Id,b.Id ` + having
|
|
|
if asc {
|
|
if asc {
|
|
|
sql += ` order by ` + orderby + ` ASC `
|
|
sql += ` order by ` + orderby + ` ASC `
|