|
@@ -20,7 +20,7 @@ func GetSelectService(xormEngine *xorm.Engine) *SelectService {
|
|
|
return s
|
|
return s
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, supplierCertTableName, OilInfoChangeName, 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, liftjoon string) (total int64) {
|
|
|
|
|
|
|
|
//获取总记录数
|
|
//获取总记录数
|
|
@@ -42,19 +42,21 @@ func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, sup
|
|
|
sql += `a.LegalPerson,a.RegCapital,a.Mobile,b.AuditDate,b.ApplyTime,b.InFlag,a.ContactName,a.CommercialNo, `
|
|
sql += `a.LegalPerson,a.RegCapital,a.Mobile,b.AuditDate,b.ApplyTime,b.InFlag,a.ContactName,a.CommercialNo, `
|
|
|
sql += `a.DepositBank,a.HseTraining,a.CompanyType,a.SetupTime,a.Address,a.Province,a.City,a.Street, `
|
|
sql += `a.DepositBank,a.HseTraining,a.CompanyType,a.SetupTime,a.Address,a.Province,a.City,a.Street, `
|
|
|
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,`
|
|
|
|
|
|
|
+ sql += `b.InStyle, b.Id CertId, f.FullName, g.CheckUnitName, `
|
|
|
sql += `group_concat(distinct e.NeedFileType) NeedFileType `
|
|
sql += `group_concat(distinct e.NeedFileType) NeedFileType `
|
|
|
if liftjoon != "" {
|
|
if liftjoon != "" {
|
|
|
sql += `,group_concat(distinct d.Name) CerSubName `
|
|
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 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 += 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
|
|
|
|
|
|
|
|
- sql += ` group by a.Id,b.Id ` + having
|
|
|
|
|
|
|
+ sql += ` group by a.Id,b.Id,g.CheckUnitName ` + having
|
|
|
if asc {
|
|
if asc {
|
|
|
sql += ` order by ` + orderby + ` ASC `
|
|
sql += ` order by ` + orderby + ` ASC `
|
|
|
} else {
|
|
} else {
|