|
|
@@ -1,6 +1,7 @@
|
|
|
package oilsupplier
|
|
|
|
|
|
import (
|
|
|
+ "dashoo.cn/backend/api/business/oilsupplier/suppliercert"
|
|
|
"encoding/json"
|
|
|
//"fmt"
|
|
|
"strconv"
|
|
|
@@ -308,8 +309,11 @@ func (this *OilSupplierCertSubController) AddGoodsBus() {
|
|
|
var jsonblob = this.Ctx.Input.RequestBody
|
|
|
var datamain suppliercertsub.OilSupplierCertSub
|
|
|
var dataother suppliercertsub.SupplierCertSubModel
|
|
|
+ var supplierCertModel suppliercert.OilSupplierCert
|
|
|
json.Unmarshal(jsonblob, &datamain)
|
|
|
json.Unmarshal(jsonblob, &dataother)
|
|
|
+ svcCert := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
+ svcCert.GetEntityById(datamain.SupplierCertId, &supplierCertModel)
|
|
|
|
|
|
var errinfo ErrorDataInfo
|
|
|
for n := 0; ; n++ {
|
|
|
@@ -338,6 +342,11 @@ func (this *OilSupplierCertSubController) AddGoodsBus() {
|
|
|
|
|
|
filesvc := supplierfile.GetSupplierfileService(utils.DBE)
|
|
|
needList := filesvc.GetGoodsNeedFileList(dataother.CheckList[n].Id)
|
|
|
+ if supplierCertModel.InStyle == "4" {
|
|
|
+ var needFile supplierfile.FileList
|
|
|
+ needFile.FileName = "战略合作协议扫描件"
|
|
|
+ needList = append(needList, needFile)
|
|
|
+ }
|
|
|
|
|
|
var list []supplierfile.OilSupplierFile
|
|
|
where := "SupplierId = '" + strconv.Itoa(dataother.SupplierId) + "'"
|
|
|
@@ -346,7 +355,7 @@ func (this *OilSupplierCertSubController) AddGoodsBus() {
|
|
|
for i := 0; i < len(list); i++ {
|
|
|
hasField += list[i].NeedFileType + ","
|
|
|
}
|
|
|
- mustField := "营业执照,组织代码,税务登记,开户许可,银行开户许可证,承诺书,企业信息系统截图,"
|
|
|
+ mustField := "营业执照,组织代码,税务登记,开户许可,银行开户许可证,承诺书,企业信息系统截图,战略合作协议扫描件,"
|
|
|
for i := 0; i < len(needList); i++ {
|
|
|
var entity supplierfile.OilSupplierFile
|
|
|
entity.SupplierId = dataother.SupplierId
|