|
@@ -140,7 +140,9 @@ public class RepairSaleService {
|
|
|
if(repair == null){
|
|
|
throw new BusinessException(ResultCode.REPAIR_NOT_EXITS);
|
|
|
}
|
|
|
-
|
|
|
+ if(repair.getStatus() !=2){
|
|
|
+ throw new BusinessException(ResultCode.REPAIR_STATUS_NOT_EXITS);
|
|
|
+ }
|
|
|
|
|
|
HashMap<Integer,Part> partMap = partService.getHashMap();
|
|
|
HashMap<Integer,LaborCost> laborMap = laborCostService.getHashMap();
|
|
@@ -195,12 +197,17 @@ public class RepairSaleService {
|
|
|
if(repair == null){
|
|
|
throw new BusinessException(ResultCode.REPAIR_NOT_EXITS);
|
|
|
}
|
|
|
+ if(repair.getStatus() !=9){
|
|
|
+ throw new BusinessException(ResultCode.REPAIR_STATUS_NOT_EXITS);
|
|
|
+ }
|
|
|
+ BigDecimal payAmount = priceListService.getAmountByRepairId(repair.getRepairId());
|
|
|
RepairPay repairPay = new RepairPay();
|
|
|
repairPay.setRepairId(repair.getRepairId());
|
|
|
repairPay.setPayType(param.getPayType());
|
|
|
repairPay.setPayImg(param.getPayImg());
|
|
|
repairPay.setPayStatus(1);
|
|
|
repairPay.setSysUserId(userId);
|
|
|
+ repairPay.setPayAmount(payAmount);
|
|
|
repairPayService.save(repairPay);
|
|
|
repairLogService.saveBySysUser(userId,param.getRepairId(),10,"付款登记");
|
|
|
|
|
@@ -214,6 +221,9 @@ public class RepairSaleService {
|
|
|
if(repair == null){
|
|
|
throw new BusinessException(ResultCode.REPAIR_NOT_EXITS);
|
|
|
}
|
|
|
+ if(repair.getStatus() !=10){
|
|
|
+ throw new BusinessException(ResultCode.REPAIR_STATUS_NOT_EXITS);
|
|
|
+ }
|
|
|
customerAddressService.setTrackingNumByRepairId(repair.getRepairId(),param.getTrackingNum());
|
|
|
repairLogService.saveBySysUser(userId,param.getRepairId(),11,"发货登记");
|
|
|
|