物料
This commit is contained in:
@@ -215,5 +215,7 @@ public class BasProduct extends BaseEntity
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
private String updateId;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,8 +3,10 @@ package com.ruoyi.bas.BasProduct.service.impl;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.apache.commons.math3.stat.descriptive.summary.Product;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.bas.BasProduct.mapper.BasProductMapper;
|
||||
@@ -91,10 +93,15 @@ public class BasProductServiceImpl implements IBasProductService
|
||||
@Override
|
||||
public int updateBasProduct(BasProduct basProduct)
|
||||
{
|
||||
BasProduct basProduct1 = basProductMapper.selectBasProductByProductId(basProduct.getProductId());
|
||||
if(basProduct1!=null){
|
||||
return 0;
|
||||
BasProduct basProduct1 = new BasProduct();
|
||||
basProduct1.setProductId(basProduct.getProductId());
|
||||
basProduct1.setUpdateId(basProduct.getProductGuid());
|
||||
List<BasProduct> basProducts = basProductMapper.selectBasProductList(basProduct1);
|
||||
if (CollUtil.isNotEmpty(basProducts)){
|
||||
throw new RuntimeException("物料编号已存在");
|
||||
}
|
||||
|
||||
|
||||
return basProductMapper.updateBasProduct(basProduct);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user