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

fix: warnings

parent e9aa9f79
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.model.AdmissionFormData;
import com.example.LaMartin.common.model.GeneralResponse;
import com.example.LaMartin.common.service.PdfService;
import com.example.LaMartin.common.service.TemplateService;
import com.example.LaMartin.constants.AppConstants;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
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
@AllArgsConstructor(onConstructor = @__(@Autowired))
......
package com.example.LaMartin.admission.mapper;
import com.example.LaMartin.admission.model.AdmissionFormData;
import com.example.LaMartin.admission.pojo.AdmissionFormDataPreview;
import com.example.LaMartin.common.utils.RowMapperUtil;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.jetbrains.annotations.NotNull;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Component;
import java.sql.ResultSet;
import java.sql.SQLException;
import com.example.LaMartin.admission.pojo.AdmissionFormDataPreview;
import com.example.LaMartin.common.utils.RowMapperUtil;
@Component
public class AdmissionFormPreviewMapper implements RowMapper<AdmissionFormDataPreview> {
......
package com.example.LaMartin.admission.model;
import lombok.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotEmpty;
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
@NoArgsConstructor
@Builder
......@@ -17,61 +23,107 @@ public class AdmissionFormData {
private Long id;
@NotEmpty(message = "School cannot be empty")
@Builder.Default
private String school = "";
@NotEmpty(message = "Category cannot be empty")
@Builder.Default
private String category = "";
private String staffDepartment;
private String staffCategory;
private String exStudentInfo;
@NotEmpty(message = "Name cannot be empty")
@Builder.Default
private String fullName = "";
@NotEmpty(message = "Admission Class cannot be empty")
@Builder.Default
private String admissionClass = "";
@NotEmpty(message = "Date of Birth cannot be empty")
@Builder.Default
private String dateOfBirth = "";
@NotEmpty(message = "Nationality cannot be empty")
@Builder.Default
private String nationality = "";
@NotEmpty(message = "Religion cannot be empty")
@Builder.Default
private String religion = "";
private String denomination;
private String church;
@NotEmpty(message = "Mother Tongue cannot be empty")
@Builder.Default
private String motherTongue = "";
@NotEmpty(message = "Community cannot be empty")
@Builder.Default
private String community = "";
@NotEmpty(message= "Home address cannot be empty")
@Builder.Default
private String homeAddress = "";
@NotEmpty(message= "Correspondence address cannot be empty")
@Builder.Default
private String correspondenceAddress = "";
private String otherChildren;
@NotEmpty(message = "Marital Status cannot be empty")
@Builder.Default
private String maritalStatus = "";
@NotEmpty(message = "Father Name cannot be empty")
@Builder.Default
private String fatherName = "";
@NotEmpty(message = "Father Mobile cannot be empty")
@Builder.Default
private String fatherMobile = "";
@NotEmpty(message = "Father Email cannot be empty")
@Builder.Default
private String fatherEmail = "";
@NotEmpty(message = "Father Nationality cannot be empty")
@Builder.Default
private String fatherNationality = "";
@NotEmpty(message = "Father Religion cannot be empty")
@Builder.Default
private String fatherReligion = "";
@Builder.Default
private String fatherDenomination = "";
@Builder.Default
private String fatherChurch = "";
@NotEmpty(message = "Father Mother Tongue cannot be empty")
@Builder.Default
private String fatherMotherTongue = "";
@NotEmpty(message = "Father Community cannot be empty")
@Builder.Default
private String fatherCommunity = "";
@NotEmpty(message = "Father School Info cannot be empty")
@Builder.Default
private String fatherSchoolInfo = "";
private String fatherCollegeInfo;
private String fatherUniversityInfo;
private String fatherProfessionalQualification;
@NotEmpty(message = "Father Occupation cannot be empty")
@Builder.Default
private String fatherOccupation = "";
@NotEmpty(message = "Father Monthly Income cannot be empty")
@Builder.Default
private String fatherMonthlyIncome = "";
private String fatherWorkplaceInfo;
......@@ -95,6 +147,7 @@ public class AdmissionFormData {
@NotNull(message = "Candidate Image cannot be empty")
private MultipartFile candidateImage;
private String candidateImageName;
@NotNull(message = "Father Image cannot be empty")
private MultipartFile fatherImage;
private String fatherImageName;
......
package com.example.LaMartin.admission.pojo;
import lombok.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@AllArgsConstructor
@NoArgsConstructor
......
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.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
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
// @AllArgsConstructor(onConstructor_ = @__({@Autowired}))
......
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.config.Settings;
import com.example.LaMartin.constants.AppConstants;
import com.example.LaMartin.user.pojo.LoginPayload;
import com.example.LaMartin.user.utills.GenerateKey;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
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
@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