提交 dd10298a 作者: 张小凤

Requirements(update)

上级 97734268
......@@ -2021,16 +2021,34 @@ public class RequirementsServiceImpl implements RequirementsService {
BigDecimal returnSalaryAmount = updateAmount.getReturnSalaryAmount();
BigDecimal subtract = orderAmount.subtract(returnSalaryAmount);
publisherWalletFlowVO.setSalaryAmount(subtract.negate());
if (requirementsInfoDO.getSalaryAmount().compareTo(updateAmount.getReturnSalaryAmount())==0){
publisherWalletFlowVO.setSalaryAmount(BigDecimal.ZERO);
}
if (requirementsInfoDO.getSalaryAmount().compareTo(updateAmount.getReturnSalaryAmount())==1){
publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount().subtract(updateAmount.getReturnSalaryAmount()).negate());
}
}else{
publisherWalletFlowVO.setSalaryAmount(BigDecimal.ZERO);
publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount().negate());
}
if (updateAmount.getReturnCashAmount().compareTo(BigDecimal.ZERO)!=0){
BigDecimal orderAmount = updateAmount.getOrderAmount();
BigDecimal returnCashAmount = updateAmount.getReturnCashAmount();
BigDecimal subtract = orderAmount.subtract(returnCashAmount);
publisherWalletFlowVO.setCashAmount(subtract.negate());
if (requirementsInfoDO.getCashAmount().compareTo(updateAmount.getReturnCashAmount())==0){
publisherWalletFlowVO.setCashAmount(BigDecimal.ZERO);
}
if (updateAmount.getReturnCashAmount().compareTo(requirementsInfoDO.getCashAmount())==-1){
BigDecimal cashAmount = requirementsInfoDO.getCashAmount();
BigDecimal returnCashAmount1 = updateAmount.getReturnCashAmount();
BigDecimal subtract1 = cashAmount.subtract(returnCashAmount1);
publisherWalletFlowVO.setCashAmount(subtract1.negate());
}
}else{
publisherWalletFlowVO.setCashAmount(BigDecimal.ZERO);
publisherWalletFlowVO.setCashAmount(requirementsInfoDO.getCashAmount().negate());
}
}
if (updateAmount.getUpdateOrderAmount().compareTo(updateAmount.getOrderAmount())==1){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论