|
@@ -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, CerSubName string, Ids string) (total int64) {
|
|
|
|
|
|
|
+ OilSupplierFileName string, pageIndex, itemsPerPage int64, orderby string, asc bool, entitiesPtr interface{}, where,having, CerSubName string, Ids string, NeedFileType string) (total int64) {
|
|
|
|
|
|
|
|
//获取总记录数
|
|
//获取总记录数
|
|
|
/*sqlCount := `select count(*) from (`
|
|
/*sqlCount := `select count(*) from (`
|
|
@@ -42,14 +42,19 @@ func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, sup
|
|
|
sql += `a.LegalPerson,a.RegCapital,a.Mobile,b.AuditDate,b.ApplyTime,b.EffectEndTime,b.InFlag,a.ContactName,a.CommercialNo, `
|
|
sql += `a.LegalPerson,a.RegCapital,a.Mobile,b.AuditDate,b.ApplyTime,b.EffectEndTime,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, f.FullName, b.RecUnitName as CheckUnitName, b.Remark, `
|
|
|
|
|
- sql += `group_concat(distinct e.NeedFileType) NeedFileType `
|
|
|
|
|
|
|
+ sql += `b.InStyle, b.Id CertId, f.FullName, b.RecUnitName as CheckUnitName, b.Remark `
|
|
|
|
|
+ if NeedFileType != "" {
|
|
|
|
|
+ sql += `,group_concat(distinct e.NeedFileType) NeedFileType `
|
|
|
|
|
+ }
|
|
|
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 += `left join ` + OilSupplierFileName + ` e on e.SupplierId = a.Id `
|
|
|
|
|
|
|
+ if NeedFileType != "" {
|
|
|
|
|
+ sql += `left join ` + OilSupplierFileName + ` e on e.SupplierId = a.Id `
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
sql += `where ` + where
|
|
sql += `where ` + where
|
|
|
|
|
|
|
|
if CerSubName != "" && Ids != "" {
|
|
if CerSubName != "" && Ids != "" {
|