|
@@ -263,10 +263,16 @@ public class RepairSaleService {
|
|
throw new BusinessException(ResultCode.ORDER_PAY_ERROR);
|
|
throw new BusinessException(ResultCode.ORDER_PAY_ERROR);
|
|
}
|
|
}
|
|
BigDecimal payAmount;
|
|
BigDecimal payAmount;
|
|
|
|
+ String orderSn = null;
|
|
|
|
+ Integer status = null;
|
|
if(repair.getStatus().equals(RepairStatusEnum.TO_BE_CANCELED.status())){
|
|
if(repair.getStatus().equals(RepairStatusEnum.TO_BE_CANCELED.status())){
|
|
payAmount = priceListService.getRobAmountByRepairId(repair.getRepairId());
|
|
payAmount = priceListService.getRobAmountByRepairId(repair.getRepairId());
|
|
|
|
+ orderSn = "se_c"+DateUtil.getDate(DateUtil.repairIdFmt);
|
|
|
|
+ status = RepairStatusEnum.TO_BE_CANCELED_RECOVERED.status();
|
|
}else {
|
|
}else {
|
|
payAmount = priceListService.getAmountByRepairId(repair.getRepairId());
|
|
payAmount = priceListService.getAmountByRepairId(repair.getRepairId());
|
|
|
|
+ orderSn = "se_s"+DateUtil.getDate(DateUtil.repairIdFmt);
|
|
|
|
+ status = RepairStatusEnum.TO_BE_RECOVERED.status();
|
|
}
|
|
}
|
|
RepairPay repairPay = new RepairPay();
|
|
RepairPay repairPay = new RepairPay();
|
|
repairPay.setRepairId(repair.getRepairId());
|
|
repairPay.setRepairId(repair.getRepairId());
|
|
@@ -277,20 +283,12 @@ public class RepairSaleService {
|
|
repairPay.setPayAmount(payAmount);
|
|
repairPay.setPayAmount(payAmount);
|
|
repairPay.setPayTime(DateUtil.getDate());
|
|
repairPay.setPayTime(DateUtil.getDate());
|
|
repairPay.setOrderType(0);
|
|
repairPay.setOrderType(0);
|
|
- if(repair.getCancelStatus() == 1){
|
|
|
|
- repairPay.setOrderSn("se_c"+DateUtil.getDate(DateUtil.repairIdFmt));
|
|
|
|
- }else {
|
|
|
|
- repairPay.setOrderSn("se_s"+DateUtil.getDate(DateUtil.repairIdFmt));
|
|
|
|
- }
|
|
|
|
|
|
+ repairPay.setOrderSn(orderSn);
|
|
repairPayService.save(repairPay);
|
|
repairPayService.save(repairPay);
|
|
|
|
|
|
List<RepairRegisterPartVo> partVoList = repairSupplyService.partInfo(repairPay.getRepairId(), 1);
|
|
List<RepairRegisterPartVo> partVoList = repairSupplyService.partInfo(repairPay.getRepairId(), 1);
|
|
if(partVoList.size() >0){
|
|
if(partVoList.size() >0){
|
|
- if(repair.getCancelStatus() == 1){
|
|
|
|
- repairLogService.saveBySysUser(userId,param.getRepairId(),RepairStatusEnum.TO_BE_CANCELED_RECOVERED.status(), "付款登记");
|
|
|
|
- }else {
|
|
|
|
- repairLogService.saveBySysUser(userId,param.getRepairId(),RepairStatusEnum.TO_BE_RECOVERED.status(), "付款登记");
|
|
|
|
- }
|
|
|
|
|
|
+ repairLogService.saveBySysUser(userId,param.getRepairId(),status, "付款登记");
|
|
}else {
|
|
}else {
|
|
repairLogService.saveBySysUser(userId,param.getRepairId(),RepairStatusEnum.TO_BE_SHIPPED.status(), "付款登记");
|
|
repairLogService.saveBySysUser(userId,param.getRepairId(),RepairStatusEnum.TO_BE_SHIPPED.status(), "付款登记");
|
|
}
|
|
}
|