|
|
@@ -2627,24 +2627,29 @@ func (this *OilSupplierController) CheckSupplierFile() {
|
|
|
|
|
|
var ids suppliercertsub.Ids
|
|
|
var ids1 suppliercertsub.Ids
|
|
|
- certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1)
|
|
|
- certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2)
|
|
|
+ certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3)
|
|
|
+
|
|
|
var needList []supplierfile.FileList
|
|
|
var needList1 []supplierfile.FileList
|
|
|
|
|
|
if cert.SupplierTypeCode == "01" {
|
|
|
//需要的资质
|
|
|
- needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "1")
|
|
|
- needList1 = filesvc.GetGoodsNeedFileListNew(ids1.Id, "2")
|
|
|
- for _, need := range needList1 {
|
|
|
- needList = append(needList, need)
|
|
|
- }
|
|
|
+ needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "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")
|
|
|
var needFile supplierfile.FileList
|
|
|
// 质量管理体系认证证书
|
|
|
CNPCrenkezhengshu := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "CNPCrenkezhengshu")
|
|
|
needFile.FileName = CNPCrenkezhengshu
|
|
|
needList = append(needList, needFile)
|
|
|
+ for _, need := range needList1 {
|
|
|
+ needList = append(needList, need)
|
|
|
+ }
|
|
|
}
|
|
|
} else if cert.SupplierTypeCode == "02" {
|
|
|
needList = filesvc.GetBasicNeedFileListNew(ids.Id)
|
|
|
@@ -2737,20 +2742,16 @@ func (this *OilSupplierController) CheckSupplierFileNew(){
|
|
|
|
|
|
var ids suppliercertsub.Ids
|
|
|
certsubService := suppliercertsub.GetOilSupplierCertSubService(utils.DBE)
|
|
|
- certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1)
|
|
|
+ certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 3)
|
|
|
+ //certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids, 1)
|
|
|
var ids1 suppliercertsub.Ids
|
|
|
- certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2)
|
|
|
+ //certsubService.GetIds(strconv.Itoa(cert.Id), cert.SupplierTypeCode, &ids1, 2)
|
|
|
var needList []supplierfile.FileList
|
|
|
var needList1 []supplierfile.FileList
|
|
|
|
|
|
if cert.SupplierTypeCode == "01" {
|
|
|
//需要的资质
|
|
|
- //needList = filesvc.GetGoodsNeedFileListNew(ids.Id, strconv.Itoa(file.Type))
|
|
|
- needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "1")
|
|
|
- needList1 = filesvc.GetGoodsNeedFileListNew(ids1.Id, "2")
|
|
|
- for _, need := range needList1 {
|
|
|
- needList = append(needList, need)
|
|
|
- }
|
|
|
+
|
|
|
total := certsubService.GetCountIsManufacturer(strconv.Itoa(cert.Id))
|
|
|
if file.Type == 2 && total > 0 {
|
|
|
errinfo.Message = "非制造商准入范围不能为制造商,请手动修改!"
|
|
|
@@ -2768,12 +2769,21 @@ func (this *OilSupplierController) CheckSupplierFileNew(){
|
|
|
this.ServeJSON()
|
|
|
return
|
|
|
}
|
|
|
+ needList = filesvc.GetGoodsNeedFileListNew(ids.Id, "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")
|
|
|
var needFile supplierfile.FileList
|
|
|
// 质量管理体系认证证书
|
|
|
CNPCrenkezhengshu := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "CNPCrenkezhengshu")
|
|
|
needFile.FileName = CNPCrenkezhengshu
|
|
|
needList = append(needList, needFile)
|
|
|
+ for _, need := range needList1 {
|
|
|
+ needList = append(needList, need)
|
|
|
+ }
|
|
|
}
|
|
|
} else if cert.SupplierTypeCode == "02" {
|
|
|
needList = filesvc.GetBasicNeedFileListNew(ids.Id)
|