Updated application contract flow
This commit is contained in:
@@ -9,9 +9,9 @@ import java.util.List;
|
||||
|
||||
public interface ApplicationContractService {
|
||||
|
||||
public ApplicationContractResponse createApplicationContract(HttpServletRequest httpServletRequest, Long applicationId, List<MultipartFile> contractDocuments, ApplicationContractRequest applicationContractRequest);
|
||||
public ApplicationContractResponse createApplicationContract(HttpServletRequest httpServletRequest, Long applicationId, List<MultipartFile> beneficiaryContractDocuments);
|
||||
|
||||
public ApplicationContractResponse updateApplicationContract(HttpServletRequest httpServletRequest, Long applicationContractId,List<MultipartFile> beneficiaryContractDocuments);
|
||||
// public ApplicationContractResponse updateApplicationContract(HttpServletRequest httpServletRequest, Long applicationContractId,List<MultipartFile> beneficiaryContractDocuments);
|
||||
|
||||
public ApplicationContractResponse getContractById(Long contractId);
|
||||
|
||||
|
||||
@@ -33,23 +33,23 @@ public class ApplicationContractServiceImpl implements ApplicationContractServic
|
||||
private UserDao userDao;
|
||||
|
||||
@Override
|
||||
public ApplicationContractResponse createApplicationContract(HttpServletRequest httpServletRequest, Long applicationId, List<MultipartFile> contractDocuments, ApplicationContractRequest applicationContractRequest) {
|
||||
UserEntity user= validator.validateUser(httpServletRequest);
|
||||
if(contractDocuments==null) {
|
||||
throw new CustomValidationException(Status.VALIDATION_ERROR, Translator.toLocale(GepafinConstant.FILES_REQUIRED_FOR_CONTRACT));
|
||||
}
|
||||
contractDocuments.forEach(Utils::validateFileType);
|
||||
return applicationContractDao.createApplicationContract(applicationId,contractDocuments,applicationContractRequest,user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApplicationContractResponse updateApplicationContract(HttpServletRequest httpServletRequest, Long applicationContractId, List<MultipartFile> beneficiaryContractDocuments) {
|
||||
public ApplicationContractResponse createApplicationContract(HttpServletRequest httpServletRequest, Long applicationId, List<MultipartFile> beneficiaryContractDocuments) {
|
||||
UserEntity user= validator.validateUser(httpServletRequest);
|
||||
if(beneficiaryContractDocuments==null) {
|
||||
throw new CustomValidationException(Status.VALIDATION_ERROR, Translator.toLocale(GepafinConstant.FILES_REQUIRED_FOR_CONTRACT));
|
||||
throw new CustomValidationException(Status.VALIDATION_ERROR, Translator.toLocale(GepafinConstant.FILES_REQUIRED_FOR_CONTRACT));
|
||||
}
|
||||
return applicationContractDao.updateApplicationContract(applicationContractId,beneficiaryContractDocuments,user);
|
||||
beneficiaryContractDocuments.forEach(Utils::validateFileType);
|
||||
return applicationContractDao.createApplicationContract(applicationId,beneficiaryContractDocuments,user);
|
||||
}
|
||||
//
|
||||
// @Override
|
||||
// public ApplicationContractResponse updateApplicationContract(HttpServletRequest httpServletRequest, Long applicationContractId, List<MultipartFile> beneficiaryContractDocuments) {
|
||||
// UserEntity user= validator.validateUser(httpServletRequest);
|
||||
// if(beneficiaryContractDocuments==null) {
|
||||
// throw new CustomValidationException(Status.VALIDATION_ERROR, Translator.toLocale(GepafinConstant.FILES_REQUIRED_FOR_CONTRACT));
|
||||
// }
|
||||
// return applicationContractDao.updateApplicationContract(applicationContractId,beneficiaryContractDocuments,user);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public ApplicationContractResponse getContractById(Long contractId) {
|
||||
|
||||
Reference in New Issue
Block a user