|
|
@@ -4086,10 +4086,13 @@ func (this *OilSupplierController) markLackCertSub(file supplierfile.CheckFile)
|
|
|
if cert.SupplierTypeCode == "01" {
|
|
|
where2 += " and IsManufacturer != 2"
|
|
|
supplierService.GetDeleteSub3(OilGoodsAptitudeName, where2, &certSub, header.Name)
|
|
|
+ supplierService.GetDeleteSub4("Id = "+file.CertId, &certSub, header.Name)
|
|
|
} else if cert.SupplierTypeCode == "02" {
|
|
|
supplierService.GetDeleteSub3(OilBasisBuildName, where2, &certSub, header.Name)
|
|
|
+ supplierService.GetDeleteSub4("Id = "+file.CertId, &certSub, header.Name)
|
|
|
} else {
|
|
|
supplierService.GetDeleteSub3(OilTechnologyServiceName, where2, &certSub, header.Name)
|
|
|
+ supplierService.GetDeleteSub4("Id = "+file.CertId, &certSub, header.Name)
|
|
|
}
|
|
|
} else {
|
|
|
fmt.Print("22222")
|
|
|
@@ -4119,6 +4122,7 @@ func (this *OilSupplierController) markLackCertSub(file supplierfile.CheckFile)
|
|
|
where2 += " and IsManufacturer = 2"
|
|
|
}
|
|
|
supplierService.GetDeleteSub3(OilGoodsAptitudeName, where2, &certSub, header.Name)
|
|
|
+ supplierService.GetDeleteSub4("Id = "+file.CertId, &certSub, header.Name)
|
|
|
} else {
|
|
|
fmt.Print("22222")
|
|
|
}
|
|
|
@@ -4204,7 +4208,6 @@ func (this *OilSupplierController) GetLackCertList() {
|
|
|
return
|
|
|
}
|
|
|
supService := supplier.GetOilSupplierService(utils.DBE)
|
|
|
- var supEntity supplier.OilSupplier
|
|
|
certService := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
var allCertList []suppliercert.OilSupplierCert
|
|
|
whereCert := " Status = '8' or Status = '11' "
|
|
|
@@ -4215,6 +4218,7 @@ func (this *OilSupplierController) GetLackCertList() {
|
|
|
_, _ = certService.DBE.Exec(sql)
|
|
|
log.Println("共查询到准入条数:", len(allCertList))
|
|
|
for _, certEntity := range allCertList {
|
|
|
+ var supEntity supplier.OilSupplier
|
|
|
supService.GetEntityById(certEntity.SupplierId, &supEntity)
|
|
|
var file supplierfile.CheckFile
|
|
|
file.CertId = strconv.Itoa(certEntity.Id)
|
|
|
@@ -4243,18 +4247,21 @@ func (this *OilSupplierController) GetLackCertSubList() {
|
|
|
return
|
|
|
}
|
|
|
supService := supplier.GetOilSupplierService(utils.DBE)
|
|
|
- var supEntity supplier.OilSupplier
|
|
|
+
|
|
|
certService := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
var allCertList []suppliercert.OilSupplierCert
|
|
|
whereCert := " Status = '8' or Status = '11' "
|
|
|
certService.GetEntitysByWhere(OilSupplierCertName, whereCert, &allCertList)
|
|
|
if len(allCertList) > 0 {
|
|
|
// 重置标识
|
|
|
- sql := "update " + OilSupplierCertSubName + " set LackFile1 = '',IsQuestion1 = 0 "
|
|
|
+ sql := "update " + OilSupplierCertSubName + " set IsQuestion1 = 0 "
|
|
|
+ _, _ = certService.DBE.Exec(sql)
|
|
|
+ sql = "update " + OilSupplierCertName + " set LackFileName = '' "
|
|
|
_, _ = certService.DBE.Exec(sql)
|
|
|
log.Println("共查询到准入条数:", len(allCertList))
|
|
|
for _, certEntity := range allCertList {
|
|
|
- supService.GetEntityById(certEntity.SupplierId, &supEntity)
|
|
|
+ var supEntity supplier.OilSupplier
|
|
|
+ supService.GetEntityByWhere(OilSupplierName, "Id = "+strconv.Itoa(certEntity.SupplierId), &supEntity)
|
|
|
var file supplierfile.CheckFile
|
|
|
file.CertId = strconv.Itoa(certEntity.Id)
|
|
|
file.SupplierId = certEntity.SupplierId
|