|
|
@@ -4065,6 +4065,9 @@ func (this *OilSupplierController) markLackCertSub(file supplierfile.CheckFile)
|
|
|
}
|
|
|
|
|
|
for _, needHeader := range needList {
|
|
|
+ if needHeader.FileName == "安全资质审查" || needHeader.FileName == "培训考核" {
|
|
|
+ continue
|
|
|
+ }
|
|
|
if (supplierEntity.CredentialFlag == "1" || supplierEntity.CredentialFlag == "2") &&
|
|
|
strings.Contains(mergerCertSkipField, needHeader.FileName+",") {
|
|
|
//三证合一或五证合一的证件,不需要验证了
|
|
|
@@ -4100,6 +4103,9 @@ func (this *OilSupplierController) markLackCertSub(file supplierfile.CheckFile)
|
|
|
}
|
|
|
}
|
|
|
for _, needHeader := range needList1 {
|
|
|
+ if needHeader.FileName == "安全资质审查" || needHeader.FileName == "培训考核" {
|
|
|
+ continue
|
|
|
+ }
|
|
|
// 非制造
|
|
|
if (supplierEntity.CredentialFlag == "1" || supplierEntity.CredentialFlag == "2") &&
|
|
|
strings.Contains(mergerCertSkipField, needHeader.FileName+",") {
|
|
|
@@ -4250,7 +4256,7 @@ func (this *OilSupplierController) GetLackCertSubList() {
|
|
|
|
|
|
certService := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
var allCertList []suppliercert.OilSupplierCert
|
|
|
- whereCert := " Status = '8' or Status = '11' "
|
|
|
+ whereCert := " (Status = '8' or Status = '11') and (SupplierTypeCode = '02' or SupplierTypeCode = '03') "
|
|
|
certService.GetEntitysByWhere(OilSupplierCertName, whereCert, &allCertList)
|
|
|
if len(allCertList) > 0 {
|
|
|
// 重置标识
|
|
|
@@ -4279,3 +4285,32 @@ func (this *OilSupplierController) GetLackCertSubList() {
|
|
|
}
|
|
|
log.Println("结束")
|
|
|
}
|
|
|
+
|
|
|
+// @Title 恢复缺安全资质审查的准入范围
|
|
|
+// @Description 恢复缺安全资质审查的准入范围-06-27
|
|
|
+// @Success 200 {object}
|
|
|
+// @router /recoverCertSub [get]
|
|
|
+func (this *OilSupplierController) RecoverCertSub() {
|
|
|
+ certService := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
+ var allCertList []suppliercert.OilSupplierCert
|
|
|
+ whereCert := " (SupplierTypeCode = '02' or SupplierTypeCode = '03') and LackFileName != '' "
|
|
|
+ certService.GetEntitysByWhere(OilSupplierCertName, whereCert, &allCertList)
|
|
|
+ if len(allCertList) > 0 {
|
|
|
+ log.Println("共查询到准入条数:", len(allCertList))
|
|
|
+ for _, certEntity := range allCertList {
|
|
|
+ var certSub []suppliercertsub.OilSupplierCertSub
|
|
|
+ where1 := "SupplierTypeCode = '" + certEntity.SupplierTypeCode + "' and SupplierCertId = " + strconv.Itoa(certEntity.Id)
|
|
|
+ certService.GetEntitysByWhere("OilSupplierCertSub2", where1, &certSub)
|
|
|
+ for _, sub := range certSub {
|
|
|
+ var certSubEntity suppliercertsub.OilSupplierCertSub
|
|
|
+ where2 := "SupplierTypeCode = '" + certEntity.SupplierTypeCode + "' and SupplierCertId = " + strconv.Itoa(certEntity.Id) + " and Name = '" + sub.Name + "'"
|
|
|
+ certService.GetEntityByWhere("OilSupplierCertSub", where2, &certSubEntity)
|
|
|
+ if certSubEntity.Id == 0 {
|
|
|
+ // 插入
|
|
|
+ certService.InsertEntityBytbl("OilSupplierCertSub", &sub)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ log.Println("结束")
|
|
|
+}
|