|
@@ -394,6 +394,19 @@ func (this *SecondaryOrderApiController) UpdateStorehouse() {
|
394
|
394
|
return
|
395
|
395
|
}
|
396
|
396
|
}
|
|
397
|
+ //判断仓库名称是否重复
|
|
398
|
+ var bo bool
|
|
399
|
+ bo, err = service.IsStorehouseName(orgId, name)
|
|
400
|
+ if bo == true {
|
|
401
|
+ this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "该仓库已存在,请重新输入")
|
|
402
|
+ return
|
|
403
|
+ }
|
|
404
|
+ //判断仓库地址是否重复
|
|
405
|
+ bo, err = service.IsStorehouseAddress(orgId, address)
|
|
406
|
+ if bo == true {
|
|
407
|
+ this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "该地址已存在,请重新输入")
|
|
408
|
+ return
|
|
409
|
+ }
|
397
|
410
|
storehouse := models.Storehouse{
|
398
|
411
|
ID: id,
|
399
|
412
|
StorehouseName: name,
|