|
|
@ -58,6 +58,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
@Service |
|
|
@ -92,8 +93,13 @@ public class PurchaseBillService { |
|
|
|
PagerVo<PurchaseBillVo> p = purchaseBillFeign.listPage(pq).getData(); |
|
|
|
for (PurchaseBillVo record : p.getRecords()) { |
|
|
|
WarehouseAnsBillNum data = warehouseAnsBillFeign.selByExternalNo(record.getBillNo()).getData(); |
|
|
|
record.setEnterWareCount(data.getActualInCount()); |
|
|
|
record.setEnterWareAmount(data.getActualInCount().multiply(data.getPrice())); |
|
|
|
if (data != null){ |
|
|
|
record.setEnterWareCount(data.getActualInCount()); |
|
|
|
record.setEnterWareAmount(data.getActualInCount().multiply(data.getPrice())); |
|
|
|
}else { |
|
|
|
record.setEnterWareCount(BigDecimal.ZERO); |
|
|
|
record.setEnterWareAmount(BigDecimal.ZERO); |
|
|
|
} |
|
|
|
} |
|
|
|
return rb.success().setData(p); |
|
|
|
} |
|
|
|