This commit is contained in:
佟明轩 2025-05-21 18:41:25 +08:00
parent 8a1b9e030c
commit b5dd8325ab
1 changed files with 6 additions and 4 deletions

View File

@ -63,10 +63,12 @@ public class GoodsService extends BaseService {
*/ */
public Goods save(Goods goods) { public Goods save(Goods goods) {
String code = goods.getHilistCode(); String code = goods.getHilistCode();
QueryWrapper<SocialDirectory> socialDirectoryWrapper = new QueryWrapper<>();
socialDirectoryWrapper.eq("code", code);
CheckUtil.checkValue(socialDirectoryMapper.selectOne(socialDirectoryWrapper)==null, "医保目录编码不能为空"); if (!code.isEmpty()) {
QueryWrapper<SocialDirectory> socialDirectoryWrapper = new QueryWrapper<>();
socialDirectoryWrapper.eq("code", code);
CheckUtil.checkValue(socialDirectoryMapper.selectOne(socialDirectoryWrapper)==null, "医保目录编码不能为空");
}
GoodsPricingModelEnum modelEnum = GoodsPricingModelEnum.getByPricingModel(goods.getPricingModel()); GoodsPricingModelEnum modelEnum = GoodsPricingModelEnum.getByPricingModel(goods.getPricingModel());
if (modelEnum == null){ if (modelEnum == null){