lyhzzz пре 2 година
родитељ
комит
10524a01be
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      src/main/java/com/fdkankan/sale/service/impl/RepairSaleService.java

+ 3 - 2
src/main/java/com/fdkankan/sale/service/impl/RepairSaleService.java

@@ -167,8 +167,9 @@ public class RepairSaleService {
                 throw new BusinessException(ResultCode.PRICE_TYPE_NOT);
             }
             if(priceList.getType() == 0){
-                if(priceList.getPartId() == null ||  partMap.get(priceList.getPartId()) == null || priceList.getPriceListId() == null){
-                    throw new BusinessException(ResultCode.PART_ID_EMPTY);
+                if(priceList.getPartId() == null ||  partMap.get(priceList.getPartId()) == null
+                        || priceList.getPriceListId() == null){
+                    throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
                 }
                 Part part = partMap.get(priceList.getPartId());
                 priceList.setPrice(part.getPartPrice());