盘点 取绝对值

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

View File

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