перемесчения
This commit is contained in:
parent
0cbcca76b5
commit
a722d6049f
@ -1,7 +1,8 @@
|
||||
package ru.ulstu.is.sbapp.repair.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import ru.ulstu.is.sbapp.repair.dtos.ComponentDTO;
|
||||
import ru.ulstu.is.sbapp.repair.service.ComponentService;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,7 +1,8 @@
|
||||
package ru.ulstu.is.sbapp.repair.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import ru.ulstu.is.sbapp.repair.dtos.FavorDTO;
|
||||
import ru.ulstu.is.sbapp.repair.service.FavorService;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package ru.ulstu.is.sbapp.repair.controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import ru.ulstu.is.sbapp.repair.dtos.OrderDTO;
|
||||
import ru.ulstu.is.sbapp.repair.service.OrderService;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,7 +1,6 @@
|
||||
package ru.ulstu.is.sbapp.repair.controller;
|
||||
package ru.ulstu.is.sbapp.repair.dtos;
|
||||
|
||||
import ru.ulstu.is.sbapp.repair.model.Component;
|
||||
import ru.ulstu.is.sbapp.repair.model.Favor;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,6 +1,5 @@
|
||||
package ru.ulstu.is.sbapp.repair.controller;
|
||||
package ru.ulstu.is.sbapp.repair.dtos;
|
||||
|
||||
import ru.ulstu.is.sbapp.repair.model.Component;
|
||||
import ru.ulstu.is.sbapp.repair.model.Favor;
|
||||
|
||||
import java.util.List;
|
@ -1,7 +1,6 @@
|
||||
package ru.ulstu.is.sbapp.repair.controller;
|
||||
package ru.ulstu.is.sbapp.repair.dtos;
|
||||
|
||||
import org.aspectj.weaver.ast.Or;
|
||||
import ru.ulstu.is.sbapp.repair.model.Favor;
|
||||
import ru.ulstu.is.sbapp.repair.dtos.FavorDTO;
|
||||
import ru.ulstu.is.sbapp.repair.model.Order;
|
||||
|
||||
import java.util.Date;
|
@ -1,4 +1,4 @@
|
||||
package ru.ulstu.is.sbapp.repair.service;
|
||||
package ru.ulstu.is.sbapp.repair.exception;
|
||||
|
||||
public class ComponentNotFoundException extends RuntimeException{
|
||||
public ComponentNotFoundException(Long id) {
|
@ -1,4 +1,4 @@
|
||||
package ru.ulstu.is.sbapp.repair.service;
|
||||
package ru.ulstu.is.sbapp.repair.exception;
|
||||
|
||||
public class FavorNotFoundException extends RuntimeException{
|
||||
public FavorNotFoundException(Long id) {
|
@ -1,4 +1,4 @@
|
||||
package ru.ulstu.is.sbapp.repair.service;
|
||||
package ru.ulstu.is.sbapp.repair.exception;
|
||||
|
||||
public class OrderNotFoundException extends RuntimeException{
|
||||
public OrderNotFoundException(Long id) {
|
@ -3,19 +3,13 @@ package ru.ulstu.is.sbapp.repair.service;
|
||||
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
import ru.ulstu.is.sbapp.repair.controller.ComponentDTO;
|
||||
import ru.ulstu.is.sbapp.repair.exception.ComponentNotFoundException;
|
||||
import ru.ulstu.is.sbapp.repair.model.Component;
|
||||
import ru.ulstu.is.sbapp.repair.repository.ComponentRepository;
|
||||
import ru.ulstu.is.sbapp.repair.util.validation.ValidatorUtil;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.EntityNotFoundException;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
@ -1,20 +1,14 @@
|
||||
package ru.ulstu.is.sbapp.repair.service;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
import ru.ulstu.is.sbapp.repair.controller.FavorDTO;
|
||||
import ru.ulstu.is.sbapp.repair.exception.FavorNotFoundException;
|
||||
import ru.ulstu.is.sbapp.repair.model.Component;
|
||||
import ru.ulstu.is.sbapp.repair.model.Favor;
|
||||
import ru.ulstu.is.sbapp.repair.repository.FavorRepository;
|
||||
import ru.ulstu.is.sbapp.repair.util.validation.ValidatorUtil;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import javax.persistence.EntityNotFoundException;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
@ -1,20 +1,14 @@
|
||||
package ru.ulstu.is.sbapp.repair.service;
|
||||
|
||||
|
||||
import org.aspectj.weaver.ast.Or;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.StringUtils;
|
||||
import ru.ulstu.is.sbapp.repair.controller.OrderDTO;
|
||||
import ru.ulstu.is.sbapp.repair.exception.OrderNotFoundException;
|
||||
import ru.ulstu.is.sbapp.repair.model.Favor;
|
||||
import ru.ulstu.is.sbapp.repair.model.Order;
|
||||
import ru.ulstu.is.sbapp.repair.repository.FavorRepository;
|
||||
import ru.ulstu.is.sbapp.repair.repository.OrderRepository;
|
||||
import ru.ulstu.is.sbapp.repair.util.validation.ValidatorUtil;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import javax.persistence.EntityNotFoundException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
|
@ -6,9 +6,9 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.MethodArgumentNotValidException;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import ru.ulstu.is.sbapp.repair.service.ComponentNotFoundException;
|
||||
import ru.ulstu.is.sbapp.repair.service.FavorNotFoundException;
|
||||
import ru.ulstu.is.sbapp.repair.service.OrderNotFoundException;
|
||||
import ru.ulstu.is.sbapp.repair.exception.ComponentNotFoundException;
|
||||
import ru.ulstu.is.sbapp.repair.exception.FavorNotFoundException;
|
||||
import ru.ulstu.is.sbapp.repair.exception.OrderNotFoundException;
|
||||
import ru.ulstu.is.sbapp.repair.util.validation.ValidationException;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
Loading…
Reference in New Issue
Block a user