提交 e41eac5b 作者: 恶龙咆哮

修改bug

上级 e87a7d20
package com.mmc.csf.infomation.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author 张培
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OnlyRequirementsInfoId {
@ApiModelProperty(value = "订单id")
private Integer requirementsInfoId;
}
...@@ -176,7 +176,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -176,7 +176,7 @@ public class RequirementsServiceImpl implements RequirementsService {
public ResultBody appPublishList() { public ResultBody appPublishList() {
List<RequirementsInfoDO> requirementsInfoDOS = requirementsDao.appPublishList(); List<RequirementsInfoDO> requirementsInfoDOS = requirementsDao.appPublishList();
//远程调用服务一级分类 //远程调用服务一级分类
// List<IndustryTypeDTO> industryTypeDTOS = listIndustry(); // List<IndustryTypeDTO> industryTypeDTOS = listIndustry();
List<RequirementsInfoVO> collect = requirementsInfoDOS.stream().map(RequirementsInfoDO::buildRequirementsInfoVO).collect(Collectors.toList()); List<RequirementsInfoVO> collect = requirementsInfoDOS.stream().map(RequirementsInfoDO::buildRequirementsInfoVO).collect(Collectors.toList());
/* for (RequirementsInfoVO requirementsInfoVO : collect) { /* for (RequirementsInfoVO requirementsInfoVO : collect) {
for (IndustryTypeDTO industryTypeDTO : industryTypeDTOS) { for (IndustryTypeDTO industryTypeDTO : industryTypeDTOS) {
...@@ -224,11 +224,11 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -224,11 +224,11 @@ public class RequirementsServiceImpl implements RequirementsService {
} }
Integer status = requirementsDao.selectServiceIdByRequireIdAndUserId(id, userAccountId); Integer status = requirementsDao.selectServiceIdByRequireIdAndUserId(id, userAccountId);
if(status == null) { if (status == null) {
return ResultBody.success(requirementsInfoVO); return ResultBody.success(requirementsInfoVO);
} }
//如果该飞手被拒绝 需要修改当前订单的状态 //如果该飞手被拒绝 需要修改当前订单的状态
if(requirementsDao.selectServiceIdByRequireIdAndUserId(id,userAccountId) == 11) { if (requirementsDao.selectServiceIdByRequireIdAndUserId(id, userAccountId) == 11) {
requirementsInfoVO.setOrderStatus("170"); requirementsInfoVO.setOrderStatus("170");
} }
return ResultBody.success(requirementsInfoVO); return ResultBody.success(requirementsInfoVO);
...@@ -735,7 +735,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -735,7 +735,7 @@ public class RequirementsServiceImpl implements RequirementsService {
Integer serviceFlowId = requirementsServiceDO.getServiceFlowId(); Integer serviceFlowId = requirementsServiceDO.getServiceFlowId();
if (serviceFlowId != 10) { if (serviceFlowId != 10) {
return ResultBody.error(ResultEnum.YOU_CANNOT_CANCEL_THE_ORDER_AT_THIS_TIME.getResultMsg()); return ResultBody.error(ResultEnum.YOU_CANNOT_CANCEL_THE_ORDER_AT_THIS_TIME.getResultMsg());
}else { } else {
//修改订单所需人数以及订单状态 //修改订单所需人数以及订单状态
requirementsDao.updateRequirementsInfoByRefusePilot(requirementsInfoId); requirementsDao.updateRequirementsInfoByRefusePilot(requirementsInfoId);
Integer fatherRequireId = requirementsDao.selectFatherRequireIdBySonId(requirementsInfoId); Integer fatherRequireId = requirementsDao.selectFatherRequireIdBySonId(requirementsInfoId);
...@@ -1036,12 +1036,12 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1036,12 +1036,12 @@ public class RequirementsServiceImpl implements RequirementsService {
Boolean condition1 = false; Boolean condition1 = false;
Boolean condition2 = false; Boolean condition2 = false;
//如果是多人订单 需要判断每一个子订单是否是在 1,10 状态 //如果是多人订单 需要判断每一个子订单是否是在 1,10 状态
if(requirementsDao.selectRequirementsNum(requirementsInfoId) > 1) { if (requirementsDao.selectRequirementsNum(requirementsInfoId) > 1) {
if(requirementsDao.selectServiceFlowIdByFatherId(requirementsInfoId) == 0) { if (requirementsDao.selectServiceFlowIdByFatherId(requirementsInfoId) == 0) {
condition2 = true; condition2 = true;
condition1 = true; condition1 = true;
} }
}else { } else {
condition1 = serviceFlowId == 1; condition1 = serviceFlowId == 1;
condition2 = serviceFlowId == 10; condition2 = serviceFlowId == 10;
} }
...@@ -1081,7 +1081,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1081,7 +1081,7 @@ public class RequirementsServiceImpl implements RequirementsService {
requirementsDao.updateInfo(requirementsInfoId, 7); requirementsDao.updateInfo(requirementsInfoId, 7);
requirementsDao.updateFlow(requirementsInfoId, 7); requirementsDao.updateFlow(requirementsInfoId, 7);
return ResultBody.success(ResultEnum.THE_AMOUNT_OF_THE_MISSION_WILL_BE_RETURNED.getResultMsg()); return ResultBody.success(ResultEnum.THE_AMOUNT_OF_THE_MISSION_WILL_BE_RETURNED.getResultMsg());
}else { } else {
return ResultBody.error(ResultEnum.YOU_CANNOT_CANCEL_THE_ORDER_AT_THIS_TIME.getResultMsg()); return ResultBody.error(ResultEnum.YOU_CANNOT_CANCEL_THE_ORDER_AT_THIS_TIME.getResultMsg());
} }
// if (serviceFlowId != 2 && serviceFlowId != 1) { // if (serviceFlowId != 2 && serviceFlowId != 1) {
...@@ -1282,31 +1282,31 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1282,31 +1282,31 @@ public class RequirementsServiceImpl implements RequirementsService {
* @return * @return
*/ */
@Override @Override
public ResultBody cancelAll(LiabilityProblemVO liabilityProblemVO, Integer userAccountId,HttpServletRequest request) { public ResultBody cancelAll(LiabilityProblemVO liabilityProblemVO, Integer userAccountId, HttpServletRequest request) {
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 || if (requirementsInfoDO.getServiceFlowId() == 8 ||
requirementsInfoDO.getServiceFlowId()==6 || requirementsInfoDO.getServiceFlowId() == 6 ||
requirementsInfoDO.getServiceFlowId()==7 || requirementsInfoDO.getServiceFlowId() == 7 ||
requirementsInfoDO.getServiceFlowId()==5){ requirementsInfoDO.getServiceFlowId() == 5) {
return ResultBody.error("客服不能介入当前状态"); return ResultBody.error("客服不能介入当前状态");
} }
if (requirementsServiceDO==null){ if (requirementsServiceDO == null) {
return ResultBody.error("没有人抢单不能判定责任"); return ResultBody.error("没有人抢单不能判定责任");
} }
int i = requirementsDao.selectCustomer(liabilityProblemVO.getRequirementsInfoId()); int i = requirementsDao.selectCustomer(liabilityProblemVO.getRequirementsInfoId());
if (i!=0){ if (i != 0) {
return ResultBody.error("请勿重复判定"); return ResultBody.error("请勿重复判定");
} }
requirementsDao.customerServiceIntervention(liabilityProblemVO); requirementsDao.customerServiceIntervention(liabilityProblemVO);
//双方无责 //双方无责
if (liabilityProblemVO.getDuty().equals(1)){ if (liabilityProblemVO.getDuty().equals(1)) {
requirementsDao.updateInfo(liabilityProblemVO.getRequirementsInfoId(), 7); requirementsDao.updateInfo(liabilityProblemVO.getRequirementsInfoId(), 7);
requirementsDao.updateScene(liabilityProblemVO.getRequirementsInfoId(), 7); requirementsDao.updateScene(liabilityProblemVO.getRequirementsInfoId(), 7);
WalletFlowVO walletFlowVO = new WalletFlowVO(); WalletFlowVO walletFlowVO = new WalletFlowVO();
PublisherWalletFlowVO publisherWalletFlowVO = new PublisherWalletFlowVO(); PublisherWalletFlowVO publisherWalletFlowVO = new PublisherWalletFlowVO();
...@@ -1327,7 +1327,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1327,7 +1327,7 @@ public class RequirementsServiceImpl implements RequirementsService {
} }
//退发布者费用 //退发布者费用
if (requirementsInfoDO.getWechatPayOrderNumber()!=null){ if (requirementsInfoDO.getWechatPayOrderNumber() != null) {
ApplyRefundVO applyRefundVO = new ApplyRefundVO(); ApplyRefundVO applyRefundVO = new ApplyRefundVO();
applyRefundVO.setReason("客服介入退款"); applyRefundVO.setReason("客服介入退款");
applyRefundVO.setRefund(requirementsInfoDO.getWeChat().multiply(new BigDecimal(100)).longValue()); applyRefundVO.setRefund(requirementsInfoDO.getWeChat().multiply(new BigDecimal(100)).longValue());
...@@ -1335,7 +1335,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1335,7 +1335,7 @@ public class RequirementsServiceImpl implements RequirementsService {
applyRefund(applyRefundVO, request.getHeader("token")); applyRefund(applyRefundVO, request.getHeader("token"));
} }
//退飞手费用 //退飞手费用
if (requirementsServiceDO.getWechatPayOrderNumber()!=null){ if (requirementsServiceDO.getWechatPayOrderNumber() != null) {
ApplyRefundVO applyRefundVO = new ApplyRefundVO(); ApplyRefundVO applyRefundVO = new ApplyRefundVO();
applyRefundVO.setReason("客服介入退款"); applyRefundVO.setReason("客服介入退款");
applyRefundVO.setRefund(requirementsServiceDO.getWeChat().multiply(new BigDecimal(100)).longValue()); applyRefundVO.setRefund(requirementsServiceDO.getWeChat().multiply(new BigDecimal(100)).longValue());
...@@ -1343,47 +1343,47 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1343,47 +1343,47 @@ public class RequirementsServiceImpl implements RequirementsService {
applyRefund(applyRefundVO, request.getHeader("token")); applyRefund(applyRefundVO, request.getHeader("token"));
} }
//退云享金及余额 //退云享金及余额
if (requirementsInfoDO.getCashAmount().compareTo(BigDecimal.ZERO)!=0 || if (requirementsInfoDO.getCashAmount().compareTo(BigDecimal.ZERO) != 0 ||
requirementsInfoDO.getSalaryAmount().compareTo(BigDecimal.ZERO)!=0 || requirementsInfoDO.getSalaryAmount().compareTo(BigDecimal.ZERO) != 0 ||
requirementsServiceDO.getCashAmount().compareTo(BigDecimal.ZERO)!=0 || requirementsServiceDO.getCashAmount().compareTo(BigDecimal.ZERO) != 0 ||
requirementsServiceDO.getSalaryAmount().compareTo(BigDecimal.ZERO)!=0){ requirementsServiceDO.getSalaryAmount().compareTo(BigDecimal.ZERO) != 0) {
publisherWalletFlowVO.setModeOfPayment(500); publisherWalletFlowVO.setModeOfPayment(500);
publisherWalletFlowVO.setUserAccountId(requirementsInfoDO.getUserAccountId()); publisherWalletFlowVO.setUserAccountId(requirementsInfoDO.getUserAccountId());
publisherWalletFlowVO.setOperateUserAccountId(userAccountId); publisherWalletFlowVO.setOperateUserAccountId(userAccountId);
publisherWalletFlowVO.setCashAmount(requirementsInfoDO.getCashAmount()); publisherWalletFlowVO.setCashAmount(requirementsInfoDO.getCashAmount());
publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount()); publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount());
flyerWalletFlowVO.setModeOfPayment(500); flyerWalletFlowVO.setModeOfPayment(500);
flyerWalletFlowVO.setUserAccountId(requirementsServiceDO.getPilotCertificationUserId()); flyerWalletFlowVO.setUserAccountId(requirementsServiceDO.getPilotCertificationUserId());
flyerWalletFlowVO.setOperateUserAccountId(userAccountId); flyerWalletFlowVO.setOperateUserAccountId(userAccountId);
flyerWalletFlowVO.setCashAmount(requirementsServiceDO.getCashAmount()); flyerWalletFlowVO.setCashAmount(requirementsServiceDO.getCashAmount());
flyerWalletFlowVO.setSalaryAmount(requirementsServiceDO.getSalaryAmount()); flyerWalletFlowVO.setSalaryAmount(requirementsServiceDO.getSalaryAmount());
walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO); walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO);
walletFlowVO.setFlyerWalletFlowVO(flyerWalletFlowVO); walletFlowVO.setFlyerWalletFlowVO(flyerWalletFlowVO);
flyerCancel(walletFlowVO,request.getHeader("token")); flyerCancel(walletFlowVO, request.getHeader("token"));
//给发布者或者飞手发送信息 //给发布者或者飞手发送信息
this.publicSendMsgPublishInfoAuth(requirementsServiceDO); this.publicSendMsgPublishInfoAuth(requirementsServiceDO);
this.requirementsInfoInfoAuth(requirementsInfoDO); this.requirementsInfoInfoAuth(requirementsInfoDO);
return ResultBody.success(); return ResultBody.success();
} }
} }
//发布者责任 //发布者责任
if (liabilityProblemVO.getDuty().equals(2)){ if (liabilityProblemVO.getDuty().equals(2)) {
// publisherCancel(liabilityProblemVO.getRequirementsInfoId(),requirementsInfoDO.getUserAccountId(),request); // publisherCancel(liabilityProblemVO.getRequirementsInfoId(),requirementsInfoDO.getUserAccountId(),request);
publisherCancelDuty(liabilityProblemVO.getRequirementsInfoId(),requirementsInfoDO.getUserAccountId(),request); publisherCancelDuty(liabilityProblemVO.getRequirementsInfoId(), requirementsInfoDO.getUserAccountId(), request);
requirementsDao.updateInfo(liabilityProblemVO.getRequirementsInfoId(), 7); requirementsDao.updateInfo(liabilityProblemVO.getRequirementsInfoId(), 7);
requirementsDao.updateScene(liabilityProblemVO.getRequirementsInfoId(), 7); requirementsDao.updateScene(liabilityProblemVO.getRequirementsInfoId(), 7);
return ResultBody.success(); return ResultBody.success();
} }
//飞手责任 //飞手责任
if (liabilityProblemVO.getDuty().equals(3)){ if (liabilityProblemVO.getDuty().equals(3)) {
// droneFlyerCancel(liabilityProblemVO.getRequirementsInfoId(),requirementsServiceDO.getPilotCertificationUserId(),request); // droneFlyerCancel(liabilityProblemVO.getRequirementsInfoId(),requirementsServiceDO.getPilotCertificationUserId(),request);
droneFlyerCancelDuty(liabilityProblemVO.getRequirementsInfoId(),requirementsServiceDO.getPilotCertificationUserId(),request); droneFlyerCancelDuty(liabilityProblemVO.getRequirementsInfoId(), requirementsServiceDO.getPilotCertificationUserId(), request);
requirementsDao.updateInfo(liabilityProblemVO.getRequirementsInfoId(), 7); requirementsDao.updateInfo(liabilityProblemVO.getRequirementsInfoId(), 7);
requirementsDao.updateScene(liabilityProblemVO.getRequirementsInfoId(), 7); requirementsDao.updateScene(liabilityProblemVO.getRequirementsInfoId(), 7);
return ResultBody.success(); return ResultBody.success();
...@@ -1391,7 +1391,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1391,7 +1391,7 @@ public class RequirementsServiceImpl implements RequirementsService {
return ResultBody.success(); return ResultBody.success();
} }
public ResultBody publisherCancelDuty(Integer requirementsInfoId, Integer userAccountId, HttpServletRequest request){ public ResultBody publisherCancelDuty(Integer requirementsInfoId, Integer userAccountId, HttpServletRequest request) {
RequirementsInfoDO requirementsInfoDO = requirementsDao.publisherCancel(requirementsInfoId, userAccountId); RequirementsInfoDO requirementsInfoDO = requirementsDao.publisherCancel(requirementsInfoId, userAccountId);
RequirementsServiceDO serviceDO = requirementsDao.serviceReq(requirementsInfoId); RequirementsServiceDO serviceDO = requirementsDao.serviceReq(requirementsInfoId);
if (serviceDO != null) { if (serviceDO != null) {
...@@ -1412,181 +1412,180 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1412,181 +1412,180 @@ public class RequirementsServiceImpl implements RequirementsService {
IsNullConvertZeroUtil.checkIsNull(publisherWalletFlowVO); IsNullConvertZeroUtil.checkIsNull(publisherWalletFlowVO);
IsNullConvertZeroUtil.checkIsNull(flyerWalletFlowVO); IsNullConvertZeroUtil.checkIsNull(flyerWalletFlowVO);
BigDecimal orderAmount = requirementsInfoDO.getOrderAmount(); BigDecimal orderAmount = requirementsInfoDO.getOrderAmount();
BigDecimal bigDecimal = new BigDecimal(0.7); BigDecimal bigDecimal = new BigDecimal(0.7);
//剩余金额 //剩余金额
BigDecimal residueOrderAmount = orderAmount.multiply(bigDecimal).setScale(2, BigDecimal.ROUND_HALF_UP); BigDecimal residueOrderAmount = orderAmount.multiply(bigDecimal).setScale(2, BigDecimal.ROUND_HALF_UP);
//先退微信 再退任务佣金 最后退云享金 //先退微信 再退任务佣金 最后退云享金
BigDecimal weChat = requirementsInfoDO.getWeChat(); BigDecimal weChat = requirementsInfoDO.getWeChat();
//微信需要退款多少金额 //微信需要退款多少金额
//微信金额大于扣除之后的金额 //微信金额大于扣除之后的金额
BigDecimal refundCashAmount = new BigDecimal(0); BigDecimal refundCashAmount = new BigDecimal(0);
BigDecimal refundSalaryAmount = new BigDecimal(0); BigDecimal refundSalaryAmount = new BigDecimal(0);
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) {
//云享金扣除多少 //云享金扣除多少
// publisherWalletFlowVO.setCashAmount(requirementsInfoDO.getCashAmount().negate()); // publisherWalletFlowVO.setCashAmount(requirementsInfoDO.getCashAmount().negate());
//佣金扣除多少 //佣金扣除多少
// publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount().negate()); // publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount().negate());
//违约云享金多少 //违约云享金多少
publisherWalletFlowVO.setYxjCashPledge(requirementsInfoDO.getCashAmount().negate()); publisherWalletFlowVO.setYxjCashPledge(requirementsInfoDO.getCashAmount().negate());
//违约佣金 //违约佣金
publisherWalletFlowVO.setSalaryCashPledge(requirementsInfoDO.getSalaryAmount().negate()); publisherWalletFlowVO.setSalaryCashPledge(requirementsInfoDO.getSalaryAmount().negate());
//用户退百分之七十的费用
refundWeChat = residueOrderAmount;
BigDecimal multiply = refundWeChat.multiply(new BigDecimal(100));
Long longWeChat = multiply.longValue();
applyRefundVO.setRefund(longWeChat);
applyRefundVO.setReason("扣除飞手百分之三十的费用");
applyRefundVO.setOutTradeNo(requirementsInfoDO.getWechatPayOrderNumber());
//退款到微信
applyRefund(applyRefundVO, request.getHeader("token"));
}
//微信支付金额小于需要退款金额
if (weChat.compareTo(residueOrderAmount) == -1 ||
weChat.compareTo(refundCashAmount) == 0) {
//优先扣除微信里面的钱
BigDecimal returnToWechat = residueOrderAmount.subtract(requirementsInfoDO.getWeChat());
//用户退百分之七十的费用 BigDecimal residueAmount = new BigDecimal(0);
refundWeChat = residueOrderAmount; if (returnToWechat.compareTo(requirementsInfoDO.getSalaryAmount()) == 1) {
BigDecimal multiply = refundWeChat.multiply(new BigDecimal(100)); //退回佣金
Long longWeChat = multiply.longValue(); residueAmount = returnToWechat.subtract(requirementsInfoDO.getSalaryAmount());
applyRefundVO.setRefund(longWeChat); publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount());
applyRefundVO.setReason("扣除飞手百分之三十的费用"); publisherWalletFlowVO.setCashAmount(residueAmount);
applyRefundVO.setOutTradeNo(requirementsInfoDO.getWechatPayOrderNumber()); publisherWalletFlowVO.setYxjCashPledge(requirementsInfoDO.getCashAmount().subtract(residueAmount).negate());
//退款到微信
applyRefund(applyRefundVO, request.getHeader("token"));
}
//微信支付金额小于需要退款金额
if (weChat.compareTo(residueOrderAmount) == -1 ||
weChat.compareTo(refundCashAmount) == 0) {
//优先扣除微信里面的钱
BigDecimal returnToWechat = residueOrderAmount.subtract(requirementsInfoDO.getWeChat());
BigDecimal residueAmount = new BigDecimal(0); }
if (returnToWechat.compareTo(requirementsInfoDO.getSalaryAmount()) == 1) { if (returnToWechat.compareTo(requirementsInfoDO.getSalaryAmount()) == 0) {
//退回佣金 publisherWalletFlowVO.setSalaryAmount(returnToWechat);
residueAmount = returnToWechat.subtract(requirementsInfoDO.getSalaryAmount()); }
publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount());
publisherWalletFlowVO.setCashAmount(residueAmount);
publisherWalletFlowVO.setYxjCashPledge(requirementsInfoDO.getCashAmount().subtract(residueAmount).negate());
} //如果退回的佣金小于支付的佣金
if (returnToWechat.compareTo(requirementsInfoDO.getSalaryAmount()) == 0) { if (returnToWechat.compareTo(requirementsInfoDO.getSalaryAmount()) == -1) {
publisherWalletFlowVO.setSalaryAmount(returnToWechat); residueAmount = requirementsInfoDO.getSalaryAmount().subtract(returnToWechat);
} //one
publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount().subtract(residueAmount));
publisherWalletFlowVO.setSalaryCashPledge(residueAmount.negate());
//修改2
//修改三
//如果退回的佣金小于支付的佣金 if (residueAmount.compareTo(BigDecimal.ZERO) == 1) {
if (returnToWechat.compareTo(requirementsInfoDO.getSalaryAmount()) == -1) {
residueAmount = requirementsInfoDO.getSalaryAmount().subtract(returnToWechat);
//one
publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount().subtract(residueAmount));
publisherWalletFlowVO.setSalaryCashPledge(residueAmount.negate());
//修改2
//修改三
if (residueAmount.compareTo(BigDecimal.ZERO) == 1) {
publisherWalletFlowVO.setYxjCashPledge(requirementsInfoDO.getCashAmount().negate());
}
}
//如果退回佣金等于0
if (residueAmount.compareTo(BigDecimal.ZERO) == 0) {
publisherWalletFlowVO.setYxjCashPledge(requirementsInfoDO.getCashAmount().negate()); publisherWalletFlowVO.setYxjCashPledge(requirementsInfoDO.getCashAmount().negate());
} }
}
//如果退回佣金等于0
if (residueAmount.compareTo(BigDecimal.ZERO) == 0) {
publisherWalletFlowVO.setYxjCashPledge(requirementsInfoDO.getCashAmount().negate());
}
if (residueAmount.compareTo(BigDecimal.ZERO) == -1) { if (residueAmount.compareTo(BigDecimal.ZERO) == -1) {
publisherWalletFlowVO.setUserAccountId(userAccountId); publisherWalletFlowVO.setUserAccountId(userAccountId);
publisherWalletFlowVO.setOperateUserAccountId(userAccountId); publisherWalletFlowVO.setOperateUserAccountId(userAccountId);
publisherWalletFlowVO.setModeOfPayment(300); publisherWalletFlowVO.setModeOfPayment(300);
publisherWalletFlowVO.setSalaryAmount(residueAmount.negate()); publisherWalletFlowVO.setSalaryAmount(residueAmount.negate());
System.out.println(residueAmount); System.out.println(residueAmount);
BigDecimal subtract = requirementsInfoDO.getSalaryAmount().subtract(residueAmount.negate()); BigDecimal subtract = requirementsInfoDO.getSalaryAmount().subtract(residueAmount.negate());
publisherWalletFlowVO.setSalaryCashPledge(subtract.negate()); publisherWalletFlowVO.setSalaryCashPledge(subtract.negate());
publisherWalletFlowVO.setYxjCashPledge(requirementsInfoDO.getCashAmount().negate()); publisherWalletFlowVO.setYxjCashPledge(requirementsInfoDO.getCashAmount().negate());
// BigDecimal subtract = requirementsInfoDO.getSalaryAmount().subtract(residueAmount.negate()); // BigDecimal subtract = requirementsInfoDO.getSalaryAmount().subtract(residueAmount.negate());
// publisherWalletFlowVO.setSalaryCashPledge(subtract.negate()); // publisherWalletFlowVO.setSalaryCashPledge(subtract.negate());
walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO); walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO);
//flyerCancel(walletFlowVO, request.getHeader("token")); //flyerCancel(walletFlowVO, request.getHeader("token"));
//退回的佣金大于0 //退回的佣金大于0
} else if (residueAmount.compareTo(BigDecimal.ZERO) == 1) { } else if (residueAmount.compareTo(BigDecimal.ZERO) == 1) {
// publisherWalletFlowVO.setCashAmount(residueAmount); // publisherWalletFlowVO.setCashAmount(residueAmount);
publisherWalletFlowVO.setUserAccountId(userAccountId); publisherWalletFlowVO.setUserAccountId(userAccountId);
publisherWalletFlowVO.setOperateUserAccountId(userAccountId); publisherWalletFlowVO.setOperateUserAccountId(userAccountId);
publisherWalletFlowVO.setModeOfPayment(300); publisherWalletFlowVO.setModeOfPayment(300);
walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO); walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO);
//退回任务佣金 //退回任务佣金
//flyerCancel(walletFlowVO, request.getHeader("token")); //flyerCancel(walletFlowVO, request.getHeader("token"));
}
BigDecimal weChatAmount = requirementsInfoDO.getWeChat();
long longWeChat = weChatAmount.multiply(new BigDecimal(100)).longValue();
applyRefundVO.setRefund(longWeChat);
applyRefundVO.setReason("退回方式——微信佣金云享金");
applyRefundVO.setOutTradeNo(requirementsInfoDO.getWechatPayOrderNumber());
applyRefund(applyRefundVO, request.getHeader("token"));
} }
BigDecimal weChatAmount = requirementsInfoDO.getWeChat();
long longWeChat = weChatAmount.multiply(new BigDecimal(100)).longValue();
applyRefundVO.setRefund(longWeChat);
applyRefundVO.setReason("退回方式——微信佣金云享金");
applyRefundVO.setOutTradeNo(requirementsInfoDO.getWechatPayOrderNumber());
applyRefund(applyRefundVO, request.getHeader("token"));
}
//平台抽取百分之十 //平台抽取百分之十
//发布者取消 //发布者取消
BigDecimal earnings = orderAmount.multiply(new BigDecimal(0.1)).setScale(2, BigDecimal.ROUND_HALF_UP); BigDecimal earnings = orderAmount.multiply(new BigDecimal(0.1)).setScale(2, BigDecimal.ROUND_HALF_UP);
BigDecimal orderEarnings = requirementsInfoDO.getOrderEarnings(); BigDecimal orderEarnings = requirementsInfoDO.getOrderEarnings();
BigDecimal add = orderEarnings.add(earnings); BigDecimal add = orderEarnings.add(earnings);
requirementsInfoDO.setOrderEarnings(add); requirementsInfoDO.setOrderEarnings(add);
requirementsDao.updateRequirementsAmount(requirementsInfoDO); requirementsDao.updateRequirementsAmount(requirementsInfoDO);
// requirementsDao.insertPlatformOrderEarnings(earnings, requirementsInfoId, userAccountId); // requirementsDao.insertPlatformOrderEarnings(earnings, requirementsInfoId, userAccountId);
requirementsDao.updatePlatformOrderEarnings(earnings, requirementsInfoId, userAccountId); requirementsDao.updatePlatformOrderEarnings(earnings, requirementsInfoId, userAccountId);
if (serviceDO.getCashAmount().compareTo(BigDecimal.ZERO) != 0 || if (serviceDO.getCashAmount().compareTo(BigDecimal.ZERO) != 0 ||
serviceDO.getSalaryAmount().compareTo(BigDecimal.ZERO) != 0 || serviceDO.getSalaryAmount().compareTo(BigDecimal.ZERO) != 0 ||
serviceDO.getWeChat().compareTo(BigDecimal.ZERO) != 0 || serviceDO.getWeChat().compareTo(BigDecimal.ZERO) != 0 ||
requirementsInfoDO.getLevelCashAmount().compareTo(BigDecimal.ZERO)!=0|| requirementsInfoDO.getLevelCashAmount().compareTo(BigDecimal.ZERO) != 0 ||
requirementsInfoDO.getLevelSalaryAmount().compareTo(BigDecimal.ZERO)!=0) { requirementsInfoDO.getLevelSalaryAmount().compareTo(BigDecimal.ZERO) != 0) {
if (requirementsInfoDO.getOrderLevel().equals("RUSH_ORDER")){ if (requirementsInfoDO.getOrderLevel().equals("RUSH_ORDER")) {
publisherWalletFlowVO.setUrgentYxjAmount(requirementsInfoDO.getLevelCashAmount().negate()); publisherWalletFlowVO.setUrgentYxjAmount(requirementsInfoDO.getLevelCashAmount().negate());
publisherWalletFlowVO.setUrgentSalaryAmount(requirementsInfoDO.getLevelSalaryAmount().negate()); publisherWalletFlowVO.setUrgentSalaryAmount(requirementsInfoDO.getLevelSalaryAmount().negate());
} }
if (requirementsInfoDO.getOrderLevel().equals("TOP_ORDER")){ if (requirementsInfoDO.getOrderLevel().equals("TOP_ORDER")) {
publisherWalletFlowVO.setTopYxjAmount(requirementsInfoDO.getLevelCashAmount().negate()); publisherWalletFlowVO.setTopYxjAmount(requirementsInfoDO.getLevelCashAmount().negate());
publisherWalletFlowVO.setTopSalaryAmount(requirementsInfoDO.getLevelSalaryAmount().negate()); publisherWalletFlowVO.setTopSalaryAmount(requirementsInfoDO.getLevelSalaryAmount().negate());
} }
System.out.println(freeze); System.out.println(freeze);
//优先扣除微信 //优先扣除微信
BigDecimal weChat1 = requirementsInfoDO.getWeChat(); BigDecimal weChat1 = requirementsInfoDO.getWeChat();
//飞手应该获得的金额 //飞手应该获得的金额
publisherWalletFlowVO.setUserAccountId(userAccountId); publisherWalletFlowVO.setUserAccountId(userAccountId);
publisherWalletFlowVO.setOperateUserAccountId(userAccountId); publisherWalletFlowVO.setOperateUserAccountId(userAccountId);
publisherWalletFlowVO.setModeOfPayment(300); publisherWalletFlowVO.setModeOfPayment(300);
publisherWalletFlowVO.setPercentagePenaltyOfOrder(receiveSalaryAmount.negate()); publisherWalletFlowVO.setPercentagePenaltyOfOrder(receiveSalaryAmount.negate());
flyerWalletFlowVO.setCashAmount(serviceDO.getCashAmount()); flyerWalletFlowVO.setCashAmount(serviceDO.getCashAmount());
flyerWalletFlowVO.setSalaryAmount(serviceDO.getSalaryAmount()); flyerWalletFlowVO.setSalaryAmount(serviceDO.getSalaryAmount());
flyerWalletFlowVO.setUserAccountId(requirementsInfoDO.getPilotCertificationUserId()); flyerWalletFlowVO.setUserAccountId(requirementsInfoDO.getPilotCertificationUserId());
flyerWalletFlowVO.setOperateUserAccountId(userAccountId); flyerWalletFlowVO.setOperateUserAccountId(userAccountId);
flyerWalletFlowVO.setModeOfPayment(300); flyerWalletFlowVO.setModeOfPayment(300);
walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO); walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO);
walletFlowVO.setFlyerWalletFlowVO(flyerWalletFlowVO); walletFlowVO.setFlyerWalletFlowVO(flyerWalletFlowVO);
String s = String.valueOf(walletFlowVO); String s = String.valueOf(walletFlowVO);
log.info(s); log.info(s);
flyerCancel(walletFlowVO, request.getHeader("token")); flyerCancel(walletFlowVO, request.getHeader("token"));
} }
//飞手全额退款 //飞手全额退款
if (serviceDO.getWechatPayOrderNumber() != null) { if (serviceDO.getWechatPayOrderNumber() != null) {
ApplyRefundVO arv = new ApplyRefundVO(); ApplyRefundVO arv = new ApplyRefundVO();
arv.setReason("全额退款"); arv.setReason("全额退款");
arv.setRefund(serviceDO.getWeChat().multiply(new BigDecimal(100)).longValue()); arv.setRefund(serviceDO.getWeChat().multiply(new BigDecimal(100)).longValue());
arv.setOutTradeNo(serviceDO.getWechatPayOrderNumber()); arv.setOutTradeNo(serviceDO.getWechatPayOrderNumber());
applyRefund(arv, request.getHeader("token")); applyRefund(arv, request.getHeader("token"));
} }
requirementsInfoDO.setReceiveSalaryAmount(receiveSalaryAmount); requirementsInfoDO.setReceiveSalaryAmount(receiveSalaryAmount);
//给飞手发送短信 //给飞手发送短信
this.sendMsgFlyerInfoAuth(requirementsInfoDO); this.sendMsgFlyerInfoAuth(requirementsInfoDO);
requirementsDao.updateInfo(requirementsInfoId, 7); requirementsDao.updateInfo(requirementsInfoId, 7);
requirementsDao.updateFlow(requirementsInfoId, 7); requirementsDao.updateFlow(requirementsInfoId, 7);
return ResultBody.success(ResultEnum.REFUND_PERCENTAGE.getResultMsg()); return ResultBody.success(ResultEnum.REFUND_PERCENTAGE.getResultMsg());
} }
public ResultBody droneFlyerCancelDuty(Integer requirementsInfoId, Integer userAccountId, HttpServletRequest request) {
public ResultBody droneFlyerCancelDuty(Integer requirementsInfoId, Integer userAccountId, HttpServletRequest request){
RequirementsInfoDO infoDO = requirementsDao.publisherCancelFlyer(requirementsInfoId); RequirementsInfoDO infoDO = requirementsDao.publisherCancelFlyer(requirementsInfoId);
RequirementsServiceDO requirementsServiceDO = requirementsDao.droneFlyerCancel(requirementsInfoId, userAccountId); RequirementsServiceDO requirementsServiceDO = requirementsDao.droneFlyerCancel(requirementsInfoId, userAccountId);
IsNullConvertZeroUtil.checkIsNull(requirementsServiceDO); IsNullConvertZeroUtil.checkIsNull(requirementsServiceDO);
...@@ -1734,6 +1733,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1734,6 +1733,7 @@ public class RequirementsServiceImpl implements RequirementsService {
/** /**
* 给飞手短信 * 给飞手短信
*
* @param requirementsServiceDO * @param requirementsServiceDO
*/ */
private void publicSendMsgPublishInfoAuth(RequirementsServiceDO requirementsServiceDO) { private void publicSendMsgPublishInfoAuth(RequirementsServiceDO requirementsServiceDO) {
...@@ -1953,9 +1953,9 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1953,9 +1953,9 @@ public class RequirementsServiceImpl implements RequirementsService {
publisherWalletFlowVO.setUserAccountId(amountUpdateDO.getUserAccountId()); publisherWalletFlowVO.setUserAccountId(amountUpdateDO.getUserAccountId());
publisherWalletFlowVO.setOperateUserAccountId(amountUpdateDO.getUserAccountId()); publisherWalletFlowVO.setOperateUserAccountId(amountUpdateDO.getUserAccountId());
String wechatPayOrderNumber = amountUpdateDO.getWechatPayOrderNumber(); String wechatPayOrderNumber = amountUpdateDO.getWechatPayOrderNumber();
if (wechatPayOrderNumber!=null){ if (wechatPayOrderNumber != null) {
UserPayInfoVO userPayInfoVO = queryUserPayInfo(amountUpdateDO.getWechatPayOrderNumber(), request); UserPayInfoVO userPayInfoVO = queryUserPayInfo(amountUpdateDO.getWechatPayOrderNumber(), request);
if (!userPayInfoVO.getTradeState().equals("SUCCESS")){ if (!userPayInfoVO.getTradeState().equals("SUCCESS")) {
return ResultBody.error("支付失败,请重新支付"); return ResultBody.error("支付失败,请重新支付");
} }
} }
...@@ -1968,22 +1968,22 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -1968,22 +1968,22 @@ public class RequirementsServiceImpl implements RequirementsService {
requirementsDao.updateScene(amountVO.getRequirementsInfoId(), 8); requirementsDao.updateScene(amountVO.getRequirementsInfoId(), 8);
requirementsDao.updateInfo(amountVO.getRequirementsInfoId(), 8); requirementsDao.updateInfo(amountVO.getRequirementsInfoId(), 8);
int amountUpdate = requirementsDao.findAmountUpdate(amountUpdateDO.getRequirementsInfoId()); int amountUpdate = requirementsDao.findAmountUpdate(amountUpdateDO.getRequirementsInfoId());
if (amountUpdate!=0){ if (amountUpdate != 0) {
return ResultBody.error("只能修改一次不能重复修改"); return ResultBody.error("只能修改一次不能重复修改");
}else{ } else {
requirementsDao.requirementsAmountUpdate(amountUpdateDO); requirementsDao.requirementsAmountUpdate(amountUpdateDO);
} }
if (amountUpdateDO.getSalaryAmount().compareTo(BigDecimal.ZERO)!=0 || if (amountUpdateDO.getSalaryAmount().compareTo(BigDecimal.ZERO) != 0 ||
amountUpdateDO.getCashAmount().compareTo(BigDecimal.ZERO)!=0){ amountUpdateDO.getCashAmount().compareTo(BigDecimal.ZERO) != 0) {
walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO); walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO);
flyerCancelNO(walletFlowVO,request.getHeader("token")); flyerCancelNO(walletFlowVO, request.getHeader("token"));
} }
//倒计时 //倒计时
redisUtil.ins("order_" + requirementsInfoDO.getPublisherNumber(), String.valueOf(requirementsInfoDO), 1, TimeUnit.HOURS); redisUtil.ins("order_" + requirementsInfoDO.getPublisherNumber(), String.valueOf(requirementsInfoDO), 1, TimeUnit.HOURS);
// redisUtil.ins("order_" + requirementsInfoDO.getPublisherNumber(), String.valueOf(requirementsInfoDO), 1, TimeUnit.MINUTES); // redisUtil.ins("order_" + requirementsInfoDO.getPublisherNumber(), String.valueOf(requirementsInfoDO), 1, TimeUnit.MINUTES);
return ResultBody.success(); return ResultBody.success();
} else { } else {
...@@ -2001,7 +2001,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2001,7 +2001,7 @@ public class RequirementsServiceImpl implements RequirementsService {
} }
@Override @Override
public ResultBody confirmSettlement(Integer userAccountId, Integer requirementsInfoId,HttpServletRequest request) { public ResultBody confirmSettlement(Integer userAccountId, Integer requirementsInfoId, HttpServletRequest request) {
RequirementsInfoDO requirementsInfoDO = requirementsDao.publisherCancelFlyers(requirementsInfoId); RequirementsInfoDO requirementsInfoDO = requirementsDao.publisherCancelFlyers(requirementsInfoId);
ServiceSettleAccountsVO settleAccountsVO = new ServiceSettleAccountsVO(); ServiceSettleAccountsVO settleAccountsVO = new ServiceSettleAccountsVO();
settleAccountsVO.setRequirementsInfoId(requirementsInfoId); settleAccountsVO.setRequirementsInfoId(requirementsInfoId);
...@@ -2018,9 +2018,9 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2018,9 +2018,9 @@ public class RequirementsServiceImpl implements RequirementsService {
if (requirementsInfoDO == null) { if (requirementsInfoDO == null) {
return ResultBody.error("结算失败"); return ResultBody.error("结算失败");
} }
BigDecimal earnings=BigDecimal.ZERO; BigDecimal earnings = BigDecimal.ZERO;
//修改金额 //修改金额
if (updateAmount!=null){ if (updateAmount != null) {
//继续支付需要扣除金额 //继续支付需要扣除金额
IsNullConvertZeroUtil.checkIsNull(updateAmount); IsNullConvertZeroUtil.checkIsNull(updateAmount);
publisherWalletFlowVO.setCashAmount(requirementsInfoDO.getCashAmount().negate()); publisherWalletFlowVO.setCashAmount(requirementsInfoDO.getCashAmount().negate());
...@@ -2028,8 +2028,8 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2028,8 +2028,8 @@ public class RequirementsServiceImpl implements RequirementsService {
publisherWalletFlowVO.setUserAccountId(requirementsInfoDO.getUserAccountId()); publisherWalletFlowVO.setUserAccountId(requirementsInfoDO.getUserAccountId());
publisherWalletFlowVO.setOperateUserAccountId(userAccountId); publisherWalletFlowVO.setOperateUserAccountId(userAccountId);
publisherWalletFlowVO.setModeOfPayment(1000); publisherWalletFlowVO.setModeOfPayment(1000);
if (updateAmount.getCashAmount().compareTo(BigDecimal.ZERO)!=0|| if (updateAmount.getCashAmount().compareTo(BigDecimal.ZERO) != 0 ||
updateAmount.getSalaryAmount().compareTo(BigDecimal.ZERO)!=0){ updateAmount.getSalaryAmount().compareTo(BigDecimal.ZERO) != 0) {
BigDecimal cash = publisherWalletFlowVO.getCashAmount().negate(); BigDecimal cash = publisherWalletFlowVO.getCashAmount().negate();
BigDecimal salary = publisherWalletFlowVO.getSalaryAmount().negate(); BigDecimal salary = publisherWalletFlowVO.getSalaryAmount().negate();
...@@ -2039,13 +2039,14 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2039,13 +2039,14 @@ public class RequirementsServiceImpl implements RequirementsService {
publisherWalletFlowVO.setSalaryAmount(addSalary.negate()); publisherWalletFlowVO.setSalaryAmount(addSalary.negate());
// publisherWalletFlowVO.setRefundSalaryAmount(updateAmount.getSalaryAmount().negate()); // publisherWalletFlowVO.setRefundSalaryAmount(updateAmount.getSalaryAmount().negate());
//publisherWalletFlowVO.setRefundCashAmount(updateAmount.getCashAmount().negate()); //publisherWalletFlowVO.setRefundCashAmount(updateAmount.getCashAmount().negate());
}if(updateAmount.getReturnCashAmount().compareTo(BigDecimal.ZERO)!=0 || }
updateAmount.getReturnSalaryAmount().compareTo(BigDecimal.ZERO)!=0){ if (updateAmount.getReturnCashAmount().compareTo(BigDecimal.ZERO) != 0 ||
updateAmount.getReturnSalaryAmount().compareTo(BigDecimal.ZERO) != 0) {
publisherWalletFlowVO.setRefundCashAmount(updateAmount.getReturnCashAmount()); publisherWalletFlowVO.setRefundCashAmount(updateAmount.getReturnCashAmount());
publisherWalletFlowVO.setRefundSalaryAmount(updateAmount.getReturnSalaryAmount()); publisherWalletFlowVO.setRefundSalaryAmount(updateAmount.getReturnSalaryAmount());
} }
if (updateAmount.getReturnWeChat().compareTo(BigDecimal.ZERO)!=0){ if (updateAmount.getReturnWeChat().compareTo(BigDecimal.ZERO) != 0) {
ApplyRefundVO applyRefundVO = new ApplyRefundVO(); ApplyRefundVO applyRefundVO = new ApplyRefundVO();
applyRefundVO.setReason("飞手确认退款"); applyRefundVO.setReason("飞手确认退款");
applyRefundVO.setOutTradeNo(updateAmount.getWechatPayOrderNumber()); applyRefundVO.setOutTradeNo(updateAmount.getWechatPayOrderNumber());
...@@ -2059,7 +2060,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2059,7 +2060,7 @@ public class RequirementsServiceImpl implements RequirementsService {
BigDecimal multiply = updateOrderAmount.multiply(new BigDecimal(0.9)).setScale(2, BigDecimal.ROUND_HALF_UP); BigDecimal multiply = updateOrderAmount.multiply(new BigDecimal(0.9)).setScale(2, BigDecimal.ROUND_HALF_UP);
publisherWalletFlowVO.setFlyerSalaryAmount(multiply); publisherWalletFlowVO.setFlyerSalaryAmount(multiply);
//平台收益 //平台收益
earnings = updateOrderAmount.multiply(new BigDecimal(0.1)).setScale(2, BigDecimal.ROUND_HALF_UP); earnings = updateOrderAmount.multiply(new BigDecimal(0.1)).setScale(2, BigDecimal.ROUND_HALF_UP);
} }
flyerWalletFlowVO.setSalaryAmount(serviceDO.getSalaryAmount()); flyerWalletFlowVO.setSalaryAmount(serviceDO.getSalaryAmount());
...@@ -2068,7 +2069,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2068,7 +2069,7 @@ public class RequirementsServiceImpl implements RequirementsService {
flyerWalletFlowVO.setOperateUserAccountId(userAccountId); flyerWalletFlowVO.setOperateUserAccountId(userAccountId);
flyerWalletFlowVO.setModeOfPayment(1000); flyerWalletFlowVO.setModeOfPayment(1000);
if (serviceDO.getWeChat().compareTo(BigDecimal.ZERO)!=0){ if (serviceDO.getWeChat().compareTo(BigDecimal.ZERO) != 0) {
ApplyRefundVO applyRefundVO = new ApplyRefundVO(); ApplyRefundVO applyRefundVO = new ApplyRefundVO();
applyRefundVO.setReason("原路退回"); applyRefundVO.setReason("原路退回");
applyRefundVO.setOutTradeNo(serviceDO.getWechatPayOrderNumber()); applyRefundVO.setOutTradeNo(serviceDO.getWechatPayOrderNumber());
...@@ -2081,10 +2082,10 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2081,10 +2082,10 @@ public class RequirementsServiceImpl implements RequirementsService {
walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO); walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO);
walletFlowVO.setFlyerWalletFlowVO(flyerWalletFlowVO); walletFlowVO.setFlyerWalletFlowVO(flyerWalletFlowVO);
flyerCancelNO(walletFlowVO,request.getHeader("token")); flyerCancelNO(walletFlowVO, request.getHeader("token"));
BigDecimal orderEarnings = requirementsInfoDO.getOrderEarnings(); BigDecimal orderEarnings = requirementsInfoDO.getOrderEarnings();
BigDecimal add = orderEarnings.add(earnings); BigDecimal add = orderEarnings.add(earnings);
requirementsDao.updateOrderEarnings(add,requirementsInfoId); requirementsDao.updateOrderEarnings(add, requirementsInfoId);
requirementsDao.updateInfo(requirementsInfoId, 5); requirementsDao.updateInfo(requirementsInfoId, 5);
requirementsDao.updateScene(requirementsInfoId, 5); requirementsDao.updateScene(requirementsInfoId, 5);
return ResultBody.success(); return ResultBody.success();
...@@ -2354,57 +2355,57 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2354,57 +2355,57 @@ public class RequirementsServiceImpl implements RequirementsService {
IsNullConvertZeroUtil.checkIsNull(serviceDO); IsNullConvertZeroUtil.checkIsNull(serviceDO);
IsNullConvertZeroUtil.checkIsNull(requirementsInfoDO); IsNullConvertZeroUtil.checkIsNull(requirementsInfoDO);
if (requirementsInfoDO.getServiceFlowId()==5){ if (requirementsInfoDO.getServiceFlowId() == 5) {
return ResultBody.error("已结算"); return ResultBody.error("已结算");
} }
if (requirementsInfoDO == null) { if (requirementsInfoDO == null) {
return ResultBody.error("结算失败"); return ResultBody.error("结算失败");
} }
BigDecimal earnings=BigDecimal.ZERO; BigDecimal earnings = BigDecimal.ZERO;
//修改金额 //修改金额
if (updateAmount!=null){ if (updateAmount != null) {
//继续支付需要扣除金额 //继续支付需要扣除金额
IsNullConvertZeroUtil.checkIsNull(updateAmount); IsNullConvertZeroUtil.checkIsNull(updateAmount);
if (updateAmount.getUpdateOrderAmount().compareTo(updateAmount.getOrderAmount())==-1){ if (updateAmount.getUpdateOrderAmount().compareTo(updateAmount.getOrderAmount()) == -1) {
if (updateAmount.getReturnSalaryAmount().compareTo(BigDecimal.ZERO)!=0){ if (updateAmount.getReturnSalaryAmount().compareTo(BigDecimal.ZERO) != 0) {
BigDecimal orderAmount = updateAmount.getOrderAmount(); BigDecimal orderAmount = updateAmount.getOrderAmount();
BigDecimal returnSalaryAmount = updateAmount.getReturnSalaryAmount(); BigDecimal returnSalaryAmount = updateAmount.getReturnSalaryAmount();
BigDecimal subtract = orderAmount.subtract(returnSalaryAmount); BigDecimal subtract = orderAmount.subtract(returnSalaryAmount);
publisherWalletFlowVO.setSalaryAmount(subtract.negate()); publisherWalletFlowVO.setSalaryAmount(subtract.negate());
if (requirementsInfoDO.getSalaryAmount().compareTo(updateAmount.getReturnSalaryAmount())==0){ if (requirementsInfoDO.getSalaryAmount().compareTo(updateAmount.getReturnSalaryAmount()) == 0) {
publisherWalletFlowVO.setSalaryAmount(BigDecimal.ZERO); publisherWalletFlowVO.setSalaryAmount(BigDecimal.ZERO);
} }
if (requirementsInfoDO.getSalaryAmount().compareTo(updateAmount.getReturnSalaryAmount())==1){ if (requirementsInfoDO.getSalaryAmount().compareTo(updateAmount.getReturnSalaryAmount()) == 1) {
publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount().subtract(updateAmount.getReturnSalaryAmount()).negate()); publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount().subtract(updateAmount.getReturnSalaryAmount()).negate());
} }
}else{ } else {
publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount().negate()); publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount().negate());
} }
if (updateAmount.getReturnCashAmount().compareTo(BigDecimal.ZERO)!=0){ if (updateAmount.getReturnCashAmount().compareTo(BigDecimal.ZERO) != 0) {
BigDecimal orderAmount = updateAmount.getOrderAmount(); BigDecimal orderAmount = updateAmount.getOrderAmount();
BigDecimal returnCashAmount = updateAmount.getReturnCashAmount(); BigDecimal returnCashAmount = updateAmount.getReturnCashAmount();
BigDecimal subtract = orderAmount.subtract(returnCashAmount); BigDecimal subtract = orderAmount.subtract(returnCashAmount);
publisherWalletFlowVO.setCashAmount(subtract.negate()); publisherWalletFlowVO.setCashAmount(subtract.negate());
if (requirementsInfoDO.getCashAmount().compareTo(updateAmount.getReturnCashAmount())==0){ if (requirementsInfoDO.getCashAmount().compareTo(updateAmount.getReturnCashAmount()) == 0) {
publisherWalletFlowVO.setCashAmount(BigDecimal.ZERO); publisherWalletFlowVO.setCashAmount(BigDecimal.ZERO);
} }
if (updateAmount.getReturnCashAmount().compareTo(requirementsInfoDO.getCashAmount())==-1){ if (updateAmount.getReturnCashAmount().compareTo(requirementsInfoDO.getCashAmount()) == -1) {
BigDecimal cashAmount = requirementsInfoDO.getCashAmount(); BigDecimal cashAmount = requirementsInfoDO.getCashAmount();
BigDecimal returnCashAmount1 = updateAmount.getReturnCashAmount(); BigDecimal returnCashAmount1 = updateAmount.getReturnCashAmount();
BigDecimal subtract1 = cashAmount.subtract(returnCashAmount1); BigDecimal subtract1 = cashAmount.subtract(returnCashAmount1);
publisherWalletFlowVO.setCashAmount(subtract1.negate()); publisherWalletFlowVO.setCashAmount(subtract1.negate());
} }
}else{ } else {
publisherWalletFlowVO.setCashAmount(requirementsInfoDO.getCashAmount().negate()); publisherWalletFlowVO.setCashAmount(requirementsInfoDO.getCashAmount().negate());
} }
} }
if (updateAmount.getUpdateOrderAmount().compareTo(updateAmount.getOrderAmount())==1){ if (updateAmount.getUpdateOrderAmount().compareTo(updateAmount.getOrderAmount()) == 1) {
publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount().negate()); publisherWalletFlowVO.setSalaryAmount(requirementsInfoDO.getSalaryAmount().negate());
publisherWalletFlowVO.setCashAmount(requirementsInfoDO.getCashAmount().negate()); publisherWalletFlowVO.setCashAmount(requirementsInfoDO.getCashAmount().negate());
} }
...@@ -2412,8 +2413,8 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2412,8 +2413,8 @@ public class RequirementsServiceImpl implements RequirementsService {
publisherWalletFlowVO.setUserAccountId(requirementsInfoDO.getUserAccountId()); publisherWalletFlowVO.setUserAccountId(requirementsInfoDO.getUserAccountId());
publisherWalletFlowVO.setOperateUserAccountId(agreeVO.getUserAccountId()); publisherWalletFlowVO.setOperateUserAccountId(agreeVO.getUserAccountId());
publisherWalletFlowVO.setModeOfPayment(1000); publisherWalletFlowVO.setModeOfPayment(1000);
if (updateAmount.getCashAmount().compareTo(BigDecimal.ZERO)!=0|| if (updateAmount.getCashAmount().compareTo(BigDecimal.ZERO) != 0 ||
updateAmount.getSalaryAmount().compareTo(BigDecimal.ZERO)!=0){ updateAmount.getSalaryAmount().compareTo(BigDecimal.ZERO) != 0) {
BigDecimal cash = publisherWalletFlowVO.getCashAmount().negate(); BigDecimal cash = publisherWalletFlowVO.getCashAmount().negate();
BigDecimal salary = publisherWalletFlowVO.getSalaryAmount().negate(); BigDecimal salary = publisherWalletFlowVO.getSalaryAmount().negate();
...@@ -2424,12 +2425,13 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2424,12 +2425,13 @@ public class RequirementsServiceImpl implements RequirementsService {
// publisherWalletFlowVO.setRefundSalaryAmount(updateAmount.getSalaryAmount().negate()); // publisherWalletFlowVO.setRefundSalaryAmount(updateAmount.getSalaryAmount().negate());
//publisherWalletFlowVO.setRefundCashAmount(updateAmount.getCashAmount().negate()); //publisherWalletFlowVO.setRefundCashAmount(updateAmount.getCashAmount().negate());
}if(updateAmount.getReturnCashAmount().compareTo(BigDecimal.ZERO)!=0 || }
updateAmount.getReturnSalaryAmount().compareTo(BigDecimal.ZERO)!=0){ if (updateAmount.getReturnCashAmount().compareTo(BigDecimal.ZERO) != 0 ||
updateAmount.getReturnSalaryAmount().compareTo(BigDecimal.ZERO) != 0) {
publisherWalletFlowVO.setRefundCashAmount(updateAmount.getReturnCashAmount()); publisherWalletFlowVO.setRefundCashAmount(updateAmount.getReturnCashAmount());
publisherWalletFlowVO.setRefundSalaryAmount(updateAmount.getReturnSalaryAmount()); publisherWalletFlowVO.setRefundSalaryAmount(updateAmount.getReturnSalaryAmount());
} }
if (updateAmount.getReturnWeChat().compareTo(BigDecimal.ZERO)!=0){ if (updateAmount.getReturnWeChat().compareTo(BigDecimal.ZERO) != 0) {
ApplyRefundVO applyRefundVO = new ApplyRefundVO(); ApplyRefundVO applyRefundVO = new ApplyRefundVO();
applyRefundVO.setReason("飞手确认退款"); applyRefundVO.setReason("飞手确认退款");
applyRefundVO.setOutTradeNo(requirementsInfoDO.getWechatPayOrderNumber()); applyRefundVO.setOutTradeNo(requirementsInfoDO.getWechatPayOrderNumber());
...@@ -2438,7 +2440,6 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2438,7 +2440,6 @@ public class RequirementsServiceImpl implements RequirementsService {
} }
//给飞手金额 //给飞手金额
BigDecimal updateOrderAmount = updateAmount.getUpdateOrderAmount(); BigDecimal updateOrderAmount = updateAmount.getUpdateOrderAmount();
...@@ -2457,7 +2458,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2457,7 +2458,7 @@ public class RequirementsServiceImpl implements RequirementsService {
/** /**
* 退飞手金额 * 退飞手金额
*/ */
if (serviceDO.getWeChat().compareTo(BigDecimal.ZERO)!=0){ if (serviceDO.getWeChat().compareTo(BigDecimal.ZERO) != 0) {
ApplyRefundVO applyRefundVO = new ApplyRefundVO(); ApplyRefundVO applyRefundVO = new ApplyRefundVO();
applyRefundVO.setReason("原路退回"); applyRefundVO.setReason("原路退回");
applyRefundVO.setOutTradeNo(serviceDO.getWechatPayOrderNumber()); applyRefundVO.setOutTradeNo(serviceDO.getWechatPayOrderNumber());
...@@ -2470,18 +2471,16 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2470,18 +2471,16 @@ public class RequirementsServiceImpl implements RequirementsService {
walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO); walletFlowVO.setPublisherWalletFlowVO(publisherWalletFlowVO);
walletFlowVO.setFlyerWalletFlowVO(flyerWalletFlowVO); walletFlowVO.setFlyerWalletFlowVO(flyerWalletFlowVO);
flyerCancelNO(walletFlowVO,request.getHeader("token")); flyerCancelNO(walletFlowVO, request.getHeader("token"));
BigDecimal orderEarnings = requirementsInfoDO.getOrderEarnings(); BigDecimal orderEarnings = requirementsInfoDO.getOrderEarnings();
BigDecimal add = orderEarnings.add(earnings); BigDecimal add = orderEarnings.add(earnings);
requirementsDao.updateOrderEarnings(add,agreeVO.getRequirementsInfoId()); requirementsDao.updateOrderEarnings(add, agreeVO.getRequirementsInfoId());
requirementsDao.updateInfo(agreeVO.getRequirementsInfoId(), 5); requirementsDao.updateInfo(agreeVO.getRequirementsInfoId(), 5);
requirementsDao.updateScene(agreeVO.getRequirementsInfoId(), 5); requirementsDao.updateScene(agreeVO.getRequirementsInfoId(), 5);
return ResultBody.success(); return ResultBody.success();
} }
@Override @Override
public ResultBody publishService(ServiceRequirementsVO serviceRequirementsVO, HttpServletRequest request) { public ResultBody publishService(ServiceRequirementsVO serviceRequirementsVO, HttpServletRequest request) {
...@@ -2583,7 +2582,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2583,7 +2582,7 @@ public class RequirementsServiceImpl implements RequirementsService {
if (!(tempTotalAmount.compareTo(BigDecimal.ZERO) == 0)) { if (!(tempTotalAmount.compareTo(BigDecimal.ZERO) == 0)) {
if (salaryAmt.compareTo(tempTotalAmount) == 1 || salaryAmt.compareTo(tempTotalAmount) == 0) { if (salaryAmt.compareTo(tempTotalAmount) == 1 || salaryAmt.compareTo(tempTotalAmount) == 0) {
// walletFlowVO.setSalaryAmount(tempTotalAmount); // walletFlowVO.setSalaryAmount(tempTotalAmount);
// publisherWalletFlowVO.setTopSalaryAmount(tempTotalAmount); // publisherWalletFlowVO.setTopSalaryAmount(tempTotalAmount);
if (orderLevelEnum.equals("RUSH_ORDER")) { if (orderLevelEnum.equals("RUSH_ORDER")) {
publisherWalletFlowVO.setUrgentSalaryAmount(tempTotalAmount); publisherWalletFlowVO.setUrgentSalaryAmount(tempTotalAmount);
requirementsInfoDO.setLevelSalaryAmount(tempTotalAmount); requirementsInfoDO.setLevelSalaryAmount(tempTotalAmount);
...@@ -2762,7 +2761,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2762,7 +2761,7 @@ public class RequirementsServiceImpl implements RequirementsService {
requirementsDao.addPublishService(requirementsInfoDO); requirementsDao.addPublishService(requirementsInfoDO);
RequirementsAmountDO requirementsAmountDO = new RequirementsAmountDO(requirementsInfoDO); RequirementsAmountDO requirementsAmountDO = new RequirementsAmountDO(requirementsInfoDO);
requirementsDao.addAmount(requirementsAmountDO); requirementsDao.addAmount(requirementsAmountDO);
if(sum == 1) { if (sum == 1) {
requirementsDao.insertPlatformOrderEarnings(new BigDecimal(0), requirementsInfoDO.getId(), 0); requirementsDao.insertPlatformOrderEarnings(new BigDecimal(0), requirementsInfoDO.getId(), 0);
if (requirementsAmountDO.getCashAmount().compareTo(BigDecimal.ZERO) != 0 if (requirementsAmountDO.getCashAmount().compareTo(BigDecimal.ZERO) != 0
|| requirementsAmountDO.getSalaryAmount().compareTo(BigDecimal.ZERO) != 0 || requirementsAmountDO.getSalaryAmount().compareTo(BigDecimal.ZERO) != 0
...@@ -2771,7 +2770,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2771,7 +2770,7 @@ public class RequirementsServiceImpl implements RequirementsService {
feignWalletFlow(publisherWalletFlowVO, request.getHeader("token")); feignWalletFlow(publisherWalletFlowVO, request.getHeader("token"));
} }
return ResultBody.success(); return ResultBody.success();
}else { } else {
//循环添加子订单 //循环添加子订单
for (int i = 0; i < sum; i++) { for (int i = 0; i < sum; i++) {
ServiceRequirementsSonDO requirementsSonDO = new ServiceRequirementsSonDO(requirementsInfoDO); ServiceRequirementsSonDO requirementsSonDO = new ServiceRequirementsSonDO(requirementsInfoDO);
...@@ -2849,7 +2848,7 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2849,7 +2848,7 @@ public class RequirementsServiceImpl implements RequirementsService {
@Override @Override
public ServiceRequirementsDO getRepertory(GrabTheOrderVO grabTheOrderVO, HttpServletRequest request) { public ServiceRequirementsDO getRepertory(GrabTheOrderVO grabTheOrderVO, HttpServletRequest request) {
return requirementsDao.grabTheOrder(grabTheOrderVO.getRequirementsInfoId()); return requirementsDao.grabTheOrder(grabTheOrderVO.getRequirementsInfoId());
} }
...@@ -2859,17 +2858,17 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2859,17 +2858,17 @@ public class RequirementsServiceImpl implements RequirementsService {
//这是这个订单所需要的总人数 //这是这个订单所需要的总人数
Integer requireNum = grabTheOrderVO.getRequireNum(); Integer requireNum = grabTheOrderVO.getRequireNum();
if(requireNum == null || grabTheOrderVO.getRequirementsInfoId() == null){ if (requireNum == null || grabTheOrderVO.getRequirementsInfoId() == null) {
return ResultBody.error("参数不全"); return ResultBody.error("参数不全");
} }
Integer fatherRequireId = null,fatherRepertory=null; Integer fatherRequireId = null, fatherRepertory = null;
//requireNum >= 2就说明这个订单是分开的有子订单 //requireNum >= 2就说明这个订单是分开的有子订单
if(requireNum >= 2) { if (requireNum >= 2) {
fatherRequireId = grabTheOrderVO.getRequirementsInfoId(); fatherRequireId = grabTheOrderVO.getRequirementsInfoId();
//不让同一个用户对一个多人订单重复下单 //不让同一个用户对一个多人订单重复下单
if(requirementsDao.selectBooleanByFatherIdAndUserId(fatherRequireId,grabTheOrderVO.getUserAccountId()) > 0) { if (requirementsDao.selectBooleanByFatherIdAndUserId(fatherRequireId, grabTheOrderVO.getUserAccountId()) > 0) {
return ResultBody.error("不能重复抢一个订单"); return ResultBody.error("不能重复抢一个订单");
} }
ServiceRequirementsDO fatherRequirementsInfoDO = requirementsDao.grabTheOrder(fatherRequireId); ServiceRequirementsDO fatherRequirementsInfoDO = requirementsDao.grabTheOrder(fatherRequireId);
...@@ -2884,10 +2883,10 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -2884,10 +2883,10 @@ public class RequirementsServiceImpl implements RequirementsService {
//获取没被抢的子订单id //获取没被抢的子订单id
Integer requirementsSonInfoId = requirementsDao.getRequirementsSonInfoId(fatherRequireId); Integer requirementsSonInfoId = requirementsDao.getRequirementsSonInfoId(fatherRequireId);
grabTheOrderVO.setRequirementsInfoId(requirementsSonInfoId); grabTheOrderVO.setRequirementsInfoId(requirementsSonInfoId);
}else { } else {
//单人被拒绝后也不能再次抢单 //单人被拒绝后也不能再次抢单
Integer countRefuse = requirementsDao.selectRequirementsRefuse(grabTheOrderVO.getRequirementsInfoId(), grabTheOrderVO.getUserAccountId()); Integer countRefuse = requirementsDao.selectRequirementsRefuse(grabTheOrderVO.getRequirementsInfoId(), grabTheOrderVO.getUserAccountId());
if(countRefuse == 1) { if (countRefuse == 1) {
return ResultBody.error("不能重复抢一个订单"); return ResultBody.error("不能重复抢一个订单");
} }
} }
...@@ -3007,20 +3006,23 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -3007,20 +3006,23 @@ public class RequirementsServiceImpl implements RequirementsService {
// requirementsServiceDO.setPreemptTotalAmount(add1); // requirementsServiceDO.setPreemptTotalAmount(add1);
// requirementsServiceDO.setOpenid(openid); // requirementsServiceDO.setOpenid(openid);
// requirementsServiceDO.setPhoneNum(grabTheOrderVO.getPhoneNum()); // requirementsServiceDO.setPhoneNum(grabTheOrderVO.getPhoneNum());
//微信是否支付成功 //微信是否支付成功
requirementsDao.insertService(requirementsServiceDO); requirementsDao.insertService(requirementsServiceDO);
requirementsInfoDO.setRepertory(repertory - 1); requirementsInfoDO.setRepertory(repertory - 1);
requirementsDao.updateGrabTheOrder(grabTheOrderVO.getRequirementsInfoId(), requirementsInfoDO.getRepertory()); requirementsDao.updateGrabTheOrder(grabTheOrderVO.getRequirementsInfoId(), requirementsInfoDO.getRepertory());
// if (requirementsServiceDO.getCashAmount().compareTo(BigDecimal.ZERO) != 0 // if (requirementsServiceDO.getCashAmount().compareTo(BigDecimal.ZERO) != 0
// || requirementsServiceDO.getSalaryAmount().compareTo(BigDecimal.ZERO) != 0) { // || requirementsServiceDO.getSalaryAmount().compareTo(BigDecimal.ZERO) != 0) {
// walletFlow(flyerWalletFlowVO, request.getHeader("token")); // walletFlow(flyerWalletFlowVO, request.getHeader("token"));
// } // }
//如果是多人订单 还要去修改父订单还需多少人字段 //如果是多人订单 还要去修改父订单还需多少人字段
if(requireNum >= 2) { if (requireNum >= 2) {
requirementsDao.updateRequirementsInfoRepertory(fatherRequireId,fatherRepertory - 1); Integer repertoryNeed = requirementsDao.selectRepertoryByRequireId(fatherRequireId);
} requirementsDao.updateRequirementsInfoRepertory(fatherRequireId, repertoryNeed);
}
OnlyRequirementsInfoId onlyRequirementsInfoId = new OnlyRequirementsInfoId();
onlyRequirementsInfoId.setRequirementsInfoId(grabTheOrderVO.getRequirementsInfoId());
return ResultBody.success(); return ResultBody.success(onlyRequirementsInfoId);
// } else { // } else {
// //云享金和佣金扣除完成,但是还不足支付订单金额,并且没有选择微信支付,所以支付不合法 // //云享金和佣金扣除完成,但是还不足支付订单金额,并且没有选择微信支付,所以支付不合法
// return ResultBody.success("抢单失败"); // return ResultBody.success("抢单失败");
...@@ -3199,13 +3201,13 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -3199,13 +3201,13 @@ public class RequirementsServiceImpl implements RequirementsService {
if (agreeOrder) { if (agreeOrder) {
requirementsDao.updateScene(requireId, 2); requirementsDao.updateScene(requireId, 2);
requirementsDao.updateInfo(requireId, 2); requirementsDao.updateInfo(requireId, 2);
}else { } else {
//修改订单所需人数以及订单状态 //修改订单所需人数以及订单状态
requirementsDao.updateRequirementsInfoByRefusePilot(requireId); requirementsDao.updateRequirementsInfoByRefusePilot(requireId);
Integer fatherRequireId = requirementsDao.selectFatherRequireIdBySonId(requireId); Integer fatherRequireId = requirementsDao.selectFatherRequireIdBySonId(requireId);
Integer repertory = requirementsDao.selectRepertoryByRequireId(fatherRequireId); Integer repertory = requirementsDao.selectRepertoryByRequireId(fatherRequireId);
requirementsDao.updateRequirementsInfoRepertory(fatherRequireId, repertory); requirementsDao.updateRequirementsInfoRepertory(fatherRequireId, repertory);
requirementsDao.updateRequirementsService(requireId,param.getPilotCertificationUserId()); requirementsDao.updateRequirementsService(requireId, param.getPilotCertificationUserId());
//TODO 被拒绝后应该退回飞手的押金 //TODO 被拒绝后应该退回飞手的押金
} }
...@@ -3213,7 +3215,6 @@ public class RequirementsServiceImpl implements RequirementsService { ...@@ -3213,7 +3215,6 @@ public class RequirementsServiceImpl implements RequirementsService {
} }
public UserAccountSimpleDTO feignGetUserSimpleInfo(Integer userAccountId, HttpServletRequest request) { public UserAccountSimpleDTO feignGetUserSimpleInfo(Integer userAccountId, HttpServletRequest request) {
String token = request.getHeader("token"); String token = request.getHeader("token");
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论