|
|
@@ -1707,13 +1707,13 @@ func (this *OilSupplierController) UpdateEntity() {
|
|
|
if err1 == nil {
|
|
|
var user userRole.Base_User
|
|
|
user.Realname = model.SupplierName
|
|
|
- svc.UpdateEntityBywheretbl("Base_User", &user, []string{"Realname"}, "Id = " + strconv.Itoa(info.UserId))
|
|
|
+ svc.UpdateEntityBywheretbl("Base_User", &user, []string{"Realname"}, "Id = "+strconv.Itoa(info.UserId))
|
|
|
}
|
|
|
}
|
|
|
|
|
|
svc1 := suppliercert.GetOilSupplierCertService(utils.DBE)
|
|
|
var cert suppliercert.OilSupplierCert
|
|
|
- svc1.GetEntityByWhere(OilSupplierCertName, "SupplierId = " + id + " and SupplierTypeCode='" + typeCode + "'", &cert)
|
|
|
+ svc1.GetEntityByWhere(OilSupplierCertName, "SupplierId = "+id+" and SupplierTypeCode='"+typeCode+"'", &cert)
|
|
|
//对资质的检查
|
|
|
svc1.IsSupplierCertCanSubmit(string(model.Id), string(cert.Id))
|
|
|
|
|
|
@@ -2504,8 +2504,8 @@ func (this *OilSupplierController) CheckSupplierFile() {
|
|
|
supplierService.GetEntityById(file.SupplierId, &supplierEntity)
|
|
|
//获取准入信息表
|
|
|
var supplierCertEntity []suppliercert.OilSupplierCert
|
|
|
- supplierService.GetEntitysByWhere("OilSupplierCert", "SupplierId = " + strconv.Itoa(file.SupplierId), &supplierCertEntity)
|
|
|
- for _,cert := range supplierCertEntity {
|
|
|
+ supplierService.GetEntitysByWhere("OilSupplierCert", "SupplierId = "+strconv.Itoa(file.SupplierId), &supplierCertEntity)
|
|
|
+ for _, cert := range supplierCertEntity {
|
|
|
if cert.SupplierTypeCode == "01" {
|
|
|
//对准入范围的判断
|
|
|
var certSubList []suppliercertsub.OilSupplierCertSub
|
|
|
@@ -2538,7 +2538,7 @@ func (this *OilSupplierController) CheckSupplierFile() {
|
|
|
}
|
|
|
|
|
|
for _, needHeader := range needList {
|
|
|
- if ( supplierEntity.CredentialFlag == "1" || supplierEntity.CredentialFlag == "2") &&
|
|
|
+ if (supplierEntity.CredentialFlag == "1" || supplierEntity.CredentialFlag == "2") &&
|
|
|
strings.Contains(mergerCertSkipField, needHeader.FileName+",") {
|
|
|
//三证合一或五证合一的证件,不需要验证了
|
|
|
continue
|
|
|
@@ -2548,9 +2548,9 @@ func (this *OilSupplierController) CheckSupplierFile() {
|
|
|
filesvc.GetEntityByWhere("OilSupplierFile", where1, &fileist1)
|
|
|
|
|
|
var filelist2 suppliercertappendsub.OilAppendChangeDetail
|
|
|
- where2 := " SupplierId = '" + strconv.Itoa(file.SupplierId) + "' and NeedFileType = '" +needHeader.FileName + "'"
|
|
|
- svc2 := suppliercertappendsub.GetOilSupplierCertAppendSubService (utils.DBE)
|
|
|
- svc2.GetEntityByWhere("OilAppendChangeDetail", where2, &filelist2)
|
|
|
+ where2 := " SupplierId = '" + strconv.Itoa(file.SupplierId) + "' and NeedFileType = '" + needHeader.FileName + "'"
|
|
|
+ svc2 := suppliercertappendsub.GetOilSupplierCertAppendSubService(utils.DBE)
|
|
|
+ svc2.GetEntityByWhere("OilQualChangeDetail", where2, &filelist2)
|
|
|
|
|
|
if !strings.Contains(companyHasHeaders, needHeader.FileName+",") {
|
|
|
errinfo.Message = "请上传!" + needHeader.FileName + "!"
|