|
|
@@ -216,7 +216,7 @@ func (s *OilContractSumScoreService) GetPagingComputeEntitiesWithOrderBytbl2(pag
|
|
|
sql += ` left join ` + controllers.OilContractReviewName + ` review on review.ContractId=contract.id ` + reviewWhere
|
|
|
sql += ` left join ` + controllers.OilContractEvaluationItemsName + ` items on items.ContentReviewId=review.id and items.LevelCode=1 ` + where1
|
|
|
sql += ` where 1=1 and c.InFlag != '3' and c.status = '8' ` + supplierWhere
|
|
|
- sql += ` group by s.id, contract.SupplierId,contract.SupplierName `
|
|
|
+ sql += ` group by s.id, c.id, contract.SupplierId,contract.SupplierName `
|
|
|
sql += ` having ` + having
|
|
|
if asc {
|
|
|
sql += ` order by ` + orderby + ` ASC `
|
|
|
@@ -255,7 +255,7 @@ func (s *OilContractSumScoreService) GetPagingComputeEntitiesWithOrderBytbl3(pag
|
|
|
sqlCount += ` left join ` + controllers.OilContractReviewName + ` review on review.ContractId=contract.id ` + reviewWhere
|
|
|
sqlCount += ` left join ` + controllers.OilContractEvaluationItemsName + ` items on items.ContentReviewId=review.id and items.LevelCode=1 ` + where1
|
|
|
sqlCount += ` where 1=1 and c.InFlag != '3' and c.status = '8' ` + supplierWhere
|
|
|
- sqlCount += ` group by s.id, contract.SupplierId,contract.SupplierName `
|
|
|
+ sqlCount += ` group by s.id, c.id, contract.SupplierId,contract.SupplierName `
|
|
|
sqlCount += ` having ` + having
|
|
|
sqlCount += ` ) t `
|
|
|
|
|
|
@@ -295,7 +295,7 @@ func (s *OilContractSumScoreService) GetPagingComputeEntitiesWithOrderBytbl3(pag
|
|
|
sql += ` left join ` + controllers.OilContractReviewName + ` review on review.ContractId=contract.id ` + reviewWhere
|
|
|
sql += ` left join ` + controllers.OilContractEvaluationItemsName + ` items on items.ContentReviewId=review.id and items.LevelCode=1 ` + where1
|
|
|
sql += ` where 1=1 and c.InFlag != '3' and c.status = '8' ` + supplierWhere
|
|
|
- sql += ` group by s.id, contract.SupplierId,contract.SupplierName `
|
|
|
+ sql += ` group by s.id, c.id, contract.SupplierId,contract.SupplierName `
|
|
|
sql += ` having ` + having
|
|
|
if asc {
|
|
|
sql += ` order by ` + orderby + ` ASC `
|