|
@@ -562,7 +562,9 @@ func (this *BadRecordController) SerachGoodsCertByCompany() {
|
|
|
var tempEntity suppliercertsub.OilSupplierCertSub
|
|
var tempEntity suppliercertsub.OilSupplierCertSub
|
|
|
|
|
|
|
|
var goodslist []map[string]string
|
|
var goodslist []map[string]string
|
|
|
- sql := "select * from " + OilSupplierCertSubName + " where SupplierId='"+companyId+"' and SupplierTypeCode='01' "+ sqlAdd +" order by CertSubStatus desc,Id asc limit "+ye+","+size+""
|
|
|
|
|
|
|
+ sql := "select a.*, b.CreateOn badCreateOn, b.BackReason from " + OilSupplierCertSubName + " a"
|
|
|
|
|
+ sql = sql + " LEFT JOIN OilSupplierPauseReason b ON b.Id=( SELECT Id FROM OilSupplierPauseReason t WHERE t.CertSubId=a.Id ORDER BY t.Id DESC LIMIT 1)"
|
|
|
|
|
+ sql = sql + " where a.SupplierId='"+companyId+"' and a.SupplierTypeCode='01' "+ sqlAdd +" order by a.CertSubStatus desc,a.Id asc limit "+ye+","+size+""
|
|
|
goodslist, _ = svc.DBE.QueryString(sql)
|
|
goodslist, _ = svc.DBE.QueryString(sql)
|
|
|
|
|
|
|
|
goodsTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='01' "+ sqlAdd +"")
|
|
goodsTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='01' "+ sqlAdd +"")
|
|
@@ -597,7 +599,9 @@ func (this *BadRecordController) SerachBasisCertByCompany() {
|
|
|
var tempEntity suppliercertsub.OilSupplierCertSub
|
|
var tempEntity suppliercertsub.OilSupplierCertSub
|
|
|
|
|
|
|
|
var basislist []map[string]string
|
|
var basislist []map[string]string
|
|
|
- sql := "select * from " + OilSupplierCertSubName + " where SupplierId='"+companyId+"' and SupplierTypeCode='02' "+ sqlAdd +" order by CertSubStatus desc,Id asc limit "+ye+","+size+""
|
|
|
|
|
|
|
+ sql := "select a.*, b.CreateOn badCreateOn, b.BackReason from " + OilSupplierCertSubName + " a"
|
|
|
|
|
+ sql = sql + " LEFT JOIN OilSupplierPauseReason b ON b.Id=( SELECT Id FROM OilSupplierPauseReason t WHERE t.CertSubId=a.Id ORDER BY t.Id DESC LIMIT 1)"
|
|
|
|
|
+ sql = sql + " where a.SupplierId='"+companyId+"' and a.SupplierTypeCode='02' "+ sqlAdd +" order by a.CertSubStatus desc,a.Id asc limit "+ye+","+size+""
|
|
|
basislist, _ = svc.DBE.QueryString(sql)
|
|
basislist, _ = svc.DBE.QueryString(sql)
|
|
|
|
|
|
|
|
basisTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='02' "+ sqlAdd +"")
|
|
basisTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='02' "+ sqlAdd +"")
|
|
@@ -631,7 +635,9 @@ func (this *BadRecordController) SerachTCCertByCompany() {
|
|
|
var tempEntity suppliercertsub.OilSupplierCertSub
|
|
var tempEntity suppliercertsub.OilSupplierCertSub
|
|
|
|
|
|
|
|
var tclist []map[string]string
|
|
var tclist []map[string]string
|
|
|
- sql := "select * from " + OilSupplierCertSubName + " where SupplierId='"+companyId+"' and SupplierTypeCode='03' "+ sqlAdd +" order by CertSubStatus desc,Id asc limit "+ye+","+size+""
|
|
|
|
|
|
|
+ sql := "select a.*, b.CreateOn badCreateOn, b.BackReason from " + OilSupplierCertSubName + " a"
|
|
|
|
|
+ sql = sql + " LEFT JOIN OilSupplierPauseReason b ON b.Id=( SELECT Id FROM OilSupplierPauseReason t WHERE t.CertSubId=a.Id ORDER BY t.Id DESC LIMIT 1)"
|
|
|
|
|
+ sql = sql + " where a.SupplierId='"+companyId+"' and a.SupplierTypeCode='03' "+ sqlAdd +" order by a.CertSubStatus desc,a.Id asc limit "+ye+","+size+""
|
|
|
tclist, _ = svc.DBE.QueryString(sql)
|
|
tclist, _ = svc.DBE.QueryString(sql)
|
|
|
|
|
|
|
|
tcTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='03' "+ sqlAdd +"")
|
|
tcTotal,_:=svc.GetCount(tempEntity,"SupplierId='"+companyId+"' and SupplierTypeCode='03' "+ sqlAdd +"")
|