bug修复
This commit is contained in:
parent
b66eb4b9fe
commit
898ed313e6
|
|
@ -348,7 +348,8 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
|||
List<ScrapTotalListVo> list = scrapApplyDetailsMapper.selectTotalScrapApplyDetailsList(scrapApplyDetails);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (ScrapTotalListVo applyDetails : list) {
|
||||
BigDecimal totalCost = applyDetails.getScrapNum().multiply(applyDetails.getBuyPrice()).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP);
|
||||
// BigDecimal totalCost = applyDetails.getScrapNum().multiply(applyDetails.getBuyPrice()).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP);
|
||||
BigDecimal totalCost = applyDetails.getScrapNum().multiply(applyDetails.getBuyPrice()).setScale(2, RoundingMode.HALF_UP);
|
||||
applyDetails.setTotalCost(totalCost);
|
||||
List<String> asList = Arrays.asList(applyDetails.getIds().split(","));
|
||||
List<Long> longList = asList.stream()
|
||||
|
|
@ -501,7 +502,8 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
|||
List<ScrapTotalListVo> list = scrapApplyDetailsMapper.selectTotalScrapApplyDetailsList(scrapApplyDetails);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (ScrapTotalListVo item : list) {
|
||||
totalCost = totalCost.add(item.getScrapNum().multiply(item.getBuyPrice()).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP));
|
||||
// totalCost = totalCost.add(item.getScrapNum().multiply(item.getBuyPrice()).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP));
|
||||
totalCost = totalCost.add(item.getScrapNum().multiply(item.getBuyPrice()).setScale(2, RoundingMode.HALF_UP));
|
||||
}
|
||||
String result = list.stream()
|
||||
.map(ScrapTotalListVo::getMonth) // 提取 month 属性
|
||||
|
|
|
|||
Loading…
Reference in New Issue