Example #1
0
 // 最後save則dto 回傳 已轉正 資料取回 補件
 public TransferFormalDTO getTransferFormalData(String employeeId) {
   TransferFormalDTO transferFormalDTO = new TransferFormalDTO();
   transferFormalDTO.setRegistrationInformation(registrationInformationDAO.findById(employeeId));
   transferFormalDTO.setRegistrationInformationUploadFileDTO(
       new RegistrationInformationUploadFileDTO());
   transferFormalDTO.setInsurance(insuranceDAO.findById(employeeId));
   transferFormalDTO.setLaborInsurance(laborInsuranceDAO.findByEmployeeId(employeeId));
   transferFormalDTO.setDependentsAdditionalInsurances(
       dependentsAdditionalInsuranceDAO.findByEmployeeId(employeeId));
   transferFormalDTO.setIdentityRelatedDocuments(identityRelatedDocumentsDAO.findById(employeeId));
   transferFormalDTO.setIdentityRelatedDocumentsUploadFileDTO(
       new IdentityRelatedDocumentsUploadFileDTO());
   return transferFormalDTO;
 }
Example #2
0
  // 要存db
  public void updateEmployeeInformation(TransferFormalDTO transferFormalDTO) {
    RegistrationInformation registrationInformation =
        transferFormalDTO.getRegistrationInformation();
    RegistrationInformationUploadFileDTO registrationInformationUploadFileDTO =
        transferFormalDTO.getRegistrationInformationUploadFileDTO();
    updateRegistrationInformation(registrationInformation, registrationInformationUploadFileDTO);

    int laborInsuranceId = transferFormalDTO.getLaborInsurance().getId();
    Insurance insurance = transferFormalDTO.getInsurance();
    List<DependentsAdditionalInsurance> dependentsAdditionalInsurances =
        transferFormalDTO.getDependentsAdditionalInsurances();
    updateInsurance(laborInsuranceId, insurance, dependentsAdditionalInsurances);

    IdentityRelatedDocuments identityRelatedDocuments =
        transferFormalDTO.getIdentityRelatedDocuments();
    IdentityRelatedDocumentsUploadFileDTO identityRelatedDocumentsUploadFileDTO =
        transferFormalDTO.getIdentityRelatedDocumentsUploadFileDTO();
    updateIdentityRelatedDocuments(identityRelatedDocuments, identityRelatedDocumentsUploadFileDTO);
  }