|
@@ -38,11 +38,11 @@ func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, sup
|
|
|
sqlCount += `group by a.Id,b.Id `+having+`) f`*/
|
|
sqlCount += `group by a.Id,b.Id `+having+`) f`*/
|
|
|
// TODO 推荐单位不从供方注册表取
|
|
// TODO 推荐单位不从供方注册表取
|
|
|
var sql string
|
|
var sql string
|
|
|
- sql = `select SQL_CALC_FOUND_ROWS a.Id,a.SupplierName,b.AccessCardNo,max(c.OldSupplierName) OldSupplierName,b.SupplierTypeCode,`
|
|
|
|
|
|
|
+ sql = `select SQL_CALC_FOUND_ROWS a.Id,a.SupplierName,b.AccessCardNo, a.OldSupplierName, b.SupplierTypeCode,`
|
|
|
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, g.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 != "" {
|
|
if liftjoon != "" {
|
|
|
sql += `,group_concat(distinct d.Name) CerSubName `
|
|
sql += `,group_concat(distinct d.Name) CerSubName `
|
|
@@ -50,13 +50,13 @@ func (s *SelectService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, sup
|
|
|
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 ` + OilInfoChangeName + ` c on c.SupplierId = a.Id `
|
|
|
|
|
|
|
+ // sql += `left join OilCorporateInfo g on g.CommercialNo = a.CommercialNo `
|
|
|
|
|
+ // 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,g.CheckUnitName ` + having
|
|
|
|
|
|
|
+ sql += ` group by a.Id,b.Id ` + having
|
|
|
if asc {
|
|
if asc {
|
|
|
sql += ` order by ` + orderby + ` ASC `
|
|
sql += ` order by ` + orderby + ` ASC `
|
|
|
} else {
|
|
} else {
|