打印工单 完成
This commit is contained in:
parent
c1cf26a98c
commit
fd3b9c0aec
@ -111,6 +111,6 @@ public class RepairOrderInfoController {
|
||||
@GetMapping("/toPay")
|
||||
@Operation(summary = "PC支付按钮")
|
||||
public CommonResult<?> toPay(@RequestParam("id")String id) throws IOException, NoSuchAlgorithmException, SignatureException, InvalidKeyException {
|
||||
return success(repairOrderInfoService.payTransactions(id));
|
||||
return success(repairOrderInfoService.payTransactionsCode(id));
|
||||
}
|
||||
}
|
@ -743,11 +743,11 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
params.put("bankAddress", bankAddress);
|
||||
params.put("account", account);
|
||||
|
||||
// 调支付接口 todo 这个地方应该还要加东西
|
||||
// 调支付接口
|
||||
String payUrl = "";
|
||||
try {
|
||||
Map<String, Object> stringObjectMap = repairOrderInfoService.payTransactions(orderInfo.getId());
|
||||
payUrl = (String) stringObjectMap.get("prepay_id");
|
||||
Map<String, Object> stringObjectMap = repairOrderInfoService.payTransactionsCode(orderInfo.getId());
|
||||
payUrl = (String) stringObjectMap.get("code_url");
|
||||
// 这个地方可能报错,报错就不生成二维码了,保证工单是能出来的
|
||||
// 生成收款二维码
|
||||
int width = 100, height = 100;
|
||||
@ -1357,6 +1357,16 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
BigDecimal confirmFaultMoney = ObjectUtil.isNotEmpty(oldTicket.getConfirmFaultMoney()) ? oldTicket.getConfirmFaultMoney() : new BigDecimal("0");
|
||||
|
||||
tickets.setTotalPrice(tickets.getTotalPrice().add(managerMoney).add(rescueMoney).add(threePackMoney).add(confirmFaultMoney));
|
||||
|
||||
// 因为订单是在工单创建的时候就新增了,后面加的配件之类的金额没有同步到订单,这里同步一下
|
||||
RepairOrderInfo orderInfo = repairOrderInfoService.getOne(new LambdaQueryWrapper<RepairOrderInfo>().eq(RepairOrderInfo::getGoodsId, ticketId));
|
||||
RepairOrderInfo newOrderInfo = new RepairOrderInfo();
|
||||
newOrderInfo.setId(orderInfo.getId());
|
||||
// 更新商品原价和实付金额
|
||||
newOrderInfo.setGoodsPrice(tickets.getTotalPrice());
|
||||
newOrderInfo.setPayMoney(tickets.getTotalPrice());
|
||||
repairOrderInfoService.updateById(newOrderInfo);
|
||||
|
||||
return baseMapper.updateById(tickets) > 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user