Browse Source

如果CodeLength为空 自动映射为可变

pull/77/head
zhangxin 3 years ago
parent
commit
1719f36685
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      services/base/implments/ArtCheckRule.service.impl.go

+ 6
- 0
services/base/implments/ArtCheckRule.service.impl.go View File

@ -114,6 +114,9 @@ func (impl *ArtCheckRuleServiceImplement) InsertOne(user *global.User, entity *m
if recordAttribute == nil {
return grmi.NewBusinessError("不存在指定零件属性!")
}
if entity.CodeLength == "" {
entity.CodeLength = "可变"
}
err = dao.InsertOne(entity)
if err != nil {
return err
@ -198,6 +201,9 @@ func (impl *ArtCheckRuleServiceImplement) UpdateOne(user *global.User, entity *m
return grmi.NewBusinessError("不存在指定零件属性")
}
}
if entity.CodeLength == "" {
entity.CodeLength = "可变"
}
err = dao.UpdateOne(entity)
if err != nil {
return err


Loading…
Cancel
Save