|
@@ -352,11 +352,18 @@ public class PurchasePriceServiceImpl extends ServiceImpl<PurchasePriceMapper, P
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public PurchasePrice selectByName(PurchasePrice purchasePrice) {
|
|
|
- PurchasePrice purchasePrice1=this.selectOne(new EntityWrapper<PurchasePrice>()
|
|
|
- .eq("warehouse_id",purchasePrice.getWarehouseId())
|
|
|
- .eq("goods_name",purchasePrice.getGoodsName())
|
|
|
+ public PurchasePrice selectByName(String warehouseId, String goodsName) {
|
|
|
+ PurchasePrice purchasePrice1=new PurchasePrice();
|
|
|
+ PurchasePrice purchasePrice=this.selectOne(new EntityWrapper<PurchasePrice>()
|
|
|
+ .eq("warehouse_id",warehouseId)
|
|
|
+ .eq("goods_name",goodsName)
|
|
|
.eq("status_flag","3"));
|
|
|
+ if (purchasePrice!=null){
|
|
|
+ purchasePrice1=purchasePrice;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ purchasePrice1.setDeductWeight(1.3f);
|
|
|
+ }
|
|
|
return purchasePrice1;
|
|
|
}
|
|
|
}
|