Browse Source

修改二级库bug390

mainqaq 2 years ago
parent
commit
55432bd1f9
1 changed files with 13 additions and 0 deletions
  1. 13 0
      controllers/secondary_order_api_contorller.go

+ 13 - 0
controllers/secondary_order_api_contorller.go View File

@@ -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,