提交 2d8da186 作者: 张小凤

Requirements(update)

上级 92df61ee
...@@ -1250,6 +1250,14 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1250,6 +1250,14 @@ public class RequirementsServiceImpl implements RequirementsService {
RequirementsServiceDO requirementsServiceDO = requirementsDao.customerDroneFlyerCancel(liabilityProblemVO.getRequirementsInfoId()); RequirementsServiceDO requirementsServiceDO = requirementsDao.customerDroneFlyerCancel(liabilityProblemVO.getRequirementsInfoId());
RequirementsInfoDO requirementsInfoDO = requirementsDao.customerPublisherCancel(liabilityProblemVO.getRequirementsInfoId(), userAccountId); RequirementsInfoDO requirementsInfoDO = requirementsDao.customerPublisherCancel(liabilityProblemVO.getRequirementsInfoId(), userAccountId);
liabilityProblemVO.setUserAccountId(userAccountId); liabilityProblemVO.setUserAccountId(userAccountId);
if (requirementsInfoDO.getServiceFlowId()==8 ||
requirementsInfoDO.getServiceFlowId()==6 ||
requirementsInfoDO.getServiceFlowId()==7 ||
requirementsInfoDO.getServiceFlowId()==5){
return ResultBody.error("客服不能介入当前状态");
}
if (requirementsServiceDO==null){ if (requirementsServiceDO==null){
return ResultBody.error("没有人抢单不能判定责任"); return ResultBody.error("没有人抢单不能判定责任");
} }
...@@ -1371,6 +1379,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1371,6 +1379,7 @@ public class RequirementsServiceImpl implements RequirementsService {
BigDecimal refundWeChat = new BigDecimal(0); BigDecimal refundWeChat = new BigDecimal(0);
//飞手获得的金额 //飞手获得的金额
BigDecimal receiveSalaryAmount = orderAmount.multiply(new BigDecimal(0.2)).setScale(2, BigDecimal.ROUND_HALF_UP); BigDecimal receiveSalaryAmount = orderAmount.multiply(new BigDecimal(0.2)).setScale(2, BigDecimal.ROUND_HALF_UP);
//需要扣除金额
BigDecimal freeze = orderAmount.multiply(new BigDecimal(0.3)).setScale(2, BigDecimal.ROUND_HALF_UP); BigDecimal freeze = orderAmount.multiply(new BigDecimal(0.3)).setScale(2, BigDecimal.ROUND_HALF_UP);
//微信支付金额大于需要退款金额 //微信支付金额大于需要退款金额
if (weChat.compareTo(residueOrderAmount) == 1) { if (weChat.compareTo(residueOrderAmount) == 1) {
...@@ -1482,31 +1491,8 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1482,31 +1491,8 @@ public class RequirementsServiceImpl implements RequirementsService {
System.out.println(freeze); System.out.println(freeze);
//优先扣除微信 //优先扣除微信
BigDecimal weChat1 = requirementsInfoDO.getWeChat(); BigDecimal weChat1 = requirementsInfoDO.getWeChat();
//如果微信扣除的金额小于飞手获得的钱
if (weChat1.compareTo(freeze) == -1) {
//还需要扣除多少
BigDecimal subtract = freeze.subtract(weChat1);
if (subtract.compareTo(requirementsInfoDO.getSalaryAmount()) == 1) {
publisherWalletFlowVO.setSalaryCashPledge(requirementsInfoDO.getSalaryAmount().negate());
BigDecimal subtract1 = subtract.subtract(requirementsInfoDO.getSalaryAmount());
if (subtract1.compareTo(BigDecimal.ZERO) == 0 || subtract1.compareTo(BigDecimal.ZERO) == 1) {
publisherWalletFlowVO.setYxjCashPledge(subtract1.negate());
}
}
if (subtract.compareTo(requirementsInfoDO.getSalaryAmount()) == -1) {
//update
if (requirementsInfoDO.getCashAmount().compareTo(BigDecimal.ZERO) == 0) {
publisherWalletFlowVO.setSalaryCashPledge(subtract.negate());
}
if (requirementsInfoDO.getCashAmount().compareTo(BigDecimal.ZERO) != 0) {
BigDecimal subtract1 = requirementsInfoDO.getCashAmount().subtract(publisherWalletFlowVO.getCashAmount());
publisherWalletFlowVO.setYxjCashPledge(subtract1.negate());
}
//publisherWalletFlowVO.setYxjCashPledge(subtract.negate());
}
}
//飞手应该获得的金额 //飞手应该获得的金额
publisherWalletFlowVO.setUserAccountId(userAccountId); publisherWalletFlowVO.setUserAccountId(userAccountId);
publisherWalletFlowVO.setOperateUserAccountId(userAccountId); publisherWalletFlowVO.setOperateUserAccountId(userAccountId);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论