|
@@ -174,13 +174,13 @@ public class RepairSaleService {
|
|
|
HashMap<Integer,Part> partMap = partService.getHashMap();
|
|
|
HashMap<Integer,LaborCost> laborMap = laborCostService.getHashMap();
|
|
|
|
|
|
+ priceListService.delNoCm(repair.getRepairId());
|
|
|
for (PriceList priceList : param.getPriceLists()) {
|
|
|
if(priceList.getType() == null){
|
|
|
throw new BusinessException(ResultCode.PRICE_TYPE_NOT);
|
|
|
}
|
|
|
if(priceList.getType() == 0){
|
|
|
- if(priceList.getPartId() == null || partMap.get(priceList.getPartId()) == null
|
|
|
- || priceList.getPriceListId() == null || priceList.getDiscount() == null){
|
|
|
+ if(priceList.getPartId() == null || partMap.get(priceList.getPartId()) == null || priceList.getDiscount() == null){
|
|
|
throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
}
|
|
|
Part part = partMap.get(priceList.getPartId());
|
|
@@ -199,14 +199,7 @@ public class RepairSaleService {
|
|
|
}
|
|
|
|
|
|
priceList.setRepairId(param.getRepairId());
|
|
|
- if(priceList.getPriceListId() != null){
|
|
|
- PriceList dbPriceList = priceListService.getById(priceList.getPriceListId());
|
|
|
- if(dbPriceList.getStatus() != 1){
|
|
|
- priceListService.updateById(priceList);
|
|
|
- }
|
|
|
- }else {
|
|
|
- priceListService.save(priceList);
|
|
|
- }
|
|
|
+ priceListService.save(priceList);
|
|
|
|
|
|
}
|
|
|
repairLogService.saveBySysUser(userId,param.getRepairId(),RepairStatusEnum.TO_BE_CONFIRMED.status(),"维修报价");
|