|
|
@@ -2654,23 +2654,48 @@ func (this *OilSupplierController) CheckSupplierFile() {
|
|
|
filesvc := supplierfile.GetSupplierfileService(utils.DBE)
|
|
|
mergerCertSkipField := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MergerCertSkipFieldName")
|
|
|
|
|
|
- var ids suppliercertsub.Ids
|
|
|
- var ids1 suppliercertsub.Ids
|
|
|
- certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3)
|
|
|
+ idString := ""
|
|
|
+ idString1 := ""
|
|
|
+ for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ var ids suppliercertsub.Ids
|
|
|
+ certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3, strconv.Itoa(i))
|
|
|
+ if ids.Id != "" {
|
|
|
+ idString += "," + ids.Id
|
|
|
+ } else {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
var needList []supplierfile.FileList
|
|
|
var needList1 []supplierfile.FileList
|
|
|
|
|
|
if cert.SupplierTypeCode == "01" {
|
|
|
//需要的资质
|
|
|
- needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "2")
|
|
|
+ needList = filesvc.GetGoodsNeedFileListNew(idString, "2")
|
|
|
if file.Type == 1 { //制造商
|
|
|
+ idString = ""
|
|
|
//如果是制造商,准入范围按照各项准入范围的类型判断
|
|
|
- var ids suppliercertsub.Ids
|
|
|
- certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1)
|
|
|
- certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2)
|
|
|
- needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "1")
|
|
|
- needList1 = filesvc.GetGoodsNeedFileListNew(ids1.Id, "2")
|
|
|
+ for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ var ids suppliercertsub.Ids
|
|
|
+ certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1, strconv.Itoa(i))
|
|
|
+
|
|
|
+ if ids.Id != "" {
|
|
|
+ idString += "," + ids.Id
|
|
|
+ } else {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ var ids1 suppliercertsub.Ids
|
|
|
+ certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2, strconv.Itoa(i))
|
|
|
+ if ids1.Id != "" {
|
|
|
+ idString1 += "," + ids1.Id
|
|
|
+ } else {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ needList = filesvc.GetGoodsNeedFileListNew(idString, "1")
|
|
|
+ needList1 = filesvc.GetGoodsNeedFileListNew(idString1, "2")
|
|
|
var needFile supplierfile.FileList
|
|
|
// 质量管理体系认证证书
|
|
|
CNPCrenkezhengshu := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "CNPCrenkezhengshu")
|
|
|
@@ -2681,9 +2706,9 @@ func (this *OilSupplierController) CheckSupplierFile() {
|
|
|
}
|
|
|
}
|
|
|
} else if cert.SupplierTypeCode == "02" {
|
|
|
- needList = filesvc.GetBasicNeedFileListNew(ids.Id)
|
|
|
+ needList = filesvc.GetBasicNeedFileListNew(idString)
|
|
|
} else if cert.SupplierTypeCode == "03" {
|
|
|
- needList = filesvc.GetTechNeedFileListNew(ids.Id)
|
|
|
+ needList = filesvc.GetTechNeedFileListNew(idString)
|
|
|
}
|
|
|
|
|
|
//if cert.InStyle == "4" {
|
|
|
@@ -2769,11 +2794,21 @@ func (this *OilSupplierController) CheckSupplierFileNew() {
|
|
|
filesvc := supplierfile.GetSupplierfileService(utils.DBE)
|
|
|
mergerCertSkipField := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MergerCertSkipFieldName")
|
|
|
|
|
|
- var ids suppliercertsub.Ids
|
|
|
+ var certSubList []suppliercertsub.OilSupplierCertSub
|
|
|
certsubService := suppliercertsub.GetOilSupplierCertSubService(utils.DBE)
|
|
|
- certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3)
|
|
|
+ certsubService.GetListByCertId(strconv.Itoa(cert.Id), &certSubList)
|
|
|
+ idString := ""
|
|
|
+ idString1 := ""
|
|
|
+ for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ var ids suppliercertsub.Ids
|
|
|
+ certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3, strconv.Itoa(i))
|
|
|
+ if ids.Id != "" {
|
|
|
+ idString += "," + ids.Id
|
|
|
+ } else {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
//certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1)
|
|
|
- var ids1 suppliercertsub.Ids
|
|
|
//certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2)
|
|
|
var needList []supplierfile.FileList
|
|
|
var needList1 []supplierfile.FileList
|
|
|
@@ -2798,13 +2833,29 @@ func (this *OilSupplierController) CheckSupplierFileNew() {
|
|
|
this.ServeJSON()
|
|
|
return
|
|
|
}
|
|
|
- needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "2")
|
|
|
+ needList = filesvc.GetGoodsNeedFileListNew(idString, "2")
|
|
|
if file.Type == 1 { //制造商
|
|
|
- var ids suppliercertsub.Ids
|
|
|
- certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1)
|
|
|
- certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2)
|
|
|
- needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "1")
|
|
|
- needList1 = filesvc.GetGoodsNeedFileListNew(ids1.Id, "2")
|
|
|
+ idString = ""
|
|
|
+ for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ var ids suppliercertsub.Ids
|
|
|
+ certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1, strconv.Itoa(i))
|
|
|
+ if ids.Id != "" {
|
|
|
+ idString += "," + ids.Id
|
|
|
+ } else {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ var ids1 suppliercertsub.Ids
|
|
|
+ certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2, strconv.Itoa(i))
|
|
|
+ if ids1.Id != "" {
|
|
|
+ idString1 += "," + ids1.Id
|
|
|
+ } else {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ needList = filesvc.GetGoodsNeedFileListNew(idString, "1")
|
|
|
+ needList1 = filesvc.GetGoodsNeedFileListNew(idString1, "2")
|
|
|
var needFile supplierfile.FileList
|
|
|
// 质量管理体系认证证书
|
|
|
CNPCrenkezhengshu := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "CNPCrenkezhengshu")
|
|
|
@@ -2815,9 +2866,9 @@ func (this *OilSupplierController) CheckSupplierFileNew() {
|
|
|
}
|
|
|
}
|
|
|
} else if cert.SupplierTypeCode == "02" {
|
|
|
- needList = filesvc.GetBasicNeedFileListNew(ids.Id)
|
|
|
+ needList = filesvc.GetBasicNeedFileListNew(idString)
|
|
|
} else if cert.SupplierTypeCode == "03" {
|
|
|
- needList = filesvc.GetTechNeedFileListNew(ids.Id)
|
|
|
+ needList = filesvc.GetTechNeedFileListNew(idString)
|
|
|
}
|
|
|
|
|
|
//2021-02-04企管法规处去掉这一限制
|
|
|
@@ -2903,6 +2954,10 @@ func (this *OilSupplierController) CheckSupplierFileDelete() {
|
|
|
var supplierCertEntity []suppliercert.OilSupplierCert
|
|
|
supplierService.GetEntitysByWhere("OilSupplierCert", "SupplierId = "+strconv.Itoa(supplier.Id), &supplierCertEntity)
|
|
|
for _, cert := range supplierCertEntity {
|
|
|
+ if cert.SupplierTypeCode == "01" {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+
|
|
|
where2 := "("
|
|
|
where3 := "("
|
|
|
//对准入范围的判断
|
|
|
@@ -2923,33 +2978,56 @@ func (this *OilSupplierController) CheckSupplierFileDelete() {
|
|
|
filesvc := supplierfile.GetSupplierfileService(utils.DBE)
|
|
|
mergerCertSkipField := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MergerCertSkipFieldName")
|
|
|
|
|
|
- var ids suppliercertsub.Ids
|
|
|
- var ids1 suppliercertsub.Ids
|
|
|
- certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3)
|
|
|
-
|
|
|
+ idString := ""
|
|
|
+ idString1 := ""
|
|
|
+ for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ var ids suppliercertsub.Ids
|
|
|
+ certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3, strconv.Itoa(i))
|
|
|
+ if ids.Id != "" {
|
|
|
+ idString += "," + ids.Id
|
|
|
+ } else {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
var needList []supplierfile.FileList
|
|
|
var needList1 []supplierfile.FileList
|
|
|
|
|
|
if cert.SupplierTypeCode == "01" {
|
|
|
//需要的资质
|
|
|
- needList1 = filesvc.GetGoodsNeedFileListNew(ids.Id, "2")
|
|
|
+ needList1 = filesvc.GetGoodsNeedFileListNew(idString, "2")
|
|
|
if supplier.OperType == "制造商" { //制造商
|
|
|
//如果是制造商,准入范围按照各项准入范围的类型判断
|
|
|
- var ids suppliercertsub.Ids
|
|
|
// 制造
|
|
|
- certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1)
|
|
|
+ idString = ""
|
|
|
+ for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ var ids suppliercertsub.Ids
|
|
|
+ certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1, strconv.Itoa(i))
|
|
|
+ if ids.Id != "" {
|
|
|
+ idString += "," + ids.Id
|
|
|
+ } else {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
// 非制造
|
|
|
- certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2)
|
|
|
- needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "1")
|
|
|
- needList1 = filesvc.GetGoodsNeedFileListNew(ids1.Id, "2")
|
|
|
+ for i := 0; i < len(certSubList); i = i+1000 {
|
|
|
+ var ids1 suppliercertsub.Ids
|
|
|
+ certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2, strconv.Itoa(i))
|
|
|
+ if ids1.Id != "" {
|
|
|
+ idString1 += "," + ids1.Id
|
|
|
+ } else {
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ needList = filesvc.GetGoodsNeedFileListNew(idString, "1")
|
|
|
+ needList1 = filesvc.GetGoodsNeedFileListNew(idString1, "2")
|
|
|
//for _, need := range needList1 {
|
|
|
// needList = append(needList, need)
|
|
|
//}
|
|
|
}
|
|
|
} else if cert.SupplierTypeCode == "02" {
|
|
|
- needList = filesvc.GetBasicNeedFileListNew(ids.Id)
|
|
|
+ needList = filesvc.GetBasicNeedFileListNew(idString)
|
|
|
} else if cert.SupplierTypeCode == "03" {
|
|
|
- needList = filesvc.GetTechNeedFileListNew(ids.Id)
|
|
|
+ needList = filesvc.GetTechNeedFileListNew(idString)
|
|
|
}
|
|
|
|
|
|
needName := ""
|