提交 0a38e008 作者: 张小凤

Requir(update)

上级 d556237c
......@@ -260,7 +260,7 @@ public class RequirementsController extends BaseController {
@ApiOperation(value = "new——小程序-—飞手单方便取消订单")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("droneFlyerCancel")
@GetMapping("droneFlyerCancel")
public ResultBody droneFlyerCancel(HttpServletRequest request, @ApiParam(value = "发布服务需求id", required = true) @RequestParam Integer requirementsInfoId) {
Integer userAccountId = this.getUserLoginInfoFromRedis(request).getUserAccountId();
return requirementsService.droneFlyerCancel(requirementsInfoId, userAccountId, request);
......
......@@ -1073,10 +1073,15 @@ public class RequirementsServiceImpl implements RequirementsService {
residueAmount = returnToWechat.subtract(requirementsInfoDO.getSalaryAmount());
publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount());
publisherWalletFlowVO.setCashAmount(residueAmount);
publisherWalletFlowVO.setYxjCashPledge(requirementsInfoDO.getCashAmount().subtract(residueAmount).negate());
}
//如果退回的佣金小于支付的佣金
if (returnToWechat.compareTo(requirementsInfoDO.getSalaryAmount()) == -1) {
residueAmount = requirementsInfoDO.getSalaryAmount().subtract(returnToWechat);
publisherWalletFlowVO.setSalaryAmount(residueOrderAmount);
//one
publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount().subtract(residueAmount));
publisherWalletFlowVO.setSalaryCashPledge(residueAmount.negate());
}
if (residueAmount.compareTo(BigDecimal.ZERO) == 0
......@@ -1138,14 +1143,23 @@ public class RequirementsServiceImpl implements RequirementsService {
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());
}
} else if (subtract.compareTo(requirementsInfoDO.getSalaryAmount()) == -1) {
publisherWalletFlowVO.setYxjCashPledge(subtract.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);
}
//publisherWalletFlowVO.setYxjCashPledge(subtract.negate());
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论