Commit 952f21f5 authored by Deep Dey's avatar Deep Dey

fix: warnings

parent e9aa9f79
package com.example.LaMartin.admission.controller; package com.example.LaMartin.admission.controller;
import java.io.ByteArrayInputStream;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.example.LaMartin.admission.dao.controller.AdmissionFormDAOController; import com.example.LaMartin.admission.dao.controller.AdmissionFormDAOController;
import com.example.LaMartin.admission.model.AdmissionFormData; import com.example.LaMartin.admission.model.AdmissionFormData;
import com.example.LaMartin.common.model.GeneralResponse; import com.example.LaMartin.common.model.GeneralResponse;
import com.example.LaMartin.common.service.PdfService; import com.example.LaMartin.common.service.PdfService;
import com.example.LaMartin.common.service.TemplateService; import com.example.LaMartin.common.service.TemplateService;
import com.example.LaMartin.constants.AppConstants; import com.example.LaMartin.constants.AppConstants;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses; import io.swagger.annotations.ApiResponses;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.apache.commons.io.IOUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@RestController @RestController
@AllArgsConstructor(onConstructor = @__(@Autowired)) @AllArgsConstructor(onConstructor = @__(@Autowired))
......
package com.example.LaMartin.admission.mapper; package com.example.LaMartin.admission.mapper;
import com.example.LaMartin.admission.model.AdmissionFormData; import java.sql.ResultSet;
import com.example.LaMartin.admission.pojo.AdmissionFormDataPreview; import java.sql.SQLException;
import com.example.LaMartin.common.utils.RowMapperUtil;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.springframework.jdbc.core.RowMapper; import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.sql.ResultSet; import com.example.LaMartin.admission.pojo.AdmissionFormDataPreview;
import java.sql.SQLException; import com.example.LaMartin.common.utils.RowMapperUtil;
@Component @Component
public class AdmissionFormPreviewMapper implements RowMapper<AdmissionFormDataPreview> { public class AdmissionFormPreviewMapper implements RowMapper<AdmissionFormDataPreview> {
......
package com.example.LaMartin.admission.model; package com.example.LaMartin.admission.model;
import lombok.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import org.springframework.web.multipart.MultipartFile;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@Builder @Builder
...@@ -17,61 +23,107 @@ public class AdmissionFormData { ...@@ -17,61 +23,107 @@ public class AdmissionFormData {
private Long id; private Long id;
@NotEmpty(message = "School cannot be empty") @NotEmpty(message = "School cannot be empty")
@Builder.Default
private String school = ""; private String school = "";
@NotEmpty(message = "Category cannot be empty") @NotEmpty(message = "Category cannot be empty")
@Builder.Default
private String category = ""; private String category = "";
private String staffDepartment; private String staffDepartment;
private String staffCategory; private String staffCategory;
private String exStudentInfo; private String exStudentInfo;
@NotEmpty(message = "Name cannot be empty") @NotEmpty(message = "Name cannot be empty")
@Builder.Default
private String fullName = ""; private String fullName = "";
@NotEmpty(message = "Admission Class cannot be empty") @NotEmpty(message = "Admission Class cannot be empty")
@Builder.Default
private String admissionClass = ""; private String admissionClass = "";
@NotEmpty(message = "Date of Birth cannot be empty") @NotEmpty(message = "Date of Birth cannot be empty")
@Builder.Default
private String dateOfBirth = ""; private String dateOfBirth = "";
@NotEmpty(message = "Nationality cannot be empty") @NotEmpty(message = "Nationality cannot be empty")
@Builder.Default
private String nationality = ""; private String nationality = "";
@NotEmpty(message = "Religion cannot be empty") @NotEmpty(message = "Religion cannot be empty")
@Builder.Default
private String religion = ""; private String religion = "";
private String denomination; private String denomination;
private String church; private String church;
@NotEmpty(message = "Mother Tongue cannot be empty") @NotEmpty(message = "Mother Tongue cannot be empty")
@Builder.Default
private String motherTongue = ""; private String motherTongue = "";
@NotEmpty(message = "Community cannot be empty") @NotEmpty(message = "Community cannot be empty")
@Builder.Default
private String community = ""; private String community = "";
@NotEmpty(message= "Home address cannot be empty") @NotEmpty(message= "Home address cannot be empty")
@Builder.Default
private String homeAddress = ""; private String homeAddress = "";
@NotEmpty(message= "Correspondence address cannot be empty") @NotEmpty(message= "Correspondence address cannot be empty")
@Builder.Default
private String correspondenceAddress = ""; private String correspondenceAddress = "";
private String otherChildren; private String otherChildren;
@NotEmpty(message = "Marital Status cannot be empty") @NotEmpty(message = "Marital Status cannot be empty")
@Builder.Default
private String maritalStatus = ""; private String maritalStatus = "";
@NotEmpty(message = "Father Name cannot be empty") @NotEmpty(message = "Father Name cannot be empty")
@Builder.Default
private String fatherName = ""; private String fatherName = "";
@NotEmpty(message = "Father Mobile cannot be empty") @NotEmpty(message = "Father Mobile cannot be empty")
@Builder.Default
private String fatherMobile = ""; private String fatherMobile = "";
@NotEmpty(message = "Father Email cannot be empty") @NotEmpty(message = "Father Email cannot be empty")
@Builder.Default
private String fatherEmail = ""; private String fatherEmail = "";
@NotEmpty(message = "Father Nationality cannot be empty") @NotEmpty(message = "Father Nationality cannot be empty")
@Builder.Default
private String fatherNationality = ""; private String fatherNationality = "";
@NotEmpty(message = "Father Religion cannot be empty") @NotEmpty(message = "Father Religion cannot be empty")
@Builder.Default
private String fatherReligion = ""; private String fatherReligion = "";
@Builder.Default
private String fatherDenomination = ""; private String fatherDenomination = "";
@Builder.Default
private String fatherChurch = ""; private String fatherChurch = "";
@NotEmpty(message = "Father Mother Tongue cannot be empty") @NotEmpty(message = "Father Mother Tongue cannot be empty")
@Builder.Default
private String fatherMotherTongue = ""; private String fatherMotherTongue = "";
@NotEmpty(message = "Father Community cannot be empty") @NotEmpty(message = "Father Community cannot be empty")
@Builder.Default
private String fatherCommunity = ""; private String fatherCommunity = "";
@NotEmpty(message = "Father School Info cannot be empty") @NotEmpty(message = "Father School Info cannot be empty")
@Builder.Default
private String fatherSchoolInfo = ""; private String fatherSchoolInfo = "";
private String fatherCollegeInfo; private String fatherCollegeInfo;
private String fatherUniversityInfo; private String fatherUniversityInfo;
private String fatherProfessionalQualification; private String fatherProfessionalQualification;
@NotEmpty(message = "Father Occupation cannot be empty") @NotEmpty(message = "Father Occupation cannot be empty")
@Builder.Default
private String fatherOccupation = ""; private String fatherOccupation = "";
@NotEmpty(message = "Father Monthly Income cannot be empty") @NotEmpty(message = "Father Monthly Income cannot be empty")
@Builder.Default
private String fatherMonthlyIncome = ""; private String fatherMonthlyIncome = "";
private String fatherWorkplaceInfo; private String fatherWorkplaceInfo;
...@@ -95,6 +147,7 @@ public class AdmissionFormData { ...@@ -95,6 +147,7 @@ public class AdmissionFormData {
@NotNull(message = "Candidate Image cannot be empty") @NotNull(message = "Candidate Image cannot be empty")
private MultipartFile candidateImage; private MultipartFile candidateImage;
private String candidateImageName; private String candidateImageName;
@NotNull(message = "Father Image cannot be empty") @NotNull(message = "Father Image cannot be empty")
private MultipartFile fatherImage; private MultipartFile fatherImage;
private String fatherImageName; private String fatherImageName;
......
package com.example.LaMartin.admission.pojo; package com.example.LaMartin.admission.pojo;
import lombok.*; import lombok.AllArgsConstructor;
import org.springframework.web.multipart.MultipartFile; import lombok.Builder;
import lombok.Getter;
import javax.validation.constraints.NotEmpty; import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull; import lombok.Setter;
import lombok.ToString;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
......
package com.example.LaMartin.common.service; package com.example.LaMartin.common.service;
import com.example.LaMartin.admission.enums.FEES_STRUCTURE;
import com.example.LaMartin.admission.model.AdmissionFormData;
import com.example.LaMartin.config.Settings;
import lombok.AllArgsConstructor;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.Context;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Service;
import org.thymeleaf.TemplateEngine;
import org.thymeleaf.context.Context;
import com.example.LaMartin.admission.enums.FEES_STRUCTURE;
import com.example.LaMartin.admission.model.AdmissionFormData;
import com.example.LaMartin.config.Settings;
@Service @Service
// @AllArgsConstructor(onConstructor_ = @__({@Autowired})) // @AllArgsConstructor(onConstructor_ = @__({@Autowired}))
......
package com.example.LaMartin.user.controller; package com.example.LaMartin.user.controller;
import com.example.LaMartin.admission.model.AdmissionFormData; import java.util.Objects;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.example.LaMartin.common.model.GeneralResponse; import com.example.LaMartin.common.model.GeneralResponse;
import com.example.LaMartin.config.Settings; import com.example.LaMartin.config.Settings;
import com.example.LaMartin.constants.AppConstants; import com.example.LaMartin.constants.AppConstants;
import com.example.LaMartin.user.pojo.LoginPayload; import com.example.LaMartin.user.pojo.LoginPayload;
import com.example.LaMartin.user.utills.GenerateKey; import com.example.LaMartin.user.utills.GenerateKey;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses; import io.swagger.annotations.ApiResponses;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.util.Objects;
@RestController @RestController
@AllArgsConstructor(onConstructor = @__(@Autowired)) @AllArgsConstructor(onConstructor = @__(@Autowired))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment