|
|
@@ -5,6 +5,7 @@ import (
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
|
|
|
"dashoo.cn/business/parameter"
|
|
|
"encoding/json"
|
|
|
+
|
|
|
//"fmt"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
@@ -418,6 +419,10 @@ func (this *OilSupplierCertSubController) AddTechBus() {
|
|
|
svcCert := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
svcCert.GetEntityById(datamain.SupplierCertId, &supplierCertModel)
|
|
|
|
|
|
+ var supplierModel supplier.OilSupplier
|
|
|
+ svcSupplier := supplier.GetOilSupplierService(utils.DBE)
|
|
|
+ svcSupplier.GetEntityById(datamain.SupplierCertId, &supplierModel)
|
|
|
+
|
|
|
for n := 0; n < len(dataother.CheckList); n++ {
|
|
|
where_sub := "SupplierTypeCode = 03 and SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "'"
|
|
|
where_sub += " and SupplierCertId = '" + strconv.Itoa(dataother.SupplierCertId) + "'"
|
|
|
@@ -450,12 +455,19 @@ func (this *OilSupplierCertSubController) AddTechBus() {
|
|
|
where := "SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "'"
|
|
|
svc.GetEntitysByWhere(OilSupplierFileName, where, &list)
|
|
|
|
|
|
+ //三证合一或五证合一不需要的字段
|
|
|
+ mergerCertSkipField := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MergerCertSkipFieldName")
|
|
|
+
|
|
|
//"营业执照,组织代码,组织机构代码证,税务登记证,税务登记,开户许可,银行开户许可证,承诺书,诚信合规承诺书,企业信息系统截图,战略合作协议扫描件,"
|
|
|
mustField := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MustFieldName")
|
|
|
for i := 0; i < len(needList); i++ {
|
|
|
var entity supplierfile.OilSupplierFile
|
|
|
entity.SupplierId = dataother.SupplierId
|
|
|
|
|
|
+ if (supplierModel.CredentialFlag == "1" || supplierModel.CredentialFlag == "2") && strings.Contains(mergerCertSkipField, needList[i].FileName+",") { //三证合一或五证合一了
|
|
|
+ continue
|
|
|
+ }
|
|
|
+
|
|
|
if strings.Contains(mustField, needList[i].FileName+",") {
|
|
|
entity.SupplierTypeCode = "000"
|
|
|
} else {
|
|
|
@@ -519,6 +531,10 @@ func (this *OilSupplierCertSubController) AddBusiness() {
|
|
|
svcCert := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
svcCert.GetEntityById(model.SupplierCertId, &supplierCertModel)
|
|
|
|
|
|
+ var supplierModel supplier.OilSupplier
|
|
|
+ svcSupplier := supplier.GetOilSupplierService(utils.DBE)
|
|
|
+ svcSupplier.GetEntityById(model.SupplierCertId, &supplierModel)
|
|
|
+
|
|
|
paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
|
|
|
filesvc := supplierfile.GetSupplierfileService(utils.DBE)
|
|
|
var needList []supplierfile.FileList
|
|
|
@@ -542,12 +558,20 @@ func (this *OilSupplierCertSubController) AddBusiness() {
|
|
|
where := "SupplierId = '" + strconv.Itoa(model.SupplierId) + "'"
|
|
|
svc.GetEntitysByWhere(OilSupplierFileName, where, &list)
|
|
|
|
|
|
+ //三证合一或五证合一不需要的字段
|
|
|
+ mergerCertSkipField := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MergerCertSkipFieldName")
|
|
|
+
|
|
|
//"营业执照,组织代码,组织机构代码证,税务登记证,税务登记,开户许可,银行开户许可证,承诺书,诚信合规承诺书,企业信息系统截图,战略合作协议扫描件,"
|
|
|
mustField := paramSvc.GetBaseparameterMessage("GFGL", "paramset", "MustFieldName")
|
|
|
+
|
|
|
for i := 0; i < len(needList); i++ {
|
|
|
var entity supplierfile.OilSupplierFile
|
|
|
entity.SupplierId = model.SupplierId
|
|
|
|
|
|
+ if (supplierModel.CredentialFlag == "1" || supplierModel.CredentialFlag == "2") && strings.Contains(mergerCertSkipField, needList[i].FileName+",") { //三证合一或五证合一了
|
|
|
+ continue
|
|
|
+ }
|
|
|
+
|
|
|
if strings.Contains(mustField, needList[i].FileName+",") {
|
|
|
entity.SupplierTypeCode = "000"
|
|
|
} else {
|