|
@@ -185,8 +185,14 @@ func (this *OilSupplierCertAppendSubController) AddAppendSub() {
|
|
|
entity.CreateBy = this.User.Realname
|
|
entity.CreateBy = this.User.Realname
|
|
|
entity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
|
|
entity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
|
|
|
|
|
|
|
|
- if strings.Contains(hasField, needList[i].FileName+",") {
|
|
|
|
|
- //已存在,不能重复添加
|
|
|
|
|
|
|
+ isRepeat := false
|
|
|
|
|
+ for j := 0; j < len(list); j++ {
|
|
|
|
|
+ if list[j].NeedFileType == needList[i].FileName{
|
|
|
|
|
+ isRepeat = true
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if isRepeat == true {
|
|
|
continue
|
|
continue
|
|
|
}
|
|
}
|
|
|
entity.SupType = 2
|
|
entity.SupType = 2
|
|
@@ -273,8 +279,14 @@ func (this *OilSupplierCertAppendSubController) AddTechBus() {
|
|
|
entity.CreateBy = this.User.Realname
|
|
entity.CreateBy = this.User.Realname
|
|
|
entity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
|
|
entity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
|
|
|
|
|
|
|
|
- if strings.Contains(hasField, needList[i].FileName+",") {
|
|
|
|
|
- //已存在,不能重复添加
|
|
|
|
|
|
|
+ isRepeat := false
|
|
|
|
|
+ for j := 0; j < len(list); j++ {
|
|
|
|
|
+ if list[j].NeedFileType == needList[i].FileName{
|
|
|
|
|
+ isRepeat = true
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if isRepeat == true {
|
|
|
continue
|
|
continue
|
|
|
}
|
|
}
|
|
|
svc.InsertEntityBytbl(OilSupplierFileName, &entity)
|
|
svc.InsertEntityBytbl(OilSupplierFileName, &entity)
|
|
@@ -369,8 +381,14 @@ func (this *OilSupplierCertAppendSubController) AddGoodsBus() {
|
|
|
entity.CreateBy = this.User.Realname
|
|
entity.CreateBy = this.User.Realname
|
|
|
entity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
|
|
entity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
|
|
|
|
|
|
|
|
- if strings.Contains(hasField, needList[i].FileName+",") {
|
|
|
|
|
- //已存在,不能重复添加
|
|
|
|
|
|
|
+ isRepeat := false
|
|
|
|
|
+ for j := 0; j < len(list); j++ {
|
|
|
|
|
+ if list[j].NeedFileType == needList[i].FileName{
|
|
|
|
|
+ isRepeat = true
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if isRepeat == true {
|
|
|
continue
|
|
continue
|
|
|
}
|
|
}
|
|
|
svc.InsertEntityBytbl(OilSupplierFileName, &entity)
|
|
svc.InsertEntityBytbl(OilSupplierFileName, &entity)
|