盘点 取绝对值

This commit is contained in:
wangw 2024-11-26 10:43:28 +08:00
parent 574fc1eb15
commit f8cc0c26d6
1 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ public class TbConCheckServiceImpl implements TbConCheckService {
flow.setConsId(consInfo.getId());
flow.setShopId(consInfo.getShopId());
flow.setConName(consInfo.getConName());
flow.setAmount(resources.getLpNum());
flow.setAmount(resources.getLpNum().abs());
flow.setBalance(resources.getStockNumber());
flow.setOperator(SecurityUtils.getCurrentUserNickName());
flow.setCreateTime(new Timestamp(System.currentTimeMillis()));
@ -114,7 +114,7 @@ public class TbConCheckServiceImpl implements TbConCheckService {
conCheck.setAcStockNumber(resources.getStockNumber());
conCheck.setStockNumber(resources.getStockNumber());
conCheck.setLpAmount(consInfo.getPrice().multiply(resources.getLpNum()));
conCheck.setLpNum(resources.getLpNum().abs());
conCheck.setLpNum(resources.getLpNum());
conCheck.setCreateTime(new Timestamp(System.currentTimeMillis()));
conCheck.setRemark(resources.getRemark());
return tbConCheckMapper.toDto(tbConCheckRepository.save(conCheck));