From d614edf9331a753e0927738d23dbf6afb269efd8 Mon Sep 17 00:00:00 2001 From: "Brayan.Gonzalez" Date: Tue, 28 Jan 2025 13:00:42 -0700 Subject: [PATCH] archivos --- .gitignore | 7 + ace-controller-mobile/nb-configuration.xml | 18 + ace-controller-mobile/pom.xml | 81 + .../admin/ClosingDayController.java | 91 + .../admin/StableGeneralBoxController.java | 46 + .../admin/StableSmallBoxController.java | 95 + .../bitacora/BitacoraController.java | 59 + .../CashRegisterCurdateByUserController.java | 107 + .../customer/CustomerController.java | 63 + .../ExchangeEnebledUsersController.java | 165 + .../gasoline/GasolineController.java | 41 + .../controller/loan/LoanController.java | 1398 +++ .../controller/login/LoginWSController.java | 80 + .../otherexpense/OtherExpenseController.java | 58 + .../controller/person/PersonController.java | 54 + .../SystemPreferenceController.java | 243 + .../controller/reports/ReportsController.java | 54 + .../controller/route/RouteController.java | 44 + .../search/PersonSearchController.java | 175 + .../tracking/PaymentTrackingController.java | 69 + .../controller/user/UserController.java | 95 + .../json/loan/AuthorizeTransferList.java | 96 + .../loan/AuthorizeTransferPaymentsDto.java | 117 + .../json/loan/DeleteLoanDetailsJaxb.java | 117 + .../json/loan/GenericAPCResponserJaxb.java | 97 + .../mobile/json/loan/LoanTypeJaxb.java | 73 + .../mobile/json/loan/LoanTypeListJaxb.java | 48 + .../json/loan/TransferListToUpdateStatus.java | 71 + .../loan/UpdateLoanToDeliveryStatusDTO.java | 102 + .../loan/UpdateLoanToDeliveryStatusList.java | 67 + .../apc/controller/mobile/moxy/PersonMxy.java | 122 + .../controller/mobile/moxy/login/UserMxy.java | 121 + .../mobile/moxy/login/UserPreferenceMxy.java | 53 + .../mobile/moxy/views/ContainerRoutes.java | 43 + .../LoanByUserOrderPreferenceViewJaxb.java | 116 + ...LoanByUserOrderPreferenceViewListJaxb.java | 39 + .../moxy/views/PaymentTrackingViewJaxb.java | 60 + .../mobile/moxy/views/RouteJaxb.java | 49 + .../repository/ArrebolTestRepository.java | 39 + .../mobile/repository/GenericRepository.java | 671 ++ .../admin/ClosingDayRepository.java | 78 + .../admin/OtherExpenseRepository.java | 41 + .../admin/StableGeneralBoxRepository.java | 40 + .../admin/StableSmallBoxRepository.java | 78 + .../repository/admin/TransferRepository.java | 94 + .../bitacora/BitacoraRepository.java | 40 + .../gasoline/GasolineRepository.java | 48 + .../jaas/AuthenticationRepository.java | 89 + .../repository/loan/AddAmountRepository.java | 93 + .../loan/LoanByRenovationRepository.java | 219 + .../repository/loan/LoanByUserRepository.java | 40 + .../loan/LoanDetailsRepository.java | 199 + .../loan/LoanFeeNotificationRepository.java | 62 + .../repository/loan/LoanRepository.java | 630 ++ .../LoanToDeliveryByCertifierRepository.java | 45 + .../repository/loan/LoanTypeRepository.java | 114 + .../repository/people/PeopleRepository.java | 99 + .../UserMobilePreferenceRepository.java | 98 + .../repository/reports/ReportsRepository.java | 47 + .../repository/route/RouteRepository.java | 55 + .../tracking/PaymentTrackingRepository.java | 49 + .../repository/user/UserRepository.java | 114 + ...shRegisterCurdateByUserViewRepository.java | 44 + .../ExchangeEnebledUsersViewRepository.java | 43 + .../LoanApprovedDetailViewRepository.java | 124 + ...anByUserOrderPreferenceViewRepository.java | 62 + .../views/LoanByUserViewRepository.java | 54 + ...PendingStatusToDeliveryViewRepository.java | 42 + ...SearchHistoricalDetailsViewRepository.java | 48 + .../views/PersonSearchViewRepository.java | 121 + .../SearchPersonAvailableRepository.java | 63 + .../TotalCashByCurdateViewRepository.java | 40 + ...TransferInPendingStatusViewRepository.java | 42 + .../controller/mobile/util/HibernateUtil.java | 69 + ...shRegisterCurdateByUserControllerTest.java | 46 + .../customer/CustomerControllerTest.java | 49 + .../ExchangeEnebledUsersControllerTest.java | 62 + .../controller/loan/LoanControllerTest.java | 205 + .../login/LoginWSControllerTest.java | 46 + .../SystemPreferenceControllerTest.java | 58 + .../search/PersonSearchControllerTest.java | 74 + .../controller/user/UserControllerTest.java | 66 + .../repository/ArrebolTestRepositoryTest.java | 39 + .../loan/LoanTypeRepositoryTest.java | 75 + .../people/PeopleRepositoryTest.java | 68 + .../src/test/resources/apc.cfg.xml | 228 + .../src/test/resources/log4j2.xml | 20 + ace-controller/nb-configuration.xml | 18 + ace-controller/pom.xml | 92 + ace-controller/pom.xml.bak | 92 + .../apc/controller/BitacoraController.java | 75 + .../apc/controller/GenericController.java | 236 + .../GenericValidationController.java | 202 + ...inistrationPersonSearchViewController.java | 148 + .../controller/admin/AdvanceController.java | 91 + .../apc/controller/admin/BonusController.java | 102 + .../admin/ChangeOwnerController.java | 140 + .../admin/ClosingDayController.java | 439 + .../controller/admin/CustomerController.java | 141 + .../admin/EndorsementController.java | 67 + .../admin/ExpenseCompanyController.java | 147 + .../apc/controller/admin/FeesController.java | 113 + .../apc/controller/admin/GoalController.java | 100 + .../apc/controller/admin/LoanController.java | 563 ++ .../admin/LoanEmployeeController.java | 180 + ...oanRenovationDeliveryWeeklyController.java | 61 + .../admin/MoneyDailyController.java | 124 + .../admin/OtherExpenseController.java | 99 + .../controller/admin/PayRollController.java | 343 + .../controller/admin/PeopleController.java | 133 + .../admin/StableGeneralBoxController.java | 669 ++ .../admin/StableSmallBoxController.java | 282 + .../admin/StatsAdvancesController.java | 100 + .../admin/StatsClosingDayController.java | 102 + .../admin/StatsDepositsController.java | 105 + .../admin/StatsEmployeeSavingController.java | 155 + .../admin/StatsGasolineController.java | 81 + .../admin/StatsOpeningFeesController.java | 107 + .../admin/StatsPaymentController.java | 117 + .../StatsPaymentRenovationController.java | 86 + .../admin/StatsPaymentRouteController.java | 120 + .../admin/StatsPayrollController.java | 99 + .../admin/StatsSummaryController.java | 233 + .../admin/StatsVehicleController.java | 53 + .../admin/StatsZeroPaymentsController.java | 113 + .../controller/admin/TransferController.java | 110 + .../controller/admin/VehicleController.java | 170 + .../catalog/LoanTypeController.java | 85 + .../controller/catalog/RoleController.java | 93 + .../controller/catalog/RouteController.java | 96 + .../CustomerWithoutRenovationViewService.java | 41 + ...tomerWithoutRenovationViewServiceImpl.java | 154 + .../dashboard/DashboardController.java | 150 + .../controller/drive/DriverController.java | 1434 +++ .../drive/FaltanteInDatesController.java | 222 + .../apc/controller/login/LoginController.java | 56 + .../apc/controller/login/LoginService.java | 32 + .../controller/login/LoginServiceImpl.java | 47 + .../system/employee/EmployeeController.java | 177 + .../system/office/OfficeController.java | 91 + .../system/user/UserAccessController.java | 185 + .../system/user/UserAdminController.java | 111 + .../system/user/UserCreateController.java | 419 + .../system/user/UserUpdateController.java | 294 + .../controller/topbar/PrivacyController.java | 56 + .../controller/topbar/TopBarController.java | 51 + .../controller/util/ConnectionManager.java | 40 + .../apc/controller/util/DateWrapper.java | 199 + .../apc/controller/util/FilterMap.java | 79 + .../apc/controller/util/HibernateUtil.java | 69 + .../util/logger/LogConnectionFactory.java | 34 + .../apc/repository/AbstractRepository.java | 763 ++ .../repository/AutoCompleteDAORepository.java | 56 + .../repository/GenericEntityRepository.java | 111 + .../LazyDataModelDAORepository.java | 94 + .../core/HumanResourceRepository.java | 97 + .../apc/repository/core/OfficeRepository.java | 110 + .../repository/core/PermissionRepository.java | 93 + .../core/UserByOfficeRepository.java | 373 + .../apc/repository/core/UserRepository.java | 186 + .../apc/service/AutoCompleteService.java | 25 + .../arrebol/apc/service/BitacoraService.java | 24 + .../apc/service/BitacoraServiceImpl.java | 30 + .../apc/service/GenericValidationService.java | 32 + .../service/GenericValidationServiceImpl.java | 93 + .../LazyDataModelBetweenDatesService.java | 46 + .../apc/service/LazyDataModelService.java | 38 + .../apc/service/admin/CustomerService.java | 58 + .../service/admin/CustomerServiceImpl.java | 137 + .../apc/service/admin/PeopleService.java | 31 + .../apc/service/admin/PeopleServiceImpl.java | 36 + .../apc/service/admin/TransferService.java | 36 + .../service/admin/TransferServiceImpl.java | 131 + .../apc/service/catalog/LoanService.java | 47 + .../apc/service/catalog/LoanServiceImpl.java | 51 + .../apc/service/catalog/LoanTypeService.java | 32 + .../service/catalog/LoanTypeServiceImpl.java | 47 + .../catalog/PeopleAutoCompleteService.java | 23 + .../PeopleAutoCompleteServiceImpl.java | 83 + .../apc/service/catalog/RouteService.java | 25 + .../apc/service/catalog/RouteServiceImpl.java | 42 + .../arrebol/apc/service/core/UserService.java | 25 + .../apc/service/core/UserServiceImpl.java | 39 + .../views/EnabledUserDetailsViewService.java | 25 + .../EnabledUserDetailsViewServiceImpl.java | 43 + ...trationPersonSearchViewControllerTest.java | 47 + .../admin/ClosingDayControllerTest.java | 46 + .../admin/StableGeneralBoxControllerTest.java | 40 + .../admin/StableSmallBoxControllerTest.java | 45 + .../controller/login/LoginControllerTest.java | 62 + .../employee/EmployeeControllerTest.java | 122 + .../system/user/UserAccessControllerTest.java | 66 + .../system/user/UserCreateControllerTest.java | 99 + .../system/user/UserUpdateControllerTest.java | 64 + .../topbar/TopBarControllerTest.java | 46 + ace-controller/src/test/resources/apc.cfg.xml | 224 + ace-controller/src/test/resources/log4j2.xml | 51 + ace-db/build.xml | 73 + ace-db/manifest.mf | 3 + ace-db/nbproject/build-impl.xml | 1771 ++++ ace-db/nbproject/genfiles.properties | 8 + ace-db/nbproject/private/private.properties | 1 + ace-db/nbproject/project.properties | 86 + ace-db/nbproject/project.xml | 15 + ace-db/src/XXXXXXXX.sql | 303 + ace-db/src/apc-config-db-aws.sql | 133 + ace-db/src/apc-config-db-localhost.sql | 133 + ace-db/src/apc-db-populate-empty.sql | 27 + ace-db/src/apc-db-populate.sql | 515 ++ ace-db/src/apc-db.sql | 3430 ++++++++ ace-db/src/apc-drop-tables-prod.sql | 46 + ace-db/src/cambio_de_anio.sql | 794 ++ ace-db/src/cocina-lore-db.sql | 412 + .../create/from/scratch/apc-config-db-aws.sql | 134 + .../from/scratch/apc-config-db-localhost.sql | 136 + .../from/scratch/apc-db-init-populate.sql | 293 + .../src/create/from/scratch/apc-db-tables.sql | 1016 +++ .../src/create/from/scratch/apc-db-views.sql | 3847 +++++++++ .../scratch/mora/f1_isMobileEnabledUser.sql | 45 + ace-db/src/janitzio.sql | 2 + ace-db/src/notes.txt | 175 + ace-db/src/oscar.sql | 493 ++ ace-db/src/respaldo_xxxxxxxx.sql | 3 + ace-db/src/to_execute.sql | 11 + ace-db/src/to_update.sql | 44 + ace-layout/nb-configuration.xml | 18 + ace-layout/pom.xml | 125 + .../serenity/component/SerenityMenu.java | 130 + .../component/SerenityMenuRenderer.java | 295 + .../filter/CharacterEncodingFilter.java | 44 + .../serenity/view/GuestPreferences.java | 77 + ace-model/nb-configuration.xml | 18 + ace-model/pom.xml | 183 + .../arrebol/apc/model/DateFormatModel.java | 24 + .../com/arrebol/apc/model/ModelParameter.java | 43 + .../com/arrebol/apc/model/admin/Advance.java | 222 + .../com/arrebol/apc/model/admin/Bonus.java | 209 + .../arrebol/apc/model/admin/ClosingDay.java | 256 + .../apc/model/admin/ClosingDayDetail.java | 154 + .../apc/model/admin/EmployeeSaving.java | 102 + .../apc/model/admin/ExpenseCompany.java | 242 + .../com/arrebol/apc/model/admin/Goal.java | 170 + .../arrebol/apc/model/admin/LoanEmployee.java | 159 + .../apc/model/admin/LoanEmployeeDetails.java | 137 + .../arrebol/apc/model/admin/MoneyDaily.java | 164 + .../arrebol/apc/model/admin/OtherExpense.java | 256 + .../apc/model/admin/StableGeneralBox.java | 241 + .../apc/model/admin/StableSmallBox.java | 262 + .../com/arrebol/apc/model/admin/Transfer.java | 297 + .../apc/model/admin/constance/AdvanceCfg.java | 24 + .../model/admin/constance/BitacoraCfg.java | 22 + .../apc/model/admin/constance/BonusCfg.java | 25 + .../model/admin/constance/ClosingDayCfg.java | 35 + .../admin/constance/ClosingDayDetailCfg.java | 22 + .../admin/constance/ExpenseCompanyCfg.java | 26 + .../apc/model/admin/constance/GoalCfg.java | 24 + .../model/admin/constance/MoneyDailyCfg.java | 25 + .../admin/constance/OtherExpenseCfg.java | 25 + .../admin/constance/StableGeneralBoxCfg.java | 34 + .../admin/constance/StableSmallBoxCfg.java | 32 + .../model/admin/constance/TransferCfg.java | 31 + .../model/catalog/HumanResourceHasRoute.java | 172 + .../catalog/HumanResourceHasRouteId.java | 88 + .../com/arrebol/apc/model/catalog/People.java | 437 + .../arrebol/apc/model/catalog/RoleCtlg.java | 180 + .../arrebol/apc/model/catalog/RouteCtlg.java | 262 + .../arrebol/apc/model/catalog/Vehicle.java | 323 + .../model/catalog/constance/PeopleCfg.java | 33 + .../apc/model/catalog/constance/RoleCfg.java | 24 + .../apc/model/catalog/constance/RouteCfg.java | 29 + .../arrebol/apc/model/core/HumanResource.java | 428 + .../apc/model/core/HumanResourceByOffice.java | 179 + .../com/arrebol/apc/model/core/Office.java | 421 + .../arrebol/apc/model/core/Permission.java | 257 + .../java/com/arrebol/apc/model/core/User.java | 435 + .../arrebol/apc/model/core/UserByOffice.java | 268 + .../model/core/UserByOfficeHasPermission.java | 177 + .../core/UserByOfficeHasPermissionId.java | 82 + .../constance/AvailableCustomersViewCfg.java | 18 + .../AvailableEndorsementsViewCfg.java | 18 + .../CashRegisterCurdateByUserViewCfg.java | 18 + .../ExchangeEnebledUsersViewCfg.java | 19 + .../apc/model/core/constance/GenericCfg.java | 26 + .../constance/HumanResourceByOfficeCfg.java | 17 + .../core/constance/HumanResourceCfg.java | 37 + .../constance/HumanResourceHasRouteCfg.java | 19 + .../constance/LoanApprovedDetailViewCfg.java | 16 + .../core/constance/LoanByRenovationCfg.java | 23 + .../model/core/constance/LoanByUserCfg.java | 29 + .../LoanByUserOrderPreferenceViewCfg.java | 25 + .../core/constance/LoanByUserViewCfg.java | 45 + .../apc/model/core/constance/LoanCfg.java | 63 + .../model/core/constance/LoanDetailsCfg.java | 34 + .../constance/LoanFeeNotificationCfg.java | 19 + .../LoanToDeliveryByCertifierViewCfg.java | 17 + .../apc/model/core/constance/LoanTypeCfg.java | 26 + .../model/core/constance/MobileUserCfg.java | 20 + .../apc/model/core/constance/OfficeCfg.java | 41 + .../model/core/constance/PermissionCfg.java | 32 + .../constance/PersonSearchDetailViewCfg.java | 17 + .../PersonSearchHistoricalDetailsViewCfg.java | 18 + .../core/constance/PersonSearchViewCfg.java | 20 + .../model/core/constance/UserByOfficeCfg.java | 25 + .../UserByOfficeHasPermissionCfg.java | 20 + .../apc/model/core/constance/UserCfg.java | 40 + .../constance/UserMobilePreferenceCfg.java | 23 + .../arrebol/apc/model/enums/ActionStatus.java | 26 + .../arrebol/apc/model/enums/ActiveStatus.java | 26 + .../apc/model/enums/ApplicationOwner.java | 19 + .../apc/model/enums/ComissionType.java | 37 + .../model/enums/CustomerClassification.java | 26 + .../apc/model/enums/DaysInWeekend.java | 16 + .../apc/model/enums/EmployeeSavingType.java | 16 + .../apc/model/enums/ExpenseCompanyType.java | 37 + .../arrebol/apc/model/enums/FeeStatus.java | 16 + .../apc/model/enums/GenericStatus.java | 16 + .../apc/model/enums/HumanResourceStatus.java | 41 + .../apc/model/enums/LoanDetailsType.java | 31 + .../apc/model/enums/LoanRenovationStatus.java | 16 + .../arrebol/apc/model/enums/LoanStatus.java | 26 + .../arrebol/apc/model/enums/OfficeStatus.java | 42 + .../arrebol/apc/model/enums/OwnerLoan.java | 16 + .../arrebol/apc/model/enums/PeopleType.java | 26 + .../apc/model/enums/PermissionStatus.java | 36 + .../apc/model/enums/PermissionType.java | 41 + .../apc/model/enums/PreferenceName.java | 16 + .../apc/model/enums/PreferenceValue.java | 16 + .../apc/model/enums/TransferStatus.java | 27 + .../apc/model/enums/UserByOfficeStatus.java | 42 + .../arrebol/apc/model/enums/UserStatus.java | 41 + .../com/arrebol/apc/model/enums/UserType.java | 46 + .../arrebol/apc/model/gasoline/Gasoline.java | 264 + .../model/gasoline/constance/GasolineCfg.java | 23 + .../com/arrebol/apc/model/loan/Delivery.java | 176 + .../java/com/arrebol/apc/model/loan/Loan.java | 524 ++ .../apc/model/loan/LoanByRenovation.java | 168 + .../apc/model/loan/LoanByRenovationId.java | 88 + .../arrebol/apc/model/loan/LoanByUser.java | 179 + .../arrebol/apc/model/loan/LoanByUserId.java | 88 + .../arrebol/apc/model/loan/LoanDetails.java | 345 + .../apc/model/loan/LoanFeeNotification.java | 139 + .../com/arrebol/apc/model/loan/LoanType.java | 391 + .../apc/model/mobile/access/MobileUser.java | 134 + .../preference/UserMobilePreference.java | 186 + .../arrebol/apc/model/payroll/Payroll.java | 392 + .../TotalExpectedPaymentDailyByUser.java | 169 + .../model/payroll/constance/PayRollCfg.java | 40 + .../TotalExpectedPaymentDailyByUserCfg.java | 25 + .../apc/model/reports/UserWeekReport.java | 129 + .../reports/constance/UserWeekReportCfg.java | 19 + .../apc/model/system/logs/Bitacora.java | 155 + .../apc/model/system/logs/ErrorAppLog.java | 122 + .../views/AdministrationPersonSerchView.java | 198 + .../model/views/AdvanceUserDailyDetail.java | 188 + .../apc/model/views/AdvanceUserDailyView.java | 229 + .../model/views/AvailableCustomersView.java | 70 + .../views/AvailableEndorsementsView.java | 70 + .../apc/model/views/AvailablesOwnersView.java | 96 + .../views/CashRegisterCurdateByUserView.java | 89 + ...osingDailyDetailFromUserByCurdateView.java | 134 + .../views/CobranzaLastWeekByUserView.java | 150 + .../model/views/CobranzaWeekByUserView.java | 150 + .../views/ColocationLastWeekByUserView.java | 149 + .../model/views/ColocationWeekByUserView.java | 149 + .../views/CurrentCustomerByLoanView.java | 168 + .../arrebol/apc/model/views/CustomerView.java | 197 + .../views/CustomerWithoutRenovationView.java | 226 + .../model/views/EnabledUserDetailsView.java | 89 + .../model/views/ExchangeEnebledUsersView.java | 70 + .../apc/model/views/FaltanteInDates.java | 170 + .../com/arrebol/apc/model/views/FeesView.java | 137 + .../apc/model/views/GeneralBoxView.java | 97 + .../apc/model/views/HistoryLoanView.java | 183 + .../views/InformationLoanLastWeekView.java | 751 ++ .../model/views/InformationLoanWeekView.java | 1150 +++ .../model/views/LoanApprovedDetailView.java | 82 + .../views/LoanByUserOrderPreferenceView.java | 108 + .../views/LoanByUserPaymentZeroView.java | 90 + .../apc/model/views/LoanByUserView.java | 322 + .../apc/model/views/LoanDetailZeroView.java | 127 + .../LoanDiferencesByUserLastWeekView.java | 63 + .../model/views/LoanEmployeeAllDataView.java | 143 + .../views/LoanEmployeeDetailAllDataView.java | 114 + .../apc/model/views/LoanEmployeeView.java | 217 + .../apc/model/views/LoanFinishedView.java | 168 + .../LoanInPendingStatusToDeliveryView.java | 162 + .../LoanRenovationDeliveryWeeklyView.java | 221 + .../views/LoanToDeliveryByCertifierView.java | 197 + .../views/MoneyDailyByUserCertifier.java | 88 + .../PaymentDetailFromUserByCurdateView.java | 97 + .../model/views/PersonSearchDetailView.java | 81 + .../PersonSearchHistoricalDetailsView.java | 147 + .../apc/model/views/PersonSearchView.java | 64 + .../views/ResumeNewCustomerLastWeekView.java | 73 + .../views/ResumeNewCustomerWeekView.java | 73 + .../views/ResumenInOutLastWeekByUserView.java | 285 + .../views/ResumenInOutWeekByUserView.java | 284 + .../model/views/ResumenTotalLastWeekView.java | 162 + .../apc/model/views/ResumenTotalWeekView.java | 162 + .../apc/model/views/StatsAdvancesView.java | 90 + .../apc/model/views/StatsClosingDayView.java | 101 + .../apc/model/views/StatsDepositsView.java | 145 + .../model/views/StatsEmployeeSavingView.java | 126 + .../apc/model/views/StatsGasolineView.java | 158 + .../apc/model/views/StatsOpeningFeesView.java | 101 + .../views/StatsPaymentRenovationView.java | 112 + .../model/views/StatsPaymentRouteView.java | 123 + .../apc/model/views/StatsPaymentView.java | 123 + .../apc/model/views/StatsPayrollView.java | 90 + .../apc/model/views/StatsSummaryView.java | 168 + .../model/views/StatsZeroPaymentsView.java | 101 + .../views/SubtotalLastWeekByUserView.java | 252 + .../model/views/SubtotalWeekByUserView.java | 227 + .../TotalCashByCurdateDashboardView.java | 173 + .../model/views/TotalCashByCurdateView.java | 172 + .../views/TotalClosingDayByCurdateView.java | 71 + .../views/TotalLoansApprovedByOfficeView.java | 64 + .../model/views/TotalLoansByOfficeView.java | 114 + .../views/TransferInPendingStatusView.java | 175 + .../arrebol/apc/model/views/TransferView.java | 219 + .../apc/model/views/UserByRouteView.java | 81 + .../AdministrationPersonSerchViewCfg.java | 24 + .../AdvanceUserDailyDetailViewCfg.java | 22 + .../constance/AdvanceUserDailyViewCfg.java | 23 + .../constance/AvailablesOwnersViewCfg.java | 22 + ...losingDailyDetailFromUserByCurdateCfg.java | 23 + .../CurrentCustomerByLoanViewCfg.java | 21 + .../CustomerWithoutRenovationViewCfg.java | 21 + .../constance/EnabledUserDetailsViewCfg.java | 20 + .../model/views/constance/FeesViewCfg.java | 24 + .../views/constance/GeneralBoxViewCfg.java | 22 + .../constance/InformationLoanWeekViewCfg.java | 36 + .../LoanByUserPaymentZeroViewCfg.java | 22 + .../constance/LoanEmployeeAllDataCfg.java | 22 + .../LoanEmployeeDetailAllDataViewCfg.java | 29 + .../views/constance/LoanEmployeeViewCfg.java | 22 + .../LoanInPendingStatusToDeliveryViewCfg.java | 17 + .../LoanRenovationDeliveryWeeklyViewCfg.java | 21 + .../MoneyDailyByUserCertifierViewCfg.java | 22 + .../ResumenNewCustomerLastWeekViewCfg.java | 22 + .../ResumenNewCustomerWeekViewCfg.java | 22 + .../ResumenTotalLastWeekViewCfg.java | 22 + .../constance/ResumenTotalWeekViewCfg.java | 22 + .../views/constance/StatsAdvancesViewCfg.java | 22 + .../constance/StatsClosingDayViewCfg.java | 22 + .../views/constance/StatsDepositsViewCfg.java | 21 + .../constance/StatsEmployeeSavingViewCfg.java | 22 + .../views/constance/StatsGasolineViewCfg.java | 19 + .../constance/StatsOpeningFeesViewCfg.java | 21 + .../StatsPaymentRenovationViewCfg.java | 21 + .../constance/StatsPaymentRouteViewCfg.java | 22 + .../views/constance/StatsPaymentViewCfg.java | 22 + .../views/constance/StatsPayrollViewCfg.java | 22 + .../views/constance/StatsVehicleCfg.java | 19 + .../constance/StatsZeroPaymentsViewCfg.java | 21 + .../TotalLoansApprovedByOfficeViewCfg.java | 22 + .../constance/TotalLoansByOfficeViewCfg.java | 25 + .../TransferInPendingStatusViewCfg.java | 17 + .../apc/model/ws/parsed/AmountJaxb.java | 54 + .../apc/model/ws/parsed/CashRegisterJaxb.java | 55 + .../model/ws/parsed/ConfigurationJaxb.java | 39 + .../arrebol/apc/model/ws/parsed/Exchange.java | 65 + .../apc/model/ws/parsed/ExchangeJaxb.java | 65 + .../model/ws/parsed/FeeToPayRequestJaxb.java | 44 + .../ws/parsed/FeesToPayByLoanRequestJaxb.java | 55 + .../apc/model/ws/parsed/LoanDetailJaxb.java | 122 + .../arrebol/apc/model/ws/parsed/LoanJaxb.java | 44 + .../model/ws/parsed/LoanRequestedJaxb.java | 112 + .../apc/model/ws/parsed/NewAmountJaxb.java | 118 + .../ws/parsed/NewTransferAccountJaxb.java | 98 + .../apc/model/ws/parsed/PersonJaxb.java | 144 + .../parsed/RenovationWithEndorsementJaxb.java | 104 + .../apc/model/ws/parsed/ThumbnailJaxb.java | 48 + .../com/arrebol/apc/test/ArrebolTest.java | 82 + ace-model/src/main/resources/apc.cfg.xml | 230 + .../catalog/queries/people.queries.hbm.xml | 101 + .../catalog/queries/roles.queries.hbm.xml | 28 + .../catalog/queries/routes.queries.hbm.xml | 106 + .../queries/admin/advance.queries.hbm.xml | 41 + .../queries/admin/bitacora.queries.hbm.xml | 28 + .../model/queries/admin/bonus.queries.hbm.xml | 57 + .../admin/closing.day.detail.queries.hbm.xml | 16 + .../queries/admin/closing_day.queries.hbm.xml | 88 + .../admin/expense.company.queries.hbm.xml | 43 + .../model/queries/admin/goal.queries.hbm.xml | 42 + .../queries/admin/money.daily.queries.hbm.xml | 43 + .../admin/other.expense.queries.hbm.xml | 43 + .../admin/stable.general.box.queries.hbm.xml | 92 + .../admin/stable.small.box.queries.hbm.xml | 80 + .../queries/admin/transfer.queries.hbm.xml | 100 + .../core/human.resource.queries.hbm.xml | 91 + .../queries/core/mobile.user.queries.hbm.xml | 17 + .../model/queries/core/office.queries.hbm.xml | 42 + .../queries/core/permission.queries.hbm.xml | 120 + ...r.by.office.has.permission.queries.hbm.xml | 29 + .../core/user.by.office.queries.hbm.xml | 88 + .../model/queries/core/user.queries.hbm.xml | 142 + .../queries/loan/delivery.queries.hbm.xml | 6 + .../loan/loan.by.renovation.queries.hbm.xml | 47 + .../queries/loan/loan.by.user.queries.hbm.xml | 73 + .../queries/loan/loan.details.queries.hbm.xml | 221 + .../model/queries/loan/loan.employee.hbm.xml | 27 + .../loan.fee.notification.queries.hbm.xml | 16 + .../model/queries/loan/loan.queries.hbm.xml | 495 ++ .../queries/loan/loan.type.queries.hbm.xml | 83 + .../queries/mobile/gasoline/gasoline.hbm.xml | 23 + .../user.mobile.preference.queries.hbm.xml | 40 + .../mobile/reports/user.week.report.hbm.xml | 20 + .../available.customers.view.queries.hbm.xml | 16 + ...vailable.endorsements.view.queries.hbm.xml | 16 + .../views/availables.owners.view.hbm.xml | 31 + ...ister.curdate.by.user.view.queries.hbm.xml | 16 + .../current.customer.by.loan.view.hbm.xml | 19 + ...xchange.enebled.users.view.queries.hbm.xml | 18 + .../views/loan.approved.detail.view.hbm.xml | 6 + ...user.order.preference.view.queries.hbm.xml | 18 + .../views/loan.by.user.view.queries.hbm.xml | 48 + ...in.pending.status.to.delivery.view.hbm.xml | 20 + ...elivery.by.ciertifier.view.queries.hbm.xml | 17 + .../views/person.search.detail.view.hbm.xml | 6 + ...son.search.historical.details.view.hbm.xml | 16 + .../mobile/views/person.search.view.hbm.xml | 22 + .../views/total.cash.by.curdate.view.hbm.xml | 38 + .../queries/payroll/payroll.queries.hbm.xml | 201 + ...cted.payment.daily.by.user.queries.hbm.xml | 41 + .../view/administration.person.serch.view.xml | 56 + .../advance.user.daily.detail.view.hbm.xml | 15 + .../view/advance.user.daily.view.hbm.xml | 35 + .../customer.without.renovation.view.hbm.xml | 15 + .../view/enabled.user.details.view.hbm.xml | 24 + .../queries/view/general.box.view.hbm.xml | 15 + .../information.loan.last.week.view.hbm.xml | 43 + .../view/information.loan.week.view.hbm.xml | 61 + .../loan.by.user.payment.zero.view.hbm.xml | 15 + ...loan.employee.detail.all.data.view.hbm.xml | 34 + .../queries/view/loan.employee.view.hbm.xml | 25 + ...an.renovation.devilery.weekly.view.hbm.xml | 35 + ...money.daily.by.user.certifier.view.hbm.xml | 15 + ...t.detail.from.user.by.curdate.view.hbm.xml | 6 + ...esumen.new.customer.last.week.view.hbm.xml | 14 + .../resumen.new.customer.week.view.hbm.xml | 14 + .../view/resumen.total.last.week.view.hbm.xml | 15 + .../view/resumen.total.week.view.hbm.xml | 15 + .../queries/view/stats.advances.view.hbm.xml | 31 + .../view/stats.closing.day.view.hbm.xml | 31 + .../queries/view/stats.deposits.view.hbm.xml | 31 + .../view/stats.employee.saving.view.hbm.xml | 31 + .../queries/view/stats.fees.view.hbm.xml | 44 + .../queries/view/stats.gasoline.view.hbm.xml | 18 + .../view/stats.opening.fees.view.hbm.xml | 31 + .../stats.payment.renovation.view.hbm.xml | 31 + .../view/stats.payment.route.view.hbm.xml | 31 + .../queries/view/stats.payment.view.hbm.xml | 31 + .../queries/view/stats.payroll.view.hbm.xml | 31 + .../queries/view/stats.vehicle.view.hbm.xml | 15 + .../view/stats.zero.payments.view.hbm.xml | 31 + ...y.detail.from.user.by.curdate.view.hbm.xml | 26 + .../total.closing.day.by.curdate.view.hbm.xml | 15 + ...otal.loans.approved.by.office.view.hbm.xml | 15 + .../view/total.loans.by.office.view.hbm.xml | 15 + .../transfer.in.pending.status.view.hbm.xml | 20 + .../queries/view/user.by.route.view.hbm.xml | 15 + ace-security/nb-configuration.xml | 18 + ace-security/pom.xml | 58 + .../com/arrebol/apc/security/APCSecure.java | 68 + ace-security/src/main/resources/log4j2.xml | 19 + .../arrebol/apc/security/APCSecureTest.java | 40 + ace-web/faces-config.NavData | 6 + ace-web/faces-config_old.NavData | 0 ace-web/nb-configuration.xml | 22 + ace-web/pom.xml | 220 + .../com/arrebol/apc/web/beans/Datatable.java | 30 + .../arrebol/apc/web/beans/GenericBean.java | 209 + .../com/arrebol/apc/web/beans/SendMSN.java | 49 + .../apc/web/beans/admin/AdvanceBean.java | 252 + .../apc/web/beans/admin/BonusBean.java | 158 + .../apc/web/beans/admin/ChangeOwnerBean.java | 241 + .../apc/web/beans/admin/ClosingDayBean.java | 1277 +++ .../web/beans/admin/ClosingDayBean.java.bak | 1281 +++ .../web/beans/admin/ClosingDayDetailBean.java | 100 + .../apc/web/beans/admin/CustomerBean.java | 169 + .../web/beans/admin/CustomerDetailBean.java | 175 + .../apc/web/beans/admin/EmployeeListBean.java | 100 + .../apc/web/beans/admin/EndorsementBean.java | 178 + .../beans/admin/EndorsementDetailBean.java | 143 + .../web/beans/admin/ExpenseCompanyInBean.java | 239 + .../beans/admin/ExpenseCompanyOutBean.java | 248 + .../arrebol/apc/web/beans/admin/FeesBean.java | 212 + .../beans/admin/GenericPersonSearchBean.java | 193 + .../arrebol/apc/web/beans/admin/GoalBean.java | 155 + .../beans/admin/LoanDetailTransferBean.java | 332 + .../web/beans/admin/LoanEmployeeListBean.java | 411 + .../apc/web/beans/admin/LoanHistoryBean.java | 546 ++ .../beans/admin/LoanHistoryDetailBean.java | 220 + .../beans/admin/LoanHistoryJuridicalBean.java | 546 ++ .../apc/web/beans/admin/LoanPendingBean.java | 478 + .../beans/admin/LoanPendingDetailBean.java | 333 + .../LoanRenovationDeliveryWeeklyBean.java | 138 + .../apc/web/beans/admin/MoneyDailyBean.java | 327 + .../apc/web/beans/admin/OtherExpenseBean.java | 294 + .../apc/web/beans/admin/PayRollBean.java | 953 ++ .../apc/web/beans/admin/PeopleBean.java | 162 + .../web/beans/admin/StableGeneralBoxBean.java | 1247 +++ .../web/beans/admin/StableSmallBoxBean.java | 770 ++ .../web/beans/admin/StatsAdvancesBean.java | 180 + .../web/beans/admin/StatsClosingDayBean.java | 169 + .../web/beans/admin/StatsDepositsBean.java | 169 + .../beans/admin/StatsEmployeeSavingBean.java | 264 + .../web/beans/admin/StatsGasolineBean.java | 144 + .../web/beans/admin/StatsOpeningFeesBean.java | 168 + .../apc/web/beans/admin/StatsPaymentBean.java | 169 + .../admin/StatsPaymentRenovationBean.java | 168 + .../beans/admin/StatsPaymentRouteBean.java | 180 + .../apc/web/beans/admin/StatsPayrollBean.java | 169 + .../apc/web/beans/admin/StatsSummaryBean.java | 145 + .../apc/web/beans/admin/StatsVehicleBean.java | 117 + .../beans/admin/StatsZeroPaymentsBean.java | 168 + .../apc/web/beans/admin/TransferBean.java | 263 + .../web/beans/admin/TransferUpgradeBean.java | 268 + .../apc/web/beans/admin/VehicleBean.java | 613 ++ .../admin/people/PersonCustomerBean.java | 648 ++ .../apc/web/beans/catalog/LoanTypeBean.java | 293 + .../apc/web/beans/catalog/RoleBean.java | 132 + .../apc/web/beans/catalog/RouteBean.java | 135 + .../CustomerWithoutLoanDetailBean.java | 172 + .../web/beans/dashboard/DashboardBean.java | 1483 ++++ .../web/beans/dashboard/LoanDetailBean.java | 245 + .../dashboard/LoanDetailEndorsementBean.java | 218 + .../apc/web/beans/login/LoginBean.java | 220 + .../beans/system/bitacora/BitacoraBean.java | 127 + .../beans/system/employee/EmployeeBean.java | 622 ++ .../web/beans/system/office/OfficeBean.java | 142 + .../web/beans/system/user/UserAccessBean.java | 195 + .../web/beans/system/user/UserAdminBean.java | 567 ++ .../web/beans/system/user/UserCreateBean.java | 428 + .../web/beans/system/user/UserUpdateBean.java | 663 ++ .../apc/web/beans/topbar/PrivacyBean.java | 119 + .../apc/web/beans/topbar/TopBarBean.java | 64 + .../apc/web/converters/GenericConverter.java | 41 + .../apc/web/converters/PeopleConverter.java | 44 + .../converters/PerseonSearchConverter.java | 42 + .../web/converters/UserByOfficeConverter.java | 82 + .../com/arrebol/apc/web/drive/DriverBean.java | 589 ++ .../arrebol/apc/web/drive/DriverDateBean.java | 871 ++ .../arrebol/apc/web/drive/DriverLastBean.java | 593 ++ .../apc/web/validators/GenericValidator.java | 42 + .../validators/SelectOneMenuValidator.java | 27 + .../com/arrebol/apc/i18n/app.properties | 599 ++ .../com/arrebol/apc/i18n/app.properties.bak | 599 ++ .../apc/i18n/app_background.properties | 50 + .../apc/i18n/app_permission.properties | 357 + ace-web/src/main/resources/log4j2.xml | 42 + ace-web/src/main/webapp/META-INF/context.xml | 38 + .../webapp/WEB-INF/error-pages/access.xhtml | 37 + .../webapp/WEB-INF/error-pages/error.xhtml | 38 + .../webapp/WEB-INF/error-pages/notfound.xhtml | 37 + .../src/main/webapp/WEB-INF/faces-config.xml | 46 + ace-web/src/main/webapp/WEB-INF/footer.xhtml | 15 + .../WEB-INF/primefaces-serenity.taglib.xml | 66 + ace-web/src/main/webapp/WEB-INF/sidebar.xhtml | 417 + .../src/main/webapp/WEB-INF/template.xhtml | 71 + ace-web/src/main/webapp/WEB-INF/topbar.xhtml | 109 + ace-web/src/main/webapp/WEB-INF/web.xml | 241 + .../webapp/app/admin/closingDay/detail.xhtml | 145 + .../webapp/app/admin/closingDay/history.xhtml | 170 + .../webapp/app/admin/closingDay/index.xhtml | 372 + .../main/webapp/app/admin/customer/add.xhtml | 225 + .../webapp/app/admin/customer/detail.xhtml | 315 + .../webapp/app/admin/customer/index.xhtml | 494 ++ .../webapp/app/admin/customer/index_old.xhtml | 431 + .../webapp/app/admin/endorsement/detail.xhtml | 258 + .../webapp/app/admin/endorsement/index.xhtml | 162 + .../webapp/app/admin/loan/changeOwner.xhtml | 212 + .../main/webapp/app/admin/loan/detail.xhtml | 641 ++ .../main/webapp/app/admin/loan/drive.xhtml | 902 ++ .../webapp/app/admin/loan/driveDate.xhtml | 1035 +++ .../webapp/app/admin/loan/driveLast.xhtml | 898 ++ .../main/webapp/app/admin/loan/history.xhtml | 299 + .../webapp/app/admin/loan/historyDetail.xhtml | 523 ++ .../app/admin/loan/historyJuridical.xhtml | 144 + .../main/webapp/app/admin/loan/index.xhtml | 220 + .../app/admin/loan/loanDetailTransfer.xhtml | 112 + .../app/admin/loan/loanRenovationWeekly.xhtml | 118 + .../webapp/app/admin/moneyDaily/index.xhtml | 245 + .../webapp/app/admin/otherExpense/index.xhtml | 214 + .../app/admin/stableSmallBox/history.xhtml | 189 + .../app/admin/stableSmallBox/index.xhtml | 141 + .../webapp/app/admin/transfer/index.xhtml | 216 + .../app/admin/transfer/index_backup.xhtml | 208 + .../main/webapp/app/admin/vehicles/main.xhtml | 278 + .../webapp/app/catalog/loanType/add.xhtml | 195 + .../webapp/app/catalog/loanType/index.xhtml | 116 + .../main/webapp/app/catalog/role/index.xhtml | 90 + .../main/webapp/app/catalog/route/index.xhtml | 90 + .../generalBox/expenseCompanyIn/index.xhtml | 182 + .../generalBox/expenseCompanyOut/index.xhtml | 189 + .../generalBox/stableGeneralBox/history.xhtml | 188 + .../generalBox/stableGeneralBox/index.xhtml | 142 + .../webapp/app/payroll/advance/index.xhtml | 184 + .../main/webapp/app/payroll/bonus/index.xhtml | 168 + .../app/payroll/createPayroll/index.xhtml | 432 + .../main/webapp/app/payroll/goal/index.xhtml | 164 + .../src/main/webapp/app/payroll/history.xhtml | 232 + .../app/payroll/loanEmployee/index.xhtml | 262 + .../webapp/app/stats/advances/index.xhtml | 109 + .../webapp/app/stats/closingDay/index.xhtml | 114 + .../webapp/app/stats/deposits/index.xhtml | 138 + .../app/stats/employeeSaving/index.xhtml | 184 + .../main/webapp/app/stats/fees/index.xhtml | 116 + .../webapp/app/stats/feesByRoute/index.xhtml | 111 + .../webapp/app/stats/gasoline/index.xhtml | 119 + .../webapp/app/stats/openingFee/index.xhtml | 113 + .../main/webapp/app/stats/payment/index.xhtml | 113 + .../app/stats/paymentRenovation/index.xhtml | 112 + .../webapp/app/stats/paymentRoute/index.xhtml | 114 + .../main/webapp/app/stats/payroll/index.xhtml | 110 + .../main/webapp/app/stats/summary/index.xhtml | 145 + .../webapp/app/stats/vehicles/index.xhtml | 93 + .../webapp/app/stats/zeroPayments/index.xhtml | 112 + .../webapp/app/system/bitacora/index.xhtml | 104 + .../app/system/employee/employeeList.xhtml | 95 + .../webapp/app/system/employee/main.xhtml | 621 ++ .../src/main/webapp/app/system/log/main.xhtml | 25 + .../main/webapp/app/system/office/index.xhtml | 104 + .../webapp/app/system/user/access/main.xhtml | 172 + .../webapp/app/system/user/add/main.xhtml | 275 + .../webapp/app/system/user/setting/main.xhtml | 450 + .../app/system/user/setting/main_1.xhtml | 663 ++ .../src/main/webapp/app/topbar/privacy.xhtml | 87 + .../webapp/customerWithoutLoanDetail.xhtml | 311 + ace-web/src/main/webapp/dashboard.xhtml | 1109 +++ ace-web/src/main/webapp/loanDetail.xhtml | 530 ++ .../main/webapp/loanDetailEndorsement.xhtml | 524 ++ ace-web/src/main/webapp/login.xhtml | 85 + .../resources/js/scriptGeneric/bitacora.js | 7 + .../js/scriptGeneric/dialogGeneric.js | 96 + .../primefaces-serenity-green/theme.css | 7653 +++++++++++++++++ .../primefaces-serenity-green/theme.scss | 11 + .../main/webapp/resources/sass/_fonts.scss | 51 + .../webapp/resources/sass/_layout_styles.scss | 1 + .../main/webapp/resources/sass/_mixins.scss | 225 + .../webapp/resources/sass/_theme_styles.scss | 1 + .../resources/sass/layout/_dashboard.scss | 768 ++ .../resources/sass/layout/_exception.scss | 168 + .../resources/sass/layout/_horizontal.scss | 453 + .../resources/sass/layout/_landing.scss | 551 ++ .../webapp/resources/sass/layout/_layout.scss | 11 + .../webapp/resources/sass/layout/_login.scss | 82 + .../webapp/resources/sass/layout/_main.scss | 1399 +++ .../webapp/resources/sass/layout/_utils.scss | 169 + .../webapp/resources/sass/theme/_common.scss | 138 + .../webapp/resources/sass/theme/_data.scss | 779 ++ .../webapp/resources/sass/theme/_forms.scss | 1419 +++ .../webapp/resources/sass/theme/_icons.scss | 977 +++ .../webapp/resources/sass/theme/_media.scss | 80 + .../webapp/resources/sass/theme/_menus.scss | 367 + .../resources/sass/theme/_messages.scss | 245 + .../webapp/resources/sass/theme/_misc.scss | 91 + .../resources/sass/theme/_overlays.scss | 193 + .../webapp/resources/sass/theme/_panels.scss | 432 + .../webapp/resources/sass/theme/_theme.scss | 14 + .../resources/sass/variables/_common.scss | 29 + .../resources/sass/variables/_layout.scss | 11 + .../resources/sass/variables/_theme.scss | 40 + .../resources/serenity-layout/css/grid.css | 347 + .../serenity-layout/css/layout-green.css | 2938 +++++++ .../serenity-layout/css/layout-green.scss | 67 + .../serenity-layout/css/nanoscroller.css | 58 + .../resources/serenity-layout/css/ripple.css | 50 + .../fonts/MaterialIcons-Regular.eot | Bin 0 -> 143258 bytes .../fonts/MaterialIcons-Regular.ttf | Bin 0 -> 128180 bytes .../fonts/MaterialIcons-Regular.woff | Bin 0 -> 57620 bytes .../fonts/MaterialIcons-Regular.woff2 | Bin 0 -> 44300 bytes .../fonts/roboto-v15-latin-300.eot | Bin 0 -> 16205 bytes .../fonts/roboto-v15-latin-300.svg | 314 + .../fonts/roboto-v15-latin-300.ttf | Bin 0 -> 32664 bytes .../fonts/roboto-v15-latin-300.woff | Bin 0 -> 18520 bytes .../fonts/roboto-v15-latin-300.woff2 | Bin 0 -> 14524 bytes .../fonts/roboto-v15-latin-700.eot | Bin 0 -> 16208 bytes .../fonts/roboto-v15-latin-700.svg | 310 + .../fonts/roboto-v15-latin-700.ttf | Bin 0 -> 32500 bytes .../fonts/roboto-v15-latin-700.woff | Bin 0 -> 18568 bytes .../fonts/roboto-v15-latin-700.woff2 | Bin 0 -> 14552 bytes .../fonts/roboto-v15-latin-regular.eot | Bin 0 -> 16227 bytes .../fonts/roboto-v15-latin-regular.svg | 308 + .../fonts/roboto-v15-latin-regular.ttf | Bin 0 -> 32652 bytes .../fonts/roboto-v15-latin-regular.woff | Bin 0 -> 18520 bytes .../fonts/roboto-v15-latin-regular.woff2 | Bin 0 -> 14584 bytes .../serenity-layout/images/ace_logo.jpg | Bin 0 -> 161381 bytes .../serenity-layout/images/apc_card.png | Bin 0 -> 145977 bytes .../serenity-layout/images/arrebol.png | Bin 0 -> 125802 bytes .../serenity-layout/images/avatar.png | Bin 0 -> 13113 bytes .../serenity-layout/images/avatar1.png | Bin 0 -> 10633 bytes .../serenity-layout/images/avatar2.png | Bin 0 -> 11191 bytes .../serenity-layout/images/avatar3.png | Bin 0 -> 12403 bytes .../serenity-layout/images/avatar4.png | Bin 0 -> 8581 bytes .../images/dashboard/bridge.png | Bin 0 -> 356583 bytes .../images/dashboard/flag-belgium.png | Bin 0 -> 2141 bytes .../images/dashboard/flag-brazil.png | Bin 0 -> 4813 bytes .../images/dashboard/flag-china.png | Bin 0 -> 4043 bytes .../images/dashboard/flag-france.png | Bin 0 -> 2153 bytes .../images/dashboard/flag-uk.png | Bin 0 -> 2448 bytes .../images/dashboard/gradient-waters.png | Bin 0 -> 263850 bytes .../serenity-layout/images/dashboard/map.jpg | Bin 0 -> 60875 bytes .../images/dashboard/sidebar-image.jpg | Bin 0 -> 39355 bytes .../images/dashboard/usercard.png | Bin 0 -> 8003 bytes .../images/dashboard/weather-icon-1.svg | 5 + .../images/dashboard/weather-icon-2.svg | 3 + .../images/dashboard/weather-icon-3.svg | 6 + .../images/dashboard/weather-icon-4.svg | 6 + .../serenity-layout/images/excel-xls-icon.png | Bin 0 -> 5203 bytes .../serenity-layout/images/exception/401.svg | 16 + .../serenity-layout/images/exception/404.svg | 3 + .../images/exception/500(1).svg | 3 + .../serenity-layout/images/exception/500.svg | 3 + .../images/exception/access-bg.jpg | Bin 0 -> 81183 bytes .../images/exception/error-bg(1).jpg | Bin 0 -> 67960 bytes .../images/exception/error-bg.jpg | Bin 0 -> 67960 bytes .../images/exception/icon-apple-green.svg | 3 + .../images/exception/icon-apple-purple.svg | 3 + .../images/exception/icon-donut-red.svg | 3 + .../images/exception/icon-donut-yellow.svg | 3 + .../images/exception/icon-shop-purple.svg | 3 + .../images/exception/icon-shop-yellow.svg | 3 + .../images/exception/icon-taxi-yellow.svg | 3 + .../images/exception/notfound-bg.jpg | Bin 0 -> 84627 bytes .../images/landing/icon-cleancode.svg | 29 + .../images/landing/icon-coffee.svg | 3 + .../images/landing/icon-facebook.svg | 16 + .../images/landing/icon-hours.svg | 3 + .../images/landing/icon-linkedin.svg | 16 + .../images/landing/icon-moderndesign.svg | 31 + .../images/landing/icon-responsive.svg | 29 + .../images/landing/icon-twitter.svg | 16 + .../images/landing/icon-ui.svg | 3 + .../images/landing/icon-welldocumented.svg | 32 + .../images/landing/landing-header.png | Bin 0 -> 945443 bytes .../images/landing/map-contact.png | Bin 0 -> 218591 bytes .../serenity-layout/images/login/login-bg.jpg | Bin 0 -> 81183 bytes .../serenity-layout/images/logo-colored.png | Bin 0 -> 23908 bytes .../serenity-layout/images/logo-slim.png | Bin 0 -> 5533 bytes .../resources/serenity-layout/images/mapa.png | Bin 0 -> 7913 bytes .../serenity-layout/images/rightmenu-icon.png | Bin 0 -> 323 bytes .../serenity-layout/js/calendar_es.js | 26 + .../resources/serenity-layout/js/layout.js | 750 ++ .../serenity-layout/js/nanoscroller.js | 1040 +++ .../resources/serenity-layout/js/ripple.js | 34 + .../resources/serenity-layout/js/swipe.js | 1973 +++++ ace-ws-rest/hs_err_pid15652.log | 322 + ace-ws-rest/nb-configuration.xml | 21 + ace-ws-rest/pom.xml | 283 + ace-ws-rest/replay_pid15652.log | 2597 ++++++ .../apc/ws/administration/ClosingDayWS.java | 124 + .../apc/ws/administration/SmallBoxWS.java | 122 + .../arrebol/apc/ws/cash/CashRegisterWS.java | 82 + .../arrebol/apc/ws/cfg/ApplicationCfg.java | 51 + .../JsonMoxyConfigurationContextResolver.java | 45 + .../arrebol/apc/ws/customer/CustomerWS.java | 59 + .../arrebol/apc/ws/employee/EmployeeWS.java | 49 + .../arrebol/apc/ws/exchange/ExchangeWS.java | 143 + .../arrebol/apc/ws/gasoline/GasolineWS.java | 76 + .../java/com/arrebol/apc/ws/loan/LoanWS.java | 830 ++ .../com/arrebol/apc/ws/login/LoginWS.java | 58 + .../apc/ws/otherexpense/OtherExpenseWS.java | 70 + .../com/arrebol/apc/ws/person/PersonWS.java | 53 + .../ws/preferences/SystemPreferenceWS.java | 125 + .../com/arrebol/apc/ws/reports/ReportsWS.java | 47 + .../com/arrebol/apc/ws/route/RouteWS.java | 44 + .../com/arrebol/apc/ws/search/SearchWS.java | 130 + .../java/com/arrebol/apc/ws/user/UserWS.java | 55 + ace-ws-rest/src/main/resources/log4j2.xml | 29 + .../src/main/webapp/META-INF/context.xml | 2 + ace-ws-rest/src/main/webapp/WEB-INF/beans.xml | 7 + ace-ws-rest/src/main/webapp/index.html | 10 + .../apc/ws/cash/CashRegisterWSTest.java | 47 + .../apc/ws/customer/CustomerWSTest.java | 58 + .../ws/customer/employee/EmployeeWSTest.java | 54 + .../apc/ws/exchange/ExchangeWSTest.java | 93 + .../com/arrebol/apc/ws/loan/LoanWSTest.java | 221 + .../apc/ws/loan/LoanWithImageWSTest.java | 137 + .../com/arrebol/apc/ws/login/LoginWSTest.java | 58 + .../preferences/SystemPreferenceWSTest.java | 103 + .../com/arrebol/apc/ws/user/UserWSTest.java | 48 + ace-ws-rest/src/test/resources/apc.cfg.xml | 224 + ace-ws-rest/src/test/resources/log4j2.xml | 28 + ace/nb-configuration.xml | 18 + ace/pom.xml | 125 + 887 files changed, 146567 insertions(+) create mode 100644 .gitignore create mode 100644 ace-controller-mobile/nb-configuration.xml create mode 100644 ace-controller-mobile/pom.xml create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/admin/ClosingDayController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/admin/StableGeneralBoxController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/admin/StableSmallBoxController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/bitacora/BitacoraController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/cash/CashRegisterCurdateByUserController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/customer/CustomerController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/exchange/ExchangeEnebledUsersController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/gasoline/GasolineController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/loan/LoanController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/login/LoginWSController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/otherexpense/OtherExpenseController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/person/PersonController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/preference/SystemPreferenceController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/reports/ReportsController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/route/RouteController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/search/PersonSearchController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/tracking/PaymentTrackingController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/user/UserController.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/AuthorizeTransferList.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/AuthorizeTransferPaymentsDto.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/DeleteLoanDetailsJaxb.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/GenericAPCResponserJaxb.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/LoanTypeJaxb.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/LoanTypeListJaxb.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/TransferListToUpdateStatus.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/UpdateLoanToDeliveryStatusDTO.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/UpdateLoanToDeliveryStatusList.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/PersonMxy.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/login/UserMxy.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/login/UserPreferenceMxy.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/ContainerRoutes.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/LoanByUserOrderPreferenceViewJaxb.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/LoanByUserOrderPreferenceViewListJaxb.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/PaymentTrackingViewJaxb.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/RouteJaxb.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/ArrebolTestRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/GenericRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/ClosingDayRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/OtherExpenseRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/StableGeneralBoxRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/StableSmallBoxRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/TransferRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/bitacora/BitacoraRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/gasoline/GasolineRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/jaas/AuthenticationRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/AddAmountRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanByRenovationRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanByUserRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanDetailsRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanFeeNotificationRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanToDeliveryByCertifierRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanTypeRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/people/PeopleRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/preference/UserMobilePreferenceRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/reports/ReportsRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/route/RouteRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/tracking/PaymentTrackingRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/user/UserRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/CashRegisterCurdateByUserViewRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/ExchangeEnebledUsersViewRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanApprovedDetailViewRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanByUserOrderPreferenceViewRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanByUserViewRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanInPendingStatusToDeliveryViewRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/PersonSearchHistoricalDetailsViewRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/PersonSearchViewRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/SearchPersonAvailableRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/TotalCashByCurdateViewRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/TransferInPendingStatusViewRepository.java create mode 100644 ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/util/HibernateUtil.java create mode 100644 ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/cash/CashRegisterCurdateByUserControllerTest.java create mode 100644 ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/customer/CustomerControllerTest.java create mode 100644 ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/exchange/ExchangeEnebledUsersControllerTest.java create mode 100644 ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/loan/LoanControllerTest.java create mode 100644 ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/login/LoginWSControllerTest.java create mode 100644 ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/preference/SystemPreferenceControllerTest.java create mode 100644 ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/search/PersonSearchControllerTest.java create mode 100644 ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/user/UserControllerTest.java create mode 100644 ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/repository/ArrebolTestRepositoryTest.java create mode 100644 ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/repository/loan/LoanTypeRepositoryTest.java create mode 100644 ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/repository/people/PeopleRepositoryTest.java create mode 100644 ace-controller-mobile/src/test/resources/apc.cfg.xml create mode 100644 ace-controller-mobile/src/test/resources/log4j2.xml create mode 100644 ace-controller/nb-configuration.xml create mode 100644 ace-controller/pom.xml create mode 100644 ace-controller/pom.xml.bak create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/BitacoraController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/GenericController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/GenericValidationController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/AdministrationPersonSearchViewController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/AdvanceController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/BonusController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/ChangeOwnerController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/ClosingDayController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/CustomerController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/EndorsementController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/ExpenseCompanyController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/FeesController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/GoalController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/LoanController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/LoanEmployeeController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/LoanRenovationDeliveryWeeklyController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/MoneyDailyController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/OtherExpenseController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/PayRollController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/PeopleController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StableGeneralBoxController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StableSmallBoxController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsAdvancesController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsClosingDayController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsDepositsController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsEmployeeSavingController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsGasolineController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsOpeningFeesController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPaymentController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPaymentRenovationController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPaymentRouteController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPayrollController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsSummaryController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsVehicleController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsZeroPaymentsController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/TransferController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/admin/VehicleController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/catalog/LoanTypeController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/catalog/RoleController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/catalog/RouteController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/dashboard/CustomerWithoutRenovationViewService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/dashboard/CustomerWithoutRenovationViewServiceImpl.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/dashboard/DashboardController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/drive/DriverController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/drive/FaltanteInDatesController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/login/LoginController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/login/LoginService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/login/LoginServiceImpl.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/system/employee/EmployeeController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/system/office/OfficeController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserAccessController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserAdminController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserCreateController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserUpdateController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/topbar/PrivacyController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/topbar/TopBarController.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/util/ConnectionManager.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/util/DateWrapper.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/util/FilterMap.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/util/HibernateUtil.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/controller/util/logger/LogConnectionFactory.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/repository/AbstractRepository.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/repository/AutoCompleteDAORepository.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/repository/GenericEntityRepository.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/repository/LazyDataModelDAORepository.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/repository/core/HumanResourceRepository.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/repository/core/OfficeRepository.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/repository/core/PermissionRepository.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/repository/core/UserByOfficeRepository.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/repository/core/UserRepository.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/AutoCompleteService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/BitacoraService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/BitacoraServiceImpl.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/GenericValidationService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/GenericValidationServiceImpl.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/LazyDataModelBetweenDatesService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/LazyDataModelService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/admin/CustomerService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/admin/CustomerServiceImpl.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/admin/PeopleService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/admin/PeopleServiceImpl.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/admin/TransferService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/admin/TransferServiceImpl.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanServiceImpl.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanTypeService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanTypeServiceImpl.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/catalog/PeopleAutoCompleteService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/catalog/PeopleAutoCompleteServiceImpl.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/catalog/RouteService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/catalog/RouteServiceImpl.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/core/UserService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/core/UserServiceImpl.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/views/EnabledUserDetailsViewService.java create mode 100644 ace-controller/src/main/java/com/arrebol/apc/service/views/EnabledUserDetailsViewServiceImpl.java create mode 100644 ace-controller/src/test/java/com/arrebol/apc/controller/admin/AdministrationPersonSearchViewControllerTest.java create mode 100644 ace-controller/src/test/java/com/arrebol/apc/controller/admin/ClosingDayControllerTest.java create mode 100644 ace-controller/src/test/java/com/arrebol/apc/controller/admin/StableGeneralBoxControllerTest.java create mode 100644 ace-controller/src/test/java/com/arrebol/apc/controller/admin/StableSmallBoxControllerTest.java create mode 100644 ace-controller/src/test/java/com/arrebol/apc/controller/login/LoginControllerTest.java create mode 100644 ace-controller/src/test/java/com/arrebol/apc/controller/system/employee/EmployeeControllerTest.java create mode 100644 ace-controller/src/test/java/com/arrebol/apc/controller/system/user/UserAccessControllerTest.java create mode 100644 ace-controller/src/test/java/com/arrebol/apc/controller/system/user/UserCreateControllerTest.java create mode 100644 ace-controller/src/test/java/com/arrebol/apc/controller/system/user/UserUpdateControllerTest.java create mode 100644 ace-controller/src/test/java/com/arrebol/apc/controller/topbar/TopBarControllerTest.java create mode 100644 ace-controller/src/test/resources/apc.cfg.xml create mode 100644 ace-controller/src/test/resources/log4j2.xml create mode 100644 ace-db/build.xml create mode 100644 ace-db/manifest.mf create mode 100644 ace-db/nbproject/build-impl.xml create mode 100644 ace-db/nbproject/genfiles.properties create mode 100644 ace-db/nbproject/private/private.properties create mode 100644 ace-db/nbproject/project.properties create mode 100644 ace-db/nbproject/project.xml create mode 100644 ace-db/src/XXXXXXXX.sql create mode 100644 ace-db/src/apc-config-db-aws.sql create mode 100644 ace-db/src/apc-config-db-localhost.sql create mode 100644 ace-db/src/apc-db-populate-empty.sql create mode 100644 ace-db/src/apc-db-populate.sql create mode 100644 ace-db/src/apc-db.sql create mode 100644 ace-db/src/apc-drop-tables-prod.sql create mode 100644 ace-db/src/cambio_de_anio.sql create mode 100644 ace-db/src/cocina-lore-db.sql create mode 100644 ace-db/src/create/from/scratch/apc-config-db-aws.sql create mode 100644 ace-db/src/create/from/scratch/apc-config-db-localhost.sql create mode 100644 ace-db/src/create/from/scratch/apc-db-init-populate.sql create mode 100644 ace-db/src/create/from/scratch/apc-db-tables.sql create mode 100644 ace-db/src/create/from/scratch/apc-db-views.sql create mode 100644 ace-db/src/create/from/scratch/mora/f1_isMobileEnabledUser.sql create mode 100644 ace-db/src/janitzio.sql create mode 100644 ace-db/src/notes.txt create mode 100644 ace-db/src/oscar.sql create mode 100644 ace-db/src/respaldo_xxxxxxxx.sql create mode 100644 ace-db/src/to_execute.sql create mode 100644 ace-db/src/to_update.sql create mode 100644 ace-layout/nb-configuration.xml create mode 100644 ace-layout/pom.xml create mode 100644 ace-layout/src/main/java/org/primefaces/serenity/component/SerenityMenu.java create mode 100644 ace-layout/src/main/java/org/primefaces/serenity/component/SerenityMenuRenderer.java create mode 100644 ace-layout/src/main/java/org/primefaces/serenity/filter/CharacterEncodingFilter.java create mode 100644 ace-layout/src/main/java/org/primefaces/serenity/view/GuestPreferences.java create mode 100644 ace-model/nb-configuration.xml create mode 100644 ace-model/pom.xml create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/DateFormatModel.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ModelParameter.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/Advance.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/Bonus.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/ClosingDay.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/ClosingDayDetail.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/EmployeeSaving.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/ExpenseCompany.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/Goal.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/LoanEmployee.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/LoanEmployeeDetails.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/MoneyDaily.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/OtherExpense.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/StableGeneralBox.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/StableSmallBox.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/Transfer.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/constance/AdvanceCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/constance/BitacoraCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/constance/BonusCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/constance/ClosingDayCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/constance/ClosingDayDetailCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/constance/ExpenseCompanyCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/constance/GoalCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/constance/MoneyDailyCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/constance/OtherExpenseCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/constance/StableGeneralBoxCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/constance/StableSmallBoxCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/admin/constance/TransferCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/catalog/HumanResourceHasRoute.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/catalog/HumanResourceHasRouteId.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/catalog/People.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/catalog/RoleCtlg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/catalog/RouteCtlg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/catalog/Vehicle.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/catalog/constance/PeopleCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/catalog/constance/RoleCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/catalog/constance/RouteCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/HumanResource.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/HumanResourceByOffice.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/Office.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/Permission.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/User.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/UserByOffice.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/UserByOfficeHasPermission.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/UserByOfficeHasPermissionId.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/AvailableCustomersViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/AvailableEndorsementsViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/CashRegisterCurdateByUserViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/ExchangeEnebledUsersViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/GenericCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/HumanResourceByOfficeCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/HumanResourceCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/HumanResourceHasRouteCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanApprovedDetailViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByRenovationCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByUserCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByUserOrderPreferenceViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByUserViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanDetailsCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanFeeNotificationCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanToDeliveryByCertifierViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanTypeCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/MobileUserCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/OfficeCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/PermissionCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/PersonSearchDetailViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/PersonSearchHistoricalDetailsViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/PersonSearchViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserByOfficeCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserByOfficeHasPermissionCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserMobilePreferenceCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/ActionStatus.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/ActiveStatus.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/ApplicationOwner.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/ComissionType.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/CustomerClassification.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/DaysInWeekend.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/EmployeeSavingType.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/ExpenseCompanyType.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/FeeStatus.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/GenericStatus.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/HumanResourceStatus.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/LoanDetailsType.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/LoanRenovationStatus.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/LoanStatus.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/OfficeStatus.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/OwnerLoan.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/PeopleType.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/PermissionStatus.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/PermissionType.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/PreferenceName.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/PreferenceValue.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/TransferStatus.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/UserByOfficeStatus.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/UserStatus.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/enums/UserType.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/gasoline/Gasoline.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/gasoline/constance/GasolineCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/loan/Delivery.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/loan/Loan.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByRenovation.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByRenovationId.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByUser.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByUserId.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/loan/LoanDetails.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/loan/LoanFeeNotification.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/loan/LoanType.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/mobile/access/MobileUser.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/mobile/preference/UserMobilePreference.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/payroll/Payroll.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/payroll/TotalExpectedPaymentDailyByUser.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/payroll/constance/PayRollCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/payroll/constance/TotalExpectedPaymentDailyByUserCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/reports/UserWeekReport.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/reports/constance/UserWeekReportCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/system/logs/Bitacora.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/system/logs/ErrorAppLog.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/AdministrationPersonSerchView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/AdvanceUserDailyDetail.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/AdvanceUserDailyView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/AvailableCustomersView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/AvailableEndorsementsView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/AvailablesOwnersView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/CashRegisterCurdateByUserView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/ClosingDailyDetailFromUserByCurdateView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/CobranzaLastWeekByUserView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/CobranzaWeekByUserView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/ColocationLastWeekByUserView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/ColocationWeekByUserView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/CurrentCustomerByLoanView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/CustomerView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/CustomerWithoutRenovationView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/EnabledUserDetailsView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/ExchangeEnebledUsersView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/FaltanteInDates.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/FeesView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/GeneralBoxView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/HistoryLoanView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/InformationLoanLastWeekView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/InformationLoanWeekView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/LoanApprovedDetailView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/LoanByUserOrderPreferenceView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/LoanByUserPaymentZeroView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/LoanByUserView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/LoanDetailZeroView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/LoanDiferencesByUserLastWeekView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/LoanEmployeeAllDataView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/LoanEmployeeDetailAllDataView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/LoanEmployeeView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/LoanFinishedView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/LoanInPendingStatusToDeliveryView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/LoanRenovationDeliveryWeeklyView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/LoanToDeliveryByCertifierView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/MoneyDailyByUserCertifier.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/PaymentDetailFromUserByCurdateView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/PersonSearchDetailView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/PersonSearchHistoricalDetailsView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/PersonSearchView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/ResumeNewCustomerLastWeekView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/ResumeNewCustomerWeekView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/ResumenInOutLastWeekByUserView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/ResumenInOutWeekByUserView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/ResumenTotalLastWeekView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/ResumenTotalWeekView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/StatsAdvancesView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/StatsClosingDayView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/StatsDepositsView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/StatsEmployeeSavingView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/StatsGasolineView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/StatsOpeningFeesView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/StatsPaymentRenovationView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/StatsPaymentRouteView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/StatsPaymentView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/StatsPayrollView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/StatsSummaryView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/StatsZeroPaymentsView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/SubtotalLastWeekByUserView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/SubtotalWeekByUserView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/TotalCashByCurdateDashboardView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/TotalCashByCurdateView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/TotalClosingDayByCurdateView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/TotalLoansApprovedByOfficeView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/TotalLoansByOfficeView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/TransferInPendingStatusView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/TransferView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/UserByRouteView.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/AdministrationPersonSerchViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/AdvanceUserDailyDetailViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/AdvanceUserDailyViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/AvailablesOwnersViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/ClosingDailyDetailFromUserByCurdateCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/CurrentCustomerByLoanViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/CustomerWithoutRenovationViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/EnabledUserDetailsViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/FeesViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/GeneralBoxViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/InformationLoanWeekViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanByUserPaymentZeroViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanEmployeeAllDataCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanEmployeeDetailAllDataViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanEmployeeViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanInPendingStatusToDeliveryViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanRenovationDeliveryWeeklyViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/MoneyDailyByUserCertifierViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenNewCustomerLastWeekViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenNewCustomerWeekViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenTotalLastWeekViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenTotalWeekViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsAdvancesViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsClosingDayViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsDepositsViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsEmployeeSavingViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsGasolineViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsOpeningFeesViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPaymentRenovationViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPaymentRouteViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPaymentViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPayrollViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsVehicleCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsZeroPaymentsViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/TotalLoansApprovedByOfficeViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/TotalLoansByOfficeViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/views/constance/TransferInPendingStatusViewCfg.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/AmountJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/CashRegisterJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/ConfigurationJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/Exchange.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/ExchangeJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/FeeToPayRequestJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/FeesToPayByLoanRequestJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/LoanDetailJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/LoanJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/LoanRequestedJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/NewAmountJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/NewTransferAccountJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/PersonJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/RenovationWithEndorsementJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/ThumbnailJaxb.java create mode 100644 ace-model/src/main/java/com/arrebol/apc/test/ArrebolTest.java create mode 100644 ace-model/src/main/resources/apc.cfg.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/catalog/queries/people.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/catalog/queries/roles.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/catalog/queries/routes.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/advance.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/bitacora.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/bonus.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/closing.day.detail.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/closing_day.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/expense.company.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/goal.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/money.daily.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/other.expense.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/stable.general.box.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/stable.small.box.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/transfer.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/core/human.resource.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/core/mobile.user.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/core/office.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/core/permission.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/core/user.by.office.has.permission.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/core/user.by.office.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/core/user.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/delivery.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.by.renovation.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.by.user.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.details.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.employee.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.fee.notification.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.type.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/gasoline/gasoline.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/preference/user.mobile.preference.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/reports/user.week.report.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/available.customers.view.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/available.endorsements.view.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/availables.owners.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/cash.register.curdate.by.user.view.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/current.customer.by.loan.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/exchange.enebled.users.view.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.approved.detail.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.by.user.order.preference.view.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.by.user.view.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.in.pending.status.to.delivery.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.to.delivery.by.ciertifier.view.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/person.search.detail.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/person.search.historical.details.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/person.search.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/total.cash.by.curdate.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/payroll/payroll.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/payroll/total.expected.payment.daily.by.user.queries.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/administration.person.serch.view.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/advance.user.daily.detail.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/advance.user.daily.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/customer.without.renovation.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/enabled.user.details.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/general.box.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/information.loan.last.week.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/information.loan.week.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.by.user.payment.zero.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.employee.detail.all.data.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.employee.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.renovation.devilery.weekly.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/money.daily.by.user.certifier.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/payment.detail.from.user.by.curdate.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.new.customer.last.week.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.new.customer.week.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.total.last.week.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.total.week.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.advances.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.closing.day.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.deposits.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.employee.saving.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.fees.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.gasoline.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.opening.fees.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payment.renovation.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payment.route.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payment.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payroll.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.vehicle.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.zero.payments.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.closing.daily.detail.from.user.by.curdate.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.closing.day.by.curdate.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.loans.approved.by.office.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.loans.by.office.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/transfer.in.pending.status.view.hbm.xml create mode 100644 ace-model/src/main/resources/com/arrebol/apc/model/queries/view/user.by.route.view.hbm.xml create mode 100644 ace-security/nb-configuration.xml create mode 100644 ace-security/pom.xml create mode 100644 ace-security/src/main/java/com/arrebol/apc/security/APCSecure.java create mode 100644 ace-security/src/main/resources/log4j2.xml create mode 100644 ace-security/src/test/java/com/arrebol/apc/security/APCSecureTest.java create mode 100644 ace-web/faces-config.NavData create mode 100644 ace-web/faces-config_old.NavData create mode 100644 ace-web/nb-configuration.xml create mode 100644 ace-web/pom.xml create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/Datatable.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/GenericBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/SendMSN.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/AdvanceBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/BonusBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ChangeOwnerBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayBean.java.bak create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayDetailBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/CustomerBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/CustomerDetailBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/EmployeeListBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/EndorsementBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/EndorsementDetailBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ExpenseCompanyInBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ExpenseCompanyOutBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/FeesBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/GenericPersonSearchBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/GoalBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanDetailTransferBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanEmployeeListBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanHistoryBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanHistoryDetailBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanHistoryJuridicalBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanPendingBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanPendingDetailBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanRenovationDeliveryWeeklyBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/MoneyDailyBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/OtherExpenseBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/PayRollBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/PeopleBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StableGeneralBoxBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StableSmallBoxBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsAdvancesBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsClosingDayBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsDepositsBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsEmployeeSavingBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsGasolineBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsOpeningFeesBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPaymentBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPaymentRenovationBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPaymentRouteBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPayrollBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsSummaryBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsVehicleBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsZeroPaymentsBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/TransferBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/TransferUpgradeBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/VehicleBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/admin/people/PersonCustomerBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/catalog/LoanTypeBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/catalog/RoleBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/catalog/RouteBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/CustomerWithoutLoanDetailBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/DashboardBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/LoanDetailBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/LoanDetailEndorsementBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/login/LoginBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/system/bitacora/BitacoraBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/system/employee/EmployeeBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/system/office/OfficeBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserAccessBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserAdminBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserCreateBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserUpdateBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/topbar/PrivacyBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/beans/topbar/TopBarBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/converters/GenericConverter.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/converters/PeopleConverter.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/converters/PerseonSearchConverter.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/converters/UserByOfficeConverter.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/drive/DriverBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/drive/DriverDateBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/drive/DriverLastBean.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/validators/GenericValidator.java create mode 100644 ace-web/src/main/java/com/arrebol/apc/web/validators/SelectOneMenuValidator.java create mode 100644 ace-web/src/main/resources/com/arrebol/apc/i18n/app.properties create mode 100644 ace-web/src/main/resources/com/arrebol/apc/i18n/app.properties.bak create mode 100644 ace-web/src/main/resources/com/arrebol/apc/i18n/app_background.properties create mode 100644 ace-web/src/main/resources/com/arrebol/apc/i18n/app_permission.properties create mode 100644 ace-web/src/main/resources/log4j2.xml create mode 100644 ace-web/src/main/webapp/META-INF/context.xml create mode 100644 ace-web/src/main/webapp/WEB-INF/error-pages/access.xhtml create mode 100644 ace-web/src/main/webapp/WEB-INF/error-pages/error.xhtml create mode 100644 ace-web/src/main/webapp/WEB-INF/error-pages/notfound.xhtml create mode 100644 ace-web/src/main/webapp/WEB-INF/faces-config.xml create mode 100644 ace-web/src/main/webapp/WEB-INF/footer.xhtml create mode 100644 ace-web/src/main/webapp/WEB-INF/primefaces-serenity.taglib.xml create mode 100644 ace-web/src/main/webapp/WEB-INF/sidebar.xhtml create mode 100644 ace-web/src/main/webapp/WEB-INF/template.xhtml create mode 100644 ace-web/src/main/webapp/WEB-INF/topbar.xhtml create mode 100644 ace-web/src/main/webapp/WEB-INF/web.xml create mode 100644 ace-web/src/main/webapp/app/admin/closingDay/detail.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/closingDay/history.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/closingDay/index.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/customer/add.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/customer/detail.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/customer/index.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/customer/index_old.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/endorsement/detail.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/endorsement/index.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/loan/changeOwner.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/loan/detail.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/loan/drive.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/loan/driveDate.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/loan/driveLast.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/loan/history.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/loan/historyDetail.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/loan/historyJuridical.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/loan/index.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/loan/loanDetailTransfer.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/loan/loanRenovationWeekly.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/moneyDaily/index.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/otherExpense/index.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/stableSmallBox/history.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/stableSmallBox/index.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/transfer/index.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/transfer/index_backup.xhtml create mode 100644 ace-web/src/main/webapp/app/admin/vehicles/main.xhtml create mode 100644 ace-web/src/main/webapp/app/catalog/loanType/add.xhtml create mode 100644 ace-web/src/main/webapp/app/catalog/loanType/index.xhtml create mode 100644 ace-web/src/main/webapp/app/catalog/role/index.xhtml create mode 100644 ace-web/src/main/webapp/app/catalog/route/index.xhtml create mode 100644 ace-web/src/main/webapp/app/generalBox/expenseCompanyIn/index.xhtml create mode 100644 ace-web/src/main/webapp/app/generalBox/expenseCompanyOut/index.xhtml create mode 100644 ace-web/src/main/webapp/app/generalBox/stableGeneralBox/history.xhtml create mode 100644 ace-web/src/main/webapp/app/generalBox/stableGeneralBox/index.xhtml create mode 100644 ace-web/src/main/webapp/app/payroll/advance/index.xhtml create mode 100644 ace-web/src/main/webapp/app/payroll/bonus/index.xhtml create mode 100644 ace-web/src/main/webapp/app/payroll/createPayroll/index.xhtml create mode 100644 ace-web/src/main/webapp/app/payroll/goal/index.xhtml create mode 100644 ace-web/src/main/webapp/app/payroll/history.xhtml create mode 100644 ace-web/src/main/webapp/app/payroll/loanEmployee/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/advances/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/closingDay/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/deposits/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/employeeSaving/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/fees/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/feesByRoute/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/gasoline/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/openingFee/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/payment/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/paymentRenovation/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/paymentRoute/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/payroll/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/summary/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/vehicles/index.xhtml create mode 100644 ace-web/src/main/webapp/app/stats/zeroPayments/index.xhtml create mode 100644 ace-web/src/main/webapp/app/system/bitacora/index.xhtml create mode 100644 ace-web/src/main/webapp/app/system/employee/employeeList.xhtml create mode 100644 ace-web/src/main/webapp/app/system/employee/main.xhtml create mode 100644 ace-web/src/main/webapp/app/system/log/main.xhtml create mode 100644 ace-web/src/main/webapp/app/system/office/index.xhtml create mode 100644 ace-web/src/main/webapp/app/system/user/access/main.xhtml create mode 100644 ace-web/src/main/webapp/app/system/user/add/main.xhtml create mode 100644 ace-web/src/main/webapp/app/system/user/setting/main.xhtml create mode 100644 ace-web/src/main/webapp/app/system/user/setting/main_1.xhtml create mode 100644 ace-web/src/main/webapp/app/topbar/privacy.xhtml create mode 100644 ace-web/src/main/webapp/customerWithoutLoanDetail.xhtml create mode 100644 ace-web/src/main/webapp/dashboard.xhtml create mode 100644 ace-web/src/main/webapp/loanDetail.xhtml create mode 100644 ace-web/src/main/webapp/loanDetailEndorsement.xhtml create mode 100644 ace-web/src/main/webapp/login.xhtml create mode 100644 ace-web/src/main/webapp/resources/js/scriptGeneric/bitacora.js create mode 100644 ace-web/src/main/webapp/resources/js/scriptGeneric/dialogGeneric.js create mode 100644 ace-web/src/main/webapp/resources/primefaces-serenity-green/theme.css create mode 100644 ace-web/src/main/webapp/resources/primefaces-serenity-green/theme.scss create mode 100644 ace-web/src/main/webapp/resources/sass/_fonts.scss create mode 100644 ace-web/src/main/webapp/resources/sass/_layout_styles.scss create mode 100644 ace-web/src/main/webapp/resources/sass/_mixins.scss create mode 100644 ace-web/src/main/webapp/resources/sass/_theme_styles.scss create mode 100644 ace-web/src/main/webapp/resources/sass/layout/_dashboard.scss create mode 100644 ace-web/src/main/webapp/resources/sass/layout/_exception.scss create mode 100644 ace-web/src/main/webapp/resources/sass/layout/_horizontal.scss create mode 100644 ace-web/src/main/webapp/resources/sass/layout/_landing.scss create mode 100644 ace-web/src/main/webapp/resources/sass/layout/_layout.scss create mode 100644 ace-web/src/main/webapp/resources/sass/layout/_login.scss create mode 100644 ace-web/src/main/webapp/resources/sass/layout/_main.scss create mode 100644 ace-web/src/main/webapp/resources/sass/layout/_utils.scss create mode 100644 ace-web/src/main/webapp/resources/sass/theme/_common.scss create mode 100644 ace-web/src/main/webapp/resources/sass/theme/_data.scss create mode 100644 ace-web/src/main/webapp/resources/sass/theme/_forms.scss create mode 100644 ace-web/src/main/webapp/resources/sass/theme/_icons.scss create mode 100644 ace-web/src/main/webapp/resources/sass/theme/_media.scss create mode 100644 ace-web/src/main/webapp/resources/sass/theme/_menus.scss create mode 100644 ace-web/src/main/webapp/resources/sass/theme/_messages.scss create mode 100644 ace-web/src/main/webapp/resources/sass/theme/_misc.scss create mode 100644 ace-web/src/main/webapp/resources/sass/theme/_overlays.scss create mode 100644 ace-web/src/main/webapp/resources/sass/theme/_panels.scss create mode 100644 ace-web/src/main/webapp/resources/sass/theme/_theme.scss create mode 100644 ace-web/src/main/webapp/resources/sass/variables/_common.scss create mode 100644 ace-web/src/main/webapp/resources/sass/variables/_layout.scss create mode 100644 ace-web/src/main/webapp/resources/sass/variables/_theme.scss create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/css/grid.css create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/css/layout-green.css create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/css/layout-green.scss create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/css/nanoscroller.css create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/css/ripple.css create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/MaterialIcons-Regular.eot create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/MaterialIcons-Regular.ttf create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/MaterialIcons-Regular.woff create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/MaterialIcons-Regular.woff2 create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-300.eot create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-300.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-300.ttf create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-300.woff create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-300.woff2 create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-700.eot create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-700.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-700.ttf create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-700.woff create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-700.woff2 create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-regular.eot create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-regular.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-regular.ttf create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-regular.woff create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-regular.woff2 create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/ace_logo.jpg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/apc_card.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/arrebol.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/avatar.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/avatar1.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/avatar2.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/avatar3.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/avatar4.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/bridge.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/flag-belgium.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/flag-brazil.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/flag-china.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/flag-france.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/flag-uk.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/gradient-waters.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/map.jpg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/sidebar-image.jpg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/usercard.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/weather-icon-1.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/weather-icon-2.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/weather-icon-3.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/dashboard/weather-icon-4.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/excel-xls-icon.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/401.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/404.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/500(1).svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/500.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/access-bg.jpg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/error-bg(1).jpg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/error-bg.jpg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/icon-apple-green.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/icon-apple-purple.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/icon-donut-red.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/icon-donut-yellow.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/icon-shop-purple.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/icon-shop-yellow.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/icon-taxi-yellow.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/exception/notfound-bg.jpg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/landing/icon-cleancode.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/landing/icon-coffee.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/landing/icon-facebook.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/landing/icon-hours.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/landing/icon-linkedin.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/landing/icon-moderndesign.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/landing/icon-responsive.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/landing/icon-twitter.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/landing/icon-ui.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/landing/icon-welldocumented.svg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/landing/landing-header.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/landing/map-contact.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/login/login-bg.jpg create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/logo-colored.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/logo-slim.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/mapa.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/images/rightmenu-icon.png create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/js/calendar_es.js create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/js/layout.js create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/js/nanoscroller.js create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/js/ripple.js create mode 100644 ace-web/src/main/webapp/resources/serenity-layout/js/swipe.js create mode 100644 ace-ws-rest/hs_err_pid15652.log create mode 100644 ace-ws-rest/nb-configuration.xml create mode 100644 ace-ws-rest/pom.xml create mode 100644 ace-ws-rest/replay_pid15652.log create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/administration/ClosingDayWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/administration/SmallBoxWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/cash/CashRegisterWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/cfg/ApplicationCfg.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/cfg/JsonMoxyConfigurationContextResolver.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/customer/CustomerWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/employee/EmployeeWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/exchange/ExchangeWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/gasoline/GasolineWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/loan/LoanWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/login/LoginWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/otherexpense/OtherExpenseWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/person/PersonWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/preferences/SystemPreferenceWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/reports/ReportsWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/route/RouteWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/search/SearchWS.java create mode 100644 ace-ws-rest/src/main/java/com/arrebol/apc/ws/user/UserWS.java create mode 100644 ace-ws-rest/src/main/resources/log4j2.xml create mode 100644 ace-ws-rest/src/main/webapp/META-INF/context.xml create mode 100644 ace-ws-rest/src/main/webapp/WEB-INF/beans.xml create mode 100644 ace-ws-rest/src/main/webapp/index.html create mode 100644 ace-ws-rest/src/test/java/com/arrebol/apc/ws/cash/CashRegisterWSTest.java create mode 100644 ace-ws-rest/src/test/java/com/arrebol/apc/ws/customer/CustomerWSTest.java create mode 100644 ace-ws-rest/src/test/java/com/arrebol/apc/ws/customer/employee/EmployeeWSTest.java create mode 100644 ace-ws-rest/src/test/java/com/arrebol/apc/ws/exchange/ExchangeWSTest.java create mode 100644 ace-ws-rest/src/test/java/com/arrebol/apc/ws/loan/LoanWSTest.java create mode 100644 ace-ws-rest/src/test/java/com/arrebol/apc/ws/loan/LoanWithImageWSTest.java create mode 100644 ace-ws-rest/src/test/java/com/arrebol/apc/ws/login/LoginWSTest.java create mode 100644 ace-ws-rest/src/test/java/com/arrebol/apc/ws/preferences/SystemPreferenceWSTest.java create mode 100644 ace-ws-rest/src/test/java/com/arrebol/apc/ws/user/UserWSTest.java create mode 100644 ace-ws-rest/src/test/resources/apc.cfg.xml create mode 100644 ace-ws-rest/src/test/resources/log4j2.xml create mode 100644 ace/nb-configuration.xml create mode 100644 ace/pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dd82ebf --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/ace-controller/target/ +/ace-layout/target/ +/ace-web/target/ +/ace-security/target/ +/ace-controller-mobile/target/ +/ace-model/target/ +/ace-ws-rest/target/ diff --git a/ace-controller-mobile/nb-configuration.xml b/ace-controller-mobile/nb-configuration.xml new file mode 100644 index 0000000..a65c451 --- /dev/null +++ b/ace-controller-mobile/nb-configuration.xml @@ -0,0 +1,18 @@ + + + + + + JDK_1.8 + + diff --git a/ace-controller-mobile/pom.xml b/ace-controller-mobile/pom.xml new file mode 100644 index 0000000..bda5bee --- /dev/null +++ b/ace-controller-mobile/pom.xml @@ -0,0 +1,81 @@ + + + 4.0.0 + com.arrebol + ace-controller-mobile + 1.0.0 + jar + + UTF-8 + 1.8 + 1.8 + 2.17.0 + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12.4 + + true + + + + + + + + mysql + mysql-connector-java + 8.0.12 + + + + org.apache.logging.log4j + log4j-api + ${log4j.version} + + + org.apache.logging.log4j + log4j-core + ${log4j.version} + + + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} + + + + com.arrebol + ace-model + 1.0.0 + + + + junit + junit + 4.12 + test + + + ace-controller-mobile + \ No newline at end of file diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/admin/ClosingDayController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/admin/ClosingDayController.java new file mode 100644 index 0000000..a983418 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/admin/ClosingDayController.java @@ -0,0 +1,91 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.admin; + +import com.arrebol.apc.controller.mobile.repository.admin.ClosingDayRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.ClosingDayCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class ClosingDayController implements Serializable { + + /** + * + * @param idEmployee + * @param idOffice + * @return + * @throws Exception + */ + public String findIdClosingDayByEmployee(String idEmployee, String idOffice) throws Exception { + try { + ClosingDayRepository repository = new ClosingDayRepository(); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_USER, new User(idEmployee))); + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_OFFICE, new Office(idOffice))); + + return repository.findIdEntity(ClosingDayCfg.QUERY_FIND_ID_BY_EMPLOYEE_AND_OFFICE_EQUALS_CURRDATE, parameters); + } catch (Exception e) { + logger.error("findIdClosingDayByEmployee", e); + throw e; + } + } + + /** + * + * @param id + * @param updatedBy + * @return + * @throws Exception + */ + public boolean disableClosingDayById(String id, String updatedBy) throws Exception { + try { + ClosingDayRepository repository = new ClosingDayRepository(); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_ID, id)); + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_ACTIVE_STATUS, ActiveStatus.DISABLED)); + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_LAST_UPDATED_BY, updatedBy)); + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_LAST_UPDATED_ON, new Date())); + + return repository.updateClosingDay(ClosingDayCfg.QUERY_UPDATE_CLOSING_DAY_BY_STATUS, parameters); + } catch (Exception e) { + logger.error("disableClosingDayById", e); + throw e; + } + } + + public Long countIdClosingDayByEmployee(String idEmployee, String idOffice) throws Exception { + try { + ClosingDayRepository repository = new ClosingDayRepository(); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_USER, new User(idEmployee))); + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_OFFICE, new Office(idOffice))); + + return repository.countIdClosingDayByEmployee(ClosingDayCfg.QUERY_FIND_ID_BY_EMPLOYEE_AND_OFFICE_EQUALS_CURRDATE, parameters); + } catch (Exception e) { + logger.error("findIdClosingDayByEmployee", e); + throw e; + } + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/admin/StableGeneralBoxController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/admin/StableGeneralBoxController.java new file mode 100644 index 0000000..fa17a49 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/admin/StableGeneralBoxController.java @@ -0,0 +1,46 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.admin; + +import com.arrebol.apc.controller.mobile.repository.admin.StableGeneralBoxRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.StableGeneralBoxCfg; +import com.arrebol.apc.model.core.Office; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class StableGeneralBoxController implements Serializable { + + /** + * + * @param idOffice + * @return + * @throws Exception + */ + public boolean existStableGeneralBoxByCreatedOn(String idOffice) throws Exception { + try { + StableGeneralBoxRepository repository = new StableGeneralBoxRepository(); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(StableGeneralBoxCfg.FIELD_OFFICE, new Office(idOffice))); + + return new Long(1).compareTo(repository.countStableGeneralBoxByOfficeEqualsToCurrentDate(StableGeneralBoxCfg.QUERY_COUNT_STABLE_GENERAL_BOX_BY_OFFICE_EQUALS_TO_CURRENT_DATE, parameters)) == 0; + } catch (Exception e) { + logger.error("existStableSmallBoxByCreatedOn", e); + throw e; + } + } + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/admin/StableSmallBoxController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/admin/StableSmallBoxController.java new file mode 100644 index 0000000..be3c449 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/admin/StableSmallBoxController.java @@ -0,0 +1,95 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.admin; + +import com.arrebol.apc.controller.mobile.repository.admin.ClosingDayRepository; +import com.arrebol.apc.controller.mobile.repository.admin.StableSmallBoxRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.StableSmallBoxCfg; +import com.arrebol.apc.model.admin.constance.StableSmallBoxCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class StableSmallBoxController implements Serializable { + + /** + * + * @param id + * @param updatedBy + * @return + * @throws Exception + */ + public boolean disableIdSmallBoxById(String id, String updatedBy) throws Exception { + try { + ClosingDayRepository repository = new ClosingDayRepository(); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_ID, id)); + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_ACTIVE_STATUS, ActiveStatus.DISABLED)); + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_LAST_UPDATED_BY, updatedBy)); + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_LAST_UPDATED_ON, new Date())); + + return repository.updateClosingDay(StableSmallBoxCfg.QUERY_UPDATE_STABLE_SMALL_BOX_BY_STATUS, parameters); + } catch (Exception e) { + logger.error("disableIdSmallBoxById", e); + throw e; + } + } + + /** + * + * @param idOffice + * @return + * @throws Exception + */ + public boolean existStableSmallBoxByCreatedOn(String idOffice) throws Exception { + try { + StableSmallBoxRepository repository = new StableSmallBoxRepository(); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_OFFICE, new Office(idOffice))); + + return new Long(1).compareTo(repository.countStableSmallBoxByOfficeEqualsToCurrentDate(StableSmallBoxCfg.QUERY_COUNT_STABLE_SMALL_BOX_BY_OFFICE_EQUALS_TO_CURDATE, parameters)) == 0; + } catch (Exception e) { + logger.error("existStableSmallBoxByCreatedOn", e); + throw e; + } + } + + /** + * + * @param idOffice + * @return + * @throws Exception + */ + public String findIdStableSmallBoxByOfficeInCurrentDate(String idOffice) throws Exception { + try { + ClosingDayRepository repository = new ClosingDayRepository(); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_OFFICE, new Office(idOffice))); + + return repository.findIdEntity(StableSmallBoxCfg.QUERY_FIND_STABLE_SMALL_BOX_BY_OFFICE_EQUALS_TO_CURRENT_DATE, parameters); + } catch (Exception e) { + logger.error("findIdStableSmallBoxByOfficeInCurrentDate", e); + throw e; + } + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/bitacora/BitacoraController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/bitacora/BitacoraController.java new file mode 100644 index 0000000..d1c0334 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/bitacora/BitacoraController.java @@ -0,0 +1,59 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.bitacora; + +import com.arrebol.apc.controller.mobile.repository.bitacora.BitacoraRepository; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.system.logs.Bitacora; +import java.io.Serializable; +import java.util.Date; +import java.util.UUID; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class BitacoraController implements Serializable { + + /** + * + * @param action + * @param userName + * @param comments + * @param createdBy + * @param office + * @param description + * @return + */ + public boolean insertBitacoraRecord(String action, String userName, String comments, String createdBy, String office, String description) { + boolean success; + try { + BitacoraRepository repository = new BitacoraRepository(); + Bitacora bitacora = new Bitacora(); + + bitacora.setId(UUID.randomUUID().toString()); + bitacora.setNameUser(userName); + bitacora.setAction(action); + bitacora.setCommentsUser(comments); + bitacora.setCreatedBy(createdBy); + bitacora.setCreatedOn(new Date()); + bitacora.setOffice(new Office(office)); + bitacora.setDescription(description); + + success = repository.saveBitacora(bitacora); + } catch (Exception e) { + success = false; + logger.error("insertBitacoraRecord", e); + } + return success; + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/cash/CashRegisterCurdateByUserController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/cash/CashRegisterCurdateByUserController.java new file mode 100644 index 0000000..4747225 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/cash/CashRegisterCurdateByUserController.java @@ -0,0 +1,107 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.cash; + +import com.arrebol.apc.controller.mobile.repository.views.CashRegisterCurdateByUserViewRepository; +import com.arrebol.apc.controller.mobile.repository.views.TotalCashByCurdateViewRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.constance.CashRegisterCurdateByUserViewCfg; +import com.arrebol.apc.model.views.CashRegisterCurdateByUserView; +import com.arrebol.apc.model.views.TotalCashByCurdateView; +import com.arrebol.apc.model.ws.parsed.AmountJaxb; +import com.arrebol.apc.model.ws.parsed.CashRegisterJaxb; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class CashRegisterCurdateByUserController implements Serializable { + + /** + * + * @param userId + * @return + * @throws Exception + */ + public CashRegisterJaxb findAllCashRegisterCurdateByUserId(String userId) throws Exception { + logger.debug("findAllCashRegisterCurdateByUserId"); + try { + List parameters = new ArrayList<>(); + + parameters.add( + new ModelParameter( + CashRegisterCurdateByUserViewCfg.FIELD_USER_ID, + userId + ) + ); + + Double totalCash = 0d; + List amounts = new ArrayList<>(); + + List results = cashRegisterCurdateByUserViewRepository.findAllCashRegisterCurdateByUserId( + CashRegisterCurdateByUserView.class, + CashRegisterCurdateByUserViewCfg.QUERY_FIND_CASH_REGISTER, + parameters); + + for (CashRegisterCurdateByUserView result : results) { + totalCash += result.getPayment().doubleValue(); + + amounts.add( + new AmountJaxb( + result.getCustomerName(), + result.getPayment().doubleValue() + ) + ); + } + + return new CashRegisterJaxb(totalCash, amounts); + } catch (Exception e) { + logger.error("findAllCashRegisterCurdateByUserId", e); + throw e; + } + } + + /** + * + * @param userId + * @return + * @throws Exception + */ + public TotalCashByCurdateView findDailyTotalsByUserId(String userId) throws Exception { + logger.debug("findById"); + try { + TotalCashByCurdateView result = totalCashByCurdateViewRepository.findById(userId); + + if (null == result) { + throw new NullPointerException("userId: " + userId + " NOT found"); + } else { + return result; + } + } catch (Exception e) { + logger.error("findById", e); + throw e; + } + } + + private static final long serialVersionUID = -3434981661467291172L; + final Logger logger = LogManager.getLogger(CashRegisterCurdateByUserController.class); + + private final CashRegisterCurdateByUserViewRepository cashRegisterCurdateByUserViewRepository; + private final TotalCashByCurdateViewRepository totalCashByCurdateViewRepository; + + public CashRegisterCurdateByUserController() { + this.cashRegisterCurdateByUserViewRepository = new CashRegisterCurdateByUserViewRepository(); + this.totalCashByCurdateViewRepository = new TotalCashByCurdateViewRepository(); + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/customer/CustomerController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/customer/CustomerController.java new file mode 100644 index 0000000..74734ae --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/customer/CustomerController.java @@ -0,0 +1,63 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.customer; + +import com.arrebol.apc.controller.mobile.repository.views.LoanByUserViewRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.constance.LoanByUserViewCfg; +import com.arrebol.apc.model.enums.PreferenceValue; +import com.arrebol.apc.model.views.LoanByUserView; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class CustomerController implements Serializable { + + /** + * + * @param orderList + * @param userId + * @return + * @throws Exception + */ + public List findAllLoansByUserId(String orderList, String userId) throws Exception { + try { + List parameters = new ArrayList<>(); + + boolean isByOrderInList = PreferenceValue.ORDER_IN_LIST.toString().equals(orderList); + + parameters.add(new ModelParameter(LoanByUserViewCfg.FIELD_USER_ID, userId)); + + return loanByUserViewRepository + .findAllLoansByUserId( + isByOrderInList + ? LoanByUserViewCfg.QUERY_FIND_ALL_LOAN_BY_USER_ID_BY_ORDER_LIST + : LoanByUserViewCfg.QUERY_FIND_ALL_LOAN_BY_USER_ID_BY_CUSTOMER_NAME, + parameters + ); + } catch (Exception e) { + logger.error("findAllLoansByUserId", e); + throw e; + } + } + + private static final long serialVersionUID = -6689182942800786108L; + final Logger logger = LogManager.getLogger(CustomerController.class); + + private final LoanByUserViewRepository loanByUserViewRepository; + + public CustomerController() { + this.loanByUserViewRepository = new LoanByUserViewRepository(); + } +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/exchange/ExchangeEnebledUsersController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/exchange/ExchangeEnebledUsersController.java new file mode 100644 index 0000000..abdf1aa --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/exchange/ExchangeEnebledUsersController.java @@ -0,0 +1,165 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.exchange; + +import com.arrebol.apc.controller.mobile.repository.admin.TransferRepository; +import com.arrebol.apc.controller.mobile.repository.views.ExchangeEnebledUsersViewRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.Transfer; +import com.arrebol.apc.model.admin.constance.TransferCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.ExchangeEnebledUsersViewCfg; +import com.arrebol.apc.model.enums.ActionStatus; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.views.ExchangeEnebledUsersView; +import com.arrebol.apc.model.ws.parsed.Exchange; +import com.arrebol.apc.model.ws.parsed.ExchangeJaxb; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class ExchangeEnebledUsersController implements Serializable { + + /** + * + * @param userId + * @param officeId + * @return + * @throws Exception + */ + public List findEnebledUsersToUserId(String userId, String officeId) throws Exception { + logger.debug("exchangeEnebledUsersViewRepository"); + try { + List parameters = new ArrayList<>(); + + parameters.add( + new ModelParameter( + ExchangeEnebledUsersViewCfg.PARAM_OFFICE_ID, + officeId + ) + ); + + parameters.add( + new ModelParameter( + ExchangeEnebledUsersViewCfg.FIELD_VIEW_ID, + userId + ) + ); + + return exchangeEnebledUsersViewRepository.findEnebledUsersToUserId( + ExchangeEnebledUsersViewCfg.QUERY_FIND_ENEBLED_USERS_TO_USER_ID, + parameters + ); + } catch (Exception e) { + logger.error("findEnebledUsersToUserId", e); + throw e; + } + } + + /** + * + * @param jaxb + * @return + * @throws Exception + */ + public boolean newExchange(ExchangeJaxb jaxb) throws Exception { + logger.debug("newExchange"); + try { + Transfer transfer = new Transfer( + new User(jaxb.getSenderId()), + new User(jaxb.getReceiverId()), + ActiveStatus.ENEBLED, + ActionStatus.PENDING, + jaxb.getAmount(), + new Office(jaxb.getOfficeId()), + jaxb.getSenderId()); + + return transferRepository.addTransfer(transfer); + } catch (Exception e) { + logger.error("newExchange", e); + throw e; + } + } + + /** + * + * @param transerId + * @param userId + * @param isApproved + * @return + * @throws Exception + */ + public boolean updateExchange(String transerId, String userId, boolean isApproved) throws Exception { + logger.debug("updateExchange"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(TransferCfg.FIELD_ACTION_STATUS, isApproved ? ActionStatus.APPROVED : ActionStatus.REJECTED)); + parameters.add(new ModelParameter(TransferCfg.FIELD_LAST_UPDATED_BY, userId)); + parameters.add(new ModelParameter(TransferCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(TransferCfg.FIELD_ID, transerId)); + + return transferRepository.updateTransfer(TransferCfg.QUERY_UPDATE_TRANSFER_BY_ACTION, parameters); + } catch (Exception e) { + logger.error("updateExchange", e); + throw e; + } + } + + /** + * + * @param userId + * @return + * @throws Exception + */ + public List exchangesByUsers(String userId) throws Exception { + logger.debug("exchangesByUsers"); + try { + List parameters = new ArrayList<>(); + + parameters.add( + new ModelParameter( + TransferCfg.FIELD_USER_TRANSMITTER, + new User(userId) + ) + ); + + parameters.add( + new ModelParameter( + TransferCfg.FIELD_USER_RECEIVER, + new User(userId) + ) + ); + + return transferRepository.findAllTransferByUserIdAndCurdate(TransferCfg.QUERY_FIND_ALL_TRANSFER_BY_USER_ID_AND_CURDATE, parameters); + } catch (Exception e) { + logger.error("exchangesByUsers", e); + throw e; + } + } + + private static final long serialVersionUID = 2625775904919860613L; + final Logger logger = LogManager.getLogger(ExchangeEnebledUsersController.class); + + private final ExchangeEnebledUsersViewRepository exchangeEnebledUsersViewRepository; + private final TransferRepository transferRepository; + + public ExchangeEnebledUsersController() { + this.exchangeEnebledUsersViewRepository = new ExchangeEnebledUsersViewRepository(); + this.transferRepository = new TransferRepository(); + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/gasoline/GasolineController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/gasoline/GasolineController.java new file mode 100644 index 0000000..282ac51 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/gasoline/GasolineController.java @@ -0,0 +1,41 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.gasoline; + +import com.arrebol.apc.controller.mobile.repository.gasoline.GasolineRepository; +import com.arrebol.apc.model.gasoline.Gasoline; +import java.io.Serializable; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class GasolineController implements Serializable { + + /** + * + * @param gasoline + * @return + * @throws Exception + */ + public boolean saveNewGasolinePayment(Gasoline gasoline) throws Exception { + try { + GasolineRepository gasolineRepository = new GasolineRepository(); + + return gasolineRepository.saveNewGasolinePayment(gasoline); + } catch (Exception e) { + logger.error("addNewGasolineEntry", e); + throw e; + } + } + + private static final long serialVersionUID = -5280895557294295000L; + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/loan/LoanController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/loan/LoanController.java new file mode 100644 index 0000000..3f874bc --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/loan/LoanController.java @@ -0,0 +1,1398 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.loan; + +import com.arrebol.apc.controller.mobile.json.loan.AuthorizeTransferList; +import com.arrebol.apc.controller.mobile.json.loan.AuthorizeTransferPaymentsDto; +import com.arrebol.apc.controller.mobile.json.loan.DeleteLoanDetailsJaxb; +import com.arrebol.apc.model.ws.parsed.LoanRequestedJaxb; +import com.arrebol.apc.controller.mobile.json.loan.LoanTypeJaxb; +import com.arrebol.apc.controller.mobile.json.loan.LoanTypeListJaxb; +import com.arrebol.apc.controller.mobile.json.loan.UpdateLoanToDeliveryStatusDTO; +import com.arrebol.apc.controller.mobile.json.loan.UpdateLoanToDeliveryStatusList; +import com.arrebol.apc.controller.mobile.repository.loan.AddAmountRepository; +import com.arrebol.apc.controller.mobile.repository.loan.LoanByRenovationRepository; +import com.arrebol.apc.controller.mobile.repository.loan.LoanDetailsRepository; +import com.arrebol.apc.controller.mobile.repository.loan.LoanFeeNotificationRepository; +import com.arrebol.apc.controller.mobile.repository.loan.LoanRepository; +import com.arrebol.apc.controller.mobile.repository.loan.LoanToDeliveryByCertifierRepository; +import com.arrebol.apc.controller.mobile.repository.loan.LoanTypeRepository; +import com.arrebol.apc.controller.mobile.repository.user.UserRepository; +import com.arrebol.apc.controller.mobile.repository.views.LoanApprovedDetailViewRepository; +import com.arrebol.apc.controller.mobile.repository.views.LoanInPendingStatusToDeliveryViewRepository; +import com.arrebol.apc.controller.mobile.repository.views.SearchPersonAvailableRepository; +import com.arrebol.apc.controller.mobile.repository.views.TransferInPendingStatusViewRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.AvailableCustomersViewCfg; +import com.arrebol.apc.model.core.constance.AvailableEndorsementsViewCfg; +import com.arrebol.apc.model.core.constance.LoanByUserCfg; +import com.arrebol.apc.model.core.constance.LoanCfg; +import com.arrebol.apc.model.core.constance.LoanDetailsCfg; +import com.arrebol.apc.model.core.constance.LoanFeeNotificationCfg; +import com.arrebol.apc.model.core.constance.LoanToDeliveryByCertifierViewCfg; +import com.arrebol.apc.model.core.constance.LoanTypeCfg; +import com.arrebol.apc.model.core.constance.UserCfg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.ComissionType; +import com.arrebol.apc.model.enums.LoanDetailsType; +import com.arrebol.apc.model.enums.LoanStatus; +import com.arrebol.apc.model.enums.OwnerLoan; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.model.enums.TransferStatus; +import com.arrebol.apc.model.loan.Delivery; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanByRenovation; +import com.arrebol.apc.model.loan.LoanByUser; +import com.arrebol.apc.model.loan.LoanByUserId; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.model.loan.LoanFeeNotification; +import com.arrebol.apc.model.loan.LoanType; +import com.arrebol.apc.model.views.AvailableCustomersView; +import com.arrebol.apc.model.views.AvailableEndorsementsView; +import com.arrebol.apc.model.views.LoanInPendingStatusToDeliveryView; +import com.arrebol.apc.model.views.LoanToDeliveryByCertifierView; +import com.arrebol.apc.model.views.TransferInPendingStatusView; +import com.arrebol.apc.model.views.constance.LoanInPendingStatusToDeliveryViewCfg; +import com.arrebol.apc.model.views.constance.TransferInPendingStatusViewCfg; +import com.arrebol.apc.model.ws.parsed.FeesToPayByLoanRequestJaxb; +import com.arrebol.apc.model.ws.parsed.LoanDetailJaxb; +import com.arrebol.apc.model.ws.parsed.NewAmountJaxb; +import com.arrebol.apc.model.ws.parsed.NewTransferAccountJaxb; +import com.arrebol.apc.model.ws.parsed.PersonJaxb; +import java.io.Serializable; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.text.NumberFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Locale; +import java.util.UUID; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanController implements Serializable { + + /** + * + * @param loanIdToUpdate + * @return + */ + public boolean deleteLoanDetailsFeeByLoanCurdate(String loanIdToUpdate) { + logger.debug("deleteLoanDetailsFeeByLoanCurdate"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_DETAILS_LOAN, new Loan(loanIdToUpdate))); + return loanRepository.deleteLoanDetailsByLoanCurdate(LoanCfg.QUERY_DELETE_LOAN_DETAILS_FEE_CURDATE_BY_LOAN, parameters); + } + + /** + * + * @param loanIdToUpdate + * @return + */ + public boolean deleteLoanFeeNotificationByLoanCurdate(String loanIdToUpdate) { + logger.debug("deleteLoanFeeNotificationByLoanCurdate"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_DETAILS_LOAN, new Loan(loanIdToUpdate))); + + return loanRepository.deleteLoanDetailsByLoanCurdate(LoanCfg.QUERY_DELETE_LOAN_FEE_NOTIFICATION_CURDATE_BY_LOAN, parameters); + } + + /** + * + * @param loan + * @return + * @throws Exception + */ + public boolean updateLoan(Loan loan) throws Exception { + logger.debug("updateLoan"); + try { + return loanRepository.updateLoan(loan); + } catch (Exception e) { + logger.error("updateLoan", e); + throw e; + } + } + + /** + * + * @param loanIdToUpdate + * @return + */ + public boolean deleteLoanDetailsByLoanCurdate(Loan loanIdToUpdate) { + logger.debug("updateLoandByUserByUserId"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_DETAILS_LOAN, loanIdToUpdate)); + + return loanRepository.deleteLoanDetailsByLoanCurdate(LoanCfg.QUERY_DELETE_LOAN_DETAILS_CURDATE_BY_LOAN, parameters); + } + + /** + * + * @param customerId + * @param userId + * @return + * @throws Exception + */ + public DeleteLoanDetailsJaxb enebleToDeleteTodayDetails(String customerId, String userId) throws Exception { + DeleteLoanDetailsJaxb result; + try { + List parameters = new ArrayList<>(); + List statuses = new ArrayList<>(); + + parameters.add(new ModelParameter(UserCfg.FIELD_ID, userId)); + UserRepository userRepository = new UserRepository(); + + if (userRepository.containtsUserManagementProperty(UserCfg.QUERY_IS_USER_MANAGMENT, parameters)) { + statuses.add(LoanStatus.APPROVED); + statuses.add(LoanStatus.PENDING_RENOVATION); + + parameters.clear(); + parameters.add(new ModelParameter(LoanCfg.FIELD_CUSTOMER, new People(customerId))); + parameters.add(new ModelParameter(LoanCfg.FIELD_LOAN_STATUS, statuses)); + + if (1 == loanRepository.countLoan(LoanCfg.QUERY_COUNT_LOAN_BY_CUSTOMER_IN_STATUSES, parameters)) { + String loanId = loanRepository.findLoanId(LoanCfg.QUERY_SELECT_LOAN_ID_BY_CUSTOMER_IN_STATUSES, parameters); + + result = new DeleteLoanDetailsJaxb(Boolean.FALSE, Boolean.FALSE, loanId); + List types = new ArrayList<>(); + + parameters.clear(); + parameters.add(new ModelParameter(LoanCfg.FIELD_ID, loanId)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LOAN_STATUS, statuses)); + + result.setApprovedOrPendingRenovation(0 < loanRepository.countLoan(LoanCfg.QUERY_COUNT_LOAN_IN_STATUSES, parameters)); + + if (result.getApprovedOrPendingRenovation()) { + types.add(LoanDetailsType.PAYMENT); + types.add(LoanDetailsType.TRANSFER); + + parameters.clear(); + parameters.add(new ModelParameter(LoanDetailsCfg.FIELD_ID_LOAN, new Loan(loanId))); + parameters.add(new ModelParameter(LoanDetailsCfg.FIELD_LOAN_DETAILS_TYPE, types)); + + result.setTodayPayment(0 < loanDetailsRepository.countLoandDetails(LoanDetailsCfg.QUERY_COUNT_LOAN_DETAILS_IN_CURRDATE, parameters)); + + types.clear(); + types.add(LoanDetailsType.FEE); + + parameters.clear(); + parameters.add(new ModelParameter(LoanDetailsCfg.FIELD_ID_LOAN, new Loan(loanId))); + parameters.add(new ModelParameter(LoanDetailsCfg.FIELD_LOAN_DETAILS_TYPE, types)); + + result.setTodayFee(0 < loanDetailsRepository.countLoandDetails(LoanDetailsCfg.QUERY_COUNT_LOAN_DETAILS_IN_CURRDATE, parameters)); + } + } else { + result = new DeleteLoanDetailsJaxb(Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, ""); + } + } else { + result = new DeleteLoanDetailsJaxb(Boolean.FALSE, Boolean.FALSE, Boolean.FALSE, ""); + } + + return result; + } catch (Exception e) { + logger.error("enebleToDeleteTodayDetails", e); + throw e; + } + } + + /** + * + * @param idLoan + * @return + * @throws Exception + */ + public List findFeesToPayByLoanId(String idLoan) throws Exception { + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanDetailsCfg.FIELD_ID_LOAN, new Loan(idLoan))); + return loanDetailsRepository.findFeesToPayByLoanId(LoanDetailsCfg.QUERY_FIND_ALL_FEES_BY_LOAN_ID, parameters); + } catch (Exception e) { + logger.error("findFeesToPayByLoanId", e); + throw e; + } + } + + /** + * + * @param feesToPayByLoanRequestJaxb + * @return + * @throws Exception + */ + public boolean updatePaidFeesStatusInLoanDetailIds(FeesToPayByLoanRequestJaxb feesToPayByLoanRequestJaxb) throws Exception { + try { + List parameters = new ArrayList<>(); + + List ids = new ArrayList<>(); + + feesToPayByLoanRequestJaxb.getFeeToPayList().forEach(fee -> { + ids.add(fee.getId()); + }); + + int cantidad = feesToPayByLoanRequestJaxb.getFeeToPayList().size(); + String texto; + String precio; + + Locale canada = new Locale("en", "CA"); + NumberFormat dollarFormat = NumberFormat.getCurrencyInstance(canada); + BigDecimal feePayment; + + if (1 == cantidad) { + precio = dollarFormat.format(50); + feePayment = new BigDecimal("50"); + + texto = " de la multa del " + feesToPayByLoanRequestJaxb.getFeeToPayList().get(0).getStrDateToPay(); + } else { + feePayment = new BigDecimal(50 * cantidad); + precio = dollarFormat.format(50 * cantidad); + String fechas = ""; + + for (int i = 0; i < feesToPayByLoanRequestJaxb.getFeeToPayList().size(); i++) { + fechas = fechas + feesToPayByLoanRequestJaxb.getFeeToPayList().get(i).getStrDateToPay(); + if (feesToPayByLoanRequestJaxb.getFeeToPayList().size() > 1) { + fechas = fechas + ","; + } + } + + if (feesToPayByLoanRequestJaxb.getFeeToPayList().size() > 1) { + fechas = fechas.substring(0, fechas.length() - 1); + } + + texto = " de las multas " + fechas; + } + + String comments = "Se pago " + precio + texto; + + LoanDetails details = new LoanDetails( + UUID.randomUUID().toString(), + new Loan(feesToPayByLoanRequestJaxb.getIdLoan()), + new User(feesToPayByLoanRequestJaxb.getIdUser()), + PeopleType.CUSTOMER, + 0, + feePayment, + LoanDetailsType.PAYMENT, + comments, + feesToPayByLoanRequestJaxb.getIdUser(), + new Date()); + + parameters.add(new ModelParameter(LoanDetailsCfg.FIELD_ID, ids)); + + return loanDetailsRepository.updatePaidFeesStatusInLoanDetailIds(LoanDetailsCfg.QUERY_UPDATE_PAID_FEES_STATUS_IN_LOAN_DETAILS_IDS, parameters, details); + } catch (Exception e) { + logger.error("updatePaidFeesStatusInLoanDetailIds", e); + throw e; + } + } + + /** + * + * @param officeId + * @return + * @throws Exception + */ + public LoanTypeListJaxb findAllLoanTypeByOffice(String officeId) throws Exception { + logger.debug("findAllLoanTypeByOffice"); + LoanTypeListJaxb loanTypeListJaxb = new LoanTypeListJaxb(); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanTypeCfg.FIELD_OFFICE, new Office(officeId))); + + List results = loanTypeRepository.findAllLoanTypeByOffice(LoanTypeCfg.QUERY_FIND_ALL_LOAN_TYPE_WITH_DESCRIPTION_BY_OFFICE, parameters); + List loanTypeJaxbs = new ArrayList<>(); + + results.forEach((result) -> { + loanTypeJaxbs.add(new LoanTypeJaxb(result.getId(), result.getPayment(), result.getLoanTypeName())); + }); + + loanTypeListJaxb.setLoans(loanTypeJaxbs); + + return loanTypeListJaxb; + } catch (Exception e) { + logger.error("findAllLoanTypeByOffice", e); + throw e; + } + } + + /** + * + * @param name + * @return + * @throws Exception + */ + public List findAllAvailableCustomersByType(String name) throws Exception { + logger.debug("findAllAvailableCustomersByType"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(AvailableCustomersViewCfg.FIELD_AVAILABLE_PERSON, name)); + + return searchPersonAvailableRepository.findAvailablePersonLike( + AvailableCustomersView.class, + AvailableCustomersViewCfg.QUERY_FIND_AVAILABLE_CUSTOMERS, + parameters); + } catch (Exception e) { + logger.error("findAllAvailableCustomersByType", e); + throw e; + } + } + + /** + * + * @param name + * @return + * @throws Exception + */ + public List findAllAvailableEndorsementsByType(String name) throws Exception { + logger.debug("findAllAvailableEndorsementsByType"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(AvailableEndorsementsViewCfg.FIELD_AVAILABLE_PERSON, name)); + + return searchPersonAvailableRepository.findAvailablePersonLike( + AvailableEndorsementsView.class, + AvailableEndorsementsViewCfg.QUERY_FIND_AVAILABLE_ENDORSEMENTS, + parameters); + } catch (Exception e) { + logger.error("findAllAvailableEndorsementsByType", e); + throw e; + } + } + + /** + * + * @param jaxb + * @return + * @throws Exception + */ + synchronized public boolean createLoan(LoanRequestedJaxb jaxb) throws Exception { + logger.debug("createLoan"); + + try { + + if (!jaxb.getCustomer().isCreatePerson() + && !verifyPersonAvailability( + AvailableCustomersView.class, + jaxb.getCustomer().getId() + )) { + throw new Exception(user_unavailable); + } + + if (!jaxb.getEndorsement().isCreatePerson() + && !verifyPersonAvailability( + AvailableEndorsementsView.class, + jaxb.getEndorsement().getId() + )) { + throw new Exception(user_unavailable); + } + +//DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Date date = new Date();//dateFormat.parse(jaxb.getStrDate()); + + LoanByUser loanByUser = new LoanByUser( + new LoanByUserId(null, jaxb.getUserId()), + LoanStatus.PENDING, + OwnerLoan.CURRENT_OWNER, + jaxb.getUserId()); + + LoanType loanType = loanTypeRepository.findLoanType(jaxb.getLoanTypeId()); + RouteCtlg routeCtlg = new RouteCtlg(jaxb.getRouteId()); + + Loan loan = new Loan( + new LoanType(loanType.getId()), + null, + null, + routeCtlg, + LoanStatus.PENDING, + BigDecimal.ZERO, + loanType.getPaymentTotal(), + 0, + jaxb.getUserId(), + date, + jaxb.getCustomer().isCreatePerson() ? ActiveStatus.ENEBLED : ActiveStatus.DISABLED, + ActiveStatus.DISABLED // FROZEN funcationality + ); + return loanRepository.createLoan( + loan, + loanByUser, + jaxb); + } catch (Exception e) { + logger.error("createLoan", e); + throw e; + } + } + + /** + * + * @param newAmountJaxb + * @return + * @throws Exception + */ + public boolean saveNewAmount(NewAmountJaxb newAmountJaxb) throws Exception { + logger.debug("saveNewAmount"); + + LoanFeeNotification notification = null; + try { + //DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Date date = new Date();//dateFormat.parse(newAmountJaxb.getStrDate()); + List parameters = new ArrayList<>(); + + if (newAmountJaxb.isFee()) { + parameters.add( + new ModelParameter( + LoanFeeNotificationCfg.FIELD_LOAN, + new Loan(newAmountJaxb.getLoanId()) + ) + ); + + Long total = loanFeeNotificationRepository.countNotificationByLoanId( + Long.class, + LoanFeeNotificationCfg.QUERY_COUNT_NOTIFICATION_BY_LOAN_ID, + parameters); + + notification = new LoanFeeNotification( + new Loan(newAmountJaxb.getLoanId()), + new User(newAmountJaxb.getUserId()), + (total.intValue() + 1), + newAmountJaxb.getUserId(), + date + ); + } + + if (newAmountJaxb.isFee() && null == notification) { + throw new Exception("Could not create the notification for the loan " + newAmountJaxb.getLoanId()); + } + + Loan loan = loanRepository.findLoanById(newAmountJaxb.getLoanId()); + int referenceNumber = loan.getLastReferenceNumber() + 1; + + LoanDetails loanDetails = new LoanDetails( + new Loan(newAmountJaxb.getLoanId()), + new User(newAmountJaxb.getUserId()), + newAmountJaxb.isCustomer() ? PeopleType.CUSTOMER : PeopleType.ENDORSEMENT, + newAmountJaxb.getAmount(), + referenceNumber, + newAmountJaxb.isFee() ? LoanDetailsType.FEE : LoanDetailsType.PAYMENT, + newAmountJaxb.getUserId(), + date, + newAmountJaxb.getComments() + ); + + BigDecimal newAmountPaid, newAmountToPay; + + if (newAmountJaxb.isFee()) { + newAmountPaid = loan.getAmountPaid(); + newAmountToPay = loan.getAmountToPay().add(newAmountJaxb.getAmount()); + } else { + newAmountPaid = loan.getAmountPaid().add(newAmountJaxb.getAmount()); + newAmountToPay = loan.getAmountToPay(); + } + + parameters.clear(); + + String query = LoanCfg.QUERY_UPDATE_LOAN_BY_ID; + + if (!newAmountJaxb.isFee() && 0 == loan.getAmountToPay().compareTo(newAmountPaid)) { + parameters.add(new ModelParameter(LoanCfg.FIELD_LOAN_STATUS, LoanStatus.FINISH)); + + query = LoanCfg.QUERY_UPDATE_AND_FINISH_LOAN_BY_ID; + } + + parameters.add(new ModelParameter(LoanCfg.FIELD_AMOUNT_PAID, newAmountPaid)); + parameters.add(new ModelParameter(LoanCfg.FIELD_AMOUNT_TO_PAY, newAmountToPay)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_REFERENCE_NUMBER, referenceNumber)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_BY, newAmountJaxb.getUserId())); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_ON, date)); + parameters.add(new ModelParameter(LoanCfg.FIELD_ID, newAmountJaxb.getLoanId())); + + return addAmountRepository.saveNewAmount(notification, loanDetails, query, parameters); + } catch (Exception e) { + logger.error("saveNewAmount", e); + throw e; + } + } + + /** + * + * @param transfer + * @return + * @throws Exception + */ + public boolean saveNewTransferAmount(NewTransferAccountJaxb transfer) throws Exception { + logger.debug("saveNewTransferAmount"); + + LoanFeeNotification notification = null; + try { + Date date = new Date(); + List parameters = new ArrayList<>(); + + Loan loan = loanRepository.findLoanById(transfer.getLoanId()); + int referenceNumber = loan.getLastReferenceNumber() + 1; + + BigDecimal amountWithoutIVA = transfer.getAmount().divide(new BigDecimal(1.16),RoundingMode.FLOOR); + + amountWithoutIVA = amountWithoutIVA.setScale(2, RoundingMode.FLOOR); + + StringBuilder comments = new StringBuilder(transfer.getComments()); + + comments.append(". Monto de transferencia con IVA: $"); + comments.append(transfer.getAmount()); + comments.append(", monto de transferencia sin IVA: $"); + comments.append(amountWithoutIVA); + + LoanDetails loanDetails = new LoanDetails( + new Loan(transfer.getLoanId()), + new User(transfer.getUserId()), + PeopleType.CUSTOMER, + amountWithoutIVA, + referenceNumber, + LoanDetailsType.TRANSFER, + transfer.getUserId(), + date, + transfer.getComments(), + null == transfer.getTransferReference() || transfer.getTransferReference().trim().equals("") ? "Asesor no guardo la referencia de la transferencia. Rechar directamente o solicitar con el administrador la aclaración." : transfer.getTransferReference(), + TransferStatus.PENDING + ); + + BigDecimal newAmountPaid = loan.getAmountPaid().add(amountWithoutIVA); + + parameters.clear(); + + String query = LoanCfg.QUERY_UPDATE_LOAN_BY_ID; + + if (0 == loan.getAmountToPay().compareTo(newAmountPaid)) { + parameters.add(new ModelParameter(LoanCfg.FIELD_LOAN_STATUS, LoanStatus.FINISH)); + + query = LoanCfg.QUERY_UPDATE_AND_FINISH_LOAN_BY_ID; + } + + parameters.add(new ModelParameter(LoanCfg.FIELD_AMOUNT_PAID, newAmountPaid)); + parameters.add(new ModelParameter(LoanCfg.FIELD_AMOUNT_TO_PAY, loan.getAmountToPay())); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_REFERENCE_NUMBER, referenceNumber)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_BY, transfer.getUserId())); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_ON, date)); + parameters.add(new ModelParameter(LoanCfg.FIELD_ID, transfer.getLoanId())); + + return addAmountRepository.saveNewAmount(notification, loanDetails, query, parameters); + } catch (Exception e) { + logger.error("saveNewTransferAmount", e); + throw e; + } + } + + /** + * This method is for get all loan types applying some business rules, like + * number of Fees and if you are ok in 100% you can get next loan. + * + * @param officeId + * @param loanId + * @return + * @throws Exception + */ + public LoanTypeListJaxb findNewCreditLimit(String officeId, String loanId) throws Exception { + logger.debug("findNewCreditLimit"); + LoanTypeListJaxb loanTypeListJaxb = new LoanTypeListJaxb(); + try { + List parameters = new ArrayList<>(); + + parameters.add( + new ModelParameter( + LoanTypeCfg.FIELD_OFFICE, + new Office(officeId) + ) + ); + + parameters.add( + new ModelParameter( + LoanTypeCfg.PARAM_LOAN, + new Loan(loanId) + ) + ); + + parameters.add( + new ModelParameter( + LoanTypeCfg.PARAM_LOAN_ID, + loanId + ) + ); + + List results = loanTypeRepository.findIdAndPaymentLoans(LoanTypeCfg.QUERY_FIND_NEW_CREDIT_LINE_BY_LOAN_ID, parameters); + List loanTypeJaxbs = new ArrayList<>(); + + results.forEach((result) -> { + loanTypeJaxbs.add(new LoanTypeJaxb(result.getId(), result.getPayment())); + }); + + loanTypeListJaxb.setLoans(loanTypeJaxbs); + + return loanTypeListJaxb; + } catch (Exception e) { + logger.error("findNewCreditLimit", e); + throw e; + } + } + + /** + * + * @param officeId + * @return + * @throws Exception + */ + public LoanTypeListJaxb findAllLoansTypeByOffice(String officeId) throws Exception { + logger.debug("findNewCreditLimit"); + LoanTypeListJaxb loanTypeListJaxb = new LoanTypeListJaxb(); + try { + List parameters = new ArrayList<>(); + + parameters.add( + new ModelParameter( + LoanTypeCfg.FIELD_OFFICE, + new Office(officeId) + ) + ); + + List results = loanTypeRepository.findIdAndPaymentLoans( + LoanTypeCfg.QUERY_FIND_ALL_LOAN_TYPE_WITH_DESCRIPTION_BY_OFFICE, + parameters); + + List loanTypeJaxbs = new ArrayList<>(); + + results.forEach((result) -> { + loanTypeJaxbs.add(new LoanTypeJaxb(result.getId(), result.getPayment(), result.getLoanTypeName())); + }); + + loanTypeListJaxb.setLoans(loanTypeJaxbs); + + return loanTypeListJaxb; + } catch (Exception e) { + logger.error("findNewCreditLimit", e); + throw e; + } + } + + /** + * + * @param loan + * @param credit + * @param user + * @param paymentAmount + * @param endorsement + * @return + * @throws Exception + */ + public boolean renovation(String loan, + String credit, + String user, + BigDecimal paymentAmount, + PersonJaxb endorsement) throws Exception { + logger.debug("renovation"); + try { + Date date = new Date(); + + Loan currentLoan = loanRepository.findLoanById(loan); + LoanType newCredit = loanTypeRepository.findLoanType(credit); + int lastReferenceNumber = currentLoan.getLastReferenceNumber() + 1; + + LoanDetails loanDetails = new LoanDetails( + new Loan(loan), + new User(user), + PeopleType.CUSTOMER, + paymentAmount, + lastReferenceNumber, + LoanDetailsType.PAYMENT, + user, + date, + "Pago y solicitud de renovacion" + ); + + LoanByUser loanByUser = new LoanByUser( + new LoanByUserId(null, user), + LoanStatus.PENDING, + OwnerLoan.CURRENT_OWNER, + user); + + Loan renovation = new Loan( + new LoanType(newCredit.getId()), + new People(currentLoan.getCustomer().getId()), + null, + new RouteCtlg(currentLoan.getRouteCtlg().getId()), + LoanStatus.PENDING, + BigDecimal.ZERO, + newCredit.getPaymentTotal(), + 0, + user, + date, + ActiveStatus.DISABLED, + ActiveStatus.DISABLED // FROZEN funcationality + ); + + List parameters = new ArrayList<>(); + + parameters.add( + new ModelParameter( + LoanCfg.FIELD_AMOUNT_PAID, + currentLoan.getAmountPaid().add(paymentAmount) + ) + ); + + parameters.add( + new ModelParameter( + LoanCfg.FIELD_LAST_REFERENCE_NUMBER, + lastReferenceNumber + ) + ); + + parameters.add( + new ModelParameter( + LoanCfg.FIELD_LOAN_STATUS, + LoanStatus.PENDING_RENOVATION + ) + ); + + parameters.add( + new ModelParameter( + LoanCfg.FIELD_LAST_UPDATED_BY, + user + ) + ); + + parameters.add( + new ModelParameter( + LoanCfg.FIELD_LAST_UPDATED_ON, + date + ) + ); + + parameters.add( + new ModelParameter( + LoanCfg.FIELD_ID, + loan + ) + ); + + People people = null; + + if (null != endorsement) { + if (endorsement.isCreatePerson()) { + people = new People( + endorsement, false, + currentLoan.getRouteCtlg().getOffice().getId(), + user, currentLoan.getRouteCtlg().getId() + ); + } else { + renovation.setEndorsement(new People(endorsement.getId())); + } + } else { + renovation.setEndorsement(new People(currentLoan.getEndorsement().getId())); + } + + return loanRepository.renovationLoan( + loan, + renovation, + loanByUser, + LoanCfg.QUERY_UPDATE_LOAN_FROM_RENOVATION, + parameters, + loanDetails, people, + null == endorsement ? false : endorsement.isCreatePerson()); + } catch (Exception e) { + logger.error("renovation", e); + throw e; + } + } + + /** + * + * @param loan + * @param credit + * @param user + * @param paymentAmount + * @param currentOwner + * @param endorsement + * @return + * @throws Exception + */ + public boolean renovationHasPaymentToday(String loan, + String credit, + String user, + BigDecimal paymentAmount, + String currentOwner, + PersonJaxb endorsement) throws Exception { + logger.debug("renovationHasPaymentToday"); + try { + Date date = new Date(); + + Loan currentLoan = loanRepository.findLoanById(loan); + LoanType newCredit = loanTypeRepository.findLoanType(credit); + + LoanByUser loanByUser = new LoanByUser( + new LoanByUserId(null, currentOwner), + LoanStatus.PENDING, + OwnerLoan.CURRENT_OWNER, + user); + + Loan renovation = new Loan( + new LoanType(newCredit.getId()), + new People(currentLoan.getCustomer().getId()), + null, + new RouteCtlg(currentLoan.getRouteCtlg().getId()), + LoanStatus.PENDING, + BigDecimal.ZERO, + newCredit.getPaymentTotal(), + 0, + user, + date, + ActiveStatus.DISABLED, + ActiveStatus.DISABLED // FROZEN funcationality + ); + + People people = null; + + if (null != endorsement) { + if (endorsement.isCreatePerson()) { + people = new People( + endorsement, false, + currentLoan.getRouteCtlg().getOffice().getId(), + user, currentLoan.getRouteCtlg().getId() + ); + } else { + renovation.setEndorsement(new People(endorsement.getId())); + } + } else { + renovation.setEndorsement(new People(currentLoan.getEndorsement().getId())); + } + + return loanRepository.renovationHasPaymentToday( + loan, + renovation, + loanByUser, + people, + null == endorsement ? false : endorsement.isCreatePerson()); + } catch (Exception e) { + logger.error("renovationHasPaymentToday", e); + throw e; + } + } + + /** + * + * @param userId + * @return + * @throws Exception + */ + public List findLoansByCertifier(String userId) throws Exception { + logger.debug("findLoansByCertifier"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanToDeliveryByCertifierViewCfg.FIELD_USER_ID, userId)); + + return toDeliveryByCertifierRepository.findLoansByCertifier( + LoanToDeliveryByCertifierView.class, + LoanToDeliveryByCertifierViewCfg.QUERY_FIND_LOANS_BY_CERTIFIER, + parameters); + } catch (Exception e) { + logger.error("findLoansByCertifier", e); + throw e; + } + } + + /** + * + * @param id + * @param user + * @param comments + * @param action true Approved otherwise Rejected. + * @param amount + * @param discount + * @return + * @throws Exception + */ + public boolean certifierAction(String id, String user, String comments, boolean action, BigDecimal amount, BigDecimal discount) throws Exception { + logger.debug("certifierAction"); + boolean success; + try { + // revisar si es nuevo (1) o renovado (2). + // 1 = se cambia el estatus al valor de action + // 2, si action es true, hay que hacer update de 3 tablas + // A)loan renovado estutus = APPROVED + // B) Finish + // 1)old loan estatus = FINISH, + // 2)old loandbyuser estatus = FINISH + // C)loans by renovation estatus = APPROVED + // 2, si action es false, hay que hacer update de 3 tablas + // A)loan renovado estutus = REJECT, and loandbyuser estatus = REJECT + // B)old loan estatus = APPROVED + // 1)old loan estatus = APPROVED + // 2)old loandbyuser estatus = APPROVED + // C)loans by renovation estatus = REJECT + LoanByRenovation loanByRenovation = loanByRenovationRepository.findLoanRenovationByNewLoanId(id); + + if (null == loanByRenovation) { + success = updateLoanByIdFromCertifiedView( + id, + user, + action, + comments, + amount, + ComissionType.INCLUDED); + } else { + LoanDetails loanDetails = null; + BigDecimal totalAmountPaid = null; + Integer newLastReferenceNumber = null; + + // Means discount is bigger than 0 + if (1 == discount.compareTo(new BigDecimal(0))) { + Loan loan = loanRepository.findLoanById(loanByRenovation.getLoanOld().getId()); + + totalAmountPaid = loan.getAmountPaid().add(discount); + newLastReferenceNumber = loan.getLastReferenceNumber() + 1; + + loanDetails = new LoanDetails( + new Loan(loanByRenovation.getLoanOld().getId()), + new User(user), + PeopleType.CUSTOMER, + discount, + newLastReferenceNumber, + LoanDetailsType.RENOVATION_PAYMENT, + user, + new Date(), + "Retención de " + discount + " el la entrega del crédito renovado"); + } + + success = loanByRenovationRepository.updateLoanRenovationFromCerfierView( + loanByRenovation, + user, + comments, + action, + amount, + discount, + loanDetails, + totalAmountPaid, + newLastReferenceNumber, + ComissionType.INCLUDED); + } + return success; + } catch (Exception e) { + logger.error("certifierAction", e); + throw e; + } + } + + /** + * + * @param id + * @param user + * @param comments + * @param action + * @param amount + * @param discount + * @param comissionType + * @return + * @throws Exception + */ + public boolean certifierAction(String id, String user, String comments, boolean action, BigDecimal amount, BigDecimal discount, ComissionType comissionType) throws Exception { + logger.debug("certifierAction"); + boolean success; + try { + // revisar si es nuevo (1) o renovado (2). + // 1 = se cambia el estatus al valor de action + // 2, si action es true, hay que hacer update de 3 tablas + // A)loan renovado estutus = APPROVED + // B) Finish + // 1)old loan estatus = FINISH, + // 2)old loandbyuser estatus = FINISH + // C)loans by renovation estatus = APPROVED + // 2, si action es false, hay que hacer update de 3 tablas + // A)loan renovado estutus = REJECT, and loandbyuser estatus = REJECT + // B)old loan estatus = APPROVED + // 1)old loan estatus = APPROVED + // 2)old loandbyuser estatus = APPROVED + // C)loans by renovation estatus = REJECT + LoanByRenovation loanByRenovation = loanByRenovationRepository.findLoanRenovationByNewLoanId(id); + + if (null == loanByRenovation) { + success = updateLoanByIdFromCertifiedView( + id, + user, + action, + comments, + amount, + comissionType); + } else { + LoanDetails loanDetails = null; + BigDecimal totalAmountPaid = null; + Integer newLastReferenceNumber = null; + + // Means discount is bigger than 0 + if (1 == discount.compareTo(new BigDecimal(0))) { + Loan loan = loanRepository.findLoanById(loanByRenovation.getLoanOld().getId()); + + totalAmountPaid = loan.getAmountPaid().add(discount); + newLastReferenceNumber = loan.getLastReferenceNumber() + 1; + + loanDetails = new LoanDetails( + new Loan(loanByRenovation.getLoanOld().getId()), + new User(user), + PeopleType.CUSTOMER, + discount, + newLastReferenceNumber, + LoanDetailsType.RENOVATION_PAYMENT, + user, + new Date(), + "Retención de " + discount + " el la entrega del crédito renovado"); + } + + success = loanByRenovationRepository.updateLoanRenovationFromCerfierView( + loanByRenovation, + user, + comments, + action, + amount, + discount, + loanDetails, + totalAmountPaid, + newLastReferenceNumber, + comissionType); + } + return success; + } catch (Exception e) { + logger.error("certifierAction", e); + throw e; + } + } + + /** + * + * @param idLoan + * @return + * @throws Exception + */ + public List approvedDetailsByIdLoan(String idLoan) throws Exception { + logger.debug("approvedDetailsByIdLoan"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanDetailsCfg.FIELD_ID_LOAN, new Loan(idLoan))); + + return loanApprovedDetailViewRepository.findLoanDetailsByLoan( + LoanDetailsCfg.QUERY_FIND_LOAN_DETAILS_BY_LOAN, + parameters + ); + } catch (Exception e) { + logger.error("approvedDetailsByIdLoan", e); + throw e; + } + } + + /** + * Searching all loan details by id. + * + * @param loanId + * @return + * @throws Exception + */ + public List getLoanDetailsCurdatebyIdLoan(String loanId) throws Exception { + logger.debug("getLoanDetailsCurdatebyIdLoan"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_DETAILS_LOAN, new Loan(loanId))); + + try { + return loanDetailsRepository.findLoanDetailsByLoanId(LoanCfg.QUERY_FIND_LOAN_DETAILS_CURDATE_BY_LOAN, parameters); + } catch (Exception ex) { + logger.error("getLoanDetailsCurdatebyIdLoan", ex); + throw ex; + } + } + + public List getLoanDetailsFeeCurdatebyIdLoan(String loanId) throws Exception { + logger.debug("getLoanDetailsFeeCurdatebyIdLoan"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_DETAILS_LOAN, new Loan(loanId))); + + try { + return loanDetailsRepository.findLoanDetailsByLoanId(LoanCfg.QUERY_FIND_LOAN_DETAILS_FEE_CURDATE_BY_LOAN, parameters); + } catch (Exception ex) { + logger.error("getLoanDetailsCurdatebyIdLoan", ex); + throw ex; + } + } + + /** + * + * @param loanId + * @return + * @throws Exception + */ + public Loan getLoanById(String loanId) throws Exception { + try { + return loanRepository.findLoanById(loanId); + } catch (Exception ex) { + throw ex; + } + } + + /** + * + * @param idLoan + * @param idLoanType + * @return + * @throws Exception + */ + public boolean updatePaymentTotalLoanById(String idLoan, String idLoanType) throws Exception { + try { + Loan loan = loanRepository.findLoanById(idLoan); + LoanType loanType = loanTypeRepository.findLoanType(idLoanType); + + loan.setLoanType(loanType); + loan.setAmountToPay(loanType.getPaymentTotal()); + + return loanRepository.updateLoan(loan); + } catch (Exception ex) { + throw ex; + } + } + + /** + * + * @return @throws Exception + */ + public List findAllTransferToAuthorize() throws Exception { + try { + TransferInPendingStatusViewRepository repository = new TransferInPendingStatusViewRepository(); + List transferInPendingStatusViews = repository.findAllTransferFromHQL(TransferInPendingStatusViewCfg.QUERY_FIND_ALL_TRANSFER_IN_PENDING_STATUS, null); + List results = new ArrayList<>(); + + transferInPendingStatusViews.forEach((row) -> { + results.add(new AuthorizeTransferPaymentsDto(row.getIdLoanDetail(), + row.getStrCreatedOn(), + row.getCustomerName(), + row.getEndorsementName(), + row.getUserName(), + row.getPaymentAmount(), + row.getLoanComments())); + }); + + return results; + } catch (Exception e) { + throw e; + } + } + + /** + * + * @param authorizeTransferList + * @param transferStatus + * @return + * @throws Exception + */ + public boolean updateTransferList(AuthorizeTransferList authorizeTransferList, TransferStatus transferStatus) throws Exception { + try { + List parameters = new ArrayList<>(); + List ids = new ArrayList<>(); + + authorizeTransferList.getTransferListToUpdateStatus().forEach((row) -> { + ids.add(row.getIdLoan()); + }); + + parameters.add(new ModelParameter(LoanDetailsCfg.FIELD_TRANSFER_STATUS, transferStatus)); + parameters.add(new ModelParameter(LoanDetailsCfg.FIELD_COMMENS, authorizeTransferList.getComments())); + parameters.add(new ModelParameter(LoanDetailsCfg.FIELD_ID, ids)); + + return loanDetailsRepository.updateLoanDetails(LoanDetailsCfg.UPDATE_TRANSFER_STATUS_WHERE_ID_IN, parameters); + } catch (Exception e) { + throw e; + } + } + + /** + * + * @return @throws Exception + */ + public List findAllLoanInPendingStatusToDeliveryView() throws Exception { + try { + LoanInPendingStatusToDeliveryViewRepository repository = new LoanInPendingStatusToDeliveryViewRepository(); + List dataRows = repository.findAllLoanInPendingStatusToDeliveryViewFromHQL(LoanInPendingStatusToDeliveryViewCfg.QUERY_FIND_ALL_LOAN_IN_PENDING_STATUS_TO_DELIVERY_VIEW, null); + List results = new ArrayList<>(); + + dataRows.forEach((row) -> { + results.add(new UpdateLoanToDeliveryStatusDTO(row.getIdLoan(), + row.getStrCreatedOn(), + row.getCustomerName(), + row.getEndorsementName(), + row.getUserName(), + row.getPayment())); + }); + + return results; + } catch (Exception e) { + logger.error("findAllLoanInPendingStatusToDeliveryView", e); + throw e; + } + } + + public boolean updateLoanPendingStatusToDelivery(UpdateLoanToDeliveryStatusList updateLoanToDeliveryStatusList, LoanStatus loanStatus) throws Exception { + try { + List loanParams = new ArrayList<>(); + List loanByUserParams = new ArrayList<>(); + List ids = new ArrayList<>(); + List loans = new ArrayList<>(); + + updateLoanToDeliveryStatusList.getLoanToDeliveryList().forEach((row) -> { + ids.add(row.getIdLoan()); + loans.add(new Loan(row.getIdLoan())); + }); + + loanParams.add(new ModelParameter(LoanCfg.FIELD_LOAN_STATUS, loanStatus)); + loanParams.add(new ModelParameter(LoanCfg.FIELD_AMOUNT_PAID, new BigDecimal(0))); + loanParams.add(new ModelParameter(LoanCfg.FIELD_LAST_REFERENCE_NUMBER, 0)); + loanParams.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_BY, updateLoanToDeliveryStatusList.getIdUpdateUser())); + loanParams.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_ON, new Date())); + loanParams.add(new ModelParameter(LoanCfg.FIELD_ID, ids)); + + loanByUserParams.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN_BY_USER_STATUS, loanStatus)); + loanByUserParams.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN, loans)); + + return loanRepository.loanPendingStatusToDelivery(LoanCfg.QUERY_UPDATE_LOAN_STATUS_WHERE_ID_IN, LoanByUserCfg.QUERY_UPDATE_LOAN_BY_USER_STATUS_WHERE_LOAN_IN, loanParams, loanByUserParams); + } catch (Exception e) { + throw e; + } + } + + /** + * + * @param loanId + * @param userId + * @param action + * @param comments + * @param amount + * @param comissionType + * @return + * @throws Exception + */ + private boolean updateLoanByIdFromCertifiedView(String loanId, String userId, boolean action, String comments, BigDecimal amount, ComissionType comissionType) throws Exception { + logger.debug("updateLoanByIdFromCertifiedView"); + try { + List parameters = new ArrayList<>(); + Date date = new Date(); + + parameters.add( + new ModelParameter(LoanCfg.FIELD_LOAN_STATUS, action ? LoanStatus.APPROVED : LoanStatus.REJECTED) + ); + + parameters.add( + new ModelParameter(LoanCfg.FIELD_COMMENTS, comments) + ); + + parameters.add( + new ModelParameter(LoanCfg.FIELD_CREATED_ON, date) + ); + + parameters.add( + new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_BY, userId) + ); + + parameters.add( + new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_ON, date) + ); + + parameters.add( + new ModelParameter(LoanCfg.FIELD_ID, loanId) + ); + + Delivery delivery = null; + + if (action) { + delivery = new Delivery( + new User(userId), + new Loan(loanId), + amount, + userId, + date, + comissionType); + } + + return loanRepository.updateLoan( + loanId, + LoanCfg.QUERY_UPDATE_LOAN_WITH_CREATED_ON_BY_ID_FROM_CERTIFIER_VIEW, + parameters, + action ? LoanStatus.APPROVED : LoanStatus.REJECTED, + delivery); + } catch (Exception e) { + logger.error("updateLoanByIdFromCertifiedView", e); + throw e; + } + } + + /** + * Vefify that person is available to create a new Loan. + * + * @param clazz AvailableCustomersView or AvailableEndorsementsView. + * @param idPerson Identification NUmber + * @return true if is available otherwise false. + * @throws Exception + */ + private boolean verifyPersonAvailability(Class clazz, String idPerson) throws Exception { + logger.debug("verifyPersonAvailability"); + try { + if (null == idPerson || "".equals(idPerson.trim())) { + throw new NullPointerException(clazz + " id is null"); + } + + return null != searchPersonAvailableRepository.findAvailablePersonByPersonId(clazz, idPerson); + } catch (Exception e) { + logger.error("verifyPersonAvailability", e); + throw e; + } + } + + private static final long serialVersionUID = -3608679734068691688L; + final Logger logger = LogManager.getLogger(LoanController.class + ); + + private final LoanTypeRepository loanTypeRepository; + private final LoanRepository loanRepository; + private final LoanFeeNotificationRepository loanFeeNotificationRepository; + private final AddAmountRepository addAmountRepository; + private final LoanToDeliveryByCertifierRepository toDeliveryByCertifierRepository; + private final LoanByRenovationRepository loanByRenovationRepository; + private final SearchPersonAvailableRepository searchPersonAvailableRepository; + private final LoanApprovedDetailViewRepository loanApprovedDetailViewRepository; + private final LoanDetailsRepository loanDetailsRepository; + + private final String user_unavailable = "User unavailable to this operation"; + + public LoanController() { + this.loanTypeRepository = new LoanTypeRepository(); + this.loanRepository = new LoanRepository(); + this.loanFeeNotificationRepository = new LoanFeeNotificationRepository(); + this.addAmountRepository = new AddAmountRepository(); + this.toDeliveryByCertifierRepository = new LoanToDeliveryByCertifierRepository(); + this.loanByRenovationRepository = new LoanByRenovationRepository(); + this.searchPersonAvailableRepository = new SearchPersonAvailableRepository(); + this.loanApprovedDetailViewRepository = new LoanApprovedDetailViewRepository(); + this.loanDetailsRepository = new LoanDetailsRepository(); + } +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/login/LoginWSController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/login/LoginWSController.java new file mode 100644 index 0000000..e83c1fb --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/login/LoginWSController.java @@ -0,0 +1,80 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.login; + +import com.arrebol.apc.controller.mobile.moxy.login.UserMxy; +import com.arrebol.apc.controller.mobile.moxy.login.UserPreferenceMxy; +import com.arrebol.apc.controller.mobile.repository.jaas.AuthenticationRepository; +import com.arrebol.apc.model.mobile.access.MobileUser; +import com.arrebol.apc.model.mobile.preference.UserMobilePreference; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoginWSController implements Serializable { + + public UserMxy login(String userName, String password) throws Exception { + logger.debug("login"); + + UserMxy userMxy; + List preferenceLst; + try { + MobileUser mobileUser = getAuthenticationRepository().findUser(userName, password); + + if (null == mobileUser) { + throw new Exception("Access denied"); + } else { + userMxy = new UserMxy( + mobileUser.getId(), + mobileUser.getUserName(), + mobileUser.getAvatar(), + mobileUser.getOfficeId(), + mobileUser.getRouteId(), + mobileUser.getCertifier(), + mobileUser.getManagement().toString() + ); + } + + List userMobilePreferences = getAuthenticationRepository().findAllMobilePreferenceByUser(userMxy.getId()); + + if (!userMobilePreferences.isEmpty()) { + preferenceLst = new ArrayList<>(); + + userMobilePreferences.forEach((preference) -> { + preferenceLst.add(new UserPreferenceMxy(preference.getPreferenceName(), preference.getPreferenceValue())); + }); + + userMxy.setPreferences(preferenceLst); + } + } catch (Exception e) { + logger.error("login", e); + throw e; + } + return userMxy; + } + + public LoginWSController() { + this.authenticationRepository = new AuthenticationRepository(); + } + + public AuthenticationRepository getAuthenticationRepository() { + return authenticationRepository; + } + + private static final long serialVersionUID = 2795964728722199660L; + final Logger logger = LogManager.getLogger(LoginWSController.class); + + private final AuthenticationRepository authenticationRepository; + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/otherexpense/OtherExpenseController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/otherexpense/OtherExpenseController.java new file mode 100644 index 0000000..3df43be --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/otherexpense/OtherExpenseController.java @@ -0,0 +1,58 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.otherexpense; + +import com.arrebol.apc.controller.mobile.repository.admin.OtherExpenseRepository; +import com.arrebol.apc.model.admin.OtherExpense; +import java.io.Serializable; +import java.math.BigDecimal; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class OtherExpenseController implements Serializable { + + /** + * + * @param officeId + * @param userId + * @param expense + * @param description + * @return + * @throws Exception + */ + public boolean addOtherExpense( + String officeId, + String userId, + Double expense, + String description) throws Exception { + logger.debug("addOtherExpense"); + try { + OtherExpense otherExpense = new OtherExpense(officeId, userId, new BigDecimal(expense), description); + + return otherExpenseRepository.saveOtherExpense(otherExpense); + } catch (Exception e) { + logger.error("addOtherExpense", e); + throw e; + } + } + + private static final long serialVersionUID = -1748077572747436181L; + + final Logger logger = LogManager.getLogger(OtherExpenseController.class); + + private final OtherExpenseRepository otherExpenseRepository; + + public OtherExpenseController() { + this.otherExpenseRepository = new OtherExpenseRepository(); + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/person/PersonController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/person/PersonController.java new file mode 100644 index 0000000..874e3f3 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/person/PersonController.java @@ -0,0 +1,54 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.person; + +import com.arrebol.apc.controller.mobile.repository.people.PeopleRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.constance.PeopleCfg; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class PersonController implements Serializable { + + /** + * + * @param loanId + * @param lastUpdatedBy + * @param phoneNumber + * @param isCustomer + * @return + */ + public boolean changeContactNumber(String loanId, String lastUpdatedBy, String phoneNumber, boolean isCustomer) { + boolean success = false; + try { + PeopleRepository repository = new PeopleRepository(); + String personId = repository.findPeopleIdByIdLoad(loanId, isCustomer); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PeopleCfg.FIELD_PHONE_HOME, phoneNumber)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(PeopleCfg.FIELD_ID, personId)); + + return repository.changeContactNumber(PeopleCfg.QUERY_UPDATE_PHONE_HOME_BY_PEOPLE_ID, parameters); + } catch (Exception e) { + logger.error("changeContactNumber", e); + } + return success; + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/preference/SystemPreferenceController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/preference/SystemPreferenceController.java new file mode 100644 index 0000000..5c0d4af --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/preference/SystemPreferenceController.java @@ -0,0 +1,243 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.preference; + +import com.arrebol.apc.controller.mobile.moxy.views.LoanByUserOrderPreferenceViewJaxb; +import com.arrebol.apc.controller.mobile.moxy.views.LoanByUserOrderPreferenceViewListJaxb; +import com.arrebol.apc.controller.mobile.repository.preference.UserMobilePreferenceRepository; +import com.arrebol.apc.controller.mobile.repository.views.LoanByUserOrderPreferenceViewRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.ClosingDayCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.LoanByUserCfg; +import com.arrebol.apc.model.core.constance.LoanByUserOrderPreferenceViewCfg; +import com.arrebol.apc.model.core.constance.UserMobilePreferenceCfg; +import com.arrebol.apc.model.enums.PreferenceName; +import com.arrebol.apc.model.enums.PreferenceValue; +import com.arrebol.apc.model.loan.LoanByUserId; +import com.arrebol.apc.model.mobile.preference.UserMobilePreference; +import com.arrebol.apc.model.views.LoanByUserOrderPreferenceView; +import com.arrebol.apc.model.ws.parsed.ConfigurationJaxb; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class SystemPreferenceController implements Serializable { + + /** + * + * @param userId + * @return + * @throws Exception + */ + public List findAllLoanByUserOrderPreference(String userId) throws Exception { + logger.debug("findAllLoanByUserOrderPreference"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanByUserOrderPreferenceViewCfg.FIELD_ORDER_USER_ID, userId)); + + return loanByUserOrderPreferenceViewRepository + .findAllLoanByUserOrderPreference( + LoanByUserOrderPreferenceViewCfg.QUERY_FIND_ALL_LOAN_BY_USER_ORDER_PREFERENCE, + parameters + ); + } catch (Exception e) { + logger.error("findAllLoanByUserOrderPreference", e); + throw e; + } + } + + /** + * + * @param updateOrderListPreference + * @return + * @throws Exception + */ + public boolean updateOrderInList(LoanByUserOrderPreferenceViewListJaxb updateOrderListPreference) throws Exception { + logger.debug("updateOrderInList"); + + boolean success = false; + try { + if (updateLoanByUser(updateOrderListPreference)) { + success = updateUserMobilePreference( + new User(updateOrderListPreference.getLoanByUserOrderPreferences().get(0).getUserId()), + PreferenceName.ORDER_LIST.toString(), + PreferenceValue.ORDER_IN_LIST.toString() + ); + } + return success; + } catch (Exception e) { + logger.error("updateOrderInList", e); + throw e; + } + } + + /** + * + * @param UserId + * @param preferenceName + * @param preferenceValue + * @return + * @throws Exception + */ + public boolean updateUserMobilePreference(String UserId, String preferenceName, String preferenceValue) throws Exception { + logger.debug("updateUserMobilePreference"); + + boolean success = false; + try { + success = updateUserMobilePreference( + new User(UserId), + preferenceName, + preferenceValue + ); + + } catch (Exception e) { + logger.error("updateUserMobilePreference", e); + throw e; + } + return success; + } + + /** + * + * @param updateOrderListPreference + * @return + * @throws Exception + */ + private boolean updateLoanByUser(LoanByUserOrderPreferenceViewListJaxb updateOrderListPreference) throws Exception { + logger.debug("updateLoanByUser"); + try { + for (int i = 0; i < updateOrderListPreference.getLoanByUserOrderPreferences().size(); i++) { + LoanByUserOrderPreferenceViewJaxb preference = updateOrderListPreference.getLoanByUserOrderPreferences().get(i); + List parameters = new ArrayList<>(); + + parameters.add( + new ModelParameter( + LoanByUserCfg.FIELD_ORDER_IN_LIST, + preference.getOrderInList() + ) + ); + + parameters.add( + new ModelParameter( + LoanByUserCfg.FIELD_ID, + new LoanByUserId( + preference.getId(), + preference.getUserId() + ) + ) + ); + + loanByUserOrderPreferenceViewRepository.updateQuery( + LoanByUserCfg.QUERY_UPDATE_ORDER_IN_LIST, + parameters + ); + } + return true; + } catch (Exception e) { + logger.error("updateLoanByUser", e); + throw e; + } + } + + /** + * + * @param user + * @param preferenceName + * @param preferenceValue + * @return + * @throws Exception + */ + private boolean updateUserMobilePreference(User user, String preferenceName, String preferenceValue) throws Exception { + logger.debug("updateUserMobilePreference"); + + boolean success = false; + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserMobilePreferenceCfg.FIELD_USER, user)); + parameters.add(new ModelParameter(UserMobilePreferenceCfg.FIELD_PREFERENCE_NAME, preferenceName)); + + UserMobilePreference userMobilePreference = userMobilePreferenceRepository.findUserMobilePreference( + UserMobilePreference.class, + UserMobilePreferenceCfg.QUERY_FIND_MOBILE_PREFERENCE_BY_USER_AND_PREFERENCE_NAME, + parameters); + + if (null != userMobilePreference) { + parameters.clear(); + + parameters.add(new ModelParameter(UserMobilePreferenceCfg.FIELD_PREFERENCE_VALUE, preferenceValue)); + parameters.add(new ModelParameter(UserMobilePreferenceCfg.FIELD_LAST_UPDATED_BY, user.getId())); + parameters.add(new ModelParameter(UserMobilePreferenceCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(UserMobilePreferenceCfg.FIELD_ID, userMobilePreference.getId())); + + success = userMobilePreferenceRepository.updateQueryUserMobilePreference( + UserMobilePreferenceCfg.QUERY_UPDATE_PREFERENCE_VALUE, + parameters + ); + } else { + userMobilePreference = new UserMobilePreference( + user, + preferenceName, + preferenceValue, + user.getId()); + success = userMobilePreferenceRepository.insertUserMobilePreference(userMobilePreference); + } + } catch (Exception e) { + logger.error("updateUserMobilePreference", e); + throw e; + } + return success; + } + + /** + * + * @param userId + * @param officeId + * @return + * @throws Exception + */ + public ConfigurationJaxb findConfigurationButton(String userId, String officeId) throws Exception { + logger.debug("findConfigurationButton"); + ConfigurationJaxb configuration; + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_USER, new User(userId))); + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_OFFICE, new Office(officeId))); + + Long result = userMobilePreferenceRepository.count(ClosingDayCfg.QUERY_COUNT_CLOSING_DATE_BY_USER_AND_OFFICE, parameters); + configuration = new ConfigurationJaxb(result.compareTo(new Long(0)) == 0); + } catch (Exception e) { + logger.error("findConfigurationButton", e); + configuration = new ConfigurationJaxb(false); + } + return configuration; + } + + private static final long serialVersionUID = 6329489276545356862L; + final Logger logger = LogManager.getLogger(SystemPreferenceController.class); + + private final LoanByUserOrderPreferenceViewRepository loanByUserOrderPreferenceViewRepository; + private final UserMobilePreferenceRepository userMobilePreferenceRepository; + + public SystemPreferenceController() { + this.loanByUserOrderPreferenceViewRepository = new LoanByUserOrderPreferenceViewRepository(); + this.userMobilePreferenceRepository = new UserMobilePreferenceRepository(); + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/reports/ReportsController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/reports/ReportsController.java new file mode 100644 index 0000000..7d0f190 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/reports/ReportsController.java @@ -0,0 +1,54 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.reports; + +import com.arrebol.apc.controller.mobile.repository.reports.ReportsRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.reports.UserWeekReport; +import com.arrebol.apc.model.reports.constance.UserWeekReportCfg; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class ReportsController implements Serializable { + + /** + * + * @param id + * @return + * @throws Exception + */ + public UserWeekReport findUserWeekReportDetailsByUser(String id) throws Exception { + try { + ReportsRepository reportsRepository = new ReportsRepository(); + List parameters = new ArrayList<>(); + + parameters.add( + new ModelParameter(UserWeekReportCfg.FIELD_ID, id) + ); + + return reportsRepository.findUserWeekReportDetailsByUser(UserWeekReport.class, UserWeekReportCfg.QUERY_FIND_USER_WEEK_REPORT_BY_USER, parameters); + } catch (Exception e) { + logger.error("findUserWeekReportDetailsByUser", e); + throw e; + } + } + + private static final long serialVersionUID = -5280895557294295916L; + final Logger logger = LogManager.getLogger(getClass()); + + public ReportsController() { + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/route/RouteController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/route/RouteController.java new file mode 100644 index 0000000..780db71 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/route/RouteController.java @@ -0,0 +1,44 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.route; + +import com.arrebol.apc.controller.mobile.moxy.views.ContainerRoutes; +import com.arrebol.apc.controller.mobile.repository.route.RouteRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.constance.RouteCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class RouteController implements Serializable { + + public ContainerRoutes findAllRoutesAvailables(String officeId) throws Exception { + try { + RouteRepository repository = new RouteRepository(); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(RouteCfg.FIELD_OFFICE, new Office(officeId))); + parameters.add(new ModelParameter(RouteCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + + return repository.findAllRoutesAvailables(RouteCfg.QUERY_FIND_ALL_AVAILABLES_ROUTES, parameters); + } catch (Exception e) { + logger.error("findAllRoutesAvailables", e); + throw e; + } + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/search/PersonSearchController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/search/PersonSearchController.java new file mode 100644 index 0000000..0e66d5d --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/search/PersonSearchController.java @@ -0,0 +1,175 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.search; + +import com.arrebol.apc.controller.mobile.repository.views.PersonSearchHistoricalDetailsViewRepository; +import com.arrebol.apc.controller.mobile.repository.views.PersonSearchViewRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.LoanByUserCfg; +import com.arrebol.apc.model.core.constance.LoanCfg; +import com.arrebol.apc.model.core.constance.PersonSearchHistoricalDetailsViewCfg; +import com.arrebol.apc.model.core.constance.PersonSearchViewCfg; +import com.arrebol.apc.model.core.constance.UserCfg; +import com.arrebol.apc.model.views.LoanByUserView; +import com.arrebol.apc.model.views.PersonSearchDetailView; +import com.arrebol.apc.model.views.PersonSearchHistoricalDetailsView; +import com.arrebol.apc.model.views.PersonSearchView; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class PersonSearchController implements Serializable { + + /** + * + * @param nameToSearch + * @return + * @throws Exception + */ + public PersonSearchView fullNameEqualsToPersonSearch(String nameToSearch) throws Exception { + try { + List parameters = new ArrayList<>(); + + parameters.add( + new ModelParameter( + PersonSearchViewCfg.FIELD_PERSON_SEARCH, + nameToSearch + ) + ); + + PersonSearchView result = (PersonSearchView) personSearchViewRepository.findResultXML( + PersonSearchView.class, + PersonSearchViewCfg.QUERY_FULL_NAME_EQUALS_TO_PERSON_SEARCH, + parameters + ); + + if (null == result) { + result = new PersonSearchView("N/A", "N/A"); + } + return result; + } catch (Exception e) { + logger.error("findAllCoincidences", e); + throw e; + } + } + + /** + * + * @param search + * @return If any return list of coincidences otherwise return empty list. + * @throws Exception + */ + public List findAllCoincidences(String search) throws Exception { + logger.debug("findAllCoincidences"); + try { + List parameters = new ArrayList<>(); + + parameters.add( + new ModelParameter( + PersonSearchViewCfg.FIELD_PERSON_SEARCH, + search + ) + ); + + return personSearchViewRepository.findResultList( + PersonSearchView.class, + PersonSearchViewCfg.QUERY_LIKE_BY_PERSON_SEARCH, + parameters + ); + } catch (Exception e) { + logger.error("findAllCoincidences", e); + throw e; + } + } + + /** + * + * @param personSearchId + * @return + * @throws Exception + */ + public PersonSearchDetailView findPersonSearchDetail(String personSearchId) throws Exception { + logger.debug("findPersonSearchDetail"); + try { + return personSearchViewRepository.findResult(PersonSearchDetailView.class, personSearchId); + } catch (Exception e) { + logger.error("findPersonSearchDetail", e); + throw e; + } + } + + /** + * + * @param personSearchId + * @return + * @throws Exception + */ + public List findPersonHistoricalDetailsByPersonId(String personSearchId) throws Exception { + logger.debug("findPersonHistoricalDetailsByPersonId"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PersonSearchHistoricalDetailsViewCfg.FIELD_PERSON_SEARCH_ID, personSearchId)); + + return personSearchHistoricalDetailsViewRepository.findAllByPersonId( + PersonSearchHistoricalDetailsView.class, + PersonSearchHistoricalDetailsViewCfg.QUERY_FIND_PERSON_SEARCH_HISTORICAL_DETAILS_BY_PERSON_ID, + parameters); + } catch (Exception e) { + logger.error("findPersonHistoricalDetailsByPersonId", e); + throw e; + } + } + + //Necesito utilizar tuple + /** + * + * @param idUser + * @param personSearch + * @return + * @throws Exception + */ + public LoanByUserView searchPaymentDetails(String idUser, String personSearch) throws Exception { + logger.debug("searchPaymentDetails"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_CUSTOMER, new People(personSearch))); + parameters.add(new ModelParameter(LoanByUserCfg.FIELD_USER, new User(idUser))); + parameters.add(new ModelParameter(UserCfg.FIELD_ID, idUser)); + + return (LoanByUserView) personSearchViewRepository.findResultTupleXML( + LoanCfg.QUERY_SEARCH_PAYMENT_DETAILS, + parameters); + + } catch (Exception e) { + logger.error("searchPaymentDetails", e); + throw e; + } + } + + private static final long serialVersionUID = -3224360462532091921L; + final Logger logger = LogManager.getLogger(PersonSearchController.class); + + final private PersonSearchViewRepository personSearchViewRepository; + final private PersonSearchHistoricalDetailsViewRepository personSearchHistoricalDetailsViewRepository; + + public PersonSearchController() { + this.personSearchViewRepository = new PersonSearchViewRepository(); + this.personSearchHistoricalDetailsViewRepository = new PersonSearchHistoricalDetailsViewRepository(); + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/tracking/PaymentTrackingController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/tracking/PaymentTrackingController.java new file mode 100644 index 0000000..79783c3 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/tracking/PaymentTrackingController.java @@ -0,0 +1,69 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.tracking; + +import com.arrebol.apc.controller.mobile.moxy.views.PaymentTrackingViewJaxb; +import com.arrebol.apc.controller.mobile.repository.tracking.PaymentTrackingRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.views.AdvanceUserDailyView; +import com.arrebol.apc.model.views.constance.AdvanceUserDailyViewCfg; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class PaymentTrackingController implements Serializable { + + public PaymentTrackingViewJaxb paymentTrakingByUserDetails(String idUser, String idOffice) { + PaymentTrackingViewJaxb paymentTracking = new PaymentTrackingViewJaxb(); + logger.debug("paymentTrakingByUserDetails"); + try { + + List parameters = new ArrayList<>(); + + parameters.add( + new ModelParameter( + AdvanceUserDailyViewCfg.FIELD_VIEW_USER, + new User(idUser) + ) + ); + parameters.add( + new ModelParameter( + AdvanceUserDailyViewCfg.FIELD_VIEW_OFFICE, + new Office(idOffice) + ) + ); + + PaymentTrackingRepository repository = new PaymentTrackingRepository(); + + AdvanceUserDailyView result = repository.paymentTrakingByUserDetails( + AdvanceUserDailyView.class, + AdvanceUserDailyViewCfg.QUERY_PAYMENT_TRACKING_BY_IDS, + parameters); + + if (null != result) { + paymentTracking.setTotalExpected(result.getTotalExpected()); + paymentTracking.setTotalNow(result.getTotalNow()); + } + } catch (Exception e) { + logger.error("paymentTrakingByUserDetails"); + } + + return paymentTracking; + } + + private static final long serialVersionUID = -3224360462532091920L; + final Logger logger = LogManager.getLogger(PaymentTrackingController.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/user/UserController.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/user/UserController.java new file mode 100644 index 0000000..2cd14fd --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/controller/user/UserController.java @@ -0,0 +1,95 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.user; + +import com.arrebol.apc.controller.mobile.repository.user.UserRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.UserCfg; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserController implements Serializable { + + /** + * + * @param userId + * @return + * @throws Exception + */ + public boolean isUserEnebled(String userId) throws Exception { + logger.info("isUserEnebled"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserCfg.FIELD_ID, userId)); + + return userId.equals(userRepository.findUserStatusById(UserCfg.QUERY_VERIFY_USER_STATUS_BY_ID, parameters)); + } catch (Exception e) { + logger.error("isUserEnebled", e); + throw e; + } + } + + /** + * + * @param userId + * @return + * @throws Exception + */ + public boolean containtsUserManagementProperty(String userId) throws Exception { + logger.info("containtsUserManagementProperty"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserCfg.FIELD_ID, userId)); + + return userRepository.containtsUserManagementProperty(UserCfg.QUERY_IS_USER_MANAGMENT, parameters); + } catch (Exception e) { + logger.error("containtsUserManagementProperty", e); + throw e; + } + } + + /** + * + * @param idOffice + * @return + * @throws Exception + */ + public List listOfUsersByOffice(String idOffice) throws Exception { + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserCfg.FIELD_OFFICE, new Office(idOffice))); + + return userRepository.listOfUsersByOffice(UserCfg.QUERY_LIST_OF_USERS_BY_OFFICE, parameters); + } catch (Exception e) { + logger.error("listOfUsersByOffice", e); + throw e; + } + } + + private static final long serialVersionUID = -2705701746315543593L; + final Logger logger = LogManager.getLogger(getClass()); + + private final UserRepository userRepository; + + public UserController() { + this.userRepository = new UserRepository(); + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/AuthorizeTransferList.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/AuthorizeTransferList.java new file mode 100644 index 0000000..db61a0a --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/AuthorizeTransferList.java @@ -0,0 +1,96 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.json.loan; + +import java.util.List; +import java.util.Objects; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "authorizeTransferList") +public class AuthorizeTransferList { + + private String idUpdateUser; + private String comments; + private List transferListToUpdateStatus; + + /** + * + */ + public AuthorizeTransferList() { + } + + /** + * + * @param idUpdateUser + * @param comments + * @param transferListToUpdateStatus + */ + public AuthorizeTransferList(String idUpdateUser, String comments, List transferListToUpdateStatus) { + this.idUpdateUser = idUpdateUser; + this.comments = comments; + this.transferListToUpdateStatus = transferListToUpdateStatus; + } + + @XmlElement(name = "idUpdateUser") + public String getIdUpdateUser() { + return idUpdateUser; + } + + public void setIdUpdateUser(String idUpdateUser) { + this.idUpdateUser = idUpdateUser; + } + + @XmlElement(name = "comments") + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + @XmlElement(name = "transferListToUpdateStatus") + public List getTransferListToUpdateStatus() { + return transferListToUpdateStatus; + } + + public void setTransferListToUpdateStatus(List transferListToUpdateStatus) { + this.transferListToUpdateStatus = transferListToUpdateStatus; + } + + @Override + public int hashCode() { + int hash = 3; + hash = 31 * hash + Objects.hashCode(this.idUpdateUser); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final AuthorizeTransferList other = (AuthorizeTransferList) obj; + if (!Objects.equals(this.idUpdateUser, other.idUpdateUser)) { + return false; + } + return true; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/AuthorizeTransferPaymentsDto.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/AuthorizeTransferPaymentsDto.java new file mode 100644 index 0000000..6656274 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/AuthorizeTransferPaymentsDto.java @@ -0,0 +1,117 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.json.loan; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "authorizeTransferPaymentsDto") +public class AuthorizeTransferPaymentsDto { + + private String idLoan; + private String strDate; + private String customerName; + private String endorsementName; + private String userName; + private Double amount; + private String comments; + + /** + * + */ + public AuthorizeTransferPaymentsDto() { + } + + /** + * + * @param idLoan + * @param strDate + * @param customerName + * @param endorsementName + * @param userName + * @param amount + * @param comments + */ + public AuthorizeTransferPaymentsDto(String idLoan, String strDate, String customerName, String endorsementName, String userName, Double amount, String comments) { + this.idLoan = idLoan; + this.strDate = strDate; + this.customerName = customerName; + this.endorsementName = endorsementName; + this.userName = userName; + this.amount = amount; + this.comments = comments; + } + + @XmlElement(name = "idLoan") + public String getIdLoan() { + return idLoan; + } + + public void setIdLoan(String idLoan) { + this.idLoan = idLoan; + } + + @XmlElement(name = "strDate") + public String getStrDate() { + return strDate; + } + + public void setStrDate(String strDate) { + this.strDate = strDate; + } + + @XmlElement(name = "customerName") + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + @XmlElement(name = "endorsementName") + public String getEndorsementName() { + return endorsementName; + } + + public void setEndorsementName(String endorsementName) { + this.endorsementName = endorsementName; + } + + @XmlElement(name = "userName") + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + @XmlElement(name = "amount") + public Double getAmount() { + return amount; + } + + public void setAmount(Double amount) { + this.amount = amount; + } + + @XmlElement(name = "comments") + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/DeleteLoanDetailsJaxb.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/DeleteLoanDetailsJaxb.java new file mode 100644 index 0000000..03f6fda --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/DeleteLoanDetailsJaxb.java @@ -0,0 +1,117 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.json.loan; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "deleteLoanDetailsJaxb") +public class DeleteLoanDetailsJaxb { + + private Boolean approvedOrPendingRenovation; + private Boolean todayPayment; + private Boolean todayFee; + private String loanId; + + public DeleteLoanDetailsJaxb() { + } + + /** + * + * @param approvedOrPendingRenovation + * @param todayPayment + * @param todayFee + */ + public DeleteLoanDetailsJaxb(Boolean approvedOrPendingRenovation, Boolean todayPayment, Boolean todayFee) { + this.approvedOrPendingRenovation = approvedOrPendingRenovation; + this.todayPayment = todayPayment; + this.todayFee = todayFee; + } + + /** + * + * @param approvedOrPendingRenovation + * @param todayPayment + * @param todayFee + * @param loanId + */ + public DeleteLoanDetailsJaxb(Boolean approvedOrPendingRenovation, Boolean todayPayment, Boolean todayFee, String loanId) { + this.approvedOrPendingRenovation = approvedOrPendingRenovation; + this.todayPayment = todayPayment; + this.todayFee = todayFee; + this.loanId = loanId; + } + + /** + * + * @param todayPayment + * @param todayFee + */ + public DeleteLoanDetailsJaxb(Boolean todayPayment, Boolean todayFee) { + this.todayPayment = todayPayment; + this.todayFee = todayFee; + } + + /** + * + * @param todayPayment + * @param todayFee + * @param loanId + */ + public DeleteLoanDetailsJaxb(Boolean todayPayment, Boolean todayFee, String loanId) { + this.todayPayment = todayPayment; + this.todayFee = todayFee; + this.loanId = loanId; + } + + @XmlElement(name = "approvedOrPendingRenovation") + public Boolean getApprovedOrPendingRenovation() { + return approvedOrPendingRenovation; + } + + public void setApprovedOrPendingRenovation(Boolean approvedOrPendingRenovation) { + this.approvedOrPendingRenovation = approvedOrPendingRenovation; + } + + @XmlElement(name = "todayPayment") + public Boolean getTodayPayment() { + return todayPayment; + } + + public void setTodayPayment(Boolean todayPayment) { + this.todayPayment = todayPayment; + } + + @XmlElement(name = "todayFee") + public Boolean getTodayFee() { + return todayFee; + } + + public void setTodayFee(Boolean todayFee) { + this.todayFee = todayFee; + } + + @XmlElement(name = "loanId") + public String getLoanId() { + return loanId; + } + + public void setLoanId(String loanId) { + this.loanId = loanId; + } + + @Override + public String toString() { + return "DeleteLoanDetailsJaxb{" + "approvedOrPendingRenovation=" + approvedOrPendingRenovation + ", todayPayment=" + todayPayment + ", todayFee=" + todayFee + '}'; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/GenericAPCResponserJaxb.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/GenericAPCResponserJaxb.java new file mode 100644 index 0000000..2b4f184 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/GenericAPCResponserJaxb.java @@ -0,0 +1,97 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.json.loan; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "apcResponse") +public class GenericAPCResponserJaxb { + + private Boolean successful; + private String message; + private String idClosingDay; + private String idSmallBox; + private String idGeneralBox; + private Boolean enabledSubmit; + + /** + * + */ + public GenericAPCResponserJaxb() { + } + + /** + * + * @param successful + * @param message + */ + public GenericAPCResponserJaxb(Boolean successful, String message) { + this.successful = successful; + this.message = message; + } + + @XmlElement(name = "successful") + public Boolean getSuccessful() { + return null == successful ? Boolean.FALSE : successful; + } + + public void setSuccessful(Boolean successful) { + this.successful = successful; + } + + @XmlElement(name = "message") + public String getMessage() { + return null == message ? "" : message; + } + + public void setMessage(String message) { + this.message = message; + } + + @XmlElement(name = "idClosingDay") + public String getIdClosingDay() { + return idClosingDay; + } + + public void setIdClosingDay(String idClosingDay) { + this.idClosingDay = idClosingDay; + } + + @XmlElement(name = "idSmallBox") + public String getIdSmallBox() { + return idSmallBox; + } + + public void setIdSmallBox(String idSmallBox) { + this.idSmallBox = idSmallBox; + } + + @XmlElement(name = "idGeneralBox") + public String getIdGeneralBox() { + return idGeneralBox; + } + + public void setIdGeneralBox(String idGeneralBox) { + this.idGeneralBox = idGeneralBox; + } + + @XmlElement(name = "enabledSubmit") + public Boolean getEnabledSubmit() { + return null == enabledSubmit ? Boolean.FALSE : enabledSubmit; + } + + public void setEnabledSubmit(Boolean enabledSubmit) { + this.enabledSubmit = enabledSubmit; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/LoanTypeJaxb.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/LoanTypeJaxb.java new file mode 100644 index 0000000..1f0977f --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/LoanTypeJaxb.java @@ -0,0 +1,73 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.json.loan; + +import java.math.BigDecimal; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "loan") +public class LoanTypeJaxb { + + private String id; + private BigDecimal payment; + private String description; + + public LoanTypeJaxb() { + } + + public LoanTypeJaxb(String id, BigDecimal payment) { + this.id = id; + this.payment = payment; + } + + public LoanTypeJaxb(String id, BigDecimal payment, String description) { + this.id = id; + this.payment = payment; + this.description = description; + } + + @XmlElement(name = "id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + @XmlElement(name = "payment") + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + @XmlElement(name = "description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + + + @Override + public String toString() { + return "LoanTypeJaxb{" + "payment=" + payment + '}'; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/LoanTypeListJaxb.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/LoanTypeListJaxb.java new file mode 100644 index 0000000..f775c4b --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/LoanTypeListJaxb.java @@ -0,0 +1,48 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.json.loan; + +import java.util.List; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "availableLoans") +public class LoanTypeListJaxb { + + private List loans; + + public LoanTypeListJaxb() { + } + + /** + * + * @param loans + */ + public LoanTypeListJaxb(List loans) { + this.loans = loans; + } + + @XmlElement(name = "loans") + public List getLoans() { + return loans; + } + + public void setLoans(List loans) { + this.loans = loans; + } + + @Override + public String toString() { + return "LoanTypeListJaxb{" + "loans=" + loans + '}'; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/TransferListToUpdateStatus.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/TransferListToUpdateStatus.java new file mode 100644 index 0000000..075e456 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/TransferListToUpdateStatus.java @@ -0,0 +1,71 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.json.loan; + +import java.util.Objects; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "transferListToUpdateStatus") +public class TransferListToUpdateStatus { + + private String idLoan; + + /** + * + */ + public TransferListToUpdateStatus() { + } + + /** + * + * @param idLoan + */ + public TransferListToUpdateStatus(String idLoan) { + this.idLoan = idLoan; + } + + @XmlElement(name = "idLoan") + public String getIdLoan() { + return idLoan; + } + + public void setIdLoan(String idLoan) { + this.idLoan = idLoan; + } + + @Override + public int hashCode() { + int hash = 3; + hash = 79 * hash + Objects.hashCode(this.idLoan); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final TransferListToUpdateStatus other = (TransferListToUpdateStatus) obj; + if (!Objects.equals(this.idLoan, other.idLoan)) { + return false; + } + return true; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/UpdateLoanToDeliveryStatusDTO.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/UpdateLoanToDeliveryStatusDTO.java new file mode 100644 index 0000000..461fe6c --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/UpdateLoanToDeliveryStatusDTO.java @@ -0,0 +1,102 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.json.loan; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "updateLoanToDeliveryStatusDTO") +public class UpdateLoanToDeliveryStatusDTO { + + private String idLoan; + private String strDate; + private String customerName; + private String endorsementName; + private String userName; + private Double amount; + + public UpdateLoanToDeliveryStatusDTO() { + } + + /** + * + * @param idLoan + * @param strDate + * @param customerName + * @param endorsementName + * @param userName + * @param amount + */ + public UpdateLoanToDeliveryStatusDTO(String idLoan, String strDate, String customerName, String endorsementName, String userName, Double amount) { + this.idLoan = idLoan; + this.strDate = strDate; + this.customerName = customerName; + this.endorsementName = endorsementName; + this.userName = userName; + this.amount = amount; + } + + @XmlElement(name = "idLoan") + public String getIdLoan() { + return idLoan; + } + + public void setIdLoan(String idLoan) { + this.idLoan = idLoan; + } + + @XmlElement(name = "strDate") + public String getStrDate() { + return strDate; + } + + public void setStrDate(String strDate) { + this.strDate = strDate; + } + + @XmlElement(name = "customerName") + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + @XmlElement(name = "endorsementName") + public String getEndorsementName() { + return endorsementName; + } + + public void setEndorsementName(String endorsementName) { + this.endorsementName = endorsementName; + } + + @XmlElement(name = "userName") + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + @XmlElement(name = "amount") + public Double getAmount() { + return amount; + } + + public void setAmount(Double amount) { + this.amount = amount; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/UpdateLoanToDeliveryStatusList.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/UpdateLoanToDeliveryStatusList.java new file mode 100644 index 0000000..584a1ca --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/json/loan/UpdateLoanToDeliveryStatusList.java @@ -0,0 +1,67 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.json.loan; + +import java.util.List; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "updateLoanToDeliveryStatusList") +public class UpdateLoanToDeliveryStatusList { + + private String idUpdateUser; + private String comments; + private List loanToDeliveryList; + + public UpdateLoanToDeliveryStatusList() { + } + + /** + * + * @param idUpdateUser + * @param comments + * @param loanToDeliveryList + */ + public UpdateLoanToDeliveryStatusList(String idUpdateUser, String comments, List loanToDeliveryList) { + this.idUpdateUser = idUpdateUser; + this.comments = comments; + this.loanToDeliveryList = loanToDeliveryList; + } + + @XmlElement(name = "idUpdateUser") + public String getIdUpdateUser() { + return idUpdateUser; + } + + public void setIdUpdateUser(String idUpdateUser) { + this.idUpdateUser = idUpdateUser; + } + + @XmlElement(name = "comments") + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + @XmlElement(name = "loanToDeliveryList") + public List getLoanToDeliveryList() { + return loanToDeliveryList; + } + + public void setLoanToDeliveryList(List loanToDeliveryList) { + this.loanToDeliveryList = loanToDeliveryList; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/PersonMxy.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/PersonMxy.java new file mode 100644 index 0000000..e9e3afe --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/PersonMxy.java @@ -0,0 +1,122 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.moxy; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public abstract class PersonMxy { + + protected String id; + protected String firstName; + protected String secondName; + protected String lastName; + protected String middleName; + protected String addressHome; + protected String addressWork; + protected String phoneHome; + protected String phoneWork; + protected String thumbnail; + + public PersonMxy() { + } + + public PersonMxy(String id, String firstName, String lastName, String thumbnail) { + this.id = id; + this.firstName = firstName; + this.lastName = lastName; + this.thumbnail = thumbnail; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getSecondName() { + return secondName; + } + + public void setSecondName(String secondName) { + this.secondName = secondName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getMiddleName() { + return middleName; + } + + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + + public String getAddressHome() { + return addressHome; + } + + public void setAddressHome(String addressHome) { + this.addressHome = addressHome; + } + + public String getAddressWork() { + return addressWork; + } + + public void setAddressWork(String addressWork) { + this.addressWork = addressWork; + } + + public String getPhoneHome() { + return phoneHome; + } + + public void setPhoneHome(String phoneHome) { + this.phoneHome = phoneHome; + } + + public String getPhoneWork() { + return phoneWork; + } + + public void setPhoneWork(String phoneWork) { + this.phoneWork = phoneWork; + } + + public String getThumbnail() { + return thumbnail; + } + + public void setThumbnail(String thumbnail) { + this.thumbnail = thumbnail; + } + + @Override + public String toString() { + return "PersonMxy{" + "firstName=" + firstName + ", lastName=" + lastName + '}'; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/login/UserMxy.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/login/UserMxy.java new file mode 100644 index 0000000..f230c8c --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/login/UserMxy.java @@ -0,0 +1,121 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.moxy.login; + +import com.arrebol.apc.controller.mobile.moxy.PersonMxy; +import java.util.List; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserMxy extends PersonMxy { + + private String userName; + private String officeId; + private String routeId; + private String certifier; + private String management; + + private List preferences; + + public UserMxy() { + } + + /** + * + * @param id + * @param userName + * @param thumbnail + * @param officeId + * @param routeId + * @param certifier + */ + public UserMxy(String id, String userName, String thumbnail, String officeId, String routeId, String certifier) { + this.id = id; + this.userName = userName; + this.thumbnail = thumbnail; + this.officeId = officeId; + this.routeId = routeId; + this.certifier = certifier; + } + + /** + * + * @param id + * @param userName + * @param thumbnail + * @param officeId + * @param routeId + * @param certifier + * @param management + */ + public UserMxy(String id, String userName, String thumbnail, String officeId, String routeId, String certifier, String management) { + this.id = id; + this.userName = userName; + this.thumbnail = thumbnail; + this.officeId = officeId; + this.routeId = routeId; + this.certifier = certifier; + this.management = management; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getOfficeId() { + return officeId; + } + + public void setOfficeId(String officeId) { + this.officeId = officeId; + } + + public void setPreferences(List preferences) { + this.preferences = preferences; + } + + public List getPreferences() { + return preferences; + } + + public String getRouteId() { + return routeId; + } + + public void setRouteId(String routeId) { + this.routeId = routeId; + } + + public String getCertifier() { + return certifier; + } + + public void setCertifier(String certifier) { + this.certifier = certifier; + } + + public String getManagement() { + return management; + } + + public void setManagement(String management) { + this.management = management; + } + + @Override + public String toString() { + return "UserMxy{" + "userName=" + userName + ", preferences=" + preferences + '}'; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/login/UserPreferenceMxy.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/login/UserPreferenceMxy.java new file mode 100644 index 0000000..dff1fee --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/login/UserPreferenceMxy.java @@ -0,0 +1,53 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.moxy.login; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserPreferenceMxy { + + private String preferenceName; + private String preferenceValue; + + public UserPreferenceMxy() { + } + + /** + * + * @param preferenceName + * @param preferenceValue + */ + public UserPreferenceMxy(String preferenceName, String preferenceValue) { + this.preferenceName = preferenceName; + this.preferenceValue = preferenceValue; + } + + public String getPreferenceName() { + return preferenceName; + } + + public void setPreferenceName(String preferenceName) { + this.preferenceName = preferenceName; + } + + public String getPreferenceValue() { + return preferenceValue; + } + + public void setPreferenceValue(String preferenceValue) { + this.preferenceValue = preferenceValue; + } + + @Override + public String toString() { + return "UserPreferenceMxy{" + "preferenceName=" + preferenceName + '}'; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/ContainerRoutes.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/ContainerRoutes.java new file mode 100644 index 0000000..1282ac4 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/ContainerRoutes.java @@ -0,0 +1,43 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.moxy.views; + +import java.util.List; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "containerRoutes") +public class ContainerRoutes { + + private List routes; + + public ContainerRoutes() { + } + + /** + * + * @param routes + */ + public ContainerRoutes(List routes) { + this.routes = routes; + } + + @XmlElement(name = "routes") + public List getRoutes() { + return routes; + } + + public void setRoutes(List routes) { + this.routes = routes; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/LoanByUserOrderPreferenceViewJaxb.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/LoanByUserOrderPreferenceViewJaxb.java new file mode 100644 index 0000000..e96591d --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/LoanByUserOrderPreferenceViewJaxb.java @@ -0,0 +1,116 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.moxy.views; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "loanByUserOrderPreference") +public class LoanByUserOrderPreferenceViewJaxb { + + private String id; + + private String userId; + + private String customerName; + + private String customerAddressHome; + + private String customerAddressBusiness; + + private Integer orderInList; + + public LoanByUserOrderPreferenceViewJaxb() { + } + + /** + * + * @param id + * @param userId + * @param orderInList + */ + public LoanByUserOrderPreferenceViewJaxb(String id, String userId, Integer orderInList) { + this.id = id; + this.userId = userId; + this.orderInList = orderInList; + } + + /** + * + * @param customerName + * @param orderInList + */ + public LoanByUserOrderPreferenceViewJaxb(String customerName, Integer orderInList) { + this.customerName = customerName; + this.orderInList = orderInList; + } + + @XmlAttribute(name = "id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + @XmlAttribute(name = "userId") + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + @XmlAttribute(name = "customerName") + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + @XmlAttribute(name = "customerAddressHome") + public String getCustomerAddressHome() { + return customerAddressHome; + } + + public void setCustomerAddressHome(String customerAddressHome) { + this.customerAddressHome = customerAddressHome; + } + + @XmlAttribute(name = "customerAddressBusiness") + public String getCustomerAddressBusiness() { + return customerAddressBusiness; + } + + public void setCustomerAddressBusiness(String customerAddressBusiness) { + this.customerAddressBusiness = customerAddressBusiness; + } + + @XmlAttribute(name = "orderInList") + public Integer getOrderInList() { + return orderInList; + } + + public void setOrderInList(Integer orderInList) { + this.orderInList = orderInList; + } + + @Override + public String toString() { + return "LoanByUserOrderPreferenceViewJaxb{" + "customerName=" + customerName + ", orderInList=" + orderInList + '}'; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/LoanByUserOrderPreferenceViewListJaxb.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/LoanByUserOrderPreferenceViewListJaxb.java new file mode 100644 index 0000000..db05f0e --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/LoanByUserOrderPreferenceViewListJaxb.java @@ -0,0 +1,39 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.moxy.views; + +import java.util.List; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "systemPreferences") +public class LoanByUserOrderPreferenceViewListJaxb { + + List loanByUserOrderPreferences; + + public LoanByUserOrderPreferenceViewListJaxb() { + } + + public LoanByUserOrderPreferenceViewListJaxb(List loanByUserOrderPreferences) { + this.loanByUserOrderPreferences = loanByUserOrderPreferences; + } + + @XmlElement(name = "loanByUserOrderPreferences") + public List getLoanByUserOrderPreferences() { + return loanByUserOrderPreferences; + } + + public void setLoanByUserOrderPreferences(List loanByUserOrderPreferences) { + this.loanByUserOrderPreferences = loanByUserOrderPreferences; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/PaymentTrackingViewJaxb.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/PaymentTrackingViewJaxb.java new file mode 100644 index 0000000..36eacce --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/PaymentTrackingViewJaxb.java @@ -0,0 +1,60 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.moxy.views; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "paymentTracking") +public class PaymentTrackingViewJaxb { + + private String id; + + private Integer totalExpected; + + private Integer totalNow; + + @XmlElement(name = "id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + @XmlElement(name = "totalExpected") + public Integer getTotalExpected() { + if (null == totalExpected) { + totalExpected = 0; + } + return totalExpected; + } + + public void setTotalExpected(Integer totalExpected) { + this.totalExpected = totalExpected; + } + + @XmlElement(name = "totalNow") + public Integer getTotalNow() { + if (null == totalNow) { + totalNow = 0; + } + + return totalNow; + } + + public void setTotalNow(Integer totalNow) { + this.totalNow = totalNow; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/RouteJaxb.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/RouteJaxb.java new file mode 100644 index 0000000..14c6b0d --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/moxy/views/RouteJaxb.java @@ -0,0 +1,49 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.moxy.views; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "route") +public class RouteJaxb { + + private String id; + private String name; + + public RouteJaxb() { + } + + public RouteJaxb(String id, String name) { + this.id = id; + this.name = name; + } + + @XmlElement(name = "id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + @XmlElement(name = "name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/ArrebolTestRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/ArrebolTestRepository.java new file mode 100644 index 0000000..b7d4d0d --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/ArrebolTestRepository.java @@ -0,0 +1,39 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository; + +import com.arrebol.apc.test.ArrebolTest; +import java.io.Serializable; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class ArrebolTestRepository extends GenericRepository implements Serializable { + + /** + * + * @param arrebolTest + * @return + * @throws Exception + */ + public boolean saveArrebolTest(ArrebolTest arrebolTest) throws Exception { + logger.info("saveArrebolTest"); + try { + return save(arrebolTest); + } catch (Exception e) { + logger.error("saveArrebolTest", e); + throw e; + } + } + + private static final long serialVersionUID = -6564619785642944612L; + final Logger logger = LogManager.getLogger(ArrebolTestRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/GenericRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/GenericRepository.java new file mode 100644 index 0000000..30d1351 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/GenericRepository.java @@ -0,0 +1,671 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository; + +import com.arrebol.apc.controller.mobile.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import java.util.ArrayList; +import java.util.List; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; +import org.hibernate.query.Query; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public abstract class GenericRepository { + + private Session sessionOld; + private Transaction transactionOld; + + /** + * Save an APC entity. + * + * @param entity APC entity in DB. + * @return + * @throws java.lang.Exception + */ + protected boolean save(Object entity) throws Exception { + logger.debug("Save"); + boolean success = false; + + Session session = null; + Transaction transaction = null; + try { + session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + session.save(entity); + + transaction.commit(); + logger.debug("Entity saved: " + entity); + + success = true; + } catch (HibernateException e) { + logger.error("Save Hibernate", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method save() ", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + /* finally { + if (null != session) { + session.close(); + } + }*/ + + return success; + } + + /** + * + * @param entities + * @return + * @throws java.lang.Exception + */ + protected boolean saveMany(List entities) throws Exception { + logger.debug("saveMany"); + boolean success = false; + + Session session = null; + Transaction transaction = null; + try { + session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + for (Object entity : entities) { + session.save(entity); + } + + transaction.commit(); + + logger.debug("Entities saveMany: "); + + success = true; + } catch (HibernateException e) { + logger.error("saveMany Hibernate", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method saveMany() ", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + /* finally { + if (null != session) { + session.close(); + } + }*/ + + return success; + } + + /** + * Update an APC entity. + * + * @param entity APC entity in DB. + * @return + * @throws java.lang.Exception + */ + protected boolean update(Object entity) throws Exception { + logger.debug("update"); + + boolean success = false; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + session.update(entity); + + transaction.commit(); + + logger.debug("Entity updated: " + entity); + + success = true; + } catch (HibernateException e) { + logger.error("update Hibernate", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("update save() ", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + + return success; + } + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + protected boolean updateCreateNamedQuery(String xmlQuery, List parameters) throws Exception { + logger.debug("updateCreateNamedQuery"); + boolean success = false; + + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + if (null != parameters && !parameters.isEmpty()) { + Query query = session.createNamedQuery(xmlQuery); + + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + query.executeUpdate(); + logger.debug("Query update executed"); + } + + transaction.commit(); + + logger.debug("Entity updateCreateNamedQuery"); + + success = true; + } catch (HibernateException e) { + logger.error("updateCreateNamedQuery Hibernate", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method updateCreateNamedQuery() ", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + return success; + } + + /** + * Delete an APC entity. + * + * @param entity APC entity in DB. + * @return + * @throws java.lang.Exception + */ + protected boolean delete(Object entity) throws Exception { + logger.debug("delete"); + boolean success = false; + + Session session = null; + Transaction transaction = null; + try { + session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + session.delete(entity); + + transaction.commit(); + + logger.debug("Entity deleted: " + entity); + + success = true; + } catch (HibernateException e) { + logger.error("delete Hibernate", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method delete() ", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + /* finally { + if (null != session) { + session.close(); + } + }*/ + + return success; + } + + /** + * Find a APC entity. + * + * @param clazz APC entity class name to find in DB. + * @param id + * @return + * @throws java.lang.Exception + */ + protected Object findAPCEntity(Class clazz, String id) throws Exception { + logger.debug("findAPCEntity"); + + Object apcEntity = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + apcEntity = session.get(clazz, id); + + transaction.commit(); + + logger.debug("APC entity found: " + apcEntity); + } catch (HibernateException e) { + logger.error("findAPCEntity Hibernate", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method findAPCEntity() ", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + + return apcEntity; + } + + /** + * Execute a query from XML mapping file. + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + * @throws java.lang.Exception + */ + protected Object createNamedQueryUniqueResult(Class clazz, String xmlQuery, List parameters) throws Exception { + logger.debug("createNamedQueryUniqueResult"); + + Object entity = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + if (null != parameters && !parameters.isEmpty()) { + Query query = session.createNamedQuery(xmlQuery, clazz); + + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + entity = query.uniqueResult(); + } + + transaction.commit(); + logger.debug("APC entity from xml query: " + entity); + } catch (HibernateException e) { + logger.error("createNamedQueryUniqueResult Hibernate", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method createNamedQueryUniqueResult() ", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + + return entity; + } + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + * @throws java.lang.Exception + */ + protected List createNamedQueryResultList(Class clazz, String xmlQuery, List parameters) throws Exception { + logger.debug("createNamedQueryResultList"); + + List entities = new ArrayList<>(); + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + if (null != parameters && !parameters.isEmpty()) { + Query query = session.createNamedQuery(xmlQuery, clazz); + + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + entities = query.getResultList(); + } + + transaction.commit(); + logger.debug("Total of APC entities from xml query: " + entities.size()); + } catch (HibernateException e) { + logger.error("createNamedQueryResultList Hibernate", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method createNamedQueryResultList() ", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + + return entities; + } + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + protected List findEntityList(Class clazz, String xmlQuery, List parameters) throws Exception { + logger.debug("findEntityList"); + + List entities = new ArrayList<>(); + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + Query query = session.createNamedQuery(xmlQuery, clazz); + + if (null != parameters && !parameters.isEmpty()) { + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + } + + entities = query.getResultList(); + + transaction.commit(); + logger.debug("Total of APC entities from xml query: " + entities.size()); + } catch (HibernateException e) { + logger.error("findEntityList Hibernate", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method findEntityList() ", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + + return entities; + } + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @param max + * @return + * @throws java.lang.Exception + */ + protected List createNamedQueryResultList(Class clazz, String xmlQuery, List parameters, int max) throws Exception { + logger.debug("createNamedQueryResultList"); + + List entities = new ArrayList<>(); + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + if (null != parameters && !parameters.isEmpty()) { + Query query = session.createNamedQuery(xmlQuery, clazz); + + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + query.setMaxResults(max); + + entities = query.getResultList(); + } + + transaction.commit(); + logger.debug("Total of APC entities from xml query: " + entities.size()); + } catch (HibernateException e) { + logger.error("createNamedQueryResultList Hibernate", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method createNamedQueryResultList() ", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + + return entities; + } + + /** + * + * @param xmlQuery + * @param parameters + * @return + */ + protected List xmlQueryTuple(String xmlQuery, List parameters) { + logger.debug("xmlQueryTuple"); + + List entityList = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createNamedQuery(xmlQuery, Tuple.class); + + if (null != parameters && !parameters.isEmpty()) { + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + entityList = query.getResultList(); + } + + transaction.commit(); + } catch (HibernateException e) { + logger.error("xmlQueryTuple Hibernate", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method xmlQueryTuple() ", e); + + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + + return entityList; + } + + /** + * + * @param xmlUpdateOrDeleteQuery + * @param parameters + * @return + */ + protected boolean xmlUpdateOrDelete(String xmlUpdateOrDeleteQuery, List parameters) { + boolean success = false; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query updateOrDeleteQuery = session.createNamedQuery(xmlUpdateOrDeleteQuery); + + if (null != parameters && !parameters.isEmpty()) { + parameters.forEach((parameter) -> { + updateOrDeleteQuery.setParameter(parameter.getParameter(), parameter.getValue()); + }); + + int total = updateOrDeleteQuery.executeUpdate(); + + if (total > 0) { + transaction.commit(); + success = true; + } else { + transaction.rollback(); + } + } else { + transaction.rollback(); + } + } catch (HibernateException e) { + logger.error("xmlUpdateOrDelete Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method xmlUpdateOrDelete() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + + return success; + } + + public Object genericObjectFromEntity(Class clazz, String xmlQuery, List parameters) throws Exception { + logger.debug("genericObjectFromEntity"); + + Object entity = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createNamedQuery(xmlQuery, clazz); + + if (null != parameters) { + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + } + + entity = query.uniqueResult(); + transaction.commit(); + + logger.debug("APC generic entity from xml query: " + entity); + } catch (HibernateException e) { + logger.error("genericObjectFromEntity Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method genericObjectFromEntity() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + return entity; + } + + protected Session getSession() { + return sessionOld; + } + + protected void openConnection() { + try { + sessionOld = HibernateUtil.getSessionFactory().getCurrentSession(); + transactionOld = getSession().beginTransaction(); + } catch (Exception e) { + logger.error("openConnection", e); + throw e; + } + } + + protected void closeConnection() { + try { + transactionOld.commit(); + } catch (Exception e) { + logger.error("closeConnection", e); + rollback(); + } + } + + protected void rollback() { + if (null != transactionOld) { + transactionOld.rollback(); + } + } + + protected void flushAndClear() { + if (null != sessionOld) { + getSession().flush(); + getSession().clear(); + } + } + + final Logger logger = LogManager.getLogger(GenericRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/ClosingDayRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/ClosingDayRepository.java new file mode 100644 index 0000000..104d7c8 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/ClosingDayRepository.java @@ -0,0 +1,78 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.admin; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.ClosingDayCfg; +import java.io.Serializable; +import java.util.List; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class ClosingDayRepository extends GenericRepository implements Serializable { + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public String findIdEntity(String xmlQuery, List parameters) throws Exception { + try { + for (Tuple tuple : xmlQueryTuple(xmlQuery, parameters)) { + return tuple.get(ClosingDayCfg.FIELD_ID, String.class); + } + + return null; + } catch (Exception e) { + logger.error("findIdEntity", e); + throw e; + } + } + + /** + * + * @param hbmQuery + * @param parameters + * @return + * @throws Exception + */ + public boolean updateClosingDay(String hbmQuery, List parameters) throws Exception { + try { + return xmlUpdateOrDelete(hbmQuery, parameters); + } catch (Exception e) { + logger.error("updateClosingDay", e); + throw e; + } + } + + /** + * + * @param hbmQuery + * @param parameters + * @return + * @throws Exception + */ + public Long countIdClosingDayByEmployee(String hbmQuery, List parameters) throws Exception { + try { + return (Long) genericObjectFromEntity(Long.class, hbmQuery, parameters); + } catch (Exception e) { + logger.error("countIdClosingDayByEmployee", e); + throw e; + } + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/OtherExpenseRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/OtherExpenseRepository.java new file mode 100644 index 0000000..abf7681 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/OtherExpenseRepository.java @@ -0,0 +1,41 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.admin; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.admin.OtherExpense; +import java.io.Serializable; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class OtherExpenseRepository extends GenericRepository implements Serializable { + + /** + * + * @param otherExpense + * @return + * @throws Exception + */ + public boolean saveOtherExpense(OtherExpense otherExpense) throws Exception { + logger.debug("addOtherExpense"); + try { + return save(otherExpense); + } catch (Exception e) { + logger.error("addOtherExpense", e); + throw e; + } + } + + private static final long serialVersionUID = -8510072805726896888L; + final Logger logger = LogManager.getLogger(OtherExpenseRepository.class); + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/StableGeneralBoxRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/StableGeneralBoxRepository.java new file mode 100644 index 0000000..8eb2938 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/StableGeneralBoxRepository.java @@ -0,0 +1,40 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.admin; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class StableGeneralBoxRepository extends GenericRepository implements Serializable { + + /** + * + * @param hbmQuery + * @param parameters + * @return + * @throws Exception + */ + public Long countStableGeneralBoxByOfficeEqualsToCurrentDate(String hbmQuery, List parameters) throws Exception { + try { + return (Long) genericObjectFromEntity(Long.class, hbmQuery, parameters); + } catch (Exception e) { + logger.error("countStableGeneralBoxByOfficeEqualsToCurrentDate", e); + throw e; + } + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/StableSmallBoxRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/StableSmallBoxRepository.java new file mode 100644 index 0000000..ab6a6b1 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/StableSmallBoxRepository.java @@ -0,0 +1,78 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.admin; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.StableSmallBoxCfg; +import java.io.Serializable; +import java.util.List; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class StableSmallBoxRepository extends GenericRepository implements Serializable { + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public String findIdEntity(String xmlQuery, List parameters) throws Exception { + try { + for (Tuple tuple : xmlQueryTuple(xmlQuery, parameters)) { + return tuple.get(StableSmallBoxCfg.FIELD_ID, String.class); + } + + return null; + } catch (Exception e) { + logger.error("findIdEntity", e); + throw e; + } + } + + /** + * + * @param hbmQuery + * @param parameters + * @return + * @throws Exception + */ + public boolean updateStableSmallBox(String hbmQuery, List parameters) throws Exception { + try { + return xmlUpdateOrDelete(hbmQuery, parameters); + } catch (Exception e) { + logger.error("updateStableSmallBox", e); + throw e; + } + } + + /** + * + * @param hbmQuery + * @param parameters + * @return + * @throws Exception + */ + public Long countStableSmallBoxByOfficeEqualsToCurrentDate(String hbmQuery, List parameters) throws Exception { + try { + return (Long) genericObjectFromEntity(Long.class, hbmQuery, parameters); + } catch (Exception e) { + logger.error("countStableSmallBoxByOfficeEqualsToCurrentDate", e); + throw e; + } + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/TransferRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/TransferRepository.java new file mode 100644 index 0000000..63489f1 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/admin/TransferRepository.java @@ -0,0 +1,94 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.admin; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.Transfer; +import com.arrebol.apc.model.ws.parsed.Exchange; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class TransferRepository extends GenericRepository implements Serializable { + + /** + * + * @param transfer + * @return + * @throws Exception + */ + public boolean addTransfer(Transfer transfer) throws Exception { + logger.debug("addTransfer"); + try { + return save(transfer); + } catch (Exception e) { + logger.error("addTransfer", e); + throw e; + } + } + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public boolean updateTransfer(String xmlQuery, List parameters) throws Exception { + logger.debug("updateTransfer"); + try { + return updateCreateNamedQuery(xmlQuery, parameters); + } catch (Exception e) { + logger.error("updateTransfer", e); + throw e; + } + } + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findAllTransferByUserIdAndCurdate(String xmlQuery, List parameters) throws Exception { + logger.debug("findAllTransferByUserIdAndCurdate"); + List results = new ArrayList<>(); + try { + List tuples = xmlQueryTuple(xmlQuery, parameters); + + tuples.forEach((tuple) -> { + results.add( + new Exchange( + tuple.get("id").toString(), + tuple.get("userTransmitter").toString().equals("SENDER"), + (BigDecimal) tuple.get("amountToTransfer"), + tuple.get("actionStatus").toString() + ) + ); + }); + + return results; + } catch (Exception e) { + logger.error("findAllTransferByUserIdAndCurdate", e); + throw e; + } + } + + private static final long serialVersionUID = 1787207383193052932L; + final Logger logger = LogManager.getLogger(TransferRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/bitacora/BitacoraRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/bitacora/BitacoraRepository.java new file mode 100644 index 0000000..db770e7 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/bitacora/BitacoraRepository.java @@ -0,0 +1,40 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.bitacora; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.system.logs.Bitacora; +import java.io.Serializable; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class BitacoraRepository extends GenericRepository implements Serializable { + + /** + * + * @param bitacora + * @return + */ + public boolean saveBitacora(Bitacora bitacora) { + boolean success; + try { + success = save(bitacora); + } catch (Exception e) { + success = false; + logger.error("saveBitacora", e); + } + return success; + } + + final Logger logger = LogManager.getLogger(getClass()); + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/gasoline/GasolineRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/gasoline/GasolineRepository.java new file mode 100644 index 0000000..4ebf827 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/gasoline/GasolineRepository.java @@ -0,0 +1,48 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.gasoline; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.gasoline.Gasoline; +import java.io.Serializable; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class GasolineRepository extends GenericRepository implements Serializable { + + /** + * + * @param gasoline + * @return + * @throws Exception + */ + public boolean saveNewGasolinePayment(Gasoline gasoline) throws Exception { + boolean success = false; + + try { + save(gasoline); + + logger.info("New gasoline payment saved"); + + success = true; + } catch (Exception e) { + logger.error("addNewGasolineEntry", e); + + throw e; + } + + return success; + } + + private static final long serialVersionUID = -5280895557294295010L; + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/jaas/AuthenticationRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/jaas/AuthenticationRepository.java new file mode 100644 index 0000000..754d768 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/jaas/AuthenticationRepository.java @@ -0,0 +1,89 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.jaas; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.MobileUserCfg; +import com.arrebol.apc.model.core.constance.UserMobilePreferenceCfg; +import com.arrebol.apc.model.mobile.access.MobileUser; +import com.arrebol.apc.model.mobile.preference.UserMobilePreference; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class AuthenticationRepository extends GenericRepository implements Serializable { + + /** + * + * @param userName + * @param password + * @return + * @throws Exception + */ + public MobileUser findUser(String userName, String password) throws Exception { + logger.debug("findUser"); + + MobileUser mobileUser = null; + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(MobileUserCfg.FIELD_USER_NAME, userName)); + parameters.add(new ModelParameter(MobileUserCfg.FIELD_PASSWORD, password)); + + mobileUser = (MobileUser) createNamedQueryUniqueResult( + MobileUser.class, + MobileUserCfg.QUERY_FIND_MOBILE_USER_FROM_LOGIN, + parameters + ); + } catch (Exception e) { + logger.error("findUser", e); + throw e; + } + return mobileUser; + } + + /** + * + * @param userId + * @return + * @throws Exception + */ + public List findAllMobilePreferenceByUser(String userId) throws Exception { + logger.debug("findAllMobilePreferenceByUser"); + + List userMobilePreferences = new ArrayList<>(); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserMobilePreferenceCfg.FIELD_USER, new User(userId))); + + userMobilePreferences = createNamedQueryResultList( + UserMobilePreference.class, + UserMobilePreferenceCfg.QUERY_FIND_ALL_MOBILE_PREFERENCES_BY_USER, + parameters + ); + + } catch (Exception e) { + logger.error("findAllMobilePreferenceByUser", e); + throw e; + } + return userMobilePreferences; + } + + private static final long serialVersionUID = 4218734911509288001L; + final Logger logger = LogManager.getLogger(AuthenticationRepository.class); + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/AddAmountRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/AddAmountRepository.java new file mode 100644 index 0000000..b8d2709 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/AddAmountRepository.java @@ -0,0 +1,93 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.loan; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.model.loan.LoanFeeNotification; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.query.Query; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class AddAmountRepository extends GenericRepository implements Serializable { + + /** + * + * @param notification + * @param loanDetails + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public boolean saveNewAmount( + LoanFeeNotification notification, + LoanDetails loanDetails, + String xmlQuery, + List parameters) throws Exception { + logger.debug("saveNewAmount"); + + boolean success = false; + int total = 0; + + try { + openConnection(); + + if (null != notification) { + getSession().save(notification); + logger.info("Notification saved: " + notification); + } + + getSession().save(loanDetails); + logger.info("Loan details saved: " + loanDetails); + + if (null != parameters && !parameters.isEmpty()) { + Query query = getSession().createNamedQuery(xmlQuery); + + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + total = query.executeUpdate(); + logger.info("Query update executed"); + } + + if (total > 0) { + flushAndClear(); + closeConnection(); + + success = true; + + logger.info("Loan successfuly saved"); + } else { + logger.error("Loan could not be added: " + loanDetails); + rollback(); + } + } catch (HibernateException e) { + logger.error("Save Hibernate", e); + rollback(); + throw e; + } catch (Exception e) { + logger.error("Method save() ", e); + rollback(); + throw e; + } + return success; + } + + private static final long serialVersionUID = 6466918195145358594L; + final Logger logger = LogManager.getLogger(AddAmountRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanByRenovationRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanByRenovationRepository.java new file mode 100644 index 0000000..094353f --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanByRenovationRepository.java @@ -0,0 +1,219 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.loan; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.LoanByRenovationCfg; +import com.arrebol.apc.model.core.constance.LoanByUserCfg; +import com.arrebol.apc.model.core.constance.LoanCfg; +import com.arrebol.apc.model.enums.ComissionType; +import com.arrebol.apc.model.enums.LoanRenovationStatus; +import com.arrebol.apc.model.enums.LoanStatus; +import com.arrebol.apc.model.loan.Delivery; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanByRenovation; +import com.arrebol.apc.model.loan.LoanDetails; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.query.Query; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanByRenovationRepository extends GenericRepository implements Serializable { + + private static final long serialVersionUID = 1357519239619447184L; + final Logger logger = LogManager.getLogger(LoanByRenovationRepository.class); + + /** + * + * @param newLoanId + * @return + * @throws Exception + */ + public LoanByRenovation findLoanRenovationByNewLoanId(String newLoanId) throws Exception { + logger.debug("findLoanRenovationByNewLoanId"); + try { + List parameters = new ArrayList<>(); + + parameters.add( + new ModelParameter(LoanByRenovationCfg.FIELD_LOAN_NEW, new Loan(newLoanId)) + ); + + return (LoanByRenovation) createNamedQueryUniqueResult( + LoanByRenovation.class, + LoanByRenovationCfg.QUERY_FIND_LOAN_RENOVATION_BY_NEW_LOAN_ID, + parameters); + } catch (Exception e) { + logger.error("findLoanRenovationByNewLoanId", e); + throw e; + } + } + + /** + * + * @param loanByRenovation + * @param userId + * @param comments + * @param action + * @param amount + * @param discount + * @param loanDetails + * @param totalAmountPaid + * @param newLastReferenceNumber + * @param comission + * @return + * @throws Exception + */ + public boolean updateLoanRenovationFromCerfierView( + LoanByRenovation loanByRenovation, + String userId, + String comments, + boolean action, + BigDecimal amount, + BigDecimal discount, + LoanDetails loanDetails, + BigDecimal totalAmountPaid, + Integer newLastReferenceNumber, + ComissionType comission) throws Exception { + logger.debug("updateLoanRenovationFromCerfierView"); + boolean success = false; + try { + openConnection(); + + Date lastUpdatedOn = new Date(); + List parameters = new ArrayList<>(); + + // Update loanByRenovation details in Renovation table + parameters.add(new ModelParameter(LoanByRenovationCfg.FIELD_LOAN_RENOVATION_STATUS, action ? LoanRenovationStatus.APPROVED : LoanRenovationStatus.REJECTED)); + parameters.add(new ModelParameter(LoanByRenovationCfg.FIELD_COMMENTS, comments)); + parameters.add(new ModelParameter(LoanByRenovationCfg.FIELD_LAST_UPDATED_BY, userId)); + parameters.add(new ModelParameter(LoanByRenovationCfg.FIELD_LAST_UPDATED_ON, lastUpdatedOn)); + parameters.add(new ModelParameter(LoanByRenovationCfg.FIELD_ID, loanByRenovation.getId())); + + if (0 < executeQuery(LoanByRenovationCfg.QUERY_UPDATE_LOAN_RENOVATION, parameters)) { + + parameters.clear(); + + // Update NEW loan details in Loan table + parameters.add(new ModelParameter(LoanCfg.FIELD_LOAN_STATUS, action ? LoanStatus.APPROVED : LoanStatus.REJECTED)); + parameters.add(new ModelParameter(LoanCfg.FIELD_COMMENTS, comments)); + parameters.add(new ModelParameter(LoanCfg.FIELD_CREATED_ON, lastUpdatedOn)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_BY, userId)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_ON, lastUpdatedOn)); + parameters.add(new ModelParameter(LoanCfg.FIELD_ID, loanByRenovation.getLoanNew().getId())); + + if (0 < executeQuery(LoanCfg.QUERY_UPDATE_LOAN_WITH_CREATED_ON_BY_ID_FROM_CERTIFIER_VIEW, parameters)) { + parameters.clear(); + + // Update OLD loan details in Loan table + String commentsOldLoan = action ? "Crédito renovado" : "El certificador rechazo la renovación de este crédito"; + String strQuery = LoanCfg.QUERY_UPDATE_LOAN_BY_ID_FROM_CERTIFIER_VIEW; + + if (action && null != loanDetails && null != totalAmountPaid && null != newLastReferenceNumber) { + parameters.add(new ModelParameter(LoanCfg.FIELD_AMOUNT_PAID, totalAmountPaid)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_REFERENCE_NUMBER, newLastReferenceNumber)); + + strQuery = LoanCfg.QUERY_UPDATE_DISCOUNT_AND_LOAN_BY_ID_FROM_CERTIFIER_VIEW; + } + + parameters.add(new ModelParameter(LoanCfg.FIELD_LOAN_STATUS, action ? LoanStatus.FINISH : LoanStatus.APPROVED)); + parameters.add(new ModelParameter(LoanCfg.FIELD_COMMENTS, commentsOldLoan)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_BY, userId)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_ON, lastUpdatedOn)); + parameters.add(new ModelParameter(LoanCfg.FIELD_ID, loanByRenovation.getLoanOld().getId())); + + if (0 < executeQuery(strQuery, parameters)) { + + // Update OLD loanByUser details in Loan By User Table + List params = new ArrayList<>(); + + params.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN, new Loan(loanByRenovation.getLoanOld().getId()))); + params.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN_BY_USER_STATUS, action ? LoanStatus.FINISH : LoanStatus.APPROVED)); + + Query query1 = getSession().createNamedQuery(LoanByUserCfg.QUERY_UPDATE_LOAN_BY_USER_BY_LOAND_ID); + + params.forEach((param) -> { + query1.setParameter(param.getParameter(), param.getValue()); + }); + + query1.executeUpdate(); + + // Update NEW loanByUser details in Loan By User Table + params.clear(); + + params.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN, new Loan(loanByRenovation.getLoanNew().getId()))); + params.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN_BY_USER_STATUS, action ? LoanStatus.APPROVED : LoanStatus.REJECTED)); + + Query query2 = getSession().createNamedQuery(LoanByUserCfg.QUERY_UPDATE_LOAN_BY_USER_BY_LOAND_ID); + + params.forEach((param) -> { + query2.setParameter(param.getParameter(), param.getValue()); + }); + + query2.executeUpdate(); + + if (action) { + // Insert new loanDetails (discount) in Loan Details table + if (null != loanDetails) { + getSession().save(loanDetails); + } + + // Insert delivery details (To know cash that certifier deliveried) in Delivery Table + Delivery delivery = new Delivery( + new User(userId), + new Loan(loanByRenovation.getLoanNew().getId()), + amount, + userId, + new Date(), + comission + ); + + getSession().save(delivery); + } + + flushAndClear(); + closeConnection(); + + logger.info("Certifier delivery the loan details: " + loanByRenovation); + success = true; + } else { + rollback(); + } + } else { + rollback(); + } + } else { + rollback(); + } + return success; + } catch (Exception e) { + rollback(); + logger.error("updateLoanRenovationFromCerfierView", e); + throw e; + } + } + + private int executeQuery(String xmlQuery, List parameters) { + Query query = getSession().createNamedQuery(xmlQuery); + + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + return query.executeUpdate(); + } +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanByUserRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanByUserRepository.java new file mode 100644 index 0000000..d7b0e05 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanByUserRepository.java @@ -0,0 +1,40 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.loan; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.loan.LoanByUser; +import java.io.Serializable; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanByUserRepository extends GenericRepository implements Serializable { + + /** + * + * @param loanByUser + * @return + * @throws Exception + */ + public boolean saveLoanByUser(LoanByUser loanByUser) throws Exception { + logger.debug("saveLoanByUser"); + try { + return save(loanByUser); + } catch (Exception e) { + logger.error("saveLoanByUser", e); + throw e; + } + } + + private static final long serialVersionUID = 7523456759588286540L; + final Logger logger = LogManager.getLogger(LoanByUserRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanDetailsRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanDetailsRepository.java new file mode 100644 index 0000000..9dd0bfc --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanDetailsRepository.java @@ -0,0 +1,199 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.loan; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.controller.mobile.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.enums.FeeStatus; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanDetails; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.Session; +import org.hibernate.Transaction; +import org.hibernate.query.Query; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanDetailsRepository extends GenericRepository implements Serializable { + + /** + * + * @param details + * @return + * @throws Exception + */ + public boolean saveLoanDetails(LoanDetails details) throws Exception { + logger.debug("saveLoanDetails"); + try { + return save(details); + } catch (Exception e) { + logger.error("saveLoanDetails", e); + throw e; + } + } + + public List findFeesToPayByLoanId(String xmlQuery, List parameters) throws Exception { + logger.debug("findFeesToPayByLoanId"); + + List results = new ArrayList<>(); + try { + List tuples = xmlQueryTuple(xmlQuery, parameters); + + tuples.forEach((tuple) -> { + results.add(new LoanDetails(tuple.get("id", String.class), tuple.get("createdOn", Date.class), tuple.get("feeStatus", FeeStatus.class))); + }); + } catch (Exception e) { + logger.error("findFeesToPayByLoanId", e); + throw e; + } + + return results; + } + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findLoanDetailsByLoanId(String xmlQuery, List parameters) throws Exception { + logger.debug("findLoanDetailsByLoanId"); + + List results = new ArrayList<>(); + try { + results = createNamedQueryResultList(LoanDetails.class, xmlQuery, parameters); + } catch (Exception e) { + logger.error("findLoanDetailsByLoanId", e); + throw e; + } + + return results; + } + + /** + * + * @param xmlQuery + * @param parameters + * @param loanDetails + * @return + * @throws Exception + */ + public boolean updatePaidFeesStatusInLoanDetailIds(String xmlQuery, List parameters, LoanDetails loanDetails) throws Exception { + boolean success = false; + + Session sssn = null; + Transaction trnsctn = null; + try { + sssn = HibernateUtil.getSessionFactory().getCurrentSession(); + trnsctn = sssn.beginTransaction(); + + Loan loan = sssn.get(Loan.class, loanDetails.getLoan().getId()); + + if (null != parameters && !parameters.isEmpty()) { + Query query = sssn.createNamedQuery(xmlQuery); + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + query.executeUpdate(); + logger.debug("Query update executed"); + } + BigDecimal totalFees = loan.getAmountPaid().add(loanDetails.getPaymentAmount()); + + loanDetails.setReferenceNumber(loan.getLastReferenceNumber() + 1); + + sssn.save(loanDetails); + + loan.setAmountPaid(totalFees); + loan.setLastReferenceNumber(loan.getLastReferenceNumber() + 1); + loan.setLastUpdatedBy(loanDetails.getCreatedBy()); + loan.setLastUpdatedOn(new Date()); + + sssn.update(loan); + + trnsctn.commit(); + + logger.info("Entity updated"); + success = true; + } catch (Exception e) { + logger.error("Method updatePaidFeesStatusInLoanDetailIds() ", e); + if (null != trnsctn) { + trnsctn.rollback(); + } + throw e; + } + /* finally { + if (null != sssn) { + sssn.close(); + } + }*/ + return success; + } + + /** + * + * @param hbmQuery + * @param params + * @return + */ + public Long countLoandDetails(String hbmQuery, List params) { + Long count; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createNamedQuery(hbmQuery); + + params.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + count = (Long) query.getSingleResult(); + + transaction.commit(); + + return count; + } catch (Exception e) { + logger.error("countLoandDetails", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + } + + /** + * + * @param hbmQuery + * @param parameters + * @return + * @throws Exception + */ + public boolean updateLoanDetails(String hbmQuery, List parameters) throws Exception { + try { + return updateCreateNamedQuery(hbmQuery, parameters); + } catch (Exception e) { + logger.error("Method updateLoanDetails", e); + throw e; + } + } + + private static final long serialVersionUID = -6088464996350747643L; + final Logger logger = LogManager.getLogger(LoanDetailsRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanFeeNotificationRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanFeeNotificationRepository.java new file mode 100644 index 0000000..948756f --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanFeeNotificationRepository.java @@ -0,0 +1,62 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.loan; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.loan.LoanFeeNotification; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanFeeNotificationRepository extends GenericRepository implements Serializable { + + /** + * + * @param notification + * @return + * @throws Exception + */ + public boolean saveLoanFeeNotification(LoanFeeNotification notification) throws Exception { + logger.debug("saveLoanFeeNotification"); + + try { + return save(notification); + } catch (Exception e) { + logger.error("saveLoanFeeNotification", e); + throw e; + } + } + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public Long countNotificationByLoanId(Class clazz, String xmlQuery, List parameters) throws Exception { + logger.debug("countNotificationByLoanId"); + + try { + return (Long) createNamedQueryUniqueResult(clazz, xmlQuery, parameters); + } catch (Exception e) { + logger.error("countNotificationByLoanId", e); + throw e; + } + } + + private static final long serialVersionUID = -7172367255017070335L; + final Logger logger = LogManager.getLogger(LoanFeeNotificationRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanRepository.java new file mode 100644 index 0000000..b04e25e --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanRepository.java @@ -0,0 +1,630 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.loan; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.controller.mobile.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.core.constance.LoanByUserCfg; +import com.arrebol.apc.model.core.constance.LoanCfg; +import com.arrebol.apc.model.enums.LoanRenovationStatus; +import com.arrebol.apc.model.enums.LoanStatus; +import com.arrebol.apc.model.loan.Delivery; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanByRenovation; +import com.arrebol.apc.model.loan.LoanByRenovationId; +import com.arrebol.apc.model.loan.LoanByUser; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.model.ws.parsed.LoanRequestedJaxb; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; +import org.hibernate.query.Query; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanRepository extends GenericRepository implements Serializable { + + /** + * + * @param loan + * @return + * @throws Exception + */ + public String saveLoan(Loan loan) throws Exception { + logger.debug("saveLoan"); + try { + if (save(loan)) { + return loan.getId(); + } else { + return null; + } + } catch (Exception e) { + logger.error("saveLoan", e); + throw e; + } + } + + public boolean updateLoan(Loan loan) throws Exception { + logger.debug("saveLoan"); + try { + return update(loan); + } catch (Exception e) { + logger.error("saveLoan", e); + throw e; + } + } + + /** + * + * @param loanId + * @return + * @throws Exception + */ + public Loan findLoanById(String loanId) throws Exception { + logger.debug("findLoanById"); + try { + return (Loan) findAPCEntity(Loan.class, loanId); + } catch (Exception e) { + logger.error("findLoanById", e); + throw e; + } + } + + /** + * + * @param loanId + * @param xmlQuery + * @param parameters + * @param status + * @param delivery + * @return + * @throws Exception + */ + public boolean updateLoan(String loanId, String xmlQuery, List parameters, LoanStatus status, Delivery delivery) throws Exception { + logger.debug("updateLoan"); + boolean success = false; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + List params = new ArrayList<>(); + + params.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN, new Loan(loanId))); + params.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN_BY_USER_STATUS, status)); + + Query query1 = session.createNamedQuery(LoanByUserCfg.QUERY_UPDATE_LOAN_BY_USER_BY_LOAND_ID); + + params.forEach((param) -> { + query1.setParameter(param.getParameter(), param.getValue()); + }); + + query1.executeUpdate(); + + if (null != parameters && !parameters.isEmpty()) { + Query query = session.createNamedQuery(xmlQuery); + + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + if (0 < query.executeUpdate()) { + + if (null != delivery) { + session.save(delivery); + } + + transaction.commit(); + + success = true; + logger.info("updateLoan suucess"); + } else { + if (null != transaction) { + transaction.rollback(); + } + } + } else { + if (null != transaction) { + transaction.rollback(); + } + } + return success; + } catch (Exception e) { + logger.error("updateLoan", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + } + + public boolean updateLoanWithComission(String loanId, String xmlQuery, List parameters, LoanStatus status, Delivery delivery) throws Exception { + logger.debug("updateLoan"); + boolean success = false; + + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + List params = new ArrayList<>(); + + params.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN, new Loan(loanId))); + params.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN_BY_USER_STATUS, status)); + + Query query1 = session.createNamedQuery(LoanByUserCfg.QUERY_UPDATE_LOAN_BY_USER_BY_LOAND_ID); + + params.forEach((param) -> { + query1.setParameter(param.getParameter(), param.getValue()); + }); + + query1.executeUpdate(); + + if (null != parameters && !parameters.isEmpty()) { + Query query = session.createNamedQuery(xmlQuery); + + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + if (0 < query.executeUpdate()) { + + if (null != delivery) { + session.save(delivery); + } + + transaction.commit(); + + success = true; + logger.info("updateLoan suucess"); + } else { + if (null != transaction) { + transaction.rollback(); + } + } + } else { + if (null != transaction) { + transaction.rollback(); + } + } + return success; + } catch (Exception e) { + logger.error("updateLoan", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + } + + /** + * + * @param loan + * @param loanByUser + * @param jaxb + * @return + * @throws Exception + */ + public boolean createLoan(Loan loan, LoanByUser loanByUser, LoanRequestedJaxb jaxb) throws Exception { + logger.debug("createLoan"); + try { + People customer = jaxb.getCustomer().isCreatePerson() + ? null + : new People(jaxb.getCustomer().getId()); + + People endorsement = jaxb.getEndorsement().isCreatePerson() + ? null + : new People(jaxb.getEndorsement().getId()); + + openConnection(); + + if (null == customer) { + customer = new People( + jaxb.getCustomer(), + true, + jaxb.getOfficeId(), + jaxb.getUserId(), + //jaxb.getRouteId() + jaxb.chooseRouteId() + ); + + getSession().save(customer); + } + + if (null == endorsement) { + endorsement = new People( + jaxb.getEndorsement(), + false, + jaxb.getOfficeId(), + jaxb.getUserId(), + jaxb.getRouteId() + ); + + getSession().save(endorsement); + } + + loan.setCustomer(customer); + loan.setEndorsement(endorsement); + + getSession().save(loan); + + loanByUser.getId().setIdLoan(loan.getId()); + + getSession().save(loanByUser); + + flushAndClear(); + closeConnection(); + + return true; + } catch (HibernateException e) { + logger.error("createLoan", e); + rollback(); + throw e; + } catch (Exception e) { + logger.error("Method createLoan() ", e); + rollback(); + throw e; + } + } + + /** + * + * @param oldLoanId + * @param loan + * @param loanByUser + * @param xmlQuery + * @param parameters + * @param loanDetails + * @param endorsement + * @param isNewEndorsement + * @return + * @throws Exception + */ + public boolean renovationLoan(String oldLoanId, + Loan loan, + LoanByUser loanByUser, + String xmlQuery, + List parameters, + LoanDetails loanDetails, + People endorsement, + boolean isNewEndorsement) throws Exception { + logger.debug("renovationLoan"); + + boolean success = false; + try { + openConnection(); + int total = 0; + + // Crea Aval y lo asigna al nuevo prestamo + if (isNewEndorsement) { + getSession().save(endorsement); + loan.setEndorsement(endorsement); + } + + // falta actualizar el status de la tabla APC_LOAN_BY_USER + // del loan (oldLoanId) a PENDING_RENOVATION + List params = new ArrayList<>(); + + params.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN, new Loan(oldLoanId))); + params.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN_BY_USER_STATUS, LoanStatus.PENDING_RENOVATION)); + + Query query1 = getSession().createNamedQuery(LoanByUserCfg.QUERY_UPDATE_LOAN_BY_USER_BY_LOAND_ID); + + params.forEach((param) -> { + query1.setParameter(param.getParameter(), param.getValue()); + }); + + query1.executeUpdate(); + + if (null != parameters && !parameters.isEmpty()) { + Query query = getSession().createNamedQuery(xmlQuery); + + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + total = query.executeUpdate(); + logger.info("Query update executed"); + } + if (total > 0) { + getSession().save(loan); + + loanByUser.getId().setIdLoan(loan.getId()); + + getSession().save(loanByUser); + + LoanByRenovation renovation = new LoanByRenovation( + new LoanByRenovationId( + oldLoanId, + loan.getId() + ) + ); + + renovation.setLoanRenovationStatus(LoanRenovationStatus.PENDING); + renovation.setCreatedBy(loan.getCreatedBy()); + renovation.setCreatedOn(loan.getCreatedOn()); + + getSession().save(renovation); + + getSession().save(loanDetails); + + flushAndClear(); + closeConnection(); + + logger.info("Renovation was created"); + success = true; + } else { + logger.error("Renovation was not updated"); + rollback(); + } + + return success; + } catch (HibernateException e) { + logger.error("renovationLoan", e); + rollback(); + throw e; + } catch (Exception e) { + logger.error("Method renovationLoan() ", e); + rollback(); + throw e; + } + } + + /** + * + * @param oldLoanId + * @param loan + * @param loanByUser + * @param endorsement + * @param isNewEndorsement + * @return + * @throws Exception + */ + public boolean renovationHasPaymentToday(String oldLoanId, + Loan loan, + LoanByUser loanByUser, + People endorsement, + boolean isNewEndorsement) throws Exception { + logger.debug("renovationHasPaymentToday"); + + boolean success = false; + try { + openConnection(); + int total; + + // Crea Aval y lo asigna al nuevo prestamo + if (isNewEndorsement) { + getSession().save(endorsement); + loan.setEndorsement(endorsement); + } + + /** + * Actualiza el loan original a PENDING RENOVATION + */ + List params = new ArrayList<>(); + + params.add(new ModelParameter(LoanCfg.FIELD_LOAN_STATUS, LoanStatus.PENDING_RENOVATION)); + params.add(new ModelParameter(LoanCfg.FIELD_COMMENTS, "El cliente previamente abono su pago diario, solo me contactode nuevo para renovar su crédito")); + params.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_BY, loanByUser.getCreatedBy())); + params.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_ON, new Date())); + params.add(new ModelParameter(LoanCfg.FIELD_ID, oldLoanId)); + + Query query = getSession().createNamedQuery(LoanCfg.QUERY_UPDATE_LOAN_BY_ID_FROM_CERTIFIER_VIEW); + + params.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + total = query.executeUpdate(); + + if (total > 0) { + /** + * Actualiza el loan by user a PENDING RENOVATION + */ + params.clear(); + + params.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN, new Loan(oldLoanId))); + params.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN_BY_USER_STATUS, LoanStatus.PENDING_RENOVATION)); + + Query query2 = getSession().createNamedQuery(LoanByUserCfg.QUERY_UPDATE_LOAN_BY_USER_BY_LOAND_ID); + + params.forEach((param) -> { + query2.setParameter(param.getParameter(), param.getValue()); + }); + + total = query.executeUpdate(); + + if (total > 0) { + // Crea el nuevo prestamo + getSession().save(loan); + + loanByUser.getId().setIdLoan(loan.getId()); + + // guarda elprestamo por usuario + getSession().save(loanByUser); + + // crea historico para saber de donde proviene en nuevo prestamo + LoanByRenovation renovation = new LoanByRenovation( + new LoanByRenovationId( + oldLoanId, + loan.getId() + ) + ); + + renovation.setLoanRenovationStatus(LoanRenovationStatus.PENDING); + renovation.setCreatedBy(loan.getCreatedBy()); + renovation.setCreatedOn(loan.getCreatedOn()); + + getSession().save(renovation); + + flushAndClear(); + closeConnection(); + + logger.info("renovationHasPaymentToday was created"); + success = true; + } else { + logger.error("renovationHasPaymentToday was not updated"); + rollback(); + } + } else { + logger.error("renovationHasPaymentToday was not updated"); + rollback(); + } + return success; + } catch (HibernateException e) { + logger.error("renovationHasPaymentToday", e); + rollback(); + throw e; + } catch (Exception e) { + logger.error("Method renovationHasPaymentToday() ", e); + rollback(); + throw e; + } + } + + /** + * + * @param hbmQuery + * @param params + * @return + */ + public Long countLoan(String hbmQuery, List params) { + Long count; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createNamedQuery(hbmQuery); + + params.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + count = (Long) query.getSingleResult(); + + transaction.commit(); + + return count; + } catch (Exception e) { + logger.error("countLoan", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + } + + /** + * + * @param hbmQuery + * @param params + * @return + */ + public String findLoanId(String hbmQuery, List params) { + String loanId; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createNamedQuery(hbmQuery); + + params.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + loanId = (String) query.getSingleResult(); + + transaction.commit(); + + return loanId; + } catch (Exception e) { + logger.error("findLoanId", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + } + + /** + * + * @param xmlUpdateOrDeleteQuery + * @param parameters + * @return + */ + public boolean deleteLoanDetailsByLoanCurdate(String xmlUpdateOrDeleteQuery, List parameters) { + logger.debug("updateLoandByUserByUserId"); + + return xmlUpdateOrDelete(xmlUpdateOrDeleteQuery, parameters); + } + + /** + * + * @param updateLoanStatusQuery + * @param updateLoanByUserStatusQuery + * @param loanParams + * @param loanByUserParams + * @return + * @throws Exception + */ + public boolean loanPendingStatusToDelivery(String updateLoanStatusQuery, String updateLoanByUserStatusQuery, List loanParams, List loanByUserParams) throws Exception { + boolean success = false; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + // Update loan status WHERE id IN + Query query = session.createNamedQuery(updateLoanStatusQuery); + + for (ModelParameter parameters : loanParams) { + query.setParameter(parameters.getParameter(), parameters.getValue()); + } + + query.executeUpdate(); + query.getParameters().clear(); + + // Update loan by user status WHERE loan IN + query = session.createNamedQuery(updateLoanByUserStatusQuery); + + for (ModelParameter parameters : loanByUserParams) { + query.setParameter(parameters.getParameter(), parameters.getValue()); + } + + query.executeUpdate(); + + transaction.commit(); + + success = true; + + return success; + } catch (Exception e) { + logger.error("loanPendingStatusToDelivery", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + } + + private static final long serialVersionUID = -9216757241090613435L; + final Logger logger = LogManager.getLogger(LoanRepository.class); + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanToDeliveryByCertifierRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanToDeliveryByCertifierRepository.java new file mode 100644 index 0000000..34046c0 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanToDeliveryByCertifierRepository.java @@ -0,0 +1,45 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.loan; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.views.LoanToDeliveryByCertifierView; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanToDeliveryByCertifierRepository extends GenericRepository implements Serializable { + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findLoansByCertifier(Class clazz, String xmlQuery, List parameters) throws Exception { + logger.debug("findLoansByCertifier"); + + try { + return createNamedQueryResultList(clazz, xmlQuery, parameters); + } catch (Exception e) { + logger.error("findLoansByCertifier", e); + throw e; + } + } + + private static final long serialVersionUID = 1692607159278862158L; + final Logger logger = LogManager.getLogger(LoanToDeliveryByCertifierRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanTypeRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanTypeRepository.java new file mode 100644 index 0000000..ed92397 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/loan/LoanTypeRepository.java @@ -0,0 +1,114 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.loan; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.loan.LoanType; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanTypeRepository extends GenericRepository implements Serializable { + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findAllLoanTypeByOffice(String xmlQuery, List parameters) throws Exception { + logger.debug("findAllLoanTypeByOffice"); + + List results = new ArrayList<>(); + try { + List tuples = xmlQueryTuple(xmlQuery, parameters); + + tuples.forEach((tuple) -> { + results.add(new LoanType((String) tuple.get("id"), (BigDecimal) tuple.get("payment"), (String) tuple.get("loanTypeName"))); + }); + } catch (Exception e) { + logger.error("findAllLoanTypeByOffice", e); + throw e; + } + + return results; + } + + /** + * Find loan type by id. + * + * @param id Identifycation number + * @return + * @throws Exception + */ + public LoanType findLoanType(String id) throws Exception { + logger.debug("findLoanType"); + try { + return (LoanType) findAPCEntity(LoanType.class, id); + } catch (Exception e) { + logger.error("findLoanType", e); + throw e; + } + } + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findLoanTypes(Class clazz, String xmlQuery, List parameters) throws Exception { + logger.debug("findLoanTypes"); + try { + return createNamedQueryResultList(clazz, xmlQuery, parameters); + } catch (Exception e) { + logger.error("findLoanTypes", e); + throw e; + } + } + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findIdAndPaymentLoans(String xmlQuery, List parameters) throws Exception { + logger.debug("findIdAndPaymentLoans"); + + List results = new ArrayList<>(); + try { + List tuples = xmlQueryTuple(xmlQuery, parameters); + + tuples.forEach((tuple) -> { + results.add(new LoanType((String) tuple.get("id"), (BigDecimal) tuple.get("payment"), (String) tuple.get("loanTypeName"))); + }); + } catch (Exception e) { + logger.error("findIdAndPaymentLoans", e); + throw e; + } + + return results; + } + + private static final long serialVersionUID = -5815645336646530766L; + final Logger logger = LogManager.getLogger(LoanTypeRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/people/PeopleRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/people/PeopleRepository.java new file mode 100644 index 0000000..33a3ec4 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/people/PeopleRepository.java @@ -0,0 +1,99 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.people; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.loan.Loan; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class PeopleRepository extends GenericRepository implements Serializable { + + /** + * + * @param people + * @return + * @throws Exception + */ + public String createPeople(People people) throws Exception { + logger.debug("createPeople"); + try { + save(people); + + return people.getId(); + + } catch (Exception e) { + logger.error("createPeople", e); + throw e; + } + } + + /** + * + * @param people + * @return + * @throws Exception + */ + public boolean removePeople(People people) throws Exception { + logger.debug("removePeople"); + try { + people = (People) findAPCEntity(People.class, people.getId()); + + return delete(people); + } catch (Exception e) { + logger.error("removePeople", e); + throw e; + } + } + + /** + * + * @param loanId + * @param isCustomer + * @return + * @throws Exception + */ + public String findPeopleIdByIdLoad(String loanId, boolean isCustomer) throws Exception { + try { + Loan loan = (Loan) findAPCEntity(Loan.class, loanId); + + return isCustomer ? loan.getCustomer().getId() : loan.getEndorsement().getId(); + } catch (Exception e) { + logger.error("findPeopleByIdLoad", e); + throw e; + } + } + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public boolean changeContactNumber(String xmlQuery, List parameters) throws Exception { + logger.debug("changeContactNumber"); + try { + return updateCreateNamedQuery(xmlQuery, parameters); + } catch (Exception e) { + logger.error("changeContactNumber", e); + throw e; + } + } + + private static final long serialVersionUID = 6168828614367099322L; + final Logger logger = LogManager.getLogger(PeopleRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/preference/UserMobilePreferenceRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/preference/UserMobilePreferenceRepository.java new file mode 100644 index 0000000..8590750 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/preference/UserMobilePreferenceRepository.java @@ -0,0 +1,98 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.preference; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.mobile.preference.UserMobilePreference; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserMobilePreferenceRepository extends GenericRepository implements Serializable { + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public UserMobilePreference findUserMobilePreference(Class clazz, String xmlQuery, List parameters) throws Exception { + logger.debug("findUserMobilePreference"); + + try { + return (UserMobilePreference) createNamedQueryUniqueResult(clazz, xmlQuery, parameters); + } catch (Exception e) { + logger.error("findUserMobilePreference", e); + throw e; + } + } + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public boolean updateQueryUserMobilePreference(String xmlQuery, List parameters) throws Exception { + logger.debug("updateQueryUserMobilePreference"); + + try { + return updateCreateNamedQuery(xmlQuery, parameters); + } catch (Exception e) { + logger.error("updateQueryUserMobilePreference", e); + throw e; + } + } + + /** + * + * @param userMobilePreference + * @return + * @throws Exception + */ + public boolean insertUserMobilePreference(UserMobilePreference userMobilePreference) throws Exception { + logger.debug("insertUserMobilePreference"); + + try { + return save(userMobilePreference); + } catch (Exception e) { + logger.error("insertUserMobilePreference", e); + throw e; + } + } + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public Long count(String xmlQuery, List parameters) throws Exception { + logger.debug("count"); + try { + return (Long) createNamedQueryUniqueResult(Long.class, xmlQuery, parameters); + } catch (Exception e) { + logger.error("count", e); + throw e; + } + } + + private static final long serialVersionUID = 4667354927801455153L; + final Logger logger = LogManager.getLogger(UserMobilePreferenceRepository.class); + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/reports/ReportsRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/reports/ReportsRepository.java new file mode 100644 index 0000000..714a40e --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/reports/ReportsRepository.java @@ -0,0 +1,47 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.reports; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.reports.UserWeekReport; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class ReportsRepository extends GenericRepository implements Serializable { + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public UserWeekReport findUserWeekReportDetailsByUser(Class clazz, String xmlQuery, List parameters) throws Exception { + try { + return (UserWeekReport) createNamedQueryUniqueResult( + clazz, + xmlQuery, + parameters + ); + } catch (Exception e) { + logger.error("findUserWeekReportDetailsByUser", e); + throw e; + } + } + + private static final long serialVersionUID = 5669198954766725576L; + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/route/RouteRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/route/RouteRepository.java new file mode 100644 index 0000000..5a4c027 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/route/RouteRepository.java @@ -0,0 +1,55 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.route; + +import com.arrebol.apc.controller.mobile.moxy.views.ContainerRoutes; +import com.arrebol.apc.controller.mobile.moxy.views.RouteJaxb; +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.controller.mobile.repository.people.PeopleRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.constance.RouteCfg; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class RouteRepository extends GenericRepository implements Serializable { + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public ContainerRoutes findAllRoutesAvailables(String xmlQuery, List parameters) throws Exception { + try { + List tuples = xmlQueryTuple(xmlQuery, parameters); + if (!tuples.isEmpty()) { + List results = new ArrayList<>(); + tuples.forEach(tuple -> { + results.add(new RouteJaxb(tuple.get(RouteCfg.FIELD_ID, String.class), tuple.get(RouteCfg.FIELD_NAME, String.class))); + }); + return new ContainerRoutes(results); + } else { + throw new Exception("Error loading route, size equals to ZERO"); + } + } catch (Exception e) { + logger.error("findAllRoutesAvailables", e); + throw e; + } + } + + final Logger logger = LogManager.getLogger(PeopleRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/tracking/PaymentTrackingRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/tracking/PaymentTrackingRepository.java new file mode 100644 index 0000000..333805b --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/tracking/PaymentTrackingRepository.java @@ -0,0 +1,49 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.tracking; + +import com.arrebol.apc.controller.mobile.moxy.views.PaymentTrackingViewJaxb; +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.reports.UserWeekReport; +import com.arrebol.apc.model.views.AdvanceUserDailyView; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class PaymentTrackingRepository extends GenericRepository implements Serializable { + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public AdvanceUserDailyView paymentTrakingByUserDetails(Class clazz, String xmlQuery, List parameters) throws Exception { + try { + return (AdvanceUserDailyView) createNamedQueryUniqueResult( + clazz, + xmlQuery, + parameters + ); + } catch (Exception e) { + logger.error("PaymentTrackingViewJaxb", e); + throw e; + } + } + + private static final long serialVersionUID = 5669198954766725577L; + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/user/UserRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/user/UserRepository.java new file mode 100644 index 0000000..c3f2ce6 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/user/UserRepository.java @@ -0,0 +1,114 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.user; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.controller.mobile.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.UserCfg; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.Session; +import org.hibernate.Transaction; +import org.hibernate.query.Query; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserRepository extends GenericRepository implements Serializable { + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public String findUserStatusById(String xmlQuery, List parameters) throws Exception { + try { + for (Tuple tuple : xmlQueryTuple(xmlQuery, parameters)) { + return tuple.get(UserCfg.FIELD_ID, String.class); + } + + return null; + } catch (Exception e) { + logger.error("findUserStatusById", e); + throw e; + } + } + + /** + * + * @param hbmQuery + * @param params + * @return + * @throws Exception + */ + public boolean containtsUserManagementProperty(String hbmQuery, List params) throws Exception { + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createNamedQuery(hbmQuery); + + params.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + + Long total = (Long) query.getSingleResult(); + Long one = 1l; + transaction.commit(); + + return one.equals(total); + } catch (Exception e) { + logger.error("containtsUserManagementProperty", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } + } + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List listOfUsersByOffice(String xmlQuery, List parameters) throws Exception { + try { + List users = new ArrayList<>(); + + xmlQueryTuple(xmlQuery, parameters).forEach(_item -> { + users.add( + new User( + _item.get(UserCfg.FIELD_ID, String.class), + _item.get(UserCfg.FIELD_USER_NAME, String.class) + ) + ); + }); + + return users; + } catch (Exception e) { + logger.error("listOfUsersByOffice", e); + throw e; + } + } + + private static final long serialVersionUID = -7339139534291674077L; + final Logger logger = LogManager.getLogger(getClass()); + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/CashRegisterCurdateByUserViewRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/CashRegisterCurdateByUserViewRepository.java new file mode 100644 index 0000000..2937d72 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/CashRegisterCurdateByUserViewRepository.java @@ -0,0 +1,44 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.views; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.views.CashRegisterCurdateByUserView; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class CashRegisterCurdateByUserViewRepository extends GenericRepository implements Serializable { + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findAllCashRegisterCurdateByUserId(Class clazz, String xmlQuery, List parameters) throws Exception { + logger.debug("findAllCashRegisterCurdateByUserId"); + try { + return createNamedQueryResultList(clazz, xmlQuery, parameters); + } catch (Exception e) { + logger.error("findAllCashRegisterCurdateByUserId", e); + throw e; + } + } + + private static final long serialVersionUID = -9108098827445980249L; + final Logger logger = LogManager.getLogger(CashRegisterCurdateByUserViewRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/ExchangeEnebledUsersViewRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/ExchangeEnebledUsersViewRepository.java new file mode 100644 index 0000000..7c1f6ed --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/ExchangeEnebledUsersViewRepository.java @@ -0,0 +1,43 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.views; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.views.ExchangeEnebledUsersView; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class ExchangeEnebledUsersViewRepository extends GenericRepository implements Serializable { + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findEnebledUsersToUserId(String xmlQuery, List parameters) throws Exception { + logger.debug("exchangeEnebledUsersViewRepository"); + try { + return createNamedQueryResultList(ExchangeEnebledUsersView.class, xmlQuery, parameters); + } catch (Exception e) { + logger.error("findEnebledUsersToUserId", e); + throw e; + } + } + + private static final long serialVersionUID = 3811795552537797634L; + final Logger logger = LogManager.getLogger(ExchangeEnebledUsersViewRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanApprovedDetailViewRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanApprovedDetailViewRepository.java new file mode 100644 index 0000000..733ab23 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanApprovedDetailViewRepository.java @@ -0,0 +1,124 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.views; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.enums.LoanDetailsType; +import com.arrebol.apc.model.views.LoanApprovedDetailView; +import com.arrebol.apc.model.ws.parsed.LoanDetailJaxb; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanApprovedDetailViewRepository extends GenericRepository implements Serializable { + + /* + public List findAllTransferByUserIdAndCurdate(String xmlQuery, List parameters) throws Exception { + logger.debug("findAllTransferByUserIdAndCurdate"); + List results = new ArrayList<>(); + try { + List tuples = xmlQueryTuple(xmlQuery, parameters); + + tuples.forEach((tuple) -> { + results.add( + new Exchange( + tuple.get("id").toString(), + tuple.get("userTransmitter").toString().equals("SENDER"), + (BigDecimal) tuple.get("amountToTransfer"), + tuple.get("actionStatus").toString() + ) + ); + }); + + return results; + } catch (Exception e) { + logger.error("findAllTransferByUserIdAndCurdate", e); + throw e; + } + } + */ + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findLoanDetailsByLoan(String xmlQuery, List parameters) throws Exception { + logger.debug("findLoanDetailsByLoan"); + List results = new ArrayList<>(); + try { + List tuples = xmlQueryTuple(xmlQuery, parameters); + + double total = 0d; + + for (Tuple tuple : tuples) { + if (results.isEmpty()) { + total = ((BigDecimal) tuple.get("amountToPay")).doubleValue(); + } + LoanDetailsType type = tuple.get("loanDetailsType", LoanDetailsType.class); + + switch (type) { + case PAYMENT: + total = total - ((BigDecimal) tuple.get("paymentAmount")).doubleValue(); + break; + case FEE: + total = total + ((BigDecimal) tuple.get("paymentAmount")).doubleValue(); + break; + case TRANSFER: + total = total - (tuple.get("paymentAmount", BigDecimal.class)).doubleValue(); + break; + } + + LoanDetailJaxb detail = new LoanDetailJaxb( + tuple.get("createdOn", String.class), + ((BigDecimal) tuple.get("paymentAmount")).doubleValue(), + total, + tuple.get("comments", String.class), + type.toString() + ); + + results.add(detail); + } + + return results; + } catch (Exception e) { + logger.error("findLoanDetailsByLoan", e); + throw e; + } + } + + /** + * + * @param idLoan + * @return + * @throws Exception + */ + public LoanApprovedDetailView approvedDetailsByIdLoan(String idLoan) throws Exception { + logger.debug("approvedDetailsByIdLoan"); + try { + return (LoanApprovedDetailView) findAPCEntity(LoanApprovedDetailView.class, idLoan); + } catch (Exception e) { + logger.error("approvedDetailsByIdLoan", e); + throw e; + } + } + + private static final long serialVersionUID = -7364653160752676339L; + final Logger logger = LogManager.getLogger(LoanApprovedDetailViewRepository.class); + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanByUserOrderPreferenceViewRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanByUserOrderPreferenceViewRepository.java new file mode 100644 index 0000000..89b2ef5 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanByUserOrderPreferenceViewRepository.java @@ -0,0 +1,62 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.views; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.views.LoanByUserOrderPreferenceView; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanByUserOrderPreferenceViewRepository extends GenericRepository implements Serializable { + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findAllLoanByUserOrderPreference(String xmlQuery, List parameters) throws Exception { + logger.debug("findAllLoanByUserOrderPreference"); + List results = new ArrayList<>(); + + try { + results = createNamedQueryResultList( + LoanByUserOrderPreferenceView.class, + xmlQuery, + parameters + ); + } catch (Exception e) { + logger.error("findAllLoanByUserOrderPreference", e); + throw e; + } + + return results; + } + + public boolean updateQuery(String xmlQuery, List parameters) throws Exception { + logger.debug("updateQuery"); + try { + return updateCreateNamedQuery(xmlQuery, parameters); + } catch (Exception e) { + logger.error("updateQuery", e); + throw e; + } + } + + private static final long serialVersionUID = -5747654537116880219L; + final Logger logger = LogManager.getLogger(LoanByUserOrderPreferenceViewRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanByUserViewRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanByUserViewRepository.java new file mode 100644 index 0000000..3cceb77 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanByUserViewRepository.java @@ -0,0 +1,54 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.views; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.views.LoanByUserView; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanByUserViewRepository extends GenericRepository implements Serializable { + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findAllLoansByUserId(String xmlQuery, List parameters) throws Exception { + logger.debug("findAllLoansByUserId"); + List results = new ArrayList<>(); + + try { + results = createNamedQueryResultList( + LoanByUserView.class, + xmlQuery, + parameters + ); + + } catch (Exception e) { + logger.error("findAllLoansByUserId", e); + throw e; + } + + return results; + } + + private static final long serialVersionUID = 5669198954766725476L; + final Logger logger = LogManager.getLogger(LoanByUserViewRepository.class); + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanInPendingStatusToDeliveryViewRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanInPendingStatusToDeliveryViewRepository.java new file mode 100644 index 0000000..c9f733f --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/LoanInPendingStatusToDeliveryViewRepository.java @@ -0,0 +1,42 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.views; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.views.LoanInPendingStatusToDeliveryView; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanInPendingStatusToDeliveryViewRepository extends GenericRepository implements Serializable { + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findAllLoanInPendingStatusToDeliveryViewFromHQL(String xmlQuery, List parameters) throws Exception { + try { + return findEntityList(LoanInPendingStatusToDeliveryView.class, xmlQuery, parameters); + } catch (Exception e) { + logger.error("findAllLoanInPendingStatusToDeliveryViewFromHQL", e); + throw e; + } + } + + private static final long serialVersionUID = 6824052895894178526L; + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/PersonSearchHistoricalDetailsViewRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/PersonSearchHistoricalDetailsViewRepository.java new file mode 100644 index 0000000..5364ac9 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/PersonSearchHistoricalDetailsViewRepository.java @@ -0,0 +1,48 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.views; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.views.PersonSearchHistoricalDetailsView; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class PersonSearchHistoricalDetailsViewRepository extends GenericRepository implements Serializable { + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findAllByPersonId(Class clazz, String xmlQuery, List parameters) throws Exception { + logger.debug("findAllByPersonId"); + + try { + return createNamedQueryResultList(clazz, xmlQuery, parameters); + } catch (Exception e) { + logger.error("findAllByPersonId", e); + throw e; + } + } + + + + private static final long serialVersionUID = 3507366187310617715L; + final Logger logger = LogManager.getLogger(PersonSearchHistoricalDetailsViewRepository.class); + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/PersonSearchViewRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/PersonSearchViewRepository.java new file mode 100644 index 0000000..a2a5853 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/PersonSearchViewRepository.java @@ -0,0 +1,121 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.views; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.views.LoanByUserView; +import com.arrebol.apc.model.views.PersonSearchDetailView; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class PersonSearchViewRepository extends GenericRepository implements Serializable { + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findResultList(Class clazz, String xmlQuery, List parameters) throws Exception { + logger.debug("likePersonSearchViewByPersonSearch"); + + try { + return createNamedQueryResultList(clazz, xmlQuery, parameters, 10); + } catch (Exception e) { + logger.error("likePersonSearchViewByPersonSearch", e); + throw e; + } + } + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public Object findResultXML(Class clazz, String xmlQuery, List parameters) throws Exception { + logger.debug("findResultXML"); + try { + return createNamedQueryUniqueResult(clazz, xmlQuery, parameters); + } catch (Exception e) { + logger.error("findResultXML", e); + throw e; + } + } + + public Object findResultTupleXML(String xmlQuery, List parameters) throws Exception { + logger.debug("findResultXML"); + try { + List tuples = xmlQueryTuple(xmlQuery, parameters); + + LoanByUserView result = new LoanByUserView(); + + for (Tuple tuple : tuples) { + + result = new LoanByUserView( + tuple.get("customerName", String.class), + tuple.get("customerAddressHome", String.class), + tuple.get("customerAddressBusiness", String.class), + tuple.get("companyName", String.class), + tuple.get("customerThumbnail", String.class), + tuple.get("endorsementName", String.class), + tuple.get("endorsementAddressHome", String.class), + tuple.get("endorsementThumbnail", String.class), + tuple.get("endorsementPhoneHome", String.class), + tuple.get("paymentDaily", BigDecimal.class), + tuple.get("fee", BigDecimal.class), + tuple.get("notificationNumber", Long.class).intValue(), + tuple.get("renovation", String.class), + tuple.get("maxAmountToPay", BigDecimal.class), + 1 == tuple.get("hasPaymentToday", Integer.class), + tuple.get("loanId", String.class), + tuple.get("currentOwner", String.class) + ); + } + + return result; + } catch (Exception e) { + logger.error("findResultXML", e); + throw e; + } + } + + /** + * + * @param clazz + * @param id + * @return + * @throws Exception + */ + public PersonSearchDetailView findResult(Class clazz, String id) throws Exception { + logger.debug("findResult"); + try { + return (PersonSearchDetailView) findAPCEntity(clazz, id); + } catch (Exception e) { + logger.error("findResult", e); + throw e; + } + } + + private static final long serialVersionUID = -5127034542019248849L; + final Logger logger = LogManager.getLogger(PersonSearchViewRepository.class); + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/SearchPersonAvailableRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/SearchPersonAvailableRepository.java new file mode 100644 index 0000000..b3c1414 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/SearchPersonAvailableRepository.java @@ -0,0 +1,63 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.views; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * Views: AvailableCustomersView or AvailableEndorsementsView + * + * @author Carlos Janitzio Zavala Lopez + */ +public class SearchPersonAvailableRepository extends GenericRepository implements Serializable { + + /** + * + * @param clazz + * @param id + * @return + * @throws Exception + */ + public Object findAvailablePersonByPersonId(Class clazz, String id) throws Exception { + logger.debug("findAvailablePersonByPersonId"); + try { + return findAPCEntity(clazz, id); + } catch (Exception e) { + logger.error("findAvailablePersonByPersonId", e); + throw e; + } + } + + /** + * Find customers or endorsemenent using hibernate like clause. + * + * @param clazz AvailableCustomersView and AvailableEndorsementsView + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findAvailablePersonLike(Class clazz, String xmlQuery, List parameters) throws Exception { + logger.debug("findAvailablePersonLike"); + try { + return createNamedQueryResultList(clazz, xmlQuery, parameters,10); + } catch (Exception e) { + logger.error("findAvailablePersonLike", e); + throw e; + } + } + + private static final long serialVersionUID = 1734430028791204289L; + final Logger logger = LogManager.getLogger(SearchPersonAvailableRepository.class); + +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/TotalCashByCurdateViewRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/TotalCashByCurdateViewRepository.java new file mode 100644 index 0000000..8189f93 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/TotalCashByCurdateViewRepository.java @@ -0,0 +1,40 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.views; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.views.TotalCashByCurdateView; +import java.io.Serializable; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class TotalCashByCurdateViewRepository extends GenericRepository implements Serializable { + + /** + * + * @param id + * @return + * @throws Exception + */ + public TotalCashByCurdateView findById(String id) throws Exception { + logger.debug("findById"); + try { + return (TotalCashByCurdateView) findAPCEntity(TotalCashByCurdateView.class, id); + } catch (Exception e) { + logger.error("findById", e); + throw e; + } + } + + private static final long serialVersionUID = 7691052895894112231L; + final Logger logger = LogManager.getLogger(TotalCashByCurdateViewRepository.class); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/TransferInPendingStatusViewRepository.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/TransferInPendingStatusViewRepository.java new file mode 100644 index 0000000..358f1fb --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/repository/views/TransferInPendingStatusViewRepository.java @@ -0,0 +1,42 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.views; + +import com.arrebol.apc.controller.mobile.repository.GenericRepository; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.views.TransferInPendingStatusView; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class TransferInPendingStatusViewRepository extends GenericRepository implements Serializable { + + /** + * + * @param xmlQuery + * @param parameters + * @return + * @throws Exception + */ + public List findAllTransferFromHQL(String xmlQuery, List parameters) throws Exception { + try { + return findEntityList(TransferInPendingStatusView.class, xmlQuery, parameters); + } catch (Exception e) { + logger.error("findAllTransferFromHQL", e); + throw e; + } + } + + private static final long serialVersionUID = 5391052895894173231L; + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/util/HibernateUtil.java b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/util/HibernateUtil.java new file mode 100644 index 0000000..1723c04 --- /dev/null +++ b/ace-controller-mobile/src/main/java/com/arrebol/apc/controller/mobile/util/HibernateUtil.java @@ -0,0 +1,69 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.util; + +import org.hibernate.SessionFactory; +import org.hibernate.boot.Metadata; +import org.hibernate.boot.MetadataSources; +import org.hibernate.boot.registry.StandardServiceRegistryBuilder; +import org.hibernate.service.ServiceRegistry; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class HibernateUtil { + + private static final String HIBERNATE_CFG_XML = "apc.cfg.xml"; + private static SessionFactory sessionFactory; + + private HibernateUtil() { + } + + // Hibernate 5: + private static SessionFactory buildSessionFactory() { + try { + // Create the ServiceRegistry from hibernate.cfg.xml + ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().configure(HIBERNATE_CFG_XML).build(); + + // Create a metadata sources using the specified service registry. + Metadata metadata = new MetadataSources(serviceRegistry).getMetadataBuilder().build(); + + return metadata.getSessionFactoryBuilder().build(); + } catch (Throwable ex) { + System.err.println("Initial SessionFactory creation failed." + ex); + throw new ExceptionInInitializerError(ex); + } + } + + /** + * Configuration object is used to create a SessionFactory object which in + * turn configures Hibernate for the application using the supplied + * configuration file and allows for a Session object to be instantiated. + * + * The SessionFactory is a thread safe object and used by all the threads of + * an application. + * + * The SessionFactory is a heavyweight object; it is usually created during + * application start up and kept for later use. + * + * You would need one SessionFactory object per database using a separate + * configuration file. + * + * So, if you are using multiple databases, then you would have to create + * multiple SessionFactory objects. + * + * @return SessionFactory. + */ + public final static SessionFactory getSessionFactory() { + if (null == sessionFactory) { + sessionFactory = buildSessionFactory(); + } + return sessionFactory; + } +} diff --git a/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/cash/CashRegisterCurdateByUserControllerTest.java b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/cash/CashRegisterCurdateByUserControllerTest.java new file mode 100644 index 0000000..7fbb1d3 --- /dev/null +++ b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/cash/CashRegisterCurdateByUserControllerTest.java @@ -0,0 +1,46 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.cash; + +import com.arrebol.apc.model.views.TotalCashByCurdateView; +import org.junit.Assert; +import static org.junit.Assert.assertFalse; +import org.junit.Before; +import org.junit.Test; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class CashRegisterCurdateByUserControllerTest { + + public CashRegisterCurdateByUserController controller; + public static final String USER_ID = "52cbc85a-8bc9-11ea-b45c-c7b846343364"; + + public CashRegisterCurdateByUserControllerTest() { + } + + @Before + public void setUp() { + controller = new CashRegisterCurdateByUserController(); + } + + @Test + public void findAllLoansByUserId() { + try { + TotalCashByCurdateView result = controller.findDailyTotalsByUserId(USER_ID); + + System.out.println("Total: " + result.getTotal()); + + Assert.assertNotNull(result); + } catch (Exception e) { + assertFalse(true); + } + } + +} diff --git a/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/customer/CustomerControllerTest.java b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/customer/CustomerControllerTest.java new file mode 100644 index 0000000..7c0c9df --- /dev/null +++ b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/customer/CustomerControllerTest.java @@ -0,0 +1,49 @@ +package com.arrebol.apc.controller.mobile.controller.customer; + +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ + + +import com.arrebol.apc.model.enums.PreferenceValue; +import com.arrebol.apc.model.views.LoanByUserView; +import java.util.List; +import org.junit.Before; +import org.junit.Test; +import static org.junit.Assert.*; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class CustomerControllerTest { + + public CustomerController controller; + public static final String USER_ID = "52cbc85a-8bc9-11ea-b45c-c7b846343364"; + + public CustomerControllerTest() { + } + + @Before + public void setUp() { + controller = new CustomerController(); + } + + @Test + public void findAllLoansByUserId() { + try { + List results = controller.findAllLoansByUserId(PreferenceValue.ORDER_IN_LIST.toString(),USER_ID); + + results.forEach(System.out::println); + + assertFalse(results.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + +} diff --git a/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/exchange/ExchangeEnebledUsersControllerTest.java b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/exchange/ExchangeEnebledUsersControllerTest.java new file mode 100644 index 0000000..f98a096 --- /dev/null +++ b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/exchange/ExchangeEnebledUsersControllerTest.java @@ -0,0 +1,62 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.exchange; + +import com.arrebol.apc.model.views.ExchangeEnebledUsersView; +import com.arrebol.apc.model.ws.parsed.Exchange; +import java.util.List; +import static org.junit.Assert.assertFalse; +import org.junit.Before; +import org.junit.Test; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class ExchangeEnebledUsersControllerTest { + + public ExchangeEnebledUsersController controller; + public static final String USER_ID_AVATAR_TWO = "52cbc85a-8bc9-11ea-b45c-c7b846343364"; + public static final String AVATAR= "22fb81e2-8bc9-11ea-b45c-c7b846343364"; + public static final String OFFICE_ID_GDL = "e0f1a2fc-7d1f-11ea-af3e-28f659da398e"; + public static final String OFFICE_ID_TPC = "caef3a64-7d1f-11ea-af3e-28f659da398e"; + + public ExchangeEnebledUsersControllerTest() { + } + + @Before + public void setUp() { + controller = new ExchangeEnebledUsersController(); + } + + //@Test + public void findEnebledUsersToUserId() { + try { + List results = controller.findEnebledUsersToUserId(USER_ID_AVATAR_TWO, OFFICE_ID_TPC); + + results.forEach(System.out::println); + + assertFalse(results.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void exchangesByUsers() { + try { + List results = controller.exchangesByUsers(AVATAR); + + results.forEach(System.out::println); + + assertFalse(results.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } +} diff --git a/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/loan/LoanControllerTest.java b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/loan/LoanControllerTest.java new file mode 100644 index 0000000..ee2d0b3 --- /dev/null +++ b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/loan/LoanControllerTest.java @@ -0,0 +1,205 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.loan; + +import com.arrebol.apc.controller.mobile.json.loan.DeleteLoanDetailsJaxb; +import com.arrebol.apc.controller.mobile.json.loan.LoanTypeListJaxb; +import com.arrebol.apc.model.views.AvailableCustomersView; +import com.arrebol.apc.model.views.AvailableEndorsementsView; +import com.arrebol.apc.model.views.LoanToDeliveryByCertifierView; +import com.arrebol.apc.model.ws.parsed.LoanDetailJaxb; +import com.arrebol.apc.model.ws.parsed.LoanRequestedJaxb; +import com.arrebol.apc.model.ws.parsed.PersonJaxb; +import java.util.List; +import org.junit.Test; +import static org.junit.Assert.*; +import org.junit.Before; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanControllerTest { + + /** + * $3,000.00 + */ + public final static String LOAN_TYPE_ID = "8d91bc36-8e00-11ea-8745-07889553dd5f"; + /** + * GDL + */ + public static final String OFFICE_ID = "e0f1a2fc-7d1f-11ea-af3e-28f659da398e"; + /** + * TEPIC + */ + public static final String TEPIC_OFFICE_ID = "caef3a64-7d1f-11ea-af3e-28f659da398e"; + /** + * LOANS + */ + public static final String LOAND_ID = "606e42f4-8e1b-11ea-b65e-4e1376171215"; + /** + * Avatar 2 + */ + public final static String MOBILE_USER_ID = "52cbc85a-8bc9-11ea-b45c-c7b846343364"; + /** + * + */ + public final static String ROUTE_ID = "55baf3ae-8e19-11ea-b65e-4e1376171215"; + /** + * + */ + public final static String DUMMY_DATA = "DUMMY"; + private LoanController controller; + + @Before + public void setUp() { + controller = new LoanController(); + } + + //@Test + public void findAllLoanTypeByOffice() { + try { + LoanTypeListJaxb result = controller.findAllLoanTypeByOffice(OFFICE_ID); + + System.out.println(result); + + assertFalse(result.getLoans().isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void enebleToDeleteTodayDetails(){ + try { + DeleteLoanDetailsJaxb result = controller.enebleToDeleteTodayDetails(LOAND_ID,""); + + System.out.println(result); + + assertFalse(result.getApprovedOrPendingRenovation()); + } catch (Exception e) { + assertFalse(true); + } + } + + //@Test + public void findAvailableCustomersByOffice() { + try { + List results = controller.findAllAvailableCustomersByType("%SeGuNDo%"); + + results.forEach(System.out::println); + + assertFalse(results.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + //@Test + public void findAvailableEndorsementByOffice() { + try { + List results = controller.findAllAvailableEndorsementsByType("%AvAl%"); + + results.forEach(System.out::println); + + assertFalse(results.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + //@Test + public void findNewCreditLimit() { + try { + LoanTypeListJaxb result = controller.findNewCreditLimit(OFFICE_ID, LOAND_ID); + + System.out.println(result); + + assertFalse(result.getLoans().isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + //@Test + public void createLoan() { + try { + LoanRequestedJaxb jaxb = new LoanRequestedJaxb(); + + PersonJaxb customer = buildPerson(false, true); + PersonJaxb endorsement = buildPerson(false, false); + + jaxb.setLoanTypeId(LOAN_TYPE_ID); + jaxb.setOfficeId(OFFICE_ID); + jaxb.setUserId(MOBILE_USER_ID); + jaxb.setRouteId(ROUTE_ID); + jaxb.setCustomer(customer); + jaxb.setEndorsement(endorsement); + jaxb.setStrDate("2020-28-05 16:04:62"); + + //assertTrue(controller.createLoan(jaxb)); + } catch (Exception e) { + assertFalse(true); + } + } + + //@Test + public void findLoansByCertifier() { + try { + List results = controller.findLoansByCertifier(MOBILE_USER_ID); + + results.forEach(System.out::println); + + assertFalse(results.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void approvedDetailsByIdLoan() { + try { + //LoanJaxb result = controller.approvedDetailsByIdLoan(LOAND_ID); + List result = controller.approvedDetailsByIdLoan(LOAND_ID); + System.out.println(result); + + assertNotNull(result); + } catch (Exception e) { + assertFalse(true); + } + } + + private PersonJaxb buildPerson(boolean isNewPerson, boolean isCustomer) { + PersonJaxb person = new PersonJaxb(); + + if (!isNewPerson) { + if (isCustomer) { + person.setId("e61db008-8e1e-11ea-b65e-4e1376171215"); + } else { + person.setId("2b502d50-8e1e-11ea-b65e-4e1376171215"); + } + } else { + person.setFirstName(DUMMY_DATA); + person.setSecondName(DUMMY_DATA); + person.setLastName(DUMMY_DATA); + person.setMiddleName(DUMMY_DATA); + person.setAddressHome(DUMMY_DATA); + person.setPhoneHome(DUMMY_DATA); + person.setCreatePerson(true); + person.setThumbnail("https://f0.pngfuel.com/png/980/304/man-profile-illustration-computer-icons-user-profile-avatar-png-clip-art.png"); + + if (isCustomer) { + person.setAddressWork(DUMMY_DATA); + person.setPhoneWork(DUMMY_DATA); + person.setCompanyName(DUMMY_DATA); + } + } + + return person; + } +} diff --git a/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/login/LoginWSControllerTest.java b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/login/LoginWSControllerTest.java new file mode 100644 index 0000000..a3515a8 --- /dev/null +++ b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/login/LoginWSControllerTest.java @@ -0,0 +1,46 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.login; + +import com.arrebol.apc.controller.mobile.moxy.login.UserMxy; +import org.junit.Before; +import org.junit.Test; +import static org.junit.Assert.*; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoginWSControllerTest { + + private LoginWSController controller; + private final static String USER_NAME = "avatar1"; + private final static String PASSWORD = "8478A4A2819E9C06AB738123C5D04B4FA1AA67548EBA64EAD40B635EA8AA8D5B"; + + public LoginWSControllerTest() { + } + + @Before + public void setUp() { + controller = new LoginWSController(); + } + + @Test + public void login() { + try { + UserMxy userMxy = controller.login(USER_NAME, PASSWORD); + + System.out.println(userMxy); + + assertFalse(userMxy.getPreferences().isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + +} diff --git a/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/preference/SystemPreferenceControllerTest.java b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/preference/SystemPreferenceControllerTest.java new file mode 100644 index 0000000..9499b67 --- /dev/null +++ b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/preference/SystemPreferenceControllerTest.java @@ -0,0 +1,58 @@ +package com.arrebol.apc.controller.mobile.controller.preference; + +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +import com.arrebol.apc.model.views.LoanByUserOrderPreferenceView; +import com.arrebol.apc.model.ws.parsed.ConfigurationJaxb; +import java.util.List; +import org.junit.Before; +import org.junit.Test; +import static org.junit.Assert.*; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class SystemPreferenceControllerTest { + + private SystemPreferenceController controller; + public static final String USER_ID = "52cbc85a-8bc9-11ea-b45c-c7b846343364"; + + public SystemPreferenceControllerTest() { + } + + @Before + public void setUp() { + controller = new SystemPreferenceController(); + } + + @Test + public void findAllLoanByUserOrderPreference() { + try { + List results = controller.findAllLoanByUserOrderPreference(USER_ID); + + results.forEach(System.out::println); + + assertFalse(results.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void findConfigurationButton() { + try { + ConfigurationJaxb result = controller.findConfigurationButton(USER_ID, USER_ID); + + assertTrue(result.isActiveButton()); + } catch (Exception e) { + assertFalse(true); + } + } + +} diff --git a/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/search/PersonSearchControllerTest.java b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/search/PersonSearchControllerTest.java new file mode 100644 index 0000000..4d3761a --- /dev/null +++ b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/search/PersonSearchControllerTest.java @@ -0,0 +1,74 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.search; + +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.views.LoanByUserView; +import com.arrebol.apc.model.views.PersonSearchDetailView; +import com.arrebol.apc.model.views.PersonSearchView; +import java.util.List; +import org.junit.Test; +import static org.junit.Assert.*; +import org.junit.Before; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class PersonSearchControllerTest { + + private PersonSearchController controller; + public static final String PERSON_SEARCH_ID = "83d2cd30-8e1d-11ea-b65e-4e1376171215"; + public static final String USER_ID = "67b3081e-8bc9-11ea-b45c-c7b846343364"; + + public PersonSearchControllerTest() { + } + + @Before + public void setUp() { + controller = new PersonSearchController(); + } + + //@Test + public void findAllLoanByUserOrderPreference() { + try { + List results = controller.findAllCoincidences("%janitzio%"); + + results.forEach(System.out::println); + + assertFalse(results.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + //@Test + public void findPersonSearchDetail() { + try { + PersonSearchDetailView personSearchDetailView = controller.findPersonSearchDetail(PERSON_SEARCH_ID); + + System.out.println(personSearchDetailView); + assertNotNull(personSearchDetailView); + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void searchPaymentDetails() { + try { + LoanByUserView personSearchDetailView = controller.searchPaymentDetails(USER_ID, PERSON_SEARCH_ID); + + System.out.println(personSearchDetailView); + assertNotNull(personSearchDetailView); + } catch (Exception e) { + assertFalse(true); + } + } + +} diff --git a/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/user/UserControllerTest.java b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/user/UserControllerTest.java new file mode 100644 index 0000000..a662eca --- /dev/null +++ b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/controller/user/UserControllerTest.java @@ -0,0 +1,66 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.controller.user; + +import com.arrebol.apc.model.core.User; +import java.util.List; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import org.junit.Before; +import org.junit.Test; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserControllerTest { + + /** + * Avatar 2 + */ + public final static String USER_MOBILE_AVATAR_2_ID = "52cbc85a-8bc9-11ea-b45c-c7b846343364"; + public final static String TEPIC_OFFICE = "caef3a64-7d1f-11ea-af3e-28f659da398e"; + + private UserController controller; + + @Before + public void setUp() { + controller = new UserController(); + } + + //@Test + public void isUserEnebled() { + try { + assertTrue(controller.isUserEnebled(USER_MOBILE_AVATAR_2_ID)); + } catch (Exception e) { + assertFalse(true); + } + } + + //@Test + public void containtsUserManagementProperty() { + try { + assertTrue(controller.containtsUserManagementProperty(USER_MOBILE_AVATAR_2_ID)); + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void listOfUsersByOffice() { + try { + List results = controller.listOfUsersByOffice(TEPIC_OFFICE); + + results.forEach(System.out::println); + + assertFalse(results.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } +} diff --git a/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/repository/ArrebolTestRepositoryTest.java b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/repository/ArrebolTestRepositoryTest.java new file mode 100644 index 0000000..07f847f --- /dev/null +++ b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/repository/ArrebolTestRepositoryTest.java @@ -0,0 +1,39 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository; + +import com.arrebol.apc.test.ArrebolTest; +import java.util.Date; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class ArrebolTestRepositoryTest { + + private ArrebolTestRepository repository; + + @Before + public void setUp() { + repository = new ArrebolTestRepository(); + } + + @Test + public void save() { + try { + ArrebolTest arrebolTest = new ArrebolTest(new Date(), new Date()); + + Assert.assertTrue(repository.saveArrebolTest(arrebolTest)); + } catch (Exception e) { + Assert.assertFalse(true); + } + } +} diff --git a/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/repository/loan/LoanTypeRepositoryTest.java b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/repository/loan/LoanTypeRepositoryTest.java new file mode 100644 index 0000000..62d37c4 --- /dev/null +++ b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/repository/loan/LoanTypeRepositoryTest.java @@ -0,0 +1,75 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.loan; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.constance.LoanTypeCfg; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanType; +import java.util.ArrayList; +import java.util.List; +import static org.junit.Assert.assertFalse; +import org.junit.Before; +import org.junit.Test; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoanTypeRepositoryTest { + + public static final String OFFICE_ID = "caef3a64-7d1f-11ea-af3e-28f659da398e"; + public static final String LOAND_ID = "acccdfac-8e1b-11ea-b65e-4e1376171215"; + + private LoanTypeRepository repository; + + @Before + public void setUp() { + repository = new LoanTypeRepository(); + } + + @Test + public void findLoanTypes() { + try { + List parameters = new ArrayList<>(); + + parameters.add( + new ModelParameter( + LoanTypeCfg.FIELD_OFFICE, + new Office(OFFICE_ID) + ) + ); + + parameters.add( + new ModelParameter( + LoanTypeCfg.PARAM_LOAN, + new Loan(LOAND_ID) + ) + ); + + parameters.add( + new ModelParameter( + LoanTypeCfg.PARAM_LOAN_ID, + LOAND_ID + ) + ); + + List results = repository.findLoanTypes( + LoanType.class, + LoanTypeCfg.QUERY_FIND_NEW_CREDIT_LINE_BY_LOAN_ID, + parameters); + + results.forEach(System.out::println); + assertFalse(results.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + +} diff --git a/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/repository/people/PeopleRepositoryTest.java b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/repository/people/PeopleRepositoryTest.java new file mode 100644 index 0000000..40dce2b --- /dev/null +++ b/ace-controller-mobile/src/test/java/com/arrebol/apc/controller/mobile/repository/people/PeopleRepositoryTest.java @@ -0,0 +1,68 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.mobile.repository.people; + +import com.arrebol.apc.controller.mobile.repository.people.PeopleRepository; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.PeopleType; +import java.util.Date; +import static org.junit.Assert.*; +import org.junit.Before; +import org.junit.Test; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class PeopleRepositoryTest { + + private PeopleRepository repository; + public static final String OFFICE_ID = "e0f1a2fc-7d1f-11ea-af3e-28f659da398e"; + public static final String ROUTE_ID = "5e9a24e0-8e19-11ea-b65e-4e1376171215"; + public static final String TEXT_VALUE = "Testing"; + + public PeopleRepositoryTest() { + } + + @Before + public void setUp() { + repository = new PeopleRepository(); + } + + @Test + public void createPeople() { + try { + People people = new People(); + + people.setFirstName(TEXT_VALUE); + people.setLastName(TEXT_VALUE); + people.setMiddleName(TEXT_VALUE); + people.setAddressHome(TEXT_VALUE); + people.setPhoneHome(TEXT_VALUE); + people.setThumbnail(TEXT_VALUE); + people.setPeopleType(PeopleType.BOTH); + people.setActiveStatus(ActiveStatus.DISABLED); + people.setOffice(new Office(OFFICE_ID)); + people.setRouteCtlg(new RouteCtlg(ROUTE_ID)); + people.setCreatedBy(TEXT_VALUE); + people.setCreatedOn(new Date()); + + String id = null;//repository.createPeople(people); + + System.out.println(id); + + assertNotNull(id); + } catch (Exception e) { + assertFalse(true); + } + } + +} diff --git a/ace-controller-mobile/src/test/resources/apc.cfg.xml b/ace-controller-mobile/src/test/resources/apc.cfg.xml new file mode 100644 index 0000000..6572c6b --- /dev/null +++ b/ace-controller-mobile/src/test/resources/apc.cfg.xml @@ -0,0 +1,228 @@ + + + + + org.hibernate.dialect.MySQLDialect + com.mysql.cj.jdbc.Driver + jdbc:mysql://localhost:3306/apo_pro_com_april_ten?serverTimezone=GMT-5 + apoprocommobilelocalhost + 0Ps$6%q8 + 1 + 2 + 300 + 50 + 3000 + false + false + true + thread + ${hibernate.connection.noAccessToProcedureBodies} + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-controller-mobile/src/test/resources/log4j2.xml b/ace-controller-mobile/src/test/resources/log4j2.xml new file mode 100644 index 0000000..64f531e --- /dev/null +++ b/ace-controller-mobile/src/test/resources/log4j2.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-controller/nb-configuration.xml b/ace-controller/nb-configuration.xml new file mode 100644 index 0000000..a65c451 --- /dev/null +++ b/ace-controller/nb-configuration.xml @@ -0,0 +1,18 @@ + + + + + + JDK_1.8 + + diff --git a/ace-controller/pom.xml b/ace-controller/pom.xml new file mode 100644 index 0000000..4ef1c79 --- /dev/null +++ b/ace-controller/pom.xml @@ -0,0 +1,92 @@ + + + 4.0.0 + com.arrebol + ace-controller + 1.0.0 + jar + + UTF-8 + 1.8 + 1.8 + 2.17.0 + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12.4 + + true + + + + + + + + mysql + mysql-connector-java + 8.0.12 + + + + org.apache.logging.log4j + log4j-api + ${log4j.version} + + + org.apache.logging.log4j + log4j-core + ${log4j.version} + + + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} + + + org.apache.commons + commons-dbcp2 + 2.6.0 + + + + com.arrebol + ace-layout + 1.0.0 + jar + + + com.arrebol + ace-model + 1.0.0 + + + + junit + junit + 4.12 + test + + + ace-controller + \ No newline at end of file diff --git a/ace-controller/pom.xml.bak b/ace-controller/pom.xml.bak new file mode 100644 index 0000000..ba28277 --- /dev/null +++ b/ace-controller/pom.xml.bak @@ -0,0 +1,92 @@ + + + 4.0.0 + com.arrebol + ace-controller + 1.0.0 + jar + + UTF-8 + 1.8 + 1.8 + 2.17.0 + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12.4 + + true + + + + + + + + mysql + mysql-connector-java + 8.0.12 + + + + org.apache.logging.log4j + log4j-api + ${log4j.version} + + + org.apache.logging.log4j + log4j-core + ${log4j.version} + + + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} + + + org.apache.commons + commons-dbcp2 + 2.6.0 + + + + com.arrebol + apc-layout + 1.0.0 + jar + + + com.arrebol + apc-model + 1.0.0 + + + + junit + junit + 4.12 + test + + + ace-controller + \ No newline at end of file diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/BitacoraController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/BitacoraController.java new file mode 100644 index 0000000..f5f151c --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/BitacoraController.java @@ -0,0 +1,75 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.BitacoraCfg; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class BitacoraController implements Serializable{ + + /** + * + * Searching all bitacora by office. + * + * @param officeId + * @return + */ + public List fillBitacoraDatatable(String officeId) { + logger.debug("fillBitacoraDatatable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(BitacoraCfg.FIELD_OFFICE, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(Bitacora.class, BitacoraCfg.QUERY_FIND_ALL_BITACORA_BY_OFFICE, parameters); + } + + public List fillBitacoraDatatableByDate(String officeId, Date startDate, Date endDate) { + logger.debug("fillBitacoraDatatableByDate"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(BitacoraCfg.FIELD_OFFICE, new Office(officeId))); + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(Bitacora.class, BitacoraCfg.QUERY_FIND_ALL_BITACORA_BY_OFFICE_DATE, parameters); + } + + /** + * + * @param bitacora + * @return boolean + */ + public boolean saveBitacora(Bitacora bitacora) { + logger.debug("saveBitacora"); + boolean success = genericEntityRepository.insertAPCEntity(bitacora); + + return success; + + } + + final Logger logger = LogManager.getLogger(BitacoraController.class); + private final GenericEntityRepository genericEntityRepository; + + public BitacoraController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/GenericController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/GenericController.java new file mode 100644 index 0000000..74a83aa --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/GenericController.java @@ -0,0 +1,236 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller; + +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.ClosingDayCfg; +import com.arrebol.apc.model.admin.constance.StableGeneralBoxCfg; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.HumanResourceCfg; +import com.arrebol.apc.model.core.constance.UserCfg; +import com.arrebol.apc.model.enums.HumanResourceStatus; +import com.arrebol.apc.model.views.GeneralBoxView; +import com.arrebol.apc.model.views.constance.GeneralBoxViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; +import org.hibernate.query.Query; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class GenericController implements Serializable{ + + /** + * + * Searching all user actives by office. + * + * @param officeId + * @return + */ + public List getAllUsersByOffice(String officeId) { + logger.debug("getAllUsersByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserCfg.FIELD_OFFICE, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(User.class, UserCfg.QUERY_FIND_ALL_USERS_COMPLETE, parameters); + } + + /** + * + * Searching all human resources actives by office. + * + * @param officeId + * @return + */ + public List getAllHRByOffice(String officeId) { + logger.debug("getAllHRByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_OFFICE, new Office(officeId))); + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, HumanResourceStatus.ENEBLED)); + + return genericEntityRepository.xmlQueryAPCEntities(HumanResource.class, HumanResourceCfg.QUERY_FIND_ALL_HR_BY_OFFICE, parameters); + } + + /** + * + * Searching all details by general box by office. + * + * @param officeId + * @return + */ + public BigDecimal findAllGeneralBox(String officeId) { + logger.debug("findAllGeneralBox"); + List generalBox = null; + BigDecimal totalBox; + totalBox = BigDecimal.ZERO; + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(GeneralBoxViewCfg.FIELD_OFFICE, officeId)); + + generalBox = genericEntityRepository.xmlQueryAPCEntities(GeneralBoxView.class, GeneralBoxViewCfg.QUERY_FIND_ALL_DETAILS, parameters); + + if(generalBox != null && !generalBox.isEmpty()) + { + for(GeneralBoxView total : generalBox) + { + if(total.getType().equalsIgnoreCase("Inicio")) + totalBox = totalBox.subtract(total.getAmount()); + if(total.getType().equalsIgnoreCase("Corte del día")) + totalBox = totalBox.add(total.getAmount()); + if(total.getType().equalsIgnoreCase("Entrada")) + totalBox = totalBox.add(total.getAmount()); + if(total.getType().equalsIgnoreCase("Salida")) + totalBox = totalBox.subtract(total.getAmount()); + if(total.getType().equalsIgnoreCase("Adelanto")) + totalBox = totalBox.subtract(total.getAmount()); + if(total.getType().equalsIgnoreCase("Nomina")) + totalBox = totalBox.subtract(total.getAmount()); + if(total.getType().equalsIgnoreCase("Préstamo Empleado")) + totalBox = totalBox.subtract(total.getAmount()); + } + } + + return totalBox; + } + + public BigDecimal findAllSmallBox(String officeId) { + logger.debug("findAllSmallBox"); + BigDecimal totalBox; + totalBox = BigDecimal.ZERO; + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_OFFICE, new Office(officeId))); + + totalBox = (BigDecimal)genericEntityRepository.xmlQueryAPCEntityUniqueResult(BigDecimal.class, + ClosingDayCfg.QUERY_SUM_CLOSING_DAY_BY_CURDATE_AND_OFFICE, parameters); + + return totalBox; + } + + + public BigDecimal findAllSmallBoxByLastSmallBox(String officeId, Date lastSmallBox) { + logger.debug("findAllSmallBoxByLastSmalBox"); + BigDecimal totalBox; + totalBox = BigDecimal.ZERO; + + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createQuery("SELECT SUM(amountPaid) FROM ClosingDay WHERE office.id = :idOffice AND createdOn > :lastBox AND activeStatus = 'ENEBLED'"); + query.setParameter("idOffice", officeId); + query.setParameter("lastBox", lastSmallBox); + query.setMaxResults(1); + totalBox = (BigDecimal) query.uniqueResult(); + + + + transaction.commit(); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error(e); + rollback(transaction); + } + + + return totalBox; + } + + public Date getMaxDateStableGeneralBoxByOffice(String officeid) { + logger.debug("getMaxDateStableGeneralBoxByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(StableGeneralBoxCfg.FIELD_OFFICE, new Office(officeid))); + + return (Date) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Date.class, StableGeneralBoxCfg.QUERY_MAX_STABLE_GENERAL_BOX_BY_OFFICE, parameters); + } + + public Date getMaxDateClosingDayByOffice(String officeid) { + logger.debug("getMaxDateClosingDayByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(StableGeneralBoxCfg.FIELD_OFFICE, new Office(officeid))); + + return (Date) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Date.class, StableGeneralBoxCfg.QUERY_MAX_CLOSING_DAY_BY_OFFICE, parameters); + } + + public boolean verifyStableGeneralBoxVsClosingDay(String officeid) + { + if(getMaxDateStableGeneralBoxByOffice(officeid) == null || getMaxDateClosingDayByOffice(officeid) == null) + { + return true; + } + if(getMaxDateStableGeneralBoxByOffice(officeid).compareTo(getMaxDateClosingDayByOffice(officeid)) == 0) + { + return true; + } + else + { + return false; + } + } + + public boolean existStableSmallBoxByCreatedOn(Date date) { + logger.info("existStableSmallBoxByCreatedOn"); + + String query = "SELECT ssb.id " + + "FROM APC_STABLE_SMALL_BOX ssb " + + "WHERE DATE(ssb.created_on) = DATE(:date) " + + "AND ssb.active_status = 'ENEBLED'"; + + return genericEntityRepository.existRecordsUsingSQLQueryFindByCreatedOnField(date, query); + } + + /** + * + * @param date + * @return + */ + public boolean existStableGeneralBoxByCreatedOn(Date date) { + logger.info("existStableGeneralBoxByCreatedOn"); + + String query = "SELECT sgb.id " + + "FROM APC_STABLE_GENERAL_BOX sgb " + + "WHERE DATE(sgb.created_on) = DATE(:date) " + + "AND sgb.active_status = 'ENEBLED'"; + + return genericEntityRepository.existRecordsUsingSQLQueryFindByCreatedOnField(date, query); + } + + protected void rollback(Transaction transaction) { + if (null != transaction) { + transaction.rollback(); + } + } + + final Logger logger = LogManager.getLogger(GenericController.class); + private final GenericEntityRepository genericEntityRepository; + + public GenericController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/GenericValidationController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/GenericValidationController.java new file mode 100644 index 0000000..2037fd1 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/GenericValidationController.java @@ -0,0 +1,202 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller; + +import com.arrebol.apc.controller.util.ConnectionManager; +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.admin.ClosingDay; +import com.arrebol.apc.model.core.User; +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class GenericValidationController extends ConnectionManager implements Serializable{ + + /** + * + * @param date + * @param user + * @return + */ + public boolean existClosingDayByCreatedOn(Date date, User user) { + logger.info("existClosingDayByCreatedOn"); + + boolean success = true; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + String query = "SELECT COUNT(ssb.id) " + + "FROM ClosingDay ssb " + + "WHERE DATE(ssb.createdOn) = DATE(:date) " + + "AND ssb.activeStatus = 'ENEBLED' " + + "AND ssb.user = :user"; + + Long count = (Long) session.createQuery(query) + .setParameter("date", date) + .setParameter("user", user).uniqueResult(); + + if (null != count && count == 0) { + success = false; + } + + transaction.commit(); + + logger.info("Total of closing day found: " + count); + } catch (HibernateException e) { + logger.error("Can not find stable small box by created on", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method existStableSmallBoxByCreatedOn()", e); + rollback(transaction); + } + + return success; + } + + public boolean existStableGeneralBoxByCurdate(User user) { + logger.info("existStableGeneralBoxByCurdate"); + + boolean success = true; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + String query = "SELECT COUNT(ssb.id) " + + "FROM StableGeneralBox ssb " + + "WHERE DATE(ssb.createdOn) = CURDATE() " + + "AND ssb.activeStatus = 'ENEBLED'"; + + Long count = (Long) session.createQuery(query).uniqueResult(); + + if (null != count && count == 0) { + success = false; + } + + transaction.commit(); + + logger.info("Total of StableGeneralBox found: " + count); + } catch (HibernateException e) { + logger.error("Can not find StableGeneralBox by created on", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method existStableGeneralBoxByCurdate()", e); + rollback(transaction); + } + + return success; + } + + public Date lastStableGeneralBoxByDate(User user) { + logger.info("lastStableGeneralBoxByDate"); + + Date success = null; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + String query = "SELECT cd.createdOn FROM StableGeneralBox cd " + + "WHERE DATE(cd.createdOn) <= CURDATE() AND cd.activeStatus = 'ENEBLED' " + + "order by cd.createdOn DESC"; + + success = (Date) session.createQuery(query).setMaxResults(1) + .uniqueResult(); + + transaction.commit(); + + logger.info("Total of closing day found: "); + } catch (HibernateException e) { + logger.error("Can not find stable small box by created on", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method lastStableGeneralBoxByDate()", e); + rollback(transaction); + } + + return success; + } + + public Date lastStableSmallBoxByDate(User user) { + logger.info("lastStableSmallBoxByDate"); + + Date success = null; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + String query = "SELECT cd.createdOn FROM StableSmallBox cd " + + "WHERE DATE(cd.createdOn) <= CURDATE() AND cd.activeStatus = 'ENEBLED' " + + "order by cd.createdOn DESC"; + + success = (Date) session.createQuery(query).setMaxResults(1) + .uniqueResult(); + + transaction.commit(); + + logger.info("Total of closing day found: "); + } catch (HibernateException e) { + logger.error("Can not find stable small box by created on", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method lastStableSmallBoxByDate()", e); + rollback(transaction); + } + + return success; + } + + public List allClosingDayByDate( ) { + logger.info("allClosingDayByDate"); + + List success = null; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + String query = "SELECT cd FROM ClosingDay cd " + + "WHERE DATE(cd.createdOn) = CURDATE() AND cd.activeStatus = 'ENEBLED'"; + + success = session.createQuery(query).getResultList(); + + transaction.commit(); + + logger.info("Total of closing day found: "); + } catch (HibernateException e) { + logger.error("Can not find stable small box by created on", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method lastStableSmallBoxByDate()", e); + rollback(transaction); + } + + return success; + } + + final Logger logger = LogManager.getLogger(GenericValidationController.class); + private static final long serialVersionUID = -6732331411572526429L; + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/AdministrationPersonSearchViewController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/AdministrationPersonSearchViewController.java new file mode 100644 index 0000000..e079f61 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/AdministrationPersonSearchViewController.java @@ -0,0 +1,148 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.catalog.constance.RouteCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.model.views.AdministrationPersonSerchView; +import com.arrebol.apc.model.views.constance.AdministrationPersonSerchViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class AdministrationPersonSearchViewController implements Serializable { + + public List findAllActiveRoutesByOfficce(String idOffice) { + List routes; + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(RouteCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(RouteCfg.FIELD_OFFICE, new Office(idOffice))); + + routes = genericEntityRepository.xmlQueryAPCEntities(RouteCtlg.class, RouteCfg.QUERY_FIND_ALL_ROUTES, parameters); + } catch (Exception e) { + routes = new ArrayList<>(); + + logger.error("findPersonByTypeAndRouteAndOffice", e); + } + return routes; + } + + /** + * + * @param type + * @param idRoute + * @param idOffice + * @return + */ + public List findPersonByTypeAndRouteAndOffice(PeopleType type, String idRoute, String idOffice) { + List persons; + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(AdministrationPersonSerchViewCfg.FIELD_PEOPLE_TYPE, type)); + parameters.add(new ModelParameter(AdministrationPersonSerchViewCfg.FIELD_ID_ROUTE, idRoute)); + parameters.add(new ModelParameter(AdministrationPersonSerchViewCfg.FIELD_ID_OFFICE, idOffice)); + + persons = genericEntityRepository.xmlQueryAPCEntities(AdministrationPersonSerchView.class, AdministrationPersonSerchViewCfg.QUERY_FIND_PERSON_BY_TYPE_ROUTE_OFFICE, parameters); + } catch (Exception e) { + persons = new ArrayList<>(); + + logger.error("findPersonByTypeAndRouteAndOffice", e); + } + return persons; + } + + /** + * + * @param personSearch + * @param type + * @param routes + * @param idOffice + * @return + */ + public List likePersonNameInPersonTypeInRoutesAndOffice(String personSearch, PeopleType type, List routes, String idOffice) { + List persons; + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(AdministrationPersonSerchViewCfg.FIELD_PERSON_SEARCH, personSearch)); + parameters.add(new ModelParameter(AdministrationPersonSerchViewCfg.FIELD_PEOPLE_TYPE, type)); + parameters.add(new ModelParameter(AdministrationPersonSerchViewCfg.FIELD_ID_ROUTE, routes)); + parameters.add(new ModelParameter(AdministrationPersonSerchViewCfg.FIELD_ID_OFFICE, idOffice)); + + persons = genericEntityRepository.xmlQueryAPCEntities(AdministrationPersonSerchView.class, AdministrationPersonSerchViewCfg.QUERY_LIKE_PERSON_NAME_IN_PERSON_TYPE_IN_ROUTES_AND_OFFICE, parameters); + } catch (Exception e) { + persons = new ArrayList<>(); + + logger.error("likePersonNameInPersonTypeInRoutesAndOffice", e); + } + return persons; + } + + /** + * + * @param personSearch + * @param type + * @param idOffice + * @return + */ + public List likePersonNameInPersonTypeAllRoutesByOffice(String personSearch, PeopleType type, String idOffice) { + List persons; + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(AdministrationPersonSerchViewCfg.FIELD_PERSON_SEARCH, personSearch)); + parameters.add(new ModelParameter(AdministrationPersonSerchViewCfg.FIELD_PEOPLE_TYPE, type)); + parameters.add(new ModelParameter(AdministrationPersonSerchViewCfg.FIELD_ID_OFFICE, idOffice)); + + persons = genericEntityRepository.xmlQueryAPCEntities(AdministrationPersonSerchView.class, AdministrationPersonSerchViewCfg.QUERY_LIKE_PERSON_NAME_IN_PERSON_TYPE_ALL_ROUTES_BY_OFFICE, parameters); + } catch (Exception e) { + persons = new ArrayList<>(); + + logger.error("likePersonNameInPersonTypeAllRoutesByOffice", e); + } + return persons; + } + + /** + * + * @param id + * @return + */ + public AdministrationPersonSerchView administrationPersonSerchViewById(String id) { + AdministrationPersonSerchView person; + try { + person = (AdministrationPersonSerchView) genericEntityRepository.selectAPCEntityById(AdministrationPersonSerchView.class, id); + } catch (Exception e) { + person = new AdministrationPersonSerchView(); + + logger.error("administrationPersonSerchViewById", e); + } + return person; + } + + public AdministrationPersonSearchViewController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + + final Logger logger = LogManager.getLogger(getClass()); + private final GenericEntityRepository genericEntityRepository; +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/AdvanceController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/AdvanceController.java new file mode 100644 index 0000000..d99b83d --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/AdvanceController.java @@ -0,0 +1,91 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.Advance; +import com.arrebol.apc.model.admin.constance.AdvanceCfg; +import com.arrebol.apc.model.admin.constance.BonusCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class AdvanceController implements Serializable { + + /** + * + * Searching all advances by office. + * + * @param officeId + * @param startDate + * @param endDate + * @return + */ + public List fillAdvanceDatatable(String officeId, Date startDate, Date endDate) { + logger.debug("fillAdvanceDatatable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(AdvanceCfg.FIELD_OFFICE, new Office(officeId))); + //parameters.add(new ModelParameter(AdvanceCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(BonusCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(BonusCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(Advance.class, AdvanceCfg.QUERY_FIND_ALL_ADVANCE_BY_OFFICE_BETWEEN_DATES, parameters); + } + + /** + * + * @param advance + * @return boolean + */ + public boolean saveAdvance(Advance advance) { + logger.debug("saveAdvance"); + boolean success = genericEntityRepository.insertAPCEntity(advance); + + return success; + + } + + /** + * + * @param status + * @param advanceIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateAdvanceByStatus(ActiveStatus status, String advanceIdToUpdate, String lastUpdatedBy) { + logger.debug("updateAdvanceByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(AdvanceCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(AdvanceCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(AdvanceCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(AdvanceCfg.FIELD_ID, advanceIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(AdvanceCfg.QUERY_UPDATE_ADVANCE_BY_STATUS, parameters); + } + + final Logger logger = LogManager.getLogger(AdvanceController.class); + private final GenericEntityRepository genericEntityRepository; + + public AdvanceController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/BonusController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/BonusController.java new file mode 100644 index 0000000..af92303 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/BonusController.java @@ -0,0 +1,102 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.Bonus; +import com.arrebol.apc.model.admin.constance.BonusCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class BonusController implements Serializable{ + + private static final long serialVersionUID = 4204730064288408417L; + + /** + * + * Searching all advances by office. + * + * @param officeId + * @param startDate + * @param endDate + * @return + */ + public List fillBonusDatatable(String officeId, Date startDate, Date endDate) { + logger.debug("fillBonusDatatable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(BonusCfg.FIELD_OFFICE, new Office(officeId))); + parameters.add(new ModelParameter(BonusCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(BonusCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(BonusCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(Bonus.class, BonusCfg.QUERY_FIND_ALL_BONUS_BETWEEN_DATES, parameters); + } + + /** + * + * @param bonus + * @return boolean + */ + public boolean updateByBonusId(Bonus bonus) { + logger.debug("updateByBonusId"); + + return genericEntityRepository.updateAPCEntity(bonus); + } + + /** + * + * @param bonus + * @return boolean + */ + public boolean saveBonus(Bonus bonus) { + logger.debug("saveBonus"); + boolean success = genericEntityRepository.insertAPCEntity(bonus); + + return success; + } + + /** + * + * @param status + * @param bonusIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateBonusByStatus(ActiveStatus status, String bonusIdToUpdate, String lastUpdatedBy) { + logger.debug("updateBonusByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(BonusCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(BonusCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(BonusCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(BonusCfg.FIELD_ID, bonusIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(BonusCfg.QUERY_UPDATE_BONUS_BY_STATUS, parameters); + } + + final Logger logger = LogManager.getLogger(BonusController.class); + private final GenericEntityRepository genericEntityRepository; + + public BonusController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/ChangeOwnerController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/ChangeOwnerController.java new file mode 100644 index 0000000..3411818 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/ChangeOwnerController.java @@ -0,0 +1,140 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.ClosingDayCfg; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.LoanByUserCfg; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.views.AvailablesOwnersView; +import com.arrebol.apc.model.views.CurrentCustomerByLoanView; +import com.arrebol.apc.model.views.constance.AvailablesOwnersViewCfg; +import com.arrebol.apc.model.views.constance.CurrentCustomerByLoanViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class ChangeOwnerController implements Serializable { + + /** + * Find all users that have loans by office. + * + * @param officeId + * @return + * @throws Exception + */ + public List findAllCurrentOwners(String officeId) throws Exception { + logger.info("findAllCurrentOwners"); + + List results = new ArrayList(); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(AvailablesOwnersViewCfg.PARAM_OFFICE_ID, officeId)); + + results = genericEntityRepository.xmlQueryAPCEntities(AvailablesOwnersView.class, AvailablesOwnersViewCfg.QUERY_FIND_ALL_CURRENT_OWNERS, parameters); + } catch (Exception e) { + logger.error("findAllCurrentOwners", e); + } + return results; + } + + /** + * Find all users in office execluding user id (currentOwnerId). + * + * @param officeId + * @param currentOwnerId + * @return + * @throws Exception + */ + public List findAllNewOwners(String officeId, String currentOwnerId) throws Exception { + logger.info("findAllNewOwners"); + + List results = new ArrayList(); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(AvailablesOwnersViewCfg.PARAM_OFFICE_ID, officeId)); + parameters.add(new ModelParameter(AvailablesOwnersViewCfg.USER_ID, currentOwnerId)); + + results = genericEntityRepository.xmlQueryAPCEntities(AvailablesOwnersView.class, AvailablesOwnersViewCfg.QUERY_FIND_ALL_NEW_OWNERS, parameters); + } catch (Exception e) { + logger.error("findAllNewOwners", e); + } + return results; + } + + /** + * Find all loans that current owner has in status PENDING, TO_DELIVERY, + * PENDING_RENOVATION and APPROVED. + * + * @param officeId + * @param currentOwnerId + * @return + * @throws Exception + */ + public List findAllLoansByCurrentOwner(String officeId, String currentOwnerId) throws Exception { + logger.info("findAllLoansByCurrentOwner"); + + List results = new ArrayList(); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(CurrentCustomerByLoanViewCfg.PARAM_OFFICE_ID, officeId)); + parameters.add(new ModelParameter(CurrentCustomerByLoanViewCfg.USER_ID, currentOwnerId)); + + results = genericEntityRepository.xmlQueryAPCEntities(CurrentCustomerByLoanView.class, CurrentCustomerByLoanViewCfg.QUERY_FIND_ALL_LOANS_BY_CURRENT_OWNER, parameters); + } catch (Exception e) { + logger.error("findAllLoansByCurrentOwner", e); + } + return results; + } + + /** + * + * @param newOwner + * @param loans + * @return + */ + public boolean changeLoansBetweenUsers(String newOwner, List loans) { + logger.info("changeLoansBetweenUsers"); + + boolean success = false; + + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanByUserCfg.FIELD_USER, new User(newOwner))); + parameters.add(new ModelParameter(LoanByUserCfg.PARAMS_LOAN, loans)); + + success = genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanByUserCfg.QUERY_CHANGE_LOANS_BETWEEN_USERS_IN_LOAN_IDS, parameters); + } catch (Exception e) { + logger.error("changeLoansBetweenUsers", e); + } + + return success; + } + + private static final long serialVersionUID = 2051770456409752434L; + final Logger logger = LogManager.getLogger(getClass().getName()); + + private final GenericEntityRepository genericEntityRepository; + + public ChangeOwnerController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/ClosingDayController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/ClosingDayController.java new file mode 100644 index 0000000..252da32 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/ClosingDayController.java @@ -0,0 +1,439 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.controller.util.ConnectionManager; +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.ClosingDay; +import com.arrebol.apc.model.admin.ClosingDayDetail; +import com.arrebol.apc.model.admin.constance.ClosingDayCfg; +import com.arrebol.apc.model.admin.constance.ClosingDayDetailCfg; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView; +import com.arrebol.apc.model.views.LoanByUserPaymentZeroView; +import com.arrebol.apc.model.views.TotalCashByCurdateDashboardView; +import com.arrebol.apc.model.views.TotalCashByCurdateView; +import com.arrebol.apc.model.views.TotalClosingDayByCurdateView; +import com.arrebol.apc.model.views.constance.ClosingDailyDetailFromUserByCurdateCfg; +import com.arrebol.apc.model.views.constance.LoanByUserPaymentZeroViewCfg; +import com.arrebol.apc.model.views.constance.TotalLoansByOfficeViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class ClosingDayController extends ConnectionManager implements Serializable { + + /** + * + * Searching all closing day by office. + * + * @param officeId + * @param startDate + * @param endDate + * @return + */ + public List fillClosingDayDatatable(String officeId, Date startDate, Date endDate) { + logger.debug("fillClosingDayDatatable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_OFFICE, new Office(officeId))); + //parameters.add(new ModelParameter(ClosingDayCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(ClosingDayCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(ClosingDayCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(ClosingDay.class, ClosingDayCfg.QUERY_FIND_ALL_CLOSING_DAY_BY_OFFICE_BETWEEN_DATES, parameters); + } + + /** + * + * @param status + * @param closingDayIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateClosingDayByStatus(ActiveStatus status, String closingDayIdToUpdate, String lastUpdatedBy) { + logger.debug("updateClosingDayByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_ID, closingDayIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(ClosingDayCfg.QUERY_UPDATE_CLOSING_DAY_BY_STATUS, parameters); + } + + /** + * + * @param closingDay + * @return boolean + */ + public boolean saveClosingDay(ClosingDay closingDay) { + logger.debug("saveClosingDay"); + boolean success = genericEntityRepository.insertAPCEntity(closingDay); + + return success; + } + + /** + * + * Searching TotalCashByCurdateView by id. + * + * @param id + * @return + */ + public TotalCashByCurdateView getTotalCashByCurdateViewById(String id) { + logger.debug("getTotalCashByCurdateViewById"); + + return (TotalCashByCurdateView) genericEntityRepository.selectAPCEntityById(TotalCashByCurdateView.class, id); + } + + /** + * + * Searching all total money day by office. + * + * @param officeId + * @return + */ + public List getAllTotalCashByCurdateView(String officeId) { + logger.debug("getAllTotalCashByCurdateView"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_VIEW_OFFICE, officeId)); + + return genericEntityRepository.xmlQueryAPCEntities(TotalCashByCurdateView.class, ClosingDayCfg.QUERY_FIND_TOTAL_BY_OFFICE, parameters); + } + + public List getAllTotalCashByCurdateDashboardView(String officeId) { + logger.debug("getAllTotalCashByCurdateDashboardView"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_VIEW_OFFICE, officeId)); + + return genericEntityRepository.xmlQueryAPCEntities(TotalCashByCurdateDashboardView.class, ClosingDayCfg.QUERY_FIND_TOTAL_DASHBOARD_BY_OFFICE, parameters); + } + + /** + * + * Searching all TotalClosingDayByCurdateView by curdate. + * + * @param officeId + * @return + */ + public List findAllClosingDayByCurdate(String officeId) { + logger.debug("findAllClosingDayByCurdate"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_VIEW_OFFICE, officeId)); + + return genericEntityRepository.xmlQueryAPCEntities(TotalClosingDayByCurdateView.class, ClosingDayCfg.QUERY_FIND_ALL_CLOSING_DAY_BY_CURDATE, parameters); + } + + /** + * + * Searching all ClosingDailyDetailFromUserByCurdateView by curdate. + * + * @param userId + * @return + */ + public List findAllClosingDailyDetailFromUserByCurdateView(String userId) { + logger.debug("findAllClosingDailyDetailFromUserByCurdateView"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ClosingDailyDetailFromUserByCurdateCfg.FIELD_VIEW_USER, userId)); + + return genericEntityRepository.xmlQueryAPCEntities(ClosingDailyDetailFromUserByCurdateView.class, ClosingDailyDetailFromUserByCurdateCfg.QUERY_FIND_ALL_DETAILS, parameters); + } + + /** + * + * Searching all ClosingDailyDetailFromUserByCurdateView by curdate. + * + * @param userId + * @return + */ + public List findAllClosingDailyDetailFromUserCertifierByCurdateView(String userId) { + logger.debug("findAllClosingDailyDetailFromUserCertifierByCurdateView"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ClosingDailyDetailFromUserByCurdateCfg.FIELD_VIEW_USER, userId)); + + return genericEntityRepository.xmlQueryAPCEntities(ClosingDailyDetailFromUserByCurdateView.class, ClosingDailyDetailFromUserByCurdateCfg.QUERY_FIND_ALL_DETAILS_CERTIFIER, parameters); + } + + /** + * + * Searching the num by closing day + * + * @param num for closing day + * @return + */ + public Long getClosingDayCurdateByUserId(String userId, String officeid) { + logger.debug("getClosingDayCurdateByUserId"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_USER, new User(userId))); + parameters.add(new ModelParameter(ClosingDayCfg.FIELD_OFFICE, new Office(officeid))); + + return (Long) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Long.class, ClosingDayCfg.QUERY_COUNT_CLOSING_DATE_BY_USER_AND_OFFICE, parameters); + } + + public Long getLoansCountDailyByUser(String userId) { + logger.debug("getLoansCountDailyByUser"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(TotalLoansByOfficeViewCfg.FIELD_VIEW_USER, userId)); + + return (Long) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Long.class, TotalLoansByOfficeViewCfg.QUERY_COUNT_ALL_LOANS_BY_USER, parameters); + } + + public List getLoansPaymentZeroByUser(String userId) { + logger.debug("getLoansPaymentZeroByUser"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanByUserPaymentZeroViewCfg.FIELD_VIEW_USER, new User(userId))); + + return genericEntityRepository.xmlQueryAPCEntities(LoanByUserPaymentZeroView.class, LoanByUserPaymentZeroViewCfg.QUERY_FIND_ALL_LOANS_PAYMENT_ZERO_BY_USER, parameters); + } + + /** + * + * @param details + * @return boolean + */ + public boolean saveClosingDayDetail(List details) { + logger.debug("saveClosingDayDetail"); + boolean success = genericEntityRepository.insertManyAPCEntity(details); + + return success; + } + + /** + * + * Searching closing day by id. + * + * @param closingDayId + * @return + */ + public ClosingDay getClosingDayById(String closingDayId) { + logger.debug("getClosingDayById"); + + return (ClosingDay) genericEntityRepository.selectAPCEntityById(ClosingDay.class, closingDayId); + } + + public List getClosingDayDetailByIdClosingDay(String closingDay) { + logger.debug("getClosingDayDetailByIdClosingDay"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ClosingDayDetailCfg.FIELD_CLOSING_DAY, new ClosingDay(closingDay))); + + return genericEntityRepository.xmlQueryAPCEntities(ClosingDayDetail.class, ClosingDayDetailCfg.QUERY_FIND_ALL_CLOSING_DAY_DETAIL_BY_ID, parameters); + } + + public User getUserById(String userId) { + logger.debug("getUserById"); + + return (User) genericEntityRepository.selectAPCEntityById(User.class, userId); + } + + /** + * + * @param date + * @return + */ + public boolean existNextPaidClosingDayByCreatedOn(Date date) { + logger.info("existNextPaidClosingDayByCreatedOn"); + + String query = "SELECT cd.id " + + "FROM APC_CLOSING_DAY cd " + + "WHERE DATE(cd.created_on) >= DATE_ADD(DATE(:date), INTERVAL 1 DAY) " + + "AND cd.active_status = 'ENEBLED'"; + + return genericEntityRepository.existRecordsUsingSQLQueryFindByCreatedOnField(date, query); + } + + /** + * + * @param date + * @return + */ + public boolean existStableSmallBoxByCreatedOn(Date date) { + logger.info("existStableSmallBoxByCreatedOn"); + + String query = "SELECT ssb.id " + + "FROM APC_STABLE_SMALL_BOX ssb " + + "WHERE DATE(ssb.created_on) = DATE(:date) " + + "AND ssb.active_status = 'ENEBLED'"; + + return genericEntityRepository.existRecordsUsingSQLQueryFindByCreatedOnField(date, query); + } + + /** + * + * @param userId + * @return + */ + public List findDetailsFromClosingDayCurDate(String userId){ + logger.debug("findDetailsFromClosingDayCurDate"); + + List rows = new ArrayList<>(); + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + rows = session.createNativeQuery(queryClosingDayReport).setParameter("userId", userId).getResultList(); + + transaction.commit(); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method findDetailsFromClosingDayCurDate(" + userId + " " + ") ", e); + rollback(transaction); + } + + return rows; + } + + public List findDetailsFromClosingDayHisotry(String idClosingDay){ + logger.debug("findDetailsFromClosingDayCurDate"); + + List rows = new ArrayList<>(); + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + rows = session.createNativeQuery(queryClosingDayReportHistory).setParameter("idClosingDay", idClosingDay).getResultList(); + + transaction.commit(); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method findDetailsFromClosingDayHistory(" + idClosingDay + " " + ") ", e); + rollback(transaction); + } + + return rows; + } + + /** + * + * Searching people. + * + * @param peopleId + * @return + */ + public People findPeopleById(String peopleId) { + logger.debug("findPeopleById"); + + return (People) genericEntityRepository.selectAPCEntityById(User.class, peopleId); + } + + final Logger logger = LogManager.getLogger(ClosingDayController.class); + private final GenericEntityRepository genericEntityRepository; + + public ClosingDayController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + + private final String queryClosingDayReport = + "SELECT " + + "cldd.comments, " + + "cldd.amount, " + + "cldd.type, " + + "cldd.saldo, " + + "cldd.created_on, " + + "cldd.comisionApertura, " + + "cldd.prestamoAnterior, " + + "cldd.route, " + + "CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS username, " + + "(SELECT sum(tc.total_amount_payment) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as total_amount_payment, " + + "(SELECT sum(tc.total_amount_deposit) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as total_amount_deposit, " + + "(SELECT sum(tc.transfer_sender) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_sender, " + + "(SELECT sum(tc.transfer_receiver) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_receiver, " + + "(SELECT sum(tc.money_daily) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as money_daily, " + + "(SELECT sum(tc.other_expense) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as other_expense, " + + "(SELECT sum(tc.delivery) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as delivery, " + + "(SELECT sum(tc.transfer_pending) FROM APC_TOTAL_CASH_BY_CURDATE_VIEW tc where id = :userId) as transfer_pending " + + "FROM " + + " APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW_REPORT cldd " + + "INNER JOIN " + + " APC_USER u ON u.id = cldd.id_user " + + "INNER JOIN " + + " APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource " + + "WHERE " + + " cldd.id_user = :userId " + + "ORDER BY " + + " cldd.created_on ASC"; + + + private final String queryClosingDayReportHistory = +" SELECT " + +" cldd.comments, " + +" cldd.amount, " + +" cldd.type, " + +" cldd.created_on, " + +" cd.amount_expected, " + +" cd.amount_paid, " + +" CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS username, " + +" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Abono' AND cld.id_closing_day = :idClosingDay) as total_amount_payment, " + +" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Depósito' AND cld.id_closing_day = :idClosingDay) as total_amount_deposit, " + +" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Transferencia enviada' AND cld.id_closing_day = :idClosingDay) as transfer_sender, " + +" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Transferencia recibida' AND cld.id_closing_day = :idClosingDay) as transfer_receiver, " + +" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Inicio' AND cld.id_closing_day = :idClosingDay) as money_daily, " + +" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Gasto' AND cld.id_closing_day = :idClosingDay) as other_expense, " + +" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Entrega de préstamo' AND cld.id_closing_day = :idClosingDay) as delivery, " + +" (SELECT IFNULL(SUM(cld.amount),0) FROM APC_CLOSING_DAY_DETAIL cld WHERE cld.type='Multa' AND cld.id_closing_day = :idClosingDay) as total_amount_fee, " + +" cldd.dateDetail "+ +" FROM " + +" APC_CLOSING_DAY_DETAIL cldd " + +" INNER JOIN " + +" APC_CLOSING_DAY cd on cldd.id_closing_day = cd.id" + +" INNER JOIN" + +" APC_USER u ON u.id = cd.id_user " + +" INNER JOIN " + +" APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource " + +" WHERE " + +" cldd.id_closing_day = :idClosingDay" + +" ORDER BY" + +" cldd.created_on ASC; "; +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/CustomerController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/CustomerController.java new file mode 100644 index 0000000..69ee707 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/CustomerController.java @@ -0,0 +1,141 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.catalog.constance.PeopleCfg; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.LoanCfg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.views.LoanDetailZeroView; +import com.arrebol.apc.model.views.LoanFinishedView; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class CustomerController extends PeopleController implements Serializable{ + + /** + * + * Searching all customers. + * + * @param officeId + * @return + */ + public List fillCustomersDatatable(String officeId) { + logger.debug("fillCustomersDatatable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PeopleCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + + return genericEntityRepository.xmlQueryAPCEntities(People.class, PeopleCfg.QUERY_FIND_ALL_CUSTOMER, parameters); + } + + /** + * + * Searching all loan by customer. + * + * @param peopleId + * @return + */ + public List findLoanByCustomer(String peopleId) { + logger.debug("findLoanByCustomer"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_CUSTOMER, new People(peopleId))); + + return genericEntityRepository.xmlQueryAPCEntities(Loan.class, LoanCfg.QUERY_FIND_LOAN_BY_CUSTOMER, parameters); + } + + public List findLoanByCustomerLimit(String peopleId) { + logger.debug("findLoanByCustomer"); + List results = new ArrayList<>(); + + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + + transaction = session.beginTransaction(); + + + + results = session.createQuery("SELECT l FROM Loan l WHERE customer = :customer AND loanStatus != 'DELETED' ORDER BY createdOn DESC") + .setParameter("customer", peopleId) + .setMaxResults(2) + .getResultList(); + + transaction.commit(); + + logger.info("Closing daily detail's list " + results.size()); + } catch (HibernateException e) { + logger.error("Can not find closing daily details list", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method findDetailsFromClosingDayID()", e); + rollback(transaction); + } + + + + + return results; + } + + /** + * + * Searching all loan for juridical. + * + * @param idUser + * @return + */ + public List findLoanJuridical(String idUser) { + logger.debug("findLoanJuridical"); + List parameters = new ArrayList<>(); + parameters.add(new ModelParameter(LoanCfg.FIELD_USER, new User(idUser))); + return genericEntityRepository.xmlQueryAPCEntities(Loan.class, LoanCfg.QUERY_FIND_LOAN_JURIDICAL, parameters); + } + + public List findLoanZero( ) { + logger.debug("findLoanZero"); + List parameters = new ArrayList<>(); + return genericEntityRepository.xmlQueryAPCEntities(LoanDetailZeroView.class, LoanCfg.QUERY_FIND_LOAN_ZERO, parameters); + } + + public List findLoanFinished( ) { + logger.debug("findLoanFinished"); + List parameters = new ArrayList<>(); + return genericEntityRepository.xmlQueryAPCEntities(LoanFinishedView.class, LoanCfg.QUERY_FIND_LOAN_FINISHED, parameters); + } + + final Logger logger = LogManager.getLogger(CustomerController.class); + private final GenericEntityRepository genericEntityRepository; + + public CustomerController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + + protected void rollback(Transaction transaction) { + if (null != transaction) { + transaction.rollback(); + } + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/EndorsementController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/EndorsementController.java new file mode 100644 index 0000000..979bacb --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/EndorsementController.java @@ -0,0 +1,67 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.catalog.constance.PeopleCfg; +import com.arrebol.apc.model.core.constance.LoanCfg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class EndorsementController extends PeopleController implements Serializable{ + + /** + * + * Searching all endorsement. + * + * @param officeId + * @return + */ + public List fillEndorsementsDatatable(String officeId) { + logger.debug("fillEndorsementsDatatable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PeopleCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + + return genericEntityRepository.xmlQueryAPCEntities(People.class, PeopleCfg.QUERY_FIND_ALL_ENDORSEMENT, parameters); + } + + /** + * + * Searching all loan by endorsement. + * + * @param peopleId + * @return + */ + public List findLoanByEndorsement(String peopleId) { + logger.debug("findLoanByEndorsement"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_ENDORSEMENT, new People(peopleId))); + + return genericEntityRepository.xmlQueryAPCEntities(Loan.class, LoanCfg.QUERY_FIND_LOAN_BY_ENDORSEMENT, parameters); + } + + final Logger logger = LogManager.getLogger(EndorsementController.class); + private final GenericEntityRepository genericEntityRepository; + + public EndorsementController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/ExpenseCompanyController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/ExpenseCompanyController.java new file mode 100644 index 0000000..f032e7a --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/ExpenseCompanyController.java @@ -0,0 +1,147 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.ExpenseCompany; +import com.arrebol.apc.model.admin.constance.ExpenseCompanyCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.ExpenseCompanyType; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class ExpenseCompanyController implements Serializable { + + /** + * + * Searching all expense company in by office. + * + * @param officeId + * @param startDate + * @param endDate + * @return + */ + public List fillxpenseCompanyInDatatable(String officeId, Date startDate, Date endDate) { + logger.debug("fillxpenseCompanyDatatable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(ExpenseCompanyCfg.FIELD_OFFICE, new Office(officeId))); + //parameters.add(new ModelParameter(ExpenseCompanyCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(ExpenseCompanyCfg.FIELD_EXPENSE_COMPANY_TYPE, ExpenseCompanyType.PAYMENT_IN)); + parameters.add(new ModelParameter(ExpenseCompanyCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(ExpenseCompanyCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(ExpenseCompany.class, ExpenseCompanyCfg.QUERY_FIND_ALL_EXPENSE_COMPANY_BY_OFFICE_BETWEEN_DATES, parameters); + } + + /** + * + * Searching all expense company out by office. + * + * @param officeId + * @param startDate + * @param endDate + * @return + */ + public List fillxpenseCompanyOutDatatable(String officeId, Date startDate, Date endDate) { + logger.debug("fillxpenseCompanyOutDatatable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(ExpenseCompanyCfg.FIELD_OFFICE, new Office(officeId))); + //parameters.add(new ModelParameter(ExpenseCompanyCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(ExpenseCompanyCfg.FIELD_EXPENSE_COMPANY_TYPE, ExpenseCompanyType.PAYMENT_OUT)); + parameters.add(new ModelParameter(ExpenseCompanyCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(ExpenseCompanyCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(ExpenseCompany.class, ExpenseCompanyCfg.QUERY_FIND_ALL_EXPENSE_COMPANY_BY_OFFICE_BETWEEN_DATES, parameters); + } + + /** + * + * @param status + * @param expenseCompanyIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateExpenseCompanyByStatus(ActiveStatus status, String expenseCompanyIdToUpdate, String lastUpdatedBy) { + logger.debug("updateExpenseCompanyByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ExpenseCompanyCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(ExpenseCompanyCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(ExpenseCompanyCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(ExpenseCompanyCfg.FIELD_ID, expenseCompanyIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(ExpenseCompanyCfg.QUERY_UPDATE_EXPENSE_COMPANY_BY_STATUS, parameters); + } + + /** + * + * @param expenseCompany + * @return boolean + */ + public boolean saveExpenseCompany(ExpenseCompany expenseCompany) { + logger.debug("saveExpenseCompany"); + boolean success = genericEntityRepository.insertAPCEntity(expenseCompany); + + return success; + } + + /** + * + * Searching expense by id. + * + * @param expenseId + * @return + */ + public ExpenseCompany getExpenseById(String expenseId) { + logger.debug("getExpenseById"); + + return (ExpenseCompany) genericEntityRepository.selectAPCEntityById(ExpenseCompany.class, expenseId); + } + + final Logger logger = LogManager.getLogger(ExpenseCompanyController.class); + private final GenericEntityRepository genericEntityRepository; + + public ExpenseCompanyController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/FeesController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/FeesController.java new file mode 100644 index 0000000..a1acff2 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/FeesController.java @@ -0,0 +1,113 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.enums.FeeStatus; +import com.arrebol.apc.model.views.FeesView; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import com.arrebol.apc.model.views.constance.FeesViewCfg; +import java.math.BigDecimal; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author David Rodriguez + */ +public class FeesController implements Serializable { + + public List fillFeesDataTable(Date startDate, Date endDate, String idUser) { + logger.debug("fillFeesDataTable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = new ArrayList<>(); + + if (idUser != null && !idUser.equals("")) { + parameters.add(new ModelParameter(FeesViewCfg.FIELD_USER, idUser)); + dataComplete = genericEntityRepository.xmlQueryAPCEntities(FeesView.class, FeesViewCfg.QUERY_FIND_ALL_FEES_BETWEEN_DATES_USER, parameters); + } else { + dataComplete = genericEntityRepository.xmlQueryAPCEntities(FeesView.class, FeesViewCfg.QUERY_FIND_ALL_FEES_BETWEEN_DATES, parameters); + } + + Map mapDataFees = new HashMap<>(); + for (FeesView fee : dataComplete) { + if (mapDataFees.get(fee.getIdUser()) != null) { + mapDataFees.get(fee.getIdUser()).setTotalFees(mapDataFees.get(fee.getIdUser()).getTotalFees().add(fee.getTotalFees())); + } else { + mapDataFees.put(fee.getIdUser(), fee); + } + + if(fee.getFeeStatus() != null && fee.getFeeStatus().equals(FeeStatus.PAID)){ + mapDataFees.get(fee.getIdUser()).setTotalFeePaid(mapDataFees.get(fee.getIdUser()).getTotalFeePaid().add(fee.getTotalFees())); + } + } + dataComplete.clear(); + dataComplete.addAll(mapDataFees.values()); + return dataComplete; + } + + public List fillFeesDataTableByRoute(Date startDate, Date endDate, String idRoute) { + logger.debug("fillFeesDataTableByRoute"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = new ArrayList<>(); + + if (idRoute != null && !idRoute.equals("")) { + parameters.add(new ModelParameter(FeesViewCfg.FIELD_ROUTE, idRoute)); + dataComplete = genericEntityRepository.xmlQueryAPCEntities(FeesView.class, FeesViewCfg.QUERY_FIND_ALL_FEES_BETWEEN_DATES_ROUTE, parameters); + } else { + dataComplete = genericEntityRepository.xmlQueryAPCEntities(FeesView.class, FeesViewCfg.QUERY_FIND_ALL_FEES_BETWEEN_DATES, parameters); + } + + Map mapDataFees = new HashMap<>(); + dataComplete.forEach((fee) -> { + if (mapDataFees.get(fee.getIdRoute()) != null) { + mapDataFees.get(fee.getIdRoute()).setTotalFees(mapDataFees.get(fee.getIdRoute()).getTotalFees().add(fee.getTotalFees())); + } else { + mapDataFees.put(fee.getIdRoute(), fee); + } + }); + dataComplete.clear(); + dataComplete.addAll(mapDataFees.values()); + + dataComplete.sort(Comparator.comparing(FeesView::getRouteName)); + return dataComplete; + } + + public BigDecimal fillTotalFees(Date startDate, Date endDate) { + logger.debug("fillFeesDataTable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(FeesView.class, FeesViewCfg.QUERY_FIND_ALL_FEES_BETWEEN_DATES, parameters); + BigDecimal totalFees = new BigDecimal("0"); + for (FeesView fee : dataComplete) { + totalFees = totalFees.add(fee.getTotalFees()); + } + return totalFees; + } + + final Logger logger = LogManager.getLogger(FeesController.class); + private final GenericEntityRepository genericEntityRepository; + + public FeesController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/GoalController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/GoalController.java new file mode 100644 index 0000000..3521b06 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/GoalController.java @@ -0,0 +1,100 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.Goal; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class GoalController implements Serializable{ + + /** + * + * Searching all goals by office. + * + * @param officeId + * @param startDate + * @param endDate + * @return + */ + public List fillGoalDatatable(String officeId, Date startDate, Date endDate) { + logger.debug("fillGoalDatatable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(GoalCfg.FIELD_OFFICE, new Office(officeId))); + parameters.add(new ModelParameter(GoalCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(Goal.class, GoalCfg.QUERY_FIND_ALL_GOALS_BY_OFFICE_BETWEEN_DATES, parameters); + } + + /** + * + * @param goal + * @return boolean + */ + public boolean saveGoal(Goal goal) { + logger.debug("saveGoal"); + boolean success = genericEntityRepository.insertAPCEntity(goal); + + return success; + + } + /** + * + * @param status + * @param goalIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateGoalByStatus(ActiveStatus status, String goalIdToUpdate, String lastUpdatedBy) { + logger.debug("updateGoalByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(GoalCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(GoalCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(GoalCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(GoalCfg.FIELD_ID, goalIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(GoalCfg.QUERY_UPDATE_GOAL_BY_STATUS, parameters); + } + + /** + * + * @param goal + * @return boolean + */ + public boolean updateByGoalId(Goal goal) { + logger.debug("updateByGoalId"); + + return genericEntityRepository.updateAPCEntity(goal); + } + + final Logger logger = LogManager.getLogger(GoalController.class); + private final GenericEntityRepository genericEntityRepository; + + public GoalController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/LoanController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/LoanController.java new file mode 100644 index 0000000..55f89b5 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/LoanController.java @@ -0,0 +1,563 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.LoanByRenovationCfg; +import com.arrebol.apc.model.core.constance.LoanByUserCfg; +import com.arrebol.apc.model.core.constance.LoanCfg; +import com.arrebol.apc.model.core.constance.LoanDetailsCfg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.LoanRenovationStatus; +import com.arrebol.apc.model.enums.LoanStatus; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanByRenovation; +import com.arrebol.apc.model.loan.LoanByUser; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.model.loan.LoanFeeNotification; +import com.arrebol.apc.model.views.HistoryLoanView; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class LoanController implements Serializable { + + /** + * + * Searching all loan by status pending. + * + * @param officeId + * @return + */ + public List fillLoanByStatusPendingDatatable(String officeId) { + logger.debug("fillLoanByStatusPendingDatatable"); + List parameters = new ArrayList<>(); + + //parameters.add(new ModelParameter(LoanCfg.FIELD_CUSTOMER_OFFICE, new Office(officeId))); + return genericEntityRepository.xmlQueryAPCEntities(Loan.class, LoanCfg.QUERY_FIND_LOAN_BY_STATUS_PENDING, parameters); + } + + /** + * + * Searching all loan + * + * @return + */ + public List fillAllLoansDatatable() { + logger.debug("fillAllLoansDatatable"); + List parameters = new ArrayList<>(); + return genericEntityRepository.xmlQueryAPCEntities(Loan.class, LoanCfg.QUERY_FIND_ALL_LOANS, parameters); + } + + /** + * + * Searching all loan + * + * @return + */ + public List fillAllLoansViewDatatable() { + logger.debug("fillAllLoansViewDatatable"); + List parameters = new ArrayList<>(); + return genericEntityRepository.xmlQueryAPCEntities(HistoryLoanView.class, LoanCfg.QUERY_FIND_ALL_LOANS_VIEW, parameters); + } + + /** + * + * @param startDate + * @param endDate + * @return + */ + public List fillAllLoansViewDatatable(Date startDate, Date endDate) { + logger.debug("fillAllLoansViewDatatable from start and end date"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(LoanCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(HistoryLoanView.class, LoanCfg.QUERY_FIND_ALL_LOANS_VIEW_BY_START_AND_END_DATE, parameters); + } catch (Exception e) { + logger.info("fillAllLoansViewDatatable from start and end date", e); + return new ArrayList<>(); + } + } + + /** + * + * @param startDate + * @param endDate + * @return + */ + public List fillAllLoansJuridicalViewDatatable(Date startDate, Date endDate) { + logger.debug("fillAllLoansJuridicalViewDatatable from start and end date"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(LoanCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(HistoryLoanView.class, LoanCfg.QUERY_FIND_ALL_LOANS_JURIDICAL_VIEW_BY_START_AND_END_DATE, parameters); + } catch (Exception e) { + logger.info("fillAllLoansJuridicalViewDatatable from start and end date", e); + return new ArrayList<>(); + } + } + + /** + * + * Searching loan by id. + * + * @param loanId + * @return + */ + public Loan getLoanById(String loanId) { + logger.debug("getLoanById"); + + return (Loan) genericEntityRepository.selectAPCEntityById(Loan.class, loanId); + } + + /** + * + * @param status + * @param loanIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateLoanByStatus(LoanStatus status, String loanIdToUpdate, String lastUpdatedBy) { + logger.debug("updateLoanByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_LOAN_STATUS, status)); + parameters.add(new ModelParameter(LoanCfg.FIELD_AMOUNT_PAID, new BigDecimal(0))); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_REFERENCE_NUMBER, 0)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(LoanCfg.FIELD_ID, loanIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanCfg.QUERY_UPDATE_LOAN_FROM_RENOVATION, parameters); + } + + /** + * + * @param status + * @param loanIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateLoanByStatusWeb(LoanStatus status, String loanIdToUpdate, String lastUpdatedBy) { + logger.debug("updateLoanByStatusWeb"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_LOAN_STATUS, status)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(LoanCfg.FIELD_ID, loanIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanCfg.QUERY_UPDATE_LOAN_FROM_WEB, parameters); + } + + /** + * + * Searching all loan details by id. + * + * @param loanId + * @return + */ + public List getLoanDetailsbyId(String loanId) { + logger.debug("getLoanDetailsbyId"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_DETAILS_LOAN, new Loan(loanId))); + + return genericEntityRepository.xmlQueryAPCEntities(LoanDetails.class, LoanCfg.QUERY_FIND_LOAN_DETAILS_BY_ID, parameters); + } + + public LoanDetails getLoanDetailbyId(String loanDetailsId) { + logger.debug("getLoanDetailbyId"); + + return (LoanDetails) genericEntityRepository.selectAPCEntityById(LoanDetails.class, loanDetailsId); + } + + public boolean updateAuthorizeLoanDetailById(String loanDetailId) { + logger.debug("updateAuthorizeLoanDetailById"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanDetailsCfg.FIELD_ID, loanDetailId)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanDetailsCfg.UPDATE_AUTHORIZE_LOAN_DETAIL, parameters); + } + + public Long countLoanDetailsAuthorize(String user) { + logger.debug("countLoanDetailsAutorize"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanDetailsCfg.FIELD_USER, user)); + return (Long) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Long.class, LoanDetailsCfg.COUNT_LOAN_DETAILS_AUTHORIZE, parameters); + + } + + public boolean updateRejectLoanDetailById(String loanDetailId) { + logger.debug("updateAuthorizeLoanDetailById"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanDetailsCfg.FIELD_ID, loanDetailId)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanDetailsCfg.UPDATE_REJECT_LOAN_DETAIL, parameters); + } + + public List fillAllTransfersLoanDetails() { + logger.debug("findAllTransfersLoanDetail"); + + return genericEntityRepository.xmlQueryAPCEntities(LoanDetails.class, LoanDetailsCfg.QUERY_FIND_ALL_TRANSFERS_LOAN_DETAIL); + } + + /** + * + * Searching all loan details by id. + * + * @param loanId + * @return + */ + public List getLoanDetailsCurdatebyIdLoan(String loanId) { + logger.debug("getLoanDetailsCurdatebyIdLoan"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_DETAILS_LOAN, new Loan(loanId))); + + return genericEntityRepository.xmlQueryAPCEntities(LoanDetails.class, LoanCfg.QUERY_FIND_LOAN_DETAILS_CURDATE_BY_LOAN, parameters); + } + + /** + * + * @param loan + * @return boolean + */ + public boolean saveLoan(Loan loan) { + logger.debug("saveLoan"); + boolean success = genericEntityRepository.insertAPCEntity(loan); + + return success; + } + + /** + * + * @param loan + * @return boolean + */ + public boolean updateLoan(Loan loan) { + logger.debug("updateLoan"); + boolean success = genericEntityRepository.updateAPCEntity(loan); + + return success; + } + + /** + * + * @param loan + * @return boolean + */ + public boolean updateLoanByUser(LoanByUser loan) { + logger.debug("updateLoanByUser"); + boolean success = genericEntityRepository.updateAPCEntity(loan); + + return success; + } + + /** + * + * @param loan + * @return boolean + */ + public boolean saveLoanNotificationFee(LoanFeeNotification notification) { + logger.debug("saveLoanNotificationFee"); + boolean success = genericEntityRepository.insertAPCEntity(notification); + + return success; + } + + /** + * + * @param loan detail + * @return boolean + */ + public boolean saveLoanDetail(LoanDetails loan) { + logger.debug("saveLoanDetail"); + boolean success = genericEntityRepository.insertAPCEntity(loan); + + return success; + } + + /** + * + * @param loanByUser + * @return boolean + */ + public boolean saveLoanByUser(LoanByUser loanByUser) { + logger.debug("saveLoanByUser"); + boolean success = genericEntityRepository.insertAPCEntity(loanByUser); + + return success; + } + + /** + * + * @param status + * @param loanIdToUpdate + * @return + */ + public boolean updateLoanByUserByStatus(LoanStatus status, Loan loanIdToUpdate) { + logger.debug("updateLoanByUserByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN_BY_USER_STATUS, status)); + parameters.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN, loanIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanByUserCfg.QUERY_UPDATE_LOAN_BY_USER_BY_LOAND_ID, parameters); + } + + /** + * + * Searching the loan by renovation by id + * + * @param loanId + * @return + */ + public LoanByRenovation getLoanByRenovationByIdLoanNew(Loan loan) { + logger.debug("getLoanByRenovationByIdLoanNew"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanByRenovationCfg.FIELD_LOAN_NEW, loan)); + + return (LoanByRenovation) genericEntityRepository.xmlQueryAPCEntityUniqueResult(LoanByRenovation.class, LoanByRenovationCfg.QUERY_FIND_LOAN_RENOVATION_BY_NEW_LOAN_ID, parameters); + } + + /** + * + * @param status + * @param loanIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateLoanByRenovationByStatus(LoanRenovationStatus status, Loan loanIdToUpdate, String lastUpdatedBy) { + logger.debug("updateLoanByRenovationByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanByRenovationCfg.FIELD_LOAN_RENOVATION_STATUS, status)); + parameters.add(new ModelParameter(LoanByRenovationCfg.FIELD_LOAN_NEW, loanIdToUpdate)); + parameters.add(new ModelParameter(LoanByRenovationCfg.FIELD_COMMENTS, "Se rechazó la renovación")); + parameters.add(new ModelParameter(LoanByRenovationCfg.FIELD_LAST_UPDATED_BY, new User(lastUpdatedBy))); + parameters.add(new ModelParameter(LoanByRenovationCfg.FIELD_LAST_UPDATED_ON, new Date())); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanByRenovationCfg.QUERY_UPDATE_LOAN_RENOVATION_WEB, parameters); + } + + /** + * + * @param userId + * @param loanIdToUpdate + * @return + */ + public boolean updateLoandByUserByUserId(String userId, Loan loanIdToUpdate) { + logger.debug("updateLoandByUserByUserId"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanByUserCfg.FIELD_USER, new User(userId))); + parameters.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN, loanIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanByUserCfg.QUERY_UPDATE_LOAN_BY_USER_BU_USER_ID, parameters); + } + + /** + * + * Searching the loan by user by id + * + * @param loan + * @return + */ + public LoanByUser getLoanByUserByIdLoan(Loan loan) { + logger.debug("getLoanByUserByIdLoan"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanByUserCfg.FIELD_LOAN, loan)); + + return (LoanByUser) genericEntityRepository.xmlQueryAPCEntityUniqueResult(LoanByUser.class, LoanByUserCfg.QUERY_FIND_LOAN_BY_USER_BY_LOAND_ID, parameters); + } + + /** + * + * @param loanByUser + * @return boolean + */ + public boolean deleteLoanByUser(LoanByUser loanByUser) { + logger.debug("deleteLoanByUser"); + boolean success = genericEntityRepository.deleteAPCEntityById(loanByUser); + + return success; + } + + /** + * + * @param loanByUser + * @return boolean + */ + public boolean deleteLoanDetails(LoanDetails loanDetail) { + logger.debug("deleteLoanDetails"); + boolean success = genericEntityRepository.deleteAPCEntityById(loanDetail); + + return success; + } + + /** + * + * @param userId + * @param loanIdToUpdate + * @return + */ + public boolean deleteLoanDetailsByLoanCurdate(Loan loanIdToUpdate) { + logger.debug("updateLoandByUserByUserId"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_DETAILS_LOAN, loanIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanCfg.QUERY_DELETE_LOAN_DETAILS_CURDATE_BY_LOAN, parameters); + } + + /** + * + * @param route + * @param routeIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateRouteById(RouteCtlg route, String routeIdToUpdate, String lastUpdatedBy) { + logger.debug("updateRouteById"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_ROUTE, route)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + // parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(LoanCfg.FIELD_ID, routeIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanCfg.QUERY_UPDATE_ROUTE_BY_ID, parameters); + } + + public boolean updatePeopleRoute(RouteCtlg route, People people) { + people.setRouteCtlg(route); + return genericEntityRepository.updateAPCEntity(people); + } + + /** + * + * Searching all loan details by id. + * + * @param loanId + * @return + */ + public List getLoanDetailsFeeCurdatebyIdLoan(String loanId) { + logger.debug("getLoanDetailsFeeCurdatebyIdLoan"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_DETAILS_LOAN, new Loan(loanId))); + + return genericEntityRepository.xmlQueryAPCEntities(LoanDetails.class, LoanCfg.QUERY_FIND_LOAN_DETAILS_FEE_CURDATE_BY_LOAN, parameters); + } + + /** + * + * @param userId + * @param loanIdToUpdate + * @return + */ + public boolean deleteLoanDetailsFeeByLoanCurdate(Loan loanIdToUpdate) { + logger.debug("deleteLoanDetailsFeeByLoanCurdate"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_DETAILS_LOAN, loanIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanCfg.QUERY_DELETE_LOAN_DETAILS_FEE_CURDATE_BY_LOAN, parameters); + } + + /** + * + * @param userId + * @param loanIdToUpdate + * @return + */ + public boolean deleteLoanFeeNotificationByLoanCurdate(Loan loanIdToUpdate) { + logger.debug("deleteLoanFeeNotificationByLoanCurdate"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_DETAILS_LOAN, loanIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanCfg.QUERY_DELETE_LOAN_FEE_NOTIFICATION_CURDATE_BY_LOAN, parameters); + } + + /** + * Borra los registros de LoanFeeNotifications del préstamo que recibe + * + * @param loanIdToUpdate + * @return + */ + public boolean deleteLoanFeeNotificationByLoan(Loan loanIdToUpdate) { + logger.debug("deleteLoanFeeNotification"); + + List parameters = new ArrayList<>(); + parameters.add(new ModelParameter(LoanCfg.FIELD_DETAILS_LOAN, loanIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanCfg.QUERY_DELETE_LOAN_FEE_NOTIFICATION_BY_LOAN, parameters); + } + + /** + * + * @param status + * @param loanIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateBonusNewCustomer(ActiveStatus status, String loanIdToUpdate, String lastUpdatedBy) { + logger.debug("updateBonusNewCustomer"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanCfg.FIELD_NEW_CUSTOMER, status)); + parameters.add(new ModelParameter(LoanCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(LoanCfg.FIELD_ID, loanIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanCfg.QUERY_UPDATE_LOAN_BONUS_NEW_CUSTOMER, parameters); + } + + final Logger logger = LogManager.getLogger(LoanController.class); + private final GenericEntityRepository genericEntityRepository; + + public LoanController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/LoanEmployeeController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/LoanEmployeeController.java new file mode 100644 index 0000000..bee5571 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/LoanEmployeeController.java @@ -0,0 +1,180 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.LoanEmployee; +import com.arrebol.apc.model.admin.LoanEmployeeDetails; +import com.arrebol.apc.model.admin.constance.ExpenseCompanyCfg; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.views.LoanEmployeeView; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.views.LoanEmployeeAllDataView; +import com.arrebol.apc.model.views.LoanEmployeeDetailAllDataView; +import com.arrebol.apc.model.views.StatsEmployeeSavingView; +import com.arrebol.apc.model.views.constance.LoanEmployeeDetailAllDataViewCfg; +import com.arrebol.apc.model.views.constance.LoanEmployeeViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import com.arrebol.apc.model.views.constance.LoanEmployeeAllDataCfg; +import com.arrebol.apc.model.views.constance.StatsEmployeeSavingViewCfg; +import java.math.BigDecimal; + +/** + * + * @author David Rodriguez + */ +public class LoanEmployeeController implements Serializable { + + public List fillLoanEmployeeDataTable(Date startDate, Date endDate) { + logger.debug("fillLoanEmployeeDataTable"); + List parameters = new ArrayList<>(); + +// parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); +// parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(LoanEmployeeView.class, LoanEmployeeViewCfg.QUERY_FIND_ALL_LOAN_EMPLOYEE_HIST, parameters); + return dataComplete; + } + + public BigDecimal fillTotalAmountLoan(Date startDate, Date endDate) { + logger.debug("fillTotalAmountLoan"); + List parameters = new ArrayList<>(); + +// parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); +// parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(LoanEmployeeView.class, LoanEmployeeViewCfg.QUERY_FIND_ALL_LOAN_EMPLOYEE_HIST, parameters); + BigDecimal totalAmountLoan = BigDecimal.ZERO; + for (LoanEmployeeView employee : dataComplete) { + totalAmountLoan = totalAmountLoan.add(employee.getAmountLoan()); + } + return totalAmountLoan; + } + + public List getLoanEmployeeDetailByIdLoan(String idLoanEmployee) { + + logger.debug("getLoanEmployeeDetailByIdLoan"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanEmployeeDetailAllDataViewCfg.FIELD_ID_LOAN, idLoanEmployee)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(LoanEmployeeDetailAllDataView.class, + LoanEmployeeDetailAllDataViewCfg.QUERY_FIND_ALL_LOAN_EMPLOYEE_DETAIL_BY_ID_LOAN, parameters); + + return dataComplete; + } + + public LoanEmployee getLoanEmployeeById(String idLoanEmployee) { + + logger.debug("getLoanEmployeeById"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanEmployeeAllDataCfg.FIELD_ID_LOAN, idLoanEmployee)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(LoanEmployee.class, + LoanEmployeeAllDataCfg.QUERY_FIND_ALL_LOAN_EMPLOYEE_BY_ID, parameters); + + return dataComplete.get(0); + } + + public boolean saveLoanEmployee(LoanEmployee loan, HumanResource hr) { + logger.debug("saveLoanEmployee"); + boolean success = genericEntityRepository.insertAPCEntity(loan); + + if (hr != null) { + genericEntityRepository.updateAPCEntity(hr); + } + return success; + } + + public boolean saveLoanEmployeeDetail(LoanEmployeeDetails loanDetail, HumanResource hr, LoanEmployee loanEmployee) { + logger.debug("saveLoanEmployeeDetail"); + boolean success = genericEntityRepository.insertAPCEntity(loanDetail); + + if (hr != null) { + genericEntityRepository.updateAPCEntity(hr); + } + + if (loanEmployee != null) { + genericEntityRepository.updateAPCEntity(loanEmployee); + } + + return success; + } + + /** + * + * @param status + * @param expenseCompanyIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateLoanEmployeeByStatus(ActiveStatus status, String expenseCompanyIdToUpdate, String lastUpdatedBy) { + logger.debug("updateLoanEmployeeByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanEmployeeAllDataCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(ExpenseCompanyCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(ExpenseCompanyCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(LoanEmployeeAllDataCfg.FIELD_ID, expenseCompanyIdToUpdate)); + + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanEmployeeAllDataCfg.QUERY_UPDATE_LOAN_EMPLOYEE_BY_STATUS, parameters); + } + + /** + * + * @param status + * @param expenseCompanyIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateLoanEmployeeDetailByStatus(String idUser, Date createdOn) { + logger.debug("updateLoanEmployeeDetailByStatus"); + + List parameters = new ArrayList<>(); + + + parameters.add(new ModelParameter(LoanEmployeeDetailAllDataViewCfg.FIELD_ID_USER, idUser )); + parameters.add(new ModelParameter(LoanEmployeeDetailAllDataViewCfg.FIELD_CREATED_ON, createdOn)); + + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(LoanEmployeeDetailAllDataViewCfg.QUERY_UPDATE_LOAN_EMPLOYEE_DETAIL_BY_STATUS, parameters); + } + + + public List findLoanDetailToUpdate(String idUser, Date createdOn) { + logger.debug("updateLoanEmployeeDetailByStatus"); + + List parameters = new ArrayList<>(); + + + parameters.add(new ModelParameter(LoanEmployeeDetailAllDataViewCfg.FIELD_ID_USER, idUser )); + parameters.add(new ModelParameter(LoanEmployeeDetailAllDataViewCfg.FIELD_CREATED_ON, createdOn)); + + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(LoanEmployeeDetails.class, LoanEmployeeDetailAllDataViewCfg.QUERY_FIND_LOAN_DETAL_TO_UPDATE, parameters); + return dataComplete; + } + + + public boolean updateLoanEmployee(LoanEmployee loanEmployee) { + logger.debug("savePayroll"); + boolean success = genericEntityRepository.updateAPCEntity(loanEmployee); + + return success; + } + + final Logger logger = LogManager.getLogger(LoanEmployeeController.class); + private final GenericEntityRepository genericEntityRepository; + + public LoanEmployeeController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/LoanRenovationDeliveryWeeklyController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/LoanRenovationDeliveryWeeklyController.java new file mode 100644 index 0000000..1269b92 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/LoanRenovationDeliveryWeeklyController.java @@ -0,0 +1,61 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.AdvanceCfg; +import com.arrebol.apc.model.admin.constance.BonusCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.views.LoanRenovationDeliveryWeeklyView; +import com.arrebol.apc.model.views.constance.LoanRenovationDeliveryWeeklyViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class LoanRenovationDeliveryWeeklyController implements Serializable { + + public List fillLoanRenovationDatatable() { + logger.debug("fillLoanRenovationDatatable"); + + return genericEntityRepository.xmlQueryAPCEntities(LoanRenovationDeliveryWeeklyView.class,LoanRenovationDeliveryWeeklyViewCfg.QUERY_FIND_LOAN_RENOVATION_DELIVERY_WEEKLY); + } + + public Long getTotalRenovation(String renovation) { + logger.debug("getTotalRenovation"); + List parameters = new ArrayList<>(); + parameters.add(new ModelParameter(LoanRenovationDeliveryWeeklyViewCfg.FIELD_RENOVATION, renovation)); + + return (Long) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Long.class,LoanRenovationDeliveryWeeklyViewCfg.QUERY_FIND_LOAN_RENOVATION_TOTAL_RENOVATION,parameters); + } + + public BigDecimal getTotalRenovationAmount(String renovation) { + logger.debug("getTotalRenovation"); + List parameters = new ArrayList<>(); + parameters.add(new ModelParameter(LoanRenovationDeliveryWeeklyViewCfg.FIELD_RENOVATION, renovation)); + + return (BigDecimal) genericEntityRepository.xmlQueryAPCEntityUniqueResult(BigDecimal.class,LoanRenovationDeliveryWeeklyViewCfg.QUERY_FIND_LOAN_RENOVATION_TOTAL_RENOVATION_AMOUNT,parameters); + } + + final Logger logger = LogManager.getLogger(LoanRenovationDeliveryWeeklyController.class); + private final GenericEntityRepository genericEntityRepository; + + public LoanRenovationDeliveryWeeklyController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/MoneyDailyController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/MoneyDailyController.java new file mode 100644 index 0000000..6cfc00f --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/MoneyDailyController.java @@ -0,0 +1,124 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.MoneyDaily; +import com.arrebol.apc.model.admin.constance.MoneyDailyCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.views.MoneyDailyByUserCertifier; +import com.arrebol.apc.model.views.constance.MoneyDailyByUserCertifierViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class MoneyDailyController implements Serializable { + + /** + * + * Searching all money daily by office. + * + * @param officeId + * @param startDate + * @param endDate + * @param idUser + * @return + */ + public List fillMoneyDailyDatatable(String officeId, Date startDate, Date endDate, String idUser) { + logger.debug("fillMoneyDailyDatatable"); + List dataComplete = new ArrayList<>(); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(MoneyDailyCfg.FIELD_OFFICE, new Office(officeId))); + parameters.add(new ModelParameter(MoneyDailyCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(MoneyDailyCfg.PARAM_END_DATE, endDate)); + + if (idUser != null && !idUser.equals("")) { + parameters.add(new ModelParameter(MoneyDailyCfg.FIELD_USER, new User(idUser))); + dataComplete = genericEntityRepository.xmlQueryAPCEntities(MoneyDaily.class, MoneyDailyCfg.QUERY_FIND_ALL_MONEY_DAILY_BY_OFFICE_BETWEEN_DATES_USER, parameters); + }else{ + dataComplete = genericEntityRepository.xmlQueryAPCEntities(MoneyDaily.class, MoneyDailyCfg.QUERY_FIND_ALL_MONEY_DAILY_BY_OFFICE_BETWEEN_DATES, parameters); + } + + return dataComplete; + } + + /** + * + * @param money + * @return boolean + */ + public boolean saveMoneyDaily(MoneyDaily money) { + logger.debug("saveMoneyDaily"); + boolean success = genericEntityRepository.insertAPCEntity(money); + + return success; + } + + /** + * + * @param money + * @return boolean + */ + public boolean deleteMoneyDaily(MoneyDaily money) { + logger.debug("deleteMoneyDaily"); + boolean success = genericEntityRepository.deleteAPCEntityById(money); + + return success; + } + + public List findAllAmountByUserCertifierView(String officeId) { + logger.debug("findAllAmountByUserCertifierView"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(MoneyDailyByUserCertifierViewCfg.FIELD_VIEW_OFFICE, officeId)); + + return genericEntityRepository.xmlQueryAPCEntities(MoneyDailyByUserCertifier.class, MoneyDailyByUserCertifierViewCfg.QUERY_FIND_ALL_MONEY_DAILY_BY_CERTIFIER_BY_OFFICE, parameters); + } + + /** + * + * Searching money daily by id. + * + * @param moneyDailyId + * @return + */ + public MoneyDaily getMoneyDailyById(String moneyDailyId) { + logger.debug("getMoneyDailyById"); + + return (MoneyDaily) genericEntityRepository.selectAPCEntityById(MoneyDaily.class, moneyDailyId); + } + + final Logger logger = LogManager.getLogger(MoneyDailyController.class); + private final GenericEntityRepository genericEntityRepository; + + public MoneyDailyController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/OtherExpenseController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/OtherExpenseController.java new file mode 100644 index 0000000..7a9f92b --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/OtherExpenseController.java @@ -0,0 +1,99 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.OtherExpense; +import com.arrebol.apc.model.admin.constance.OtherExpenseCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class OtherExpenseController implements Serializable { + + /** + * + * Searching all other expenses by office. + * + * @param officeId + * @param startDate + * @param endDate + * @param idUser + * @return + */ + public List fillOtherExpenseDatatable(String officeId, Date startDate, Date endDate, String idUser) { + logger.debug("fillOtherExpenseDatatable"); + List dataComplete = new ArrayList<>(); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(OtherExpenseCfg.FIELD_OFFICE, new Office(officeId))); + parameters.add(new ModelParameter(OtherExpenseCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(OtherExpenseCfg.PARAM_END_DATE, endDate)); + if (idUser != null && !idUser.equals("")) { + parameters.add(new ModelParameter(OtherExpenseCfg.FIELD_USER, new User(idUser))); + dataComplete = genericEntityRepository.xmlQueryAPCEntities(OtherExpense.class, OtherExpenseCfg.QUERY_FIND_ALL_OTHER_EXPENSE_BY_OFFICE_BETWEEN_DATES_USER, parameters); + } else { + dataComplete = genericEntityRepository.xmlQueryAPCEntities(OtherExpense.class, OtherExpenseCfg.QUERY_FIND_ALL_OTHER_EXPENSE_BY_OFFICE_BETWEEN_DATES, parameters); + } + + return dataComplete; + } + + /** + * + * @param otherExpense + * @return boolean + */ + public boolean saveOtherExpense(OtherExpense otherExpense) { + logger.debug("saveOtherExpense"); + boolean success = genericEntityRepository.insertAPCEntity(otherExpense); + + return success; + } + + /** + * + * @param otherExpense + * @return boolean + */ + public boolean deleteOtherExpense(OtherExpense otherExpense) { + logger.debug("deleteOtherExpense"); + boolean success = genericEntityRepository.deleteAPCEntityById(otherExpense); + + return success; + } + + final Logger logger = LogManager.getLogger(OtherExpenseController.class); + private final GenericEntityRepository genericEntityRepository; + + public OtherExpenseController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/PayRollController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/PayRollController.java new file mode 100644 index 0000000..0c767d1 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/PayRollController.java @@ -0,0 +1,343 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.EmployeeSaving; +import com.arrebol.apc.model.admin.Goal; +import com.arrebol.apc.model.admin.LoanEmployee; +import com.arrebol.apc.model.admin.LoanEmployeeDetails; +import com.arrebol.apc.model.admin.StableGeneralBox; +import com.arrebol.apc.model.admin.constance.StableGeneralBoxCfg; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.payroll.Payroll; +import com.arrebol.apc.model.payroll.constance.PayRollCfg; +import com.arrebol.apc.model.views.LoanEmployeeView; +import com.arrebol.apc.model.views.constance.LoanEmployeeAllDataCfg; +import com.arrebol.apc.model.views.constance.LoanEmployeeViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class PayRollController implements Serializable { + + /** + * + * Searching all stable general box by office. + * + * @param officeId + * @param startDate + * @param endDate + * @return + */ + public List fillPayrollDatatable(String officeId, Date startDate, Date endDate) { + logger.debug("fillPayrollDatatable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PayRollCfg.FIELD_OFFICE, new Office(officeId))); + //parameters.add(new ModelParameter(PayRollCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(PayRollCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(PayRollCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(Payroll.class, PayRollCfg.QUERY_FIND_PAYROLL_BY_OFFICE_BETWEEN_DATES, parameters); + } + + public boolean updatePayrollByStatus(ActiveStatus status, String payrollIdToUpdate, String lastUpdatedBy) { + logger.debug("updatePayrollByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PayRollCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(PayRollCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(PayRollCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(PayRollCfg.FIELD_ID, payrollIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(PayRollCfg.QUERY_UPDATE_PAYROLL_BY_STATUS, parameters); + } + + public List getStableGeneralBoxByDate(String officeId, Date startDate, Date endDate) { + logger.debug("fillStableGeneralBoxDatatable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(StableGeneralBoxCfg.FIELD_OFFICE, new Office(officeId))); + parameters.add(new ModelParameter(StableGeneralBoxCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(StableGeneralBoxCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(StableGeneralBox.class, StableGeneralBoxCfg.QUERY_FIND_ALL_STABLE_GENERAL_BOX_BY_OFFICE_BETWEEN_DATES, parameters); + } + + /** + * + * Searching user by id. + * + * @param userId + * @return + */ + public User getUserById(String userId) { + logger.debug("getUserById"); + + return (User) genericEntityRepository.selectAPCEntityById(User.class, userId); + } + + /** + * + * Searching the advance sum by user + * + * @param humanResourceId + * @param officeId + * @param dateInit + * @param dateEnd + * @return + */ + public BigDecimal getSumAdvanceByUser(String humanResourceId, String officeId, Date dateInit, Date dateEnd) { + logger.debug("getSumAdvanceByUser"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PayRollCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(PayRollCfg.FIELD_OFFICE, new Office(officeId))); + parameters.add(new ModelParameter(PayRollCfg.FIELD_HUMAN_RESOURCE, new HumanResource(humanResourceId))); + parameters.add(new ModelParameter(PayRollCfg.FIELD_DATE_INIT, dateInit)); + parameters.add(new ModelParameter(PayRollCfg.FIELD_DATE_END, dateEnd)); + + return (BigDecimal) genericEntityRepository.xmlQueryAPCEntityUniqueResult(BigDecimal.class, PayRollCfg.QUERY_SUM_ALL_ADVANCE_BY_USER, parameters); + } + + /** + * + * Searching the count for new customer by loan by user + * + * @param userId + * @param dateInit + * @param dateEnd + * @return + */ + public List getTotalNewCustomerLoansByUser(String userId, Date dateInit, Date dateEnd) { + logger.debug("getTotalNewCustomerLoansByUser"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PayRollCfg.FIELD_USER, userId)); + parameters.add(new ModelParameter(PayRollCfg.FIELD_DATE_INIT, dateInit)); + parameters.add(new ModelParameter(PayRollCfg.FIELD_DATE_END, dateEnd)); + + return genericEntityRepository.xmlQueryAPCEntities(Loan.class, PayRollCfg.QUERY_COUNT_NEW_CUSTOMER_FOR_LOANS_BY_USER, parameters); + } + + /** + * + * Searching the sum amount by loan by user + * + * @param userId + * @param dateInit + * @param dateEnd + * @return + */ + public BigDecimal getTotalLoansByUserForDates(String userId, Date dateInit, Date dateEnd) { + logger.debug("getTotalLoansByUserForDates"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PayRollCfg.FIELD_USER, userId)); + parameters.add(new ModelParameter(PayRollCfg.FIELD_DATE_INIT, dateInit)); + parameters.add(new ModelParameter(PayRollCfg.FIELD_DATE_END, dateEnd)); + + return (BigDecimal) genericEntityRepository.xmlQueryAPCEntityUniqueResult(BigDecimal.class, PayRollCfg.QUERY_SUM_FOR_LOANS_BY_USER, parameters); + } + + /** + * + * Searching the goal by dates + * + * @param officeId + * @param dateInit + * @param dateEnd + * @return + */ + public Goal getGoalByDates(String officeId, Date dateInit, Date dateEnd) { + logger.debug("getGoalByDates"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PayRollCfg.FIELD_OFFICE, new Office(officeId))); + parameters.add(new ModelParameter(PayRollCfg.FIELD_DATE_INIT, dateInit)); + parameters.add(new ModelParameter(PayRollCfg.FIELD_DATE_END, dateEnd)); + + return (Goal) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Goal.class, PayRollCfg.QUERY_FIND_GOAL_BY_DATES, parameters); + } + + public Goal getLastGoal(String officeId) { + logger.debug("getLastGoal"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PayRollCfg.FIELD_OFFICE, new Office(officeId))); + + return (Goal) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Goal.class, PayRollCfg.QUERY_FIND_LAST_GOAL, parameters); + } + + public List getPaymentToDebtByUser(String userId) { + + logger.debug("fillLoanEmployeeDataTable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanEmployeeViewCfg.FIEL_LOAN_EMPLOYEE_USERID, userId)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(LoanEmployeeView.class, LoanEmployeeViewCfg.QUERY_FIND_ALL_LOAN_EMPLOYEE_BY_ID, parameters); + return dataComplete; + } + + public LoanEmployee getLoanEmployeeById(String idLoanEmployee) { + + logger.debug("getLoanEmployeeById"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanEmployeeAllDataCfg.FIELD_ID_LOAN, idLoanEmployee)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(LoanEmployee.class, + LoanEmployeeAllDataCfg.QUERY_FIND_ALL_LOAN_EMPLOYEE_BY_ID, parameters); + + return dataComplete.get(0); + } + + public boolean saveLoanEmployeeDetail(LoanEmployeeDetails loanDetail, HumanResource hr, LoanEmployee loanEmployee) { + logger.debug("saveLoanEmployeeDetail"); + boolean success = genericEntityRepository.insertAPCEntity(loanDetail); + + if (hr != null) { + genericEntityRepository.updateAPCEntity(hr); + } + + if (loanEmployee != null) { + genericEntityRepository.updateAPCEntity(loanEmployee); + } + + return success; + } + + public boolean saveEmployeeSaving(EmployeeSaving employeeSaving, HumanResource hr) { + logger.debug("saveEmployeeSaving"); + boolean success = genericEntityRepository.insertAPCEntity(employeeSaving); + + if (hr != null) { + genericEntityRepository.updateAPCEntity(hr); + } + + return success; + } + + /** + * + * Searching the sum of loan details for type Payment by user + * + * @param userId + * @param dateInit + * @param dateEnd + * @return + */ + public BigDecimal getLoanDetailsByUserForDates(String userId, Date dateInit, Date dateEnd) { + logger.debug("getLoanDetailsByUserForDates"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PayRollCfg.FIELD_USER, new User(userId))); + parameters.add(new ModelParameter(PayRollCfg.FIELD_DATE_INIT, dateInit)); + parameters.add(new ModelParameter(PayRollCfg.FIELD_DATE_END, dateEnd)); + + return (BigDecimal) genericEntityRepository.xmlQueryAPCEntityUniqueResult(BigDecimal.class, PayRollCfg.QUERY_SUM_LOAN_DETAILS_PAYMENT_BY_USER, parameters); + } + + /** + * + * Searching the sum of loan details for type Payment by user + * + * @param userId + * @param dateInit + * @param dateEnd + * @return + */ + public BigDecimal getFeeByUserForDates(String userId, Date dateInit, Date dateEnd) { + logger.debug("getFeeByUserForDates"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PayRollCfg.FIELD_USER_ID, userId)); + + return (BigDecimal) genericEntityRepository.xmlQueryAPCEntityUniqueResult(BigDecimal.class, PayRollCfg.QUERY_SUM_DIFERENCES_BY_USER, parameters); + } + + /** + * + * Searching the sum of loan details for type Payment by user + * + * @param userId + * @param dateInit + * @param dateEnd + * @return + */ + public BigDecimal getDiscountByUserThisWeek(String userId) { + logger.debug("getDiscountByUserThisWeek"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PayRollCfg.FIELD_USER, new User(userId))); + + return (BigDecimal) genericEntityRepository.xmlQueryAPCEntityUniqueResult(BigDecimal.class, PayRollCfg.QUERY_SUM_DIFERENCES_BETWEEN_CLOSING_DAY_BY_USER, parameters); + } + + /** + * + * Searching the sum of loan details for type Payment by user + * + * @param userId + * @param dateInit + * @param dateEnd + * @return + */ + public Long getTotalOpeningFeeByUser(String userId, Date dateInit, Date dateEnd) { + logger.debug("getDiscountByUserThisWeek"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PayRollCfg.FIELD_USER, new User(userId))); + parameters.add(new ModelParameter(PayRollCfg.FIELD_DATE_INIT, dateInit)); + parameters.add(new ModelParameter(PayRollCfg.FIELD_DATE_END, dateEnd)); + + return (Long) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Long.class, PayRollCfg.QUERY_SUM_OPENING_FEE_BY_USER, parameters); + } + + public BigDecimal getTotalExpectedWeekByUser(String userId) { + logger.debug("getTotalExpectedWeekByUser"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PayRollCfg.FIELD_USER, new User(userId))); + + return (BigDecimal) genericEntityRepository.xmlQueryAPCEntityUniqueResult(BigDecimal.class, PayRollCfg.QUERY_SUM_TOTAL_EXPECTED_FOR_WEEK_BY_USER, parameters); + } + + /** + * + * @param payroll + * @return boolean + */ + public boolean savePayroll(Payroll payroll) { + logger.debug("savePayroll"); + boolean success = genericEntityRepository.insertAPCEntity(payroll); + + return success; + } + + final Logger logger = LogManager.getLogger(PayRollController.class); + private final GenericEntityRepository genericEntityRepository; + + public PayRollController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/PeopleController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/PeopleController.java new file mode 100644 index 0000000..b3c040c --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/PeopleController.java @@ -0,0 +1,133 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.catalog.constance.PeopleCfg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class PeopleController implements Serializable{ + + final Logger logger = LogManager.getLogger(PeopleController.class); + private final GenericEntityRepository genericEntityRepository; + + /** + * + * @param people + * @return boolean + */ + public boolean savePeople(People people) { + logger.debug("savePeopleController"); + boolean success = genericEntityRepository.insertAPCEntity(people); + + return success; + } + + /** + * + * @param people + * @return boolean + */ + public boolean updateByPeopleId(People people) { + logger.debug("updateByPeopleId"); + + return genericEntityRepository.updateAPCEntity(people); + } + + /** + * + * @param status + * @param peopleIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updatePeopleByStatus(ActiveStatus status, String peopleIdToUpdate, String lastUpdatedBy) { + logger.debug("updatePeopleByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PeopleCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(PeopleCfg.FIELD_ID, peopleIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(PeopleCfg.UPDATE_PEOPLE_BY_STATUS, parameters); + } + + /** + * + * @param type + * @param peopleIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updatePeopleTypeById(PeopleType type, String peopleIdToUpdate, String lastUpdatedBy) { + logger.debug("updatePeopleTypeById"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PeopleCfg.FIELD_PEOPLE_TYPE, type)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(PeopleCfg.FIELD_ID, peopleIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(PeopleCfg.UPDATE_PEOPLE_TYPE_BY_STATUS, parameters); + } + + /** + * + * Searching people. + * + * @param peopleId + * @return + */ + public People findPeopleById(String peopleId) { + logger.debug("findPeopleById"); + + return (People) genericEntityRepository.selectAPCEntityById(People.class, peopleId); + } + + /** + * + * @param type + * @param peopleIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateRouteById(RouteCtlg route, String peopleIdToUpdate, String lastUpdatedBy) { + logger.debug("updateRouteById"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PeopleCfg.FIELD_ROUTE, route)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(PeopleCfg.FIELD_ID, peopleIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(PeopleCfg.UPDATE_ROUTE_BY_PEOPLE, parameters); + } + + public PeopleController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StableGeneralBoxController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StableGeneralBoxController.java new file mode 100644 index 0000000..61ac9e5 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StableGeneralBoxController.java @@ -0,0 +1,669 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.controller.util.ConnectionManager; +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.Advance; +import com.arrebol.apc.model.admin.ClosingDay; +import com.arrebol.apc.model.admin.ExpenseCompany; +import com.arrebol.apc.model.admin.MoneyDaily; +import com.arrebol.apc.model.admin.StableGeneralBox; +import com.arrebol.apc.model.admin.constance.StableGeneralBoxCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.model.payroll.Payroll; +import com.arrebol.apc.model.views.GeneralBoxView; +import com.arrebol.apc.model.views.ResumenTotalWeekView; +import com.arrebol.apc.model.views.constance.GeneralBoxViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; +import org.hibernate.query.NativeQuery; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class StableGeneralBoxController extends ConnectionManager implements Serializable { + + /** + * + * Searching all stable general box by office. + * + * @param officeId + * @param startDate + * @param endDate + * @return + */ + public List fillStableGeneralBoxDatatable(String officeId, Date startDate, Date endDate) { + logger.debug("fillStableGeneralBoxDatatable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(StableGeneralBoxCfg.FIELD_OFFICE, new Office(officeId))); + //parameters.add(new ModelParameter(StableGeneralBoxCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(StableGeneralBoxCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(StableGeneralBoxCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(StableGeneralBox.class, StableGeneralBoxCfg.QUERY_FIND_ALL_STABLE_GENERAL_BOX_BY_OFFICE_BETWEEN_DATES, parameters); + } + + /** + * + * @param status + * @param stableGeneralBoxIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateStableGeneralBoxByStatus(ActiveStatus status, String stableGeneralBoxIdToUpdate, String lastUpdatedBy) { + logger.debug("updateStableGeneralBoxByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(StableGeneralBoxCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(StableGeneralBoxCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(StableGeneralBoxCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(StableGeneralBoxCfg.FIELD_ID, stableGeneralBoxIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(StableGeneralBoxCfg.QUERY_UPDATE_STABLE_GENERAL_BOX_BY_STATUS, parameters); + } + + /** + * + * @param stableGeneralBox + * @return boolean + */ + public boolean saveStableGeneralBox(StableGeneralBox stableGeneralBox) { + logger.debug("saveStableGeneralBox"); + boolean success = genericEntityRepository.insertAPCEntity(stableGeneralBox); + + return success; + } + + public boolean autoSaveEntry(ExpenseCompany expense){ + logger.debug("autoSaveEntry"); + boolean success = genericEntityRepository.insertAPCEntity(expense); + + return success; + } + + /** + * + * Searching all details by general box by office. + * + * @param officeId + * @return + */ + public List findAllGeneralBox(String officeId) { + logger.debug("findAllGeneralBox"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(GeneralBoxViewCfg.FIELD_OFFICE, officeId)); + + return genericEntityRepository.xmlQueryAPCEntities(GeneralBoxView.class, GeneralBoxViewCfg.QUERY_FIND_ALL_DETAILS, parameters); + } + + /** + * + * Searching the stable general box by date and office + * + * @param createdOn + * @param officeid + * @return + */ + public Long getCountStableGeneralBoxByOfficeAndDate(Date createdOn, String officeid) { + logger.debug("getClosingDayCurdateByUserId"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(StableGeneralBoxCfg.FIELD_CREATEDON, createdOn)); + parameters.add(new ModelParameter(StableGeneralBoxCfg.FIELD_OFFICE, new Office(officeid))); + + return (Long) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Long.class, StableGeneralBoxCfg.QUERY_COUNT_STABLE_GENERAL_BOX_BY_OFFICE_AND_DATE, parameters); + } + + /** + * + * Searching the stable small box by date and office + * + * @param officeid + * @return + */ + public BigDecimal getPendingByClosingDay(String officeid) { + logger.debug("getPendingByClosingDay"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(StableGeneralBoxCfg.FIELD_OFFICE_VIEW, officeid)); + + return (BigDecimal) genericEntityRepository.xmlQueryAPCEntityUniqueResult(BigDecimal.class, StableGeneralBoxCfg.QUERY_SUM_PENDING_CLOSING_BY_OFFICE, parameters); + } + + /** + * + * @param date + * @return + */ + public boolean existNextPaidStableGeneralBoxByCreatedOn(Date date) { + logger.info("existNextPaidStableGeneralBoxByCreatedOn"); + + String query = "SELECT sgb.id " + + "FROM APC_STABLE_GENERAL_BOX sgb " + + "WHERE DATE(sgb.created_on) >= DATE_ADD(DATE(:date), INTERVAL 1 DAY) " + + "AND sgb.active_status = 'ENEBLED'"; + + return genericEntityRepository.existRecordsUsingSQLQueryFindByCreatedOnField(date, query); + } + + public BigDecimal getTotalBox() { + logger.info("getTotalBox"); + BigDecimal totalBox = BigDecimal.ZERO; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + List rows = session.createNativeQuery(queryTotalBox).getResultList(); + + transaction.commit(); + + if (rows != null) { + totalBox = (BigDecimal) rows.get(0); +// Object[] results = (Object[]) rows.get(0); +// totalBox = new BigDecimal(results[0] == null ? "0.0" : results[11].toString()); + } else { + totalBox = BigDecimal.ZERO; + } + + } catch (HibernateException e) { + logger.error("General Box - getTotalBox( )", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method getTotalBox( ) ", e); + rollback(transaction); + } + + return totalBox; + } + + final Logger logger = LogManager.getLogger(StableGeneralBoxController.class); + private final GenericEntityRepository genericEntityRepository; + + public StableGeneralBoxController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + + public List getDataReport(Date fecha) { + DateFormat formatter = new SimpleDateFormat("yyyy/MM/dd"); + String dateFormat = formatter.format(fecha); + + String queryReport = generalBoxReport; + queryReport = queryReport.replace(":dateReport", dateFormat); + List rows = new ArrayList<>(); + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + //rows = session.createNativeQuery(queryReport).setParameter("dateReport", dateFormat).getResultList(); + rows = session.createNativeQuery(queryReport).getResultList(); + + transaction.commit(); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method getDataReport(" + fecha + " " + ") ", e); + rollback(transaction); + } + + return rows; + } + + public List findClosingDailyListByStableGeneralBox(Date startDate) { + logger.info("findClosingDailyListByStableGeneralBox"); + + List results = null; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + + transaction = session.beginTransaction(); + + + + results = session.createQuery("FROM ClosingDay c WHERE c.activeStatus = 'ENEBLED' AND DATE(c.createdOn) = DATE(:fecha) ") + + .setParameter("fecha", startDate) + .getResultList(); + + transaction.commit(); + + logger.info("Closing daily detail's list " + results.size()); + } catch (HibernateException e) { + logger.error("Can not find closing daily details list", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method findDetailsFromClosingDayID()", e); + rollback(transaction); + } + return results; + } + + public List findExpenseCompanyInListByStableGeneralBox(Date startDate) { + logger.info("findExpenseCompanyInListByStableGeneralBox"); + + List results = null; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + + transaction = session.beginTransaction(); + + + + results = session.createQuery("FROM ExpenseCompany c WHERE c.activeStatus = 'ENEBLED' AND c.expenseCompanyType = 'PAYMENT_IN' " + + "AND DATE(c.createdOn) = DATE(:fecha)") + + .setParameter("fecha", startDate) + .getResultList(); + + transaction.commit(); + + logger.info("ExpenseCompany in detail's list " + results.size()); + } catch (HibernateException e) { + logger.error("Can not find ExpenseCompany in details list", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method findExpenseCompanyInListByStableGeneralBox()", e); + rollback(transaction); + } + return results; + } + + public List findExpenseCompanyOutListByStableGeneralBox(Date startDate) { + logger.info("findExpenseCompanyOutListByStableGeneralBox"); + + List results = null; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + + transaction = session.beginTransaction(); + + + + results = session.createQuery("FROM ExpenseCompany c WHERE c.activeStatus = 'ENEBLED' AND c.expenseCompanyType = 'PAYMENT_OUT' " + + "AND DATE(c.createdOn) = DATE(:fecha)") + + .setParameter("fecha", startDate) + .getResultList(); + + transaction.commit(); + + logger.info("ExpenseCompany out detail's list " + results.size()); + } catch (HibernateException e) { + logger.error("Can not find ExpenseCompany out details list", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method findExpenseCompanyOutListByStableGeneralBox()", e); + rollback(transaction); + } + return results; + } + + public List findPayrollListByStableGeneralBox(Date startDate) { + logger.info("findPayrollListByStableGeneralBox"); + + List results = null; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + + transaction = session.beginTransaction(); + + + + results = session.createQuery("FROM Payroll c WHERE c.activeStatus = 'ENEBLED' " + + "AND DATE(c.createdOn) = DATE(:fecha) ") + + .setParameter("fecha", startDate) + .getResultList(); + + transaction.commit(); + + logger.info("Payroll detail's list " + results.size()); + } catch (HibernateException e) { + logger.error("Can not find Payroll details list", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method findPayrollListByStableGeneralBox()", e); + rollback(transaction); + } + return results; + } + + public List findExpenseCompanyAllListByStableGeneralBox(Date startDate) { + logger.info("findExpenseCompanyAllListByStableGeneralBox"); + + List results = null; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + + transaction = session.beginTransaction(); + + + + results = session.createQuery("FROM ExpenseCompany c WHERE c.activeStatus = 'ENEBLED' AND c.expenseCompanyType IN ('PAYMENT_OUT', 'PAYMENT_IN') " + + "AND DATE(c.createdOn) = DATE(:fecha) ") + + .setParameter("fecha", startDate) + .getResultList(); + + transaction.commit(); + + logger.info("ExpenseCompany all detail's list " + results.size()); + } catch (HibernateException e) { + logger.error("Can not find ExpenseCompany all details list", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method findExpenseCompanyAllListByStableGeneralBox()", e); + rollback(transaction); + } + return results; + } + + public List findAdelantosListByStableGeneralBox(Date startDate) { + logger.info("findAdelantosListByStableGeneralBox"); + + List results = null; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + + transaction = session.beginTransaction(); + + results = session.createQuery("FROM Advance c WHERE c.activeStatus = 'ENEBLED' " + + "AND DATE(c.createdOn) = DATE(:fecha) ") + + .setParameter("fecha", startDate) + .getResultList(); + + transaction.commit(); + + logger.info("Adelantos detail's list " + results.size()); + } catch (HibernateException e) { + logger.error("Can not find Adelantos details list", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method findAdelantosListByStableGeneralBox()", e); + rollback(transaction); + } + return results; + } + + public List findIniciosListByStableGeneralBox(Date startDate) { + logger.info("findIniciosListByStableGeneralBox"); + + List results = null; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + + transaction = session.beginTransaction(); + + + + results = session.createQuery("FROM MoneyDaily c WHERE DATE(c.createdOn) = DATE(:fecha) ") + + .setParameter("fecha", startDate) + .getResultList(); + + transaction.commit(); + + logger.info("Expense detail's list " + results.size()); + } catch (HibernateException e) { + logger.error("Can not find Expense details list", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method findIniciosListByStableGeneralBox()", e); + rollback(transaction); + } + return results; + } + + public List findLoanDetailsDepositByStableGeneralBox(Date startDate) { + logger.info("findLoanDetailsDepositByStableGeneralBox"); + + List results = null; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + + transaction = session.beginTransaction(); + + results = session.createQuery("FROM LoanDetails c WHERE DATE(c.createdOn) = DATE(:fecha) AND c.loanDetailsType = 'TRANSFER'") + + .setParameter("fecha", startDate) + .getResultList(); + + transaction.commit(); + + logger.info("Loan detail deposit list " + results.size()); + } catch (HibernateException e) { + logger.error("Can not find Sale details list", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method findLoanDetailsDepositByStableGeneralBox()", e); + rollback(transaction); + } + return results; + } + + public BigDecimal getLastStableGeneralBox(Date startDate) { + logger.info("getLastStableGeneralBox"); + + BigDecimal total = null; + Transaction transaction = null; + + DateFormat formatter = new SimpleDateFormat("yy-MM-dd"); + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + String sqlQuery = "SELECT\n" + + "(\n" + + " (CASE\n" + + " WHEN \n" + + " (SELECT COUNT(total_general_box) AS total_in_box FROM APC_STABLE_GENERAL_BOX WHERE DATE(created_on) < DATE('"+formatter.format(startDate)+"') AND active_status = 'ENEBLED' ORDER BY created_on DESC LIMIT 1) > 0\n" + + " THEN \n" + + " (SELECT IF(ISNULL(total_general_box),0,total_general_box) AS total_in_box FROM APC_STABLE_GENERAL_BOX WHERE DATE(created_on) < DATE('"+formatter.format(startDate)+"') AND active_status = 'ENEBLED' ORDER BY created_on DESC LIMIT 1)\n" + + " ELSE 0\n" + + " END)\n" + + ")AS TOTAL FROM DUAL"; + + NativeQuery nativeQuery = session.createSQLQuery(sqlQuery); + + Object totalObj = (Object) (nativeQuery.uniqueResult()); + + if (totalObj instanceof Double) { + total = BigDecimal.valueOf(((Double) totalObj)); + } else if (totalObj instanceof Float) { + total = BigDecimal.valueOf(((Float) totalObj)); + } else if (totalObj instanceof Long) { + total = BigDecimal.valueOf(((Long) totalObj)); + } else if (totalObj instanceof BigDecimal) { + total = (BigDecimal) totalObj; + } else { + total = BigDecimal.ZERO; + } + + transaction.commit(); + } catch (HibernateException e) { + logger.error("Can not load the last stable general box", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method getLastStableGeneralBox()", e); + rollback(transaction); + } + + return total; + } + + String queryTotalBox + = "SELECT \n" + + "( \n" + + " (CASE \n" + + " WHEN \n" + + " (SELECT COUNT(total_general_box) AS total_in_box FROM APC_STABLE_GENERAL_BOX WHERE DATE(created_on) < CURDATE() AND active_status = 'ENEBLED' ORDER BY created_on DESC LIMIT 1) > 0 \n" + + " THEN \n" + + " (SELECT IF(ISNULL(total_general_box),0,total_general_box) AS total_in_box FROM APC_STABLE_GENERAL_BOX WHERE DATE(created_on) < CURDATE() AND active_status = 'ENEBLED' ORDER BY created_on DESC LIMIT 1) \n" + + " ELSE 0 \n" + + " END) \n" + // + " -- Entradas\n" + + " + (SELECT IF(ISNULL(SUM(amount)),0,SUM(amount)) AS total_payment_in_today FROM APC_EXPENSE_COMPANY WHERE expense_company_type = 'PAYMENT_IN' AND DATE(created_on) > (SELECT DATE(sgb.created_on) FROM APC_STABLE_GENERAL_BOX sgb WHERE DATE(sgb.created_on) < CURDATE() AND sgb.active_status = 'ENEBLED' ORDER BY sgb.created_on DESC LIMIT 1) AND active_status = 'ENEBLED') \n" + // + " -- Salidas\n" + + " - (SELECT IF(ISNULL(SUM(amount)),0,SUM(amount)) AS total_payment_out_today FROM APC_EXPENSE_COMPANY WHERE expense_company_type = 'PAYMENT_OUT' AND DATE(created_on) > (SELECT DATE(sgb.created_on) FROM APC_STABLE_GENERAL_BOX sgb WHERE DATE(sgb.created_on) < CURDATE() AND sgb.active_status = 'ENEBLED' ORDER BY sgb.created_on DESC LIMIT 1) AND active_status = 'ENEBLED') \n" + // + " -- Inicios\n" + + " - (SELECT IF(ISNULL(SUM(amount)),0,SUM(amount)) AS payment FROM APC_MONEY_DAILY WHERE DATE(created_on) > (SELECT DATE(sgb.created_on) FROM APC_STABLE_GENERAL_BOX sgb WHERE DATE(sgb.created_on) < CURDATE() AND sgb.active_status = 'ENEBLED' ORDER BY sgb.created_on DESC LIMIT 1)) \n" + // + " -- Adelantos\n" + + " - (SELECT IF(ISNULL(SUM(amount)),0,SUM(amount)) AS total_advances_today FROM APC_ADVANCE WHERE DATE(created_on) > (SELECT DATE(sgb.created_on) FROM APC_STABLE_GENERAL_BOX sgb WHERE DATE(sgb.created_on) < CURDATE() AND sgb.active_status = 'ENEBLED' ORDER BY sgb.created_on DESC LIMIT 1) AND active_status = 'ENEBLED') \n" + // + " -- Nóminas\n" + + " - (SELECT IF(ISNULL(SUM(total_payment)),0,SUM(total_payment)) AS total_payroll_today FROM APC_PAYROLL WHERE DATE(created_on) > (SELECT DATE(sgb.created_on) FROM APC_STABLE_GENERAL_BOX sgb WHERE DATE(sgb.created_on) < CURDATE() AND sgb.active_status = 'ENEBLED' ORDER BY sgb.created_on DESC LIMIT 1) AND active_status = 'ENEBLED') \n" + // + " -- Préstamo empleados\n" + + " - (SELECT IF(ISNULL(SUM(amount_loan)),0,SUM(amount_loan)) AS total_loan_employee_today FROM APC_LOAN_EMPLOYEE WHERE loan_employee_status = 'ENEBLED' AND DATE(created_on) > (SELECT DATE(sgb.created_on) FROM APC_STABLE_GENERAL_BOX sgb WHERE DATE(sgb.created_on) < CURDATE() AND sgb.active_status = 'ENEBLED' ORDER BY sgb.created_on DESC LIMIT 1)) \n" + // + " -- Caja Chica\n" + + " + (SELECT IF(ISNULL(SUM(total_envelope)),0,SUM(total_envelope)) + IF(ISNULL(SUM(total_bank_note)),0,SUM(total_bank_note)) + IF(ISNULL(SUM(total_coin)),0,SUM(total_coin)) AS payment FROM APC_STABLE_SMALL_BOX WHERE active_status = 'ENEBLED' AND DATE(created_on) > (SELECT DATE(sgb.created_on) FROM APC_STABLE_GENERAL_BOX sgb WHERE DATE(sgb.created_on) < CURDATE() AND sgb.active_status = 'ENEBLED' ORDER BY sgb.created_on DESC LIMIT 1)) \n" + // + " -- DISPOSICIÓN DE AHORRO\n" + + " - (SELECT IF(ISNULL(SUM(employee_saving)),0,SUM(employee_saving)) AS payment FROM APC_EMPLOYEE_SAVING WHERE type = 'DISPOSAL' AND DATE(created_on) > (SELECT DATE(sgb.created_on) FROM APC_STABLE_GENERAL_BOX sgb WHERE DATE(sgb.created_on) < CURDATE() AND sgb.active_status = 'ENEBLED' ORDER BY sgb.created_on DESC LIMIT 1)) \n" + // + " -- ABONO A PRESTAMO FUERA DE NOMINA\n" + + " + (SELECT IF(ISNULL(SUM(payment_amount)),0,SUM(payment_amount)) AS payment FROM APC_LOAN_EMPLOYEE_DETAIL WHERE loan_employee_detail_status = 'ENEBLED' AND payroll = 'DISABLED' AND DATE(created_on) > (SELECT DATE(sgb.created_on) FROM APC_STABLE_GENERAL_BOX sgb WHERE DATE(sgb.created_on) < CURDATE() AND sgb.active_status = 'ENEBLED' ORDER BY sgb.created_on DESC LIMIT 1)) \n" + + + ")AS TOTAL FROM DUAL;"; + + String generalBoxReport + = "SELECT\n" + + "u.id,\n" + + "-- Inicios\n" + + "(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) \n" + + "FROM APC_MONEY_DAILY md\n" + + "WHERE DATE(md.money_daily_date) = DATE(':dateReport') AND md.id_office = u.id) as money_daily_today,\n" + + "-- nominas\n" + + "(SELECT IF(ISNULL(SUM(ap.total_payment)),0,SUM(ap.total_payment)) FROM APC_PAYROLL ap \n" + + "WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' \n" + + "AND DATE(ap.created_on) = DATE(':dateReport')) as nomina_today,\n" + + "-- adelantos\n" + + "(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_ADVANCE ap \n" + + "WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' \n" + + "AND DATE(ap.created_on) = DATE(':dateReport')) as adelantos_today,\n" + + "-- entradas\n" + + "(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap \n" + + "WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND \n" + + "ap.expense_company_type = 'PAYMENT_IN'\n" + + "AND DATE(ap.created_on) = DATE(':dateReport')) as entradas_today, \n" + + "-- gastos admon\n" + + "(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap \n" + + "WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND \n" + + "ap.expense_company_type = 'PAYMENT_OUT'\n" + + "AND DATE(ap.created_on) = DATE(':dateReport')) as gastos_admon_today,\n" + + "-- total caja chica\n" + + "(SELECT total_small_box FROM APC_STABLE_SMALL_BOX where active_status = 'ENEBLED'\n" + + " AND DATE(created_on) = DATE(':dateReport')) total_caja_chica_today,\n" + + "(SELECT total_envelope FROM APC_STABLE_SMALL_BOX where active_status = 'ENEBLED'\n" + + " AND DATE(created_on) = DATE(':dateReport')) sobres_caja_chica_today,\n" + + "(SELECT total_bank_note FROM APC_STABLE_SMALL_BOX where active_status = 'ENEBLED'\n" + + " AND DATE(created_on) = DATE(':dateReport')) efectivo_caja_chica_today,\n" + + "(SELECT total_coin FROM APC_STABLE_SMALL_BOX where active_status = 'ENEBLED'\n" + + " AND DATE(created_on) = DATE(':dateReport')) monedas_caja_chica_today,\n" + + " (SELECT total_stable FROM APC_STABLE_SMALL_BOX where active_status = 'ENEBLED'\n" + + " AND DATE(created_on) = DATE(':dateReport')) cuadre_caja_chica_today,\n" + + " (SELECT description FROM APC_STABLE_SMALL_BOX where active_status = 'ENEBLED'\n" + + " AND DATE(created_on) = DATE(':dateReport')) descripcion_caja_chica_today,\n" + + " (SELECT total_general_box FROM APC_STABLE_GENERAL_BOX where active_status = 'ENEBLED'\n" + + " AND DATE(created_on) = DATE(':dateReport')) total_caja_general_today,\n" + + "(SELECT total_envelope FROM APC_STABLE_GENERAL_BOX where active_status = 'ENEBLED'\n" + + " AND DATE(created_on) = DATE(':dateReport')) sobres_caja_general_today,\n" + + "(SELECT total_bank_note FROM APC_STABLE_GENERAL_BOX where active_status = 'ENEBLED'\n" + + " AND DATE(created_on) = DATE(':dateReport')) efectivo_caja_general_today,\n" + + "(SELECT total_coin FROM APC_STABLE_GENERAL_BOX where active_status = 'ENEBLED'\n" + + " AND DATE(created_on) = DATE(':dateReport')) monedas_caja_general_today,\n" + + " (SELECT total_stable FROM APC_STABLE_GENERAL_BOX where active_status = 'ENEBLED'\n" + + " AND DATE(created_on) = DATE(':dateReport')) cuadre_caja_general_today,\n" + + " (SELECT description FROM APC_STABLE_GENERAL_BOX where active_status = 'ENEBLED'\n" + + " AND DATE(created_on) = DATE(':dateReport')) descripcion_caja_general_today,\n" + + " -- Cortes\n" + + "(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) \n" + + "FROM APC_CLOSING_DAY ld\n" + + "WHERE DATE(ld.created_on) = DATE(':dateReport') AND ld.active_status = 'ENEBLED' \n" + + "AND ld.id_office = u.id) as closing_day_today,\n" + + "-- Subtotal\n" + + "(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) \n" + + "FROM APC_LOAN_DETAIL ld\n" + + "INNER JOIN APC_LOAN l ON l.id = ld.id_loan \n" + + "INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id\n" + + "WHERE DATE(ld.created_on) = DATE(':dateReport') \n" + + "AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_today,\n" + + "-- comision por apertura\n" + + "(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al \n" + + " INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id \n" + + " INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id\n" + + " WHERE loan_status = 'APPROVED' \n" + + " AND DATE(al.created_on) = DATE(':dateReport')) \n" + + " as opening_fee_today,\n" + + "-- cobranza\n" + + "(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) \n" + + "FROM APC_LOAN_DETAIL ld\n" + + "INNER JOIN APC_LOAN l ON l.id = ld.id_loan \n" + + "INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id\n" + + "WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' \n" + + "AND DATE(ld.created_on) = DATE(':dateReport') \n" + + "AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_today,\n" + + "-- colocacion\n" + + "(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al \n" + + " INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id \n" + + " INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id\n" + + " WHERE loan_status = 'APPROVED' \n" + + " AND DATE(al.created_on) = DATE(':dateReport')) \n" + + " as colocation_today\n" + + "FROM APC_OFFICE u\n" + + "WHERE u.office_status = 'ENEBLED';"; + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StableSmallBoxController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StableSmallBoxController.java new file mode 100644 index 0000000..56a657d --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StableSmallBoxController.java @@ -0,0 +1,282 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.controller.util.ConnectionManager; +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.OtherExpense; +import com.arrebol.apc.model.admin.StableSmallBox; +import com.arrebol.apc.model.admin.constance.OtherExpenseCfg; +import com.arrebol.apc.model.admin.constance.StableSmallBoxCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; +import org.hibernate.query.Query; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class StableSmallBoxController extends ConnectionManager implements Serializable { + + /** + * + * Searching all stable general box by office. + * + * @param officeId + * @param startDate + * @param endDate + * @return + */ + public List fillStableSmallBoxDatatable(String officeId, Date startDate, Date endDate) { + logger.debug("fillStableSmallBoxDatatable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_OFFICE, new Office(officeId))); + //parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(StableSmallBoxCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(StableSmallBoxCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(StableSmallBox.class, StableSmallBoxCfg.QUERY_FIND_ALL_STABLE_SMALL_BOX_BY_OFFICE_BETWEEN_DATES, parameters); + } + + /** + * + * @param status + * @param stableSmallBoxIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateStableSmallBoxByStatus(ActiveStatus status, String stableSmallBoxIdToUpdate, String lastUpdatedBy) { + logger.debug("updateStableSmallBoxByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_ID, stableSmallBoxIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(StableSmallBoxCfg.QUERY_UPDATE_STABLE_SMALL_BOX_BY_STATUS, parameters); + } + + /** + * + * @param stableSmallBox + * @return boolean + */ + public boolean saveStableSmallBox(StableSmallBox stableSmallBox) { + logger.debug("saveStableSmallBox"); + boolean success = genericEntityRepository.insertAPCEntity(stableSmallBox); + + return success; + } + + /** + * + * Searching the stable small box by date and office + * + * @param createdOn + * @param officeid + * @return + */ + public Long getCountStableSmallBoxByOfficeAndDate(Date createdOn, String officeid) { + logger.debug("getCountStableSmallBoxByOfficeAndDate"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_CREATEDON, createdOn)); + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_OFFICE, new Office(officeid))); + + return (Long) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Long.class, StableSmallBoxCfg.QUERY_COUNT_STABLE_SMALL_BOX_BY_OFFICE_AND_DATE, parameters); + } + + /** + * + * Searching the stable small box by date and office + * + * @param officeid + * @return + */ + public BigDecimal getPendingByClosingDay(String officeid) { + logger.debug("getPendingByClosingDay"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(StableSmallBoxCfg.FIELD_OFFICE_VIEW, officeid)); + + return (BigDecimal) genericEntityRepository.xmlQueryAPCEntityUniqueResult(BigDecimal.class, StableSmallBoxCfg.QUERY_SUM_PENDING_CLOSING_BY_OFFICE, parameters); + } + + /** + * + * @param date + * @return + */ + public boolean existStableGeneralBoxByCreatedOn(Date date) { + logger.info("existStableGeneralBoxByCreatedOn"); + + String query = "SELECT sgb.id " + + "FROM APC_STABLE_GENERAL_BOX sgb " + + "WHERE DATE(sgb.created_on) = DATE(:date) " + + "AND sgb.active_status = 'ENEBLED'"; + + return genericEntityRepository.existRecordsUsingSQLQueryFindByCreatedOnField(date, query); + } + + /** + * + * @param date + * @return + */ + public boolean existNextPaidStableSmallBoxByCreatedOn(Date date) { + logger.info("existNextPaidStableSmallBoxByCreatedOn"); + + String query = "SELECT ssb.id " + + "FROM APC_STABLE_SMALL_BOX ssb " + + "WHERE DATE(ssb.created_on) >= DATE_ADD(DATE(:date), INTERVAL 1 DAY) " + + "AND ssb.active_status = 'ENEBLED'"; + + return genericEntityRepository.existRecordsUsingSQLQueryFindByCreatedOnField(date, query); + } + + public List getDataReport(Date fecha) { + DateFormat formatter = new SimpleDateFormat("yyyy/MM/dd"); + String dateFormat = formatter.format(fecha); + + String queryReportLocal = queryReport; + queryReportLocal = queryReportLocal.replace(":dateReport", dateFormat); + List rows = new ArrayList<>(); + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + //rows = session.createNativeQuery(queryReport).setParameter("dateReport", dateFormat).getResultList(); + rows = session.createNativeQuery(queryReportLocal).getResultList(); + + transaction.commit(); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method getDataReport(" + fecha + " " + ") ", e); + rollback(transaction); + } + + return rows; + } + + public List fillOtherExpenseDatatable(String officeId, Date startDate, Date endDate) { + logger.debug("fillOtherExpenseDatatable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(OtherExpenseCfg.FIELD_OFFICE, new Office(officeId))); + parameters.add(new ModelParameter(OtherExpenseCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(OtherExpenseCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(OtherExpense.class, OtherExpenseCfg.QUERY_FIND_ALL_OTHER_EXPENSE_BY_OFFICE_BETWEEN_DATES, parameters); + } + + final Logger logger = LogManager.getLogger(StableSmallBoxController.class); + private final GenericEntityRepository genericEntityRepository; + + public StableSmallBoxController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + + public Date getLastSmallBox(String idOffice){ + + Date rows = null; + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createQuery("SELECT createdOn FROM StableSmallBox WHERE office.id = :idOffice AND activeStatus = 'ENEBLED' ORDER BY createdOn DESC"); + query.setParameter("idOffice", idOffice); + query.setMaxResults(1); + rows = (Date) query.uniqueResult(); + + + + transaction.commit(); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error(e); + + rollback(transaction); + } + + return rows; + + } + + private String queryReport + = "SELECT\n" + + "CONCAT(hr.first_name, ' ', hr.last_name) as asesor,\n" + + "rt.route_name as ruta,\n" + + "cd.amount_expected as monto_esperado,\n" + + "cd.amount_paid as monto_reportado,\n" + + "cd.comments as comentarios,\n" + + "(SELECT total_small_box FROM APC_STABLE_SMALL_BOX WHERE active_status = 'ENEBLED' and DATE(created_on) = DATE(':dateReport')) as total_caja,\n" + + "(SELECT total_envelope FROM APC_STABLE_SMALL_BOX WHERE active_status = 'ENEBLED' and DATE(created_on) = DATE(':dateReport')) as total_sobre,\n" + + "(SELECT total_bank_note FROM APC_STABLE_SMALL_BOX WHERE active_status = 'ENEBLED' and DATE(created_on) = DATE(':dateReport')) as total_efectivo,\n" + + "(SELECT total_coin FROM APC_STABLE_SMALL_BOX WHERE active_status = 'ENEBLED' and DATE(created_on) = DATE(':dateReport')) as total_monedas,\n" + + "(SELECT total_stable FROM APC_STABLE_SMALL_BOX WHERE active_status = 'ENEBLED' and DATE(created_on) = DATE(':dateReport')) as total_cuadre,\n" + + "(SELECT description FROM APC_STABLE_SMALL_BOX WHERE active_status = 'ENEBLED' and DATE(created_on) = DATE(':dateReport')) as descripcion_cuadre\n" + + "FROM APC_CLOSING_DAY cd\n" + + "INNER JOIN APC_USER u ON cd.id_user = u.id\n" + + "INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource\n" + + "INNER JOIN (\n" + + " SELECT id_human_resource, id_route, max(created_on) \n" + + " FROM APC_HUMAN_RESOURCE_HAS_ROUTE\n" + + " GROUP BY id_human_resource\n" + + ")hrr ON hr.id = hrr.id_human_resource\n" + + "INNER JOIN APC_ROUTE rt ON hrr.id_route = rt.id\n" + + "WHERE cd.active_status = 'ENEBLED' and DATE(cd.created_on) = DATE(':dateReport');"; + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsAdvancesController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsAdvancesController.java new file mode 100644 index 0000000..3874de0 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsAdvancesController.java @@ -0,0 +1,100 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.views.StatsAdvancesView; +import com.arrebol.apc.model.views.constance.StatsAdvancesViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author David Rodriguez + */ +public class StatsAdvancesController implements Serializable { + + public List fillAdvancesDataTable(Date startDate, Date endDate, String idRoute) { + logger.debug("fillAdvancesDataTable"); + List parameters = new ArrayList<>(); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = new ArrayList<>(); + + if (idRoute != null && !idRoute.equals("")) { + parameters.add(new ModelParameter(StatsAdvancesViewCfg.FIELD_ROUTE, idRoute)); + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsAdvancesView.class, StatsAdvancesViewCfg.QUERY_FIND_ALL_ADVANCES_BETWEEN_DATES_ROUTE, parameters); + } else { + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsAdvancesView.class, StatsAdvancesViewCfg.QUERY_FIND_ALL_ADVANCES_BETWEEN_DATES, parameters); + } + + Map mapDataAdvances = new HashMap<>(); + for (StatsAdvancesView advances : dataComplete) { + if (mapDataAdvances.get(advances.getIdRoute()) != null) { + mapDataAdvances.get(advances.getIdRoute()).setTotalAdvances(mapDataAdvances.get(advances.getIdRoute()).getTotalAdvances().add(advances.getTotalAdvances())); + } else { + mapDataAdvances.put(advances.getIdRoute(), advances); + } + } + dataComplete.clear(); + dataComplete.addAll(mapDataAdvances.values()); + + dataComplete.sort(Comparator.comparing(StatsAdvancesView::getRouteName)); + return dataComplete; + } + + public BigDecimal fillTotalAdvances(Date startDate, Date endDate) { + logger.debug("fillTotalAdvances"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsAdvancesView.class, StatsAdvancesViewCfg.QUERY_FIND_ALL_ADVANCES_BETWEEN_DATES, parameters); + BigDecimal totalAdvances = new BigDecimal("0"); + for (StatsAdvancesView advances : dataComplete) { + totalAdvances = totalAdvances.add(advances.getTotalAdvances()); + } + return totalAdvances; + } + + final Logger logger = LogManager.getLogger(StatsAdvancesController.class); + private final GenericEntityRepository genericEntityRepository; + + public StatsAdvancesController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsClosingDayController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsClosingDayController.java new file mode 100644 index 0000000..c7a06a3 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsClosingDayController.java @@ -0,0 +1,102 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.views.StatsClosingDayView; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import com.arrebol.apc.model.views.constance.StatsClosingDayViewCfg; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author David Rodriguez + */ +public class StatsClosingDayController implements Serializable { + + public List fillClosingDayDataTable(Date startDate, Date endDate, String idUser) { + logger.debug("fillClosingDayDataTable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = new ArrayList<>(); + + if (idUser != null && !idUser.equals("")) { + parameters.add(new ModelParameter(StatsClosingDayViewCfg.FIELD_USER, idUser)); + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsClosingDayView.class, StatsClosingDayViewCfg.QUERY_FIND_ALL_CLOSING_DAY_BETWEEN_DATES_USER, parameters); + } else { + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsClosingDayView.class, StatsClosingDayViewCfg.QUERY_FIND_ALL_CLOSING_DAY_BETWEEN_DATES, parameters); + } + + Map mapDataClosingDay = new HashMap<>(); + for (StatsClosingDayView closingDay : dataComplete) { + if (mapDataClosingDay.get(closingDay.getIdUser()) != null) { + mapDataClosingDay.get(closingDay.getIdUser()).setTotalClosingDay( + mapDataClosingDay.get(closingDay.getIdUser()).getTotalClosingDay().add(closingDay.getTotalClosingDay())); + } else { + mapDataClosingDay.put(closingDay.getIdUser(), closingDay); + } + } + dataComplete.clear(); + dataComplete.addAll(mapDataClosingDay.values()); + + dataComplete.sort(Comparator.comparing(StatsClosingDayView::getRouteName)); + return dataComplete; + } + + public BigDecimal fillTotalClosingDay(Date startDate, Date endDate) { + logger.debug("fillTotalClosingDay"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsClosingDayView.class, StatsClosingDayViewCfg.QUERY_FIND_ALL_CLOSING_DAY_BETWEEN_DATES, parameters); + BigDecimal totalClosingDay = new BigDecimal("0"); + for (StatsClosingDayView closingDay : dataComplete) { + totalClosingDay = totalClosingDay.add(closingDay.getTotalClosingDay()); + } + return totalClosingDay; + } + + final Logger logger = LogManager.getLogger(StatsClosingDayController.class); + private final GenericEntityRepository genericEntityRepository; + + public StatsClosingDayController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsDepositsController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsDepositsController.java new file mode 100644 index 0000000..58d9905 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsDepositsController.java @@ -0,0 +1,105 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.views.StatsDepositsView; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import com.arrebol.apc.model.views.constance.StatsDepositsViewCfg; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author David Rodriguez + */ +public class StatsDepositsController implements Serializable { + + public List fillDepositsDataTable(Date startDate, Date endDate, String idUser) { + logger.debug("fillDepositsDataTable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = new ArrayList<>(); + + if (idUser != null && !idUser.equals("")) { + parameters.add(new ModelParameter(StatsDepositsViewCfg.FIELD_USER, idUser)); + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsDepositsView.class, StatsDepositsViewCfg.QUERY_FIND_ALL_DEPOSITS_BETWEEN_DATES_USER, parameters); + } else { + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsDepositsView.class, StatsDepositsViewCfg.QUERY_FIND_ALL_DEPOSITS_BETWEEN_DATES, parameters); + } + + Map mapDataDeposits = new HashMap<>(); + /* + for (StatsDepositsView deposits : dataComplete) { + if (mapDataDeposits.get(deposits.getIdUser()) != null) { + if(!mapDataDeposits.get(deposits.getIdUser()).getRouteName().contains(deposits.getRouteName())){ + mapDataDeposits.get(deposits.getIdUser()).setRouteName(mapDataDeposits.get(deposits.getIdUser()).getRouteName() + ", " + deposits.getRouteName()); + } + + mapDataDeposits.get(deposits.getIdUser()).setTotalDeposits( + mapDataDeposits.get(deposits.getIdUser()).getTotalDeposits().add(deposits.getTotalDeposits())); + } else { + mapDataDeposits.put(deposits.getIdUser(), deposits); + } + } + */ + dataComplete.sort(Comparator.comparing(StatsDepositsView::getRouteName)); + return dataComplete; + } + + public BigDecimal fillTotalDeposits(Date startDate, Date endDate) { + logger.debug("fillTotalDeposits"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsDepositsView.class, StatsDepositsViewCfg.QUERY_FIND_ALL_DEPOSITS_BETWEEN_DATES, parameters); + BigDecimal totalDeposits = new BigDecimal("0"); + for (StatsDepositsView deposits : dataComplete) { + totalDeposits = totalDeposits.add(deposits.getTotalDeposits()); + } + return totalDeposits; + } + + final Logger logger = LogManager.getLogger(StatsDepositsController.class); + private final GenericEntityRepository genericEntityRepository; + + public StatsDepositsController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsEmployeeSavingController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsEmployeeSavingController.java new file mode 100644 index 0000000..d5a6345 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsEmployeeSavingController.java @@ -0,0 +1,155 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.EmployeeSaving; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.EmployeeSavingType; +import com.arrebol.apc.model.views.StatsEmployeeSavingView; +import com.arrebol.apc.model.views.constance.StatsEmployeeSavingViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author David Rodriguez + */ +public class StatsEmployeeSavingController implements Serializable { + public List fillEmployeeSavingDataTable (Date startDate, Date endDate) { + logger.debug("fillEmployeeSavingDataTable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsEmployeeSavingView.class, StatsEmployeeSavingViewCfg.QUERY_FIND_ALL_EMPLOYEE_SAVING_BETWEEN_DATES, parameters); + Map mapDataEmployeeSaving = new HashMap<>(); + for (StatsEmployeeSavingView employeeSaving : dataComplete) { + if (mapDataEmployeeSaving.get(employeeSaving.getIdUser()) != null) { + if (employeeSaving.getType().equals(EmployeeSavingType.SAVING)) { + mapDataEmployeeSaving.get(employeeSaving.getIdUser()).setEmployeeSaving( + mapDataEmployeeSaving.get(employeeSaving.getIdUser()).getEmployeeSaving().add(employeeSaving.getEmployeeSaving())); + }else{ + mapDataEmployeeSaving.get(employeeSaving.getIdUser()).setEmployeeSaving( + mapDataEmployeeSaving.get(employeeSaving.getIdUser()).getEmployeeSaving().subtract(employeeSaving.getEmployeeSaving())); + } + } else { + if (employeeSaving.getType().equals(EmployeeSavingType.SAVING)) { + employeeSaving.setEmployeeSaving(employeeSaving.getEmployeeSaving()); + }else{ + employeeSaving.setEmployeeSaving(employeeSaving.getEmployeeSaving().negate()); + } + mapDataEmployeeSaving.put(employeeSaving.getIdUser(), employeeSaving); + } + } + + dataComplete.clear(); + dataComplete.addAll(mapDataEmployeeSaving.values()); + + // Asigna todas las rutas al usuario + // dataComplete.forEach(d -> d.setRouteName(mapDataEmployeeSaving.get(d.getIdUser()).getRouteName())); + + return dataComplete; + } + + public List getEmployeeSavingById (Date startDate, Date endDate, String idUser) { + logger.debug("getEmployeeSavingById"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + parameters.add(new ModelParameter(StatsEmployeeSavingViewCfg.USER_ID, idUser)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsEmployeeSavingView.class, StatsEmployeeSavingViewCfg.QUERY_FIND_ALL_EMPLOYEE_SAVING_BY_ID_BETWEEN_DATES, parameters); + + return dataComplete; + + } + + public BigDecimal fillTotalEmployeeSaving(Date startDate, Date endDate) { + logger.debug("fillTotalEmployeeSaving"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsEmployeeSavingView.class, StatsEmployeeSavingViewCfg.QUERY_FIND_ALL_EMPLOYEE_SAVING_BETWEEN_DATES, parameters); + BigDecimal totalEmployeeSaving = BigDecimal.ZERO; + for (StatsEmployeeSavingView employeeSaving : dataComplete) { + if (employeeSaving.getType().equals(EmployeeSavingType.SAVING)) { + totalEmployeeSaving = totalEmployeeSaving.add(employeeSaving.getEmployeeSaving()); + }else{ + totalEmployeeSaving = totalEmployeeSaving.subtract(employeeSaving.getEmployeeSaving()); + } + } + return totalEmployeeSaving; + } + + public boolean saveEmployeeSaving(EmployeeSaving employeeSaving) { + logger.debug("saveEmployeeSaving"); + boolean success = genericEntityRepository.insertAPCEntity(employeeSaving); + + return success; + } + + /** + * + * Searching user by id. + * + * @param userId + * @return + */ + public User getUserById(String userId) { + logger.debug("getUserById"); + + return (User) genericEntityRepository.selectAPCEntityById(User.class, userId); + } + + final Logger logger = LogManager.getLogger(StatsEmployeeSavingController.class); + private final GenericEntityRepository genericEntityRepository; + + public StatsEmployeeSavingController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsGasolineController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsGasolineController.java new file mode 100644 index 0000000..dbfbfa3 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsGasolineController.java @@ -0,0 +1,81 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.views.StatsGasolineView; +import com.arrebol.apc.model.views.constance.StatsGasolineViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class StatsGasolineController implements Serializable { + + public List fillGasolineDataTable(Date startDate, Date endDate) { + logger.debug("fillGasolineDataTable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsGasolineView.class, StatsGasolineViewCfg.QUERY_FIND_ALL_GASOLINE_BETWEEN_DATES, parameters); + + return dataComplete; + } + + public Double fillTotalGasoline(Date startDate, Date endDate) { + logger.debug("fillTotalGasoline"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsGasolineView.class, StatsGasolineViewCfg.QUERY_FIND_ALL_GASOLINE_BETWEEN_DATES, parameters); + Double totalGasoline = 0.0; + for (StatsGasolineView gasoline : dataComplete) { + totalGasoline = totalGasoline + gasoline.getTotalGasoline(); + } + return totalGasoline; + } + + final Logger logger = LogManager.getLogger(StatsAdvancesController.class); + private final GenericEntityRepository genericEntityRepository; + + public StatsGasolineController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsOpeningFeesController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsOpeningFeesController.java new file mode 100644 index 0000000..66191b0 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsOpeningFeesController.java @@ -0,0 +1,107 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.views.StatsOpeningFeesView; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import com.arrebol.apc.model.views.constance.StatsOpeningFeesViewCfg; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author David Rodriguez + */ +public class StatsOpeningFeesController implements Serializable { + + public List fillOpeningFeesDataTable(Date startDate, Date endDate, String idUser) { + logger.debug("fillOpeningFeesDataTable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = new ArrayList<>(); + + if (idUser != null && !idUser.equals("")) { + parameters.add(new ModelParameter(StatsOpeningFeesViewCfg.FIELD_USER, idUser)); + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsOpeningFeesView.class, StatsOpeningFeesViewCfg.QUERY_FIND_ALL_OPENING_FEES_BETWEEN_DATES_USER, parameters); + } else { + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsOpeningFeesView.class, StatsOpeningFeesViewCfg.QUERY_FIND_ALL_OPENING_FEES_BETWEEN_DATES, parameters); + } + + Map mapDataOpeningFees = new HashMap<>(); + for (StatsOpeningFeesView openingFee : dataComplete) { + if (mapDataOpeningFees.get(openingFee.getIdUser()) != null) { + if(!mapDataOpeningFees.get(openingFee.getIdUser()).getRouteName().contains(openingFee.getRouteName())){ + mapDataOpeningFees.get(openingFee.getIdUser()).setRouteName(mapDataOpeningFees.get(openingFee.getIdUser()).getRouteName() + ", " + openingFee.getRouteName()); + } + + mapDataOpeningFees.get(openingFee.getIdUser()).setTotaltotalOpeningFees( + mapDataOpeningFees.get(openingFee.getIdUser()).getTotalOpeningFees().add(openingFee.getTotalOpeningFees())); + } else { + mapDataOpeningFees.put(openingFee.getIdUser(), openingFee); + } + } + dataComplete.clear(); + dataComplete.addAll(mapDataOpeningFees.values()); + + dataComplete.sort(Comparator.comparing(StatsOpeningFeesView::getRouteName)); + return dataComplete; + } + + public BigDecimal fillTotalOpeningFees(Date startDate, Date endDate) { + logger.debug("fillTotalOpeningFees"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsOpeningFeesView.class, StatsOpeningFeesViewCfg.QUERY_FIND_ALL_OPENING_FEES_BETWEEN_DATES, parameters); + BigDecimal totalOpeningFees = new BigDecimal("0"); + for (StatsOpeningFeesView openingFee : dataComplete) { + totalOpeningFees = totalOpeningFees.add(openingFee.getTotalOpeningFees()); + } + return totalOpeningFees; + } + + final Logger logger = LogManager.getLogger(StatsOpeningFeesController.class); + private final GenericEntityRepository genericEntityRepository; + + public StatsOpeningFeesController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPaymentController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPaymentController.java new file mode 100644 index 0000000..abb091e --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPaymentController.java @@ -0,0 +1,117 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.views.StatsPaymentView; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import com.arrebol.apc.model.views.constance.StatsPaymentViewCfg; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author David Rodriguez + */ +public class StatsPaymentController implements Serializable { + + public List fillPaymentDataTable(Date startDate, Date endDate, String idUser) { + logger.debug("fillPaymentDataTable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = new ArrayList<>(); + + if (idUser != null && !idUser.equals("")) { + parameters.add(new ModelParameter(StatsPaymentViewCfg.FIELD_USER, idUser)); + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsPaymentView.class, StatsPaymentViewCfg.QUERY_FIND_ALL_PAYMENT_BETWEEN_DATES_USER, parameters); + } else { + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsPaymentView.class, StatsPaymentViewCfg.QUERY_FIND_ALL_PAYMENT_BETWEEN_DATES, parameters); + } + + Map mapDataPayment = new HashMap<>(); + List listLoanTypeSum = new ArrayList<>(); + + for (StatsPaymentView payment : dataComplete) { + if (mapDataPayment.get(payment.getIdUser()) != null) { + mapDataPayment.get(payment.getIdUser()).setTotalPayment( + mapDataPayment.get(payment.getIdUser()).getTotalPayment().add(payment.getTotalPayment())); + if(!listLoanTypeSum.contains(payment.getIdLoan())){ + listLoanTypeSum.add(payment.getIdLoan()); + mapDataPayment.get(payment.getIdUser()).setTotalPayment( + mapDataPayment.get(payment.getIdUser()).getTotalPayment().add(payment.getOpeningFee())); + } + } else { + payment.setTotalPayment(payment.getTotalPayment().add(payment.getOpeningFee())); + mapDataPayment.put(payment.getIdUser(), payment); + listLoanTypeSum.add(payment.getIdLoan()); + + } + } + dataComplete.clear(); + dataComplete.addAll(mapDataPayment.values()); + + dataComplete.sort(Comparator.comparing(StatsPaymentView::getRouteName)); + return dataComplete; + } + + public BigDecimal fillTotalPayment(Date startDate, Date endDate) { + logger.debug("fillTotalPayment"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsPaymentView.class, StatsPaymentViewCfg.QUERY_FIND_ALL_PAYMENT_BETWEEN_DATES, parameters); + List listLoanTypeSum = new ArrayList<>(); + BigDecimal totalPayment = new BigDecimal("0"); + for (StatsPaymentView payment : dataComplete) { + totalPayment = totalPayment.add(payment.getTotalPayment()); + if(!listLoanTypeSum.contains(payment.getIdLoan())){ + listLoanTypeSum.add(payment.getIdLoan()); + totalPayment = totalPayment.add(payment.getOpeningFee()); + } + } + return totalPayment; + } + + final Logger logger = LogManager.getLogger(StatsPaymentController.class); + private final GenericEntityRepository genericEntityRepository; + + public StatsPaymentController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPaymentRenovationController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPaymentRenovationController.java new file mode 100644 index 0000000..8bb700b --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPaymentRenovationController.java @@ -0,0 +1,86 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.views.StatsPaymentRenovationView; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import com.arrebol.apc.model.views.constance.StatsPaymentRenovationViewCfg; +import java.math.BigDecimal; +import java.util.Calendar; + +/** + * + * @author David Rodriguez + */ +public class StatsPaymentRenovationController implements Serializable { + + public List fillPaymentDataTable(Date startDate, Date endDate, String idUser) { + logger.debug("fillPaymentDataTable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = new ArrayList<>(); + + if (idUser != null && !idUser.equals("")) { + parameters.add(new ModelParameter(StatsPaymentRenovationViewCfg.FIELD_USER, idUser)); + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsPaymentRenovationView.class, StatsPaymentRenovationViewCfg.QUERY_FIND_ALL_PAYMENT_RENOVATION_BETWEEN_DATES_USER, parameters); + } else { + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsPaymentRenovationView.class, StatsPaymentRenovationViewCfg.QUERY_FIND_ALL_PAYMENT_RENOVATION_BETWEEN_DATES, parameters); + } + + return dataComplete; + } + + public BigDecimal fillTotalPayment(Date startDate, Date endDate) { + logger.debug("fillTotalPayment"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsPaymentRenovationView.class, StatsPaymentRenovationViewCfg.QUERY_FIND_ALL_PAYMENT_RENOVATION_BETWEEN_DATES, parameters); + BigDecimal totalPayment = new BigDecimal("0"); + for (StatsPaymentRenovationView payment : dataComplete) { + totalPayment = totalPayment.add(payment.getTotalPayment()); + } + return totalPayment; + } + + final Logger logger = LogManager.getLogger(StatsPaymentRenovationController.class); + private final GenericEntityRepository genericEntityRepository; + + public StatsPaymentRenovationController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPaymentRouteController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPaymentRouteController.java new file mode 100644 index 0000000..989b72d --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPaymentRouteController.java @@ -0,0 +1,120 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.views.StatsPaymentRouteView; +import com.arrebol.apc.model.views.constance.StatsPaymentRouteViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author David Rodriguez + */ +public class StatsPaymentRouteController implements Serializable { + + public BigDecimal fillTotalPayment(Date startDate, Date endDate) { + logger.debug("fillTotalPayment"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsPaymentRouteView.class, StatsPaymentRouteViewCfg.QUERY_FIND_ALL_PAYMENT_ROUTE_BETWEEN_DATES, parameters); + BigDecimal totalPayment = new BigDecimal("0"); + List listLoanTypeSum = new ArrayList<>(); + for (StatsPaymentRouteView payment : dataComplete) { + totalPayment = totalPayment.add(payment.getTotalPayment()); + if (!listLoanTypeSum.contains(payment.getIdLoan())) { + listLoanTypeSum.add(payment.getIdLoan()); + totalPayment = totalPayment.add(payment.getOpeningFee()); + } + } + return totalPayment; + } + + public List fillPaymentDataTable(Date startDate, Date endDate, String idRoute) { + logger.debug("fillPaymentDataTable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + List dataComplete = new ArrayList<>(); + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + + if (idRoute != null && !idRoute.equals("")) { + parameters.add(new ModelParameter(StatsPaymentRouteViewCfg.FIELD_ROUTE, idRoute)); + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsPaymentRouteView.class, StatsPaymentRouteViewCfg.QUERY_FIND_ALL_PAYMENT_ROUTE_BETWEEN_DATES_ROUTE, parameters); + } else { + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsPaymentRouteView.class, StatsPaymentRouteViewCfg.QUERY_FIND_ALL_PAYMENT_ROUTE_BETWEEN_DATES, parameters); + } + + Map mapDataPayment = new HashMap<>(); + List listLoanTypeSum = new ArrayList<>(); + + for (StatsPaymentRouteView payment : dataComplete) { + if (mapDataPayment.get(payment.getIdRoute()) != null) { + if(!mapDataPayment.get(payment.getIdRoute()).getUserName().contains(payment.getUserName())){ + mapDataPayment.get(payment.getIdRoute()).setUserName(mapDataPayment.get(payment.getIdRoute()).getUserName() + ", " + payment.getUserName()); + } + mapDataPayment.get(payment.getIdRoute()).setTotalPayment( + mapDataPayment.get(payment.getIdRoute()).getTotalPayment().add(payment.getTotalPayment())); + + if (!listLoanTypeSum.contains(payment.getIdLoan())) { + listLoanTypeSum.add(payment.getIdLoan()); + mapDataPayment.get(payment.getIdRoute()).setTotalPayment( + mapDataPayment.get(payment.getIdRoute()).getTotalPayment().add(payment.getOpeningFee())); + } + } else { + payment.setTotalPayment(payment.getTotalPayment().add(payment.getOpeningFee())); + mapDataPayment.put(payment.getIdRoute(), payment); + listLoanTypeSum.add(payment.getIdLoan()); + } + } + dataComplete.clear(); + dataComplete.addAll(mapDataPayment.values()); + + dataComplete.sort(Comparator.comparing(StatsPaymentRouteView::getRouteName)); + return dataComplete; + } + + final Logger logger = LogManager.getLogger(StatsPaymentRouteController.class); + private final GenericEntityRepository genericEntityRepository; + + public StatsPaymentRouteController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPayrollController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPayrollController.java new file mode 100644 index 0000000..2ace223 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsPayrollController.java @@ -0,0 +1,99 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.views.StatsPayrollView; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import com.arrebol.apc.model.views.constance.StatsPayrollViewCfg; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author David Rodriguez + */ +public class StatsPayrollController implements Serializable { + + public List fillPayrollDataTable(Date startDate, Date endDate, String idUser) { + logger.debug("fillPayrollDataTable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = new ArrayList<>(); + + if (idUser != null && !idUser.equals("")) { + parameters.add(new ModelParameter(StatsPayrollViewCfg.FIELD_USER, idUser)); + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsPayrollView.class, StatsPayrollViewCfg.QUERY_FIND_ALL_PAYROLL_BETWEEN_DATES_USER, parameters); + } else { + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsPayrollView.class, StatsPayrollViewCfg.QUERY_FIND_ALL_PAYROLL_BETWEEN_DATES, parameters); + } + + Map mapDataPayroll = new HashMap<>(); + for (StatsPayrollView payroll : dataComplete) { + if (mapDataPayroll.get(payroll.getIdUser()) != null) { + mapDataPayroll.get(payroll.getIdUser()).setTotalPayroll( + mapDataPayroll.get(payroll.getIdUser()).getTotalPayroll().add(payroll.getTotalPayroll())); + } else { + mapDataPayroll.put(payroll.getIdUser(), payroll); + } + } + dataComplete.clear(); + dataComplete.addAll(mapDataPayroll.values()); + return dataComplete; + } + + public BigDecimal fillTotalPayroll(Date startDate, Date endDate) { + logger.debug("fillTotalPayroll"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsPayrollView.class, StatsPayrollViewCfg.QUERY_FIND_ALL_PAYROLL_BETWEEN_DATES, parameters); + BigDecimal totalPayroll = new BigDecimal("0"); + for (StatsPayrollView payroll : dataComplete) { + totalPayroll = totalPayroll.add(payroll.getTotalPayroll()); + } + return totalPayroll; + } + + final Logger logger = LogManager.getLogger(StatsPayrollController.class); + private final GenericEntityRepository genericEntityRepository; + + public StatsPayrollController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsSummaryController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsSummaryController.java new file mode 100644 index 0000000..3595778 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsSummaryController.java @@ -0,0 +1,233 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.controller.util.ConnectionManager; +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.views.StatsPayrollView; +import com.arrebol.apc.model.views.StatsSummaryView; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import com.arrebol.apc.model.views.constance.StatsPayrollViewCfg; +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; + +/** + * + * @author David Rodriguez + */ +public class StatsSummaryController extends ConnectionManager implements Serializable { + + public List fillSummaryDataTable(Date startDate, Date endDate) { + logger.debug("fillSummaryDataTable"); + List dataList = new ArrayList<>(); + Transaction transaction = null; + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); + + List rows = session.createNativeQuery(querySummary) + .setParameter("startDate", startDate) + .setParameter("endDate", endDate) + .getResultList(); + + transaction.commit(); + + rows.forEach((row) -> { + Object[] results = (Object[]) row; + + // Create Data Row + StatsSummaryView summaryRow = new StatsSummaryView(); + summaryRow.setIdUser(results[0] == null ? "" : results[0].toString()); + summaryRow.setUserName(results[1] == null ? "" : results[1].toString()); + summaryRow.setOpeningFee(new BigDecimal(results[2] == null ? "0.0" : results[2].toString())); + summaryRow.setDeposits(new BigDecimal(results[3] == null ? "0.0" : results[3].toString())); + summaryRow.setPayment(new BigDecimal(results[4] == null ? "0.0" : results[4].toString())); + summaryRow.setPayroll(new BigDecimal(results[5] == null ? "0.0" : results[5].toString())); + summaryRow.setGasoline(new BigDecimal(results[6] == null ? "0.0" : results[6].toString())); + summaryRow.setAdvances(new BigDecimal(results[7] == null ? "0.0" : results[7].toString())); + summaryRow.setExpenses(new BigDecimal(results[8] == null ? "0.0" : results[8].toString())); + summaryRow.setTrasferTransmitter(new BigDecimal(results[9] == null ? "0.0" : results[9].toString())); + summaryRow.setTrasferReceiver(new BigDecimal(results[10] == null ? "0.0" : results[10].toString())); + + dataList.add(summaryRow); + }); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method fillSummaryDataTable(" + startDate + " " + ") ", e); + rollback(transaction); + } + + return dataList; + } + + public BigDecimal fillTotalSummary(Date startDate, Date endDate) { + logger.debug("fillTotalSummary"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsPayrollView.class, StatsPayrollViewCfg.QUERY_FIND_ALL_PAYROLL_BETWEEN_DATES, parameters); + BigDecimal totalPayroll = new BigDecimal("0"); + for (StatsPayrollView payroll : dataComplete) { + totalPayroll = totalPayroll.add(payroll.getTotalPayroll()); + } + return totalPayroll; + } + + final Logger logger = LogManager.getLogger(StatsSummaryController.class); + private final GenericEntityRepository genericEntityRepository; + + public StatsSummaryController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + + private final String querySummary + = "SELECT " + + " HR.id AS id_user, " + + " CONCAT(HR.first_name, ' ', HR.last_name) AS Name, " + + " IFNULL(OFE.opening_fee, 0.0) AS opening_fee, " + + " IFNULL(DEP.total_deposits, 0.0) AS deposits, " + + " IFNULL(PAY.total_payment, 0.0) AS payment, " + + " IFNULL(PR.total_payroll, 0.0) AS payroll, " + + " IFNULL(GAS.total_gasoline, 0.0) AS gasoline, " + + " IFNULL(ADV.total_advances, 0.0) AS advances, " + + " IFNULL(EXP.total_expenses, 0.0) AS expenses, " + + " IFNULL(TE.total_transfer, 0.0) AS trasfer_transmitter, " + + " IFNULL(TR.total_transfer, 0.0) AS trasfer_receiver " + + "FROM APC_HUMAN_RESOURCE AS HR " + + "INNER JOIN APC_USER AS U ON U.id_human_resource = HR.Id " + + "LEFT JOIN " + + "( " + + " SELECT " + + " HR.id AS id_HR, CONCAT(HR.first_name, ' ', HR.last_name) AS Name, SUM(LT.opening_fee) AS opening_fee " + + " FROM APC_LOAN L " + + " INNER JOIN APC_LOAN_TYPE LT ON L.id_loan_type = LT.id " + + " INNER JOIN APC_USER U ON L.created_by = U.id " + + " INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id " + + " WHERE DATE(L.created_on) BETWEEN DATE(:startDate) AND DATE(:endDate) " + + " GROUP BY HR.id " + + ") OFE ON HR.id = OFE.id_HR " + + "LEFT JOIN " + + "( " + + " SELECT " + + " HR.id AS id_HR, CONCAT(HR.first_name, ' ', HR.last_name) AS Name, SUM(LD.payment_amount )AS total_deposits " + + " FROM APC_LOAN_DETAIL LD " + + " INNER JOIN APC_LOAN L ON LD.id_loan = L.id AND L.loan_status <> 'DELETED' " + + " INNER JOIN APC_USER U ON LD.id_user = U.id " + + " INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id " + + " WHERE loan_details_type IN ('TRANSFER') AND DATE(LD.created_on) BETWEEN DATE(:startDate) AND DATE(:endDate) " + + " GROUP BY HR.id " + + ") DEP ON HR.id = DEP.id_HR " + + "LEFT JOIN " + + "( " + + " SELECT " + + " HR.id AS id_HR, CONCAT(HR.first_name, ' ', HR.last_name) AS Name, SUM(LD.payment_amount )AS total_payment " + + " FROM APC_LOAN_DETAIL LD " + + " INNER JOIN APC_LOAN L ON LD.id_loan = L.id AND L.loan_status <> 'DELETED' " + + " INNER JOIN APC_USER U ON LD.id_user = U.id " + + " INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id " + + " WHERE loan_details_type IN ('PAYMENT') AND DATE(LD.created_on) BETWEEN DATE(:startDate) AND DATE(:endDate) " + + " GROUP BY HR.id " + + ") PAY ON HR.id = PAY.id_HR " + + "LEFT JOIN " + + "( " + + " SELECT " + + " P.id_human_resource AS id_HR, " + + " SUM(P.salary + P.total_bonus_colocation + P.total_bonus_mora + P.total_bonus_new_customer + P.increases) AS total_payroll " + + " FROM APC_PAYROLL P " + + " WHERE DATE(P.created_on) BETWEEN DATE(:startDate) AND DATE(:endDate) " + + " GROUP BY P.id_human_resource " + + ")PR ON HR.id = PR.id_HR " + + "LEFT JOIN " + + "( " + + " SELECT " + + " HR.id AS id_HR, CONCAT(HR.first_name, ' ', HR.last_name) AS user_name, SUM(G.total) AS total_gasoline " + + " FROM APC_GASOLINE G " + + " INNER JOIN APC_USER U ON G.id_user = U.id " + + " INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id " + + " WHERE G.status = 'ENABLED' AND DATE(G.created_on) BETWEEN DATE(:startDate) AND DATE(:endDate) " + + " GROUP BY HR.id " + + ")GAS ON HR.id = GAS.id_HR " + + "LEFT JOIN " + + "( " + + " SELECT " + + " HR.id AS id_HR, SUM(LD.payment_amount) AS total_advances " + + " FROM APC_LOAN_DETAIL LD " + + " INNER JOIN APC_LOAN L ON LD.id_loan = L.id AND L.loan_status <> 'DELETED' " + + " INNER JOIN APC_USER U ON LD.id_user = U.id " + + " INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id " + + " WHERE loan_details_type IN ('RENOVATION_PAYMENT') AND DATE(LD.created_on) BETWEEN DATE(:startDate) AND DATE(:endDate) " + + " GROUP BY HR.id " + + ")ADV ON HR.id = ADV.id_HR " + + "LEFT JOIN " + + "( " + + " SELECT " + + " HR.id AS id_HR, CONCAT(HR.first_name, ' ', HR.last_name) AS user_name, SUM(OE.expense) AS total_expenses " + + " FROM APC_OTHER_EXPENSE OE " + + " INNER JOIN APC_USER U ON OE.id_user = U.id " + + " INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id " + + " WHERE DATE(OE.created_on) BETWEEN DATE(:startDate) AND DATE(:endDate) " + + " GROUP BY HR.id " + + ")EXP ON HR.id = EXP.id_HR " + + "LEFT JOIN " + + "( " + + " SELECT " + + " HR.id AS id_HR, CONCAT(HR.first_name, ' ', HR.last_name) AS user_name, SUM(TE.amount_to_transfer) AS total_transfer " + + " FROM APC_TRANSFER TE " + + " INNER JOIN APC_USER U ON TE.id_user_transmitter = U.id " + + " INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id " + + " WHERE DATE(TE.created_on) BETWEEN DATE(:startDate) AND DATE(:endDate) " + + " GROUP BY HR.id " + + ")TE ON HR.id = TE.id_HR " + + "LEFT JOIN " + + "( " + + " SELECT " + + " HR.id AS id_HR, CONCAT(HR.first_name, ' ', HR.last_name) AS user_name, SUM(TR.amount_to_transfer) AS total_transfer " + + " FROM APC_TRANSFER TR " + + " INNER JOIN APC_USER U ON TR.id_user_receiver = U.id " + + " INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id " + + " WHERE DATE(TR.created_on) BETWEEN DATE(:startDate) AND DATE(:endDate) " + + " GROUP BY HR.id " + + ")TR ON HR.id = TR.id_HR " + + "WHERE HR.human_resource_status = 'ENEBLED';"; +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsVehicleController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsVehicleController.java new file mode 100644 index 0000000..39cbf94 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsVehicleController.java @@ -0,0 +1,53 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.Vehicle; +import com.arrebol.apc.model.views.constance.StatsVehicleCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class StatsVehicleController implements Serializable { + + public List fillVehicleDataTable(Date startDate, Date endDate) { + logger.debug("fillVehicleDataTable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(Vehicle.class, StatsVehicleCfg.QUERY_FIND_ALL_VEHICLES, parameters); + + return dataComplete; + } + + final Logger logger = LogManager.getLogger(StatsAdvancesController.class); + private final GenericEntityRepository genericEntityRepository; + + public StatsVehicleController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsZeroPaymentsController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsZeroPaymentsController.java new file mode 100644 index 0000000..0dbd44e --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/StatsZeroPaymentsController.java @@ -0,0 +1,113 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.constance.GoalCfg; +import com.arrebol.apc.model.views.StatsZeroPaymentsView; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import com.arrebol.apc.model.views.constance.StatsZeroPaymentsViewCfg; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Comparator; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author David Rodriguez + */ +public class StatsZeroPaymentsController implements Serializable { + + public List fillZeroPaymentsDataTable(Date startDate, Date endDate, String idUser) { + logger.debug("fillZeroPaymentsDataTable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = new ArrayList<>(); + + if (idUser != null && !idUser.equals("")) { + parameters.add(new ModelParameter(StatsZeroPaymentsViewCfg.FIELD_USER, idUser)); + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsZeroPaymentsView.class, StatsZeroPaymentsViewCfg.QUERY_FIND_ALL_ZERO_PAYMENTS_BETWEEN_DATES_USER, parameters); + } else { + dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsZeroPaymentsView.class, StatsZeroPaymentsViewCfg.QUERY_FIND_ALL_ZERO_PAYMENTS_BETWEEN_DATES, parameters); + } + + Map mapDataZeroPayments = new HashMap<>(); + for (StatsZeroPaymentsView zeroPayments : dataComplete) { + if (mapDataZeroPayments.get(zeroPayments.getIdUser()) != null) { + if(!mapDataZeroPayments.get(zeroPayments.getIdUser()).getRouteName().contains(zeroPayments.getRouteName())){ + mapDataZeroPayments.get(zeroPayments.getIdUser()).setRouteName(mapDataZeroPayments.get(zeroPayments.getIdUser()).getRouteName() + ", " + zeroPayments.getRouteName()); + } + } else { + mapDataZeroPayments.put(zeroPayments.getIdUser(), zeroPayments); + } + } + // Asigna todas las rutas al usuario + dataComplete.forEach(d -> d.setRouteName(mapDataZeroPayments.get(d.getIdUser()).getRouteName())); + + mapDataZeroPayments.clear(); + for (StatsZeroPaymentsView zeroPayments : dataComplete) { + if (mapDataZeroPayments.get(zeroPayments.getIdUser()) != null) { + mapDataZeroPayments.get(zeroPayments.getIdUser()).setTotalZeroPayments(mapDataZeroPayments.get(zeroPayments.getIdUser()).getTotalZeroPayments().add(BigDecimal.ONE)); + } else { + zeroPayments.setTotalZeroPayments(BigDecimal.ONE); + mapDataZeroPayments.put(zeroPayments.getIdUser(), zeroPayments); + } + } + dataComplete.clear(); + dataComplete.addAll(mapDataZeroPayments.values()); + + dataComplete.sort(Comparator.comparing(StatsZeroPaymentsView::getRouteName)); + + return dataComplete; + } + + public int fillTotalZeroPayments(Date startDate, Date endDate) { + logger.debug("fillTotalZeroPayments"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(GoalCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(GoalCfg.PARAM_END_DATE, endDate)); + List dataComplete = genericEntityRepository.xmlQueryAPCEntities(StatsZeroPaymentsView.class, StatsZeroPaymentsViewCfg.QUERY_FIND_ALL_ZERO_PAYMENTS_BETWEEN_DATES, parameters); + + return dataComplete.size(); + } + + final Logger logger = LogManager.getLogger(StatsZeroPaymentsController.class); + private final GenericEntityRepository genericEntityRepository; + + public StatsZeroPaymentsController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/TransferController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/TransferController.java new file mode 100644 index 0000000..adc2c83 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/TransferController.java @@ -0,0 +1,110 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.Transfer; +import com.arrebol.apc.model.admin.constance.TransferCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class TransferController implements Serializable{ + + /** + * + * Searching all transfer by office. + * + * @param officeId + * @param startDate + * @param endDate + * @return + */ + public List fillTransferDatatable(String officeId, Date startDate, Date endDate) { + logger.debug("fillTransferDatatable"); + List parameters = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(startDate); + calendar.add(Calendar.DAY_OF_YEAR, 1); + startDate = calendar.getTime(); + + Calendar calendarF = Calendar.getInstance(); + calendarF.setTime(endDate); + calendarF.add(Calendar.DAY_OF_YEAR, 1); + endDate = calendarF.getTime(); + + parameters.add(new ModelParameter(TransferCfg.FIELD_OFFICE, new Office(officeId))); + parameters.add(new ModelParameter(TransferCfg.PARAM_START_DATE, startDate)); + parameters.add(new ModelParameter(TransferCfg.PARAM_END_DATE, endDate)); + + return genericEntityRepository.xmlQueryAPCEntities(Transfer.class, TransferCfg.QUERY_FIND_ALL_TRANFERS_BY_OFFICE_BETWEEN_DATES, parameters); + } + + /** + * + * @param transfer + * @return boolean + */ + public boolean saveTransfer(Transfer transfer) { + logger.debug("saveTransfer"); + boolean success = genericEntityRepository.insertAPCEntity(transfer); + + return success; + } + + /** + * + * @param transfer + * @return boolean + */ + public boolean updateByTransferId(Transfer transfer) { + logger.debug("updateByTransferId"); + + return genericEntityRepository.updateAPCEntity(transfer); + } + + /** + * + * @param status + * @param transferIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateTransferByStatus(ActiveStatus status, String transferIdToUpdate, String lastUpdatedBy) { + logger.debug("updateTransferByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(TransferCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(TransferCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(TransferCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(TransferCfg.FIELD_ID, transferIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(TransferCfg.QUERY_UPDATE_TRANSFER_BY_ACTIVE_STATUS, parameters); + } + + final Logger logger = LogManager.getLogger(TransferController.class); + private final GenericEntityRepository genericEntityRepository; + + public TransferController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/admin/VehicleController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/VehicleController.java new file mode 100644 index 0000000..1d4e7e4 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/admin/VehicleController.java @@ -0,0 +1,170 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.Bonus; +import com.arrebol.apc.model.admin.constance.BonusCfg; +import com.arrebol.apc.model.catalog.Vehicle; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.constance.HumanResourceByOfficeCfg; +import com.arrebol.apc.model.core.constance.HumanResourceCfg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.HumanResourceStatus; +import com.arrebol.apc.repository.GenericEntityRepository; +import com.arrebol.apc.repository.core.HumanResourceRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class VehicleController implements Serializable { + + /** + * Find where status EQUALS TO status. + * + * @param office + * @param status + * @param hrOwnerId Human resource id from user logged. + * @return + */ + public List findEmployeesByType(Office office, HumanResourceStatus status, String hrOwnerId) { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_OFFICE, office)); + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, status)); + parameters.add(new ModelParameter(HumanResourceByOfficeCfg.HUMAN_RESOURCE, new HumanResource(hrOwnerId))); + + return genericEntityRepository.xmlQueryAPCEntities(HumanResource.class, HumanResourceCfg.QUERY_FIND_ALL_BY_STATUS, parameters); + } + + /** + * Find where status IN status. + * + * @param office + * @param statusLst + * @param hrOwnerId Human resource id from user logged. + * @return + */ + public List findEmployeesInType(Office office, List statusLst, String hrOwnerId) { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_OFFICE, office)); + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, statusLst)); + parameters.add(new ModelParameter(HumanResourceByOfficeCfg.HUMAN_RESOURCE, new HumanResource(hrOwnerId))); + + return genericEntityRepository.xmlQueryAPCEntities(HumanResource.class, HumanResourceCfg.QUERY_FIND_ALL_IN_STATUS, parameters); + } + + /** + * Save an entity. + * + * @param vehicle + * @return + */ + public boolean saveVehicle(Vehicle vehicle) { + logger.debug("saveVehicle"); + + boolean success = genericEntityRepository.insertAPCEntity(vehicle); + return success; + } + + /** + * + * @param hr + * @param updateAvatar + * @return + */ + public boolean updateByHumanResourceId(HumanResource hr, boolean updateAvatar) { + logger.debug("updateByHumanResourceId"); + + return humanResourceRepository.updateByHumanResourceId(hr, updateAvatar); + } + + /** + * + * @param status + * @param userIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateHRByStatus(HumanResourceStatus status, String userIdToUpdate, String lastUpdatedBy) { + logger.debug("updateHRByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, status)); + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_ID, userIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(HumanResourceCfg.UPDATE_HR_BY_STATUS, parameters); + } + + /** + * + * @param officeId + * @return + */ + public List findAllActiveBonus(String officeId) { + logger.debug("findAllActiveBonus"); + + List results = new ArrayList<>(); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(BonusCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(BonusCfg.FIELD_OFFICE, new Office(officeId))); + + List tuples = genericEntityRepository.xmlQueryAPCEntities( + Tuple.class, + BonusCfg.QUERY_FIND_ALL_ACTIVE_BONUS, + parameters); + + tuples.forEach((tuple) -> { + results.add(new Bonus(tuple.get("id").toString(), tuple.get("name").toString())); + }); + + } catch (Exception e) { + logger.error("findAllActiveBonus", e); + } + + return results; + } + + /** + * + * @param hrId + * @return + */ + public HumanResource findHumanResourceById(String hrId) { + logger.debug("findHumanResourceById"); + + return (HumanResource) genericEntityRepository.selectAPCEntityById(HumanResource.class, hrId); + } + + private static final long serialVersionUID = 2527037592427439763L; + final Logger logger = LogManager.getLogger(VehicleController.class); + + private final GenericEntityRepository genericEntityRepository; + private final HumanResourceRepository humanResourceRepository; + + public VehicleController() { + this.genericEntityRepository = new GenericEntityRepository(); + this.humanResourceRepository = new HumanResourceRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/catalog/LoanTypeController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/catalog/LoanTypeController.java new file mode 100644 index 0000000..367d222 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/catalog/LoanTypeController.java @@ -0,0 +1,85 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.catalog; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.constance.LoanTypeCfg; +import com.arrebol.apc.model.loan.LoanType; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class LoanTypeController implements Serializable{ + + /** + * + * Searching all loans type. + * + * @param officeId + * @return + */ + public List fillLoanTypeDatatable(String officeId) { + logger.debug("fillLoanTypeDatatable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanTypeCfg.FIELD_OFFICE, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(LoanType.class, LoanTypeCfg.QUERY_FIND_ALL_DATA_LOAN_TYPE_BY_OFFICE, parameters); + } + + /** + * + * @param loanType + * @return boolean + */ + public boolean saveLoanType(LoanType loanType) { + logger.debug("saveLoanTypeController"); + boolean success = genericEntityRepository.insertAPCEntity(loanType); + + return success; + } + + /** + * + * @param loanType + * @return boolean + */ + public boolean updateByLoanTypeId(LoanType loanType) { + logger.debug("updateByLoanTypeId"); + + return genericEntityRepository.updateAPCEntity(loanType); + } + + /** + * + * Searching loantype by id. + * + * @param loanTypeId + * @return + */ + public LoanType getLoanTypeById(String loanTypeId) { + logger.debug("getLoanTypeById"); + + return (LoanType) genericEntityRepository.selectAPCEntityById(LoanType.class, loanTypeId); + } + + final Logger logger = LogManager.getLogger(LoanTypeController.class); + private final GenericEntityRepository genericEntityRepository; + + public LoanTypeController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/catalog/RoleController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/catalog/RoleController.java new file mode 100644 index 0000000..8fb8774 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/catalog/RoleController.java @@ -0,0 +1,93 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.catalog; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.RoleCtlg; +import com.arrebol.apc.model.catalog.constance.RoleCfg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class RoleController implements Serializable{ + + /** + * + * Searching all roles. + * + * @return + */ + public List fillRolesDatatable() { + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(RoleCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + + return genericEntityRepository.xmlQueryAPCEntities(RoleCtlg.class, RoleCfg.QUERY_FIND_ALL_ROLES, parameters); + } + + /** + * + * @param role + * @return boolean + */ + public boolean saveRoles(RoleCtlg role) { + logger.debug("saveRolesController"); + boolean success = genericEntityRepository.insertAPCEntity(role); + + return success; + } + + /** + * + * @param role + * @return boolean + */ + public boolean updateByRoleId(RoleCtlg role) { + logger.debug("updateByRoleId"); + + return genericEntityRepository.updateAPCEntity(role); + } + + /** + * + * @param status + * @param roleIdToUpdate + * @return + */ + public boolean updateRoleByStatus(ActiveStatus status, String roleIdToUpdate, String lastUpdatedBy) { + logger.debug("updateRoleByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(RoleCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(RoleCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(RoleCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(RoleCfg.FIELD_ID, roleIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(RoleCfg.UPDATE_ROLE_BY_STATUS, parameters); + } + + + final Logger logger = LogManager.getLogger(RoleController.class); + private final GenericEntityRepository genericEntityRepository; + + public RoleController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/catalog/RouteController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/catalog/RouteController.java new file mode 100644 index 0000000..b9a7a04 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/catalog/RouteController.java @@ -0,0 +1,96 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.catalog; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.catalog.constance.RouteCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class RouteController implements Serializable { + + /** + * + * Searching all roles. + * + * @param officeId + * @return + */ + public List fillRoutesDatatable(String officeId) { + logger.debug("fillRoutesDatatable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(RouteCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(RouteCfg.FIELD_OFFICE, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(RouteCtlg.class, RouteCfg.QUERY_FIND_ALL_ROUTES, parameters); + } + + /** + * + * @param route + * @return boolean + */ + public boolean saveRoute(RouteCtlg route) { + logger.debug("saveRouteController"); + boolean success = genericEntityRepository.insertAPCEntity(route); + + return success; + } + + /** + * + * @param route + * @return boolean + */ + public boolean updateByRouteId(RouteCtlg route) { + logger.debug("updateByRouteId"); + + return genericEntityRepository.updateAPCEntity(route); + } + + /** + * + * @param status + * @param routeIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateRouteByStatus(ActiveStatus status, String routeIdToUpdate, String lastUpdatedBy) { + logger.debug("updateRouteByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(RouteCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(RouteCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(RouteCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(RouteCfg.FIELD_ID, routeIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(RouteCfg.UPDATE_ROUTE_BY_STATUS, parameters); + } + + private static final long serialVersionUID = -6277126340752974003L; + final Logger logger = LogManager.getLogger(RoleController.class); + private final GenericEntityRepository genericEntityRepository; + + public RouteController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/dashboard/CustomerWithoutRenovationViewService.java b/ace-controller/src/main/java/com/arrebol/apc/controller/dashboard/CustomerWithoutRenovationViewService.java new file mode 100644 index 0000000..6332a4f --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/dashboard/CustomerWithoutRenovationViewService.java @@ -0,0 +1,41 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.dashboard; + +import com.arrebol.apc.model.views.CustomerWithoutRenovationView; +import java.util.List; +import java.util.Map; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface CustomerWithoutRenovationViewService { + + /** + * + * @param officeId + * @param filterBy + * @param map + * @return + */ + public Long countAllCustomerWithOutRenovationByOfficePaginator(String officeId, String filterBy, Map map); + + /** + * + * @param officeId + * @param first + * @param pageSize + * @param filterBy + * @param sortBy + * @param sorting + * @param map + * @return + */ + public List findAllCustomerWithOutRenovationByOfficePaginator(String officeId, int first, int pageSize, String filterBy, String sortBy, String sorting, Map map); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/dashboard/CustomerWithoutRenovationViewServiceImpl.java b/ace-controller/src/main/java/com/arrebol/apc/controller/dashboard/CustomerWithoutRenovationViewServiceImpl.java new file mode 100644 index 0000000..1ecc584 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/dashboard/CustomerWithoutRenovationViewServiceImpl.java @@ -0,0 +1,154 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.dashboard; + +import com.arrebol.apc.controller.util.FilterMap; +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.views.CustomerWithoutRenovationView; +import java.util.List; +import java.util.Map; +import javax.enterprise.context.RequestScoped; +import javax.persistence.Query; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class CustomerWithoutRenovationViewServiceImpl implements CustomerWithoutRenovationViewService { + + @Override + public Long countAllCustomerWithOutRenovationByOfficePaginator(String officeId, String filterBy, Map map) { + logger.debug("countAllCustomerWithOutRenovationByOfficePaginator"); + + Long result = 0l; + Session session = null; + Transaction transaction = null; + try { + session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + StringBuilder sqlQuery = new StringBuilder("SELECT COUNT(id) FROM CustomerWithoutRenovationView "); + + sqlQuery.append(buildQueryForCustomerWithoutRenovationView(filterBy, map)); + + result = session + .createQuery(sqlQuery.toString(), Long.class) + .setParameter("office", new Office(officeId)) + .getSingleResult(); + + transaction.commit(); + } catch (HibernateException e) { + logger.error("countAllCustomerWithOutRenovationByOfficePaginator Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method countAllCustomerWithOutRenovationByOfficePaginator() ", e); + if (null != transaction) { + transaction.rollback(); + throw e; + } + } finally { + if (null != session) { + session.close(); + } + } + return result; + } + + @Override + public List findAllCustomerWithOutRenovationByOfficePaginator(String officeId, int first, int pageSize, String filterBy, String sortBy, String sorting, Map map) { + logger.debug("findAllCustomerWithOutRenovationByOfficePaginator"); + + List results = null; + Session session = null; + Transaction transaction = null; + try { + session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + StringBuilder sqlQuery = new StringBuilder("FROM CustomerWithoutRenovationView "); + + sqlQuery.append(buildQueryForCustomerWithoutRenovationView(filterBy, map)); + sqlQuery.append(" ORDER BY "); + + if (null == sortBy || "".equals(sortBy)) { + sqlQuery.append("personName ASC"); + } else { + sqlQuery.append(sortBy); + sqlQuery.append(" "); + sqlQuery.append(sorting); + } + + Query query = session.createQuery(sqlQuery.toString(), CustomerWithoutRenovationView.class); + + query.setFirstResult(first); + query.setMaxResults(pageSize); + + results = query.setParameter("office", new Office(officeId)).getResultList(); + + transaction.commit(); + } catch (HibernateException e) { + logger.error("findAllCustomerWithOutRenovationByOfficePaginator Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method findAllCustomerWithOutRenovationByOfficePaginator() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } finally { + if (null != session) { + session.close(); + } + } + return results; + } + + /** + * + * @param filterBy + * @param map + * @return + */ + private StringBuilder buildQueryForCustomerWithoutRenovationView( + String filterBy, Map map) { + StringBuilder sqlQuery = new StringBuilder("WHERE office = :office "); + + if (null != filterBy & !"".equals(filterBy)) { + sqlQuery.append("AND (personName LIKE '"); + sqlQuery.append(filterBy); + sqlQuery.append("' OR "); + + sqlQuery.append("routeName LIKE '"); + sqlQuery.append(filterBy); + sqlQuery.append("' OR "); + + sqlQuery.append("strPaymentDate LIKE '"); + sqlQuery.append(filterBy); + sqlQuery.append("') "); + } + + sqlQuery.append(FilterMap.genericFilterByMapping(map, true)); + + return sqlQuery; + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/dashboard/DashboardController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/dashboard/DashboardController.java new file mode 100644 index 0000000..b2a942b --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/dashboard/DashboardController.java @@ -0,0 +1,150 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.dashboard; + +import com.arrebol.apc.controller.util.FilterMap; +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.payroll.TotalExpectedPaymentDailyByUser; +import com.arrebol.apc.model.payroll.constance.TotalExpectedPaymentDailyByUserCfg; +import com.arrebol.apc.model.views.AdvanceUserDailyDetail; +import com.arrebol.apc.model.views.AdvanceUserDailyView; +import com.arrebol.apc.model.views.CustomerWithoutRenovationView; +import com.arrebol.apc.model.views.TotalLoansByOfficeView; +import com.arrebol.apc.model.views.constance.AdvanceUserDailyDetailViewCfg; +import com.arrebol.apc.model.views.constance.AdvanceUserDailyViewCfg; +import com.arrebol.apc.model.views.constance.CustomerWithoutRenovationViewCfg; +import com.arrebol.apc.model.views.constance.TotalLoansApprovedByOfficeViewCfg; +import com.arrebol.apc.model.views.constance.TotalLoansByOfficeViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import javax.persistence.Query; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class DashboardController implements Serializable { + + /** + * + * Searching loans by office. + * + * @param officeId + * @return + */ + public List fillAllLoansByOffice(String officeId) { + logger.debug("fillClosingDayDatatable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(TotalLoansByOfficeViewCfg.FIELD_VIEW_OFFICE, officeId)); + + return genericEntityRepository.xmlQueryAPCEntities(TotalLoansByOfficeView.class, TotalLoansByOfficeViewCfg.QUERY_FIND_ALL_LOANS_BY_OFFICE, parameters); + } + + /** + * + * Searching loans by office. + * + * @param officeId + * @return + */ + public BigDecimal sumLoansApprovedByOffice(String officeId) { + logger.debug("sumLoansApprovedByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(TotalLoansApprovedByOfficeViewCfg.FIELD_VIEW_OFFICE, officeId)); + + return (BigDecimal) genericEntityRepository.xmlQueryAPCEntityUniqueResult(BigDecimal.class, TotalLoansApprovedByOfficeViewCfg.QUERY_SUM_ALL_LOANS_BY_OFFICE, parameters); + } + + public Long getLoansSumPaymentDailyByUser(String userId) { + logger.debug("getLoansSumPaymentDailyByUser"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(TotalLoansByOfficeViewCfg.FIELD_VIEW_USER, userId)); + + return (Long) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Long.class, TotalLoansByOfficeViewCfg.QUERY_COUNT_ALL_LOANS_BY_USER, parameters); + } + + public BigDecimal getLoansSumPaymentDailyByUserMoney(String userId) { + logger.debug("getLoansSumPaymentDailyByUserMoney"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(TotalLoansByOfficeViewCfg.FIELD_VIEW_USER, userId)); + + return (BigDecimal) genericEntityRepository.xmlQueryAPCEntityUniqueResult(BigDecimal.class, TotalLoansByOfficeViewCfg.QUERY_FIND_ALL_LOANS_BY_USER, parameters); + } + + /** + * + * @param advance + * @return boolean + */ + public boolean saveTotalExpectedPaymentDailyByUser(TotalExpectedPaymentDailyByUser totalExpectedPaymentDailyByUser) { + logger.debug("saveTotalExpectedPaymentDailyByUser"); + boolean success = genericEntityRepository.insertAPCEntity(totalExpectedPaymentDailyByUser); + + return success; + + } + + public Long verifyTotalExpectedPaymentDailyByUserCreatedByOffice(String officeid) { + logger.debug("verifyTotalExpectedPaymentDailyByUserCreatedByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(TotalExpectedPaymentDailyByUserCfg.FIELD_OFFICE, new Office(officeid))); + + return (Long) genericEntityRepository.xmlQueryAPCEntityUniqueResult(Long.class, TotalExpectedPaymentDailyByUserCfg.QUERY_SELECT_MAX_DATE_BY_CURDATE, parameters); + } + + public List fillAllAdvanceUserDailyByOffice(String officeId) { + logger.debug("fillAllAdvanceUserDailyByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(AdvanceUserDailyViewCfg.FIELD_VIEW_OFFICE, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(AdvanceUserDailyView.class, AdvanceUserDailyViewCfg.QUERY_FIND_ALL_ADVANCE_USER_DAILY_BY_OFFICE, parameters); + } + + public List findAllCustomerWithOutRenovationByOffice(String officeId) { + logger.debug("findAllCustomerWithOutRenovationByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(CustomerWithoutRenovationViewCfg.FIELD_VIEW_OFFICE, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(CustomerWithoutRenovationView.class, CustomerWithoutRenovationViewCfg.QUERY_FIND_ALL_CUSTOMER_WITHOUT_RENOVATION_BY_OFFICE, parameters); + } + + public List findAllAdvancesUserDailyDetailByUser(String userId) { + logger.debug("findAllAdvancesUserDailyDetailByUser"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(AdvanceUserDailyDetailViewCfg.FIELD_VIEW_USER, userId)); + + return genericEntityRepository.xmlQueryAPCEntities(AdvanceUserDailyDetail.class, AdvanceUserDailyDetailViewCfg.QUERY_FIND_ALL_ADVANCE_USER_DAILY_DETAIL_BY_USER, parameters); + } + + final Logger logger = LogManager.getLogger(DashboardController.class); + private final GenericEntityRepository genericEntityRepository; + + public DashboardController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/drive/DriverController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/drive/DriverController.java new file mode 100644 index 0000000..aecbea7 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/drive/DriverController.java @@ -0,0 +1,1434 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.drive; + +import com.arrebol.apc.controller.util.ConnectionManager; +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.views.CobranzaLastWeekByUserView; +import com.arrebol.apc.model.views.CobranzaWeekByUserView; +import com.arrebol.apc.model.views.ColocationLastWeekByUserView; +import com.arrebol.apc.model.views.ColocationWeekByUserView; +import com.arrebol.apc.model.views.InformationLoanLastWeekView; +import com.arrebol.apc.model.views.InformationLoanWeekView; +import com.arrebol.apc.model.views.ResumeNewCustomerLastWeekView; +import com.arrebol.apc.model.views.ResumeNewCustomerWeekView; +import com.arrebol.apc.model.views.ResumenInOutLastWeekByUserView; +import com.arrebol.apc.model.views.ResumenInOutWeekByUserView; +import com.arrebol.apc.model.views.ResumenTotalLastWeekView; +import com.arrebol.apc.model.views.ResumenTotalWeekView; +import com.arrebol.apc.model.views.SubtotalLastWeekByUserView; +import com.arrebol.apc.model.views.SubtotalWeekByUserView; +import com.arrebol.apc.model.views.constance.InformationLoanWeekViewCfg; +import com.arrebol.apc.model.views.constance.ResumenNewCustomerLastWeekViewCfg; +import com.arrebol.apc.model.views.constance.ResumenNewCustomerWeekViewCfg; +import com.arrebol.apc.model.views.constance.ResumenTotalLastWeekViewCfg; +import com.arrebol.apc.model.views.constance.ResumenTotalWeekViewCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class DriverController extends ConnectionManager implements Serializable{ + + /** + * + * Searching all loans with activity at this week by office. + * + * @param officeId + * @return + */ + public List getAllLoanThisWeekByOffice(String officeId) { + logger.debug("getAllLoanThisWeekByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(InformationLoanWeekViewCfg.FIELD_VIEW_OFFICE, officeId)); + + return genericEntityRepository.xmlQueryAPCEntities(InformationLoanWeekView.class, InformationLoanWeekViewCfg.QUERY_FIND_ALL_LOANS_THIS_WEEK_BY_OFFICE, parameters); + } + + public List getAllLoanLastWeekByOffice(String officeId) { + logger.debug("getAllLoanLastWeekByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(InformationLoanWeekViewCfg.FIELD_VIEW_OFFICE, officeId)); + + return genericEntityRepository.xmlQueryAPCEntities(InformationLoanLastWeekView.class, InformationLoanWeekViewCfg.QUERY_FIND_ALL_LOANS_LAST_WEEK_BY_OFFICE, parameters); + } + + public List getAllColocationWeekByOffice(String officeId) { + logger.debug("getAllColocationWeekByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(InformationLoanWeekViewCfg.FIELD_VIEW_OFFICE_COLOCATION, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(ColocationWeekByUserView.class, InformationLoanWeekViewCfg.QUERY_FIND_ALL_COLOCATION_WEEK_BY_OFFICE, parameters); + } + + public List getAllColocationLastWeekByOffice(String officeId) { + logger.debug("getAllColocationLastWeekByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(InformationLoanWeekViewCfg.FIELD_VIEW_OFFICE_COLOCATION, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(ColocationLastWeekByUserView.class, InformationLoanWeekViewCfg.QUERY_FIND_ALL_COLOCATION_LAST_WEEK_BY_OFFICE, parameters); + } + + public List getAllSubtotalLastWeekByOffice(String officeId) { + logger.debug("getAllSubtotalLastWeekByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(InformationLoanWeekViewCfg.FIELD_VIEW_OFFICE_COLOCATION, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(SubtotalLastWeekByUserView.class, InformationLoanWeekViewCfg.QUERY_FIND_ALL_SUBTOTAL_LAST_WEEK_BY_OFFICE, parameters); + } + + public List getAllSubtotalThisWeekByOffice(String officeId) { + logger.debug("getAllSubtotalThisWeekByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(InformationLoanWeekViewCfg.FIELD_VIEW_OFFICE_COLOCATION, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(SubtotalWeekByUserView.class, InformationLoanWeekViewCfg.QUERY_FIND_ALL_SUBTOTAL_WEEK_BY_OFFICE, parameters); + } + + public List getAllResumenInOutThisWeekByOffice(String officeId) { + logger.debug("getAllResumenInOutThisWeekByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(InformationLoanWeekViewCfg.FIELD_VIEW_OFFICE_COLOCATION, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(ResumenInOutWeekByUserView.class, InformationLoanWeekViewCfg.QUERY_FIND_ALL_RESUMEN_IN_OUT_WEEK_BY_OFFICE, parameters); + } + + public List getAllResumenInOutLastWeekByOffice(String officeId) { + logger.debug("getAllResumenInOutLastWeekByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(InformationLoanWeekViewCfg.FIELD_VIEW_OFFICE_COLOCATION, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(ResumenInOutLastWeekByUserView.class, InformationLoanWeekViewCfg.QUERY_FIND_ALL_RESUMEN_IN_OUT_LAST_WEEK_BY_OFFICE, parameters); + } + + public List getAllCobranzaLastWeekByOffice(String officeId) { + logger.debug("getAllCobranzaLastWeekByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(InformationLoanWeekViewCfg.FIELD_VIEW_OFFICE_COLOCATION, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(CobranzaLastWeekByUserView.class, InformationLoanWeekViewCfg.QUERY_FIND_ALL_COBRANZA_LAST_WEEK_BY_OFFICE, parameters); + } + + public List getAllCobranzaThisWeekByOffice(String officeId) { + logger.debug("getAllCobranzaThisWeekByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(InformationLoanWeekViewCfg.FIELD_VIEW_OFFICE_COLOCATION, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(CobranzaWeekByUserView.class, InformationLoanWeekViewCfg.QUERY_FIND_ALL_COBRANZA_WEEK_BY_OFFICE, parameters); + } + + public List getAllResumenTotalLastWeekByOffice(String officeId) { + logger.debug("getAllResumenTotalLastWeekByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ResumenTotalLastWeekViewCfg.FIELD_VIEW_OFFICE, officeId)); + + return genericEntityRepository.xmlQueryAPCEntities(ResumenTotalLastWeekView.class, ResumenTotalLastWeekViewCfg.QUERY_FIND_ALL_RESUMEN_TOTAL, parameters); + } + + public List getAllResumenNewCustomerLastWeekByOffice() { + logger.debug("getAllResumenNewCustomerLastWeekByOffice"); + List parameters = new ArrayList<>(); + + return genericEntityRepository.xmlQueryAPCEntities(ResumeNewCustomerLastWeekView.class, ResumenNewCustomerLastWeekViewCfg.QUERY_FIND_ALL_RESUMEN_NEW_CUSTOMER, parameters); + } + + public List getAllResumenNewCustomerWeekByOffice() { + logger.debug("getAllResumenNewCustomerWeekByOffice"); + List parameters = new ArrayList<>(); + + return genericEntityRepository.xmlQueryAPCEntities(ResumeNewCustomerWeekView.class, ResumenNewCustomerWeekViewCfg.QUERY_FIND_ALL_RESUMEN_NEW_CUSTOMER, parameters); + } + + public List getAllResumenTotalWeekByOffice(String officeId) { + logger.debug("getAllResumenTotalWeekByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(ResumenTotalWeekViewCfg.FIELD_VIEW_OFFICE, officeId)); + + return genericEntityRepository.xmlQueryAPCEntities(ResumenTotalWeekView.class, ResumenTotalWeekViewCfg.QUERY_FIND_ALL_RESUMEN_TOTAL, parameters); + } + + /** + * + * Searching all loans with activity at this week by office. + * @param startDate + * @param officeId + * @return + */ + public List getAllLoanWeekByOfficeMySQLQuery(String startDate, String idOffice) { + logger.debug("getAllLoanWeekByOfficeMySQLQuery"); + logger.debug("Fecha inicial: " + startDate); + + List dataList = new ArrayList<>(); + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); + + List rows = session.createNativeQuery(queryLoanWeek) + .setParameter("startDate", startDate) + .setParameter("idOffice", idOffice) + .getResultList(); + + transaction.commit(); + + rows.forEach((row) -> { + Object[] results = (Object[]) row; + + // Create Data Row + InformationLoanWeekView loanWeek = new InformationLoanWeekView( ); + loanWeek.setId(results[0] == null ? "" : results[0].toString()); + loanWeek.setIdUser(results[1] == null ? "" : results[1].toString()); + loanWeek.setIdOffice(results[2] == null ? "" : results[2].toString()); + try { + loanWeek.setFecha(DATE_FORMAT.parse(results[3].toString())); + } catch (ParseException ex) { + logger.error("driver week", ex); + } + loanWeek.setApoyos(new BigDecimal(results[4] == null ? "0.0" : results[4].toString())); + loanWeek.setApoyosTotal(new BigDecimal(results[5] == null ? "0.0" : results[5].toString())); + loanWeek.setComisionApertura(new BigDecimal(results[6] == null ? "0.0" : results[6].toString())); + loanWeek.setAval(results[7] == null ? "" : results[7].toString()); + loanWeek.setCustomer(results[8] == null ? "" : results[8].toString()); + loanWeek.setDocumentoPor(new BigDecimal(results[9] == null ? "0.0" : results[9].toString())); + loanWeek.setAbonoDiario(new BigDecimal(results[10] == null ? "0.0" : results[10].toString())); + loanWeek.setAmountPaid(new BigDecimal(results[11] == null ? "0.0" : results[11].toString())); + loanWeek.setSaldoInsoluto(new BigDecimal(results[12] == null ? "0.0" : results[12].toString())); + loanWeek.setRouteName(results[13] == null ? "" : results[13].toString()); + loanWeek.setAsesor(results[14] == null ? "" : results[14].toString()); + loanWeek.setNumFee(Integer.parseInt(results[15] == null ? "0" : results[15].toString())); + loanWeek.setPaymentMonday(new BigDecimal(results[16] == null ? "0.0" : results[16].toString())); + loanWeek.setFeeMonday(new BigDecimal(results[17] == null ? "0.0" : results[17].toString())); + loanWeek.setPaymentTuesday(new BigDecimal(results[18] == null ? "0.0" : results[18].toString())); + loanWeek.setFeeTuesday(new BigDecimal(results[19] == null ? "0.0" : results[19].toString())); + loanWeek.setPaymentWednesday(new BigDecimal(results[20] == null ? "0.0" : results[20].toString())); + loanWeek.setFeeWednesday(new BigDecimal(results[21] == null ? "0.0" : results[21].toString())); + loanWeek.setPaymentThursday(new BigDecimal(results[22] == null ? "0.0" : results[22].toString())); + loanWeek.setFeeThursday(new BigDecimal(results[23] == null ? "0.0" : results[23].toString())); + loanWeek.setPaymentFriday(new BigDecimal(results[24] == null ? "0.0" : results[24].toString())); + loanWeek.setFeeFriday(new BigDecimal(results[25] == null ? "0.0" : results[25].toString())); + loanWeek.setPaymentSaturday(new BigDecimal(results[26] == null ? "0.0" : results[26].toString())); + loanWeek.setFeeSaturday(new BigDecimal(results[27] == null ? "0.0" : results[27].toString())); + loanWeek.setFaltante(new BigDecimal(results[28] == null ? "0.0" : results[28].toString())); + loanWeek.setNewCustomer(results[29] == null ? "" : results[29].toString()); + loanWeek.setRenovation(results[30] == null ? "" : results[30].toString()); + loanWeek.setEstatusPrestamo(results[31] == null ? "" : results[31].toString()); + loanWeek.setNumPagosAll(new BigDecimal(results[32] == null ? "0.0" : results[32].toString())); + loanWeek.setNumPagosWeek(new BigDecimal(results[33] == null ? "0.0" : results[33].toString())); + loanWeek.setFeeTodos(new BigDecimal(results[34] == null ? "0.0" : results[34].toString())); + loanWeek.setLoanTypeName(results[35] == null ? "" : results[35].toString()); + if (results[36] == null) { + loanWeek.setFrozen(ActiveStatus.DISABLED); + } else { + if (results[36].equals(ActiveStatus.ENEBLED.getValue())) { + loanWeek.setFrozen(ActiveStatus.ENEBLED); + } else { + loanWeek.setFrozen(ActiveStatus.DISABLED); + } + } + loanWeek.setTotalPaid(new BigDecimal(results[37].toString())); + loanWeek.setNumPagosLoanType(new BigDecimal(results[38] == null ? "0.0" : results[38].toString())); + loanWeek.setMovimientosMonday(results[39] == null ? "" : results[39].toString()); + loanWeek.setMovimientosTuesday(results[40] == null ? "" : results[40].toString()); + loanWeek.setMovimientosWednesday(results[41] == null ? "" : results[41].toString()); + loanWeek.setMovimientosThursday(results[42] == null ? "" : results[42].toString()); + loanWeek.setMovimientosFriday(results[43] == null ? "" : results[43].toString()); + loanWeek.setMovimientosSaturday(results[44] == null ? "" : results[44].toString()); + loanWeek.setRenovationMonday(results[45] == null ? "" : results[45].toString()); + loanWeek.setRenovationTuesday(results[46] == null ? "" : results[46].toString()); + loanWeek.setRenovationWednesday(results[47] == null ? "" : results[47].toString()); + loanWeek.setRenovationThursday(results[48] == null ? "" : results[48].toString()); + loanWeek.setRenovationFriday(results[49] == null ? "" : results[49].toString()); + loanWeek.setRenovationSaturday(results[50] == null ? "" : results[50].toString()); + loanWeek.setReactivation(results[51] == null ? "" : results[51].toString()); + loanWeek.setWeekOfCreation(results[52] == null ? "" : results[52].toString()); + dataList.add(loanWeek); + }); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method getAllLoanWeekByOfficeMySQLQuery(" + startDate + " " + ") ", e); + rollback(transaction); + } + + return dataList; + } + + /** + * + * Searching all loans with activity at this week by office. + * @param startDate + * @param officeId + * @return + */ + public List getAllColocationWeekByOfficeMySQLQuery(String startDate, String idOffice){ + logger.debug("getAllColocationWeekByOfficeMySQLQuery"); + + List dataList = new ArrayList<>(); + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + List rows = session.createNativeQuery(queryColocation) + .setParameter("startDate", startDate) + .setParameter("idOffice", idOffice) + .getResultList(); + + transaction.commit(); + + rows.forEach((row) -> { + Object[] results = (Object[]) row; + + // Create Data Row + ColocationWeekByUserView colocation = new ColocationWeekByUserView( ); + colocation.setId(results[0] == null ? "" : results[0].toString()); + colocation.setUserName(results[1] == null ? "" : results[1].toString()); + colocation.setOffice(new Office(idOffice)); + colocation.setColocationMonday(new BigDecimal(results[3] == null ? "0.0" : results[3].toString())); + colocation.setColocationTuesday(new BigDecimal(results[4] == null ? "0.0" : results[4].toString())); + colocation.setColocationWednesday(new BigDecimal(results[5] == null ? "0.0" : results[5].toString())); + colocation.setColocationThursday(new BigDecimal(results[6] == null ? "0.0" : results[6].toString())); + colocation.setColocationFriday(new BigDecimal(results[7] == null ? "0.0" : results[7].toString())); + colocation.setColocationSaturday(new BigDecimal(results[8] == null ? "0.0" : results[8].toString())); + colocation.setColocationTotal(new BigDecimal(results[9] == null ? "0.0" : results[9].toString())); + + dataList.add(colocation); + }); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method getAllColocationWeekByOfficeMySQLQuery(" + idOffice + " " + ") ", e); + rollback(transaction); + } + + return dataList; + } + + /** + * + * Searching all loans with activity at this week by office. + * @param startDate + * @param officeId + * @return + */ + public List getAllSubtotalThisWeekByOfficeMySQLQuery(String startDate, String idOffice) { + logger.debug("getAllSubtotalThisWeekByOfficeMySQLQuery"); + + List dataList = new ArrayList<>(); + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + List rows = session.createNativeQuery(querySubtotal) + .setParameter("startDate", startDate) + .setParameter("idOffice", idOffice) + .getResultList(); + + transaction.commit(); + + rows.forEach((row) -> { + Object[] results = (Object[]) row; + + // Create Data Row + SubtotalWeekByUserView subtotal = new SubtotalWeekByUserView( ); + subtotal.setId(results[0] == null ? "" : results[0].toString()); + subtotal.setUserName(results[1] == null ? "" : results[1].toString()); + subtotal.setOffice(new Office(idOffice)); + subtotal.setSubtotalMonday(new BigDecimal(results[3] == null ? "0.0" : results[3].toString())); + subtotal.setOpeningFeeMonday(new BigDecimal(results[4] == null ? "0.0" : results[4].toString())); + subtotal.setSubtotalTuesday(new BigDecimal(results[5] == null ? "0.0" : results[5].toString())); + subtotal.setOpeningFeeTuesday(new BigDecimal(results[6] == null ? "0.0" : results[6].toString())); + subtotal.setSubtotalWednesday(new BigDecimal(results[7] == null ? "0.0" : results[7].toString())); + subtotal.setOpeningFeeWednesday(new BigDecimal(results[8] == null ? "0.0" : results[8].toString())); + subtotal.setSubtotalThursday(new BigDecimal(results[9] == null ? "0.0" : results[9].toString())); + subtotal.setOpeningFeeThursday(new BigDecimal(results[10] == null ? "0.0" : results[10].toString())); + subtotal.setSubtotalFriday(new BigDecimal(results[11] == null ? "0.0" : results[11].toString())); + subtotal.setOpeningFeeFriday(new BigDecimal(results[12] == null ? "0.0" : results[12].toString())); + subtotal.setSubtotalSaturday(new BigDecimal(results[13] == null ? "0.0" : results[13].toString())); + subtotal.setOpeningFeeSaturday(new BigDecimal(results[14] == null ? "0.0" : results[14].toString())); + subtotal.setSubtotalTotal(new BigDecimal(results[15] == null ? "0.0" : results[15].toString())); + + dataList.add(subtotal); + }); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method getAllSubtotalThisWeekByOfficeMySQLQuery(" + idOffice + " " + ") ", e); + rollback(transaction); + } + + return dataList; + } + + /** + * + * Searching all loans with activity at this week by office. + * @param startDate + * @param officeId + * @return + */ + public List getAllResumenInOutThisWeekByOfficeMySQLQuery(String startDate, String idOffice) { + logger.debug("getAllResumenInOutThisWeekByOffice"); + + List dataList = new ArrayList<>(); + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + List rows = session.createNativeQuery(queryResumenInOut) + .setParameter("startDate", startDate) + .setParameter("idOffice", idOffice) + .getResultList(); + + transaction.commit(); + + rows.forEach((row) -> { + Object[] results = (Object[]) row; + + // Create Data Row + ResumenInOutWeekByUserView resumen = new ResumenInOutWeekByUserView( ); + resumen.setId(results[0] == null ? "" : results[0].toString()); + resumen.setUserName(results[1] == null ? "" : results[1].toString()); + resumen.setOffice(new Office(idOffice)); + resumen.setClosingMonday(new BigDecimal(results[3] == null ? "0.0" : results[3].toString())); + resumen.setExpenseMonday(new BigDecimal(results[4] == null ? "0.0" : results[4].toString())); + resumen.setMoneyDailyTodayMonday(new BigDecimal(results[5] == null ? "0.0" : results[5].toString())); + resumen.setClosingTuesday(new BigDecimal(results[6] == null ? "0.0" : results[6].toString())); + resumen.setExpenseTuesday(new BigDecimal(results[7] == null ? "0.0" : results[7].toString())); + resumen.setMoneyDailyTodayTuesday(new BigDecimal(results[8] == null ? "0.0" : results[8].toString())); + resumen.setClosingWednesday(new BigDecimal(results[9] == null ? "0.0" : results[9].toString())); + resumen.setExpenseWednesday(new BigDecimal(results[10] == null ? "0.0" : results[10].toString())); + resumen.setMoneyDailyTodayWednesday(new BigDecimal(results[11] == null ? "0.0" : results[11].toString())); + resumen.setClosingThursday(new BigDecimal(results[12] == null ? "0.0" : results[12].toString())); + resumen.setExpenseThursday(new BigDecimal(results[13] == null ? "0.0" : results[13].toString())); + resumen.setMoneyDailyTodayThursday(new BigDecimal(results[14] == null ? "0.0" : results[14].toString())); + resumen.setClosingFriday(new BigDecimal(results[15] == null ? "0.0" : results[15].toString())); + resumen.setExpenseFriday(new BigDecimal(results[16] == null ? "0.0" : results[16].toString())); + resumen.setMoneyDailyTodayFriday(new BigDecimal(results[17] == null ? "0.0" : results[17].toString())); + resumen.setClosingSaturday(new BigDecimal(results[18] == null ? "0.0" : results[18].toString())); + resumen.setExpenseSaturday(new BigDecimal(results[19] == null ? "0.0" : results[19].toString())); + resumen.setMoneyDailyTodaySaturday(new BigDecimal(results[20] == null ? "0.0" : results[20].toString())); + + dataList.add(resumen); + }); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method getAllResumenInOutThisWeekByOffice(" + idOffice + " " + ") ", e); + rollback(transaction); + } + + return dataList; + } + + /** + * Searching all loans with activity at this week by office. + * @param startDate + * @param officeId + * @return + */ + public List getAllCobranzaThisWeekByOfficeMySQLQuery(String startDate, String idOffice) { + logger.debug("getAllCobranzaThisWeekByOfficeMySQLQuery"); + + List dataList = new ArrayList<>(); + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + List rows = session.createNativeQuery(queryCobranza) + .setParameter("startDate", startDate) + .setParameter("idOffice", idOffice) + .getResultList(); + + transaction.commit(); + + rows.forEach((row) -> { + Object[] results = (Object[]) row; + + // Create Data Row + CobranzaWeekByUserView cobranza = new CobranzaWeekByUserView( ); + cobranza.setId(results[0] == null ? "" : results[0].toString()); + cobranza.setUserName(results[1] == null ? "" : results[1].toString()); + cobranza.setOffice(new Office(idOffice)); + cobranza.setCobranzaMonday(new BigDecimal(results[3] == null ? "0.0" : results[3].toString())); + cobranza.setCobranzaTuesday(new BigDecimal(results[4] == null ? "0.0" : results[4].toString())); + cobranza.setCobranzaWednesday(new BigDecimal(results[5] == null ? "0.0" : results[5].toString())); + cobranza.setCobranzaThursday(new BigDecimal(results[6] == null ? "0.0" : results[6].toString())); + cobranza.setCobranzaFriday(new BigDecimal(results[7] == null ? "0.0" : results[7].toString())); + cobranza.setCobranzaSaturday(new BigDecimal(results[8] == null ? "0.0" : results[8].toString())); + cobranza.setCobranzaTotal(new BigDecimal(results[9] == null ? "0.0" : results[9].toString())); + + dataList.add(cobranza); + }); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method getAllCobranzaThisWeekByOfficeMySQLQuery(" + idOffice + " " + ") ", e); + rollback(transaction); + } + + return dataList; + } + /** + * Searching all loans with activity at this week by office. + * @param startDate + * @param officeId + * @return + */ + public List getAllResumenTotalWeekByOfficeMySQLQuery(String startDate, String idOffice) { + logger.debug("getAllResumenTotalWeekByOfficeMySQLQuery"); + + List dataList = new ArrayList<>(); + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + List rows = session.createNativeQuery(queryResumenTotal) + .setParameter("startDate", startDate) + .setParameter("idOffice", idOffice) + .getResultList(); + + transaction.commit(); + + rows.forEach((row) -> { + Object[] results = (Object[]) row; + + // Create Data Row + ResumenTotalWeekView resumenTotal = new ResumenTotalWeekView( ); + resumenTotal.setId(results[0] == null ? "" : results[0].toString()); + resumenTotal.setOfficeName(results[1] == null ? "" : results[1].toString()); + resumenTotal.setClosingDayTotal(new BigDecimal(results[2] == null ? "0.0" : results[3].toString())); + resumenTotal.setMoneyDailyTodayTotal(new BigDecimal(results[3] == null ? "0.0" : results[3].toString())); + resumenTotal.setSubtotalTotal(new BigDecimal(results[4] == null ? "0.0" : results[4].toString())); + resumenTotal.setOpeningFeeTotal(new BigDecimal(results[5] == null ? "0.0" : results[5].toString())); + resumenTotal.setCobranzaToday(new BigDecimal(results[6] == null ? "0.0" : results[6].toString())); + resumenTotal.setColocationTotal(new BigDecimal(results[7] == null ? "0.0" : results[7].toString())); + resumenTotal.setNominaTotal(new BigDecimal(results[8] == null ? "0.0" : results[8].toString())); + resumenTotal.setAdelantosTotal(new BigDecimal(results[9] == null ? "0.0" : results[9].toString())); + resumenTotal.setEntradasTotal(new BigDecimal(results[10] == null ? "0.0" : results[10].toString())); + resumenTotal.setGastosAdmonTotal(new BigDecimal(results[11] == null ? "0.0" : results[11].toString())); + + dataList.add(resumenTotal); + }); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method getAllResumenTotalWeekByOfficeMySQLQuery(" + idOffice + " " + ") ", e); + rollback(transaction); + } + + return dataList; + } + + final Logger logger = LogManager.getLogger(DriverController.class); + private final GenericEntityRepository genericEntityRepository; + + public DriverController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + + private final String queryLoanWeek = +"SELECT " + +" l.id, " + +" u.id as id_user, " + +" r.id_office, " + +" l.created_on as fecha, " + +" lt.payment as apoyos, " + +" lt.payment_total as apoyos_total, " + +" lt.opening_fee as comision_apertura, " + +" CONCAT(endor.first_name,' ', IF(ISNULL(endor.second_name) ,'', CONCAT(endor.second_name,' ')) ,endor.last_name, ' ', endor.middle_name) AS aval, " + +" CONCAT(cus.first_name,' ', IF(ISNULL(cus.second_name) ,'', CONCAT(cus.second_name,' ')) ,cus.last_name, ' ', cus.middle_name) AS customer, " + +" l.amount_to_pay as documento_por, " + +" lt.payment_daily as abono_diario, " + +" l.amount_paid, " + +" (l.amount_to_pay - l.amount_paid) saldo_insoluto, " + +" r.route_name, " + +" CONCAT(hr.first_name,' ', IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name,' ')) ,hr.last_name, ' ', hr.middle_name) AS asesor, " + +" (SELECT COUNT(lfn.id) FROM APC_LOAN_FEE_NOTIFICATION lfn WHERE lfn.id_loan = l.id) as num_fee, " + +//"-- Lunes " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes \n" + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_monday, " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) " + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_monday, " + +//"-- Martes " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_tuesday, " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) " + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_tuesday, " + +//"-- Miercoles " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_wednesday, " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_wednesday, " + +//"-- Jueves " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_thursday, " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) " + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_thursday, " + +//"-- Viernes " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_friday, " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_friday, " + +//"-- Sabado " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_saturday, " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_saturday, " + +//"-- Faltante " + +" ((lt.payment_daily * (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5 , COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante " + +" WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(DATE(ldFaltante.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') " + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) " + +" - (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(DATE(ldLunes.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) as faltante, " + +//"-- new_customer " + +" CASE WHEN l.new_customer = 'ENEBLED' AND WEEK(DATE(l.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) THEN 'Si' ELSE 'No' END as new_customer, " + +//"-- renovation " + +" if((SELECT COUNT(id_loan_old) FROM APC_LOAN_BY_RENOVATION lbr " + +" INNER JOIN APC_LOAN lRenovation ON lbr.id_loan_new = lRenovation.id " + +" WHERE id_loan_old = l.id " + +" AND loan_by_renovation_status = 'APPROVED' and WEEK(DATE(lRenovation.created_on),1) <= WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(DATE(lRenovation.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d'))) = 0 , 'No' , 'Si') as renovation, " + +//" -- estatus_prestamo " + +" l.loan_status as estatus_prestamo, " + +//"-- num_pagos_all " + +" (SELECT COUNT(DISTINCT(DATE(ldFaltante.created_on))) FROM APC_LOAN_DETAIL ldFaltante " + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday') " + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_all, " + +//"-- num_pagos_week " + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 6, 6, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante " + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday') " + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_week, " + +//"-- fee_todos " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_todos, " + +" lt.loan_type_name AS loan_type_name, " + +" l.frozen AS frozen, "+ + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan= l.id AND ldLunes.created_on <=(DATE_ADD(DATE_ADD(:startDate, INTERVAL -WEEKDAY(:startDate)-1 DAY), INTERVAL 7 DAY)) " + +" AND ldLunes.loan_details_type IN ('PAYMENT','TRANSFER','RENOVATION_PAYMENT')) AS totalPaid, " + +" lt.total_days AS numPagosLoanType, " + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'monday' \n" + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')) as movimiento_monday, \n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'tuesday' \n" + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')) as movimiento_tuesday, \n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'wednesday' \n" + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')) as movimiento_wendsday, \n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'thursday' \n" + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')) as movimiento_thursday,\n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'friday' \n" + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')) as movimiento_friday,\n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'saturday' \n" + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')) as movimiento_saturday,\n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'monday' \n" + +" AND ldFaltante.loan_details_type IN ('RENOVATION_PAYMENT')) as renovation_monday, \n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'tuesday' \n" + +" AND ldFaltante.loan_details_type IN ('RENOVATION_PAYMENT')) as renovation_tuesday, \n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'wednesday' \n" + +" AND ldFaltante.loan_details_type IN ('RENOVATION_PAYMENT')) as renovation_wendsday, \n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'thursday' \n" + +" AND ldFaltante.loan_details_type IN ('RENOVATION_PAYMENT')) as renovation_thursday,\n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'friday' \n" + +" AND ldFaltante.loan_details_type IN ('RENOVATION_PAYMENT')) as renovation_friday,\n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'saturday' \n" + +" AND ldFaltante.loan_details_type IN ('RENOVATION_PAYMENT')) as renovation_saturday, "+ + + "IF((SELECT count(ln.id_customer) FROM apo_pro_com_april_ten.APC_LOAN ln WHERE ln.id_customer=l.id_customer and \n" + +" NOT (SELECT COUNT(id_loan_new) from APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id) > 0) = 0 , 'No' , 'Si') as reactivation, " + + + "if((Select count(lsemana.id) from APC_LOAN lsemana where lsemana.id= l.id and \n" + +" lsemana.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) \n" + +" and lsemana.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)))>0,'Si','No') as weekOfCreation " + + +"FROM APC_LOAN l " + +"INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id " + +"INNER JOIN APC_PEOPLE cus ON cus.id = l.id_customer " + +"INNER JOIN APC_PEOPLE endor ON endor.id = l.id_endorsement " + +"INNER JOIN APC_ROUTE r ON r.id = l.id_route AND r.id_office = :idOffice " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"INNER JOIN APC_USER u ON u.id = lbu.id_user " + +"INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource " + +"WHERE " + +"l.loan_status not in ('DELETED','REJECTED') AND " + +"((SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) AND ld.id_loan = l.id) > 0 ) " + +"UNION " + +"SELECT " + +" l.id, " + +" u.id as id_user, " + +" r.id_office, " + +" l.created_on as fecha, " + +" lt.payment as apoyos, " + +" lt.payment_total as apoyos_total, " + +" lt.opening_fee as comision_apertura, " + +" CONCAT(endor.first_name,' ', IF(ISNULL(endor.second_name) ,'', CONCAT(endor.second_name,' ')) ,endor.last_name, ' ', endor.middle_name) AS aval, " + +" CONCAT(cus.first_name,' ', IF(ISNULL(cus.second_name) ,'', CONCAT(cus.second_name,' ')) ,cus.last_name, ' ', cus.middle_name) AS customer, " + +" l.amount_to_pay as documento_por, " + +" lt.payment_daily as abono_diario, " + +" l.amount_paid, " + +" (l.amount_to_pay - l.amount_paid) saldo_insoluto, " + +" r.route_name, " + +" CONCAT(hr.first_name,' ', IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name,' ')) ,hr.last_name, ' ', hr.middle_name) AS asesor, " + +" (SELECT COUNT(lfn.id) FROM APC_LOAN_FEE_NOTIFICATION lfn WHERE lfn.id_loan = l.id) as num_fee, " + +//"-- Lunes " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes \n" + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_monday, " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) " + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_monday, " + +//"-- Martes " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_tuesday, " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) " + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_tuesday, " + +//"-- Miercoles " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_wednesday, " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_wednesday, " + +//"-- Jueves " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_thursday, " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) " + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_thursday, " + +//"-- Viernes " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_friday, " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_friday, " + +//"-- Sabado " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_saturday, " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldLunes.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day))" + +" AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_saturday, " + +//"-- Faltante " + +" ((lt.payment_daily * (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5 , COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante " + +" WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(DATE(ldFaltante.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') " + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) " + +" - (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(DATE(ldLunes.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) as faltante, " + +//"-- new_customer " + +" CASE WHEN l.new_customer = 'ENEBLED' AND WEEK(DATE(l.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) THEN 'Si' ELSE 'No' END as new_customer, " + +//"-- renovation " + +" if((SELECT COUNT(id_loan_old) FROM APC_LOAN_BY_RENOVATION lbr " + +" INNER JOIN APC_LOAN lRenovation ON lbr.id_loan_new = lRenovation.id " + +" WHERE id_loan_old = l.id " + +" AND loan_by_renovation_status = 'APPROVED' and WEEK(DATE(lRenovation.created_on),1) <= WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(DATE(lRenovation.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d'))) = 0 , 'No' , 'Si') as renovation, " + +//" -- estatus_prestamo " + +" l.loan_status as estatus_prestamo, " + +//"-- num_pagos_all " + +" (SELECT COUNT(DISTINCT(DATE(ldFaltante.created_on))) FROM APC_LOAN_DETAIL ldFaltante " + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday') " + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_all, " + +//"-- num_pagos_week " + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 6, 6, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante " + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday') " + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_week, " + +//"-- fee_todos " + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan = l.id AND ldLunes.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) " + +" AND ldLunes.loan_details_type IN ('FEE')) as fee_todos, " + +" lt.loan_type_name AS loan_type_name, " + +" l.frozen AS frozen, "+ + +" (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) " + +" FROM APC_LOAN_DETAIL ldLunes " + +" WHERE ldLunes.id_loan= l.id AND ldLunes.created_on <=(DATE_ADD(DATE_ADD(:startDate, INTERVAL -WEEKDAY(:startDate)-1 DAY), INTERVAL 7 DAY)) " + +" AND ldLunes.loan_details_type IN ('PAYMENT','TRANSFER','RENOVATION_PAYMENT')) AS totalPaid, " + +" lt.total_days AS numPagosLoanType, " + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'monday' \n" + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')) as movimiento_monday, \n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'tuesday' \n" + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')) as movimiento_tuesday, \n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'wednesday' \n" + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')) as movimiento_wendsday, \n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'thursday' \n" + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')) as movimiento_thursday,\n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'friday' \n" + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')) as movimiento_friday,\n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'saturday' \n" + +" AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')) as movimiento_saturday,\n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'monday' \n" + +" AND ldFaltante.loan_details_type IN ('RENOVATION_PAYMENT')) as renovation_monday, \n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'tuesday' \n" + +" AND ldFaltante.loan_details_type IN ('RENOVATION_PAYMENT')) as renovation_tuesday, \n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'wednesday' \n" + +" AND ldFaltante.loan_details_type IN ('RENOVATION_PAYMENT')) as renovation_wendsday, \n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'thursday' \n" + +" AND ldFaltante.loan_details_type IN ('RENOVATION_PAYMENT')) as renovation_thursday,\n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'friday' \n" + +" AND ldFaltante.loan_details_type IN ('RENOVATION_PAYMENT')) as renovation_friday,\n" + + +" (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) >= 1, 'Si','No') FROM APC_LOAN_DETAIL ldFaltante \n" + +" WHERE ldFaltante.id_loan = l.id AND ldFaltante.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) and ldFaltante.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('sunday')\n" + +" AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) = 'saturday' \n" + +" AND ldFaltante.loan_details_type IN ('RENOVATION_PAYMENT')) as renovation_saturday, "+ + + "IF((SELECT count(ln.id_customer) FROM apo_pro_com_april_ten.APC_LOAN ln WHERE ln.id_customer=l.id_customer and \n" + +" NOT (SELECT COUNT(id_loan_new) from APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id) > 0) = 0 , 'No' , 'Si') as reactivation, " + + "if((Select count(lsemana.id) from APC_LOAN lsemana where lsemana.id= l.id and \n" + +" lsemana.created_on <=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 7 day)) \n" + +" and lsemana.created_on >=(date_add(date_add(:startDate, interval -WEEKDAY(:startDate)-1 day), interval 1 day)))>0,'Si','No') as weekOfCreation"+ +" from APC_LOAN l\n" + +"INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id \n" + +"INNER JOIN APC_PEOPLE cus ON cus.id = l.id_customer \n" + +"INNER JOIN APC_PEOPLE endor ON endor.id = l.id_endorsement \n" + +"INNER JOIN APC_ROUTE r ON r.id = l.id_route AND r.id_office = \"caef3a64-7d1f-11ea-af3e-28f659da398e\"\n" + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id \n" + +"INNER JOIN APC_USER u ON u.id = lbu.id_user \n" + +"INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource \n" + +"where WEEK(DATE(l.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND \n" + +" YEAR(DATE(l.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) and l.loan_status='APPROVED'\n" + +"ORDER BY fecha;"; + + private final String queryColocation = +"SELECT " + +"u.id, " + +"CONCAT(hr.first_name, ' ' , hr.last_name) as username, " + +"ubo.id_office, " + +"(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND al.created_by = u.id " + +" AND WEEK(DATE(al.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND LOWER(DAYNAME(DATE(al.created_on))) = 'monday') " + +" as colocation_monday, " + +"(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND al.created_by = u.id " + +" AND WEEK(DATE(al.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND LOWER(DAYNAME(DATE(al.created_on))) = 'tuesday') " + +" as colocation_tuesday, " + +"(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND al.created_by = u.id " + +" AND WEEK(DATE(al.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND LOWER(DAYNAME(DATE(al.created_on))) = 'wednesday') " + +" as colocation_wednesday, " + +"(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND al.created_by = u.id " + +" AND WEEK(DATE(al.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND LOWER(DAYNAME(DATE(al.created_on))) = 'thursday') " + +" as colocation_thursday, " + +"(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND al.created_by = u.id " + +" AND WEEK(DATE(al.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND LOWER(DAYNAME(DATE(al.created_on))) = 'friday') " + +" as colocation_friday, " + +"(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND al.created_by = u.id " + +" AND WEEK(DATE(al.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND LOWER(DAYNAME(DATE(al.created_on))) = 'saturday') " + +" as colocation_saturday, " + +"(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND al.created_by = u.id " + +" AND WEEK(DATE(al.created_on),1) = WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d'))) " + +" as colocation_total " + +"FROM APC_USER u " + +"INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource AND hr.human_resource_status = 'ENEBLED' " + +"INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id AND ubo.id_office = :idOffice " + +"WHERE u.user_status = 'ENEBLED' AND " + +"u.user_type IN ('MOBILE','BOTH');"; + + private final String queryCobranza = +"SELECT " + +"u.id, " + +"CONCAT(hr.first_name, ' ' , hr.last_name) as username, " + +"ubo.id_office, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' AND ld.id_user = u.id " + +"AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday' " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_monday, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id " + +"AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday' " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_tuesday, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id " + +"AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday' " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_wednesday, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id " + +"AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday' " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_thursday, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id " + +"AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday' " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_friday, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id " + +"AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday' " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_saturday, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id " + +"AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_total " + +"FROM APC_USER u " + +"INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource AND hr.human_resource_status = 'ENEBLED' " + +"INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id AND ubo.id_office = :idOffice " + +"WHERE u.user_status = 'ENEBLED' AND " + +"u.user_type IN ('MOBILE','BOTH') AND " + +"u.certifier = 'DISABLED';"; + + private final String querySubtotal = +"SELECT " + +"u.id, " + +"CONCAT(hr.first_name, ' ' , hr.last_name) as username, " + +"ubo.id_office, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday' " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_monday, " + +"(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND albu.id_user = u.id " + +" AND WEEK(DATE(al.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND LOWER(DAYNAME(DATE(al.created_on))) = 'monday') " + +" as opening_fee_monday, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday' " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_tuesday, " + +"(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND albu.id_user = u.id " + +" AND WEEK(DATE(al.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND LOWER(DAYNAME(DATE(al.created_on))) = 'tuesday') " + +" as opening_fee_tuesday, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday' " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_wednesday, " + +"(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND albu.id_user = u.id " + +" AND WEEK(DATE(al.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND LOWER(DAYNAME(DATE(al.created_on))) = 'wednesday') " + +" as opening_fee_wednesday, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday' " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_thursday, " + +"(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND albu.id_user = u.id " + +" AND WEEK(DATE(al.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND LOWER(DAYNAME(DATE(al.created_on))) = 'thursday') " + +" as opening_fee_thursday, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday' " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_friday, " + +"(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND albu.id_user = u.id " + +" AND WEEK(DATE(al.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND LOWER(DAYNAME(DATE(al.created_on))) = 'friday') " + +" as opening_fee_friday, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday' " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_saturday, " + +"(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND albu.id_user = u.id " + +" AND WEEK(DATE(al.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +" AND LOWER(DAYNAME(DATE(al.created_on))) = 'saturday') " + +" as opening_fee_saturday, " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_total, " + +"(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' AND albu.id_user = u.id " + +" AND WEEK(DATE(al.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) ) " + +" as opening_fee_total " + +"FROM APC_USER u " + +"INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource AND hr.human_resource_status = 'ENEBLED' " + +"INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id AND ubo.id_office = :idOffice " + +"WHERE u.user_status = 'ENEBLED' AND " + +"u.user_type IN ('MOBILE','BOTH') AND " + +"u.certifier = 'DISABLED';"; + + private final String queryResumenInOut = +"SELECT " + +"u.id, " + +"CONCAT(hr.first_name, ' ' , hr.last_name) as username, " + +"ubo.id_office, " + +//"-- Lunes " + +"(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) " + +"FROM APC_CLOSING_DAY ld " + +"WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday') as closing_monday, " + +"(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) " + +"FROM APC_OTHER_EXPENSE oe " + +"WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(oe.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(oe.created_on))) = 'monday') as expense_monday, " + +"(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) " + +"FROM APC_MONEY_DAILY md " + +"WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(md.money_daily_date)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'monday') as money_daily_today_monday, " + +//"-- Martes " + +"(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) " + +"FROM APC_CLOSING_DAY ld " + +"WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday') as closing_tuesday, " + +"(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) " + +"FROM APC_OTHER_EXPENSE oe " + +"WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(oe.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(oe.created_on))) = 'tuesday') as expense_tuesday, " + +"(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) " + +"FROM APC_MONEY_DAILY md " + +"WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(md.money_daily_date)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'tuesday') as money_daily_today_tuesday, " + +//"-- Miercoles " + +"(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) " + +"FROM APC_CLOSING_DAY ld " + +"WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday') as closing_wednesday, " + +"(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) " + +"FROM APC_OTHER_EXPENSE oe " + +"WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(oe.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(oe.created_on))) = 'wednesday') as expense_wednesday, " + +"(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) " + +"FROM APC_MONEY_DAILY md " + +"WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(md.money_daily_date)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'wednesday') as money_daily_today_wednesday, " + +//"-- Jueves " + +"(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) " + +"FROM APC_CLOSING_DAY ld " + +"WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday') as closing_thursday, " + +"(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) " + +"FROM APC_OTHER_EXPENSE oe " + +"WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(oe.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(oe.created_on))) = 'thursday') as expense_thursday, " + +"(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) " + +"FROM APC_MONEY_DAILY md " + +"WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(md.money_daily_date)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'thursday') as money_daily_today_thursday, " + +//"-- Viernes " + +"(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) " + +"FROM APC_CLOSING_DAY ld " + +"WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday') as closing_friday, " + +"(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) " + +"FROM APC_OTHER_EXPENSE oe " + +"WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(oe.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(oe.created_on))) = 'friday') as expense_friday, " + +"(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) " + +"FROM APC_MONEY_DAILY md " + +"WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(md.money_daily_date)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'friday') as money_daily_today_friday, " + +//"-- Sabado " + +"(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) " + +"FROM APC_CLOSING_DAY ld " + +"WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday') as closing_saturday, " + +"(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) " + +"FROM APC_OTHER_EXPENSE oe " + +"WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(oe.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(oe.created_on))) = 'saturday') as expense_saturday, " + +"(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) " + +"FROM APC_MONEY_DAILY md " + +"WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(md.money_daily_date)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'saturday') as money_daily_today_saturday " + +"FROM APC_USER u " + +"INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource AND hr.human_resource_status = 'ENEBLED' " + +"INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id AND ubo.id_office = :idOffice " + +"WHERE u.user_status = 'ENEBLED' AND " + +"u.user_type IN ('MOBILE','BOTH');"; + + private final String queryResumenTotal = +"SELECT " + +"u.id, " + +"u.office_name, " + +//"-- Cortes " + +"(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) " + +"FROM APC_CLOSING_DAY ld " + +"WHERE WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) AND ld.active_status = 'ENEBLED' " + +"AND ld.id_office = u.id) as closing__day_total, " + +//"-- Inicios " + +"(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) " + +"FROM APC_MONEY_DAILY md " + +"WHERE WEEK(DATE(md.money_daily_date),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(md.money_daily_date)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) AND md.id_office = u.id) as money_daily_today_total, " + +//"-- Subtotal " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_total, " + +//"-- comision por apertura " + +"(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' " + +" AND WEEK(DATE(al.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d'))) " + +" as opening_fee_total, " + +//"-- cobranza " + +"(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) " + +"FROM APC_LOAN_DETAIL ld " + +"INNER JOIN APC_LOAN l ON l.id = ld.id_loan " + +"INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id " + +"WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' " + +"AND WEEK(DATE(ld.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +"YEAR(DATE(ld.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) " + +"AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_today, " + +//"-- colocacion " + +"(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al " + +" INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id " + +" INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id " + +" WHERE loan_status = 'APPROVED' " + +" AND WEEK(DATE(al.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +" YEAR(Date(al.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d')) ) " + +" as colocation_total, " + +//"-- nominas " + +"(SELECT IF(ISNULL(SUM(ap.total_payment)),0,SUM(ap.total_payment)) FROM APC_PAYROLL ap " + +"WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' " + +"AND WEEK(DATE(ap.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +" YEAR(Date(ap.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d'))) as nomina_total, " + +//"-- adelantos " + +"(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_ADVANCE ap " + +"WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' " + +"AND WEEK(DATE(ap.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +" YEAR(Date(ap.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d'))) as adelantos_total, " + +//"-- entradas " + +"(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap " + +"WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND " + +"ap.expense_company_type = 'PAYMENT_IN' " + +"AND WEEK(DATE(ap.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +" YEAR(Date(ap.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d'))) as entradas_total, " + +//"-- gastos admon " + +"(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap " + +"WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND " + +"ap.expense_company_type = 'PAYMENT_OUT' " + +"AND WEEK(DATE(ap.created_on),1) = (WEEK(STR_TO_DATE(:startDate, '%Y-%m-%d'),1)) AND " + +" YEAR(Date(ap.created_on)) = YEAR(STR_TO_DATE(:startDate, '%Y-%m-%d'))) as gastos_admon_total " + +"FROM APC_OFFICE u " + +"WHERE u.office_status = 'ENEBLED' AND u.id = :idOffice ;"; +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/drive/FaltanteInDatesController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/drive/FaltanteInDatesController.java new file mode 100644 index 0000000..6522289 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/drive/FaltanteInDatesController.java @@ -0,0 +1,222 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.drive; + +import com.arrebol.apc.controller.util.ConnectionManager; +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.views.FaltanteInDates; +//import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.math.BigDecimal; +//import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; + + +/** + * + * @author Donadony + */ +public class FaltanteInDatesController extends ConnectionManager implements Serializable { + + + public List getAllLoanWeekMySQLQuery(String startDate,String endDate) { + logger.debug("getAllLoanWeekByOfficeMySQLQuery"); + logger.debug("Fecha inicial: " + startDate); + + List dataList = new ArrayList<>(); + Transaction transaction = null; + + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + //SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); + + List rows = session.createNativeQuery(queryLoan) + .setParameter("startDate", startDate) + .setParameter("endDate",endDate) + .getResultList(); + + transaction.commit(); + + rows.forEach((row) -> { + Object[] results = (Object[]) row; + + // Create Data Row + FaltanteInDates loanWeek = new FaltanteInDates( ); + loanWeek.setId(results[0] == null ? "" : results[0].toString()); + loanWeek.setIdUser(results[1] == null ? "" : results[1].toString()); + loanWeek.setUserName(results[2] == null ? "" : results[2].toString()); + loanWeek.setCustomerName(results[3] == null ? "" : results[3].toString()); + loanWeek.setRouteName(results[4] == null ? "" : results[4].toString()); + loanWeek.setAmountPaid(new BigDecimal(results[5] == null ? "0.0" : results[5].toString())); + loanWeek.setAmountToPay(new BigDecimal(results[6] == null ? "0.0" : results[6].toString())); + loanWeek.setAmountToPayNoFee(new BigDecimal(results[7] == null ? "0.0" : results[7].toString())); + loanWeek.setPaymentDaily(new BigDecimal(results[8] == null ? "0.0" : results[8].toString())); + loanWeek.setExpectedPayment(new BigDecimal(results[9] == null ? "0.0" : results[9].toString())); + loanWeek.setAmountPaidDetails(new BigDecimal(results[10] == null ? "0.0" : results[10].toString())); + loanWeek.setFee(new BigDecimal(results[11] == null ? "0.0" : results[11].toString())); + loanWeek.setFeeNumber(results[12] == null ? 0 : (Long) results[12]); + loanWeek.setNumPagosAll(results[13] == null ? 0 :(Long) results[13]); + + + dataList.add(loanWeek); + }); + + } catch (HibernateException e) { + logger.error("Driver", e); + rollback(transaction); + } catch (Exception e) { + logger.error("Method getAllLoanWeekByOfficeMySQLQuery(" + startDate + " " + ") ", e); + rollback(transaction); + } + + return dataList; + } + + final Logger logger = LogManager.getLogger(DriverController.class); + /*private final GenericEntityRepository genericEntityRepository; + + public FaltanteInDatesController() { + this.genericEntityRepository = new GenericEntityRepository(); + }*/ + + + private final String queryLoan = +"SELECT " + +" al.id," + +" ald.id_user," + +" CONCAT((CASE" + +" WHEN" + +" ((hr.first_name IS NOT NULL)" + +" AND (hr.first_name <> ''))" + +" THEN" + +" CONCAT(SUBSTR(UPPER(hr.first_name), 1, 1)," + +" SUBSTR(LOWER(hr.first_name), 2)," + +" ' ')" + +" ELSE ''" + +" END)," + +" (CASE" + +" WHEN" + +" ((hr.second_name IS NOT NULL)" + +" AND (hr.second_name <> ''))" + +" THEN" + +" CONCAT(SUBSTR(UPPER(hr.second_name), 1, 1)," + +" SUBSTR(LOWER(hr.second_name), 2)," + +" ' ')" + +" ELSE ''" + +" END)," + +" (CASE" + +" WHEN" + +" ((hr.last_name IS NOT NULL)" + +" AND (hr.last_name <> ''))" + +" THEN" + +" CONCAT(SUBSTR(UPPER(hr.last_name), 1, 1)," + +" SUBSTR(LOWER(hr.last_name), 2))" + +" ELSE ''" + +" END)) AS user_name," + +" CONCAT((CASE" + +" WHEN" + +" ((cstmr.first_name IS NOT NULL)" + +" AND (cstmr.first_name <> ''))" + +" THEN" + +" CONCAT(SUBSTR(UPPER(cstmr.first_name)," + +" 1," + +" 1)," + +" SUBSTR(LOWER(cstmr.first_name), 2)," + +" ' ')" + +" ELSE ''" + +" END)," + +" (CASE" + +" WHEN" + +" ((cstmr.second_name IS NOT NULL)" + +" AND (cstmr.second_name <> ''))" + +" THEN\n" + +" CONCAT(SUBSTR(UPPER(cstmr.second_name)," + +" 1," + +" 1)," + +" SUBSTR(LOWER(cstmr.second_name), 2)," + +" ' ')" + +" ELSE ''" + +" END)," + +" (CASE" + +" WHEN" + +" ((cstmr.last_name IS NOT NULL)" + +" AND (cstmr.last_name <> ''))" + +" THEN" + +" CONCAT(SUBSTR(UPPER(cstmr.last_name), 1, 1)," + +" SUBSTR(LOWER(cstmr.last_name), 2))" + +" ELSE ''" + +" END)) AS customer_name," + +" ar.route_name," + +" al.amount_paid," + +" al.amount_to_pay, " + +" al.amount_to_pay-(SELECT " + +" IF((SUM(ldLunes.payment_amount) IS NULL)," + +" 0," + +" SUM(ldLunes.payment_amount))" + +" FROM" + +" APC_LOAN_DETAIL ldLunes" + +" WHERE" + +" ((ldLunes.id_loan = al.id)" + +" AND (ldLunes.loan_details_type = 'FEE'))) AS amount_to_pay_no_fee," + +" alt.payment_daily," + +" (SELECT " + +" COUNT(DISTINCT CAST(ldfaltante.created_on AS DATE))" + +" FROM\n" + +" APC_LOAN_DETAIL ldfaltante" + +" WHERE" + +" ((ldfaltante.id_loan = ald.id_loan)" + +" AND ldfaltante.id_user = ald.id_user" + +" AND (LOWER(DAYNAME(CAST(ldfaltante.created_on AS DATE))) <> 'sunday')" + +" AND date(ldfaltante.created_on) >= :startDate and date(ldfaltante.created_on) <= :endDate" + +" AND (ldfaltante.loan_details_type = 'PAYMENT')))*alt.payment_daily as expected_payment," + +" sum(ald.payment_amount) as amount_paid_details, " + +" (SELECT " + +" IF((SUM(ldLunes.payment_amount) IS NULL)," + +" 0," + +" SUM(ldLunes.payment_amount))" + +" FROM" + +" APC_LOAN_DETAIL ldLunes" + +" WHERE" + +" ((ldLunes.id_loan = al.id)" + +" AND (ldLunes.loan_details_type = 'FEE'))) AS fee," + +" (SELECT " + +" count(ldLunes.created_on)" + +" FROM" + +" APC_LOAN_DETAIL ldLunes" + +" WHERE\n" + +" ((ldLunes.id_loan = al.id)" + +" AND (ldLunes.loan_details_type = 'FEE'))) AS fee_number," + +" (SELECT " + +" COUNT(DISTINCT CAST(ldfaltante.created_on AS DATE))" + +" FROM\n" + +" APC_LOAN_DETAIL ldfaltante" + +" WHERE" + +" ((ldfaltante.id_loan = ald.id_loan)" + +" AND ldfaltante.id_user = ald.id_user" + +" AND (LOWER(DAYNAME(CAST(ldfaltante.created_on AS DATE))) <> 'sunday')" + +" AND date(ldfaltante.created_on) >= :startDate and date(ldfaltante.created_on) <= :endDate" + +" AND (ldfaltante.loan_details_type IN ('PAYMENT','TRANSFER')))) AS num_pagos_all," + +" al.created_on " + +"FROM APC_LOAN_DETAIL ald" + +"JOIN APC_LOAN al ON al.id = ald.id_loan" + +"JOIN APC_USER au ON au.id = ald.id_user" + +"JOIN APC_ROUTE ar on al.id_route = ar.id" + +"JOIN APC_LOAN_BY_USER lub ON lub.id_loan = al.id" + +"JOIN APC_LOAN_TYPE alt on alt.id = al.id_loan_type" + +"JOIN APC_PEOPLE cstmr ON ((al.id_customer = cstmr.id))" + +"JOIN APC_USER u ON ((ald.id_user = u.id))" + +"JOIN APC_HUMAN_RESOURCE hr ON ((hr.id = u.id_human_resource))" + +"WHERE al.loan_status= 'APPROVED' AND ald.loan_details_type in('PAYMENT','TRANSFER') and date(ald.created_on) >= :startDate and date(ald.created_on) <= :endDate" + +" AND lub.id_user <> 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6'" + +"group by ald.id_loan,ald.id_user"; +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/login/LoginController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/login/LoginController.java new file mode 100644 index 0000000..ffdce78 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/login/LoginController.java @@ -0,0 +1,56 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.login; + +import com.arrebol.apc.repository.core.OfficeRepository; +import com.arrebol.apc.repository.core.UserByOfficeRepository; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.UserByOffice; +import java.io.Serializable; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoginController implements Serializable { + + public List getAllActiveOfficeController() { + logger.debug("getAllActiveOfficeController"); + + return getOfficeRepository().getAllActiveOffice(); + + } + + public UserByOffice findUserLoggedController(UserByOffice userByOffice) { + logger.debug("findUserLoggedController"); + return getUserByOfficeRepository().findUserLogged(userByOffice); + } + + private static final long serialVersionUID = 6949757021314889125L; + final Logger logger = LogManager.getLogger(LoginController.class); + + private final OfficeRepository officeRepository; + private final UserByOfficeRepository userByOfficeRepository; + + public LoginController() { + this.officeRepository = new OfficeRepository(); + this.userByOfficeRepository = new UserByOfficeRepository(); + } + + public OfficeRepository getOfficeRepository() { + return officeRepository; + } + + public UserByOfficeRepository getUserByOfficeRepository() { + return userByOfficeRepository; + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/login/LoginService.java b/ace-controller/src/main/java/com/arrebol/apc/controller/login/LoginService.java new file mode 100644 index 0000000..7eb7cb6 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/login/LoginService.java @@ -0,0 +1,32 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.login; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.UserByOffice; +import java.util.List; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoginService { + + /** + * + * @return + */ + public List getAllActiveOfficeController(); + + /** + * + * @param userByOffice + * @return + */ + public UserByOffice findUserLoggedController(UserByOffice userByOffice); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/login/LoginServiceImpl.java b/ace-controller/src/main/java/com/arrebol/apc/controller/login/LoginServiceImpl.java new file mode 100644 index 0000000..669cf87 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/login/LoginServiceImpl.java @@ -0,0 +1,47 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.login; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.repository.core.OfficeRepository; +import com.arrebol.apc.repository.core.UserByOfficeRepository; +import java.util.List; +import javax.enterprise.context.RequestScoped; +import javax.inject.Inject; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class LoginServiceImpl implements LoginService { + + @Override + public List getAllActiveOfficeController() { + logger.debug("getAllActiveOfficeController"); + + return officeRepository.getAllActiveOffice(); + + } + + @Override + public UserByOffice findUserLoggedController(UserByOffice userByOffice) { + logger.debug("findUserLoggedController"); + return userByOfficeRepository.findUserLogged(userByOffice); + } + + final Logger logger = LogManager.getLogger(getClass()); + + @Inject + private OfficeRepository officeRepository; + @Inject + private UserByOfficeRepository userByOfficeRepository; +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/system/employee/EmployeeController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/system/employee/EmployeeController.java new file mode 100644 index 0000000..3cf3fda --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/system/employee/EmployeeController.java @@ -0,0 +1,177 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.system.employee; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.Bonus; +import com.arrebol.apc.model.admin.constance.BonusCfg; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.HumanResourceByOffice; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.constance.HumanResourceByOfficeCfg; +import com.arrebol.apc.model.core.constance.HumanResourceCfg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.HumanResourceStatus; +import com.arrebol.apc.repository.GenericEntityRepository; +import com.arrebol.apc.repository.core.HumanResourceRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class EmployeeController implements Serializable { + + /** + * Find where status EQUALS TO status. + * + * @param office + * @param status + * @param hrOwnerId Human resource id from user logged. + * @return + */ + public List findEmployeesByType(Office office, HumanResourceStatus status, String hrOwnerId) { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_OFFICE, office)); + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, status)); + parameters.add(new ModelParameter(HumanResourceByOfficeCfg.HUMAN_RESOURCE, new HumanResource(hrOwnerId))); + + return genericEntityRepository.xmlQueryAPCEntities(HumanResource.class, HumanResourceCfg.QUERY_FIND_ALL_BY_STATUS, parameters); + } + + /** + * Find where status IN status. + * + * @param office + * @param statusLst + * @param hrOwnerId Human resource id from user logged. + * @return + */ + public List findEmployeesInType(Office office, List statusLst, String hrOwnerId) { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_OFFICE, office)); + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, statusLst)); + parameters.add(new ModelParameter(HumanResourceByOfficeCfg.HUMAN_RESOURCE, new HumanResource(hrOwnerId))); + + return genericEntityRepository.xmlQueryAPCEntities(HumanResource.class, HumanResourceCfg.QUERY_FIND_ALL_IN_STATUS, parameters); + } + + /** + * Save an entity. + * + * @param humanResourceByOffice + * @param humanResource + * @return + */ + public boolean saveHRController(HumanResourceByOffice humanResourceByOffice, HumanResource humanResource) { + logger.debug("saveHRController"); + + boolean success = genericEntityRepository.insertAPCEntity(humanResource); + + if (success) { + humanResourceByOffice.setHumanResource(new HumanResource(humanResource.getId())); + success = genericEntityRepository.insertAPCEntity(humanResourceByOffice); + } + + return success; + } + + /** + * + * @param hr + * @param updateAvatar + * @return + */ + public boolean updateByHumanResourceId(HumanResource hr, boolean updateAvatar) { + logger.debug("updateByHumanResourceId"); + + return humanResourceRepository.updateByHumanResourceId(hr, updateAvatar); + } + + /** + * + * @param status + * @param userIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updateHRByStatus(HumanResourceStatus status, String userIdToUpdate, String lastUpdatedBy) { + logger.debug("updateHRByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, status)); + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_ID, userIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(HumanResourceCfg.UPDATE_HR_BY_STATUS, parameters); + } + + /** + * + * @param officeId + * @return + */ + public List findAllActiveBonus(String officeId) { + logger.debug("findAllActiveBonus"); + + List results = new ArrayList<>(); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(BonusCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(BonusCfg.FIELD_OFFICE, new Office(officeId))); + + List tuples = genericEntityRepository.xmlQueryAPCEntities( + Tuple.class, + BonusCfg.QUERY_FIND_ALL_ACTIVE_BONUS, + parameters); + + tuples.forEach((tuple) -> { + results.add(new Bonus(tuple.get("id").toString(), tuple.get("name").toString())); + }); + + } catch (Exception e) { + logger.error("findAllActiveBonus", e); + } + + return results; + } + + /** + * + * @param hrId + * @return + */ + public HumanResource findHumanResourceById(String hrId) { + logger.debug("findHumanResourceById"); + + return (HumanResource) genericEntityRepository.selectAPCEntityById(HumanResource.class, hrId); + } + + private static final long serialVersionUID = 2527037592427439763L; + final Logger logger = LogManager.getLogger(EmployeeController.class); + + private final GenericEntityRepository genericEntityRepository; + private final HumanResourceRepository humanResourceRepository; + + public EmployeeController() { + this.genericEntityRepository = new GenericEntityRepository(); + this.humanResourceRepository = new HumanResourceRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/system/office/OfficeController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/system/office/OfficeController.java new file mode 100644 index 0000000..a2e15e4 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/system/office/OfficeController.java @@ -0,0 +1,91 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.system.office; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.constance.OfficeCfg; +import com.arrebol.apc.model.enums.OfficeStatus; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class OfficeController implements Serializable{ + + /** + * + * Searching all roles. + * + * @return + */ + public List fillOfficeDatatable() { + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(OfficeCfg.FIELD_OFFICE_STATUS, OfficeStatus.ENEBLED)); + + return genericEntityRepository.xmlQueryAPCEntities(Office.class, OfficeCfg.QUERY_FIND_ALL_OFFICES_ACTIVES, parameters); + } + + /** + * + * @param office + * @return boolean + */ + public boolean saveOffice(Office office) { + logger.debug("saveOffice"); + boolean success = genericEntityRepository.insertAPCEntity(office); + + return success; + } + + /** + * + * @param office + * @return boolean + */ + public boolean updateByOfficeId(Office office) { + logger.debug("updateByOfficeId"); + + return genericEntityRepository.updateAPCEntity(office); + } + + /** + * + * @param status + * @param officeIdToUpdate + * @return + */ + public boolean updateOfficeByStatus(OfficeStatus status, String officeIdToUpdate, String lastUpdatedBy) { + logger.debug("updateOfficeByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(OfficeCfg.FIELD_OFFICE_STATUS, status)); + parameters.add(new ModelParameter(OfficeCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(OfficeCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(OfficeCfg.FIELD_ID, officeIdToUpdate)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(OfficeCfg.UPDATE_OFFICES_BY_ID, parameters); + } + + final Logger logger = LogManager.getLogger(OfficeController.class); + private final GenericEntityRepository genericEntityRepository; + + public OfficeController() { + this.genericEntityRepository = new GenericEntityRepository(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserAccessController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserAccessController.java new file mode 100644 index 0000000..39461c5 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserAccessController.java @@ -0,0 +1,185 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.system.user; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.Permission; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.model.core.UserByOfficeHasPermission; +import com.arrebol.apc.model.core.UserByOfficeHasPermissionId; +import com.arrebol.apc.model.core.constance.PermissionCfg; +import com.arrebol.apc.model.core.constance.UserByOfficeHasPermissionCfg; +import com.arrebol.apc.model.enums.UserStatus; +import com.arrebol.apc.repository.GenericEntityRepository; +import com.arrebol.apc.repository.core.PermissionRepository; +import com.arrebol.apc.repository.core.UserByOfficeRepository; +import com.arrebol.apc.repository.core.UserRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserAccessController implements Serializable { + + public List findUsersInOfficeInStatuses(List statuses, String officeId, String ownerId) { + logger.debug("findUsersInOfficeInStatuses"); + List retults = new ArrayList(); + try { + retults = getUserByOfficeRepository() + .findUsersInOfficeInStatuses(statuses, new Office(officeId), ownerId); + } catch (Exception e) { + logger.error("findUsersInOfficeInStatuses", e); + } + + return retults; + } + + /** + * + * @param userByOffice + * @param missing + * @return + */ + public List loadUserByOfficePermissionLst(UserByOffice userByOffice, boolean missing) { + logger.debug("loadUserByOfficePermissionLst"); + String query = PermissionCfg.QUERY_FIND_PERMISSION_THAT_USER_HAS_ASSIGNED; + + if (missing) { + query = PermissionCfg.QUERY_FIND_MISSING_PERMISSION_UBO; + } + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserByOfficeHasPermissionCfg.FIELD_USER_BY_OFFICE, userByOffice)); + + return getGenericEntityRepository().xmlQueryAPCEntities(Permission.class, query, parameters); + } + + /** + * + * @param permissions + * @param createdBy + * @param userByOfficeId Used to look all old permissions that need to be + * delete before to insert new permission list. + * @return + */ + public boolean updatePermissionsController(List permissions, String userByOfficeId, String createdBy) { + logger.debug("updatePermissionsController"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserByOfficeHasPermissionCfg.FIELD_USER_BY_OFFICE, new UserByOffice(userByOfficeId))); + + boolean success = getGenericEntityRepository().xmlUpdateOrDeleteAPCEntity(UserByOfficeHasPermissionCfg.XML_QUERY_DELETE_PERMISSION_BY_USER_ID_AND_OFFICE_ID, parameters); + + if (success) { + success = getGenericEntityRepository().insertManyAPCEntity(buildUniquePermissionList(permissions, userByOfficeId, createdBy)); + } + + return success; + } + + /** + * + * @return + */ + public List findAllEnebledPermissions() { + logger.debug("findAllEnebledPermissions"); + return getPermissionRepository().findAllEnebledPermissions(); + } + + /** + * + * @param entities + * @return + */ + private List buildUniquePermissionList(List permissions, String userByOfficeId, String createdBy) { + logger.info("buildUniquePermissionList"); + + List allNewPermissions = new ArrayList<>(); + + try { + Set uniquePermission = new HashSet<>(); + + List appMenuLst = findAllEnebledPermissions(); + + permissions.forEach((permission) -> { + if (!uniquePermission.contains(permission)) { + uniquePermission.add(permission); + } + + Optional optional = appMenuLst.stream() + .filter((appMenu) -> appMenu.getPermission().equals(permission.getParentName())) + .findAny(); + + if (optional.isPresent()) { + if (!uniquePermission.contains(optional.get())) { + uniquePermission.add(optional.get()); + } + } + }); + + uniquePermission.forEach((unique) -> { + allNewPermissions.add( + new UserByOfficeHasPermission( + new UserByOfficeHasPermissionId( + userByOfficeId, + unique.getId() + ), + createdBy + ) + ); + }); + } catch (Exception e) { + logger.error("buildUniquePermissionList", e); + throw e; + } + + return allNewPermissions; + } + + private static final long serialVersionUID = -4994341295468752327L; + final Logger logger = LogManager.getLogger(UserAccessController.class); + + private final GenericEntityRepository genericEntityRepository; + private final UserRepository userRepository; + private final UserByOfficeRepository userByOfficeRepository; + private final PermissionRepository permissionRepository; + + public UserAccessController() { + this.genericEntityRepository = new GenericEntityRepository(); + this.userRepository = new UserRepository(); + this.userByOfficeRepository = new UserByOfficeRepository(); + this.permissionRepository = new PermissionRepository(); + } + + public GenericEntityRepository getGenericEntityRepository() { + return genericEntityRepository; + } + + public UserRepository getUserRepository() { + return userRepository; + } + + public UserByOfficeRepository getUserByOfficeRepository() { + return userByOfficeRepository; + } + + public PermissionRepository getPermissionRepository() { + return permissionRepository; + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserAdminController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserAdminController.java new file mode 100644 index 0000000..eb30113 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserAdminController.java @@ -0,0 +1,111 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.system.user; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.catalog.constance.RouteCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.UserStatus; +import com.arrebol.apc.repository.GenericEntityRepository; +import com.arrebol.apc.repository.core.UserByOfficeRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserAdminController implements Serializable { + + /** + * + * @param statuses + * @param officeId + * @param ownerId + * @return + */ + public List findUsersInOfficeInStatuses(List statuses, String officeId, String ownerId) { + logger.debug("findUsersInOfficeInStatuses"); + List retults = new ArrayList(); + try { + retults = getUserByOfficeRepository() + .findUsersInOfficeInStatuses(statuses, new Office(officeId), ownerId); + } catch (Exception e) { + logger.error("findUsersInOfficeInStatuses", e); + } + + return retults; + } + + /** + * + * @param officeId + * @return + * @throws Exception + */ + public List findRoutesByOffice(String officeId) throws Exception { + logger.debug("findRoutesByOffice"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(RouteCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(RouteCfg.FIELD_OFFICE, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(RouteCtlg.class, RouteCfg.QUERY_FIND_ALL_ROUTES, parameters); + } catch (Exception e) { + logger.error("findRoutesByOffice", e); + throw e; + } + } + + /** + * + * @param officeId + * @return + * @throws Exception + */ + public List findRoutesWithNoCertifierUser(String officeId) throws Exception { + logger.debug("findRoutesWithNoCertifierUser"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(RouteCfg.FIELD_OFFICE, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(RouteCtlg.class, RouteCfg.QUERY_FIND_ROUTES_WITH_NO_CERTIFIER_USER, parameters); + } catch (Exception e) { + logger.error("findRoutesWithNoCertifierUser", e); + throw e; + } + } + + private static final long serialVersionUID = -2718549077979303345L; + final Logger logger = LogManager.getLogger(UserAdminController.class); + + private final GenericEntityRepository genericEntityRepository; + private final UserByOfficeRepository userByOfficeRepository; + + public UserAdminController() { + this.genericEntityRepository = new GenericEntityRepository(); + this.userByOfficeRepository = new UserByOfficeRepository(); + } + + public GenericEntityRepository getGenericEntityRepository() { + return genericEntityRepository; + } + + public UserByOfficeRepository getUserByOfficeRepository() { + return userByOfficeRepository; + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserCreateController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserCreateController.java new file mode 100644 index 0000000..72c88e0 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserCreateController.java @@ -0,0 +1,419 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.system.user; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.HumanResourceHasRoute; +import com.arrebol.apc.model.catalog.HumanResourceHasRouteId; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.catalog.constance.RouteCfg; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.Permission; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.model.core.UserByOfficeHasPermission; +import com.arrebol.apc.model.core.UserByOfficeHasPermissionId; +import com.arrebol.apc.model.core.constance.HumanResourceCfg; +import com.arrebol.apc.model.core.constance.OfficeCfg; +import com.arrebol.apc.model.core.constance.PermissionCfg; +import com.arrebol.apc.model.core.constance.UserByOfficeCfg; +import com.arrebol.apc.model.core.constance.UserByOfficeHasPermissionCfg; +import com.arrebol.apc.model.core.constance.UserCfg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.HumanResourceStatus; +import com.arrebol.apc.model.enums.PermissionStatus; +import com.arrebol.apc.model.enums.PermissionType; +import com.arrebol.apc.repository.GenericEntityRepository; +import com.arrebol.apc.repository.core.HumanResourceRepository; +import com.arrebol.apc.repository.core.PermissionRepository; +import com.arrebol.apc.repository.core.UserByOfficeRepository; +import com.arrebol.apc.repository.core.UserRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserCreateController implements Serializable { + + /** + * + * @return + */ + public List getAllActivePermissionController() { + logger.debug("getAllActivePermissionController"); + return getPermissionRepository().getAllActivePermissionByType(PermissionType.PRIVATE); + } + + /** + * + * @param searchingName + * @param officeId + * @return True if userName is available otherwise false. + */ + public boolean isUsernameAvailableController(String searchingName, String officeId) { + logger.debug("isUsernameAvailableController"); + + boolean available = false; + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserCfg.FIELD_USER_NAME, searchingName)); + parameters.add(new ModelParameter(OfficeCfg.FIELD_ID, officeId)); + + Long count = (Long) getUserRepository() + .xmlQueryAPCEntityUniqueResult( + UserCfg.QUERY_IS_USERNAME_AVAILABLE, + parameters + ); + + if (count == 0) { + available = true; + } + } catch (Exception e) { + logger.error("isUsernameAvailableController", e); + } + + return available; + } + + /** + * 1) Verifica que el usuario aun este disponible 2) Verifica que tipo de + * usuario se va a crear y en todos los casos se debera de guardar usuario y + * oficina más las carecteristicas propias de cada tipo de usuario: A) WEB + * debe guardar permisos B) MOBILE debe guardar rutas C) BOTH debe guardar + * rutas y permisos. + * + * @param user + * @param userByOffice + * @param routes + * @param permissions + * @return + */ + public boolean saveUserController(User user, UserByOffice userByOffice, + List routes, List permissions) { + logger.debug("saveUserController"); + boolean success = false; + try { + List humanResourceHasRoutes = new ArrayList<>(); + List userByOfficeHasPermissions = new ArrayList<>(); + List parameters = new ArrayList<>(); + List types = new ArrayList<>(); + List genericPermissions; + + switch (user.getUserType()) { + case WEB: + types.add(PermissionType.PUBLIC); + + parameters.add(new ModelParameter(PermissionCfg.FIELD_PERMISSION_TYPE, types)); + parameters.add(new ModelParameter(PermissionCfg.FIELD_PERMISSION_STATUS, PermissionStatus.ENEBLED)); + + genericPermissions = getGenericEntityRepository().xmlQueryAPCEntities(Permission.class, PermissionCfg.QUERY_FIND_PERMISSION_BY_TYPE_AND_STATUS, parameters); + + genericPermissions.forEach((Permission value) -> { + UserByOfficeHasPermission row = new UserByOfficeHasPermission( + new UserByOfficeHasPermissionId(null, value.getId()), user.getCreatedBy() + ); + + userByOfficeHasPermissions.add(row); + }); + + permissions.forEach((Permission value) -> { + UserByOfficeHasPermission row = new UserByOfficeHasPermission( + new UserByOfficeHasPermissionId(null, value.getId()), user.getCreatedBy() + ); + + userByOfficeHasPermissions.add(row); + }); + break; + case MOBILE: + routes.forEach((RouteCtlg value) -> { + HumanResourceHasRoute row = new HumanResourceHasRoute( + new HumanResourceHasRouteId(user.getHumanResource().getId(), value.getId()), + user.getCreatedBy() + ); + + humanResourceHasRoutes.add(row); + }); + break; + case BOTH: + types.add(PermissionType.PUBLIC); + + parameters.add(new ModelParameter(PermissionCfg.FIELD_PERMISSION_TYPE, types)); + parameters.add(new ModelParameter(PermissionCfg.FIELD_PERMISSION_STATUS, PermissionStatus.ENEBLED)); + + genericPermissions = getGenericEntityRepository().xmlQueryAPCEntities(Permission.class, PermissionCfg.QUERY_FIND_PERMISSION_BY_TYPE_AND_STATUS, parameters); + + genericPermissions.forEach((Permission value) -> { + UserByOfficeHasPermission row = new UserByOfficeHasPermission( + new UserByOfficeHasPermissionId(null, value.getId()), user.getCreatedBy() + ); + + userByOfficeHasPermissions.add(row); + }); + + permissions.forEach((Permission value) -> { + UserByOfficeHasPermission row = new UserByOfficeHasPermission( + new UserByOfficeHasPermissionId(null, value.getId()), user.getCreatedBy() + ); + + userByOfficeHasPermissions.add(row); + }); + + routes.forEach((RouteCtlg value) -> { + HumanResourceHasRoute row = new HumanResourceHasRoute( + new HumanResourceHasRouteId(user.getHumanResource().getId(), value.getId()), + user.getCreatedBy() + ); + + humanResourceHasRoutes.add(row); + }); + break; + } + + success = userRepository.createUser(user, + userByOffice, + humanResourceHasRoutes, + userByOfficeHasPermissions); + } catch (Exception e) { + logger.error(e); + } + + return success; + } + + /** + * Save a list of APC entities + * + * + * @param permissions + * @param userByOfficeId + * @param createdBy + * @return + */ + public boolean saveManyController(List permissions, String userByOfficeId, String createdBy) { + + return getGenericEntityRepository().insertManyAPCEntity(buildUniquePermissionList(permissions, userByOfficeId, createdBy)); + } + + /** + * + * @param permissions New permission to be saved. + * @param createdBy + * @param userByOfficeId Used to look all old permissions that need to be + * delete before to insert new permission list. + * @return + */ + public boolean updatePermissionsController(List permissions, String userByOfficeId, String createdBy) { + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserByOfficeHasPermissionCfg.FIELD_USER_BY_OFFICE, new UserByOffice(userByOfficeId))); + + boolean success = getGenericEntityRepository().xmlUpdateOrDeleteAPCEntity(UserByOfficeHasPermissionCfg.XML_QUERY_DELETE_PERMISSION_BY_USER_ID_AND_OFFICE_ID, parameters); + + if (success) { + success = getGenericEntityRepository().insertManyAPCEntity(buildUniquePermissionList(permissions, userByOfficeId, createdBy)); + } + + return success; + } + + /** + * + * @param user + * @param fromView 1 = From User-> Create
+ * @return + */ + @Deprecated + public boolean updateCreateUserController(User user, int fromView) { + logger.debug("updateCreateUser"); + + return getUserRepository().updateUserById(user, fromView); + } + + /** + * + * @param office + * @param humanResourceStatus + * @return + */ + public List findAllHRsWithoutUser(Office office, HumanResourceStatus humanResourceStatus) { + logger.debug("findAllHRsWithoutUser"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_OFFICE, office)); + parameters.add(new ModelParameter(HumanResourceCfg.FIELD_HR_STATUS, humanResourceStatus)); + + return getGenericEntityRepository().xmlQueryAPCEntities(HumanResource.class, HumanResourceCfg.QUERY_FIND_ALL_HRS_WITHOUT_USER, parameters); + } + + /** + * + * @param userId + * @param officeId + * @return If user was found return an instace of UserByOffice object, but + * return null if user was not found. + */ + public UserByOffice findIdOfUserByOffice(String userId, String officeId) { + logger.debug("findAllHRsWithoutUser"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserByOfficeCfg.FIELD_USER, new User(userId))); + parameters.add(new ModelParameter(UserByOfficeCfg.FIELD_OFFICE, new Office(officeId))); + + return getUserByOfficeRepository().findIdOfUserByOffice(UserByOfficeCfg.QUERY_FIND_ID_OF_USER_BY_OFFICE, parameters); + } + + /** + * + * @return + */ + public List findAllEnebledPermissions() { + logger.debug("findAllEnebledPermissions"); + return getPermissionRepository().findAllEnebledPermissions(); + } + + /** + * + * @param entities + * @return + */ + private List buildUniquePermissionList(List permissions, String userByOfficeId, String createdBy) { + logger.info("buildUniquePermissionList"); + + List allNewPermissions = new ArrayList<>(); + + try { + Set uniquePermission = new HashSet<>(); + + List appMenuLst = findAllEnebledPermissions(); + + permissions.forEach((permission) -> { + if (!uniquePermission.contains(permission)) { + uniquePermission.add(permission); + } + + Optional optional = appMenuLst.stream() + .filter((appMenu) -> appMenu.getPermission().equals(permission.getParentName())) + .findAny(); + + if (optional.isPresent()) { + if (!uniquePermission.contains(optional.get())) { + uniquePermission.add(optional.get()); + } + } + }); + + uniquePermission.forEach((unique) -> { + allNewPermissions.add( + new UserByOfficeHasPermission( + new UserByOfficeHasPermissionId( + userByOfficeId, + unique.getId() + ), + createdBy + ) + ); + }); + } catch (Exception e) { + logger.error("buildUniquePermissionList", e); + throw e; + } + + return allNewPermissions; + } + + /** + * + * @param officeId + * @return + * @throws Exception + */ + public List findRoutesByOffice(String officeId) throws Exception { + logger.debug("findRoutesByOffice"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(RouteCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(RouteCfg.FIELD_OFFICE, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(RouteCtlg.class, RouteCfg.QUERY_FIND_ALL_ROUTES, parameters); + } catch (Exception e) { + logger.error("findRoutesByOffice", e); + throw e; + } + } + + /** + * + * @param officeId + * @return + * @throws Exception + */ + public List findRoutesWithNoCertifierUser(String officeId) throws Exception { + logger.debug("findRoutesWithNoCertifierUser"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(RouteCfg.FIELD_OFFICE, new Office(officeId))); + + return genericEntityRepository.xmlQueryAPCEntities(RouteCtlg.class, RouteCfg.QUERY_FIND_ROUTES_WITH_NO_CERTIFIER_USER, parameters); + } catch (Exception e) { + logger.error("findRoutesWithNoCertifierUser", e); + throw e; + } + } + + private static final long serialVersionUID = 3496689435395697940L; + final Logger logger = LogManager.getLogger(UserCreateController.class); + + private final GenericEntityRepository genericEntityRepository; + private final PermissionRepository permissionRepository; + private final UserRepository userRepository; + private final HumanResourceRepository humanResourceRepository; + private final UserByOfficeRepository userByOfficeRepository; + + public UserCreateController() { + this.genericEntityRepository = new GenericEntityRepository(); + this.permissionRepository = new PermissionRepository(); + this.userRepository = new UserRepository(); + this.humanResourceRepository = new HumanResourceRepository(); + this.userByOfficeRepository = new UserByOfficeRepository(); + } + + private GenericEntityRepository getGenericEntityRepository() { + return genericEntityRepository; + } + + private PermissionRepository getPermissionRepository() { + return permissionRepository; + } + + private UserRepository getUserRepository() { + return userRepository; + } + + private HumanResourceRepository getHumanResourceRepository() { + return humanResourceRepository; + } + + public UserByOfficeRepository getUserByOfficeRepository() { + return userByOfficeRepository; + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserUpdateController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserUpdateController.java new file mode 100644 index 0000000..1ef42b0 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/system/user/UserUpdateController.java @@ -0,0 +1,294 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.system.user; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.HumanResourceHasRoute; +import com.arrebol.apc.model.catalog.HumanResourceHasRouteId; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.catalog.constance.RouteCfg; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.Permission; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.model.core.UserByOfficeHasPermission; +import com.arrebol.apc.model.core.UserByOfficeHasPermissionId; +import com.arrebol.apc.model.core.constance.HumanResourceHasRouteCfg; +import com.arrebol.apc.model.core.constance.OfficeCfg; +import com.arrebol.apc.model.core.constance.PermissionCfg; +import com.arrebol.apc.model.core.constance.UserByOfficeHasPermissionCfg; +import com.arrebol.apc.model.core.constance.UserCfg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.PermissionStatus; +import com.arrebol.apc.model.enums.PermissionType; +import com.arrebol.apc.model.enums.UserStatus; +import com.arrebol.apc.model.enums.UserType; +import com.arrebol.apc.repository.core.UserByOfficeRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserUpdateController implements Serializable { + + /** + * + * @param statuses + * @param officeId + * @param ownerId + * @return + */ + public List findUsersInOfficeInStatuses(List statuses, String officeId, String ownerId) { + logger.debug("findUsersInOfficeInStatuses"); + List retults = new ArrayList(); + try { + retults = userByOfficeRepository.findUsersInOfficeInStatuses(statuses, new Office(officeId), ownerId); + } catch (Exception e) { + logger.error("findUsersInOfficeInStatuses", e); + } + + return retults; + } + + /** + * + * @param isRoute true is route otherwise is permission. + * @param in true means bring by UBO or HR, otherwise means find list that + * does not have UBO or HR. + * @param uboId User By Office Id. + * @param hrId Human Resource Id. + * @param officeId Office Id. + * @return + */ + public List findList(boolean isRoute, boolean in, String uboId, String hrId, String officeId) { + logger.debug("findList"); + List results = new ArrayList(); + try { + String query; + List parameters = new ArrayList<>(); + + if (isRoute) { + query = in ? RouteCfg.QUERY_FIND_ALL_ROUTES_BY_HRHR : RouteCfg.QUERY_FIND_ALL_NOT_ROUTES_BY_HRHR; + + parameters.add(new ModelParameter(HumanResourceHasRouteCfg.FIELD_HUMAN_RESOURCE, new HumanResource(hrId))); + parameters.add(new ModelParameter(RouteCfg.FIELD_OFFICE, new Office(officeId))); + } else { + query = in ? PermissionCfg.QUERY_FIND_ALL_PERMISSIONS_BY_UBO : PermissionCfg.QUERY_FIND_ALL_NOT_PERMISSIONS_BY_UBO; + + parameters.add(new ModelParameter(UserByOfficeHasPermissionCfg.FIELD_USER_BY_OFFICE, new UserByOffice(uboId))); + } + results = userByOfficeRepository.findList(isRoute, query, parameters); + } catch (Exception e) { + logger.error("findList", e); + } + return results; + } + + /** + * + * @param isRoute + * @param types + * @param officeId + * @return + */ + public List findGeneralList(boolean isRoute, List types, String officeId) { + logger.debug("findGeneralList"); + List results = new ArrayList(); + try { + String query; + List parameters = new ArrayList<>(); + + if (isRoute) { + query = RouteCfg.QUERY_FIND_ALL_AVAILABLES_ROUTES; + + parameters.add(new ModelParameter(RouteCfg.FIELD_OFFICE, new Office(officeId))); + parameters.add(new ModelParameter(RouteCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + } else { + query = PermissionCfg.QUERY_FIND_ALL_PERMISSION_BY_TYPE_AND_STATUS; + + parameters.add(new ModelParameter(PermissionCfg.FIELD_PERMISSION_TYPE, types)); + parameters.add(new ModelParameter(PermissionCfg.FIELD_PERMISSION_STATUS, PermissionStatus.ENEBLED)); + } + results = userByOfficeRepository.findList(isRoute, query, parameters); + } catch (Exception e) { + logger.error("findGeneralList", e); + } + return results; + } + + public boolean updateUser(UserType newUserType, UserByOffice userByOffice, + List routes, List permissions, ActiveStatus certifier, ActiveStatus management) { + logger.info("updateUser"); + boolean success = false; + try { + List humanResourceHasRoutes = new ArrayList<>(); + List userByOfficeHasPermissions = new ArrayList<>(); + + switch (newUserType) { + case WEB: + permissions.forEach((Permission value) -> { + UserByOfficeHasPermission row = new UserByOfficeHasPermission( + new UserByOfficeHasPermissionId(userByOffice.getId(), value.getId()), userByOffice.getCreatedBy() + ); + + userByOfficeHasPermissions.add(row); + }); + break; + case MOBILE: + routes.forEach((RouteCtlg value) -> { + HumanResourceHasRoute row = new HumanResourceHasRoute( + new HumanResourceHasRouteId(userByOffice.getUser().getHumanResource().getId(), value.getId()), + userByOffice.getCreatedBy() + ); + + humanResourceHasRoutes.add(row); + }); + break; + case BOTH: + permissions.forEach((Permission value) -> { + UserByOfficeHasPermission row = new UserByOfficeHasPermission( + new UserByOfficeHasPermissionId(userByOffice.getId(), value.getId()), userByOffice.getCreatedBy() + ); + + userByOfficeHasPermissions.add(row); + }); + + routes.forEach((RouteCtlg value) -> { + HumanResourceHasRoute row = new HumanResourceHasRoute( + new HumanResourceHasRouteId(userByOffice.getUser().getHumanResource().getId(), value.getId()), + userByOffice.getCreatedBy() + ); + + humanResourceHasRoutes.add(row); + }); + break; + } + + // 1 Borrar rutas y/o permisos + // a- Si usuario previo es web - borrar permisos + // b- Si usuario previo es mobile - borrar rutas + // c- Si usuario previo es ambos - borrar permisos y rutas. + // 2 Actualizar datos + // a- Si usuario es web - agregar permisos + // b- Si usuario es mobile - agragar rutas + // c- Si usuario es ambos - agregar permisos y rutas. + success = userByOfficeRepository.updateUser( + newUserType, + userByOffice, + certifier, + humanResourceHasRoutes, + userByOfficeHasPermissions, + management + + ); + } catch (Exception e) { + logger.error("updateUser", e); + } + return success; + } + + /** + * + * @param searchingName + * @param officeId + * @return + */ + public boolean isUsernameAvailableController(String searchingName, String officeId) { + logger.debug("isUsernameAvailableController"); + + boolean available = false; + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserCfg.FIELD_USER_NAME, searchingName)); + parameters.add(new ModelParameter(OfficeCfg.FIELD_ID, officeId)); + + Long count = (Long) userByOfficeRepository + .xmlQueryAPCEntityUniqueResult( + UserCfg.QUERY_IS_USERNAME_AVAILABLE, + parameters + ); + + if (count == 0) { + available = true; + } + } catch (Exception e) { + logger.error("isUsernameAvailableController", e); + } + + return available; + } + + /** + * + * @param action Actions are pwd, usr, enebled, disabled & deleted. + * @param userId + * @param status + * @param pwd + * @param userName + * @param lastUpdatedBy + * @return + */ + public boolean updateUserOtherActions( + String action, + String userId, + UserStatus status, + String pwd, + String userName, + String lastUpdatedBy) { + logger.info("updateUserOtherActions"); + boolean success = false; + try { + String updateQuery; + List parameters = new ArrayList<>(); + switch (action) { + case "pwd": + updateQuery = UserCfg.QUERY_UPDATE_PASSWORD_BY_USER_ID; + + parameters.add(new ModelParameter(UserCfg.FIELD_PASSWORD, pwd)); + break; + case "usr": + updateQuery = UserCfg.QUERY_UPDATE_USER_NAME_BY_USER_ID; + + parameters.add(new ModelParameter(UserCfg.FIELD_USER_NAME, userName)); + parameters.add(new ModelParameter(UserCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(UserCfg.FIELD_LAST_UPDATED_ON, new Date())); + break; + default: + updateQuery = UserCfg.QUERY_UPDATE_USER_STATUS_BY_USER_ID; + + parameters.add(new ModelParameter(UserCfg.FIELD_USER_STATUS, status)); + parameters.add(new ModelParameter(UserCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(UserCfg.FIELD_LAST_UPDATED_ON, new Date())); + break; + } + parameters.add(new ModelParameter(UserCfg.FIELD_ID, userId)); + + success = userByOfficeRepository.updateEntityByQuery(updateQuery, parameters); + } catch (Exception e) { + logger.error("updateUserOtherActions", e); + } + return success; + } + + private static final long serialVersionUID = -6448348501480568726L; + final Logger logger = LogManager.getLogger(UserUpdateController.class); + + public UserUpdateController() { + this.userByOfficeRepository = new UserByOfficeRepository(); + } + + private final UserByOfficeRepository userByOfficeRepository; + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/topbar/PrivacyController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/topbar/PrivacyController.java new file mode 100644 index 0000000..8207636 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/topbar/PrivacyController.java @@ -0,0 +1,56 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.topbar; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.constance.UserCfg; +import com.arrebol.apc.repository.GenericEntityRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class PrivacyController implements Serializable { + + /** + * + * @param password + * @param userId + * @return + * @throws Exception + */ + public boolean updatePasswordByUserId(String password, String userId) throws Exception { + logger.debug("updatePasswordByUserId"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserCfg.FIELD_PASSWORD, password)); + parameters.add(new ModelParameter(UserCfg.FIELD_ID, userId)); + + return genericEntityRepository.xmlUpdateOrDeleteAPCEntity(UserCfg.QUERY_UPDATE_PASSWORD_BY_USER_ID, parameters); + } catch (Exception e) { + logger.error("updatePasswordByUserId", e); + throw e; + } + } + + private static final long serialVersionUID = 1131011930227628970L; + final Logger logger = LogManager.getLogger(PrivacyController.class); + + private final GenericEntityRepository genericEntityRepository; + + public PrivacyController() { + this.genericEntityRepository = new GenericEntityRepository(); + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/topbar/TopBarController.java b/ace-controller/src/main/java/com/arrebol/apc/controller/topbar/TopBarController.java new file mode 100644 index 0000000..aa4d5e9 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/topbar/TopBarController.java @@ -0,0 +1,51 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.topbar; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.repository.core.OfficeRepository; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.OfficeCfg; +import com.arrebol.apc.model.core.constance.UserByOfficeCfg; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class TopBarController implements Serializable { + + public List findAllOfficesByUserController(String userId) { + logger.debug("findAllOfficesByUserController"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserByOfficeCfg.FIELD_USER, new User(userId))); + + return getOfficeRepository().findAllOfficesByUser(OfficeCfg.QUERY_TUPLE_FIND_ALL_OFFICES_BY_USER, parameters); + } + + private static final long serialVersionUID = -4239053737928432361L; + final Logger logger = LogManager.getLogger(TopBarController.class); + + public final OfficeRepository officeRepository; + + public TopBarController() { + this.officeRepository = new OfficeRepository(); + } + + public OfficeRepository getOfficeRepository() { + return officeRepository; + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/util/ConnectionManager.java b/ace-controller/src/main/java/com/arrebol/apc/controller/util/ConnectionManager.java new file mode 100644 index 0000000..a376c20 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/util/ConnectionManager.java @@ -0,0 +1,40 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.util; + +import org.hibernate.Session; +import org.hibernate.Transaction; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public class ConnectionManager { + + /** + * + * @param session + */ + protected void closeSession(Session session) { + if (null != session) { + session.close(); + } + } + + /** + * + * @param transaction + */ + protected void rollback(Transaction transaction) { + if (null != transaction) { + transaction.rollback(); + } + } + + public static final String USER_ID_MANAGER_APPLICATION = "User-Id-Manager-Application"; +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/util/DateWrapper.java b/ace-controller/src/main/java/com/arrebol/apc/controller/util/DateWrapper.java new file mode 100644 index 0000000..0021cdf --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/util/DateWrapper.java @@ -0,0 +1,199 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.controller.util; + +import static java.util.Calendar.MONTH; +import static java.util.Calendar.DAY_OF_YEAR; +import static java.util.Calendar.DAY_OF_MONTH; +import static java.util.Calendar.HOUR_OF_DAY; +import static java.util.Calendar.MILLISECOND; +import static java.util.Calendar.MINUTE; +import static java.util.Calendar.SECOND; + +import java.util.Calendar; +import java.util.Date; + +/** + * + * @author oscarvargas + */ +public class DateWrapper { + + @Override + public String toString() { + return this.date.toString(); + } + + public static DateWrapper getInstance() { + return new DateWrapper(); + } + + public static DateWrapper today() { + return new DateWrapper(); + } + + /** + * Get date time Gregorian Time - 6 (GT-6). + * + * @return + */ + public static Date getTodayMXTime() { + Calendar calendar = Calendar.getInstance(); + + calendar.add(Calendar.HOUR_OF_DAY, -6); + + return calendar.getTime(); + } + + public static Date updateDateToMXTime(Date curdate) { + Calendar calendar = Calendar.getInstance(); + + calendar.setTime(curdate); + + calendar.add(Calendar.HOUR_OF_DAY, -6); + + return calendar.getTime(); + } + + /** + * Get date time Gregorian Time - 6 (GT-6), set time to midnigth + * 00:00:00:000. + * + * @return + */ + public static Date midnigthMXTime() { + Calendar calendar = Calendar.getInstance(); + + calendar.add(Calendar.HOUR_OF_DAY, -6); + + calendar.set(HOUR_OF_DAY, 0); + calendar.set(MINUTE, 0); + calendar.set(SECOND, 0); + calendar.set(MILLISECOND, 0); + + return calendar.getTime(); + } + + public static Date startDate(Date startDate) { + Calendar calendar = Calendar.getInstance(); + + calendar.setTime(startDate); + + calendar.add(Calendar.HOUR_OF_DAY, -6); + + calendar.set(HOUR_OF_DAY, 0); + calendar.set(MINUTE, 0); + calendar.set(SECOND, 0); + calendar.set(MILLISECOND, 0); + + return calendar.getTime(); + } + + public static Date endDate(Date endDate) { + Calendar calendar = Calendar.getInstance(); + + calendar.setTime(endDate); + + calendar.add(Calendar.HOUR_OF_DAY, -6); + + calendar.set(HOUR_OF_DAY, 23); + calendar.set(MINUTE, 59); + calendar.set(SECOND, 59); + calendar.set(MILLISECOND, 999); + + return calendar.getTime(); + } + + /** + * Get date time Gregorian Time - 6 (GT-6), set time to midnigth 23:59:59. + * + * @return + */ + public static Date lastMXTime() { + Calendar calendar = Calendar.getInstance(); + + calendar.add(Calendar.HOUR, -6); + + calendar.set(HOUR_OF_DAY, 23); + calendar.set(MINUTE, 59); + calendar.set(SECOND, 59); + + return calendar.getTime(); + } + + public DateWrapper midnigthTime() { + Calendar calendar = this.newCalendar(this.date); + calendar.set(HOUR_OF_DAY, 0); + calendar.set(MINUTE, 0); + calendar.set(SECOND, 0); + calendar.set(MILLISECOND, 0); + return new DateWrapper(calendar.getTime()); + } + + public DateWrapper add(int aCalendarField, int anMount) { + Calendar calendar = this.newCalendar(this.date); + calendar.add(aCalendarField, anMount); + return new DateWrapper(calendar.getTime()); + } + + private Calendar newCalendar(Date aDate) { + Calendar calendar = Calendar.getInstance(); + calendar.setLenient(false); + calendar.setTime(aDate); + return calendar; + } + + public DateWrapper subtractDaysOfYears(int anMount) { + return this.addDaysOfYears(-anMount); + } + + public DateWrapper addDaysOfYears(int anMount) { + return this.add(DAY_OF_YEAR, anMount); + } + + public Date asDate() { + return (Date) this.date.clone(); + } + + public DateWrapper firstDateForMonth() { + + Calendar calendar = newCalendar(this.date); + calendar.set(DAY_OF_MONTH, Calendar.getInstance().getActualMinimum(DAY_OF_MONTH)); + return new DateWrapper(calendar.getTime()); + } + + public DateWrapper lastDateForMonth() { + Calendar calendar = newCalendar(this.date); + calendar.set(DAY_OF_MONTH, Calendar.getInstance().getActualMaximum(DAY_OF_MONTH)); + return new DateWrapper(calendar.getTime()); + } + + public DateWrapper subtractMonths(int months) { + return this.addMonths(-months); + } + + public DateWrapper subtractHours(int hours) { + return this.addHours(-hours); + } + + public DateWrapper addMonths(int months) { + return this.add(MONTH, months); + } + + public DateWrapper addHours(int hours) { + return this.add(HOUR_OF_DAY, hours); + } + + public Date date; + + public DateWrapper(Date aDate) { + this.date = aDate; + } + + private DateWrapper() { + this.date = new Date(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/util/FilterMap.java b/ace-controller/src/main/java/com/arrebol/apc/controller/util/FilterMap.java new file mode 100644 index 0000000..87b7c81 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/util/FilterMap.java @@ -0,0 +1,79 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.util; + +import java.util.Map; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class FilterMap { + + static final String GLOBAL_FILTER = "globalFilter"; + + /** + * + * @param map + * @param hasWhere + * @return + */ + public static StringBuilder genericFilterByMapping(Map map, boolean hasWhere) { + StringBuilder sqlQuery = new StringBuilder(); + if (null != map) { + for (Map.Entry mapping : map.entrySet()) { + if (hasWhere) { + sqlQuery.append(" AND "); + sqlQuery.append(mapping.getKey()); + sqlQuery.append(" LIKE '%"); + sqlQuery.append(mapping.getValue()); + sqlQuery.append("%' "); + } else { + sqlQuery.append(" WHERE "); + sqlQuery.append(mapping.getKey()); + sqlQuery.append(" LIKE '%"); + sqlQuery.append(mapping.getValue()); + sqlQuery.append("%' "); + hasWhere = true; + } + } + } + return sqlQuery; + } + + /** + * + * @param filterBy + * @param hasWhere True is query contains where clause otherwise false + * @return + */ + public static StringBuilder filterByExcludeGlobalFilter(Map filterBy, boolean hasWhere) { + StringBuilder sqlQuery = new StringBuilder(); + if (null != filterBy) { + for (Map.Entry mapping : filterBy.entrySet()) { + if (!GLOBAL_FILTER.equals(mapping.getKey())) { + if (hasWhere) { + sqlQuery.append(" AND "); + sqlQuery.append(mapping.getKey()); + sqlQuery.append(" LIKE '%"); + sqlQuery.append(mapping.getValue().toString()); + sqlQuery.append("%' "); + } else { + sqlQuery.append(" WHERE "); + sqlQuery.append(mapping.getKey()); + sqlQuery.append(" LIKE '%"); + sqlQuery.append(mapping.getValue().toString()); + sqlQuery.append("%' "); + hasWhere = true; + } + } + } + } + return sqlQuery; + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/util/HibernateUtil.java b/ace-controller/src/main/java/com/arrebol/apc/controller/util/HibernateUtil.java new file mode 100644 index 0000000..4fa65d7 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/util/HibernateUtil.java @@ -0,0 +1,69 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.util; + +import org.hibernate.SessionFactory; +import org.hibernate.boot.Metadata; +import org.hibernate.boot.MetadataSources; +import org.hibernate.boot.registry.StandardServiceRegistryBuilder; +import org.hibernate.service.ServiceRegistry; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class HibernateUtil { + + private static final String HIBERNATE_CFG_XML = "apc.cfg.xml"; + private static SessionFactory sessionFactory; + + private HibernateUtil() { + } + + // Hibernate 5: + private static SessionFactory buildSessionFactory() { + try { + // Create the ServiceRegistry from hibernate.cfg.xml + ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().configure(HIBERNATE_CFG_XML).build(); + + // Create a metadata sources using the specified service registry. + Metadata metadata = new MetadataSources(serviceRegistry).getMetadataBuilder().build(); + + return metadata.getSessionFactoryBuilder().build(); + } catch (Throwable ex) { + System.err.println("Initial SessionFactory creation failed." + ex); + throw new ExceptionInInitializerError(ex); + } + } + + /** + * Configuration object is used to create a SessionFactory object which in + * turn configures Hibernate for the application using the supplied + * configuration file and allows for a Session object to be instantiated. + * + * The SessionFactory is a thread safe object and used by all the threads of + * an application. + * + * The SessionFactory is a heavyweight object; it is usually created during + * application start up and kept for later use. + * + * You would need one SessionFactory object per database using a separate + * configuration file. + * + * So, if you are using multiple databases, then you would have to create + * multiple SessionFactory objects. + * + * @return SessionFactory. + */ + public final static SessionFactory getSessionFactory() { + if (null == sessionFactory) { + sessionFactory = buildSessionFactory(); + } + return sessionFactory; + } + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/controller/util/logger/LogConnectionFactory.java b/ace-controller/src/main/java/com/arrebol/apc/controller/util/logger/LogConnectionFactory.java new file mode 100644 index 0000000..36ca2eb --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/controller/util/logger/LogConnectionFactory.java @@ -0,0 +1,34 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.util.logger; + +import java.sql.Connection; +import java.sql.SQLException; +import org.apache.commons.dbcp2.BasicDataSource; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LogConnectionFactory { + + private static BasicDataSource dataSource; + + public LogConnectionFactory() { + } + + public static Connection getConnection() throws SQLException { + if (dataSource == null) { + dataSource = new BasicDataSource(); + dataSource.setUrl("jdbc:mysql://localhost:3306/apo_pro_com_april_ten?serverTimezone=UTC"); + dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); + dataSource.setUsername("errortracelocalhost"); + dataSource.setPassword("zy61$Jql"); + } + return dataSource.getConnection(); + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/repository/AbstractRepository.java b/ace-controller/src/main/java/com/arrebol/apc/repository/AbstractRepository.java new file mode 100644 index 0000000..d1526cc --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/repository/AbstractRepository.java @@ -0,0 +1,763 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.repository; + +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import java.util.List; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; +import org.hibernate.query.Query; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public abstract class AbstractRepository { + + private Session sessionOld; + private Transaction transactionOld; + + /** + * Save an APC entity. + * + * @param entity APC entity in DB. + * @return + */ + protected boolean save(Object entity) { + logger.debug("Save"); + boolean success = false; + + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + session.save(entity); + transaction.commit(); + + logger.debug("Entity saved: " + entity); + + success = true; + } catch (HibernateException e) { + logger.error("Save Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method save() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + + return success; + } + + /** + * + * @param entities + * @return + */ + protected boolean saveMany(List entities) { + logger.debug("saveMany"); + boolean success = false; + + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + entities.forEach(entity -> { + session.save(entity); + }); + transaction.commit(); + + logger.debug("Entities saved: "); + + success = true; + } catch (HibernateException e) { + logger.error("saveMany Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method saveMany() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + + return success; + } + + /** + * Update an APC entity. + * + * @param entity APC entity in DB. + * @return + */ + protected boolean update(Object entity) { + logger.debug("update"); + boolean success = false; + + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + session.update(entity); + transaction.commit(); + + logger.debug("Entity updated: " + entity); + + success = true; + } catch (HibernateException e) { + logger.error("update Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method update() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + + return success; + } + + /** + * Delete an APC entity. + * + * @param entity APC entity in DB. + * @return + */ + protected boolean delete(Object entity) { + logger.debug("delete"); + boolean success = false; + + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + session.delete(entity); + transaction.commit(); + + logger.debug("Entity deleted: " + entity); + + success = true; + } catch (HibernateException e) { + logger.error("delete Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method delete() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + + return success; + } + + /** + * Find a APC entity. + * + * @param clazz APC entity class name to find in DB. + * @param id + * @return + */ + protected Object findAPCEntity(Class clazz, String id) { + logger.debug("findAPCEntity"); + Object apcEntity = null; + + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + apcEntity = session.get(clazz, id); + + transaction.commit(); + + logger.debug("APC entity found: " + apcEntity); + } catch (HibernateException e) { + logger.error("findAPCEntity Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method findAPCEntity() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + return apcEntity; + } + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + */ + protected List xmlQueryLoadEntities(Class clazz, String xmlQuery, List parameters) { + logger.debug("xmlQueryLoadEntities"); + + List entities = null; + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createNamedQuery(xmlQuery, clazz); + + if (null != parameters) { + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + } + + entities = query.getResultList(); + + transaction.commit(); + + logger.debug("APC entities loaded from xml query: " + entities.size()); + } catch (HibernateException e) { + logger.error("xmlQueryLoadEntities Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method xmlQueryLoadEntities() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + return entities; + } + + /** + * + * @param xmlQuery + * @param parameters + * @return + */ + protected List xmlQueryTuple(String xmlQuery, List parameters) { + logger.debug("xmlQueryTuple"); + + List entityList = null; + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createNamedQuery(xmlQuery, Tuple.class); + + if (null != parameters) { + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + } + + entityList = query.getResultList(); + transaction.commit(); + + logger.debug("APC entity from xml query list size: " + entityList.size()); + } catch (HibernateException e) { + logger.error("xmlQueryTuple Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method xmlQueryTuple() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + return entityList; + } + + /** + * + * @param strQuery + * @param parameters + * @return + */ + protected List queryTuple(String strQuery, List parameters) { + logger.debug("queryTuple"); + + List entityList = null; + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createQuery(strQuery, Tuple.class); + + if (null != parameters) { + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + } + + entityList = query.getResultList(); + transaction.commit(); + + logger.debug("APC entity from string query list size: " + entityList.size()); + } catch (HibernateException e) { + logger.error("queryTuple Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method queryTuple() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + return entityList; + } + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + */ + public List xmlQueryAPCEntities(Class clazz, String xmlQuery, List parameters) { + logger.debug("xmlQueryAPCEntities"); + + List entityList = null; + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createNamedQuery(xmlQuery, clazz); + + if (null != parameters) { + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + } + + entityList = query.getResultList(); + transaction.commit(); + + logger.debug("APC entities from xml query list size: " + entityList.size()); + } catch (HibernateException e) { + logger.error("xmlQueryAPCEntities Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method xmlQueryAPCEntities() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + return entityList; + } + + + public List xmlQueryAPCEntities(Class clazz, String xmlQuery) { + logger.debug("xmlQueryAPCEntities"); + + List entityList = null; + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createNamedQuery(xmlQuery, clazz); + + entityList = query.getResultList(); + transaction.commit(); + + logger.debug("APC entities from xml query list size: " + entityList.size()); + } catch (HibernateException e) { + logger.error("xmlQueryAPCEntities Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method xmlQueryAPCEntities() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + return entityList; + } + + /** + * + * @param clazz + * @param strQuery + * @param parameters + * @return + */ + public List queryAPCEntities(Class clazz, String strQuery, List parameters) { + logger.debug("queryAPCEntities"); + + List entityList = null; + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createQuery(strQuery, clazz); + + if (null != parameters) { + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + } + + entityList = query.getResultList(); + transaction.commit(); + + logger.debug("APC entities from string query list size: " + entityList.size()); + } catch (HibernateException e) { + logger.error("queryAPCEntities Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method queryAPCEntities() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + return entityList; + } + + /** + * + * @param clazz + * @param xmlQuery + * @param parameters + * @return + */ + public Object xmlQueryAPCEntityUniqueResult(Class clazz, String xmlQuery, List parameters) { + logger.debug("xmlQueryAPCEntityUniqueResult"); + + Object entity = null; + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createNamedQuery(xmlQuery, clazz); + + if (null != parameters) { + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + } + + entity = query.uniqueResult(); + transaction.commit(); + + logger.debug("APC entity from xml query: " + entity); + } catch (HibernateException e) { + logger.error("xmlQueryAPCEntityUniqueResult Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method xmlQueryAPCEntityUniqueResult() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + return entity; + } + + /** + * + * @param xmlQuery + * @param parameters + * @return + */ + public Object xmlQueryAPCEntityUniqueResult(String xmlQuery, List parameters) { + logger.debug("xmlQueryAPCEntityUniqueResult"); + + Object entity = null; + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createNamedQuery(xmlQuery); + + if (null != parameters) { + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + } + + entity = query.uniqueResult(); + transaction.commit(); + + logger.debug("APC entity from xml query: " + entity); + } catch (HibernateException e) { + logger.error("xmlQueryAPCEntityUniqueResult Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method xmlQueryAPCEntityUniqueResult() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + return entity; + } + + /** + * + * @param clazz + * @param strQuery + * @param parameters + * @return + */ + public Object queryAPCEntityUniqueResult(Class clazz, String strQuery, List parameters) { + logger.debug("queryAPCEntity"); + + Object entity = null; + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query query = session.createQuery(strQuery, clazz); + + if (null != parameters) { + parameters.forEach((param) -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + } + + entity = query.uniqueResult(); + transaction.commit(); + + logger.debug("APC entity from string query " + entity); + } catch (HibernateException e) { + logger.error("queryAPCEntityUniqueResult Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method queryAPCEntityUniqueResult() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + return entity; + } + + /** + * + * @param xmlUpdateOrDeleteQuery XML query mapped in Model hbm file. + * @param parameters Paramerter cannot be empy, it has at least one paramert + * in list. + * @return Is parameters is empty return false, otherwise execute and return + * true if was success the execution of query. + */ + protected boolean xmlUpdateOrDelete(String xmlUpdateOrDeleteQuery, List parameters) { + boolean success = false; + //Session session = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Query updateOrDeleteQuery = session.createNamedQuery(xmlUpdateOrDeleteQuery); + + if (null != parameters && !parameters.isEmpty()) { + parameters.forEach((parameter) -> { + updateOrDeleteQuery.setParameter(parameter.getParameter(), parameter.getValue()); + }); + + int total = updateOrDeleteQuery.executeUpdate(); + + if (total > 0) { + transaction.commit(); + success = true; + } else { + transaction.rollback(); + } + } else { + transaction.rollback(); + } + } catch (HibernateException e) { + logger.error("xmlUpdateOrDelete Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method xmlUpdateOrDelete() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + }/* finally { + if (null != session) { + session.close(); + } + }*/ + return success; + } + + protected void openConnection() { + try { + sessionOld = HibernateUtil.getSessionFactory().getCurrentSession(); + transactionOld = sessionOld.beginTransaction(); + } catch (Exception e) { + logger.error("openConnection", e); + throw e; + } + } + + protected Session getSession() { + return sessionOld; + } + + protected void closeConnection() { + try { + transactionOld.commit(); + } catch (Exception e) { + logger.error("closeConnection", e); + rollback(); + } + } + + protected void rollback() { + if (null != transactionOld) { + transactionOld.rollback(); + } + } + + protected void flushAndClear() { + if (null != sessionOld) { + sessionOld.flush(); + sessionOld.clear(); + } + } + + final Logger logger = LogManager.getLogger(AbstractRepository.class); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/repository/AutoCompleteDAORepository.java b/ace-controller/src/main/java/com/arrebol/apc/repository/AutoCompleteDAORepository.java new file mode 100644 index 0000000..620cbd3 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/repository/AutoCompleteDAORepository.java @@ -0,0 +1,56 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.repository; + +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import java.util.ArrayList; +import java.util.List; +import org.hibernate.Session; +import org.hibernate.Transaction; +import org.hibernate.query.Query; + +/** + * + * @author Carlos Janitzio Zavala Lopez + * @param + */ +public abstract class AutoCompleteDAORepository extends AbstractRepository { + + /** + * + * @param clazz + * @param hbmQuery + * @param parameters + * @return + */ + public List searchLike(Class clazz, String hbmQuery, List parameters) { + List results; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + Query query = session.createQuery(hbmQuery, clazz); + if (null != parameters) { + parameters.forEach(param -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + } + query.setMaxResults(10); + results = query.getResultList(); + transaction.commit(); + } catch (Exception e) { + logger.error("searchLike from class: " + clazz.getName(), e); + if (null != transaction) { + transaction.rollback(); + } + results = new ArrayList<>(); + } + return results; + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/repository/GenericEntityRepository.java b/ace-controller/src/main/java/com/arrebol/apc/repository/GenericEntityRepository.java new file mode 100644 index 0000000..41a02de --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/repository/GenericEntityRepository.java @@ -0,0 +1,111 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.repository; + +import com.arrebol.apc.model.ModelParameter; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class GenericEntityRepository extends AbstractRepository implements Serializable { + + private static final long serialVersionUID = -886033066217353341L; + + /** + * Insert APC entity. + * + * @param apcEntity + * @return + */ + public boolean insertAPCEntity(Object apcEntity) { + return super.save(apcEntity); + } + + /** + * Insert APC entities list. + * + * @param apcEntities + * @return + */ + public boolean insertManyAPCEntity(List apcEntities) { + return super.saveMany(apcEntities); + } + + /** + * Delete APC entity. + * + * @param apcEntity + * @return + */ + public boolean deleteAPCEntityById(Object apcEntity) { + return super.delete(apcEntity); + } + + /** + * + * @param xmlUpdateOrDeleteQuery XML query mapped in Model hbm file. + * @param parameters Paramerter cannot be empy, it has at least one paramert + * in list. + * @return Is parameters is empty return false, otherwise execute and return + * true if was success the execution of query. + */ + public boolean xmlUpdateOrDeleteAPCEntity(String xmlUpdateOrDeleteQuery, List parameters) { + return super.xmlUpdateOrDelete(xmlUpdateOrDeleteQuery, parameters); + } + + /** + * Find an Object by its primary key. + * + * @param clazz + * @param id + * @return + */ + public Object selectAPCEntityById(Class clazz, String id) { + return (Object) findAPCEntity(clazz, id); + } + + /** + * Update APC entity. + * + * @param apcEntity + * @return + */ + public boolean updateAPCEntity(Object apcEntity) { + return super.update(apcEntity); + } + + /** + * + * @param date + * @param query Must has parameter named ":date" and return just one field + * @return + */ + public boolean existRecordsUsingSQLQueryFindByCreatedOnField(Date date, String query) { + boolean success = true; + + try { + openConnection(); + + List records = getSession().createSQLQuery(query).setParameter("date", date).getResultList(); + + if (records.isEmpty()) { + success = false; + } + + closeConnection(); + } catch (Exception e) { + logger.error("existNextPaidStableGeneralBoxByCreatedOn", e); + rollback(); + } + return success; + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/repository/LazyDataModelDAORepository.java b/ace-controller/src/main/java/com/arrebol/apc/repository/LazyDataModelDAORepository.java new file mode 100644 index 0000000..74e18fb --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/repository/LazyDataModelDAORepository.java @@ -0,0 +1,94 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.repository; + +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.Session; +import org.hibernate.Transaction; +import org.hibernate.query.Query; + +/** + * + * @author Carlos Janitzio Zavala Lopez + * @param + */ +public abstract class LazyDataModelDAORepository extends AbstractRepository { + + /** + * + * @param hbmQuery + * @param parameters + * @return + */ + public long lazyLoadingEntityCount(String hbmQuery, List parameters) { + Long total; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + Query query = session.createQuery(hbmQuery, Long.class); + if (null != parameters) { + parameters.forEach(param -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + } + total = (Long) query.getSingleResult(); + transaction.commit(); + } catch (Exception e) { + logger.error("lazyLoadingEntityCount from hbmQuery: " + hbmQuery, e); + if (null != transaction) { + transaction.rollback(); + } + total = 0l; + } + return total; + } + + /** + * + * @param clazz + * @param hbmQuery + * @param parameters + * @param first + * @param pageSize + * @return + */ + public List lazyLoadingEntityList(Class clazz, String hbmQuery, List parameters, int first, int pageSize) { + List results; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + Query query = session.createQuery(hbmQuery, clazz); + if (null != parameters) { + parameters.forEach(param -> { + query.setParameter(param.getParameter(), param.getValue()); + }); + } + query.setFirstResult(first); + query.setMaxResults(pageSize); + + results = query.getResultList(); + transaction.commit(); + } catch (Exception e) { + logger.error("lazyLoadingEntityList from class: " + clazz.getName(), e); + if (null != transaction) { + transaction.rollback(); + } + results = new ArrayList<>(); + } + return results; + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/repository/core/HumanResourceRepository.java b/ace-controller/src/main/java/com/arrebol/apc/repository/core/HumanResourceRepository.java new file mode 100644 index 0000000..0849bcb --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/repository/core/HumanResourceRepository.java @@ -0,0 +1,97 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.repository.core; + +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.constance.HumanResourceCfg; +import com.arrebol.apc.repository.AbstractRepository; +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaUpdate; +import javax.persistence.criteria.Root; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class HumanResourceRepository extends AbstractRepository implements Serializable { + + /** + * + * @param hr + * @param updateAvatar + * @return + */ + public boolean updateByHumanResourceId(HumanResource hr, boolean updateAvatar) { + logger.debug("updateByHumanResourceId"); + + boolean success = false; + try { + openConnection(); + + CriteriaBuilder builder = getSession().getCriteriaBuilder(); + CriteriaUpdate update = builder.createCriteriaUpdate(HumanResource.class); + Root root = update.from(HumanResource.class); + + if (updateAvatar) { + update.set(root.get(HumanResourceCfg.FIELD_AVATAR), hr.getAvatar()); + } else { + update.set(root.get(HumanResourceCfg.FIELD_FIRST_NAME), hr.getFirstName()); + update.set(root.get(HumanResourceCfg.FIELD_SECOND_NAME), hr.getSecondName()); + update.set(root.get(HumanResourceCfg.FIELD_LAST_NAME), hr.getLastName()); + update.set(root.get(HumanResourceCfg.FIELD_MIDDLE_NAME), hr.getMiddleName()); + update.set(root.get(HumanResourceCfg.FIELD_BIRTHDATE), hr.getBirthdate()); + update.set(root.get(HumanResourceCfg.FIELD_ADMISSION_DATE), hr.getAdmissionDate()); + update.set(root.get(HumanResourceCfg.FIELD_PAYMENT), hr.getPayment()); + update.set(root.get(HumanResourceCfg.FIELD_IMSS), hr.getImss()); + update.set(root.get(HumanResourceCfg.FIELD_ROLE), hr.getRoleCtlg()); + update.set(root.get(HumanResourceCfg.FIELD_BONUS), hr.getBonus()); + + if(hr.getEmployeeSaving() != null){ + update.set(root.get(HumanResourceCfg.FIELD_EMPLOYEE_SAVING), hr.getEmployeeSaving()); + }else{ + update.set(root.get(HumanResourceCfg.FIELD_EMPLOYEE_SAVING), BigDecimal.ZERO); + } + + //update.set(root.get(HumanResourceCfg.FIELD_HR_TYPE), hr.getHumanResourceType()); + } + + update.set(root.get(HumanResourceCfg.FIELD_LAST_UPDATED_BY), hr.getLastUpdatedBy()); + update.set(root.get(HumanResourceCfg.FIELD_LAST_UPDATED_ON), hr.getLastUpdatedOn()); + + update.where(builder.equal(root.get(HumanResourceCfg.FIELD_ID), hr.getId())); + + int total = getSession().createQuery(update).executeUpdate(); + + if (1 == total) { + closeConnection(); + + success = true; + + logger.debug("Human resource updated"); + } else { + logger.error("Update HR from create user", new Exception("Was avatar update " + updateAvatar)); + rollback(); + } + } catch (HibernateException e) { + logger.error("updateByHumanResourceId hibernate", e); + rollback(); + } catch (Exception e) { + logger.error("Method updateByHumanResourceId() ", e); + rollback(); + } + return success; + } + + private static final long serialVersionUID = -5624272695296306941L; + final Logger logger = LogManager.getLogger(HumanResourceRepository.class); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/repository/core/OfficeRepository.java b/ace-controller/src/main/java/com/arrebol/apc/repository/core/OfficeRepository.java new file mode 100644 index 0000000..01b4c77 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/repository/core/OfficeRepository.java @@ -0,0 +1,110 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.repository.core; + +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.constance.OfficeCfg; +import com.arrebol.apc.model.enums.OfficeStatus; +import com.arrebol.apc.repository.AbstractRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.enterprise.context.RequestScoped; +import javax.persistence.Tuple; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Path; +import javax.persistence.criteria.Root; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class OfficeRepository extends AbstractRepository implements Serializable { + + public List getAllActiveOffice() { + logger.debug("getAllActiveOffice"); + + List offices = null; + Session session = null; + Transaction transaction = null; + try { + session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + CriteriaBuilder builder = session.getCriteriaBuilder(); + CriteriaQuery query = builder.createQuery(Office.class); + Root root = query.from(Office.class); + Path idPath = root.get(OfficeCfg.FIELD_ID); + Path permissionPath = root.get(OfficeCfg.FIELD_PERMISSION); + + query.select(builder.construct(Office.class, idPath, permissionPath)); + query.where(builder.equal(root.get(OfficeCfg.FIELD_OFFICE_STATUS), OfficeStatus.ENEBLED)); + query.orderBy(builder.asc(root.get(OfficeCfg.FIELD_PERMISSION))); + + offices = session.createQuery(query).getResultList(); + + transaction.commit(); + logger.debug("Total of office: " + offices.size()); + } catch (HibernateException e) { + logger.error("getAllActiveOffice Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method getAllActiveOffice() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } finally { + if (null != session) { + session.close(); + } + } + return offices; + } + + /** + * + * @param xmlQueryTuple + * @param parameters + * @return + */ + public List findAllOfficesByUser(String xmlQueryTuple, List parameters) { + logger.debug("findAllOfficesByUser"); + + List offices = new ArrayList<>(); + try { + List tupleLst = xmlQueryTuple(xmlQueryTuple, parameters); + + tupleLst.forEach((tuple) -> { + offices.add(new Office((String) tuple.get(0), (String) tuple.get(1))); + }); + + logger.debug("User has office " + offices.size()); + } catch (HibernateException e) { + logger.error("findAllOfficeByUser hibernate", e); + } catch (Exception e) { + logger.error("Method findAllOfficeByUser() ", e); + } + return offices; + } + + private static final long serialVersionUID = 1712329089116981172L; + final Logger logger = LogManager.getLogger(OfficeRepository.class); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/repository/core/PermissionRepository.java b/ace-controller/src/main/java/com/arrebol/apc/repository/core/PermissionRepository.java new file mode 100644 index 0000000..2afc8dd --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/repository/core/PermissionRepository.java @@ -0,0 +1,93 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.repository.core; + +import com.arrebol.apc.model.core.Permission; +import com.arrebol.apc.model.core.constance.PermissionCfg; +import com.arrebol.apc.model.enums.PermissionStatus; +import com.arrebol.apc.model.enums.PermissionType; +import com.arrebol.apc.repository.AbstractRepository; +import java.io.Serializable; +import java.util.List; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Path; +import javax.persistence.criteria.Root; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class PermissionRepository extends AbstractRepository implements Serializable { + + public List getAllActivePermissionByType(PermissionType permissionType) { + logger.debug("getAllActivePermissionByType"); + + List permissions = null; + try { + openConnection(); + + CriteriaBuilder builder = getSession().getCriteriaBuilder(); + CriteriaQuery query = builder.createQuery(Permission.class); + Root root = query.from(Permission.class); + Path id = root.get(PermissionCfg.FIELD_ID); + Path permission = root.get(PermissionCfg.FIELD_PERMISSION); + Path description = root.get(PermissionCfg.FIELD_DESCRIPTION); + Path menuPath = root.get(PermissionCfg.FIELD_MENU_PATH); + + query.select(builder.construct(Permission.class, id, permission, description, menuPath)); + query.where( + builder.and( + builder.equal(root.get(PermissionCfg.FIELD_PERMISSION_STATUS), PermissionStatus.ENEBLED), + builder.equal(root.get(PermissionCfg.FIELD_PERMISSION_TYPE), permissionType) + ) + ); + + query.orderBy( + builder.asc(root.get(PermissionCfg.FIELD_LEFT_TO_RIGHT)), + builder.asc(root.get(PermissionCfg.FIELD_TOP_TO_BOTTOM)) + ); + + permissions = getSession().createQuery(query).getResultList(); + + closeConnection(); + logger.debug("Total of permissions: " + permissions.size()); + } catch (HibernateException e) { + logger.error("getAllActivePermissionByType hibernate", e); + rollback(); + } catch (Exception e) { + logger.error("Method getAllActivePermissionByType() ", e); + rollback(); + } + + return permissions; + } + + /** + * + * @return + */ + public List findAllEnebledPermissions() { + logger.debug("findAllEnebledPermissions"); + List permissions = null; + + try { + permissions = xmlQueryAPCEntities(Permission.class, PermissionCfg.QUERY_FIND_ENEBLED_PERMISSIONS, null); + } catch (Exception e) { + logger.error("findAllEnebledPermissions", e); + } + + return permissions; + } + + private static final long serialVersionUID = -3100646446560072563L; + final Logger logger = LogManager.getLogger(PermissionRepository.class); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/repository/core/UserByOfficeRepository.java b/ace-controller/src/main/java/com/arrebol/apc/repository/core/UserByOfficeRepository.java new file mode 100644 index 0000000..430d641 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/repository/core/UserByOfficeRepository.java @@ -0,0 +1,373 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.repository.core; + +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.HumanResourceHasRoute; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.Permission; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.model.core.UserByOfficeHasPermission; +import com.arrebol.apc.model.core.constance.HumanResourceHasRouteCfg; +import com.arrebol.apc.model.core.constance.UserByOfficeCfg; +import com.arrebol.apc.model.core.constance.UserByOfficeHasPermissionCfg; +import com.arrebol.apc.model.core.constance.UserCfg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.UserStatus; +import com.arrebol.apc.model.enums.UserType; +import com.arrebol.apc.repository.AbstractRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import javax.enterprise.context.RequestScoped; +import javax.persistence.Tuple; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; +import org.hibernate.query.Query; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class UserByOfficeRepository extends AbstractRepository implements Serializable { + + public List findUsersInOfficeInStatuses(List statuses, Office office, String ownerId) { + logger.debug("findUsersInOfficeInStatuses"); + + List userByOfficeLst = new ArrayList<>(); + Session session = null; + Transaction transaction = null; + try { + session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + List tupleLst = session + .createNamedQuery( + UserByOfficeCfg.QUERY_FIND_USERS_IN_OFFICE_IN_STATUSES, Tuple.class + ) + .setParameter(UserByOfficeCfg.FIELD_OFFICE, office) + .setParameter(UserByOfficeCfg.PARAM_OWNER_ID, ownerId) + .setParameter(UserCfg.FIELD_USER_STATUS, statuses) + .getResultList(); + + tupleLst.forEach( + (tuple) -> { + userByOfficeLst.add( + new UserByOffice( + tuple.get("id", String.class), + new User( + tuple.get("usrId", String.class), + new HumanResource( + tuple.get("hrId", String.class), + tuple.get("fullName", String.class) + ), + tuple.get("userName", String.class), + tuple.get("certifier", ActiveStatus.class), + tuple.get("userType", UserType.class), + tuple.get("management",ActiveStatus.class) + ) + ) + ); + } + ); + + transaction.commit(); + logger.debug("Office has users " + userByOfficeLst.size()); + } catch (HibernateException e) { + logger.error("findUsersInOfficeInStatuses Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method findUsersInOfficeInStatuses() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } finally { + if (null != session) { + session.close(); + } + } + return userByOfficeLst; + } + + /** + * + * @param userByOffice + * @return + */ + public UserByOffice findUserLogged(UserByOffice userByOffice) { + logger.debug("findUserLogged"); + + Session session = null; + Transaction transaction = null; + try { + session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + Object idsLst = session.createNamedQuery(UserByOfficeCfg.QUERY_FIND_USER_LOGGED) + .setParameter(UserByOfficeCfg.PARAM_USER_NAME, userByOffice.getUser().getUserName()) + .setParameter(UserByOfficeCfg.PARAM_OFFICE_ID, userByOffice.getOffice().getId()) + .uniqueResult(); + + if (null != idsLst && idsLst instanceof Object[] && ((Object[]) idsLst).length == 8) { + Object[] obj = ((Object[]) idsLst); + + HumanResource hr = new HumanResource( + obj[2].toString(), + obj[3].toString(), + obj[4].toString(), + obj[5].toString() + ); + + userByOffice.setId(obj[0].toString()); + userByOffice.getUser().setId(obj[1].toString()); + userByOffice.getUser().setHumanResource(hr); + userByOffice.setOffice(new Office(obj[6].toString(), obj[7].toString())); + } + + transaction.commit(); + logger.debug("User logged: " + userByOffice); + } catch (HibernateException e) { + logger.error("findUserLogged Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method findUserLogged() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } finally { + if (null != session) { + session.close(); + } + } + + return userByOffice; + } + + /** + * + * @param xmlQuery + * @param parameters + * @return + */ + public UserByOffice findIdOfUserByOffice(String xmlQuery, List parameters) { + UserByOffice userByOffice = null; + try { + List tupleLst = xmlQueryTuple(xmlQuery, parameters); + + for (Tuple tuple : tupleLst) { + userByOffice = new UserByOffice((String) tuple.get(UserByOfficeCfg.FIELD_ID)); + } + } catch (Exception e) { + logger.error("getAllActiveOffice hibernate", e); + } + return userByOffice; + } + + public List findList(boolean isRoute, String xmlQuery, List parameters) { + List results = new ArrayList(); + try { + List tupleLst = xmlQueryTuple(xmlQuery, parameters); + + tupleLst.forEach((tuple) -> { + if (isRoute) { + results.add( + new RouteCtlg( + tuple.get("id", String.class), + tuple.get("route", String.class) + ) + ); + } else { + results.add( + new Permission( + tuple.get("id", String.class), + tuple.get("permission", String.class), + tuple.get("description", String.class), + tuple.get("menuPath", String.class) + ) + ); + } + }); + } catch (Exception e) { + logger.error("getAllActiveOffice hibernate", e); + } + return results; + } + + // 1 Borrar rutas y/o permisos + // a- Si usuario previo es web - borrar permisos + // b- Si usuario previo es mobile - borrar rutas + // c- Si usuario previo es ambos - borrar permisos y rutas. + // 2 Actualizar datos + // a- Si usuario es web - agregar permisos + // b- Si usuario es mobile - agragar rutas + // c- Si usuario es ambos - agregar permisos y rutas. + // 3 Actualiza cretificador + public boolean updateUser(UserType newUserType, + UserByOffice userByOffice, ActiveStatus certifier, + List humanResourceHasRoutes, + List userByOfficeHasPermissions,ActiveStatus management) { + logger.info("updateUser"); + boolean success = false; + Session session = null; + Transaction transaction = null; + try { + session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + String query = UserCfg.QUERY_UPDATE_CERTIFIER_AND_USER_TYPE_BY_ID; + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserCfg.FIELD_USER_TYPE, newUserType)); + parameters.add(new ModelParameter(UserCfg.FIELD_CERTIFIER, certifier)); + parameters.add(new ModelParameter(UserCfg.FIELD_LAST_UPDATED_BY, userByOffice.getCreatedBy())); + parameters.add(new ModelParameter(UserCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(UserCfg.FIELD_ID, userByOffice.getUser().getId())); + parameters.add(new ModelParameter(UserCfg.FIELD_MANAGMENT, management)); + + Query updateOrDeleteQuery = session.createNamedQuery(query); + + for (ModelParameter parameter : parameters) { + updateOrDeleteQuery.setParameter(parameter.getParameter(), parameter.getValue()); + } + + int total = updateOrDeleteQuery.executeUpdate(); + + if (total > 0) { + switch (userByOffice.getUser().getUserType()) { + case WEB: + query = UserByOfficeHasPermissionCfg.QUERY_DELETE_ALL_PERMISSION_BY_UBO; + updateOrDeleteQuery = session.createNamedQuery(query); + + parameters.clear(); + parameters.add(new ModelParameter(UserByOfficeHasPermissionCfg.FIELD_USER_BY_OFFICE, new UserByOffice(userByOffice.getId()))); + + for (ModelParameter parameter : parameters) { + updateOrDeleteQuery.setParameter(parameter.getParameter(), parameter.getValue()); + } + + updateOrDeleteQuery.executeUpdate(); + break; + case MOBILE: + query = HumanResourceHasRouteCfg.QUERY_DELETE_ALL_HR_HAS_ROUTE_BY_HR; + updateOrDeleteQuery = session.createNamedQuery(query); + + parameters.clear(); + parameters.add(new ModelParameter(HumanResourceHasRouteCfg.FIELD_HUMAN_RESOURCE, new HumanResource(userByOffice.getUser().getHumanResource().getId()))); + + for (ModelParameter parameter : parameters) { + updateOrDeleteQuery.setParameter(parameter.getParameter(), parameter.getValue()); + } + + updateOrDeleteQuery.executeUpdate(); + break; + case BOTH: + // WEB + query = UserByOfficeHasPermissionCfg.QUERY_DELETE_ALL_PERMISSION_BY_UBO; + updateOrDeleteQuery = session.createNamedQuery(query); + + parameters.clear(); + parameters.add(new ModelParameter(UserByOfficeHasPermissionCfg.FIELD_USER_BY_OFFICE, new UserByOffice(userByOffice.getId()))); + + for (ModelParameter parameter : parameters) { + updateOrDeleteQuery.setParameter(parameter.getParameter(), parameter.getValue()); + } + + updateOrDeleteQuery.executeUpdate(); + + // MOBILE + query = HumanResourceHasRouteCfg.QUERY_DELETE_ALL_HR_HAS_ROUTE_BY_HR; + updateOrDeleteQuery = session.createNamedQuery(query); + + parameters.clear(); + parameters.add(new ModelParameter(HumanResourceHasRouteCfg.FIELD_HUMAN_RESOURCE, new HumanResource(userByOffice.getUser().getHumanResource().getId()))); + + for (ModelParameter parameter : parameters) { + updateOrDeleteQuery.setParameter(parameter.getParameter(), parameter.getValue()); + } + + updateOrDeleteQuery.executeUpdate(); + break; + } + + switch (newUserType) { + case WEB: + userByOfficeHasPermissions.forEach(session::save); + break; + case MOBILE: + humanResourceHasRoutes.forEach(session::save); + break; + case BOTH: + userByOfficeHasPermissions.forEach(session::save); + humanResourceHasRoutes.forEach(session::save); + break; + } + + success = true; + transaction.commit(); + } else { + transaction.rollback(); + } + } catch (HibernateException e) { + logger.error("updateUser Hibernate", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } catch (Exception e) { + logger.error("Method updateUser() ", e); + if (null != transaction) { + transaction.rollback(); + } + throw e; + } finally { + if (null != session) { + session.close(); + } + } + return success; + } + + /** + * + * @param updateQuery + * @param parameters + * @return + */ + public boolean updateEntityByQuery(String updateQuery, List parameters) { + logger.info("updateEntityByQuery"); + try { + if (null == updateQuery || null == parameters || parameters.isEmpty()) { + return false; + } + + return xmlUpdateOrDelete(updateQuery, parameters); + } catch (Exception e) { + logger.error("updateEntityByQuery", e); + throw e; + } + } + + private static final long serialVersionUID = -6925993802118470170L; + final Logger logger = LogManager.getLogger(UserByOfficeRepository.class); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/repository/core/UserRepository.java b/ace-controller/src/main/java/com/arrebol/apc/repository/core/UserRepository.java new file mode 100644 index 0000000..870ff75 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/repository/core/UserRepository.java @@ -0,0 +1,186 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.repository.core; + +import com.arrebol.apc.model.catalog.HumanResourceHasRoute; +import com.arrebol.apc.model.catalog.HumanResourceHasRouteId; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.model.core.UserByOfficeHasPermission; +import com.arrebol.apc.model.core.constance.UserByOfficeCfg; +import com.arrebol.apc.model.core.constance.UserCfg; +import com.arrebol.apc.repository.AbstractRepository; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.persistence.Tuple; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaUpdate; +import javax.persistence.criteria.Root; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserRepository extends AbstractRepository implements Serializable { + + /** + * + * @param officeId + * @return + */ + public List findAllUsersByOffice(String officeId) { + logger.debug("findAllUsersByOffice"); + + List users = new ArrayList<>(); + try { + openConnection(); + + List tupleLst = getSession().createNamedQuery(UserCfg.QUERY_FIND_ALL_USERS_BY_OFFICE, Tuple.class) + .setParameter(UserByOfficeCfg.FIELD_OFFICE, new Office(officeId)) + .getResultList(); + + tupleLst.forEach((tuple) -> { + HumanResource hr = new HumanResource((String) tuple.get(0), (String) tuple.get(0), (String) tuple.get(0)); + User usr = new User((String) tuple.get(0), (String) tuple.get(1), hr); + + users.add(usr); + }); + + closeConnection(); + logger.debug("Office has users " + users.size()); + } catch (HibernateException e) { + logger.error("findAllUsersByOffice hibernate", e); + rollback(); + } catch (Exception e) { + logger.error("Method findAllUsersByOffice() ", e); + rollback(); + } + return users; + } + + /** + * + * @param user + * @param fromView 1 = From View User -> Create
+ * @return + */ + @Deprecated + public boolean updateUserById(User user, int fromView) { + logger.debug("updateByHumanResourceId"); + + boolean success = false; + try { + openConnection(); + + CriteriaBuilder builder = getSession().getCriteriaBuilder(); + CriteriaUpdate update = builder.createCriteriaUpdate(HumanResource.class); + Root root = update.from(HumanResource.class); + + switch (fromView) { + case 1: + update.set(root.get(UserCfg.FIELD_HUMAN_RESOURCE), user.getHumanResource()); + //update.set(root.get(UserCfg.FIELD_USER_NAME), user.getUserName()); + update.set(root.get(UserCfg.FIELD_PASSWORD), user.getPassword()); + break; + } + + update.set(root.get(UserCfg.FIELD_LAST_UPDATED_BY), user.getLastUpdatedBy()); + update.set(root.get(UserCfg.FIELD_LAST_UPDATED_ON), user.getLastUpdatedOn()); + + update.where(builder.equal(root.get(UserCfg.FIELD_ID), user.getId())); + + int total = getSession().createQuery(update).executeUpdate(); + + if (1 == total) { + closeConnection(); + success = true; + logger.debug("User updated"); + } else { + logger.error("Update user", new Exception("From: " + fromView)); + rollback(); + } + } catch (HibernateException e) { + logger.error("updateByHumanResourceId hibernate", e); + rollback(); + } catch (Exception e) { + logger.error("Method updateByHumanResourceId() ", e); + rollback(); + } + return success; + } + + /** + * 1) Verifica que el usuario aun este disponible 2) Verifica que tipo de + * usuario se va a crear y en todos los casos se debera de guardar usuario y + * oficina más las carecteristicas propias de cada tipo de usuario: A) WEB + * debe guardar permisos B) MOBILE debe guardar rutas C) BOTH debe guardar + * rutas y permisos. + * + * @param user + * @param userByOffice + * @param humanResourceHasRoutes + * @param userByOfficeHasPermissions + * @return + */ + public boolean createUser(User user, UserByOffice userByOffice, + List humanResourceHasRoutes, + List userByOfficeHasPermissions) { + boolean success = false; + + try { + openConnection(); + + // Start generic block for all user types + getSession().save(user); + + userByOffice.setUser(new User(user.getId())); + + getSession().save(userByOffice); + // End generic block for all user types + + switch (user.getUserType()) { + case WEB: + userByOfficeHasPermissions.forEach((value) -> { + value.getId().setIdUserByOffice(userByOffice.getId()); + getSession().save(value); + }); + break; + case MOBILE: + humanResourceHasRoutes.forEach(getSession()::save); + break; + case BOTH: + userByOfficeHasPermissions.forEach((value) -> { + value.getId().setIdUserByOffice(userByOffice.getId()); + getSession().save(value); + }); + + humanResourceHasRoutes.forEach(getSession()::save); + break; + } + + closeConnection(); + success = true; + } catch (HibernateException e) { + logger.error("updateByHumanResourceId hibernate", e); + rollback(); + } catch (Exception e) { + logger.error("Method updateByHumanResourceId() ", e); + rollback(); + } + return success; + } + private static final long serialVersionUID = -3153392012298562511L; + final Logger logger = LogManager.getLogger(UserRepository.class); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/AutoCompleteService.java b/ace-controller/src/main/java/com/arrebol/apc/service/AutoCompleteService.java new file mode 100644 index 0000000..1667ddc --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/AutoCompleteService.java @@ -0,0 +1,25 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service; + +import java.util.List; + +/** + * + * @author Carlos Janitzio Zavala Lopez + * @param + */ +public interface AutoCompleteService { + + /** + * + * @param valueToSearch + * @return + */ + public List queryLike(String valueToSearch); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/BitacoraService.java b/ace-controller/src/main/java/com/arrebol/apc/service/BitacoraService.java new file mode 100644 index 0000000..2a28295 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/BitacoraService.java @@ -0,0 +1,24 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service; + +import com.arrebol.apc.model.system.logs.Bitacora; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface BitacoraService { + + /** + * + * @param bitacora + * @return + */ + boolean saveBitacora(Bitacora bitacora); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/BitacoraServiceImpl.java b/ace-controller/src/main/java/com/arrebol/apc/service/BitacoraServiceImpl.java new file mode 100644 index 0000000..1fe5017 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/BitacoraServiceImpl.java @@ -0,0 +1,30 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service; + +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.repository.LazyDataModelDAORepository; +import javax.enterprise.context.RequestScoped; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class BitacoraServiceImpl extends LazyDataModelDAORepository implements BitacoraService { + + @Override + public boolean saveBitacora(Bitacora bitacora) { + logger.debug("saveBitacora"); + return save(bitacora); + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/GenericValidationService.java b/ace-controller/src/main/java/com/arrebol/apc/service/GenericValidationService.java new file mode 100644 index 0000000..054c1b5 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/GenericValidationService.java @@ -0,0 +1,32 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service; + +import com.arrebol.apc.model.core.User; +import java.util.Date; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface GenericValidationService { + + /** + * + * @param user + * @return + */ + Date lastStableSmallBoxByDate(User user); + + /** + * + * @param date + * @return + */ + boolean existStableSmallBoxByCreatedOn(Date date); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/GenericValidationServiceImpl.java b/ace-controller/src/main/java/com/arrebol/apc/service/GenericValidationServiceImpl.java new file mode 100644 index 0000000..0950292 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/GenericValidationServiceImpl.java @@ -0,0 +1,93 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service; + +import com.arrebol.apc.controller.util.HibernateUtil; +import com.arrebol.apc.model.core.User; +import java.util.Date; +import java.util.List; +import javax.enterprise.context.RequestScoped; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.hibernate.Transaction; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class GenericValidationServiceImpl implements GenericValidationService { + + @Override + public Date lastStableSmallBoxByDate(User user) { + logger.info("lastStableSmallBoxByDate"); + + Date success = null; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + String query = "SELECT cd.createdOn FROM StableSmallBox cd " + + "WHERE DATE(cd.createdOn) <= CURDATE() AND cd.activeStatus = 'ENEBLED' " + + "order by cd.createdOn DESC"; + + success = (Date) session.createQuery(query).setMaxResults(1) + .uniqueResult(); + + transaction.commit(); + + logger.info("Total of closing day found: "); + } catch (HibernateException e) { + logger.error("Can not find stable small box by created on", e); + if (null != transaction) { + transaction.rollback(); + } + } catch (Exception e) { + logger.error("Method lastStableSmallBoxByDate()", e); + if (null != transaction) { + transaction.rollback(); + } + } + + return success; + } + + @Override + public boolean existStableSmallBoxByCreatedOn(Date date) { + logger.info("existStableSmallBoxByCreatedOn"); + boolean success = true; + Transaction transaction = null; + try { + Session session = HibernateUtil.getSessionFactory().getCurrentSession(); + transaction = session.beginTransaction(); + + String query = "SELECT ssb.id FROM APC_STABLE_SMALL_BOX ssb " + + "WHERE DATE(ssb.created_on) = DATE(:date) AND ssb.active_status = 'ENEBLED'"; + + List records = session.createSQLQuery(query).setParameter("date", date).getResultList(); + + if (records.isEmpty()) { + success = false; + } + + transaction.commit(); + } catch (Exception e) { + logger.error("existStableSmallBoxByCreatedOn", e); + if (null != transaction) { + transaction.rollback(); + } + } + return success; + } + + final Logger logger = LogManager.getLogger(getClass()); + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/LazyDataModelBetweenDatesService.java b/ace-controller/src/main/java/com/arrebol/apc/service/LazyDataModelBetweenDatesService.java new file mode 100644 index 0000000..865df56 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/LazyDataModelBetweenDatesService.java @@ -0,0 +1,46 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service; + +import com.arrebol.apc.model.admin.Transfer; +import java.util.Date; +import java.util.List; +import java.util.Map; +import org.primefaces.model.SortOrder; + +/** + * + * @author Carlos Janitzio Zavala Lopez + * @param + */ +public interface LazyDataModelBetweenDatesService { + + /** + * + * @param filterBy + * @param officeId + * @param starDate + * @param endDate + * @return + */ + long countPaginator(Map filterBy, String officeId, Date starDate, Date endDate); + + /** + * + * @param first + * @param pageSize + * @param sortField + * @param sortOrder + * @param filterBy + * @param officeId + * @param starDate + * @param endDate + * @return + */ + List lazyEntityListPaginator(int first, int pageSize, String sortField, SortOrder sortOrder, Map filterBy, String officeId, Date starDate, Date endDate); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/LazyDataModelService.java b/ace-controller/src/main/java/com/arrebol/apc/service/LazyDataModelService.java new file mode 100644 index 0000000..06a0316 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/LazyDataModelService.java @@ -0,0 +1,38 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service; + +import java.util.List; +import java.util.Map; +import org.primefaces.model.SortOrder; + +/** + * + * @author Carlos Janitzio Zavala Lopez + * @param + */ +public interface LazyDataModelService { + + /** + * + * @param filterBy + * @return + */ + long countPaginator(Map filterBy); + + /** + * + * @param first + * @param pageSize + * @param sortField + * @param sortOrder + * @param filterBy + * @return + */ + List lazyEntityListPaginator(int first, int pageSize, String sortField, SortOrder sortOrder, Map filterBy); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/admin/CustomerService.java b/ace-controller/src/main/java/com/arrebol/apc/service/admin/CustomerService.java new file mode 100644 index 0000000..fa34359 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/admin/CustomerService.java @@ -0,0 +1,58 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.admin; + +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.CustomerClassification; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.model.views.CustomerView; +import com.arrebol.apc.service.LazyDataModelService; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface CustomerService extends LazyDataModelService { + + /** + * + * @param type + * @param peopleIdToUpdate + * @param lastUpdatedBy + * @return + */ + boolean updatePeopleTypeById(PeopleType type, String peopleIdToUpdate, String lastUpdatedBy); + + /** + * + * @param status + * @param peopleIdToUpdate + * @param lastUpdatedBy + * @return + */ + boolean updatePeopleByStatus(ActiveStatus status, String peopleIdToUpdate, String lastUpdatedBy); + + /** + * + * @param classification + * @param peopleIdToUpdate + * @param lastUpdatedBy + * @return + */ + public boolean updatePeopleByClassification(CustomerClassification classification, String peopleIdToUpdate, String lastUpdatedBy); + + /** + * + * @param route + * @param peopleIdToUpdate + * @param lastUpdatedBy + * @return + */ + boolean updateRouteById(RouteCtlg route, String peopleIdToUpdate, String lastUpdatedBy); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/admin/CustomerServiceImpl.java b/ace-controller/src/main/java/com/arrebol/apc/service/admin/CustomerServiceImpl.java new file mode 100644 index 0000000..9e380e2 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/admin/CustomerServiceImpl.java @@ -0,0 +1,137 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.admin; + +import com.arrebol.apc.controller.util.FilterMap; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.catalog.constance.PeopleCfg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.CustomerClassification; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.model.views.CustomerView; +import com.arrebol.apc.repository.LazyDataModelDAORepository; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; +import javax.enterprise.context.RequestScoped; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.primefaces.model.SortOrder; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class CustomerServiceImpl extends LazyDataModelDAORepository implements CustomerService { + + @Override + public boolean updatePeopleTypeById(PeopleType type, String peopleIdToUpdate, String lastUpdatedBy) { + logger.debug("updatePeopleTypeById"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PeopleCfg.FIELD_PEOPLE_TYPE, type)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(PeopleCfg.FIELD_ID, peopleIdToUpdate)); + + return xmlUpdateOrDelete(PeopleCfg.UPDATE_PEOPLE_TYPE_BY_STATUS, parameters); + } + + @Override + public boolean updatePeopleByStatus(ActiveStatus status, String peopleIdToUpdate, String lastUpdatedBy) { + logger.debug("updatePeopleByStatus"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PeopleCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(PeopleCfg.FIELD_ID, peopleIdToUpdate)); + + return xmlUpdateOrDelete(PeopleCfg.UPDATE_PEOPLE_BY_STATUS, parameters); + } + + @Override + public boolean updatePeopleByClassification(CustomerClassification classification, String peopleIdToUpdate, String lastUpdatedBy) { + logger.debug("updatePeopleByClassification"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PeopleCfg.FIELD_CLASSIFICATION, classification)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(PeopleCfg.FIELD_ID, peopleIdToUpdate)); + + return xmlUpdateOrDelete(PeopleCfg.UPDATE_PEOPLE_BY_CLASSIFICATION, parameters); + } + + @Override + public boolean updateRouteById(RouteCtlg route, String peopleIdToUpdate, String lastUpdatedBy) { + logger.debug("updateRouteById"); + + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(PeopleCfg.FIELD_ROUTE, route)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(PeopleCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(PeopleCfg.FIELD_ID, peopleIdToUpdate)); + + return xmlUpdateOrDelete(PeopleCfg.UPDATE_ROUTE_BY_PEOPLE, parameters); + } + + @Override + public long countPaginator(Map filterBy) { + logger.debug("countPaginator"); + try { + StringBuilder sqlQuery = new StringBuilder("SELECT COUNT(id) FROM CustomerView "); + + sqlQuery.append(FilterMap.filterByExcludeGlobalFilter(filterBy, false)); + + return lazyLoadingEntityCount(sqlQuery.toString(), null); + } catch (Exception e) { + logger.error("countPaginator", e); + + return 0l; + } + } + + @Override + public List lazyEntityListPaginator(int first, int pageSize, String sortField, SortOrder sortOrder, Map filterBy) { + logger.debug("fillListPaginator"); + try { + StringBuilder sqlQuery = new StringBuilder("FROM CustomerView "); + + sqlQuery.append(FilterMap.filterByExcludeGlobalFilter(filterBy, false)); + sqlQuery.append(" ORDER BY "); + + if (null == sortField || "".equals(sortField)) { + sqlQuery.append(" fullName ASC"); + } else { + sqlQuery.append(sortField); + + if (null != sortOrder) { + sqlQuery.append(" "); + sqlQuery.append(sortOrder.equals(SortOrder.ASCENDING) ? "ASC" : "DESC"); + } else { + sqlQuery.append(" ASC"); + } + } + + return lazyLoadingEntityList(CustomerView.class, sqlQuery.toString(), null, first, pageSize); + } catch (Exception e) { + logger.error("CustomerView", e); + return new ArrayList(); + } + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/admin/PeopleService.java b/ace-controller/src/main/java/com/arrebol/apc/service/admin/PeopleService.java new file mode 100644 index 0000000..cdda933 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/admin/PeopleService.java @@ -0,0 +1,31 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.admin; + +import com.arrebol.apc.model.catalog.People; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface PeopleService { + + /** + * + * @param peopleId + * @return + */ + People findPeopleById(String peopleId); + + /** + * + * @param people + * @return + */ + boolean savePeople(People people); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/admin/PeopleServiceImpl.java b/ace-controller/src/main/java/com/arrebol/apc/service/admin/PeopleServiceImpl.java new file mode 100644 index 0000000..caf2a65 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/admin/PeopleServiceImpl.java @@ -0,0 +1,36 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.admin; + +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.repository.LazyDataModelDAORepository; +import javax.enterprise.context.RequestScoped; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class PeopleServiceImpl extends LazyDataModelDAORepository implements PeopleService { + + @Override + public People findPeopleById(String peopleId) { + logger.debug("findPeopleById"); + + return (People) findAPCEntity(People.class, peopleId); + } + + public boolean savePeople(People people) { + logger.debug("savePeopleController"); + return save(people); + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/admin/TransferService.java b/ace-controller/src/main/java/com/arrebol/apc/service/admin/TransferService.java new file mode 100644 index 0000000..dac1030 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/admin/TransferService.java @@ -0,0 +1,36 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.admin; + +import com.arrebol.apc.model.admin.Transfer; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.views.TransferView; +import com.arrebol.apc.service.LazyDataModelBetweenDatesService; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface TransferService extends LazyDataModelBetweenDatesService { + + /** + * + * @param status + * @param transferIdToUpdate + * @param lastUpdatedBy + * @return + */ + boolean updateTransferByStatus(ActiveStatus status, String transferIdToUpdate, String lastUpdatedBy); + + /** + * + * @param transfer + * @return + */ + boolean saveTransfer(Transfer transfer); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/admin/TransferServiceImpl.java b/ace-controller/src/main/java/com/arrebol/apc/service/admin/TransferServiceImpl.java new file mode 100644 index 0000000..2370c4c --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/admin/TransferServiceImpl.java @@ -0,0 +1,131 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.admin; + +import com.arrebol.apc.controller.util.FilterMap; +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.admin.Transfer; +import com.arrebol.apc.model.admin.constance.TransferCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.views.TransferView; +import com.arrebol.apc.repository.LazyDataModelDAORepository; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; +import javax.enterprise.context.RequestScoped; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.primefaces.model.SortOrder; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class TransferServiceImpl extends LazyDataModelDAORepository implements TransferService { + + final Logger logger = LogManager.getLogger(getClass()); + + @Override + public boolean updateTransferByStatus(ActiveStatus status, String transferIdToUpdate, String lastUpdatedBy) { + logger.debug("updateTransferByStatus"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(TransferCfg.FIELD_ACTIVE_STATUS, status)); + parameters.add(new ModelParameter(TransferCfg.FIELD_LAST_UPDATED_BY, lastUpdatedBy)); + parameters.add(new ModelParameter(TransferCfg.FIELD_LAST_UPDATED_ON, new Date())); + parameters.add(new ModelParameter(TransferCfg.FIELD_ID, transferIdToUpdate)); + + return xmlUpdateOrDelete(TransferCfg.QUERY_UPDATE_TRANSFER_BY_ACTIVE_STATUS, parameters); + } catch (Exception e) { + logger.error("updateTransferByStatus", e); + return false; + } + } + + @Override + public boolean saveTransfer(Transfer transfer) { + logger.debug("saveTransfer"); + return save(transfer); + } + + @Override + public long countPaginator(Map filterBy, String officeId, Date starDate, Date endDate) { + logger.debug("countPaginator"); + try { + StringBuilder sqlQuery = new StringBuilder("SELECT COUNT(id) FROM TransferView "); + + sqlQuery.append(FilterMap.filterByExcludeGlobalFilter(filterBy, false)); + + if (null != filterBy && !filterBy.isEmpty()) { + sqlQuery.append(" AND DATE(createdOn) BETWEEN DATE(:startDate) AND DATE(:endDate) "); + sqlQuery.append(" AND idOffice = :idOffice "); + } else { + sqlQuery.append(" WHERE DATE(createdOn) BETWEEN DATE(:startDate) AND DATE(:endDate) "); + sqlQuery.append(" AND idOffice = :idOffice "); + } + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter("startDate", starDate)); + parameters.add(new ModelParameter("endDate", endDate)); + parameters.add(new ModelParameter("idOffice", officeId)); + + return lazyLoadingEntityCount(sqlQuery.toString(), parameters); + } catch (Exception e) { + logger.error("countPaginator", e); + + return 0l; + } + } + + @Override + public List lazyEntityListPaginator(int first, int pageSize, String sortField, SortOrder sortOrder, Map filterBy, String officeId, Date starDate, Date endDate) { + logger.debug("fillListPaginator"); + try { + StringBuilder sqlQuery = new StringBuilder("FROM TransferView "); + + sqlQuery.append(FilterMap.filterByExcludeGlobalFilter(filterBy, false)); + + if (null != filterBy && !filterBy.isEmpty()) { + sqlQuery.append(" AND DATE(createdOn) BETWEEN DATE(:startDate) AND DATE(:endDate) "); + sqlQuery.append(" AND idOffice = :idOffice "); + } else { + sqlQuery.append(" WHERE DATE(createdOn) BETWEEN DATE(:startDate) AND DATE(:endDate) "); + sqlQuery.append(" AND idOffice = :idOffice "); + } + + sqlQuery.append(" ORDER BY "); + + if (null == sortField || "".equals(sortField)) { + sqlQuery.append(" createdOn ASC"); + } else { + sqlQuery.append(sortField); + + if (null != sortOrder) { + sqlQuery.append(" "); + sqlQuery.append(sortOrder.equals(SortOrder.ASCENDING) ? "ASC" : "DESC"); + } else { + sqlQuery.append(" ASC"); + } + } + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter("startDate", starDate)); + parameters.add(new ModelParameter("endDate", endDate)); + parameters.add(new ModelParameter("idOffice", officeId)); + + return lazyLoadingEntityList(TransferView.class, sqlQuery.toString(), parameters, first, pageSize); + } catch (Exception e) { + logger.error("CustomerView", e); + return new ArrayList(); + } + } +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanService.java b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanService.java new file mode 100644 index 0000000..c8f1d8a --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanService.java @@ -0,0 +1,47 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.catalog; + +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanByUser; +import com.arrebol.apc.model.loan.LoanDetails; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanService { + + /** + * + * @param loan + * @return + */ + boolean saveLoan(Loan loan); + + /** + * + * @param loanId + * @return + */ + Loan getLoanById(String loanId); + + /** + * + * @param loanByUser + * @return + */ + boolean saveLoanByUser(LoanByUser loanByUser); + + /** + * + * @param loanDetails + * @return + */ + boolean saveLoanDetail(LoanDetails loanDetails); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanServiceImpl.java b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanServiceImpl.java new file mode 100644 index 0000000..97aa142 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanServiceImpl.java @@ -0,0 +1,51 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.catalog; + +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanByUser; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.repository.LazyDataModelDAORepository; +import javax.enterprise.context.RequestScoped; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class LoanServiceImpl extends LazyDataModelDAORepository implements LoanService { + + @Override + public boolean saveLoan(Loan loan) { + logger.debug("saveLoan"); + return save(loan); + } + + @Override + public Loan getLoanById(String loanId) { + logger.debug("getLoanById"); + + return (Loan) findAPCEntity(Loan.class, loanId); + } + + @Override + public boolean saveLoanByUser(LoanByUser loanByUser) { + logger.debug("saveLoanByUser"); + return save(loanByUser); + } + + @Override + public boolean saveLoanDetail(LoanDetails loanDetails) { + logger.debug("saveLoanDetail"); + return save(loanDetails); + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanTypeService.java b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanTypeService.java new file mode 100644 index 0000000..7d9312d --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanTypeService.java @@ -0,0 +1,32 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.catalog; + +import com.arrebol.apc.model.loan.LoanType; +import java.util.List; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanTypeService { + + /** + * + * @param loanTypeId + * @return + */ + LoanType getLoanTypeById(String loanTypeId); + + /** + * + * @param officeId + * @return + */ + List fillLoanTypeDatatable(String officeId); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanTypeServiceImpl.java b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanTypeServiceImpl.java new file mode 100644 index 0000000..e2ddd08 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/LoanTypeServiceImpl.java @@ -0,0 +1,47 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.catalog; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.constance.LoanTypeCfg; +import com.arrebol.apc.model.loan.LoanType; +import com.arrebol.apc.repository.LazyDataModelDAORepository; +import java.util.ArrayList; +import java.util.List; +import javax.enterprise.context.RequestScoped; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class LoanTypeServiceImpl extends LazyDataModelDAORepository implements LoanTypeService { + + @Override + public LoanType getLoanTypeById(String loanTypeId) { + logger.debug("getLoanTypeById"); + + return (LoanType) findAPCEntity(LoanType.class, loanTypeId); + } + + @Override + public List fillLoanTypeDatatable(String officeId) { + logger.debug("fillLoanTypeDatatable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(LoanTypeCfg.FIELD_OFFICE, new Office(officeId))); + + return xmlQueryAPCEntities(LoanType.class, LoanTypeCfg.QUERY_FIND_ALL_DATA_LOAN_TYPE_BY_OFFICE, parameters); + } + + final Logger logger = LogManager.getLogger(getClass()); + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/catalog/PeopleAutoCompleteService.java b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/PeopleAutoCompleteService.java new file mode 100644 index 0000000..52fff2b --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/PeopleAutoCompleteService.java @@ -0,0 +1,23 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.catalog; + +import com.arrebol.apc.model.catalog.People; +import java.util.List; + +/** + * + * @author Carlos Janitzio Zavala Lopez + * + */ +public interface PeopleAutoCompleteService { + + List findCustomersLike(String valueToSearch); + + List findEndorsementsLike(String valueToSearch); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/catalog/PeopleAutoCompleteServiceImpl.java b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/PeopleAutoCompleteServiceImpl.java new file mode 100644 index 0000000..601f5a4 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/PeopleAutoCompleteServiceImpl.java @@ -0,0 +1,83 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.catalog; + +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.repository.AutoCompleteDAORepository; +import java.util.ArrayList; +import java.util.List; +import javax.enterprise.context.RequestScoped; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class PeopleAutoCompleteServiceImpl extends AutoCompleteDAORepository implements PeopleAutoCompleteService { + + @Override + public List findCustomersLike(String valueToSearch) { + try { + StringBuilder builder = new StringBuilder("FROM People WHERE "); + + builder.append("(firstName LIKE '%"); + builder.append(valueToSearch); + builder.append("%' OR "); + builder.append("secondName LIKE '%"); + builder.append(valueToSearch); + builder.append("%' OR "); + builder.append("lastName LIKE '%"); + builder.append(valueToSearch); + builder.append("%' OR "); + builder.append("middleName LIKE '%"); + builder.append(valueToSearch); + builder.append("%') "); + builder.append("AND peopleType IN('CUSTOMER','BOTH') "); + builder.append("AND activeStatus = 'ENEBLED' "); + builder.append("ORDER BY firstName"); + + return searchLike(People.class, builder.toString(), null); + } catch (Exception e) { + logger.error("findCustomersLike", e); + return new ArrayList<>(); + } + } + + @Override + public List findEndorsementsLike(String valueToSearch) { + try { + StringBuilder builder = new StringBuilder("FROM People WHERE "); + + builder.append("(firstName LIKE '%"); + builder.append(valueToSearch); + builder.append("%' OR "); + builder.append("secondName LIKE '%"); + builder.append(valueToSearch); + builder.append("%' OR "); + builder.append("lastName LIKE '%"); + builder.append(valueToSearch); + builder.append("%' OR "); + builder.append("middleName LIKE '%"); + builder.append(valueToSearch); + builder.append("%') "); + builder.append("AND peopleType IN('ENDORSEMENT','BOTH') "); + builder.append("AND activeStatus = 'ENEBLED' "); + builder.append("ORDER BY firstName"); + + return searchLike(People.class, builder.toString(), null); + } catch (Exception e) { + logger.error("findEndorsementsLike", e); + return new ArrayList<>(); + } + } + + final Logger logger = LogManager.getLogger(getClass()); + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/catalog/RouteService.java b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/RouteService.java new file mode 100644 index 0000000..40337b4 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/RouteService.java @@ -0,0 +1,25 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.catalog; + +import com.arrebol.apc.model.catalog.RouteCtlg; +import java.util.List; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface RouteService { + + /** + * + * @param officeId + * @return + */ + List fillRoutesDatatable(String officeId); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/catalog/RouteServiceImpl.java b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/RouteServiceImpl.java new file mode 100644 index 0000000..d6823dd --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/catalog/RouteServiceImpl.java @@ -0,0 +1,42 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.catalog; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.catalog.constance.RouteCfg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.repository.LazyDataModelDAORepository; +import java.util.ArrayList; +import java.util.List; +import javax.enterprise.context.RequestScoped; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class RouteServiceImpl extends LazyDataModelDAORepository implements RouteService { + + @Override + public List fillRoutesDatatable(String officeId) { + logger.debug("fillRoutesDatatable"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(RouteCfg.FIELD_ACTIVE_STATUS, ActiveStatus.ENEBLED)); + parameters.add(new ModelParameter(RouteCfg.FIELD_OFFICE, new Office(officeId))); + + return xmlQueryAPCEntities(RouteCtlg.class, RouteCfg.QUERY_FIND_ALL_ROUTES, parameters); + } + + final Logger logger = LogManager.getLogger(getClass()); + +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/core/UserService.java b/ace-controller/src/main/java/com/arrebol/apc/service/core/UserService.java new file mode 100644 index 0000000..a7d8c56 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/core/UserService.java @@ -0,0 +1,25 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.core; + +import com.arrebol.apc.model.core.User; +import java.util.List; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface UserService { + + /** + * + * @param officeId + * @return + */ + List getAllUsersByOffice(String officeId); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/core/UserServiceImpl.java b/ace-controller/src/main/java/com/arrebol/apc/service/core/UserServiceImpl.java new file mode 100644 index 0000000..42dd1c3 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/core/UserServiceImpl.java @@ -0,0 +1,39 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.core; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.constance.UserCfg; +import com.arrebol.apc.repository.LazyDataModelDAORepository; +import java.util.ArrayList; +import java.util.List; +import javax.enterprise.context.RequestScoped; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class UserServiceImpl extends LazyDataModelDAORepository implements UserService { + + @Override + public List getAllUsersByOffice(String officeId) { + logger.debug("getAllUsersByOffice"); + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(UserCfg.FIELD_OFFICE, new Office(officeId))); + + return xmlQueryAPCEntities(User.class, UserCfg.QUERY_FIND_ALL_USERS_COMPLETE, parameters); + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/views/EnabledUserDetailsViewService.java b/ace-controller/src/main/java/com/arrebol/apc/service/views/EnabledUserDetailsViewService.java new file mode 100644 index 0000000..02ff983 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/views/EnabledUserDetailsViewService.java @@ -0,0 +1,25 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.views; + +import com.arrebol.apc.model.views.EnabledUserDetailsView; +import java.util.List; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface EnabledUserDetailsViewService { + + /** + * + * @param officeId + * @return + */ + List findEnabledUsersByOffice(String officeId); +} diff --git a/ace-controller/src/main/java/com/arrebol/apc/service/views/EnabledUserDetailsViewServiceImpl.java b/ace-controller/src/main/java/com/arrebol/apc/service/views/EnabledUserDetailsViewServiceImpl.java new file mode 100644 index 0000000..b399c55 --- /dev/null +++ b/ace-controller/src/main/java/com/arrebol/apc/service/views/EnabledUserDetailsViewServiceImpl.java @@ -0,0 +1,43 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.service.views; + +import com.arrebol.apc.model.ModelParameter; +import com.arrebol.apc.model.views.EnabledUserDetailsView; +import com.arrebol.apc.model.views.constance.EnabledUserDetailsViewCfg; +import com.arrebol.apc.repository.LazyDataModelDAORepository; +import java.util.ArrayList; +import java.util.List; +import javax.enterprise.context.RequestScoped; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@RequestScoped +public class EnabledUserDetailsViewServiceImpl extends LazyDataModelDAORepository implements EnabledUserDetailsViewService { + + @Override + public List findEnabledUsersByOffice(String officeId) { + logger.debug("findEnabledUsersByOffice"); + try { + List parameters = new ArrayList<>(); + + parameters.add(new ModelParameter(EnabledUserDetailsViewCfg.PARAM_OFFICE_ID, officeId)); + + return xmlQueryAPCEntities(EnabledUserDetailsView.class, EnabledUserDetailsViewCfg.QUERY_FIND_ENABLED_USERS_BY_OFFICE, parameters); + } catch (Exception e) { + logger.error("findEnabledUsersByOffice", e); + return new ArrayList<>(); + } + } + + final Logger logger = LogManager.getLogger(getClass()); +} diff --git a/ace-controller/src/test/java/com/arrebol/apc/controller/admin/AdministrationPersonSearchViewControllerTest.java b/ace-controller/src/test/java/com/arrebol/apc/controller/admin/AdministrationPersonSearchViewControllerTest.java new file mode 100644 index 0000000..f1de3ee --- /dev/null +++ b/ace-controller/src/test/java/com/arrebol/apc/controller/admin/AdministrationPersonSearchViewControllerTest.java @@ -0,0 +1,47 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.model.views.AdministrationPersonSerchView; +import java.util.ArrayList; +import java.util.List; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class AdministrationPersonSearchViewControllerTest { + + private AdministrationPersonSearchViewController controller; + private final String person_search = "%mari%"; + private final String id_office = "caef3a64-7d1f-11ea-af3e-28f659da398e"; + private List routes; + + @Before + public void init() { + controller = new AdministrationPersonSearchViewController(); + routes = new ArrayList<>(); + + routes.add("51b207a2-8e19-11ea-b65e-4e1376171215"); + routes.add("5a329e3c-8e19-11ea-b65e-4e1376171215"); + routes.add("55baf3ae-8e19-11ea-b65e-4e1376171215"); + } + + @Test + public void existStableSmallBoxByCreatedOn() { + List results = controller.likePersonNameInPersonTypeInRoutesAndOffice(person_search, PeopleType.ENDORSEMENT, routes, id_office); + + results.forEach(System.out::println); + + Assert.assertTrue(!results.isEmpty()); + } +} diff --git a/ace-controller/src/test/java/com/arrebol/apc/controller/admin/ClosingDayControllerTest.java b/ace-controller/src/test/java/com/arrebol/apc/controller/admin/ClosingDayControllerTest.java new file mode 100644 index 0000000..e307df5 --- /dev/null +++ b/ace-controller/src/test/java/com/arrebol/apc/controller/admin/ClosingDayControllerTest.java @@ -0,0 +1,46 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import java.util.Calendar; +import java.util.Date; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class ClosingDayControllerTest { + + private Date date; + private ClosingDayController controller; + + @Before + public void init() { + Calendar calendar = Calendar.getInstance(); + + //2021-March-07 09:07:04 + calendar.set(2021, 2, 13, 9, 7, 4); + date = calendar.getTime(); + + controller = new ClosingDayController(); + } + + @Test + public void existStableSmallBoxByCreatedOn() { + Assert.assertTrue(controller.existStableSmallBoxByCreatedOn(date)); + } + + @Test + public void existNextPaidClosingDayByCreatedOn() { + Assert.assertTrue(controller.existNextPaidClosingDayByCreatedOn(date)); + } + +} diff --git a/ace-controller/src/test/java/com/arrebol/apc/controller/admin/StableGeneralBoxControllerTest.java b/ace-controller/src/test/java/com/arrebol/apc/controller/admin/StableGeneralBoxControllerTest.java new file mode 100644 index 0000000..949dd9b --- /dev/null +++ b/ace-controller/src/test/java/com/arrebol/apc/controller/admin/StableGeneralBoxControllerTest.java @@ -0,0 +1,40 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import java.util.Calendar; +import java.util.Date; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class StableGeneralBoxControllerTest { + + private Date date; + private StableGeneralBoxController controller; + + @Before + public void init() { + Calendar calendar = Calendar.getInstance(); + + //2021-March-07 09:07:04 + calendar.set(2021, 2, 13, 9, 7, 4); + date = calendar.getTime(); + + controller = new StableGeneralBoxController(); + } + + @Test + public void existNextPaidStableGeneralBoxByCreatedOn() { + Assert.assertTrue(controller.existNextPaidStableGeneralBoxByCreatedOn(date)); + } +} diff --git a/ace-controller/src/test/java/com/arrebol/apc/controller/admin/StableSmallBoxControllerTest.java b/ace-controller/src/test/java/com/arrebol/apc/controller/admin/StableSmallBoxControllerTest.java new file mode 100644 index 0000000..e816f8f --- /dev/null +++ b/ace-controller/src/test/java/com/arrebol/apc/controller/admin/StableSmallBoxControllerTest.java @@ -0,0 +1,45 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.admin; + +import java.util.Calendar; +import java.util.Date; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class StableSmallBoxControllerTest { + + private Date date; + private StableSmallBoxController controller; + + @Before + public void init() { + Calendar calendar = Calendar.getInstance(); + + //2021-March-07 09:07:04 + calendar.set(2021, 2, 13, 9, 7, 4); + date = calendar.getTime(); + + controller = new StableSmallBoxController(); + } + + @Test + public void existStableGeneralBoxByCreatedOn() { + Assert.assertTrue(controller.existStableGeneralBoxByCreatedOn(date)); + } + + @Test + public void existNextPaidStableSmallBoxByCreatedOn() { + Assert.assertTrue(controller.existNextPaidStableSmallBoxByCreatedOn(date)); + } +} diff --git a/ace-controller/src/test/java/com/arrebol/apc/controller/login/LoginControllerTest.java b/ace-controller/src/test/java/com/arrebol/apc/controller/login/LoginControllerTest.java new file mode 100644 index 0000000..6109817 --- /dev/null +++ b/ace-controller/src/test/java/com/arrebol/apc/controller/login/LoginControllerTest.java @@ -0,0 +1,62 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.login; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.UserByOffice; +import java.util.List; +import org.junit.Test; +import static org.junit.Assert.*; +import org.junit.Before; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class LoginControllerTest { + + private LoginController controller; + private UserByOffice ubo; + private String USER_DIRECTOR = "direccion"; + private String CEO = "ejecutivo"; + private String OFFICE_TEPIC = "caef3a64-7d1f-11ea-af3e-28f659da398e"; + private String OFFICE_GDL = "e0f1a2fc-7d1f-11ea-af3e-28f659da398e"; + + public LoginControllerTest() { + } + + @Before + public void init() { + User user = new User("", CEO); + Office office = new Office(OFFICE_GDL); + ubo = new UserByOffice(user, office); + controller = new LoginController(); + } + + @Test + public void getAllActiveOffice() { + try { + List offices = controller.getAllActiveOfficeController(); + + assertFalse(offices.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void findUserLogged() { + try { + assertNotNull(controller.findUserLoggedController(ubo)); + } catch (Exception e) { + assertFalse(true); + } + } + +} diff --git a/ace-controller/src/test/java/com/arrebol/apc/controller/system/employee/EmployeeControllerTest.java b/ace-controller/src/test/java/com/arrebol/apc/controller/system/employee/EmployeeControllerTest.java new file mode 100644 index 0000000..cbfcf00 --- /dev/null +++ b/ace-controller/src/test/java/com/arrebol/apc/controller/system/employee/EmployeeControllerTest.java @@ -0,0 +1,122 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.system.employee; + +import com.arrebol.apc.model.admin.Bonus; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.HumanResourceByOffice; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ApplicationOwner; +import com.arrebol.apc.model.enums.HumanResourceStatus; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.UUID; +import org.junit.Test; +import static org.junit.Assert.*; +import org.junit.Before; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class EmployeeControllerTest { + + private EmployeeController controller; + private String JANITZIO = "13c588a6-7d1b-11ea-af3e-28f659da398e"; + private String RUBEN = "0dc7c246-7db8-11ea-9b1f-500320958bf8"; + private String DIRECCION_JANITZIO = "5751074e-7d1b-11ea-af3e-28f659da398e"; + private String OFFICE_TEPIC = "caef3a64-7d1f-11ea-af3e-28f659da398e"; + private String OFFICE_GDL = "e0f1a2fc-7d1f-11ea-af3e-28f659da398e"; + + public EmployeeControllerTest() { + } + + @Before + public void init() { + controller = new EmployeeController(); + } + + //@Test + public void findEmployeesByType() { + try { + List result = controller.findEmployeesByType( + new Office(OFFICE_GDL), + HumanResourceStatus.ENEBLED, + JANITZIO + ); + + result.forEach(System.out::println); + + assertFalse(result.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + //@Test + public void findEmployeesInType() { + try { + List resourceStatuses = new ArrayList<>(); + + resourceStatuses.add(HumanResourceStatus.ENEBLED); + resourceStatuses.add(HumanResourceStatus.DISABLED); + + List result = controller.findEmployeesInType( + new Office(OFFICE_GDL), + resourceStatuses, + JANITZIO + ); + + result.forEach(System.out::println); + + assertFalse(result.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + //@Test + public void saveHRController() { + try { + HumanResource hr = new HumanResource(); + hr.setId(UUID.randomUUID().toString()); + hr.setFirstName("Empleado 1"); + hr.setSecondName("Empleado 1"); + hr.setLastName("Paterno 1"); + hr.setMiddleName("Materno 2"); + hr.setAvatar("images/avatar.png"); + //hr.setHumanResourceType(HumanResourceType.ADVISER); + hr.setHumanResourceStatus(HumanResourceStatus.ENEBLED); + hr.setCreatedBy(DIRECCION_JANITZIO); + + HumanResourceByOffice humanResourceByOffice = new HumanResourceByOffice( + new Office(OFFICE_GDL), + DIRECCION_JANITZIO, + new Date(), + ApplicationOwner.APP_USER + ); + + assertTrue(controller.saveHRController(humanResourceByOffice, hr)); + + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void findAllActiveBonus() { + try { + List bonuses = controller.findAllActiveBonus(OFFICE_TEPIC); + + assertTrue(bonuses.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } +} diff --git a/ace-controller/src/test/java/com/arrebol/apc/controller/system/user/UserAccessControllerTest.java b/ace-controller/src/test/java/com/arrebol/apc/controller/system/user/UserAccessControllerTest.java new file mode 100644 index 0000000..0f48fb2 --- /dev/null +++ b/ace-controller/src/test/java/com/arrebol/apc/controller/system/user/UserAccessControllerTest.java @@ -0,0 +1,66 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.system.user; + +import com.arrebol.apc.model.core.Permission; +import com.arrebol.apc.model.core.UserByOffice; +import java.util.List; +import org.junit.Test; +import static org.junit.Assert.*; +import org.junit.Before; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserAccessControllerTest { + + private UserAccessController controller; + private UserByOffice userByOffice; + + public UserAccessControllerTest() { + } + + @Before + public void init() { + controller = new UserAccessController(); + userByOffice = new UserByOffice("d855f570-7dbb-11ea-9b1f-500320958bf8"); + } + + //@Test + public void loadUserByOfficePermissionLst() { + try { + List source = controller.loadUserByOfficePermissionLst(userByOffice, true); + List target = controller.loadUserByOfficePermissionLst(userByOffice, false); + + System.out.println("SOURCE"); + source.forEach(System.out::println); + System.out.println("TARGET"); + target.forEach(System.out::println); + + assertFalse(source.isEmpty()); + assertFalse(target.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void findAllEnebledPermissions() { + try { + List permissions = controller.findAllEnebledPermissions(); + + permissions.forEach(System.out::println); + + assertFalse(permissions.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + +} diff --git a/ace-controller/src/test/java/com/arrebol/apc/controller/system/user/UserCreateControllerTest.java b/ace-controller/src/test/java/com/arrebol/apc/controller/system/user/UserCreateControllerTest.java new file mode 100644 index 0000000..0f8766d --- /dev/null +++ b/ace-controller/src/test/java/com/arrebol/apc/controller/system/user/UserCreateControllerTest.java @@ -0,0 +1,99 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.system.user; + +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.model.enums.HumanResourceStatus; +import java.util.List; +import static org.junit.Assert.*; +import org.junit.Before; +import org.junit.Test; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserCreateControllerTest { + + private UserCreateController controller; + private String USER_DIRECTOR = "DireCCioNa"; + private String CEO = "ejecutivo"; + private String USER_GLD_JANITZIO = "5751074e-7d1b-11ea-af3e-28f659da398e"; + private String OFFICE_TEPIC = "caef3a64-7d1f-11ea-af3e-28f659da398e"; + private String OFFICE_GDL = "e0f1a2fc-7d1f-11ea-af3e-28f659da398e"; + + @Before + public void init() { + controller = new UserCreateController(); + } + + @Test + public void isUsernameAvailableController() { + try { + assertTrue(controller.isUsernameAvailableController(USER_DIRECTOR, OFFICE_GDL)); + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void findAllHRsWithoutUser() { + try { + List result = controller.findAllHRsWithoutUser(new Office(OFFICE_GDL), HumanResourceStatus.ENEBLED); + + result.forEach(System.out::println); + + assertFalse(result.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void findIdOfUserByOffice() { + try { + UserByOffice userByOffice = controller.findIdOfUserByOffice(USER_GLD_JANITZIO, OFFICE_GDL); + + System.out.println(userByOffice); + + assertNotNull(userByOffice); + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void findRoutesByOffice() { + try { + List result = controller.findRoutesByOffice(OFFICE_GDL); + + result.forEach(System.out::println); + + assertFalse(result.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void findRoutesWithNoCertifierUser() { + try { + List result = controller.findRoutesWithNoCertifierUser(OFFICE_TEPIC); + + result.forEach(System.out::println); + + assertTrue(result.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } + +} diff --git a/ace-controller/src/test/java/com/arrebol/apc/controller/system/user/UserUpdateControllerTest.java b/ace-controller/src/test/java/com/arrebol/apc/controller/system/user/UserUpdateControllerTest.java new file mode 100644 index 0000000..23b7673 --- /dev/null +++ b/ace-controller/src/test/java/com/arrebol/apc/controller/system/user/UserUpdateControllerTest.java @@ -0,0 +1,64 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.system.user; + +import com.arrebol.apc.model.core.Permission; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.model.enums.UserStatus; +import java.util.ArrayList; +import java.util.List; +import org.junit.Test; +import static org.junit.Assert.*; +import org.junit.Before; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class UserUpdateControllerTest { + + private UserUpdateController controller; + private final String OWNER_ID = "0dc7c246-7db8-11ea-9b1f-500320958bf8"; + private final String BALAM_UBO_ID = "caee5744-017b-4d1b-83f4-9087631cce4a"; + private final String BALAM_HR_ID = "9dc91af3-8c95-4234-b188-4e193e04e6bc"; + private final String YUNUEN_UBO_ID = "e9b4d118-da8a-48ac-aac8-50327294be71"; + private final String YUNUEN_HR_ID = "6ec0f133-bb05-4be9-ab9d-ec7b89d344ac"; + private final String OFFICE_ID = "caef3a64-7d1f-11ea-af3e-28f659da398e"; + private final boolean IS_ROUTE = true; + private final boolean IN = false; + + @Before + public void init() { + controller = new UserUpdateController(); + } + + @Test + public void findUsersInOfficeInStatuses() { + try { + List statuses = new ArrayList<>(); + + statuses.add(UserStatus.ENEBLED); + controller.findUsersInOfficeInStatuses(statuses, OFFICE_ID, OWNER_ID); + } catch (Exception e) { + assertFalse(true); + } + } + + @Test + public void findList() { + try { + List result = controller.findList(IS_ROUTE, IN, BALAM_UBO_ID, BALAM_HR_ID, OFFICE_ID); + + System.out.println("Size of the list: " + result.size()); + result.forEach(System.out::println); + assertFalse(result.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } +} diff --git a/ace-controller/src/test/java/com/arrebol/apc/controller/topbar/TopBarControllerTest.java b/ace-controller/src/test/java/com/arrebol/apc/controller/topbar/TopBarControllerTest.java new file mode 100644 index 0000000..4ac01a8 --- /dev/null +++ b/ace-controller/src/test/java/com/arrebol/apc/controller/topbar/TopBarControllerTest.java @@ -0,0 +1,46 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.controller.topbar; + +import com.arrebol.apc.model.core.Office; +import java.util.List; +import org.junit.Test; +import static org.junit.Assert.*; +import org.junit.Before; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class TopBarControllerTest { + + private TopBarController controller; + private final String USER_ID = "5751074e-7d1b-11ea-af3e-28f659da398e"; + private final String OFFICE_ID = "e0f1a2fc-7d1f-11ea-af3e-28f659da398e"; + + public TopBarControllerTest() { + } + + @Before + public void init() { + controller = new TopBarController(); + } + + @Test + public void findAllOfficesByUser() { + try { + List offices = controller.findAllOfficesByUserController(USER_ID); + + offices.forEach(System.out::println); + + assertFalse(offices.isEmpty()); + } catch (Exception e) { + assertFalse(true); + } + } +} diff --git a/ace-controller/src/test/resources/apc.cfg.xml b/ace-controller/src/test/resources/apc.cfg.xml new file mode 100644 index 0000000..7179e6f --- /dev/null +++ b/ace-controller/src/test/resources/apc.cfg.xml @@ -0,0 +1,224 @@ + + + + + org.hibernate.dialect.MySQLDialect + com.mysql.cj.jdbc.Driver + jdbc:mysql://localhost:3306/apo_pro_com_april_ten?serverTimezone=GMT-5 + apoprocomlocalhost + Yj$2Da0z! + 1 + 2 + 300 + 50 + 3000 + false + false + true + thread + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-controller/src/test/resources/log4j2.xml b/ace-controller/src/test/resources/log4j2.xml new file mode 100644 index 0000000..9611256 --- /dev/null +++ b/ace-controller/src/test/resources/log4j2.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-db/build.xml b/ace-db/build.xml new file mode 100644 index 0000000..8735ff9 --- /dev/null +++ b/ace-db/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project ace-db. + + + diff --git a/ace-db/manifest.mf b/ace-db/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/ace-db/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/ace-db/nbproject/build-impl.xml b/ace-db/nbproject/build-impl.xml new file mode 100644 index 0000000..b577b5a --- /dev/null +++ b/ace-db/nbproject/build-impl.xml @@ -0,0 +1,1771 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ace-db/nbproject/genfiles.properties b/ace-db/nbproject/genfiles.properties new file mode 100644 index 0000000..fbc37bf --- /dev/null +++ b/ace-db/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=12e85bef +build.xml.script.CRC32=0aedc5cc +build.xml.stylesheet.CRC32=f85dc8f2@1.98.0.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=12e85bef +nbproject/build-impl.xml.script.CRC32=3953416a +nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.104.0.48 diff --git a/ace-db/nbproject/private/private.properties b/ace-db/nbproject/private/private.properties new file mode 100644 index 0000000..ccc44d8 --- /dev/null +++ b/ace-db/nbproject/private/private.properties @@ -0,0 +1 @@ +user.properties.file=C:\\Users\\oscar\\AppData\\Roaming\\NetBeans\\15\\build.properties diff --git a/ace-db/nbproject/project.properties b/ace-db/nbproject/project.properties new file mode 100644 index 0000000..e20ff6c --- /dev/null +++ b/ace-db/nbproject/project.properties @@ -0,0 +1,86 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/ace-db.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class= +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/ace-db/nbproject/project.xml b/ace-db/nbproject/project.xml new file mode 100644 index 0000000..ba33244 --- /dev/null +++ b/ace-db/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + ace-db + + + + + + + + + diff --git a/ace-db/src/XXXXXXXX.sql b/ace-db/src/XXXXXXXX.sql new file mode 100644 index 0000000..261405d --- /dev/null +++ b/ace-db/src/XXXXXXXX.sql @@ -0,0 +1,303 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +/** + * Author: Oscar + * Created: 11/01/2022 + */ + +CREATE OR REPLACE VIEW `APC_INFORMATION_LOAN_WEEK_VIEW` AS +SELECT +l.id, +u.id as id_user, +r.id_office, +l.created_on as fecha, +lt.payment as apoyos, +lt.payment_total as apoyos_total, +lt.opening_fee as comision_apertura, +CONCAT(endor.first_name,' ', IF(ISNULL(endor.second_name) ,'', CONCAT(endor.second_name,' ')) ,endor.last_name, ' ', endor.middle_name) AS aval, +CONCAT(cus.first_name,' ', IF(ISNULL(cus.second_name) ,'', CONCAT(cus.second_name,' ')) ,cus.last_name, ' ', cus.middle_name) AS customer, +l.amount_to_pay as documento_por, +lt.payment_daily as abono_diario, +l.amount_paid, +(l.amount_to_pay - l.amount_paid) saldo_insoluto, +r.route_name, +CONCAT(hr.first_name,' ', IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name,' ')) ,hr.last_name, ' ', hr.middle_name) AS asesor, +(SELECT COUNT(lfn.id) FROM APC_LOAN_FEE_NOTIFICATION lfn WHERE lfn.id_loan = l.id) as num_fee, +-- Lunes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_monday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_monday, +-- Martes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_tuesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_tuesday, +-- Miercoles +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) +AND YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_wednesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_wednesday, +-- Jueves +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_thursday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_thursday, +-- Viernes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_friday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_friday, +-- Sabado +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_saturday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_saturday, + +((lt.payment_daily * (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5 , COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) +- (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) as faltante, + +CASE WHEN l.new_customer = 'ENEBLED' AND WEEK(DATE(l.created_on),1) = WEEK(CURDATE(),1) THEN 'Si' ELSE 'No' END as new_customer, +if((SELECT COUNT(id_loan_old) FROM APC_LOAN_BY_RENOVATION lbr +INNER JOIN APC_LOAN lRenovation ON lbr.id_loan_new = lRenovation.id +WHERE id_loan_old = l.id + AND loan_by_renovation_status = 'APPROVED' and WEEK(DATE(lRenovation.created_on),1) <= WEEK(CURDATE(),1) AND + YEAR(DATE(lRenovation.created_on)) = YEAR(CURDATE())) = 0 , 'No' , 'Si') as renovation, +l.loan_status as estatus_prestamo, +(SELECT COUNT(DISTINCT(DATE(ldFaltante.created_on))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_all, +(SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_week, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND ldLunes.loan_details_type IN ('FEE')) as fee_todos +FROM +APC_LOAN l +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE cus ON cus.id = l.id_customer +INNER JOIN APC_PEOPLE endor ON endor.id = l.id_endorsement +INNER JOIN APC_ROUTE r ON r.id = l.id_route +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +INNER JOIN APC_USER u ON u.id = lbu.id_user +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +WHERE +l.loan_status not in ('DELETED','REJECTED') AND +((SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) > 0 OR + ((SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) = 0 AND l.loan_status = 'APPROVED' AND + WEEK(DATE(l.created_on),1) <= (WEEK(CURDATE(),1)))); +---------------------------------------------------------------- +---------------------------------------------------------------- +CREATE OR REPLACE VIEW `APC_INFORMATION_LOAN_LAST_WEEK_VIEW` AS +SELECT +l.id, +u.id as id_user, +r.id_office, +l.created_on as fecha, +lt.payment as apoyos, +lt.payment_total as apoyos_total, +lt.opening_fee as comision_apertura, +CONCAT(endor.first_name,' ', IF(ISNULL(endor.second_name) ,'', CONCAT(endor.second_name,' ')) ,endor.last_name, ' ', endor.middle_name) AS aval, +CONCAT(cus.first_name,' ', IF(ISNULL(cus.second_name) ,'', CONCAT(cus.second_name,' ')) ,cus.last_name, ' ', cus.middle_name) AS customer, +l.amount_to_pay as documento_por, +lt.payment_daily as abono_diario, +l.amount_paid, +(l.amount_to_pay - l.amount_paid) saldo_insoluto, +r.route_name, +CONCAT(hr.first_name,' ', IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name,' ')) ,hr.last_name, ' ', hr.middle_name) AS asesor, +(SELECT COUNT(lfn.id) FROM APC_LOAN_FEE_NOTIFICATION lfn WHERE lfn.id_loan = l.id) as num_fee, +-- Lunes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_monday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_monday, +-- Martes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_tuesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_tuesday, +-- Miercoles +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_wednesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_wednesday, +-- Jueves +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_thursday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_thursday, +-- Viernes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_friday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_friday, +-- Sabado +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_saturday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_saturday, + +((lt.payment_daily * (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) +- (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) as faltante, + +CASE WHEN l.new_customer = 'ENEBLED' AND WEEK(DATE(l.created_on),1) = (WEEK(CURDATE(),1) - 1) THEN 'Si' ELSE 'No' END as new_customer, +(SELECT IF(COUNT(id_loan_old) = 0 , 'No' , 'Si') FROM APC_LOAN_BY_RENOVATION lbr +INNER JOIN APC_LOAN lRenovation ON lbr.id_loan_new = lRenovation.id +WHERE id_loan_old = l.id + AND loan_by_renovation_status = 'APPROVED' and WEEK(DATE(lRenovation.created_on),1) <= (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(lRenovation.created_on)) = YEAR(CURDATE())) as renovation, +l.loan_status as estatus_prestamo, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as abono_semana_actual, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('FEE')) as fee_semana_actual, +(SELECT COUNT(DISTINCT(DATE(ldFaltante.created_on))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND DATE(ldFaltante.created_on) <= DATE('2022-01-23') and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_all, +(SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_week, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) <= DATE('2022-01-23') +AND ldLunes.loan_details_type IN ('FEE')) as fee_todos +FROM +APC_LOAN l +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE cus ON cus.id = l.id_customer +INNER JOIN APC_PEOPLE endor ON endor.id = l.id_endorsement +INNER JOIN APC_ROUTE r ON r.id = l.id_route +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +INNER JOIN APC_USER u ON u.id = lbu.id_user +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +WHERE +l.loan_status not in ('DELETED','REJECTED') AND +((SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) > 0 OR + ((SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) = 0 AND l.loan_status = 'APPROVED' AND + WEEK(DATE(l.created_on),1) <= (WEEK(CURDATE(),1) - 1))); \ No newline at end of file diff --git a/ace-db/src/apc-config-db-aws.sql b/ace-db/src/apc-config-db-aws.sql new file mode 100644 index 0000000..5785fe7 --- /dev/null +++ b/ace-db/src/apc-config-db-aws.sql @@ -0,0 +1,133 @@ +-- -------------------------------------------------------- +-- Arrebol Consuntancy +-- version 1.0.1 +-- http://www.arrebolconsultancy.com +-- -------------------------------------------------------- + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; +-- SET time_zone = "+00:00"; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- -------------------------------------------------------- + +-- +-- Base de datos: `apo_pro_com_april_ten` +-- +USE `apo_pro_com_april_ten`; + +-- -------------------------------------------------------- + +-- +-- Drop users: apoprocom & errortrace +-- +DROP USER IF EXISTS 'apoprocom'@'%'; +DROP USER IF EXISTS 'errortrace'@'%'; +DROP USER IF EXISTS 'apoprocommobile'@'%'; +DROP USER IF EXISTS 'apcreportdesktop'@'%'; +-- -------------------------------------------------------- + +-- +-- App user: `apoprocom` application user +-- + +CREATE USER 'apoprocom'@'%' + IDENTIFIED BY 'Yj$2Da0z!'; + +GRANT SELECT ON apo_pro_com_april_ten.* TO 'apoprocom'@'%'; +GRANT INSERT, UPDATE, DELETE ON apo_pro_com_april_ten.* TO 'apoprocom'@'%'; +GRANT EXECUTE ON apo_pro_com_april_ten.* TO 'apoprocom'@'%'; + +-- -------------------------------------------------------- + +-- +-- Error trace user: `errortrace` DB user +-- + +-- -------------------------------------------------------- + +CREATE USER 'errortrace'@'%' + IDENTIFIED BY 'zy61$Jql'; +GRANT ALL ON apo_pro_com_april_ten.APC_ERROR_APP_LOG TO 'errortrace'@'%'; + +-- -------------------------------------------------------- + +-- +-- Error trace user: `apoprocommobile` DB user +-- + +-- -------------------------------------------------------- + +CREATE USER 'apoprocommobile'@'%' + IDENTIFIED BY '0Ps$6%q8'; + +GRANT SELECT, INSERT, DELETE ON apo_pro_com_april_ten.APC_LOAN_DETAIL TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT, DELETE ON apo_pro_com_april_ten.APC_LOAN_FEE_NOTIFICATION TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT ON apo_pro_com_april_ten.APC_DELIVERY TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT ON apo_pro_com_april_ten.APC_OTHER_EXPENSE TO 'apoprocommobile'@'%'; + +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN_BY_RENOVATION TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN_BY_USER TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_USER_MOBILE_PREFERECE TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_PEOPLE TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_TRANSFER TO 'apoprocommobile'@'%'; +-- SELECT +GRANT SELECT ON apo_pro_com_april_ten.APC_OFFICE TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_USER TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_TYPE TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_MONEY_DAILY TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CLOSING_DAY TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_HUMAN_RESOURCE_HAS_ROUTE TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_ROUTE TO 'apoprocommobile'@'%'; +-- Views +GRANT SELECT ON apo_pro_com_april_ten.APC_SECURITY_AUTHENTICATION_MOBILE TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_BY_USER_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_BY_USER_ORDER_PREFERENCE_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PERSON_SEARCH_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PERSON_SEARCH_DETAIL_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_AVAILABLE_CUSTOMERS_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_AVAILABLE_ENDORSEMENTS_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CASH_REGISTER_CURDATE_BY_USER_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_TO_DELIVERY_BY_CERTIFIER_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_EXCHANGE_ENEBLED_USERS_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_TOTAL_CASH_BY_CURDATE_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PERSON_SEARCH_HISTORICAL_DETAILS_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_APPROVED_DETAIL_VIEW TO 'apoprocommobile'@'%'; +-- ---------------------------------------------------------------------- +GRANT ALL ON apo_pro_com_april_ten.ARREBOL_TEST TO 'apoprocommobile'@'%'; +-- -------------------------------------------------------- + +-- +-- App user: `apcreportdesktop` report desktop user +-- + +CREATE USER 'apcreportdesktop'@'%' + IDENTIFIED BY 'hY5znQ8j'; + +GRANT SELECT ON apo_pro_com_april_ten.APC_USER TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_HUMAN_RESOURCE TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_TOTAL_CASH_BY_CURDATE_VIEW TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW_REPORT TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_STABLE_SMALL_BOX TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CLOSING_DAY TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_MONEY_DAILY TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PAYROLL TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_ADVANCE TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_EXPENSE_COMPANY TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_STABLE_GENERAL_BOX TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_TYPE TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_DETAIL TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_BY_USER TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_OFFICE TO 'apcreportdesktop'@'%'; +-- ---------------------------------------------------------------------- +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; \ No newline at end of file diff --git a/ace-db/src/apc-config-db-localhost.sql b/ace-db/src/apc-config-db-localhost.sql new file mode 100644 index 0000000..cdb1dd6 --- /dev/null +++ b/ace-db/src/apc-config-db-localhost.sql @@ -0,0 +1,133 @@ +-- -------------------------------------------------------- +-- Arrebol Consuntancy +-- version 1.0.1 +-- http://www.arrebolconsultancy.com +-- -------------------------------------------------------- + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; +-- SET time_zone = "+00:00"; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- -------------------------------------------------------- + +-- +-- Base de datos: `apo_pro_com_april_ten` +-- +USE `apo_pro_com_april_ten`; + +-- -------------------------------------------------------- + +-- +-- Drop users: apoprocomlocalhost & errortracelocalhost +-- +DROP USER IF EXISTS 'apoprocomlocalhost'@'localhost'; +DROP USER IF EXISTS 'errortracelocalhost'@'localhost'; +DROP USER IF EXISTS 'apoprocommobilelocalhost'@'localhost'; +DROP USER IF EXISTS 'apcreportdesktop'@'localhost'; +-- -------------------------------------------------------- + +-- +-- App user: `apoprocomlocalhost` application user +-- + +CREATE USER 'apoprocomlocalhost'@'localhost' + IDENTIFIED BY 'Yj$2Da0z!'; + +GRANT SELECT ON apo_pro_com_april_ten.* TO 'apoprocomlocalhost'@'localhost'; +GRANT INSERT, UPDATE, DELETE ON apo_pro_com_april_ten.* TO 'apoprocomlocalhost'@'localhost'; +GRANT EXECUTE ON apo_pro_com_april_ten.* TO 'apoprocomlocalhost'@'localhost'; + +-- -------------------------------------------------------- + +-- +-- Error trace user: `errortracelocalhost` DB user +-- + +-- -------------------------------------------------------- + +CREATE USER 'errortracelocalhost'@'localhost' + IDENTIFIED BY 'zy61$Jql'; +GRANT ALL ON apo_pro_com_april_ten.APC_ERROR_APP_LOG TO 'errortracelocalhost'@'localhost'; + +-- -------------------------------------------------------- + +-- +-- Error trace user: `apoprocommobilelocalhost` DB user +-- + +-- -------------------------------------------------------- + +CREATE USER 'apoprocommobilelocalhost'@'localhost' + IDENTIFIED BY '0Ps$6%q8'; + +GRANT SELECT, INSERT, DELETE ON apo_pro_com_april_ten.APC_LOAN_DETAIL TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, DELETE ON apo_pro_com_april_ten.APC_LOAN_FEE_NOTIFICATION TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT ON apo_pro_com_april_ten.APC_DELIVERY TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT ON apo_pro_com_april_ten.APC_OTHER_EXPENSE TO 'apoprocommobilelocalhost'@'localhost'; + +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN_BY_RENOVATION TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN_BY_USER TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_USER_MOBILE_PREFERECE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_PEOPLE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_TRANSFER TO 'apoprocommobilelocalhost'@'localhost'; +-- SELECT +GRANT SELECT ON apo_pro_com_april_ten.APC_OFFICE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_USER TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_TYPE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_MONEY_DAILY TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CLOSING_DAY TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_HUMAN_RESOURCE_HAS_ROUTE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_ROUTE TO 'apoprocommobilelocalhost'@'localhost'; +-- Views +GRANT SELECT ON apo_pro_com_april_ten.APC_SECURITY_AUTHENTICATION_MOBILE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_BY_USER_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_BY_USER_ORDER_PREFERENCE_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PERSON_SEARCH_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PERSON_SEARCH_DETAIL_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_AVAILABLE_CUSTOMERS_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_AVAILABLE_ENDORSEMENTS_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CASH_REGISTER_CURDATE_BY_USER_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_TO_DELIVERY_BY_CERTIFIER_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_EXCHANGE_ENEBLED_USERS_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_TOTAL_CASH_BY_CURDATE_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PERSON_SEARCH_HISTORICAL_DETAILS_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_APPROVED_DETAIL_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +-- ------------------------------------------------------------------------------------- +GRANT ALL ON apo_pro_com_april_ten.ARREBOL_TEST TO'apoprocommobilelocalhost'@'localhost'; +-- -------------------------------------------------------- + +-- +-- App user: `apcreportdesktop` report desktop user +-- + +CREATE USER 'apcreportdesktop'@'localhost' + IDENTIFIED BY 'hY5znQ8j'; + +GRANT SELECT ON apo_pro_com_april_ten.APC_USER TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_HUMAN_RESOURCE TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_TOTAL_CASH_BY_CURDATE_VIEW TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW_REPORT TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_STABLE_SMALL_BOX TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CLOSING_DAY TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_MONEY_DAILY TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PAYROLL TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_ADVANCE TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_EXPENSE_COMPANY TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_STABLE_GENERAL_BOX TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_TYPE TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_DETAIL TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_BY_USER TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_OFFICE TO 'apcreportdesktop'@'localhost'; +-- ------------------------------------------------------------------------------------- +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; \ No newline at end of file diff --git a/ace-db/src/apc-db-populate-empty.sql b/ace-db/src/apc-db-populate-empty.sql new file mode 100644 index 0000000..382f3b4 --- /dev/null +++ b/ace-db/src/apc-db-populate-empty.sql @@ -0,0 +1,27 @@ +-- -------------------------------------------------------- +-- Arrebol Consuntancy +-- version 1.0.1 +-- http://www.arrebolconsultancy.com +-- -------------------------------------------------------- + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; +-- SET time_zone = "+00:00"; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- -------------------------------------------------------- + +-- +-- Base de datos: Select `apo_pro_com_april_ten` DB +-- +USE `apo_pro_com_april_ten`; + +COMMIT; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/ace-db/src/apc-db-populate.sql b/ace-db/src/apc-db-populate.sql new file mode 100644 index 0000000..62d1dd8 --- /dev/null +++ b/ace-db/src/apc-db-populate.sql @@ -0,0 +1,515 @@ +-- -------------------------------------------------------- +-- Arrebol Consuntancy +-- version 1.0.1 +-- http://www.arrebolconsultancy.com +-- -------------------------------------------------------- + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; +-- SET time_zone = "+00:00"; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- -------------------------------------------------------- + +-- +-- Base de datos: Select `apo_pro_com_april_ten` DB +-- +USE `apo_pro_com_april_ten`; +-- -------------------------------------------------------- +-- +-- Volcado de datos para la tabla `APC_ROLE` +-- +INSERT INTO APC_ROLE(id,role_name,active_status,created_by) +VALUES +('56dd386a-88c8-11ea-a6b0-82987069bf80','DIRECTOR GENERAL','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('b9c76e82-88c8-11ea-a6b0-82987069bf80','GERENCIA','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('e7fbf750-88c8-11ea-a6b0-82987069bf80','SUPERVISOR REGIONAL','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('ee39d1aa-88c8-11ea-a6b0-82987069bf80','CERTIFICADOR Y FACILITADOR DE CREDITO','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('3e07c998-a81e-11ea-aa38-77eb3547c70f','JEFE DE ASESORES','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('b5b506f9-3ca4-4ceb-b938-dc58da3f039b','ASESORES DE CREDITO Y COBRANZA','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('e67360db-5953-46ba-9fe1-d71e30ae9b59','JURIDICO','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('b691aea2-3ba5-4e4d-a256-37f749a310bd','JEFE DE PERSONAL PRO FAM','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('44cb12f9-19e6-439a-9cd9-abdf4af38651','EJECUTIVO DE RUTA PRO FAM','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('23259ba5-7a0e-4503-a470-b8bd900635e1','AUXILIAR DE RUTA PRO FAM.','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'); +-- -------------------------------------------------------- +-- +-- Volcado de datos para la tabla `APC_HUMAN_RESOURCE` +-- +INSERT INTO APC_HUMAN_RESOURCE(id,first_name,second_name,last_name,middle_name,birthdate,avatar,human_resource_status, id_role ,created_by) +VALUES +('13c588a6-7d1b-11ea-af3e-28f659da398e','Carlos','Janitzio','Zavala','Lopez',str_to_date('1977-03-02','%Y-%m-%d'),'images/avatar1.png','ENEBLED','b9c76e82-88c8-11ea-a6b0-82987069bf80','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('cb5e8bec-7db7-11ea-9b1f-500320958bf8','Oscar','Armando','Vargas','Cardenas',str_to_date('1977-03-02','%Y-%m-%d'),'images/avatar2.png','ENEBLED','b9c76e82-88c8-11ea-a6b0-82987069bf80','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('ebae5148-7db7-11ea-9b1f-500320958bf8','Ruben','Ruben','Campos','Campos',str_to_date('1977-03-02','%Y-%m-%d'),'images/avatar3.png','ENEBLED','b9c76e82-88c8-11ea-a6b0-82987069bf80','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('c021214a-8bc7-11ea-b45c-c7b846343364','Avatar 1','Avatar 1','Campos','Campos',str_to_date('1977-03-02','%Y-%m-%d'),'https://freisteller24.eu/wp-content/uploads/2017/11/26603674-1200x1200.jpg','ENEBLED','e7fbf750-88c8-11ea-a6b0-82987069bf80','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('d2869da6-8bc7-11ea-b45c-c7b846343364','Avatar 2','Avatar 2','Campos','Campos',str_to_date('1977-03-02','%Y-%m-%d'),'https://freisteller24.eu/wp-content/uploads/2017/11/97783667-1200x1200.jpg','ENEBLED','3e07c998-a81e-11ea-aa38-77eb3547c70f','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('088d7268-8bc7-11ea-b45c-c7b846343364','Avatar 4','Avatar 4','Campos','Campos',str_to_date('1977-03-02','%Y-%m-%d'),'https://freisteller24.eu/wp-content/uploads/2017/10/573675226-1200x1200.jpg','ENEBLED','e7fbf750-88c8-11ea-a6b0-82987069bf80','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('c687acca-8bc7-11ea-b45c-c7b846343364','Avatar 3','Avatar 3','Campos','Campos',str_to_date('1977-03-02','%Y-%m-%d'),'https://freisteller24.eu/wp-content/uploads/2017/10/653323645.jpg','ENEBLED','ee39d1aa-88c8-11ea-a6b0-82987069bf80','0dc7c246-7db8-11ea-9b1f-500320958bf8'); +-- -------------------------------------------------------- +-- +-- Volcado de datos para la tabla `APC_OFFICE` +-- +INSERT INTO APC_OFFICE(id,office_name,office_status,created_by) +VALUES +-- Tepic +('caef3a64-7d1f-11ea-af3e-28f659da398e','TEPIC','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Compostela +('e0f1a2fc-7d1f-11ea-af3e-28f659da398e','COMPOSTELA','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('a7fa34c1-f549-49d9-a262-4d61af50d8c4','PROYECTOS FAMILIARES','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('1223d3a5-092e-49a5-9d94-f05af4720342','JURIDICO','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'); +-- -------------------------------------------------------- +-- +-- Add APC_HUMAN_RESOURCE_BY_OFFICE +-- +INSERT INTO APC_HUMAN_RESOURCE_BY_OFFICE(id,id_human_resource,id_office,application_owner,created_by) +VALUES +-- Janitzio GDL +('e540fd40-8246-11ea-9f9f-a9ab5ed40dc4','13c588a6-7d1b-11ea-af3e-28f659da398e','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Oscar Tepic +('14affe8c-8247-11ea-9f9f-a9ab5ed40dc4','cb5e8bec-7db7-11ea-9b1f-500320958bf8','caef3a64-7d1f-11ea-af3e-28f659da398e','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Ruben Tepic +('f41be05a-8246-11ea-9f9f-a9ab5ed40dc4','ebae5148-7db7-11ea-9b1f-500320958bf8','caef3a64-7d1f-11ea-af3e-28f659da398e','APP_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Ruben GDL +('0a8cf342-8247-11ea-9f9f-a9ab5ed40dc4','ebae5148-7db7-11ea-9b1f-500320958bf8','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','APP_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Avatar 1 Tepic +('0fc73388-8bc8-11ea-b45c-c7b846343364','c021214a-8bc7-11ea-b45c-c7b846343364','caef3a64-7d1f-11ea-af3e-28f659da398e','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Avatar 2 Tepic +('2412e3d2-8bc8-11ea-b45c-c7b846343364','d2869da6-8bc7-11ea-b45c-c7b846343364','caef3a64-7d1f-11ea-af3e-28f659da398e','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Avatar 4 GDL +('32ea4a62-8bc8-11ea-b45c-c7b846343364','088d7268-8bc7-11ea-b45c-c7b846343364','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Avatar 3 Tepic +('49662edc-8bc8-11ea-b45c-c7b846343364','c687acca-8bc7-11ea-b45c-c7b846343364','caef3a64-7d1f-11ea-af3e-28f659da398e','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'); +-- -------------------------------------------------------- +-- +-- Volcado de datos para la tabla `APC_USER` +-- +INSERT INTO APC_USER(id,id_human_resource,user_name,pwd,user_type,user_status,application_owner,created_by,certifier) +VALUES +-- Janitzio WEB +('5751074e-7d1b-11ea-af3e-28f659da398e','13c588a6-7d1b-11ea-af3e-28f659da398e','direccion','8478A4A2819E9C06AB738123C5D04B4FA1AA67548EBA64EAD40B635EA8AA8D5B','WEB','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8','DISABLED'), +-- Oscar WEB +('092a95d8-7db8-11ea-9b1f-500320958bf8','cb5e8bec-7db7-11ea-9b1f-500320958bf8','direccion','8478A4A2819E9C06AB738123C5D04B4FA1AA67548EBA64EAD40B635EA8AA8D5B','WEB','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8','DISABLED'), +-- Ruben WEB +('0dc7c246-7db8-11ea-9b1f-500320958bf8','ebae5148-7db7-11ea-9b1f-500320958bf8','ejecutivo','8478A4A2819E9C06AB738123C5D04B4FA1AA67548EBA64EAD40B635EA8AA8D5B','WEB','ENEBLED','APP_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8','DISABLED'), +-- Avatar 1 MOBILE +('67b3081e-8bc9-11ea-b45c-c7b846343364','c021214a-8bc7-11ea-b45c-c7b846343364','avatar1','8478A4A2819E9C06AB738123C5D04B4FA1AA67548EBA64EAD40B635EA8AA8D5B','MOBILE','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8','DISABLED'), +-- Avatar 2 MOBILE +('52cbc85a-8bc9-11ea-b45c-c7b846343364','d2869da6-8bc7-11ea-b45c-c7b846343364','avatar2','8478A4A2819E9C06AB738123C5D04B4FA1AA67548EBA64EAD40B635EA8AA8D5B','MOBILE','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8','ENEBLED'), +-- Avatar 4 MOBILE +('3870767c-8bc9-11ea-b45c-c7b846343364','088d7268-8bc7-11ea-b45c-c7b846343364','avatar4','8478A4A2819E9C06AB738123C5D04B4FA1AA67548EBA64EAD40B635EA8AA8D5B','MOBILE','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8','DISABLED'), +-- Avatar 3 MOBILE +('22fb81e2-8bc9-11ea-b45c-c7b846343364','c687acca-8bc7-11ea-b45c-c7b846343364','avatar3','8478A4A2819E9C06AB738123C5D04B4FA1AA67548EBA64EAD40B635EA8AA8D5B','MOBILE','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8','DISABLED'); +-- -------------------------------------------------------- +-- +-- Add APC_USER_BY_OFFICE +-- +INSERT INTO APC_USER_BY_OFFICE(id,id_user,id_office,user_by_office_status,application_owner,created_by) +VALUES +-- Janitzio GDL +('a742dfe8-7d20-11ea-af3e-28f659da398e','5751074e-7d1b-11ea-af3e-28f659da398e','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Oscar Tepic +('d855f570-7dbb-11ea-9b1f-500320958bf8','092a95d8-7db8-11ea-9b1f-500320958bf8','caef3a64-7d1f-11ea-af3e-28f659da398e','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Ruben Tepic +('eca3f824-7dbb-11ea-9b1f-500320958bf8','0dc7c246-7db8-11ea-9b1f-500320958bf8','caef3a64-7d1f-11ea-af3e-28f659da398e','ENEBLED','APP_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Ruben GDL +('e5a44222-7dbb-11ea-9b1f-500320958bf8','0dc7c246-7db8-11ea-9b1f-500320958bf8','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','ENEBLED','APP_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Avatar 1 Tepic +('37835b02-8bca-11ea-b45c-c7b846343364','67b3081e-8bc9-11ea-b45c-c7b846343364','caef3a64-7d1f-11ea-af3e-28f659da398e','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Avatar 2 Tepic +('5e4c992e-8bca-11ea-b45c-c7b846343364','52cbc85a-8bc9-11ea-b45c-c7b846343364','caef3a64-7d1f-11ea-af3e-28f659da398e','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Avatar 4 GDL +('efffe026-8bcd-11ea-b45c-c7b846343364','3870767c-8bc9-11ea-b45c-c7b846343364','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Avatar 3 Tepic +('f6dfcbc2-8bcd-11ea-b45c-c7b846343364','22fb81e2-8bc9-11ea-b45c-c7b846343364','caef3a64-7d1f-11ea-af3e-28f659da398e','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'); +-- -------------------------------------------------------- +-- +-- Add APC_PERMISSION +-- +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`) +VALUES +('7a6cbba2-7dba-11ea-9b1f-500320958bf8','public.access', 'public.access.description', 'public.access.path', 0, 10,'PUBLIC', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('001055b6-804f-11ea-bd33-54754d23c678','system.employee', 'system.employee.description', 'system.employee.path', 10, 10,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('7f116c66-7dba-11ea-9b1f-500320958bf8','system.user.create', 'system.user.create.description', 'system.user.create.path', 10, 20,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('87d3d32a-7dba-11ea-9b1f-500320958bf8','system.user.admin', 'system.user.admin.description', 'system.user.admin.path', 10, 30,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('8c54a1f4-7dba-11ea-9b1f-500320958bf8','system.user.access', 'system.user.access.description', 'system.user.access.path', 10, 40,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('3697f4e3-6a7d-46df-9618-60c632e3e472','catalog.role', 'catalog.role.description', 'catalog.role.path', 10, 50,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('572bccc2-4848-4dad-b63c-ddf6f29c14f7','catalog.typeLoan', 'catalog.typeLoan.description', 'catalog.typeLoan.path', 10, 60,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('7f139dd9-a1fb-42a4-866c-e70b4d84587a','catalog.route', 'catalog.route.description', 'catalog.route.path', 10, 70,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('58ef9e12-13b3-4a7d-a5ad-fd0db3557d3c','admin.customer', 'admin.customer.description', 'admin.customer.path', 10, 80,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('45f2cd84-98df-4991-be77-3f22dfa7d4b2','admin.endorsement', 'admin.endorsement.description', 'admin.endorsement.path', 10, 90,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('e492bbf5-b25e-4ff2-b126-dc92a733e921','admin.loan', 'admin.loan.description', 'admin.loan.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('fee9d1d9-3961-4dfa-a8e2-56eccae1e347','admin.transfer', 'admin.transfer.description', 'admin.transfer.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('7a8d71b0-1d2b-43ae-b7f7-fd048929ae8e','admin.moneyDaily', 'admin.moneyDaily.description', 'admin.moneyDaily.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('55a79bce-9466-44f8-8a13-7b69f176b80b','admin.closingDay', 'admin.closingDay.description', 'admin.closingDay.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('04d9cf0f-b8e9-46fb-9b77-b301dec9c533','admin.otherExpense', 'admin.otherExpense.description', 'admin.otherExpense.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('f01aeaac-8b18-4eb5-95ae-d02ae5a0716d','admin.goal', 'admin.goal.description', 'admin.goal.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('6c2ec1ce-9163-42b4-bbf1-8448e3894d55','admin.bonus', 'admin.bonus.description', 'admin.bonus.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('9067f64e-b2eb-4361-9c9b-c6dccc29e67f','admin.advance', 'admin.advance.description', 'admin.advance.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('de5d48ac-2242-4937-95e2-1140b987b8c2','system.office', 'system.office.description', 'system.office.path', 10, 110,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'); +-- Permission by role +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`, `parent_name`) +VALUES +-- employee +('dcfafbee-82a1-11ea-a6b6-200fe86028a8','system.employee.add', 'system.employee.add.description', 'system.employee.add.path', 10, 11,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.employee'), +('e2ea92a8-82a1-11ea-a6b6-200fe86028a8','system.employee.enebled', 'system.employee.enebled.description', 'system.employee.enebled.path', 10, 12,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.employee'), +('eb530786-82a1-11ea-a6b6-200fe86028a8','system.employee.disabled', 'system.employee.disabled.description', 'system.employee.disabled.path', 10, 13,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.employee'), +('f2245ed4-82a1-11ea-a6b6-200fe86028a8','system.employee.deleted', 'system.employee.deleted.description', 'system.employee.deleted.path', 10, 14,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.employee'), +('fec3b7a2-82a1-11ea-a6b6-200fe86028a8','system.employee.updated', 'system.employee.updated.description', 'system.employee.updated.path', 10, 15,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.employee'), +-- user create +('065b2432-82a2-11ea-a6b6-200fe86028a8','system.user.create.permission', 'system.user.create.permission.description', 'system.user.create.permission.path', 10, 21,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.create'), +('10d740d0-82a2-11ea-a6b6-200fe86028a8','system.user.admin.enebled', 'system.user.admin.enebled.description', 'system.user.admin.enebled.path', 10, 31,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('36b619fe-82fa-11ea-a6b6-200fe86028a8','system.user.admin.disabled', 'system.user.admin.disabled.description', 'system.user.admin.disabled.path', 10, 32,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('2fcf2806-82fa-11ea-a6b6-200fe86028a8','system.user.admin.deleted', 'system.user.admin.deleted.description', 'system.user.admin.deleted.path', 10, 33,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('282079e8-82fa-11ea-a6b6-200fe86028a8','system.user.admin.updated', 'system.user.admin.updated.description', 'system.user.admin.updated.path', 10, 34,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('176d3744-82fa-11ea-a6b6-200fe86028a8','system.user.admin.pwd', 'system.user.admin.pwd.description', 'system.user.admin.pwd.path', 10, 35,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('1fecd260-82a2-11ea-a6b6-200fe86028a8','system.user.admin.avatar', 'system.user.admin.avatar.description', 'system.user.admin.avatar.path', 10, 36,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +-- office +('c5ef3b18-6cc2-4d62-88ba-41304c6ae9c8','system.office.add', 'system.office.add.description', 'system.office.add.path', 10, 111,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('037ea752-c33f-4bfe-ae84-da867de0d7cd','system.office.updated', 'system.office.updated.description', 'system.office.updated.path', 10, 112,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('65399669-44da-4e17-9217-c6b89c1f0a61','system.office.deleted', 'system.office.deleted.description', 'system.office.deleted.path', 10, 113,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'); + +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`, `parent_name`) +VALUES +-- role +('96f78612-1e06-47cf-a282-f4f1a14f8e0d','catalog.role.add', 'catalog.role.add.description', 'catalog.role.add.path', 10, 51,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.role'), +('1c8175f5-dcde-4611-b2d7-9b79a68b3f0c','catalog.role.updated', 'catalog.role.updated.description', 'catalog.role.updated.path', 10, 52,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.role'), +('4c11f842-6c29-4d18-a58c-595df41afaa0','catalog.role.deleted', 'catalog.role.deleted.description', 'catalog.role.deleted.path', 10, 53,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.role'), +-- type loan +('29445731-3e36-427b-a14a-ee53b9699582','catalog.typeLoan.add', 'catalog.typeLoan.add.description', 'catalog.typeLoan.add.path', 10, 61,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.typeLoan'), +('39482063-a243-490b-bb78-0c0599bce30e','catalog.typeLoan.updated', 'catalog.typeLoan.updated.description', 'catalog.typeLoan.updated.path', 10, 62,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.typeLoan'), +('c573acd1-cb14-4464-8bbc-b962dbb0bc62','catalog.typeLoan.deleted', 'catalog.typeLoan.deleted.description', 'catalog.typeLoan.deleted.path', 10, 63,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.typeLoan'), +-- route +('ab812966-4df0-4462-a9e2-a2c364cf97f1','catalog.route.add', 'catalog.route.add.description', 'catalog.route.add.path', 10, 71,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.route'), +('886ab08d-9494-4ae4-8635-4a6b4363cdf7','catalog.route.updated', 'catalog.route.updated.description', 'catalog.route.updated.path', 10, 72,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.route'), +('629c0be7-b3a9-49f5-9c20-3f6681a4b6d3','catalog.route.deleted', 'catalog.route.deleted.description', 'catalog.route.deleted.path', 10, 73,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.route'); + +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`, `parent_name`) +VALUES +-- customer +('65928cb3-f463-4266-9d29-bc29c560c891','admin.customer.add', 'admin.customer.add.description', 'admin.customer.add.path', 10, 81,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.customer'), +('b209327b-f568-4783-8da1-7d45b88fd65b','admin.customer.updated', 'admin.customer.updated.description', 'admin.customer.updated.path', 10, 82,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.customer'), +('6aeb69ff-bb96-4ab9-9d07-8a3b237cfc9e','admin.customer.deleted', 'admin.customer.deleted.description', 'admin.customer.deleted.path', 10, 83,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.customer'), +-- endorsement +('8bee00dc-199f-43c5-8e83-5d670502552b','admin.endorsement.add', 'admin.endorsement.add.description', 'admin.endorsement.add.path', 10, 91,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.endorsement'), +('d16b9b0b-7c4d-456a-a257-ed67586226b0','admin.endorsement.updated', 'admin.endorsement.updated.description', 'admin.endorsement.updated.path', 10, 92,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.endorsement'), +('b57da38c-ba69-4d1e-944f-0dd1f11d816f','admin.endorsement.deleted', 'admin.endorsement.deleted.description', 'admin.endorsement.deleted.path', 10, 93,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.endorsement'), +-- loan +('cca7b7e8-2d41-471b-bb81-c4ca518294dc','admin.loan.add', 'admin.loan.add.description', 'admin.loan.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.loan'), +('55fd99c6-8110-4604-901b-0ed95ca31132','admin.loan.updated', 'admin.loan.updated.description', 'admin.loan.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.loan'), +('1e98037f-1950-417e-be11-39b51203c409','admin.loan.deleted', 'admin.loan.deleted.description', 'admin.loan.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.loan'), +-- transfer +('0d582b8a-2820-4a58-95ca-37484daa8304','admin.transfer.add', 'admin.transfer.add.description', 'admin.transfer.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.transfer'), +('f8bb6db8-acd1-4c5e-845a-ef62f16c7b2d','admin.transfer.updated', 'admin.transfer.updated.description', 'admin.transfer.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.transfer'), +('ae782c52-1e20-40a3-88cf-28f2fb7d7583','admin.transfer.deleted', 'admin.transfer.deleted.description', 'admin.transfer.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.transfer'), +-- money daily +('d14f5077-ecd9-467e-b274-8674e1955667','admin.moneyDaily.add', 'admin.moneyDaily.add.description', 'admin.moneyDaily.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.moneyDaily'), +('a8f492bf-0a8b-4a4e-9d61-0de2b7153334','admin.moneyDaily.updated', 'admin.moneyDaily.updated.description', 'admin.moneyDaily.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.moneyDaily'), +('285860be-92fd-4c7a-bac2-eec1f530d6d9','admin.moneyDaily.deleted', 'admin.moneyDaily.deleted.description', 'admin.moneyDaily.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.moneyDaily'), +-- closing day +('8ab4bea2-3e00-4474-bf94-e01f1ed6b52c','admin.closingDay.add', 'admin.closingDay.add.description', 'admin.closingDay.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.closingDay'), +('89d55a97-8bc4-4430-8e8d-ce8d15851695','admin.closingDay.updated', 'admin.closingDay.updated.description', 'admin.closingDay.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.closingDay'), +('4e8ab1c5-1889-45b3-8550-101f300b2e70','admin.closingDay.deleted', 'admin.closingDay.deleted.description', 'admin.closingDay.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.closingDay'), +-- other expense +('f8b6306b-166d-48b8-8626-0e8a92970c17','admin.otherExpense.add', 'admin.otherExpense.add.description', 'admin.otherExpense.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.otherExpense'), +('2dbc0faa-2cd0-4490-a5af-e6a8eb4eb132','admin.otherExpense.updated', 'admin.otherExpense.updated.description', 'admin.otherExpense.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.otherExpense'), +('aa7c8eca-2117-45a0-b7ce-6d78599b0a66','admin.otherExpense.deleted', 'admin.otherExpense.deleted.description', 'admin.otherExpense.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.otherExpense'), +-- goal +('2e3e6bc1-6baf-4fde-9cc2-c60cd4c1d2f3','admin.goal.add', 'admin.goal.add.description', 'admin.goal.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.goal'), +('6add466f-4a1d-464a-a96c-2aecc67087ab','admin.goal.updated', 'admin.goal.updated.description', 'admin.goal.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.goal'), +('cd3306f9-b713-4995-a8bf-7585e42c2ca0','admin.goal.deleted', 'admin.goal.deleted.description', 'admin.goal.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.goal'), +-- bonus +('71e44e75-91e8-4a55-8d36-d24e2a645f10','admin.bonus.add', 'admin.bonus.add.description', 'admin.bonus.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.bonus'), +('14b6bf11-cc3b-41d9-b589-7c2aebc5dbeb','admin.bonus.updated', 'admin.bonus.updated.description', 'admin.bonus.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.bonus'), +('9f5d7c8d-2115-4114-82a6-5b7329c3efc7','admin.bonus.deleted', 'admin.bonus.deleted.description', 'admin.bonus.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.bonus'), +-- advance +('961193c0-754e-4444-b281-7c62aacb3987','admin.advance.add', 'admin.advance.add.description', 'admin.advance.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.advance'), +('0fa64abd-3e2a-4a42-96cf-1672bdd51086','admin.advance.updated', 'admin.advance.updated.description', 'admin.advance.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.advance'), +('6ee26a46-919b-4400-8837-31762892fa97','admin.advance.deleted', 'admin.advance.deleted.description', 'admin.advance.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.advance'); + +-- Entradas de caja general +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`) +VALUES +('1bd221ee-bfd2-49e1-899a-8456cc05e559','admin.expenseCompanyIn', 'admin.expenseCompanyIn.description', 'admin.expenseCompanyIn.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'); + +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`,`parent_name`) +VALUES +('b855fbbc-e25a-4051-8789-9ec9af62ce3a','admin.expenseCompanyIn.add', 'admin.expenseCompanyIn.add.description', 'admin.expenseCompanyIn.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.expenseCompanyIn'), +('8165c4e7-eb55-4eb7-bb07-98e14234ad8b','admin.expenseCompanyIn.updated', 'admin.expenseCompanyIn.updated.description', 'admin.expenseCompanyIn.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.expenseCompanyIn'), +('292e5385-1368-4b8d-895d-638181e05e0d','admin.expenseCompanyIn.deleted', 'admin.expenseCompanyIn.deleted.description', 'admin.expenseCompanyIn.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.expenseCompanyIn'); + +-- Salidas de caja general +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`) +VALUES +('a5301073-05f2-4d80-bed9-e39e0739ee95','admin.expenseCompanyOut', 'admin.expenseCompanyOut.description', 'admin.expenseCompanyOut.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'); + +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`,`parent_name`) +VALUES +('8d4985e8-c3e1-4534-9ebc-06d2f708398c','admin.expenseCompanyOut.add', 'admin.expenseCompanyOut.add.description', 'admin.expenseCompanyOut.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.expenseCompanyOut'), +('3d812774-98ec-4157-ab62-5a60a69f6ddd','admin.expenseCompanyOut.updated', 'admin.expenseCompanyOut.updated.description', 'admin.expenseCompanyOut.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.expenseCompanyOut'), +('c59fd63d-7658-40e9-82be-c2a75221e200','admin.expenseCompanyOut.deleted', 'admin.expenseCompanyOut.deleted.description', 'admin.expenseCompanyOut.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.expenseCompanyOut'); + +-- Cuadre de caja general +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`) +VALUES +('a18072cb-ff92-4763-977c-c604828ff4c7','admin.stableGeneralBox', 'admin.stableGeneralBox.description', 'admin.stableGeneralBox.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'); + +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`,`parent_name`) +VALUES +('4273bd52-7435-483b-a185-d6686c8fb3e7','admin.stableGeneralBox.add', 'admin.stableGeneralBox.add.description', 'admin.stableGeneralBox.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.stableGeneralBox'), +('2cceb95d-6d3c-4c67-8c9f-cedc75d4e293','admin.stableGeneralBox.updated', 'admin.stableGeneralBox.updated.description', 'admin.stableGeneralBox.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.stableGeneralBox'), +('c46ebab5-904c-4cc1-8c77-49a9fded0fba','admin.stableGeneralBox.deleted', 'admin.stableGeneralBox.deleted.description', 'admin.stableGeneralBox.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.stableGeneralBox'); +-- Chages loans between users +INSERT INTO `APC_PERMISSION` +(`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , + `permission_type`, `permission_status`,`created_by`, `parent_name`) +VALUES +('073fba18-2a8e-11eb-9de2-a30e5a9c0028','admin.loan.change.owner', 'admin.loan.change.owner.description', 'admin.loan.change.owner.path', 10, 110,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.loan'), +('50942348-2a8e-11eb-9de2-a30e5a9c0028','admin.loan.change.owner.update', 'admin.loan.change.owner.update.description', 'admin.loan.change.owner.update.path', 10, 111,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.loan'); + +INSERT INTO APC_USER_BY_OFFICE_HAS_PERMISSION (id_user_by_office,id_permission,created_by) +SELECT + -- Janitzio GDL + 'a742dfe8-7d20-11ea-af3e-28f659da398e', + id, + '0dc7c246-7db8-11ea-9b1f-500320958bf8' +FROM APC_PERMISSION; + +INSERT INTO APC_USER_BY_OFFICE_HAS_PERMISSION (id_user_by_office,id_permission,created_by) +SELECT + -- Oscar Tepic + 'd855f570-7dbb-11ea-9b1f-500320958bf8', + id, + '0dc7c246-7db8-11ea-9b1f-500320958bf8' +FROM APC_PERMISSION; + +INSERT INTO APC_USER_BY_OFFICE_HAS_PERMISSION (id_user_by_office,id_permission,created_by) +SELECT + -- Ruben Tepic + 'eca3f824-7dbb-11ea-9b1f-500320958bf8', + id, + '0dc7c246-7db8-11ea-9b1f-500320958bf8' +FROM APC_PERMISSION; + + +INSERT INTO APC_USER_BY_OFFICE_HAS_PERMISSION (id_user_by_office,id_permission,created_by) +SELECT + -- Ruben GDL + 'e5a44222-7dbb-11ea-9b1f-500320958bf8', + id, + '0dc7c246-7db8-11ea-9b1f-500320958bf8' +FROM APC_PERMISSION; + +INSERT INTO APC_USER_MOBILE_PREFERECE(id,id_user,preference_name,preference_value,created_by,created_on) +VALUES +-- Avatar 1 +('235e819e-8bbe-11ea-8c0e-beeb61238d59','67b3081e-8bc9-11ea-b45c-c7b846343364','ORDER_LIST','ALPHABETICALLY','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- Avatar 2 +('e914e614-8bd0-11ea-b45c-c7b846343364','52cbc85a-8bc9-11ea-b45c-c7b846343364','ORDER_LIST','ALPHABETICALLY','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- Avatar 4 +('ef48f296-8bd0-11ea-b45c-c7b846343364','3870767c-8bc9-11ea-b45c-c7b846343364','ORDER_LIST','ALPHABETICALLY','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- Avatar 3 +('f49797de-8bd0-11ea-b45c-c7b846343364','22fb81e2-8bc9-11ea-b45c-c7b846343364','ORDER_LIST','ALPHABETICALLY','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()); +-- ------------------------- +-- Logica de negocio de los +-- pagos de APC +-- ------------------------- +-- FALTA CREAR RUTA +INSERT INTO APC_ROUTE(id,id_office,route_name,active_status,created_by, created_on) +VALUES +-- Tepic +('51b207a2-8e19-11ea-b65e-4e1376171215','caef3a64-7d1f-11ea-af3e-28f659da398e','Ruta 1 Tepic','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('55baf3ae-8e19-11ea-b65e-4e1376171215','caef3a64-7d1f-11ea-af3e-28f659da398e','Ruta 2 Tepic','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('5a329e3c-8e19-11ea-b65e-4e1376171215','caef3a64-7d1f-11ea-af3e-28f659da398e','Ruta 3 Tepic','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- GDL +('5e9a24e0-8e19-11ea-b65e-4e1376171215','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','Ruta 1 GDL','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()); +-- FALTA MAPEAR RUTA CON USUARIO + +INSERT INTO APC_PEOPLE(id,first_name,second_name,last_name, middle_name, phone_home,address_home, phone_business, address_business, company_name, people_type, active_status,id_office,id_route,created_by,created_on,thumbnail) +VALUES +-- Clientes tepic +('83d2cd30-8e1d-11ea-b65e-4e1376171215','Diego','Segundo 1','Rivera','Materno 1','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/653323645.jpg'), +('c32a578c-8e1d-11ea-b65e-4e1376171215','David','Segundo 2','Alfaro','Siqueiros','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/11/blogbeitrag-haare-2-1024x713.jpg'), +('ca7fbd56-8e1d-11ea-b65e-4e1376171215','Jose','Segundo 3','Clemente','Orozco','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/666164992-1200x1200.jpg'), +('d0e60fec-8e1d-11ea-b65e-4e1376171215','Aurora','Segundo 4','Reyes','Materno 4','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/653323645.jpg'), +('d9763d1c-8e1d-11ea-b65e-4e1376171215','Jorge','Segundo 5','Gonzalez','Camarena','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/104313029.jpg'), +('e32dd9fa-8e1d-11ea-b65e-4e1376171215','Juan','Segundo 6','O Gorman','Materno 6','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/666164992-1200x1200.jpg'), +('e8eafa6c-8e1d-11ea-b65e-4e1376171215','Jose','Luis','Cuevas','Materno 7','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/653323645.jpg'), +('eecbe234-8e1d-11ea-b65e-4e1376171215','Pedro','Segundo 8','Nel','Gomez','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/11/blogbeitrag-haare-2-1024x713.jpg'), +('f45155a4-8e1d-11ea-b65e-4e1376171215','Fernando','Segundo 9','Leal','Materno 9','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/229554145-1200x1200.jpg'), +('faa43aa2-8e1d-11ea-b65e-4e1376171215','Mario','Segundo 10','Orozco','Rivera','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/229554145-1200x1200.jpg'), +('fffd273e-8e1d-11ea-b65e-4e1376171215','Saturnino','Segundo 11','Herran','Materno 11','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/666164992-1200x1200.jpg'), +('05d35002-8e1e-11ea-b65e-4e1376171215','Fermin','Segundo 12','Revueltas','Materno 12','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/653323645.jpg'), +('0b27081e-8e1e-11ea-b65e-4e1376171215','Zabel','Segundo 13','Merida','Materno 13','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/11/blogbeitrag-haare-2-1024x713.jpg'), +('109b9b84-8e1e-11ea-b65e-4e1376171215','Luis','Segundo 14','Nishizawa','Flores','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/104313029.jpg'), +('15151320-8e1e-11ea-b65e-4e1376171215','Jose','Segundo 15','Chavez','Morado','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/229554145-1200x1200.jpg'), +('1f292d38-8e1e-11ea-b65e-4e1376171215','Alfredo','Segundo 16','Ramos','Martinez','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','5a329e3c-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/666164992-1200x1200.jpg'), +('25bf9ccc-8e1e-11ea-b65e-4e1376171215','Desiderio','Segundo 17','Hernandez','Xochitiotzin','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','5a329e3c-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/653323645.jpg'), +('2b502d50-8e1e-11ea-b65e-4e1376171215','Rina','Segundo 18','Lazo','Materno 18','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','5a329e3c-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/11/blogbeitrag-haare-2-1024x713.jpg'), +('305aee3e-8e1e-11ea-b65e-4e1376171215','Ramon','Segundo 19','Alva','de la Canal','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','5a329e3c-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/104313029.jpg'), +('394ffa70-8e1e-11ea-b65e-4e1376171215','Xavier','Segundo 20','Guerrero','Materno 20','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Tepic Nayarit','22-22-22-22','Negocio Calle #Num. col. Colonia, Tepic Nayarit','Nombre Negocio 01','CUSTOMER','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','5a329e3c-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/666164992-1200x1200.jpg'), +-- Clientes GDL +('3d8c43e6-8e1e-11ea-b65e-4e1376171215','Juan','Segundo 21','Rulfo','Materno 21','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Guadalajara Jalisco','22-22-22-22','Negocio Calle #Num. col. Colonia, Guadalajara Jalisco','Nombre Negocio 01','CUSTOMER','ENEBLED','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','5e9a24e0-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/653323645.jpg'), +('428c5b88-8e1e-11ea-b65e-4e1376171215','Octavio','Segundo 22','Paz','Materno 22','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Guadalajara Jalisco','22-22-22-22','Negocio Calle #Num. col. Colonia, Guadalajara Jalisco','Nombre Negocio 01','CUSTOMER','ENEBLED','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','5e9a24e0-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/11/blogbeitrag-haare-2-1024x713.jpg'), +('46f6f070-8e1e-11ea-b65e-4e1376171215','Carlos','Segundo 23','Fuentes','Materno 23','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Guadalajara Jalisco','22-22-22-22','Negocio Calle #Num. col. Colonia, Guadalajara Jalisco','Nombre Negocio 01','CUSTOMER','ENEBLED','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','5e9a24e0-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/104313029.jpg'), +('4adc2c28-8e1e-11ea-b65e-4e1376171215','Juan','Jose','Arreola','Materno 24','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Guadalajara Jalisco','22-22-22-22','Negocio Calle #Num. col. Colonia, Guadalajara Jalisco','Nombre Negocio 01','CUSTOMER','ENEBLED','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','5e9a24e0-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/229554145-1200x1200.jpg'), +('4ed391e0-8e1e-11ea-b65e-4e1376171215','Rosario','Segundo 25','Castellanos','Materno 25','11-11-11-11-11','Cliente Casa Calle #Num. col. Colonia, Guadalajara Jalisco','22-22-22-22','Negocio Calle #Num. col. Colonia, Guadalajara Jalisco','Nombre Negocio 01','CUSTOMER','ENEBLED','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','5e9a24e0-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/666164992-1200x1200.jpg'); +INSERT INTO APC_PEOPLE(id,first_name,second_name,last_name, middle_name, phone_home,address_home, people_type, active_status,id_office,id_route,created_by,created_on,thumbnail) +VALUES +-- Avales tepic +('76a2650c-8e1e-11ea-b65e-4e1376171215','Frida','Segundo 1','Kahlo','Materno 1','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/653323645.jpg'), +('7ce4fdc6-8e1e-11ea-b65e-4e1376171215','Enrique','Segundo 2','Carbajal','Materno 2','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/104313029.jpg'), +('818a97aa-8e1e-11ea-b65e-4e1376171215','Juan','Segundo 3','Soriano','Materno 3','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/666164992-1200x1200.jpg'), +('85d8f694-8e1e-11ea-b65e-4e1376171215','Jose','Segundo 4','Marin','Materno 4','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/229554145-1200x1200.jpg'), +('8a4ad7a6-8e1e-11ea-b65e-4e1376171215','Vicente','Segundo 5','Rojo','Almazan','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/653323645.jpg'), +('91328532-8e1e-11ea-b65e-4e1376171215','Luis','Segundo 6','Ortiz','Monasterio','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/104313029.jpg'), +('96c9319e-8e1e-11ea-b65e-4e1376171215','Pedro','Segundo 7','Coronel','Materno 7','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/666164992-1200x1200.jpg'), +('9c481676-8e1e-11ea-b65e-4e1376171215','Miriam','Segundo 8','Medrez','Materno 8','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/11/blogbeitrag-haare-2-1024x713.jpg'), +('aca49c06-8e1e-11ea-b65e-4e1376171215','Maria','Elena','Delgado','Materno 9','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/653323645.jpg'), +('b0361e44-8e1e-11ea-b65e-4e1376171215','Angela','Segundo 10','Gurria','Materno 10','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/104313029.jpg'), +('b4c2e9ba-8e1e-11ea-b65e-4e1376171215','Aval 11','Segundo 11','Paterno 11','Materno 11','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/11/blogbeitrag-haare-2-1024x713.jpg'), +('ba2faa96-8e1e-11ea-b65e-4e1376171215','Aval 12','Segundo 12','Paterno 12','Materno 12','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/11/blogbeitrag-haare-2-1024x713.jpg'), +('be92604c-8e1e-11ea-b65e-4e1376171215','Aval 13','Segundo 13','Paterno 13','Materno 13','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/653323645.jpg'), +('c2b2b2f8-8e1e-11ea-b65e-4e1376171215','Aval 14','Segundo 14','Paterno 14','Materno 14','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/104313029.jpg'), +('c6a8b04c-8e1e-11ea-b65e-4e1376171215','Aval 15','Segundo 15','Paterno 15','Materno 15','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/666164992-1200x1200.jpg'), +('cb0e8d00-8e1e-11ea-b65e-4e1376171215','Aval 16','Segundo 16','Paterno 16','Materno 16','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','5a329e3c-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/229554145-1200x1200.jpg'), +('cfafc590-8e1e-11ea-b65e-4e1376171215','Aval 17','Segundo 17','Paterno 17','Materno 17','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','5a329e3c-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/653323645.jpg'), +('d474b96e-8e1e-11ea-b65e-4e1376171215','Aval 18','Segundo 18','Paterno 18','Materno 18','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','5a329e3c-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/104313029.jpg'), +('d8f8c804-8e1e-11ea-b65e-4e1376171215','Aval 19','Segundo 19','Paterno 19','Materno 19','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','5a329e3c-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/666164992-1200x1200.jpg'), +('dd7b34e8-8e1e-11ea-b65e-4e1376171215','Aval 20','Segundo 20','Paterno 20','Materno 20','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Tepic Nayarit','ENDORSEMENT','ENEBLED','caef3a64-7d1f-11ea-af3e-28f659da398e','5a329e3c-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/229554145-1200x1200.jpg'), +-- Avales GDL +('e13baa9a-8e1e-11ea-b65e-4e1376171215','Aval 21','Segundo 21','Paterno 21','Materno 21','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Guadalajara Jalisco','ENDORSEMENT','ENEBLED','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','5e9a24e0-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/653323645.jpg'), +('e61db008-8e1e-11ea-b65e-4e1376171215','Aval 22','Segundo 22','Paterno 22','Materno 22','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Guadalajara Jalisco','ENDORSEMENT','ENEBLED','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','5e9a24e0-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/104313029.jpg'), +('eaa8c70c-8e1e-11ea-b65e-4e1376171215','Aval 23','Segundo 23','Paterno 23','Materno 23','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Guadalajara Jalisco','ENDORSEMENT','ENEBLED','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','5e9a24e0-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/666164992-1200x1200.jpg'), +('ef10171e-8e1e-11ea-b65e-4e1376171215','Aval 24','Segundo 24','Paterno 24','Materno 24','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Guadalajara Jalisco','ENDORSEMENT','ENEBLED','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','5e9a24e0-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/10/229554145-1200x1200.jpg'), +('f30d1358-8e1e-11ea-b65e-4e1376171215','Guillermo','Segundo 25','Tellez','Materno 25','11-11-11-11-11','Aval Casa Calle #Num. col. Colonia, Guadalajara Jalisco','ENDORSEMENT','ENEBLED','e0f1a2fc-7d1f-11ea-af3e-28f659da398e','5e9a24e0-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),'https://freisteller24.eu/wp-content/uploads/2017/11/blogbeitrag-haare-2-1024x713.jpg'); +INSERT INTO APC_LOAN_TYPE(id,loan_type_name,total_days, loan_fee, payment,payment_daily,payment_total, id_office,created_by, created_on,opening_fee) +VALUES +-- Para tepic +('db833bf0-8e5e-11ea-8ee4-e54bc704beac','Prestamo $1000', 22,50,1000,60,1320,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),20), +('c59e5bee-8dff-11ea-8745-07889553dd5f','Prestamo $2000', 22,50,2000,120,2640,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),40), +('dc255a16-8dff-11ea-8745-07889553dd5f','Prestamo $3000', 22,50,3000,180,3960,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),60), +('e7cc91c2-8dff-11ea-8745-07889553dd5f','Prestamo $4000', 22,50,4000,240,5280,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),80), +('f0cb05ba-8dff-11ea-8745-07889553dd5f','Prestamo $5000', 22,50,5000,300,6600,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),100), +('fdaa4318-8dff-11ea-8745-07889553dd5f','Prestamo $6000', 22,50,6000,360,7920,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),120), +-- Para GDL; +('7f0cc30e-8e00-11ea-8745-07889553dd5f','Prestamo $1000', 22,50,1000,60,1320,'e0f1a2fc-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),20), +('8623efbe-8e00-11ea-8745-07889553dd5f','Prestamo $2000', 22,50,2000,120,2640,'e0f1a2fc-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),40), +('8d91bc36-8e00-11ea-8745-07889553dd5f','Prestamo $3000', 22,50,3000,180,3960,'e0f1a2fc-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),60), +('93b13506-8e00-11ea-8745-07889553dd5f','Prestamo $4000', 22,50,4000,240,5280,'e0f1a2fc-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),80), +('99d91a66-8e00-11ea-8745-07889553dd5f','Prestamo $5000', 22,50,5000,300,6600,'e0f1a2fc-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),100), +('a0292d0c-8e00-11ea-8745-07889553dd5f','Prestamo $6000', 22,50,6000,360,7920,'e0f1a2fc-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),120); +INSERT INTO APC_LOAN(id,id_loan_type,id_customer,id_endorsement,id_route,loan_status,amount_paid,amount_to_pay,last_reference_number,created_by,created_on,last_updated_on) +VALUES +-- Tepic / Avatar 1 +('c4ed9e5a-8e1b-11ea-b65e-4e1376171215','db833bf0-8e5e-11ea-8ee4-e54bc704beac','83d2cd30-8e1d-11ea-b65e-4e1376171215','76a2650c-8e1e-11ea-b65e-4e1376171215','51b207a2-8e19-11ea-b65e-4e1376171215','APPROVED',0,1320,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +('c09f127a-8e1b-11ea-b65e-4e1376171215','db833bf0-8e5e-11ea-8ee4-e54bc704beac','c32a578c-8e1d-11ea-b65e-4e1376171215','7ce4fdc6-8e1e-11ea-b65e-4e1376171215','51b207a2-8e19-11ea-b65e-4e1376171215','REJECTED',0,1320,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),NOW()), +('bc185d2e-8e1b-11ea-b65e-4e1376171215','db833bf0-8e5e-11ea-8ee4-e54bc704beac','ca7fbd56-8e1d-11ea-b65e-4e1376171215','818a97aa-8e1e-11ea-b65e-4e1376171215','51b207a2-8e19-11ea-b65e-4e1376171215','APPROVED',0,1320,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),NOW()), +('b64c6e94-8e1b-11ea-b65e-4e1376171215','db833bf0-8e5e-11ea-8ee4-e54bc704beac','d0e60fec-8e1d-11ea-b65e-4e1376171215','85d8f694-8e1e-11ea-b65e-4e1376171215','51b207a2-8e19-11ea-b65e-4e1376171215','FINISH',1320,1320,22,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +('b0d25168-8e1b-11ea-b65e-4e1376171215','db833bf0-8e5e-11ea-8ee4-e54bc704beac','d9763d1c-8e1d-11ea-b65e-4e1376171215','8a4ad7a6-8e1e-11ea-b65e-4e1376171215','51b207a2-8e19-11ea-b65e-4e1376171215','PENDING',0,1320,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),NOW()), +-- Tepic / Avatar 2 +('acccdfac-8e1b-11ea-b65e-4e1376171215','c59e5bee-8dff-11ea-8745-07889553dd5f','e32dd9fa-8e1d-11ea-b65e-4e1376171215','91328532-8e1e-11ea-b65e-4e1376171215','55baf3ae-8e19-11ea-b65e-4e1376171215','APPROVED',0,2640,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +('a811395e-8e1b-11ea-b65e-4e1376171215','c59e5bee-8dff-11ea-8745-07889553dd5f','e8eafa6c-8e1d-11ea-b65e-4e1376171215','96c9319e-8e1e-11ea-b65e-4e1376171215','55baf3ae-8e19-11ea-b65e-4e1376171215','APPROVED',0,2640,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +('a42ceb26-8e1b-11ea-b65e-4e1376171215','c59e5bee-8dff-11ea-8745-07889553dd5f','eecbe234-8e1d-11ea-b65e-4e1376171215','9c481676-8e1e-11ea-b65e-4e1376171215','55baf3ae-8e19-11ea-b65e-4e1376171215','FINISH',2640,2640,22,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),NOW()), +('9ff730b6-8e1b-11ea-b65e-4e1376171215','c59e5bee-8dff-11ea-8745-07889553dd5f','f45155a4-8e1d-11ea-b65e-4e1376171215','aca49c06-8e1e-11ea-b65e-4e1376171215','55baf3ae-8e19-11ea-b65e-4e1376171215','APPROVED',0,2640,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),NOW()), +('98c4de60-8e1b-11ea-b65e-4e1376171215','c59e5bee-8dff-11ea-8745-07889553dd5f','faa43aa2-8e1d-11ea-b65e-4e1376171215','b0361e44-8e1e-11ea-b65e-4e1376171215','55baf3ae-8e19-11ea-b65e-4e1376171215','APPROVED',0,2640,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +('94aad8a2-8e1b-11ea-b65e-4e1376171215','e7cc91c2-8dff-11ea-8745-07889553dd5f','fffd273e-8e1d-11ea-b65e-4e1376171215','b4c2e9ba-8e1e-11ea-b65e-4e1376171215','55baf3ae-8e19-11ea-b65e-4e1376171215','FINISH',5280,5280,22,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +('90dadcae-8e1b-11ea-b65e-4e1376171215','e7cc91c2-8dff-11ea-8745-07889553dd5f','05d35002-8e1e-11ea-b65e-4e1376171215','ba2faa96-8e1e-11ea-b65e-4e1376171215','55baf3ae-8e19-11ea-b65e-4e1376171215','APPROVED',0,5280,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),NOW()), +('8d017a66-8e1b-11ea-b65e-4e1376171215','e7cc91c2-8dff-11ea-8745-07889553dd5f','0b27081e-8e1e-11ea-b65e-4e1376171215','be92604c-8e1e-11ea-b65e-4e1376171215','55baf3ae-8e19-11ea-b65e-4e1376171215','TO_DELIVERY',0,5280,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 2 DAY),DATE_SUB(NOW(), INTERVAL 2 DAY)), +('86a09490-8e1b-11ea-b65e-4e1376171215','dc255a16-8dff-11ea-8745-07889553dd5f','109b9b84-8e1e-11ea-b65e-4e1376171215','c2b2b2f8-8e1e-11ea-b65e-4e1376171215','55baf3ae-8e19-11ea-b65e-4e1376171215','APPROVED',0,3960,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +('82a781dc-8e1b-11ea-b65e-4e1376171215','dc255a16-8dff-11ea-8745-07889553dd5f','15151320-8e1e-11ea-b65e-4e1376171215','c6a8b04c-8e1e-11ea-b65e-4e1376171215','55baf3ae-8e19-11ea-b65e-4e1376171215','FINISH',3960,3960,22,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +-- Tepic / Avatar 3 +('7ec212f8-8e1b-11ea-b65e-4e1376171215','f0cb05ba-8dff-11ea-8745-07889553dd5f','1f292d38-8e1e-11ea-b65e-4e1376171215','cb0e8d00-8e1e-11ea-b65e-4e1376171215','5a329e3c-8e19-11ea-b65e-4e1376171215','APPROVED',0,6600,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),NOW()), +('788f666a-8e1b-11ea-b65e-4e1376171215','f0cb05ba-8dff-11ea-8745-07889553dd5f','25bf9ccc-8e1e-11ea-b65e-4e1376171215','cfafc590-8e1e-11ea-b65e-4e1376171215','5a329e3c-8e19-11ea-b65e-4e1376171215','REJECTED',0,6600,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +('74eca1c6-8e1b-11ea-b65e-4e1376171215','f0cb05ba-8dff-11ea-8745-07889553dd5f','2b502d50-8e1e-11ea-b65e-4e1376171215','d474b96e-8e1e-11ea-b65e-4e1376171215','5a329e3c-8e19-11ea-b65e-4e1376171215','APPROVED',0,6600,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +('705b9662-8e1b-11ea-b65e-4e1376171215','f0cb05ba-8dff-11ea-8745-07889553dd5f','305aee3e-8e1e-11ea-b65e-4e1376171215','d8f8c804-8e1e-11ea-b65e-4e1376171215','5a329e3c-8e19-11ea-b65e-4e1376171215','APPROVED',0,6600,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +('6cd18fec-8e1b-11ea-b65e-4e1376171215','fdaa4318-8dff-11ea-8745-07889553dd5f','394ffa70-8e1e-11ea-b65e-4e1376171215','dd7b34e8-8e1e-11ea-b65e-4e1376171215','5a329e3c-8e19-11ea-b65e-4e1376171215','APPROVED',0,7920,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +-- GDL / Avatar 4 +('68b7b92c-8e1b-11ea-b65e-4e1376171215','7f0cc30e-8e00-11ea-8745-07889553dd5f','3d8c43e6-8e1e-11ea-b65e-4e1376171215','e13baa9a-8e1e-11ea-b65e-4e1376171215','5e9a24e0-8e19-11ea-b65e-4e1376171215','FINISH',1320,1320,22,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 4 DAY),DATE_SUB(NOW(), INTERVAL 4 DAY)), +('6613cd16-9a9e-11ea-b304-ce916d70ea46','7f0cc30e-8e00-11ea-8745-07889553dd5f','3d8c43e6-8e1e-11ea-b65e-4e1376171215','e13baa9a-8e1e-11ea-b65e-4e1376171215','5e9a24e0-8e19-11ea-b65e-4e1376171215','REJECTED',0,1320,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 3 DAY),DATE_SUB(NOW(), INTERVAL 3 DAY)), +('6fab97c8-9a9e-11ea-b304-ce916d70ea46','7f0cc30e-8e00-11ea-8745-07889553dd5f','3d8c43e6-8e1e-11ea-b65e-4e1376171215','e13baa9a-8e1e-11ea-b65e-4e1376171215','5e9a24e0-8e19-11ea-b65e-4e1376171215','APPROVED',0,1320,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +('606e42f4-8e1b-11ea-b65e-4e1376171215','8623efbe-8e00-11ea-8745-07889553dd5f','428c5b88-8e1e-11ea-b65e-4e1376171215','e61db008-8e1e-11ea-b65e-4e1376171215','5e9a24e0-8e19-11ea-b65e-4e1376171215','APPROVED',0,2640,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +('5c925364-8e1b-11ea-b65e-4e1376171215','8d91bc36-8e00-11ea-8745-07889553dd5f','46f6f070-8e1e-11ea-b65e-4e1376171215','eaa8c70c-8e1e-11ea-b65e-4e1376171215','5e9a24e0-8e19-11ea-b65e-4e1376171215','APPROVED',0,3960,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),DATE_SUB(NOW(), INTERVAL 1 DAY)), +('58f3fb72-8e1b-11ea-b65e-4e1376171215','93b13506-8e00-11ea-8745-07889553dd5f','4adc2c28-8e1e-11ea-b65e-4e1376171215','ef10171e-8e1e-11ea-b65e-4e1376171215','5e9a24e0-8e19-11ea-b65e-4e1376171215','FINISH',5280,5280,22,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 3 DAY),DATE_SUB(NOW(), INTERVAL 3 DAY)), +('551308c2-8e1b-11ea-b65e-4e1376171215','99d91a66-8e00-11ea-8745-07889553dd5f','4ed391e0-8e1e-11ea-b65e-4e1376171215','f30d1358-8e1e-11ea-b65e-4e1376171215','5e9a24e0-8e19-11ea-b65e-4e1376171215','REJECTED',0,6600,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 2 DAY),DATE_SUB(NOW(), INTERVAL 2 DAY)), +('7d9d4850-9a9d-11ea-b304-ce916d70ea46','99d91a66-8e00-11ea-8745-07889553dd5f','4ed391e0-8e1e-11ea-b65e-4e1376171215','f30d1358-8e1e-11ea-b65e-4e1376171215','5e9a24e0-8e19-11ea-b65e-4e1376171215','APPROVED',0,6600,0,'0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_SUB(NOW(), INTERVAL 1 DAY),NOW()); +INSERT INTO APC_HUMAN_RESOURCE_HAS_ROUTE(id_human_resource,id_route,created_by,created_on) +VALUES +-- Avatar 1 +('c021214a-8bc7-11ea-b45c-c7b846343364','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- Avatar 2 +('d2869da6-8bc7-11ea-b45c-c7b846343364','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('d2869da6-8bc7-11ea-b45c-c7b846343364','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('d2869da6-8bc7-11ea-b45c-c7b846343364','5a329e3c-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- Avatar 3 +('c687acca-8bc7-11ea-b45c-c7b846343364','5a329e3c-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- Avatar 4 +('088d7268-8bc7-11ea-b45c-c7b846343364','5e9a24e0-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()); +INSERT INTO APC_LOAN_BY_USER(id_loan,id_user,loan_by_user_status,owner_loan,created_by,created_on) +VALUES +-- Tepic / Avatar 1 +('c4ed9e5a-8e1b-11ea-b65e-4e1376171215','67b3081e-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('c09f127a-8e1b-11ea-b65e-4e1376171215','67b3081e-8bc9-11ea-b45c-c7b846343364','REJECTED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('bc185d2e-8e1b-11ea-b65e-4e1376171215','67b3081e-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('b64c6e94-8e1b-11ea-b65e-4e1376171215','67b3081e-8bc9-11ea-b45c-c7b846343364','FINISH','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('b0d25168-8e1b-11ea-b65e-4e1376171215','67b3081e-8bc9-11ea-b45c-c7b846343364','PENDING','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- Tepic / Avatar 2 +('acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('a811395e-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('a42ceb26-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','FINISH','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('9ff730b6-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('98c4de60-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('94aad8a2-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','FINISH','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('90dadcae-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('8d017a66-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','TO_DELIVERY','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('86a09490-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('82a781dc-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','FINISH','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- Tepic / Avatar 3 +('7ec212f8-8e1b-11ea-b65e-4e1376171215','22fb81e2-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('788f666a-8e1b-11ea-b65e-4e1376171215','22fb81e2-8bc9-11ea-b45c-c7b846343364','REJECTED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('74eca1c6-8e1b-11ea-b65e-4e1376171215','22fb81e2-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('705b9662-8e1b-11ea-b65e-4e1376171215','22fb81e2-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('6cd18fec-8e1b-11ea-b65e-4e1376171215','22fb81e2-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- GDL / Avatar 4 +('68b7b92c-8e1b-11ea-b65e-4e1376171215','3870767c-8bc9-11ea-b45c-c7b846343364','FINISH','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('6613cd16-9a9e-11ea-b304-ce916d70ea46','3870767c-8bc9-11ea-b45c-c7b846343364','REJECTED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_ADD(NOW(), INTERVAL 22 DAY)), +('6fab97c8-9a9e-11ea-b304-ce916d70ea46','3870767c-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_ADD(NOW(), INTERVAL 44 DAY)), +('606e42f4-8e1b-11ea-b65e-4e1376171215','3870767c-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('5c925364-8e1b-11ea-b65e-4e1376171215','3870767c-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('58f3fb72-8e1b-11ea-b65e-4e1376171215','3870767c-8bc9-11ea-b45c-c7b846343364','FINISH','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('551308c2-8e1b-11ea-b65e-4e1376171215','3870767c-8bc9-11ea-b45c-c7b846343364','REJECTED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('7d9d4850-9a9d-11ea-b304-ce916d70ea46','3870767c-8bc9-11ea-b45c-c7b846343364','APPROVED','CURRENT_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8',DATE_ADD(NOW(), INTERVAL 22 DAY)); +INSERT INTO APC_LOAN_DETAIL(id,id_loan,id_user,people_type,payment_amount,reference_number,loan_details_type, created_by, created_on) +VALUES +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,1,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 21 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,2,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 20 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,3,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 19 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,4,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 18 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,5,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 17 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,6,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 16 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,7,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 15 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,8,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 14 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,9,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 13 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,10,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 12 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,11,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 11 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,12,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 10 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,13,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 9 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,14,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 8 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,15,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 7 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,16,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 6 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,17,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 5 DAY)), +-- sumar 100 al monto por pagar +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',50,18,'FEE','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 4 DAY)), +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',50,19,'FEE','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 3 DAY)), +-- sumar +120 al monto pagado +(UUID(),'acccdfac-8e1b-11ea-b65e-4e1376171215','52cbc85a-8bc9-11ea-b45c-c7b846343364','CUSTOMER',120,20,'PAYMENT','52cbc85a-8bc9-11ea-b45c-c7b846343364', DATE_SUB(NOW(), INTERVAL 2 DAY)); +UPDATE APC_LOAN +SET amount_paid = 2160, amount_to_pay = 2740 ,last_reference_number = 20, last_updated_by = '52cbc85a-8bc9-11ea-b45c-c7b846343364', last_updated_on = DATE_SUB(NOW(), INTERVAL 1 DAY) +WHERE id = 'acccdfac-8e1b-11ea-b65e-4e1376171215'; +COMMIT; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/ace-db/src/apc-db.sql b/ace-db/src/apc-db.sql new file mode 100644 index 0000000..7c070ba --- /dev/null +++ b/ace-db/src/apc-db.sql @@ -0,0 +1,3430 @@ +-- -------------------------------------------------------- +-- Arrebol Consuntancy +-- version 1.0.1 +-- http://www.arrebolconsultancy.com +-- -------------------------------------------------------- + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; +-- SET time_zone = "+00:00"; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +DROP DATABASE IF EXISTS `apo_pro_com_april_ten`; + +CREATE DATABASE IF NOT EXISTS `apo_pro_com_april_ten` DEFAULT CHARACTER SET latin1 COLLATE latin1_spanish_ci; +USE `apo_pro_com_april_ten`; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_ERROR_APP_LOG` +-- +CREATE TABLE `APC_ERROR_APP_LOG`( + `id_log` varchar(36) primary key, + `log_entry_date` timestamp, + `log_logger` varchar(100), + `log_level` varchar(100), + `log_message` varchar(250), + `log_exception` varchar(4000) +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +USE `apo_pro_com_april_ten`; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_OFFICE` +-- +CREATE TABLE `APC_OFFICE`( + `id` char(36) NOT NULL, + `office_name` varchar(100) NOT NULL, + `address` varchar(250), + `office_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_office_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_office_uk` UNIQUE KEY (`office_name`) +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_ROLE` +-- +CREATE TABLE `APC_ROLE`( + `id` char(36) NOT NULL, + `role_name` varchar(100) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_role_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_role_uk` UNIQUE KEY (`role_name`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_ROUTE` +-- +CREATE TABLE `APC_ROUTE`( + `id` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `route_name` varchar(25) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_route_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_route_uk` UNIQUE KEY (`id_office`,`route_name`), + CONSTRAINT `apc_route_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_BONUS` +-- +-- Dar de alta los bonos activos. +-- +CREATE TABLE `APC_BONUS`( + `id` char(36) NOT NULL, + `name` varchar(100) NOT NULL, + `loan_bonus` numeric(8,2) NOT NULL, + `mora_bonus` numeric(8,2) NOT NULL, + `new_customer_bonus` numeric(8,2) NOT NULL, + `administrative` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_bono_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_bono_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_HUMAN_RESOURCES` +-- +CREATE TABLE `APC_HUMAN_RESOURCE` ( + `id` char(36) NOT NULL, + `first_name` varchar(25) NOT NULL, + `second_name` varchar(25) DEFAULT NULL, + `last_name` varchar(25) NOT NULL, + `middle_name` varchar(25) NOT NULL, + `birthdate` date DEFAULT NULL, + `avatar` varchar(150) NOT NULL, + `curp` varchar(20) DEFAULT NULL, + `rfc` varchar(13) DEFAULT NULL, + `ife` varchar(20) DEFAULT NULL, + `admission_date` date DEFAULT NULL, + `human_resource_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `id_role` char(36) NOT NULL, + `id_bonus` char(36) DEFAULT NULL, + `payment` numeric(8,2) DEFAULT NULL, + `imss` numeric(8,2) DEFAULT NULL, + `created_by` char(36) DEFAULT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `person_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_human_resource_to_apc_role_fk` + FOREIGN KEY (`id_role`) REFERENCES `APC_ROLE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_human_resource_to_apc_bonus_fk` + FOREIGN KEY (`id_bonus`) REFERENCES `APC_BONUS`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_HUMAN_RESOURCE_HAS_ROUTE` +-- +CREATE TABLE `APC_HUMAN_RESOURCE_HAS_ROUTE`( + `id_human_resource` char(36) NOT NULL, + `id_route` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_human_resource_has_route_pk` PRIMARY KEY (`id_human_resource`, `id_route`), + CONSTRAINT `apc_human_resource_has_route_to_apc_human_resource_fk` + FOREIGN KEY (`id_human_resource`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_human_resource_has_route_to_apc_office_fk` + FOREIGN KEY (`id_route`) REFERENCES `APC_ROUTE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_PEOPLE` +-- +CREATE TABLE `APC_PEOPLE`( + `id` char(36) NOT NULL, + `first_name` varchar(25) NOT NULL, + `second_name` varchar(25) DEFAULT NULL, + `last_name` varchar(25) NOT NULL, + `middle_name` varchar(25) NOT NULL, + `birthdate` date DEFAULT NULL, + `thumbnail` varchar(250) NOT NULL, + `phone_home` varchar(15) NOT NULL, + `address_home` varchar(150) NOT NULL, + `phone_business` varchar(15), + `address_business` varchar(150), + `company_name` varchar(150), + `people_type` ENUM('CUSTOMER', 'ENDORSEMENT', 'BOTH') NOT NULL DEFAULT 'CUSTOMER', + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `id_office` char(36) NOT NULL, + `id_route` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_people_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_people_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_people_to_apc_route_fk` + FOREIGN KEY (`id_route`) REFERENCES `APC_ROUTE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_LOAN_TYPE` +-- +CREATE TABLE `APC_LOAN_TYPE`( + `id` char(36) NOT NULL, + `loan_type_name` varchar(50) NOT NULL, + `total_days` smallint NOT NULL DEFAULT 22, + `loan_fee` numeric(8,2) NOT NULL,-- Multa + `opening_fee` int NOT NULL, -- Comisión + `payment` numeric(8,2) NOT NULL,-- Monte del prestamo + `payment_daily` numeric(8,2) NOT NULL,-- 60 x c/1000 + `payment_total` numeric(8,2) NOT NULL, -- Prestamo más intereses + `payment_monday` ENUM('MONDAY'), + `payment_tuesday` ENUM('TUESDAY'), + `payment_wednesday` ENUM('WEDNESDAY'), + `payment_thursday` ENUM('THURSDAY'), + `payment_friday` ENUM('FRIDAY'), + `payment_saturday` ENUM('SATURDAY'), + `payment_sunday` ENUM('SUNDAY'), + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_loan_type_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_loan_type_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_LOAN` +-- +CREATE TABLE `APC_LOAN`( + `id` char(36) NOT NULL, + `id_loan_type` char(36) NOT NULL, + `id_customer` char(36) NOT NULL, + `id_endorsement` char(36) NOT NULL, + `id_route` char(36) NOT NULL, + `loan_status` ENUM('PENDING', 'FINISH','BLACK_LIST', 'APPROVED','REJECTED', 'PENDING_RENOVATION', 'TO_DELIVERY') NOT NULL DEFAULT 'PENDING', + `new_customer` ENUM('ENEBLED', 'DISABLED') DEFAULT 'DISABLED', + `amount_paid` numeric(8,2) NOT NULL, + `amount_to_pay` numeric(8,2) NOT NULL, + `last_reference_number` smallint NOT NULL, + `comments` varchar(200), + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36), + `last_updated_on` datetime, + CONSTRAINT `apc_loan_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_loan_to_apc_loan_type_fk` + FOREIGN KEY (`id_loan_type`) REFERENCES `APC_LOAN_TYPE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_to_apc_person_as_customer_fk` + FOREIGN KEY (`id_customer`) REFERENCES `APC_PEOPLE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_to_apc_person_as_endorsement_fk` + FOREIGN KEY (`id_endorsement`) REFERENCES `APC_PEOPLE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_to_apc_route_fk` + FOREIGN KEY (`id_route`) REFERENCES `APC_ROUTE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_HUMAN_RESOURCE_BY_OFFICE` +-- +CREATE TABLE `APC_HUMAN_RESOURCE_BY_OFFICE`( + `id` char(36) NOT NULL, + `id_human_resource` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `application_owner` ENUM('APP_OWNER', 'APP_USER') NOT NULL DEFAULT 'APP_USER', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_human_resource_by_office_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_human_resource_by_office_uk` UNIQUE KEY (`id_human_resource`, `id_office`), + CONSTRAINT `apc_human_resource_by_office_to_apc_human_resource_fk` + FOREIGN KEY (`id_human_resource`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_human_resource_by_office_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_USER` +-- +CREATE TABLE `APC_USER`( + `id` char(36) NOT NULL, + `id_human_resource` char(36) NOT NULL, + `user_name` varchar(100) NOT NULL, + `pwd` varchar(100)NOT NULL, + `user_type` ENUM('WEB', 'MOBILE', 'BOTH') NOT NULL, + `user_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `application_owner` ENUM('APP_OWNER', 'APP_USER') NOT NULL DEFAULT 'APP_USER', + `certifier` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'DISABLED', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_user_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_user_by_office_to_apc_human_resource_fk` + FOREIGN KEY (`id_human_resource`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_LOAN_DETAIL` +-- +CREATE TABLE `APC_LOAN_DETAIL`( + `id` char(36) NOT NULL, + `id_loan` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `people_type` ENUM('CUSTOMER', 'ENDORSEMENT') NOT NULL DEFAULT 'CUSTOMER', + `payment_amount` numeric(8,2) NOT NULL, + `reference_number` smallint NOT NULL, + `loan_details_type` ENUM('CREDIT_PAYMENT', 'DEBIT_PAYMENT', 'PAYMENT', 'FEE','RENOVATION_PAYMENT') NOT NULL, + `loan_comments` varchar(150), + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_loan_details_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_loan_details_uk` UNIQUE KEY (`id`,`reference_number`), + CONSTRAINT `apc_loan_details_to_apc_loan_fk` + FOREIGN KEY (`id_loan`) REFERENCES `APC_LOAN`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_details_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_LOAN_FEE_NOTIFICATION` +-- +CREATE TABLE `APC_LOAN_FEE_NOTIFICATION`( + `id` char(36) NOT NULL, + `id_loan` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `notification_number` smallint NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_loan_notification_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_loan_notification_to_apc_loan_fk` + FOREIGN KEY (`id_loan`) REFERENCES `APC_LOAN`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_notification_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_LOAN_BY_USER` +-- +CREATE TABLE `APC_LOAN_BY_USER`( + `id_loan` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `loan_by_user_status` ENUM('PENDING', 'FINISH','BLACK_LIST', 'APPROVED','REJECTED', 'PENDING_RENOVATION', 'TO_DELIVERY') NOT NULL DEFAULT 'PENDING', + `comments` varchar(150), + `owner_loan` ENUM('CURRENT_OWNER', 'OLD_OWNER') NOT NULL, + `order_in_list` smallint DEFAULT 0, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_loan_by_user_pk` PRIMARY KEY (`id_loan`, `id_user`), + CONSTRAINT `apc_loan_by_user_to_apc_loan_fk` + FOREIGN KEY (`id_loan`) REFERENCES `APC_LOAN`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_by_user_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_LOAN_BY_RENOVATION` +-- +CREATE TABLE `APC_LOAN_BY_RENOVATION`( + `id_loan_old` char(36) NOT NULL, + `id_loan_new` char(36) NOT NULL, + `loan_by_renovation_status` ENUM('PENDING', 'APPROVED','REJECTED') NOT NULL DEFAULT 'PENDING', + `comments` varchar(150), + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_loan_by_renovation_pk` PRIMARY KEY (`id_loan_old`, `id_loan_new`), + CONSTRAINT `apc_loan_by_renovation_old_to_apc_loan_fk` + FOREIGN KEY (`id_loan_old`) REFERENCES `APC_LOAN`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_by_renovation_new_to_apc_user_fk` + FOREIGN KEY (`id_loan_new`) REFERENCES `APC_LOAN`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_USER_BY_OFFICE` +-- +CREATE TABLE `APC_USER_BY_OFFICE`( + `id` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `user_by_office_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `application_owner` ENUM('APP_OWNER', 'APP_USER')NOT NULL DEFAULT 'APP_USER', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_user_by_office_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_user_by_office_uk` UNIQUE KEY (`id_user`, `id_office`), + CONSTRAINT `apc_user_by_office_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_user_by_office_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_PERMISSION` +-- +CREATE TABLE `APC_PERMISSION` ( + `id` char(36) NOT NULL, + `permission` varchar(200) NOT NULL, -- dashboard.policy.to.expire.name + `description` varchar(200) NOT NULL, -- dashboard.policy.to.expire.description + `menu_path` varchar(200) NOT NULL, -- dashboard.policy.to.expire.path + `left_to_right_order` smallint NOT NULL, -- Orden en la que aparece el menu principal (Dashboard, Administración, Catálogo) + `top_to_bottom_order` smallint NOT NULL, -- Orden en la que aparece de arriba hacia abajo + `permission_type` ENUM('PUBLIC', 'PRIVATE', 'EXCLUSIVE') NOT NULL, + `parent_name` varchar(200), + `permission_status` ENUM('ENEBLED', 'DISABLED') NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_permission_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_permission_uk` UNIQUE KEY (`permission`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_USER_BY_OFFICE_HAS_PERMISSION` +-- +CREATE TABLE `APC_USER_BY_OFFICE_HAS_PERMISSION` ( + `id_user_by_office` char(36) NOT NULL, + `id_permission` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_user_by_office_has_permission_pk` PRIMARY KEY (`id_user_by_office`,`id_permission`) , + CONSTRAINT `apc_user_by_office_has_permission_to_apc_user_by_office_fk` + FOREIGN KEY (`id_user_by_office`) REFERENCES `APC_USER_BY_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_user_by_office_has_permission_to_apc_permission_fk` + FOREIGN KEY (`id_permission`) REFERENCES `APC_PERMISSION`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_USER_MOBILE_PREFERECE` +-- +CREATE TABLE `APC_USER_MOBILE_PREFERECE`( + `id` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `preference_name` varchar(25) NOT NULL, + `preference_value` varchar(25) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_user_mobile_preference_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_user_mobile_preference_uk` UNIQUE KEY (`id_user`,`preference_name`), + CONSTRAINT `apc_user_mobile_preference_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_TRANSFER` +-- +CREATE TABLE `APC_TRANSFER`( + `id` char(36) NOT NULL, + `id_user_transmitter` char(36) NOT NULL, + `id_user_receiver` char(36) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `action_status` ENUM('PENDING', 'APPROVED','REJECTED') NOT NULL DEFAULT 'PENDING', + `amount_to_transfer` numeric(8,2) NOT NULL, + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_transfer_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_transfer_user_transmitter_to_apc_user_fk` + FOREIGN KEY (`id_user_transmitter`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_transfer_user_receiver_to_apc_user_fk` + FOREIGN KEY (`id_user_receiver`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_transfer_by_office_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_MONEY_DAILY` +-- +CREATE TABLE `APC_MONEY_DAILY`( + `id` char(36) NOT NULL, + `money_daily_date` datetime DEFAULT CURRENT_TIMESTAMP, + `amount` numeric(8,2) NOT NULL, + `id_user` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_money_daily_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_money_daily_by_id_user_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_money_daily_by_id_office_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de la tabla `APC_DELIVERY` +-- +CREATE TABLE `APC_DELIVERY`( + `id` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `id_loan` char(36) NOT NULL, + `amount` numeric(8,2) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_delivery_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_delivery_by_id_user_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_delivery_to_apc_loan_fk` + FOREIGN KEY (`id_loan`) REFERENCES `APC_LOAN`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- ------------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_CLOSING_DAY` +-- +CREATE TABLE `APC_CLOSING_DAY`( + `id` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `amount_paid` numeric(8,2) NOT NULL, + `amount_expected` numeric(8,2) NOT NULL, + `comments` varchar(250), + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_closing_day_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_closing_day_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_closing_day_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- ------------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_OTHER_EXPENSE` +-- +CREATE TABLE `APC_OTHER_EXPENSE`( + `id` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `expense` numeric(8,2) NOT NULL, + `description` varchar(200) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_other_expense_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_other_expense_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_other_expense_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_GOAL` +-- +-- Dar de alta las metas de los trabajadores. +-- +CREATE TABLE `APC_GOAL`( + `id` char(36) NOT NULL, + `start_date` date NOT NULL, + `end_date` date NOT NULL, + `amount` numeric(8,2) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_goal_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_goal_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_ADVANCE` +-- +-- Adelanto de nomina. +-- +CREATE TABLE `APC_ADVANCE`( + `id` char(36) NOT NULL, + `id_human_resource` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `amount` numeric(8,2) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_advance_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_advance_to_apc_human_resource_fk` + FOREIGN KEY (`id_human_resource`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_advance_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la tabla `APC_EXPENSE_COMPANY` +-- +-- Gastos de la compañia. +-- +CREATE TABLE `APC_EXPENSE_COMPANY`( + `id` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `amount` numeric(8,2) NOT NULL, + `description` varchar(200), + `expense_company_type` ENUM('PAYMENT_IN', 'PAYMENT_OUT') NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_expense_company_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_expense_company_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la tabla `APC_STABLE_GENERAL_BOX` +-- +-- Totales de la caja de APC. +-- +CREATE TABLE `APC_STABLE_GENERAL_BOX`( + `id` char(36) NOT NULL, + `total_general_box` numeric(8,2) NOT NULL, + `total_envelope` numeric(8,2) NOT NULL, + `total_bank_note` numeric(8,2) NOT NULL, + `total_coin` numeric(8,2) NOT NULL, + `total_stable` numeric(8,2) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `description` varchar(200), + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_stable_general_box_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_stable_general_box_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Estructura para la tabla `APC_STABLE_GENERAL_BOX` +-- +-- Totales de la caja de APC. +-- +CREATE TABLE `APC_TOTAL_EXPECTED_PAYMENT_DAILY_BY_USER`( + `id` char(36) NOT NULL, + `total_expected` numeric(8,2) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `id_office` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_total_expected_payment_daily_by_user_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_total_expected_payment_daily_by_user_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_total_expected_payment_daily_by_user_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `ARREBOL_TEST` +-- +-- Solo para pruebas exclusivas. +-- +CREATE TABLE `ARREBOL_TEST`( + `id` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_SECURITY_AUTHENTICATION` (USER) +-- +CREATE OR REPLACE VIEW `APC_SECURITY_AUTHENTICATION` AS +SELECT CONCAT(`usr`.`user_name`,`ubo`.`id_office`) AS `user_name`, `usr`.`pwd` AS `pwd` +FROM `APC_USER_BY_OFFICE` `ubo` +INNER JOIN `APC_USER` `usr` ON `ubo`.`id_user` = `usr`.`id` +INNER JOIN `APC_HUMAN_RESOURCE` `hr` ON `usr`.`id_human_resource` = `hr`.`id` +WHERE +`usr`.`user_status` = 'ENEBLED' AND +`usr`.`user_type` IN ('WEB', 'BOTH') AND +`ubo`.`user_by_office_status` = 'ENEBLED' AND +`hr`.`human_resource_status` = 'ENEBLED'; +-- ------------------------------------------------------------ +-- +-- Estructura para la vista `APC_SECURITY_AUTHORIZATION` (ROLE) +-- +CREATE OR REPLACE VIEW `APC_SECURITY_AUTHORIZATION` AS +SELECT CONCAT(`usr`.`user_name`,`ubo`.`id_office`) AS `user_name`, `perm`.`permission` AS `permission` +FROM `APC_PERMISSION` `perm` +INNER JOIN `APC_USER_BY_OFFICE_HAS_PERMISSION` `ubohp` ON `perm`.`id` = `ubohp`.`id_permission` +INNER JOIN `APC_USER_BY_OFFICE` `ubo` ON `ubohp`.`id_user_by_office` = `ubo`.`id` +INNER JOIN `APC_USER` `usr` ON `ubo`.`id_user` = `usr`.`id` +INNER JOIN `APC_HUMAN_RESOURCE` `hr` ON `usr`.`id_human_resource` = `hr`.`id` +WHERE +`perm`.`permission_status` = 'ENEBLED' AND +`ubo`.`user_by_office_status` = 'ENEBLED' AND +`usr`.`user_status` = 'ENEBLED' AND +`usr`.`user_type` IN ('WEB', 'BOTH') AND +`hr`.`human_resource_status` = 'ENEBLED' +ORDER BY `user_name`; +-- ------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_SECURITY_AUTHENTICATION_MOBILE` (USER) +-- +CREATE OR REPLACE VIEW `APC_SECURITY_AUTHENTICATION_MOBILE` AS +SELECT +`usr`.`id` AS `id`, +`usr`.`user_name` AS `user_name`, +`usr`.`pwd` AS `pwd`, +`hr`.`avatar` AS `avatar`, +`ubo`.`id_office` AS `id_office`, +`hrhr`.`id_route` AS `id_route`, +`usr`.`certifier` AS `certifier` +FROM `APC_USER_BY_OFFICE` `ubo` +INNER JOIN `APC_USER` `usr` ON `ubo`.`id_user` = `usr`.`id` +INNER JOIN `APC_HUMAN_RESOURCE` `hr` ON `usr`.`id_human_resource` = `hr`.`id` +INNER JOIN `APC_HUMAN_RESOURCE_HAS_ROUTE` `hrhr` ON `hr`.`id` = `hrhr`.`id_human_resource` +WHERE +`usr`.`user_status` = 'ENEBLED' AND +`usr`.`user_type` IN ('MOBILE', 'BOTH') AND +`ubo`.`user_by_office_status` = 'ENEBLED' AND +`hr`.`human_resource_status` = 'ENEBLED'; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_LOAN_BY_USER_VIEW` (USER) +-- Se utiliza para que un Asesor cargue todos los pretamos que tiene +-- que cobrar en el día actual. +-- +CREATE OR REPLACE VIEW `APC_LOAN_BY_USER_VIEW` AS +SELECT + CONCAT(l.id, u.id) AS id, + u.id AS user_id, + CONCAT( + CASE + WHEN cstmr.first_name IS NOT NULL AND cstmr.first_name != '' + THEN CONCAT(SUBSTR(UPPER(cstmr.first_name), 1, 1),SUBSTR(LOWER(cstmr.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN cstmr.second_name IS NOT NULL AND cstmr.second_name != '' + THEN CONCAT(SUBSTR(UPPER(cstmr.second_name), 1, 1),SUBSTR(LOWER(cstmr.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN cstmr.last_name IS NOT NULL AND cstmr.last_name != '' + THEN CONCAT(SUBSTR(UPPER(cstmr.last_name), 1, 1),SUBSTR(LOWER(cstmr.last_name), 2)) + ELSE '' + END + ) AS customer_name, + (CASE + WHEN cstmr.address_home IS NULL THEN '' + ELSE cstmr.address_home + END) AS customer_address_home, + (CASE + WHEN cstmr.address_business IS NULL THEN '' + ELSE cstmr.address_business + END) AS customer_address_business, + (CASE + WHEN cstmr.company_name IS NULL THEN '' + ELSE cstmr.company_name + END) AS company_name, + (CASE + WHEN cstmr.thumbnail IS NULL THEN '' + ELSE cstmr.thumbnail + END) AS customer_thumbnail, + CONCAT( + CASE + WHEN ndrsmnt.first_name IS NOT NULL AND ndrsmnt.first_name != '' + THEN CONCAT(SUBSTR(UPPER(ndrsmnt.first_name), 1, 1),SUBSTR(LOWER(ndrsmnt.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ndrsmnt.second_name IS NOT NULL AND ndrsmnt.second_name != '' + THEN CONCAT(SUBSTR(UPPER(ndrsmnt.second_name), 1, 1),SUBSTR(LOWER(ndrsmnt.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ndrsmnt.last_name IS NOT NULL AND ndrsmnt.last_name != '' + THEN CONCAT(SUBSTR(UPPER(ndrsmnt.last_name), 1, 1),SUBSTR(LOWER(ndrsmnt.last_name), 2)) + ELSE '' + END + )AS endorsement_name, + (CASE + WHEN ndrsmnt.address_home IS NULL THEN '' + ELSE ndrsmnt.address_home + END) AS endorsement_address_home, + (CASE + WHEN ndrsmnt.thumbnail IS NULL THEN '' + ELSE ndrsmnt.thumbnail + END) AS endorsement_thumbnail, + (CASE + WHEN ndrsmnt.phone_home IS NULL THEN '' + ELSE ndrsmnt.phone_home + END) AS endorsement_phone_home, + IF((l.amount_to_pay - l.amount_paid >= lt.payment_daily), lt.payment_daily, l.amount_to_pay - l.amount_paid) AS payment_daily, + lt.loan_fee, + lbu.order_in_list, + (SELECT count(notification_number) FROM APC_LOAN_FEE_NOTIFICATION WHERE id_loan = l.id) AS notification_number, +IF( + ( + l.amount_paid >= (SELECT FLOOR(lt.payment_total * .6364) FROM DUAL) + ), + CASE + WHEN + (SELECT count(notification_number) as total + FROM APC_LOAN_FEE_NOTIFICATION + WHERE id_loan = l.id + ) < 4 + THEN 'ENEBLED' + WHEN + (SELECT count(notification_number) as total + FROM APC_LOAN_FEE_NOTIFICATION + WHERE id_loan = l.id + ) BETWEEN 4 AND 5 + AND + lt.payment > 1000 + THEN 'ENEBLED' + ELSE 'DISABLED' + END + ,'DISABLED' +) as renovation, +(SELECT amount_to_pay - amount_paid FROM APC_LOAN WHERE id = l.id) AS max_amount_to_pay +FROM APC_LOAN_BY_USER lbu +INNER JOIN APC_LOAN l ON lbu.id_loan = l.id +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE cstmr ON l.id_customer = cstmr.id +INNER JOIN APC_PEOPLE ndrsmnt ON l.id_endorsement = ndrsmnt.id +INNER JOIN APC_USER u ON lbu.id_user = u.id +WHERE + l.loan_status = 'APPROVED' AND + l.id = ( + CASE + -- WHEN IS NEW AND update created_on less equals to currentdate + WHEN ( + (SELECT count(id) FROM APC_LOAN_DETAIL WHERE id_loan = l.id ) = 0 AND + DATE(l.last_updated_on) < curdate() + ) THEN l.id + -- WHEN LOAN HAS PAYMENTS + WHEN ( + ( + SELECT count(id) + FROM APC_LOAN_DETAIL + WHERE + id_loan = l.id AND + reference_number = l.last_reference_number AND + DATE(created_on) < curdate() + ) > 0 AND + DATE(l.last_updated_on) < curdate() + ) THEN l.id + ELSE '' + END + ) AND + lbu.owner_loan = 'CURRENT_OWNER'; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_LOAN_BY_USER_ORDER_PREFERENCE_VIEW` (USER) +-- Se utiliza para que un Asesor cargue todos los pretamos que tiene +-- que cobrar en el día actual y los pueda order por order de preferencia +-- para que pueda programar suta a su gusto. +-- +CREATE OR REPLACE VIEW `APC_LOAN_BY_USER_ORDER_PREFERENCE_VIEW` AS +SELECT + CONCAT(l.id, u.id) AS id, + u.id AS user_id, + CONCAT(cstmr.first_name,' ',IF(ISNULL(cstmr.second_name) ,'', CONCAT(cstmr.second_name, ' ')),cstmr.last_name,' ', cstmr.middle_name) AS customer_name, + cstmr.address_home AS customer_address_home, + cstmr.address_business AS customer_address_business, + lbu.order_in_list +FROM APC_LOAN_BY_USER lbu +INNER JOIN APC_LOAN l ON lbu.id_loan = l.id +INNER JOIN APC_PEOPLE cstmr ON l.id_customer = cstmr.id +INNER JOIN APC_USER u ON lbu.id_user = u.id +WHERE l.loan_status = 'APPROVED'; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_PERSON_SEARCH_VIEW` +-- Se utiliza para realizar busqueda por nombre. +-- +CREATE OR REPLACE VIEW `APC_PERSON_SEARCH_VIEW` AS +SELECT + id, + CONCAT( + CASE + WHEN first_name IS NOT NULL AND first_name != '' + THEN CONCAT(SUBSTR(UPPER(first_name), 1, 1),SUBSTR(LOWER(first_name), 2)) + ELSE '' + END, + CASE + WHEN second_name IS NOT NULL AND second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(second_name), 1, 1),SUBSTR(LOWER(second_name), 2)) + ELSE '' + END, + CASE + WHEN last_name IS NOT NULL AND last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(last_name), 1, 1),SUBSTR(LOWER(last_name), 2)) + ELSE '' + END, + CASE + WHEN middle_name IS NOT NULL AND middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(middle_name), 1, 1),SUBSTR(LOWER(middle_name), 2)) + ELSE '' + END + ) AS person_search +FROM APC_PEOPLE +WHERE active_status = 'ENEBLED' +ORDER BY person_search; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_PERSON_SEARCH_DETAIL_VIEW` +-- Busca los detalles de una persona en el sistema. +CREATE OR REPLACE VIEW `APC_PERSON_SEARCH_DETAIL_VIEW` AS +SELECT + p.id AS id, + CONCAT( + CASE + WHEN p.first_name IS NOT NULL AND p.first_name != '' + THEN CONCAT(SUBSTR(UPPER(p.first_name), 1, 1),SUBSTR(LOWER(p.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN p.second_name IS NOT NULL AND p.second_name != '' + THEN CONCAT(SUBSTR(UPPER(p.second_name), 1, 1),SUBSTR(LOWER(p.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN p.last_name IS NOT NULL AND p.last_name != '' + THEN CONCAT(SUBSTR(UPPER(p.last_name), 1, 1),SUBSTR(LOWER(p.last_name), 2), ' ') + ELSE '' + END, + CASE + WHEN p.middle_name IS NOT NULL AND p.middle_name != '' + THEN CONCAT(SUBSTR(UPPER(p.middle_name), 1, 1),SUBSTR(LOWER(p.middle_name), 2)) + ELSE '' + END + ) AS person_search, + p.thumbnail, + CASE + WHEN + 0 < ( + SELECT COUNT(ID) + FROM APC_LOAN + WHERE + id_customer = p.id AND + loan_status = 'APPROVED') + THEN + 'ENEBLED' + WHEN + 0 < ( + SELECT COUNT(ID) + FROM APC_LOAN + WHERE + id_endorsement = p.id AND + loan_status = 'APPROVED') + THEN + 'ENEBLED' + ELSE + 'DISABLED' + END AS loanStatus +FROM APC_PEOPLE p; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_PERSON_SEARCH_HISTORICAL_DETAILS_VIEW` +-- Busca los detalles historicos de una persona en el sistema móvil. +CREATE OR REPLACE VIEW `APC_PERSON_SEARCH_HISTORICAL_DETAILS_VIEW` AS +SELECT + l.id, + p.id AS id_person_search, + DATE_FORMAT(l.created_on,'%d-%m-%Y') AS format_date, + CASE + WHEN 0 < (SELECT COUNT(ID) FROM APC_LOAN WHERE id_customer = p.id) + THEN 'Cliente' + WHEN 0 < (SELECT COUNT(ID) FROM APC_LOAN WHERE id_endorsement = p.id) + THEN 'Aval' + ELSE + 'Indeterminado' + END AS person_type, + CASE + WHEN 0 < (SELECT COUNT(ID) FROM APC_LOAN WHERE id_customer = p.id) + THEN + (SELECT CONCAT(in_p.first_name,' ', in_p.last_name) + FROM APC_LOAN in_l + INNER JOIN APC_PEOPLE in_p ON in_l.id_endorsement = in_p.id + WHERE in_l.id = l.id) + WHEN 0 < (SELECT COUNT(ID) FROM APC_LOAN WHERE id_endorsement = p.id) + THEN (SELECT CONCAT(in_p.first_name,' ', in_p.last_name) + FROM APC_LOAN in_l + INNER JOIN APC_PEOPLE in_p ON in_l.id_customer = in_p.id + WHERE in_l.id = l.id) + ELSE + 'Indeterminado' + END AS relationship, + lt.payment AS loan, + CASE + WHEN l.loan_status = 'APPROVED' + THEN CONCAT(l.last_reference_number, ' de 22') + ELSE '' + END AS payment_number, + CASE + WHEN l.loan_status = 'APPROVED' + THEN (l.amount_to_pay - l.amount_paid) + ELSE 0 + END AS amount_to_pay, + (SELECT COUNT(id) FROM APC_LOAN_FEE_NOTIFICATION WHERE id_loan = l.id) AS total_fees, + CASE + WHEN l.loan_status = 'PENDING' + THEN 'Pendiente' + WHEN l.loan_status = 'FINISH' + THEN 'Terminado' + WHEN l.loan_status = 'BLACK_LIST' + THEN 'Lista negra' + WHEN l.loan_status = 'APPROVED' + THEN 'Activo' + WHEN l.loan_status = 'REJECTED' + THEN 'Rechazado' + WHEN l.loan_status = 'PENDING_RENOVATION' + THEN 'Pendiente renovación' + WHEN l.loan_status = 'TO_DELIVERY' + THEN 'Por recibir' + END AS loan_status +FROM APC_LOAN l +INNER JOIN APC_PEOPLE p ON (l.id_customer = p.id or l.id_endorsement = p.id) +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +ORDER BY l.created_on DESC; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_AVAILABLE_CUSTOMERS_VIEW` +-- +-- Sirve para cargar todos los posibles clientes de una oficina +-- que puedan solicitar un prestamo nuevo. +-- +CREATE OR REPLACE VIEW `APC_AVAILABLE_CUSTOMERS_VIEW` AS +SELECT + p.id, + CONCAT(p.first_name,' ', IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name,' ')) ,p.last_name, ' ', p.middle_name) AS available_person, + CASE + WHEN p.people_type = 'BOTH' + THEN + CASE + WHEN 0 < (SELECT COUNT(id) FROM APC_LOAN WHERE id_customer = p.id) + THEN (SELECT id_endorsement FROM APC_LOAN WHERE id_customer = p.id ORDER BY created_on DESC LIMIT 1 ) + ELSE '' + END + ELSE '' + END as cross_signature +FROM APC_PEOPLE p +WHERE + p.people_type IN ('CUSTOMER', 'BOTH') AND + p.active_status = 'ENEBLED' AND + CASE + WHEN 0 = ( + SELECT COUNT(id) + FROM APC_LOAN + WHERE + id_customer = p.id AND + loan_status IN ('PENDING', 'BLACK_LIST', 'APPROVED', 'PENDING_RENOVATION', 'TO_DELIVERY') + ) + THEN TRUE + ELSE FALSE + END +ORDER BY available_person; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_AVAILABLE_ENDORSEMENT_VIEW` +-- +-- Sirve para cargar todos los posibles avales de una oficina +-- que puedan solicitar un prestamo nuevo. +-- +CREATE OR REPLACE VIEW `APC_AVAILABLE_ENDORSEMENTS_VIEW` AS +SELECT + p.id, + CONCAT(p.first_name,' ', IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name,' ')) ,p.last_name, ' ', p.middle_name) AS available_person, + CASE + WHEN p.people_type = 'BOTH' + THEN + CASE + WHEN 0 < (SELECT COUNT(id) FROM APC_LOAN WHERE id_endorsement = p.id) + THEN (SELECT id_customer FROM APC_LOAN WHERE id_endorsement = p.id ORDER BY created_on DESC LIMIT 1 ) + ELSE '' + END + ELSE '' + END as cross_signature +FROM APC_PEOPLE p +WHERE + p.people_type IN ('ENDORSEMENT', 'BOTH') AND + p.active_status = 'ENEBLED' AND + CASE + WHEN 0 = ( + SELECT COUNT(id) + FROM APC_LOAN + WHERE + id_endorsement = p.id AND + loan_status IN ('PENDING', 'BLACK_LIST', 'APPROVED', 'PENDING_RENOVATION', 'TO_DELIVERY') + ) + THEN TRUE + ELSE FALSE + END +ORDER BY available_person; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_CASH_REGISTER_CURDATE_BY_USER_VIEW` +-- +-- Sirve para obtener todos los pagos que recabo un asesor en el día. +-- +CREATE OR REPLACE VIEW `APC_CASH_REGISTER_CURDATE_BY_USER_VIEW` AS +SELECT + UUID() AS id, + lt.payment_amount AS payment, + CONCAT(p.first_name, ' ', p.last_name) AS customer_name, + lt.id_user AS id_user +FROM APC_LOAN_DETAIL lt +INNER JOIN APC_LOAN l ON lt.id_loan = l.id +INNER JOIN APC_PEOPLE p ON l.id_customer = p.id +WHERE + lt.loan_details_type = 'PAYMENT' AND + DATE(lt.created_on) = CURDATE() +ORDER BY lt.created_on; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_LOAN_TO_DELIVERY_BY_CERTIFIER_VIEW` +-- +-- Sirve para obtener todos los prestamos que un certificador tiene que entregar. +-- +CREATE OR REPLACE VIEW `APC_LOAN_TO_DELIVERY_BY_CERTIFIER_VIEW` AS +SELECT + l.id AS id_loan, + u.id AS id_user, + -- u.user_name, + -- hrhr.id_route, + -- l.loan_status, + CONCAT( + CASE + WHEN p.first_name IS NOT NULL + THEN CONCAT(SUBSTR(UPPER(p.first_name), 1, 1),SUBSTR(LOWER(p.first_name), 2)) + ELSE '' + END, + CASE + WHEN p.second_name IS NOT NULL + THEN CONCAT(' ',SUBSTR(UPPER(p.second_name), 1, 1),SUBSTR(LOWER(p.second_name), 2)) + ELSE '' + END, + CASE + WHEN p.last_name IS NOT NULL + THEN CONCAT(' ',SUBSTR(UPPER(p.last_name), 1, 1),SUBSTR(LOWER(p.last_name), 2)) + ELSE '' + END + ) AS customer_name, + CASE + WHEN p.address_business IS NOT NULL + THEN CONCAT(SUBSTR(UPPER(p.address_business), 1, 1),SUBSTR(LOWER(p.address_business), 2)) + ELSE '' + END AS customer_address, + p.thumbnail AS thumbnail, + CASE + WHEN (SELECT COUNT(id_loan_new) FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id) > 0 + THEN 'star' + ELSE 'new' + END AS icon, + CASE + WHEN (SELECT COUNT(id_loan_new) FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id) > 0 + THEN + CASE + WHEN -- (SELECT amount_to_pay - amount_paid FROM APC_LOAN WHERE id = l.id) > (lt.payment_daily * 2) + (SELECT innerL.amount_to_pay - innerL.amount_paid FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) + > + (SELECT innerLT.payment_daily FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) + THEN + CASE + WHEN + (SELECT (innerL.amount_to_pay - innerL.amount_paid) - (innerLT.payment_daily * 2) FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) > 0 + THEN + lt.payment - + (lt.opening_fee + + -- ((l.amount_to_pay - l.amount_paid) - (lt.payment_daily * 2)) + (SELECT (innerL.amount_to_pay - innerL.amount_paid) - (innerLT.payment_daily * 2) FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id))) + ELSE + lt.payment - + (lt.opening_fee + + -- ((l.amount_to_pay - l.amount_paid) - (lt.payment_daily * 2)) + (SELECT (innerLT.payment_daily * 2) - (innerL.amount_to_pay - innerL.amount_paid) FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id))) + END + ELSE lt.payment - lt.opening_fee + END + ELSE lt.payment - lt.opening_fee + END AS amount_to_delivery, + CASE + WHEN (SELECT COUNT(id_loan_new) FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id) > 0 + THEN + CASE + WHEN -- (SELECT amount_to_pay - amount_paid FROM APC_LOAN WHERE id = l.id) > (lt.payment_daily * 2) + (SELECT innerL.amount_to_pay - innerL.amount_paid FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) + > + (SELECT innerLT.payment_daily FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) + THEN -- ((l.amount_to_pay - l.amount_paid) - (lt.payment_daily * 2)) + CASE + WHEN + (SELECT (innerL.amount_to_pay - innerL.amount_paid) - (innerLT.payment_daily * 2) FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) + > 0 + THEN + (SELECT (innerL.amount_to_pay - innerL.amount_paid) - (innerLT.payment_daily * 2) FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) + ELSE + (SELECT (innerLT.payment_daily * 2) -(innerL.amount_to_pay - innerL.amount_paid) FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) + END + ELSE 0 + END + ELSE 0 + END AS discount, + lt.opening_fee AS opening, + lt.payment AS payment +FROM + APC_USER u + INNER JOIN APC_HUMAN_RESOURCE_HAS_ROUTE hrhr ON u.id_human_resource = hrhr.id_human_resource + INNER JOIN APC_HUMAN_RESOURCE hr ON hrhr.id_human_resource = hr.id + INNER JOIN APC_ROLE r ON hr.id_role = r.id + INNER JOIN APC_LOAN l ON hrhr.id_route = l.id_route + INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id + INNER JOIN APC_PEOPLE p ON l.id_customer = p.id +WHERE + u.certifier = 'ENEBLED' AND + l.loan_status = 'TO_DELIVERY' AND + DATE(l.created_on) <= CURDATE() +ORDER BY customer_name DESC; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_EXCHANGE_ENEBLED_USERS_VIEW` +-- +-- Sirve para obtener todos los usuarios disponibles para realizar traspasos. +-- +CREATE OR REPLACE VIEW `APC_EXCHANGE_ENEBLED_USERS_VIEW` AS +SELECT +u.id AS id_user, +CONCAT(hr.first_name, ' ', IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name,' ')), hr.second_name, ' ', hr.last_name) AS user_name, +hrbo.id_office AS id_office +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON u.id_human_resource = hr.id +INNER JOIN APC_HUMAN_RESOURCE_BY_OFFICE hrbo ON hr.id = hrbo.id_human_resource +WHERE u.user_status = 'ENEBLED' and +u.user_type IN ('MOBILE','BOTH'); +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_TOTAL_CASH_BY_CURDATE_VIEW` +-- +-- Sirve para obtener lo que tiene que entregar el asesor al final del día. +-- +CREATE OR REPLACE VIEW `APC_TOTAL_CASH_BY_CURDATE_VIEW` AS +SELECT + u.id, + ubo.id_office, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(ld.payment_amount)),0, SUM(ld.payment_amount)) + FROM APC_LOAN_DETAIL ld + WHERE + ld.id_user = u.id AND + ld.loan_details_type = 'PAYMENT' AND + DATE(ld.created_on) = CURDATE() + ) + ,0.0 + )AS total_amount_payment, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(ld.payment_amount)),0, SUM(ld.payment_amount)) + FROM APC_LOAN_DETAIL ld + WHERE + ld.id_user = u.id AND + ld.loan_details_type = 'TRANSFER' AND + DATE(ld.created_on) = CURDATE() + ) + ,0.0 + )AS total_amount_deposit, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(amount_to_transfer)),0, SUM(amount_to_transfer)) + FROM APC_TRANSFER + WHERE + id_user_transmitter = u.id AND + action_status = 'APPROVED' AND + active_status = 'ENEBLED' AND + DATE(last_updated_on) = CURDATE() + ) + ,0.0 + ) AS transfer_sender, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(amount_to_transfer)),0, SUM(amount_to_transfer)) + FROM APC_TRANSFER + WHERE + id_user_receiver = u.id AND + action_status = 'APPROVED' AND + active_status = 'ENEBLED' AND + DATE(last_updated_on) = CURDATE() + ) + ,0.0 + ) AS transfer_receiver, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(amount)),0, SUM(amount)) + FROM APC_MONEY_DAILY + WHERE + id_user = u.id AND + DATE(money_daily_date) = CURDATE() + ) + ,0.0 + ) AS money_daily, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(expense)),0, SUM(expense)) + FROM APC_OTHER_EXPENSE + WHERE + id_user = u.id AND + DATE(created_on) = CURDATE() + ) + ,0.0 + )AS other_expense, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(amount)),0, SUM(amount)) + FROM APC_DELIVERY + WHERE + id_user = u.id AND + DATE(created_on) = CURDATE() + ) + , 0.0 + ) as delivery, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(amount_to_transfer)),0, SUM(amount_to_transfer)) + FROM APC_TRANSFER + WHERE + id_user_receiver = u.id AND + action_status = 'PENDING' AND + active_status = 'ENEBLED' AND + DATE(created_on) = CURDATE() + ) + ,0.0 + ) AS transfer_pending +FROM APC_USER u +JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE + u.user_status = 'ENEBLED'; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_TOTAL_LOANS_BY_OFFICE` +-- +-- +CREATE OR REPLACE VIEW `APC_TOTAL_LOANS_BY_OFFICE` AS +SELECT + l.id, + l.loan_status, + r.id_office, + r.route_name, + l.id_route, + l.amount_to_pay, + l.amount_paid + FROM + APC_LOAN l + JOIN + APC_ROUTE r ON r.id = l.id_route + WHERE + l.loan_status in ('PENDING', 'FINISH', 'APPROVED','REJECTED','TO_DELIVERY') + AND r.active_status = 'ENEBLED'; +-- -------------------------------------------------------------------- +-- Estructura para la vista `APC_TOTAL_CLOSING_DAY_BY_CURDATE_VIEW` +-- +-- Sirve para obtener lo que tiene que entregar el asesor al final del día. +-- +CREATE OR REPLACE VIEW `APC_TOTAL_CLOSING_DAY_BY_CURDATE_VIEW` AS +SELECT + u.id, + u.id_office, + u.amount_paid +FROM APC_CLOSING_DAY u +WHERE + u.active_status = 'ENEBLED' AND + DATE(u.created_on) = CURDATE(); +-- -------------------------------------------------------------------- +-- Estructura para la vista `APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW` +-- +-- Sirve para obtener los detalles del total de los cobros realizados por los asesores +-- estos pueden ser tanto pagos como multas. +-- +CREATE OR REPLACE VIEW `APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW` AS +SELECT + ld.id, + CONCAT(p.first_name,' ',IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name, ' ')),p.last_name,' ', p.middle_name) AS comments, + ld.payment_amount as amount, + CASE + WHEN ld.loan_details_type = 'PAYMENT' THEN 'Abono' + WHEN ld.loan_details_type = 'FEE' THEN 'Multa' + WHEN ld.loan_details_type = 'TRANSFER' THEN 'Depósito' + ELSE '' END as type, + ld.id_user, + ld.created_on, + l.created_on as fechaFiltro, + 'xxxx' as route, + (l.amount_to_pay - amount_paid) as saldo +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON ld.id_loan = l.id +INNER JOIN APC_PEOPLE p ON l.id_customer = p.id +WHERE DATE(ld.created_on) = CURDATE() +AND ld.loan_details_type in ('PAYMENT', 'FEE', 'TRANSFER' ) +UNION +SELECT + md.id, + DATE(md.money_daily_date) AS comments, + md.amount as amount, + 'Inicio' as type, + md.id_user, + md.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo +FROM + APC_MONEY_DAILY md +WHERE DATE(md.money_daily_date) = CURDATE() +UNION +SELECT + oe.id, + oe.description, + oe.expense, + 'Gasto', + oe.id_user, + oe.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo +FROM + APC_OTHER_EXPENSE oe +WHERE DATE(oe.created_on) = CURDATE() +UNION +SELECT + te.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name), + te.amount_to_transfer, + 'Transferencia enviada', + te.id_user_transmitter, + te.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo +FROM + APC_TRANSFER te +JOIN + APC_USER u on u.id = te.id_user_receiver +JOIN + APC_HUMAN_RESOURCE hr on hr.id = u.id_human_resource +WHERE DATE(te.created_on) = CURDATE() +UNION +SELECT + tr.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name), + tr.amount_to_transfer, + 'Transferencia recibida', + tr.id_user_receiver, + tr.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo +FROM + APC_TRANSFER tr +JOIN + APC_USER u on u.id = tr.id_user_transmitter +JOIN + APC_HUMAN_RESOURCE hr on hr.id = u.id_human_resource +WHERE DATE(tr.created_on) = CURDATE() +UNION +SELECT + d.id, + CONCAT(p.first_name,' ',IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name, ' ')),p.last_name,' ', p.middle_name, ' - ', + r.route_name , ', Abono préstamo anterior : ', Case WHEN (SELECT CASE WHEN ld.payment_amount is null or 0 THEN 0 ELSE ld.payment_amount END FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l3 ON ld.id_loan = l3.id +WHERE ld.loan_details_type = 'RENOVATION_PAYMENT' +AND l3.id = (SELECT albr.id_loan_old FROM APC_LOAN_BY_RENOVATION albr WHERE albr.id_loan_new = l.id)) is null then 0 else (SELECT CASE WHEN ld.payment_amount is null or 0 THEN 0 ELSE ld.payment_amount END FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l3 ON ld.id_loan = l3.id +WHERE ld.loan_details_type = 'RENOVATION_PAYMENT' +AND l3.id = (SELECT albr.id_loan_old FROM APC_LOAN_BY_RENOVATION albr WHERE albr.id_loan_new = l.id)) end , ', Comisión por apertura: ', lt.opening_fee), + d.amount, + 'Entrega de préstamo', + d.id_user, + d.created_on, + CURDATE() as fechaFiltro, + r.route_name as route, + CASE WHEN (SELECT (l2.amount_to_pay - l2.amount_paid) FROM APC_LOAN_BY_RENOVATION lr + INNER JOIN APC_LOAN l2 ON l2.id = lr.id_loan_old + WHERE lr.id_loan_new = l.id) is null THEN 0 ELSE + (SELECT (l2.amount_to_pay - l2.amount_paid) FROM APC_LOAN_BY_RENOVATION lr + INNER JOIN APC_LOAN l2 ON l2.id = lr.id_loan_old + WHERE lr.id_loan_new = l.id) END as saldo +FROM APC_DELIVERY d +INNER JOIN APC_LOAN l ON d.id_loan = l.id +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE p ON l.id_customer = p.id +INNER JOIN APC_ROUTE r ON r.id = l.id_route +WHERE DATE(d.created_on) = CURDATE(); +-- -------------------------------------------------------------------- +-- Estructura para la vista `APC_LOAN_APPROVED_DETAIL_VIEW` +-- +-- Sirve para obtener los detalles del total de los prestamos que estan +-- en estatus de APROBADO. +-- +CREATE OR REPLACE VIEW `APC_LOAN_APPROVED_DETAIL_VIEW` AS +SELECT + l.id, + l.amount_to_pay - l.amount_paid AS total_to_pay, + l.amount_to_pay - (l.amount_paid + (SELECT IF(ISNULL(SUM(payment_amount)),0,SUM(payment_amount)) FROM APC_LOAN_DETAIL WHERE id_loan = l.id AND loan_details_type = 'FEE')) AS loan_amount_to_pay, + ( + SELECT + IF(ISNULL(SUM(payment_amount)),0,SUM(payment_amount)) + FROM APC_LOAN_DETAIL + WHERE + id_loan = l.id AND + loan_details_type = 'FEE' + )AS total_fee +FROM APC_LOAN l +WHERE l.loan_status = 'APPROVED'; +-- -------------------------------------------------------------------- +-- Estructura para la vista `APC_GENERAL_BOX_VIEW` +-- +CREATE OR REPLACE VIEW `APC_GENERAL_BOX_VIEW` AS +SELECT + md.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS comments, + Date(md.money_daily_date) as fecha, + md.amount as amount, + md.id_office as office, + 'Inicio' as type +FROM APC_MONEY_DAILY md +JOIN + APC_USER u on u.id = md.id_user +JOIN + APC_HUMAN_RESOURCE hr on hr.id = u.id_human_resource +UNION +SELECT + cd.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS comments, + Date(cd.created_on), + cd.amount_paid, + cd.id_office, + 'Corte del día' +FROM APC_CLOSING_DAY cd +JOIN + APC_USER u on u.id = cd.id_user +JOIN + APC_HUMAN_RESOURCE hr on hr.id = u.id_human_resource +WHERE cd.active_status = 'ENEBLED' +UNION +SELECT + ecin.id, + ecin.description, + date(ecin.created_on), + ecin.amount, + ecin.id_office, + 'Entrada' +FROM APC_EXPENSE_COMPANY as ecin +WHERE ecin.expense_company_type = 'PAYMENT_IN' +AND ecin.active_status = 'ENEBLED' +UNION +SELECT + ecin.id, + ecin.description, + date(ecin.created_on), + ecin.amount, + ecin.id_office, + 'Salida' +FROM APC_EXPENSE_COMPANY as ecin +WHERE ecin.expense_company_type = 'PAYMENT_OUT' +AND ecin.active_status = 'ENEBLED' +UNION +SELECT + a.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS comments, + date(a.created_on), + a.amount, + a.id_office, + 'Adelanto' +FROM + APC_ADVANCE a +JOIN + APC_HUMAN_RESOURCE hr on hr.id = a.id_human_resource +WHERE + a.active_status = 'ENEBLED' +UNION +SELECT + pay.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS comments, + date(pay.created_on), + pay.total_payment, + pay.id_office, + 'Nomina' +FROM + APC_PAYROLL pay +JOIN + APC_HUMAN_RESOURCE hr on hr.id = pay.id_human_resource +WHERE + pay.active_status = 'ENEBLED'; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_LOAN` +-- +-- MODUFY COLUMN loan_status +-- +ALTER TABLE APC_LOAN +MODIFY COLUMN `loan_status` ENUM('PENDING', 'FINISH','BLACK_LIST', 'APPROVED','REJECTED', 'PENDING_RENOVATION', 'TO_DELIVERY', 'DELETED') NOT NULL DEFAULT 'PENDING'; + +ALTER TABLE APC_LOAN_BY_USER +MODIFY COLUMN `loan_by_user_status` ENUM('PENDING', 'FINISH','BLACK_LIST', 'APPROVED','REJECTED', 'PENDING_RENOVATION', 'TO_DELIVERY', 'DELETED') NOT NULL DEFAULT 'PENDING'; + +-- +-- Estructura para la vista `APC_LOAN_BY_USER_PAYMENT_ZERO_VIEW` +-- +-- Total de abonos en ceros por dia. +-- +CREATE OR REPLACE VIEW `APC_LOAN_BY_USER_PAYMENT_ZERO_VIEW` AS +SELECT + ald.id, + ald.id_user, + al.id_customer, + ald.loan_comments +FROM APC_LOAN_DETAIL ald +INNER JOIN APC_LOAN al ON ald.id_loan = al.id +WHERE + DATE(ald.created_on) = CURDATE() + AND ald.payment_amount = 0 + AND al.loan_status != 'DELETED' + AND ald.loan_details_type = 'PAYMENT'; +-- +-- Estructura para la tabla `APC_PAYROLL` +-- +-- Totales de la caja de APC. +-- +CREATE TABLE `APC_PAYROLL`( + `id` char(36) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `id_office` char(36) NOT NULL, + `id_human_resource` char(36) NOT NULL, + `salary` numeric(8,2) NOT NULL, + `imss` numeric(8,2) NOT NULL, + `advance` numeric(8,2) NOT NULL, + `total_bonus_new_customer` numeric(8,2) NOT NULL, + `total_bonus_colocation` numeric(8,2) NOT NULL, + `total_bonus_mora` numeric(8,2) NOT NULL, + `discounts` numeric(8,2) NOT NULL, + `increases` numeric(8,2) NOT NULL, + `total_payment` numeric(8,2) NOT NULL, + `total_days_salary` smallint NOT NULL DEFAULT 5, + `total_days_bonus` smallint NOT NULL DEFAULT 5, + `comments_discounts` varchar(200), + `comments_increases` varchar(200), + `observation` varchar(200), + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_payroll_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_payroll_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_payroll_to_apc_human_resource_fk` + FOREIGN KEY (`id_human_resource`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE OR REPLACE VIEW `APC_ADVANCE_USER_DAILY_VIEW` AS +SELECT + ate.id, + CONCAT(ahr.first_name, ' ' , ahr.last_name) as user_name, + ate.total_expected, + (ate.total_expected - (SELECT COUNT(id) FROM APC_LOAN_BY_USER_VIEW where user_id = ate.id_user)) as total_now, + CASE WHEN (ate.total_expected - (SELECT COUNT(id) FROM APC_LOAN_BY_USER_VIEW where user_id = ate.id_user)) = 0 + THEN 0 + ELSE + ((ate.total_expected - (SELECT COUNT(id) FROM APC_LOAN_BY_USER_VIEW where user_id = ate.id_user)) * 100) / ate.total_expected + END + as porcentaje, + ate.id_office, + ate.id_user, + (SELECT IF(ISNULL(SUM(ate2.total_expected_payment)),0,SUM(ate2.total_expected_payment)) FROM APC_TOTAL_EXPECTED_PAYMENT_DAILY_BY_USER ate2 + where WEEK(DATE(ate2.created_on),1) = (Select WEEK(CURDATE(),1)) and YEAR(DATE(ate2.created_on)) = (SELECT YEAR(CURDATE())) AND ate2.id_user = ate.id_user) + as total_expected_week, + (SELECT IF(ISNULL(SUM(ald.payment_amount)),0,SUM(ald.payment_amount)) FROM APC_LOAN_DETAIL ald + where WEEK(Date(ald.created_on),1) = (Select WEEK(CURDATE(),1)) and YEAR(Date(ald.created_on)) = (SELECT YEAR(CURDATE())) AND ald.id_user = ate.id_user + AND ald.loan_details_type IN ('PAYMENT', 'RENOVATION_PAYMENT', 'TRANSFER')) + as total_reported_week, + (SELECT IF(ISNULL(SUM(ailwv.faltante)),0,SUM(ailwv.faltante)) FROM APC_INFORMATION_LOAN_WEEK_VIEW ailwv + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = ailwv.id + WHERE albu.id_user = ate.id_user) as faltante, + (SELECT IF(ISNULL(SUM(ald.payment_amount)),0,SUM(ald.payment_amount)) + FROM APC_LOAN_DETAIL ald + INNER JOIN APC_LOAN al ON ald.id_loan = al.id + INNER JOIN APC_LOAN_BY_USER albu ON al.id = albu.id_loan + where WEEK(Date(ald.created_on),1) = (Select WEEK(CURDATE(),1)) and YEAR(Date(ald.created_on)) = (SELECT YEAR(CURDATE())) + AND ald.loan_details_type IN ('RENOVATION_PAYMENT') AND albu.id_user = ate.id_user) as total_reported_renovation_week, + (SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) + FROM APC_LOAN al + INNER JOIN APC_LOAN_BY_USER albu ON al.id = albu.id_loan + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + WHERE albu.id_user = ate.id_user AND al.loan_status = 'APPROVED' AND + WEEK(Date(al.created_on),1) = (Select WEEK(CURDATE(),1)) and YEAR(Date(al.created_on)) = (SELECT YEAR(CURDATE())) + ) as total_comision_fee, + (SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = ate.id_user + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = (SELECT YEAR(CURDATE()))) + as colocation_approved, + (SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'TO_DELIVERY' AND albu.id_user = ate.id_user + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = (SELECT YEAR(CURDATE()))) + as colocation_to_delivery +FROM + APC_TOTAL_EXPECTED_PAYMENT_DAILY_BY_USER ate +INNER JOIN APC_USER au ON au.id = ate.id_user +INNER JOIN APC_HUMAN_RESOURCE ahr ON ahr.id = au.id_human_resource +WHERE + DATE(ate.created_on) = CURDATE() + AND ate.active_status = 'ENEBLED'; + +CREATE OR REPLACE VIEW `APC_CUSTOMERS_WITHOUT_RENOVATION_VIEW` AS +SELECT + p.id, + CONCAT(p.first_name,' ', IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name,' ')) ,p.last_name, ' ', p.middle_name) AS available_person, + ar.route_name, + (SELECT MAX(l.created_on) FROM APC_LOAN l WHERE l.id_customer = p.id) as last_loan, + p.id_office +FROM APC_PEOPLE p +INNER JOIN APC_ROUTE ar ON ar.id = p.id_route +WHERE + p.people_type IN ('CUSTOMER', 'BOTH') AND + p.active_status = 'ENEBLED' AND + (SELECT COUNT(l.id) FROM APC_LOAN l WHERE l.id_customer = p.id) > 0 AND + CASE + WHEN 0 = ( + SELECT COUNT(id) + FROM APC_LOAN + WHERE + id_customer = p.id AND + loan_status IN ('PENDING', 'BLACK_LIST', 'APPROVED', 'PENDING_RENOVATION', 'TO_DELIVERY') + ) + THEN TRUE + ELSE FALSE + END +ORDER BY available_person; + +CREATE OR REPLACE VIEW `APC_ADVANCE_USER_DAILY_DETAIL_VIEW` AS +SELECT +ald.id, +ald.id_user, +CONCAT(ap.first_name, + ' ', + ap.last_name) AS customer_name, +ald.payment_amount, +ald.created_on, +ap.address_business, +CASE + WHEN ald.loan_details_type = 'PAYMENT' THEN 'Abono' + WHEN ald.loan_details_type = 'FEE' THEN 'Multa' + WHEN ald.loan_details_type = 'TRANSFER' THEN 'Depósito' + ELSE '' END as type_ayment +FROM APC_LOAN_DETAIL ald +INNER JOIN APC_LOAN al ON al.id = ald.id_loan +INNER JOIN APC_PEOPLE ap ON ap.id = al.id_customer +WHERE DATE(ald.created_on) = CURDATE() AND +al.loan_status != 'DELETED' AND +ald.loan_details_type IN ('PAYMENT','FEE','TRANSFER') +UNION +SELECT +id, +user_id, +customer_name, +'Sin visita', +CURDATE(), +customer_address_business, +'Sin visita' +FROM APC_LOAN_BY_USER_VIEW; + +CREATE TABLE `APC_CLOSING_DAY_DETAIL`( + `id` char(36) NOT NULL, + `id_closing_day` char(36) NOT NULL, + `comments` varchar(200) NOT NULL, + `amount` numeric(8,2) NOT NULL, + `type` varchar(200) NOT NULL, + `dateDetail` datetime, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_closing_day_detail_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_closing_day_detail_to_apc_closing_day_fk` + FOREIGN KEY (`id_closing_day`) REFERENCES `APC_CLOSING_DAY`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE OR REPLACE VIEW `APC_TOTAL_LOANS_APPROVED_BY_OFFICE` AS +SELECT + l.id, + l.loan_status, + r.id_office, + r.payment_daily + FROM + APC_LOAN l + JOIN + APC_LOAN_TYPE r ON r.id = l.id_loan_type + WHERE + l.loan_status in ('APPROVED'); + +CREATE OR REPLACE VIEW `APC_TOTAL_CASH_BY_CURDATE_DASHBOARD_VIEW` AS +SELECT + u.id, + ubo.id_office, + (SELECT IF(ISNULL(SUM(ld.payment_amount)),0, SUM(ld.payment_amount)) + FROM APC_LOAN_DETAIL ld + WHERE + ld.id_user = u.id AND + ld.loan_details_type = 'PAYMENT' AND + DATE(ld.created_on) = CURDATE() + + )AS total_amount_payment, + (SELECT IF(ISNULL(SUM(ld.payment_amount)),0, SUM(ld.payment_amount)) + FROM APC_LOAN_DETAIL ld + WHERE + ld.id_user = u.id AND + ld.loan_details_type = 'TRANSFER' AND + DATE(ld.created_on) = CURDATE() + + )AS total_amount_deposit, + (SELECT IF(ISNULL(SUM(amount_to_transfer)),0, SUM(amount_to_transfer)) + FROM APC_TRANSFER + WHERE + id_user_transmitter = u.id AND + action_status = 'APPROVED' AND + active_status = 'ENEBLED' AND + DATE(last_updated_on) = CURDATE() + )AS transfer_sender, + (SELECT IF(ISNULL(SUM(amount_to_transfer)),0, SUM(amount_to_transfer)) + FROM APC_TRANSFER + WHERE + id_user_receiver = u.id AND + action_status = 'APPROVED' AND + active_status = 'ENEBLED' AND + DATE(last_updated_on) = CURDATE() + ) AS transfer_receiver, + (SELECT IF(ISNULL(SUM(amount)),0, SUM(amount)) + FROM APC_MONEY_DAILY + WHERE + id_user = u.id AND + DATE(money_daily_date) = CURDATE() + ) AS money_daily, + (SELECT IF(ISNULL(SUM(expense)),0, SUM(expense)) + FROM APC_OTHER_EXPENSE + WHERE + id_user = u.id AND + DATE(created_on) = CURDATE() + ) AS other_expense, + (SELECT IF(ISNULL(SUM(amount)),0, SUM(amount)) + FROM APC_DELIVERY + WHERE + id_user = u.id AND + DATE(created_on) = CURDATE() + ) as delivery, + (SELECT IF(ISNULL(SUM(amount_to_transfer)),0, SUM(amount_to_transfer)) + FROM APC_TRANSFER + WHERE + id_user_receiver = u.id AND + action_status = 'PENDING' AND + active_status = 'ENEBLED' AND + DATE(created_on) = CURDATE() + ) AS transfer_pending +FROM APC_USER u +JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE + u.user_status = 'ENEBLED'; + +CREATE OR REPLACE VIEW `APC_MONEY_DAILY_BY_USER_CERTIFIER_VIEW` AS +SELECT + u.id, + u.user_name, + uo.id_office, + CONCAT(hr.first_name, ' ' , hr.last_name) as employee, + (SELECT SUM(ldc.amount_to_delivery) FROM APC_LOAN_TO_DELIVERY_BY_CERTIFIER_VIEW ldc + WHERE ldc.id_user = u.id) as amount +FROM + APC_USER u +INNER JOIN + APC_USER_BY_OFFICE uo ON u.id = uo.id_user +INNER JOIN + APC_HUMAN_RESOURCE hr ON u.id_human_resource = hr.id +WHERE + u.user_status = 'ENEBLED' +AND + u.certifier = 'ENEBLED'; +-- -------------------------------------------------------- +-- +-- Alter table to `APC_LOAN_DETAIL` +-- +-- Add new loan details status to save transfer payments. +-- +ALTER TABLE APC_LOAN_DETAIL +MODIFY COLUMN `loan_details_type` ENUM('CREDIT_PAYMENT', 'DEBIT_PAYMENT', 'PAYMENT', 'FEE','RENOVATION_PAYMENT', 'TRANSFER') NOT NULL; + +ALTER TABLE APC_TOTAL_EXPECTED_PAYMENT_DAILY_BY_USER +ADD COLUMN `total_expected_payment` numeric(8,2) default null; + +CREATE OR REPLACE VIEW `APC_INFORMATION_LOAN_WEEK_VIEW` AS +SELECT +l.id, +u.id as id_user, +r.id_office, +l.created_on as fecha, +lt.payment as apoyos, +lt.payment_total as apoyos_total, +lt.opening_fee as comision_apertura, +CONCAT(endor.first_name,' ', IF(ISNULL(endor.second_name) ,'', CONCAT(endor.second_name,' ')) ,endor.last_name, ' ', endor.middle_name) AS aval, +CONCAT(cus.first_name,' ', IF(ISNULL(cus.second_name) ,'', CONCAT(cus.second_name,' ')) ,cus.last_name, ' ', cus.middle_name) AS customer, +l.amount_to_pay as documento_por, +lt.payment_daily as abono_diario, +l.amount_paid, +(l.amount_to_pay - l.amount_paid) saldo_insoluto, +r.route_name, +CONCAT(hr.first_name,' ', IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name,' ')) ,hr.last_name, ' ', hr.middle_name) AS asesor, +(SELECT COUNT(lfn.id) FROM APC_LOAN_FEE_NOTIFICATION lfn WHERE lfn.id_loan = l.id) as num_fee, +-- Lunes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_monday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_monday, +-- Martes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_tuesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_tuesday, +-- Miercoles +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) +AND YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_wednesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_wednesday, +-- Jueves +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_thursday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_thursday, +-- Viernes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_friday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_friday, +-- Sabado +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_saturday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_saturday, + +((lt.payment_daily * (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5 , COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) +- (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) as faltante, + +CASE WHEN l.new_customer = 'ENEBLED' THEN 'Si' ELSE 'No' END as new_customer, +if((SELECT COUNT(id_loan_old) FROM APC_LOAN_BY_RENOVATION lbr +INNER JOIN APC_LOAN lRenovation ON lbr.id_loan_new = lRenovation.id +WHERE id_loan_old = l.id + AND loan_by_renovation_status = 'APPROVED' and WEEK(DATE(lRenovation.created_on),1) <= WEEK(CURDATE(),1) AND + YEAR(DATE(lRenovation.created_on)) = YEAR(CURDATE())) = 0 , 'No' , 'Si') as renovation, +l.loan_status as estatus_prestamo, +(SELECT COUNT(DISTINCT(DATE(ldFaltante.created_on))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) <= (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_all, +(SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_week, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) <= (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('FEE')) as fee_todos +FROM +APC_LOAN l +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE cus ON cus.id = l.id_customer +INNER JOIN APC_PEOPLE endor ON endor.id = l.id_endorsement +INNER JOIN APC_ROUTE r ON r.id = l.id_route +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +INNER JOIN APC_USER u ON u.id = lbu.id_user +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +WHERE +l.loan_status not in ('DELETED','REJECTED') AND +(SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) > 0; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_USER_BY_ROUTE_VIEW` +-- +-- Se utiliza para identificar a los usuarios por rutas. +-- +CREATE OR REPLACE VIEW `APC_USER_BY_ROUTE_VIEW` AS +SELECT +CONCAT(u.id,hrhr.id_route) AS id, +u.id AS id_user, +hrhr.id_route AS id_route, + CONCAT( + CASE + WHEN hr.first_name IS NOT NULL AND hr.first_name != '' + THEN CONCAT(SUBSTR(UPPER(hr.first_name), 1, 1),SUBSTR(LOWER(hr.first_name), 2)) + ELSE '' + END, + CASE + WHEN hr.second_name IS NOT NULL AND hr.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(hr.second_name), 1, 1),SUBSTR(LOWER(hr.second_name), 2)) + ELSE '' + END, + CASE + WHEN hr.last_name IS NOT NULL AND hr.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(hr.last_name), 1, 1),SUBSTR(LOWER(hr.last_name), 2)) + ELSE '' + END, + CASE + WHEN hr.middle_name IS NOT NULL AND hr.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(hr.middle_name), 1, 1),SUBSTR(LOWER(hr.middle_name), 2)) + ELSE '' + END + ) AS employee_name +FROM APC_HUMAN_RESOURCE_HAS_ROUTE hrhr +INNER JOIN APC_HUMAN_RESOURCE hr ON hrhr.id_human_resource = hr.id +INNER JOIN APC_USER u ON hr.id = u.id_human_resource +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE','BOTH') +ORDER BY employee_name; + +CREATE OR REPLACE VIEW `APC_LOAN_DIFERENCES_BY_USER_LAST_WEEK_VIEW` AS +SELECT +l.id, +lbu.id_user, +((lt.payment_daily * 5) - (SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +WHERE ld.id_loan = l.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) +AND YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) + as faltante +FROM + APC_LOAN l +INNER JOIN + APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN + APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE +l.loan_status not in ('DELETED','REJECTED') AND +(SELECT COUNT(ld2.id) FROM APC_LOAN_DETAIL ld2 WHERE WEEK(DATE(ld2.created_on),1) = (WEEK(CURDATE(),1)-1) +AND YEAR(DATE(ld2.created_on)) = YEAR(CURDATE()) AND ld2.id_loan = l.id) > 4; + +CREATE OR REPLACE VIEW `APC_INFORMATION_LOAN_LAST_WEEK_VIEW` AS +SELECT +l.id, +u.id as id_user, +r.id_office, +l.created_on as fecha, +lt.payment as apoyos, +lt.payment_total as apoyos_total, +lt.opening_fee as comision_apertura, +CONCAT(endor.first_name,' ', IF(ISNULL(endor.second_name) ,'', CONCAT(endor.second_name,' ')) ,endor.last_name, ' ', endor.middle_name) AS aval, +CONCAT(cus.first_name,' ', IF(ISNULL(cus.second_name) ,'', CONCAT(cus.second_name,' ')) ,cus.last_name, ' ', cus.middle_name) AS customer, +l.amount_to_pay as documento_por, +lt.payment_daily as abono_diario, +l.amount_paid, +(l.amount_to_pay - l.amount_paid) saldo_insoluto, +r.route_name, +CONCAT(hr.first_name,' ', IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name,' ')) ,hr.last_name, ' ', hr.middle_name) AS asesor, +(SELECT COUNT(lfn.id) FROM APC_LOAN_FEE_NOTIFICATION lfn WHERE lfn.id_loan = l.id) as num_fee, +-- Lunes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_monday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_monday, +-- Martes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_tuesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_tuesday, +-- Miercoles +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_wednesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_wednesday, +-- Jueves +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_thursday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_thursday, +-- Viernes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_friday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_friday, +-- Sabado +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_saturday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_saturday, + +((lt.payment_daily * (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) +- (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) as faltante, + +CASE WHEN l.new_customer = 'ENEBLED' THEN 'Si' ELSE 'No' END as new_customer, +(SELECT IF(COUNT(id_loan_old) = 0 , 'No' , 'Si') FROM APC_LOAN_BY_RENOVATION lbr +INNER JOIN APC_LOAN lRenovation ON lbr.id_loan_new = lRenovation.id +WHERE id_loan_old = l.id + AND loan_by_renovation_status = 'APPROVED' and WEEK(DATE(lRenovation.created_on),1) <= (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(lRenovation.created_on)) = YEAR(CURDATE())) as renovation, +l.loan_status as estatus_prestamo, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as abono_semana_actual, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('FEE')) as fee_semana_actual, +(SELECT COUNT(DISTINCT(DATE(ldFaltante.created_on))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) <= (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_all, +(SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_week, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) <= (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('FEE')) as fee_todos +FROM +APC_LOAN l +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE cus ON cus.id = l.id_customer +INNER JOIN APC_PEOPLE endor ON endor.id = l.id_endorsement +INNER JOIN APC_ROUTE r ON r.id = l.id_route +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +INNER JOIN APC_USER u ON u.id = lbu.id_user +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +WHERE +l.loan_status not in ('DELETED','REJECTED') AND +(SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) +AND YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) > 0; + +CREATE OR REPLACE VIEW `APC_COLOCATION_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'monday') + as colocation_monday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'tuesday') + as colocation_tuesday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'wednesday') + as colocation_wednesday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'thursday') + as colocation_thursday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'friday') + as colocation_friday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'saturday') + as colocation_saturday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE())) + as colocation_total +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; + +CREATE OR REPLACE VIEW `APC_COLOCATION_LAST_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'monday') + as colocation_monday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'tuesday') + as colocation_tuesday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'wednesday') + as colocation_wednesday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'thursday') + as colocation_thursday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'friday') + as colocation_friday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'saturday') + as colocation_saturday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE())) + as colocation_total +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; + + +CREATE OR REPLACE VIEW `APC_SUBTOTAL_LAST_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_monday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'monday') + as opening_fee_monday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_tuesday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'tuesday') + as opening_fee_tuesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_wednesday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'wednesday') + as opening_fee_wednesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_thursday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'thursday') + as opening_fee_thursday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_friday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'friday') + as opening_fee_friday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_saturday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'saturday') + as opening_fee_saturday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_total, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) ) + as opening_fee_total +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; + +CREATE OR REPLACE VIEW `APC_SUBTOTAL_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_monday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'monday') + as opening_fee_monday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_tuesday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'tuesday') + as opening_fee_tuesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_wednesday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'wednesday') + as opening_fee_wednesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_thursday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'thursday') + as opening_fee_thursday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_friday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'friday') + as opening_fee_friday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_saturday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'saturday') + as opening_fee_saturday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_total, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) ) + as opening_fee_total +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_CURRENT_CUSTOMER_BY_LOAN_VIEW` +-- SIRVE PARA TRAER LOS PRESTAMOS CON SUS CLIENTES, AVALES Y ASESORES. +-- +-- -------------------------------------------------------------------- +CREATE OR REPLACE VIEW `APC_CURRENT_CUSTOMER_BY_LOAN_VIEW` AS +SELECT +loan.id AS id_loan, +usr.id AS id_user, +usr_by_office.id_office AS id_office, +loan_type.payment AS payment, +CONCAT( + CASE + WHEN customer.first_name IS NOT NULL AND customer.first_name != '' + THEN CONCAT(SUBSTR(UPPER(customer.first_name), 1, 1),SUBSTR(LOWER(customer.first_name), 2)) + ELSE '' + END, + CASE + WHEN customer.second_name IS NOT NULL AND customer.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(customer.second_name), 1, 1),SUBSTR(LOWER(customer.second_name), 2)) + ELSE '' + END, + CASE + WHEN customer.last_name IS NOT NULL AND customer.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(customer.last_name), 1, 1),SUBSTR(LOWER(customer.last_name), 2)) + ELSE '' + END, + CASE + WHEN customer.middle_name IS NOT NULL AND customer.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(customer.middle_name), 1, 1),SUBSTR(LOWER(customer.middle_name), 2)) + ELSE '' + END + ) AS customer_name, + CONCAT( + CASE + WHEN endorsement.first_name IS NOT NULL AND endorsement.first_name != '' + THEN CONCAT(SUBSTR(UPPER(endorsement.first_name), 1, 1),SUBSTR(LOWER(endorsement.first_name), 2)) + ELSE '' + END, + CASE + WHEN endorsement.second_name IS NOT NULL AND endorsement.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(endorsement.second_name), 1, 1),SUBSTR(LOWER(endorsement.second_name), 2)) + ELSE '' + END, + CASE + WHEN endorsement.last_name IS NOT NULL AND endorsement.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(endorsement.last_name), 1, 1),SUBSTR(LOWER(endorsement.last_name), 2)) + ELSE '' + END, + CASE + WHEN endorsement.middle_name IS NOT NULL AND endorsement.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(endorsement.middle_name), 1, 1),SUBSTR(LOWER(endorsement.middle_name), 2)) + ELSE '' + END + ) AS endorsement_name, + loan.loan_status AS loan_status, + loan.created_on AS created_on, + route.route_name AS route_name +FROM APC_LOAN loan +INNER JOIN APC_PEOPLE customer ON loan.id_customer = customer.id +INNER JOIN APC_PEOPLE endorsement ON loan.id_endorsement = endorsement.id +INNER JOIN APC_LOAN_TYPE loan_type ON loan.id_loan_type = loan_type.id +INNER JOIN APC_LOAN_BY_USER loan_by_user ON loan.id = loan_by_user.id_loan +INNER JOIN APC_USER usr ON loan_by_user.id_user = usr.id +INNER JOIN APC_USER_BY_OFFICE usr_by_office ON usr.id = usr_by_office.id_user +INNER JOIN APC_ROUTE route ON loan.id_route = route.id +WHERE loan.loan_status IN('APPROVED','PENDING','PENDING_RENOVATION','TO_DELIVERY') +ORDER BY usr.id, loan.created_on; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_AVAILABLES_OWNERS_VIEW` +-- REGRESA LOS USUARIOS ACTIVOS DE TIPO MOBILE AND BOTH. +-- +-- -------------------------------------------------------------------- +CREATE OR REPLACE VIEW `APC_AVAILABLES_OWNERS_VIEW` AS +SELECT +usr.id AS id_user, +usr_by_office.id_office AS id_office, +usr.user_name AS user_name, +CONCAT( + CASE + WHEN human_resource.first_name IS NOT NULL AND human_resource.first_name != '' + THEN CONCAT(SUBSTR(UPPER(human_resource.first_name), 1, 1),SUBSTR(LOWER(human_resource.first_name), 2)) + ELSE '' + END, + CASE + WHEN human_resource.second_name IS NOT NULL AND human_resource.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(human_resource.second_name), 1, 1),SUBSTR(LOWER(human_resource.second_name), 2)) + ELSE '' + END, + CASE + WHEN human_resource.last_name IS NOT NULL AND human_resource.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(human_resource.last_name), 1, 1),SUBSTR(LOWER(human_resource.last_name), 2)) + ELSE '' + END, + CASE + WHEN human_resource.middle_name IS NOT NULL AND human_resource.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(human_resource.middle_name), 1, 1),SUBSTR(LOWER(human_resource.middle_name), 2)) + ELSE '' + END + ) AS full_name +FROM APC_USER usr +INNER JOIN APC_HUMAN_RESOURCE human_resource ON usr.id_human_resource = human_resource.id +INNER JOIN APC_USER_BY_OFFICE usr_by_office ON usr.id = usr_by_office.id_user +WHERE usr.user_status = 'ENEBLED' AND +usr.user_type IN ('MOBILE','BOTH') AND +usr.certifier = 'DISABLED'; + +CREATE OR REPLACE VIEW `APC_COBRANZA_LAST_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' AND ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_monday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_tuesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_wednesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_thursday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_friday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_saturday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_total +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; + +CREATE OR REPLACE VIEW `APC_COBRANZA_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' AND ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_monday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_tuesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_wednesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_thursday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_friday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_saturday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_total +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; + +CREATE OR REPLACE VIEW `APC_ADVANCE_USER_DAILY_DASHBOARD_VIEW` AS +SELECT + ate.id, + CONCAT(ahr.first_name, ' ' , ahr.last_name) as user_name, + ate.total_expected, + (ate.total_expected - (SELECT COUNT(id) FROM APC_LOAN_BY_USER_VIEW where user_id = ate.id_user)) as total_now, + CASE WHEN (ate.total_expected - (SELECT COUNT(id) FROM APC_LOAN_BY_USER_VIEW where user_id = ate.id_user)) = 0 + THEN 0 + ELSE + ((ate.total_expected - (SELECT COUNT(id) FROM APC_LOAN_BY_USER_VIEW where user_id = ate.id_user)) * 100) / ate.total_expected + END + as porcentaje, + ate.id_office, + ate.id_user, + (SELECT IF(ISNULL(SUM(ate2.total_expected_payment)),0,SUM(ate2.total_expected_payment)) FROM APC_TOTAL_EXPECTED_PAYMENT_DAILY_BY_USER ate2 + where WEEK(DATE(ate2.created_on),1) = (Select WEEK(CURDATE(),1)) and YEAR(DATE(ate2.created_on)) = (SELECT YEAR(CURDATE())) AND ate2.id_user = ate.id_user) + as total_expected_week, + (SELECT IF(ISNULL(SUM(ald.payment_amount)),0,SUM(ald.payment_amount)) FROM APC_LOAN_DETAIL ald + where WEEK(Date(ald.created_on),1) = (Select WEEK(CURDATE(),1)) and YEAR(Date(ald.created_on)) = (SELECT YEAR(CURDATE())) AND ald.id_user = ate.id_user + AND ald.loan_details_type IN ('PAYMENT', 'RENOVATION_PAYMENT', 'TRANSFER')) + as total_reported_week, +( + select + IF(ISNULL( + SUM( + CASE WHEN l.loan_status IN ('PENDING_RENOVATION', 'FINISH') then 0 ELSE + ((lt.payment_daily * (SELECT COUNT(ldFaltante.id) FROM APC_LOAN_DETAIL ldFaltante + WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) + AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) + - (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) + FROM APC_LOAN_DETAIL ldLunes + WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) + AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) END + ) + ),0, + SUM( + CASE WHEN l.loan_status IN ('PENDING_RENOVATION', 'FINISH') then 0 ELSE + ((lt.payment_daily * (SELECT COUNT(ldFaltante.id) FROM APC_LOAN_DETAIL ldFaltante + WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) + AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) + - (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) + FROM APC_LOAN_DETAIL ldLunes + WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) + AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) END + ) + ) + as faltante + + FROM + APC_LOAN l + INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id + INNER JOIN APC_LOAN_BY_USER albu ON l.id = albu.id_loan + WHERE albu.id_user = ate.id_user + AND albu.owner_loan = 'CURRENT_OWNER' + +) +as faltante, + (SELECT IF(ISNULL(SUM(ald.payment_amount)),0,SUM(ald.payment_amount)) + FROM APC_LOAN_DETAIL ald + INNER JOIN APC_LOAN al ON ald.id_loan = al.id + INNER JOIN APC_LOAN_BY_USER albu ON al.id = albu.id_loan + where WEEK(Date(ald.created_on),1) = (Select WEEK(CURDATE(),1)) and YEAR(Date(ald.created_on)) = (SELECT YEAR(CURDATE())) + AND ald.loan_details_type IN ('RENOVATION_PAYMENT') AND albu.id_user = ate.id_user) as total_reported_renovation_week, + (SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) + FROM APC_LOAN al + INNER JOIN APC_LOAN_BY_USER albu ON al.id = albu.id_loan + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + WHERE albu.id_user = ate.id_user AND al.loan_status = 'APPROVED' AND + WEEK(Date(al.created_on),1) = (Select WEEK(CURDATE(),1)) and YEAR(Date(al.created_on)) = (SELECT YEAR(CURDATE())) + ) as total_comision_fee, + (SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = ate.id_user + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = (SELECT YEAR(CURDATE()))) + as colocation_approved, + (SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'TO_DELIVERY' AND al.created_by = ate.id_user + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = (SELECT YEAR(CURDATE()))) + as colocation_to_delivery +FROM + APC_TOTAL_EXPECTED_PAYMENT_DAILY_BY_USER ate +INNER JOIN APC_USER au ON au.id = ate.id_user +INNER JOIN APC_HUMAN_RESOURCE ahr ON ahr.id = au.id_human_resource +WHERE + DATE(ate.created_on) = CURDATE() + AND ate.active_status = 'ENEBLED'; + +CREATE OR REPLACE VIEW `APC_SUBTOTAL_LAST_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_monday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'monday') + as opening_fee_monday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_tuesday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'tuesday') + as opening_fee_tuesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_wednesday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'wednesday') + as opening_fee_wednesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_thursday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'thursday') + as opening_fee_thursday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_friday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'friday') + as opening_fee_friday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_saturday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'saturday') + as opening_fee_saturday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_total, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) ) + as opening_fee_total, +( + select + IF(ISNULL( + SUM( + CASE WHEN l.loan_status IN ('PENDING_RENOVATION', 'FINISH') then 0 ELSE + ((lt.payment_daily * (SELECT COUNT(ldFaltante.id) FROM APC_LOAN_DETAIL ldFaltante + WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) + AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) + - (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) + FROM APC_LOAN_DETAIL ldLunes + WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) + AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) END + ) + ),0, + SUM( + CASE WHEN l.loan_status IN ('PENDING_RENOVATION', 'FINISH') then 0 ELSE + ((lt.payment_daily * (SELECT COUNT(ldFaltante.id) FROM APC_LOAN_DETAIL ldFaltante + WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) + AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) + - (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) + FROM APC_LOAN_DETAIL ldLunes + WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) + AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) END + ) + ) + as faltante + + FROM + APC_LOAN l + INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id + INNER JOIN APC_LOAN_BY_USER albu ON l.id = albu.id_loan + WHERE albu.id_user = u.id + AND albu.owner_loan = 'CURRENT_OWNER' + +) +as faltante +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; + +-- -------------------------------------------------------------------- +-- +-- Estructura para la tabla `APC_STABLE_GENERAL_BOX` +-- +-- Totales de la caja de APC. +-- +CREATE TABLE `APC_STABLE_SMALL_BOX`( + `id` char(36) NOT NULL, + `total_small_box` numeric(8,2) NOT NULL, + `total_envelope` numeric(8,2) NOT NULL, + `total_bank_note` numeric(8,2) NOT NULL, + `total_coin` numeric(8,2) NOT NULL, + `total_stable` numeric(8,2) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `description` varchar(200), + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_stable_small_box_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_stable_small_box_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +ALTER TABLE APC_LOAN_TYPE +ADD COLUMN `convenio` ENUM('ENEBLED','DISABLED') DEFAULT 'DISABLED' +AFTER `payment_sunday`; + +CREATE TABLE `APC_BITACORA`( + `id` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `comments_user` varchar(300) NOT NULL, + `action` varchar(50) NOT NULL, + `description` varchar(300) NOT NULL, + `name_user` varchar(200) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_bitacora_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_bitacora_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE OR REPLACE VIEW APC_HISTORY_LOAN_VIEW AS +SELECT +l.id, +CONCAT(pc.first_name, ' ', pc.last_name) customerName, +CONCAT(pa.first_name, ' ', pa.last_name) endorsementName, +r.route_name routeName, +o.office_name officeName, +lt.payment montoPrestado, +l.amount_to_pay montoAPagar, +l.amount_paid montoPagado, +(l.amount_to_pay - l.amount_paid) saldoInsoluto, +(SELECT count(lfn.id) FROM APC_LOAN_FEE_NOTIFICATION lfn WHERE lfn.id_loan = l.id) numMultas, +CASE WHEN l.loan_status = 'PENDING' THEN 'Pendiente' +WHEN l.loan_status = 'FINISH' THEN 'Terminado' +WHEN l.loan_status = 'APPROVED' THEN 'Aprobado' +WHEN l.loan_status = 'REJECTED' THEN 'Rechazado' +WHEN l.loan_status = 'PENDING_RENOVATION' THEN 'Pendiente de renovación' +WHEN l.loan_status = 'TO_DELIVERY' THEN 'Por liberar' +END as estatusPrestamo, +DATE(l.created_on) as fecha, +u.user_name nombreUsuario +FROM +APC_LOAN l +INNER JOIN APC_PEOPLE pc ON l.id_customer = pc.id +INNER JOIN APC_PEOPLE pa ON l.id_endorsement = pa.id +INNER JOIN APC_ROUTE r ON l.id_route = r.id +INNER JOIN APC_OFFICE o ON r.id_office = o.id +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +INNER JOIN APC_USER u ON u.id = lbu.id_user +WHERE l.loan_status NOT IN ('DELETED') +ORDER BY l.created_on DESC +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_STATS_FEES_VIEW` +-- +CREATE OR REPLACE VIEW APC_FEES_VIEW AS +SELECT +LD.ID, +LD.id_user, +CONCAT(HR.first_name, ' ', HR.last_name) AS name, +LD.payment_amount AS total_fees, +LD.created_on +FROM apc_loan_detail LD +INNER JOIN apc_loan L ON LD.id_loan = L.id AND L.loan_status <> 'DELETED' +INNER JOIN apc_user U ON LD.id_user = U.id +INNER JOIN apc_human_resource HR ON U.id_human_resource = HR.id +WHERE loan_details_type = 'FEE' +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_ADMINISTRATION_PERSON_SEARCH_VIEW` +-- +CREATE OR REPLACE VIEW `APC_ADMINISTRATION_PERSON_SEARCH_VIEW` AS +SELECT + people.id AS id, people.phone_home AS phone_home, people.address_home AS address_home, people.people_type AS people_type, + people.id_route AS id_route, route.route_name AS route_name, people.id_office AS id_office, office.office_name AS office_name, + CONCAT( + CASE + WHEN people.first_name IS NOT NULL AND people.first_name != '' + THEN CONCAT(SUBSTR(UPPER(people.first_name), 1, 1),SUBSTR(LOWER(people.first_name), 2)) + ELSE '' + END, + CASE + WHEN people.second_name IS NOT NULL AND people.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(people.second_name), 1, 1),SUBSTR(LOWER(people.second_name), 2)) + ELSE '' + END, + CASE + WHEN people.last_name IS NOT NULL AND people.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(people.last_name), 1, 1),SUBSTR(LOWER(people.last_name), 2)) + ELSE '' + END, + CASE + WHEN people.middle_name IS NOT NULL AND people.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(people.middle_name), 1, 1),SUBSTR(LOWER(people.middle_name), 2)) + ELSE '' + END + ) AS person_search +FROM APC_PEOPLE people +INNER JOIN APC_OFFICE office ON people.id_office = office.id +INNER JOIN APC_ROUTE route ON people.id_route = route.id +WHERE + people.active_status = 'ENEBLED' +ORDER BY office_name, route_name, person_search; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_ADMINISTRATION_PERSON_SEARCH_VIEW` +-- +ALTER TABLE APC_USER +ADD COLUMN `management` ENUM('ENEBLED','DISABLED'); +-- -------------------------------------------------------------------- +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; + +-- Formula es: +-- monto_pagado >= a FLOOR(payment_total * .7728) +-- y +-- monto_pagado < a FLOOR(payment_total * .8182) +-- El pago puede renovarce segun las reglas y si se acpeta en este caso +-- se deberán condonar pago 21 y 22. +-- El pago 19 y 20 se cobrará cuando se entregue la renovación. +/* +SELECT + FLOOR(payment_total * .7728) as inicio, + + FLOOR(payment_total * .8182) as fin +FROM APC_LOAN_TYPE WHERE id_office = 'e0f1a2fc-7d1f-11ea-af3e-28f659da398e' ORDER BY payment; + + -- SEGUNDO CASO PAGO 20 se condona 21 y se deberá pagar el 22 + +SELECT + FLOOR(payment_total * 0.8637) as inicio, + + FLOOR(payment_total * 0.9091) as fin +FROM APC_LOAN_TYPE WHERE id_office = 'e0f1a2fc-7d1f-11ea-af3e-28f659da398e' ORDER BY payment; +*/ + + +-- VISTA RESPALDADA +-- CREATE ALGORITHM=UNDEFINED DEFINER=`AlphaCJZL`@`%` SQL SECURITY DEFINER VIEW `APC_LOAN_BY_USER_VIEW` AS select concat(`l`.`id`,`u`.`id`) AS `id`,`u`.`id` AS `user_id`,concat((case when ((`cstmr`.`first_name` is not null) and (`cstmr`.`first_name` <> '')) then concat(substr(upper(`cstmr`.`first_name`),1,1),substr(lower(`cstmr`.`first_name`),2),' ') else '' end),(case when ((`cstmr`.`second_name` is not null) and (`cstmr`.`second_name` <> '')) then concat(substr(upper(`cstmr`.`second_name`),1,1),substr(lower(`cstmr`.`second_name`),2),' ') else '' end),(case when ((`cstmr`.`last_name` is not null) and (`cstmr`.`last_name` <> '')) then concat(substr(upper(`cstmr`.`last_name`),1,1),substr(lower(`cstmr`.`last_name`),2)) else '' end)) AS `customer_name`,`cstmr`.`address_home` AS `customer_address_home`,`cstmr`.`address_business` AS `customer_address_business`,`cstmr`.`company_name` AS `company_name`,`cstmr`.`thumbnail` AS `customer_thumbnail`,concat((case when ((`ndrsmnt`.`first_name` is not null) and (`ndrsmnt`.`first_name` <> '')) then concat(substr(upper(`ndrsmnt`.`first_name`),1,1),substr(lower(`ndrsmnt`.`first_name`),2),' ') else '' end),(case when ((`ndrsmnt`.`second_name` is not null) and (`ndrsmnt`.`second_name` <> '')) then concat(substr(upper(`ndrsmnt`.`second_name`),1,1),substr(lower(`ndrsmnt`.`second_name`),2),' ') else '' end),(case when ((`ndrsmnt`.`last_name` is not null) and (`ndrsmnt`.`last_name` <> '')) then concat(substr(upper(`ndrsmnt`.`last_name`),1,1),substr(lower(`ndrsmnt`.`last_name`),2)) else '' end)) AS `endorsement_name`,`ndrsmnt`.`address_home` AS `endorsement_address_home`,`ndrsmnt`.`thumbnail` AS `endorsement_thumbnail`,`ndrsmnt`.`phone_home` AS `endorsement_phone_home`,if(((`l`.`amount_to_pay` - `l`.`amount_paid`) >= `lt`.`payment_daily`),`lt`.`payment_daily`,(`l`.`amount_to_pay` - `l`.`amount_paid`)) AS `payment_daily`,`lt`.`loan_fee` AS `loan_fee`,`lbu`.`order_in_list` AS `order_in_list`,(select count(`APC_LOAN_FEE_NOTIFICATION`.`notification_number`) from `APC_LOAN_FEE_NOTIFICATION` where (`APC_LOAN_FEE_NOTIFICATION`.`id_loan` = `l`.`id`)) AS `notification_number`,if((`l`.`amount_paid` >= (select floor((`lt`.`payment_total` * 0.6364)))),(case when ((select count(`APC_LOAN_FEE_NOTIFICATION`.`notification_number`) AS `total` from `APC_LOAN_FEE_NOTIFICATION` where (`APC_LOAN_FEE_NOTIFICATION`.`id_loan` = `l`.`id`)) < 4) then 'ENEBLED' when (((select count(`APC_LOAN_FEE_NOTIFICATION`.`notification_number`) AS `total` from `APC_LOAN_FEE_NOTIFICATION` where (`APC_LOAN_FEE_NOTIFICATION`.`id_loan` = `l`.`id`)) between 4 and 5) and (`lt`.`payment` > 1000)) then 'ENEBLED' else 'DISABLED' end),'DISABLED') AS `renovation`,(select (`APC_LOAN`.`amount_to_pay` - `APC_LOAN`.`amount_paid`) from `APC_LOAN` where (`APC_LOAN`.`id` = `l`.`id`)) AS `max_amount_to_pay` from (((((`APC_LOAN_BY_USER` `lbu` join `APC_LOAN` `l` on((`lbu`.`id_loan` = `l`.`id`))) join `APC_LOAN_TYPE` `lt` on((`l`.`id_loan_type` = `lt`.`id`))) join `APC_PEOPLE` `cstmr` on((`l`.`id_customer` = `cstmr`.`id`))) join `APC_PEOPLE` `ndrsmnt` on((`l`.`id_endorsement` = `ndrsmnt`.`id`))) join `APC_USER` `u` on((`lbu`.`id_user` = `u`.`id`))) where ((`l`.`loan_status` in ('APPROVED','PENDING','TO_DELIVERY')) and (`l`.`id` = (case when (((select count(`APC_LOAN_DETAIL`.`id`) from `APC_LOAN_DETAIL` where (`APC_LOAN_DETAIL`.`id_loan` = `l`.`id`)) = 0) and (cast(`l`.`last_updated_on` as date) < curdate())) then `l`.`id` when (((select count(`APC_LOAN_DETAIL`.`id`) from `APC_LOAN_DETAIL` where ((`APC_LOAN_DETAIL`.`id_loan` = `l`.`id`) and (`APC_LOAN_DETAIL`.`reference_number` = `l`.`last_reference_number`) and (cast(`APC_LOAN_DETAIL`.`created_on` as date) < curdate()))) > 0) and (cast(`l`.`last_updated_on` as date) < curdate())) then `l`.`id` else '' end)) and (`lbu`.`owner_loan` = 'CURRENT_OWNER') and (0 <> (case when (lower(dayname(curdate())) = 'monday') then ('monday' = `lt`.`payment_monday`) when (lower(dayname(curdate())) = 'tuesday') then ('tuesday' = lower(`lt`.`payment_tuesday`)) when (lower(dayname(curdate())) = 'wednesday') then ('wednesday' = lower(`lt`.`payment_wednesday`)) when (lower(dayname(curdate())) = 'thursday') then ('thursday' = lower(`lt`.`payment_thursday`)) when (lower(dayname(curdate())) = 'friday') then ('friday' = lower(`lt`.`payment_friday`)) when (lower(dayname(curdate())) = 'saturday') then ('saturday' = lower(`lt`.`payment_saturday`)) when (lower(dayname(curdate())) = 'sunday') then ('sunday' = lower(`lt`.`payment_sunday`)) else false end))); +-- NO BORRAR vista APC_LOAN_BY_USER_VIEW diff --git a/ace-db/src/apc-drop-tables-prod.sql b/ace-db/src/apc-drop-tables-prod.sql new file mode 100644 index 0000000..c0b0dde --- /dev/null +++ b/ace-db/src/apc-drop-tables-prod.sql @@ -0,0 +1,46 @@ +-- -------------------------------------------------------- +-- Arrebol Consuntancy +-- version 1.0.1 +-- http://www.arrebolconsultancy.com +-- -------------------------------------------------------- + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; +-- SET time_zone = "+00:00"; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +USE `apo_pro_com_april_ten`; + +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_CASH_REGISTER_CURDATE_BY_USER_VIEW` +-- +-- Sirve para obtener todos los pagos que recabo un asesor en el día. +-- +DROP TABLE IF EXISTS APC_LOAN_BY_RENOVATION; +DROP TABLE IF EXISTS APC_USER_MOBILE_PREFERECE; +DROP TABLE IF EXISTS APC_USER_BY_OFFICE_HAS_PERMISSION; +DROP TABLE IF EXISTS APC_PERMISSION; +DROP TABLE IF EXISTS APC_USER_BY_OFFICE; +DROP TABLE IF EXISTS APC_LOAN_BY_USER; +DROP TABLE IF EXISTS APC_LOAN_FEE_NOTIFICATION; +DROP TABLE IF EXISTS APC_LOAN_DETAIL; +DROP TABLE IF EXISTS APC_USER; +DROP TABLE IF EXISTS APC_HUMAN_RESOURCE_BY_OFFICE; +DROP TABLE IF EXISTS APC_LOAN; +DROP TABLE IF EXISTS APC_LOAN_TYPE; +DROP TABLE IF EXISTS APC_PEOPLE; +DROP TABLE IF EXISTS APC_HUMAN_RESOURCE_HAS_ROUTE; +DROP TABLE IF EXISTS APC_HUMAN_RESOURCE; +DROP TABLE IF EXISTS APC_ROUTE; +DROP TABLE IF EXISTS APC_ROLE; +DROP TABLE IF EXISTS APC_OFFICE; +DROP TABLE IF EXISTS APC_ERROR_APP_LOG; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; \ No newline at end of file diff --git a/ace-db/src/cambio_de_anio.sql b/ace-db/src/cambio_de_anio.sql new file mode 100644 index 0000000..c18f0a6 --- /dev/null +++ b/ace-db/src/cambio_de_anio.sql @@ -0,0 +1,794 @@ +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_INFORMATION_LOAN_LAST_WEEK_VIEW` +-- +CREATE OR REPLACE VIEW `APC_INFORMATION_LOAN_LAST_WEEK_VIEW` AS +SELECT +l.id, +u.id as id_user, +r.id_office, +l.created_on as fecha, +lt.payment as apoyos, +lt.payment_total as apoyos_total, +lt.opening_fee as comision_apertura, +CONCAT(endor.first_name,' ', IF(ISNULL(endor.second_name) ,'', CONCAT(endor.second_name,' ')) ,endor.last_name, ' ', endor.middle_name) AS aval, +CONCAT(cus.first_name,' ', IF(ISNULL(cus.second_name) ,'', CONCAT(cus.second_name,' ')) ,cus.last_name, ' ', cus.middle_name) AS customer, +l.amount_to_pay as documento_por, +lt.payment_daily as abono_diario, +l.amount_paid, +(l.amount_to_pay - l.amount_paid) saldo_insoluto, +r.route_name, +CONCAT(hr.first_name,' ', IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name,' ')) ,hr.last_name, ' ', hr.middle_name) AS asesor, +(SELECT COUNT(lfn.id) FROM APC_LOAN_FEE_NOTIFICATION lfn WHERE lfn.id_loan = l.id) as num_fee, +-- Lunes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_monday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_monday, +-- Martes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_tuesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_tuesday, +-- Miercoles +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_wednesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_wednesday, +-- Jueves +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_thursday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_thursday, +-- Viernes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_friday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_friday, +-- Sabado +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_saturday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_saturday, + +((lt.payment_daily * (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) +- (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) as faltante, + +CASE WHEN l.new_customer = 'ENEBLED' AND WEEK(DATE(l.created_on),1) = (WEEK(CURDATE(),1) - 1) THEN 'Si' ELSE 'No' END as new_customer, +(SELECT IF(COUNT(id_loan_old) = 0 , 'No' , 'Si') FROM APC_LOAN_BY_RENOVATION lbr +INNER JOIN APC_LOAN lRenovation ON lbr.id_loan_new = lRenovation.id +WHERE id_loan_old = l.id + AND loan_by_renovation_status = 'APPROVED' and WEEK(DATE(lRenovation.created_on),1) <= (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(lRenovation.created_on)) = YEAR(CURDATE())) as renovation, +l.loan_status as estatus_prestamo, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as abono_semana_actual, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('FEE')) as fee_semana_actual, +(SELECT COUNT(DISTINCT(DATE(ldFaltante.created_on))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) <= (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_all, +(SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_week, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) <= (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('FEE')) as fee_todos +FROM +APC_LOAN l +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE cus ON cus.id = l.id_customer +INNER JOIN APC_PEOPLE endor ON endor.id = l.id_endorsement +INNER JOIN APC_ROUTE r ON r.id = l.id_route +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +INNER JOIN APC_USER u ON u.id = lbu.id_user +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +WHERE +l.loan_status not in ('DELETED','REJECTED') AND +((SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) > 0 OR + ((SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) = 0 AND l.loan_status = 'APPROVED' AND + WEEK(DATE(l.created_on),1) <= (WEEK(CURDATE(),1) - 1))); +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_COLOCATION_LAST_WEEK_BY_USER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_COLOCATION_LAST_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'monday') + as colocation_monday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'tuesday') + as colocation_tuesday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'wednesday') + as colocation_wednesday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'thursday') + as colocation_thursday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'friday') + as colocation_friday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'saturday') + as colocation_saturday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE())) + as colocation_total +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_RESUMEN_IN_OUT_LAST_WEEK_BY_USER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_RESUMEN_IN_OUT_LAST_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +-- Lunes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday') as closing_monday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'monday') as expense_monday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'monday') as money_daily_today_monday, +-- Martes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday') as closing_tuesday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'tuesday') as expense_tuesday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'tuesday') as money_daily_today_tuesday, +-- Miercoles +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday') as closing_wednesday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'wednesday') as expense_wednesday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'wednesday') as money_daily_today_wednesday, +-- Jueves +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday') as closing_thursday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'thursday') as expense_thursday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'thursday') as money_daily_today_thursday, +-- Viernes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday') as closing_friday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'friday') as expense_friday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'friday') as money_daily_today_friday, +-- Sabado +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday') as closing_saturday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'saturday') as expense_saturday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'saturday') as money_daily_today_saturday +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE','BOTH'); +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_LOAN_DIFERENCES_BY_USER_LAST_WEEK_VIEW` +-- +CREATE OR REPLACE VIEW `APC_LOAN_DIFERENCES_BY_USER_LAST_WEEK_VIEW` AS +SELECT +l.id, +lbu.id_user, +((lt.payment_daily * 5) - (SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +WHERE ld.id_loan = l.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) +AND YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) + as faltante +FROM + APC_LOAN l +INNER JOIN + APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN + APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE +l.loan_status not in ('DELETED','REJECTED') AND +(SELECT COUNT(ld2.id) FROM APC_LOAN_DETAIL ld2 WHERE WEEK(DATE(ld2.created_on),1) = (WEEK(CURDATE(),1)-1) +AND YEAR(DATE(ld2.created_on)) = YEAR(CURDATE()) AND ld2.id_loan = l.id) > 4; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_SUBTOTAL_LAST_WEEK_BY_USER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_SUBTOTAL_LAST_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_monday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'monday') + as opening_fee_monday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_tuesday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'tuesday') + as opening_fee_tuesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_wednesday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'wednesday') + as opening_fee_wednesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_thursday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'thursday') + as opening_fee_thursday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_friday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'friday') + as opening_fee_friday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_saturday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'saturday') + as opening_fee_saturday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_total, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) ) + as opening_fee_total, +( + select + IF(ISNULL( + SUM( + CASE WHEN l.loan_status IN ('PENDING_RENOVATION', 'FINISH') then 0 ELSE + ((lt.payment_daily * (SELECT COUNT(ldFaltante.id) FROM APC_LOAN_DETAIL ldFaltante + WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) + AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) + - (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) + FROM APC_LOAN_DETAIL ldLunes + WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) + AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) END + ) + ),0, + SUM( + CASE WHEN l.loan_status IN ('PENDING_RENOVATION', 'FINISH') then 0 ELSE + ((lt.payment_daily * (SELECT COUNT(ldFaltante.id) FROM APC_LOAN_DETAIL ldFaltante + WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) + AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) + - (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) + FROM APC_LOAN_DETAIL ldLunes + WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) + AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) END + ) + ) + as faltante + + FROM + APC_LOAN l + INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id + INNER JOIN APC_LOAN_BY_USER albu ON l.id = albu.id_loan + WHERE albu.id_user = u.id + AND albu.owner_loan = 'CURRENT_OWNER' + +) +as faltante +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_COBRANZA_LAST_WEEK_BY_USER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_COBRANZA_LAST_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' AND ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_monday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_tuesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_wednesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_thursday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_friday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_saturday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_total +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_RESUMEN_TOTAL_LAST_WEEK_VIEW` +-- +CREATE OR REPLACE VIEW `APC_RESUMEN_TOTAL_LAST_WEEK_VIEW` AS +SELECT +u.id, +u.office_name, +-- Cortes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND ld.id_office = u.id) as closing__day_total, +-- Inicios +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) AND md.id_office = u.id) as money_daily_today_total, +-- Subtotal +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_total, +-- comision por apertura +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE())) + as opening_fee_total, +-- cobranza +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) -1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_today, +-- colocacion +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) ) + as colocation_total, +-- nominas +(SELECT IF(ISNULL(SUM(ap.total_payment)),0,SUM(ap.total_payment)) FROM APC_PAYROLL ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as nomina_total, +-- adelantos +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_ADVANCE ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as adelantos_total, +-- entradas +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND +ap.expense_company_type = 'PAYMENT_IN' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as entradas_total, +-- gastos admon +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND +ap.expense_company_type = 'PAYMENT_OUT' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as gastos_admon_total +FROM APC_OFFICE u +WHERE u.office_status = 'ENEBLED'; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `` +-- +CREATE OR REPLACE VIEW `APC_RESUMEN_TOTAL_LAST_WEEK_VIEW` AS +SELECT +u.id, +u.office_name, +-- Cortes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND ld.id_office = u.id) as closing__day_total, +-- Inicios +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) AND md.id_office = u.id) as money_daily_today_total, +-- Subtotal +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_total, +-- comision por apertura +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE())) + as opening_fee_total, +-- cobranza +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) -1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_today, +-- colocacion +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) ) + as colocation_total, +-- nominas +(SELECT IF(ISNULL(SUM(ap.total_payment)),0,SUM(ap.total_payment)) FROM APC_PAYROLL ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as nomina_total, +-- adelantos +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_ADVANCE ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as adelantos_total, +-- entradas +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND +ap.expense_company_type = 'PAYMENT_IN' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as entradas_total, +-- gastos admon +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND +ap.expense_company_type = 'PAYMENT_OUT' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as gastos_admon_total +FROM APC_OFFICE u +WHERE u.office_status = 'ENEBLED'; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `` +-- + +-- -------------------------------------------------------- +-- +-- Estructura para la vista `` +-- + +-- -------------------------------------------------------- +-- +-- Estructura para la vista `` +-- + +-- -------------------------------------------------------- +-- +-- Estructura para la vista `` +-- + +-- -------------------------------------------------------- +-- +-- Estructura para la vista `` +-- + +-- -------------------------------------------------------- +-- +-- Estructura para la vista `` +-- + +-- -------------------------------------------------------- +-- +-- Estructura para la vista `` +-- + +-- -------------------------------------------------------- +-- +-- Estructura para la vista `` +-- \ No newline at end of file diff --git a/ace-db/src/cocina-lore-db.sql b/ace-db/src/cocina-lore-db.sql new file mode 100644 index 0000000..d2c927f --- /dev/null +++ b/ace-db/src/cocina-lore-db.sql @@ -0,0 +1,412 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +/** + * Author: Oscar Armando Vargas Cardenas + * Created: 19/04/2021 + */ + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; +-- SET time_zone = "+00:00"; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +DROP DATABASE IF EXISTS `cocina_lore_db_arrebol`; + +CREATE DATABASE IF NOT EXISTS `cocina_lore_db_arrebol` DEFAULT CHARACTER SET latin1 COLLATE latin1_spanish_ci; +USE `cocina_lore_db_arrebol`; + +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_OFFICE` +-- +CREATE TABLE `CL_OFFICE`( + `id` char(36) NOT NULL, + `office_name` varchar(100) NOT NULL, + `address` varchar(250), + `office_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `cl_office_pk` PRIMARY KEY (`id`), + CONSTRAINT `cl_office_uk` UNIQUE KEY (`office_name`) +)ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_ROLE` +-- +CREATE TABLE `CL_ROLE`( + `id` char(36) NOT NULL, + `role_name` varchar(100) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `cl_role_pk` PRIMARY KEY (`id`), + CONSTRAINT `cl_role_uk` UNIQUE KEY (`role_name`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_ROUTE` +-- +CREATE TABLE `CL_ROUTE`( + `id` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `route_name` varchar(25) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `cl_route_pk` PRIMARY KEY (`id`), + CONSTRAINT `cl_route_uk` UNIQUE KEY (`id_office`,`route_name`), + CONSTRAINT `cl_route_to_cl_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `CL_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_HUMAN_RESOURCES` +-- +CREATE TABLE `CL_HUMAN_RESOURCE` ( + `id` char(36) NOT NULL, + `first_name` varchar(25) NOT NULL, + `second_name` varchar(25) DEFAULT NULL, + `last_name` varchar(25) NOT NULL, + `middle_name` varchar(25) NOT NULL, + `birthdate` date DEFAULT NULL, + `avatar` varchar(150) NOT NULL, + `curp` varchar(20) DEFAULT NULL, + `rfc` varchar(13) DEFAULT NULL, + `ife` varchar(20) DEFAULT NULL, + `admission_date` date DEFAULT NULL, + `human_resource_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `id_role` char(36) NOT NULL, + `payment` numeric(8,2) DEFAULT NULL, + `imss` numeric(8,2) DEFAULT NULL, + `created_by` char(36) DEFAULT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `person_pk` PRIMARY KEY (`id`), + CONSTRAINT `cl_human_resource_to_cl_role_fk` + FOREIGN KEY (`id_role`) REFERENCES `CL_ROLE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_HUMAN_RESOURCE_HAS_ROUTE` +-- +CREATE TABLE `CL_HUMAN_RESOURCE_HAS_ROUTE`( + `id_human_resource` char(36) NOT NULL, + `id_route` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `cl_human_resource_has_route_pk` PRIMARY KEY (`id_human_resource`, `id_route`), + CONSTRAINT `cl_human_resource_has_route_to_cl_human_resource_fk` + FOREIGN KEY (`id_human_resource`) REFERENCES `CL_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `cl_human_resource_has_route_to_cl_route_fk` + FOREIGN KEY (`id_route`) REFERENCES `CL_ROUTE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_PEOPLE` +-- +CREATE TABLE `CL_PEOPLE`( + `id` char(36) NOT NULL, + `first_name` varchar(25) NOT NULL, + `second_name` varchar(25) DEFAULT NULL, + `last_name` varchar(25) NOT NULL, + `middle_name` varchar(25) NOT NULL, + `birthdate` date DEFAULT NULL, + `thumbnail` varchar(250) NOT NULL, + `phone_home` varchar(15) NOT NULL, + `address_home` varchar(150) NOT NULL, + `phone_business` varchar(15), + `address_business` varchar(150), + `company_name` varchar(150), + `people_type` ENUM('CUSTOMER') NOT NULL DEFAULT 'CUSTOMER', + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `id_office` char(36) NOT NULL, + `id_route` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `cl_people_pk` PRIMARY KEY (`id`), + CONSTRAINT `cl_people_to_cl_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `CL_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `cl_people_to_cl_route_fk` + FOREIGN KEY (`id_route`) REFERENCES `CL_ROUTE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_ORDER` +-- +CREATE TABLE `CL_ORDER`( + `id` char(36) NOT NULL, + `id_customer` char(36) NOT NULL, + `id_route` char(36) NOT NULL, + `order_status` ENUM('PENDING', 'FINISH', 'REJECTED', 'TO_DELIVERY') NOT NULL DEFAULT 'PENDING', + `new_customer` ENUM('ENEBLED', 'DISABLED') DEFAULT 'DISABLED', + `amount_paid` numeric(8,2) NOT NULL, + `amount_to_pay` numeric(8,2) NOT NULL, + `comments` varchar(600), + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36), + `last_updated_on` datetime, + CONSTRAINT `cl_order_pk` PRIMARY KEY (`id`), + CONSTRAINT `cl_order_to_cl_person_as_customer_fk` + FOREIGN KEY (`id_customer`) REFERENCES `CL_PEOPLE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `cl_order_to_cl_route_fk` + FOREIGN KEY (`id_route`) REFERENCES `CL_ROUTE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_HUMAN_RESOURCE_BY_OFFICE` +-- +CREATE TABLE `CL_HUMAN_RESOURCE_BY_OFFICE`( + `id` char(36) NOT NULL, + `id_human_resource` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `application_owner` ENUM('APP_OWNER', 'APP_USER') NOT NULL DEFAULT 'APP_USER', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `cl_human_resource_by_office_pk` PRIMARY KEY (`id`), + CONSTRAINT `cl_human_resource_by_office_uk` UNIQUE KEY (`id_human_resource`, `id_office`), + CONSTRAINT `cl_human_resource_by_office_to_cl_human_resource_fk` + FOREIGN KEY (`id_human_resource`) REFERENCES `CL_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `cl_human_resource_by_office_to_cl_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `CL_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; + + +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_USER` +-- +CREATE TABLE `CL_USER`( + `id` char(36) NOT NULL, + `id_human_resource` char(36) NOT NULL, + `user_name` varchar(100) NOT NULL, + `pwd` varchar(100)NOT NULL, + `user_type` ENUM('WEB', 'MOBILE', 'BOTH') NOT NULL, + `user_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `application_owner` ENUM('APP_OWNER', 'APP_USER') NOT NULL DEFAULT 'APP_USER', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `cl_user_pk` PRIMARY KEY (`id`), + CONSTRAINT `cl_user_by_office_to_cl_human_resource_fk` + FOREIGN KEY (`id_human_resource`) REFERENCES `CL_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_ORDER_BY_USER` +-- +CREATE TABLE `CL_ORDER_BY_USER`( + `id_order` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `loan_by_user_status` ENUM('PENDING', 'FINISH','REJECTED', 'TO_DELIVERY') NOT NULL DEFAULT 'PENDING', + `comments` varchar(150), + `owner_loan` ENUM('CURRENT_OWNER', 'OLD_OWNER') NOT NULL, + `order_in_list` smallint DEFAULT 0, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `cl_order_by_user_pk` PRIMARY KEY (`id_order`, `id_user`), + CONSTRAINT `cl_order_by_user_to_cl_order_fk` + FOREIGN KEY (`id_order`) REFERENCES `CL_ORDER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `cl_order_by_user_to_cl_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `CL_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_USER_BY_OFFICE` +-- +CREATE TABLE `CL_USER_BY_OFFICE`( + `id` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `user_by_office_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `application_owner` ENUM('APP_OWNER', 'APP_USER')NOT NULL DEFAULT 'APP_USER', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `cl_user_by_office_pk` PRIMARY KEY (`id`), + CONSTRAINT `cl_user_by_office_uk` UNIQUE KEY (`id_user`, `id_office`), + CONSTRAINT `cl_user_by_office_to_cl_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `CL_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `cl_user_by_office_to_cl_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `CL_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_PERMISSION` +-- +CREATE TABLE `CL_PERMISSION` ( + `id` char(36) NOT NULL, + `permission` varchar(200) NOT NULL, -- dashboard.policy.to.expire.name + `description` varchar(200) NOT NULL, -- dashboard.policy.to.expire.description + `menu_path` varchar(200) NOT NULL, -- dashboard.policy.to.expire.path + `left_to_right_order` smallint NOT NULL, -- Orden en la que aparece el menu principal (Dashboard, Administración, Catálogo) + `top_to_bottom_order` smallint NOT NULL, -- Orden en la que aparece de arriba hacia abajo + `permission_type` ENUM('PUBLIC', 'PRIVATE', 'EXCLUSIVE') NOT NULL, + `parent_name` varchar(200), + `permission_status` ENUM('ENEBLED', 'DISABLED') NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `cl_permission_pk` PRIMARY KEY (`id`), + CONSTRAINT `cl_permission_uk` UNIQUE KEY (`permission`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_USER_BY_OFFICE_HAS_PERMISSION` +-- +CREATE TABLE `CL_USER_BY_OFFICE_HAS_PERMISSION` ( + `id_user_by_office` char(36) NOT NULL, + `id_permission` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `cl_user_by_office_has_permission_pk` PRIMARY KEY (`id_user_by_office`,`id_permission`) , + CONSTRAINT `cl_user_by_office_has_permission_to_cl_user_by_office_fk` + FOREIGN KEY (`id_user_by_office`) REFERENCES `CL_USER_BY_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `cl_user_by_office_has_permission_to_cl_permission_fk` + FOREIGN KEY (`id_permission`) REFERENCES `CL_PERMISSION`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `CL_USER_MOBILE_PREFERECE` +-- +CREATE TABLE `CL_USER_MOBILE_PREFERECE`( + `id` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `preference_name` varchar(25) NOT NULL, + `preference_value` varchar(25) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `cl_user_mobile_preference_pk` PRIMARY KEY (`id`), + CONSTRAINT `cl_user_mobile_preference_uk` UNIQUE KEY (`id_user`,`preference_name`), + CONSTRAINT `cl_user_mobile_preference_to_cl_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `CL_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- + +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `CL_SECURITY_AUTHENTICATION` (USER) +-- +CREATE OR REPLACE VIEW `CL_SECURITY_AUTHENTICATION` AS +SELECT CONCAT(`usr`.`user_name`,`ubo`.`id_office`) AS `user_name`, `usr`.`pwd` AS `pwd` +FROM `CL_USER_BY_OFFICE` `ubo` +INNER JOIN `CL_USER` `usr` ON `ubo`.`id_user` = `usr`.`id` +INNER JOIN `CL_HUMAN_RESOURCE` `hr` ON `usr`.`id_human_resource` = `hr`.`id` +WHERE +`usr`.`user_status` = 'ENEBLED' AND +`usr`.`user_type` IN ('WEB', 'BOTH') AND +`ubo`.`user_by_office_status` = 'ENEBLED' AND +`hr`.`human_resource_status` = 'ENEBLED'; +-- ------------------------------------------------------------ +-- +-- Estructura para la vista `CL_SECURITY_AUTHORIZATION` (ROLE) +-- +CREATE OR REPLACE VIEW `CL_SECURITY_AUTHORIZATION` AS +SELECT CONCAT(`usr`.`user_name`,`ubo`.`id_office`) AS `user_name`, `perm`.`permission` AS `permission` +FROM `CL_PERMISSION` `perm` +INNER JOIN `CL_USER_BY_OFFICE_HAS_PERMISSION` `ubohp` ON `perm`.`id` = `ubohp`.`id_permission` +INNER JOIN `CL_USER_BY_OFFICE` `ubo` ON `ubohp`.`id_user_by_office` = `ubo`.`id` +INNER JOIN `CL_USER` `usr` ON `ubo`.`id_user` = `usr`.`id` +INNER JOIN `CL_HUMAN_RESOURCE` `hr` ON `usr`.`id_human_resource` = `hr`.`id` +WHERE +`perm`.`permission_status` = 'ENEBLED' AND +`ubo`.`user_by_office_status` = 'ENEBLED' AND +`usr`.`user_status` = 'ENEBLED' AND +`usr`.`user_type` IN ('WEB', 'BOTH') AND +`hr`.`human_resource_status` = 'ENEBLED' +ORDER BY `user_name`; +-- ------------------------------------------------------------------- +-- +-- Estructura para la vista `CL_SECURITY_AUTHENTICATION_MOBILE` (USER) +-- +CREATE OR REPLACE VIEW `CL_SECURITY_AUTHENTICATION_MOBILE` AS +SELECT +`usr`.`id` AS `id`, +`usr`.`user_name` AS `user_name`, +`usr`.`pwd` AS `pwd`, +`hr`.`avatar` AS `avatar`, +`ubo`.`id_office` AS `id_office`, +`hrhr`.`id_route` AS `id_route` +FROM `CL_USER_BY_OFFICE` `ubo` +INNER JOIN `CL_USER` `usr` ON `ubo`.`id_user` = `usr`.`id` +INNER JOIN `CL_HUMAN_RESOURCE` `hr` ON `usr`.`id_human_resource` = `hr`.`id` +INNER JOIN `CL_HUMAN_RESOURCE_HAS_ROUTE` `hrhr` ON `hr`.`id` = `hrhr`.`id_human_resource` +WHERE +`usr`.`user_status` = 'ENEBLED' AND +`usr`.`user_type` IN ('MOBILE', 'BOTH') AND +`ubo`.`user_by_office_status` = 'ENEBLED' AND +`hr`.`human_resource_status` = 'ENEBLED'; + diff --git a/ace-db/src/create/from/scratch/apc-config-db-aws.sql b/ace-db/src/create/from/scratch/apc-config-db-aws.sql new file mode 100644 index 0000000..2d082af --- /dev/null +++ b/ace-db/src/create/from/scratch/apc-config-db-aws.sql @@ -0,0 +1,134 @@ +-- -------------------------------------------------------- +-- Arrebol Consuntancy +-- version 1.0.1 +-- http://www.arrebolconsultancy.com +-- -------------------------------------------------------- + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; +-- SET time_zone = "+00:00"; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- -------------------------------------------------------- + +-- +-- Base de datos: `apo_pro_com_april_ten` +-- +USE `apo_pro_com_april_ten`; + +-- -------------------------------------------------------- + +-- +-- Drop users: apoprocom & errortrace +-- +DROP USER IF EXISTS 'apoprocom'@'%'; +DROP USER IF EXISTS 'errortrace'@'%'; +DROP USER IF EXISTS 'apoprocommobile'@'%'; +DROP USER IF EXISTS 'apcreportdesktop'@'%'; +-- -------------------------------------------------------- + +-- +-- App user: `apoprocom` application user +-- + +CREATE USER 'apoprocom'@'%' + IDENTIFIED BY 'Yj$2Da0z!'; + +GRANT SELECT ON apo_pro_com_april_ten.* TO 'apoprocom'@'%'; +GRANT INSERT, UPDATE, DELETE ON apo_pro_com_april_ten.* TO 'apoprocom'@'%'; +GRANT EXECUTE ON apo_pro_com_april_ten.* TO 'apoprocom'@'%'; + +-- -------------------------------------------------------- + +-- +-- Error trace user: `errortrace` DB user +-- + +-- -------------------------------------------------------- + +CREATE USER 'errortrace'@'%' + IDENTIFIED BY 'zy61$Jql'; +GRANT ALL ON apo_pro_com_april_ten.APC_ERROR_APP_LOG TO 'errortrace'@'%'; + +-- -------------------------------------------------------- + +-- +-- Error trace user: `apoprocommobile` DB user +-- + +-- -------------------------------------------------------- + +CREATE USER 'apoprocommobile'@'%' + IDENTIFIED BY '0Ps$6%q8'; + +GRANT SELECT, INSERT ON apo_pro_com_april_ten.APC_LOAN_FEE_NOTIFICATION TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT ON apo_pro_com_april_ten.APC_DELIVERY TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT ON apo_pro_com_april_ten.APC_OTHER_EXPENSE TO 'apoprocommobile'@'%'; + +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN_DETAIL TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN_BY_RENOVATION TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN_BY_USER TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_USER_MOBILE_PREFERECE TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_PEOPLE TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_TRANSFER TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_GASOLINE TO 'apoprocommobile'@'%'; +-- SELECT +GRANT SELECT ON apo_pro_com_april_ten.APC_OFFICE TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_USER TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_TYPE TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_MONEY_DAILY TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CLOSING_DAY TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_HUMAN_RESOURCE_HAS_ROUTE TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_ROUTE TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_USER_BY_OFFICE TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_HUMAN_RESOURCE TO 'apoprocommobile'@'%'; +GRANT SELECT, UPDATE ON apo_pro_com_april_ten.APC_STABLE_GENERAL_BOX TO 'apoprocommobile'@'%'; +GRANT SELECT, UPDATE ON apo_pro_com_april_ten.APC_STABLE_SMALL_BOX TO 'apoprocommobile'@'%'; +GRANT SELECT, UPDATE ON apo_pro_com_april_ten.APC_CLOSING_DAY TO 'apoprocommobile'@'%'; +GRANT SELECT, INSERT ON apo_pro_com_april_ten.APC_BITACORA TO 'apoprocommobile'@'%'; +-- Views +GRANT SELECT ON apo_pro_com_april_ten.APC_SECURITY_AUTHENTICATION_MOBILE TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_BY_USER_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_BY_USER_ORDER_PREFERENCE_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PERSON_SEARCH_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PERSON_SEARCH_DETAIL_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_AVAILABLE_CUSTOMERS_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_AVAILABLE_ENDORSEMENTS_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CASH_REGISTER_CURDATE_BY_USER_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_TO_DELIVERY_BY_CERTIFIER_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_EXCHANGE_ENEBLED_USERS_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_TOTAL_CASH_BY_CURDATE_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PERSON_SEARCH_HISTORICAL_DETAILS_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_APPROVED_DETAIL_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_USER_WEEK_REPORT_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_DETAIL_ZERO_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_FINISHED_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_ADVANCE_USER_DAILY_DASHBOARD_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_TRANSFER_IN_PENDING_STATUS_VIEW TO 'apoprocommobile'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_IN_PENDING_STATUS_TO_DELIVERY_VIEW TO 'apoprocommobile'@'%'; +-- ---------------------------------------------------------------------- +GRANT ALL ON apo_pro_com_april_ten.ARREBOL_TEST TO 'apoprocommobile'@'%'; +-- -------------------------------------------------------- + +-- +-- App user: `apcreportdesktop` report desktop user +-- + +CREATE USER 'apcreportdesktop'@'%' + IDENTIFIED BY 'hY5znQ8j'; + +GRANT SELECT ON apo_pro_com_april_ten.APC_USER TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_HUMAN_RESOURCE TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_TOTAL_CASH_BY_CURDATE_VIEW TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW TO 'apcreportdesktop'@'%'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW_REPORT TO 'apcreportdesktop'@'%'; +-- ---------------------------------------------------------------------- +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; \ No newline at end of file diff --git a/ace-db/src/create/from/scratch/apc-config-db-localhost.sql b/ace-db/src/create/from/scratch/apc-config-db-localhost.sql new file mode 100644 index 0000000..e03e3dc --- /dev/null +++ b/ace-db/src/create/from/scratch/apc-config-db-localhost.sql @@ -0,0 +1,136 @@ +-- -------------------------------------------------------- +-- Arrebol Consuntancy +-- version 1.0.1 +-- http://www.arrebolconsultancy.com +-- -------------------------------------------------------- + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; +-- SET time_zone = "+00:00"; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- -------------------------------------------------------- + +-- +-- Base de datos: `apo_pro_com_april_ten` +-- +USE `apo_pro_com_april_ten`; + +-- -------------------------------------------------------- + +-- +-- Drop users: apoprocomlocalhost & errortracelocalhost +-- +DROP USER IF EXISTS 'apoprocomlocalhost'@'localhost'; +DROP USER IF EXISTS 'errortracelocalhost'@'localhost'; +DROP USER IF EXISTS 'apoprocommobilelocalhost'@'localhost'; +DROP USER IF EXISTS 'apcreportdesktop'@'localhost'; +-- -------------------------------------------------------- + +-- +-- App user: `apoprocomlocalhost` application user +-- + +CREATE USER 'apoprocomlocalhost'@'localhost' + IDENTIFIED BY 'Yj$2Da0z!'; + +GRANT SELECT ON apo_pro_com_april_ten.* TO 'apoprocomlocalhost'@'localhost'; +GRANT INSERT, UPDATE, DELETE ON apo_pro_com_april_ten.* TO 'apoprocomlocalhost'@'localhost'; +GRANT EXECUTE ON apo_pro_com_april_ten.* TO 'apoprocomlocalhost'@'localhost'; + +-- -------------------------------------------------------- + +-- +-- Error trace user: `errortracelocalhost` DB user +-- + +-- -------------------------------------------------------- + +CREATE USER 'errortracelocalhost'@'localhost' + IDENTIFIED BY 'zy61$Jql'; +GRANT ALL ON apo_pro_com_april_ten.APC_ERROR_APP_LOG TO 'errortracelocalhost'@'localhost'; + +-- -------------------------------------------------------- + +-- +-- Error trace user: `apoprocommobilelocalhost` DB user +-- + +-- -------------------------------------------------------- + +CREATE USER 'apoprocommobilelocalhost'@'localhost' + IDENTIFIED BY '0Ps$6%q8'; + + +GRANT SELECT, INSERT, DELETE ON apo_pro_com_april_ten.APC_LOAN_DETAIL TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, DELETE ON apo_pro_com_april_ten.APC_LOAN_FEE_NOTIFICATION TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT ON apo_pro_com_april_ten.APC_DELIVERY TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT ON apo_pro_com_april_ten.APC_OTHER_EXPENSE TO 'apoprocommobilelocalhost'@'localhost'; + +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN_DETAIL TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN_BY_RENOVATION TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN_BY_USER TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_USER_MOBILE_PREFERECE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_PEOPLE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_LOAN TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_TRANSFER TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON apo_pro_com_april_ten.APC_GASOLINE TO 'apoprocommobilelocalhost'@'localhost'; +-- SELECT +GRANT SELECT ON apo_pro_com_april_ten.APC_OFFICE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_USER TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_TYPE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_MONEY_DAILY TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CLOSING_DAY TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_HUMAN_RESOURCE_HAS_ROUTE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_ROUTE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_USER_BY_OFFICE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_HUMAN_RESOURCE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, UPDATE ON apo_pro_com_april_ten.APC_STABLE_GENERAL_BOX TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, UPDATE ON apo_pro_com_april_ten.APC_STABLE_SMALL_BOX TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, UPDATE ON apo_pro_com_april_ten.APC_CLOSING_DAY TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT, INSERT ON apo_pro_com_april_ten.APC_BITACORA TO 'apoprocommobilelocalhost'@'localhost'; +-- Views +GRANT SELECT ON apo_pro_com_april_ten.APC_SECURITY_AUTHENTICATION_MOBILE TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_BY_USER_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_BY_USER_ORDER_PREFERENCE_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PERSON_SEARCH_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PERSON_SEARCH_DETAIL_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_AVAILABLE_CUSTOMERS_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_AVAILABLE_ENDORSEMENTS_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CASH_REGISTER_CURDATE_BY_USER_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_TO_DELIVERY_BY_CERTIFIER_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_EXCHANGE_ENEBLED_USERS_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_TOTAL_CASH_BY_CURDATE_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_PERSON_SEARCH_HISTORICAL_DETAILS_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_APPROVED_DETAIL_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_USER_WEEK_REPORT_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_DETAIL_ZERO_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_FINISHED_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_ADVANCE_USER_DAILY_DASHBOARD_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_TRANSFER_IN_PENDING_STATUS_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_LOAN_IN_PENDING_STATUS_TO_DELIVERY_VIEW TO 'apoprocommobilelocalhost'@'localhost'; +-- ------------------------------------------------------------------------------------- +GRANT ALL ON apo_pro_com_april_ten.ARREBOL_TEST TO'apoprocommobilelocalhost'@'localhost'; +-- -------------------------------------------------------- + +-- +-- App user: `apcreportdesktop` report desktop user +-- + +CREATE USER 'apcreportdesktop'@'localhost' + IDENTIFIED BY 'hY5znQ8j'; + +GRANT SELECT ON apo_pro_com_april_ten.APC_USER TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_HUMAN_RESOURCE TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_TOTAL_CASH_BY_CURDATE_VIEW TO 'apcreportdesktop'@'localhost'; +GRANT SELECT ON apo_pro_com_april_ten.APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW TO 'apcreportdesktop'@'localhost'; + +-- ------------------------------------------------------------------------------------- +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; \ No newline at end of file diff --git a/ace-db/src/create/from/scratch/apc-db-init-populate.sql b/ace-db/src/create/from/scratch/apc-db-init-populate.sql new file mode 100644 index 0000000..66a297d --- /dev/null +++ b/ace-db/src/create/from/scratch/apc-db-init-populate.sql @@ -0,0 +1,293 @@ +-- -------------------------------------------------------- +-- Arrebol Consuntancy +-- version 1.0.1 +-- http://www.arrebolconsultancy.com +-- -------------------------------------------------------- + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; +-- SET time_zone = "+00:00"; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +-- -------------------------------------------------------- + +-- +-- Base de datos: Select `apo_pro_com_april_ten` DB +-- +USE `apo_pro_com_april_ten`; +-- -------------------------------------------------------- +-- +-- Volcado de datos para la tabla `APC_ROLE` +-- +INSERT INTO APC_ROLE(id,role_name,active_status,created_by) +VALUES +('56dd386a-88c8-11ea-a6b0-82987069bf80','DIRECTOR GENERAL','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('b9c76e82-88c8-11ea-a6b0-82987069bf80','GERENCIA','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('e7fbf750-88c8-11ea-a6b0-82987069bf80','SUPERVISOR REGIONAL','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('ee39d1aa-88c8-11ea-a6b0-82987069bf80','CERTIFICADOR Y FACILITADOR DE CREDITO','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('3e07c998-a81e-11ea-aa38-77eb3547c70f','JEFE DE ASESORES','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('b5b506f9-3ca4-4ceb-b938-dc58da3f039b','ASESORES DE CREDITO Y COBRANZA','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('e67360db-5953-46ba-9fe1-d71e30ae9b59','JURIDICO','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('b691aea2-3ba5-4e4d-a256-37f749a310bd','JEFE DE PERSONAL PRO FAM','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('44cb12f9-19e6-439a-9cd9-abdf4af38651','EJECUTIVO DE RUTA PRO FAM','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('23259ba5-7a0e-4503-a470-b8bd900635e1','AUXILIAR DE RUTA PRO FAM.','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'); +-- -------------------------------------------------------- +-- +-- Volcado de datos para la tabla `APC_HUMAN_RESOURCE` +-- +INSERT INTO APC_HUMAN_RESOURCE(id,first_name,second_name,last_name,middle_name,birthdate,avatar,human_resource_status, id_role ,created_by) +VALUES +('13c588a6-7d1b-11ea-af3e-28f659da398e','Ruben','','Campos','Bueno',str_to_date('1977-03-02','%Y-%m-%d'),'images/avatar1.png','ENEBLED','b9c76e82-88c8-11ea-a6b0-82987069bf80','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('c021214a-8bc7-11ea-b45c-c7b846343364','Hector','Alonso','Ubaldo','Nolasco',str_to_date('1977-03-02','%Y-%m-%d'),'https://freisteller24.eu/wp-content/uploads/2017/11/26603674-1200x1200.jpg','ENEBLED','b5b506f9-3ca4-4ceb-b938-dc58da3f039b','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('d2869da6-8bc7-11ea-b45c-c7b846343364','Juan','Carlos','Campos','Campos',str_to_date('1977-03-02','%Y-%m-%d'),'https://freisteller24.eu/wp-content/uploads/2017/11/97783667-1200x1200.jpg','ENEBLED','b5b506f9-3ca4-4ceb-b938-dc58da3f039b','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('088d7268-8bc7-11ea-b45c-c7b846343364','Avatar 4','Avatar 4','Campos','Campos',str_to_date('1977-03-02','%Y-%m-%d'),'https://freisteller24.eu/wp-content/uploads/2017/10/573675226-1200x1200.jpg','ENEBLED','ee39d1aa-88c8-11ea-a6b0-82987069bf80','0dc7c246-7db8-11ea-9b1f-500320958bf8'); +-- -------------------------------------------------------- +-- +-- Volcado de datos para la tabla `APC_OFFICE` +-- +INSERT INTO APC_OFFICE(id,office_name,office_status,created_by) +VALUES +-- Tepic +('caef3a64-7d1f-11ea-af3e-28f659da398e','TEPIC','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8'); +-- -------------------------------------------------------- +-- +-- Add APC_HUMAN_RESOURCE_BY_OFFICE +-- +INSERT INTO APC_HUMAN_RESOURCE_BY_OFFICE(id,id_human_resource,id_office,application_owner,created_by) +VALUES +-- Ruben +('e540fd40-8246-11ea-9f9f-a9ab5ed40dc4','13c588a6-7d1b-11ea-af3e-28f659da398e','caef3a64-7d1f-11ea-af3e-28f659da398e','APP_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Hector Tepic +('14affe8c-8247-11ea-9f9f-a9ab5ed40dc4','c021214a-8bc7-11ea-b45c-c7b846343364','caef3a64-7d1f-11ea-af3e-28f659da398e','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Juan Tepic +('f41be05a-8246-11ea-9f9f-a9ab5ed40dc4','d2869da6-8bc7-11ea-b45c-c7b846343364','caef3a64-7d1f-11ea-af3e-28f659da398e','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Certificador Tepic +('0a8cf342-8247-11ea-9f9f-a9ab5ed40dc4','088d7268-8bc7-11ea-b45c-c7b846343364','caef3a64-7d1f-11ea-af3e-28f659da398e','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'); +-- -------------------------------------------------------- +-- +-- Volcado de datos para la tabla `APC_USER` +-- +INSERT INTO APC_USER(id,id_human_resource,user_name,pwd,user_type,user_status,application_owner,created_by,certifier) +VALUES +-- Ruben WEB +('5751074e-7d1b-11ea-af3e-28f659da398e','13c588a6-7d1b-11ea-af3e-28f659da398e','ejecutivo','8478A4A2819E9C06AB738123C5D04B4FA1AA67548EBA64EAD40B635EA8AA8D5B','WEB','ENEBLED','APP_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8','DISABLED'), +-- Hector MOBILE +('092a95d8-7db8-11ea-9b1f-500320958bf8','c021214a-8bc7-11ea-b45c-c7b846343364','ruta3','8478A4A2819E9C06AB738123C5D04B4FA1AA67548EBA64EAD40B635EA8AA8D5B','MOBILE','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8','DISABLED'), +-- Juan MOBILE +('0dc7c246-7db8-11ea-9b1f-500320958bf8','d2869da6-8bc7-11ea-b45c-c7b846343364','ruta7','8478A4A2819E9C06AB738123C5D04B4FA1AA67548EBA64EAD40B635EA8AA8D5B','MOBILE','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8','DISABLED'), +-- Certificador MOBILE +('67b3081e-8bc9-11ea-b45c-c7b846343364','088d7268-8bc7-11ea-b45c-c7b846343364','certificador','8478A4A2819E9C06AB738123C5D04B4FA1AA67548EBA64EAD40B635EA8AA8D5B','MOBILE','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8','ENEBLED'); +-- -------------------------------------------------------- +-- +-- Add APC_USER_BY_OFFICE +-- +INSERT INTO APC_USER_BY_OFFICE(id,id_user,id_office,user_by_office_status,application_owner,created_by) +VALUES +-- Ruben Tepic +('a742dfe8-7d20-11ea-af3e-28f659da398e','5751074e-7d1b-11ea-af3e-28f659da398e','caef3a64-7d1f-11ea-af3e-28f659da398e','ENEBLED','APP_OWNER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Hector Tepic +('d855f570-7dbb-11ea-9b1f-500320958bf8','092a95d8-7db8-11ea-9b1f-500320958bf8','caef3a64-7d1f-11ea-af3e-28f659da398e','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Juan Tepic +('eca3f824-7dbb-11ea-9b1f-500320958bf8','0dc7c246-7db8-11ea-9b1f-500320958bf8','caef3a64-7d1f-11ea-af3e-28f659da398e','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'), +-- Certificador Tepic +('e5a44222-7dbb-11ea-9b1f-500320958bf8','67b3081e-8bc9-11ea-b45c-c7b846343364','caef3a64-7d1f-11ea-af3e-28f659da398e','ENEBLED','APP_USER','0dc7c246-7db8-11ea-9b1f-500320958bf8'); +-- -------------------------------------------------------- +-- +-- Add APC_PERMISSION +-- +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`) +VALUES +('7a6cbba2-7dba-11ea-9b1f-500320958bf8','public.access', 'public.access.description', 'public.access.path', 0, 10,'PUBLIC', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('001055b6-804f-11ea-bd33-54754d23c678','system.employee', 'system.employee.description', 'system.employee.path', 10, 10,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('7f116c66-7dba-11ea-9b1f-500320958bf8','system.user.create', 'system.user.create.description', 'system.user.create.path', 10, 20,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('87d3d32a-7dba-11ea-9b1f-500320958bf8','system.user.admin', 'system.user.admin.description', 'system.user.admin.path', 10, 30,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('8c54a1f4-7dba-11ea-9b1f-500320958bf8','system.user.access', 'system.user.access.description', 'system.user.access.path', 10, 40,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('3697f4e3-6a7d-46df-9618-60c632e3e472','catalog.role', 'catalog.role.description', 'catalog.role.path', 10, 50,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('572bccc2-4848-4dad-b63c-ddf6f29c14f7','catalog.typeLoan', 'catalog.typeLoan.description', 'catalog.typeLoan.path', 10, 60,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('7f139dd9-a1fb-42a4-866c-e70b4d84587a','catalog.route', 'catalog.route.description', 'catalog.route.path', 10, 70,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('58ef9e12-13b3-4a7d-a5ad-fd0db3557d3c','admin.customer', 'admin.customer.description', 'admin.customer.path', 10, 80,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('45f2cd84-98df-4991-be77-3f22dfa7d4b2','admin.endorsement', 'admin.endorsement.description', 'admin.endorsement.path', 10, 90,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('e492bbf5-b25e-4ff2-b126-dc92a733e921','admin.loan', 'admin.loan.description', 'admin.loan.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('fee9d1d9-3961-4dfa-a8e2-56eccae1e347','admin.transfer', 'admin.transfer.description', 'admin.transfer.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('7a8d71b0-1d2b-43ae-b7f7-fd048929ae8e','admin.moneyDaily', 'admin.moneyDaily.description', 'admin.moneyDaily.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('55a79bce-9466-44f8-8a13-7b69f176b80b','admin.closingDay', 'admin.closingDay.description', 'admin.closingDay.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('04d9cf0f-b8e9-46fb-9b77-b301dec9c533','admin.otherExpense', 'admin.otherExpense.description', 'admin.otherExpense.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('f01aeaac-8b18-4eb5-95ae-d02ae5a0716d','admin.goal', 'admin.goal.description', 'admin.goal.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('6c2ec1ce-9163-42b4-bbf1-8448e3894d55','admin.bonus', 'admin.bonus.description', 'admin.bonus.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('9067f64e-b2eb-4361-9c9b-c6dccc29e67f','admin.advance', 'admin.advance.description', 'admin.advance.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'), +('de5d48ac-2242-4937-95e2-1140b987b8c2','system.office', 'system.office.description', 'system.office.path', 10, 110,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'); +-- Permission by role +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`, `parent_name`) +VALUES +-- employee +('dcfafbee-82a1-11ea-a6b6-200fe86028a8','system.employee.add', 'system.employee.add.description', 'system.employee.add.path', 10, 11,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.employee'), +('e2ea92a8-82a1-11ea-a6b6-200fe86028a8','system.employee.enebled', 'system.employee.enebled.description', 'system.employee.enebled.path', 10, 12,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.employee'), +('eb530786-82a1-11ea-a6b6-200fe86028a8','system.employee.disabled', 'system.employee.disabled.description', 'system.employee.disabled.path', 10, 13,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.employee'), +('f2245ed4-82a1-11ea-a6b6-200fe86028a8','system.employee.deleted', 'system.employee.deleted.description', 'system.employee.deleted.path', 10, 14,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.employee'), +('fec3b7a2-82a1-11ea-a6b6-200fe86028a8','system.employee.updated', 'system.employee.updated.description', 'system.employee.updated.path', 10, 15,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.employee'), +-- user create +('065b2432-82a2-11ea-a6b6-200fe86028a8','system.user.create.permission', 'system.user.create.permission.description', 'system.user.create.permission.path', 10, 21,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.create'), +('10d740d0-82a2-11ea-a6b6-200fe86028a8','system.user.admin.enebled', 'system.user.admin.enebled.description', 'system.user.admin.enebled.path', 10, 31,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('36b619fe-82fa-11ea-a6b6-200fe86028a8','system.user.admin.disabled', 'system.user.admin.disabled.description', 'system.user.admin.disabled.path', 10, 32,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('2fcf2806-82fa-11ea-a6b6-200fe86028a8','system.user.admin.deleted', 'system.user.admin.deleted.description', 'system.user.admin.deleted.path', 10, 33,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('282079e8-82fa-11ea-a6b6-200fe86028a8','system.user.admin.updated', 'system.user.admin.updated.description', 'system.user.admin.updated.path', 10, 34,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('176d3744-82fa-11ea-a6b6-200fe86028a8','system.user.admin.pwd', 'system.user.admin.pwd.description', 'system.user.admin.pwd.path', 10, 35,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('1fecd260-82a2-11ea-a6b6-200fe86028a8','system.user.admin.avatar', 'system.user.admin.avatar.description', 'system.user.admin.avatar.path', 10, 36,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +-- office +('c5ef3b18-6cc2-4d62-88ba-41304c6ae9c8','system.office.add', 'system.office.add.description', 'system.office.add.path', 10, 111,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('037ea752-c33f-4bfe-ae84-da867de0d7cd','system.office.updated', 'system.office.updated.description', 'system.office.updated.path', 10, 112,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'), +('65399669-44da-4e17-9217-c6b89c1f0a61','system.office.deleted', 'system.office.deleted.description', 'system.office.deleted.path', 10, 113,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','system.user.admin'); + +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`, `parent_name`) +VALUES +-- role +('96f78612-1e06-47cf-a282-f4f1a14f8e0d','catalog.role.add', 'catalog.role.add.description', 'catalog.role.add.path', 10, 51,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.role'), +('1c8175f5-dcde-4611-b2d7-9b79a68b3f0c','catalog.role.updated', 'catalog.role.updated.description', 'catalog.role.updated.path', 10, 52,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.role'), +('4c11f842-6c29-4d18-a58c-595df41afaa0','catalog.role.deleted', 'catalog.role.deleted.description', 'catalog.role.deleted.path', 10, 53,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.role'), +-- type loan +('29445731-3e36-427b-a14a-ee53b9699582','catalog.typeLoan.add', 'catalog.typeLoan.add.description', 'catalog.typeLoan.add.path', 10, 61,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.typeLoan'), +('39482063-a243-490b-bb78-0c0599bce30e','catalog.typeLoan.updated', 'catalog.typeLoan.updated.description', 'catalog.typeLoan.updated.path', 10, 62,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.typeLoan'), +('c573acd1-cb14-4464-8bbc-b962dbb0bc62','catalog.typeLoan.deleted', 'catalog.typeLoan.deleted.description', 'catalog.typeLoan.deleted.path', 10, 63,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.typeLoan'), +-- route +('ab812966-4df0-4462-a9e2-a2c364cf97f1','catalog.route.add', 'catalog.route.add.description', 'catalog.route.add.path', 10, 71,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.route'), +('886ab08d-9494-4ae4-8635-4a6b4363cdf7','catalog.route.updated', 'catalog.route.updated.description', 'catalog.route.updated.path', 10, 72,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.route'), +('629c0be7-b3a9-49f5-9c20-3f6681a4b6d3','catalog.route.deleted', 'catalog.route.deleted.description', 'catalog.route.deleted.path', 10, 73,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','catalog.route'); + +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`, `parent_name`) +VALUES +-- customer +('65928cb3-f463-4266-9d29-bc29c560c891','admin.customer.add', 'admin.customer.add.description', 'admin.customer.add.path', 10, 81,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.customer'), +('b209327b-f568-4783-8da1-7d45b88fd65b','admin.customer.updated', 'admin.customer.updated.description', 'admin.customer.updated.path', 10, 82,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.customer'), +('6aeb69ff-bb96-4ab9-9d07-8a3b237cfc9e','admin.customer.deleted', 'admin.customer.deleted.description', 'admin.customer.deleted.path', 10, 83,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.customer'), +-- endorsement +('8bee00dc-199f-43c5-8e83-5d670502552b','admin.endorsement.add', 'admin.endorsement.add.description', 'admin.endorsement.add.path', 10, 91,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.endorsement'), +('d16b9b0b-7c4d-456a-a257-ed67586226b0','admin.endorsement.updated', 'admin.endorsement.updated.description', 'admin.endorsement.updated.path', 10, 92,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.endorsement'), +('b57da38c-ba69-4d1e-944f-0dd1f11d816f','admin.endorsement.deleted', 'admin.endorsement.deleted.description', 'admin.endorsement.deleted.path', 10, 93,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.endorsement'), +-- loan +('cca7b7e8-2d41-471b-bb81-c4ca518294dc','admin.loan.add', 'admin.loan.add.description', 'admin.loan.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.loan'), +('55fd99c6-8110-4604-901b-0ed95ca31132','admin.loan.updated', 'admin.loan.updated.description', 'admin.loan.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.loan'), +('1e98037f-1950-417e-be11-39b51203c409','admin.loan.deleted', 'admin.loan.deleted.description', 'admin.loan.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.loan'), +-- transfer +('0d582b8a-2820-4a58-95ca-37484daa8304','admin.transfer.add', 'admin.transfer.add.description', 'admin.transfer.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.transfer'), +('f8bb6db8-acd1-4c5e-845a-ef62f16c7b2d','admin.transfer.updated', 'admin.transfer.updated.description', 'admin.transfer.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.transfer'), +('ae782c52-1e20-40a3-88cf-28f2fb7d7583','admin.transfer.deleted', 'admin.transfer.deleted.description', 'admin.transfer.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.transfer'), +-- money daily +('d14f5077-ecd9-467e-b274-8674e1955667','admin.moneyDaily.add', 'admin.moneyDaily.add.description', 'admin.moneyDaily.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.moneyDaily'), +('a8f492bf-0a8b-4a4e-9d61-0de2b7153334','admin.moneyDaily.updated', 'admin.moneyDaily.updated.description', 'admin.moneyDaily.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.moneyDaily'), +('285860be-92fd-4c7a-bac2-eec1f530d6d9','admin.moneyDaily.deleted', 'admin.moneyDaily.deleted.description', 'admin.moneyDaily.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.moneyDaily'), +-- closing day +('8ab4bea2-3e00-4474-bf94-e01f1ed6b52c','admin.closingDay.add', 'admin.closingDay.add.description', 'admin.closingDay.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.closingDay'), +('89d55a97-8bc4-4430-8e8d-ce8d15851695','admin.closingDay.updated', 'admin.closingDay.updated.description', 'admin.closingDay.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.closingDay'), +('4e8ab1c5-1889-45b3-8550-101f300b2e70','admin.closingDay.deleted', 'admin.closingDay.deleted.description', 'admin.closingDay.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.closingDay'), +-- other expense +('f8b6306b-166d-48b8-8626-0e8a92970c17','admin.otherExpense.add', 'admin.otherExpense.add.description', 'admin.otherExpense.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.otherExpense'), +('2dbc0faa-2cd0-4490-a5af-e6a8eb4eb132','admin.otherExpense.updated', 'admin.otherExpense.updated.description', 'admin.otherExpense.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.otherExpense'), +('aa7c8eca-2117-45a0-b7ce-6d78599b0a66','admin.otherExpense.deleted', 'admin.otherExpense.deleted.description', 'admin.otherExpense.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.otherExpense'), +-- goal +('2e3e6bc1-6baf-4fde-9cc2-c60cd4c1d2f3','admin.goal.add', 'admin.goal.add.description', 'admin.goal.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.goal'), +('6add466f-4a1d-464a-a96c-2aecc67087ab','admin.goal.updated', 'admin.goal.updated.description', 'admin.goal.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.goal'), +('cd3306f9-b713-4995-a8bf-7585e42c2ca0','admin.goal.deleted', 'admin.goal.deleted.description', 'admin.goal.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.goal'), +-- bonus +('71e44e75-91e8-4a55-8d36-d24e2a645f10','admin.bonus.add', 'admin.bonus.add.description', 'admin.bonus.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.bonus'), +('14b6bf11-cc3b-41d9-b589-7c2aebc5dbeb','admin.bonus.updated', 'admin.bonus.updated.description', 'admin.bonus.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.bonus'), +('9f5d7c8d-2115-4114-82a6-5b7329c3efc7','admin.bonus.deleted', 'admin.bonus.deleted.description', 'admin.bonus.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.bonus'), +-- advance +('961193c0-754e-4444-b281-7c62aacb3987','admin.advance.add', 'admin.advance.add.description', 'admin.advance.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.advance'), +('0fa64abd-3e2a-4a42-96cf-1672bdd51086','admin.advance.updated', 'admin.advance.updated.description', 'admin.advance.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.advance'), +('6ee26a46-919b-4400-8837-31762892fa97','admin.advance.deleted', 'admin.advance.deleted.description', 'admin.advance.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.advance'); + +-- Entradas de caja general +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`) +VALUES +('1bd221ee-bfd2-49e1-899a-8456cc05e559','admin.expenseCompanyIn', 'admin.expenseCompanyIn.description', 'admin.expenseCompanyIn.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'); + +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`,`parent_name`) +VALUES +('b855fbbc-e25a-4051-8789-9ec9af62ce3a','admin.expenseCompanyIn.add', 'admin.expenseCompanyIn.add.description', 'admin.expenseCompanyIn.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.expenseCompanyIn'), +('8165c4e7-eb55-4eb7-bb07-98e14234ad8b','admin.expenseCompanyIn.updated', 'admin.expenseCompanyIn.updated.description', 'admin.expenseCompanyIn.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.expenseCompanyIn'), +('292e5385-1368-4b8d-895d-638181e05e0d','admin.expenseCompanyIn.deleted', 'admin.expenseCompanyIn.deleted.description', 'admin.expenseCompanyIn.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.expenseCompanyIn'); + +-- Salidas de caja general +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`) +VALUES +('a5301073-05f2-4d80-bed9-e39e0739ee95','admin.expenseCompanyOut', 'admin.expenseCompanyOut.description', 'admin.expenseCompanyOut.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'); + +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`,`parent_name`) +VALUES +('8d4985e8-c3e1-4534-9ebc-06d2f708398c','admin.expenseCompanyOut.add', 'admin.expenseCompanyOut.add.description', 'admin.expenseCompanyOut.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.expenseCompanyOut'), +('3d812774-98ec-4157-ab62-5a60a69f6ddd','admin.expenseCompanyOut.updated', 'admin.expenseCompanyOut.updated.description', 'admin.expenseCompanyOut.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.expenseCompanyOut'), +('c59fd63d-7658-40e9-82be-c2a75221e200','admin.expenseCompanyOut.deleted', 'admin.expenseCompanyOut.deleted.description', 'admin.expenseCompanyOut.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.expenseCompanyOut'); + +-- Cuadre de caja general +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`) +VALUES +('a18072cb-ff92-4763-977c-c604828ff4c7','admin.stableGeneralBox', 'admin.stableGeneralBox.description', 'admin.stableGeneralBox.path', 10, 100,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8'); + +INSERT INTO `APC_PERMISSION` (`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , `permission_type`, `permission_status`,`created_by`,`parent_name`) +VALUES +('4273bd52-7435-483b-a185-d6686c8fb3e7','admin.stableGeneralBox.add', 'admin.stableGeneralBox.add.description', 'admin.stableGeneralBox.add.path', 10, 101,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.stableGeneralBox'), +('2cceb95d-6d3c-4c67-8c9f-cedc75d4e293','admin.stableGeneralBox.updated', 'admin.stableGeneralBox.updated.description', 'admin.stableGeneralBox.updated.path', 10, 102,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.stableGeneralBox'), +('c46ebab5-904c-4cc1-8c77-49a9fded0fba','admin.stableGeneralBox.deleted', 'admin.stableGeneralBox.deleted.description', 'admin.stableGeneralBox.deleted.path', 10, 103,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.stableGeneralBox'); + +INSERT INTO APC_USER_BY_OFFICE_HAS_PERMISSION (id_user_by_office,id_permission,created_by) +SELECT +-- Ruben Tepic +'a742dfe8-7d20-11ea-af3e-28f659da398e', +id, +'0dc7c246-7db8-11ea-9b1f-500320958bf8' +FROM APC_PERMISSION; + + +INSERT INTO APC_USER_MOBILE_PREFERECE(id,id_user,preference_name,preference_value,created_by,created_on) +VALUES +-- Hector +('235e819e-8bbe-11ea-8c0e-beeb61238d59','092a95d8-7db8-11ea-9b1f-500320958bf8','ORDER_LIST','ALPHABETICALLY','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- Juan +('e914e614-8bd0-11ea-b45c-c7b846343364','0dc7c246-7db8-11ea-9b1f-500320958bf8','ORDER_LIST','ALPHABETICALLY','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- Certificador +('ef48f296-8bd0-11ea-b45c-c7b846343364','67b3081e-8bc9-11ea-b45c-c7b846343364','ORDER_LIST','ALPHABETICALLY','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()); +-- ------------------------- +-- Logica de negocio de los +-- pagos de APC +-- ------------------------- +-- FALTA CREAR RUTA +INSERT INTO APC_ROUTE(id,id_office,route_name,active_status,created_by, created_on) +VALUES +-- Tepic +('51b207a2-8e19-11ea-b65e-4e1376171215','caef3a64-7d1f-11ea-af3e-28f659da398e','Ruta 3 Tepic','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('55baf3ae-8e19-11ea-b65e-4e1376171215','caef3a64-7d1f-11ea-af3e-28f659da398e','Ruta 7 Tepic','ENEBLED','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()); + +INSERT INTO APC_LOAN_TYPE(id,loan_type_name,total_days, loan_fee, payment,payment_daily,payment_total, id_office,created_by, created_on,opening_fee) +VALUES +-- Para tepic +('db833bf0-8e5e-11ea-8ee4-e54bc704beac','Prestamo $1000', 22,50,1000,60,1320,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),20), +('c59e5bee-8dff-11ea-8745-07889553dd5f','Prestamo $2000', 22,50,2000,120,2640,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),40), +('dc255a16-8dff-11ea-8745-07889553dd5f','Prestamo $3000', 22,50,3000,180,3960,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),60), +('e7cc91c2-8dff-11ea-8745-07889553dd5f','Prestamo $4000', 22,50,4000,240,5280,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),80), +('f0cb05ba-8dff-11ea-8745-07889553dd5f','Prestamo $5000', 22,50,5000,300,6600,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),100), +('fdaa4318-8dff-11ea-8745-07889553dd5f','Prestamo $6000', 22,50,6000,360,7920,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),120), + +('32af80cf-5961-4ed9-9bbb-c8c3d17151c0','Prestamo $7000', 22,50,7000,420,9240,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),140), +('a436bf31-8229-4817-b014-3a1c76bffe9d','Prestamo $8000', 22,50,8000,480,10560,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),160), +('f0f2fe2a-a7ec-45e6-80ea-f46a1e689584','Prestamo $9000', 22,50,9000,540,11880,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),180), +('4015d73b-6d05-4f69-a5f3-d446e3870f40','Prestamo $10000', 22,50,10000,600,13200,'caef3a64-7d1f-11ea-af3e-28f659da398e','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW(),200); + +INSERT INTO APC_HUMAN_RESOURCE_HAS_ROUTE(id_human_resource,id_route,created_by,created_on) +VALUES +-- Hector +('c021214a-8bc7-11ea-b45c-c7b846343364','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- Juan +('d2869da6-8bc7-11ea-b45c-c7b846343364','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +-- Certificador +('088d7268-8bc7-11ea-b45c-c7b846343364','51b207a2-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()), +('088d7268-8bc7-11ea-b45c-c7b846343364','55baf3ae-8e19-11ea-b65e-4e1376171215','0dc7c246-7db8-11ea-9b1f-500320958bf8',NOW()); + +COMMIT; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/ace-db/src/create/from/scratch/apc-db-tables.sql b/ace-db/src/create/from/scratch/apc-db-tables.sql new file mode 100644 index 0000000..518bcce --- /dev/null +++ b/ace-db/src/create/from/scratch/apc-db-tables.sql @@ -0,0 +1,1016 @@ +-- -------------------------------------------------------- +-- Arrebol Consuntancy +-- version 1.0.1 +-- http://www.arrebolconsultancy.com +-- -------------------------------------------------------- + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; +-- SET time_zone = "+00:00"; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; + +DROP DATABASE IF EXISTS `apo_pro_com_april_ten`; + +CREATE DATABASE IF NOT EXISTS `apo_pro_com_april_ten` DEFAULT CHARACTER SET latin1 COLLATE latin1_spanish_ci; +USE `apo_pro_com_april_ten`; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_ERROR_APP_LOG` +-- +CREATE TABLE `APC_ERROR_APP_LOG` ( + `id_log` varchar(36) NOT NULL, + `log_entry_date` timestamp NULL DEFAULT NULL, + `log_logger` varchar(100) DEFAULT NULL, + `log_level` varchar(100) DEFAULT NULL, + `log_message` varchar(250) DEFAULT NULL, + `log_exception` varchar(4000) DEFAULT NULL, + PRIMARY KEY (`id_log`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_OFFICE` +-- +CREATE TABLE `APC_OFFICE` ( + `id` char(36) NOT NULL, + `office_name` varchar(100) NOT NULL, + `address` varchar(250) DEFAULT NULL, + `office_status` enum('ENEBLED','DISABLED','DELETED') NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_office_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_office_uk` UNIQUE KEY (`office_name`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_ROLE` +-- +CREATE TABLE `APC_ROLE` ( + `id` char(36) NOT NULL, + `role_name` varchar(100) NOT NULL, + `active_status` enum('ENEBLED','DISABLED') NOT NULL DEFAULT 'ENEBLED', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_role_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_role_uk` UNIQUE KEY (`role_name`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_ROUTE` +-- +CREATE TABLE `APC_ROUTE`( + `id` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `route_name` varchar(25) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_route_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_route_uk` UNIQUE KEY (`id_office`,`route_name`), + CONSTRAINT `apc_route_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_BONUS` +-- +-- Dar de alta los bonos activos. +-- +CREATE TABLE `APC_BONUS`( + `id` char(36) NOT NULL, + `name` varchar(100) NOT NULL, + `loan_bonus` numeric(8,2) NOT NULL, + `mora_bonus` numeric(8,2) NOT NULL, + `new_customer_bonus` numeric(8,2) NOT NULL, + `administrative` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_bono_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_bono_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_HUMAN_RESOURCES` +-- +CREATE TABLE `APC_HUMAN_RESOURCE` ( + `id` char(36) NOT NULL, + `first_name` varchar(25) NOT NULL, + `second_name` varchar(25) DEFAULT NULL, + `last_name` varchar(25) NOT NULL, + `middle_name` varchar(25) NOT NULL, + `birthdate` date DEFAULT NULL, + `avatar` varchar(150) NOT NULL, + `curp` varchar(20) DEFAULT NULL, + `rfc` varchar(13) DEFAULT NULL, + `ife` varchar(20) DEFAULT NULL, + `admission_date` date DEFAULT NULL, + `human_resource_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `id_role` char(36) NOT NULL, + `id_bonus` char(36) DEFAULT NULL, + `payment` numeric(8,2) DEFAULT NULL, + `imss` numeric(8,2) DEFAULT NULL, + `balance` decimal(8,2) NOT NULL, + `employee_saving` DECIMAL(8,2) DEFAULT 0.00, + `created_by` char(36) DEFAULT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `person_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_human_resource_to_apc_role_fk` + FOREIGN KEY (`id_role`) REFERENCES `APC_ROLE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_human_resource_to_apc_bonus_fk` + FOREIGN KEY (`id_bonus`) REFERENCES `APC_BONUS`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_HUMAN_RESOURCE_HAS_ROUTE` +-- +CREATE TABLE `APC_HUMAN_RESOURCE_HAS_ROUTE`( + `id_human_resource` char(36) NOT NULL, + `id_route` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_human_resource_has_route_pk` PRIMARY KEY (`id_human_resource`, `id_route`), + CONSTRAINT `apc_human_resource_has_route_to_apc_human_resource_fk` + FOREIGN KEY (`id_human_resource`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_human_resource_has_route_to_apc_office_fk` + FOREIGN KEY (`id_route`) REFERENCES `APC_ROUTE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_PEOPLE` +-- +CREATE TABLE `APC_PEOPLE`( + `id` char(36) NOT NULL, + `first_name` varchar(25) NOT NULL, + `second_name` varchar(25) DEFAULT NULL, + `last_name` varchar(25) NOT NULL, + `middle_name` varchar(25) NOT NULL, + `birthdate` date DEFAULT NULL, + `thumbnail` varchar(250) NOT NULL, + `phone_home` varchar(15) NOT NULL, + `address_home` varchar(150) NOT NULL, + `phone_business` varchar(15), + `address_business` varchar(150), + `company_name` varchar(150), + `people_type` ENUM('CUSTOMER', 'ENDORSEMENT', 'BOTH') NOT NULL DEFAULT 'CUSTOMER', + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `id_office` char(36) NOT NULL, + `id_route` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_people_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_people_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_people_to_apc_route_fk` + FOREIGN KEY (`id_route`) REFERENCES `APC_ROUTE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_LOAN_TYPE` +-- +CREATE TABLE `APC_LOAN_TYPE`( + `id` char(36) NOT NULL, + `loan_type_name` varchar(50) NOT NULL, + `total_days` smallint NOT NULL DEFAULT 22, + `loan_fee` numeric(8,2) NOT NULL,-- Multa + `opening_fee` int NOT NULL, -- Comisión + `payment` numeric(8,2) NOT NULL,-- Monte del prestamo + `payment_daily` numeric(8,2) NOT NULL,-- 60 x c/1000 + `payment_total` numeric(8,2) NOT NULL, -- Prestamo más intereses + `payment_monday` ENUM('MONDAY'), + `payment_tuesday` ENUM('TUESDAY'), + `payment_wednesday` ENUM('WEDNESDAY'), + `payment_thursday` ENUM('THURSDAY'), + `payment_friday` ENUM('FRIDAY'), + `payment_saturday` ENUM('SATURDAY'), + `payment_sunday` ENUM('SUNDAY'), + `convenio` ENUM('ENEBLED','DISABLED') DEFAULT 'DISABLED' + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_loan_type_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_loan_type_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_LOAN` +-- +CREATE TABLE `APC_LOAN`( + `id` char(36) NOT NULL, + `id_loan_type` char(36) NOT NULL, + `id_customer` char(36) NOT NULL, + `id_endorsement` char(36) NOT NULL, + `id_route` char(36) NOT NULL, + `loan_status` ENUM('PENDING','FINISH','BLACK_LIST','APPROVED','REJECTED','PENDING_RENOVATION','TO_DELIVERY','DELETED') NOT NULL DEFAULT 'PENDING', + `new_customer` ENUM('ENEBLED', 'DISABLED') DEFAULT 'DISABLED', + `amount_paid` numeric(8,2) NOT NULL, + `amount_to_pay` numeric(8,2) NOT NULL, + `last_reference_number` smallint NOT NULL, + `comments` varchar(200), + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36), + `last_updated_on` datetime, + CONSTRAINT `apc_loan_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_loan_to_apc_loan_type_fk` + FOREIGN KEY (`id_loan_type`) REFERENCES `APC_LOAN_TYPE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_to_apc_person_as_customer_fk` + FOREIGN KEY (`id_customer`) REFERENCES `APC_PEOPLE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_to_apc_person_as_endorsement_fk` + FOREIGN KEY (`id_endorsement`) REFERENCES `APC_PEOPLE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_to_apc_route_fk` + FOREIGN KEY (`id_route`) REFERENCES `APC_ROUTE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_HUMAN_RESOURCE_BY_OFFICE` +-- +CREATE TABLE `APC_HUMAN_RESOURCE_BY_OFFICE`( + `id` char(36) NOT NULL, + `id_human_resource` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `application_owner` ENUM('APP_OWNER', 'APP_USER') NOT NULL DEFAULT 'APP_USER', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_human_resource_by_office_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_human_resource_by_office_uk` UNIQUE KEY (`id_human_resource`, `id_office`), + CONSTRAINT `apc_human_resource_by_office_to_apc_human_resource_fk` + FOREIGN KEY (`id_human_resource`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_human_resource_by_office_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_USER` +-- +CREATE TABLE `APC_USER`( + `id` char(36) NOT NULL, + `id_human_resource` char(36) NOT NULL, + `user_name` varchar(100) NOT NULL, + `pwd` varchar(100)NOT NULL, + `user_type` ENUM('WEB', 'MOBILE', 'BOTH') NOT NULL, + `user_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `application_owner` ENUM('APP_OWNER', 'APP_USER') NOT NULL DEFAULT 'APP_USER', + `certifier` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'DISABLED', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_user_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_user_by_office_to_apc_human_resource_fk` + FOREIGN KEY (`id_human_resource`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_LOAN_DETAIL` +-- +CREATE TABLE `APC_LOAN_DETAIL`( + `id` char(36) NOT NULL, + `id_loan` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `people_type` ENUM('CUSTOMER', 'ENDORSEMENT') NOT NULL DEFAULT 'CUSTOMER', + `payment_amount` numeric(8,2) NOT NULL, + `reference_number` smallint NOT NULL, + `loan_details_type` ENUM('CREDIT_PAYMENT','DEBIT_PAYMENT','PAYMENT','FEE','RENOVATION_PAYMENT','TRANSFER') NOT NULL, + `loan_comments` varchar(150), + `fee_status` enum('TO_PAY','PAID') DEFAULT 'TO_PAY', + `transfer_status` enum('AUTHORIZED','PENDING','REJECTED') DEFAULT 'PENDING', + `transfer_number` varchar(100), + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_loan_details_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_loan_details_uk` UNIQUE KEY (`id`,`reference_number`), + CONSTRAINT `apc_loan_details_to_apc_loan_fk` + FOREIGN KEY (`id_loan`) REFERENCES +APC_LOAN`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_details_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_LOAN_FEE_NOTIFICATION` +-- +CREATE TABLE `APC_LOAN_FEE_NOTIFICATION`( + `id` char(36) NOT NULL, + `id_loan` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `notification_number` smallint NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_loan_notification_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_loan_notification_to_apc_loan_fk` + FOREIGN KEY (`id_loan`) REFERENCES `APC_LOAN`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_notification_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_LOAN_BY_USER` +-- +CREATE TABLE `APC_LOAN_BY_USER`( + `id_loan` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `loan_by_user_status` enum('PENDING','FINISH','BLACK_LIST','APPROVED','REJECTED','PENDING_RENOVATION','TO_DELIVERY','DELETED') NOT NULL DEFAULT 'PENDING', + `comments` varchar(150) DEFAULT NULL, + `owner_loan` enum('CURRENT_OWNER','OLD_OWNER') NOT NULL, + `order_in_list` smallint(6) DEFAULT '0', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_loan_by_user_pk` PRIMARY KEY (`id_loan`, `id_user`), + CONSTRAINT `apc_loan_by_user_to_apc_loan_fk` + FOREIGN KEY (`id_loan`) REFERENCES `APC_LOAN`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_by_user_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_LOAN_BY_RENOVATION` +-- +CREATE TABLE `APC_LOAN_BY_RENOVATION`( + `id_loan_old` char(36) NOT NULL, + `id_loan_new` char(36) NOT NULL, + `loan_by_renovation_status` ENUM('PENDING', 'APPROVED','REJECTED') NOT NULL DEFAULT 'PENDING', + `comments` varchar(150), + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_loan_by_renovation_pk` PRIMARY KEY (`id_loan_old`, `id_loan_new`), + CONSTRAINT `apc_loan_by_renovation_old_to_apc_loan_fk` + FOREIGN KEY (`id_loan_old`) REFERENCES `APC_LOAN`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_by_renovation_new_to_apc_user_fk` + FOREIGN KEY (`id_loan_new`) REFERENCES `APC_LOAN`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_USER_BY_OFFICE` +-- +CREATE TABLE `APC_USER_BY_OFFICE`( + `id` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `user_by_office_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `application_owner` ENUM('APP_OWNER', 'APP_USER')NOT NULL DEFAULT 'APP_USER', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_user_by_office_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_user_by_office_uk` UNIQUE KEY (`id_user`, `id_office`), + CONSTRAINT `apc_user_by_office_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_user_by_office_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_PERMISSION` +-- +CREATE TABLE `APC_PERMISSION` ( + `id` char(36) NOT NULL, + `permission` varchar(200) NOT NULL, -- dashboard.policy.to.expire.name + `description` varchar(200) NOT NULL, -- dashboard.policy.to.expire.description + `menu_path` varchar(200) NOT NULL, -- dashboard.policy.to.expire.path + `left_to_right_order` smallint NOT NULL, -- Orden en la que aparece el menu principal (Dashboard, Administración, Catálogo) + `top_to_bottom_order` smallint NOT NULL, -- Orden en la que aparece de arriba hacia abajo + `permission_type` ENUM('PUBLIC', 'PRIVATE', 'EXCLUSIVE') NOT NULL, + `parent_name` varchar(200), + `permission_status` ENUM('ENEBLED', 'DISABLED') NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_permission_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_permission_uk` UNIQUE KEY (`permission`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_USER_BY_OFFICE_HAS_PERMISSION` +-- +CREATE TABLE `APC_USER_BY_OFFICE_HAS_PERMISSION` ( + `id_user_by_office` char(36) NOT NULL, + `id_permission` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_user_by_office_has_permission_pk` PRIMARY KEY (`id_user_by_office`,`id_permission`) , + CONSTRAINT `apc_user_by_office_has_permission_to_apc_user_by_office_fk` + FOREIGN KEY (`id_user_by_office`) REFERENCES `APC_USER_BY_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_user_by_office_has_permission_to_apc_permission_fk` + FOREIGN KEY (`id_permission`) REFERENCES `APC_PERMISSION`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_USER_MOBILE_PREFERECE` +-- +CREATE TABLE `APC_USER_MOBILE_PREFERECE`( + `id` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `preference_name` varchar(25) NOT NULL, + `preference_value` varchar(25) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_user_mobile_preference_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_user_mobile_preference_uk` UNIQUE KEY (`id_user`,`preference_name`), + CONSTRAINT `apc_user_mobile_preference_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_TRANSFER` +-- +CREATE TABLE `APC_TRANSFER`( + `id` char(36) NOT NULL, + `id_user_transmitter` char(36) NOT NULL, + `id_user_receiver` char(36) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `action_status` ENUM('PENDING', 'APPROVED','REJECTED') NOT NULL DEFAULT 'PENDING', + `amount_to_transfer` numeric(8,2) NOT NULL, + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_transfer_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_transfer_user_transmitter_to_apc_user_fk` + FOREIGN KEY (`id_user_transmitter`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_transfer_user_receiver_to_apc_user_fk` + FOREIGN KEY (`id_user_receiver`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_transfer_by_office_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_MONEY_DAILY` +-- +CREATE TABLE `APC_MONEY_DAILY`( + `id` char(36) NOT NULL, + `money_daily_date` datetime DEFAULT CURRENT_TIMESTAMP, + `amount` numeric(8,2) NOT NULL, + `id_user` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_money_daily_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_money_daily_by_id_user_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_money_daily_by_id_office_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de la tabla `APC_DELIVERY` +-- +CREATE TABLE `APC_DELIVERY`( + `id` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `id_loan` char(36) NOT NULL, + `amount` numeric(8,2) NOT NULL, + `comission` comission enum('INCLUDED','EXCLUDED') DEFAULT 'INCLUDED', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_delivery_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_delivery_by_id_user_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_delivery_to_apc_loan_fk` + FOREIGN KEY (`id_loan`) REFERENCES `APC_LOAN`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- ------------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_CLOSING_DAY` +-- +CREATE TABLE `APC_CLOSING_DAY`( + `id` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `amount_paid` numeric(8,2) NOT NULL, + `amount_expected` numeric(8,2) NOT NULL, + `comments` varchar(250), + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_closing_day_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_closing_day_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_closing_day_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- ------------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_OTHER_EXPENSE` +-- +CREATE TABLE `APC_OTHER_EXPENSE`( + `id` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `expense` numeric(8,2) NOT NULL, + `description` varchar(200) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_other_expense_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_other_expense_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_other_expense_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_GOAL` +-- +-- Dar de alta las metas de los trabajadores. +-- +CREATE TABLE `APC_GOAL`( + `id` char(36) NOT NULL, + `start_date` date NOT NULL, + `end_date` date NOT NULL, + `amount` numeric(8,2) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_goal_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_goal_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_ADVANCE` +-- +-- Adelanto de nomina. +-- +CREATE TABLE `APC_ADVANCE`( + `id` char(36) NOT NULL, + `id_human_resource` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `amount` numeric(8,2) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_advance_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_advance_to_apc_human_resource_fk` + FOREIGN KEY (`id_human_resource`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_advance_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la tabla `APC_EXPENSE_COMPANY` +-- +-- Gastos de la compañia. +-- +CREATE TABLE `APC_EXPENSE_COMPANY`( + `id` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `amount` numeric(8,2) NOT NULL, + `description` varchar(200), + `expense_company_type` ENUM('PAYMENT_IN', 'PAYMENT_OUT') NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_expense_company_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_expense_company_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la tabla `APC_STABLE_GENERAL_BOX` +-- +-- Totales de la caja de APC. +-- +CREATE TABLE `APC_STABLE_GENERAL_BOX`( + `id` char(36) NOT NULL, + `total_general_box` decimal(8,2) NOT NULL, + `total_envelope` decimal(8,2) NOT NULL, + `total_bank_note` decimal(8,2) NOT NULL, + `total_coin` decimal(8,2) NOT NULL, + `total_stable` decimal(8,2) NOT NULL, + `active_status` enum('ENEBLED','DISABLED') NOT NULL DEFAULT 'ENEBLED', + `description` varchar(200) DEFAULT NULL, + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_stable_general_box_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_stable_general_box_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la tabla `APC_STABLE_GENERAL_BOX` +-- +-- Totales de la caja de APC. +-- +CREATE TABLE `APC_TOTAL_EXPECTED_PAYMENT_DAILY_BY_USER`( + `id` char(36) NOT NULL, + `total_expected` decimal(8,2) NOT NULL, + `active_status` enum('ENEBLED','DISABLED') NOT NULL DEFAULT 'ENEBLED', + `id_office` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + `total_expected_payment` decimal(8,2) DEFAULT NULL, + CONSTRAINT `apc_total_expected_payment_daily_by_user_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_total_expected_payment_daily_by_user_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_total_expected_payment_daily_by_user_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `ARREBOL_TEST` +-- +-- Solo para pruebas exclusivas. +-- +CREATE TABLE `ARREBOL_TEST`( + `id` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la tabla `APC_PAYROLL` +-- +CREATE TABLE `APC_PAYROLL`( + `id` char(36) NOT NULL, + `active_status` enum('ENEBLED','DISABLED') NOT NULL DEFAULT 'ENEBLED', + `id_office` char(36) NOT NULL, + `id_human_resource` char(36) NOT NULL, + `salary` decimal(8,2) NOT NULL, + `imss` decimal(8,2) NOT NULL, + `advance` decimal(8,2) NOT NULL, + `total_bonus_new_customer` decimal(8,2) NOT NULL, + `total_bonus_colocation` decimal(8,2) NOT NULL, + `total_bonus_mora` decimal(8,2) NOT NULL, + `discounts` decimal(8,2) NOT NULL, + `increases` decimal(8,2) NOT NULL, + `total_payment` decimal(8,2) NOT NULL, + `total_days_salary` smallint(6) NOT NULL DEFAULT '5', + `total_days_bonus` smallint(6) NOT NULL DEFAULT '5', + `comments_discounts` varchar(200) DEFAULT NULL, + `comments_increases` varchar(200) DEFAULT NULL, + `observation` varchar(200) DEFAULT NULL, + `boxed` decimal(8,2) NOT NULL, + `saving` decimal(8,2) NOT NULL, + `payment_to_debt` decimal(8,2) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_payroll_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_payroll_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_payroll_to_apc_human_resource_fk` + FOREIGN KEY (`id_human_resource`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la tabla `APC_CLOSING_DAY_DETAIL` +-- +CREATE TABLE `APC_CLOSING_DAY_DETAIL`( + `id` char(36) NOT NULL, + `id_closing_day` char(36) NOT NULL, + `comments` varchar(200) NOT NULL, + `amount` decimal(8,2) NOT NULL, + `type` varchar(200) NOT NULL, + `dateDetail` datetime DEFAULT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_closing_day_detail_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_closing_day_detail_to_apc_closing_day_fk` + FOREIGN KEY (`id_closing_day`) REFERENCES `APC_CLOSING_DAY`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la tabla `APC_STABLE_SMALL_BOX` +-- +-- Caja chica. +-- +CREATE TABLE `APC_STABLE_SMALL_BOX`( + `id` char(36) NOT NULL, + `total_small_box` numeric(8,2) NOT NULL, + `total_envelope` numeric(8,2) NOT NULL, + `total_bank_note` numeric(8,2) NOT NULL, + `total_coin` numeric(8,2) NOT NULL, + `total_stable` numeric(8,2) NOT NULL, + `active_status` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED', + `description` varchar(200), + `id_office` char(36) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_stable_small_box_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_stable_small_box_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la tabla `APC_BITACORA` +-- +-- Bitacora de APC. +-- +CREATE TABLE `APC_BITACORA`( + `id` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `comments_user` varchar(300) NOT NULL, + `action` varchar(50) NOT NULL, + `description` varchar(300) NOT NULL, + `name_user` varchar(200) NOT NULL, + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_bitacora_pk` PRIMARY KEY (`id`), + CONSTRAINT `apc_bitacora_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la tabla `APC_LOAN_EMPLOYEE` +-- +-- Crear tabla para préstamos de empleados +-- +CREATE TABLE `APC_LOAN_EMPLOYEE` ( + `id` CHAR(36) NOT NULL, + `id_employee` CHAR(36) NOT NULL, + `amount_loan` DECIMAL(8,2), + `amount_to_pay` DECIMAL(8,2), + `balance` DECIMAL(8,2), + `loan_employee_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `total_amount_to_pay` DECIMAL(8,2), + `created_by` CHAR(36) NOT NULL, + `created_on` DATETIME DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` CHAR(36) DEFAULT NULL, + `last_updated_on` DATETIME DEFAULT NULL, + + CONSTRAINT `apc_loan_employee_pk` PRIMARY KEY (id), + CONSTRAINT `apc_loan_to_apc_person_as_employee_fk` + FOREIGN KEY (`id_employee`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +-- +-- Estructura para la tabla `APC_LOAN_EMPLOYEE_DETAIL` +-- +-- Crear tabla para detalles (abonos) +-- +CREATE TABLE `APC_LOAN_EMPLOYEE_DETAIL` ( + `id` char(36) NOT NULL, + `id_loan` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `payment_amount` DECIMAL(8,2), + `reference_number` SMALLINT NOT NULL, + `loan_employee_detail_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `created_by` CHAR(36) NOT NULL, + `created_on` DATETIME DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT `apc_loan_employee_detail_pk` PRIMARY KEY (id), + CONSTRAINT `apc_loan_employee_details_uk` UNIQUE KEY (`id`,`reference_number`), + CONSTRAINT `apc_loan_details_to_apc_loan_employee_fk` + FOREIGN KEY (`id_loan`) REFERENCES `APC_LOAN_EMPLOYEE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_loan_employee_details_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_GASOLINE` +-- +CREATE TABLE `APC_GASOLINE` ( + `id` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `id_office` char(36) NOT NULL, + `id_route` char(36) NOT NULL, + `quantity` DOUBLE DEFAULT 0.0, + `km_old` DOUBLE DEFAULT 0.0, + `km_new` DOUBLE DEFAULT 0.0, + `total` DOUBLE DEFAULT 0.0, + `status` ENUM('ENABLED', 'DISABLED', 'DELETED') NOT NULL, + `description` VARCHAR(500), + `created_by` char(36) NOT NULL, + `created_on` datetime DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` char(36) DEFAULT NULL, + `last_updated_on` datetime DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT `apc_gasoline_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_USER`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_gasoline_to_apc_office_fk` + FOREIGN KEY (`id_office`) REFERENCES `APC_OFFICE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT, + CONSTRAINT `apc_gasoline_to_apc_route_fk` + FOREIGN KEY (`id_route`) REFERENCES `APC_ROUTE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; + +CREATE TABLE `APC_EMPLOYEE_SAVING` ( + `id` char(36) NOT NULL, + -- `id_payroll` char(36) NOT NULL, + `id_user` char(36) NOT NULL, + `employee_saving` DECIMAL(8,2) default 0, + `created_by` CHAR(36) NOT NULL, + `created_on` DATETIME DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` CHAR(36) DEFAULT NULL, + `last_updated_on` DATETIME DEFAULT NULL, + + CONSTRAINT `apc_employee_saving_pk` PRIMARY KEY (id), + -- CONSTRAINT `apc_employee_saving_to_apc_payroll_fk` + -- FOREIGN KEY (`id_payroll`) REFERENCES `APC_PAYROLL`(`id`) + -- ON UPDATE CASCADE + -- ON DELETE RESTRICT, + CONSTRAINT `apc_employee_saving_to_apc_user_fk` + FOREIGN KEY (`id_user`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +)ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- +-- +-- Estructura de tabla para la tabla `APC_VEHICLES` +-- +CREATE TABLE `APC_VEHICLES` ( + `id` CHAR(36) NOT NULL, + `id_driver` CHAR(36) NOT NULL, + `license_plate` VARCHAR(50), + `economic_number` VARCHAR(50), + `serial_number` VARCHAR(50), + `engine_number` VARCHAR(50), + `mileage` DECIMAL(8,2), + `year` INTEGER, + `insurance_name` VARCHAR(150), + `insurance_number` VARCHAR(50), + `coverage_type` VARCHAR(50), + `model` VARCHAR(50), + `colour` VARCHAR(50), + `gps` BIT, + `gps_number` VARCHAR(50), + `comments` varchar(200), + `vehicle_status` ENUM('ENEBLED', 'DISABLED', 'DELETED') NOT NULL, + `created_by` CHAR(36) NOT NULL, + `created_on` DATETIME DEFAULT CURRENT_TIMESTAMP, + `last_updated_by` CHAR(36) DEFAULT NULL, + `last_updated_on` DATETIME DEFAULT NULL, + + CONSTRAINT `apc_vehicles_pk` PRIMARY KEY (id), + CONSTRAINT `apc_vehicles_to_apc_person_as_employee_fk` + FOREIGN KEY (`id_driver`) REFERENCES `APC_HUMAN_RESOURCE`(`id`) + ON UPDATE CASCADE + ON DELETE RESTRICT +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +-- -------------------------------------------------------------------- +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; \ No newline at end of file diff --git a/ace-db/src/create/from/scratch/apc-db-views.sql b/ace-db/src/create/from/scratch/apc-db-views.sql new file mode 100644 index 0000000..0b9ca08 --- /dev/null +++ b/ace-db/src/create/from/scratch/apc-db-views.sql @@ -0,0 +1,3847 @@ +-- -------------------------------------------------------- +-- Arrebol Consuntancy +-- version 1.0.1 +-- http://www.arrebolconsultancy.com +-- -------------------------------------------------------- + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET AUTOCOMMIT = 0; +START TRANSACTION; +-- SET time_zone = "+00:00"; + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8mb4 */; +USE `apo_pro_com_april_ten`; +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_SECURITY_AUTHENTICATION` (USER) +-- +CREATE OR REPLACE VIEW `APC_SECURITY_AUTHENTICATION` AS +SELECT CONCAT(`usr`.`user_name`,`ubo`.`id_office`) AS `user_name`, `usr`.`pwd` AS `pwd` +FROM `APC_USER_BY_OFFICE` `ubo` +INNER JOIN `APC_USER` `usr` ON `ubo`.`id_user` = `usr`.`id` +INNER JOIN `APC_HUMAN_RESOURCE` `hr` ON `usr`.`id_human_resource` = `hr`.`id` +WHERE +`usr`.`user_status` = 'ENEBLED' AND +`usr`.`user_type` IN ('WEB', 'BOTH') AND +`ubo`.`user_by_office_status` = 'ENEBLED' AND +`hr`.`human_resource_status` = 'ENEBLED'; +-- ------------------------------------------------------------ +-- +-- Estructura para la vista `APC_SECURITY_AUTHORIZATION` (ROLE) +-- +CREATE OR REPLACE VIEW `APC_SECURITY_AUTHORIZATION` AS +SELECT CONCAT(`usr`.`user_name`,`ubo`.`id_office`) AS `user_name`, `perm`.`permission` AS `permission` +FROM `APC_PERMISSION` `perm` +INNER JOIN `APC_USER_BY_OFFICE_HAS_PERMISSION` `ubohp` ON `perm`.`id` = `ubohp`.`id_permission` +INNER JOIN `APC_USER_BY_OFFICE` `ubo` ON `ubohp`.`id_user_by_office` = `ubo`.`id` +INNER JOIN `APC_USER` `usr` ON `ubo`.`id_user` = `usr`.`id` +INNER JOIN `APC_HUMAN_RESOURCE` `hr` ON `usr`.`id_human_resource` = `hr`.`id` +WHERE +`perm`.`permission_status` = 'ENEBLED' AND +`ubo`.`user_by_office_status` = 'ENEBLED' AND +`usr`.`user_status` = 'ENEBLED' AND +`usr`.`user_type` IN ('WEB', 'BOTH') AND +`hr`.`human_resource_status` = 'ENEBLED' +ORDER BY `user_name`; +-- ------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_SECURITY_AUTHENTICATION_MOBILE` (USER) +-- +CREATE OR REPLACE VIEW `APC_SECURITY_AUTHENTICATION_MOBILE` AS +SELECT +`usr`.`id` AS `id`, +`usr`.`user_name` AS `user_name`, +`usr`.`pwd` AS `pwd`, +`hr`.`avatar` AS `avatar`, +`ubo`.`id_office` AS `id_office`, +`hrhr`.`id_route` AS `id_route`, +`usr`.`certifier` AS `certifier`, +`usr`.`management` AS `management` +FROM `APC_USER_BY_OFFICE` `ubo` +INNER JOIN `APC_USER` `usr` ON `ubo`.`id_user` = `usr`.`id` +INNER JOIN `APC_HUMAN_RESOURCE` `hr` ON `usr`.`id_human_resource` = `hr`.`id` +INNER JOIN `APC_HUMAN_RESOURCE_HAS_ROUTE` `hrhr` ON `hr`.`id` = `hrhr`.`id_human_resource` +WHERE +`usr`.`user_status` = 'ENEBLED' AND +`usr`.`user_type` IN ('MOBILE', 'BOTH') AND +`ubo`.`user_by_office_status` = 'ENEBLED' AND +`hr`.`human_resource_status` = 'ENEBLED'; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_LOAN_BY_USER_VIEW` (USER) +-- Se utiliza para que un Asesor cargue todos los pretamos que tiene +-- que cobrar en el día actual. +-- +CREATE OR REPLACE VIEW `APC_LOAN_BY_USER_VIEW` AS +SELECT + CONCAT(l.id, u.id) AS id, + u.id AS user_id, + CONCAT( + CASE + WHEN cstmr.first_name IS NOT NULL AND cstmr.first_name != '' + THEN CONCAT(SUBSTR(UPPER(cstmr.first_name), 1, 1),SUBSTR(LOWER(cstmr.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN cstmr.second_name IS NOT NULL AND cstmr.second_name != '' + THEN CONCAT(SUBSTR(UPPER(cstmr.second_name), 1, 1),SUBSTR(LOWER(cstmr.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN cstmr.last_name IS NOT NULL AND cstmr.last_name != '' + THEN CONCAT(SUBSTR(UPPER(cstmr.last_name), 1, 1),SUBSTR(LOWER(cstmr.last_name), 2)) + ELSE '' + END + ) AS customer_name, + cstmr.address_home AS customer_address_home, + cstmr.address_business AS customer_address_business, + cstmr.company_name, + cstmr.thumbnail AS customer_thumbnail, + CONCAT( + CASE + WHEN ndrsmnt.first_name IS NOT NULL AND ndrsmnt.first_name != '' + THEN CONCAT(SUBSTR(UPPER(ndrsmnt.first_name), 1, 1),SUBSTR(LOWER(ndrsmnt.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ndrsmnt.second_name IS NOT NULL AND ndrsmnt.second_name != '' + THEN CONCAT(SUBSTR(UPPER(ndrsmnt.second_name), 1, 1),SUBSTR(LOWER(ndrsmnt.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ndrsmnt.last_name IS NOT NULL AND ndrsmnt.last_name != '' + THEN CONCAT(SUBSTR(UPPER(ndrsmnt.last_name), 1, 1),SUBSTR(LOWER(ndrsmnt.last_name), 2)) + ELSE '' + END + )AS endorsement_name, + ndrsmnt.address_home AS endorsement_address_home, + ndrsmnt.thumbnail AS endorsement_thumbnail, + ndrsmnt.phone_home AS endorsement_phone_home, + IF((l.amount_to_pay - l.amount_paid >= lt.payment_daily), lt.payment_daily, l.amount_to_pay - l.amount_paid) AS payment_daily, + lt.loan_fee, + lbu.order_in_list, + (SELECT count(notification_number) FROM APC_LOAN_FEE_NOTIFICATION WHERE id_loan = l.id) AS notification_number, +IF( + ( + l.amount_paid >= (SELECT FLOOR(lt.payment_total * .6364) FROM DUAL) + ), + CASE + WHEN + (SELECT count(notification_number) as total + FROM APC_LOAN_FEE_NOTIFICATION + WHERE id_loan = l.id + ) < 4 + THEN 'ENEBLED' + WHEN + (SELECT count(notification_number) as total + FROM APC_LOAN_FEE_NOTIFICATION + WHERE id_loan = l.id + ) BETWEEN 4 AND 5 + AND + lt.payment > 1000 + THEN 'ENEBLED' + ELSE 'DISABLED' + END + ,'DISABLED' +) as renovation, +(SELECT amount_to_pay - amount_paid FROM APC_LOAN WHERE id = l.id) AS max_amount_to_pay +FROM APC_LOAN_BY_USER lbu +INNER JOIN APC_LOAN l ON lbu.id_loan = l.id +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE cstmr ON l.id_customer = cstmr.id +INNER JOIN APC_PEOPLE ndrsmnt ON l.id_endorsement = ndrsmnt.id +INNER JOIN APC_USER u ON lbu.id_user = u.id +WHERE + l.loan_status = 'APPROVED' AND + l.id = ( + CASE + -- WHEN IS NEW AND update created_on less equals to currentdate + WHEN ( + (SELECT count(id) FROM APC_LOAN_DETAIL WHERE id_loan = l.id ) = 0 AND + DATE(l.last_updated_on) < curdate() + ) THEN l.id + -- WHEN LOAN HAS PAYMENTS + WHEN ( + ( + SELECT count(id) + FROM APC_LOAN_DETAIL + WHERE + id_loan = l.id AND + reference_number = l.last_reference_number AND + DATE(created_on) < curdate() + ) > 0 AND + DATE(l.last_updated_on) < curdate() + ) THEN l.id + ELSE '' + END + ) AND + lbu.owner_loan = 'CURRENT_OWNER' AND + CASE + WHEN LOWER(DAYNAME(CURDATE())) = 'monday' + THEN ('monday' = lt.payment_monday) + WHEN LOWER(DAYNAME(CURDATE())) = 'tuesday' + THEN ('tuesday' = LOWER(lt.payment_tuesday)) + WHEN LOWER(DAYNAME(CURDATE())) = 'wednesday' + THEN ('wednesday' = LOWER(lt.payment_wednesday)) + WHEN LOWER(DAYNAME(CURDATE())) = 'thursday' + THEN ('thursday' =LOWER(lt.payment_thursday)) + WHEN LOWER(DAYNAME(CURDATE())) = 'friday' + THEN ('friday' = LOWER(lt.payment_friday)) + WHEN LOWER(DAYNAME(CURDATE())) = 'saturday' + THEN ('saturday' = LOWER(lt.payment_saturday)) + WHEN LOWER(DAYNAME(CURDATE())) = 'sunday' + THEN ('sunday' = LOWER(lt.payment_sunday)) + ELSE FALSE + END; +-- ------------------------------------------------------------- +-- COPY PRODUCTION 2022/JULY/16 +-- Estructura para la vista `APC_LOAN_BY_USER_VIEW` +-- LATEST VERSION WITH NO MARGING +-- IT WAS TAKEN FROM PRODUCTION +CREATE OR REPLACE VIEW `APC_LOAN_BY_USER_VIEW` AS +select concat(`l`.`id`,`u`.`id`) AS `id`, + `u`.`id` AS `user_id`, + concat((case when ((`cstmr`.`first_name` is not null) and (`cstmr`.`first_name` <> '')) then concat(substr(upper(`cstmr`.`first_name`),1,1),substr(lower(`cstmr`.`first_name`),2),' ') else '' end),(case when ((`cstmr`.`second_name` is not null) and (`cstmr`.`second_name` <> '')) then concat(substr(upper(`cstmr`.`second_name`),1,1),substr(lower(`cstmr`.`second_name`),2),' ') else '' end),(case when ((`cstmr`.`last_name` is not null) and (`cstmr`.`last_name` <> '')) then concat(substr(upper(`cstmr`.`last_name`),1,1),substr(lower(`cstmr`.`last_name`),2)) else '' end)) AS `customer_name`, + (case when (`cstmr`.`address_home` is null) then '' else `cstmr`.`address_home` end) AS `customer_address_home`, + (case when (`cstmr`.`address_business` is null) then '' else `cstmr`.`address_business` end) AS `customer_address_business`, + (case when (`cstmr`.`company_name` is null) then '' else `cstmr`.`company_name` end) AS `company_name`, + (case when (`cstmr`.`thumbnail` is null) then '' else `cstmr`.`thumbnail` end) AS `customer_thumbnail`, + concat((case when ((`ndrsmnt`.`first_name` is not null) and (`ndrsmnt`.`first_name` <> '')) then concat(substr(upper(`ndrsmnt`.`first_name`),1,1),substr(lower(`ndrsmnt`.`first_name`),2),' ') else '' end),(case when ((`ndrsmnt`.`second_name` is not null) and (`ndrsmnt`.`second_name` <> '')) then concat(substr(upper(`ndrsmnt`.`second_name`),1,1),substr(lower(`ndrsmnt`.`second_name`),2),' ') else '' end),(case when ((`ndrsmnt`.`last_name` is not null) and (`ndrsmnt`.`last_name` <> '')) then concat(substr(upper(`ndrsmnt`.`last_name`),1,1),substr(lower(`ndrsmnt`.`last_name`),2)) else '' end)) AS `endorsement_name`, + (case when (`ndrsmnt`.`address_home` is null) then '' else `ndrsmnt`.`address_home` end) AS `endorsement_address_home`,(case when (`ndrsmnt`.`thumbnail` is null) then '' else `ndrsmnt`.`thumbnail` end) AS `endorsement_thumbnail`, + (case when (`ndrsmnt`.`phone_home` is null) then '' else `ndrsmnt`.`phone_home` end) AS `endorsement_phone_home`, + if(((`l`.`amount_to_pay` - `l`.`amount_paid`) >= `lt`.`payment_daily`),`lt`.`payment_daily`,(`l`.`amount_to_pay` - `l`.`amount_paid`)) AS `payment_daily`, + `lt`.`loan_fee` AS `loan_fee`,`lbu`.`order_in_list` AS `order_in_list`, + (select count(`APC_LOAN_FEE_NOTIFICATION`.`notification_number`) from `APC_LOAN_FEE_NOTIFICATION` where (`APC_LOAN_FEE_NOTIFICATION`.`id_loan` = `l`.`id`)) AS `notification_number`, + if((`l`.`amount_paid` >= (select floor((`lt`.`payment_total` * 0.6364)))),(case when ((select count(`APC_LOAN_FEE_NOTIFICATION`.`notification_number`) AS `total` from `APC_LOAN_FEE_NOTIFICATION` where (`APC_LOAN_FEE_NOTIFICATION`.`id_loan` = `l`.`id`)) < 4) then 'ENEBLED' when (((select count(`APC_LOAN_FEE_NOTIFICATION`.`notification_number`) AS `total` from `APC_LOAN_FEE_NOTIFICATION` where (`APC_LOAN_FEE_NOTIFICATION`.`id_loan` = `l`.`id`)) between 4 and 5) and (`lt`.`payment` > 1000)) then 'ENEBLED' else 'DISABLED' end),'DISABLED') AS `renovation`, + (select (`APC_LOAN`.`amount_to_pay` - `APC_LOAN`.`amount_paid`) from `APC_LOAN` where (`APC_LOAN`.`id` = `l`.`id`)) AS `max_amount_to_pay`, + `cstmr`.`phone_home` AS `customer_phone_home` +from (((((`APC_LOAN_BY_USER` `lbu` join `APC_LOAN` `l` on((`lbu`.`id_loan` = `l`.`id`))) join `APC_LOAN_TYPE` `lt` on((`l`.`id_loan_type` = `lt`.`id`))) join `APC_PEOPLE` `cstmr` on((`l`.`id_customer` = `cstmr`.`id`))) join `APC_PEOPLE` `ndrsmnt` on((`l`.`id_endorsement` = `ndrsmnt`.`id`))) join `APC_USER` `u` on((`lbu`.`id_user` = `u`.`id`))) where ((`l`.`frozen` = 'DISABLED') and (`l`.`loan_status` = 'APPROVED') and (`l`.`id` = (case when (((select count(`APC_LOAN_DETAIL`.`id`) from `APC_LOAN_DETAIL` where (`APC_LOAN_DETAIL`.`id_loan` = `l`.`id`)) = 0) and (cast(`l`.`last_updated_on` as date) < curdate())) then `l`.`id` when (((select count(`APC_LOAN_DETAIL`.`id`) from `APC_LOAN_DETAIL` where ((`APC_LOAN_DETAIL`.`id_loan` = `l`.`id`) and (`APC_LOAN_DETAIL`.`reference_number` = `l`.`last_reference_number`) and (cast(`APC_LOAN_DETAIL`.`created_on` as date) < curdate()))) > 0) and (cast(`l`.`last_updated_on` as date) < curdate())) then `l`.`id` else '' end)) and (`lbu`.`owner_loan` = 'CURRENT_OWNER') + ); +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_LOAN_BY_USER_ORDER_PREFERENCE_VIEW` (USER) +-- Se utiliza para que un Asesor cargue todos los pretamos que tiene +-- que cobrar en el día actual y los pueda order por order de preferencia +-- para que pueda programar suta a su gusto. +-- +CREATE OR REPLACE VIEW `APC_LOAN_BY_USER_ORDER_PREFERENCE_VIEW` AS +SELECT + CONCAT(l.id, u.id) AS id, + u.id AS user_id, + CONCAT(cstmr.first_name,' ',IF(ISNULL(cstmr.second_name) ,'', CONCAT(cstmr.second_name, ' ')),cstmr.last_name,' ', cstmr.middle_name) AS customer_name, + cstmr.address_home AS customer_address_home, + cstmr.address_business AS customer_address_business, + lbu.order_in_list +FROM APC_LOAN_BY_USER lbu +INNER JOIN APC_LOAN l ON lbu.id_loan = l.id +INNER JOIN APC_PEOPLE cstmr ON l.id_customer = cstmr.id +INNER JOIN APC_USER u ON lbu.id_user = u.id +WHERE l.loan_status = 'APPROVED'; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_PERSON_SEARCH_VIEW` +-- Se utiliza para realizar busqueda por nombre. +-- +CREATE OR REPLACE VIEW `APC_PERSON_SEARCH_VIEW` AS +SELECT + id, + CONCAT( + CASE + WHEN first_name IS NOT NULL AND first_name != '' + THEN CONCAT(SUBSTR(UPPER(first_name), 1, 1),SUBSTR(LOWER(first_name), 2)) + ELSE '' + END, + CASE + WHEN second_name IS NOT NULL AND second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(second_name), 1, 1),SUBSTR(LOWER(second_name), 2)) + ELSE '' + END, + CASE + WHEN last_name IS NOT NULL AND last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(last_name), 1, 1),SUBSTR(LOWER(last_name), 2)) + ELSE '' + END, + CASE + WHEN middle_name IS NOT NULL AND middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(middle_name), 1, 1),SUBSTR(LOWER(middle_name), 2)) + ELSE '' + END + ) AS person_search +FROM APC_PEOPLE +WHERE active_status = 'ENEBLED' +ORDER BY person_search; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_PERSON_SEARCH_DETAIL_VIEW` +-- Busca los detalles de una persona en el sistema. +CREATE OR REPLACE VIEW `APC_PERSON_SEARCH_DETAIL_VIEW` AS +SELECT + p.id AS id, + CONCAT( + CASE + WHEN p.first_name IS NOT NULL AND p.first_name != '' + THEN CONCAT(SUBSTR(UPPER(p.first_name), 1, 1),SUBSTR(LOWER(p.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN p.second_name IS NOT NULL AND p.second_name != '' + THEN CONCAT(SUBSTR(UPPER(p.second_name), 1, 1),SUBSTR(LOWER(p.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN p.last_name IS NOT NULL AND p.last_name != '' + THEN CONCAT(SUBSTR(UPPER(p.last_name), 1, 1),SUBSTR(LOWER(p.last_name), 2), ' ') + ELSE '' + END, + CASE + WHEN p.middle_name IS NOT NULL AND p.middle_name != '' + THEN CONCAT(SUBSTR(UPPER(p.middle_name), 1, 1),SUBSTR(LOWER(p.middle_name), 2)) + ELSE '' + END + ) AS person_search, + p.thumbnail, + CASE + WHEN + 0 < ( + SELECT COUNT(ID) + FROM APC_LOAN + WHERE + id_customer = p.id AND + loan_status = 'APPROVED') + THEN + 'ENEBLED' + WHEN + 0 < ( + SELECT COUNT(ID) + FROM APC_LOAN + WHERE + id_endorsement = p.id AND + loan_status = 'APPROVED') + THEN + 'ENEBLED' + ELSE + 'DISABLED' + END AS loanStatus +FROM APC_PEOPLE p; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_PERSON_SEARCH_HISTORICAL_DETAILS_VIEW` +-- Busca los detalles historicos de una persona en el sistema móvil. +CREATE OR REPLACE VIEW `APC_PERSON_SEARCH_HISTORICAL_DETAILS_VIEW` AS +SELECT + l.id, + p.id AS id_person_search, + DATE_FORMAT(l.created_on,'%d-%m-%Y') AS format_date, + CASE + WHEN 0 < (SELECT COUNT(ID) FROM APC_LOAN WHERE id_customer = p.id AND id = l.id) + THEN 'Cliente' + WHEN 0 < (SELECT COUNT(ID) FROM APC_LOAN WHERE id_endorsement = p.id AND id = l.id) + THEN 'Aval' + ELSE + 'Indeterminado' + END AS person_type, + CASE + WHEN 0 < (SELECT COUNT(ID) FROM APC_LOAN WHERE id_customer = p.id AND id = l.id) + THEN + (SELECT CONCAT(in_p.first_name,' ', in_p.last_name) + FROM APC_LOAN in_l + INNER JOIN APC_PEOPLE in_p ON in_l.id_endorsement = in_p.id + WHERE in_l.id = l.id) + WHEN 0 < (SELECT COUNT(ID) FROM APC_LOAN WHERE id_endorsement = p.id AND id = l.id) + THEN (SELECT CONCAT(in_p.first_name,' ', in_p.last_name) + FROM APC_LOAN in_l + INNER JOIN APC_PEOPLE in_p ON in_l.id_customer = in_p.id + WHERE in_l.id = l.id) + ELSE + 'Indeterminado' + END AS relationship, + lt.payment AS loan, + CASE + WHEN l.loan_status = 'APPROVED' + THEN CONCAT(l.last_reference_number, ' de 22') + ELSE '' + END AS payment_number, + CASE + WHEN l.loan_status = 'APPROVED' + THEN (l.amount_to_pay - l.amount_paid) + ELSE 0 + END AS amount_to_pay, + (SELECT COUNT(id) FROM APC_LOAN_FEE_NOTIFICATION WHERE id_loan = l.id) AS total_fees, + CASE + WHEN l.loan_status = 'PENDING' + THEN 'Pendiente' + WHEN l.loan_status = 'FINISH' + THEN 'Terminado' + WHEN l.loan_status = 'BLACK_LIST' + THEN 'Lista negra' + WHEN l.loan_status = 'APPROVED' + THEN 'Activo' + WHEN l.loan_status = 'REJECTED' + THEN 'Rechazado' + WHEN l.loan_status = 'PENDING_RENOVATION' + THEN 'Pendiente renovación' + WHEN l.loan_status = 'TO_DELIVERY' + THEN 'Por recibir' + END AS loan_status +FROM APC_LOAN l +INNER JOIN APC_PEOPLE p ON (l.id_customer = p.id or l.id_endorsement = p.id) +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +ORDER BY l.created_on DESC; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_AVAILABLE_CUSTOMERS_VIEW` +-- +-- Sirve para cargar todos los posibles clientes de una oficina +-- que puedan solicitar un prestamo nuevo. +-- +CREATE OR REPLACE VIEW `APC_AVAILABLE_CUSTOMERS_VIEW` AS +SELECT + p.id, + CONCAT(p.first_name,' ', IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name,' ')) ,p.last_name, ' ', p.middle_name) AS available_person, + CASE + WHEN p.people_type = 'BOTH' + THEN + CASE + WHEN 0 < (SELECT COUNT(id) FROM APC_LOAN WHERE id_customer = p.id) + THEN (SELECT id_endorsement FROM APC_LOAN WHERE id_customer = p.id ORDER BY created_on DESC LIMIT 1 ) + ELSE '' + END + ELSE '' + END as cross_signature +FROM APC_PEOPLE p +WHERE + p.people_type IN ('CUSTOMER', 'BOTH') AND + p.active_status = 'ENEBLED' AND + CASE + WHEN 0 = ( + SELECT COUNT(id) + FROM APC_LOAN + WHERE + id_customer = p.id AND + loan_status IN ('PENDING', 'BLACK_LIST', 'APPROVED', 'PENDING_RENOVATION', 'TO_DELIVERY') + ) + THEN TRUE + ELSE FALSE + END +ORDER BY available_person; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_AVAILABLE_ENDORSEMENT_VIEW` +-- +-- Sirve para cargar todos los posibles avales de una oficina +-- que puedan solicitar un prestamo nuevo. +-- +CREATE OR REPLACE VIEW `APC_AVAILABLE_ENDORSEMENTS_VIEW` AS +SELECT + p.id, + CONCAT(p.first_name,' ', IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name,' ')) ,p.last_name, ' ', p.middle_name) AS available_person, + CASE + WHEN p.people_type = 'BOTH' + THEN + CASE + WHEN 0 < (SELECT COUNT(id) FROM APC_LOAN WHERE id_endorsement = p.id) + THEN (SELECT id_customer FROM APC_LOAN WHERE id_endorsement = p.id ORDER BY created_on DESC LIMIT 1 ) + ELSE '' + END + ELSE '' + END as cross_signature +FROM APC_PEOPLE p +WHERE + p.people_type IN ('ENDORSEMENT', 'BOTH') AND + p.active_status = 'ENEBLED' AND + CASE + WHEN 0 = ( + SELECT COUNT(id) + FROM APC_LOAN + WHERE + id_endorsement = p.id AND + loan_status IN ('PENDING', 'BLACK_LIST', 'APPROVED', 'PENDING_RENOVATION', 'TO_DELIVERY') + ) + THEN TRUE + ELSE FALSE + END +ORDER BY available_person; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_CASH_REGISTER_CURDATE_BY_USER_VIEW` +-- +-- Sirve para obtener todos los pagos que recabo un asesor en el día. +-- +CREATE OR REPLACE VIEW `APC_CASH_REGISTER_CURDATE_BY_USER_VIEW` AS +SELECT + UUID() AS id, + lt.payment_amount AS payment, + CONCAT(p.first_name, ' ', p.last_name) AS customer_name, + lt.id_user AS id_user +FROM APC_LOAN_DETAIL lt +INNER JOIN APC_LOAN l ON lt.id_loan = l.id +INNER JOIN APC_PEOPLE p ON l.id_customer = p.id +WHERE + lt.loan_details_type = 'PAYMENT' AND + DATE(lt.created_on) = CURDATE() +ORDER BY lt.created_on; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_LOAN_TO_DELIVERY_BY_CERTIFIER_VIEW` +-- +-- Sirve para obtener todos los prestamos que un certificador tiene que entregar. +-- cambio no subido pero proximo a deployar, se espera autorizacion. +-- +CREATE OR REPLACE VIEW `APC_LOAN_TO_DELIVERY_BY_CERTIFIER_VIEW` AS +SELECT + l.id AS id_loan, + CASE + WHEN (SELECT COUNT(id_loan_new) FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id) = 1 + THEN (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id) + ELSE 'N/A' + END AS id_old_loan, + u.id AS id_user, + -- u.user_name, + -- hrhr.id_route, + -- l.loan_status, + CONCAT( + CASE + WHEN p.first_name IS NOT NULL + THEN CONCAT(SUBSTR(UPPER(p.first_name), 1, 1),SUBSTR(LOWER(p.first_name), 2)) + ELSE '' + END, + CASE + WHEN p.second_name IS NOT NULL + THEN CONCAT(' ',SUBSTR(UPPER(p.second_name), 1, 1),SUBSTR(LOWER(p.second_name), 2)) + ELSE '' + END, + CASE + WHEN p.last_name IS NOT NULL + THEN CONCAT(' ',SUBSTR(UPPER(p.last_name), 1, 1),SUBSTR(LOWER(p.last_name), 2)) + ELSE '' + END + ) AS customer_name, + CASE + WHEN p.address_business IS NOT NULL + THEN CONCAT(SUBSTR(UPPER(p.address_business), 1, 1),SUBSTR(LOWER(p.address_business), 2)) + ELSE '' + END AS customer_address, + p.thumbnail AS thumbnail, + CASE + WHEN (SELECT COUNT(id_loan_new) FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id) > 0 + THEN 'star' + ELSE 'new' + END AS icon, + CASE + WHEN (SELECT COUNT(id_loan_new) FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id) > 0 + THEN + CASE + WHEN -- El monto del prestamo origen es almenos $1 mayor que el doble del pago diario + (SELECT (innerL.amount_to_pay - innerL.amount_paid) - (innerLT.payment_daily * 2) FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) > 0 + THEN + lt.payment - + (lt.opening_fee + + (SELECT (innerL.amount_to_pay - innerL.amount_paid) - (innerLT.payment_daily * 2) FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id))) + ELSE lt.payment - lt.opening_fee -- Es igual o menor al doble del pago diario, no se aplica descuento. + END + ELSE lt.payment - lt.opening_fee -- Es solo prestamo nuevo, no es renovacion + END AS amount_to_delivery, + CASE + WHEN (SELECT COUNT(id_loan_new) FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id) > 0 + THEN + CASE + WHEN -- (SELECT amount_to_pay - amount_paid FROM APC_LOAN WHERE id = l.id) > (lt.payment_daily * 2) + (SELECT innerL.amount_to_pay - innerL.amount_paid FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) + > + (SELECT innerLT.payment_daily FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) + THEN -- ((l.amount_to_pay - l.amount_paid) - (lt.payment_daily * 2)) + CASE + WHEN + (SELECT (innerL.amount_to_pay - innerL.amount_paid) - (innerLT.payment_daily * 2) FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) + > 0 + THEN + (SELECT (innerL.amount_to_pay - innerL.amount_paid) - (innerLT.payment_daily * 2) FROM APC_LOAN innerL + INNER JOIN APC_LOAN_TYPE innerLT ON innerL.id_loan_type = innerLT.id + WHERE innerL.id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) + ELSE + 0 + END + ELSE 0 + END + ELSE 0 + END AS discount, + lt.opening_fee AS opening, + lt.payment AS payment, + CASE + WHEN (SELECT COUNT(id_loan_new) FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id) = 1 + THEN (SELECT amount_to_pay - amount_paid FROM APC_LOAN WHERE id = (SELECT id_loan_old FROM APC_LOAN_BY_RENOVATION WHERE id_loan_new = l.id)) + ELSE 0.0 + END AS 'total_last_loan' +FROM + APC_USER u + INNER JOIN APC_HUMAN_RESOURCE_HAS_ROUTE hrhr ON u.id_human_resource = hrhr.id_human_resource + INNER JOIN APC_HUMAN_RESOURCE hr ON hrhr.id_human_resource = hr.id + INNER JOIN APC_ROLE r ON hr.id_role = r.id + INNER JOIN APC_LOAN l ON hrhr.id_route = l.id_route + INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id + INNER JOIN APC_PEOPLE p ON l.id_customer = p.id +WHERE + u.certifier = 'ENEBLED' AND + l.loan_status = 'TO_DELIVERY' AND + DATE(l.created_on) <= CURDATE() +ORDER BY customer_name DESC; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_EXCHANGE_ENEBLED_USERS_VIEW` +-- +-- Sirve para obtener todos los usuarios disponibles para realizar traspasos. +-- +CREATE OR REPLACE VIEW `APC_EXCHANGE_ENEBLED_USERS_VIEW` AS +SELECT +u.id AS id_user, +CONCAT(hr.first_name, ' ', IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name,' ')), hr.second_name, ' ', hr.last_name) AS user_name, +hrbo.id_office AS id_office +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON u.id_human_resource = hr.id +INNER JOIN APC_HUMAN_RESOURCE_BY_OFFICE hrbo ON hr.id = hrbo.id_human_resource +WHERE u.user_status = 'ENEBLED' and +u.user_type IN ('MOBILE','BOTH'); +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_TOTAL_CASH_BY_CURDATE_VIEW` +-- +-- Sirve para obtener lo que tiene que entregar el asesor al final del día. +-- +CREATE OR REPLACE VIEW `APC_TOTAL_CASH_BY_CURDATE_VIEW` AS +SELECT + u.id, + ubo.id_office, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(ld.payment_amount)),0, SUM(ld.payment_amount)) + FROM APC_LOAN_DETAIL ld + WHERE + ld.id_user = u.id AND + ld.loan_details_type = 'PAYMENT' AND + DATE(ld.created_on) = CURDATE() + ) + ,0.0 + )AS total_amount_payment, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(ld.payment_amount)),0, SUM(ld.payment_amount)) + FROM APC_LOAN_DETAIL ld + WHERE + ld.id_user = u.id AND + ld.loan_details_type = 'TRANSFER' AND + DATE(ld.created_on) = CURDATE() + ) + ,0.0 + )AS total_amount_deposit, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(amount_to_transfer)),0, SUM(amount_to_transfer)) + FROM APC_TRANSFER + WHERE + id_user_transmitter = u.id AND + action_status = 'APPROVED' AND + active_status = 'ENEBLED' AND + DATE(last_updated_on) = CURDATE() + ) + ,0.0 + ) AS transfer_sender, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(amount_to_transfer)),0, SUM(amount_to_transfer)) + FROM APC_TRANSFER + WHERE + id_user_receiver = u.id AND + action_status = 'APPROVED' AND + active_status = 'ENEBLED' AND + DATE(last_updated_on) = CURDATE() + ) + ,0.0 + ) AS transfer_receiver, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(amount)),0, SUM(amount)) + FROM APC_MONEY_DAILY + WHERE + id_user = u.id AND + DATE(money_daily_date) = CURDATE() + ) + ,0.0 + ) AS money_daily, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(expense)),0, SUM(expense)) + FROM APC_OTHER_EXPENSE + WHERE + id_user = u.id AND + DATE(created_on) = CURDATE() + ) + ,0.0 + )AS other_expense, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(amount)),0, SUM(amount)) + FROM APC_DELIVERY + WHERE + id_user = u.id AND + DATE(created_on) = CURDATE() + ) + , 0.0 + ) as delivery, + IF( + (SELECT COUNT(id) FROM APC_CLOSING_DAY WHERE id_user = u.id AND id_office = ubo.id_office AND active_status = 'ENEBLED' AND DATE(created_on) = CURDATE()) = 0 + ,(SELECT IF(ISNULL(SUM(amount_to_transfer)),0, SUM(amount_to_transfer)) + FROM APC_TRANSFER + WHERE + id_user_receiver = u.id AND + action_status = 'PENDING' AND + active_status = 'ENEBLED' AND + DATE(created_on) = CURDATE() + ) + ,0.0 + ) AS transfer_pending +FROM APC_USER u +JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE + u.user_status = 'ENEBLED'; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_TOTAL_LOANS_BY_OFFICE` +-- +-- +CREATE OR REPLACE VIEW `APC_TOTAL_LOANS_BY_OFFICE` AS +SELECT + l.id, + l.loan_status, + r.id_office, + r.route_name, + l.id_route, + l.amount_to_pay, + l.amount_paid + FROM + APC_LOAN l + JOIN + APC_ROUTE r ON r.id = l.id_route + WHERE + l.loan_status in ('PENDING', 'FINISH', 'APPROVED','REJECTED','TO_DELIVERY') + AND r.active_status = 'ENEBLED'; +-- -------------------------------------------------------------------- +-- Estructura para la vista `APC_TOTAL_CLOSING_DAY_BY_CURDATE_VIEW` +-- +-- Sirve para obtener lo que tiene que entregar el asesor al final del día. +-- +CREATE OR REPLACE VIEW `APC_TOTAL_CLOSING_DAY_BY_CURDATE_VIEW` AS +SELECT + u.id, + u.id_office, + u.amount_paid +FROM APC_CLOSING_DAY u +WHERE + u.active_status = 'ENEBLED' AND + DATE(u.created_on) = CURDATE(); +-- -------------------------------------------------------------------- +-- Estructura para la vista `APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW` +-- +-- Sirve para obtener los detalles del total de los cobros realizados por los asesores +-- estos pueden ser tanto pagos como multas. +-- +CREATE OR REPLACE VIEW `APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW` AS +SELECT + ld.id, + CONCAT(p.first_name,' ',IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name, ' ')),p.last_name,' ', p.middle_name) AS comments, + ld.payment_amount as amount, + CASE + WHEN ld.loan_details_type = 'PAYMENT' THEN 'Abono' + WHEN ld.loan_details_type = 'FEE' THEN 'Multa' + WHEN ld.loan_details_type = 'TRANSFER' THEN 'Depósito' + ELSE '' END as type, + ld.id_user, + ld.created_on, + l.created_on as fechaFiltro, + 'xxxx' as route, + (l.amount_to_pay - amount_paid) as saldo +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON ld.id_loan = l.id +INNER JOIN APC_PEOPLE p ON l.id_customer = p.id +WHERE DATE(ld.created_on) = CURDATE() +AND ld.loan_details_type in ('PAYMENT', 'FEE', 'TRANSFER' ) +UNION +SELECT + md.id, + DATE(md.money_daily_date) AS comments, + md.amount as amount, + 'Inicio' as type, + md.id_user, + md.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo +FROM + APC_MONEY_DAILY md +WHERE DATE(md.money_daily_date) = CURDATE() +UNION +SELECT + oe.id, + oe.description, + oe.expense, + 'Gasto', + oe.id_user, + oe.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo +FROM + APC_OTHER_EXPENSE oe +WHERE DATE(oe.created_on) = CURDATE() +UNION +SELECT + te.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name), + te.amount_to_transfer, + 'Transferencia enviada', + te.id_user_transmitter, + te.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo +FROM + APC_TRANSFER te +JOIN + APC_USER u on u.id = te.id_user_receiver +JOIN + APC_HUMAN_RESOURCE hr on hr.id = u.id_human_resource +WHERE DATE(te.created_on) = CURDATE() +UNION +SELECT + tr.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name), + tr.amount_to_transfer, + 'Transferencia recibida', + tr.id_user_receiver, + tr.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo +FROM + APC_TRANSFER tr +JOIN + APC_USER u on u.id = tr.id_user_transmitter +JOIN + APC_HUMAN_RESOURCE hr on hr.id = u.id_human_resource +WHERE DATE(tr.created_on) = CURDATE() +UNION +SELECT + d.id, + CONCAT(p.first_name,' ',IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name, ' ')),p.last_name,' ', p.middle_name, ' - ', + r.route_name , ', Abono préstamo anterior : ', Case WHEN (SELECT CASE WHEN ld.payment_amount is null or 0 THEN 0 ELSE ld.payment_amount END FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l3 ON ld.id_loan = l3.id +WHERE ld.loan_details_type = 'RENOVATION_PAYMENT' +AND l3.id = (SELECT albr.id_loan_old FROM APC_LOAN_BY_RENOVATION albr WHERE albr.id_loan_new = l.id)) is null then 0 else (SELECT CASE WHEN ld.payment_amount is null or 0 THEN 0 ELSE ld.payment_amount END FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l3 ON ld.id_loan = l3.id +WHERE ld.loan_details_type = 'RENOVATION_PAYMENT' +AND l3.id = (SELECT albr.id_loan_old FROM APC_LOAN_BY_RENOVATION albr WHERE albr.id_loan_new = l.id)) end , ', Comisión por apertura: ', lt.opening_fee), + d.amount, + 'Entrega de préstamo', + d.id_user, + d.created_on, + CURDATE() as fechaFiltro, + r.route_name as route, + CASE WHEN (SELECT (l2.amount_to_pay - l2.amount_paid) FROM APC_LOAN_BY_RENOVATION lr + INNER JOIN APC_LOAN l2 ON l2.id = lr.id_loan_old + WHERE lr.id_loan_new = l.id) is null THEN 0 ELSE + (SELECT (l2.amount_to_pay - l2.amount_paid) FROM APC_LOAN_BY_RENOVATION lr + INNER JOIN APC_LOAN l2 ON l2.id = lr.id_loan_old + WHERE lr.id_loan_new = l.id) END as saldo +FROM APC_DELIVERY d +INNER JOIN APC_LOAN l ON d.id_loan = l.id +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE p ON l.id_customer = p.id +INNER JOIN APC_ROUTE r ON r.id = l.id_route +WHERE DATE(d.created_on) = CURDATE(); +-- -------------------------------------------------------------------- +-- Estructura para la vista `APC_LOAN_APPROVED_DETAIL_VIEW` +-- +-- Sirve para obtener los detalles del total de los prestamos que estan +-- en estatus de APROBADO. +-- +CREATE OR REPLACE VIEW `APC_LOAN_APPROVED_DETAIL_VIEW` AS +SELECT + l.id, + l.amount_to_pay - l.amount_paid AS total_to_pay, + l.amount_to_pay - (l.amount_paid + (SELECT IF(ISNULL(SUM(payment_amount)),0,SUM(payment_amount)) FROM APC_LOAN_DETAIL WHERE id_loan = l.id AND loan_details_type = 'FEE')) AS loan_amount_to_pay, + ( + SELECT + IF(ISNULL(SUM(payment_amount)),0,SUM(payment_amount)) + FROM APC_LOAN_DETAIL + WHERE + id_loan = l.id AND + loan_details_type = 'FEE' + )AS total_fee +FROM APC_LOAN l +WHERE l.loan_status = 'APPROVED'; +-- -------------------------------------------------------------------- +-- Estructura para la vista `APC_GENERAL_BOX_VIEW` +-- +CREATE OR REPLACE VIEW `APC_GENERAL_BOX_VIEW` AS +SELECT + md.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS comments, + Date(md.money_daily_date) as fecha, + md.amount as amount, + md.id_office as office, + 'Inicio' as type +FROM APC_MONEY_DAILY md +JOIN + APC_USER u on u.id = md.id_user +JOIN + APC_HUMAN_RESOURCE hr on hr.id = u.id_human_resource +UNION +SELECT + cd.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS comments, + Date(cd.created_on), + cd.amount_paid, + cd.id_office, + 'Corte del día' +FROM APC_CLOSING_DAY cd +JOIN + APC_USER u on u.id = cd.id_user +JOIN + APC_HUMAN_RESOURCE hr on hr.id = u.id_human_resource +WHERE cd.active_status = 'ENEBLED' +UNION +SELECT + ecin.id, + ecin.description, + date(ecin.created_on), + ecin.amount, + ecin.id_office, + 'Entrada' +FROM APC_EXPENSE_COMPANY as ecin +WHERE ecin.expense_company_type = 'PAYMENT_IN' +AND ecin.active_status = 'ENEBLED' +UNION +SELECT + ecin.id, + ecin.description, + date(ecin.created_on), + ecin.amount, + ecin.id_office, + 'Salida' +FROM APC_EXPENSE_COMPANY as ecin +WHERE ecin.expense_company_type = 'PAYMENT_OUT' +AND ecin.active_status = 'ENEBLED' +UNION +SELECT + a.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS comments, + date(a.created_on), + a.amount, + a.id_office, + 'Adelanto' +FROM + APC_ADVANCE a +JOIN + APC_HUMAN_RESOURCE hr on hr.id = a.id_human_resource +WHERE + a.active_status = 'ENEBLED' +UNION +SELECT + pay.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS comments, + date(pay.created_on), + pay.total_payment, + pay.id_office, + 'Nomina' +FROM + APC_PAYROLL pay +JOIN + APC_HUMAN_RESOURCE hr on hr.id = pay.id_human_resource +WHERE + pay.active_status = 'ENEBLED' +UNION +SELECT + l.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name) AS comments, + date(l.created_on), + l.amount_loan, + 'caef3a64-7d1f-11ea-af3e-28f659da398e' as office, + 'Préstamo Empleado' as type +FROM + APC_LOAN_EMPLOYEE l +JOIN + APC_HUMAN_RESOURCE hr on hr.id = l.id_employee +WHERE + l.loan_employee_status = 'ENEBLED'; + +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_LOAN_BY_USER_PAYMENT_ZERO_VIEW` +-- +-- Total de abonos en ceros por dia. +-- +CREATE OR REPLACE VIEW `APC_LOAN_BY_USER_PAYMENT_ZERO_VIEW` AS +SELECT + ald.id, + ald.id_user, + al.id_customer, + ald.loan_comments +FROM APC_LOAN_DETAIL ald +INNER JOIN APC_LOAN al ON ald.id_loan = al.id +WHERE + DATE(ald.created_on) = CURDATE() + AND ald.payment_amount = 0 + AND al.loan_status != 'DELETED' + AND ald.loan_details_type = 'PAYMENT'; +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_INFORMATION_LOAN_WEEK_VIEW` +-- +CREATE OR REPLACE VIEW `APC_INFORMATION_LOAN_WEEK_VIEW` AS +SELECT +l.id, +u.id as id_user, +r.id_office, +l.created_on as fecha, +lt.payment as apoyos, +lt.payment_total as apoyos_total, +lt.opening_fee as comision_apertura, +CONCAT(endor.first_name,' ', IF(ISNULL(endor.second_name) ,'', CONCAT(endor.second_name,' ')) ,endor.last_name, ' ', endor.middle_name) AS aval, +CONCAT(cus.first_name,' ', IF(ISNULL(cus.second_name) ,'', CONCAT(cus.second_name,' ')) ,cus.last_name, ' ', cus.middle_name) AS customer, +l.amount_to_pay as documento_por, +lt.payment_daily as abono_diario, +l.amount_paid, +(l.amount_to_pay - l.amount_paid) saldo_insoluto, +r.route_name, +CONCAT(hr.first_name,' ', IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name,' ')) ,hr.last_name, ' ', hr.middle_name) AS asesor, +(SELECT COUNT(lfn.id) FROM APC_LOAN_FEE_NOTIFICATION lfn WHERE lfn.id_loan = l.id) as num_fee, +-- Lunes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_monday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_monday, +-- Martes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_tuesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_tuesday, +-- Miercoles +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) +AND YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_wednesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_wednesday, +-- Jueves +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_thursday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_thursday, +-- Viernes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_friday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_friday, +-- Sabado +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_saturday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_saturday, + +((lt.payment_daily * (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5 , COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) +- (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) as faltante, + +CASE WHEN l.new_customer = 'ENEBLED' AND WEEK(DATE(l.created_on),1) = WEEK(CURDATE(),1) THEN 'Si' ELSE 'No' END as new_customer, +if((SELECT COUNT(id_loan_old) FROM APC_LOAN_BY_RENOVATION lbr +INNER JOIN APC_LOAN lRenovation ON lbr.id_loan_new = lRenovation.id +WHERE id_loan_old = l.id + AND loan_by_renovation_status = 'APPROVED' and WEEK(DATE(lRenovation.created_on),1) <= WEEK(CURDATE(),1) AND + YEAR(DATE(lRenovation.created_on)) = YEAR(CURDATE())) = 0 , 'No' , 'Si') as renovation, +l.loan_status as estatus_prestamo, +(SELECT COUNT(DISTINCT(DATE(ldFaltante.created_on))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) <= (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_all, +(SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_week, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) <= (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('FEE')) as fee_todos +FROM +APC_LOAN l +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE cus ON cus.id = l.id_customer +INNER JOIN APC_PEOPLE endor ON endor.id = l.id_endorsement +INNER JOIN APC_ROUTE r ON r.id = l.id_route +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +INNER JOIN APC_USER u ON u.id = lbu.id_user +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +WHERE +l.loan_status not in ('DELETED','REJECTED') AND +((SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) > 0 OR + ((SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) = 0 AND l.loan_status = 'APPROVED' AND + WEEK(DATE(l.created_on),1) <= (WEEK(CURDATE(),1)))); +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_CUSTOMERS_WITHOUT_RENOVATION_VIEW` +-- +CREATE OR REPLACE VIEW `APC_CUSTOMERS_WITHOUT_RENOVATION_VIEW` AS +SELECT + p.id as id, + CONCAT(p.first_name,' ', IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name,' ')) ,p.last_name, ' ', p.middle_name) AS available_person, + ar.route_name, + (SELECT MAX(l.created_on) FROM APC_LOAN l WHERE l.id_customer = p.id) as last_loan, + p.id_office AS office, +FROM APC_PEOPLE p +INNER JOIN APC_ROUTE ar ON ar.id = p.id_route +WHERE + p.people_type IN ('CUSTOMER', 'BOTH') AND + p.active_status = 'ENEBLED' AND + (SELECT COUNT(l.id) FROM APC_LOAN l WHERE l.id_customer = p.id) > 0 AND + CASE + WHEN 0 = ( + SELECT COUNT(id) + FROM APC_LOAN + WHERE + id_customer = p.id AND + loan_status IN ('PENDING', 'BLACK_LIST', 'APPROVED', 'PENDING_RENOVATION', 'TO_DELIVERY') + ) + THEN TRUE + ELSE FALSE + END +ORDER BY available_person; +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_ADVANCE_USER_DAILY_DETAIL_VIEW` +-- +CREATE OR REPLACE VIEW `APC_ADVANCE_USER_DAILY_DETAIL_VIEW` AS +SELECT +ald.id, +ald.id_user, +CONCAT(ap.first_name, ' ', ap.last_name) AS customer_name, +ald.payment_amount, +ald.created_on, +ap.address_business, +CASE + WHEN ald.loan_details_type = 'PAYMENT' THEN 'Abono' + WHEN ald.loan_details_type = 'FEE' THEN 'Multa' + WHEN ald.loan_details_type = 'TRANSFER' THEN 'Depósito' + ELSE '' END as type_ayment +FROM APC_LOAN_DETAIL ald +INNER JOIN APC_LOAN al ON al.id = ald.id_loan +INNER JOIN APC_PEOPLE ap ON ap.id = al.id_customer +WHERE DATE(ald.created_on) = CURDATE() AND +al.loan_status != 'DELETED' AND +ald.loan_details_type IN ('PAYMENT','FEE','TRANSFER') +UNION +SELECT +id, +user_id, +customer_name, +'Sin visita', +CURDATE(), +customer_address_business, +'Sin visita' +FROM APC_LOAN_BY_USER_VIEW; +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_TOTAL_LOANS_APPROVED_BY_OFFICE` +-- +CREATE OR REPLACE VIEW `APC_TOTAL_LOANS_APPROVED_BY_OFFICE` AS +SELECT + l.id, + l.loan_status, + r.id_office, + r.payment_daily + FROM + APC_LOAN l + JOIN + APC_LOAN_TYPE r ON r.id = l.id_loan_type + WHERE + l.loan_status in ('APPROVED'); +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_TOTAL_CASH_BY_CURDATE_DASHBOARD_VIEW` +-- +CREATE OR REPLACE VIEW `APC_TOTAL_CASH_BY_CURDATE_DASHBOARD_VIEW` AS +SELECT + u.id, + ubo.id_office, + (SELECT IF(ISNULL(SUM(ld.payment_amount)),0, SUM(ld.payment_amount)) + FROM APC_LOAN_DETAIL ld + WHERE + ld.id_user = u.id AND + ld.loan_details_type = 'PAYMENT' AND + DATE(ld.created_on) = CURDATE() + + )AS total_amount_payment, + (SELECT IF(ISNULL(SUM(ld.payment_amount)),0, SUM(ld.payment_amount)) + FROM APC_LOAN_DETAIL ld + WHERE + ld.id_user = u.id AND + ld.loan_details_type = 'TRANSFER' AND + DATE(ld.created_on) = CURDATE() + + )AS total_amount_deposit, + (SELECT IF(ISNULL(SUM(amount_to_transfer)),0, SUM(amount_to_transfer)) + FROM APC_TRANSFER + WHERE + id_user_transmitter = u.id AND + action_status = 'APPROVED' AND + active_status = 'ENEBLED' AND + DATE(last_updated_on) = CURDATE() + )AS transfer_sender, + (SELECT IF(ISNULL(SUM(amount_to_transfer)),0, SUM(amount_to_transfer)) + FROM APC_TRANSFER + WHERE + id_user_receiver = u.id AND + action_status = 'APPROVED' AND + active_status = 'ENEBLED' AND + DATE(last_updated_on) = CURDATE() + ) AS transfer_receiver, + (SELECT IF(ISNULL(SUM(amount)),0, SUM(amount)) + FROM APC_MONEY_DAILY + WHERE + id_user = u.id AND + DATE(money_daily_date) = CURDATE() + ) AS money_daily, + (SELECT IF(ISNULL(SUM(expense)),0, SUM(expense)) + FROM APC_OTHER_EXPENSE + WHERE + id_user = u.id AND + DATE(created_on) = CURDATE() + ) AS other_expense, + (SELECT IF(ISNULL(SUM(amount)),0, SUM(amount)) + FROM APC_DELIVERY + WHERE + id_user = u.id AND + DATE(created_on) = CURDATE() + ) as delivery, + (SELECT IF(ISNULL(SUM(amount_to_transfer)),0, SUM(amount_to_transfer)) + FROM APC_TRANSFER + WHERE + id_user_receiver = u.id AND + action_status = 'PENDING' AND + active_status = 'ENEBLED' AND + DATE(created_on) = CURDATE() + ) AS transfer_pending +FROM APC_USER u +JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE + u.user_status = 'ENEBLED'; +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_MONEY_DAILY_BY_USER_CERTIFIER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_MONEY_DAILY_BY_USER_CERTIFIER_VIEW` AS +SELECT + u.id, + u.user_name, + uo.id_office, + CONCAT(hr.first_name, ' ' , hr.last_name) as employee, + (SELECT SUM(ldc.amount_to_delivery) FROM APC_LOAN_TO_DELIVERY_BY_CERTIFIER_VIEW ldc + WHERE ldc.id_user = u.id) as amount +FROM + APC_USER u +INNER JOIN + APC_USER_BY_OFFICE uo ON u.id = uo.id_user +INNER JOIN + APC_HUMAN_RESOURCE hr ON u.id_human_resource = hr.id +WHERE + u.user_status = 'ENEBLED' +AND + u.certifier = 'ENEBLED'; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_USER_BY_ROUTE_VIEW` +-- +-- Se utiliza para identificar a los usuarios por rutas. +-- +CREATE OR REPLACE VIEW `APC_USER_BY_ROUTE_VIEW` AS +SELECT +CONCAT(u.id,hrhr.id_route) AS id, +u.id AS id_user, +hrhr.id_route AS id_route, + CONCAT( + CASE + WHEN hr.first_name IS NOT NULL AND hr.first_name != '' + THEN CONCAT(SUBSTR(UPPER(hr.first_name), 1, 1),SUBSTR(LOWER(hr.first_name), 2)) + ELSE '' + END, + CASE + WHEN hr.second_name IS NOT NULL AND hr.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(hr.second_name), 1, 1),SUBSTR(LOWER(hr.second_name), 2)) + ELSE '' + END, + CASE + WHEN hr.last_name IS NOT NULL AND hr.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(hr.last_name), 1, 1),SUBSTR(LOWER(hr.last_name), 2)) + ELSE '' + END, + CASE + WHEN hr.middle_name IS NOT NULL AND hr.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(hr.middle_name), 1, 1),SUBSTR(LOWER(hr.middle_name), 2)) + ELSE '' + END + ) AS employee_name +FROM APC_HUMAN_RESOURCE_HAS_ROUTE hrhr +INNER JOIN APC_HUMAN_RESOURCE hr ON hrhr.id_human_resource = hr.id +INNER JOIN APC_USER u ON hr.id = u.id_human_resource +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE','BOTH') +ORDER BY employee_name; +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_LOAN_DIFERENCES_BY_USER_LAST_WEEK_VIEW` +-- +CREATE OR REPLACE VIEW `APC_LOAN_DIFERENCES_BY_USER_LAST_WEEK_VIEW` AS +SELECT +l.id, +lbu.id_user, +((lt.payment_daily * 5) - (SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +WHERE ld.id_loan = l.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) +AND YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) + as faltante +FROM + APC_LOAN l +INNER JOIN + APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN + APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE +l.loan_status not in ('DELETED','REJECTED') AND +(SELECT COUNT(ld2.id) FROM APC_LOAN_DETAIL ld2 WHERE WEEK(DATE(ld2.created_on),1) = (WEEK(CURDATE(),1)-1) +AND YEAR(DATE(ld2.created_on)) = YEAR(CURDATE()) AND ld2.id_loan = l.id) > 4; +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_INFORMATION_LOAN_LAST_WEEK_VIEW` +-- +CREATE OR REPLACE VIEW `APC_INFORMATION_LOAN_LAST_WEEK_VIEW` AS +SELECT +l.id, +u.id as id_user, +r.id_office, +l.created_on as fecha, +lt.payment as apoyos, +lt.payment_total as apoyos_total, +lt.opening_fee as comision_apertura, +CONCAT(endor.first_name,' ', IF(ISNULL(endor.second_name) ,'', CONCAT(endor.second_name,' ')) ,endor.last_name, ' ', endor.middle_name) AS aval, +CONCAT(cus.first_name,' ', IF(ISNULL(cus.second_name) ,'', CONCAT(cus.second_name,' ')) ,cus.last_name, ' ', cus.middle_name) AS customer, +l.amount_to_pay as documento_por, +lt.payment_daily as abono_diario, +l.amount_paid, +(l.amount_to_pay - l.amount_paid) saldo_insoluto, +r.route_name, +CONCAT(hr.first_name,' ', IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name,' ')) ,hr.last_name, ' ', hr.middle_name) AS asesor, +(SELECT COUNT(lfn.id) FROM APC_LOAN_FEE_NOTIFICATION lfn WHERE lfn.id_loan = l.id) as num_fee, +-- Lunes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_monday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_monday, +-- Martes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_tuesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_tuesday, +-- Miercoles +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_wednesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_wednesday, +-- Jueves +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_thursday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_thursday, +-- Viernes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_friday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_friday, +-- Sabado +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_saturday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_saturday, + +((lt.payment_daily * (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) +- (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) as faltante, + +CASE WHEN l.new_customer = 'ENEBLED' AND WEEK(DATE(l.created_on),1) = (WEEK(CURDATE(),1) - 1) THEN 'Si' ELSE 'No' END as new_customer, +(SELECT IF(COUNT(id_loan_old) = 0 , 'No' , 'Si') FROM APC_LOAN_BY_RENOVATION lbr +INNER JOIN APC_LOAN lRenovation ON lbr.id_loan_new = lRenovation.id +WHERE id_loan_old = l.id + AND loan_by_renovation_status = 'APPROVED' and WEEK(DATE(lRenovation.created_on),1) <= (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(lRenovation.created_on)) = YEAR(CURDATE())) as renovation, +l.loan_status as estatus_prestamo, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as abono_semana_actual, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('FEE')) as fee_semana_actual, +(SELECT COUNT(DISTINCT(DATE(ldFaltante.created_on))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) <= (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_all, +(SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_week, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) <= (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('FEE')) as fee_todos +FROM +APC_LOAN l +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE cus ON cus.id = l.id_customer +INNER JOIN APC_PEOPLE endor ON endor.id = l.id_endorsement +INNER JOIN APC_ROUTE r ON r.id = l.id_route +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +INNER JOIN APC_USER u ON u.id = lbu.id_user +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +WHERE +l.loan_status not in ('DELETED','REJECTED') AND +((SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) > 0 OR + ((SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) = 0 AND l.loan_status = 'APPROVED' AND + WEEK(DATE(l.created_on),1) <= (WEEK(CURDATE(),1) - 1))); +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_COLOCATION_WEEK_BY_USER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_COLOCATION_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'monday') + as colocation_monday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'tuesday') + as colocation_tuesday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'wednesday') + as colocation_wednesday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'thursday') + as colocation_thursday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'friday') + as colocation_friday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'saturday') + as colocation_saturday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE())) + as colocation_total +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource AND hr.human_resource_status = 'ENEBLED' +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE'); +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_COLOCATION_LAST_WEEK_BY_USER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_COLOCATION_LAST_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'monday') + as colocation_monday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'tuesday') + as colocation_tuesday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'wednesday') + as colocation_wednesday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'thursday') + as colocation_thursday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'friday') + as colocation_friday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'saturday') + as colocation_saturday, +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE())) + as colocation_total +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource AND hr.human_resource_status = 'ENEBLED' +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE'); +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_SUBTOTAL_LAST_WEEK_BY_USER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_SUBTOTAL_LAST_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_monday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'monday') + as opening_fee_monday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_tuesday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'tuesday') + as opening_fee_tuesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_wednesday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'wednesday') + as opening_fee_wednesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_thursday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'thursday') + as opening_fee_thursday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_friday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'friday') + as opening_fee_friday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_saturday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'saturday') + as opening_fee_saturday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_total, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) ) + as opening_fee_total, +( + select + IF(ISNULL( + SUM( + CASE WHEN l.loan_status IN ('PENDING_RENOVATION', 'FINISH') then 0 ELSE + ((lt.payment_daily * (SELECT COUNT(ldFaltante.id) FROM APC_LOAN_DETAIL ldFaltante + WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) + AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) + - (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) + FROM APC_LOAN_DETAIL ldLunes + WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) + AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) END + ) + ),0, + SUM( + CASE WHEN l.loan_status IN ('PENDING_RENOVATION', 'FINISH') then 0 ELSE + ((lt.payment_daily * (SELECT COUNT(ldFaltante.id) FROM APC_LOAN_DETAIL ldFaltante + WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) + AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) + - (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) + FROM APC_LOAN_DETAIL ldLunes + WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) + AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) END + ) + ) + as faltante + + FROM + APC_LOAN l + INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id + INNER JOIN APC_LOAN_BY_USER albu ON l.id = albu.id_loan + WHERE albu.id_user = u.id + AND albu.owner_loan = 'CURRENT_OWNER' + +) +as faltante +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource AND hr.human_resource_status = 'ENEBLED' +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_SUBTOTAL_WEEK_BY_USER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_SUBTOTAL_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_monday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'monday') + as opening_fee_monday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_tuesday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'tuesday') + as opening_fee_tuesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_wednesday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'wednesday') + as opening_fee_wednesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_thursday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'thursday') + as opening_fee_thursday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_friday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'friday') + as opening_fee_friday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_saturday, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) + AND LOWER(DAYNAME(DATE(al.created_on))) = 'saturday') + as opening_fee_saturday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_total, +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND albu.id_user = u.id + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) ) + as opening_fee_total +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource AND hr.human_resource_status = 'ENEBLED' +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_CURRENT_CUSTOMER_BY_LOAN_VIEW` +-- SIRVE PARA TRAER LOS PRESTAMOS CON SUS CLIENTES, AVALES Y ASESORES. +-- +-- -------------------------------------------------------------------- +CREATE OR REPLACE VIEW `APC_CURRENT_CUSTOMER_BY_LOAN_VIEW` AS +SELECT +loan.id AS id_loan, +usr.id AS id_user, +usr_by_office.id_office AS id_office, +loan_type.payment AS payment, +CONCAT( + CASE + WHEN customer.first_name IS NOT NULL AND customer.first_name != '' + THEN CONCAT(SUBSTR(UPPER(customer.first_name), 1, 1),SUBSTR(LOWER(customer.first_name), 2)) + ELSE '' + END, + CASE + WHEN customer.second_name IS NOT NULL AND customer.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(customer.second_name), 1, 1),SUBSTR(LOWER(customer.second_name), 2)) + ELSE '' + END, + CASE + WHEN customer.last_name IS NOT NULL AND customer.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(customer.last_name), 1, 1),SUBSTR(LOWER(customer.last_name), 2)) + ELSE '' + END, + CASE + WHEN customer.middle_name IS NOT NULL AND customer.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(customer.middle_name), 1, 1),SUBSTR(LOWER(customer.middle_name), 2)) + ELSE '' + END + ) AS customer_name, + CONCAT( + CASE + WHEN endorsement.first_name IS NOT NULL AND endorsement.first_name != '' + THEN CONCAT(SUBSTR(UPPER(endorsement.first_name), 1, 1),SUBSTR(LOWER(endorsement.first_name), 2)) + ELSE '' + END, + CASE + WHEN endorsement.second_name IS NOT NULL AND endorsement.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(endorsement.second_name), 1, 1),SUBSTR(LOWER(endorsement.second_name), 2)) + ELSE '' + END, + CASE + WHEN endorsement.last_name IS NOT NULL AND endorsement.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(endorsement.last_name), 1, 1),SUBSTR(LOWER(endorsement.last_name), 2)) + ELSE '' + END, + CASE + WHEN endorsement.middle_name IS NOT NULL AND endorsement.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(endorsement.middle_name), 1, 1),SUBSTR(LOWER(endorsement.middle_name), 2)) + ELSE '' + END + ) AS endorsement_name, + loan.loan_status AS loan_status, + loan.created_on AS created_on, + route.route_name AS route_name +FROM APC_LOAN loan +INNER JOIN APC_PEOPLE customer ON loan.id_customer = customer.id +INNER JOIN APC_PEOPLE endorsement ON loan.id_endorsement = endorsement.id +INNER JOIN APC_LOAN_TYPE loan_type ON loan.id_loan_type = loan_type.id +INNER JOIN APC_LOAN_BY_USER loan_by_user ON loan.id = loan_by_user.id_loan +INNER JOIN APC_USER usr ON loan_by_user.id_user = usr.id +INNER JOIN APC_USER_BY_OFFICE usr_by_office ON usr.id = usr_by_office.id_user +INNER JOIN APC_ROUTE route ON loan.id_route = route.id +WHERE loan.loan_status IN('APPROVED','PENDING','PENDING_RENOVATION','TO_DELIVERY') +ORDER BY usr.id, loan.created_on; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_AVAILABLES_OWNERS_VIEW` +-- REGRESA LOS USUARIOS ACTIVOS DE TIPO MOBILE AND BOTH. +-- +-- -------------------------------------------------------------------- +CREATE OR REPLACE VIEW `APC_AVAILABLES_OWNERS_VIEW` AS +SELECT +usr.id AS id_user, +usr_by_office.id_office AS id_office, +usr.user_name AS user_name, +CONCAT( + CASE + WHEN human_resource.first_name IS NOT NULL AND human_resource.first_name != '' + THEN CONCAT(SUBSTR(UPPER(human_resource.first_name), 1, 1),SUBSTR(LOWER(human_resource.first_name), 2)) + ELSE '' + END, + CASE + WHEN human_resource.second_name IS NOT NULL AND human_resource.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(human_resource.second_name), 1, 1),SUBSTR(LOWER(human_resource.second_name), 2)) + ELSE '' + END, + CASE + WHEN human_resource.last_name IS NOT NULL AND human_resource.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(human_resource.last_name), 1, 1),SUBSTR(LOWER(human_resource.last_name), 2)) + ELSE '' + END, + CASE + WHEN human_resource.middle_name IS NOT NULL AND human_resource.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(human_resource.middle_name), 1, 1),SUBSTR(LOWER(human_resource.middle_name), 2)) + ELSE '' + END + ) AS full_name +FROM APC_USER usr +INNER JOIN APC_HUMAN_RESOURCE human_resource ON usr.id_human_resource = human_resource.id +INNER JOIN APC_USER_BY_OFFICE usr_by_office ON usr.id = usr_by_office.id_user +WHERE usr.user_status = 'ENEBLED' AND +usr.user_type IN ('MOBILE','BOTH') AND +usr.certifier = 'DISABLED'; +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_COBRANZA_LAST_WEEK_BY_USER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_COBRANZA_LAST_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' AND ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_monday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_tuesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_wednesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_thursday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_friday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_saturday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_total +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource AND hr.human_resource_status = 'ENEBLED' +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_COBRANZA_WEEK_BY_USER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_COBRANZA_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' AND ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_monday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_tuesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_wednesday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_thursday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_friday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday' +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_saturday, +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' and ld.id_user = u.id +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_total +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource AND hr.human_resource_status = 'ENEBLED' +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; +-- ---------------------------------------------------------------- +-- +-- Estructura para la vista `APC_ADVANCE_USER_DAILY_DASHBOARD_VIEW` +-- +CREATE OR REPLACE VIEW `APC_ADVANCE_USER_DAILY_DASHBOARD_VIEW` AS +SELECT + ate.id, + CONCAT(ahr.first_name, ' ' , ahr.last_name) as user_name, + ate.total_expected, + (ate.total_expected - (SELECT COUNT(id) FROM APC_LOAN_BY_USER_VIEW where user_id = ate.id_user)) as total_now, + CASE WHEN (ate.total_expected - (SELECT COUNT(id) FROM APC_LOAN_BY_USER_VIEW where user_id = ate.id_user)) = 0 + THEN 0 + ELSE + ((ate.total_expected - (SELECT COUNT(id) FROM APC_LOAN_BY_USER_VIEW where user_id = ate.id_user)) * 100) / ate.total_expected + END + as porcentaje, + ate.id_office, + ate.id_user, + (SELECT IF(ISNULL(SUM(ate2.total_expected_payment)),0,SUM(ate2.total_expected_payment)) FROM APC_TOTAL_EXPECTED_PAYMENT_DAILY_BY_USER ate2 + where WEEK(DATE(ate2.created_on),1) = (Select WEEK(CURDATE(),1)) and YEAR(DATE(ate2.created_on)) = (SELECT YEAR(CURDATE())) AND ate2.id_user = ate.id_user) + as total_expected_week, + (SELECT IF(ISNULL(SUM(ald.payment_amount)),0,SUM(ald.payment_amount)) FROM APC_LOAN_DETAIL ald + where WEEK(Date(ald.created_on),1) = (Select WEEK(CURDATE(),1)) and YEAR(Date(ald.created_on)) = (SELECT YEAR(CURDATE())) AND ald.id_user = ate.id_user + AND ald.loan_details_type IN ('PAYMENT', 'RENOVATION_PAYMENT', 'TRANSFER')) + as total_reported_week, +( + select + IF(ISNULL( + SUM( + CASE WHEN l.loan_status IN ('PENDING_RENOVATION', 'FINISH') then 0 ELSE + ((lt.payment_daily * (SELECT COUNT(ldFaltante.id) FROM APC_LOAN_DETAIL ldFaltante + WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) + AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) + - (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) + FROM APC_LOAN_DETAIL ldLunes + WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) + AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) END + ) + ),0, + SUM( + CASE WHEN l.loan_status IN ('PENDING_RENOVATION', 'FINISH') then 0 ELSE + ((lt.payment_daily * (SELECT COUNT(ldFaltante.id) FROM APC_LOAN_DETAIL ldFaltante + WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) + AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) + - (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) + FROM APC_LOAN_DETAIL ldLunes + WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) + AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) END + ) + ) + as faltante + + FROM + APC_LOAN l + INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id + INNER JOIN APC_LOAN_BY_USER albu ON l.id = albu.id_loan + WHERE albu.id_user = ate.id_user + AND albu.owner_loan = 'CURRENT_OWNER' + +) +as faltante, + (SELECT IF(ISNULL(SUM(ald.payment_amount)),0,SUM(ald.payment_amount)) + FROM APC_LOAN_DETAIL ald + INNER JOIN APC_LOAN al ON ald.id_loan = al.id + INNER JOIN APC_LOAN_BY_USER albu ON al.id = albu.id_loan + where WEEK(Date(ald.created_on),1) = (Select WEEK(CURDATE(),1)) and YEAR(Date(ald.created_on)) = (SELECT YEAR(CURDATE())) + AND ald.loan_details_type IN ('RENOVATION_PAYMENT') AND albu.id_user = ate.id_user) as total_reported_renovation_week, + (SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) + FROM APC_LOAN al + INNER JOIN APC_LOAN_BY_USER albu ON al.id = albu.id_loan + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + WHERE albu.id_user = ate.id_user AND al.loan_status = 'APPROVED' AND + WEEK(Date(al.created_on),1) = (Select WEEK(CURDATE(),1)) and YEAR(Date(al.created_on)) = (SELECT YEAR(CURDATE())) + ) as total_comision_fee, + (SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = ate.id_user + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = (SELECT YEAR(CURDATE()))) + as colocation_approved, + (SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'TO_DELIVERY' AND al.created_by = ate.id_user + AND WEEK(DATE(al.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(Date(al.created_on)) = (SELECT YEAR(CURDATE()))) + as colocation_to_delivery +FROM + APC_TOTAL_EXPECTED_PAYMENT_DAILY_BY_USER ate +INNER JOIN APC_USER au ON au.id = ate.id_user +INNER JOIN APC_HUMAN_RESOURCE ahr ON ahr.id = au.id_human_resource +WHERE + DATE(ate.created_on) = CURDATE() + AND ate.active_status = 'ENEBLED'; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW_REPORT` +-- +CREATE OR REPLACE VIEW `APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW_REPORT` AS +SELECT + ld.id, + CONCAT(p.first_name,' ',IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name, ' ')),p.last_name,' ', p.middle_name) AS comments, + ld.payment_amount as amount, + CASE + WHEN ld.loan_details_type = 'PAYMENT' THEN 'Abono' + WHEN ld.loan_details_type = 'FEE' THEN 'Multa' + WHEN ld.loan_details_type = 'TRANSFER' THEN 'Depósito' + ELSE '' END as type, + ld.id_user, + ld.created_on, + l.created_on as fechaFiltro, + 'xxxx' as route, + (l.amount_to_pay - amount_paid) as saldo, + 0 as comisionApertura, + 0 as prestamoAnterior +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON ld.id_loan = l.id +INNER JOIN APC_PEOPLE p ON l.id_customer = p.id +WHERE DATE(ld.created_on) = CURDATE() +AND ld.loan_details_type in ('PAYMENT', 'FEE', 'TRANSFER' ) +UNION +SELECT + md.id, + DATE(md.money_daily_date) AS comments, + md.amount as amount, + 'Inicio' as type, + md.id_user, + md.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo, + 0 as comisionApertura, + 0 as prestamoAnterior +FROM + APC_MONEY_DAILY md +WHERE DATE(md.money_daily_date) = CURDATE() +UNION +SELECT + oe.id, + oe.description, + oe.expense, + 'Gasto', + oe.id_user, + oe.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo, + 0 as comisionApertura, + 0 as prestamoAnterior +FROM + APC_OTHER_EXPENSE oe +WHERE DATE(oe.created_on) = CURDATE() +UNION +SELECT + te.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name), + te.amount_to_transfer, + 'Transferencia enviada', + te.id_user_transmitter, + te.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo, + 0 as comisionApertura, + 0 as prestamoAnterior +FROM + APC_TRANSFER te +JOIN + APC_USER u on u.id = te.id_user_receiver +JOIN + APC_HUMAN_RESOURCE hr on hr.id = u.id_human_resource +WHERE DATE(te.created_on) = CURDATE() +UNION +SELECT + tr.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name), + tr.amount_to_transfer, + 'Transferencia recibida', + tr.id_user_receiver, + tr.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo, + 0 as comisionApertura, + 0 as prestamoAnterior +FROM + APC_TRANSFER tr +JOIN + APC_USER u on u.id = tr.id_user_transmitter +JOIN + APC_HUMAN_RESOURCE hr on hr.id = u.id_human_resource +WHERE DATE(tr.created_on) = CURDATE() +UNION +SELECT + d.id, + CONCAT(p.first_name,' ',IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name, ' ')),p.last_name,' ', p.middle_name), + d.amount, + 'Entrega de préstamo', + d.id_user, + d.created_on, + CURDATE() as fechaFiltro, + r.route_name as route, + CASE WHEN (SELECT (l2.amount_to_pay - l2.amount_paid) FROM APC_LOAN_BY_RENOVATION lr + INNER JOIN APC_LOAN l2 ON l2.id = lr.id_loan_old + WHERE lr.id_loan_new = l.id) is null THEN 0 ELSE + (SELECT (l2.amount_to_pay - l2.amount_paid) FROM APC_LOAN_BY_RENOVATION lr + INNER JOIN APC_LOAN l2 ON l2.id = lr.id_loan_old + WHERE lr.id_loan_new = l.id) END as saldo, + lt.opening_fee as comisionApertura, + (SELECT CASE WHEN ld.payment_amount is null or 0 THEN 0 ELSE ld.payment_amount END FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l3 ON ld.id_loan = l3.id +WHERE ld.loan_details_type = 'RENOVATION_PAYMENT' +AND l3.id = (SELECT albr.id_loan_old FROM APC_LOAN_BY_RENOVATION albr WHERE albr.id_loan_new = l.id)) as prestamoAnterior +FROM APC_DELIVERY d +INNER JOIN APC_LOAN l ON d.id_loan = l.id +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE p ON l.id_customer = p.id +INNER JOIN APC_ROUTE r ON r.id = l.id_route +WHERE DATE(d.created_on) = CURDATE(); +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_RESUMEN_IN_OUT_WEEK_BY_USER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_RESUMEN_IN_OUT_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +-- Lunes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday') as closing_monday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'monday') as expense_monday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'monday') as money_daily_today_monday, +-- Martes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday') as closing_tuesday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'tuesday') as expense_tuesday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'tuesday') as money_daily_today_tuesday, +-- Miercoles +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday') as closing_wednesday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'wednesday') as expense_wednesday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'wednesday') as money_daily_today_wednesday, +-- Jueves +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday') as closing_thursday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'thursday') as expense_thursday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'thursday') as money_daily_today_thursday, +-- Viernes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday') as closing_friday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'friday') as expense_friday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'friday') as money_daily_today_friday, +-- Sabado +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday') as closing_saturday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'saturday') as expense_saturday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'saturday') as money_daily_today_saturday +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource AND hr.human_resource_status = 'ENEBLED' +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE','BOTH'); +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_RESUMEN_IN_OUT_LAST_WEEK_BY_USER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_RESUMEN_IN_OUT_LAST_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +-- Lunes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday') as closing_monday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'monday') as expense_monday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'monday') as money_daily_today_monday, +-- Martes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday') as closing_tuesday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'tuesday') as expense_tuesday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'tuesday') as money_daily_today_tuesday, +-- Miercoles +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday') as closing_wednesday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'wednesday') as expense_wednesday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'wednesday') as money_daily_today_wednesday, +-- Jueves +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday') as closing_thursday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'thursday') as expense_thursday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'thursday') as money_daily_today_thursday, +-- Viernes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday') as closing_friday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'friday') as expense_friday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'friday') as money_daily_today_friday, +-- Sabado +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday') as closing_saturday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'saturday') as expense_saturday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'saturday') as money_daily_today_saturday +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource AND hr.human_resource_status = 'ENEBLED' +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE','BOTH'); +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_RESUMEN_TOTAL_LAST_WEEK_VIEW` +-- +CREATE OR REPLACE VIEW `APC_RESUMEN_TOTAL_LAST_WEEK_VIEW` AS +SELECT +u.id, +u.office_name, +-- Cortes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND ld.id_office = u.id) as closing__day_total, +-- Inicios +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) AND md.id_office = u.id) as money_daily_today_total, +-- Subtotal +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_total, +-- comision por apertura +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE())) + as opening_fee_total, +-- cobranza +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) -1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_today, +-- colocacion +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) ) + as colocation_total, +-- nominas +(SELECT IF(ISNULL(SUM(ap.total_payment)),0,SUM(ap.total_payment)) FROM APC_PAYROLL ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as nomina_total, +-- adelantos +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_ADVANCE ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as adelantos_total, +-- entradas +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND +ap.expense_company_type = 'PAYMENT_IN' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as entradas_total, +-- gastos admon +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND +ap.expense_company_type = 'PAYMENT_OUT' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as gastos_admon_total +FROM APC_OFFICE u +WHERE u.office_status = 'ENEBLED'; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_HISTORY_LOAN_VIEW` +-- +CREATE OR REPLACE VIEW APC_HISTORY_LOAN_VIEW AS +SELECT +l.id, +CONCAT(pc.first_name, ' ', pc.last_name) customerName, +CONCAT(pa.first_name, ' ', pa.last_name) endorsementName, +r.route_name routeName, +o.office_name officeName, +lt.payment montoPrestado, +l.amount_to_pay montoAPagar, +l.amount_paid montoPagado, +(l.amount_to_pay - l.amount_paid) saldoInsoluto, +(SELECT count(lfn.id) FROM APC_LOAN_FEE_NOTIFICATION lfn WHERE lfn.id_loan = l.id) numMultas, +CASE WHEN l.loan_status = 'PENDING' THEN 'Pendiente' +WHEN l.loan_status = 'FINISH' THEN 'Terminado' +WHEN l.loan_status = 'APPROVED' THEN 'Aprobado' +WHEN l.loan_status = 'REJECTED' THEN 'Rechazado' +WHEN l.loan_status = 'PENDING_RENOVATION' THEN 'Pendiente de renovación' +WHEN l.loan_status = 'TO_DELIVERY' THEN 'Por liberar' +END as estatusPrestamo, +DATE(l.created_on) as fecha, +u.user_name nombreUsuario +FROM +APC_LOAN l +INNER JOIN APC_PEOPLE pc ON l.id_customer = pc.id +INNER JOIN APC_PEOPLE pa ON l.id_endorsement = pa.id +INNER JOIN APC_ROUTE r ON l.id_route = r.id +INNER JOIN APC_OFFICE o ON r.id_office = o.id +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +INNER JOIN APC_USER u ON u.id = lbu.id_user +WHERE l.loan_status NOT IN ('DELETED') +ORDER BY l.created_on DESC; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_RESUMEN_TOTAL_LAST_WEEK_VIEW` +-- +CREATE OR REPLACE VIEW `APC_RESUMEN_TOTAL_LAST_WEEK_VIEW` AS +SELECT +u.id, +u.office_name, +-- Cortes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND ld.id_office = u.id) as closing__day_total, +-- Inicios +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) AND md.id_office = u.id) as money_daily_today_total, +-- Subtotal +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_total, +-- comision por apertura +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1) - 1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE())) + as opening_fee_total, +-- cobranza +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) -1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_today, +-- colocacion +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) ) + as colocation_total, +-- nominas +(SELECT IF(ISNULL(SUM(ap.total_payment)),0,SUM(ap.total_payment)) FROM APC_PAYROLL ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as nomina_total, +-- adelantos +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_ADVANCE ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as adelantos_total, +-- entradas +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND +ap.expense_company_type = 'PAYMENT_IN' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as entradas_total, +-- gastos admon +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND +ap.expense_company_type = 'PAYMENT_OUT' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)-1) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as gastos_admon_total +FROM APC_OFFICE u +WHERE u.office_status = 'ENEBLED'; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_RESUMEN_TOTAL_WEEK_VIEW` +-- +CREATE OR REPLACE VIEW `APC_RESUMEN_TOTAL_WEEK_VIEW` AS +SELECT +u.id, +u.office_name, +-- Cortes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND ld.id_office = u.id) as closing__day_total, +-- Inicios +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) AND md.id_office = u.id) as money_daily_today_total, +-- Subtotal +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as subtotal_total, +-- comision por apertura +(SELECT IF(ISNULL(SUM(alt.opening_fee)),0,SUM(alt.opening_fee)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE())) + as opening_fee_total, +-- cobranza +(SELECT IF(ISNULL(SUM(ld.payment_amount)),0,SUM(ld.payment_amount)) +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON l.id = ld.id_loan +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +WHERE lbu.id_user = 'aad0c673-eb93-11ea-b7e1-02907d0fb4e6' +AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) +AND ld.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as cobranza_today, +-- colocacion +(SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' + AND WEEK(DATE(al.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(al.created_on)) = YEAR(CURDATE()) ) + as colocation_total, +-- nominas +(SELECT IF(ISNULL(SUM(ap.total_payment)),0,SUM(ap.total_payment)) FROM APC_PAYROLL ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as nomina_total, +-- adelantos +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_ADVANCE ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as adelantos_total, +-- entradas +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND +ap.expense_company_type = 'PAYMENT_IN' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as entradas_total, +-- gastos admon +(SELECT IF(ISNULL(SUM(ap.amount)),0,SUM(ap.amount)) FROM APC_EXPENSE_COMPANY ap +WHERE ap.id_office = u.id AND ap.active_status = 'ENEBLED' AND +ap.expense_company_type = 'PAYMENT_OUT' +AND WEEK(DATE(ap.created_on),1) = (WEEK(CURDATE(),1)) AND + YEAR(Date(ap.created_on)) = YEAR(CURDATE())) as gastos_admon_total +FROM APC_OFFICE u +WHERE u.office_status = 'ENEBLED'; +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_ADMINISTRATION_PERSON_SEARCH_VIEW` +-- +CREATE OR REPLACE VIEW `APC_ADMINISTRATION_PERSON_SEARCH_VIEW` AS +SELECT + people.id AS id, people.phone_home AS phone_home, people.address_home AS address_home, people.people_type AS people_type, + people.id_route AS id_route, route.route_name AS route_name, people.id_office AS id_office, office.office_name AS office_name, + CONCAT( + CASE + WHEN people.first_name IS NOT NULL AND people.first_name != '' + THEN CONCAT(SUBSTR(UPPER(people.first_name), 1, 1),SUBSTR(LOWER(people.first_name), 2)) + ELSE '' + END, + CASE + WHEN people.second_name IS NOT NULL AND people.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(people.second_name), 1, 1),SUBSTR(LOWER(people.second_name), 2)) + ELSE '' + END, + CASE + WHEN people.last_name IS NOT NULL AND people.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(people.last_name), 1, 1),SUBSTR(LOWER(people.last_name), 2)) + ELSE '' + END, + CASE + WHEN people.middle_name IS NOT NULL AND people.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(people.middle_name), 1, 1),SUBSTR(LOWER(people.middle_name), 2)) + ELSE '' + END + ) AS person_search +FROM APC_PEOPLE people +INNER JOIN APC_OFFICE office ON people.id_office = office.id +INNER JOIN APC_ROUTE route ON people.id_route = route.id +WHERE + people.active_status = 'ENEBLED' +ORDER BY office_name, route_name, person_search; + +CREATE OR REPLACE VIEW APC_HISTORY_LOAN_VIEW AS +SELECT +l.id, +CONCAT(pc.first_name, ' ', pc.last_name) customerName, +CONCAT(pa.first_name, ' ', pa.last_name) endorsementName, +r.route_name routeName, +o.office_name officeName, +lt.payment montoPrestado, +l.amount_to_pay montoAPagar, +l.amount_paid montoPagado, +(l.amount_to_pay - l.amount_paid) saldoInsoluto, +(SELECT count(lfn.id) FROM APC_LOAN_FEE_NOTIFICATION lfn WHERE lfn.id_loan = l.id) numMultas, +CASE WHEN l.loan_status = 'PENDING' THEN 'Pendiente' +WHEN l.loan_status = 'FINISH' THEN 'Terminado' +WHEN l.loan_status = 'APPROVED' THEN 'Aprobado' +WHEN l.loan_status = 'REJECTED' THEN 'Rechazado' +WHEN l.loan_status = 'PENDING_RENOVATION' THEN 'Pendiente de renovación' +WHEN l.loan_status = 'TO_DELIVERY' THEN 'Por liberar' +END as estatusPrestamo, +DATE(l.created_on) as fecha, +u.user_name nombreUsuario +FROM +APC_LOAN l +INNER JOIN APC_PEOPLE pc ON l.id_customer = pc.id +INNER JOIN APC_PEOPLE pa ON l.id_endorsement = pa.id +INNER JOIN APC_ROUTE r ON l.id_route = r.id +INNER JOIN APC_OFFICE o ON r.id_office = o.id +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +INNER JOIN APC_USER u ON u.id = lbu.id_user +WHERE l.loan_status NOT IN ('DELETED') +ORDER BY l.created_on DESC +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_STATS_FEES_VIEW` +-- +CREATE OR REPLACE VIEW APC_FEES_VIEW AS +SELECT + LD.ID, + LD.id_user, + R.id AS id_route, + R.route_name AS route_name, + CONCAT(HR.first_name, ' ', HR.last_name) AS name, + LD.payment_amount AS total_fees, + LD.fee_status AS fee_status, + 0.0 AS total_fee_paid, + LD.created_on +FROM APC_LOAN_DETAIL LD +INNER JOIN APC_LOAN L ON LD.id_loan = L.id AND L.loan_status <> 'DELETED' +INNER JOIN APC_USER U ON LD.id_user = U.id +INNER JOIN APC_ROUTE R ON L.id_route = R.id +INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id +WHERE loan_details_type = 'FEE' +-- -------------------------------------------------------- +-- +-- Estructura para la vista `APC_ADMINISTRATION_PERSON_SEARCH_VIEW` +-- +CREATE OR REPLACE VIEW `APC_ADMINISTRATION_PERSON_SEARCH_VIEW` AS +SELECT + people.id AS id, people.phone_home AS phone_home, people.address_home AS address_home, people.people_type AS people_type, + people.id_route AS id_route, route.route_name AS route_name, people.id_office AS id_office, office.office_name AS office_name, + CONCAT( + CASE + WHEN people.first_name IS NOT NULL AND people.first_name != '' + THEN CONCAT(SUBSTR(UPPER(people.first_name), 1, 1),SUBSTR(LOWER(people.first_name), 2)) + ELSE '' + END, + CASE + WHEN people.second_name IS NOT NULL AND people.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(people.second_name), 1, 1),SUBSTR(LOWER(people.second_name), 2)) + ELSE '' + END, + CASE + WHEN people.last_name IS NOT NULL AND people.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(people.last_name), 1, 1),SUBSTR(LOWER(people.last_name), 2)) + ELSE '' + END, + CASE + WHEN people.middle_name IS NOT NULL AND people.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(people.middle_name), 1, 1),SUBSTR(LOWER(people.middle_name), 2)) + ELSE '' + END + ) AS person_search +FROM APC_PEOPLE people +INNER JOIN APC_OFFICE office ON people.id_office = office.id +INNER JOIN APC_ROUTE route ON people.id_route = route.id +WHERE + people.active_status = 'ENEBLED' +ORDER BY office_name, route_name, person_search; +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_CLOSING_DAY_VIEW` +-- +CREATE OR REPLACE VIEW APC_CLOSING_DAY_VIEW AS +SELECT + CD.ID, + CD.id_user, + CONCAT(HR.first_name, ' ', HR.last_name) AS name, + HRR.route_name AS route_name, + CD.amount_paid AS total_closing, + CD.created_on +FROM APC_CLOSING_DAY CD +INNER JOIN APC_USER U ON CD.id_user = U.id +INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id +INNER JOIN( + SELECT + HRR.id_human_resource, + GROUP_CONCAT(DISTINCT R.route_name SEPARATOR',') AS route_name + FROM APC_HUMAN_RESOURCE_HAS_ROUTE HRR + INNER JOIN APC_ROUTE R ON HRR.id_route = R.id + GROUP BY HRR.id_human_resource +) HRR ON HR.id = HRR.id_human_resource +WHERE CD.active_status <> 'DISABLED'; + +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_OPENING_FEES_VIEW` +-- +CREATE OR REPLACE VIEW `APC_OPENING_FEES_VIEW` AS +SELECT + L.id, + L.created_by AS id_user, + CONCAT(HR.first_name, ' ', HR.last_name) AS name, + R.route_name AS route_name, + LT.opening_fee, + L.created_on +FROM APC_LOAN L +INNER JOIN APC_LOAN_TYPE LT ON L.id_loan_type = LT.id +INNER JOIN APC_USER U ON L.created_by = U.id +INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id +INNER JOIN APC_HUMAN_RESOURCE_HAS_ROUTE HRR ON HR.id = HRR.id_human_resource +INNER JOIN APC_ROUTE R ON HRR.id_route = R.id; +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_PAYMENT_VIEW` +-- +CREATE OR REPLACE VIEW APC_PAYMENT_VIEW AS +SELECT + LD.id, + L.id AS id_loan, + LD.id_user, + CONCAT(HR.first_name, ' ', HR.last_name) AS name, + HRR.route_name, + LD.payment_amount AS total_payment, + LT.opening_fee, + LD.created_on +FROM APC_LOAN_DETAIL LD +INNER JOIN APC_LOAN L ON LD.id_loan = L.id AND L.loan_status <> 'DELETED' +INNER JOIN APC_LOAN_TYPE LT ON L.id_loan_type = LT.id +INNER JOIN APC_USER U ON LD.id_user = U.id +INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id +INNER JOIN( + SELECT + HRR.id_human_resource, + GROUP_CONCAT(DISTINCT R.route_name SEPARATOR',') AS route_name + FROM APC_HUMAN_RESOURCE_HAS_ROUTE HRR + INNER JOIN APC_ROUTE R ON HRR.id_route = R.id + GROUP BY HRR.id_human_resource +) HRR ON HR.id = HRR.id_human_resource +WHERE loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'); +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_PAYROLL_STATS_VIEW` +-- +CREATE OR REPLACE VIEW `APC_PAYROLL_STATS_VIEW` AS +SELECT + P.id, + P.id_human_resource AS id_user, + CONCAT(HR.first_name, ' ', HR.last_name) AS name, + P.salary + P.total_bonus_colocation + P.total_bonus_mora + P.total_bonus_new_customer + P.increases + P.boxed + P.saving + P.payment_to_debt + P.advance - P.imss AS total_payroll, + P.created_on +FROM APC_PAYROLL P +INNER JOIN APC_HUMAN_RESOURCE HR ON P.id_human_resource = HR.id; +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_PAYMENT_ROUTE_VIEW` +-- +CREATE OR REPLACE VIEW `APC_PAYMENT_ROUTE_VIEW` AS +SELECT + LD.id, + L.id AS id_loan, + R.id AS id_route, + R.route_name AS name, + CONCAT(HR.first_name, ' ', HR.last_name) AS user_name, + LD.payment_amount AS total_payment, + LT.opening_fee, + LD.created_on +FROM APC_LOAN_DETAIL LD +INNER JOIN APC_LOAN L ON LD.id_loan = L.id AND L.loan_status <> 'DELETED' +INNER JOIN APC_LOAN_TYPE LT ON L.id_loan_type = LT.id +INNER JOIN APC_ROUTE R ON L.id_route = R.id +INNER JOIN APC_USER U ON LD.id_user = U.id +INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id +WHERE loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'); +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_STATS_PAYMENT_RENOVATION_VIEW` +-- +CREATE OR REPLACE VIEW `APC_STATS_PAYMENT_RENOVATION_VIEW` AS +SELECT + LD.id, + LD.created_by AS id_user, + CONCAT(HR.first_name, ' ', HR.last_name) AS employee_name, + P.id AS id_customer, + CONCAT(P.first_name, ' ', P.second_name, ' ', P.last_name, ' ', P.middle_name) AS customer_name, + LD.payment_amount AS total_payment, + LD.created_on +FROM APC_LOAN_DETAIL LD +INNER JOIN APC_LOAN L ON LD.id_loan = L.id AND L.loan_status <> 'DELETED' +INNER JOIN APC_PEOPLE P ON L.id_customer = P.id +INNER JOIN APC_USER U ON LD.created_by = U.id +INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id +WHERE LD.loan_details_type IN ('RENOVATION_PAYMENT'); +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_STATS_DEPOSITS_VIEW` +-- +CREATE OR REPLACE VIEW `APC_STATS_DEPOSITS_VIEW` AS +SELECT + LD.id, + LD.id_user, + CONCAT(HR.first_name, ' ', HR.last_name) AS name, + HRR.route_name AS route_name, + LD.payment_amount AS total_deposits, + LD.created_on +FROM APC_LOAN_DETAIL LD +INNER JOIN APC_LOAN L ON LD.id_loan = L.id AND L.loan_status <> 'DELETED' +INNER JOIN APC_USER U ON LD.id_user = U.id +INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id +INNER JOIN( + SELECT + HRR.id_human_resource, + GROUP_CONCAT(DISTINCT R.route_name SEPARATOR',') AS route_name + FROM APC_HUMAN_RESOURCE_HAS_ROUTE HRR + INNER JOIN APC_ROUTE R ON HRR.id_route = R.id + GROUP BY HRR.id_human_resource +) HRR ON HR.id = HRR.id_human_resource +WHERE loan_details_type IN ('TRANSFER'); +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_STATS_ADVANCE_VIEW` +-- +CREATE OR REPLACE VIEW `APC_STATS_ADVANCE_VIEW` AS +SELECT + LD.ID, + R.id AS id_route, + R.route_name AS name, + LD.payment_amount AS total_advances, + LD.created_on +FROM APC_LOAN_DETAIL LD +INNER JOIN APC_LOAN L ON LD.id_loan = L.id AND L.loan_status <> 'DELETED' +INNER JOIN APC_USER U ON LD.id_user = U.id +INNER JOIN APC_ROUTE R ON L.id_route = R.id +INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id +WHERE loan_details_type IN ('RENOVATION_PAYMENT'); +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_LOAN_EMPLOYEE_VIEW` +-- +CREATE OR REPLACE VIEW `APC_LOAN_EMPLOYEE_VIEW` AS +SELECT + L.id, + CONCAT(HR.first_name, ' ', HR.last_name) AS name, + HR.id AS id_user, + L.amount_loan, + L.amount_to_pay, + L.balance, + L.total_amount_to_pay, + L.created_on, + L.loan_employee_status, + CONCAT(HRU.first_name, ' ', HRU.last_name) AS created_by_name, + (SELECT IFNULL(MAX(LD.reference_number), 0) FROM APC_LOAN_EMPLOYEE_DETAIL LD WHERE LD.id_loan = L.id) AS reference_number +FROM APC_LOAN_EMPLOYEE L +INNER JOIN APC_HUMAN_RESOURCE HR ON L.id_employee = HR.id +INNER JOIN APC_USER US ON L.created_by = US.id +INNER JOIN APC_HUMAN_RESOURCE HRU ON US.id_human_resource = HRU.id +ORDER BY name, created_on DESC; +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_LOAN_EMPLOYEE_ALL_DATA_VIEW` +-- +CREATE OR REPLACE VIEW `APC_LOAN_EMPLOYEE_ALL_DATA_VIEW` AS +SELECT + L.id, + CONCAT(HR.first_name, ' ', HR.last_name) AS name, + HR.id AS id_user, + L.amount_loan, + L.amount_to_pay, + L.balance, + L.created_on, + L.loan_employee_status +FROM APC_LOAN_EMPLOYEE L +INNER JOIN APC_HUMAN_RESOURCE HR ON L.id_employee = HR.id; +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_LOAN_EMPLOYEE_DETAIL_ALL_DATA_VIEW` +-- +CREATE OR REPLACE VIEW `APC_LOAN_EMPLOYEE_DETAIL_ALL_DATA_VIEW` AS +SELECT + id, + id_loan, + id_user, + payment_amount, + reference_number, + loan_employee_detail_status, + created_on +FROM APC_LOAN_EMPLOYEE_DETAIL +ORDER BY created_on ASC; +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_USER_WEEK_REPORT_VIEW` +-- +CREATE OR REPLACE VIEW `APC_USER_WEEK_REPORT_VIEW` AS +SELECT + u.id AS id_user, + (SELECT IF(ISNULL(SUM(alt.payment)),0,SUM(alt.payment)) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND DATE(al.created_on) + BETWEEN + DATE(DATE_SUB(CURDATE(),INTERVAL WEEKDAY(CURDATE()) DAY)) + AND + DATE(DATE_ADD(CURDATE(),INTERVAL (6 - WEEKDAY(CURDATE())) DAY)) + ) AS payment_week, + (SELECT COUNT(al.id) FROM APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_LOAN_BY_USER albu ON albu.id_loan = al.id + WHERE loan_status = 'APPROVED' AND al.created_by = u.id + AND al.new_customer = 'ENEBLED' + AND DATE(al.created_on) + BETWEEN + DATE(DATE_SUB(CURDATE(),INTERVAL WEEKDAY(CURDATE()) DAY)) + AND + DATE(DATE_ADD(CURDATE(),INTERVAL (6 - WEEKDAY(CURDATE())) DAY)) + ) AS total_new_customer_currweek, + 0.0 AS debit_week, + ( + SELECT COUNT(innerLBU.id_loan) + FROM APC_LOAN_BY_USER innerLBU + WHERE innerLBU.loan_by_user_status = 'APPROVED' AND innerLBU.id_user = u.id + ) AS total_approved_loan, + ( + SELECT + COUNT(innerLBU.id_loan) + FROM APC_LOAN_BY_USER innerLBU WHERE innerLBU.loan_by_user_status = 'TO_DELIVERY' AND innerLBU.id_user = u.id + ) AS total_to_delivery_loan +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE') AND +u.certifier = 'DISABLED'; +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_STATS_GASOLINE_VIEW` +-- +CREATE OR REPLACE VIEW `APC_STATS_GASOLINE_VIEW` AS +SELECT + G.ID, + R.id AS id_route, + R.route_name AS route_name, + G.id_user, + CONCAT(HR.first_name, ' ', HR.last_name) AS user_name, + (SELECT GAS.km_new FROM APC_GASOLINE GAS WHERE GAS.created_on < G.created_on AND GAS.id_user = G.id_user ORDER BY GAS.created_on DESC LIMIT 1) AS km_old, + G.km_new, + G.total AS total_gasoline, + G.Description AS description, + G.created_on, + G.quantity +FROM APC_GASOLINE G +INNER JOIN APC_USER U ON G.id_user = U.id +INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id +INNER JOIN APC_ROUTE R ON G.id_route = R.id +WHERE G.status = 'ENABLED'; + +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_STATS_ZERO_PAYMENTS_VIEW` +-- +CREATE OR REPLACE VIEW `APC_STATS_ZERO_PAYMENTS_VIEW` AS +SELECT + LD.id, + LD.id_user, + CONCAT(HR.first_name, ' ', HR.last_name) AS name, + R.route_name AS route_name, + LD.payment_amount AS total_zeroPayments, + LD.created_on +FROM APC_LOAN_DETAIL LD +INNER JOIN APC_LOAN L ON LD.id_loan = L.id AND L.loan_status <> 'DELETED' +INNER JOIN APC_USER U ON LD.id_user = U.id +INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id +INNER JOIN( + SELECT + HRR.id_human_resource, + GROUP_CONCAT(DISTINCT R.route_name SEPARATOR',') AS route_name + FROM APC_HUMAN_RESOURCE_HAS_ROUTE HRR + INNER JOIN APC_ROUTE R ON HRR.id_route = R.id + GROUP BY HRR.id_human_resource +) HRR ON HR.id = HRR.id_human_resource +WHERE loan_details_type IN ('PAYMENT') AND LD.payment_amount = 0; + +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_STATS_EMPLOYEE_SAVING_VIEW` +-- +CREATE OR REPLACE VIEW `APC_STATS_EMPLOYEE_SAVING_VIEW` AS +SELECT + ES.id, + ES.id_user, + CONCAT(HR.first_name, ' ', HR.last_name) AS name, + HRR.route_name AS route_name, + ES.employee_saving AS employee_saving, + ES.created_on, + ES.Type +FROM APC_EMPLOYEE_SAVING ES +INNER JOIN APC_HUMAN_RESOURCE HR ON ES.id_user = HR.id +INNER JOIN( + SELECT + HRR.id_human_resource, + GROUP_CONCAT(DISTINCT R.route_name SEPARATOR',') AS route_name + FROM APC_HUMAN_RESOURCE_HAS_ROUTE HRR + INNER JOIN APC_ROUTE R ON HRR.id_route = R.id + GROUP BY HRR.id_human_resource +) HRR ON HR.id = HRR.id_human_resource; +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_CUSTOMER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_CUSTOMER_VIEW` AS +SELECT +ap.id AS id, +CONCAT( + CASE + WHEN ap.first_name IS NOT NULL AND ap.first_name != '' + THEN CONCAT(SUBSTR(UPPER(ap.first_name), 1, 1),SUBSTR(LOWER(ap.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap.second_name IS NOT NULL AND ap.second_name != '' + THEN CONCAT(SUBSTR(UPPER(ap.second_name), 1, 1),SUBSTR(LOWER(ap.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap.last_name IS NOT NULL AND ap.last_name != '' + THEN CONCAT(SUBSTR(UPPER(ap.last_name), 1, 1),SUBSTR(LOWER(ap.last_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap.middle_name IS NOT NULL AND ap.middle_name != '' + THEN CONCAT(SUBSTR(UPPER(ap.middle_name), 1, 1),SUBSTR(LOWER(ap.middle_name), 2)) + ELSE '' + END +) AS full_name, +ap.company_name AS company_name, +ap.address_home AS address_home, +ap.address_business AS address_business, +ar.route_name, +ap.people_type AS people_type, +(CASE + WHEN ap.people_type = 'CUSTOMER' THEN 'Cliente' + WHEN ap.people_type = 'BOTH' THEN 'Cliente y aval' +END) AS str_people_type, +ao.office_name AS office_name, +(SELECT COUNT(id) FROM APC_LOAN WHERE id_customer = ap.id) AS total_of_loan, +ap.classification +FROM APC_PEOPLE ap +INNER JOIN APC_ROUTE ar ON ap.id_route = ar.id +INNER JOIN APC_OFFICE ao ON ap.id_office = ao.id +WHERE ap.active_status = 'ENEBLED' AND ap.people_type IN ('CUSTOMER','BOTH'); +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_TRANSFER_VIEW` +-- +CREATE OR REPLACE VIEW `APC_TRANSFER_VIEW` AS +SELECT +at.id AS id, +at.id_office AS id_office, +CONCAT( + CASE + WHEN ahr.first_name IS NOT NULL AND ahr.first_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.first_name), 1, 1),SUBSTR(LOWER(ahr.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahr.second_name IS NOT NULL AND ahr.second_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.second_name), 1, 1),SUBSTR(LOWER(ahr.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahr.last_name IS NOT NULL AND ahr.last_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.last_name), 1, 1),SUBSTR(LOWER(ahr.last_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahr.middle_name IS NOT NULL AND ahr.middle_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.middle_name), 1, 1),SUBSTR(LOWER(ahr.middle_name), 2)) + ELSE '' + END +) AS full_name_transmitter, +( + SELECT GROUP_CONCAT(inner_ar.route_name) + FROM APC_HUMAN_RESOURCE_HAS_ROUTE inner_ahrhr + INNER JOIN APC_ROUTE inner_ar ON inner_ahrhr.id_route = inner_ar.id + WHERE id_human_resource = ahr.id +) AS transmitter_routes, +CONCAT( + CASE + WHEN ahrr.first_name IS NOT NULL AND ahrr.first_name != '' + THEN CONCAT(SUBSTR(UPPER(ahrr.first_name), 1, 1),SUBSTR(LOWER(ahrr.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahrr.second_name IS NOT NULL AND ahrr.second_name != '' + THEN CONCAT(SUBSTR(UPPER(ahrr.second_name), 1, 1),SUBSTR(LOWER(ahrr.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahrr.last_name IS NOT NULL AND ahrr.last_name != '' + THEN CONCAT(SUBSTR(UPPER(ahrr.last_name), 1, 1),SUBSTR(LOWER(ahrr.last_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahrr.middle_name IS NOT NULL AND ahrr.middle_name != '' + THEN CONCAT(SUBSTR(UPPER(ahrr.middle_name), 1, 1),SUBSTR(LOWER(ahrr.middle_name), 2)) + ELSE '' + END +) AS full_name_receiver, +( + SELECT GROUP_CONCAT(inner_ar.route_name) + FROM APC_HUMAN_RESOURCE_HAS_ROUTE inner_ahrhr + INNER JOIN APC_ROUTE inner_ar ON inner_ahrhr.id_route = inner_ar.id + WHERE id_human_resource = ahrr.id +) AS receiver_routes, +at.amount_to_transfer AS amount_to_transfer, +at.action_status AS action_status, +( +CASE + WHEN at.action_status = 'PENDING' THEN 'Pendiente' + WHEN at.action_status = 'APPROVED' THEN 'Aprobada' + ELSE 'REJECTED' +END) AS str_action_status, +at.created_on AS created_on, +( +CASE + WHEN date_format(at.created_on,'%m') = '01' + THEN concat(date_format(at.created_on,'%d'),' - Enero - ',date_format(at.created_on,'%Y')) + WHEN date_format(at.created_on,'%m') = '02' + THEN concat(date_format(at.created_on,'%d'),' - Febrero - ',date_format(at.created_on,'%Y')) + WHEN date_format(at.created_on,'%m') = '03' + THEN concat(date_format(at.created_on,'%d'),' - Marzo - ',date_format(at.created_on,'%Y')) + WHEN date_format(at.created_on,'%m') = '04' + THEN concat(date_format(at.created_on,'%d'),' - Abril - ',date_format(at.created_on,'%Y')) + WHEN date_format(at.created_on,'%m') = '05' + THEN concat(date_format(at.created_on,'%d'),' - Mayo - ',date_format(at.created_on,'%Y')) + WHEN date_format(at.created_on,'%m') = '06' + THEN concat(date_format(at.created_on,'%d'),' - Junio - ',date_format(at.created_on,'%Y')) + WHEN date_format(at.created_on,'%m') = '07' + THEN concat(date_format(at.created_on,'%d'),' - Julio - ',date_format(at.created_on,'%Y')) + WHEN date_format(at.created_on,'%m') = '08' + THEN concat(date_format(at.created_on,'%d'),' - Agosto - ',date_format(at.created_on,'%Y')) + WHEN date_format(at.created_on,'%m') = '09' + THEN concat(date_format(at.created_on,'%d'),' - Septiembre - ',date_format(at.created_on,'%Y')) + WHEN date_format(at.created_on,'%m') = '10' + THEN concat(date_format(at.created_on,'%d'),' - Octubre - ',date_format(at.created_on,'%Y')) + WHEN date_format(at.created_on,'%m') = '11' + THEN concat(date_format(at.created_on,'%d'),' - Noviembre - ',date_format(at.created_on,'%Y')) + WHEN date_format(at.created_on,'%m') = '12' + THEN concat(date_format(at.created_on,'%d'),' - Diciembre - ',date_format(at.created_on,'%Y')) +END +) AS str_created_on, +( +CASE + WHEN at.active_status = 'DISABLED' THEN 'grayRow' + ELSE NULL +END +)AS style_class +FROM APC_TRANSFER at +INNER JOIN APC_USER au ON at.id_user_transmitter = au.id +INNER JOIN APC_HUMAN_RESOURCE ahr ON au.id_human_resource = ahr.id +INNER JOIN APC_USER aur ON at.id_user_receiver = aur.id +INNER JOIN APC_HUMAN_RESOURCE ahrr ON aur.id_human_resource = ahrr.id; +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_ENABLED_USER_DETAILS_VIEW` +-- +CREATE OR REPLACE VIEW `APC_ENABLED_USER_DETAILS_VIEW` AS +SELECT +au.id AS id_user, +CONCAT( + CASE + WHEN ahr.first_name IS NOT NULL AND ahr.first_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.first_name), 1, 1),SUBSTR(LOWER(ahr.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahr.second_name IS NOT NULL AND ahr.second_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.second_name), 1, 1),SUBSTR(LOWER(ahr.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahr.last_name IS NOT NULL AND ahr.last_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.last_name), 1, 1),SUBSTR(LOWER(ahr.last_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahr.middle_name IS NOT NULL AND ahr.middle_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.middle_name), 1, 1),SUBSTR(LOWER(ahr.middle_name), 2)) + ELSE '' + END +) AS full_name, +aubo.id_office AS id_office +FROM APC_USER au +INNER JOIN APC_HUMAN_RESOURCE ahr ON au.id_human_resource = ahr.id +INNER JOIN APC_USER_BY_OFFICE aubo ON au.id = aubo.id_user +WHERE ahr.human_resource_status = 'ENEBLED' AND au.user_status = 'ENEBLED'; + +CREATE OR REPLACE VIEW `APC_LOAN_DETAIL_ZERO_VIEW` AS +SELECT + LD.id, + CONCAT(IFNULL(P.first_name, ''), ' ', IFNULL(P.second_name, ''), ' ', IFNULL(P.last_name, ''), ' ', IFNULL(P.middle_name, '')) AS customer_name, + P.address_home, + L.amount_to_pay, + LD.loan_comments, + CONCAT(HR.first_name, ' ', HR.last_name) AS user_name, + L.id_loan_type, + LT.payment +FROM APC_LOAN_DETAIL AS LD +INNER JOIN APC_LOAN AS L ON LD.id_loan = L.id +INNER JOIN APC_PEOPLE AS P ON L.id_customer = P.id +INNER JOIN APC_LOAN_TYPE LT ON L.id_loan_type = LT.id +INNER JOIN APC_USER U ON LD.id_user = U.id +INNER JOIN APC_HUMAN_RESOURCE HR ON U.id_human_resource = HR.id +WHERE LD.loan_details_type = 'PAYMENT' + AND DATE(LD.created_on) = DATE(CURDATE()) + AND LD.payment_amount = 0; +-- ------------------------------------------------------------- +-- +-- Estructura para la vista `APC_TRANSFER_IN_PENDING_STATUS_VIEW` +-- +CREATE OR REPLACE VIEW `APC_TRANSFER_IN_PENDING_STATUS_VIEW` AS +SELECT + ald.id AS id_loan_detail, + ald.payment_amount AS payment_amount, + ( +CASE + WHEN date_format(ald.created_on,'%m') = '01' + THEN concat(date_format(ald.created_on,'%d'),' - Enero - ',date_format(ald.created_on,'%Y')) + WHEN date_format(ald.created_on,'%m') = '02' + THEN concat(date_format(ald.created_on,'%d'),' - Febrero - ',date_format(ald.created_on,'%Y')) + WHEN date_format(ald.created_on,'%m') = '03' + THEN concat(date_format(ald.created_on,'%d'),' - Marzo - ',date_format(ald.created_on,'%Y')) + WHEN date_format(ald.created_on,'%m') = '04' + THEN concat(date_format(ald.created_on,'%d'),' - Abril - ',date_format(ald.created_on,'%Y')) + WHEN date_format(ald.created_on,'%m') = '05' + THEN concat(date_format(ald.created_on,'%d'),' - Mayo - ',date_format(ald.created_on,'%Y')) + WHEN date_format(ald.created_on,'%m') = '06' + THEN concat(date_format(ald.created_on,'%d'),' - Junio - ',date_format(ald.created_on,'%Y')) + WHEN date_format(ald.created_on,'%m') = '07' + THEN concat(date_format(ald.created_on,'%d'),' - Julio - ',date_format(ald.created_on,'%Y')) + WHEN date_format(ald.created_on,'%m') = '08' + THEN concat(date_format(ald.created_on,'%d'),' - Agosto - ',date_format(ald.created_on,'%Y')) + WHEN date_format(ald.created_on,'%m') = '09' + THEN concat(date_format(ald.created_on,'%d'),' - Septiembre - ',date_format(ald.created_on,'%Y')) + WHEN date_format(ald.created_on,'%m') = '10' + THEN concat(date_format(ald.created_on,'%d'),' - Octubre - ',date_format(ald.created_on,'%Y')) + WHEN date_format(ald.created_on,'%m') = '11' + THEN concat(date_format(ald.created_on,'%d'),' - Noviembre - ',date_format(ald.created_on,'%Y')) + WHEN date_format(ald.created_on,'%m') = '12' + THEN concat(date_format(ald.created_on,'%d'),' - Diciembre - ',date_format(ald.created_on,'%Y')) +END +) AS str_created_on, +CONCAT( + CASE + WHEN ap_customer.first_name IS NOT NULL AND ap_customer.first_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_customer.first_name), 1, 1),SUBSTR(LOWER(ap_customer.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap_customer.second_name IS NOT NULL AND ap_customer.second_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_customer.second_name), 1, 1),SUBSTR(LOWER(ap_customer.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap_customer.last_name IS NOT NULL AND ap_customer.last_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_customer.last_name), 1, 1),SUBSTR(LOWER(ap_customer.last_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap_customer.middle_name IS NOT NULL AND ap_customer.middle_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_customer.middle_name), 1, 1),SUBSTR(LOWER(ap_customer.middle_name), 2)) + ELSE '' + END +) AS customer_name, +CONCAT( + CASE + WHEN ap_endorsement.first_name IS NOT NULL AND ap_endorsement.first_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_endorsement.first_name), 1, 1),SUBSTR(LOWER(ap_endorsement.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap_endorsement.second_name IS NOT NULL AND ap_endorsement.second_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_endorsement.second_name), 1, 1),SUBSTR(LOWER(ap_endorsement.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap_endorsement.last_name IS NOT NULL AND ap_endorsement.last_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_endorsement.last_name), 1, 1),SUBSTR(LOWER(ap_endorsement.last_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap_endorsement.middle_name IS NOT NULL AND ap_endorsement.middle_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_endorsement.middle_name), 1, 1),SUBSTR(LOWER(ap_endorsement.middle_name), 2)) + ELSE '' + END +) AS endorsement_name, +CONCAT( + CASE + WHEN ahr.first_name IS NOT NULL AND ahr.first_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.first_name), 1, 1),SUBSTR(LOWER(ahr.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahr.second_name IS NOT NULL AND ahr.second_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.second_name), 1, 1),SUBSTR(LOWER(ahr.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahr.last_name IS NOT NULL AND ahr.last_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.last_name), 1, 1),SUBSTR(LOWER(ahr.last_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahr.middle_name IS NOT NULL AND ahr.middle_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.middle_name), 1, 1),SUBSTR(LOWER(ahr.middle_name), 2)) + ELSE '' + END + ) AS user_name, + ald.loan_comments AS loan_comments, + ald.created_on AS created_on +FROM + APC_LOAN_DETAIL ald + INNER JOIN APC_LOAN al ON ald.id_loan = al.id + INNER JOIN APC_PEOPLE ap_customer ON al.id_customer = ap_customer.id + INNER JOIN APC_PEOPLE ap_endorsement ON al.id_endorsement = ap_endorsement.id + INNER JOIN APC_USER au ON ald.created_by = au.id + INNER JOIN APC_HUMAN_RESOURCE ahr ON au.id_human_resource = ahr.id +WHERE + ald.loan_details_type = 'TRANSFER' AND + ald.transfer_status = 'PENDING' +ORDER BY ald.created_on; +-- ---------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_LOAN_IN_PENDING_STATUS_TO_DELIVERY_VIEW` +-- +-- ---------------------------------------------------------------------- +CREATE OR REPLACE VIEW `APC_LOAN_IN_PENDING_STATUS_TO_DELIVERY_VIEW` AS +SELECT + al.id AS id_loan, + alt.payment AS payment, + ( +CASE + WHEN date_format(al.created_on,'%m') = '01' + THEN concat(date_format(al.created_on,'%d'),' - Enero - ',date_format(al.created_on,'%Y')) + WHEN date_format(al.created_on,'%m') = '02' + THEN concat(date_format(al.created_on,'%d'),' - Febrero - ',date_format(al.created_on,'%Y')) + WHEN date_format(al.created_on,'%m') = '03' + THEN concat(date_format(al.created_on,'%d'),' - Marzo - ',date_format(al.created_on,'%Y')) + WHEN date_format(al.created_on,'%m') = '04' + THEN concat(date_format(al.created_on,'%d'),' - Abril - ',date_format(al.created_on,'%Y')) + WHEN date_format(al.created_on,'%m') = '05' + THEN concat(date_format(al.created_on,'%d'),' - Mayo - ',date_format(al.created_on,'%Y')) + WHEN date_format(al.created_on,'%m') = '06' + THEN concat(date_format(al.created_on,'%d'),' - Junio - ',date_format(al.created_on,'%Y')) + WHEN date_format(al.created_on,'%m') = '07' + THEN concat(date_format(al.created_on,'%d'),' - Julio - ',date_format(al.created_on,'%Y')) + WHEN date_format(al.created_on,'%m') = '08' + THEN concat(date_format(al.created_on,'%d'),' - Agosto - ',date_format(al.created_on,'%Y')) + WHEN date_format(al.created_on,'%m') = '09' + THEN concat(date_format(al.created_on,'%d'),' - Septiembre - ',date_format(al.created_on,'%Y')) + WHEN date_format(al.created_on,'%m') = '10' + THEN concat(date_format(al.created_on,'%d'),' - Octubre - ',date_format(al.created_on,'%Y')) + WHEN date_format(al.created_on,'%m') = '11' + THEN concat(date_format(al.created_on,'%d'),' - Noviembre - ',date_format(al.created_on,'%Y')) + WHEN date_format(al.created_on,'%m') = '12' + THEN concat(date_format(al.created_on,'%d'),' - Diciembre - ',date_format(al.created_on,'%Y')) +END +) AS str_created_on, +CONCAT( + CASE + WHEN ap_customer.first_name IS NOT NULL AND ap_customer.first_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_customer.first_name), 1, 1),SUBSTR(LOWER(ap_customer.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap_customer.second_name IS NOT NULL AND ap_customer.second_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_customer.second_name), 1, 1),SUBSTR(LOWER(ap_customer.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap_customer.last_name IS NOT NULL AND ap_customer.last_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_customer.last_name), 1, 1),SUBSTR(LOWER(ap_customer.last_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap_customer.middle_name IS NOT NULL AND ap_customer.middle_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_customer.middle_name), 1, 1),SUBSTR(LOWER(ap_customer.middle_name), 2)) + ELSE '' + END +) AS customer_name, +CONCAT( + CASE + WHEN ap_endorsement.first_name IS NOT NULL AND ap_endorsement.first_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_endorsement.first_name), 1, 1),SUBSTR(LOWER(ap_endorsement.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap_endorsement.second_name IS NOT NULL AND ap_endorsement.second_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_endorsement.second_name), 1, 1),SUBSTR(LOWER(ap_endorsement.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap_endorsement.last_name IS NOT NULL AND ap_endorsement.last_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_endorsement.last_name), 1, 1),SUBSTR(LOWER(ap_endorsement.last_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ap_endorsement.middle_name IS NOT NULL AND ap_endorsement.middle_name != '' + THEN CONCAT(SUBSTR(UPPER(ap_endorsement.middle_name), 1, 1),SUBSTR(LOWER(ap_endorsement.middle_name), 2)) + ELSE '' + END +) AS endorsement_name, +CONCAT( + CASE + WHEN ahr.first_name IS NOT NULL AND ahr.first_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.first_name), 1, 1),SUBSTR(LOWER(ahr.first_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahr.second_name IS NOT NULL AND ahr.second_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.second_name), 1, 1),SUBSTR(LOWER(ahr.second_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahr.last_name IS NOT NULL AND ahr.last_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.last_name), 1, 1),SUBSTR(LOWER(ahr.last_name), 2), ' ') + ELSE '' + END, + CASE + WHEN ahr.middle_name IS NOT NULL AND ahr.middle_name != '' + THEN CONCAT(SUBSTR(UPPER(ahr.middle_name), 1, 1),SUBSTR(LOWER(ahr.middle_name), 2)) + ELSE '' + END + ) AS user_name, + al.created_on AS created_on +FROM + APC_LOAN al + INNER JOIN APC_LOAN_TYPE alt ON al.id_loan_type = alt.id + INNER JOIN APC_PEOPLE ap_customer ON al.id_customer = ap_customer.id + INNER JOIN APC_PEOPLE ap_endorsement ON al.id_endorsement = ap_endorsement.id + INNER JOIN APC_USER au ON al.created_by = au.id + INNER JOIN APC_HUMAN_RESOURCE ahr ON au.id_human_resource = ahr.id +WHERE al.loan_status = 'PENDING' +ORDER BY al.created_on ASC; +-- -------------------------------------------------------------------- +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/ace-db/src/create/from/scratch/mora/f1_isMobileEnabledUser.sql b/ace-db/src/create/from/scratch/mora/f1_isMobileEnabledUser.sql new file mode 100644 index 0000000..62fb424 --- /dev/null +++ b/ace-db/src/create/from/scratch/mora/f1_isMobileEnabledUser.sql @@ -0,0 +1,45 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +/** + * Author: Carlos Janitzio Zavala Lopez + * Created: 9 mar. 2022 + */ +DROP FUNCTION IF EXISTS `isMobileEnabledUser`; +-- -------------------------------------------------------- +-- +-- Estructura para la función `isMobileEnabledUser` +-- +-- Verifica que el usuario este activo y que no sea certificador +-- +DELIMITER // +CREATE FUNCTION `isMobileEnabledUser` ( + p_user_id VARCHAR(36) +) +RETURNS BOOL DETERMINISTIC +BEGIN + DECLARE v_is_mobile_enabled_user INT; + + SELECT + COUNT(u.id) INTO v_is_mobile_enabled_user + FROM APC_USER u + INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource + INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id + WHERE u.user_status = 'ENEBLED' AND + u.user_type IN ('MOBILE') AND + u.certifier = 'DISABLED' + AND u.id = CONVERT(p_user_id USING utf8mb4); + + IF v_is_mobile_enabled_user = 1 + THEN + RETURN TRUE; + ELSE + RETURN FALSE; + END IF; + +END; // +DELIMITER ; diff --git a/ace-db/src/janitzio.sql b/ace-db/src/janitzio.sql new file mode 100644 index 0000000..703cae9 --- /dev/null +++ b/ace-db/src/janitzio.sql @@ -0,0 +1,2 @@ +ALTER TABLE APC_DELIVERY +ADD COLUMN comission enum('INCLUDED','EXCLUDED') DEFAULT 'INCLUDED' AFTER amount; \ No newline at end of file diff --git a/ace-db/src/notes.txt b/ace-db/src/notes.txt new file mode 100644 index 0000000..80f752a --- /dev/null +++ b/ace-db/src/notes.txt @@ -0,0 +1,175 @@ +Path web +cd /Users/Picasso/Documents/workspace/arrebol/ApoyoProyectosComerciales/apc-web/ + +SASS command +sass --update src/main/webapp/resources:src/main/webapp/resources --no-source-map + +http://pdqcoders.com/font-based-icons.html +Font: Google Material Icons +-- prueba commit + +# +# Here, or in other properties files in this directory, you can define +# various properties that you want to make available to the template +# processor while creating various templates. +# Lo!Hx?w90$ +# D35aRr0Yad0R +# R1n0c3R0nT3= +# R1n0c3R0nT3= + +# uncomment the next line and specify your user name to be used in new templates +#user=Your Name (AlphaCJZL) +user=Carlos Janitzio Zavala Lopez + + + +<#if licenseFirst??> +${licenseFirst} + +${licensePrefix}Arrebol Consultancy copyright. +${licensePrefix} +${licensePrefix}This code belongs to Arrebol Consultancy +${licensePrefix}its use, redistribution or modification are prohibited +${licensePrefix}without written authorization from Arrebol Consultancy. +<#if licenseLast??> +${licenseLast} + + + +search/payment-details?user=83d2cd30-8e1d-11ea-b65e-4e1376171215&personSearch=67b3081e-8bc9-11ea-b45c-c7b846343364 + +Cambios para abono con transferencia bancaria. +alter table +web services y web deberan ser desplegados en prod. + + +-- EJECUTIVO 5751074e-7d1b-11ea-af3e-28f659da398e +-- recursos.humanos 564f976d-e869-11ea-b7e1-02907d0fb4e6 +-- gerencia 42e99ff0-e59c-11ea-b7e1-02907d0fb4e6 + + +INSERT INTO `APC_PERMISSION` +(`id`, `permission`, `description`, `menu_path`, `left_to_right_order`, `top_to_bottom_order` , + `permission_type`, `permission_status`,`created_by`, `parent_name`) +VALUES +('073fba18-2a8e-11eb-9de2-a30e5a9c0028','admin.loan.change.owner', 'admin.loan.change.owner.description', 'admin.loan.change.owner.path', 10, 110,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.loan'), +('50942348-2a8e-11eb-9de2-a30e5a9c0028','admin.loan.change.owner.update', 'admin.loan.change.owner.update.description', 'admin.loan.change.owner.update.path', 10, 111,'PRIVATE', 'ENEBLED', '0dc7c246-7db8-11ea-9b1f-500320958bf8','admin.loan'); + +INSERT INTO `APC_USER_BY_OFFICE_HAS_PERMISSION` +(`id_user_by_office`,`id_permission`,`created_by`,`created_on`) +VALUES +('bbb978f3-e59c-11ea-b7e1-02907d0fb4e6','073fba18-2a8e-11eb-9de2-a30e5a9c0028','42e99ff0-e59c-11ea-b7e1-02907d0fb4e6',NOW()), +('bbb978f3-e59c-11ea-b7e1-02907d0fb4e6','50942348-2a8e-11eb-9de2-a30e5a9c0028','42e99ff0-e59c-11ea-b7e1-02907d0fb4e6',NOW()), +('894b4e5c-e869-11ea-b7e1-02907d0fb4e6','073fba18-2a8e-11eb-9de2-a30e5a9c0028','42e99ff0-e59c-11ea-b7e1-02907d0fb4e6',NOW()), +('894b4e5c-e869-11ea-b7e1-02907d0fb4e6','50942348-2a8e-11eb-9de2-a30e5a9c0028','42e99ff0-e59c-11ea-b7e1-02907d0fb4e6',NOW()), +('a742dfe8-7d20-11ea-af3e-28f659da398e','073fba18-2a8e-11eb-9de2-a30e5a9c0028','42e99ff0-e59c-11ea-b7e1-02907d0fb4e6',NOW()), +('a742dfe8-7d20-11ea-af3e-28f659da398e','50942348-2a8e-11eb-9de2-a30e5a9c0028','42e99ff0-e59c-11ea-b7e1-02907d0fb4e6',NOW()),; +COMMIT; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_CURRENT_CUSTOMER_BY_LOAN_VIEW` +-- SIRVE PARA TRAER LOS PRESTAMOS CON SUS CLIENTES, AVALES Y ASESORES. +-- +-- -------------------------------------------------------------------- +CREATE OR REPLACE VIEW `APC_CURRENT_CUSTOMER_BY_LOAN_VIEW` AS +SELECT +loan.id AS id_loan, +usr.id AS id_user, +usr_by_office.id_office AS id_office, +loan_type.payment AS payment, +CONCAT( + CASE + WHEN customer.first_name IS NOT NULL AND customer.first_name != '' + THEN CONCAT(SUBSTR(UPPER(customer.first_name), 1, 1),SUBSTR(LOWER(customer.first_name), 2)) + ELSE '' + END, + CASE + WHEN customer.second_name IS NOT NULL AND customer.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(customer.second_name), 1, 1),SUBSTR(LOWER(customer.second_name), 2)) + ELSE '' + END, + CASE + WHEN customer.last_name IS NOT NULL AND customer.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(customer.last_name), 1, 1),SUBSTR(LOWER(customer.last_name), 2)) + ELSE '' + END, + CASE + WHEN customer.middle_name IS NOT NULL AND customer.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(customer.middle_name), 1, 1),SUBSTR(LOWER(customer.middle_name), 2)) + ELSE '' + END + ) AS customer_name, + CONCAT( + CASE + WHEN endorsement.first_name IS NOT NULL AND endorsement.first_name != '' + THEN CONCAT(SUBSTR(UPPER(endorsement.first_name), 1, 1),SUBSTR(LOWER(endorsement.first_name), 2)) + ELSE '' + END, + CASE + WHEN endorsement.second_name IS NOT NULL AND endorsement.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(endorsement.second_name), 1, 1),SUBSTR(LOWER(endorsement.second_name), 2)) + ELSE '' + END, + CASE + WHEN endorsement.last_name IS NOT NULL AND endorsement.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(endorsement.last_name), 1, 1),SUBSTR(LOWER(endorsement.last_name), 2)) + ELSE '' + END, + CASE + WHEN endorsement.middle_name IS NOT NULL AND endorsement.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(endorsement.middle_name), 1, 1),SUBSTR(LOWER(endorsement.middle_name), 2)) + ELSE '' + END + ) AS endorsement_name, + loan.loan_status AS loan_status, + loan.created_on AS created_on, + route.route_name AS route_name +FROM APC_LOAN loan +INNER JOIN APC_PEOPLE customer ON loan.id_customer = customer.id +INNER JOIN APC_PEOPLE endorsement ON loan.id_endorsement = endorsement.id +INNER JOIN APC_LOAN_TYPE loan_type ON loan.id_loan_type = loan_type.id +INNER JOIN APC_LOAN_BY_USER loan_by_user ON loan.id = loan_by_user.id_loan +INNER JOIN APC_USER usr ON loan_by_user.id_user = usr.id +INNER JOIN APC_USER_BY_OFFICE usr_by_office ON usr.id = usr_by_office.id_user +INNER JOIN APC_ROUTE route ON loan.id_route = route.id +WHERE loan.loan_status IN('APPROVED','PENDING','PENDING_RENOVATION','TO_DELIVERY') +ORDER BY usr.id, loan.created_on; +-- -------------------------------------------------------------------- +-- +-- Estructura para la vista `APC_AVAILABLES_OWNERS_VIEW` +-- REGRESA LOS USUARIOS ACTIVOS DE TIPO MOBILE AND BOTH. +-- +-- -------------------------------------------------------------------- +CREATE OR REPLACE VIEW `APC_AVAILABLES_OWNERS_VIEW` AS +SELECT +usr.id AS id_user, +usr_by_office.id_office AS id_office, +usr.user_name AS user_name, +CONCAT( + CASE + WHEN human_resource.first_name IS NOT NULL AND human_resource.first_name != '' + THEN CONCAT(SUBSTR(UPPER(human_resource.first_name), 1, 1),SUBSTR(LOWER(human_resource.first_name), 2)) + ELSE '' + END, + CASE + WHEN human_resource.second_name IS NOT NULL AND human_resource.second_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(human_resource.second_name), 1, 1),SUBSTR(LOWER(human_resource.second_name), 2)) + ELSE '' + END, + CASE + WHEN human_resource.last_name IS NOT NULL AND human_resource.last_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(human_resource.last_name), 1, 1),SUBSTR(LOWER(human_resource.last_name), 2)) + ELSE '' + END, + CASE + WHEN human_resource.middle_name IS NOT NULL AND human_resource.middle_name != '' + THEN CONCAT(' ',SUBSTR(UPPER(human_resource.middle_name), 1, 1),SUBSTR(LOWER(human_resource.middle_name), 2)) + ELSE '' + END + ) AS full_name +FROM APC_USER usr +INNER JOIN APC_HUMAN_RESOURCE human_resource ON usr.id_human_resource = human_resource.id +INNER JOIN APC_USER_BY_OFFICE usr_by_office ON usr.id = usr_by_office.id_user +WHERE usr.user_status = 'ENEBLED' AND +usr.user_type IN ('MOBILE','BOTH') AND +usr.certifier = 'DISABLED'; \ No newline at end of file diff --git a/ace-db/src/oscar.sql b/ace-db/src/oscar.sql new file mode 100644 index 0000000..cb1c81e --- /dev/null +++ b/ace-db/src/oscar.sql @@ -0,0 +1,493 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +/** + * Author: Oscar Armando Vargas Cardenas + * Created: 28/10/2020 + */ + +CREATE OR REPLACE VIEW `APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW_REPORT` AS +SELECT + ld.id, + CONCAT(p.first_name,' ',IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name, ' ')),p.last_name,' ', p.middle_name) AS comments, + ld.payment_amount as amount, + CASE + WHEN ld.loan_details_type = 'PAYMENT' THEN 'Abono' + WHEN ld.loan_details_type = 'FEE' THEN 'Multa' + WHEN ld.loan_details_type = 'TRANSFER' THEN 'Depósito' + ELSE '' END as type, + ld.id_user, + ld.created_on, + l.created_on as fechaFiltro, + 'xxxx' as route, + (l.amount_to_pay - amount_paid) as saldo, + 0 as comisionApertura, + 0 as prestamoAnterior +FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l ON ld.id_loan = l.id +INNER JOIN APC_PEOPLE p ON l.id_customer = p.id +WHERE DATE(ld.created_on) = CURDATE() +AND ld.loan_details_type in ('PAYMENT', 'FEE', 'TRANSFER' ) +UNION +SELECT + md.id, + DATE(md.money_daily_date) AS comments, + md.amount as amount, + 'Inicio' as type, + md.id_user, + md.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo, + 0 as comisionApertura, + 0 as prestamoAnterior +FROM + APC_MONEY_DAILY md +WHERE DATE(md.money_daily_date) = CURDATE() +UNION +SELECT + oe.id, + oe.description, + oe.expense, + 'Gasto', + oe.id_user, + oe.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo, + 0 as comisionApertura, + 0 as prestamoAnterior +FROM + APC_OTHER_EXPENSE oe +WHERE DATE(oe.created_on) = CURDATE() +UNION +SELECT + te.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name), + te.amount_to_transfer, + 'Transferencia enviada', + te.id_user_transmitter, + te.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo, + 0 as comisionApertura, + 0 as prestamoAnterior +FROM + APC_TRANSFER te +JOIN + APC_USER u on u.id = te.id_user_receiver +JOIN + APC_HUMAN_RESOURCE hr on hr.id = u.id_human_resource +WHERE DATE(te.created_on) = CURDATE() and te.action_status = 'APPROVED' +UNION +SELECT + tr.id, + CONCAT(hr.first_name,' ',IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name, ' ')),hr.last_name,' ', hr.middle_name), + tr.amount_to_transfer, + 'Transferencia recibida', + tr.id_user_receiver, + tr.created_on, + CURDATE() as fechaFiltro, + 'xxxx' as route, + 0 as saldo, + 0 as comisionApertura, + 0 as prestamoAnterior +FROM + APC_TRANSFER tr +JOIN + APC_USER u on u.id = tr.id_user_transmitter +JOIN + APC_HUMAN_RESOURCE hr on hr.id = u.id_human_resource +WHERE DATE(tr.created_on) = CURDATE() and tr.action_status = 'APPROVED' +UNION +SELECT + d.id, + CONCAT(p.first_name,' ',IF(ISNULL(p.second_name) ,'', CONCAT(p.second_name, ' ')),p.last_name,' ', p.middle_name), + d.amount, + 'Entrega de préstamo', + d.id_user, + d.created_on, + CURDATE() as fechaFiltro, + r.route_name as route, + CASE WHEN (SELECT (l2.amount_to_pay - l2.amount_paid) FROM APC_LOAN_BY_RENOVATION lr + INNER JOIN APC_LOAN l2 ON l2.id = lr.id_loan_old + WHERE lr.id_loan_new = l.id) is null THEN 0 ELSE + (SELECT (l2.amount_to_pay - l2.amount_paid) FROM APC_LOAN_BY_RENOVATION lr + INNER JOIN APC_LOAN l2 ON l2.id = lr.id_loan_old + WHERE lr.id_loan_new = l.id) END as saldo, + lt.opening_fee as comisionApertura, + (SELECT CASE WHEN ld.payment_amount is null or 0 THEN 0 ELSE ld.payment_amount END FROM APC_LOAN_DETAIL ld +INNER JOIN APC_LOAN l3 ON ld.id_loan = l3.id +WHERE ld.loan_details_type = 'RENOVATION_PAYMENT' +AND l3.id = (SELECT albr.id_loan_old FROM APC_LOAN_BY_RENOVATION albr WHERE albr.id_loan_new = l.id)) as prestamoAnterior +FROM APC_DELIVERY d +INNER JOIN APC_LOAN l ON d.id_loan = l.id +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE p ON l.id_customer = p.id +INNER JOIN APC_ROUTE r ON r.id = l.id_route +WHERE DATE(d.created_on) = CURDATE(); + + +CREATE OR REPLACE VIEW `APC_RESUMEN_IN_OUT_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +-- Lunes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday') as closing_monday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'monday') as expense_monday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'monday') as money_daily_today_monday, +-- Martes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday') as closing_tuesday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'tuesday') as expense_tuesday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'tuesday') as money_daily_today_tuesday, +-- Miercoles +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday') as closing_wednesday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'wednesday') as expense_wednesday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'wednesday') as money_daily_today_wednesday, +-- Jueves +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday') as closing_thursday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'thursday') as expense_thursday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'thursday') as money_daily_today_thursday, +-- Viernes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday') as closing_friday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'friday') as expense_friday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'friday') as money_daily_today_friday, +-- Sabado +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday') as closing_saturday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'saturday') as expense_saturday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'saturday') as money_daily_today_saturday +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE','BOTH'); + +CREATE OR REPLACE VIEW `APC_RESUMEN_IN_OUT_LAST_WEEK_BY_USER_VIEW` AS +SELECT +u.id, +CONCAT(hr.first_name, ' ' , hr.last_name) as username, +ubo.id_office, +-- Lunes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'monday') as closing_monday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'monday') as expense_monday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'monday') as money_daily_today_monday, +-- Martes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'tuesday') as closing_tuesday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'tuesday') as expense_tuesday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'tuesday') as money_daily_today_tuesday, +-- Miercoles +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'wednesday') as closing_wednesday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'wednesday') as expense_wednesday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'wednesday') as money_daily_today_wednesday, +-- Jueves +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'thursday') as closing_thursday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'thursday') as expense_thursday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'thursday') as money_daily_today_thursday, +-- Viernes +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'friday') as closing_friday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'friday') as expense_friday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'friday') as money_daily_today_friday, +-- Sabado +(SELECT IF(ISNULL(SUM(ld.amount_paid)),0,SUM(ld.amount_paid)) +FROM APC_CLOSING_DAY ld +WHERE ld.id_user = u.id AND WEEK(DATE(ld.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.active_status = 'ENEBLED' +AND LOWER(DAYNAME(DATE(ld.created_on))) = 'saturday') as closing_saturday, +(SELECT IF(ISNULL(SUM(oe.expense)),0,SUM(oe.expense)) +FROM APC_OTHER_EXPENSE oe +WHERE oe.id_user = u.id AND WEEK(DATE(oe.created_on),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(oe.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(oe.created_on))) = 'saturday') as expense_saturday, +(SELECT IF(ISNULL(SUM(md.amount)),0,SUM(md.amount)) +FROM APC_MONEY_DAILY md +WHERE md.id_user = u.id AND WEEK(DATE(md.money_daily_date),1) = (WEEK(CURDATE(),1) - 1) AND +YEAR(DATE(md.money_daily_date)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(md.money_daily_date))) = 'saturday') as money_daily_today_saturday +FROM APC_USER u +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +INNER JOIN APC_USER_BY_OFFICE ubo ON ubo.id_user = u.id +WHERE u.user_status = 'ENEBLED' AND +u.user_type IN ('MOBILE','BOTH'); + + +CREATE OR REPLACE VIEW `APC_INFORMATION_LOAN_WEEK_VIEW` AS +SELECT +l.id, +u.id as id_user, +r.id_office, +l.created_on as fecha, +lt.payment as apoyos, +lt.payment_total as apoyos_total, +lt.opening_fee as comision_apertura, +CONCAT(endor.first_name,' ', IF(ISNULL(endor.second_name) ,'', CONCAT(endor.second_name,' ')) ,endor.last_name, ' ', endor.middle_name) AS aval, +CONCAT(cus.first_name,' ', IF(ISNULL(cus.second_name) ,'', CONCAT(cus.second_name,' ')) ,cus.last_name, ' ', cus.middle_name) AS customer, +l.amount_to_pay as documento_por, +lt.payment_daily as abono_diario, +l.amount_paid, +(l.amount_to_pay - l.amount_paid) saldo_insoluto, +r.route_name, +CONCAT(hr.first_name,' ', IF(ISNULL(hr.second_name) ,'', CONCAT(hr.second_name,' ')) ,hr.last_name, ' ', hr.middle_name) AS asesor, +(SELECT COUNT(lfn.id) FROM APC_LOAN_FEE_NOTIFICATION lfn WHERE lfn.id_loan = l.id) as num_fee, +-- Lunes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_monday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'monday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_monday, +-- Martes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_tuesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'tuesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_tuesday, +-- Miercoles +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) +AND YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_wednesday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'wednesday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_wednesday, +-- Jueves +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_thursday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'thursday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_thursday, +-- Viernes +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_friday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'friday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_friday, +-- Sabado +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')) as payment_saturday, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND LOWER(DAYNAME(DATE(ldLunes.created_on))) = 'saturday' +AND ldLunes.loan_details_type IN ('FEE')) as fee_saturday, + +((lt.payment_daily * (SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5 , COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE'))) +- (SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) = WEEK(CURDATE(),1) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))) as faltante, + +CASE WHEN l.new_customer = 'ENEBLED' AND WEEK(DATE(l.created_on),1) = WEEK(CURDATE(),1) THEN 'Si' ELSE 'No' END as new_customer, +if((SELECT COUNT(id_loan_old) FROM APC_LOAN_BY_RENOVATION lbr +INNER JOIN APC_LOAN lRenovation ON lbr.id_loan_new = lRenovation.id +WHERE id_loan_old = l.id + AND loan_by_renovation_status = 'APPROVED' and WEEK(DATE(lRenovation.created_on),1) <= WEEK(CURDATE(),1) AND + YEAR(DATE(lRenovation.created_on)) = YEAR(CURDATE())) = 0 , 'No' , 'Si') as renovation, +l.loan_status as estatus_prestamo, +(SELECT COUNT(DISTINCT(DATE(ldFaltante.created_on))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) <= (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_all, +(SELECT IF(COUNT(DISTINCT(DATE(ldFaltante.created_on))) > 5, 5, COUNT(DISTINCT(DATE(ldFaltante.created_on)))) FROM APC_LOAN_DETAIL ldFaltante +WHERE ldFaltante.id_loan = l.id AND WEEK(DATE(ldFaltante.created_on),1) = (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldFaltante.created_on)) = YEAR(CURDATE()) and LOWER(DAYNAME(DATE(ldFaltante.created_on))) NOT IN('saturday','sunday') +AND ldFaltante.loan_details_type IN ('PAYMENT','RENOVATION_PAYMENT','TRANSFER', 'FEE')) as num_pagos_week, +(SELECT IF(ISNULL(SUM(ldLunes.payment_amount)),0,SUM(ldLunes.payment_amount)) +FROM APC_LOAN_DETAIL ldLunes +WHERE ldLunes.id_loan = l.id AND WEEK(DATE(ldLunes.created_on),1) <= (WEEK(CURDATE(),1)) AND +YEAR(DATE(ldLunes.created_on)) = YEAR(CURDATE()) +AND ldLunes.loan_details_type IN ('FEE')) as fee_todos +FROM +APC_LOAN l +INNER JOIN APC_LOAN_TYPE lt ON l.id_loan_type = lt.id +INNER JOIN APC_PEOPLE cus ON cus.id = l.id_customer +INNER JOIN APC_PEOPLE endor ON endor.id = l.id_endorsement +INNER JOIN APC_ROUTE r ON r.id = l.id_route +INNER JOIN APC_LOAN_BY_USER lbu ON lbu.id_loan = l.id +INNER JOIN APC_USER u ON u.id = lbu.id_user +INNER JOIN APC_HUMAN_RESOURCE hr ON hr.id = u.id_human_resource +WHERE +l.loan_status not in ('DELETED','REJECTED') AND +((SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) > 0 OR + ((SELECT COUNT(ld.id) FROM APC_LOAN_DETAIL ld WHERE WEEK(DATE(ld.created_on),1) = WEEK(CURDATE(),1) AND + YEAR(DATE(ld.created_on)) = YEAR(CURDATE()) AND ld.id_loan = l.id) = 0 AND l.loan_status = 'APPROVED' AND + WEEK(DATE(l.created_on),1) <= (WEEK(CURDATE(),1)))); \ No newline at end of file diff --git a/ace-db/src/respaldo_xxxxxxxx.sql b/ace-db/src/respaldo_xxxxxxxx.sql new file mode 100644 index 0000000..e5ea235 --- /dev/null +++ b/ace-db/src/respaldo_xxxxxxxx.sql @@ -0,0 +1,3 @@ +CREATE OR REPLACE VIEW `APC_INFORMATION_LOAN_WEEK_VIEW` AS +select `l`.`id` AS `id`,`u`.`id` AS `id_user`,`r`.`id_office` AS `id_office`,`l`.`created_on` AS `fecha`,`lt`.`payment` AS `apoyos`,`lt`.`payment_total` AS `apoyos_total`,`lt`.`opening_fee` AS `comision_apertura`,concat(`endor`.`first_name`,' ',if((`endor`.`second_name` is null),'',concat(`endor`.`second_name`,' ')),`endor`.`last_name`,' ',`endor`.`middle_name`) AS `aval`,concat(`cus`.`first_name`,' ',if((`cus`.`second_name` is null),'',concat(`cus`.`second_name`,' ')),`cus`.`last_name`,' ',`cus`.`middle_name`) AS `customer`,`l`.`amount_to_pay` AS `documento_por`,`lt`.`payment_daily` AS `abono_diario`,`l`.`amount_paid` AS `amount_paid`,(`l`.`amount_to_pay` - `l`.`amount_paid`) AS `saldo_insoluto`,`r`.`route_name` AS `route_name`,concat(`hr`.`first_name`,' ',if((`hr`.`second_name` is null),'',concat(`hr`.`second_name`,' ')),`hr`.`last_name`,' ',`hr`.`middle_name`) AS `asesor`,(select count(`lfn`.`id`) from `APC_LOAN_FEE_NOTIFICATION` `lfn` where (`lfn`.`id_loan` = `l`.`id`)) AS `num_fee`,(select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldLunes`.`created_on` as date))) = 'monday') and (`ldLunes`.`loan_details_type` in ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')))) AS `payment_monday`,(select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldLunes`.`created_on` as date))) = 'monday') and (`ldLunes`.`loan_details_type` = 'FEE'))) AS `fee_monday`,(select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldLunes`.`created_on` as date))) = 'tuesday') and (`ldLunes`.`loan_details_type` in ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')))) AS `payment_tuesday`,(select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldLunes`.`created_on` as date))) = 'tuesday') and (`ldLunes`.`loan_details_type` = 'FEE'))) AS `fee_tuesday`,(select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldLunes`.`created_on` as date))) = 'wednesday') and (`ldLunes`.`loan_details_type` in ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')))) AS `payment_wednesday`,(select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldLunes`.`created_on` as date))) = 'wednesday') and (`ldLunes`.`loan_details_type` = 'FEE'))) AS `fee_wednesday`,(select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldLunes`.`created_on` as date))) = 'thursday') and (`ldLunes`.`loan_details_type` in ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')))) AS `payment_thursday`,(select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldLunes`.`created_on` as date))) = 'thursday') and (`ldLunes`.`loan_details_type` = 'FEE'))) AS `fee_thursday`,(select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldLunes`.`created_on` as date))) = 'friday') and (`ldLunes`.`loan_details_type` in ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')))) AS `payment_friday`,(select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldLunes`.`created_on` as date))) = 'friday') and (`ldLunes`.`loan_details_type` = 'FEE'))) AS `fee_friday`,(select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldLunes`.`created_on` as date))) = 'saturday') and (`ldLunes`.`loan_details_type` in ('PAYMENT','RENOVATION_PAYMENT','TRANSFER')))) AS `payment_saturday`,(select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldLunes`.`created_on` as date))) = 'saturday') and (`ldLunes`.`loan_details_type` = 'FEE'))) AS `fee_saturday`,((`lt`.`payment_daily` * (select if((count(distinct cast(`ldFaltante`.`created_on` as date)) > 5),5,count(distinct cast(`ldFaltante`.`created_on` as date))) from `APC_LOAN_DETAIL` `ldFaltante` where ((`ldFaltante`.`id_loan` = `l`.`id`) and (week(cast(`ldFaltante`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldFaltante`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldFaltante`.`created_on` as date))) not in ('saturday','sunday')) and (`ldFaltante`.`loan_details_type` in ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE'))))) - (select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (`ldLunes`.`loan_details_type` in ('PAYMENT','RENOVATION_PAYMENT','TRANSFER'))))) AS `faltante`,(case when ((`l`.`new_customer` = 'ENEBLED') and (week(cast(`l`.`created_on` as date),1) = week(curdate(),1))) then 'Si' else 'No' end) AS `new_customer`,if(((select count(`lbr`.`id_loan_old`) from (`APC_LOAN_BY_RENOVATION` `lbr` join `APC_LOAN` `lRenovation` on((`lbr`.`id_loan_new` = `lRenovation`.`id`))) where ((`lbr`.`id_loan_old` = `l`.`id`) and (`lbr`.`loan_by_renovation_status` = 'APPROVED') and (week(cast(`lRenovation`.`created_on` as date),1) <= week(curdate(),1)) and (year(cast(`lRenovation`.`created_on` as date)) = year(curdate())))) = 0),'No','Si') AS `renovation`,`l`.`loan_status` AS `estatus_prestamo`,(select count(distinct cast(`ldFaltante`.`created_on` as date)) from `APC_LOAN_DETAIL` `ldFaltante` where ((`ldFaltante`.`id_loan` = `l`.`id`) and (week(cast(`ldFaltante`.`created_on` as date),1) <= week(curdate(),1)) and (year(cast(`ldFaltante`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldFaltante`.`created_on` as date))) not in ('saturday','sunday')) and (`ldFaltante`.`loan_details_type` in ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')))) AS `num_pagos_all`,(select if((count(distinct cast(`ldFaltante`.`created_on` as date)) > 5),5,count(distinct cast(`ldFaltante`.`created_on` as date))) from `APC_LOAN_DETAIL` `ldFaltante` where ((`ldFaltante`.`id_loan` = `l`.`id`) and (week(cast(`ldFaltante`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ldFaltante`.`created_on` as date)) = year(curdate())) and (lower(dayname(cast(`ldFaltante`.`created_on` as date))) not in ('saturday','sunday')) and (`ldFaltante`.`loan_details_type` in ('PAYMENT','RENOVATION_PAYMENT','TRANSFER','FEE')))) AS `num_pagos_week`,(select if((sum(`ldLunes`.`payment_amount`) is null),0,sum(`ldLunes`.`payment_amount`)) from `APC_LOAN_DETAIL` `ldLunes` where ((`ldLunes`.`id_loan` = `l`.`id`) and (week(cast(`ldLunes`.`created_on` as date),1) <= week(curdate(),1)) and (year(cast(`ldLunes`.`created_on` as date)) = year(curdate())) and (`ldLunes`.`loan_details_type` = 'FEE'))) AS `fee_todos` from (((((((`APC_LOAN` `l` join `APC_LOAN_TYPE` `lt` on((`l`.`id_loan_type` = `lt`.`id`))) join `APC_PEOPLE` `cus` on((`cus`.`id` = `l`.`id_customer`))) join `APC_PEOPLE` `endor` on((`endor`.`id` = `l`.`id_endorsement`))) join `APC_ROUTE` `r` on((`r`.`id` = `l`.`id_route`))) join `APC_LOAN_BY_USER` `lbu` on((`lbu`.`id_loan` = `l`.`id`))) join `APC_USER` `u` on((`u`.`id` = `lbu`.`id_user`))) join `APC_HUMAN_RESOURCE` `hr` on((`hr`.`id` = `u`.`id_human_resource`))) where ((`l`.`loan_status` not in ('DELETED','REJECTED')) and (((select count(`ld`.`id`) from `APC_LOAN_DETAIL` `ld` where ((week(cast(`ld`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ld`.`created_on` as date)) = year(curdate())) and (`ld`.`id_loan` = `l`.`id`))) > 0) or (((select count(`ld`.`id`) from `APC_LOAN_DETAIL` `ld` where ((week(cast(`ld`.`created_on` as date),1) = week(curdate(),1)) and (year(cast(`ld`.`created_on` as date)) = year(curdate())) and (`ld`.`id_loan` = `l`.`id`))) = 0) and (`l`.`loan_status` = 'APPROVED') and (week(cast(`l`.`created_on` as date),1) <= week(curdate(),1))))); + diff --git a/ace-db/src/to_execute.sql b/ace-db/src/to_execute.sql new file mode 100644 index 0000000..0888b11 --- /dev/null +++ b/ace-db/src/to_execute.sql @@ -0,0 +1,11 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +/** + * Author: Oscar Armando Vargas Cardenas + * Created: 1/03/2021 + */ \ No newline at end of file diff --git a/ace-db/src/to_update.sql b/ace-db/src/to_update.sql new file mode 100644 index 0000000..a463898 --- /dev/null +++ b/ace-db/src/to_update.sql @@ -0,0 +1,44 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +/** + * Author: Oscar + * Created: 26/10/2021 + */ + +ALTER TABLE `apo_pro_com_april_ten`.`apc_loan_employee` +ADD COLUMN `payroll` ENUM('ENEBLED', 'DISABLED') NOT NULL AFTER `total_amount_to_pay`, +ADD COLUMN `active_status` ENUM('ENEBLED', 'DISABLED') NULL AFTER `payroll`; + + +/*Updates de donadony*/ +ALTER TABLE `apo_pro_com_april_ten`.`apc_loan_employee_detail` +ADD COLUMN `payroll` ENUM('ENEBLED', 'DISABLED') NOT NULL DEFAULT 'ENEBLED' AFTER `created_on`; + + +/*Update Base de datos saving view*/ +CREATE + OR REPLACE +VIEW `APC_STATS_EMPLOYEE_SAVING_VIEW` AS + SELECT + `es`.`id` AS `id`, + `es`.`id_user` AS `id_user`, + CONCAT(`hr`.`first_name`, ' ', `hr`.`last_name`) AS `name`, + `hrr`.`route_name` AS `route_name`, + `es`.`employee_saving` AS `employee_saving`, + `es`.`created_on` AS `created_on`, + `es`.`Type` AS `Type` + FROM + ((`APC_EMPLOYEE_SAVING` `es` + JOIN `APC_HUMAN_RESOURCE` `hr` ON ((`es`.`id_user` = `hr`.`id`))) + LEFT JOIN (SELECT + `hrr`.`id_human_resource` AS `id_human_resource`, + GROUP_CONCAT(DISTINCT `r`.`route_name` + SEPARATOR ',') AS `route_name` + FROM + (`APC_HUMAN_RESOURCE_HAS_ROUTE` `hrr` + LEFT JOIN `APC_ROUTE` `r` ON ((`hrr`.`id_route` = `r`.`id`))) + GROUP BY `hrr`.`id_human_resource`) `hrr` ON ((`hr`.`id` = `hrr`.`id_human_resource`))) + diff --git a/ace-layout/nb-configuration.xml b/ace-layout/nb-configuration.xml new file mode 100644 index 0000000..a65c451 --- /dev/null +++ b/ace-layout/nb-configuration.xml @@ -0,0 +1,18 @@ + + + + + + JDK_1.8 + + diff --git a/ace-layout/pom.xml b/ace-layout/pom.xml new file mode 100644 index 0000000..c18ff59 --- /dev/null +++ b/ace-layout/pom.xml @@ -0,0 +1,125 @@ + + + 4.0.0 + com.arrebol + ace-layout + 1.0.0 + jar + + UTF-8 + 1.8 + 1.8 + 2.0.20 + 2.3.14 + 1.3.24 + 5.0.0 + + + + org.primefaces + primefaces + 6.2 + + + + org.glassfish + jakarta.faces + ${mojarra.version} + + + javax.el + javax.el-api + 3.0.0 + provided + + + javax.servlet + javax.servlet-api + 3.1.0 + provided + + + + + org.apache.geronimo.specs + geronimo-atinject_1.0_spec + 1.0 + + + org.apache.geronimo.specs + geronimo-jcdi_2.0_spec + 1.1 + + + org.apache.geronimo.specs + geronimo-interceptor_1.2_spec + 1.0 + + + org.apache.geronimo.specs + geronimo-annotation_1.3_spec + 1.0 + + + + + org.apache.openwebbeans + openwebbeans-impl + ${owb.version} + + + org.apache.openwebbeans + openwebbeans-web + ${owb.version} + + + org.apache.openwebbeans + openwebbeans-jsf + ${owb.version} + + + + + org.apache.poi + poi + ${poi.version} + + + org.apache.poi + poi-ooxml + ${poi.version} + + + org.apache.xmlgraphics + batik-all + + + de.rototor.pdfbox + graphics2d + + + org.apache.santuario + xmlsec + + + org.bouncycastle + bcpkix-jdk15on + + + com.github.virtuald + curvesapi + + + org.bouncycastle + bcprov-jdk15on + + + + + com.github.librepdf + openpdf + ${open-pdf.version} + + + ace-layout + \ No newline at end of file diff --git a/ace-layout/src/main/java/org/primefaces/serenity/component/SerenityMenu.java b/ace-layout/src/main/java/org/primefaces/serenity/component/SerenityMenu.java new file mode 100644 index 0000000..8b8f2b3 --- /dev/null +++ b/ace-layout/src/main/java/org/primefaces/serenity/component/SerenityMenu.java @@ -0,0 +1,130 @@ +package org.primefaces.serenity.component; + +import javax.faces.component.UIComponent; +import org.primefaces.component.menu.AbstractMenu; +import javax.faces.context.FacesContext; +import javax.faces.component.UINamingContainer; +import javax.faces.component.UIOutput; +import javax.faces.component.UIViewRoot; +import javax.faces.event.AbortProcessingException; +import javax.faces.event.ComponentSystemEvent; +import javax.faces.event.ComponentSystemEventListener; +import javax.faces.event.ListenerFor; +import javax.faces.event.PostAddToViewEvent; +import org.primefaces.component.api.Widget; + +@ListenerFor(sourceClass = SerenityMenu.class, systemEventClass = PostAddToViewEvent.class) +public class SerenityMenu extends AbstractMenu implements Widget,ComponentSystemEventListener { + + public static final String COMPONENT_TYPE = "org.primefaces.component.SerenityMenu"; + public static final String COMPONENT_FAMILY = "org.primefaces.component"; + private static final String DEFAULT_RENDERER = "org.primefaces.component.SerenityMenuRenderer"; + private static final String[] LEGACY_RESOURCES = new String[]{"primefaces.css","jquery/jquery.js","jquery/jquery-plugins.js","primefaces.js"}; + private static final String[] MODERN_RESOURCES = new String[]{"components.css","jquery/jquery.js","jquery/jquery-plugins.js","core.js"}; + + protected enum PropertyKeys { + + widgetVar, model, style, styleClass, closeDelay; + + String toString; + + PropertyKeys(String toString) { + this.toString = toString; + } + + PropertyKeys() { + } + + public String toString() { + return ((this.toString != null) ? this.toString : super.toString()); + } + } + + public SerenityMenu() { + setRendererType(DEFAULT_RENDERER); + } + + public String getFamily() { + return COMPONENT_FAMILY; + } + + public java.lang.String getWidgetVar() { + return (java.lang.String) getStateHelper().eval(PropertyKeys.widgetVar, null); + } + + public void setWidgetVar(java.lang.String _widgetVar) { + getStateHelper().put(PropertyKeys.widgetVar, _widgetVar); + } + + public org.primefaces.model.menu.MenuModel getModel() { + return (org.primefaces.model.menu.MenuModel) getStateHelper().eval(PropertyKeys.model, null); + } + + public void setModel(org.primefaces.model.menu.MenuModel _model) { + getStateHelper().put(PropertyKeys.model, _model); + } + + public java.lang.String getStyle() { + return (java.lang.String) getStateHelper().eval(PropertyKeys.style, null); + } + + public void setStyle(java.lang.String _style) { + getStateHelper().put(PropertyKeys.style, _style); + } + + public java.lang.String getStyleClass() { + return (java.lang.String) getStateHelper().eval(PropertyKeys.styleClass, null); + } + + public void setStyleClass(java.lang.String _styleClass) { + getStateHelper().put(PropertyKeys.styleClass, _styleClass); + } + + public int getCloseDelay() { + return (java.lang.Integer) getStateHelper().eval(PropertyKeys.closeDelay, 250); + } + public void setCloseDelay(int _closeDelay) { + getStateHelper().put(PropertyKeys.closeDelay, _closeDelay); + } + + public String resolveWidgetVar() { + FacesContext context = getFacesContext(); + String userWidgetVar = (String) getAttributes().get("widgetVar"); + + if (userWidgetVar != null) { + return userWidgetVar; + } else { + return "widget_" + getClientId(context).replaceAll("-|" + UINamingContainer.getSeparatorChar(context), "_"); + } + } + + @Override + public void processEvent(ComponentSystemEvent event) throws AbortProcessingException { + if(event instanceof PostAddToViewEvent) { + FacesContext context = getFacesContext(); + UIViewRoot root = context.getViewRoot(); + + boolean isPrimeConfig; + try { + isPrimeConfig = Class.forName("org.primefaces.config.PrimeConfiguration") != null; + } catch (ClassNotFoundException e) { + isPrimeConfig = false; + } + + String[] resources = (isPrimeConfig) ? MODERN_RESOURCES : LEGACY_RESOURCES; + + for(String res : resources) { + UIComponent component = context.getApplication().createComponent(UIOutput.COMPONENT_TYPE); + if(res.endsWith("css")) + component.setRendererType("javax.faces.resource.Stylesheet"); + else if(res.endsWith("js")) + component.setRendererType("javax.faces.resource.Script"); + + component.getAttributes().put("library", "primefaces"); + component.getAttributes().put("name", res); + + root.addComponentResource(context, component); + } + } + } +} diff --git a/ace-layout/src/main/java/org/primefaces/serenity/component/SerenityMenuRenderer.java b/ace-layout/src/main/java/org/primefaces/serenity/component/SerenityMenuRenderer.java new file mode 100644 index 0000000..50fa595 --- /dev/null +++ b/ace-layout/src/main/java/org/primefaces/serenity/component/SerenityMenuRenderer.java @@ -0,0 +1,295 @@ +package org.primefaces.serenity.component; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.faces.FacesException; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.context.ResponseWriter; +import org.primefaces.component.api.AjaxSource; +import org.primefaces.component.api.UIOutcomeTarget; +import org.primefaces.component.menu.AbstractMenu; +import org.primefaces.component.menu.BaseMenuRenderer; +import org.primefaces.component.menuitem.UIMenuItem; +import org.primefaces.component.submenu.UISubmenu; +import org.primefaces.model.menu.MenuElement; +import org.primefaces.model.menu.MenuItem; +import org.primefaces.model.menu.Separator; +import org.primefaces.model.menu.Submenu; +import org.primefaces.util.ComponentUtils; +import org.primefaces.util.WidgetBuilder; + +public class SerenityMenuRenderer extends BaseMenuRenderer { + + @Override + protected void encodeMarkup(FacesContext context, AbstractMenu abstractMenu) throws IOException { + SerenityMenu menu = (SerenityMenu) abstractMenu; + ResponseWriter writer = context.getResponseWriter(); + String style = menu.getStyle(); + String styleClass = menu.getStyleClass(); + String defaultStyleClass = "layout-menu"; + styleClass = styleClass == null ? defaultStyleClass : defaultStyleClass + " " + styleClass; + + writer.startElement("ul", menu); + writer.writeAttribute("id", menu.getClientId(context), "id"); + writer.writeAttribute("class", styleClass, "styleClass"); + + if(style != null) { + writer.writeAttribute("style", style, "style"); + } + + if(menu.getElementsCount() > 0) { + encodeElements(context, menu, menu.getElements()); + } + + writer.endElement("ul"); + } + + protected void encodeElements(FacesContext context, AbstractMenu menu, List elements) throws IOException { + int size = elements.size(); + + for (int i = 0; i < size; i++) { + encodeElement(context, menu, elements.get(i)); + } + } + + protected void encodeElement(FacesContext context, AbstractMenu menu, MenuElement element) throws IOException { + ResponseWriter writer = context.getResponseWriter(); + + if(element.isRendered()) { + if(element instanceof MenuItem) { + MenuItem menuItem = (MenuItem) element; + String menuItemClientId = (menuItem instanceof UIComponent) ? menuItem.getClientId() : menu.getClientId(context) + "_" + menuItem.getClientId(); + String containerStyle = menuItem.getContainerStyle(); + String containerStyleClass = menuItem.getContainerStyleClass(); + + writer.startElement("li", null); + writer.writeAttribute("id", menuItemClientId, null); + writer.writeAttribute("role", "menuitem", null); + + if(containerStyle != null) writer.writeAttribute("style", containerStyle, null); + if(containerStyleClass != null) writer.writeAttribute("class", containerStyleClass, null); + + encodeMenuItem(context, menu, menuItem); + + writer.endElement("li"); + } + else if(element instanceof Submenu) { + Submenu submenu = (Submenu) element; + String submenuClientId = (submenu instanceof UIComponent) ? ((UIComponent) submenu).getClientId() : menu.getClientId(context) + "_" + submenu.getId(); + String style = submenu.getStyle(); + String styleClass = submenu.getStyleClass(); + + writer.startElement("li", null); + writer.writeAttribute("id", submenuClientId, null); + writer.writeAttribute("role", "menuitem", null); + + if(style != null) writer.writeAttribute("style", style, null); + if(styleClass != null) writer.writeAttribute("class", styleClass, null); + + encodeSubmenu(context, menu, submenu); + + writer.endElement("li"); + } + else if(element instanceof Separator) { + encodeSeparator(context, (Separator) element); + } + } + } + + protected void encodeSubmenu(FacesContext context, AbstractMenu menu, Submenu submenu) throws IOException{ + ResponseWriter writer = context.getResponseWriter(); + String icon = submenu.getIcon(); + String label = submenu.getLabel(); + int childrenElementsCount = submenu.getElementsCount(); + + writer.startElement("a", null); + writer.writeAttribute("href", "#", null); + writer.writeAttribute("class", "ripplelink", null); + + encodeItemIcon(context, icon); + + if(label != null) { + writer.startElement("span", null); + writer.writeAttribute("class", "menuitem-text", null); + writer.writeText(label, null); + writer.endElement("span"); + + encodeToggleIcon(context, submenu, childrenElementsCount); + + if(submenu instanceof UISubmenu) { + encodeBadge(context, ((UISubmenu) submenu).getAttributes().get("badge")); + } + } + + writer.endElement("a"); + + //submenus and menuitems + if(childrenElementsCount > 0) { + writer.startElement("ul", null); + writer.writeAttribute("role", "menu", null); + encodeElements(context, menu, submenu.getElements()); + writer.endElement("ul"); + } + } + + protected void encodeItemIcon(FacesContext context, String icon) throws IOException { + if(icon != null) { + ResponseWriter writer = context.getResponseWriter(); + + writer.startElement("i", null); + if(icon.contains("fa fa-") || icon.contains("ui-icon ui-icon-")) { + writer.writeAttribute("class", icon, null); + } + else { + writer.writeAttribute("class", "material-icons", null); + writer.writeText(icon, null); + } + + writer.endElement("i"); + } + } + + protected void encodeToggleIcon(FacesContext context, Submenu submenu, int childrenElementsCount) throws IOException { + if(childrenElementsCount > 0) { + ResponseWriter writer = context.getResponseWriter(); + + writer.startElement("i", null); + writer.writeAttribute("class", "material-icons layout-submenu-toggler", null); + writer.write(""); + writer.endElement("i"); + } + } + + protected void encodeBadge(FacesContext context, Object value) throws IOException { + if(value != null) { + ResponseWriter writer = context.getResponseWriter(); + + writer.startElement("span", null); + writer.writeAttribute("class", "menuitem-badge", null); + writer.writeText(value.toString(), null); + writer.endElement("span"); + } + } + + @Override + protected void encodeSeparator(FacesContext context, Separator separator) throws IOException { + ResponseWriter writer = context.getResponseWriter(); + String style = separator.getStyle(); + String styleClass = separator.getStyleClass(); + styleClass = styleClass == null ? "Separator" : "Separator " + styleClass; + + //title + writer.startElement("li", null); + writer.writeAttribute("class", styleClass, null); + if(style != null) { + writer.writeAttribute("style", style, null); + } + + writer.endElement("li"); + } + + @Override + protected void encodeMenuItem(FacesContext context, AbstractMenu menu, MenuItem menuitem) throws IOException { + ResponseWriter writer = context.getResponseWriter(); + String title = menuitem.getTitle(); + boolean disabled = menuitem.isDisabled(); + Object value = menuitem.getValue(); + String style = menuitem.getStyle(); + String styleClass = menuitem.getStyleClass(); + String defaultStyleClass = "ripplelink"; + styleClass = styleClass == null ? defaultStyleClass : defaultStyleClass + " " + styleClass; + + writer.startElement("a", null); + writer.writeAttribute("class", styleClass, null); + if(title != null) writer.writeAttribute("title", title, null); + if(style != null) writer.writeAttribute("style", style, null); + + if(disabled) { + writer.writeAttribute("href", "#", null); + writer.writeAttribute("onclick", "return false;", null); + } + else { + String onclick = menuitem.getOnclick(); + + //GET + if(menuitem.getUrl() != null || menuitem.getOutcome() != null) { + String targetURL = getTargetURL(context, (UIOutcomeTarget) menuitem); + writer.writeAttribute("href", targetURL, null); + + if(menuitem.getTarget() != null) { + writer.writeAttribute("target", menuitem.getTarget(), null); + } + } + //POST + else { + writer.writeAttribute("href", "#", null); + + UIComponent form = ComponentUtils.findParentForm(context, menu); + if(form == null) { + throw new FacesException("MenuItem must be inside a form element"); + } + + String command; + if(menuitem.isDynamic()) { + String menuClientId = menu.getClientId(context); + Map> params = menuitem.getParams(); + if(params == null) { + params = new LinkedHashMap>(); + } + List idParams = new ArrayList(); + idParams.add(menuitem.getId()); + params.put(menuClientId + "_menuid", idParams); + + command = menuitem.isAjax() ? buildAjaxRequest(context, menu, (AjaxSource) menuitem, form, params) : buildNonAjaxRequest(context, menu, form, menuClientId, params, true); + } + else { + command = menuitem.isAjax() ? buildAjaxRequest(context, (AjaxSource) menuitem, form) : buildNonAjaxRequest(context, ((UIComponent) menuitem), form, ((UIComponent) menuitem).getClientId(context), true); + } + + onclick = (onclick == null) ? command : onclick + ";" + command; + } + + if(onclick != null) { + writer.writeAttribute("onclick", onclick, null); + } + } + + encodeMenuItemContent(context, menu, menuitem); + + writer.endElement("a"); + } + + @Override + protected void encodeMenuItemContent(FacesContext context, AbstractMenu menu, MenuItem menuitem) throws IOException { + ResponseWriter writer = context.getResponseWriter(); + String icon = menuitem.getIcon(); + Object value = menuitem.getValue(); + + if(menuitem instanceof UIMenuItem) { + encodeBadge(context, ((UIMenuItem) menuitem).getAttributes().get("badge")); + } + encodeItemIcon(context, icon); + + if(value != null) { + writer.startElement("span", null); + writer.writeAttribute("class", "menuitem-text", null); + writer.writeText(value, "value"); + writer.endElement("span"); + } + } + + @Override + protected void encodeScript(FacesContext context, AbstractMenu abstractMenu) throws IOException { + SerenityMenu menu = (SerenityMenu) abstractMenu; + String clientId = menu.getClientId(context); + WidgetBuilder wb = getWidgetBuilder(context); + wb.init("Serenity", menu.resolveWidgetVar(), clientId) + .attr("closeDelay", menu.getCloseDelay()) + .finish(); + } + +} diff --git a/ace-layout/src/main/java/org/primefaces/serenity/filter/CharacterEncodingFilter.java b/ace-layout/src/main/java/org/primefaces/serenity/filter/CharacterEncodingFilter.java new file mode 100644 index 0000000..0cb3611 --- /dev/null +++ b/ace-layout/src/main/java/org/primefaces/serenity/filter/CharacterEncodingFilter.java @@ -0,0 +1,44 @@ +/* + * Copyright 2009-2014 PrimeTek. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.primefaces.serenity.filter; + +import java.io.IOException; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; + +public class CharacterEncodingFilter implements Filter { + + public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException { + req.setCharacterEncoding("UTF-8"); + resp.setCharacterEncoding("UTF-8"); + chain.doFilter(req, resp); + } + + public void init(FilterConfig filterConfig) throws ServletException { + + } + + public void destroy() { + + } + + +} diff --git a/ace-layout/src/main/java/org/primefaces/serenity/view/GuestPreferences.java b/ace-layout/src/main/java/org/primefaces/serenity/view/GuestPreferences.java new file mode 100644 index 0000000..e1245d4 --- /dev/null +++ b/ace-layout/src/main/java/org/primefaces/serenity/view/GuestPreferences.java @@ -0,0 +1,77 @@ +/* + * Copyright 2009-2014 PrimeTek. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.primefaces.serenity.view; + +import java.io.Serializable; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.SessionScoped; + +@ManagedBean +@SessionScoped +public class GuestPreferences implements Serializable { + + private static final long serialVersionUID = 7356208868875521211L; + + private String layout = "lightblue"; + + private String theme = "bluegrey"; + + private boolean darkMenu; + + private boolean horizontal = false; + + private boolean orientationRTL; + + public String getTheme() { + return theme; + } + + public void setTheme(String theme) { + this.theme = theme; + } + + public String getLayout() { + return layout; + } + + public void setLayout(String layout) { + this.layout = layout; + } + + public boolean isDarkMenu() { + return darkMenu; + } + + public void setDarkMenu(boolean darkMenu) { + this.darkMenu = darkMenu; + } + + public boolean isOrientationRTL() { + return orientationRTL; + } + + public void setOrientationRTL(boolean orientationRTL) { + this.orientationRTL = orientationRTL; + } + + public boolean isHorizontal() { + return this.horizontal; + } + + public void setHorizontal(boolean value) { + this.horizontal = value; + } +} diff --git a/ace-model/nb-configuration.xml b/ace-model/nb-configuration.xml new file mode 100644 index 0000000..a65c451 --- /dev/null +++ b/ace-model/nb-configuration.xml @@ -0,0 +1,18 @@ + + + + + + JDK_1.8 + + diff --git a/ace-model/pom.xml b/ace-model/pom.xml new file mode 100644 index 0000000..c4e09fd --- /dev/null +++ b/ace-model/pom.xml @@ -0,0 +1,183 @@ + + + 4.0.0 + com.arrebol + ace-model + 1.0.0 + jar + + UTF-8 + 1.8 + 1.8 + + + + + org.hibernate + hibernate-agroal + 5.4.14.Final + pom + + + org.hibernate + hibernate-c3p0 + 5.6.7.Final + + + c3p0 + c3p0 + 0.9.1.2 + + + + + AWS-EC2 + + jdbc:mysql://localhost:3306/apo_pro_com_april_ten?serverTimezone=UTC + root + Saladeespera2_ + 10 + 40 + 1800 + 300 + + + + + src/main/resources + true + + + + + + Localhost + + jdbc:mysql://localhost:3306/apo_pro_com_april_ten?serverTimezone=GMT-5 + apoprocomlocalhost + Yj$2Da0z! + 10 + 40 + 1800 + 300 + + + + + src/main/resources + true + + + + + + Localhost-Mobile-APP + + jdbc:mysql://localhost:3306/apo_pro_com_april_ten?serverTimezone=GMT-5 + apoprocommobilelocalhost + 0Ps$6%q8 + 10 + 40 + 1800 + 300 + + + + + src/main/resources + true + + + + + + Amazon-Web-Services + + jdbc:mysql://3.143.107.236:3306/apo_pro_com_april_ten?serverTimezone=GMT-6 + ace_remoto + Saladeespera2_ + 10 + 20 + 1800 + 300 + true + false + + + + + src/main/resources + true + + + + + + Amazon-Web-Services-Test + + jdbc:mysql://apc.clwlkknfqkjh.us-east-2.rds.amazonaws.com:3306/apo_pro_com_april_ten?serverTimezone=GMT-6 + apoprocom + Yj$2Da0z! + 10 + 20 + 1800 + 300 + + + + + src/main/resources + true + + + + + + Amazon-Web-Services-Mobile-APP + + jdbc:mysql://ace.civi8tosgaol.us-east-2.rds.amazonaws.com:3306/apo_pro_com_april_ten + apoprocommobile + 0Ps$6%q8 + 10 + 30 + 2000 + 1000 + + + + + src/main/resources + true + + + + + + Amazon-Web-Services-Mobile-APP-Test + + jdbc:mysql://apc.clwlkknfqkjh.us-east-2.rds.amazonaws.com:3306/apo_pro_com_april_ten?serverTimezone=GMT-6 + apoprocommobile + 0Ps$6%q8 + 10 + 30 + 2000 + 1000 + + + + + src/main/resources + true + + + + + + ace-model + \ No newline at end of file diff --git a/ace-model/src/main/java/com/arrebol/apc/model/DateFormatModel.java b/ace-model/src/main/java/com/arrebol/apc/model/DateFormatModel.java new file mode 100644 index 0000000..0fe4805 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/DateFormatModel.java @@ -0,0 +1,24 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Locale; + +/** + * + * @author Oscar + */ +public class DateFormatModel { + + public String getDateFormat(Date date){ + Locale espanol = new Locale("es","MX"); + SimpleDateFormat format = new SimpleDateFormat("dd - MMMMM - yyyy",espanol); + String stringDate = format.format(date); + return stringDate; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ModelParameter.java b/ace-model/src/main/java/com/arrebol/apc/model/ModelParameter.java new file mode 100644 index 0000000..7b5cfbe --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ModelParameter.java @@ -0,0 +1,43 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class ModelParameter { + + private String parameter; + private Object value; + + public ModelParameter() { + } + + public ModelParameter(String parameter, Object value) { + this.parameter = parameter; + this.value = value; + } + + public String getParameter() { + return parameter; + } + + public void setParameter(String parameter) { + this.parameter = parameter; + } + + public Object getValue() { + return value; + } + + public void setValue(Object value) { + this.value = value; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/Advance.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/Advance.java new file mode 100644 index 0000000..48821ae --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/Advance.java @@ -0,0 +1,222 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin; + +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_ADVANCE") +public class Advance implements Serializable { + + private static final long serialVersionUID = -4380548310735493011L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_human_resource", + referencedColumnName = "id", + nullable = false + ) + private HumanResource humanResource; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "amount", nullable = false) + private BigDecimal amount; + + @Enumerated(EnumType.STRING) + @Column(name = "active_status", nullable = false) + private ActiveStatus activeStatus; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "created_by", + referencedColumnName = "id", + insertable = false, + updatable = false, + nullable = false + ) + private User user; + + public Advance() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public HumanResource getHumanResource() { + return humanResource; + } + + public void setHumanResource(HumanResource humanResource) { + this.humanResource = humanResource; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public ActiveStatus getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(ActiveStatus activeStatus) { + this.activeStatus = activeStatus; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + + + public boolean getActive() { + if (activeStatus == ActiveStatus.ENEBLED) { + return true; + } else { + return false; + } + + } + + public boolean getAction(Date lastStableGeneralBox) { + Date date = createdOn; + boolean action = true; + try { + SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd"); + + String dateStr = dt1.format(date); + date = dt1.parse(dateStr); + + action = date.after(lastStableGeneralBox); + + } catch (ParseException ex) { + Logger.getLogger(ExpenseCompany.class.getName()).log(Level.SEVERE, null, ex); + } + return action; + } + + public String conditionEnabled() { + if (activeStatus == ActiveStatus.DISABLED) { + return "grayRow"; + } else { + return null; + } + } + + @Override + public String toString() { + return "Advance{" + "active_status=" + activeStatus + ", createdOn=" + createdOn + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/Bonus.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/Bonus.java new file mode 100644 index 0000000..54f1d36 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/Bonus.java @@ -0,0 +1,209 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_BONUS") +public class Bonus implements Serializable { + + private static final long serialVersionUID = 3584728331941248013L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "name", nullable = false, length = 100) + private String name; + + @Column(name = "loan_bonus", nullable = false) + private BigDecimal loanBonus; + + @Column(name = "mora_bonus", nullable = false) + private BigDecimal moraBonus; + + @Column(name = "new_customer_bonus", nullable = false) + private BigDecimal newCustomerBonus; + + @Enumerated(EnumType.STRING) + @Column(name = "administrative", nullable = false) + private ActiveStatus administrative; + + @Enumerated(EnumType.STRING) + @Column(name = "active_status", nullable = false) + private ActiveStatus activeStatus; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public Bonus() { + } + + /** + * + * @param id + */ + public Bonus(String id) { + this.id = id; + } + + /** + * + * @param id + * @param name + */ + public Bonus(String id, String name) { + this.id = id; + this.name = name; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public BigDecimal getLoanBonus() { + return loanBonus; + } + + public void setLoanBonus(BigDecimal loanBonus) { + this.loanBonus = loanBonus; + } + + public BigDecimal getMoraBonus() { + return moraBonus; + } + + public void setMoraBonus(BigDecimal moraBonus) { + this.moraBonus = moraBonus; + } + + public BigDecimal getNewCustomerBonus() { + return newCustomerBonus; + } + + public void setNewCustomerBonus(BigDecimal newCustomerBonus) { + this.newCustomerBonus = newCustomerBonus; + } + + public ActiveStatus getAdministrative() { + return administrative; + } + + public void setAdministrative(ActiveStatus administrative) { + this.administrative = administrative; + } + + public ActiveStatus getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(ActiveStatus activeStatus) { + this.activeStatus = activeStatus; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + @Override + public String toString() { + return "Bonus{" + "name=" + name + ", createdOn=" + createdOn + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/ClosingDay.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/ClosingDay.java new file mode 100644 index 0000000..13de1a1 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/ClosingDay.java @@ -0,0 +1,256 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin; + +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Table(name = "APC_CLOSING_DAY") +public class ClosingDay implements Serializable{ + + private static final long serialVersionUID = 347958707624227979L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_user", + referencedColumnName = "id", + nullable = false + ) + private User user; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "amount_paid", nullable = false) + private BigDecimal amountPaid; + + @Column(name = "amount_expected", nullable = false) + private BigDecimal amountExpected; + + @Column(name = "comments", length = 250) + private String comments; + + @Enumerated(EnumType.STRING) + @Column(name = "active_status", nullable = false) + private ActiveStatus activeStatus; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "created_by", + referencedColumnName = "id", + nullable = false + ) + private UserByOffice createdBy; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_route", + referencedColumnName = "id", + nullable = true + ) + private RouteCtlg routeCtlg; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public ClosingDay() { + } + + public ClosingDay(String id) { + this.id = id; + } + + public ClosingDay(String id, User user, Office office, BigDecimal amountPaid, BigDecimal amountExpected, ActiveStatus activeStatus, String comments, UserByOffice createdBy, Date createdOn) { + this.id = id; + this.user = user; + this.office = office; + this.amountPaid = amountPaid; + this.amountExpected = amountExpected; + this.activeStatus = activeStatus; + this.createdBy = createdBy; + this.createdOn = createdOn; + this.comments = comments; + } + + public ClosingDay(String id, User user, Office office, BigDecimal amountPaid, BigDecimal amountExpected, String comments, ActiveStatus activeStatus, UserByOffice createdBy) { + this.id = id; + this.user = user; + this.office = office; + this.amountPaid = amountPaid; + this.amountExpected = amountExpected; + this.activeStatus = activeStatus; + this.createdBy = createdBy; + this.createdOn = new Date(); + this.comments = comments; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getAmountPaid() { + return amountPaid; + } + + public void setAmountPaid(BigDecimal amountPaid) { + this.amountPaid = amountPaid; + } + + public BigDecimal getAmountExpected() { + return amountExpected; + } + + public void setAmountExpected(BigDecimal amountExpected) { + this.amountExpected = amountExpected; + } + + public BigDecimal getDiferencia(){ + BigDecimal diferencia = amountPaid.subtract(amountExpected); + + return diferencia; + } + + public ActiveStatus getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(ActiveStatus activeStatus) { + this.activeStatus = activeStatus; + } + + public UserByOffice getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(UserByOffice createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public RouteCtlg getRouteCtlg() { + return routeCtlg; + } + + public void setRouteCtlg(RouteCtlg routeCtlg) { + this.routeCtlg = routeCtlg; + } + + public String conditionEnabled() { + if(getActiveStatus() == ActiveStatus.DISABLED) + return "grayRow"; + else + return null; + } + + public boolean conditionEnabledBool() { + if (getActiveStatus() == ActiveStatus.DISABLED) { + return false; + } else { + return true; + } + } + + public boolean getActive() { + return activeStatus == ActiveStatus.ENEBLED; + + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/ClosingDayDetail.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/ClosingDayDetail.java new file mode 100644 index 0000000..788094d --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/ClosingDayDetail.java @@ -0,0 +1,154 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Table(name = "APC_CLOSING_DAY_DETAIL") +public class ClosingDayDetail implements Serializable{ + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_closing_day", + referencedColumnName = "id", + nullable = false + ) + private ClosingDay closingDay; + + @Column(name = "comments", length = 250) + private String comments; + + @Column(name = "amount", nullable = false) + private BigDecimal amount; + + @Column(name = "type", length = 250) + private String type; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "dateDetail", length = 19) + private Date dateDetail; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public ClosingDay getClosingDay() { + return closingDay; + } + + public void setClosingDay(ClosingDay closingDay) { + this.closingDay = closingDay; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Date getDateDetail() { + return dateDetail; + } + + public void setDateDetail(Date dateDetail) { + this.dateDetail = dateDetail; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/EmployeeSaving.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/EmployeeSaving.java new file mode 100644 index 0000000..29902e8 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/EmployeeSaving.java @@ -0,0 +1,102 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.admin; + +import com.arrebol.apc.model.enums.EmployeeSavingType; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Administrador + */ +@Entity +@Table(name = "APC_EMPLOYEE_SAVING") +public class EmployeeSaving implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "employee_saving", nullable = false) + private BigDecimal employeeSaving; + + @Column(name = "created_by", length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Enumerated(EnumType.STRING) + @Column(name = "type", nullable = false) + private EmployeeSavingType type; + + public EmployeeSavingType getType() { + return type; + } + + public void setType(EmployeeSavingType type) { + this.type = type; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public BigDecimal getEmployeeSaving() { + return employeeSaving; + } + + public void setEmployeeSaving(BigDecimal paymentAmount) { + this.employeeSaving = paymentAmount; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/ExpenseCompany.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/ExpenseCompany.java new file mode 100644 index 0000000..007a4f6 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/ExpenseCompany.java @@ -0,0 +1,242 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin; + +import com.arrebol.apc.model.DateFormatModel; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.ExpenseCompanyType; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_EXPENSE_COMPANY") +public class ExpenseCompany extends DateFormatModel implements Serializable { + + private static final long serialVersionUID = 7927698024624765461L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "amount", nullable = false) + private BigDecimal amount; + + @Column(name = "description", length = 200) + private String description; + + @Enumerated(EnumType.STRING) + @Column(name = "expense_company_type", nullable = false) + private ExpenseCompanyType expenseCompanyType; + + @Enumerated(EnumType.STRING) + @Column(name = "active_status", nullable = false) + private ActiveStatus activeStatus; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "created_by", + referencedColumnName = "id", + insertable = false, + updatable = false, + nullable = false + ) + private User user; + + public ExpenseCompany() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public ExpenseCompanyType getExpenseCompanyType() { + return expenseCompanyType; + } + + public void setExpenseCompanyType(ExpenseCompanyType expenseCompanyType) { + this.expenseCompanyType = expenseCompanyType; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public boolean getAction(Date lastStableGeneralBox) { + Date date = createdOn; + boolean action = true; + try { + SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd"); + + String dateStr = dt1.format(date); + date = dt1.parse(dateStr); + Logger.getLogger(ExpenseCompany.class.getName()).log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@ CreatedOn - " + createdOn); + Logger.getLogger(ExpenseCompany.class.getName()).log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@ date - " + date); + Logger.getLogger(ExpenseCompany.class.getName()).log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@ lastStableGeneralBox - " + lastStableGeneralBox); + + + action = date.after(lastStableGeneralBox); + + Logger.getLogger(ExpenseCompany.class.getName()).log(Level.INFO, "@@@@@@@@@@@@@@@@@@@@@ Action - " + action); + + } catch (ParseException ex) { + Logger.getLogger(ExpenseCompany.class.getName()).log(Level.SEVERE, null, ex); + } + return action; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public ActiveStatus getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(ActiveStatus activeStatus) { + this.activeStatus = activeStatus; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public String getUserName() { + String lNombre = user.getHumanResource().getFirstName() + " " + user.getHumanResource().getSecondName() + " " + user.getHumanResource().getLastName(); + return lNombre; + } + + public String conditionEnabled() { + if(getActiveStatus() == ActiveStatus.DISABLED) + return "grayRow"; + else + return null; + } + + public boolean getActive() { + if (activeStatus == ActiveStatus.ENEBLED) { + return true; + } else { + return false; + } + + } + + public Date getLastStableGB(Date lastStableGeneralBox) { + return lastStableGeneralBox; + } + + @Override + public String toString() { + return "ExpenseCompany{" + "description=" + description + ", createdBy=" + createdBy + ", createdOn=" + createdOn + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/Goal.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/Goal.java new file mode 100644 index 0000000..5200627 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/Goal.java @@ -0,0 +1,170 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_GOAL") +public class Goal implements Serializable { + + private static final long serialVersionUID = 2775085143559471536L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Temporal(TemporalType.DATE) + @Column(name = "start_date") + private Date startDate; + + @Temporal(TemporalType.DATE) + @Column(name = "end_date") + private Date endDate; + + @Column(name = "amount", nullable = false) + private BigDecimal amount; + + @Enumerated(EnumType.STRING) + @Column(name = "active_status", nullable = false) + private ActiveStatus activeStatus; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public Goal() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getStartDate() { + return startDate; + } + + public void setStartDate(Date startDate) { + this.startDate = startDate; + } + + public Date getEndDate() { + return endDate; + } + + public void setEndDate(Date endDate) { + this.endDate = endDate; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public ActiveStatus getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(ActiveStatus activeStatus) { + this.activeStatus = activeStatus; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + @Override + public String toString() { + return "Goal{" + "active_status=" + activeStatus + ", office=" + office + ", createdOn=" + createdOn + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/LoanEmployee.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/LoanEmployee.java new file mode 100644 index 0000000..5f3f970 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/LoanEmployee.java @@ -0,0 +1,159 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.admin; + +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.LoanStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Administrador + */ +@Entity +@Table(name = "APC_LOAN_EMPLOYEE") +public class LoanEmployee implements Serializable { + private static final long serialVersionUID = 2775085143559471537L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_employee", length = 36) + private String idEmployee; + + @Column(name = "amount_loan", nullable = false) + private BigDecimal amountLoan; + + @Column(name = "balance", nullable = false) + private BigDecimal balance; + + @Column(name = "amount_to_pay", nullable = false) + private BigDecimal amountToPay; + + @Column(name = "total_amount_to_pay", nullable = false) + private BigDecimal totalAmountToPay; + + @Enumerated(EnumType.STRING) + @Column(name = "loan_employee_status", nullable = false) + private ActiveStatus loanEmployeeStatus; + + @Column(name = "created_by", length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdEmployee() { + return idEmployee; + } + + public void setIdEmployee(String idEmployee) { + this.idEmployee = idEmployee; + } + + public BigDecimal getAmountLoan() { + return amountLoan; + } + + public void setAmountLoan(BigDecimal amountLoan) { + this.amountLoan = amountLoan; + } + + public BigDecimal getBalance() { + return balance; + } + + public void setBalance(BigDecimal balance) { + this.balance = balance; + } + + public BigDecimal getAmountToPay() { + return amountToPay; + } + + public void setAmountToPay(BigDecimal amountToPay) { + this.amountToPay = amountToPay; + } + + public ActiveStatus getLoanEmployeeStatus() { + return loanEmployeeStatus; + } + + public void setLoanEmployeeStatus(ActiveStatus loanEmployeeStatus) { + this.loanEmployeeStatus = loanEmployeeStatus; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public BigDecimal getTotalAmountToPay() { + return totalAmountToPay; + } + + public void setTotalAmountToPay(BigDecimal totalAmountToPay) { + this.totalAmountToPay = totalAmountToPay; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/LoanEmployeeDetails.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/LoanEmployeeDetails.java new file mode 100644 index 0000000..66da165 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/LoanEmployeeDetails.java @@ -0,0 +1,137 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.admin; + +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Administrador + */ +@Entity +@Table(name = "APC_LOAN_EMPLOYEE_DETAIL") +public class LoanEmployeeDetails implements Serializable { + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_loan", length = 36) + private String idLoan; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "payment_amount", nullable = false) + private BigDecimal paymentAmount; + + @Column(name = "reference_number", nullable = false) + private int referenceNumber; + + @Enumerated(EnumType.STRING) + @Column(name = "loan_employee_detail_status", nullable = false) + private ActiveStatus loanEmployeeDetailStatus; + + @Column(name = "created_by", length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Enumerated(EnumType.STRING) + @Column(name = "payroll", nullable = false) + private ActiveStatus payroll; + + public ActiveStatus getPayroll() { + return payroll; + } + + public void setPayroll(ActiveStatus payroll) { + this.payroll = payroll; + } + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdLoan() { + return idLoan; + } + + public void setIdLoan(String idLoan) { + this.idLoan = idLoan; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public BigDecimal getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(BigDecimal paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public int getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(int referenceNumber) { + this.referenceNumber = referenceNumber; + } + + public ActiveStatus getLoanEmployeeDetailStatus() { + return loanEmployeeDetailStatus; + } + + public void setLoanEmployeeDetailStatus(ActiveStatus loanEmployeeDetailStatus) { + this.loanEmployeeDetailStatus = loanEmployeeDetailStatus; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/MoneyDaily.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/MoneyDaily.java new file mode 100644 index 0000000..c426651 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/MoneyDaily.java @@ -0,0 +1,164 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin; + +import com.arrebol.apc.model.DateFormatModel; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Locale; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_MONEY_DAILY") +public class MoneyDaily extends DateFormatModel implements Serializable { + + private static final long serialVersionUID = 4622672186001211722L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "money_daily_date", length = 19) + private Date moneyDailyDate; + + @Column(name = "amount", nullable = false) + private BigDecimal amount; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_user", + referencedColumnName = "id", + nullable = false + ) + private User user; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + public MoneyDaily() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getMoneyDailyDate() { + return moneyDailyDate; + } + + public void setMoneyDailyDate(Date moneyDailyDate) { + this.moneyDailyDate = moneyDailyDate; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + + + + public boolean getAction(Date lastStableGeneralBox) { + Date date = createdOn; + boolean action = true; + try { + SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd"); + + String dateStr = dt1.format(date); + date = dt1.parse(dateStr); + + action = date.after(lastStableGeneralBox); + + } catch (ParseException ex) { + Logger.getLogger(ExpenseCompany.class.getName()).log(Level.SEVERE, null, ex); + } + return action; + } + + @Override + public String toString() { + return "MoneyDaily{" + "moneyDailyDate=" + moneyDailyDate + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/OtherExpense.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/OtherExpense.java new file mode 100644 index 0000000..3698e7e --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/OtherExpense.java @@ -0,0 +1,256 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Optional; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.stream.Collectors; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Table(name = "APC_OTHER_EXPENSE") +@Entity +public class OtherExpense implements Serializable { + + private static final long serialVersionUID = 6233701552847217683L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn( + name = "id_user", + referencedColumnName = "id", + nullable = false + ) + private User user; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "expense", nullable = false) + private BigDecimal expense; + + @Column(name = "description", length = 200, nullable = false) + private String description; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn( + name = "created_by", + referencedColumnName = "id", + nullable = false, + insertable = false, + updatable = false + + ) + private User userCreatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public OtherExpense() { + } + + /** + * + * @param officeId + * @param userId + * @param expense + * @param description + */ + public OtherExpense(String officeId, String userId, BigDecimal expense, String description) { + this.office = new Office(officeId); + this.user = new User(userId); + this.expense = expense; + this.description = description; + this.createdBy = userId; + this.createdOn = new Date(); + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getExpense() { + return expense; + } + + public void setExpense(BigDecimal expense) { + this.expense = expense; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public String getUserRoutes() { + String routes = ""; + routes = user.getHumanResource().getHumanResourceHasRoutes().stream().map((py) -> py.getRouteCtlg().getRoute()).collect(Collectors.joining(", ")); + + return routes; + } + + public User getUserCreatedBy() { + return userCreatedBy; + } + + public void setUserCreatedBy(User userCreatedBy) { + this.userCreatedBy = userCreatedBy; + } + + public String getCreatedByName() { + String name = getUserCreatedBy().getHumanResource().getFirstName() + " " + getUserCreatedBy().getHumanResource().getLastName(); + + return name; + } + + public boolean getAction(Date lastStableSmallBox, List closingDayToday) { + Date date = createdOn; + String closingDayUser = null; + boolean action = true; + try { + SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd"); + + String dateStr = dt1.format(date); + date = dt1.parse(dateStr); + + action = date.after(lastStableSmallBox); + + // Busca el corte del día de este usuario + if (closingDayToday != null) { + Optional optUser = closingDayToday.stream().filter(p -> p.getUser().getId().equalsIgnoreCase(user.getId()) + && p.getCreatedOn().equals(createdOn)).findFirst(); + closingDayUser = optUser.isPresent() ? optUser.get().getId(): null; + + String dateStrCD; + Date dateCD; + for(ClosingDay dato : closingDayToday){ + dateStrCD = dt1.format(dato.getCreatedOn()); + dateCD = dt1.parse(dateStrCD); + + if(dato.getUser().getId().equalsIgnoreCase(getUser().getId()) && dateCD.equals(date)){ + closingDayUser = dato.getUser().getId(); + } + } + } + + if(action){ + if(closingDayUser != null){ + action = false; + } + } + + } catch (ParseException ex) { + Logger.getLogger(ExpenseCompany.class.getName()).log(Level.SEVERE, null, ex); + } + return action; + } + + @Override + public String toString() { + return "OtherExpense{" + "description=" + description + ", createdOn=" + createdOn + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/StableGeneralBox.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/StableGeneralBox.java new file mode 100644 index 0000000..51ba7cc --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/StableGeneralBox.java @@ -0,0 +1,241 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_STABLE_GENERAL_BOX") +public class StableGeneralBox implements Serializable { + + private static final long serialVersionUID = -3501956555560463690L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "total_general_box", nullable = false) + private BigDecimal totalGeneralBox; + + @Column(name = "total_envelope", nullable = false) + private BigDecimal totalEnvelope; + + @Column(name = "total_bank_note", nullable = false) + private BigDecimal totalBankNote; + + @Column(name = "total_coin", nullable = false) + private BigDecimal totalCoin; + + @Column(name = "total_stable", nullable = false) + private BigDecimal totalStable; + + @Column(name = "description", length = 200) + private String description; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "created_by", + referencedColumnName = "id", + insertable = false, + updatable = false, + nullable = false + ) + private User user; + + @Enumerated(EnumType.STRING) + @Column(name = "active_status", nullable = false) + private ActiveStatus activeStatus; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public StableGeneralBox() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public BigDecimal getTotalGeneralBox() { + return totalGeneralBox; + } + + public void setTotalGeneralBox(BigDecimal totalGeneralBox) { + this.totalGeneralBox = totalGeneralBox; + } + + public BigDecimal getTotalEnvelope() { + return totalEnvelope; + } + + public void setTotalEnvelope(BigDecimal totalEnvelope) { + this.totalEnvelope = totalEnvelope; + } + + public BigDecimal getTotalBankNote() { + return totalBankNote; + } + + public void setTotalBankNote(BigDecimal totalBankNote) { + this.totalBankNote = totalBankNote; + } + + public BigDecimal getTotalCoin() { + return totalCoin; + } + + public void setTotalCoin(BigDecimal totalCoin) { + this.totalCoin = totalCoin; + } + + public BigDecimal getTotalStable() { + return totalStable; + } + + public void setTotalStable(BigDecimal totalStable) { + this.totalStable = totalStable; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public ActiveStatus getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(ActiveStatus activeStatus) { + this.activeStatus = activeStatus; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public String getUserName() { + String lNombre = user.getHumanResource().getFirstName() + " " + user.getHumanResource().getSecondName() + " " + user.getHumanResource().getLastName(); + return lNombre; + } + + public String conditionEnabled() { + if(getActiveStatus() == ActiveStatus.DISABLED) + return "grayRow"; + else + return null; + } + + public boolean getActive() { + if (activeStatus == ActiveStatus.ENEBLED) { + return true; + } else { + return false; + } + + } + + @Override + public String toString() { + return "StableGeneralBox{" + "description=" + description + ", createdBy=" + createdBy + ", createdOn=" + createdOn + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/StableSmallBox.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/StableSmallBox.java new file mode 100644 index 0000000..dba6621 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/StableSmallBox.java @@ -0,0 +1,262 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_STABLE_SMALL_BOX") +public class StableSmallBox implements Serializable { + + private static final long serialVersionUID = -3501956555560463690L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "total_small_box", nullable = false) + private BigDecimal totalSmallBox; + + @Column(name = "total_envelope", nullable = false) + private BigDecimal totalEnvelope; + + @Column(name = "total_bank_note", nullable = false) + private BigDecimal totalBankNote; + + @Column(name = "total_coin", nullable = false) + private BigDecimal totalCoin; + + @Column(name = "total_stable", nullable = false) + private BigDecimal totalStable; + + @Column(name = "description", length = 200) + private String description; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "created_by", + referencedColumnName = "id", + insertable = false, + updatable = false, + nullable = false + ) + private User user; + + @Enumerated(EnumType.STRING) + @Column(name = "active_status", nullable = false) + private ActiveStatus activeStatus; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public StableSmallBox() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public BigDecimal getTotalSmallBox() { + return totalSmallBox; + } + + public void setTotalSmallBox(BigDecimal totalSmallBox) { + this.totalSmallBox = totalSmallBox; + } + + public BigDecimal getTotalEnvelope() { + return totalEnvelope; + } + + public void setTotalEnvelope(BigDecimal totalEnvelope) { + this.totalEnvelope = totalEnvelope; + } + + public BigDecimal getTotalBankNote() { + return totalBankNote; + } + + public void setTotalBankNote(BigDecimal totalBankNote) { + this.totalBankNote = totalBankNote; + } + + public BigDecimal getTotalCoin() { + return totalCoin; + } + + public void setTotalCoin(BigDecimal totalCoin) { + this.totalCoin = totalCoin; + } + + public BigDecimal getTotalStable() { + return totalStable; + } + + public void setTotalStable(BigDecimal totalStable) { + this.totalStable = totalStable; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public ActiveStatus getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(ActiveStatus activeStatus) { + this.activeStatus = activeStatus; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public String getUserName (){ + String lNombre = user.getHumanResource().getFirstName() +" "+ user.getHumanResource().getSecondName() +" "+ user.getHumanResource().getLastName(); + return lNombre; + } + + public String conditionEnabled() { + if(getActiveStatus() == ActiveStatus.DISABLED) + return "grayRow"; + else + return null; + } + + public boolean getActive() { + if (activeStatus == ActiveStatus.ENEBLED) { + return true; + } else { + return false; + } + + } + + public boolean getAction(Date lastStableGeneralBox) { + Date date = createdOn; + boolean action = true; + try { + SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd"); + + String dateStr = dt1.format(date); + date = dt1.parse(dateStr); + + action = date.after(lastStableGeneralBox); + + } catch (ParseException ex) { + Logger.getLogger(ExpenseCompany.class.getName()).log(Level.SEVERE, null, ex); + } + return action; + } + + @Override + public String toString() { + return "StableSmallBox{" + "description=" + description + ", createdBy=" + createdBy + ", createdOn=" + createdOn + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/Transfer.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/Transfer.java new file mode 100644 index 0000000..4df0815 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/Transfer.java @@ -0,0 +1,297 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActionStatus; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.stream.Collectors; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Table(name = "APC_TRANSFER") +public class Transfer implements Serializable { + + private static final long serialVersionUID = -1304758262604329766L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_user_transmitter", + referencedColumnName = "id", + nullable = false + ) + private User userTransmitter; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_user_receiver", + referencedColumnName = "id", + nullable = false + ) + private User userReceiver; + + @Enumerated(EnumType.STRING) + @Column(name = "active_status", nullable = false) + private ActiveStatus activeStatus; + + @Enumerated(EnumType.STRING) + @Column(name = "action_status", nullable = false) + private ActionStatus actionStatus; + + @Column(name = "amount_to_transfer", nullable = false) + private BigDecimal amountToTransfer; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public Transfer() { + + } + + /** + * + * @param userTransmitter + * @param userReceiver + * @param activeStatus + * @param actionStatus + * @param amountToTransfer + * @param office + * @param createdBy + */ + public Transfer(User userTransmitter, User userReceiver, ActiveStatus activeStatus, ActionStatus actionStatus, BigDecimal amountToTransfer, Office office, String createdBy) { + this.userTransmitter = userTransmitter; + this.userReceiver = userReceiver; + this.activeStatus = activeStatus; + this.actionStatus = actionStatus; + this.amountToTransfer = amountToTransfer; + this.office = office; + this.createdBy = createdBy; + this.createdOn = new Date(); + } + + /** + * + * @param id + */ + public Transfer(String id) { + this.id = id; + } + + public Transfer(String id, User userTransmitter, User userReceiver, ActiveStatus activeStatus, ActionStatus actionStatus, BigDecimal amountToTransfer, Office office, String createdBy) { + this.id = id; + this.userTransmitter = userTransmitter; + this.userReceiver = userReceiver; + this.activeStatus = activeStatus; + this.actionStatus = actionStatus; + this.amountToTransfer = amountToTransfer; + this.office = office; + this.createdBy = createdBy; + this.createdOn = new Date(); + } + + public Transfer(String id, User userTransmitter, User userReceiver, ActiveStatus activeStatus, ActionStatus actionStatus, BigDecimal amountToTransfer, Office office, String createdBy, Date createdOn) { + this.id = id; + this.userTransmitter = userTransmitter; + this.userReceiver = userReceiver; + this.activeStatus = activeStatus; + this.actionStatus = actionStatus; + this.amountToTransfer = amountToTransfer; + this.office = office; + this.createdBy = createdBy; + this.createdOn = createdOn; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public User getUserTransmitter() { + return userTransmitter; + } + + public void setUserTransmitter(User userTransmitter) { + this.userTransmitter = userTransmitter; + } + + public User getUserReceiver() { + return userReceiver; + } + + public void setUserReceiver(User userReceiver) { + this.userReceiver = userReceiver; + } + + public ActiveStatus getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(ActiveStatus activeStatus) { + this.activeStatus = activeStatus; + } + + public ActionStatus getActionStatus() { + return actionStatus; + } + + public void setActionStatus(ActionStatus actionStatus) { + this.actionStatus = actionStatus; + } + + public BigDecimal getAmountToTransfer() { + return amountToTransfer; + } + + public void setAmountToTransfer(BigDecimal amountToTransfer) { + this.amountToTransfer = amountToTransfer; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public String getUserReceiverRoutes(){ + String routes = ""; + routes = userReceiver.getHumanResource().getHumanResourceHasRoutes().stream().map((py) -> py.getRouteCtlg().getRoute()).collect(Collectors.joining(", ")); + + return routes; + } + + public String getUserTransmitterRoutes(){ + String routes = ""; + routes = userTransmitter.getHumanResource().getHumanResourceHasRoutes().stream().map((py) -> py.getRouteCtlg().getRoute()).collect(Collectors.joining(", ")); + + return routes; + } + + public boolean getAction(Date lastStableSmallBox) { + Date date = createdOn; + boolean action = true; + try { + SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd"); + + String dateStr = dt1.format(date); + date = dt1.parse(dateStr); + + action = date.after(lastStableSmallBox); + + } catch (Exception ex) { + Logger.getLogger(ExpenseCompany.class.getName()).log(Level.SEVERE, null, ex); + } + return action; + } + + public boolean getActive() { + if (activeStatus == ActiveStatus.ENEBLED) { + return true; + } else { + return false; + } + } + + public String conditionEnabled() { + if(getActiveStatus() == ActiveStatus.DISABLED) + return "grayRow"; + else + return null; + } + + @Override + public String toString() { + return "Transfer{" + "activeStatus=" + activeStatus + ", actionStatus=" + actionStatus + ", createdOn=" + createdOn + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/AdvanceCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/AdvanceCfg.java new file mode 100644 index 0000000..abe6e45 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/AdvanceCfg.java @@ -0,0 +1,24 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface AdvanceCfg extends GenericCfg { + + String QUERY_FIND_ALL_ADVANCE_BY_OFFICE = "findAllAdvanceByOffice"; + String QUERY_FIND_ALL_ADVANCE_BY_OFFICE_BETWEEN_DATES = "findAllAdvanceByOfficeBetweenDates"; + String QUERY_UPDATE_ADVANCE_BY_STATUS = "updateAdvanceByStatus"; + + String FIELD_OFFICE = "office"; + String FIELD_ACTIVE_STATUS = "activeStatus"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/BitacoraCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/BitacoraCfg.java new file mode 100644 index 0000000..708cd4d --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/BitacoraCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface BitacoraCfg extends GenericCfg { + + String QUERY_FIND_ALL_BITACORA_BY_OFFICE = "findAllBitacoraByOffice"; + String QUERY_FIND_ALL_BITACORA_BY_OFFICE_DATE = "findAllBitacoraByOfficeDate"; + + String FIELD_OFFICE = "office"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/BonusCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/BonusCfg.java new file mode 100644 index 0000000..378510d --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/BonusCfg.java @@ -0,0 +1,25 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface BonusCfg extends GenericCfg { + + String QUERY_FIND_ALL_ACTIVE_BONUS = "findAllActiveBonus"; + String QUERY_FIND_ALL_BONUS = "findAllBonus"; + String QUERY_FIND_ALL_BONUS_BETWEEN_DATES = "findAllBonusBetweenDates"; + String QUERY_UPDATE_BONUS_BY_STATUS = "updateBonusByStatus"; + + String FIELD_ACTIVE_STATUS = "activeStatus"; + String FIELD_OFFICE = "office"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/ClosingDayCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/ClosingDayCfg.java new file mode 100644 index 0000000..f3e0181 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/ClosingDayCfg.java @@ -0,0 +1,35 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface ClosingDayCfg extends GenericCfg { + + String QUERY_FIND_ALL_CLOSING_DAY_BY_OFFICE = "findAllClosingDayByOffice"; + String QUERY_FIND_ALL_CLOSING_DAY_BY_OFFICE_BETWEEN_DATES = "findAllClosingDayByOfficeBetweenCreatedOn"; + String QUERY_UPDATE_CLOSING_DAY_BY_STATUS = "updateClosingDayByStatus"; + String QUERY_FIND_TOTAL_BY_USER = "findAllTotalCashByCurdateByUserId"; + String QUERY_FIND_TOTAL_BY_OFFICE = "findAllTotalCashByCurdateByOffice"; + String QUERY_FIND_TOTAL_DASHBOARD_BY_OFFICE = "findAllTotalCashByCurdateDashboardByOffice"; + String QUERY_FIND_ALL_CLOSING_DAY_BY_CURDATE = "findAllViewTotalClosingDayByCurdateByOffice"; + String QUERY_COUNT_CLOSING_DATE_BY_USER_AND_OFFICE = "countClosingDateByUserAndOffice"; + String QUERY_SUM_CLOSING_DAY_BY_CURDATE_AND_OFFICE = "findSumClosingDayByCurdate"; + String QUERY_FIND_ID_BY_EMPLOYEE_AND_OFFICE_EQUALS_CURRDATE = "findIdByEmployeeAndOfficeEqualsToCurrdate"; + + String FIELD_USER = "user"; + String FIELD_OFFICE = "office"; + String FIELD_ACTIVE_STATUS = "activeStatus"; + String FIELD_VIEW_OFFICE = "idOffice"; + String FIELD_CREATED_ON = "createdOn"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/ClosingDayDetailCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/ClosingDayDetailCfg.java new file mode 100644 index 0000000..1478a55 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/ClosingDayDetailCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface ClosingDayDetailCfg extends GenericCfg{ + + String QUERY_FIND_ALL_CLOSING_DAY_DETAIL_BY_ID = "findAllClosingDayDetailById"; + + String FIELD_CLOSING_DAY = "closingDay"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/ExpenseCompanyCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/ExpenseCompanyCfg.java new file mode 100644 index 0000000..8efdaa2 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/ExpenseCompanyCfg.java @@ -0,0 +1,26 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface ExpenseCompanyCfg extends GenericCfg { + + String QUERY_FIND_ALL_EXPENSE_COMPANY_BY_OFFICE = "findAllExpenseCompanyByOffice"; + String QUERY_FIND_ALL_EXPENSE_COMPANY_BY_OFFICE_BETWEEN_DATES = "findAllExpenseCompanyByOfficeBetweenDates"; + String QUERY_UPDATE_EXPENSE_COMPANY_BY_STATUS = "updateExpenseCompanyByStatus"; + + String FIELD_OFFICE = "office"; + String FIELD_ACTIVE_STATUS = "activeStatus"; + String FIELD_EXPENSE_COMPANY_TYPE = "expenseCompanyType"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/GoalCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/GoalCfg.java new file mode 100644 index 0000000..c19f302 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/GoalCfg.java @@ -0,0 +1,24 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface GoalCfg extends GenericCfg { + + String QUERY_FIND_ALL_GOALS_BY_OFFICE = "findAllGoalsByOffice"; + String QUERY_FIND_ALL_GOALS_BY_OFFICE_BETWEEN_DATES = "findAllGoalsByOfficeBetweenDates"; + String QUERY_UPDATE_GOAL_BY_STATUS = "updateGoalByStatus"; + + String FIELD_OFFICE = "office"; + String FIELD_ACTIVE_STATUS = "activeStatus"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/MoneyDailyCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/MoneyDailyCfg.java new file mode 100644 index 0000000..dab506d --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/MoneyDailyCfg.java @@ -0,0 +1,25 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface MoneyDailyCfg extends GenericCfg { + + String QUERY_FIND_ALL_MONEY_DAILY_BY_OFFICE = "findAllMoneyDailyByOffice"; + String QUERY_FIND_ALL_MONEY_DAILY_BY_OFFICE_BETWEEN_DATES = "findAllMoneyDailyByOfficeBetweenDates"; + String QUERY_FIND_ALL_MONEY_DAILY_BY_OFFICE_BETWEEN_DATES_USER = "findAllMoneyDailyByOfficeBetweenDatesUser"; + + String FIELD_OFFICE = "office"; + String FIELD_USER = "user"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/OtherExpenseCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/OtherExpenseCfg.java new file mode 100644 index 0000000..d44e5d6 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/OtherExpenseCfg.java @@ -0,0 +1,25 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface OtherExpenseCfg extends GenericCfg { + + String QUERY_FIND_ALL_OTHER_EXPENSE_BY_OFFICE = "findAllOtherExpensesByOffice"; + String QUERY_FIND_ALL_OTHER_EXPENSE_BY_OFFICE_BETWEEN_DATES = "findAllOtherExpensesByOfficeBetweenDates"; + String QUERY_FIND_ALL_OTHER_EXPENSE_BY_OFFICE_BETWEEN_DATES_USER = "findAllOtherExpensesByOfficeBetweenDatesUser"; + + String FIELD_OFFICE = "office"; + String FIELD_USER = "user"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/StableGeneralBoxCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/StableGeneralBoxCfg.java new file mode 100644 index 0000000..db41be2 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/StableGeneralBoxCfg.java @@ -0,0 +1,34 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface StableGeneralBoxCfg extends GenericCfg { + + String QUERY_FIND_ALL_STABLE_GENERAL_BOX_BY_OFFICE = "findAllStableGeneralBoxByOffice"; + String QUERY_FIND_ALL_STABLE_GENERAL_BOX_BY_OFFICE_BETWEEN_DATES = "findAllStableGeneralBoxByOfficeBetweenDates"; + String QUERY_UPDATE_STABLE_GENERAL_BOX_BY_STATUS = "updateStableGeneralBoxByStatus"; + String QUERY_COUNT_STABLE_GENERAL_BOX_BY_OFFICE_AND_DATE = "countStableGeneralBoxByOfficeAndDate"; + String QUERY_COUNT_STABLE_GENERAL_BOX_BY_OFFICE_EQUALS_TO_CURRENT_DATE = "countStableGeneralBoxByOfficeEqualsToCurrentDate"; + + String QUERY_MAX_STABLE_GENERAL_BOX_BY_OFFICE = "verifyStableGeneralBoxCreatedByOffice"; + String QUERY_MAX_CLOSING_DAY_BY_OFFICE = "verifyClosingDayCreatedByOffice"; + + String QUERY_SUM_PENDING_CLOSING_BY_OFFICE = "sumAdvancesUserDailyByOffice"; + + String FIELD_OFFICE = "office"; + String FIELD_OFFICE_VIEW = "idOffice"; + String FIELD_ACTIVE_STATUS = "activeStatus"; + String FIELD_CREATEDON = "createdOn"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/StableSmallBoxCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/StableSmallBoxCfg.java new file mode 100644 index 0000000..159217f --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/StableSmallBoxCfg.java @@ -0,0 +1,32 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface StableSmallBoxCfg extends GenericCfg { + + String QUERY_FIND_ALL_STABLE_SMALL_BOX_BY_OFFICE = "findAllStableSmallBoxByOffice"; + String QUERY_FIND_ALL_STABLE_SMALL_BOX_BY_OFFICE_BETWEEN_DATES = "findAllStableSmallBoxByOfficeBetweenDates"; + String QUERY_UPDATE_STABLE_SMALL_BOX_BY_STATUS = "updateStableSmallBoxByStatus"; + String QUERY_COUNT_STABLE_SMALL_BOX_BY_OFFICE_AND_DATE = "countStableSmallBoxByOfficeAndDate"; + String QUERY_COUNT_STABLE_SMALL_BOX_BY_OFFICE_EQUALS_TO_CURDATE = "countStableSmallBoxByOfficeEqualsToCurrentDate"; + String QUERY_FIND_STABLE_SMALL_BOX_BY_OFFICE_EQUALS_TO_CURRENT_DATE = "findStableSmallBoxByOfficeEqualsToCurrrentDate"; + + String QUERY_SUM_PENDING_CLOSING_BY_OFFICE = "sumAdvancesUserDailyByOffice"; + + String FIELD_OFFICE = "office"; + String FIELD_OFFICE_VIEW = "idOffice"; + String FIELD_ACTIVE_STATUS = "activeStatus"; + String FIELD_CREATEDON = "createdOn"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/TransferCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/TransferCfg.java new file mode 100644 index 0000000..362c39d --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/admin/constance/TransferCfg.java @@ -0,0 +1,31 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.admin.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface TransferCfg extends GenericCfg { + + String QUERY_FIND_ALL_TRANFERS_BY_OFFICE = "findAllTransferByOffice"; + String QUERY_FIND_ALL_TRANFERS_BY_OFFICE_BETWEEN_DATES = "findAllTransferByOfficeBetweenDates"; + String QUERY_FIND_ALL_TRANFERS_BY_USER_TRANSMITTER = "findAllTransferByUserTransmitter"; + String QUERY_FIND_ALL_TRANFERS_BY_USER_RECEIVER = "findAllTransferByUserReceiver"; + String QUERY_UPDATE_TRANSFER_BY_ACTION = "updateTransferByAction"; + String QUERY_UPDATE_TRANSFER_BY_ACTIVE_STATUS = "updateTransferByActive"; + String QUERY_FIND_ALL_TRANSFER_BY_USER_ID_AND_CURDATE = "findAllTransferByUserIdAndCurdate"; + + String FIELD_USER_TRANSMITTER = "userTransmitter"; + String FIELD_USER_RECEIVER = "userReceiver"; + String FIELD_OFFICE = "office"; + String FIELD_ACTION_STATUS = "actionStatus"; + String FIELD_ACTIVE_STATUS = "activeStatus"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/catalog/HumanResourceHasRoute.java b/ace-model/src/main/java/com/arrebol/apc/model/catalog/HumanResourceHasRoute.java new file mode 100644 index 0000000..d1ed3ab --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/catalog/HumanResourceHasRoute.java @@ -0,0 +1,172 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.catalog; + +import com.arrebol.apc.model.core.HumanResource; +import java.io.Serializable; +import java.util.Date; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.EmbeddedId; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_HUMAN_RESOURCE_HAS_ROUTE") +public class HumanResourceHasRoute implements Serializable { + + private static final long serialVersionUID = -8746549036588217517L; + + @EmbeddedId + private HumanResourceHasRouteId id; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn( + name = "id_human_resource", + referencedColumnName = "id", + insertable = false, + updatable = false + ) + private HumanResource humanResource; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn( + name = "id_route", + referencedColumnName = "id", + insertable = false, + updatable = false + ) + private RouteCtlg routeCtlg; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public HumanResourceHasRoute() { + } + + /** + * + * @param id + */ + public HumanResourceHasRoute(HumanResourceHasRouteId id) { + this.id = id; + } + + /** + * + * @param id + * @param createdBy + */ + public HumanResourceHasRoute(HumanResourceHasRouteId id, String createdBy) { + this.id = id; + this.createdBy = createdBy; + createdOn = new Date(); + } + + public HumanResourceHasRouteId getId() { + return id; + } + + public void setId(HumanResourceHasRouteId id) { + this.id = id; + } + + public HumanResource getHumanResource() { + return humanResource; + } + + public void setHumanResource(HumanResource humanResource) { + this.humanResource = humanResource; + } + + public RouteCtlg getRouteCtlg() { + return routeCtlg; + } + + public void setRouteCtlg(RouteCtlg routeCtlg) { + this.routeCtlg = routeCtlg; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + @Override + public int hashCode() { + int hash = 3; + hash = 71 * hash + Objects.hashCode(this.id); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final HumanResourceHasRoute other = (HumanResourceHasRoute) obj; + if (!Objects.equals(this.id, other.id)) { + return false; + } + return true; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/catalog/HumanResourceHasRouteId.java b/ace-model/src/main/java/com/arrebol/apc/model/catalog/HumanResourceHasRouteId.java new file mode 100644 index 0000000..9237e89 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/catalog/HumanResourceHasRouteId.java @@ -0,0 +1,88 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.catalog; + +import java.io.Serializable; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Embeddable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Embeddable +public class HumanResourceHasRouteId implements Serializable { + + private static final long serialVersionUID = -2805382610552215637L; + + @Column(name = "id_human_resource", length = 36, nullable = true) + private String idHumanResource; + + @Column(name = "id_route", length = 36, nullable = true) + private String idRoute; + + public HumanResourceHasRouteId() { + } + + /** + * + * @param idHumanResource + * @param idRoute + */ + public HumanResourceHasRouteId(String idHumanResource, String idRoute) { + this.idHumanResource = idHumanResource; + this.idRoute = idRoute; + } + + public String getIdHumanResource() { + return idHumanResource; + } + + public void setIdHumanResource(String idHumanResource) { + this.idHumanResource = idHumanResource; + } + + public String getIdRoute() { + return idRoute; + } + + public void setIdRoute(String idRoute) { + this.idRoute = idRoute; + } + + @Override + public int hashCode() { + int hash = 5; + hash = 17 * hash + Objects.hashCode(this.idHumanResource); + hash = 17 * hash + Objects.hashCode(this.idRoute); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final HumanResourceHasRouteId other = (HumanResourceHasRouteId) obj; + if (!Objects.equals(this.idHumanResource, other.idHumanResource)) { + return false; + } + if (!Objects.equals(this.idRoute, other.idRoute)) { + return false; + } + return true; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/catalog/People.java b/ace-model/src/main/java/com/arrebol/apc/model/catalog/People.java new file mode 100644 index 0000000..a91fb0a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/catalog/People.java @@ -0,0 +1,437 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.catalog; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.CustomerClassification; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.ws.parsed.PersonJaxb; +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_PEOPLE") +public class People implements Serializable { + + private static final long serialVersionUID = -3628564854853325265L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "first_name", length = 25, nullable = false) + private String firstName; + + @Column(name = "second_name", length = 25) + private String secondName; + + @Column(name = "last_name", length = 25, nullable = false) + private String lastName; + + @Column(name = "middle_name", length = 25, nullable = false) + private String middleName; + + @Temporal(TemporalType.DATE) + @Column(name = "birthdate") + private Date birthdate; + + @Column(name = "thumbnail", length = 250, nullable = false) + private String thumbnail; + + @Column(name = "phone_home", length = 15, nullable = false) + private String phoneHome; + + @Column(name = "address_home", length = 150, nullable = false) + private String addressHome; + + @Column(name = "phone_business", length = 15) + private String phoneBusiness; + + @Column(name = "address_business", length = 150) + private String addressBusiness; + + @Column(name = "company_name", length = 150) + private String companyName; + + @Enumerated(EnumType.STRING) + @Column(name = "people_type", nullable = false) + private PeopleType peopleType; + + @Enumerated(EnumType.STRING) + @Column(name = "active_status", nullable = false) + private ActiveStatus activeStatus; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_route", + referencedColumnName = "id", + nullable = false + ) + private RouteCtlg routeCtlg; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @Enumerated(EnumType.STRING) + @Column(name = "classification", nullable = false) + private CustomerClassification classification; + + + + @OneToMany( + mappedBy = "customer", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List customerLoans; + + @OneToMany( + mappedBy = "endorsement", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List endorsementLoans; + + public People() { + } + + /** + * + * @param id + */ + public People(String id) { + this.id = id; + } + + /** + * Complete constructor. + * + * @param id + * @param firstName + * @param secondName + * @param lastName + * @param middleName + * @param birthdate + * @param phoneHome + * @param addressHome + * @param phoneBusiness + * @param addressBusiness + * @param companyName + * @param peopleType + * @param activeStatus + * @param office + * @param routeCtlg + * @param createdBy + * @param createdOn + * @param lastUpdatedBy + * @param lastUpdatedOn + */ + public People(String id, String firstName, String secondName, String lastName, String middleName, Date birthdate, String phoneHome, String addressHome, String phoneBusiness, String addressBusiness, String companyName, PeopleType peopleType, ActiveStatus activeStatus, Office office, RouteCtlg routeCtlg, String createdBy, Date createdOn, String lastUpdatedBy, Date lastUpdatedOn) { + this.id = id; + this.firstName = firstName; + this.secondName = secondName; + this.lastName = lastName; + this.middleName = middleName; + this.birthdate = birthdate; + this.phoneHome = phoneHome; + this.addressHome = addressHome; + this.phoneBusiness = phoneBusiness; + this.addressBusiness = addressBusiness; + this.companyName = companyName; + this.peopleType = peopleType; + this.activeStatus = activeStatus; + this.office = office; + this.routeCtlg = routeCtlg; + this.createdBy = createdBy; + this.createdOn = createdOn; + this.lastUpdatedBy = lastUpdatedBy; + this.lastUpdatedOn = lastUpdatedOn; + } + + /** + * + * @param jaxb + * @param isCustomer + * @param officeId + * @param userId + * @param routeId + */ + public People(PersonJaxb jaxb, boolean isCustomer, String officeId, String userId, String routeId) { + this.firstName = jaxb.getFirstName(); + this.secondName = jaxb.getSecondName(); + this.lastName = jaxb.getLastName(); + this.middleName = jaxb.getMiddleName(); + this.phoneHome = jaxb.getPhoneHome(); + this.addressHome = jaxb.getAddressHome(); + + if (isCustomer) { + this.phoneBusiness = jaxb.getPhoneWork(); + this.addressBusiness = jaxb.getAddressWork(); + this.companyName = jaxb.getCompanyName(); + this.peopleType = PeopleType.CUSTOMER; + } else { + this.peopleType = PeopleType.ENDORSEMENT; + } + + this.activeStatus = ActiveStatus.ENEBLED; + this.office = new Office(officeId); + this.routeCtlg = new RouteCtlg(routeId); + this.thumbnail = jaxb.getThumbnail(); + this.createdBy = userId; + this.createdOn = new Date(); + this.classification = CustomerClassification.WHITE; + + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getSecondName() { + return secondName; + } + + public void setSecondName(String secondName) { + this.secondName = secondName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getMiddleName() { + return middleName; + } + + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + + public Date getBirthdate() { + return birthdate; + } + + public void setBirthdate(Date birthdate) { + this.birthdate = birthdate; + } + + public String getThumbnail() { + return thumbnail; + } + + public void setThumbnail(String thumbnail) { + this.thumbnail = thumbnail; + } + + public String getPhoneHome() { + return phoneHome; + } + + public void setPhoneHome(String phoneHome) { + this.phoneHome = phoneHome; + } + + public String getAddressHome() { + return addressHome; + } + + public void setAddressHome(String addressHome) { + this.addressHome = addressHome; + } + + public String getPhoneBusiness() { + return phoneBusiness; + } + + public void setPhoneBusiness(String phoneBusiness) { + this.phoneBusiness = phoneBusiness; + } + + public String getAddressBusiness() { + return addressBusiness; + } + + public void setAddressBusiness(String addressBusiness) { + this.addressBusiness = addressBusiness; + } + + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public PeopleType getPeopleType() { + return peopleType; + } + + public void setPeopleType(PeopleType peopleType) { + this.peopleType = peopleType; + } + + public ActiveStatus getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(ActiveStatus activeStatus) { + this.activeStatus = activeStatus; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public RouteCtlg getRouteCtlg() { + return routeCtlg; + } + + public void setRouteCtlg(RouteCtlg routeCtlg) { + this.routeCtlg = routeCtlg; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public List getCustomerLoans() { + return customerLoans; + } + + public void setCustomerLoans(List customerLoans) { + this.customerLoans = customerLoans; + } + + public List getEndorsementLoans() { + return endorsementLoans; + } + + public void setEndorsementLoans(List endorsementLoans) { + this.endorsementLoans = endorsementLoans; + } + + public Integer getTotalLoan() { + if (getCustomerLoans()!= null) { + return getCustomerLoans().size(); + } else { + return 0; + } + } + + public CustomerClassification getClassification() { + return classification; + } + + public void setClassification(CustomerClassification classification) { + this.classification = classification; + } + + public String getFullName() + { + String name = ""; + if(secondName == null || secondName.equalsIgnoreCase("null") || secondName.isEmpty()) + return firstName.trim() + " " + lastName.trim() + " " + middleName.trim(); + else + return firstName.trim() + " " + secondName.trim() + " " + lastName.trim() + " " + middleName.trim(); + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/catalog/RoleCtlg.java b/ace-model/src/main/java/com/arrebol/apc/model/catalog/RoleCtlg.java new file mode 100644 index 0000000..99591e8 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/catalog/RoleCtlg.java @@ -0,0 +1,180 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.catalog; + +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.UniqueConstraint; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_ROLE", + uniqueConstraints = { + @UniqueConstraint(columnNames = {"role_name"}) + } +) +public class RoleCtlg implements Serializable { + + private static final long serialVersionUID = -7005571878079681478L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "role_name", length = 100, nullable = false) + private String role; + + @Enumerated(EnumType.STRING) + @Column(name = "active_status", nullable = false) + private ActiveStatus activeStatus; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @OneToMany( + mappedBy = "roleCtlg", + fetch = FetchType.LAZY, + cascade = CascadeType.ALL, + orphanRemoval = true + ) + private List humanResources; + + public RoleCtlg() { + } + + public RoleCtlg(String id, String role) { + this.id = id; + this.role = role; + } + + public RoleCtlg(String id) { + this.id = id; + } + /** + * Complete constructor. + * + * @param id + * @param role + * @param activeStatus + * @param createdBy + * @param createdOn + * @param lastUpdatedBy + * @param lastUpdatedOn + */ + public RoleCtlg(String id, String role, ActiveStatus activeStatus, String createdBy, Date createdOn, String lastUpdatedBy, Date lastUpdatedOn) { + this.id = id; + this.role = role; + this.activeStatus = activeStatus; + this.createdBy = createdBy; + this.createdOn = createdOn; + this.lastUpdatedBy = lastUpdatedBy; + this.lastUpdatedOn = lastUpdatedOn; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public ActiveStatus getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(ActiveStatus activeStatus) { + this.activeStatus = activeStatus; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public List getHumanResources() { + return humanResources; + } + + public void setHumanResources(List humanResources) { + this.humanResources = humanResources; + } + + @Override + public String toString() { + return "RoleCtlg{" + "role=" + role + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/catalog/RouteCtlg.java b/ace-model/src/main/java/com/arrebol/apc/model/catalog/RouteCtlg.java new file mode 100644 index 0000000..77392e5 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/catalog/RouteCtlg.java @@ -0,0 +1,262 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.catalog; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.gasoline.Gasoline; +import com.arrebol.apc.model.loan.Loan; +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.UniqueConstraint; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_ROUTE", + uniqueConstraints = { + @UniqueConstraint(columnNames = {"id_office", "route_name"}, name = "apc_route_uk") + } +) +public class RouteCtlg implements Serializable { + + private static final long serialVersionUID = -903631618997045859L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "route_name", length = 25, nullable = false) + private String route; + + @Enumerated(EnumType.STRING) + @Column(name = "active_status", nullable = false) + private ActiveStatus activeStatus; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @OneToMany( + fetch = FetchType.LAZY, + mappedBy = "routeCtlg", + orphanRemoval = true, + cascade = CascadeType.ALL + ) + private List humanResourceHasRoutes; + + @OneToMany( + mappedBy = "office", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List peoples; + + @OneToMany( + mappedBy = "routeCtlg", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List loans; + + @OneToMany( + fetch = FetchType.LAZY, + mappedBy = "routeCtlg", + orphanRemoval = true, + cascade = CascadeType.ALL + ) + private List gasolines; + + public RouteCtlg() { + } + + /** + * + * @param id + */ + public RouteCtlg(String id) { + this.id = id; + } + + /** + * + * @param id + * @param route + */ + public RouteCtlg(String id, String route) { + this.id = id; + this.route = route; + } + + /** + * Complete constructor. + * + * @param id + * @param office + * @param route + * @param activeStatus + * @param createdBy + * @param createdOn + * @param lastUpdatedBy + * @param lastUpdatedOn + * @param humanResourceHasRoutes + */ + public RouteCtlg(String id, Office office, String route, ActiveStatus activeStatus, String createdBy, Date createdOn, String lastUpdatedBy, Date lastUpdatedOn, List humanResourceHasRoutes) { + this.id = id; + this.office = office; + this.route = route; + this.activeStatus = activeStatus; + this.createdBy = createdBy; + this.createdOn = createdOn; + this.lastUpdatedBy = lastUpdatedBy; + this.lastUpdatedOn = lastUpdatedOn; + this.humanResourceHasRoutes = humanResourceHasRoutes; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public String getRoute() { + return route; + } + + public void setRoute(String route) { + this.route = route; + } + + public ActiveStatus getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(ActiveStatus activeStatus) { + this.activeStatus = activeStatus; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public List getHumanResourceHasRoutes() { + return humanResourceHasRoutes; + } + + public void setHumanResourceHasRoutes(List humanResourceHasRoutes) { + this.humanResourceHasRoutes = humanResourceHasRoutes; + } + + public List getPeoples() { + return peoples; + } + + public void setPeoples(List peoples) { + this.peoples = peoples; + } + + public List getLoans() { + return loans; + } + + public void setLoans(List loans) { + this.loans = loans; + } + + public List getGasolines() { + return gasolines; + } + + public void setGasolines(List gasolines) { + this.gasolines = gasolines; + } + + @Override + public String toString() { + return "RouteCtlg{" + "route=" + route + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/catalog/Vehicle.java b/ace-model/src/main/java/com/arrebol/apc/model/catalog/Vehicle.java new file mode 100644 index 0000000..3fabcf9 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/catalog/Vehicle.java @@ -0,0 +1,323 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.catalog; + +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +@Entity +@Table(name = "APC_VEHICLES") +public class Vehicle implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_driver", length = 36) + private String idDriver; + + @Column(name = "license_plate") + private String licensePlate; + + @Column(name = "economic_number") + private String economicNumber; + + @Column(name = "serial_number") + private String serialNumber; + + @Column(name = "engine_number") + private String engineNumber; + + @Column(name = "mileage") + private BigDecimal mileage; + + @Column(name = "year") + private int year; + + @Column(name = "insurance_name") + private String insuranceName; + + @Column(name = "insurance_number") + private String insuranceNumber; + + @Column(name = "coverage_type") + private String coverageType; + + @Column(name = "colour") + private String colour; + + @Column(name = "model") + private String model; + + @Column(name = "gps") + private boolean gps; + + @Column(name = "gps_number") + private String gpsNumber; + + @Column(name = "comments") + private String comments; + + @Enumerated(EnumType.STRING) + @Column(name = "vehicle_status", nullable = false) + private ActiveStatus vehicleStatus; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @Column(name = "type") + private String type; + + @Column(name = "brand") + private String brand; + + @OneToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_driver", + referencedColumnName = "id", + nullable = false, + insertable = false, + updatable = false + ) + private HumanResource humanResource; + + public HumanResource getHumanResource() { + return humanResource; + } + + public void setHumanResource(HumanResource humanResource) { + this.humanResource = humanResource; + } + + public String getBrand() { + return brand; + } + + public void setBrand(String brand) { + this.brand = brand; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdDriver() { + return idDriver; + } + + public void setIdDriver(String idDriver) { + this.idDriver = idDriver; + } + + public String getLicensePlate() { + return licensePlate; + } + + public void setLicensePlate(String licensePlate) { + this.licensePlate = licensePlate; + } + + public String getEconomicNumber() { + return economicNumber; + } + + public void setEconomicNumber(String economicNumber) { + this.economicNumber = economicNumber; + } + + public String getSerialNumber() { + return serialNumber; + } + + public void setSerialNumber(String serialNumber) { + this.serialNumber = serialNumber; + } + + public String getEngineNumber() { + return engineNumber; + } + + public void setEngineNumber(String engineNumber) { + this.engineNumber = engineNumber; + } + + public BigDecimal getMileage() { + return mileage; + } + + public void setMileage(BigDecimal mileage) { + this.mileage = mileage; + } + + public int getYear() { + return year; + } + + public void setYear(int year) { + this.year = year; + } + + public String getInsuranceName() { + return insuranceName; + } + + public void setInsuranceName(String insuranceName) { + this.insuranceName = insuranceName; + } + + public String getInsuranceNumber() { + return insuranceNumber; + } + + public void setInsuranceNumber(String insuranceNumber) { + this.insuranceNumber = insuranceNumber; + } + + public String getCoverageType() { + return coverageType; + } + + public void setCoverageType(String coverageType) { + this.coverageType = coverageType; + } + + public String getColour() { + return colour; + } + + public void setColour(String colour) { + this.colour = colour; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + public boolean isGps() { + return gps; + } + + public void setGps(boolean gps) { + this.gps = gps; + } + + public String getGpsNumber() { + return gpsNumber; + } + + public void setGpsNumber(String gpsNumber) { + this.gpsNumber = gpsNumber; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public ActiveStatus getVehicleStatus() { + return vehicleStatus; + } + + public void setVehicleStatus(ActiveStatus vehicleStatus) { + this.vehicleStatus = vehicleStatus; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public String getDriver() { + String name = humanResource.getFirstName() + " " + humanResource.getLastName(); + return name; + } + + @Override + public String toString() { + return "Vehícle: "; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/catalog/constance/PeopleCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/catalog/constance/PeopleCfg.java new file mode 100644 index 0000000..4b19d05 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/catalog/constance/PeopleCfg.java @@ -0,0 +1,33 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.catalog.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface PeopleCfg extends GenericCfg { + + String UPDATE_PEOPLE_BY_STATUS = "updateByPeopleId"; + String UPDATE_PEOPLE_TYPE_BY_STATUS = "updateTypeByPeopleId"; + String UPDATE_ROUTE_BY_PEOPLE = "updateRouteByPeopleId"; + String UPDATE_PEOPLE_BY_CLASSIFICATION = "updateByPeopleClassification"; + String QUERY_FIND_ALL_CUSTOMER = "findAllCustomerPeople"; + String QUERY_FIND_ALL_ENDORSEMENT = "findAllEndorsementPeople"; + String QUERY_FIND_PEOPLE_BY_ID = "findPeopleById"; + String QUERY_UPDATE_PHONE_HOME_BY_PEOPLE_ID = "updatePhoneHomeByPeopleId"; + + String FIELD_PEOPLE_TYPE = "peopleType"; + String FIELD_ACTIVE_STATUS = "activeStatus"; + String FIELD_OFFICE = "office"; + String FIELD_ROUTE = "routeCtlg"; + String FIELD_CLASSIFICATION = "classification"; + String FIELD_PHONE_HOME = "phoneHome"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/catalog/constance/RoleCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/catalog/constance/RoleCfg.java new file mode 100644 index 0000000..816ea99 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/catalog/constance/RoleCfg.java @@ -0,0 +1,24 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.catalog.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface RoleCfg extends GenericCfg { + + String UPDATE_ROLE_BY_STATUS = "updateByRoleId"; + String QUERY_FIND_ALL_ROLES = "findAllRoles"; + + String FIELD_NAME = "role"; + String FIELD_ACTIVE_STATUS = "activeStatus"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/catalog/constance/RouteCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/catalog/constance/RouteCfg.java new file mode 100644 index 0000000..f3246e1 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/catalog/constance/RouteCfg.java @@ -0,0 +1,29 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.catalog.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface RouteCfg extends GenericCfg { + + String UPDATE_ROUTE_BY_STATUS = "updateByRouteId"; + String QUERY_FIND_ALL_ROUTES = "findAllRoutes"; + String QUERY_FIND_ROUTES_WITH_NO_CERTIFIER_USER = "findRoutesWithNoCertifierUser"; + String QUERY_FIND_ALL_ROUTES_BY_HRHR = "findAllRoutesByHRHR"; + String QUERY_FIND_ALL_NOT_ROUTES_BY_HRHR = "findAllNotRoutesByHRHR"; + String QUERY_FIND_ALL_AVAILABLES_ROUTES = "findAllAvailablesRoutes"; + + String FIELD_NAME = "route"; + String FIELD_ACTIVE_STATUS = "activeStatus"; + String FIELD_OFFICE = "office"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/HumanResource.java b/ace-model/src/main/java/com/arrebol/apc/model/core/HumanResource.java new file mode 100644 index 0000000..355978e --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/HumanResource.java @@ -0,0 +1,428 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core; + +import com.arrebol.apc.model.admin.Advance; +import com.arrebol.apc.model.admin.Bonus; +import com.arrebol.apc.model.catalog.HumanResourceHasRoute; +import com.arrebol.apc.model.catalog.RoleCtlg; +import com.arrebol.apc.model.enums.HumanResourceStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.OneToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.Transient; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_HUMAN_RESOURCE") +public class HumanResource implements Serializable { + + private static final long serialVersionUID = -7296859753095844932L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "first_name", length = 25, nullable = false) + private String firstName; + + @Column(name = "second_name", length = 25) + private String secondName; + + @Column(name = "last_name", length = 25, nullable = false) + private String lastName; + + @Column(name = "middle_name", length = 25, nullable = false) + private String middleName; + + @Temporal(TemporalType.DATE) + @Column(name = "birthdate") + private Date birthdate; + + @Column(name = "avatar", length = 150, nullable = false) + private String avatar; + + @Column(name = "curp", length = 20) + private String curp; + + @Column(name = "rfc", length = 13) + private String rfc; + + @Column(name = "ife", length = 20) + private String ife; + + @Temporal(TemporalType.DATE) + @Column(name = "admission_date") + private Date admissionDate; + + @Enumerated(EnumType.STRING) + @Column(name = "human_resource_status", nullable = false) + private HumanResourceStatus humanResourceStatus; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_role", + referencedColumnName = "id", + nullable = false + ) + private RoleCtlg roleCtlg; + + @OneToOne(fetch = FetchType.LAZY) + @JoinColumn( + name = "id_bonus", + referencedColumnName = "id" + ) + private Bonus bonus; + + @Column(name = "payment") + private BigDecimal payment; + + @Column(name = "balance", nullable = false) + private BigDecimal balance; + + @Column(name = "imss") + private BigDecimal imss; + + @Column(name = "employee_saving") + private BigDecimal employeeSaving; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @OneToOne( + mappedBy = "humanResource", + cascade = CascadeType.ALL, + orphanRemoval = true, + fetch = FetchType.LAZY + ) + private User user; + + @OneToMany( + mappedBy = "humanResource", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List humanResourceByOffices; + + @OneToMany( + fetch = FetchType.LAZY, + mappedBy = "humanResource", + orphanRemoval = true, + cascade = CascadeType.ALL + ) + private List humanResourceHasRoutes; + + @OneToMany( + fetch = FetchType.LAZY, + mappedBy = "humanResource", + orphanRemoval = true, + cascade = CascadeType.ALL + ) + private List advances; + + @Transient + private String fullName; + + public HumanResource() { + } + + public HumanResource(String id) { + this.id = id; + } + + /** + * + * @param id + * @param fullName + */ + public HumanResource(String id, String fullName) { + this.id = id; + this.fullName = fullName; + } + + /** + * + * @param id + * @param firstName + * @param lastName + * @param avatar + */ + public HumanResource(String id, String firstName, String lastName, String avatar) { + this.id = id; + this.firstName = firstName; + this.lastName = lastName; + this.avatar = avatar; + } + + /** + * + * @param firstName + * @param lastName + * @param avatar + */ + public HumanResource(String firstName, String lastName, String avatar) { + this.firstName = firstName; + this.lastName = lastName; + this.avatar = avatar; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getSecondName() { + return secondName; + } + + public void setSecondName(String secondName) { + this.secondName = secondName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getMiddleName() { + return middleName; + } + + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + + public Date getBirthdate() { + return birthdate; + } + + public void setBirthdate(Date birthdate) { + this.birthdate = birthdate; + } + + public String getAvatar() { + return avatar; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + + public String getCurp() { + return curp; + } + + public void setCurp(String curp) { + this.curp = curp; + } + + public String getRfc() { + return rfc; + } + + public void setRfc(String rfc) { + this.rfc = rfc; + } + + public String getIfe() { + return ife; + } + + public void setIfe(String ife) { + this.ife = ife; + } + + public Date getAdmissionDate() { + return admissionDate; + } + + public void setAdmissionDate(Date admissionDate) { + this.admissionDate = admissionDate; + } + + public HumanResourceStatus getHumanResourceStatus() { + return humanResourceStatus; + } + + public void setHumanResourceStatus(HumanResourceStatus humanResourceStatus) { + this.humanResourceStatus = humanResourceStatus; + } + + public RoleCtlg getRoleCtlg() { + return roleCtlg; + } + + public void setRoleCtlg(RoleCtlg roleCtlg) { + this.roleCtlg = roleCtlg; + } + + public Bonus getBonus() { + return bonus; + } + + public void setBonus(Bonus bonus) { + this.bonus = bonus; + } + + public BigDecimal getBalance() { + return balance; + } + + public void setBalance(BigDecimal balance) { + this.balance = balance; + } + + public BigDecimal getEmployeeSaving() { + return employeeSaving; + } + + public void setEmployeeSaving(BigDecimal employeeSaving) { + this.employeeSaving = employeeSaving; + } + + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + public BigDecimal getImss() { + return imss; + } + + public void setImss(BigDecimal imss) { + this.imss = imss; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public List getHumanResourceByOffices() { + return humanResourceByOffices; + } + + public void setHumanResourceByOffices(List humanResourceByOffices) { + this.humanResourceByOffices = humanResourceByOffices; + } + + public List getHumanResourceHasRoutes() { + return humanResourceHasRoutes; + } + + public void setHumanResourceHasRoutes(List humanResourceHasRoutes) { + this.humanResourceHasRoutes = humanResourceHasRoutes; + } + + public List getAdvances() { + return advances; + } + + public void setAdvances(List advances) { + this.advances = advances; + } + + public String getFullName() { + return fullName; + } + + public void setFullName(String fullName) { + this.fullName = fullName; + } + + @Override + public String toString() { + return "HumanResource{" + "firstName=" + firstName + ", secondName=" + secondName + ", lastName=" + lastName + ", middleName=" + middleName + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/HumanResourceByOffice.java b/ace-model/src/main/java/com/arrebol/apc/model/core/HumanResourceByOffice.java new file mode 100644 index 0000000..fbc5c06 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/HumanResourceByOffice.java @@ -0,0 +1,179 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core; + +import com.arrebol.apc.model.enums.ApplicationOwner; +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.UniqueConstraint; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_HUMAN_RESOURCE_BY_OFFICE", + uniqueConstraints = { + @UniqueConstraint(columnNames = {"id_human_resource", "id_office"}, name = "apc_human_resource_by_office_uk") + }) +public class HumanResourceByOffice implements Serializable { + + private static final long serialVersionUID = -2892820400055813543L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_human_resource", + referencedColumnName = "id", + nullable = false + ) + private HumanResource humanResource; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Enumerated(EnumType.STRING) + @Column(name = "application_owner", nullable = false) + private ApplicationOwner applicationOwner; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public HumanResourceByOffice() { + } + + /** + * + * @param id + * @param humanResource + * @param office + */ + public HumanResourceByOffice(String id, HumanResource humanResource, Office office) { + this.id = id; + this.humanResource = humanResource; + this.office = office; + } + + /** + * + * @param office + * @param createdBy + * @param createdOn + * @param applicationOwner + */ + public HumanResourceByOffice(Office office, String createdBy, Date createdOn, ApplicationOwner applicationOwner) { + this.office = office; + this.createdBy = createdBy; + this.createdOn = createdOn; + this.applicationOwner = applicationOwner; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public HumanResource getHumanResource() { + return humanResource; + } + + public void setHumanResource(HumanResource humanResource) { + this.humanResource = humanResource; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public ApplicationOwner getApplicationOwner() { + return applicationOwner; + } + + public void setApplicationOwner(ApplicationOwner applicationOwner) { + this.applicationOwner = applicationOwner; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + @Override + public String toString() { + return "HumanResourceByOffice{" + "humanResource=" + humanResource + ", office=" + office + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/Office.java b/ace-model/src/main/java/com/arrebol/apc/model/core/Office.java new file mode 100644 index 0000000..d21fe4a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/Office.java @@ -0,0 +1,421 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core; + +import com.arrebol.apc.model.admin.Advance; +import com.arrebol.apc.model.admin.Bonus; +import com.arrebol.apc.model.admin.ExpenseCompany; +import com.arrebol.apc.model.admin.Goal; +import com.arrebol.apc.model.admin.MoneyDaily; +import com.arrebol.apc.model.admin.OtherExpense; +import com.arrebol.apc.model.admin.StableGeneralBox; +import com.arrebol.apc.model.admin.Transfer; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.enums.OfficeStatus; +import com.arrebol.apc.model.gasoline.Gasoline; +import com.arrebol.apc.model.loan.LoanType; +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import java.util.Objects; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.UniqueConstraint; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_OFFICE", + uniqueConstraints = { + @UniqueConstraint(columnNames = {"office_name"})} +) +public class Office implements Serializable { + + private static final long serialVersionUID = -141661123746446879L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "office_name", length = 100, nullable = false) + private String officeName; + + @Column(name = "address", length = 250) + private String address; + + @Enumerated(EnumType.STRING) + @Column(name = "office_status", nullable = false) + private OfficeStatus officeStatus; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @OneToMany( + mappedBy = "office", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List userByOffices; + + @OneToMany( + mappedBy = "office", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List humanResourceByOffices; + + @OneToMany( + mappedBy = "office", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List routeCtlgs; + + @OneToMany( + mappedBy = "office", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List peoples; + + @OneToMany( + mappedBy = "office", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List loanTypes; + + @OneToMany( + mappedBy = "office", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List transfers; + + @OneToMany( + mappedBy = "office", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List moneyDailys; + + @OneToMany( + mappedBy = "office", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List otherExpenses; + + @OneToMany( + mappedBy = "office", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List goals; + + @OneToMany( + fetch = FetchType.LAZY, + mappedBy = "office", + orphanRemoval = true, + cascade = CascadeType.ALL + ) + private List advances; + + @OneToMany( + fetch = FetchType.LAZY, + mappedBy = "office", + orphanRemoval = true, + cascade = CascadeType.ALL + ) + private List bonuses; + + @OneToMany( + fetch = FetchType.LAZY, + mappedBy = "office", + orphanRemoval = true, + cascade = CascadeType.ALL + ) + private List expenseCompanies; + + @OneToMany( + fetch = FetchType.LAZY, + mappedBy = "office", + orphanRemoval = true, + cascade = CascadeType.ALL + ) + private List stableGeneralBoxes; + + @OneToMany( + fetch = FetchType.LAZY, + mappedBy = "office", + orphanRemoval = true, + cascade = CascadeType.ALL + ) + private List gasolines; + + public Office() { + } + + /** + * + * @param id + */ + public Office(String id) { + this.id = id; + } + + /** + * + * @param id + * @param officeName + */ + public Office(String id, String officeName) { + this.id = id; + this.officeName = officeName; + } + + public Office(String id, String officeName, String address) { + this.id = id; + this.officeName = officeName; + this.address = address; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOfficeName() { + return officeName; + } + + public void setOfficeName(String officeName) { + this.officeName = officeName; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public OfficeStatus getOfficeStatus() { + return officeStatus; + } + + public void setOfficeStatus(OfficeStatus officeStatus) { + this.officeStatus = officeStatus; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public List getUserByOffices() { + return userByOffices; + } + + public void setUserByOffices(List userByOffices) { + this.userByOffices = userByOffices; + } + + public List getHumanResourceByOffices() { + return humanResourceByOffices; + } + + public void setHumanResourceByOffices(List humanResourceByOffices) { + this.humanResourceByOffices = humanResourceByOffices; + } + + public List getRouteCtlgs() { + return routeCtlgs; + } + + public void setRouteCtlgs(List routeCtlgs) { + this.routeCtlgs = routeCtlgs; + } + + public List getPeoples() { + return peoples; + } + + public void setPeoples(List peoples) { + this.peoples = peoples; + } + + public List getLoanTypes() { + return loanTypes; + } + + public void setLoanTypes(List loanTypes) { + this.loanTypes = loanTypes; + } + + public List getTransfers() { + return transfers; + } + + public void setTransfers(List transfers) { + this.transfers = transfers; + } + + public List getMoneyDailys() { + return moneyDailys; + } + + public void setMoneyDailys(List moneyDailys) { + this.moneyDailys = moneyDailys; + } + + public List getOtherExpenses() { + return otherExpenses; + } + + public void setOtherExpenses(List otherExpenses) { + this.otherExpenses = otherExpenses; + } + + public List getGoals() { + return goals; + } + + public void setGoals(List goals) { + this.goals = goals; + } + + public List getAdvances() { + return advances; + } + + public void setAdvances(List advances) { + this.advances = advances; + } + + public List getBonuses() { + return bonuses; + } + + public void setBonuses(List bonuses) { + this.bonuses = bonuses; + } + + public List getExpenseCompanies() { + return expenseCompanies; + } + + public void setExpenseCompanies(List expenseCompanies) { + this.expenseCompanies = expenseCompanies; + } + + public List getStableGeneralBoxes() { + return stableGeneralBoxes; + } + + public void setStableGeneralBoxes(List stableGeneralBoxes) { + this.stableGeneralBoxes = stableGeneralBoxes; + } + + @Override + public int hashCode() { + int hash = 3; + hash = 97 * hash + Objects.hashCode(this.id); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final Office other = (Office) obj; + if (!Objects.equals(this.id, other.id)) { + return false; + } + return true; + } + + @Override + public String toString() { + return "Office{" + "officeName=" + officeName + ", address=" + address + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/Permission.java b/ace-model/src/main/java/com/arrebol/apc/model/core/Permission.java new file mode 100644 index 0000000..b981610 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/Permission.java @@ -0,0 +1,257 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core; + +import com.arrebol.apc.model.enums.PermissionStatus; +import com.arrebol.apc.model.enums.PermissionType; +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import java.util.Objects; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.UniqueConstraint; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_PERMISSION", + uniqueConstraints = { + @UniqueConstraint(columnNames = {"permission"}) + } +) +public class Permission implements Serializable { + + private static final long serialVersionUID = -4259020491787578065L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "permission", length = 200, nullable = false) + private String permission; + + @Column(name = "description", length = 200, nullable = false) + private String description; + + @Column(name = "menu_path", length = 200, nullable = false) + private String menuPath; + + @Column(name = "left_to_right_order", nullable = false) + private Integer leftToRightOrder; + + @Column(name = "top_to_bottom_order", nullable = false) + private Integer topToBottomOrder; + + @Enumerated(EnumType.STRING) + @Column(name = "permission_type", nullable = false) + private PermissionType permissionType; + + @Column(name = "parent_name", length = 200) + private String parentName; + + @Enumerated(EnumType.STRING) + @Column(name = "permission_status", nullable = false) + private PermissionStatus permissionStatus; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @OneToMany( + fetch = FetchType.LAZY, + mappedBy = "permission", + orphanRemoval = true, + cascade = CascadeType.ALL + ) + private List userByOfficeHasPermissions; + + public Permission() { + } + + /** + * + * @param id + * @param permission + * @param description + * @param menuPath + */ + public Permission(String id, String permission, String description, String menuPath) { + this.id = id; + this.permission = permission; + this.description = description; + this.menuPath = menuPath; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPermission() { + return permission; + } + + public void setPermission(String permission) { + this.permission = permission; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getMenuPath() { + return menuPath; + } + + public void setMenuPath(String menuPath) { + this.menuPath = menuPath; + } + + public Integer getLeftToRightOrder() { + return leftToRightOrder; + } + + public void setLeftToRightOrder(Integer leftToRightOrder) { + this.leftToRightOrder = leftToRightOrder; + } + + public Integer getTopToBottomOrder() { + return topToBottomOrder; + } + + public void setTopToBottomOrder(Integer topToBottomOrder) { + this.topToBottomOrder = topToBottomOrder; + } + + public PermissionType getPermissionType() { + return permissionType; + } + + public void setPermissionType(PermissionType permissionType) { + this.permissionType = permissionType; + } + + public String getParentName() { + return parentName; + } + + public void setParentName(String parentName) { + this.parentName = parentName; + } + + public PermissionStatus getPermissionStatus() { + return permissionStatus; + } + + public void setPermissionStatus(PermissionStatus permissionStatus) { + this.permissionStatus = permissionStatus; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public List getUserByOfficeHasPermissions() { + return userByOfficeHasPermissions; + } + + public void setUserByOfficeHasPermissions(List userByOfficeHasPermissions) { + this.userByOfficeHasPermissions = userByOfficeHasPermissions; + } + + @Override + public int hashCode() { + int hash = 5; + hash = 89 * hash + Objects.hashCode(this.id); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final Permission other = (Permission) obj; + if (!Objects.equals(this.id, other.id)) { + return false; + } + return true; + } + + @Override + public String toString() { + return "Permission{" + "description=" + description + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/User.java b/ace-model/src/main/java/com/arrebol/apc/model/core/User.java new file mode 100644 index 0000000..64033c2 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/User.java @@ -0,0 +1,435 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core; + +import com.arrebol.apc.model.admin.MoneyDaily; +import com.arrebol.apc.model.admin.OtherExpense; +import com.arrebol.apc.model.admin.Transfer; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.ApplicationOwner; +import com.arrebol.apc.model.enums.UserStatus; +import com.arrebol.apc.model.enums.UserType; +import com.arrebol.apc.model.gasoline.Gasoline; +import com.arrebol.apc.model.loan.Delivery; +import com.arrebol.apc.model.loan.LoanByUser; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.model.loan.LoanFeeNotification; +import com.arrebol.apc.model.mobile.preference.UserMobilePreference; +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.OneToMany; +import javax.persistence.OneToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_USER") +public class User implements Serializable { + + private static final long serialVersionUID = 5293919946950359645L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @OneToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_human_resource", + referencedColumnName = "id", + nullable = false + ) + private HumanResource humanResource; + + @Column(name = "user_name", length = 100, nullable = false) + private String userName; + + @Column(name = "pwd", length = 100, nullable = false) + private String password; + + @Enumerated(EnumType.STRING) + @Column(name = "user_type", nullable = false) + private UserType userType; + + @Enumerated(EnumType.STRING) + @Column(name = "user_status", nullable = false) + private UserStatus userStatus; + + @Enumerated(EnumType.STRING) + @Column(name = "application_owner", nullable = false) + private ApplicationOwner applicationOwner; + + @Enumerated(EnumType.STRING) + @Column(name = "certifier", nullable = false) + private ActiveStatus certifier; + + @Enumerated(EnumType.STRING) + @Column(name = "management", nullable = false) + private ActiveStatus management; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @OneToMany( + mappedBy = "user", + fetch = FetchType.LAZY, + cascade = CascadeType.ALL, + orphanRemoval = true + ) + private List userByOffices; + + @OneToMany( + mappedBy = "user", + fetch = FetchType.LAZY, + cascade = CascadeType.ALL, + orphanRemoval = true + ) + private List userMobilePreferences; + + @OneToMany( + mappedBy = "user", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List loanDetailses; + + @OneToMany( + mappedBy = "user", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List loanByUsers; + + @OneToMany( + mappedBy = "user", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List loanFeeNotifications; + + @OneToMany( + mappedBy = "userTransmitter", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List userTransmitters; + + @OneToMany( + mappedBy = "userReceiver", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List userReceivers; + + @OneToMany( + mappedBy = "user", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List moneyDailys; + + @OneToMany( + mappedBy = "user", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List deliverys; + + @OneToMany( + mappedBy = "user", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List otherExpenses; + + @OneToMany( + fetch = FetchType.LAZY, + mappedBy = "user", + orphanRemoval = true, + cascade = CascadeType.ALL + ) + private List gasolines; + + public User() { + } + + public User(String id) { + this.id = id; + } + + /** + * + * @param id + * @param userName + */ + public User(String id, String userName) { + this.id = id; + this.userName = userName; + } + + /** + * + * @param id + * @param userName + * @param humanResource + */ + public User(String id, String userName, HumanResource humanResource) { + this.id = id; + this.userName = userName; + this.humanResource = humanResource; + } + + /** + * + * @param id + * @param humanResource + * @param userName + * @param certifier + * @param userType + */ + public User(String id, HumanResource humanResource, String userName, ActiveStatus certifier, UserType userType,ActiveStatus management) { + this.id = id; + this.humanResource = humanResource; + this.userName = userName; + this.certifier = certifier; + this.userType = userType; + this.management = management; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public HumanResource getHumanResource() { + return humanResource; + } + + public void setHumanResource(HumanResource humanResource) { + this.humanResource = humanResource; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public UserType getUserType() { + return userType; + } + + public void setUserType(UserType userType) { + this.userType = userType; + } + + public UserStatus getUserStatus() { + return userStatus; + } + + public void setUserStatus(UserStatus userStatus) { + this.userStatus = userStatus; + } + + public ApplicationOwner getApplicationOwner() { + return applicationOwner; + } + + public void setApplicationOwner(ApplicationOwner applicationOwner) { + this.applicationOwner = applicationOwner; + } + + public ActiveStatus getCertifier() { + return certifier; + } + + public void setCertifier(ActiveStatus certifier) { + this.certifier = certifier; + } + + public ActiveStatus getManagement() { + return management; + } + + public void setManagement(ActiveStatus management) { + this.management = management; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public List getUserByOffices() { + return userByOffices; + } + + public void setUserByOffices(List userByOffices) { + this.userByOffices = userByOffices; + } + + public List getUserMobilePreferences() { + return userMobilePreferences; + } + + public void setUserMobilePreferences(List userMobilePreferences) { + this.userMobilePreferences = userMobilePreferences; + } + + public List getLoanDetailses() { + return loanDetailses; + } + + public void setLoanDetailses(List loanDetailses) { + this.loanDetailses = loanDetailses; + } + + public List getLoanByUsers() { + return loanByUsers; + } + + public void setLoanByUsers(List loanByUsers) { + this.loanByUsers = loanByUsers; + } + + public List getLoanFeeNotifications() { + return loanFeeNotifications; + } + + public void setLoanFeeNotifications(List loanFeeNotifications) { + this.loanFeeNotifications = loanFeeNotifications; + } + + public List getUserTransmitters() { + return userTransmitters; + } + + public void setUserTransmitters(List userTransmitters) { + this.userTransmitters = userTransmitters; + } + + public List getUserReceivers() { + return userReceivers; + } + + public void setUserReceivers(List userReceivers) { + this.userReceivers = userReceivers; + } + + public List getMoneyDailys() { + return moneyDailys; + } + + public void setMoneyDailys(List moneyDailys) { + this.moneyDailys = moneyDailys; + } + + public List getDeliverys() { + return deliverys; + } + + public void setDeliverys(List deliverys) { + this.deliverys = deliverys; + } + + public List getOtherExpenses() { + return otherExpenses; + } + + public void setOtherExpenses(List otherExpenses) { + this.otherExpenses = otherExpenses; + } + + public List getGasolines() { + return gasolines; + } + + public void setGasolines(List gasolines) { + this.gasolines = gasolines; + } + + @Override + public String toString() { + return "User{" + "userName=" + userName + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/UserByOffice.java b/ace-model/src/main/java/com/arrebol/apc/model/core/UserByOffice.java new file mode 100644 index 0000000..bb71205 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/UserByOffice.java @@ -0,0 +1,268 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core; + +import com.arrebol.apc.model.enums.ApplicationOwner; +import com.arrebol.apc.model.enums.UserByOfficeStatus; +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import java.util.Objects; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.UniqueConstraint; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_USER_BY_OFFICE", + uniqueConstraints = { + @UniqueConstraint(columnNames = {"id_user", "id_office"}, name = "apc_user_by_office_uk")} +) +public class UserByOffice implements Serializable { + + private static final long serialVersionUID = -8206398520981509425L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_user", + referencedColumnName = "id", + nullable = false + ) + private User user; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Enumerated(EnumType.STRING) + @Column(name = "user_by_office_status", nullable = true) + private UserByOfficeStatus userByOfficeStatus; + + @Enumerated(EnumType.STRING) + @Column(name = "application_owner", nullable = false) + private ApplicationOwner applicationOwner; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @OneToMany( + fetch = FetchType.LAZY, + mappedBy = "userByOffice", + orphanRemoval = true, + cascade = CascadeType.ALL + ) + private List userByOfficeHasPermissions; + + public UserByOffice() { + } + + /** + * + * @param id + */ + public UserByOffice(String id) { + this.id = id; + } + + /** + * + * @param user + * @param office + */ + public UserByOffice(User user, Office office) { + this.user = user; + this.office = office; + } + + /** + * + * @param office + * @param userByOfficeStatus + * @param createdBy + * @param createdOn + */ + public UserByOffice(Office office, UserByOfficeStatus userByOfficeStatus, String createdBy, Date createdOn) { + this.office = office; + this.userByOfficeStatus = userByOfficeStatus; + this.createdBy = createdBy; + this.createdOn = createdOn; + } + + /** + * + * @param office + * @param userByOfficeStatus + * @param applicationOwner + * @param createdBy + * @param createdOn + */ + public UserByOffice(Office office, UserByOfficeStatus userByOfficeStatus, ApplicationOwner applicationOwner, String createdBy, Date createdOn) { + this.office = office; + this.userByOfficeStatus = userByOfficeStatus; + this.applicationOwner = applicationOwner; + this.createdBy = createdBy; + this.createdOn = createdOn; + } + + /** + * + * @param id + * @param user + */ + public UserByOffice(String id, User user) { + this.id = id; + this.user = user; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public UserByOfficeStatus getUserByOfficeStatus() { + return userByOfficeStatus; + } + + public void setUserByOfficeStatus(UserByOfficeStatus userByOfficeStatus) { + this.userByOfficeStatus = userByOfficeStatus; + } + + public ApplicationOwner getApplicationOwner() { + return applicationOwner; + } + + public void setApplicationOwner(ApplicationOwner applicationOwner) { + this.applicationOwner = applicationOwner; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public List getUserByOfficeHasPermissions() { + return userByOfficeHasPermissions; + } + + public void setUserByOfficeHasPermissions(List userByOfficeHasPermissions) { + this.userByOfficeHasPermissions = userByOfficeHasPermissions; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 37 * hash + Objects.hashCode(this.id); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final UserByOffice other = (UserByOffice) obj; + if (!Objects.equals(this.id, other.id)) { + return false; + } + return true; + } + + @Override + public String toString() { + return "UserByOffice{" + "user=" + user + ", office=" + office + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/UserByOfficeHasPermission.java b/ace-model/src/main/java/com/arrebol/apc/model/core/UserByOfficeHasPermission.java new file mode 100644 index 0000000..49ee290 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/UserByOfficeHasPermission.java @@ -0,0 +1,177 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core; + +import java.io.Serializable; +import java.util.Date; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.EmbeddedId; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_USER_BY_OFFICE_HAS_PERMISSION") +public class UserByOfficeHasPermission implements Serializable { + + private static final long serialVersionUID = -4218581013559259950L; + + @EmbeddedId + private UserByOfficeHasPermissionId id; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn( + name = "id_user_by_office", + referencedColumnName = "id", + insertable = false, + updatable = false + ) + private UserByOffice userByOffice; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn( + name = "id_permission", + referencedColumnName = "id", + insertable = false, + updatable = false + ) + private Permission permission; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public UserByOfficeHasPermission() { + } + + /** + * + * @param id + * @param createdBy + */ + public UserByOfficeHasPermission(UserByOfficeHasPermissionId id, String createdBy) { + this.id = id; + this.createdBy = createdBy; + this.createdOn = new Date(); + } + + /** + * + * @param userByOffice + * @param createdBy + */ + public UserByOfficeHasPermission(UserByOffice userByOffice, String createdBy) { + this.userByOffice = userByOffice; + this.createdBy = createdBy; + } + + public UserByOfficeHasPermissionId getId() { + return id; + } + + public void setId(UserByOfficeHasPermissionId id) { + this.id = id; + } + + public UserByOffice getUserByOffice() { + return userByOffice; + } + + public void setUserByOffice(UserByOffice userByOffice) { + this.userByOffice = userByOffice; + } + + public Permission getPermission() { + return permission; + } + + public void setPermission(Permission permission) { + this.permission = permission; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + @Override + public int hashCode() { + int hash = 3; + hash = 97 * hash + Objects.hashCode(this.id); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final UserByOfficeHasPermission other = (UserByOfficeHasPermission) obj; + if (!Objects.equals(this.id, other.id)) { + return false; + } + return true; + } + + @Override + public String toString() { + return "UserByOfficeHasPermission{" + "userByOffice=" + userByOffice + ", permission=" + permission + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/UserByOfficeHasPermissionId.java b/ace-model/src/main/java/com/arrebol/apc/model/core/UserByOfficeHasPermissionId.java new file mode 100644 index 0000000..fb4e68a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/UserByOfficeHasPermissionId.java @@ -0,0 +1,82 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core; + +import java.io.Serializable; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Embeddable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Embeddable +public class UserByOfficeHasPermissionId implements Serializable { + + private static final long serialVersionUID = -7541179490083208294L; + + @Column(name = "id_user_by_office", length = 36, nullable = true) + private String idUserByOffice; + + @Column(name = "id_permission", length = 36, nullable = true) + private String idPermission; + + public UserByOfficeHasPermissionId() { + } + + public UserByOfficeHasPermissionId(String idUserByOffice, String idPermission) { + this.idUserByOffice = idUserByOffice; + this.idPermission = idPermission; + } + + public String getIdUserByOffice() { + return idUserByOffice; + } + + public void setIdUserByOffice(String idUserByOffice) { + this.idUserByOffice = idUserByOffice; + } + + public String getIdPermission() { + return idPermission; + } + + public void setIdPermission(String idPermission) { + this.idPermission = idPermission; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 29 * hash + Objects.hashCode(this.idUserByOffice); + hash = 29 * hash + Objects.hashCode(this.idPermission); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final UserByOfficeHasPermissionId other = (UserByOfficeHasPermissionId) obj; + if (!Objects.equals(this.idUserByOffice, other.idUserByOffice)) { + return false; + } + if (!Objects.equals(this.idPermission, other.idPermission)) { + return false; + } + return true; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/AvailableCustomersViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/AvailableCustomersViewCfg.java new file mode 100644 index 0000000..f94fd72 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/AvailableCustomersViewCfg.java @@ -0,0 +1,18 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface AvailableCustomersViewCfg extends GenericCfg { + + String QUERY_FIND_AVAILABLE_CUSTOMERS = "findAllAvailableCustomersByType"; + String FIELD_AVAILABLE_PERSON = "availablePerson"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/AvailableEndorsementsViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/AvailableEndorsementsViewCfg.java new file mode 100644 index 0000000..c9ae46c --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/AvailableEndorsementsViewCfg.java @@ -0,0 +1,18 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface AvailableEndorsementsViewCfg extends GenericCfg { + + String QUERY_FIND_AVAILABLE_ENDORSEMENTS = "findAllAvailableEndorsementsByType"; + String FIELD_AVAILABLE_PERSON = "availablePerson"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/CashRegisterCurdateByUserViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/CashRegisterCurdateByUserViewCfg.java new file mode 100644 index 0000000..f5588d2 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/CashRegisterCurdateByUserViewCfg.java @@ -0,0 +1,18 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface CashRegisterCurdateByUserViewCfg extends GenericCfg { + + String QUERY_FIND_CASH_REGISTER = "findAllCashRegisterCurdateByUserId"; + String FIELD_USER_ID = "userId"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/ExchangeEnebledUsersViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/ExchangeEnebledUsersViewCfg.java new file mode 100644 index 0000000..429c5a1 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/ExchangeEnebledUsersViewCfg.java @@ -0,0 +1,19 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface ExchangeEnebledUsersViewCfg extends GenericCfg{ + + String QUERY_FIND_ENEBLED_USERS_TO_USER_ID = "findEnebledUsersToUserId"; + String FIELD_VIEW_ID = "userId"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/GenericCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/GenericCfg.java new file mode 100644 index 0000000..45ed495 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/GenericCfg.java @@ -0,0 +1,26 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface GenericCfg { + + String FIELD_ID = "id"; + String FIELD_LAST_UPDATED_BY = "lastUpdatedBy"; + String FIELD_LAST_UPDATED_ON = "lastUpdatedOn"; + + String PARAM_USER_NAME = "userName"; + String PARAM_OFFICE_ID = "officeId"; + String PARAM_USER_IDS = "userIds"; + String PARAM_OWNER_ID = "ownerId"; + String PARAM_START_DATE = "startDate"; + String PARAM_END_DATE = "endDate"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/HumanResourceByOfficeCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/HumanResourceByOfficeCfg.java new file mode 100644 index 0000000..3d6d49f --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/HumanResourceByOfficeCfg.java @@ -0,0 +1,17 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface HumanResourceByOfficeCfg extends GenericCfg { + + String HUMAN_RESOURCE = "humanResource"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/HumanResourceCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/HumanResourceCfg.java new file mode 100644 index 0000000..28b042c --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/HumanResourceCfg.java @@ -0,0 +1,37 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface HumanResourceCfg extends GenericCfg { + + String QUERY_FIND_ALL_HRS_WITHOUT_USER = "findAllHRWithoutUser"; + String QUERY_FIND_ALL_BY_STATUS = "findAllHByStatus"; + String QUERY_FIND_ALL_IN_STATUS = "findAllHRInStatus"; + String QUERY_FIND_ALL_HR_BY_OFFICE = "findAllHRByOffice"; + String UPDATE_HR_BY_STATUS = "updateHRByStatus"; + + String FIELD_FIRST_NAME = "firstName"; + String FIELD_SECOND_NAME = "secondName"; + String FIELD_LAST_NAME = "lastName"; + String FIELD_MIDDLE_NAME = "middleName"; + String FIELD_BIRTHDATE = "birthdate"; + String FIELD_AVATAR = "AVATAR"; + String FIELD_HR_TYPE = "humanResourceType"; + String FIELD_ADMISSION_DATE = "admissionDate"; + String FIELD_HR_STATUS = "humanResourceStatus"; + String FIELD_OFFICE = "office"; + String FIELD_PAYMENT = "payment"; + String FIELD_IMSS = "imss"; + String FIELD_ROLE = "roleCtlg"; + String FIELD_BONUS = "bonus"; + String FIELD_EMPLOYEE_SAVING = "employeeSaving"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/HumanResourceHasRouteCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/HumanResourceHasRouteCfg.java new file mode 100644 index 0000000..45ff174 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/HumanResourceHasRouteCfg.java @@ -0,0 +1,19 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface HumanResourceHasRouteCfg extends GenericCfg { + + String QUERY_DELETE_ALL_HR_HAS_ROUTE_BY_HR = "deleteAllHRHasRouteByHR"; + + String FIELD_HUMAN_RESOURCE = "humanResource"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanApprovedDetailViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanApprovedDetailViewCfg.java new file mode 100644 index 0000000..79b0b95 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanApprovedDetailViewCfg.java @@ -0,0 +1,16 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanApprovedDetailViewCfg extends GenericCfg{ + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByRenovationCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByRenovationCfg.java new file mode 100644 index 0000000..de71b2a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByRenovationCfg.java @@ -0,0 +1,23 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanByRenovationCfg extends GenericCfg { + + String QUERY_FIND_LOAN_RENOVATION_BY_NEW_LOAN_ID = "findLoanRenovationByNewLoanId"; + String QUERY_UPDATE_LOAN_RENOVATION = "updateLoanRenovation"; + String QUERY_UPDATE_LOAN_RENOVATION_WEB = "updateLoanRenovationWeb"; + + String FIELD_LOAN_NEW = "loanNew"; + String FIELD_LOAN_RENOVATION_STATUS = "loanRenovationStatus"; + String FIELD_COMMENTS = "comments"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByUserCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByUserCfg.java new file mode 100644 index 0000000..4ed4543 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByUserCfg.java @@ -0,0 +1,29 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanByUserCfg extends GenericCfg { + + String QUERY_UPDATE_ORDER_IN_LIST = "updateOrderInList"; + String QUERY_UPDATE_LOAN_BY_USER_BY_LOAND_ID = "updateLoandByUserByLoanId"; + String QUERY_UPDATE_LOAN_BY_USER_STATUS_WHERE_LOAN_IN = "updateLoanByUserStatusWhereLoanIn"; + String QUERY_UPDATE_LOAN_BY_USER_BU_USER_ID = "updateLoandByUserByUserId"; + String QUERY_FIND_LOAN_BY_USER_BY_LOAND_ID = "findLoandByUserByLoanId"; + String QUERY_CHANGE_LOANS_BETWEEN_USERS_IN_LOAN_IDS = "changeLoansBetweenUsersInLoanIds"; + + String FIELD_ORDER_IN_LIST = "orderInList"; + String FIELD_LOAN = "loan"; + String FIELD_LOAN_BY_USER_STATUS = "loanByUserStatus"; + String FIELD_USER = "user"; + + String PARAMS_LOAN = "loans"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByUserOrderPreferenceViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByUserOrderPreferenceViewCfg.java new file mode 100644 index 0000000..4844f75 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByUserOrderPreferenceViewCfg.java @@ -0,0 +1,25 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanByUserOrderPreferenceViewCfg extends GenericCfg { + + /** + * + */ + String QUERY_FIND_ALL_LOAN_BY_USER_ORDER_PREFERENCE = "findAllLoanByUserOrderPreference"; + + /** + * + */ + String FIELD_ORDER_USER_ID = "userId"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByUserViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByUserViewCfg.java new file mode 100644 index 0000000..b098bdc --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanByUserViewCfg.java @@ -0,0 +1,45 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanByUserViewCfg extends GenericCfg { + + /** + * + */ + String QUERY_FIND_ALL_LOAN_BY_USER_ID_BY_ORDER_LIST = "findAllLoansByUserIdOrderByOrderList"; + + /** + * + */ + String QUERY_FIND_ALL_LOAN_BY_USER_ID_BY_CUSTOMER_NAME = "findAllLoansByUserIdOrderByCustomerName"; + + /** + * + */ + String FIELD_USER_ID = "userId"; + + /** + * + */ + String FIELD_ORDER_IN_LIST = "orderInList"; + + /** + * + */ + String FIELD_CUSTOMER_NAME = "customerName"; + + /** + * + */ + String PARAM_PREFERENCE_ORDER = "preferenceOrder"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanCfg.java new file mode 100644 index 0000000..021d3a3 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanCfg.java @@ -0,0 +1,63 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanCfg extends GenericCfg { + + String QUERY_UPDATE_LOAN_BY_ID = "updateLoanById"; + String QUERY_UPDATE_LOAN_FROM_RENOVATION = "updateLoanFromRenovation"; + String QUERY_UPDATE_LOAN_STATUS_WHERE_ID_IN = "updateLoanStatusWhereIdIn"; + String QUERY_UPDATE_LOAN_FROM_WEB = "updateLoanFromWeb"; + String QUERY_FIND_LOAN_BY_CUSTOMER = "findLoansByCustomer"; + String QUERY_FIND_LOAN_JURIDICAL = "findLoansJuridical"; + String QUERY_FIND_LOAN_ZERO = "findLoansZero"; + String QUERY_FIND_LOAN_FINISHED = "findLoansFinished"; + String QUERY_FIND_LOAN_BY_ENDORSEMENT = "findLoansByEndorsement"; + String QUERY_UPDATE_LOAN_BY_ID_FROM_CERTIFIER_VIEW = "updateLoanByIdFromCertifiedView"; + String QUERY_UPDATE_LOAN_WITH_CREATED_ON_BY_ID_FROM_CERTIFIER_VIEW = "updateLoanWithCreatedOnByIdFromCertifiedView"; + String QUERY_UPDATE_AND_FINISH_LOAN_BY_ID = "updateAndFinishLoanById"; + String QUERY_UPDATE_DISCOUNT_AND_LOAN_BY_ID_FROM_CERTIFIER_VIEW = "updateDiscountAndLoanByIdFromCertifiedView"; + String QUERY_FIND_LOAN_DETAILS_CURDATE_BY_LOAN = "findLoanDetailsPaymentCurdateByLoan"; + String QUERY_DELETE_LOAN_DETAILS_CURDATE_BY_LOAN = "deleteLoanDetailsPaymentCurdateByLoan"; + String QUERY_SEARCH_PAYMENT_DETAILS = "searchPaymentDetails"; + String QUERY_UPDATE_ROUTE_BY_ID = "updateRouteFromLoan"; + String QUERY_FIND_LOAN_DETAILS_FEE_CURDATE_BY_LOAN = "findLoanDetailsFeeCurdateByLoan"; + String QUERY_DELETE_LOAN_DETAILS_FEE_CURDATE_BY_LOAN = "deleteLoanDetailsFeeCurdateByLoan"; + String QUERY_DELETE_LOAN_FEE_NOTIFICATION_CURDATE_BY_LOAN = "deleteLoanFeeNotificationCurdateByLoan"; + String QUERY_DELETE_LOAN_FEE_NOTIFICATION_BY_LOAN = "deleteLoanFeeNotificationByLoan"; + String QUERY_UPDATE_LOAN_BONUS_NEW_CUSTOMER = "updateBonusNewCustomer"; + String QUERY_FIND_LAST_REFERENCE_NUMBER_BY_LOAN = "findLastReferenceNumberByLoan"; + String QUERY_COUNT_LOAN_IN_STATUSES = "countLoanInStatuses"; + String QUERY_COUNT_LOAN_BY_CUSTOMER_IN_STATUSES = "countLoanByCustomerInStatuses"; + String QUERY_SELECT_LOAN_ID_BY_CUSTOMER_IN_STATUSES = "selectLoanIdByCustomerInStatuses"; + + String QUERY_FIND_LOAN_BY_STATUS_PENDING = "findLoansByStatusPending"; + String QUERY_FIND_ALL_LOANS = "findAllLoans"; + String QUERY_FIND_ALL_LOANS_VIEW = "findAllLoansView"; + String QUERY_FIND_ALL_LOANS_VIEW_BY_START_AND_END_DATE = "findAllLoansViewByStartAndEndDate"; + String QUERY_FIND_ALL_LOANS_JURIDICAL_VIEW_BY_START_AND_END_DATE = "findAllLoansJuridicalViewByStartAndEndDate"; + String QUERY_FIND_LOAN_DETAILS_BY_ID = "findLoansDetailById"; + String FIELD_AMOUNT_PAID = "amountPaid"; + String FIELD_AMOUNT_TO_PAY = "amountToPay"; + String FIELD_LAST_REFERENCE_NUMBER = "lastReferenceNumber"; + String FIELD_LOAN_STATUS = "loanStatus"; + String FIELD_NEW_CUSTOMER = "newCustomer"; + String FIELD_CUSTOMER = "customer"; + String FIELD_ENDORSEMENT = "endorsement"; + String FIELD_CUSTOMER_OFFICE = "customer.office"; + String FIELD_DETAILS_LOAN = "loan"; + String FIELD_COMMENTS = "comments"; + String FIELD_ROUTE = "routeCtlg"; + String FIELD_CREATED_ON = "createdOn"; + String FIELD_USER = "idUser"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanDetailsCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanDetailsCfg.java new file mode 100644 index 0000000..315d892 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanDetailsCfg.java @@ -0,0 +1,34 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanDetailsCfg extends GenericCfg { + + String QUERY_FIND_LOAN_DETAILS_BY_LOAN = "findLoanDetailsByLoan"; + String QUERY_FIND_FEES_TO_PAY_BY_LOAN_ID = "findFeesToPayByLoanId"; + String QUERY_FIND_ALL_FEES_BY_LOAN_ID = "findAllFeesByLoanId"; + String QUERY_UPDATE_PAID_FEES_STATUS_IN_LOAN_DETAILS_IDS = "updatePaidFeesStatusInLoanDetailIds"; + String QUERY_COUNT_LOAN_DETAILS_IN_CURRDATE = "countLoanDetailsInCurrdate"; + String QUERY_FIND_ALL_TRANSFERS_LOAN_DETAIL = "findAllTransfersLoanDetail"; + String UPDATE_AUTHORIZE_LOAN_DETAIL = "updateAuthorizeTransferStatusInLoanDetailIds"; + String UPDATE_TRANSFER_STATUS_WHERE_ID_IN = "updateTransferStatusWhereIdIn"; + String UPDATE_REJECT_LOAN_DETAIL = "updateRejectTransferStatusInLoanDetailIds"; + String COUNT_LOAN_DETAILS_AUTHORIZE = "countLoanDetailsAuthorize"; + + String FIELD_ID_LOAN = "loan"; + String FIELD_LOAN_DETAILS_TYPE = "loanDetailsType"; + String FIELD_FEE_STATUS = "feeStatus"; + String FIELD_USER = "user"; + String FIELD_COMMENS = "comments"; + String FIELD_TRANSFER_STATUS = "transferStatus"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanFeeNotificationCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanFeeNotificationCfg.java new file mode 100644 index 0000000..4b5896c --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanFeeNotificationCfg.java @@ -0,0 +1,19 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanFeeNotificationCfg extends GenericCfg { + + String QUERY_COUNT_NOTIFICATION_BY_LOAN_ID = "countNotificationByLoanId"; + + String FIELD_LOAN = "loan"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanToDeliveryByCertifierViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanToDeliveryByCertifierViewCfg.java new file mode 100644 index 0000000..a22f695 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanToDeliveryByCertifierViewCfg.java @@ -0,0 +1,17 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanToDeliveryByCertifierViewCfg extends GenericCfg{ + String QUERY_FIND_LOANS_BY_CERTIFIER = "findLoansByCertifier"; + String FIELD_USER_ID = "userId"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanTypeCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanTypeCfg.java new file mode 100644 index 0000000..c691519 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/LoanTypeCfg.java @@ -0,0 +1,26 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanTypeCfg extends GenericCfg { + + String QUERY_FIND_ALL_LOAN_TYPE_BY_OFFICE = "findAllLoanTypeByOffice"; + String QUERY_FIND_ALL_LOAN_TYPE_WITH_DESCRIPTION_BY_OFFICE = "findAllLoanTypeWithDescrpitionByOffice"; + String QUERY_FIND_NEW_CREDIT_LINE_BY_LOAN_ID = "findNewCreditLineByLoanId"; + + String QUERY_FIND_ALL_DATA_LOAN_TYPE_BY_OFFICE = "findAllDataLoanTypeByOffice"; + + String FIELD_OFFICE = "office"; + + String PARAM_LOAN = "loan"; + String PARAM_LOAN_ID = "loanId"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/MobileUserCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/MobileUserCfg.java new file mode 100644 index 0000000..6bd10ee --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/MobileUserCfg.java @@ -0,0 +1,20 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface MobileUserCfg extends GenericCfg { + + String QUERY_FIND_MOBILE_USER_FROM_LOGIN = "findMobileUserFromLogin"; + + String FIELD_USER_NAME = "userName"; + String FIELD_PASSWORD = "password"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/OfficeCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/OfficeCfg.java new file mode 100644 index 0000000..a35ee3c --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/OfficeCfg.java @@ -0,0 +1,41 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface OfficeCfg extends GenericCfg { + + /** + * + */ + String QUERY_TUPLE_FIND_ALL_OFFICES_BY_USER = "findAllOfficesByUser"; + String QUERY_FIND_ALL_OFFICES_ACTIVES = "findAllOfficesActives"; + String UPDATE_OFFICES_BY_ID = "updateByOfficeId"; + + /** + * Fields + */ + String FIELD_PERMISSION = "officeName"; + String FIELD_OFFICE_STATUS = "officeStatus"; + String FIELD_ADDRESS = "address"; + /** + * Query string + */ + String QUERY_AS_STRING_TUPLE_FIND_ALL_OFFICES_BY_USER = "SELECT \n" + + " o.id,\n" + + " o.officeName\n" + + " FROM Office o\n" + + " INNER JOIN UserByOffice ubo ON o.id = ubo.office\n" + + " WHERE\n" + + " ubo.user = :user AND\n" + + " ubo.userByOfficeStatus = 'ENEBLED' AND\n" + + " o.officeStatus = 'ENEBLED'"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/PermissionCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/PermissionCfg.java new file mode 100644 index 0000000..f53dcd5 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/PermissionCfg.java @@ -0,0 +1,32 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface PermissionCfg extends GenericCfg { + + String QUERY_FIND_PERMISSION_THAT_USER_HAS_ASSIGNED = "finPermissionThatUserHasAssigned"; + String QUERY_FIND_MISSING_PERMISSION_UBO = "findMissingPermissionByUserByOffice"; + String QUERY_FIND_ENEBLED_PERMISSIONS = "findAllEnebledPermissions"; + String QUERY_FIND_PERMISSION_BY_TYPE_AND_STATUS = "findPermissionByTypeAndStatus"; + String QUERY_FIND_ALL_PERMISSIONS_BY_UBO = "findAllPermissionsByUBO"; + String QUERY_FIND_ALL_NOT_PERMISSIONS_BY_UBO = "findAllNotPermissionsByUBO"; + String QUERY_FIND_ALL_PERMISSION_BY_TYPE_AND_STATUS = "findAllPermissionByTypeAndStatus"; + + String FIELD_PERMISSION = "permission"; + String FIELD_DESCRIPTION = "description"; + String FIELD_MENU_PATH = "menuPath"; + String FIELD_LEFT_TO_RIGHT = "leftToRightOrder"; + String FIELD_TOP_TO_BOTTOM = "topToBottomOrder"; + String FIELD_PERMISSION_STATUS = "permissionStatus"; + String FIELD_PERMISSION_TYPE = "permissionType"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/PersonSearchDetailViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/PersonSearchDetailViewCfg.java new file mode 100644 index 0000000..9cb27f3 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/PersonSearchDetailViewCfg.java @@ -0,0 +1,17 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface PersonSearchDetailViewCfg extends GenericCfg{ + + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/PersonSearchHistoricalDetailsViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/PersonSearchHistoricalDetailsViewCfg.java new file mode 100644 index 0000000..cc90071 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/PersonSearchHistoricalDetailsViewCfg.java @@ -0,0 +1,18 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface PersonSearchHistoricalDetailsViewCfg { + + String QUERY_FIND_PERSON_SEARCH_HISTORICAL_DETAILS_BY_PERSON_ID = "findPersonHistoricalDetailsByPersonId"; + String FIELD_PERSON_SEARCH_ID = "personSearchId"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/PersonSearchViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/PersonSearchViewCfg.java new file mode 100644 index 0000000..2d6bc6c --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/PersonSearchViewCfg.java @@ -0,0 +1,20 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface PersonSearchViewCfg extends GenericCfg { + + String QUERY_LIKE_BY_PERSON_SEARCH = "likePersonSearchViewByPersonSearch"; + String QUERY_FULL_NAME_EQUALS_TO_PERSON_SEARCH = "fullNameEqualsToPersonSearch"; + + String FIELD_PERSON_SEARCH = "personSearch"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserByOfficeCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserByOfficeCfg.java new file mode 100644 index 0000000..1e06b3d --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserByOfficeCfg.java @@ -0,0 +1,25 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface UserByOfficeCfg extends GenericCfg { + + String QUERY_FIND_USER_LOGGED = "findIdsFromUserLogged"; + String QUERY_FIND_USERS_IN_OFFICE_IN_STATUSES = "findUsersInOfficeInStatuses"; + String QUERY_FIND_ID_OF_USER_BY_OFFICE = "findIdOfUserByOffice"; + + String FIELD_USER = "user"; + String FIELD_OFFICE = "office"; + + String PARAM_USER_BY_OFFICE_ID = "userByOfficeId"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserByOfficeHasPermissionCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserByOfficeHasPermissionCfg.java new file mode 100644 index 0000000..5984e61 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserByOfficeHasPermissionCfg.java @@ -0,0 +1,20 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface UserByOfficeHasPermissionCfg extends GenericCfg { + + String XML_QUERY_DELETE_PERMISSION_BY_USER_ID_AND_OFFICE_ID = "deletePermissionByUserIdAndOfficeId"; + String QUERY_DELETE_ALL_PERMISSION_BY_UBO = "deleteAllPermissionByUBO"; + + String FIELD_USER_BY_OFFICE = "userByOffice"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserCfg.java new file mode 100644 index 0000000..391eaf0 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserCfg.java @@ -0,0 +1,40 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface UserCfg extends GenericCfg { + + /** + * Queries + */ + String QUERY_FIND_ALL_USERS_BY_OFFICE = "findAllUsersByOffice"; + String QUERY_IS_USERNAME_AVAILABLE = "isUsernameAvailable"; + String QUERY_FIND_ALL_USERS_COMPLETE = "findAllUsersCompleteByOffice"; + String QUERY_UPDATE_PASSWORD_BY_USER_ID = "updatePasswordByUserId"; + String QUERY_UPDATE_CERTIFIER_AND_USER_TYPE_BY_ID = "updateCertifierAndUserTypeById"; + String QUERY_UPDATE_USER_NAME_BY_USER_ID = "updateUserNameById"; + String QUERY_UPDATE_USER_STATUS_BY_USER_ID = "updateUserStatusById"; + String QUERY_VERIFY_USER_STATUS_BY_ID = "verifyUserStatusById"; + String QUERY_IS_USER_MANAGMENT = "isUserManagement"; + String QUERY_LIST_OF_USERS_BY_OFFICE = "listOfUsersByOffice"; + + /** + * Field + */ + String FIELD_USER_NAME = "userName"; + String FIELD_PASSWORD = "password"; + String FIELD_HUMAN_RESOURCE = "humanResource"; + String FIELD_USER_STATUS = "userStatus"; + String FIELD_OFFICE = "office"; + String FIELD_CERTIFIER = "certifier"; + String FIELD_USER_TYPE = "userType"; + String FIELD_MANAGMENT = "managements"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserMobilePreferenceCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserMobilePreferenceCfg.java new file mode 100644 index 0000000..b75207f --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/core/constance/UserMobilePreferenceCfg.java @@ -0,0 +1,23 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.core.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface UserMobilePreferenceCfg extends GenericCfg { + + String QUERY_FIND_ALL_MOBILE_PREFERENCES_BY_USER = "findAllMobilePreferenceByUser"; + String QUERY_FIND_MOBILE_PREFERENCE_BY_USER_AND_PREFERENCE_NAME = "findMobilePreferenceByUserAndPreferenceName"; + String QUERY_UPDATE_PREFERENCE_VALUE = "updatePreferenceValueInUserMobilePreferenceById"; + + String FIELD_USER = "user"; + String FIELD_PREFERENCE_NAME = "preferenceName"; + String FIELD_PREFERENCE_VALUE = "preferenceValue"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/ActionStatus.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/ActionStatus.java new file mode 100644 index 0000000..3795ef5 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/ActionStatus.java @@ -0,0 +1,26 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public enum ActionStatus { + PENDING("Pendiente"), APPROVED("Aprobado"), REJECTED("Rechazado"); + + private final String value; + + private ActionStatus(String value) { + this.value = value; + } + + public String getValue() { + return value; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/ActiveStatus.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/ActiveStatus.java new file mode 100644 index 0000000..0fde7f4 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/ActiveStatus.java @@ -0,0 +1,26 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum ActiveStatus { + ENEBLED("ENEBLED"), DISABLED("DISABLED"); + + private final String value; + + private ActiveStatus(String value) { + this.value = value; + } + + public String getValue() { + return value; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/ApplicationOwner.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/ApplicationOwner.java new file mode 100644 index 0000000..808bc4c --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/ApplicationOwner.java @@ -0,0 +1,19 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * APP_OWNER (Application Owner) Is an exclusive value from the root, all other + * users must be created as APP_USER (Application user like secretary, adviser, + * ceo, for web or mobile). + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum ApplicationOwner { + APP_OWNER, APP_USER +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/ComissionType.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/ComissionType.java new file mode 100644 index 0000000..823d230 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/ComissionType.java @@ -0,0 +1,37 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum ComissionType { + INCLUDED("INCLUDED") { + @Override + public String toString() { + return "INCLUDED"; + } + }, EXCLUDED("EXCLUDED") { + @Override + public String toString() { + return "EXCLUDED"; + } + }; + + private final String type; + + private ComissionType(String type) { + this.type = type; + } + + public String getType() { + return type; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/CustomerClassification.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/CustomerClassification.java new file mode 100644 index 0000000..d057643 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/CustomerClassification.java @@ -0,0 +1,26 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author David Rodríguez Huaracha + */ +public enum CustomerClassification { + WHITE("WHITE"), RED("RED"), YELLOW("YELLOW"); + + private final String value; + + private CustomerClassification(String value) { + this.value = value; + } + + public String getValue() { + return value; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/DaysInWeekend.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/DaysInWeekend.java new file mode 100644 index 0000000..1e438f1 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/DaysInWeekend.java @@ -0,0 +1,16 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum DaysInWeekend { + MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/EmployeeSavingType.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/EmployeeSavingType.java new file mode 100644 index 0000000..12c370a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/EmployeeSavingType.java @@ -0,0 +1,16 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author David Rodríguez Huaracha + */ +public enum EmployeeSavingType { + SAVING, DISPOSAL, CANCEL +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/ExpenseCompanyType.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/ExpenseCompanyType.java new file mode 100644 index 0000000..c788bdf --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/ExpenseCompanyType.java @@ -0,0 +1,37 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum ExpenseCompanyType { + PAYMENT_IN("Entrada") { + @Override + public String toString() { + return "PAYMENT_IN"; + } + }, PAYMENT_OUT("Salida") { + @Override + public String toString() { + return "PAYMENT_OUT"; + } + }; + + private final String label; + + private ExpenseCompanyType(String label) { + this.label = label; + } + + public String getLabel() { + return label; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/FeeStatus.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/FeeStatus.java new file mode 100644 index 0000000..5495fe7 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/FeeStatus.java @@ -0,0 +1,16 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum FeeStatus { + TO_PAY, PAID +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/GenericStatus.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/GenericStatus.java new file mode 100644 index 0000000..53febdd --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/GenericStatus.java @@ -0,0 +1,16 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum GenericStatus { + ENABLED, DISABLED, DELETED +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/HumanResourceStatus.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/HumanResourceStatus.java new file mode 100644 index 0000000..1f5da3e --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/HumanResourceStatus.java @@ -0,0 +1,41 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum HumanResourceStatus { + ENEBLED("enebled") { + @Override + public String toString() { + return "ENEBLED"; + } + }, DISABLED("disabled") { + @Override + public String toString() { + return "DISABLED"; + } + }, DELETED("deleted") { + @Override + public String toString() { + return "DELETED"; + } + }; + + private final String status; + + private HumanResourceStatus(String status) { + this.status = status; + } + + public String getStatus() { + return status; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/LoanDetailsType.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/LoanDetailsType.java new file mode 100644 index 0000000..fab567a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/LoanDetailsType.java @@ -0,0 +1,31 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum LoanDetailsType { + CREDIT_PAYMENT("Tarjeta de crédito"), + DEBIT_PAYMENT("Efectivo"), + PAYMENT("Abono"), + FEE("Multa"), + RENOVATION_PAYMENT("Cobro en entrega de renovación"), + TRANSFER("Transferencia bancaria"); + + private final String value; + + private LoanDetailsType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/LoanRenovationStatus.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/LoanRenovationStatus.java new file mode 100644 index 0000000..324758c --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/LoanRenovationStatus.java @@ -0,0 +1,16 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum LoanRenovationStatus { + PENDING, APPROVED, REJECTED +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/LoanStatus.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/LoanStatus.java new file mode 100644 index 0000000..ad9b0cc --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/LoanStatus.java @@ -0,0 +1,26 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum LoanStatus { + PENDING("Pendiente"), FINISH("Terminado"), BLACK_LIST("Lista negra"), APPROVED("Aprobado"), REJECTED("Rechazado"), PENDING_RENOVATION("Pendiente de renovación"), TO_DELIVERY("Por liberar"), DELETED("Borrado"); + + private final String value; + + private LoanStatus(String value) { + this.value = value; + } + + public String getValue() { + return value; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/OfficeStatus.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/OfficeStatus.java new file mode 100644 index 0000000..7a50517 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/OfficeStatus.java @@ -0,0 +1,42 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum OfficeStatus { + ENEBLED("enebled") { + @Override + public String toString() { + return "ENEBLED"; + } + }, DISABLED("disabled") { + @Override + public String toString() { + return "DISABLED"; + } + }, + DELETED("deleted") { + @Override + public String toString() { + return "DELETED"; + } + }; + + private final String status; + + private OfficeStatus(String status) { + this.status = status; + } + + public String getStatus() { + return status; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/OwnerLoan.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/OwnerLoan.java new file mode 100644 index 0000000..0d63203 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/OwnerLoan.java @@ -0,0 +1,16 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum OwnerLoan { + CURRENT_OWNER, OLD_OWNER +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/PeopleType.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/PeopleType.java new file mode 100644 index 0000000..db948ae --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/PeopleType.java @@ -0,0 +1,26 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum PeopleType { + CUSTOMER("Cliente"), ENDORSEMENT("Aval"), BOTH("Cliente y aval"); + + private final String value; + + private PeopleType(String value) { + this.value = value; + } + + public String getValue() { + return value; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/PermissionStatus.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/PermissionStatus.java new file mode 100644 index 0000000..e184415 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/PermissionStatus.java @@ -0,0 +1,36 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum PermissionStatus { + ENEBLED("enebled") { + @Override + public String toString() { + return "ENEBLED"; + } + }, DISABLED("disabled") { + @Override + public String toString() { + return "DISABLED"; + } + }; + + private final String status; + + private PermissionStatus(String status) { + this.status = status; + } + + public String getStatus() { + return status; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/PermissionType.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/PermissionType.java new file mode 100644 index 0000000..edfa64d --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/PermissionType.java @@ -0,0 +1,41 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum PermissionType { + PUBLIC("public") { + @Override + public String toString() { + return "PUBLIC"; + } + }, PRIVATE("private") { + @Override + public String toString() { + return "PRIVATE"; + } + }, EXCLUSIVE("exclusive") { + @Override + public String toString() { + return "EXCLUSIVE"; + } + }; + + private final String type; + + private PermissionType(String type) { + this.type = type; + } + + public String getType() { + return type; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/PreferenceName.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/PreferenceName.java new file mode 100644 index 0000000..b470766 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/PreferenceName.java @@ -0,0 +1,16 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum PreferenceName { + ORDER_LIST +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/PreferenceValue.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/PreferenceValue.java new file mode 100644 index 0000000..9d5046b --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/PreferenceValue.java @@ -0,0 +1,16 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum PreferenceValue { + ALPHABETICALLY, ORDER_IN_LIST +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/TransferStatus.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/TransferStatus.java new file mode 100644 index 0000000..e9b1a95 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/TransferStatus.java @@ -0,0 +1,27 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum TransferStatus { + PENDING("Pendiente"), AUTHORIZED("Autorizado"), REJECTED("Rechazado"); + + private final String status; + + private TransferStatus(String status) { + this.status = status; + } + + public String getStatus() { + return status; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/UserByOfficeStatus.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/UserByOfficeStatus.java new file mode 100644 index 0000000..d32912b --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/UserByOfficeStatus.java @@ -0,0 +1,42 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum UserByOfficeStatus { + ENEBLED("enebled") { + @Override + public String toString() { + return "ENEBLED"; + } + }, DISABLED("disabled") { + @Override + public String toString() { + return "DISABLED"; + } + }, DELETED("deleted") { + @Override + public String toString() { + return "DELETED"; + } + }; + + private final String status; + + private UserByOfficeStatus(String status) { + this.status = status; + } + + public String getStatus() { + return status; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/UserStatus.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/UserStatus.java new file mode 100644 index 0000000..28899cd --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/UserStatus.java @@ -0,0 +1,41 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum UserStatus { + ENEBLED("enebled") { + @Override + public String toString() { + return "ENEBLED"; + } + }, DISABLED("disabled") { + @Override + public String toString() { + return "DISABLED"; + } + }, DELETED("deleted") { + @Override + public String toString() { + return "DELETED"; + } + }; + + private final String status; + + private UserStatus(String status) { + this.status = status; + } + + public String getStatus() { + return status; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/enums/UserType.java b/ace-model/src/main/java/com/arrebol/apc/model/enums/UserType.java new file mode 100644 index 0000000..75615ef --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/enums/UserType.java @@ -0,0 +1,46 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.enums; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public enum UserType { + WEB("web") { + @Override + public String toString() { + return "WEB"; + } + }, MOBILE("mobile") { + @Override + public String toString() { + return "MOBILE"; + } + }, BOTH("both") { + @Override + public String toString() { + return "BOTH"; + } + }, ROOT("root") { + @Override + public String toString() { + return "ROOT"; + } + }; + + private final String type; + + private UserType(String type) { + this.type = type; + } + + public String getType() { + return type; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/gasoline/Gasoline.java b/ace-model/src/main/java/com/arrebol/apc/model/gasoline/Gasoline.java new file mode 100644 index 0000000..dfc1288 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/gasoline/Gasoline.java @@ -0,0 +1,264 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.gasoline; + +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.GenericStatus; +import java.io.Serializable; +import java.util.Date; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_GASOLINE") +public class Gasoline implements Serializable { + + private static final long serialVersionUID = -1257291916093653466L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_user", + referencedColumnName = "id", + nullable = false + ) + private User user; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_route", + referencedColumnName = "id", + nullable = false + ) + private RouteCtlg routeCtlg; + + @Column(name = "quantity") + private Double quantity; + + @Column(name = "km_old") + private Double kmOld; + + @Column(name = "km_new") + private Double kmNew; + + @Column(name = "total") + private Double total; + + @Enumerated(EnumType.STRING) + @Column(name = "status", nullable = false) + private GenericStatus status; + + @Column(name = "description", length = 500) + private String description; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public Gasoline() { + } + + /** + * + * @param id + * @param user + * @param office + * @param routeCtlg + * @param kmNew + * @param total + * @param status + * @param description + * @param createdBy + * @param createdOn + */ + public Gasoline(String id, User user, Office office, RouteCtlg routeCtlg, Double quantity,Double kmNew, Double total, GenericStatus status, String description, String createdBy, Date createdOn) { + this.id = id; + this.user = user; + this.office = office; + this.routeCtlg = routeCtlg; + this.quantity = quantity; + this.kmNew = kmNew; + this.total = total; + this.status = status; + this.description = description; + this.createdBy = createdBy; + this.createdOn = createdOn; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public RouteCtlg getRouteCtlg() { + return routeCtlg; + } + + public void setRouteCtlg(RouteCtlg routeCtlg) { + this.routeCtlg = routeCtlg; + } + + public Double getQuantity() { + return quantity; + } + + public void setQuantity(Double quantity) { + this.quantity = quantity; + } + + public Double getKmOld() { + return kmOld; + } + + public void setKmOld(Double kmOld) { + this.kmOld = kmOld; + } + + public Double getKmNew() { + return kmNew; + } + + public void setKmNew(Double kmNew) { + this.kmNew = kmNew; + } + + public Double getTotal() { + return total; + } + + public void setTotal(Double total) { + this.total = total; + } + + public GenericStatus getStatus() { + return status; + } + + public void setStatus(GenericStatus status) { + this.status = status; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 79 * hash + Objects.hashCode(this.id); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final Gasoline other = (Gasoline) obj; + if (!Objects.equals(this.id, other.id)) { + return false; + } + return true; + } + + @Override + public String toString() { + return "Gasoline{" + "id=" + id + ", createdBy=" + createdBy + ", createdOn=" + createdOn + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/gasoline/constance/GasolineCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/gasoline/constance/GasolineCfg.java new file mode 100644 index 0000000..7335ac2 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/gasoline/constance/GasolineCfg.java @@ -0,0 +1,23 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.gasoline.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface GasolineCfg extends GenericCfg { + + String QUERY_FIND_LATEST_GASOLINE_PAYMENT_BY_USER_AND_ROUTE_AND_STATUS = "findLatestGasolinePaymentByuserAndRouteAndStatus"; + + String FIELD_USER = "user"; + String FIELD_ROUTE = "route"; + String FIELD_STATUS = "status"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/loan/Delivery.java b/ace-model/src/main/java/com/arrebol/apc/model/loan/Delivery.java new file mode 100644 index 0000000..6a771a6 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/loan/Delivery.java @@ -0,0 +1,176 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.loan; + +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ComissionType; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_DELIVERY") +public class Delivery implements Serializable { + + private static final long serialVersionUID = 7580350030712936070L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_user", + referencedColumnName = "id", + nullable = false + ) + private User user; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_loan", + referencedColumnName = "id", + nullable = false + ) + private Loan loan; + + @Column(name = "amount", nullable = false) + private BigDecimal amount; + + @Enumerated(EnumType.STRING) + @Column(name = "comission") + private ComissionType comission; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + public Delivery() { + } + + /** + * + * @param user + * @param loan + * @param amount + * @param createdBy + * @param createdOn + */ + public Delivery(User user, Loan loan, BigDecimal amount, String createdBy, Date createdOn) { + this.user = user; + this.loan = loan; + this.amount = amount; + this.createdBy = createdBy; + this.createdOn = createdOn; + } + + /** + * + * @param user + * @param loan + * @param amount + * @param createdBy + * @param createdOn + * @param comission + */ + public Delivery(User user, Loan loan, BigDecimal amount, String createdBy, Date createdOn, ComissionType comission) { + this.user = user; + this.loan = loan; + this.amount = amount; + this.createdBy = createdBy; + this.createdOn = createdOn; + this.comission = comission; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public Loan getLoan() { + return loan; + } + + public void setLoan(Loan loan) { + this.loan = loan; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public ComissionType getComission() { + if (null == comission) { + comission = ComissionType.INCLUDED; + } + return comission; + } + + public void setComission(ComissionType comission) { + this.comission = comission; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + @Override + public String toString() { + return "Delivery{" + "user=" + user + ", createdOn=" + createdOn + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/loan/Loan.java b/ace-model/src/main/java/com/arrebol/apc/model/loan/Loan.java new file mode 100644 index 0000000..7c08c71 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/loan/Loan.java @@ -0,0 +1,524 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.loan; + +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.LoanStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_LOAN") +public class Loan implements Serializable { + + private static final long serialVersionUID = -601238781806641208L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_loan_type", + referencedColumnName = "id", + nullable = false + ) + private LoanType loanType; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_customer", + referencedColumnName = "id", + nullable = false + ) + private People customer; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_endorsement", + referencedColumnName = "id", + nullable = false + ) + private People endorsement; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_route", + referencedColumnName = "id", + nullable = false + ) + private RouteCtlg routeCtlg; + + @Enumerated(EnumType.STRING) + @Column(name = "loan_status", nullable = false) + private LoanStatus loanStatus; + + @Enumerated(EnumType.STRING) + @Column(name = "new_customer") + private ActiveStatus newCustomer; + + @Column(name = "amount_paid", nullable = false) + private BigDecimal amountPaid; + + @Column(name = "amount_to_pay", nullable = false) + private BigDecimal amountToPay; + + @Column(name = "last_reference_number", nullable = false) + private Integer lastReferenceNumber; + + @Column(name = "comments", length = 200) + private String comments; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "juridical_date", length = 19) + private Date juridicalDate; + + @Enumerated(EnumType.STRING) + @Column(name = "frozen") + private ActiveStatus frozen; + + @OneToMany( + mappedBy = "loan", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List loanDetailses; + + @OneToMany( + mappedBy = "loan", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List loanByUsers; + + @OneToMany( + mappedBy = "loan", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List loanFeeNotifications; + + @OneToMany( + mappedBy = "loanOld", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List loanOldByRenovations; + + @OneToMany( + mappedBy = "loanNew", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List loanNewByRenovations; + + @OneToMany( + mappedBy = "loan", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List deliverys; + + public Loan() { + } + + /** + * + * @param loanType + * @param customer + * @param endorsement + * @param routeCtlg + * @param loanStatus + * @param amountPaid + * @param amountToPay + * @param lastReferenceNumber + * @param createdBy + * @param createdOn + * @param newCustomer + */ + public Loan(LoanType loanType, People customer, People endorsement, RouteCtlg routeCtlg, LoanStatus loanStatus, BigDecimal amountPaid, BigDecimal amountToPay, Integer lastReferenceNumber, String createdBy, Date createdOn, ActiveStatus newCustomer) { + this.loanType = loanType; + this.customer = customer; + this.endorsement = endorsement; + this.routeCtlg = routeCtlg; + this.loanStatus = loanStatus; + this.amountPaid = amountPaid; + this.amountToPay = amountToPay; + this.lastReferenceNumber = lastReferenceNumber; + this.createdBy = createdBy; + this.createdOn = createdOn; + this.newCustomer = newCustomer; + } + + /** + * + * @param loanType + * @param customer + * @param endorsement + * @param routeCtlg + * @param loanStatus + * @param amountPaid + * @param amountToPay + * @param lastReferenceNumber + * @param createdBy + * @param createdOn + * @param newCustomer + * @param frozen + */ + public Loan(LoanType loanType, People customer, People endorsement, RouteCtlg routeCtlg, LoanStatus loanStatus, BigDecimal amountPaid, BigDecimal amountToPay, Integer lastReferenceNumber, String createdBy, Date createdOn, ActiveStatus newCustomer, ActiveStatus frozen) { + this.loanType = loanType; + this.customer = customer; + this.endorsement = endorsement; + this.routeCtlg = routeCtlg; + this.loanStatus = loanStatus; + this.amountPaid = amountPaid; + this.amountToPay = amountToPay; + this.lastReferenceNumber = lastReferenceNumber; + this.createdBy = createdBy; + this.createdOn = createdOn; + this.newCustomer = newCustomer; + this.frozen = frozen; + } + + /** + * + * @param id + */ + public Loan(String id) { + this.id = id; + } + + /** + * + * @param loanType + * @param customer + * @param endorsement + * @param routeCtlg + * @param loanStatus + * @param amountPaid + * @param amountToPay + * @param lastReferenceNumber + * @param comments + * @param createdBy + */ + public Loan(LoanType loanType, People customer, People endorsement, RouteCtlg routeCtlg, LoanStatus loanStatus, BigDecimal amountPaid, BigDecimal amountToPay, Integer lastReferenceNumber, String comments, String createdBy) { + this.loanType = loanType; + this.customer = customer; + this.endorsement = endorsement; + this.routeCtlg = routeCtlg; + this.loanStatus = loanStatus; + this.amountPaid = amountPaid; + this.amountToPay = amountToPay; + this.lastReferenceNumber = lastReferenceNumber; + this.comments = comments; + this.createdBy = createdBy; + this.createdOn = new Date(); + } + + public Loan(LoanType loanType, People customer, People endorsement, RouteCtlg routeCtlg, LoanStatus loanStatus, BigDecimal amountPaid, BigDecimal amountToPay, Integer lastReferenceNumber, String createdBy) { + this.loanType = loanType; + this.customer = customer; + this.endorsement = endorsement; + this.routeCtlg = routeCtlg; + this.loanStatus = loanStatus; + this.amountPaid = amountPaid; + this.amountToPay = amountToPay; + this.lastReferenceNumber = lastReferenceNumber; + this.createdBy = createdBy; + this.createdOn = new Date(); + } + + /** + * Save create on from mobile devices. + * + * @param loanType + * @param customer + * @param endorsement + * @param routeCtlg + * @param loanStatus + * @param amountPaid + * @param amountToPay + * @param lastReferenceNumber + * @param createdBy + * @param createdOn + */ + public Loan(LoanType loanType, People customer, People endorsement, RouteCtlg routeCtlg, LoanStatus loanStatus, BigDecimal amountPaid, BigDecimal amountToPay, Integer lastReferenceNumber, String comments, String createdBy, Date createdOn) { + this.loanType = loanType; + this.customer = customer; + this.endorsement = endorsement; + this.routeCtlg = routeCtlg; + this.loanStatus = loanStatus; + this.amountPaid = amountPaid; + this.amountToPay = amountToPay; + this.lastReferenceNumber = lastReferenceNumber; + this.comments = comments; + this.createdBy = createdBy; + this.createdOn = createdOn; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LoanType getLoanType() { + return loanType; + } + + public void setLoanType(LoanType loanType) { + this.loanType = loanType; + } + + public People getCustomer() { + return customer; + } + + public void setCustomer(People customer) { + this.customer = customer; + } + + public People getEndorsement() { + return endorsement; + } + + public void setEndorsement(People endorsement) { + this.endorsement = endorsement; + } + + public RouteCtlg getRouteCtlg() { + return routeCtlg; + } + + public void setRouteCtlg(RouteCtlg routeCtlg) { + this.routeCtlg = routeCtlg; + } + + public LoanStatus getLoanStatus() { + return loanStatus; + } + + public void setLoanStatus(LoanStatus loanStatus) { + this.loanStatus = loanStatus; + } + + public ActiveStatus getNewCustomer() { + return newCustomer; + } + + public void setNewCustomer(ActiveStatus newCustomer) { + this.newCustomer = newCustomer; + } + + public BigDecimal getAmountPaid() { + return amountPaid; + } + + public void setAmountPaid(BigDecimal amountPaid) { + this.amountPaid = amountPaid; + } + + public BigDecimal getAmountToPay() { + return amountToPay; + } + + public void setAmountToPay(BigDecimal amountToPay) { + this.amountToPay = amountToPay; + } + + public Integer getLastReferenceNumber() { + return lastReferenceNumber; + } + + public void setLastReferenceNumber(Integer lastReferenceNumber) { + this.lastReferenceNumber = lastReferenceNumber; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public List getLoanDetailses() { + return loanDetailses; + } + + public void setLoanDetailses(List loanDetailses) { + this.loanDetailses = loanDetailses; + } + + public List getLoanByUsers() { + return loanByUsers; + } + + public void setLoanByUsers(List loanByUsers) { + this.loanByUsers = loanByUsers; + } + + public List getLoanFeeNotifications() { + return loanFeeNotifications; + } + + public void setLoanFeeNotifications(List loanFeeNotifications) { + this.loanFeeNotifications = loanFeeNotifications; + } + + public List getLoanOldByRenovations() { + return loanOldByRenovations; + } + + public void setLoanOldByRenovations(List loanOldByRenovations) { + this.loanOldByRenovations = loanOldByRenovations; + } + + public List getLoanNewByRenovations() { + return loanNewByRenovations; + } + + public void setLoanNewByRenovations(List loanNewByRenovations) { + this.loanNewByRenovations = loanNewByRenovations; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public Integer getTotalFeeByLoan() { + if (getLoanFeeNotifications() != null) { + return getLoanFeeNotifications().size(); + } else { + return 0; + } + } + + public String getAsesor() { + if (getLoanByUsers() != null && !getLoanByUsers().isEmpty()) { + return getLoanByUsers().get(0).getUser().getHumanResource().getFirstName() + " " + + getLoanByUsers().get(0).getUser().getHumanResource().getLastName(); + } else { + return ""; + } + } + + public List getDeliverys() { + return deliverys; + } + + public void setDeliverys(List deliverys) { + this.deliverys = deliverys; + } + + public Date getJuridicalDate() { + return juridicalDate; + } + + public void setJuridicalDate(Date juridicalDate) { + this.juridicalDate = juridicalDate; + } + + public ActiveStatus getFrozen() { + if (frozen == null) { + frozen = ActiveStatus.DISABLED; + } + + return frozen; + } + + public void setFrozen(ActiveStatus frozen) { + this.frozen = frozen; + } + + @Override + public String toString() { + return "Loan{" + "loanType=" + loanType + ", createdBy=" + createdBy + '}'; + } + + public String getLoanTypeByDays(){ + + return getLoanType().getLoanTypeName() + " a " +getLoanType().getTotalDays() + " dias"; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByRenovation.java b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByRenovation.java new file mode 100644 index 0000000..9de339d --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByRenovation.java @@ -0,0 +1,168 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.loan; + +import com.arrebol.apc.model.enums.LoanRenovationStatus; +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.EmbeddedId; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_LOAN_BY_RENOVATION") +public class LoanByRenovation implements Serializable { + + private static final long serialVersionUID = 6330391021926685986L; + + @EmbeddedId + LoanByRenovationId id; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn( + name = "id_loan_old", + referencedColumnName = "id", + insertable = false, + updatable = false + ) + private Loan loanOld; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn( + name = "id_loan_new", + referencedColumnName = "id", + insertable = false, + updatable = false + ) + private Loan loanNew; + + @Enumerated(EnumType.STRING) + @Column(name = "loan_by_renovation_status", nullable = false) + private LoanRenovationStatus loanRenovationStatus; + + @Column(name = "comments", length = 150) + private String comments; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public LoanByRenovation() { + } + + public LoanByRenovation(LoanByRenovationId id) { + this.id = id; + } + + public LoanByRenovation(LoanByRenovationId id, LoanRenovationStatus loanRenovationStatus, String createdBy, Date createdOn) { + this.id = id; + this.loanRenovationStatus = loanRenovationStatus; + this.createdBy = createdBy; + this.createdOn = createdOn; + } + + public LoanByRenovationId getId() { + return id; + } + + public void setId(LoanByRenovationId id) { + this.id = id; + } + + public Loan getLoanOld() { + return loanOld; + } + + public void setLoanOld(Loan loanOld) { + this.loanOld = loanOld; + } + + public Loan getLoanNew() { + return loanNew; + } + + public void setLoanNew(Loan loanNew) { + this.loanNew = loanNew; + } + + public LoanRenovationStatus getLoanRenovationStatus() { + return loanRenovationStatus; + } + + public void setLoanRenovationStatus(LoanRenovationStatus loanRenovationStatus) { + this.loanRenovationStatus = loanRenovationStatus; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + @Override + public String toString() { + return "LoanByRenovation{" + "loanOld=" + loanOld + ", loanNew=" + loanNew + ", loanRenovationStatus=" + loanRenovationStatus + ", comments=" + comments + ", createdOn=" + createdOn + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByRenovationId.java b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByRenovationId.java new file mode 100644 index 0000000..db27630 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByRenovationId.java @@ -0,0 +1,88 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.loan; + +import java.io.Serializable; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Embeddable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Embeddable +public class LoanByRenovationId implements Serializable { + + private static final long serialVersionUID = 5820034171440805154L; + + @Column(name = "id_loan_old", length = 36, nullable = true) + private String idLoanOld; + + @Column(name = "id_loan_new", length = 36, nullable = true) + private String idUserNew; + + public LoanByRenovationId() { + } + + /** + * + * @param idLoanOld + * @param idUserNew + */ + public LoanByRenovationId(String idLoanOld, String idUserNew) { + this.idLoanOld = idLoanOld; + this.idUserNew = idUserNew; + } + + public String getIdLoanOld() { + return idLoanOld; + } + + public void setIdLoanOld(String idLoanOld) { + this.idLoanOld = idLoanOld; + } + + public String getIdUserNew() { + return idUserNew; + } + + public void setIdUserNew(String idUserNew) { + this.idUserNew = idUserNew; + } + + @Override + public int hashCode() { + int hash = 5; + hash = 41 * hash + Objects.hashCode(this.idLoanOld); + hash = 41 * hash + Objects.hashCode(this.idUserNew); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final LoanByRenovationId other = (LoanByRenovationId) obj; + if (!Objects.equals(this.idLoanOld, other.idLoanOld)) { + return false; + } + if (!Objects.equals(this.idUserNew, other.idUserNew)) { + return false; + } + return true; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByUser.java b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByUser.java new file mode 100644 index 0000000..8d334e0 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByUser.java @@ -0,0 +1,179 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.loan; + +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.LoanStatus; +import com.arrebol.apc.model.enums.OwnerLoan; +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.EmbeddedId; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_LOAN_BY_USER") +public class LoanByUser implements Serializable { + + private static final long serialVersionUID = 6101775548154917785L; + + @EmbeddedId + private LoanByUserId id; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn( + name = "id_loan", + referencedColumnName = "id", + insertable = false, + updatable = false + ) + private Loan loan; + + @ManyToOne(fetch = FetchType.LAZY) + @JoinColumn( + name = "id_user", + referencedColumnName = "id", + insertable = false, + updatable = false + ) + private User user; + + @Enumerated(EnumType.STRING) + @Column(name = "loan_by_user_status", nullable = false) + private LoanStatus loanByUserStatus; + + @Column(name = "order_in_list") + private Integer orderInList; + + @Column(name = "comments", length = 150) + private String comments; + + @Enumerated(EnumType.STRING) + @Column(name = "owner_loan", nullable = false) + private OwnerLoan ownerLoan; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + public LoanByUser() { + } + + /** + * + * @param id + * @param loanByUserStatus + * @param ownerLoan + * @param createdBy + */ + public LoanByUser(LoanByUserId id, LoanStatus loanByUserStatus, OwnerLoan ownerLoan, String createdBy) { + this.id = id; + this.loanByUserStatus = loanByUserStatus; + this.ownerLoan = ownerLoan; + this.createdBy = createdBy; + this.createdOn = new Date(); + } + + /** + * + * @param id + * @param orderInList + */ + public LoanByUser(LoanByUserId id, Integer orderInList) { + this.id = id; + this.orderInList = orderInList; + } + + public LoanByUserId getId() { + return id; + } + + public void setId(LoanByUserId id) { + this.id = id; + } + + public Loan getLoan() { + return loan; + } + + public void setLoan(Loan loan) { + this.loan = loan; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public LoanStatus getLoanByUserStatus() { + return loanByUserStatus; + } + + public void setLoanByUserStatus(LoanStatus loanByUserStatus) { + this.loanByUserStatus = loanByUserStatus; + } + + public Integer getOrderInList() { + return orderInList; + } + + public void setOrderInList(Integer orderInList) { + this.orderInList = orderInList; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public OwnerLoan getOwnerLoan() { + return ownerLoan; + } + + public void setOwnerLoan(OwnerLoan ownerLoan) { + this.ownerLoan = ownerLoan; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByUserId.java b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByUserId.java new file mode 100644 index 0000000..6c807f4 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanByUserId.java @@ -0,0 +1,88 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.loan; + +import java.io.Serializable; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Embeddable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Embeddable +public class LoanByUserId implements Serializable { + + private static final long serialVersionUID = -8533525004902104723L; + + @Column(name = "id_loan", length = 36, nullable = true) + private String idLoan; + + @Column(name = "id_user", length = 36, nullable = true) + private String idUser; + + public LoanByUserId() { + } + + /** + * + * @param idLoan + * @param idUser + */ + public LoanByUserId(String idLoan, String idUser) { + this.idLoan = idLoan; + this.idUser = idUser; + } + + public String getIdLoan() { + return idLoan; + } + + public void setIdLoan(String idLoan) { + this.idLoan = idLoan; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 47 * hash + Objects.hashCode(this.idLoan); + hash = 47 * hash + Objects.hashCode(this.idUser); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final LoanByUserId other = (LoanByUserId) obj; + if (!Objects.equals(this.idLoan, other.idLoan)) { + return false; + } + if (!Objects.equals(this.idUser, other.idUser)) { + return false; + } + return true; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanDetails.java b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanDetails.java new file mode 100644 index 0000000..9dc0695 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanDetails.java @@ -0,0 +1,345 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.loan; + +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.FeeStatus; +import com.arrebol.apc.model.enums.LoanDetailsType; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.model.enums.TransferStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.Transient; +import javax.persistence.UniqueConstraint; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_LOAN_DETAIL", + uniqueConstraints = { + @UniqueConstraint(columnNames = {"id", "reference_number"}, name = "apc_loan_details_uk") + }) +public class LoanDetails implements Serializable { + + private static final long serialVersionUID = -6757564734339598051L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_loan", + referencedColumnName = "id", + nullable = false + ) + private Loan loan; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_user", + referencedColumnName = "id", + nullable = false + ) + private User user; + + @Enumerated(EnumType.STRING) + @Column(name = "people_type", nullable = false) + private PeopleType peopleType; + + @Column(name = "payment_amount", nullable = false) + private BigDecimal paymentAmount; + + @Column(name = "reference_number") + private Integer referenceNumber; + + @Enumerated(EnumType.STRING) + @Column(name = "loan_details_type", nullable = false) + private LoanDetailsType loanDetailsType; + + @Column(name = "loan_comments", length = 150) + private String comments; + + @Enumerated(EnumType.STRING) + @Column(name = "fee_status") + private FeeStatus feeStatus; + + @Enumerated(EnumType.STRING) + @Column(name = "transfer_status") + private TransferStatus transferStatus; + + @Column(name = "transfer_number", length = 150) + private String transferNumber; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Transient + private BigDecimal saldoInsoluto; + + public LoanDetails() { + } + + /** + * + * @param id + * @param createdOn + * @param feeStatus + */ + public LoanDetails(String id, Date createdOn, FeeStatus feeStatus) { + this.id = id; + this.createdOn = createdOn; + this.feeStatus = feeStatus; + } + + /** + * Complete constructor. + * + * @param id + * @param loan + * @param peopleType + * @param paymentAmount + * @param loanDetailsType + * @param comments + * @param createdBy + * @param createdOn + */ + public LoanDetails(String id, Loan loan, PeopleType peopleType, BigDecimal paymentAmount, LoanDetailsType loanDetailsType, String comments, String createdBy, Date createdOn) { + this.id = id; + this.loan = loan; + this.peopleType = peopleType; + this.paymentAmount = paymentAmount; + this.loanDetailsType = loanDetailsType; + this.comments = comments; + this.createdBy = createdBy; + this.createdOn = createdOn; + } + + /** + * + * @param id + * @param loan + * @param user + * @param peopleType + * @param referenceNumber + * @param paymentAmount + * @param loanDetailsType + * @param comments + * @param createdBy + * @param createdOn + */ + public LoanDetails(String id, Loan loan, User user, PeopleType peopleType, Integer referenceNumber, BigDecimal paymentAmount, LoanDetailsType loanDetailsType, String comments, String createdBy, Date createdOn) { + this.id = id; + this.loan = loan; + this.user = user; + this.peopleType = peopleType; + this.referenceNumber = referenceNumber; + this.paymentAmount = paymentAmount; + this.loanDetailsType = loanDetailsType; + this.comments = comments; + this.createdBy = createdBy; + this.createdOn = createdOn; + } + + /** + * Add new amount. + * + * @param loan + * @param user + * @param peopleType + * @param paymentAmount + * @param referenceNumber + * @param loanDetailsType + * @param createdBy + * @param createdOn + * @param comments + */ + public LoanDetails(Loan loan, User user, PeopleType peopleType, BigDecimal paymentAmount, Integer referenceNumber, LoanDetailsType loanDetailsType, String createdBy, Date createdOn, String comments) { + this.loan = loan; + this.user = user; + this.peopleType = peopleType; + this.paymentAmount = paymentAmount; + this.referenceNumber = referenceNumber; + this.loanDetailsType = loanDetailsType; + this.createdBy = createdBy; + this.createdOn = createdOn; + this.comments = comments; + } + + /** + * + * @param loan + * @param user + * @param peopleType + * @param paymentAmount + * @param referenceNumber + * @param loanDetailsType + * @param createdBy + * @param createdOn + * @param comments + * @param transferNumber + * @param transferStatus + */ + public LoanDetails(Loan loan, User user, PeopleType peopleType, BigDecimal paymentAmount, Integer referenceNumber, LoanDetailsType loanDetailsType, String createdBy, Date createdOn, String comments, String transferNumber, TransferStatus transferStatus) { + this.loan = loan; + this.user = user; + this.peopleType = peopleType; + this.paymentAmount = paymentAmount; + this.referenceNumber = referenceNumber; + this.loanDetailsType = loanDetailsType; + this.createdBy = createdBy; + this.createdOn = createdOn; + this.comments = comments; + this.transferNumber = transferNumber; + this.transferStatus = transferStatus; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Loan getLoan() { + return loan; + } + + public void setLoan(Loan loan) { + this.loan = loan; + } + + public PeopleType getPeopleType() { + return peopleType; + } + + public void setPeopleType(PeopleType peopleType) { + this.peopleType = peopleType; + } + + public BigDecimal getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(BigDecimal paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public Integer getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(Integer referenceNumber) { + this.referenceNumber = referenceNumber; + } + + public LoanDetailsType getLoanDetailsType() { + return loanDetailsType; + } + + public void setLoanDetailsType(LoanDetailsType loanDetailsType) { + this.loanDetailsType = loanDetailsType; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public FeeStatus getFeeStatus() { + return feeStatus; + } + + public void setFeeStatus(FeeStatus feeStatus) { + this.feeStatus = feeStatus; + } + + public TransferStatus getTransferStatus() { + return transferStatus; + } + + public void setTransferStatus(TransferStatus transferStatus) { + this.transferStatus = transferStatus; + } + + public String getTransferNumber() { + return transferNumber; + } + + public void setTransferNumber(String transferNumber) { + this.transferNumber = transferNumber; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public BigDecimal getSaldoInsoluto() { + return saldoInsoluto; + } + + public void setSaldoInsoluto(BigDecimal saldoInsoluto) { + this.saldoInsoluto = saldoInsoluto; + } + + public Double getAbonoD() { + return getPaymentAmount().doubleValue(); + } + + @Override + public String toString() { + return "LoanDetails{" + "referenceNumber=" + referenceNumber + ", comments=" + comments + ", createdBy=" + createdBy + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanFeeNotification.java b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanFeeNotification.java new file mode 100644 index 0000000..d696d61 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanFeeNotification.java @@ -0,0 +1,139 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.loan; + +import com.arrebol.apc.model.core.User; +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_LOAN_FEE_NOTIFICATION") +public class LoanFeeNotification implements Serializable { + + private static final long serialVersionUID = -6178422651111540801L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_loan", + referencedColumnName = "id", + nullable = false + ) + private Loan loan; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_user", + referencedColumnName = "id", + nullable = false + ) + private User user; + + @Column(name = "notification_number", nullable = false, length = 36) + private Integer notificationNumber; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + public LoanFeeNotification() { + } + + /** + * + * @param loan + * @param user + * @param notificationNumber + * @param createdBy + * @param createdOn + */ + public LoanFeeNotification(Loan loan, User user, Integer notificationNumber, String createdBy, Date createdOn) { + this.loan = loan; + this.user = user; + this.notificationNumber = notificationNumber; + this.createdBy = createdBy; + this.createdOn = createdOn; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Loan getLoan() { + return loan; + } + + public void setLoan(Loan loan) { + this.loan = loan; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public Integer getNotificationNumber() { + return notificationNumber; + } + + public void setNotificationNumber(Integer notificationNumber) { + this.notificationNumber = notificationNumber; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + @Override + public String toString() { + return "LoanFeeNotification{" + "notificationNumber=" + notificationNumber + ", createdBy=" + createdBy + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanType.java b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanType.java new file mode 100644 index 0000000..8cae39c --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/loan/LoanType.java @@ -0,0 +1,391 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.loan; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.DaysInWeekend; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_LOAN_TYPE") +public class LoanType implements Serializable { + + private static final long serialVersionUID = 1286109384972738375L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "loan_type_name", length = 50, nullable = false) + private String loanTypeName; + + @Column(name = "total_days", nullable = false) + private Integer totalDays; + + @Column(name = "loan_fee", nullable = false) + private BigDecimal fee; + + @Column(name = "opening_fee", nullable = false) + private Integer openingFee; + + @Column(name = "payment", nullable = false) + private BigDecimal payment; + + @Column(name = "payment_daily", nullable = false) + private BigDecimal paymentDaily; + + @Column(name = "payment_total", nullable = false) + private BigDecimal paymentTotal; + + @Enumerated(EnumType.STRING) + @Column(name = "payment_monday") + private DaysInWeekend monday; + + @Enumerated(EnumType.STRING) + @Column(name = "payment_tuesday") + private DaysInWeekend tuesday; + + @Enumerated(EnumType.STRING) + @Column(name = "payment_wednesday") + private DaysInWeekend wednesday; + + @Enumerated(EnumType.STRING) + @Column(name = "payment_thursday") + private DaysInWeekend thursday; + + @Enumerated(EnumType.STRING) + @Column(name = "payment_friday") + private DaysInWeekend friday; + + @Enumerated(EnumType.STRING) + @Column(name = "payment_saturday") + private DaysInWeekend saturday; + + @Enumerated(EnumType.STRING) + @Column(name = "payment_sunday") + private DaysInWeekend sunday; + + @Enumerated(EnumType.STRING) + @Column(name = "convenio", nullable = false) + private ActiveStatus convenio; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @OneToMany( + mappedBy = "loanType", + cascade = CascadeType.ALL, + fetch = FetchType.LAZY, + orphanRemoval = true + ) + private List loans; + + public LoanType() { + } + + /** + * + * @param id + */ + public LoanType(String id) { + this.id = id; + } + + /** + * Complete constructor. + * + * @param id + * @param loanTypeName + * @param totalDays + * @param fee + * @param paymentDaily + * @param paymentTotal + * @param monday + * @param tuesday + * @param wednesday + * @param thursday + * @param friday + * @param saturday + * @param sunday + * @param office + * @param createdBy + * @param createdOn + * @param lastUpdatedBy + * @param lastUpdatedOn + * @param loans + */ + public LoanType(String id, String loanTypeName, Integer totalDays, BigDecimal fee, BigDecimal paymentDaily, BigDecimal paymentTotal, DaysInWeekend monday, DaysInWeekend tuesday, DaysInWeekend wednesday, DaysInWeekend thursday, DaysInWeekend friday, DaysInWeekend saturday, DaysInWeekend sunday, Office office, String createdBy, Date createdOn, String lastUpdatedBy, Date lastUpdatedOn, List loans) { + this.id = id; + this.loanTypeName = loanTypeName; + this.totalDays = totalDays; + this.fee = fee; + this.paymentDaily = paymentDaily; + this.paymentTotal = paymentTotal; + this.monday = monday; + this.tuesday = tuesday; + this.wednesday = wednesday; + this.thursday = thursday; + this.friday = friday; + this.saturday = saturday; + this.sunday = sunday; + this.office = office; + this.createdBy = createdBy; + this.createdOn = createdOn; + this.lastUpdatedBy = lastUpdatedBy; + this.lastUpdatedOn = lastUpdatedOn; + this.loans = loans; + } + + /** + * + * @param id + * @param payment + */ + public LoanType(String id, BigDecimal payment) { + this.id = id; + this.payment = payment; + } + + /** + * + * @param id + * @param payment + * @param loanTypeName + */ + public LoanType(String id, BigDecimal payment, String loanTypeName) { + this.id = id; + this.payment = payment; + this.loanTypeName = loanTypeName; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLoanTypeName() { + return loanTypeName; + } + + public void setLoanTypeName(String loanTypeName) { + this.loanTypeName = loanTypeName; + } + + public Integer getTotalDays() { + return totalDays; + } + + public void setTotalDays(Integer totalDays) { + this.totalDays = totalDays; + } + + public BigDecimal getFee() { + return fee; + } + + public void setFee(BigDecimal fee) { + this.fee = fee; + } + + public Integer getOpeningFee() { + return openingFee; + } + + public void setOpeningFee(Integer openingFee) { + this.openingFee = openingFee; + } + + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + public BigDecimal getPaymentDaily() { + return paymentDaily; + } + + public void setPaymentDaily(BigDecimal paymentDaily) { + this.paymentDaily = paymentDaily; + } + + public BigDecimal getPaymentTotal() { + return paymentTotal; + } + + public void setPaymentTotal(BigDecimal paymentTotal) { + this.paymentTotal = paymentTotal; + } + + public DaysInWeekend getMonday() { + return monday; + } + + public void setMonday(DaysInWeekend monday) { + this.monday = monday; + } + + public DaysInWeekend getTuesday() { + return tuesday; + } + + public void setTuesday(DaysInWeekend tuesday) { + this.tuesday = tuesday; + } + + public DaysInWeekend getWednesday() { + return wednesday; + } + + public void setWednesday(DaysInWeekend wednesday) { + this.wednesday = wednesday; + } + + public DaysInWeekend getThursday() { + return thursday; + } + + public void setThursday(DaysInWeekend thursday) { + this.thursday = thursday; + } + + public DaysInWeekend getFriday() { + return friday; + } + + public void setFriday(DaysInWeekend friday) { + this.friday = friday; + } + + public DaysInWeekend getSaturday() { + return saturday; + } + + public void setSaturday(DaysInWeekend saturday) { + this.saturday = saturday; + } + + public DaysInWeekend getSunday() { + return sunday; + } + + public void setSunday(DaysInWeekend sunday) { + this.sunday = sunday; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public List getLoans() { + return loans; + } + + public void setLoans(List loans) { + this.loans = loans; + } + + public ActiveStatus getConvenio() { + return convenio; + } + + public void setConvenio(ActiveStatus convenio) { + this.convenio = convenio; + } + + @Override + public String toString() { + return "LoanType{" + "loanTypeName=" + loanTypeName + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/mobile/access/MobileUser.java b/ace-model/src/main/java/com/arrebol/apc/model/mobile/access/MobileUser.java new file mode 100644 index 0000000..1de0578 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/mobile/access/MobileUser.java @@ -0,0 +1,134 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.mobile.access; + +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_SECURITY_AUTHENTICATION_MOBILE") +public class MobileUser implements Serializable { + + private static final long serialVersionUID = -6025180801746858060L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "user_name", length = 36) + private String userName; + + @Column(name = "pwd", length = 100) + private String password; + + @Column(name = "avatar", length = 150) + private String avatar; + + @Column(name = "id_office", length = 36) + private String officeId; + + @Column(name = "id_route", length = 36) + private String routeId; + + @Column(name = "certifier", length = 25) + private String certifier; + + @Enumerated(EnumType.STRING) + @Column(name = "management", nullable = false) + private ActiveStatus management; + + public MobileUser() { + } + + public MobileUser(String userName, String password) { + this.userName = userName; + this.password = password; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getAvatar() { + return avatar; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + + public String getOfficeId() { + return officeId; + } + + public void setOfficeId(String officeId) { + this.officeId = officeId; + } + + public String getRouteId() { + return routeId; + } + + public void setRouteId(String routeId) { + this.routeId = routeId; + } + + public String getCertifier() { + return certifier; + } + + public void setCertifier(String certifier) { + this.certifier = certifier; + } + + public ActiveStatus getManagement() { + return management; + } + + public void setManagement(ActiveStatus management) { + this.management = management; + } + + @Override + public String toString() { + return "Authentication{" + "userName=" + userName + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/mobile/preference/UserMobilePreference.java b/ace-model/src/main/java/com/arrebol/apc/model/mobile/preference/UserMobilePreference.java new file mode 100644 index 0000000..6ae13bd --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/mobile/preference/UserMobilePreference.java @@ -0,0 +1,186 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.mobile.preference; + +import com.arrebol.apc.model.core.User; +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.UniqueConstraint; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_USER_MOBILE_PREFERECE", + uniqueConstraints = { + @UniqueConstraint( + columnNames = {"id_user", "preference_name"}, + name = "apc_user_mobile_preference_uk") + } +) +public class UserMobilePreference implements Serializable { + + private static final long serialVersionUID = -7248171471566169076L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_user", + referencedColumnName = "id", + nullable = false + ) + private User user; + + @Column(name = "preference_name", nullable = false, length = 25) + private String preferenceName; + + @Column(name = "preference_value", nullable = false, length = 25) + private String preferenceValue; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public UserMobilePreference() { + } + + /** + * Complete constructor. + * + * @param id + * @param user + * @param preferenceName + * @param preferenceValue + * @param createdBy + * @param createdOn + * @param lastUpdatedBy + * @param lastUpdatedOn + */ + public UserMobilePreference(String id, User user, String preferenceName, String preferenceValue, String createdBy, Date createdOn, String lastUpdatedBy, Date lastUpdatedOn) { + this.id = id; + this.user = user; + this.preferenceName = preferenceName; + this.preferenceValue = preferenceValue; + this.createdBy = createdBy; + this.createdOn = createdOn; + this.lastUpdatedBy = lastUpdatedBy; + this.lastUpdatedOn = lastUpdatedOn; + } + + /** + * + * @param user + * @param preferenceName + * @param preferenceValue + * @param createdBy + */ + public UserMobilePreference(User user, String preferenceName, String preferenceValue, String createdBy) { + this.user = user; + this.preferenceName = preferenceName; + this.preferenceValue = preferenceValue; + this.createdBy = createdBy; + this.createdOn = new Date(); + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public String getPreferenceName() { + return preferenceName; + } + + public void setPreferenceName(String preferenceName) { + this.preferenceName = preferenceName; + } + + public String getPreferenceValue() { + return preferenceValue; + } + + public void setPreferenceValue(String preferenceValue) { + this.preferenceValue = preferenceValue; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + @Override + public String toString() { + return "UserMobilePreference{" + "user=" + user + ", preferenceName=" + preferenceName + ", preferenceValue=" + preferenceValue + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/payroll/Payroll.java b/ace-model/src/main/java/com/arrebol/apc/model/payroll/Payroll.java new file mode 100644 index 0000000..fd8a0eb --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/payroll/Payroll.java @@ -0,0 +1,392 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.payroll; + +import com.arrebol.apc.model.admin.ExpenseCompany; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Table(name = "APC_PAYROLL") +public class Payroll implements Serializable { + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_human_resource", + referencedColumnName = "id", + nullable = false + ) + private HumanResource humanResource; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Enumerated(EnumType.STRING) + @Column(name = "active_status", nullable = false) + private ActiveStatus activeStatus; + + @Column(name = "salary", nullable = false) + private BigDecimal salary; + + @Column(name = "imss", nullable = false) + private BigDecimal imss; + + @Column(name = "advance", nullable = false) + private BigDecimal advance; + + @Column(name = "total_bonus_new_customer", nullable = false) + private BigDecimal totalBonusNewCustomer; + + @Column(name = "total_bonus_colocation", nullable = false) + private BigDecimal totalBonusColocation; + + @Column(name = "total_bonus_mora", nullable = false) + private BigDecimal totalBonusMora; + + @Column(name = "discounts", nullable = false) + private BigDecimal discounts; + + @Column(name = "increases", nullable = false) + private BigDecimal increases; + + @Column(name = "total_payment", nullable = false) + private BigDecimal totalPayment; + + @Column(name = "total_days_salary", nullable = false) + private Integer totalDaysSalary; + + @Column(name = "total_days_bonus", nullable = false) + private Integer totalDaysBonus; + + @Column(name = "comments_discounts", length = 200) + private String commentsDiscounts; + + @Column(name = "comments_increases", length = 200) + private String commentsIncreases; + + @Column(name = "observation", length = 200) + private String observation; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + @Column(name = "boxed", nullable = false) + private BigDecimal boxed; + + @Column(name = "saving", nullable = false) + private BigDecimal saving; + + @Column(name = "payment_to_debt", nullable = false) + private BigDecimal paymentToDebt; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "created_by", + referencedColumnName = "id", + insertable = false, + updatable = false, + nullable = false + ) + private User user; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public HumanResource getHumanResource() { + return humanResource; + } + + public void setHumanResource(HumanResource humanResource) { + this.humanResource = humanResource; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public ActiveStatus getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(ActiveStatus activeStatus) { + this.activeStatus = activeStatus; + } + + public BigDecimal getSalary() { + return salary; + } + + public void setSalary(BigDecimal salary) { + this.salary = salary; + } + + public BigDecimal getImss() { + return imss; + } + + public void setImss(BigDecimal imss) { + this.imss = imss; + } + + public BigDecimal getAdvance() { + return advance; + } + + public void setAdvance(BigDecimal advance) { + this.advance = advance; + } + + public BigDecimal getTotalBonusNewCustomer() { + return totalBonusNewCustomer; + } + + public void setTotalBonusNewCustomer(BigDecimal totalBonusNewCustomer) { + this.totalBonusNewCustomer = totalBonusNewCustomer; + } + + public BigDecimal getTotalBonusColocation() { + return totalBonusColocation; + } + + public void setTotalBonusColocation(BigDecimal totalBonusColocation) { + this.totalBonusColocation = totalBonusColocation; + } + + public BigDecimal getTotalBonusMora() { + return totalBonusMora; + } + + public void setTotalBonusMora(BigDecimal totalBonusMora) { + this.totalBonusMora = totalBonusMora; + } + + public BigDecimal getDiscounts() { + return discounts; + } + + public void setDiscounts(BigDecimal discounts) { + this.discounts = discounts; + } + + public BigDecimal getIncreases() { + return increases; + } + + public void setIncreases(BigDecimal increases) { + this.increases = increases; + } + + public BigDecimal getTotalPayment() { + return totalPayment; + } + + public void setTotalPayment(BigDecimal totalPayment) { + this.totalPayment = totalPayment; + } + + public Integer getTotalDaysSalary() { + return totalDaysSalary; + } + + public void setTotalDaysSalary(Integer totalDaysSalary) { + this.totalDaysSalary = totalDaysSalary; + } + + public Integer getTotalDaysBonus() { + return totalDaysBonus; + } + + public void setTotalDaysBonus(Integer totalDaysBonus) { + this.totalDaysBonus = totalDaysBonus; + } + + public String getCommentsDiscounts() { + return commentsDiscounts; + } + + public void setCommentsDiscounts(String commentsDiscounts) { + this.commentsDiscounts = commentsDiscounts; + } + + public String getCommentsIncreases() { + return commentsIncreases; + } + + public void setCommentsIncreases(String commentsIncreases) { + this.commentsIncreases = commentsIncreases; + } + + public String getObservation() { + return observation; + } + + public void setObservation(String observation) { + this.observation = observation; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + + + public boolean getAction(Date lastStableGeneralBox) { + Date date = createdOn; + boolean action = true; + try { + SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd"); + + String dateStr = dt1.format(date); + date = dt1.parse(dateStr); + + action = date.after(lastStableGeneralBox); + + } catch (ParseException ex) { + Logger.getLogger(ExpenseCompany.class.getName()).log(Level.SEVERE, null, ex); + } + return action; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public BigDecimal getBoxed() { + return boxed; + } + + public void setBoxed(BigDecimal boxed) { + this.boxed = boxed; + } + + public BigDecimal getSaving() { + return saving; + } + + public void setSaving(BigDecimal saving) { + this.saving = saving; + } + + public BigDecimal getPaymentToDebt() { + return paymentToDebt; + } + + public void setPaymentToDebt(BigDecimal paymentToDebt) { + this.paymentToDebt = paymentToDebt; + } + + public BigDecimal summaryPerceptions() { + return salary.add(totalBonusNewCustomer).add(totalBonusColocation).add(totalBonusMora).add(increases); + } + + public String conditionEnabled() { + if (getActiveStatus() == ActiveStatus.DISABLED) { + return "grayRow"; + } else { + return null; + } + } + + public boolean getActive() { + if (activeStatus == ActiveStatus.ENEBLED) { + return true; + } else { + return false; + } + + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/payroll/TotalExpectedPaymentDailyByUser.java b/ace-model/src/main/java/com/arrebol/apc/model/payroll/TotalExpectedPaymentDailyByUser.java new file mode 100644 index 0000000..29140e3 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/payroll/TotalExpectedPaymentDailyByUser.java @@ -0,0 +1,169 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.payroll; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Oscar Vargas + */ +@Entity +@Table(name = "APC_TOTAL_EXPECTED_PAYMENT_DAILY_BY_USER") +public class TotalExpectedPaymentDailyByUser implements Serializable { + + private static final long serialVersionUID = -4380548310735493011L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_user", + referencedColumnName = "id", + nullable = false + ) + private User user; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "total_expected", nullable = false) + private BigDecimal totalExpected; + + @Column(name = "total_expected_payment") + private BigDecimal totalExpectedPayment; + + @Enumerated(EnumType.STRING) + @Column(name = "active_status", nullable = false) + private ActiveStatus activeStatus; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public TotalExpectedPaymentDailyByUser() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getTotalExpected() { + return totalExpected; + } + + public void setTotalExpected(BigDecimal totalExpected) { + this.totalExpected = totalExpected; + } + + public ActiveStatus getActiveStatus() { + return activeStatus; + } + + public void setActiveStatus(ActiveStatus activeStatus) { + this.activeStatus = activeStatus; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + public BigDecimal getTotalExpectedPayment() { + return totalExpectedPayment; + } + + public void setTotalExpectedPayment(BigDecimal totalExpectedPayment) { + this.totalExpectedPayment = totalExpectedPayment; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/payroll/constance/PayRollCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/payroll/constance/PayRollCfg.java new file mode 100644 index 0000000..d4067c0 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/payroll/constance/PayRollCfg.java @@ -0,0 +1,40 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.payroll.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface PayRollCfg extends GenericCfg { + + String QUERY_SUM_ALL_ADVANCE_BY_USER = "totalAdvanceForDatesByUser"; + String QUERY_COUNT_NEW_CUSTOMER_FOR_LOANS_BY_USER = "totalNewCustomerLoansByUser"; + String QUERY_SUM_FOR_LOANS_BY_USER = "totalLoansByUserForDates"; + String QUERY_FIND_GOAL_BY_DATES = "getGoalByDates"; + String QUERY_FIND_LAST_GOAL = "getLastGoal"; + String QUERY_SUM_LOAN_DETAILS_PAYMENT_BY_USER = "getLoanDetailsByUserForDates"; + String QUERY_SUM_LOAN_DETAILS_FEE_BY_USER = "getFeeByUserForDates"; + String QUERY_FIND_PAYROLL_BY_OFFICE = "findAllPayrollByOffice"; + String QUERY_FIND_PAYROLL_BY_OFFICE_BETWEEN_DATES = "findAllPayrollByOfficeBetweenDates"; + String QUERY_UPDATE_PAYROLL_BY_STATUS = "updatePayrollByStatus"; + String QUERY_SUM_DIFERENCES_BETWEEN_CLOSING_DAY_BY_USER = "getDiscountByUserThisWeek"; + String QUERY_SUM_DIFERENCES_BY_USER = "sumAllDiferencesByUser"; + String QUERY_SUM_OPENING_FEE_BY_USER = "totalComisionAperturaByUserForDates"; + String QUERY_SUM_TOTAL_EXPECTED_FOR_WEEK_BY_USER = "totalExpectedWeekByUser"; + + String FIELD_OFFICE = "office"; + String FIELD_USER = "user"; + String FIELD_USER_ID = "idUser"; + String FIELD_ACTIVE_STATUS = "activeStatus"; + String FIELD_HUMAN_RESOURCE = "humanResource"; + String FIELD_DATE_INIT = "dateInit"; + String FIELD_DATE_END = "dateEnd"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/payroll/constance/TotalExpectedPaymentDailyByUserCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/payroll/constance/TotalExpectedPaymentDailyByUserCfg.java new file mode 100644 index 0000000..6111ba3 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/payroll/constance/TotalExpectedPaymentDailyByUserCfg.java @@ -0,0 +1,25 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.payroll.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface TotalExpectedPaymentDailyByUserCfg extends GenericCfg{ + + String QUERY_FIND_ALL_BY_OFFICE = "findAllTotalExpectedPaymentDailyByUserByOffice"; + String QUERY_UPDATE_BY_STATUS = "updateTotalExpectedPaymentDailyByUserByStatus"; + String QUERY_SELECT_MAX_DATE_BY_CURDATE = "verifyTotalExpectedPaymentDailyByUserCreatedByOffice"; + + String FIELD_OFFICE = "office"; + String FIELD_ACTIVE_STATUS = "activeStatus"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/reports/UserWeekReport.java b/ace-model/src/main/java/com/arrebol/apc/model/reports/UserWeekReport.java new file mode 100644 index 0000000..b217e94 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/reports/UserWeekReport.java @@ -0,0 +1,129 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.reports; + +import java.io.Serializable; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_USER_WEEK_REPORT_VIEW") +public class UserWeekReport implements Serializable { + + private static final long serialVersionUID = -1257291916093653466L; + + @Id + @Column(name = "id_user", length = 36) + private String id; + + @Column(name = "payment_week") + private Double paymentWeek; + + @Column(name = "total_new_customer_currweek") + private Integer totalNewCustomerCurrweek; + + @Column(name = "debit_week") + private Double debitWeek; + + @Column(name = "total_approved_loan") + private Long totalApprovedLoan; + + @Column(name = "total_to_delivery_loan") + private Long totalToDeliveryLoan; + + public UserWeekReport() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Double getPaymentWeek() { + return paymentWeek; + } + + public void setPaymentWeek(Double paymentWeek) { + this.paymentWeek = paymentWeek; + } + + public Integer getTotalNewCustomerCurrweek() { + return totalNewCustomerCurrweek; + } + + public void setTotalNewCustomerCurrweek(Integer totalNewCustomerCurrweek) { + this.totalNewCustomerCurrweek = totalNewCustomerCurrweek; + } + + public Double getDebitWeek() { + return debitWeek; + } + + public void setDebitWeek(Double debitWeek) { + this.debitWeek = debitWeek; + } + + public Long getTotalApprovedLoan() { + return totalApprovedLoan; + } + + public void setTotalApprovedLoan(Long totalApprovedLoan) { + this.totalApprovedLoan = totalApprovedLoan; + } + + public Long getTotalToDeliveryLoan() { + return totalToDeliveryLoan; + } + + public void setTotalToDeliveryLoan(Long totalToDeliveryLoan) { + this.totalToDeliveryLoan = totalToDeliveryLoan; + } + + @Override + public String toString() { + return "UserWeekReport{" + "id=" + id + '}'; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 89 * hash + Objects.hashCode(this.id); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final UserWeekReport other = (UserWeekReport) obj; + if (!Objects.equals(this.id, other.id)) { + return false; + } + return true; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/reports/constance/UserWeekReportCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/reports/constance/UserWeekReportCfg.java new file mode 100644 index 0000000..8c523e9 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/reports/constance/UserWeekReportCfg.java @@ -0,0 +1,19 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.reports.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface UserWeekReportCfg extends GenericCfg { + + String QUERY_FIND_USER_WEEK_REPORT_BY_USER = "findUserWeekReportDetailsByUser"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/system/logs/Bitacora.java b/ace-model/src/main/java/com/arrebol/apc/model/system/logs/Bitacora.java new file mode 100644 index 0000000..b87f7f7 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/system/logs/Bitacora.java @@ -0,0 +1,155 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.system.logs; + +import com.arrebol.apc.model.core.Office; +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Table(name = "APC_BITACORA") +public class Bitacora implements Serializable{ + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "comments_user", length = 300) + private String commentsUser; + + @Column(name = "action", length = 50) + private String action; + + @Column(name = "description", length = 300) + private String description; + + @Column(name = "name_user", length = 200) + private String nameUser; + + @Column(name = "created_by", nullable = false, length = 36) + private String createdBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "last_updated_by", length = 36) + private String lastUpdatedBy; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public String getCommentsUser() { + return commentsUser; + } + + public void setCommentsUser(String commentsUser) { + this.commentsUser = commentsUser; + } + + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getNameUser() { + return nameUser; + } + + public void setNameUser(String nameUser) { + this.nameUser = nameUser; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getLastUpdatedBy() { + return lastUpdatedBy; + } + + public void setLastUpdatedBy(String lastUpdatedBy) { + this.lastUpdatedBy = lastUpdatedBy; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/system/logs/ErrorAppLog.java b/ace-model/src/main/java/com/arrebol/apc/model/system/logs/ErrorAppLog.java new file mode 100644 index 0000000..d3fb40f --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/system/logs/ErrorAppLog.java @@ -0,0 +1,122 @@ +/* + * Arrebol Consultancy copyright + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.system.logs; + +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; +import org.hibernate.annotations.NamedQueries; +import org.hibernate.annotations.NamedQuery; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "APC_ERROR_APP_LOG") +@NamedQueries({ + @NamedQuery(name = "get_all_error_app_log", query = "FROM ErrorAppLog") +}) +public class ErrorAppLog implements Serializable { + + private static final long serialVersionUID = -9099186680609371679L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id_log", length = 36) + private String id; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "log_entry_date", length = 19) + private Date logEntryDate; + + @Column(name = "log_logger", length = 100) + private String logLogger; + + @Column(name = "log_level", length = 100) + private String logLevel; + + @Column(name = "log_message", length = 250) + private String logMessage; + + @Column(name = "log_exception", length = 4000) + private String logException; + + public ErrorAppLog() { + } + + public ErrorAppLog(String id, Date logEntryDate, String logLogger, String logLevel, String logMessage, String logException) { + this.id = id; + this.logEntryDate = logEntryDate; + this.logLogger = logLogger; + this.logLevel = logLevel; + this.logMessage = logMessage; + this.logException = logException; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getLogEntryDate() { + return logEntryDate; + } + + public void setLogEntryDate(Date logEntryDate) { + this.logEntryDate = logEntryDate; + } + + public String getLogLogger() { + return logLogger; + } + + public void setLogLogger(String logLogger) { + this.logLogger = logLogger; + } + + public String getLogLevel() { + return logLevel; + } + + public void setLogLevel(String logLevel) { + this.logLevel = logLevel; + } + + public String getLogMessage() { + return logMessage; + } + + public void setLogMessage(String logMessage) { + this.logMessage = logMessage; + } + + public String getLogException() { + return logException; + } + + public void setLogException(String logException) { + this.logException = logException; + } + + @Override + public String toString() { + return "ErrorAppLog{" + "id=" + id + ", logEntryDate=" + logEntryDate + ", logLogger=" + logLogger + ", logLevel=" + logLevel + ", logMessage=" + logMessage + ", logException=" + logException + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/AdministrationPersonSerchView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/AdministrationPersonSerchView.java new file mode 100644 index 0000000..ca979e7 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/AdministrationPersonSerchView.java @@ -0,0 +1,198 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.enums.PeopleType; +import java.io.Serializable; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_ADMINISTRATION_PERSON_SEARCH_VIEW") +public class AdministrationPersonSerchView implements Serializable { + + private static final long serialVersionUID = 3055231364366461069L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "phone_home", length = 15) + private String phoneHome; + + @Column(name = "address_home", length = 150) + private String addressHome; + + @Enumerated(EnumType.STRING) + @Column(name = "people_type") + private PeopleType peopleType; + + @Column(name = "id_route", length = 36) + private String idRoute; + + @Column(name = "route_name", length = 25) + private String routeName; + + @Column(name = "id_office", length = 36) + private String idOffice; + + @Column(name = "office_name", length = 100) + private String officeName; + + @Column(name = "person_search", length = 103) + private String personSearch; + + public AdministrationPersonSerchView() { + } + + /** + * + * @param id + */ + public AdministrationPersonSerchView(String id) { + this.id = id; + } + + /** + * + * @param id + * @param phoneHome + * @param addressHome + * @param peopleType + * @param idRoute + * @param routeName + * @param idOffice + * @param officeName + * @param personSearch + */ + public AdministrationPersonSerchView(String id, String phoneHome, String addressHome, PeopleType peopleType, String idRoute, String routeName, String idOffice, String officeName, String personSearch) { + this.id = id; + this.phoneHome = phoneHome; + this.addressHome = addressHome; + this.peopleType = peopleType; + this.idRoute = idRoute; + this.routeName = routeName; + this.idOffice = idOffice; + this.officeName = officeName; + this.personSearch = personSearch; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPhoneHome() { + return phoneHome; + } + + public void setPhoneHome(String phoneHome) { + this.phoneHome = phoneHome; + } + + public String getAddressHome() { + return addressHome; + } + + public void setAddressHome(String addressHome) { + this.addressHome = addressHome; + } + + public PeopleType getPeopleType() { + return peopleType; + } + + public void setPeopleType(PeopleType peopleType) { + this.peopleType = peopleType; + } + + public String getIdRoute() { + return idRoute; + } + + public void setIdRoute(String idRoute) { + this.idRoute = idRoute; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public String getIdOffice() { + return idOffice; + } + + public void setIdOffice(String idOffice) { + this.idOffice = idOffice; + } + + public String getOfficeName() { + return officeName; + } + + public void setOfficeName(String officeName) { + this.officeName = officeName; + } + + public String getPersonSearch() { + return personSearch; + } + + public void setPersonSearch(String personSearch) { + this.personSearch = personSearch; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 79 * hash + Objects.hashCode(this.id); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final AdministrationPersonSerchView other = (AdministrationPersonSerchView) obj; + if (!Objects.equals(this.id, other.id)) { + return false; + } + return true; + } + + @Override + public String toString() { + return "AdministrationPersonSerchView{" + "routeName=" + routeName + ", officeName=" + officeName + ", personSearch=" + personSearch + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/AdvanceUserDailyDetail.java b/ace-model/src/main/java/com/arrebol/apc/model/views/AdvanceUserDailyDetail.java new file mode 100644 index 0000000..98a0ad5 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/AdvanceUserDailyDetail.java @@ -0,0 +1,188 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_ADVANCE_USER_DAILY_DETAIL_VIEW") +public class AdvanceUserDailyDetail implements Serializable{ + + private static final long serialVersionUID = -4849944622024557288L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user") + private String idUser; + + @Column(name = "customer_name") + private String customerName; + + @Column(name = "payment_amount") + private String paymentAmount; + + @Column(name = "created_on") + private Date createdOn; + + @Column(name = "address_business") + private String address; + + @Column(name = "type_ayment") + private String typePayment; + + @Column(name = "amount_paid") + private String amountPaid; + + @Column(name = "amount_to_pay") + private String amountToPay; + + @Column(name = "last_reference_number") + private String lastReference; + + @Column(name = "loan_status") + private String loanStatus; + + @Column(name = "num_fee") + private String numFee; + + @Column(name = "saldo_insoluto") + private String saldoInsoluto; + + @Column(name = "amount_loan") + private String amountLoan; + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(String paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getTypePayment() { + return typePayment; + } + + public void setTypePayment(String typePayment) { + this.typePayment = typePayment; + } + + public String getAmountPaid() { + return amountPaid; + } + + public void setAmountPaid(String amountPaid) { + this.amountPaid = amountPaid; + } + + public String getAmountToPay() { + return amountToPay; + } + + public void setAmountToPay(String amountToPay) { + this.amountToPay = amountToPay; + } + + public String getLastReference() { + return lastReference; + } + + public void setLastReference(String lastReference) { + this.lastReference = lastReference; + } + + public String getLoanStatus() { + return loanStatus; + } + + public void setLoanStatus(String loanStatus) { + this.loanStatus = loanStatus; + } + + public String getNumFee() { + return numFee; + } + + public void setNumFee(String numFee) { + this.numFee = numFee; + } + + public String getSaldoInsoluto() { + return saldoInsoluto; + } + + public void setSaldoInsoluto(String saldoInsoluto) { + this.saldoInsoluto = saldoInsoluto; + } + + public String getAmountLoan() { + return amountLoan; + } + + public void setAmountLoan(String amountLoan) { + this.amountLoan = amountLoan; + } + + + + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/AdvanceUserDailyView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/AdvanceUserDailyView.java new file mode 100644 index 0000000..0e7b8f3 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/AdvanceUserDailyView.java @@ -0,0 +1,229 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import java.io.Serializable; +import java.math.BigDecimal; +import java.math.RoundingMode; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Transient; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_ADVANCE_USER_DAILY_DASHBOARD_VIEW") +public class AdvanceUserDailyView implements Serializable{ + + private static final long serialVersionUID = 3055231364366461069L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "user_name") + private String userName; + + @Column(name = "total_expected") + private Integer totalExpected; + + @Column(name = "total_now") + private Integer totalNow; + + @Column(name = "porcentaje") + private BigDecimal porcentaje; + + @Column(name = "faltante") + private BigDecimal faltante; + + @Column(name = "total_expected_week") + private BigDecimal totalExpectedWeek; + + @Column(name = "total_reported_week") + private BigDecimal totalReportedWeek; + + @Column(name = "total_reported_renovation_week") + private BigDecimal totalReportedRenovationWeek; + + @Column(name = "total_comision_fee") + private BigDecimal totalComisionFee; + + @Column(name = "colocation_approved") + private BigDecimal colocationApproved; + + @Column(name = "colocation_to_delivery") + private BigDecimal colocationToDelivery; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_user", + referencedColumnName = "id", + nullable = false + ) + private User user; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Transient + private BigDecimal diferencePaymentWeek; + + @Transient + private BigDecimal porcentajePaymentWeek; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Integer getTotalExpected() { + return totalExpected; + } + + public void setTotalExpected(Integer totalExpected) { + this.totalExpected = totalExpected; + } + + public Integer getTotalNow() { + return totalNow; + } + + public void setTotalNow(Integer totalNow) { + this.totalNow = totalNow; + } + + public BigDecimal getPorcentaje() { + return porcentaje; + } + + public void setPorcentaje(BigDecimal porcentaje) { + this.porcentaje = porcentaje; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getTotalExpectedWeek() { + return totalExpectedWeek; + } + + public void setTotalExpectedWeek(BigDecimal totalExpectedWeek) { + this.totalExpectedWeek = totalExpectedWeek; + } + + public BigDecimal getTotalReportedWeek() { + return totalReportedWeek.add(totalReportedRenovationWeek).add(totalComisionFee); + } + + public void setTotalReportedWeek(BigDecimal totalReportedWeek) { + this.totalReportedWeek = totalReportedWeek; + } + + public BigDecimal getColocationApproved() { + return colocationApproved; + } + + public void setColocationApproved(BigDecimal colocationApproved) { + this.colocationApproved = colocationApproved; + } + + public BigDecimal getColocationToDelivery() { + return colocationToDelivery; + } + + public void setColocationToDelivery(BigDecimal colocationToDelivery) { + this.colocationToDelivery = colocationToDelivery; + } + + public BigDecimal getDiferencePaymentWeek() { + diferencePaymentWeek = (totalReportedWeek.add(totalReportedRenovationWeek).add(totalComisionFee)).subtract(totalExpectedWeek); + return diferencePaymentWeek; + } + + public void setDiferencePaymentWeek(BigDecimal diferencePaymentWeek) { + this.diferencePaymentWeek = diferencePaymentWeek; + } + + public BigDecimal getPorcentajePaymentWeek() { + if(totalReportedWeek.compareTo(BigDecimal.ZERO) == 1) + porcentajePaymentWeek = (faltante + .multiply(new BigDecimal(100))).divide(totalReportedWeek, 2, RoundingMode.HALF_UP); + else + porcentajePaymentWeek = BigDecimal.ZERO; + return porcentajePaymentWeek; + } + + public void setPorcentajePaymentWeek(BigDecimal porcentajePaymentWeek) { + this.porcentajePaymentWeek = porcentajePaymentWeek; + } + + public BigDecimal getTotalReportedRenovationWeek() { + return totalReportedRenovationWeek; + } + + public void setTotalReportedRenovationWeek(BigDecimal totalReportedRenovationWeek) { + this.totalReportedRenovationWeek = totalReportedRenovationWeek; + } + + public BigDecimal getTotalComisionFee() { + return totalComisionFee; + } + + public void setTotalComisionFee(BigDecimal totalComisionFee) { + this.totalComisionFee = totalComisionFee; + } + + public BigDecimal getFaltante() { + return faltante; + } + + public void setFaltante(BigDecimal faltante) { + this.faltante = faltante; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/AvailableCustomersView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/AvailableCustomersView.java new file mode 100644 index 0000000..c7da83a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/AvailableCustomersView.java @@ -0,0 +1,70 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_AVAILABLE_CUSTOMERS_VIEW") +public class AvailableCustomersView implements Serializable { + + private static final long serialVersionUID = 6772440079893425786L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "available_person", length = 103) + private String availablePerson; + + @Column(name = "cross_signature", length = 36) + private String crossSignature; + + public AvailableCustomersView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getAvailablePerson() { + return availablePerson; + } + + public void setAvailablePerson(String availablePerson) { + this.availablePerson = availablePerson; + } + + public String getCrossSignature() { + return crossSignature; + } + + public void setCrossSignature(String crossSignature) { + this.crossSignature = crossSignature; + } + + @Override + public String toString() { + return "AvailableCustomersView{" + "availablePerson=" + availablePerson + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/AvailableEndorsementsView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/AvailableEndorsementsView.java new file mode 100644 index 0000000..649fabb --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/AvailableEndorsementsView.java @@ -0,0 +1,70 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_AVAILABLE_ENDORSEMENTS_VIEW") +public class AvailableEndorsementsView implements Serializable { + + private static final long serialVersionUID = -8420465639155493835L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "available_person", length = 103) + private String availablePerson; + + @Column(name = "cross_signature", length = 36) + private String crossSignature; + + public AvailableEndorsementsView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getAvailablePerson() { + return availablePerson; + } + + public void setAvailablePerson(String availablePerson) { + this.availablePerson = availablePerson; + } + + public String getCrossSignature() { + return crossSignature; + } + + public void setCrossSignature(String crossSignature) { + this.crossSignature = crossSignature; + } + + @Override + public String toString() { + return "AvailableEndorsementsView{" + "availablePerson=" + availablePerson + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/AvailablesOwnersView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/AvailablesOwnersView.java new file mode 100644 index 0000000..bbc12a5 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/AvailablesOwnersView.java @@ -0,0 +1,96 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_AVAILABLES_OWNERS_VIEW") +public class AvailablesOwnersView implements Serializable { + + private static final long serialVersionUID = -7094684754461793727L; + + @Id + @Column(name = "id_user", length = 36) + private String userId; + + @Column(name = "id_office", length = 36) + private String officeId; + + @Column(name = "user_name", length = 100) + private String userName; + + @Column(name = "full_name", length = 103) + private String fullName; + + public AvailablesOwnersView() { + } + + /** + * Complete constructor. + * + * @param userId + * @param officeId + * @param userName + * @param fullName + */ + public AvailablesOwnersView(String userId, String officeId, String userName, String fullName) { + this.userId = userId; + this.officeId = officeId; + this.userName = userName; + this.fullName = fullName; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getOfficeId() { + return officeId; + } + + public void setOfficeId(String officeId) { + this.officeId = officeId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getFullName() { + return fullName; + } + + public void setFullName(String fullName) { + this.fullName = fullName; + } + + @Override + public String toString() { + return "AvailablesOwnersView{" + "userName=" + userName + ", fullName=" + fullName + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/CashRegisterCurdateByUserView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/CashRegisterCurdateByUserView.java new file mode 100644 index 0000000..24399f4 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/CashRegisterCurdateByUserView.java @@ -0,0 +1,89 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_CASH_REGISTER_CURDATE_BY_USER_VIEW") +public class CashRegisterCurdateByUserView implements Serializable { + + private static final long serialVersionUID = -3932800670151972950L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "payment") + private BigDecimal payment; + + @Column(name = "customer_name", length = 51) + private String customerName; + + @Column(name = "id_user", length = 36) + private String userId; + + public CashRegisterCurdateByUserView() { + } + + public CashRegisterCurdateByUserView(String id, BigDecimal payment, String customerName, String userId) { + this.id = id; + this.payment = payment; + this.customerName = customerName; + this.userId = userId; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + @Override + public String toString() { + return "CashRegisterCurdateByUserView{" + "customerName=" + customerName + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/ClosingDailyDetailFromUserByCurdateView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/ClosingDailyDetailFromUserByCurdateView.java new file mode 100644 index 0000000..9c57c0a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/ClosingDailyDetailFromUserByCurdateView.java @@ -0,0 +1,134 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_CLOSING_DAILY_DETAIL_FROM_USER_BY_CURDATE_VIEW") +public class ClosingDailyDetailFromUserByCurdateView implements Serializable{ + + private static final long serialVersionUID = -4593609182109393813L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "comments") + private String comments; + + @Column(name = "amount") + private BigDecimal amount; + + @Column(name = "type") + private String type; + + @Column(name = "created_on") + private Date createdOn; + + @Column(name = "id_user") + private String idUser; + + @Column(name = "route") + private String route; + + @Column(name = "fechaFiltro") + private Date fechaFiltro; + + @Column(name = "saldo") + private BigDecimal saldo; + + public ClosingDailyDetailFromUserByCurdateView(){ + + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getRoute() { + return route; + } + + public void setRoute(String route) { + this.route = route; + } + + public Date getFechaFiltro() { + return fechaFiltro; + } + + public void setFechaFiltro(Date fechaFiltro) { + this.fechaFiltro = fechaFiltro; + } + + public BigDecimal getSaldo() { + return saldo; + } + + public void setSaldo(BigDecimal saldo) { + this.saldo = saldo; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/CobranzaLastWeekByUserView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/CobranzaLastWeekByUserView.java new file mode 100644 index 0000000..819f0c2 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/CobranzaLastWeekByUserView.java @@ -0,0 +1,150 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.core.Office; +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_COBRANZA_LAST_WEEK_BY_USER_VIEW") +public class CobranzaLastWeekByUserView implements Serializable{ + + private static final long serialVersionUID = 3055231364366461069L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "username") + private String userName; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "cobranza_monday") + private BigDecimal cobranzaMonday; + + @Column(name = "cobranza_tuesday") + private BigDecimal cobranzaTuesday; + + @Column(name = "cobranza_wednesday") + private BigDecimal cobranzaWednesday; + + @Column(name = "cobranza_thursday") + private BigDecimal cobranzaThursday; + + @Column(name = "cobranza_friday") + private BigDecimal cobranzaFriday; + + @Column(name = "cobranza_saturday") + private BigDecimal cobranzaSaturday; + + @Column(name = "cobranza_total") + private BigDecimal cobranzaTotal; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getCobranzaMonday() { + return cobranzaMonday; + } + + public void setCobranzaMonday(BigDecimal cobranzaMonday) { + this.cobranzaMonday = cobranzaMonday; + } + + public BigDecimal getCobranzaTuesday() { + return cobranzaTuesday; + } + + public void setCobranzaTuesday(BigDecimal cobranzaTuesday) { + this.cobranzaTuesday = cobranzaTuesday; + } + + public BigDecimal getCobranzaWednesday() { + return cobranzaWednesday; + } + + public void setCobranzaWednesday(BigDecimal cobranzaWednesday) { + this.cobranzaWednesday = cobranzaWednesday; + } + + public BigDecimal getCobranzaThursday() { + return cobranzaThursday; + } + + public void setCobranzaThursday(BigDecimal cobranzaThursday) { + this.cobranzaThursday = cobranzaThursday; + } + + public BigDecimal getCobranzaFriday() { + return cobranzaFriday; + } + + public void setCobranzaFriday(BigDecimal cobranzaFriday) { + this.cobranzaFriday = cobranzaFriday; + } + + public BigDecimal getCobranzaSaturday() { + return cobranzaSaturday; + } + + public void setCobranzaSaturday(BigDecimal cobranzaSaturday) { + this.cobranzaSaturday = cobranzaSaturday; + } + + public BigDecimal getCobranzaTotal() { + return cobranzaTotal; + } + + public void setCobranzaTotal(BigDecimal cobranzaTotal) { + this.cobranzaTotal = cobranzaTotal; + } + + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/CobranzaWeekByUserView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/CobranzaWeekByUserView.java new file mode 100644 index 0000000..927cf50 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/CobranzaWeekByUserView.java @@ -0,0 +1,150 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.core.Office; +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_COBRANZA_WEEK_BY_USER_VIEW") +public class CobranzaWeekByUserView implements Serializable{ + + private static final long serialVersionUID = 3055231364366461069L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "username") + private String userName; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "cobranza_monday") + private BigDecimal cobranzaMonday; + + @Column(name = "cobranza_tuesday") + private BigDecimal cobranzaTuesday; + + @Column(name = "cobranza_wednesday") + private BigDecimal cobranzaWednesday; + + @Column(name = "cobranza_thursday") + private BigDecimal cobranzaThursday; + + @Column(name = "cobranza_friday") + private BigDecimal cobranzaFriday; + + @Column(name = "cobranza_saturday") + private BigDecimal cobranzaSaturday; + + @Column(name = "cobranza_total") + private BigDecimal cobranzaTotal; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getCobranzaMonday() { + return cobranzaMonday; + } + + public void setCobranzaMonday(BigDecimal cobranzaMonday) { + this.cobranzaMonday = cobranzaMonday; + } + + public BigDecimal getCobranzaTuesday() { + return cobranzaTuesday; + } + + public void setCobranzaTuesday(BigDecimal cobranzaTuesday) { + this.cobranzaTuesday = cobranzaTuesday; + } + + public BigDecimal getCobranzaWednesday() { + return cobranzaWednesday; + } + + public void setCobranzaWednesday(BigDecimal cobranzaWednesday) { + this.cobranzaWednesday = cobranzaWednesday; + } + + public BigDecimal getCobranzaThursday() { + return cobranzaThursday; + } + + public void setCobranzaThursday(BigDecimal cobranzaThursday) { + this.cobranzaThursday = cobranzaThursday; + } + + public BigDecimal getCobranzaFriday() { + return cobranzaFriday; + } + + public void setCobranzaFriday(BigDecimal cobranzaFriday) { + this.cobranzaFriday = cobranzaFriday; + } + + public BigDecimal getCobranzaSaturday() { + return cobranzaSaturday; + } + + public void setCobranzaSaturday(BigDecimal cobranzaSaturday) { + this.cobranzaSaturday = cobranzaSaturday; + } + + public BigDecimal getCobranzaTotal() { + return cobranzaTotal; + } + + public void setCobranzaTotal(BigDecimal cobranzaTotal) { + this.cobranzaTotal = cobranzaTotal; + } + + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/ColocationLastWeekByUserView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/ColocationLastWeekByUserView.java new file mode 100644 index 0000000..aa4ccc0 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/ColocationLastWeekByUserView.java @@ -0,0 +1,149 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.core.Office; +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_COLOCATION_LAST_WEEK_BY_USER_VIEW") +public class ColocationLastWeekByUserView implements Serializable{ + + private static final long serialVersionUID = 3055231364366461069L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "username") + private String userName; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "colocation_monday") + private BigDecimal colocationMonday; + + @Column(name = "colocation_tuesday") + private BigDecimal colocationTuesday; + + @Column(name = "colocation_wednesday") + private BigDecimal colocationWednesday; + + @Column(name = "colocation_thursday") + private BigDecimal colocationThursday; + + @Column(name = "colocation_friday") + private BigDecimal colocationFriday; + + @Column(name = "colocation_saturday") + private BigDecimal colocationSaturday; + + @Column(name = "colocation_total") + private BigDecimal colocationTotal; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public BigDecimal getColocationMonday() { + return colocationMonday; + } + + public void setColocationMonday(BigDecimal colocationMonday) { + this.colocationMonday = colocationMonday; + } + + public BigDecimal getColocationTuesday() { + return colocationTuesday; + } + + public void setColocationTuesday(BigDecimal colocationTuesday) { + this.colocationTuesday = colocationTuesday; + } + + public BigDecimal getColocationWednesday() { + return colocationWednesday; + } + + public void setColocationWednesday(BigDecimal colocationWednesday) { + this.colocationWednesday = colocationWednesday; + } + + public BigDecimal getColocationThursday() { + return colocationThursday; + } + + public void setColocationThursday(BigDecimal colocationThursday) { + this.colocationThursday = colocationThursday; + } + + public BigDecimal getColocationFriday() { + return colocationFriday; + } + + public void setColocationFriday(BigDecimal colocationFriday) { + this.colocationFriday = colocationFriday; + } + + public BigDecimal getColocationSaturday() { + return colocationSaturday; + } + + public void setColocationSaturday(BigDecimal colocationSaturday) { + this.colocationSaturday = colocationSaturday; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getColocationTotal() { + return colocationTotal; + } + + public void setColocationTotal(BigDecimal colocationTotal) { + this.colocationTotal = colocationTotal; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/ColocationWeekByUserView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/ColocationWeekByUserView.java new file mode 100644 index 0000000..d310536 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/ColocationWeekByUserView.java @@ -0,0 +1,149 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.core.Office; +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_COLOCATION_WEEK_BY_USER_VIEW") +public class ColocationWeekByUserView implements Serializable{ + + private static final long serialVersionUID = 3055231364366461069L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "username") + private String userName; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "colocation_monday") + private BigDecimal colocationMonday; + + @Column(name = "colocation_tuesday") + private BigDecimal colocationTuesday; + + @Column(name = "colocation_wednesday") + private BigDecimal colocationWednesday; + + @Column(name = "colocation_thursday") + private BigDecimal colocationThursday; + + @Column(name = "colocation_friday") + private BigDecimal colocationFriday; + + @Column(name = "colocation_saturday") + private BigDecimal colocationSaturday; + + @Column(name = "colocation_total") + private BigDecimal colocationTotal; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public BigDecimal getColocationMonday() { + return colocationMonday; + } + + public void setColocationMonday(BigDecimal colocationMonday) { + this.colocationMonday = colocationMonday; + } + + public BigDecimal getColocationTuesday() { + return colocationTuesday; + } + + public void setColocationTuesday(BigDecimal colocationTuesday) { + this.colocationTuesday = colocationTuesday; + } + + public BigDecimal getColocationWednesday() { + return colocationWednesday; + } + + public void setColocationWednesday(BigDecimal colocationWednesday) { + this.colocationWednesday = colocationWednesday; + } + + public BigDecimal getColocationThursday() { + return colocationThursday; + } + + public void setColocationThursday(BigDecimal colocationThursday) { + this.colocationThursday = colocationThursday; + } + + public BigDecimal getColocationFriday() { + return colocationFriday; + } + + public void setColocationFriday(BigDecimal colocationFriday) { + this.colocationFriday = colocationFriday; + } + + public BigDecimal getColocationSaturday() { + return colocationSaturday; + } + + public void setColocationSaturday(BigDecimal colocationSaturday) { + this.colocationSaturday = colocationSaturday; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getColocationTotal() { + return colocationTotal; + } + + public void setColocationTotal(BigDecimal colocationTotal) { + this.colocationTotal = colocationTotal; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/CurrentCustomerByLoanView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/CurrentCustomerByLoanView.java new file mode 100644 index 0000000..1cda077 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/CurrentCustomerByLoanView.java @@ -0,0 +1,168 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.enums.LoanStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_CURRENT_CUSTOMER_BY_LOAN_VIEW") +public class CurrentCustomerByLoanView implements Serializable { + + private static final long serialVersionUID = 1867076380925130820L; + + @Id + @Column(name = "id_loan", length = 36) + private String loanId; + + @Column(name = "id_user", length = 36) + private String userId; + + @Column(name = "id_office", length = 36) + private String officeId; + + @Column(name = "payment", nullable = false) + private BigDecimal payment; + + @Column(name = "customer_name", length = 100) + private String customerName; + + @Column(name = "endorsement_name", length = 103) + private String endorsementName; + + @Enumerated(EnumType.STRING) + @Column(name = "loan_status") + private LoanStatus loanStatus; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "route_name", length = 25) + private String route; + + public CurrentCustomerByLoanView() { + } + + /** + * Complete Constructor. + * + * @param loanId + * @param userId + * @param officeId + * @param payment + * @param customerName + * @param endorsementName + * @param loanStatus + * @param createdOn + */ + public CurrentCustomerByLoanView(String loanId, String userId, String officeId, BigDecimal payment, String customerName, String endorsementName, LoanStatus loanStatus, Date createdOn) { + this.loanId = loanId; + this.userId = userId; + this.officeId = officeId; + this.payment = payment; + this.customerName = customerName; + this.endorsementName = endorsementName; + this.loanStatus = loanStatus; + this.createdOn = createdOn; + } + + public String getLoanId() { + return loanId; + } + + public void setLoanId(String loanId) { + this.loanId = loanId; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getOfficeId() { + return officeId; + } + + public void setOfficeId(String officeId) { + this.officeId = officeId; + } + + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getEndorsementName() { + return endorsementName; + } + + public void setEndorsementName(String endorsementName) { + this.endorsementName = endorsementName; + } + + public LoanStatus getLoanStatus() { + return loanStatus; + } + + public void setLoanStatus(LoanStatus loanStatus) { + this.loanStatus = loanStatus; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getRoute() { + return route; + } + + public void setRoute(String route) { + this.route = route; + } + + @Override + public String toString() { + return "CurrentCustomerByLoanView{" + "customerName=" + customerName + ", endorsementName=" + endorsementName + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/CustomerView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/CustomerView.java new file mode 100644 index 0000000..66d43c8 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/CustomerView.java @@ -0,0 +1,197 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.enums.CustomerClassification; +import com.arrebol.apc.model.enums.PeopleType; +import java.io.Serializable; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_CUSTOMER_VIEW") +public class CustomerView implements Serializable { + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "full_name", length = 103) + private String fullName; + + @Column(name = "company_name", length = 150) + private String companyName; + + @Column(name = "address_home", length = 150) + private String addressHome; + + @Column(name = "address_business", length = 150) + private String addressBusiness; + + @Column(name = "route_name", length = 25) + private String routeName; + + @Enumerated(EnumType.STRING) + @Column(name = "people_type", nullable = false) + private PeopleType peopleType; + + @Column(name = "str_people_type", length = 14) + private String strPeopleType; + + @Enumerated(EnumType.STRING) + @Column(name = "classification", nullable = false) + private CustomerClassification classification; + + @Column(name = "office_name", length = 100) + private String officeName; + + @Column(name = "total_of_loan") + private Integer totalOfLoan; + + public CustomerView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getFullName() { + return fullName; + } + + public void setFullName(String fullName) { + this.fullName = fullName; + } + + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public String getAddressHome() { + return addressHome; + } + + public void setAddressHome(String addressHome) { + this.addressHome = addressHome; + } + + public String getAddressBusiness() { + return addressBusiness; + } + + public void setAddressBusiness(String addressBusiness) { + this.addressBusiness = addressBusiness; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public PeopleType getPeopleType() { + return peopleType; + } + + public void setPeopleType(PeopleType peopleType) { + this.peopleType = peopleType; + } + + public String getStrPeopleType() { + return strPeopleType; + } + + public void setStrPeopleType(String strPeopleType) { + this.strPeopleType = strPeopleType; + } + + public String getOfficeName() { + return officeName; + } + + public void setOfficeName(String officeName) { + this.officeName = officeName; + } + + public Integer getTotalOfLoan() { + return totalOfLoan; + } + + public void setTotalOfLoan(Integer totalOfLoan) { + this.totalOfLoan = totalOfLoan; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 97 * hash + Objects.hashCode(this.id); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final CustomerView other = (CustomerView) obj; + if (!Objects.equals(this.id, other.id)) { + return false; + } + return true; + } + + public CustomerClassification getClassification() { + return classification; + } + + public void setClassification(CustomerClassification classification) { + this.classification = classification; + } + + public String conditionStyle() + { + if(getClassification().equals(classification.RED)) + return "redRow"; + else if(getClassification().equals(classification.YELLOW)) + return "yellowRow"; + return null; + } + + @Override + public String toString() { + return "CustomerView{" + "fullName=" + fullName + ", routeName=" + routeName + ", officeName=" + officeName + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/CustomerWithoutRenovationView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/CustomerWithoutRenovationView.java new file mode 100644 index 0000000..06ac9aa --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/CustomerWithoutRenovationView.java @@ -0,0 +1,226 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.core.Office; +import java.io.Serializable; +import java.util.Date; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_CUSTOMERS_WITHOUT_RENOVATION_VIEW") +public class CustomerWithoutRenovationView implements Serializable { + + private static final long serialVersionUID = 3731003393000465083L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "available_person") + private String personName; + + @Column(name = "route_name") + private String routeName; + + @Column(name = "last_loan") + @Temporal(javax.persistence.TemporalType.DATE) + private Date lastLoan; + + @Column(name = "amount_paid") + private String amountPaid; + + @Column(name = "amount_to_pay") + private String amountToPay; + + @Column(name = "saldo_insoluto") + private String saldoInsoluto; + + @Column(name = "action_number") + private String actionNumber; + + @Column(name = "num_fee") + private String numFee; + + @Column(name = "address_home") + private String addressHome; + + @Column(name = "address_business") + private String addressBusiness; + + @Column(name = "company_name") + private String companyName; + + + + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "str_payment_date", length = 22) + private String strPaymentDate; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPersonName() { + return personName; + } + + public void setPersonName(String personName) { + this.personName = personName; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public Date getLastLoan() { + return lastLoan; + } + + public void setLastLoan(Date lastLoan) { + this.lastLoan = lastLoan; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public String getStrPaymentDate() { + return strPaymentDate; + } + + public void setStrPaymentDate(String strPaymentDate) { + this.strPaymentDate = strPaymentDate; + } + + public String getAmountPaid() { + return amountPaid; + } + + public void setAmountPaid(String amountPaid) { + this.amountPaid = amountPaid; + } + + public String getAmountToPay() { + return amountToPay; + } + + public void setAmountToPay(String amountToPay) { + this.amountToPay = amountToPay; + } + + public String getSaldoInsoluto() { + return saldoInsoluto; + } + + public void setSaldoInsoluto(String saldoInsoluto) { + this.saldoInsoluto = saldoInsoluto; + } + + public String getActionNumber() { + return actionNumber; + } + + public void setActionNumber(String actionNumber) { + this.actionNumber = actionNumber; + } + + public String getNumFee() { + return numFee; + } + + public void setNumFee(String numFee) { + this.numFee = numFee; + } + + public String getAddressHome() { + return addressHome; + } + + public void setAddressHome(String addressHome) { + this.addressHome = addressHome; + } + + public String getAddressBusiness() { + return addressBusiness; + } + + public void setAddressBusiness(String addressBusiness) { + this.addressBusiness = addressBusiness; + } + + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + + + @Override + public int hashCode() { + int hash = 7; + hash = 61 * hash + Objects.hashCode(this.id); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final CustomerWithoutRenovationView other = (CustomerWithoutRenovationView) obj; + if (!Objects.equals(this.id, other.id)) { + return false; + } + return true; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/EnabledUserDetailsView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/EnabledUserDetailsView.java new file mode 100644 index 0000000..40246f8 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/EnabledUserDetailsView.java @@ -0,0 +1,89 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_ENABLED_USER_DETAILS_VIEW") +public class EnabledUserDetailsView implements Serializable { + + @Id + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "full_name", length = 103) + private String fullName; + + @Column(name = "id_office", length = 36) + private String idOffice; + + public EnabledUserDetailsView() { + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getFullName() { + return fullName; + } + + public void setFullName(String fullName) { + this.fullName = fullName; + } + + public String getIdOffice() { + return idOffice; + } + + public void setIdOffice(String idOffice) { + this.idOffice = idOffice; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 43 * hash + Objects.hashCode(this.idUser); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final EnabledUserDetailsView other = (EnabledUserDetailsView) obj; + if (!Objects.equals(this.idUser, other.idUser)) { + return false; + } + return true; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/ExchangeEnebledUsersView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/ExchangeEnebledUsersView.java new file mode 100644 index 0000000..93a3720 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/ExchangeEnebledUsersView.java @@ -0,0 +1,70 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_EXCHANGE_ENEBLED_USERS_VIEW") +public class ExchangeEnebledUsersView implements Serializable { + + private static final long serialVersionUID = -1257291916093653466L; + + @Id + @Column(name = "id_user", length = 36) + private String userId; + + @Column(name = "user_name", length = 51) + private String userName; + + @Column(name = "id_office", length = 36) + private String officeId; + + public ExchangeEnebledUsersView() { + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getOfficeId() { + return officeId; + } + + public void setOfficeId(String officeId) { + this.officeId = officeId; + } + + @Override + public String toString() { + return "ExchangeEnebledUsersView{" + "userName=" + userName + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/FaltanteInDates.java b/ace-model/src/main/java/com/arrebol/apc/model/views/FaltanteInDates.java new file mode 100644 index 0000000..d012219 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/FaltanteInDates.java @@ -0,0 +1,170 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * + * @author Oscar + */ +public class FaltanteInDates implements Serializable { + + private static final long serialVersionUID = 3731003393000465083L; + + private String id; + private String idUser; + private String userName; + private String customerName; + private String routeName; + private BigDecimal amountPaid; + private BigDecimal amountToPay; + private BigDecimal amountToPayNoFee; + private BigDecimal paymentDaily; + private BigDecimal expectedPayment; + private BigDecimal amountPaidDetails; + private BigDecimal fee; + private Long feeNumber; + private Long numPagosAll; + private Date lastDate; + private Date createdOn; + + public FaltanteInDates() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public BigDecimal getAmountPaid() { + return amountPaid; + } + + public void setAmountPaid(BigDecimal amountPaid) { + this.amountPaid = amountPaid; + } + + public BigDecimal getAmountToPay() { + return amountToPay; + } + + public void setAmountToPay(BigDecimal amountToPay) { + this.amountToPay = amountToPay; + } + + public BigDecimal getAmountToPayNoFee() { + return amountToPayNoFee; + } + + public void setAmountToPayNoFee(BigDecimal amountToPayNoFee) { + this.amountToPayNoFee = amountToPayNoFee; + } + + public BigDecimal getPaymentDaily() { + return paymentDaily; + } + + public void setPaymentDaily(BigDecimal paymentDaily) { + this.paymentDaily = paymentDaily; + } + + public BigDecimal getExpectedPayment() { + return expectedPayment; + } + + public void setExpectedPayment(BigDecimal expectedPayment) { + this.expectedPayment = expectedPayment; + } + + public BigDecimal getAmountPaidDetails() { + return amountPaidDetails; + } + + public void setAmountPaidDetails(BigDecimal amountPaidDetails) { + this.amountPaidDetails = amountPaidDetails; + } + + public BigDecimal getFee() { + return fee; + } + + public void setFee(BigDecimal fee) { + this.fee = fee; + } + + public Long getFeeNumber() { + return feeNumber; + } + + public void setFeeNumber(Long feeNumber) { + this.feeNumber = feeNumber; + } + + public Long getNumPagosAll() { + return numPagosAll; + } + + public void setNumPagosAll(Long numPagosAll) { + this.numPagosAll = numPagosAll; + } + + public Date getLastDate() { + return lastDate; + } + + public void setLastDate(Date lastDate) { + this.lastDate = lastDate; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/FeesView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/FeesView.java new file mode 100644 index 0000000..361c33b --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/FeesView.java @@ -0,0 +1,137 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.enums.FeeStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +@Entity +@Table(name = "APC_FEES_VIEW") +public class FeesView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "name") + private String userName; + + @Column(name = "id_route", length = 36) + private String idRoute; + + @Column(name = "route_name") + private String routeName; + + @Column(name = "total_fees") + private BigDecimal totalFees; + + @Enumerated(EnumType.STRING) + @Column(name = "fee_status") + FeeStatus feeStatus; + + @Column(name = "created_on") + private Date createdOn; + + @Column(name = "total_fee_paid") + private BigDecimal totalFeePaid; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public BigDecimal getTotalFees() { + return totalFees; + } + + public void setTotalFees(BigDecimal totalFees) { + this.totalFees = totalFees; + } + public String getIdRoute() { + return idRoute; + } + + public void setIdRoute(String idRoute) { + this.idRoute = idRoute; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public FeeStatus getFeeStatus() { + return feeStatus; + } + + public void setFeeStatus(FeeStatus feeStatus) { + this.feeStatus = feeStatus; + } + + public BigDecimal getTotalFeePaid() { + return totalFeePaid; + } + + public void setTotalFeePaid(BigDecimal totalFeePaid) { + this.totalFeePaid = totalFeePaid; + } + + @Override + public String toString() { + return "FeesView{" + "idUser=" + idUser + ", userName=" + userName + ", totalFees=" + totalFees + ", createdOn=" + createdOn + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/GeneralBoxView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/GeneralBoxView.java new file mode 100644 index 0000000..20f5f15 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/GeneralBoxView.java @@ -0,0 +1,97 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_GENERAL_BOX_VIEW") +public class GeneralBoxView implements Serializable{ + + private static final long serialVersionUID = 5393585318267139926L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "office") + private String office; + + @Column(name = "comments") + private String comments; + + @Column(name = "fecha") + private Date fecha; + + @Column(name = "amount") + private BigDecimal amount; + + @Column(name = "type") + private String type; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOffice() { + return office; + } + + public void setOffice(String office) { + this.office = office; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public Date getFecha() { + return fecha; + } + + public void setFecha(Date fecha) { + this.fecha = fecha; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/HistoryLoanView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/HistoryLoanView.java new file mode 100644 index 0000000..e0a001c --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/HistoryLoanView.java @@ -0,0 +1,183 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar + */ +@Entity +@Immutable +@Table(name = "APC_HISTORY_LOAN_VIEW") +public class HistoryLoanView implements Serializable{ + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "customerName") + private String customerName; + + @Column(name = "endorsementName") + private String endorsementName; + + @Column(name = "routeName") + private String routeName; + + @Column(name = "officeName") + private String officeName; + + @Column(name = "montoPrestado") + private String montoPrestado; + + @Column(name = "montoAPagar") + private BigDecimal montoAPagar; + + @Column(name = "montoPagado") + private BigDecimal montoPagado; + + @Column(name = "saldoInsoluto") + private BigDecimal saldoInsoluto; + + @Column(name = "numMultas") + private long numMultas; + + @Column(name = "estatusPrestamo") + private String estatusPrestamo; + + @Column(name = "fecha") + private Date fecha; + + @Column(name = "juridical_date") + private Date fechaJuridico; + + @Column(name = "nombreUsuario") + private String nombreUsuario; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getEndorsementName() { + return endorsementName; + } + + public void setEndorsementName(String endorsementName) { + this.endorsementName = endorsementName; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public String getOfficeName() { + return officeName; + } + + public void setOfficeName(String officeName) { + this.officeName = officeName; + } + + public String getMontoPrestado() { + return montoPrestado; + } + + public void setMontoPrestado(String montoPrestado) { + this.montoPrestado = montoPrestado; + } + + public BigDecimal getMontoAPagar() { + return montoAPagar; + } + + public void setMontoAPagar(BigDecimal montoAPagar) { + this.montoAPagar = montoAPagar; + } + + public BigDecimal getMontoPagado() { + return montoPagado; + } + + public void setMontoPagado(BigDecimal montoPagado) { + this.montoPagado = montoPagado; + } + + public BigDecimal getSaldoInsoluto() { + return saldoInsoluto; + } + + public void setSaldoInsoluto(BigDecimal saldoInsoluto) { + this.saldoInsoluto = saldoInsoluto; + } + + public long getNumMultas() { + return numMultas; + } + + public void setNumMultas(long numMultas) { + this.numMultas = numMultas; + } + + public String getEstatusPrestamo() { + return estatusPrestamo; + } + + public void setEstatusPrestamo(String estatusPrestamo) { + this.estatusPrestamo = estatusPrestamo; + } + + public Date getFecha() { + return fecha; + } + + public void setFecha(Date fecha) { + this.fecha = fecha; + } + + public Date getFechaJuridico() { + return fechaJuridico; + } + + public void setFechaJuridico(Date fechaJuridico) { + this.fechaJuridico = fechaJuridico; + } + + public String getNombreUsuario() { + return nombreUsuario; + } + + public void setNombreUsuario(String nombreUsuario) { + this.nombreUsuario = nombreUsuario; + } + + + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/InformationLoanLastWeekView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/InformationLoanLastWeekView.java new file mode 100644 index 0000000..00ff8e7 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/InformationLoanLastWeekView.java @@ -0,0 +1,751 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_INFORMATION_LOAN_LAST_WEEK_VIEW") +public class InformationLoanLastWeekView implements Serializable{ + + private static final long serialVersionUID = -6384789811291615117L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "loan_type_name") + private String loanTypeName; + + @Column(name = "id_office") + private String idOffice; + + @Column(name = "id_user") + private String idUser; + + @Column(name = "estatus_prestamo") + private String estatusPrestamo; + + @Column(name = "fecha") + private Date fecha; + + @Column(name = "apoyos") + private BigDecimal apoyos; + + @Column(name = "apoyos_total") + private BigDecimal apoyosTotal; + + @Column(name = "comision_apertura") + private BigDecimal comisionApertura; + + @Column(name = "aval") + private String aval; + + @Column(name = "customer") + private String customer; + + @Column(name = "documento_por") + private BigDecimal documentoPor; + + @Column(name = "abono_diario") + private BigDecimal abonoDiario; + + @Column(name = "amount_paid") + private BigDecimal amountPaid; + + @Column(name = "saldo_insoluto") + private BigDecimal saldoInsoluto; + + @Column(name = "route_name") + private String routeName; + + @Column(name = "asesor") + private String asesor; + + @Column(name = "num_fee") + private int numFee; + + @Column(name = "payment_monday") + private BigDecimal paymentMonday; + + @Column(name = "fee_monday") + private BigDecimal feeMonday; + + @Column(name = "payment_tuesday") + private BigDecimal paymentTuesday; + + @Column(name = "fee_tuesday") + private BigDecimal feeTuesday; + + @Column(name = "payment_wednesday") + private BigDecimal paymentWednesday; + + @Column(name = "fee_wednesday") + private BigDecimal feeWednesday; + + @Column(name = "payment_thursday") + private BigDecimal paymentThursday; + + @Column(name = "fee_thursday") + private BigDecimal feeThursday; + + @Column(name = "payment_friday") + private BigDecimal paymentFriday; + + @Column(name = "fee_friday") + private BigDecimal feeFriday; + + @Column(name = "payment_saturday") + private BigDecimal paymentSaturday; + + @Column(name = "fee_saturday") + private BigDecimal feeSaturday; + + @Column(name = "faltante") + private BigDecimal faltante; + + @Column(name = "new_customer") + private String newCustomer; + + @Column(name = "renovation") + private String renovation; + + @Column(name = "abono_semana_actual") + private BigDecimal abonoSemanaActual; + + @Column(name = "fee_semana_actual") + private BigDecimal feeSemanaActual; + + @Column(name = "num_pagos_all") + private BigDecimal numPagosAll; + + @Column(name = "num_pagos_week") + private BigDecimal numPagosWeek; + + @Column(name = "fee_todos") + private BigDecimal feeTodos; + + @Enumerated(EnumType.STRING) + @Column(name = "frozen") + private ActiveStatus frozen; + + public ActiveStatus getFrozen() { + if (frozen == null) { + frozen = ActiveStatus.DISABLED; + } + return frozen; + } + + public void setFrozen(ActiveStatus frozen) { + this.frozen = frozen; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLoanTypeName() { + return loanTypeName; + } + + public void setLoanTypeName(String loanTypeName) { + this.loanTypeName = loanTypeName; + } + + public String getEstatusPrestamo() { + return estatusPrestamo; + } + + public void setEstatusPrestamo(String estatusPrestamo) { + this.estatusPrestamo = estatusPrestamo; + } + + public String getIdOffice() { + return idOffice; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public void setIdOffice(String idOffice) { + this.idOffice = idOffice; + } + + public Date getFecha() { + return fecha; + } + + public void setFecha(Date fecha) { + this.fecha = fecha; + } + + public BigDecimal getApoyos() { + return apoyos; + } + + public void setApoyos(BigDecimal apoyos) { + this.apoyos = apoyos; + } + + public BigDecimal getApoyosTotal() { + return apoyosTotal; + } + + public void setApoyosTotal(BigDecimal apoyosTotal) { + this.apoyosTotal = apoyosTotal; + } + + public BigDecimal getComisionApertura() { + return comisionApertura; + } + + public void setComisionApertura(BigDecimal comisionApertura) { + this.comisionApertura = comisionApertura; + } + + public String getAval() { + return aval; + } + + public void setAval(String aval) { + this.aval = aval; + } + + public String getCustomer() { + return customer; + } + + public void setCustomer(String customer) { + this.customer = customer; + } + + public BigDecimal getDocumentoPor() { + return documentoPor.subtract(feeSemanaActual); + } + + public void setDocumentoPor(BigDecimal documentoPor) { + this.documentoPor = documentoPor; + } + + public BigDecimal getAbonoDiario() { + return abonoDiario; + } + + public void setAbonoDiario(BigDecimal abonoDiario) { + this.abonoDiario = abonoDiario; + } + + public BigDecimal getAmountPaid() { + return amountPaid.subtract(abonoSemanaActual); + } + + public void setAmountPaid(BigDecimal amountPaid) { + this.amountPaid = amountPaid; + } + + public BigDecimal getSaldoInsoluto() { + return (documentoPor.subtract(feeSemanaActual)).subtract((amountPaid.subtract(abonoSemanaActual))); + } + + public void setSaldoInsoluto(BigDecimal saldoInsoluto) { + this.saldoInsoluto = saldoInsoluto; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public String getAsesor() { + return asesor; + } + + public void setAsesor(String asesor) { + this.asesor = asesor; + } + + public int getNumFee() { + return numFee; + } + + public void setNumFee(int numFee) { + this.numFee = numFee; + } + + public BigDecimal getPaymentMonday() { + return paymentMonday; + } + + public void setPaymentMonday(BigDecimal paymentMonday) { + this.paymentMonday = paymentMonday; + } + + public BigDecimal getFeeMonday() { + return feeMonday; + } + + public void setFeeMonday(BigDecimal feeMonday) { + this.feeMonday = feeMonday; + } + + public BigDecimal getPaymentTuesday() { + return paymentTuesday; + } + + public void setPaymentTuesday(BigDecimal paymentTuesday) { + this.paymentTuesday = paymentTuesday; + } + + public BigDecimal getFeeTuesday() { + return feeTuesday; + } + + public void setFeeTuesday(BigDecimal feeTuesday) { + this.feeTuesday = feeTuesday; + } + + public BigDecimal getPaymentWednesday() { + return paymentWednesday; + } + + public void setPaymentWednesday(BigDecimal paymentWednesday) { + this.paymentWednesday = paymentWednesday; + } + + public BigDecimal getFeeWednesday() { + return feeWednesday; + } + + public void setFeeWednesday(BigDecimal feeWednesday) { + this.feeWednesday = feeWednesday; + } + + public BigDecimal getPaymentThursday() { + return paymentThursday; + } + + public void setPaymentThursday(BigDecimal paymentThursday) { + this.paymentThursday = paymentThursday; + } + + public BigDecimal getFeeThursday() { + return feeThursday; + } + + public void setFeeThursday(BigDecimal feeThursday) { + this.feeThursday = feeThursday; + } + + public BigDecimal getPaymentFriday() { + return paymentFriday; + } + + public void setPaymentFriday(BigDecimal paymentFriday) { + this.paymentFriday = paymentFriday; + } + + public BigDecimal getFeeFriday() { + return feeFriday; + } + + public void setFeeFriday(BigDecimal feeFriday) { + this.feeFriday = feeFriday; + } + + public BigDecimal getPaymentSaturday() { + return paymentSaturday; + } + + public void setPaymentSaturday(BigDecimal paymentSaturday) { + this.paymentSaturday = paymentSaturday; + } + + public BigDecimal getFeeSaturday() { + return feeSaturday; + } + + public void setFeeSaturday(BigDecimal feeSaturday) { + this.feeSaturday = feeSaturday; + } + + public BigDecimal getFeeTodos() { + return feeTodos; + } + + public void setFeeTodos(BigDecimal feeTodos) { + this.feeTodos = feeTodos; + } + + public BigDecimal getFaltante() { + + BigDecimal montoPagadoTotalEsperado = (numPagosAll.subtract(numPagosWeek)).multiply(abonoDiario); + + BigDecimal montoPagadoSemana = paymentFriday.add(paymentMonday).add(paymentSaturday).add(paymentThursday).add(paymentTuesday).add(paymentWednesday); + BigDecimal montoPagadoTotal = getAmountPaid().subtract(montoPagadoSemana); + + BigDecimal faltanteAcomulado = (montoPagadoTotalEsperado.add(feeTodos)).subtract(montoPagadoTotal); + + + BigDecimal montoEsperadoSemana = numPagosWeek.multiply(abonoDiario); + + BigDecimal feeSemana = feeFriday.add(feeMonday).add(feeSaturday).add(feeThursday).add(feeTuesday).add(feeWednesday); + + //RN1 + //Si el pago esperado por semana es igual al total de abonos en la semana, entonces faltante 0 + if(montoPagadoSemana.compareTo(montoEsperadoSemana) == 0) + { + return BigDecimal.ZERO; + } + + // RN4 + if(renovation.equalsIgnoreCase("Si") && faltante.compareTo(BigDecimal.ZERO) > 0){ + return BigDecimal.ZERO; + } + + // RN5 + if (numPagosAll.compareTo(BigDecimal.valueOf(22)) > 0 && faltante.compareTo(BigDecimal.ZERO) > 0) { + return BigDecimal.ZERO; + } + + // RN6 + if (loanTypeName.toLowerCase().contains("con") || loanTypeName.toLowerCase().contains("conv") + || loanTypeName.toLowerCase().contains("conve") || loanTypeName.toLowerCase().contains("convenio")) { + return BigDecimal.ZERO; + } + + //RN7 + if(getFrozen().equals(ActiveStatus.ENEBLED)){ + return BigDecimal.ZERO; + } + + if(numPagosAll.compareTo(BigDecimal.valueOf(22)) > 0) + { + if((numPagosAll.subtract(numPagosWeek)).compareTo(BigDecimal.valueOf(22)) > 0) + { + return montoPagadoSemana.negate(); + } + BigDecimal temp = numPagosAll.subtract(BigDecimal.valueOf(22)); + if(temp.compareTo(BigDecimal.ONE) == 0) + { + return (paymentFriday.add(paymentSaturday)).negate(); + } + if(temp.compareTo(BigDecimal.valueOf(2)) == 0) + { + return (paymentFriday.add(paymentSaturday).add(paymentThursday)).negate(); + } + if(temp.compareTo(BigDecimal.valueOf(3)) == 0) + { + return (paymentFriday.add(paymentSaturday).add(paymentThursday).add(paymentWednesday)).negate(); + } + if(temp.compareTo(BigDecimal.valueOf(4)) == 0) + { + return (paymentFriday.add(paymentSaturday).add(paymentThursday).add(paymentWednesday).add(paymentTuesday)).negate(); + } + } + + //RN2 + //Si el total de abonos por semana es menor al total de abonos esperado, entonces se muestra la diferencia + if(montoPagadoSemana.compareTo(montoEsperadoSemana) < 0) + { + if(getSaldoInsoluto().compareTo(BigDecimal.ZERO) == 0) + { + if(apoyosTotal.compareTo(getAmountPaid()) < 0) + { + BigDecimal esperadoAntesDe = (numPagosAll.subtract(numPagosWeek)).multiply(abonoDiario); + BigDecimal pagadoAntesDe = getAmountPaid().subtract(montoPagadoSemana); + BigDecimal faltanteAntesDe = feeTodos.subtract(feeSemana); + BigDecimal faltanteAcomuladoAntesDe = (esperadoAntesDe.add(faltanteAntesDe)).subtract(pagadoAntesDe); + if(faltanteAcomuladoAntesDe.compareTo(BigDecimal.ZERO) > 0) + { + if(faltanteAcomuladoAntesDe.compareTo(montoPagadoSemana) == 0) + { + return montoPagadoSemana.negate(); + } + if(faltanteAcomuladoAntesDe.compareTo(montoPagadoSemana) < 0) + { + return faltanteAcomuladoAntesDe.negate(); + } + if(faltanteAcomuladoAntesDe.compareTo(montoPagadoSemana) > 0) + { + return montoPagadoSemana.negate(); + } + } + } + return BigDecimal.ZERO; + } + if(faltanteAcomulado.compareTo(BigDecimal.ZERO) < 0) + { + if(faltanteAcomulado.abs().compareTo((montoEsperadoSemana.subtract(montoPagadoSemana))) == 0) + { + return BigDecimal.ZERO; + } + if(faltanteAcomulado.abs().compareTo((montoEsperadoSemana.subtract(montoPagadoSemana))) < 0) + { + return (montoEsperadoSemana.subtract(montoPagadoSemana)).subtract(faltanteAcomulado.abs()); + } + if(faltanteAcomulado.abs().compareTo((montoEsperadoSemana.subtract(montoPagadoSemana))) > 0) + { + return BigDecimal.ZERO; + } + } + + if(getSaldoInsoluto().compareTo((montoEsperadoSemana.subtract(montoPagadoSemana))) == 0) + { + return montoEsperadoSemana.subtract(montoPagadoSemana); + } + + if(getSaldoInsoluto().compareTo((montoEsperadoSemana.subtract(montoPagadoSemana))) < 0) + { + return getSaldoInsoluto(); + } + + if(getSaldoInsoluto().compareTo((montoEsperadoSemana.subtract(montoPagadoSemana))) > 0) + { + return montoEsperadoSemana.subtract(montoPagadoSemana); + } + } + + //RN3 + //Si el total de abonos por semana es mayor al total de abonos esperado, + if(montoPagadoSemana.compareTo(montoEsperadoSemana) > 0) + { + if(faltanteAcomulado.compareTo(BigDecimal.ZERO) < 0) + { + return BigDecimal.ZERO; + } + + if(faltanteAcomulado.compareTo(BigDecimal.ZERO) == 0) + { + if(feeSemana.compareTo(BigDecimal.ZERO) > 0) + { + if(feeSemana.compareTo(montoPagadoSemana.subtract(montoEsperadoSemana)) > 0) + { + return (montoPagadoSemana.subtract(montoEsperadoSemana)).negate(); + } + else + { + return feeSemana.negate(); + } + } + return BigDecimal.ZERO; + } + + if(faltanteAcomulado.compareTo(BigDecimal.ZERO) > 0) + { + if(faltanteAcomulado.compareTo((montoPagadoSemana.subtract(montoEsperadoSemana))) == 0) + { + return faltanteAcomulado.negate(); + } + if(faltanteAcomulado.compareTo((montoPagadoSemana.subtract(montoEsperadoSemana))) > 0) + { + return (montoPagadoSemana.subtract(montoEsperadoSemana)).negate(); + } + if(faltanteAcomulado.compareTo((montoPagadoSemana.subtract(montoEsperadoSemana))) < 0) + { + return faltanteAcomulado.negate(); + } + } + } + return faltante; + } + + public void setFaltante(BigDecimal faltante) { + this.faltante = faltante; + } + + public String getNewCustomer() { + return newCustomer; + } + + public void setNewCustomer(String newCustomer) { + this.newCustomer = newCustomer; + } + + public String getRenovation() { + return renovation; + } + + public void setRenovation(String renovation) { + this.renovation = renovation; + } + + public BigDecimal getAbonoSemanaActual() { + return abonoSemanaActual; + } + + public void setAbonoSemanaActual(BigDecimal abonoSemanaActual) { + this.abonoSemanaActual = abonoSemanaActual; + } + + public BigDecimal getFeeSemanaActual() { + return feeSemanaActual; + } + + public void setFeeSemanaActual(BigDecimal feeSemanaActual) { + this.feeSemanaActual = feeSemanaActual; + } + + public BigDecimal getNumPagosAll() { + return numPagosAll; + } + + public void setNumPagosAll(BigDecimal numPagosAll) { + this.numPagosAll = numPagosAll; + } + + public BigDecimal getNumPagosWeek() { + return numPagosWeek; + } + + public void setNumPagosWeek(BigDecimal numPagosWeek) { + this.numPagosWeek = numPagosWeek; + } + + public String getConditionLunes() { + if(feeMonday.compareTo(BigDecimal.ZERO) > 0) + return "redRow"; + else if(paymentMonday.compareTo(BigDecimal.ZERO) == 0 && feeMonday.compareTo(BigDecimal.ZERO) == 0) + return "greenRow"; + else if(feeMonday.compareTo(BigDecimal.ZERO) == 0 && paymentMonday.compareTo(BigDecimal.ZERO) > 0 && (paymentMonday.compareTo(abonoDiario) < 0)) + return "yellowRow"; + else if(feeMonday.compareTo(BigDecimal.ZERO) == 0 && paymentMonday.compareTo(BigDecimal.ZERO) > 0 && (paymentMonday.compareTo(abonoDiario) > 0)) + return "blueRow"; + else + return null; + } + + public String getConditionMartes() { + if(feeTuesday.compareTo(BigDecimal.ZERO) > 0) + return "redRow"; + else if(paymentTuesday.compareTo(BigDecimal.ZERO) == 0 && feeTuesday.compareTo(BigDecimal.ZERO) == 0) + return "greenRow"; + else if(feeTuesday.compareTo(BigDecimal.ZERO) == 0 && paymentTuesday.compareTo(BigDecimal.ZERO) > 0 && (paymentTuesday.compareTo(abonoDiario) < 0)) + return "yellowRow"; + else if(feeTuesday.compareTo(BigDecimal.ZERO) == 0 && paymentTuesday.compareTo(BigDecimal.ZERO) > 0 && (paymentTuesday.compareTo(abonoDiario) > 0)) + return "blueRow"; + else + return null; + } + + public String getConditionMiercoles() { + if(feeWednesday.compareTo(BigDecimal.ZERO) > 0) + return "redRow"; + else if(paymentWednesday.compareTo(BigDecimal.ZERO) == 0 && feeWednesday.compareTo(BigDecimal.ZERO) == 0) + return "greenRow"; + else if(feeWednesday.compareTo(BigDecimal.ZERO) == 0 && paymentWednesday.compareTo(BigDecimal.ZERO) > 0 && (paymentWednesday.compareTo(abonoDiario) < 0)) + return "yellowRow"; + else if(feeWednesday.compareTo(BigDecimal.ZERO) == 0 && paymentWednesday.compareTo(BigDecimal.ZERO) > 0 && (paymentWednesday.compareTo(abonoDiario) > 0)) + return "blueRow"; + else + return null; + } + + public String getConditionJueves() { + if(feeThursday.compareTo(BigDecimal.ZERO) > 0) + return "redRow"; + else if(paymentThursday.compareTo(BigDecimal.ZERO) == 0 && feeThursday.compareTo(BigDecimal.ZERO) == 0) + return "greenRow"; + else if(feeThursday.compareTo(BigDecimal.ZERO) == 0 && paymentThursday.compareTo(BigDecimal.ZERO) > 0 && (paymentThursday.compareTo(abonoDiario) < 0)) + return "yellowRow"; + else if(feeThursday.compareTo(BigDecimal.ZERO) == 0 && paymentThursday.compareTo(BigDecimal.ZERO) > 0 && (paymentThursday.compareTo(abonoDiario) > 0)) + return "blueRow"; + else + return null; + } + + public String getConditionViernes() { + if(feeFriday.compareTo(BigDecimal.ZERO) > 0) + return "redRow"; + else if(paymentFriday.compareTo(BigDecimal.ZERO) == 0 && feeFriday.compareTo(BigDecimal.ZERO) == 0) + return "greenRow"; + else if(feeFriday.compareTo(BigDecimal.ZERO) == 0 && paymentFriday.compareTo(BigDecimal.ZERO) > 0 && (paymentFriday.compareTo(abonoDiario) < 0)) + return "yellowRow"; + else if(feeFriday.compareTo(BigDecimal.ZERO) == 0 && paymentFriday.compareTo(BigDecimal.ZERO) > 0 && (paymentFriday.compareTo(abonoDiario) > 0)) + return "blueRow"; + else + return null; + } + + public String getConditionSabado() { + if(feeSaturday.compareTo(BigDecimal.ZERO) > 0) + return "redRow"; + else if(paymentSaturday.compareTo(BigDecimal.ZERO) == 0 && feeSaturday.compareTo(BigDecimal.ZERO) == 0) + return "greenRow"; + else if(feeSaturday.compareTo(BigDecimal.ZERO) == 0 && paymentSaturday.compareTo(BigDecimal.ZERO) > 0 && (paymentSaturday.compareTo(abonoDiario) < 0)) + return "yellowRow"; + else if(feeSaturday.compareTo(BigDecimal.ZERO) == 0 && paymentSaturday.compareTo(BigDecimal.ZERO) > 0 && (paymentSaturday.compareTo(abonoDiario) > 0)) + return "blueRow"; + else + return null; + } + + public String getConditionNewCustomer() { + if(newCustomer.equalsIgnoreCase("Si")) + return "greenRow"; + else + return null; + } + + public String getConditionRenovation() { + if (getFrozen().equals(ActiveStatus.ENEBLED)) { + return "blueLightRow"; + } + if (newCustomer.equalsIgnoreCase("Si")) + return "orangeRow"; + else if(renovation.equalsIgnoreCase("Si")) + return "greenLigthRow"; + else if(getSaldoInsoluto().compareTo(BigDecimal.ZERO) == 0) + return "greenStrongRow"; + else + return null; + } + + public int getWeekLoanDate() { + Calendar c2 = Calendar.getInstance(); + c2.setTime(getFecha()); + int weekLoanDate = c2.get(Calendar.WEEK_OF_YEAR); + + return weekLoanDate; + } + + public int getWeekCurrentDate() { + Calendar c2 = Calendar.getInstance(); + int weekCurrentDate = c2.get(Calendar.WEEK_OF_YEAR); + weekCurrentDate = weekCurrentDate - 1; + return weekCurrentDate; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/InformationLoanWeekView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/InformationLoanWeekView.java new file mode 100644 index 0000000..cce9f16 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/InformationLoanWeekView.java @@ -0,0 +1,1150 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.math.MathContext; +import java.util.Calendar; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_INFORMATION_LOAN_WEEK_VIEW") +public class InformationLoanWeekView implements Serializable { + + private static final long serialVersionUID = -6384789811291615117L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_office") + private String idOffice; + + @Column(name = "loan_type_name") + private String loanTypeName; + + @Column(name = "id_user") + private String idUser; + + @Column(name = "estatus_prestamo") + private String estatusPrestamo; + + @Column(name = "fecha") + private Date fecha; + + @Column(name = "apoyos") + private BigDecimal apoyos; + + @Column(name = "apoyos_total") + private BigDecimal apoyosTotal; + + @Column(name = "comision_apertura") + private BigDecimal comisionApertura; + + @Column(name = "aval") + private String aval; + + @Column(name = "customer") + private String customer; + + @Column(name = "documento_por") + private BigDecimal documentoPor; + + @Column(name = "abono_diario") + private BigDecimal abonoDiario; + + @Column(name = "amount_paid") + private BigDecimal amountPaid; + + @Column(name = "saldo_insoluto") + private BigDecimal saldoInsoluto; + + @Column(name = "route_name") + private String routeName; + + @Column(name = "asesor") + private String asesor; + + @Column(name = "num_fee") + private int numFee; + + @Column(name = "payment_monday") + private BigDecimal paymentMonday; + + @Column(name = "fee_monday") + private BigDecimal feeMonday; + + @Column(name = "payment_tuesday") + private BigDecimal paymentTuesday; + + @Column(name = "fee_tuesday") + private BigDecimal feeTuesday; + + @Column(name = "payment_wednesday") + private BigDecimal paymentWednesday; + + @Column(name = "fee_wednesday") + private BigDecimal feeWednesday; + + @Column(name = "payment_thursday") + private BigDecimal paymentThursday; + + @Column(name = "fee_thursday") + private BigDecimal feeThursday; + + @Column(name = "payment_friday") + private BigDecimal paymentFriday; + + @Column(name = "fee_friday") + private BigDecimal feeFriday; + + @Column(name = "payment_saturday") + private BigDecimal paymentSaturday; + + @Column(name = "fee_saturday") + private BigDecimal feeSaturday; + + @Column(name = "faltante") + private BigDecimal faltante; + + @Column(name = "new_customer") + private String newCustomer; + + @Column(name = "renovation") + private String renovation; + + @Column(name = "num_pagos_all") + private BigDecimal numPagosAll; + + @Column(name = "num_pagos_week") + private BigDecimal numPagosWeek; + + @Column(name = "fee_todos") + private BigDecimal feeTodos; + + @Enumerated(EnumType.STRING) + @Column(name = "frozen") + private ActiveStatus frozen; + + @Transient + private BigDecimal totalPaid; + + @Transient + private BigDecimal numPagosLoanType; + + @Transient + private String movimientosMonday; + + @Transient + private String movimientosTuesday; + + @Transient + private String movimientosWednesday; + + @Transient + private String movimientosThursday; + + @Transient + private String movimientosFriday; + + @Transient + private String movimientosSaturday; + + @Transient + private String renovationMonday; + + @Transient + private String renovationTuesday; + + @Transient + private String renovationWednesday; + + @Transient + private String renovationThursday; + + @Transient + private String renovationFriday; + + @Transient + private String renovationSaturday; + + @Transient + private String reactivation; + + @Transient + private String weekOfCreation; + + private BigDecimal faltanteHistorico; + + private BigDecimal recuperado; + + private BigDecimal faltanteSemana; + + private BigDecimal feeSemana; + + public ActiveStatus getFrozen() { + if (frozen == null) { + frozen = ActiveStatus.DISABLED; + } + return frozen; + } + + public void setFrozen(ActiveStatus frozen) { + this.frozen = frozen; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLoanTypeName() { + return loanTypeName; + } + + public void setLoanTypeName(String loanTypeName) { + this.loanTypeName = loanTypeName; + } + + public String getEstatusPrestamo() { + return estatusPrestamo; + } + + public void setEstatusPrestamo(String estatusPrestamo) { + this.estatusPrestamo = estatusPrestamo; + } + + public String getIdOffice() { + return idOffice; + } + + public void setIdOffice(String idOffice) { + this.idOffice = idOffice; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public Date getFecha() { + return fecha; + } + + public void setFecha(Date fecha) { + this.fecha = fecha; + } + + public BigDecimal getApoyos() { + return apoyos; + } + + public void setApoyos(BigDecimal apoyos) { + this.apoyos = apoyos; + } + + public BigDecimal getApoyosTotal() { + return apoyosTotal; + } + + public void setApoyosTotal(BigDecimal apoyosTotal) { + this.apoyosTotal = apoyosTotal; + } + + public BigDecimal getComisionApertura() { + return comisionApertura; + } + + public void setComisionApertura(BigDecimal comisionApertura) { + this.comisionApertura = comisionApertura; + } + + public String getAval() { + return aval; + } + + public void setAval(String aval) { + this.aval = aval; + } + + public String getCustomer() { + return customer; + } + + public void setCustomer(String customer) { + this.customer = customer; + } + + public BigDecimal getDocumentoPor() { + return documentoPor; + } + + public void setDocumentoPor(BigDecimal documentoPor) { + this.documentoPor = documentoPor; + } + + public BigDecimal getAbonoDiario() { + return abonoDiario; + } + + public void setAbonoDiario(BigDecimal abonoDiario) { + this.abonoDiario = abonoDiario; + } + + public BigDecimal getAmountPaid() { + return amountPaid; + } + + public void setAmountPaid(BigDecimal amountPaid) { + this.amountPaid = amountPaid; + } + + public BigDecimal getSaldoInsoluto() { + return saldoInsoluto; + } + + public void setSaldoInsoluto(BigDecimal saldoInsoluto) { + this.saldoInsoluto = saldoInsoluto; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public String getAsesor() { + return asesor; + } + + public void setAsesor(String asesor) { + this.asesor = asesor; + } + + public int getNumFee() { + return numFee; + } + + public void setNumFee(int numFee) { + this.numFee = numFee; + } + + public BigDecimal getPaymentMonday() { + return paymentMonday; + } + + public void setPaymentMonday(BigDecimal paymentMonday) { + this.paymentMonday = paymentMonday; + } + + public BigDecimal getFeeMonday() { + return feeMonday; + } + + public void setFeeMonday(BigDecimal feeMonday) { + this.feeMonday = feeMonday; + } + + public BigDecimal getPaymentTuesday() { + return paymentTuesday; + } + + public void setPaymentTuesday(BigDecimal paymentTuesday) { + this.paymentTuesday = paymentTuesday; + } + + public BigDecimal getFeeTuesday() { + return feeTuesday; + } + + public void setFeeTuesday(BigDecimal feeTuesday) { + this.feeTuesday = feeTuesday; + } + + public BigDecimal getPaymentWednesday() { + return paymentWednesday; + } + + public void setPaymentWednesday(BigDecimal paymentWednesday) { + this.paymentWednesday = paymentWednesday; + } + + public BigDecimal getFeeWednesday() { + return feeWednesday; + } + + public void setFeeWednesday(BigDecimal feeWednesday) { + this.feeWednesday = feeWednesday; + } + + public BigDecimal getPaymentThursday() { + return paymentThursday; + } + + public void setPaymentThursday(BigDecimal paymentThursday) { + this.paymentThursday = paymentThursday; + } + + public BigDecimal getFeeThursday() { + return feeThursday; + } + + public void setFeeThursday(BigDecimal feeThursday) { + this.feeThursday = feeThursday; + } + + public BigDecimal getPaymentFriday() { + return paymentFriday; + } + + public void setPaymentFriday(BigDecimal paymentFriday) { + this.paymentFriday = paymentFriday; + } + + public BigDecimal getFeeFriday() { + return feeFriday; + } + + public void setFeeFriday(BigDecimal feeFriday) { + this.feeFriday = feeFriday; + } + + public BigDecimal getPaymentSaturday() { + return paymentSaturday; + } + + public void setPaymentSaturday(BigDecimal paymentSaturday) { + this.paymentSaturday = paymentSaturday; + } + + public BigDecimal getFeeSaturday() { + return feeSaturday; + } + + public void setFeeSaturday(BigDecimal feeSaturday) { + this.feeSaturday = feeSaturday; + } + + public BigDecimal getNumPagosAll() { + return numPagosAll; + } + + public void setNumPagosAll(BigDecimal numPagosAll) { + this.numPagosAll = numPagosAll; + } + + public BigDecimal getNumPagosWeek() { + return numPagosWeek; + } + + public void setNumPagosWeek(BigDecimal numPagosWeek) { + this.numPagosWeek = numPagosWeek; + } + + public BigDecimal getFeeTodos() { + return feeTodos; + } + + public void setFeeTodos(BigDecimal feeTodos) { + this.feeTodos = feeTodos; + } + + public BigDecimal getTotalPaid() { + return totalPaid; + } + + public void setTotalPaid(BigDecimal totalPaid) { + this.totalPaid = totalPaid; + } + + public BigDecimal getNumPagosLoanType() { + return numPagosLoanType; + } + + public void setNumPagosLoanType(BigDecimal numPagosLoanType) { + this.numPagosLoanType = numPagosLoanType; + } + + public BigDecimal getFaltante() { + + //if(id.equals("f911ef4c-b6f2-4ecf-91b6-3d6d6bcf9faa")){ + BigDecimal montoPagadoTotalEsperado = (numPagosAll.subtract(numPagosWeek)).multiply(abonoDiario); + + if (numPagosAll.subtract(numPagosWeek).compareTo(numPagosLoanType) >= 0) { + + montoPagadoTotalEsperado = (numPagosLoanType).multiply(abonoDiario); + } + + BigDecimal montoPagadoSemana = paymentFriday.add(paymentMonday).add(paymentSaturday).add(paymentThursday).add(paymentTuesday).add(paymentWednesday); + + BigDecimal montoPagadoTotalPasado = totalPaid.subtract(montoPagadoSemana); + + BigDecimal faltanteAcomulado = (montoPagadoTotalEsperado.add(feeTodos)).subtract(montoPagadoTotalPasado); + + BigDecimal faltanteSemanaCalculo = getFaltanteSemana(); + + BigDecimal recuperadoSemana = getRecuperado(); + + BigDecimal montoEsperadoSemana = numPagosWeek.multiply(abonoDiario); + + BigDecimal feeSemana = feeFriday.add(feeMonday).add(feeSaturday).add(feeThursday).add(feeTuesday).add(feeWednesday); + + //montoPagadoTotalEsperado.add(feeSemana).add(feeTodos); + //RN1 + //Si el pago esperado por semana es igual al total de abonos en la semana, entonces faltante 0 + if (montoPagadoSemana.compareTo(montoEsperadoSemana) == 0) { + return BigDecimal.ZERO; + } + + // RN4 + /*if(renovation.equalsIgnoreCase("Si") && faltante.compareTo(BigDecimal.ZERO) > 0){ + return BigDecimal.ZERO; + }*/ + if (renovationMonday.equalsIgnoreCase("Si") || renovationTuesday.equalsIgnoreCase("Si") + || renovationThursday.equalsIgnoreCase("Si") || renovationWednesday.equalsIgnoreCase("Si") + || renovationFriday.equalsIgnoreCase("Si") || renovationSaturday.equalsIgnoreCase("Si")) { + + if (faltanteAcomulado.compareTo(BigDecimal.ZERO) <= 0) { + return BigDecimal.ZERO; + } + + return faltanteAcomulado.negate(); + } + + // RN5 + // if (numPagosAll.compareTo(BigDecimal.valueOf(22)) > 0 && faltante.compareTo(BigDecimal.ZERO) > 0) { + // return BigDecimal.ZERO; + //} + // RN6 + if (loanTypeName.toLowerCase().contains("con") || loanTypeName.toLowerCase().contains("conv") + || loanTypeName.toLowerCase().contains("conve") || loanTypeName.toLowerCase().contains("convenio")) { + return BigDecimal.ZERO; + } + + //RN7 + if (getFrozen().equals(ActiveStatus.ENEBLED)) { + return BigDecimal.ZERO; + } + + if (numPagosAll.compareTo(BigDecimal.valueOf(22)) > 0) { + + return montoPagadoSemana.negate(); + + } + + //RN2 + //Si el total de abonos por semana es menor al total de abonos esperado, entonces se muestra la diferencia + if (montoPagadoSemana.compareTo(montoEsperadoSemana) < 0) { + if (faltanteAcomulado.compareTo(BigDecimal.ZERO) < 0) { + + faltanteAcomulado = faltanteAcomulado.negate(); + + switch ((faltanteAcomulado).compareTo(faltanteSemanaCalculo)) { + case (-1): + return montoEsperadoSemana.subtract(montoPagadoSemana).subtract(faltanteAcomulado); + case (0): + return BigDecimal.ZERO; + case (1): + return BigDecimal.ZERO; + } + + } + + return montoEsperadoSemana.subtract(montoPagadoSemana); + + } + + //RN3 + //Si el total de abonos por semana es mayor al total de abonos esperado, + if (montoPagadoSemana.compareTo(montoEsperadoSemana) > 0) { + if (faltanteAcomulado.compareTo(BigDecimal.ZERO) < 0) { + return BigDecimal.ZERO; + } + + if (faltanteAcomulado.compareTo(BigDecimal.ZERO) > 0) { + if (faltanteAcomulado.compareTo((recuperadoSemana)) == 0) { + + return faltanteAcomulado.negate(); + } + if (faltanteAcomulado.compareTo(recuperadoSemana) > 0) { + return montoPagadoSemana.subtract(montoEsperadoSemana).negate(); + } + if (faltanteAcomulado.compareTo(recuperadoSemana) < 0) { + + if ((feeSemana).compareTo(BigDecimal.ZERO) == 0) { + return faltanteAcomulado.negate(); + } + + switch ((faltanteAcomulado.add(feeSemana)).compareTo((recuperadoSemana))) { + case (-1): + return (feeSemana.add(faltanteAcomulado)).negate(); + case (0): + return BigDecimal.ZERO; + case (1): + return (montoPagadoSemana.subtract(montoEsperadoSemana)).negate(); + } + + } + } + } + //return faltante; + //} + + return BigDecimal.ZERO; + } + + public void setFaltante(BigDecimal faltante) { + this.faltante = faltante; + } + + public BigDecimal getFaltanteHistorico() { + BigDecimal montoPagadoTotalEsperado = (numPagosAll.subtract(numPagosWeek)).multiply(abonoDiario); + + if (numPagosAll.subtract(numPagosWeek).compareTo(numPagosLoanType) >= 0) { + + montoPagadoTotalEsperado = (numPagosLoanType).multiply(abonoDiario); + } + BigDecimal montoPagadoSemana = paymentFriday.add(paymentMonday).add(paymentSaturday).add(paymentThursday).add(paymentTuesday).add(paymentWednesday); + BigDecimal montoPagadoTotal = totalPaid; + BigDecimal montoPagadoTotalPasado = montoPagadoTotal.subtract(montoPagadoSemana); + + return montoPagadoTotalEsperado.add(feeTodos).subtract(montoPagadoTotalPasado); + } + + public void setFaltanteHistorico(BigDecimal faltanteHistorico) { + this.faltanteHistorico = faltanteHistorico; + } + + public BigDecimal getRecuperado() { + BigDecimal recuperadoSemanaPorDia = BigDecimal.ZERO; + + //if(id.equals("4177c7d0-46ee-4862-aa5f-d0526798cc41")){ + if ((numPagosAll.subtract(numPagosWeek)).compareTo(BigDecimal.valueOf(22)) >= 0) { + + return paymentMonday.add(paymentThursday).add(paymentWednesday).add(paymentTuesday).add(paymentFriday).add(paymentSaturday); + + } + + /*if(getFaltanteHistorico().compareTo(BigDecimal.ZERO)<0) + { + return BigDecimal.ZERO; + }*/ + if (renovationMonday.equalsIgnoreCase("Si")) { + return recuperadoSemanaPorDia; + + } + + if (movimientosMonday.equalsIgnoreCase("Si")) { + recuperadoSemanaPorDia = ((paymentMonday.subtract(abonoDiario).compareTo(BigDecimal.ZERO)) > 0) ? recuperadoSemanaPorDia.add(paymentMonday.subtract(abonoDiario)) : recuperadoSemanaPorDia; + } + + if (renovationTuesday.equalsIgnoreCase("Si")) { + return recuperadoSemanaPorDia; + + } + + if (movimientosTuesday.equalsIgnoreCase("Si")) { + recuperadoSemanaPorDia = ((paymentTuesday.subtract(abonoDiario).compareTo(BigDecimal.ZERO)) > 0) ? recuperadoSemanaPorDia.add(paymentTuesday.subtract(abonoDiario)) : recuperadoSemanaPorDia; + } + + if (renovationWednesday.equalsIgnoreCase("Si")) { + return recuperadoSemanaPorDia; + + } + if (movimientosWednesday.equalsIgnoreCase("Si")) { + recuperadoSemanaPorDia = ((paymentWednesday.subtract(abonoDiario).compareTo(BigDecimal.ZERO)) > 0) ? recuperadoSemanaPorDia.add(paymentWednesday.subtract(abonoDiario)) : recuperadoSemanaPorDia; + + } + + if (renovationThursday.equalsIgnoreCase("Si")) { + return recuperadoSemanaPorDia; + + } + + if (movimientosThursday.equalsIgnoreCase("Si")) { + recuperadoSemanaPorDia = ((paymentThursday.subtract(abonoDiario).compareTo(BigDecimal.ZERO)) > 0) ? recuperadoSemanaPorDia.add(paymentThursday.subtract(abonoDiario)) : recuperadoSemanaPorDia; + + } + + if (renovationFriday.equalsIgnoreCase("Si")) { + return recuperadoSemanaPorDia; + + } + + if (movimientosFriday.equalsIgnoreCase("Si")) { + recuperadoSemanaPorDia = ((paymentFriday.subtract(abonoDiario).compareTo(BigDecimal.ZERO)) > 0) ? recuperadoSemanaPorDia.add(paymentFriday.subtract(abonoDiario)) : recuperadoSemanaPorDia; + + } + + if (renovationSaturday.equalsIgnoreCase("Si")) { + return recuperadoSemanaPorDia; + + } + + if (movimientosSaturday.equalsIgnoreCase("Si")) { + recuperadoSemanaPorDia = ((paymentSaturday.subtract(abonoDiario).compareTo(BigDecimal.ZERO)) > 0) ? recuperadoSemanaPorDia.add(paymentSaturday.subtract(abonoDiario)) : recuperadoSemanaPorDia; + + } + //} + + BigDecimal faltanteTotal = getFaltanteHistorico().add(getFaltanteSemana()); + + if (faltanteTotal.compareTo(BigDecimal.ZERO) > 0) { + + switch (recuperadoSemanaPorDia.compareTo(faltanteTotal)) { + case (-1): + return recuperadoSemanaPorDia; + case (0): + return recuperadoSemanaPorDia; + case (1): + return faltanteTotal; + + } + } else { + return BigDecimal.ZERO; + } + + return recuperadoSemanaPorDia; + + } + + public void setRecuperado(BigDecimal recuperado) { + this.recuperado = recuperado; + } + + public BigDecimal getFaltanteSemana() { + getId(); + + BigDecimal faltanteSemanaPorDia = BigDecimal.ZERO; + //if(id.equals("93ad8123-9b0d-4087-a85b-3216af2bacbf")){ + + if ((numPagosAll.subtract(numPagosWeek)).compareTo(BigDecimal.valueOf(22)) >= 0) { + + return faltanteSemanaPorDia; + + } + + if (renovationMonday.equalsIgnoreCase("Si")) { + return faltanteSemanaPorDia; + + } + if ((numPagosAll.subtract(numPagosWeek).add(BigDecimal.valueOf(1))).compareTo(BigDecimal.valueOf(22)) <= 0) { + if (movimientosMonday.equalsIgnoreCase("Si")) { + + if (feeMonday.compareTo(BigDecimal.ZERO) > 0) { + faltanteSemanaPorDia = ((abonoDiario.subtract(paymentMonday).compareTo(BigDecimal.ZERO)) > 0) ? faltanteSemanaPorDia.add(abonoDiario.subtract(paymentMonday)) : faltanteSemanaPorDia; + + } else if (paymentMonday.compareTo(BigDecimal.ZERO) == 0) { + + } else { + faltanteSemanaPorDia = ((abonoDiario.subtract(paymentMonday).compareTo(BigDecimal.ZERO)) > 0) ? faltanteSemanaPorDia.add(abonoDiario.subtract(paymentMonday)) : faltanteSemanaPorDia; + } + + } + } + + if (renovationTuesday.equalsIgnoreCase("Si")) { + return faltanteSemanaPorDia; + + } + + if ((numPagosAll.subtract(numPagosWeek).add(BigDecimal.valueOf(2))).compareTo(BigDecimal.valueOf(22)) <= 0) { + if (movimientosTuesday.equalsIgnoreCase("Si")) { + + if (feeTuesday.compareTo(BigDecimal.ZERO) > 0) { + faltanteSemanaPorDia = ((abonoDiario.subtract(paymentTuesday).compareTo(BigDecimal.ZERO)) > 0) ? faltanteSemanaPorDia.add(abonoDiario.subtract(paymentTuesday)) : faltanteSemanaPorDia; + + } else if (paymentTuesday.compareTo(BigDecimal.ZERO) == 0) { + + } else { + faltanteSemanaPorDia = ((abonoDiario.subtract(paymentTuesday).compareTo(BigDecimal.ZERO)) > 0) ? faltanteSemanaPorDia.add(abonoDiario.subtract(paymentTuesday)) : faltanteSemanaPorDia; + } + + } + } + + if (renovationWednesday.equalsIgnoreCase("Si")) { + return faltanteSemanaPorDia; + + } + if ((numPagosAll.subtract(numPagosWeek).add(BigDecimal.valueOf(3))).compareTo(BigDecimal.valueOf(22)) <= 0) { + if (movimientosWednesday.equalsIgnoreCase("Si")) { + + if (feeWednesday.compareTo(BigDecimal.ZERO) > 0) { + faltanteSemanaPorDia = ((abonoDiario.subtract(paymentWednesday).compareTo(BigDecimal.ZERO)) > 0) ? faltanteSemanaPorDia.add(abonoDiario.subtract(paymentWednesday)) : faltanteSemanaPorDia; + + } else if (paymentWednesday.compareTo(BigDecimal.ZERO) == 0) { + + } else { + faltanteSemanaPorDia = ((abonoDiario.subtract(paymentWednesday).compareTo(BigDecimal.ZERO)) > 0) ? faltanteSemanaPorDia.add(abonoDiario.subtract(paymentWednesday)) : faltanteSemanaPorDia; + } + + } + } + + if (renovationThursday.equalsIgnoreCase("Si")) { + return faltanteSemanaPorDia; + + } + if ((numPagosAll.subtract(numPagosWeek).add(BigDecimal.valueOf(4))).compareTo(BigDecimal.valueOf(22)) <= 0) { + if (movimientosThursday.equalsIgnoreCase("Si")) { + + if (feeThursday.compareTo(BigDecimal.ZERO) > 0) { + faltanteSemanaPorDia = ((abonoDiario.subtract(paymentThursday).compareTo(BigDecimal.ZERO)) > 0) ? faltanteSemanaPorDia.add(abonoDiario.subtract(paymentThursday)) : faltanteSemanaPorDia; + + } else if (paymentThursday.compareTo(BigDecimal.ZERO) == 0) { + + } else { + faltanteSemanaPorDia = ((abonoDiario.subtract(paymentThursday).compareTo(BigDecimal.ZERO)) > 0) ? faltanteSemanaPorDia.add(abonoDiario.subtract(paymentThursday)) : faltanteSemanaPorDia; + } + } + } + + if (renovationFriday.equalsIgnoreCase("Si")) { + return faltanteSemanaPorDia; + + } + if ((numPagosAll.subtract(numPagosWeek).add(BigDecimal.valueOf(5))).compareTo(BigDecimal.valueOf(22)) <= 0) { + if (movimientosFriday.equalsIgnoreCase("Si")) { + + if (feeFriday.compareTo(BigDecimal.ZERO) > 0) { + faltanteSemanaPorDia = ((abonoDiario.subtract(paymentFriday).compareTo(BigDecimal.ZERO)) > 0) ? faltanteSemanaPorDia.add(abonoDiario.subtract(paymentFriday)) : faltanteSemanaPorDia; + + } else if (paymentFriday.compareTo(BigDecimal.ZERO) == 0) { + + } else { + faltanteSemanaPorDia = ((abonoDiario.subtract(paymentFriday).compareTo(BigDecimal.ZERO)) > 0) ? faltanteSemanaPorDia.add(abonoDiario.subtract(paymentFriday)) : faltanteSemanaPorDia; + } + } + } + + if (renovationSaturday.equalsIgnoreCase("Si")) { + return faltanteSemanaPorDia; + + } + if ((numPagosAll.subtract(numPagosWeek).add(BigDecimal.valueOf(6))).compareTo(BigDecimal.valueOf(22)) <= 0) { + if (movimientosSaturday.equalsIgnoreCase("Si")) { + + if (feeSaturday.compareTo(BigDecimal.ZERO) > 0) { + faltanteSemanaPorDia = ((abonoDiario.subtract(paymentSaturday).compareTo(BigDecimal.ZERO)) > 0) ? faltanteSemanaPorDia.add(abonoDiario.subtract(paymentSaturday)) : faltanteSemanaPorDia; + + } else if (paymentSaturday.compareTo(BigDecimal.ZERO) == 0) { + + } else { + faltanteSemanaPorDia = ((abonoDiario.subtract(paymentSaturday).compareTo(BigDecimal.ZERO)) > 0) ? faltanteSemanaPorDia.add(abonoDiario.subtract(paymentSaturday)) : faltanteSemanaPorDia; + } + } + } + // } + + /* + if(getFaltanteHistorico().compareTo(BigDecimal.ZERO)<0) + { + BigDecimal faltanteHistoricoAbsoluto = getFaltanteHistorico().abs(); + switch(faltanteHistoricoAbsoluto.compareTo(faltanteSemanaPorDia)){ + case (-1): return faltanteSemanaPorDia.subtract(faltanteHistoricoAbsoluto); + case (0): return BigDecimal.ZERO; + case (1): return BigDecimal.ZERO; + } + }*/ + return faltanteSemanaPorDia; + } + + public void setFaltanteSemana(BigDecimal faltanteSemana) { + this.faltanteSemana = faltanteSemana; + } + + public String getNewCustomer() { + return newCustomer; + } + + public void setNewCustomer(String newCustomer) { + this.newCustomer = newCustomer; + } + + public String getRenovation() { + return renovation; + } + + public void setRenovation(String renovation) { + this.renovation = renovation; + } + + public String getConditionLunes() { + if (feeMonday.compareTo(BigDecimal.ZERO) > 0) { + return "redRow"; + } else if (paymentMonday.compareTo(BigDecimal.ZERO) == 0 && feeMonday.compareTo(BigDecimal.ZERO) == 0) { + return "greenRow"; + } else if (feeMonday.compareTo(BigDecimal.ZERO) == 0 && paymentMonday.compareTo(BigDecimal.ZERO) > 0 && (paymentMonday.compareTo(abonoDiario) < 0)) { + return "yellowRow"; + } else if (feeMonday.compareTo(BigDecimal.ZERO) == 0 && paymentMonday.compareTo(BigDecimal.ZERO) > 0 && (paymentMonday.compareTo(abonoDiario) > 0)) { + return "blueRow"; + } else { + return null; + } + } + + public String getConditionMartes() { + if (feeTuesday.compareTo(BigDecimal.ZERO) > 0) { + return "redRow"; + } else if (paymentTuesday.compareTo(BigDecimal.ZERO) == 0 && feeTuesday.compareTo(BigDecimal.ZERO) == 0) { + return "greenRow"; + } else if (feeTuesday.compareTo(BigDecimal.ZERO) == 0 && paymentTuesday.compareTo(BigDecimal.ZERO) > 0 && (paymentTuesday.compareTo(abonoDiario) < 0)) { + return "yellowRow"; + } else if (feeTuesday.compareTo(BigDecimal.ZERO) == 0 && paymentTuesday.compareTo(BigDecimal.ZERO) > 0 && (paymentTuesday.compareTo(abonoDiario) > 0)) { + return "blueRow"; + } else { + return null; + } + } + + public String getConditionMiercoles() { + if (feeWednesday.compareTo(BigDecimal.ZERO) > 0) { + return "redRow"; + } else if (paymentWednesday.compareTo(BigDecimal.ZERO) == 0 && feeWednesday.compareTo(BigDecimal.ZERO) == 0) { + return "greenRow"; + } else if (feeWednesday.compareTo(BigDecimal.ZERO) == 0 && paymentWednesday.compareTo(BigDecimal.ZERO) > 0 && (paymentWednesday.compareTo(abonoDiario) < 0)) { + return "yellowRow"; + } else if (feeWednesday.compareTo(BigDecimal.ZERO) == 0 && paymentWednesday.compareTo(BigDecimal.ZERO) > 0 && (paymentWednesday.compareTo(abonoDiario) > 0)) { + return "blueRow"; + } else { + return null; + } + } + + public String getConditionJueves() { + if (feeThursday.compareTo(BigDecimal.ZERO) > 0) { + return "redRow"; + } else if (paymentThursday.compareTo(BigDecimal.ZERO) == 0 && feeThursday.compareTo(BigDecimal.ZERO) == 0) { + return "greenRow"; + } else if (feeThursday.compareTo(BigDecimal.ZERO) == 0 && paymentThursday.compareTo(BigDecimal.ZERO) > 0 && (paymentThursday.compareTo(abonoDiario) < 0)) { + return "yellowRow"; + } else if (feeThursday.compareTo(BigDecimal.ZERO) == 0 && paymentThursday.compareTo(BigDecimal.ZERO) > 0 && (paymentThursday.compareTo(abonoDiario) > 0)) { + return "blueRow"; + } else { + return null; + } + } + + public String getConditionViernes() { + if (feeFriday.compareTo(BigDecimal.ZERO) > 0) { + return "redRow"; + } else if (paymentFriday.compareTo(BigDecimal.ZERO) == 0 && feeFriday.compareTo(BigDecimal.ZERO) == 0) { + return "greenRow"; + } else if (feeFriday.compareTo(BigDecimal.ZERO) == 0 && paymentFriday.compareTo(BigDecimal.ZERO) > 0 && (paymentFriday.compareTo(abonoDiario) < 0)) { + return "yellowRow"; + } else if (feeFriday.compareTo(BigDecimal.ZERO) == 0 && paymentFriday.compareTo(BigDecimal.ZERO) > 0 && (paymentFriday.compareTo(abonoDiario) > 0)) { + return "blueRow"; + } else if (feeSaturday.compareTo(BigDecimal.ZERO) == 0 && paymentSaturday.compareTo(BigDecimal.ZERO) > 0 && (paymentSaturday.compareTo(abonoDiario) > 0)) { + return "blueRow"; + } else { + return null; + } + } + + public String getConditionSabado() { + if (feeSaturday.compareTo(BigDecimal.ZERO) > 0) { + return "redRow"; + } else if (paymentSaturday.compareTo(BigDecimal.ZERO) == 0 && feeSaturday.compareTo(BigDecimal.ZERO) == 0) { + return "greenRow"; + } else if (feeSaturday.compareTo(BigDecimal.ZERO) == 0 && paymentSaturday.compareTo(BigDecimal.ZERO) > 0 && (paymentSaturday.compareTo(abonoDiario) < 0)) { + return "yellowRow"; + } else { + return null; + } + } + + public String getConditionNewCustomer() { + if (newCustomer.equalsIgnoreCase("Si")) { + return "greenRow"; + } else { + return null; + } + } + + public String getConditionRenovation() { + if (getFrozen().equals(ActiveStatus.ENEBLED)) { + return "blueLightRow"; + } + + if (newCustomer.equalsIgnoreCase("Si")) { + return "orangeRow"; + } else if (renovation.equalsIgnoreCase("Si")) { + return "greenLigthRow"; + } else if (getReactivation().equalsIgnoreCase("Si") && getWeekOfCreation().equalsIgnoreCase("Si")) { + return "limeGreenRow"; + } else if (getSaldoInsoluto().compareTo(BigDecimal.ZERO) == 0) { + return "greenStrongRow"; + } else { + return null; + } + + } + + public int getWeekLoanDate() { + Calendar c2 = Calendar.getInstance(); + c2.setTime(getFecha()); + int weekLoanDate = c2.get(Calendar.WEEK_OF_YEAR); + + return weekLoanDate; + } + + public int getWeekCurrentDate() { + Calendar c2 = Calendar.getInstance(); + int weekCurrentDate = c2.get(Calendar.WEEK_OF_YEAR); + + return weekCurrentDate; + } + + public BigDecimal getFeeSemana() { + + feeSemana = feeMonday.add(feeThursday).add(feeWednesday).add(feeTuesday).add(feeFriday).add(feeSaturday); + return feeSemana; + } + + public void setFeeSemana(BigDecimal feeSemana) { + this.feeSemana = feeSemana; + } + + public String getMovimientosMonday() { + return movimientosMonday; + } + + public void setMovimientosMonday(String movimientosMonday) { + this.movimientosMonday = movimientosMonday; + } + + public String getMovimientosTuesday() { + return movimientosTuesday; + } + + public void setMovimientosTuesday(String movimientosTuesday) { + this.movimientosTuesday = movimientosTuesday; + } + + public String getMovimientosWednesday() { + return movimientosWednesday; + } + + public void setMovimientosWednesday(String movimientosWednesday) { + this.movimientosWednesday = movimientosWednesday; + } + + public String getMovimientosThursday() { + return movimientosThursday; + } + + public void setMovimientosThursday(String movimientosThursday) { + this.movimientosThursday = movimientosThursday; + } + + public String getMovimientosFriday() { + return movimientosFriday; + } + + public void setMovimientosFriday(String movimientosFriday) { + this.movimientosFriday = movimientosFriday; + } + + public String getMovimientosSaturday() { + return movimientosSaturday; + } + + public void setMovimientosSaturday(String movimientosSaturday) { + this.movimientosSaturday = movimientosSaturday; + } + + public String getRenovationMonday() { + return renovationMonday; + } + + public void setRenovationMonday(String renovationMonday) { + this.renovationMonday = renovationMonday; + } + + public String getRenovationTuesday() { + return renovationTuesday; + } + + public void setRenovationTuesday(String renovationTuesday) { + this.renovationTuesday = renovationTuesday; + } + + public String getRenovationWednesday() { + return renovationWednesday; + } + + public void setRenovationWednesday(String renovationWednesday) { + this.renovationWednesday = renovationWednesday; + } + + public String getRenovationThursday() { + return renovationThursday; + } + + public void setRenovationThursday(String renovationThursday) { + this.renovationThursday = renovationThursday; + } + + public String getRenovationFriday() { + return renovationFriday; + } + + public void setRenovationFriday(String renovationFriday) { + this.renovationFriday = renovationFriday; + } + + public String getRenovationSaturday() { + return renovationSaturday; + } + + public void setRenovationSaturday(String renovationSaturday) { + this.renovationSaturday = renovationSaturday; + } + + public String getReactivation() { + + return reactivation; + } + + public void setReactivation(String reactivation) { + this.reactivation = reactivation; + } + + public String getWeekOfCreation() { + return weekOfCreation; + } + + public void setWeekOfCreation(String weekOfCreation) { + this.weekOfCreation = weekOfCreation; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/LoanApprovedDetailView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanApprovedDetailView.java new file mode 100644 index 0000000..f9bba34 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanApprovedDetailView.java @@ -0,0 +1,82 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_LOAN_APPROVED_DETAIL_VIEW") +public class LoanApprovedDetailView implements Serializable { + + private static final long serialVersionUID = 2303382936160293905L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "total_to_pay") + private BigDecimal totalToPay; + + @Column(name = "loan_amount_to_pay") + private BigDecimal loanAmountToPay; + + @Column(name = "total_fee") + private BigDecimal totalFee; + + public LoanApprovedDetailView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public BigDecimal getTotalToPay() { + return totalToPay; + } + + public void setTotalToPay(BigDecimal totalToPay) { + this.totalToPay = totalToPay; + } + + public BigDecimal getLoanAmountToPay() { + return loanAmountToPay; + } + + public void setLoanAmountToPay(BigDecimal loanAmountToPay) { + this.loanAmountToPay = loanAmountToPay; + } + + public BigDecimal getTotalFee() { + return totalFee; + } + + public void setTotalFee(BigDecimal totalFee) { + this.totalFee = totalFee; + } + + @Override + public String toString() { + return "LoanApprovedDetailView{" + "totalToPay=" + totalToPay + ", loanAmountToPay=" + loanAmountToPay + ", totalFee=" + totalFee + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/LoanByUserOrderPreferenceView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanByUserOrderPreferenceView.java new file mode 100644 index 0000000..c946334 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanByUserOrderPreferenceView.java @@ -0,0 +1,108 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_LOAN_BY_USER_ORDER_PREFERENCE_VIEW") +public class LoanByUserOrderPreferenceView implements Serializable { + + private static final long serialVersionUID = -349196411929756764L; + + @Id + @Column(name = "id", length = 72) + private String id; + + @Column(name = "user_id", length = 36) + private String userId; + + @Column(name = "customer_name") + private String customerName; + + @Column(name = "customer_address_home", length = 150) + private String customerAddressHome; + + @Column(name = "customer_address_business", length = 150) + private String customerAddressBusiness; + + @Column(name = "order_in_list") + private Integer orderInList; + + public LoanByUserOrderPreferenceView() { + } + + public LoanByUserOrderPreferenceView(String customerName, Integer orderInList) { + this.customerName = customerName; + this.orderInList = orderInList; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getCustomerAddressHome() { + return customerAddressHome; + } + + public void setCustomerAddressHome(String customerAddressHome) { + this.customerAddressHome = customerAddressHome; + } + + public String getCustomerAddressBusiness() { + return customerAddressBusiness; + } + + public void setCustomerAddressBusiness(String customerAddressBusiness) { + this.customerAddressBusiness = customerAddressBusiness; + } + + public Integer getOrderInList() { + return orderInList; + } + + public void setOrderInList(Integer orderInList) { + this.orderInList = orderInList; + } + + @Override + public String toString() { + return "LoanByUserOrderPreferenceView{" + "customerName=" + customerName + ", orderInList=" + orderInList + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/LoanByUserPaymentZeroView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanByUserPaymentZeroView.java new file mode 100644 index 0000000..6d84967 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanByUserPaymentZeroView.java @@ -0,0 +1,90 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.core.User; +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_LOAN_BY_USER_PAYMENT_ZERO_VIEW") +public class LoanByUserPaymentZeroView implements Serializable{ + + private static final long serialVersionUID = -6446049391530159926L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_user", + referencedColumnName = "id", + nullable = false + ) + private User user; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_customer", + referencedColumnName = "id", + nullable = false + ) + private People customer; + + @Column(name = "loan_comments") + private String comments; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public People getCustomer() { + return customer; + } + + public void setCustomer(People customer) { + this.customer = customer; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/LoanByUserView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanByUserView.java new file mode 100644 index 0000000..2210dfa --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanByUserView.java @@ -0,0 +1,322 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_LOAN_BY_USER_VIEW") +public class LoanByUserView implements Serializable { + + private static final long serialVersionUID = -6868707427254694418L; + + @Id + @Column(name = "id", length = 72) + private String id; + + @Column(name = "user_id", length = 36) + private String userId; + + @Column(name = "customer_name") + private String customerName; + + @Column(name = "customer_address_home", length = 150) + private String customerAddressHome; + + @Column(name = "customer_address_business", length = 150) + private String customerAddressBusiness; + + @Column(name = "company_name", length = 150) + private String companyName; + + @Column(name = "customer_thumbnail", length = 250) + private String customerThumbnail; + + @Column(name = "endorsement_name") + private String endorsementName; + + @Column(name = "endorsement_address_home", length = 150) + private String endorsementAddressHome; + + @Column(name = "endorsement_thumbnail", length = 250) + private String endorsementThumbnail; + + @Column(name = "endorsement_phone_home", length = 15) + private String endorsementPhoneHome; + + @Column(name = "payment_daily") + private BigDecimal paymentDaily; + + @Column(name = "loan_fee") + private BigDecimal loanFee; + + @Column(name = "order_in_list") + private Integer orderInList; + + @Column(name = "notification_number") + private Integer notificationNumber; + + @Column(name = "renovation") + private String renovation; + + @Column(name = "max_amount_to_pay") + private BigDecimal maxAmountToPay; + + @Column(name = "customer_phone_home", length = 15) + private String customerPhoneHome; + + @Transient + private boolean hasPaymentToday; + + @Transient + private String loanId; + + @Transient + private String currentOwner; + + @Transient + private boolean result; + + public LoanByUserView() { + } + + /** + * + * @param customerName + * @param customerAddressHome + * @param customerAddressBusiness + * @param companyName + * @param customerThumbnail + * @param endorsementName + * @param endorsementAddressHome + * @param endorsementThumbnail + * @param endorsementPhoneHome + * @param paymentDaily + * @param loanFee + * @param notificationNumber + * @param renovation + * @param maxAmountToPay + * @param hasPaymentToday + * @param loanId + * @param currentOwner + */ + public LoanByUserView(String customerName, String customerAddressHome, String customerAddressBusiness, String companyName, String customerThumbnail, String endorsementName, String endorsementAddressHome, String endorsementThumbnail, String endorsementPhoneHome, BigDecimal paymentDaily, BigDecimal loanFee, Integer notificationNumber, String renovation, BigDecimal maxAmountToPay, boolean hasPaymentToday, String loanId, String currentOwner) { + this.customerName = customerName; + this.customerAddressHome = customerAddressHome; + this.customerAddressBusiness = customerAddressBusiness; + this.companyName = companyName; + this.customerThumbnail = customerThumbnail; + this.endorsementName = endorsementName; + this.endorsementAddressHome = endorsementAddressHome; + this.endorsementThumbnail = endorsementThumbnail; + this.endorsementPhoneHome = endorsementPhoneHome; + this.paymentDaily = paymentDaily; + this.loanFee = loanFee; + this.notificationNumber = notificationNumber; + this.renovation = renovation; + this.maxAmountToPay = maxAmountToPay; + this.hasPaymentToday = hasPaymentToday; + this.result = true; + this.loanId = loanId; + this.currentOwner = currentOwner; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getCustomerAddressHome() { + return customerAddressHome; + } + + public void setCustomerAddressHome(String customerAddressHome) { + this.customerAddressHome = customerAddressHome; + } + + public String getCustomerAddressBusiness() { + return customerAddressBusiness; + } + + public void setCustomerAddressBusiness(String customerAddressBusiness) { + this.customerAddressBusiness = customerAddressBusiness; + } + + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public String getCustomerThumbnail() { + return customerThumbnail; + } + + public void setCustomerThumbnail(String customerThumbnail) { + this.customerThumbnail = customerThumbnail; + } + + public String getEndorsementName() { + return endorsementName; + } + + public void setEndorsementName(String endorsementName) { + this.endorsementName = endorsementName; + } + + public String getEndorsementAddressHome() { + return endorsementAddressHome; + } + + public void setEndorsementAddressHome(String endorsementAddressHome) { + this.endorsementAddressHome = endorsementAddressHome; + } + + public String getEndorsementThumbnail() { + return endorsementThumbnail; + } + + public void setEndorsementThumbnail(String endorsementThumbnail) { + this.endorsementThumbnail = endorsementThumbnail; + } + + public String getEndorsementPhoneHome() { + return endorsementPhoneHome; + } + + public void setEndorsementPhoneHome(String endorsementPhoneHome) { + this.endorsementPhoneHome = endorsementPhoneHome; + } + + public BigDecimal getPaymentDaily() { + return paymentDaily; + } + + public void setPaymentDaily(BigDecimal paymentDaily) { + this.paymentDaily = paymentDaily; + } + + public BigDecimal getLoanFee() { + return loanFee; + } + + public void setLoanFee(BigDecimal loanFee) { + this.loanFee = loanFee; + } + + public Integer getOrderInList() { + return orderInList; + } + + public void setOrderInList(Integer orderInList) { + this.orderInList = orderInList; + } + + public Integer getNotificationNumber() { + return notificationNumber; + } + + public void setNotificationNumber(Integer notificationNumber) { + this.notificationNumber = notificationNumber; + } + + public String getRenovation() { + return renovation; + } + + public void setRenovation(String renovation) { + this.renovation = renovation; + } + + public BigDecimal getMaxAmountToPay() { + return maxAmountToPay; + } + + public void setMaxAmountToPay(BigDecimal maxAmountToPay) { + this.maxAmountToPay = maxAmountToPay; + } + + public boolean isHasPaymentToday() { + return hasPaymentToday; + } + + public void setHasPaymentToday(boolean hasPaymentToday) { + this.hasPaymentToday = hasPaymentToday; + } + + public String getLoanId() { + return loanId; + } + + public void setLoanId(String loanId) { + this.loanId = loanId; + } + + public String getCurrentOwner() { + return currentOwner; + } + + public void setCurrentOwner(String currentOwner) { + this.currentOwner = currentOwner; + } + + public boolean isResult() { + return result; + } + + public void setResult(boolean result) { + this.result = result; + } + + public String getCustomerPhoneHome() { + return customerPhoneHome; + } + + public void setCustomerPhoneHome(String customerPhoneHome) { + this.customerPhoneHome = customerPhoneHome; + } + + @Override + public String toString() { + return "LoanByUserView{" + "customerName=" + customerName + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/LoanDetailZeroView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanDetailZeroView.java new file mode 100644 index 0000000..eb6a93f --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanDetailZeroView.java @@ -0,0 +1,127 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodríguez Huaracha + */ +@Entity +@Table(name = "APC_LOAN_DETAIL_ZERO_VIEW") +public class LoanDetailZeroView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "customer_name", length = 300) + private String customerName; + + @Column(name = "address_home", length = 300) + private String addressHome; + + @Column(name = "user_name", length = 300) + private String userName; + + @Column(name = "amount_to_pay", nullable = true) + private BigDecimal amountToPay; + + @Column(name = "id_loan_type", length = 36) + private String loanType; + + @Column(name = "payment", nullable = true) + private BigDecimal payment; + + @Column(name = "loan_comments", length = 200) + private String loanComments; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLoanType() { + return loanType; + } + + public void setLoanType(String loanType) { + this.loanType = loanType; + } + + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + public BigDecimal getAmountToPay() { + return amountToPay; + } + + public void setAmountToPay(BigDecimal amountToPay) { + this.amountToPay = amountToPay; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getAddressHome() { + return addressHome; + } + + public void setAddressHome(String addressHome) { + this.addressHome = addressHome; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getLoanComments() { + return loanComments; + } + + public void setLoanComments(String loanComments) { + this.loanComments = loanComments; + } + + + + @Override + public String toString() { + return ""; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/LoanDiferencesByUserLastWeekView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanDiferencesByUserLastWeekView.java new file mode 100644 index 0000000..bf37a9a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanDiferencesByUserLastWeekView.java @@ -0,0 +1,63 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_LOAN_DIFERENCES_BY_USER_LAST_WEEK_VIEW") +public class LoanDiferencesByUserLastWeekView implements Serializable { + + private static final long serialVersionUID = -8442702932177478721L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user") + private String idUser; + + @Column(name = "faltante") + private BigDecimal faltante; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public BigDecimal getFaltante() { + return faltante; + } + + public void setFaltante(BigDecimal faltante) { + this.faltante = faltante; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/LoanEmployeeAllDataView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanEmployeeAllDataView.java new file mode 100644 index 0000000..639ba15 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanEmployeeAllDataView.java @@ -0,0 +1,143 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Administrador + */ +@Entity +@Table(name = "APC_LOAN_EMPLOYEE_ALL_DATA_VIEW") +public class LoanEmployeeAllDataView implements Serializable { + + private static final long serialVersionUID = 1L; + + public LoanEmployeeAllDataView() { + } + + public LoanEmployeeAllDataView(String id, String name, String idUser, BigDecimal amountLoan, BigDecimal amountToPay, BigDecimal balance, Date createdOn) { + this.id = id; + this.name = name; + this.amountLoan = amountLoan; + this.amountToPay = amountToPay; + this.balance = balance; + this.createdOn = createdOn; + this.idUser = idUser; + } + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "name") + private String name; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "amount_loan", nullable = false) + private BigDecimal amountLoan; + + @Column(name = "amount_to_pay", nullable = false) + private BigDecimal amountToPay; + + @Column(name = "balance", nullable = false) + private BigDecimal balance; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Enumerated(EnumType.STRING) + @Column(name = "loan_employee_status", nullable = false) + private ActiveStatus loanEmployeeStatus; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdUser() { + return idUser; + } + + public void setIdIser(String idUser) { + this.idUser = idUser; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public BigDecimal getAmountLoan() { + return amountLoan; + } + + public void setAmountLoan(BigDecimal amountLoan) { + this.amountLoan = amountLoan; + } + + public BigDecimal getAmountToPay() { + return amountToPay; + } + + public void setAmountToPay(BigDecimal amountToPay) { + this.amountToPay = amountToPay; + } + + public BigDecimal getBalance() { + return balance; + } + + public void setBalance(BigDecimal balance) { + this.balance = balance; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public ActiveStatus getLoanEmployeeStatus() { + return loanEmployeeStatus; + } + + public void setLoanEmployeeStatus(ActiveStatus loanEmployeeStatus) { + this.loanEmployeeStatus = loanEmployeeStatus; + } + + @Override + public String toString() { + return "LoanEmployeeView{" + "id=" + id + ", name=" + name + "idUser=" + idUser + ", amountLoan=" + amountLoan + ", amountToPay=" + amountToPay + ", balance=" + balance + ", createdOn=" + createdOn + ", loanEmployeeStatus=" + loanEmployeeStatus + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/LoanEmployeeDetailAllDataView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanEmployeeDetailAllDataView.java new file mode 100644 index 0000000..3ec0bc6 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanEmployeeDetailAllDataView.java @@ -0,0 +1,114 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Administrador + */ +@Entity +@Table(name = "APC_LOAN_EMPLOYEE_DETAIL_ALL_DATA_VIEW") +public class LoanEmployeeDetailAllDataView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_loan", length = 36) + private String idLoan; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "payment_amount", nullable = false) + private BigDecimal paymentAmount; + + @Column(name = "reference_number", nullable = false) + private int referenceNumber; + + @Enumerated(EnumType.STRING) + @Column(name = "loan_employee_detail_status", nullable = false) + private ActiveStatus loanEmployeeDetailStatus; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdLoan() { + return idLoan; + } + + public void setIdLoan(String idLoan) { + this.idLoan = idLoan; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public BigDecimal getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(BigDecimal paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public int getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(int referenceNumber) { + this.referenceNumber = referenceNumber; + } + + public ActiveStatus getLoanEmployeeDetailStatus() { + return loanEmployeeDetailStatus; + } + + public void setLoanEmployeeDetailStatus(ActiveStatus loanEmployeeDetailStatus) { + this.loanEmployeeDetailStatus = loanEmployeeDetailStatus; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/LoanEmployeeView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanEmployeeView.java new file mode 100644 index 0000000..52051e6 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanEmployeeView.java @@ -0,0 +1,217 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.admin.ExpenseCompany; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Administrador + */ +@Entity +@Table(name = "APC_LOAN_EMPLOYEE_VIEW") +public class LoanEmployeeView implements Serializable { + + private static final long serialVersionUID = 1L; + + public LoanEmployeeView() { + } + + public LoanEmployeeView(String id, String name, String createdByName, String idUser, BigDecimal amountLoan, BigDecimal amountToPay, BigDecimal balance, BigDecimal totalAmountToPay, Date createdOn, int referenceNumber) { + this.id = id; + this.name = name; + this.amountLoan = amountLoan; + this.amountToPay = amountToPay; + this.balance = balance; + this.totalAmountToPay = totalAmountToPay; + this.createdOn = createdOn; + this.idUser = idUser; + this.referenceNumber = referenceNumber; + this.createdByName = createdByName; + } + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "name") + private String name; + + @Column(name = "created_by_name") + private String createdByName; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "amount_loan", nullable = false) + private BigDecimal amountLoan; + + @Column(name = "amount_to_pay", nullable = false) + private BigDecimal amountToPay; + + @Column(name = "balance", nullable = false) + private BigDecimal balance; + + @Column(name = "total_amount_to_pay", nullable = false) + private BigDecimal totalAmountToPay; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "reference_number") + private int referenceNumber; + + @Enumerated(EnumType.STRING) + @Column(name = "loan_employee_status", nullable = false) + private ActiveStatus loanEmployeeStatus; + + public ActiveStatus getLoanEmployeeStatus() { + return loanEmployeeStatus; + } + + public void setLoanEmployeeStatus(ActiveStatus loanEmployeeStatus) { + this.loanEmployeeStatus = loanEmployeeStatus; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdUser() { + return idUser; + } + + public void setIdIser(String idUser) { + this.idUser = idUser; + } + + public String getCreatedByName() { + return createdByName; + } + + public void setCreatedByName(String createdByName) { + this.createdByName = createdByName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public BigDecimal getAmountLoan() { + return amountLoan; + } + + public void setAmountLoan(BigDecimal amountLoan) { + this.amountLoan = amountLoan; + } + + public BigDecimal getAmountToPay() { + return amountToPay; + } + + public void setAmountToPay(BigDecimal amountToPay) { + this.amountToPay = amountToPay; + } + + public BigDecimal getBalance() { + return balance; + } + + public void setBalance(BigDecimal balance) { + this.balance = balance; + } + + public BigDecimal getTotalAmountToPay() { + return totalAmountToPay; + } + + public void setTotalAmountToPay(BigDecimal totalAmountToPay) { + this.totalAmountToPay = totalAmountToPay; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public int getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(int referenceNumber) { + this.referenceNumber = referenceNumber; + } + + public String conditionEnabled() { + if (getLoanEmployeeStatus() == ActiveStatus.DISABLED) { + return "grayRow"; + } else { + return null; + } + } + + public boolean getActive() { + if (loanEmployeeStatus == ActiveStatus.ENEBLED) { + return true; + } else { + return false; + } + } + + public boolean getAction(Date lastStableGeneralBox) { + Date date = createdOn; + boolean action = true; + try { + SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd"); + + String dateStr = dt1.format(date); + date = dt1.parse(dateStr); + + action = date.after(lastStableGeneralBox); + + } catch (ParseException ex) { + Logger.getLogger(ExpenseCompany.class.getName()).log(Level.SEVERE, null, ex); + } + return action; + } + + @Override + public String toString() { + return "LoanEmployeeView{" + "id=" + id + ", name=" + name + "idUser=" + idUser + ", amountLoan=" + amountLoan + ", amountToPay=" + amountToPay + ", balance=" + balance + ", createdOn=" + createdOn + ", referenceNumber=" + referenceNumber + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/LoanFinishedView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanFinishedView.java new file mode 100644 index 0000000..409fc92 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanFinishedView.java @@ -0,0 +1,168 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.enums.CustomerClassification; +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodríguez Huaracha + */ +@Entity +@Table(name = "APC_LOAN_FINISHED_VIEW") +public class LoanFinishedView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "customer_id", length = 36) + private String customerId; + + @Column(name = "customer_name", length = 300) + private String customerName; + + @Column(name = "address_home", length = 300) + private String addressHome; + + @Column(name = "classification", length = 10) + private String classification; + + @Column(name = "user_name", length = 300) + private String userName; + + @Column(name = "amount_to_pay", nullable = true) + private BigDecimal amountToPay; + + @Column(name = "loan_status", length = 10) + private String loan_status; + + @Column(name = "id_loan_type", length = 36) + private String loanType; + + @Column(name = "payment", nullable = true) + private BigDecimal payment; + + @Column(name = "comments", length = 200) + private String loanComments; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLoanType() { + return loanType; + } + + public void setLoanType(String loanType) { + this.loanType = loanType; + } + + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + public BigDecimal getAmountToPay() { + return amountToPay; + } + + public void setAmountToPay(BigDecimal amountToPay) { + this.amountToPay = amountToPay; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getAddressHome() { + return addressHome; + } + + public void setAddressHome(String addressHome) { + this.addressHome = addressHome; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getLoanComments() { + return loanComments; + } + + public void setLoanComments(String loanComments) { + this.loanComments = loanComments; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getClassification() { + return classification; + } + + public void setClassification(String classification) { + this.classification = classification; + } + + public String getLoan_status() { + return loan_status; + } + + public void setLoan_status(String loan_status) { + this.loan_status = loan_status; + } + + @Override + public String toString() { + return ""; + } + + public String conditionStyle() + { + if(getClassification().equals(CustomerClassification.RED.getValue())) + return "redRow"; + else if(getClassification().equals(CustomerClassification.YELLOW.getValue())) + return "yellowRow"; + return null; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/LoanInPendingStatusToDeliveryView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanInPendingStatusToDeliveryView.java new file mode 100644 index 0000000..183096b --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanInPendingStatusToDeliveryView.java @@ -0,0 +1,162 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.util.Date; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_LOAN_IN_PENDING_STATUS_TO_DELIVERY_VIEW") +public class LoanInPendingStatusToDeliveryView implements Serializable { + + private static final long serialVersionUID = 6435962914845336418L; + + @Id + @Column(name = "id_loan", length = 36) + private String idLoan; + + @Column(name = "payment") + private Double payment; + + @Column(name = "str_created_on", length = 22) + private String strCreatedOn; + + @Column(name = "customer_name", length = 103) + private String customerName; + + @Column(name = "endorsement_name", length = 103) + private String endorsementName; + + @Column(name = "user_name", length = 103) + private String userName; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + /** + * + */ + public LoanInPendingStatusToDeliveryView() { + } + + /** + * + * @param idLoan + * @param payment + * @param strCreatedOn + * @param customerName + * @param endorsementName + * @param userName + * @param createdOn + */ + public LoanInPendingStatusToDeliveryView(String idLoan, Double payment, String strCreatedOn, String customerName, String endorsementName, String userName, Date createdOn) { + this.idLoan = idLoan; + this.payment = payment; + this.strCreatedOn = strCreatedOn; + this.customerName = customerName; + this.endorsementName = endorsementName; + this.userName = userName; + this.createdOn = createdOn; + } + + public String getIdLoan() { + return idLoan; + } + + public void setIdLoan(String idLoan) { + this.idLoan = idLoan; + } + + public Double getPayment() { + return payment; + } + + public void setPayment(Double payment) { + this.payment = payment; + } + + public String getStrCreatedOn() { + return strCreatedOn; + } + + public void setStrCreatedOn(String strCreatedOn) { + this.strCreatedOn = strCreatedOn; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getEndorsementName() { + return endorsementName; + } + + public void setEndorsementName(String endorsementName) { + this.endorsementName = endorsementName; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + @Override + public int hashCode() { + int hash = 5; + hash = 41 * hash + Objects.hashCode(this.idLoan); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final LoanInPendingStatusToDeliveryView other = (LoanInPendingStatusToDeliveryView) obj; + if (!Objects.equals(this.idLoan, other.idLoan)) { + return false; + } + return true; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/LoanRenovationDeliveryWeeklyView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanRenovationDeliveryWeeklyView.java new file mode 100644 index 0000000..7798b39 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanRenovationDeliveryWeeklyView.java @@ -0,0 +1,221 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.core.Office; +import java.io.Serializable; +import java.util.Date; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Temporal; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_LOAN_RENOVATION_DELIVERY_WEEKLY_VIEW") +public class LoanRenovationDeliveryWeeklyView implements Serializable { + + private static final long serialVersionUID = 3731003393000465083L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user", length = 36) + private String id_user; + + @Column(name = "user_name") + private String userName; + + @Column(name = "customer_name") + private String customerName; + + @Column(name = "loan_status") + private String loasStatus; + + @Column(name = "amount_loan") + private String amountLoan; + + @Column(name = "amount_to_pay") + private String amountToPay; + + @Column(name = "amount_paid") + private String amountPaid; + + @Column(name = "saldo_insoluto") + private String saldoInsoluto; + + @Column(name = "route_name") + private String routeName; + + @Column(name = "payment_daily") + private String paymentDaily; + + @Column(name = "num_pagos_all") + private String numPagosAll; + + @Column(name = "num_fee") + private String numFee; + + @Column(name = "renovation") + private String renovation; + + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getId_user() { + return id_user; + } + + public void setId_user(String id_user) { + this.id_user = id_user; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getLoasStatus() { + return loasStatus; + } + + public void setLoasStatus(String loasStatus) { + this.loasStatus = loasStatus; + } + + public String getAmountToPay() { + return amountToPay; + } + + public void setAmountToPay(String amountToPay) { + this.amountToPay = amountToPay; + } + + public String getAmountPaid() { + return amountPaid; + } + + public void setAmountPaid(String amountPaid) { + this.amountPaid = amountPaid; + } + + public String getSaldoInsoluto() { + return saldoInsoluto; + } + + public void setSaldoInsoluto(String saldoInsoluto) { + this.saldoInsoluto = saldoInsoluto; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public String getPaymentDaily() { + return paymentDaily; + } + + public void setPaymentDaily(String paymentDaily) { + this.paymentDaily = paymentDaily; + } + + public String getNumPagosAll() { + return numPagosAll; + } + + public void setNumPagosAll(String numPagosAll) { + this.numPagosAll = numPagosAll; + } + + public String getNumFee() { + return numFee; + } + + public void setNumFee(String numFee) { + this.numFee = numFee; + } + + public String getAmountLoan() { + return amountLoan; + } + + public void setAmountLoan(String amountLoan) { + this.amountLoan = amountLoan; + } + + public String getRenovation() { + return renovation; + } + + public void setRenovation(String renovation) { + this.renovation = renovation; + } + + + + + + @Override + public int hashCode() { + int hash = 7; + hash = 61 * hash + Objects.hashCode(this.id); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final LoanRenovationDeliveryWeeklyView other = (LoanRenovationDeliveryWeeklyView) obj; + if (!Objects.equals(this.id, other.id)) { + return false; + } + return true; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/LoanToDeliveryByCertifierView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanToDeliveryByCertifierView.java new file mode 100644 index 0000000..33ec5ac --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/LoanToDeliveryByCertifierView.java @@ -0,0 +1,197 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_LOAN_TO_DELIVERY_BY_CERTIFIER_VIEW") +public class LoanToDeliveryByCertifierView implements Serializable { + + private static final long serialVersionUID = 8450662914845336486L; + + @Id + @Column(name = "id_loan", length = 36) + private String id; + + @Id + @Column(name = "id_old_loan", length = 36) + private String idOldLoan; + + @Column(name = "id_user", length = 36) + private String userId; + + @Column(name = "customer_name", length = 51) + private String customerName; + + @Column(name = "customer_address", length = 150) + private String customerAddress; + + @Column(name = "thumbnail", length = 250) + private String thumbnail; + + @Column(name = "icon", length = 5) + private String icon; + + @Column(name = "amount_to_delivery") + private BigDecimal amountToDelivery; + + @Column(name = "discount") + private BigDecimal discount; + + @Column(name = "opening") + private Integer opening; + + @Column(name = "payment") + private BigDecimal payment; + + @Column(name = "total_last_loan") + private BigDecimal totalLastLoan; + + public LoanToDeliveryByCertifierView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdOldLoan() { + return idOldLoan; + } + + public void setIdOldLoan(String idOldLoan) { + this.idOldLoan = idOldLoan; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getCustomerAddress() { + return customerAddress; + } + + public void setCustomerAddress(String customerAddress) { + this.customerAddress = customerAddress; + } + + public String getThumbnail() { + return thumbnail; + } + + public void setThumbnail(String thumbnail) { + this.thumbnail = thumbnail; + } + + public String getIcon() { + return icon; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public BigDecimal getAmountToDelivery() { + return amountToDelivery; + } + + public void setAmountToDelivery(BigDecimal amountToDelivery) { + this.amountToDelivery = amountToDelivery; + } + + public BigDecimal getDiscount() { + return discount; + } + + public void setDiscount(BigDecimal discount) { + this.discount = discount; + } + + public Integer getOpening() { + return opening; + } + + public void setOpening(Integer opening) { + this.opening = opening; + } + + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + public BigDecimal getTotalLastLoan() { + return totalLastLoan; + } + + public void setTotalLastLoan(BigDecimal totalLastLoan) { + this.totalLastLoan = totalLastLoan; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 59 * hash + Objects.hashCode(this.id); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final LoanToDeliveryByCertifierView other = (LoanToDeliveryByCertifierView) obj; + if (!Objects.equals(this.id, other.id)) { + return false; + } + return true; + } + + @Override + public String toString() { + return "LoanToDeliveryByCertifierView{" + "customerName=" + customerName + ", icon=" + icon + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/MoneyDailyByUserCertifier.java b/ace-model/src/main/java/com/arrebol/apc/model/views/MoneyDailyByUserCertifier.java new file mode 100644 index 0000000..bb2fc97 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/MoneyDailyByUserCertifier.java @@ -0,0 +1,88 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_MONEY_DAILY_BY_USER_CERTIFIER_VIEW") +public class MoneyDailyByUserCertifier implements Serializable{ + + private static final long serialVersionUID = -6757597615364853923L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_office") + private String idOffice; + + @Column(name = "user_name") + private String userName; + + @Column(name = "employee") + private String employee; + + @Column(name = "amount") + private BigDecimal amount; + + public MoneyDailyByUserCertifier() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdOffice() { + return idOffice; + } + + public void setIdOffice(String idOffice) { + this.idOffice = idOffice; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getEmployee() { + return employee; + } + + public void setEmployee(String employee) { + this.employee = employee; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/PaymentDetailFromUserByCurdateView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/PaymentDetailFromUserByCurdateView.java new file mode 100644 index 0000000..19a7312 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/PaymentDetailFromUserByCurdateView.java @@ -0,0 +1,97 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.enums.LoanDetailsType; +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_PAYMENT_DETAILS_FROM_USER_BY_CURDATE_VIEW") +public class PaymentDetailFromUserByCurdateView implements Serializable { + + private static final long serialVersionUID = 7069230798097192215L; + + @Id + @Column(name = "id_loan_detail", length = 36) + private String id; + + @Column(name = "customer_name", length = 103) + private String customerName; + + @Column(name = "payment_amount") + private BigDecimal amount; + + @Enumerated(EnumType.STRING) + @Column(name = "loan_details_type") + private LoanDetailsType loanDetailsType; + + @Column(name = "user_id", length = 36) + private String userId; + + public PaymentDetailFromUserByCurdateView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public LoanDetailsType getLoanDetailsType() { + return loanDetailsType; + } + + public void setLoanDetailsType(LoanDetailsType loanDetailsType) { + this.loanDetailsType = loanDetailsType; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + @Override + public String toString() { + return "PaymentDetailFromUserByCurdateView{" + "customerName=" + customerName + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/PersonSearchDetailView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/PersonSearchDetailView.java new file mode 100644 index 0000000..1a5acf2 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/PersonSearchDetailView.java @@ -0,0 +1,81 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_PERSON_SEARCH_DETAIL_VIEW") +public class PersonSearchDetailView implements Serializable { + + private static final long serialVersionUID = 4608137238616026580L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "person_search", length = 103) + private String personSearch; + + @Column(name = "thumbnail", length = 250) + private String thumbnail; + + @Column(name = "loanStatus", length = 8) + private String loanStatus; + + public PersonSearchDetailView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPersonSearch() { + return personSearch; + } + + public void setPersonSearch(String personSearch) { + this.personSearch = personSearch; + } + + public String getThumbnail() { + return thumbnail; + } + + public void setThumbnail(String thumbnail) { + this.thumbnail = thumbnail; + } + + public String getLoanStatus() { + return loanStatus; + } + + public void setLoanStatus(String loanStatus) { + this.loanStatus = loanStatus; + } + + @Override + public String toString() { + return "PersonSearchDetailView{" + "personSearch=" + personSearch + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/PersonSearchHistoricalDetailsView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/PersonSearchHistoricalDetailsView.java new file mode 100644 index 0000000..4f7165a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/PersonSearchHistoricalDetailsView.java @@ -0,0 +1,147 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_PERSON_SEARCH_HISTORICAL_DETAILS_VIEW") +public class PersonSearchHistoricalDetailsView implements Serializable { + + private static final long serialVersionUID = 6263674846643349142L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_person_search", length = 36) + private String personSearchId; + + @Column(name = "format_date", length = 10) + private String createdOn; + + @Column(name = "person_type", length = 7) + private String personType; + + @Column(name = "relationship", length = 51) + private String relationShip; + + @Column(name = "loan") + private Double loan; + + @Column(name = "payment_number", length = 8) + private String paymentNumber; + + @Column(name = "amount_to_pay") + private Double amountToPay; + + @Column(name = "total_fees", length = 2) + private String totalFees; + + @Column(name = "loan_status", length = 25) + private String status; + + public PersonSearchHistoricalDetailsView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPersonSearchId() { + return personSearchId; + } + + public void setPersonSearchId(String personSearchId) { + this.personSearchId = personSearchId; + } + + public String getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(String createdOn) { + this.createdOn = createdOn; + } + + public String getPersonType() { + return personType; + } + + public void setPersonType(String personType) { + this.personType = personType; + } + + public String getRelationShip() { + return relationShip; + } + + public void setRelationShip(String relationShip) { + this.relationShip = relationShip; + } + + public Double getLoan() { + return loan; + } + + public void setLoan(Double loan) { + this.loan = loan; + } + + public String getPaymentNumber() { + return paymentNumber; + } + + public void setPaymentNumber(String paymentNumber) { + this.paymentNumber = paymentNumber; + } + + public Double getAmountToPay() { + return amountToPay; + } + + public void setAmountToPay(Double amountToPay) { + this.amountToPay = amountToPay; + } + + public String getTotalFees() { + return totalFees; + } + + public void setTotalFees(String totalFees) { + this.totalFees = totalFees; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public String toString() { + return "PersonSearchHistoricalDetailsView{" + "createdOn=" + createdOn + ", personType=" + personType + ", status=" + status + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/PersonSearchView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/PersonSearchView.java new file mode 100644 index 0000000..6c56924 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/PersonSearchView.java @@ -0,0 +1,64 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_PERSON_SEARCH_VIEW") +public class PersonSearchView implements Serializable { + + private static final long serialVersionUID = 8659713229201178299L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "person_search", length = 103) + private String personSearch; + + public PersonSearchView() { + } + + public PersonSearchView(String id, String personSearch) { + this.id = id; + this.personSearch = personSearch; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPersonSearch() { + return personSearch; + } + + public void setPersonSearch(String personSearch) { + this.personSearch = personSearch; + } + + @Override + public String toString() { + return "PersonSearchView{" + "personSearch=" + personSearch + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/ResumeNewCustomerLastWeekView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/ResumeNewCustomerLastWeekView.java new file mode 100644 index 0000000..ad593d6 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/ResumeNewCustomerLastWeekView.java @@ -0,0 +1,73 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author David Rodríguez Huaracha + */ +@Entity +@Immutable +@Table(name = "APC_LOAN_NEW_CUSTOMER_LAST_WEEK_VIEW") +public class ResumeNewCustomerLastWeekView implements Serializable{ + + private static final long serialVersionUID = -6384789811291615117L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "name") + private String name; + + @Column(name = "new_customer") + private int newCustomer; + + @Column(name = "total_new_customer") + private BigDecimal totalNewCustomer; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getNewCustomer() { + return newCustomer; + } + + public void setNewCustomer(int newCustomer) { + this.newCustomer = newCustomer; + } + + public BigDecimal getTotalNewCustomer() { + return totalNewCustomer; + } + + public void setTotalNewCustomer(BigDecimal totalNewCustomer) { + this.totalNewCustomer = totalNewCustomer; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/ResumeNewCustomerWeekView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/ResumeNewCustomerWeekView.java new file mode 100644 index 0000000..a96cd3d --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/ResumeNewCustomerWeekView.java @@ -0,0 +1,73 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author David Rodríguez Huaracha + */ +@Entity +@Immutable +@Table(name = "APC_LOAN_NEW_CUSTOMER_WEEK_VIEW") +public class ResumeNewCustomerWeekView implements Serializable{ + + private static final long serialVersionUID = -6384789811291615117L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "name") + private String name; + + @Column(name = "new_customer") + private int newCustomer; + + @Column(name = "total_new_customer") + private BigDecimal totalNewCustomer; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getNewCustomer() { + return newCustomer; + } + + public void setNewCustomer(int newCustomer) { + this.newCustomer = newCustomer; + } + + public BigDecimal getTotalNewCustomer() { + return totalNewCustomer; + } + + public void setTotalNewCustomer(BigDecimal totalNewCustomer) { + this.totalNewCustomer = totalNewCustomer; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/ResumenInOutLastWeekByUserView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/ResumenInOutLastWeekByUserView.java new file mode 100644 index 0000000..0a728b8 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/ResumenInOutLastWeekByUserView.java @@ -0,0 +1,285 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.core.Office; +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_RESUMEN_IN_OUT_LAST_WEEK_BY_USER_VIEW") +public class ResumenInOutLastWeekByUserView implements Serializable{ + + private static final long serialVersionUID = 3055231364366461069L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "username") + private String userName; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "closing_monday") + private BigDecimal closingMonday; + + @Column(name = "expense_monday") + private BigDecimal expenseMonday; + + @Column(name = "money_daily_today_monday") + private BigDecimal moneyDailyTodayMonday; + + @Column(name = "closing_tuesday") + private BigDecimal closingTuesday; + + @Column(name = "expense_tuesday") + private BigDecimal expenseTuesday; + + @Column(name = "money_daily_today_tuesday") + private BigDecimal moneyDailyTodayTuesday; + + @Column(name = "closing_wednesday") + private BigDecimal closingWednesday; + + @Column(name = "expense_wednesday") + private BigDecimal expenseWednesday; + + @Column(name = "money_daily_today_wednesday") + private BigDecimal moneyDailyTodayWednesday; + + @Column(name = "closing_thursday") + private BigDecimal closingThursday; + + @Column(name = "expense_thursday") + private BigDecimal expenseThursday; + + @Column(name = "money_daily_today_thursday") + private BigDecimal moneyDailyTodayThursday; + + @Column(name = "closing_friday") + private BigDecimal closingFriday; + + @Column(name = "expense_friday") + private BigDecimal expenseFriday; + + @Column(name = "money_daily_today_friday") + private BigDecimal moneyDailyTodayFriday; + + @Column(name = "closing_saturday") + private BigDecimal closingSaturday; + + @Column(name = "expense_saturday") + private BigDecimal expenseSaturday; + + @Column(name = "money_daily_today_saturday") + private BigDecimal moneyDailyTodaySaturday; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getClosingMonday() { + return closingMonday; + } + + public void setClosingMonday(BigDecimal closingMonday) { + this.closingMonday = closingMonday; + } + + public BigDecimal getExpenseMonday() { + return expenseMonday; + } + + public void setExpenseMonday(BigDecimal expenseMonday) { + this.expenseMonday = expenseMonday; + } + + public BigDecimal getMoneyDailyTodayMonday() { + return moneyDailyTodayMonday; + } + + public void setMoneyDailyTodayMonday(BigDecimal moneyDailyTodayMonday) { + this.moneyDailyTodayMonday = moneyDailyTodayMonday; + } + + public BigDecimal getClosingTuesday() { + return closingTuesday; + } + + public void setClosingTuesday(BigDecimal closingTuesday) { + this.closingTuesday = closingTuesday; + } + + public BigDecimal getExpenseTuesday() { + return expenseTuesday; + } + + public void setExpenseTuesday(BigDecimal expenseTuesday) { + this.expenseTuesday = expenseTuesday; + } + + public BigDecimal getMoneyDailyTodayTuesday() { + return moneyDailyTodayTuesday; + } + + public void setMoneyDailyTodayTuesday(BigDecimal moneyDailyTodayTuesday) { + this.moneyDailyTodayTuesday = moneyDailyTodayTuesday; + } + + public BigDecimal getClosingWednesday() { + return closingWednesday; + } + + public void setClosingWednesday(BigDecimal closingWednesday) { + this.closingWednesday = closingWednesday; + } + + public BigDecimal getExpenseWednesday() { + return expenseWednesday; + } + + public void setExpenseWednesday(BigDecimal expenseWednesday) { + this.expenseWednesday = expenseWednesday; + } + + public BigDecimal getMoneyDailyTodayWednesday() { + return moneyDailyTodayWednesday; + } + + public void setMoneyDailyTodayWednesday(BigDecimal moneyDailyTodayWednesday) { + this.moneyDailyTodayWednesday = moneyDailyTodayWednesday; + } + + public BigDecimal getClosingThursday() { + return closingThursday; + } + + public void setClosingThursday(BigDecimal closingThursday) { + this.closingThursday = closingThursday; + } + + public BigDecimal getExpenseThursday() { + return expenseThursday; + } + + public void setExpenseThursday(BigDecimal expenseThursday) { + this.expenseThursday = expenseThursday; + } + + public BigDecimal getMoneyDailyTodayThursday() { + return moneyDailyTodayThursday; + } + + public void setMoneyDailyTodayThursday(BigDecimal moneyDailyTodayThursday) { + this.moneyDailyTodayThursday = moneyDailyTodayThursday; + } + + public BigDecimal getClosingFriday() { + return closingFriday; + } + + public void setClosingFriday(BigDecimal closingFriday) { + this.closingFriday = closingFriday; + } + + public BigDecimal getExpenseFriday() { + return expenseFriday; + } + + public void setExpenseFriday(BigDecimal expenseFriday) { + this.expenseFriday = expenseFriday; + } + + public BigDecimal getMoneyDailyTodayFriday() { + return moneyDailyTodayFriday; + } + + public void setMoneyDailyTodayFriday(BigDecimal moneyDailyTodayFriday) { + this.moneyDailyTodayFriday = moneyDailyTodayFriday; + } + + public BigDecimal getClosingSaturday() { + return closingSaturday; + } + + public void setClosingSaturday(BigDecimal closingSaturday) { + this.closingSaturday = closingSaturday; + } + + public BigDecimal getExpenseSaturday() { + return expenseSaturday; + } + + public void setExpenseSaturday(BigDecimal expenseSaturday) { + this.expenseSaturday = expenseSaturday; + } + + public BigDecimal getMoneyDailyTodaySaturday() { + return moneyDailyTodaySaturday; + } + + public void setMoneyDailyTodaySaturday(BigDecimal moneyDailyTodaySaturday) { + this.moneyDailyTodaySaturday = moneyDailyTodaySaturday; + } + + public BigDecimal getTotalInicios() { + return moneyDailyTodayMonday.add(moneyDailyTodayThursday).add(moneyDailyTodayWednesday). + add(moneyDailyTodayTuesday).add(moneyDailyTodayFriday).add(moneyDailyTodaySaturday); + } + + public BigDecimal getTotalGastos() { + return expenseMonday.add(expenseThursday).add(expenseWednesday). + add(expenseTuesday).add(expenseFriday).add(expenseSaturday); + } + + public BigDecimal getTotalCortes() { + return closingMonday.add(closingThursday).add(closingWednesday). + add(closingTuesday).add(closingFriday).add(closingSaturday); + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/ResumenInOutWeekByUserView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/ResumenInOutWeekByUserView.java new file mode 100644 index 0000000..940c1b2 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/ResumenInOutWeekByUserView.java @@ -0,0 +1,284 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.core.Office; +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_RESUMEN_IN_OUT_WEEK_BY_USER_VIEW") +public class ResumenInOutWeekByUserView implements Serializable{ + + private static final long serialVersionUID = 3055231364366461069L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "username") + private String userName; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "closing_monday") + private BigDecimal closingMonday; + + @Column(name = "expense_monday") + private BigDecimal expenseMonday; + + @Column(name = "money_daily_today_monday") + private BigDecimal moneyDailyTodayMonday; + + @Column(name = "closing_tuesday") + private BigDecimal closingTuesday; + + @Column(name = "expense_tuesday") + private BigDecimal expenseTuesday; + + @Column(name = "money_daily_today_tuesday") + private BigDecimal moneyDailyTodayTuesday; + + @Column(name = "closing_wednesday") + private BigDecimal closingWednesday; + + @Column(name = "expense_wednesday") + private BigDecimal expenseWednesday; + + @Column(name = "money_daily_today_wednesday") + private BigDecimal moneyDailyTodayWednesday; + + @Column(name = "closing_thursday") + private BigDecimal closingThursday; + + @Column(name = "expense_thursday") + private BigDecimal expenseThursday; + + @Column(name = "money_daily_today_thursday") + private BigDecimal moneyDailyTodayThursday; + + @Column(name = "closing_friday") + private BigDecimal closingFriday; + + @Column(name = "expense_friday") + private BigDecimal expenseFriday; + + @Column(name = "money_daily_today_friday") + private BigDecimal moneyDailyTodayFriday; + + @Column(name = "closing_saturday") + private BigDecimal closingSaturday; + + @Column(name = "expense_saturday") + private BigDecimal expenseSaturday; + + @Column(name = "money_daily_today_saturday") + private BigDecimal moneyDailyTodaySaturday; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getClosingMonday() { + return closingMonday; + } + + public void setClosingMonday(BigDecimal closingMonday) { + this.closingMonday = closingMonday; + } + + public BigDecimal getExpenseMonday() { + return expenseMonday; + } + + public void setExpenseMonday(BigDecimal expenseMonday) { + this.expenseMonday = expenseMonday; + } + + public BigDecimal getMoneyDailyTodayMonday() { + return moneyDailyTodayMonday; + } + + public void setMoneyDailyTodayMonday(BigDecimal moneyDailyTodayMonday) { + this.moneyDailyTodayMonday = moneyDailyTodayMonday; + } + + public BigDecimal getClosingTuesday() { + return closingTuesday; + } + + public void setClosingTuesday(BigDecimal closingTuesday) { + this.closingTuesday = closingTuesday; + } + + public BigDecimal getExpenseTuesday() { + return expenseTuesday; + } + + public void setExpenseTuesday(BigDecimal expenseTuesday) { + this.expenseTuesday = expenseTuesday; + } + + public BigDecimal getMoneyDailyTodayTuesday() { + return moneyDailyTodayTuesday; + } + + public void setMoneyDailyTodayTuesday(BigDecimal moneyDailyTodayTuesday) { + this.moneyDailyTodayTuesday = moneyDailyTodayTuesday; + } + + public BigDecimal getClosingWednesday() { + return closingWednesday; + } + + public void setClosingWednesday(BigDecimal closingWednesday) { + this.closingWednesday = closingWednesday; + } + + public BigDecimal getExpenseWednesday() { + return expenseWednesday; + } + + public void setExpenseWednesday(BigDecimal expenseWednesday) { + this.expenseWednesday = expenseWednesday; + } + + public BigDecimal getMoneyDailyTodayWednesday() { + return moneyDailyTodayWednesday; + } + + public void setMoneyDailyTodayWednesday(BigDecimal moneyDailyTodayWednesday) { + this.moneyDailyTodayWednesday = moneyDailyTodayWednesday; + } + + public BigDecimal getClosingThursday() { + return closingThursday; + } + + public void setClosingThursday(BigDecimal closingThursday) { + this.closingThursday = closingThursday; + } + + public BigDecimal getExpenseThursday() { + return expenseThursday; + } + + public void setExpenseThursday(BigDecimal expenseThursday) { + this.expenseThursday = expenseThursday; + } + + public BigDecimal getMoneyDailyTodayThursday() { + return moneyDailyTodayThursday; + } + + public void setMoneyDailyTodayThursday(BigDecimal moneyDailyTodayThursday) { + this.moneyDailyTodayThursday = moneyDailyTodayThursday; + } + + public BigDecimal getClosingFriday() { + return closingFriday; + } + + public void setClosingFriday(BigDecimal closingFriday) { + this.closingFriday = closingFriday; + } + + public BigDecimal getExpenseFriday() { + return expenseFriday; + } + + public void setExpenseFriday(BigDecimal expenseFriday) { + this.expenseFriday = expenseFriday; + } + + public BigDecimal getMoneyDailyTodayFriday() { + return moneyDailyTodayFriday; + } + + public void setMoneyDailyTodayFriday(BigDecimal moneyDailyTodayFriday) { + this.moneyDailyTodayFriday = moneyDailyTodayFriday; + } + + public BigDecimal getClosingSaturday() { + return closingSaturday; + } + + public void setClosingSaturday(BigDecimal closingSaturday) { + this.closingSaturday = closingSaturday; + } + + public BigDecimal getExpenseSaturday() { + return expenseSaturday; + } + + public void setExpenseSaturday(BigDecimal expenseSaturday) { + this.expenseSaturday = expenseSaturday; + } + + public BigDecimal getMoneyDailyTodaySaturday() { + return moneyDailyTodaySaturday; + } + + public void setMoneyDailyTodaySaturday(BigDecimal moneyDailyTodaySaturday) { + this.moneyDailyTodaySaturday = moneyDailyTodaySaturday; + } + + public BigDecimal getTotalInicios() { + return moneyDailyTodayMonday.add(moneyDailyTodayThursday).add(moneyDailyTodayWednesday). + add(moneyDailyTodayTuesday).add(moneyDailyTodayFriday).add(moneyDailyTodaySaturday); + } + + public BigDecimal getTotalGastos() { + return expenseMonday.add(expenseThursday).add(expenseWednesday). + add(expenseTuesday).add(expenseFriday).add(expenseSaturday); + } + + public BigDecimal getTotalCortes() { + return closingMonday.add(closingThursday).add(closingWednesday). + add(closingTuesday).add(closingFriday).add(closingSaturday); + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/ResumenTotalLastWeekView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/ResumenTotalLastWeekView.java new file mode 100644 index 0000000..9f7bca7 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/ResumenTotalLastWeekView.java @@ -0,0 +1,162 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_RESUMEN_TOTAL_LAST_WEEK_VIEW") +public class ResumenTotalLastWeekView implements Serializable{ + + private static final long serialVersionUID = -6384789811291615117L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "office_name") + private String officeName; + + @Column(name = "closing__day_total") + private BigDecimal closingDayTotal; + + @Column(name = "money_daily_today_total") + private BigDecimal moneyDailyTodayTotal; + + @Column(name = "subtotal_total") + private BigDecimal subtotalTotal; + + @Column(name = "opening_fee_total") + private BigDecimal openingFeeTotal; + + @Column(name = "cobranza_today") + private BigDecimal cobranzaToday; + + @Column(name = "colocation_total") + private BigDecimal colocationTotal; + + @Column(name = "nomina_total") + private BigDecimal nominaTotal; + + @Column(name = "adelantos_total") + private BigDecimal adelantosTotal; + + @Column(name = "entradas_total") + private BigDecimal entradasTotal; + + @Column(name = "gastos_admon_total") + private BigDecimal gastosAdmonTotal; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOfficeName() { + return officeName; + } + + public void setOfficeName(String officeName) { + this.officeName = officeName; + } + + public BigDecimal getClosingDayTotal() { + return closingDayTotal; + } + + public void setClosingDayTotal(BigDecimal closingDayTotal) { + this.closingDayTotal = closingDayTotal; + } + + public BigDecimal getMoneyDailyTodayTotal() { + return moneyDailyTodayTotal; + } + + public void setMoneyDailyTodayTotal(BigDecimal moneyDailyTodayTotal) { + this.moneyDailyTodayTotal = moneyDailyTodayTotal; + } + + public BigDecimal getSubtotalTotal() { + return subtotalTotal; + } + + public void setSubtotalTotal(BigDecimal subtotalTotal) { + this.subtotalTotal = subtotalTotal; + } + + public BigDecimal getOpeningFeeTotal() { + return openingFeeTotal; + } + + public void setOpeningFeeTotal(BigDecimal openingFeeTotal) { + this.openingFeeTotal = openingFeeTotal; + } + + public BigDecimal getCobranzaToday() { + return cobranzaToday; + } + + public void setCobranzaToday(BigDecimal cobranzaToday) { + this.cobranzaToday = cobranzaToday; + } + + public BigDecimal getColocationTotal() { + return colocationTotal; + } + + public void setColocationTotal(BigDecimal colocationTotal) { + this.colocationTotal = colocationTotal; + } + + public BigDecimal getNominaTotal() { + return nominaTotal; + } + + public void setNominaTotal(BigDecimal nominaTotal) { + this.nominaTotal = nominaTotal; + } + + public BigDecimal getAdelantosTotal() { + return adelantosTotal; + } + + public void setAdelantosTotal(BigDecimal adelantosTotal) { + this.adelantosTotal = adelantosTotal; + } + + public BigDecimal getEntradasTotal() { + return entradasTotal; + } + + public void setEntradasTotal(BigDecimal entradasTotal) { + this.entradasTotal = entradasTotal; + } + + public BigDecimal getGastosAdmonTotal() { + return gastosAdmonTotal; + } + + public void setGastosAdmonTotal(BigDecimal gastosAdmonTotal) { + this.gastosAdmonTotal = gastosAdmonTotal; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/ResumenTotalWeekView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/ResumenTotalWeekView.java new file mode 100644 index 0000000..61d0501 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/ResumenTotalWeekView.java @@ -0,0 +1,162 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_RESUMEN_TOTAL_WEEK_VIEW") +public class ResumenTotalWeekView implements Serializable{ + + private static final long serialVersionUID = -6384789811291615117L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "office_name") + private String officeName; + + @Column(name = "closing__day_total") + private BigDecimal closingDayTotal; + + @Column(name = "money_daily_today_total") + private BigDecimal moneyDailyTodayTotal; + + @Column(name = "subtotal_total") + private BigDecimal subtotalTotal; + + @Column(name = "opening_fee_total") + private BigDecimal openingFeeTotal; + + @Column(name = "cobranza_today") + private BigDecimal cobranzaToday; + + @Column(name = "colocation_total") + private BigDecimal colocationTotal; + + @Column(name = "nomina_total") + private BigDecimal nominaTotal; + + @Column(name = "adelantos_total") + private BigDecimal adelantosTotal; + + @Column(name = "entradas_total") + private BigDecimal entradasTotal; + + @Column(name = "gastos_admon_total") + private BigDecimal gastosAdmonTotal; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOfficeName() { + return officeName; + } + + public void setOfficeName(String officeName) { + this.officeName = officeName; + } + + public BigDecimal getClosingDayTotal() { + return closingDayTotal; + } + + public void setClosingDayTotal(BigDecimal closingDayTotal) { + this.closingDayTotal = closingDayTotal; + } + + public BigDecimal getMoneyDailyTodayTotal() { + return moneyDailyTodayTotal; + } + + public void setMoneyDailyTodayTotal(BigDecimal moneyDailyTodayTotal) { + this.moneyDailyTodayTotal = moneyDailyTodayTotal; + } + + public BigDecimal getSubtotalTotal() { + return subtotalTotal; + } + + public void setSubtotalTotal(BigDecimal subtotalTotal) { + this.subtotalTotal = subtotalTotal; + } + + public BigDecimal getOpeningFeeTotal() { + return openingFeeTotal; + } + + public void setOpeningFeeTotal(BigDecimal openingFeeTotal) { + this.openingFeeTotal = openingFeeTotal; + } + + public BigDecimal getCobranzaToday() { + return cobranzaToday; + } + + public void setCobranzaToday(BigDecimal cobranzaToday) { + this.cobranzaToday = cobranzaToday; + } + + public BigDecimal getColocationTotal() { + return colocationTotal; + } + + public void setColocationTotal(BigDecimal colocationTotal) { + this.colocationTotal = colocationTotal; + } + + public BigDecimal getNominaTotal() { + return nominaTotal; + } + + public void setNominaTotal(BigDecimal nominaTotal) { + this.nominaTotal = nominaTotal; + } + + public BigDecimal getAdelantosTotal() { + return adelantosTotal; + } + + public void setAdelantosTotal(BigDecimal adelantosTotal) { + this.adelantosTotal = adelantosTotal; + } + + public BigDecimal getEntradasTotal() { + return entradasTotal; + } + + public void setEntradasTotal(BigDecimal entradasTotal) { + this.entradasTotal = entradasTotal; + } + + public BigDecimal getGastosAdmonTotal() { + return gastosAdmonTotal; + } + + public void setGastosAdmonTotal(BigDecimal gastosAdmonTotal) { + this.gastosAdmonTotal = gastosAdmonTotal; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/StatsAdvancesView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsAdvancesView.java new file mode 100644 index 0000000..7e2040f --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsAdvancesView.java @@ -0,0 +1,90 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +@Entity +@Table(name = "APC_STATS_ADVANCE_VIEW") +public class StatsAdvancesView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_route", length = 36) + private String idRoute; + + @Column(name = "name") + private String routeName; + + @Column(name = "total_advances") + private BigDecimal totalAdvances; + + @Column(name = "created_on") + private Date createdOn; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getIdRoute() { + return idRoute; + } + + public void setIdRoute(String idRoute) { + this.idRoute = idRoute; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public BigDecimal getTotalAdvances() { + return totalAdvances; + } + + public void setTotalAdvances(BigDecimal totalAdvances) { + this.totalAdvances = totalAdvances; + } + + @Override + public String toString() { + return "AdvancesView{" + "idRoute=" + idRoute + ", routeName=" + routeName + ", totalAdvances=" + totalAdvances + ", createdOn=" + createdOn + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/StatsClosingDayView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsClosingDayView.java new file mode 100644 index 0000000..ec0c55c --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsClosingDayView.java @@ -0,0 +1,101 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +@Entity +@Table(name = "APC_CLOSING_DAY_VIEW") +public class StatsClosingDayView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "name") + private String userName; + + @Column(name = "total_closing") + private BigDecimal totalClosingDay; + + @Column(name = "created_on") + private Date createdOn; + + @Column(name = "route_name") + private String routeName; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public BigDecimal getTotalClosingDay() { + return totalClosingDay; + } + + public void setTotalClosingDay(BigDecimal totalClosingDay) { + this.totalClosingDay = totalClosingDay; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + @Override + public String toString() { + return "FeesView{" + "idUser=" + idUser + ", userName=" + userName + ", totalClosingDay=" + totalClosingDay + ", createdOn=" + createdOn + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/StatsDepositsView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsDepositsView.java new file mode 100644 index 0000000..c0f5347 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsDepositsView.java @@ -0,0 +1,145 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +@Entity +@Table(name = "APC_STATS_DEPOSITS_VIEW") +public class StatsDepositsView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "id_customer", length = 36) + private String idCustomer; + + @Column(name ="coment") + private String coment; + + @Column(name="transfer_number") + private String transferNumber; + + @Column(name = "name") + private String userName; + + @Column(name = "name_customer") + private String customerName; + + @Column(name = "total_deposits") + private BigDecimal totalDeposits; + + @Column(name = "created_on") + private Date createdOn; + + @Column(name = "route_name") + private String routeName; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getComent() { + return coment; + } + + public void setComent(String coment) { + this.coment = coment; + } + + public String getTransferNumber() { + return transferNumber; + } + + public void setTransferNumber(String transferNumber) { + this.transferNumber = transferNumber; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public BigDecimal getTotalDeposits() { + return totalDeposits; + } + + public void setTotalDeposits(BigDecimal totalDeposits) { + this.totalDeposits = totalDeposits; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public String getIdCustomer() { + return idCustomer; + } + + public void setIdCustomer(String idCustomer) { + this.idCustomer = idCustomer; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + @Override + public String toString() { + return "Deposits{" + "idUser=" + idUser + ", userName=" + userName + ", totalDeposits=" + totalDeposits + ", createdOn=" + createdOn + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/StatsEmployeeSavingView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsEmployeeSavingView.java new file mode 100644 index 0000000..f3d5147 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsEmployeeSavingView.java @@ -0,0 +1,126 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.enums.EmployeeSavingType; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +@Entity +@Table(name = "APC_STATS_EMPLOYEE_SAVING_VIEW") +public class StatsEmployeeSavingView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "name") + private String userName; + + @Column(name = "employee_saving") + private BigDecimal employeeSaving; + + @Column(name = "created_on") + private Date createdOn; + + @Column(name = "route_name") + private String routeName; + + public String getId() { + return id; + } + + @Enumerated(EnumType.STRING) + @Column(name = "type") + private EmployeeSavingType type; + + public String getTypeText() { + if(getType().equals(EmployeeSavingType.DISPOSAL)) + return "Disposición de ahorro"; + else if(getType().equals(EmployeeSavingType.CANCEL)){ + return "Ahorro Cancelado";} + else{ + return "Ahorro"; + } + } + + public EmployeeSavingType getType() { + return type; + } + + public void setType(EmployeeSavingType type) { + this.type = type; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public BigDecimal getEmployeeSaving() { + return employeeSaving; + } + + public void setEmployeeSaving(BigDecimal employeeSaving) { + this.employeeSaving = employeeSaving; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + @Override + public String toString() { + return "EmployeeSaving{" + "idUser=" + idUser + ", userName=" + userName + ", employeeSaving=" + employeeSaving + ", createdOn=" + createdOn + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/StatsGasolineView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsGasolineView.java new file mode 100644 index 0000000..1bdbb22 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsGasolineView.java @@ -0,0 +1,158 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +@Entity +@Table(name = "APC_STATS_GASOLINE_VIEW") +public class StatsGasolineView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "id_route", length = 36) + private String idRoute; + + @Column(name = "route_name") + private String routeName; + + @Column(name = "user_name") + private String userName; + + @Column(name = "km_old") + private Double kmOld; + + @Column(name = "km_new") + private Double kmNew; + + @Column(name = "total_gasoline") + private Double totalGasoline; + + @Column(name = "description", length = 36) + private String description; + + @Column(name = "created_on") + private Date createdOn; + + @Column(name = "quantity") + private Double quantity; + + public Double getQuantity() { + return quantity; + } + + public void setQuantity(Double quantity) { + this.quantity = quantity; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getIdRoute() { + return idRoute; + } + + public void setIdRoute(String idRoute) { + this.idRoute = idRoute; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Double getKmOld() { + return kmOld; + } + + public void setKmOld(Double kmOld) { + this.kmOld = kmOld; + } + + public Double getKmNew() { + return kmNew; + } + + public void setKmNew(Double kmNew) { + this.kmNew = kmNew; + } + + public Double getTotalGasoline() { + return totalGasoline; + } + + public void setTotalGasoline(Double totalGasoline) { + this.totalGasoline = totalGasoline; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public Double getKmRecorridos(){ + return getKmNew() - (getKmOld() != null ? getKmOld() : 0D ); + } + + public Double getRendimiento(){ + return getKmRecorridos()/getQuantity(); + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/StatsOpeningFeesView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsOpeningFeesView.java new file mode 100644 index 0000000..f631d7e --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsOpeningFeesView.java @@ -0,0 +1,101 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +@Entity +@Table(name = "APC_OPENING_FEES_VIEW") +public class StatsOpeningFeesView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "name") + private String userName; + + @Column(name = "opening_fee") + private BigDecimal totalOpeningFees; + + @Column(name = "created_on") + private Date createdOn; + + @Column(name = "route_name") + private String routeName; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public BigDecimal getTotalOpeningFees() { + return totalOpeningFees; + } + + public void setTotaltotalOpeningFees(BigDecimal totalOpeningFees) { + this.totalOpeningFees = totalOpeningFees; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + @Override + public String toString() { + return "FeesView{" + "idUser=" + idUser + ", userName=" + userName + ", totalOpeningFees=" + totalOpeningFees + ", createdOn=" + createdOn + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/StatsPaymentRenovationView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsPaymentRenovationView.java new file mode 100644 index 0000000..b3192d9 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsPaymentRenovationView.java @@ -0,0 +1,112 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +@Entity +@Table(name = "APC_STATS_PAYMENT_RENOVATION_VIEW") +public class StatsPaymentRenovationView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "employee_name") + private String userName; + + @Column(name = "id_customer", length = 36) + private String idCustomer; + + @Column(name = "customer_name") + private String customerName; + + @Column(name = "total_payment") + private BigDecimal totalPayment; + + @Column(name = "created_on") + private Date createdOn; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getIdCustomer() { + return idCustomer; + } + + public void setIdCustomer(String idCustomer) { + this.idCustomer = idCustomer; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public BigDecimal getTotalPayment() { + return totalPayment; + } + + public void setTotalPayment(BigDecimal totalPayment) { + this.totalPayment = totalPayment; + } + + @Override + public String toString() { + return "FeesView{" + "idUser=" + idUser + ", userName=" + userName + ", totalPayment=" + totalPayment + ", createdOn=" + createdOn + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/StatsPaymentRouteView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsPaymentRouteView.java new file mode 100644 index 0000000..1bdb0d7 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsPaymentRouteView.java @@ -0,0 +1,123 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +@Entity +@Table(name = "APC_PAYMENT_ROUTE_VIEW") +public class StatsPaymentRouteView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_loan", length = 36) + private String idLoan; + + @Column(name = "id_route", length = 36) + private String idRoute; + + @Column(name = "name") + private String routeName; + + @Column(name = "user_name") + private String userName; + + @Column(name = "total_payment") + private BigDecimal totalPayment; + + @Column(name = "opening_fee") + private BigDecimal openingFee; + + @Column(name = "created_on") + private Date createdOn; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getIdRoute() { + return idRoute; + } + + public void setIdRoute(String idRoute) { + this.idRoute = idRoute; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public BigDecimal getTotalPayment() { + return totalPayment; + } + + public void setTotalPayment(BigDecimal totalPayment) { + this.totalPayment = totalPayment; + } + + public BigDecimal getOpeningFee() { + return openingFee; + } + + public void setOpeningFee(BigDecimal openingFee) { + this.openingFee = openingFee; + } + + public String getIdLoan() { + return idLoan; + } + + public void setIdLoan(String idLoan) { + this.idLoan = idLoan; + } + + @Override + public String toString() { + return "FeesView{" + "idRoute=" + idRoute + ", routeName=" + routeName + ", totalPayment=" + totalPayment + ", createdOn=" + createdOn + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/StatsPaymentView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsPaymentView.java new file mode 100644 index 0000000..b657f0e --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsPaymentView.java @@ -0,0 +1,123 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +@Entity +@Table(name = "APC_PAYMENT_VIEW") +public class StatsPaymentView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_loan", length = 36) + private String idLoan; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "name") + private String userName; + + @Column(name = "route_name") + private String routeName; + + @Column(name = "total_payment") + private BigDecimal totalPayment; + + @Column(name = "opening_fee") + private BigDecimal openingFee; + + @Column(name = "created_on") + private Date createdOn; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getIdLoan() { + return idLoan; + } + + public void setIdLoan(String idLoan) { + this.idLoan = idLoan; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public BigDecimal getTotalPayment() { + return totalPayment; + } + + public void setTotalPayment(BigDecimal totalPayment) { + this.totalPayment = totalPayment; + } + + public BigDecimal getOpeningFee() { + return openingFee; + } + + public void setOpeningFee(BigDecimal openingFee) { + this.openingFee = openingFee; + } + + @Override + public String toString() { + return "FeesView{" + "idUser=" + idUser + ", userName=" + userName + ", totalPayment=" + totalPayment + ", createdOn=" + createdOn + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/StatsPayrollView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsPayrollView.java new file mode 100644 index 0000000..16155f7 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsPayrollView.java @@ -0,0 +1,90 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +@Entity +@Table(name = "APC_PAYROLL_STATS_VIEW") +public class StatsPayrollView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "name") + private String userName; + + @Column(name = "total_payroll") + private BigDecimal totalPayroll; + + @Column(name = "created_on") + private Date createdOn; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public BigDecimal getTotalPayroll() { + return totalPayroll; + } + + public void setTotalPayroll(BigDecimal totalPayroll) { + this.totalPayroll = totalPayroll; + } + + @Override + public String toString() { + return "FeesView{" + "idUser=" + idUser + ", userName=" + userName + ", totalPayroll=" + totalPayroll + ", createdOn=" + createdOn + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/StatsSummaryView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsSummaryView.java new file mode 100644 index 0000000..00bc3d1 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsSummaryView.java @@ -0,0 +1,168 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +// @Entity +// @Table(name = "APC_PAYROLL_STATS_VIEW") +public class StatsSummaryView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "Name") + private String userName; + + @Column(name = "opening_fee") + private BigDecimal openingFee; + + @Column(name = "deposits") + private BigDecimal deposits; + + @Column(name = "payment") + private BigDecimal payment; + + @Column(name = "payroll") + private BigDecimal payroll; + + @Column(name = "gasoline") + private BigDecimal gasoline; + + @Column(name = "advances") + private BigDecimal advances; + + @Column(name = "expenses") + private BigDecimal expenses; + + @Column(name = "trasfer_transmitter") + private BigDecimal trasferTransmitter; + + @Column(name = "trasfer_receiver") + private BigDecimal trasferReceiver; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public BigDecimal getOpeningFee() { + return openingFee; + } + + public void setOpeningFee(BigDecimal openingFee) { + this.openingFee = openingFee; + } + + public BigDecimal getDeposits() { + return deposits; + } + + public void setDeposits(BigDecimal deposits) { + this.deposits = deposits; + } + + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + public BigDecimal getPayroll() { + return payroll; + } + + public void setPayroll(BigDecimal payroll) { + this.payroll = payroll; + } + + public BigDecimal getGasoline() { + return gasoline; + } + + public void setGasoline(BigDecimal gasoline) { + this.gasoline = gasoline; + } + + public BigDecimal getAdvances() { + return advances; + } + + public void setAdvances(BigDecimal advances) { + this.advances = advances; + } + + public BigDecimal getExpenses() { + return expenses; + } + + public void setExpenses(BigDecimal expenses) { + this.expenses = expenses; + } + + public BigDecimal getTrasferTransmitter() { + return trasferTransmitter; + } + + public void setTrasferTransmitter(BigDecimal trasferTransmitter) { + this.trasferTransmitter = trasferTransmitter; + } + + public BigDecimal getTrasferReceiver() { + return trasferReceiver; + } + + public void setTrasferReceiver(BigDecimal trasferReceiver) { + this.trasferReceiver = trasferReceiver; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public BigDecimal getTotalCobros(){ + return advances.add(payment).add(deposits).add(openingFee); + } + + @Override + public String toString() { + return ""; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/StatsZeroPaymentsView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsZeroPaymentsView.java new file mode 100644 index 0000000..edd6808 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/StatsZeroPaymentsView.java @@ -0,0 +1,101 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author David Rodriguez + */ +@Entity +@Table(name = "APC_STATS_ZERO_PAYMENTS_VIEW") +public class StatsZeroPaymentsView implements Serializable { + + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "name") + private String userName; + + @Column(name = "total_zeroPayments") + private BigDecimal totalZeroPayments; + + @Column(name = "created_on") + private Date createdOn; + + @Column(name = "route_name") + private String routeName; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public BigDecimal getTotalZeroPayments() { + return totalZeroPayments; + } + + public void setTotalZeroPayments(BigDecimal totalZeroPayments) { + this.totalZeroPayments = totalZeroPayments; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + @Override + public String toString() { + return "ZeroPayments{" + "idUser=" + idUser + ", userName=" + userName + ", totalZeroPayments=" + totalZeroPayments + ", createdOn=" + createdOn + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/SubtotalLastWeekByUserView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/SubtotalLastWeekByUserView.java new file mode 100644 index 0000000..c486fd8 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/SubtotalLastWeekByUserView.java @@ -0,0 +1,252 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.core.Office; +import java.io.Serializable; +import java.math.BigDecimal; +import java.math.RoundingMode; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.persistence.Transient; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_SUBTOTAL_LAST_WEEK_BY_USER_VIEW") +public class SubtotalLastWeekByUserView implements Serializable{ + + private static final long serialVersionUID = 3055231364366461069L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "username") + private String userName; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "subtotal_monday") + private BigDecimal subtotalMonday; + + @Column(name = "subtotal_tuesday") + private BigDecimal subtotalTuesday; + + @Column(name = "subtotal_wednesday") + private BigDecimal subtotalWednesday; + + @Column(name = "subtotal_thursday") + private BigDecimal subtotalThursday; + + @Column(name = "subtotal_friday") + private BigDecimal subtotalFriday; + + @Column(name = "subtotal_saturday") + private BigDecimal subtotalSaturday; + + @Column(name = "subtotal_total") + private BigDecimal subtotalTotal; + + @Column(name = "opening_fee_monday") + private BigDecimal openingFeeMonday; + + @Column(name = "opening_fee_tuesday") + private BigDecimal openingFeeTuesday; + + @Column(name = "opening_fee_wednesday") + private BigDecimal openingFeeWednesday; + + @Column(name = "opening_fee_thursday") + private BigDecimal openingFeeThursday; + + @Column(name = "opening_fee_friday") + private BigDecimal openingFeeFriday; + + @Column(name = "opening_fee_saturday") + private BigDecimal openingFeeSaturday; + + @Column(name = "opening_fee_total") + private BigDecimal openingFeeTotal; + + @Column(name = "faltante") + private BigDecimal faltante; + + @Transient + private BigDecimal porcentajeFaltante; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getSubtotalMonday() { + return subtotalMonday; + } + + public void setSubtotalMonday(BigDecimal subtotalMonday) { + this.subtotalMonday = subtotalMonday; + } + + public BigDecimal getSubtotalTuesday() { + return subtotalTuesday; + } + + public void setSubtotalTuesday(BigDecimal subtotalTuesday) { + this.subtotalTuesday = subtotalTuesday; + } + + public BigDecimal getSubtotalWednesday() { + return subtotalWednesday; + } + + public void setSubtotalWednesday(BigDecimal subtotalWednesday) { + this.subtotalWednesday = subtotalWednesday; + } + + public BigDecimal getSubtotalThursday() { + return subtotalThursday; + } + + public void setSubtotalThursday(BigDecimal subtotalThursday) { + this.subtotalThursday = subtotalThursday; + } + + public BigDecimal getSubtotalFriday() { + return subtotalFriday; + } + + public void setSubtotalFriday(BigDecimal subtotalFriday) { + this.subtotalFriday = subtotalFriday; + } + + public BigDecimal getSubtotalSaturday() { + return subtotalSaturday; + } + + public void setSubtotalSaturday(BigDecimal subtotalSaturday) { + this.subtotalSaturday = subtotalSaturday; + } + + public BigDecimal getSubtotalTotal() { + return subtotalTotal; + } + + public void setSubtotalTotal(BigDecimal subtotalTotal) { + this.subtotalTotal = subtotalTotal; + } + + public BigDecimal getOpeningFeeMonday() { + return openingFeeMonday; + } + + public void setOpeningFeeMonday(BigDecimal openingFeeMonday) { + this.openingFeeMonday = openingFeeMonday; + } + + public BigDecimal getOpeningFeeTuesday() { + return openingFeeTuesday; + } + + public void setOpeningFeeTuesday(BigDecimal openingFeeTuesday) { + this.openingFeeTuesday = openingFeeTuesday; + } + + public BigDecimal getOpeningFeeWednesday() { + return openingFeeWednesday; + } + + public void setOpeningFeeWednesday(BigDecimal openingFeeWednesday) { + this.openingFeeWednesday = openingFeeWednesday; + } + + public BigDecimal getOpeningFeeThursday() { + return openingFeeThursday; + } + + public void setOpeningFeeThursday(BigDecimal openingFeeThursday) { + this.openingFeeThursday = openingFeeThursday; + } + + public BigDecimal getOpeningFeeFriday() { + return openingFeeFriday; + } + + public void setOpeningFeeFriday(BigDecimal openingFeeFriday) { + this.openingFeeFriday = openingFeeFriday; + } + + public BigDecimal getOpeningFeeSaturday() { + return openingFeeSaturday; + } + + public void setOpeningFeeSaturday(BigDecimal openingFeeSaturday) { + this.openingFeeSaturday = openingFeeSaturday; + } + + public BigDecimal getOpeningFeeTotal() { + return openingFeeTotal; + } + + public void setOpeningFeeTotal(BigDecimal openingFeeTotal) { + this.openingFeeTotal = openingFeeTotal; + } + + public BigDecimal getFaltante() { + return faltante; + } + + public void setFaltante(BigDecimal faltante) { + this.faltante = faltante; + } + + public BigDecimal getPorcentajeFaltante() { + BigDecimal totalReportedWeek = openingFeeTotal.add(subtotalTotal); + if(totalReportedWeek.compareTo(BigDecimal.ZERO) == 1) + porcentajeFaltante = (faltante + .multiply(new BigDecimal(100))).divide(totalReportedWeek, 2, RoundingMode.HALF_UP); + else + porcentajeFaltante = BigDecimal.ZERO; + return porcentajeFaltante; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/SubtotalWeekByUserView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/SubtotalWeekByUserView.java new file mode 100644 index 0000000..9eabbad --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/SubtotalWeekByUserView.java @@ -0,0 +1,227 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.core.Office; +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_SUBTOTAL_WEEK_BY_USER_VIEW") +public class SubtotalWeekByUserView implements Serializable{ + + private static final long serialVersionUID = 3055231364366461069L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "username") + private String userName; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn( + name = "id_office", + referencedColumnName = "id", + nullable = false + ) + private Office office; + + @Column(name = "subtotal_monday") + private BigDecimal subtotalMonday; + + @Column(name = "subtotal_tuesday") + private BigDecimal subtotalTuesday; + + @Column(name = "subtotal_wednesday") + private BigDecimal subtotalWednesday; + + @Column(name = "subtotal_thursday") + private BigDecimal subtotalThursday; + + @Column(name = "subtotal_friday") + private BigDecimal subtotalFriday; + + @Column(name = "subtotal_saturday") + private BigDecimal subtotalSaturday; + + @Column(name = "subtotal_total") + private BigDecimal subtotalTotal; + + @Column(name = "opening_fee_monday") + private BigDecimal openingFeeMonday; + + @Column(name = "opening_fee_tuesday") + private BigDecimal openingFeeTuesday; + + @Column(name = "opening_fee_wednesday") + private BigDecimal openingFeeWednesday; + + @Column(name = "opening_fee_thursday") + private BigDecimal openingFeeThursday; + + @Column(name = "opening_fee_friday") + private BigDecimal openingFeeFriday; + + @Column(name = "opening_fee_saturday") + private BigDecimal openingFeeSaturday; + + @Column(name = "opening_fee_total") + private BigDecimal openingFeeTotal; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Office getOffice() { + return office; + } + + public void setOffice(Office office) { + this.office = office; + } + + public BigDecimal getSubtotalMonday() { + return subtotalMonday; + } + + public void setSubtotalMonday(BigDecimal subtotalMonday) { + this.subtotalMonday = subtotalMonday; + } + + public BigDecimal getSubtotalTuesday() { + return subtotalTuesday; + } + + public void setSubtotalTuesday(BigDecimal subtotalTuesday) { + this.subtotalTuesday = subtotalTuesday; + } + + public BigDecimal getSubtotalWednesday() { + return subtotalWednesday; + } + + public void setSubtotalWednesday(BigDecimal subtotalWednesday) { + this.subtotalWednesday = subtotalWednesday; + } + + public BigDecimal getSubtotalThursday() { + return subtotalThursday; + } + + public void setSubtotalThursday(BigDecimal subtotalThursday) { + this.subtotalThursday = subtotalThursday; + } + + public BigDecimal getSubtotalFriday() { + return subtotalFriday; + } + + public void setSubtotalFriday(BigDecimal subtotalFriday) { + this.subtotalFriday = subtotalFriday; + } + + public BigDecimal getSubtotalSaturday() { + return subtotalSaturday; + } + + public void setSubtotalSaturday(BigDecimal subtotalSaturday) { + this.subtotalSaturday = subtotalSaturday; + } + + public BigDecimal getSubtotalTotal() { + return subtotalTotal; + } + + public void setSubtotalTotal(BigDecimal subtotalTotal) { + this.subtotalTotal = subtotalTotal; + } + + public BigDecimal getOpeningFeeMonday() { + return openingFeeMonday; + } + + public void setOpeningFeeMonday(BigDecimal openingFeeMonday) { + this.openingFeeMonday = openingFeeMonday; + } + + public BigDecimal getOpeningFeeTuesday() { + return openingFeeTuesday; + } + + public void setOpeningFeeTuesday(BigDecimal openingFeeTuesday) { + this.openingFeeTuesday = openingFeeTuesday; + } + + public BigDecimal getOpeningFeeWednesday() { + return openingFeeWednesday; + } + + public void setOpeningFeeWednesday(BigDecimal openingFeeWednesday) { + this.openingFeeWednesday = openingFeeWednesday; + } + + public BigDecimal getOpeningFeeThursday() { + return openingFeeThursday; + } + + public void setOpeningFeeThursday(BigDecimal openingFeeThursday) { + this.openingFeeThursday = openingFeeThursday; + } + + public BigDecimal getOpeningFeeFriday() { + return openingFeeFriday; + } + + public void setOpeningFeeFriday(BigDecimal openingFeeFriday) { + this.openingFeeFriday = openingFeeFriday; + } + + public BigDecimal getOpeningFeeSaturday() { + return openingFeeSaturday; + } + + public void setOpeningFeeSaturday(BigDecimal openingFeeSaturday) { + this.openingFeeSaturday = openingFeeSaturday; + } + + public BigDecimal getOpeningFeeTotal() { + return openingFeeTotal; + } + + public void setOpeningFeeTotal(BigDecimal openingFeeTotal) { + this.openingFeeTotal = openingFeeTotal; + } + + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/TotalCashByCurdateDashboardView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/TotalCashByCurdateDashboardView.java new file mode 100644 index 0000000..728547e --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/TotalCashByCurdateDashboardView.java @@ -0,0 +1,173 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_TOTAL_CASH_BY_CURDATE_DASHBOARD_VIEW") +public class TotalCashByCurdateDashboardView implements Serializable { + + private static final long serialVersionUID = 617629469188727880L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_office") + private String idOffice; + + @Column(name = "total_amount_payment") + private BigDecimal paymentDaily; + + @Column(name = "total_amount_deposit") + private BigDecimal depositDaily; + + @Column(name = "transfer_sender") + private BigDecimal transferSender; + + @Column(name = "transfer_receiver") + private BigDecimal transferReceiver; + + @Column(name = "money_daily") + private BigDecimal moneyDaily; + + @Column(name = "other_expense") + private BigDecimal otherExpense; + + @Column(name = "delivery") + private BigDecimal delivery; + + @Column(name = "transfer_pending") + private BigDecimal transferPending; + + @Transient + private BigDecimal total; + + public TotalCashByCurdateDashboardView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public BigDecimal getPaymentDaily() { + return paymentDaily; + } + + public void setPaymentDaily(BigDecimal paymentDaily) { + this.paymentDaily = paymentDaily; + } + + public BigDecimal getTransferSender() { + return transferSender; + } + + public void setTransferSender(BigDecimal transferSender) { + this.transferSender = transferSender; + } + + public BigDecimal getTransferReceiver() { + return transferReceiver; + } + + public void setTransferReceiver(BigDecimal transferReceiver) { + this.transferReceiver = transferReceiver; + } + + public BigDecimal getMoneyDaily() { + return moneyDaily; + } + + public void setMoneyDaily(BigDecimal moneyDaily) { + this.moneyDaily = moneyDaily; + } + + public BigDecimal getOtherExpense() { + return otherExpense; + } + + public void setOtherExpense(BigDecimal otherExpense) { + this.otherExpense = otherExpense; + } + + public BigDecimal getDelivery() { + return delivery; + } + + public void setDelivery(BigDecimal delivery) { + this.delivery = delivery; + } + + public String getIdOffice() { + return idOffice; + } + + public void setIdOffice(String idOffice) { + this.idOffice = idOffice; + } + + public BigDecimal getTransferPending() { + return transferPending; + } + + public void setTransferPending(BigDecimal transferPending) { + this.transferPending = transferPending; + } + + public BigDecimal getDepositDaily() { + return depositDaily; + } + + public void setDepositDaily(BigDecimal depositDaily) { + this.depositDaily = depositDaily; + } + + public BigDecimal getTotal() { + if (null == total) { + total = BigDecimal.ZERO; + } + total = BigDecimal.ZERO; + total = total + .add(getPaymentDaily()) + .add(getDepositDaily()) + .add(getTransferReceiver()) + .subtract(getTransferSender()) + .add(getMoneyDaily()) + .subtract(getOtherExpense()) + .subtract(getDelivery()); + + return total; + } + + public void setTotal(BigDecimal total) { + this.total = total; + } + + @Override + public String toString() { + return "TotalCashByCurdateView{" + "id=" + id + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/TotalCashByCurdateView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/TotalCashByCurdateView.java new file mode 100644 index 0000000..6bc7379 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/TotalCashByCurdateView.java @@ -0,0 +1,172 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_TOTAL_CASH_BY_CURDATE_VIEW") +public class TotalCashByCurdateView implements Serializable { + + private static final long serialVersionUID = 617629469188727880L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_office") + private String idOffice; + + @Column(name = "total_amount_payment") + private BigDecimal paymentDaily; + + @Column(name = "total_amount_deposit") + private BigDecimal depositDaily; + + @Column(name = "transfer_sender") + private BigDecimal transferSender; + + @Column(name = "transfer_receiver") + private BigDecimal transferReceiver; + + @Column(name = "money_daily") + private BigDecimal moneyDaily; + + @Column(name = "other_expense") + private BigDecimal otherExpense; + + @Column(name = "delivery") + private BigDecimal delivery; + + @Column(name = "transfer_pending") + private BigDecimal transferPending; + + @Transient + private BigDecimal total; + + public TotalCashByCurdateView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public BigDecimal getPaymentDaily() { + return paymentDaily; + } + + public void setPaymentDaily(BigDecimal paymentDaily) { + this.paymentDaily = paymentDaily; + } + + public BigDecimal getTransferSender() { + return transferSender; + } + + public void setTransferSender(BigDecimal transferSender) { + this.transferSender = transferSender; + } + + public BigDecimal getTransferReceiver() { + return transferReceiver; + } + + public void setTransferReceiver(BigDecimal transferReceiver) { + this.transferReceiver = transferReceiver; + } + + public BigDecimal getMoneyDaily() { + return moneyDaily; + } + + public void setMoneyDaily(BigDecimal moneyDaily) { + this.moneyDaily = moneyDaily; + } + + public BigDecimal getOtherExpense() { + return otherExpense; + } + + public void setOtherExpense(BigDecimal otherExpense) { + this.otherExpense = otherExpense; + } + + public BigDecimal getDelivery() { + return delivery; + } + + public void setDelivery(BigDecimal delivery) { + this.delivery = delivery; + } + + public String getIdOffice() { + return idOffice; + } + + public void setIdOffice(String idOffice) { + this.idOffice = idOffice; + } + + public BigDecimal getTransferPending() { + return transferPending; + } + + public void setTransferPending(BigDecimal transferPending) { + this.transferPending = transferPending; + } + + public BigDecimal getDepositDaily() { + return depositDaily; + } + + public void setDepositDaily(BigDecimal depositDaily) { + this.depositDaily = depositDaily; + } + + public BigDecimal getTotal() { + if (null == total) { + total = BigDecimal.ZERO; + } + total = BigDecimal.ZERO; + total = total + .add(getPaymentDaily()) + .add(getTransferReceiver()) + .subtract(getTransferSender()) + .add(getMoneyDaily()) + .subtract(getOtherExpense()) + .subtract(getDelivery()); + + return total; + } + + public void setTotal(BigDecimal total) { + this.total = total; + } + + @Override + public String toString() { + return "TotalCashByCurdateView{" + "id=" + id + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/TotalClosingDayByCurdateView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/TotalClosingDayByCurdateView.java new file mode 100644 index 0000000..102bcea --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/TotalClosingDayByCurdateView.java @@ -0,0 +1,71 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_TOTAL_CLOSING_DAY_BY_CURDATE_VIEW") +public class TotalClosingDayByCurdateView implements Serializable { + + private static final long serialVersionUID = -2806905948351437216L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_office") + private String idOffice; + + @Column(name = "amount_paid") + private BigDecimal amountPaid; + + public TotalClosingDayByCurdateView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public BigDecimal getAmountPaid() { + return amountPaid; + } + + public void setAmountPaid(BigDecimal amountPaid) { + this.amountPaid = amountPaid; + } + + public String getIdOffice() { + return idOffice; + } + + public void setIdOffice(String idOffice) { + this.idOffice = idOffice; + } + + @Override + public String toString() { + return "TotalClosingDayByCurdateView{" + "id=" + id + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/TotalLoansApprovedByOfficeView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/TotalLoansApprovedByOfficeView.java new file mode 100644 index 0000000..e17c18a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/TotalLoansApprovedByOfficeView.java @@ -0,0 +1,64 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_TOTAL_LOANS_APPROVED_BY_OFFICE") +public class TotalLoansApprovedByOfficeView implements Serializable{ + + private static final long serialVersionUID = -6505276469507406194L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_office") + private String idOffice; + + @Column(name = "payment_daily") + private BigDecimal payment; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdOffice() { + return idOffice; + } + + public void setIdOffice(String idOffice) { + this.idOffice = idOffice; + } + + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/TotalLoansByOfficeView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/TotalLoansByOfficeView.java new file mode 100644 index 0000000..086efa2 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/TotalLoansByOfficeView.java @@ -0,0 +1,114 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.enums.LoanStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Entity +@Immutable +@Table(name = "APC_TOTAL_LOANS_BY_OFFICE") +public class TotalLoansByOfficeView implements Serializable{ + + private static final long serialVersionUID = 1072887428747040106L; + + @Id + @Column(name = "id", length = 36) + private String id; + + @Column(name = "id_office") + private String idOffice; + + @Enumerated(EnumType.STRING) + @Column(name = "loan_status") + private LoanStatus loanStatus; + + @Column(name = "id_route") + private String idRoute; + + @Column(name = "route_name") + private String routeName; + + @Column(name = "amount_to_pay") + private BigDecimal amountToPay; + + @Column(name = "amount_paid") + private BigDecimal amountPaid; + + public TotalLoansByOfficeView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdOffice() { + return idOffice; + } + + public void setIdOffice(String idOffice) { + this.idOffice = idOffice; + } + + public LoanStatus getLoanStatus() { + return loanStatus; + } + + public void setLoanStatus(LoanStatus loanStatus) { + this.loanStatus = loanStatus; + } + + public String getIdRoute() { + return idRoute; + } + + public void setIdRoute(String idRoute) { + this.idRoute = idRoute; + } + + public String getRouteName() { + return routeName; + } + + public void setRouteName(String routeName) { + this.routeName = routeName; + } + + public BigDecimal getAmountToPay() { + return amountToPay; + } + + public void setAmountToPay(BigDecimal amountToPay) { + this.amountToPay = amountToPay; + } + + public BigDecimal getAmountPaid() { + return amountPaid; + } + + public void setAmountPaid(BigDecimal amountPaid) { + this.amountPaid = amountPaid; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/TransferInPendingStatusView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/TransferInPendingStatusView.java new file mode 100644 index 0000000..4ddc8e4 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/TransferInPendingStatusView.java @@ -0,0 +1,175 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import java.util.Date; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_TRANSFER_IN_PENDING_STATUS_VIEW") +public class TransferInPendingStatusView implements Serializable { + + private static final long serialVersionUID = 7430662914845336484L; + + @Id + @Column(name = "id_loan_detail", length = 36) + private String idLoanDetail; + + @Column(name = "payment_amount") + private Double paymentAmount; + + @Column(name = "str_created_on", length = 22) + private String strCreatedOn; + + @Column(name = "customer_name", length = 103) + private String customerName; + + @Column(name = "endorsement_name", length = 103) + private String endorsementName; + + @Column(name = "user_name", length = 103) + private String userName; + + @Column(name = "loan_comments", length = 150) + private String loanComments; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + /** + * + */ + public TransferInPendingStatusView() { + } + + /** + * + * @param idLoanDetail + * @param paymentAmount + * @param strCreatedOn + * @param customerName + * @param endorsementName + * @param userName + * @param loanComments + * @param createdOn + */ + public TransferInPendingStatusView(String idLoanDetail, Double paymentAmount, String strCreatedOn, String customerName, String endorsementName, String userName, String loanComments, Date createdOn) { + this.idLoanDetail = idLoanDetail; + this.paymentAmount = paymentAmount; + this.strCreatedOn = strCreatedOn; + this.customerName = customerName; + this.endorsementName = endorsementName; + this.userName = userName; + this.loanComments = loanComments; + this.createdOn = createdOn; + } + + public String getIdLoanDetail() { + return idLoanDetail; + } + + public void setIdLoanDetail(String idLoanDetail) { + this.idLoanDetail = idLoanDetail; + } + + public Double getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(Double paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public String getStrCreatedOn() { + return strCreatedOn; + } + + public void setStrCreatedOn(String strCreatedOn) { + this.strCreatedOn = strCreatedOn; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getEndorsementName() { + return endorsementName; + } + + public void setEndorsementName(String endorsementName) { + this.endorsementName = endorsementName; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getLoanComments() { + return loanComments; + } + + public void setLoanComments(String loanComments) { + this.loanComments = loanComments; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + @Override + public int hashCode() { + int hash = 7; + hash = 61 * hash + Objects.hashCode(this.idLoanDetail); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final TransferInPendingStatusView other = (TransferInPendingStatusView) obj; + if (!Objects.equals(this.idLoanDetail, other.idLoanDetail)) { + return false; + } + return true; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/TransferView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/TransferView.java new file mode 100644 index 0000000..0f75817 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/TransferView.java @@ -0,0 +1,219 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import com.arrebol.apc.model.enums.ActionStatus; +import com.arrebol.apc.model.enums.ActiveStatus; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Objects; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_TRANSFER_VIEW") +public class TransferView implements Serializable { + + @Id + @Column(name = "id", length = 36) + private String id; + + @Id + @Column(name = "id_office", length = 36) + private String idOffice; + + @Column(name = "full_name_transmitter", length = 103) + private String fullNameTransmitter; + + @Column(name = "transmitter_routes") + private String transmitterRoutes; + + @Column(name = "full_name_receiver", length = 103) + private String fullNameReceiver; + + @Column(name = "receiver_routes") + private String receiverRoutes; + + @Column(name = "amount_to_transfer") + private BigDecimal amountToTransfer; + + @Enumerated(EnumType.STRING) + @Column(name = "action_status") + private ActionStatus actionStatus; + + @Column(name = "str_action_status", length = 9) + private String strActionStatus; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Column(name = "str_created_on", length = 22) + private String strCreatedOn; + + @Column(name = "style_class", length = 7) + private String styleClass; + + public TransferView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdOffice() { + return idOffice; + } + + public void setIdOffice(String idOffice) { + this.idOffice = idOffice; + } + + public String getFullNameTransmitter() { + return fullNameTransmitter; + } + + public void setFullNameTransmitter(String fullNameTransmitter) { + this.fullNameTransmitter = fullNameTransmitter; + } + + public String getTransmitterRoutes() { + return transmitterRoutes; + } + + public void setTransmitterRoutes(String transmitterRoutes) { + this.transmitterRoutes = transmitterRoutes; + } + + public String getFullNameReceiver() { + return fullNameReceiver; + } + + public void setFullNameReceiver(String fullNameReceiver) { + this.fullNameReceiver = fullNameReceiver; + } + + public String getReceiverRoutes() { + return receiverRoutes; + } + + public void setReceiverRoutes(String receiverRoutes) { + this.receiverRoutes = receiverRoutes; + } + + public BigDecimal getAmountToTransfer() { + return amountToTransfer; + } + + public void setAmountToTransfer(BigDecimal amountToTransfer) { + this.amountToTransfer = amountToTransfer; + } + + public ActionStatus getActionStatus() { + return actionStatus; + } + + public void setActionStatus(ActionStatus actionStatus) { + this.actionStatus = actionStatus; + } + + public String getStrActionStatus() { + return strActionStatus; + } + + public void setStrActionStatus(String strActionStatus) { + this.strActionStatus = strActionStatus; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getStrCreatedOn() { + return strCreatedOn; + } + + public void setStrCreatedOn(String strCreatedOn) { + this.strCreatedOn = strCreatedOn; + } + + public String getStyleClass() { + return styleClass; + } + + public void setStyleClass(String styleClass) { + this.styleClass = styleClass; + } + + public boolean getActive() { + return null == getStyleClass(); + } + + public boolean getAction(Date lastStableSmallBox) { + Date date = createdOn; + boolean action = true; + try { + SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd"); + + String dateStr = dt1.format(date); + date = dt1.parse(dateStr); + + action = date.after(lastStableSmallBox); + } catch (Exception ex) { + } + return action; + } + + @Override + public int hashCode() { + int hash = 5; + hash = 79 * hash + Objects.hashCode(this.id); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + final TransferView other = (TransferView) obj; + if (!Objects.equals(this.id, other.id)) { + return false; + } + return true; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/UserByRouteView.java b/ace-model/src/main/java/com/arrebol/apc/model/views/UserByRouteView.java new file mode 100644 index 0000000..e6e01f3 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/UserByRouteView.java @@ -0,0 +1,81 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views; + +import java.io.Serializable; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import org.hibernate.annotations.Immutable; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Immutable +@Table(name = "APC_USER_BY_ROUTE_VIEW") +public class UserByRouteView implements Serializable { + + private static final long serialVersionUID = -4547463041660221310L; + + @Id + @Column(name = "id", length = 72) + private String id; + + @Column(name = "id_user", length = 36) + private String idUser; + + @Column(name = "id_route", length = 36) + private String idRoute; + + @Column(name = "employee_name", length = 103) + private String employeeName; + + public UserByRouteView() { + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + public String getIdRoute() { + return idRoute; + } + + public void setIdRoute(String idRoute) { + this.idRoute = idRoute; + } + + public String getEmployeeName() { + return employeeName; + } + + public void setEmployeeName(String employeeName) { + this.employeeName = employeeName; + } + + @Override + public String toString() { + return "UserByRouteView{" + "employeeName=" + employeeName + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/AdministrationPersonSerchViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/AdministrationPersonSerchViewCfg.java new file mode 100644 index 0000000..f191b53 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/AdministrationPersonSerchViewCfg.java @@ -0,0 +1,24 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface AdministrationPersonSerchViewCfg { + + String QUERY_FIND_PERSON_BY_TYPE_ROUTE_OFFICE = "findPersonByPersonTypeAndRouteAndOffice"; + String QUERY_LIKE_PERSON_NAME_IN_PERSON_TYPE_IN_ROUTES_AND_OFFICE = "likePersonNameInPersonTypeInRoutesAndOffice"; + String QUERY_LIKE_PERSON_NAME_IN_PERSON_TYPE_ALL_ROUTES_BY_OFFICE = "likePersonNameInPersonTypeAllRoutesByOffice"; + + String FIELD_PEOPLE_TYPE = "peopleType"; + String FIELD_ID_ROUTE = "idRoute"; + String FIELD_ID_OFFICE = "idOffice"; + String FIELD_PERSON_SEARCH = "personSearch"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/AdvanceUserDailyDetailViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/AdvanceUserDailyDetailViewCfg.java new file mode 100644 index 0000000..22e32b9 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/AdvanceUserDailyDetailViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface AdvanceUserDailyDetailViewCfg extends GenericCfg { + + String QUERY_FIND_ALL_ADVANCE_USER_DAILY_DETAIL_BY_USER = "findAllAdvancesUserDailyDetailByUser"; + + String FIELD_VIEW_USER = "idUser"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/AdvanceUserDailyViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/AdvanceUserDailyViewCfg.java new file mode 100644 index 0000000..55f6da1 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/AdvanceUserDailyViewCfg.java @@ -0,0 +1,23 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface AdvanceUserDailyViewCfg extends GenericCfg { + + String QUERY_FIND_ALL_ADVANCE_USER_DAILY_BY_OFFICE = "findAllAdvancesUserDailyByOffice"; + String QUERY_PAYMENT_TRACKING_BY_IDS = "findPaymentTrackingByIds"; + + String FIELD_VIEW_USER = "user"; + String FIELD_VIEW_OFFICE = "office"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/AvailablesOwnersViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/AvailablesOwnersViewCfg.java new file mode 100644 index 0000000..4cfa2b3 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/AvailablesOwnersViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface AvailablesOwnersViewCfg extends GenericCfg { + + String QUERY_FIND_ALL_CURRENT_OWNERS = "findAllCurrentOwners"; + String QUERY_FIND_ALL_NEW_OWNERS = "findAllNewOwners"; + + String USER_ID = "userId"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ClosingDailyDetailFromUserByCurdateCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ClosingDailyDetailFromUserByCurdateCfg.java new file mode 100644 index 0000000..a4efa98 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ClosingDailyDetailFromUserByCurdateCfg.java @@ -0,0 +1,23 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface ClosingDailyDetailFromUserByCurdateCfg extends GenericCfg{ + + String QUERY_FIND_ALL_DETAILS = "findAllClosingDailyDetailFromUserByCurdateView"; + String QUERY_FIND_ALL_DETAILS_CERTIFIER = "findAllClosingDailyDetailFromUserCertifierByCurdateView"; + + String FIELD_VIEW_USER = "idUser"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/CurrentCustomerByLoanViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/CurrentCustomerByLoanViewCfg.java new file mode 100644 index 0000000..0854c43 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/CurrentCustomerByLoanViewCfg.java @@ -0,0 +1,21 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface CurrentCustomerByLoanViewCfg extends GenericCfg { + + String QUERY_FIND_ALL_LOANS_BY_CURRENT_OWNER = "findAllLoansByCurrentOwner"; + + String USER_ID = "userId"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/CustomerWithoutRenovationViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/CustomerWithoutRenovationViewCfg.java new file mode 100644 index 0000000..8373fbb --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/CustomerWithoutRenovationViewCfg.java @@ -0,0 +1,21 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface CustomerWithoutRenovationViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_CUSTOMER_WITHOUT_RENOVATION_BY_OFFICE = "findAllCustomerWithOutRenovationByOffice"; + + String FIELD_VIEW_OFFICE = "office"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/EnabledUserDetailsViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/EnabledUserDetailsViewCfg.java new file mode 100644 index 0000000..fb889c8 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/EnabledUserDetailsViewCfg.java @@ -0,0 +1,20 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface EnabledUserDetailsViewCfg extends GenericCfg{ + + String QUERY_FIND_ENABLED_USERS_BY_OFFICE = "findEnabledUsersByOffice"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/FeesViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/FeesViewCfg.java new file mode 100644 index 0000000..375ff31 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/FeesViewCfg.java @@ -0,0 +1,24 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface FeesViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_FEES_BETWEEN_DATES = "findAllFeesBetweenDates"; + String QUERY_FIND_ALL_FEES_BETWEEN_DATES_USER = "findAllFeesBetweenDatesUser"; + String QUERY_FIND_ALL_FEES_BETWEEN_DATES_ROUTE = "findAllFeesBetweenDatesRoute"; + + String FIELD_USER = "user"; + String FIELD_ROUTE = "route"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/GeneralBoxViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/GeneralBoxViewCfg.java new file mode 100644 index 0000000..586055f --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/GeneralBoxViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface GeneralBoxViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_DETAILS = "findAllGeneralBoxByOffice"; + + String FIELD_OFFICE = "office"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/InformationLoanWeekViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/InformationLoanWeekViewCfg.java new file mode 100644 index 0000000..34acdae --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/InformationLoanWeekViewCfg.java @@ -0,0 +1,36 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface InformationLoanWeekViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_LOANS_THIS_WEEK_BY_OFFICE = "findAllLoanInformationThisWeekByOffice"; + String QUERY_FIND_ALL_LOANS_LAST_WEEK_BY_OFFICE = "findAllLoanInformationLastWeekByOffice"; + + String QUERY_FIND_ALL_COLOCATION_WEEK_BY_OFFICE = "findAllColocationThisWeekByOffice"; + String QUERY_FIND_ALL_COLOCATION_LAST_WEEK_BY_OFFICE = "findAllColocationLastWeekByOffice"; + + String QUERY_FIND_ALL_SUBTOTAL_WEEK_BY_OFFICE = "findAllSubtotalThisWeekByOffice"; + String QUERY_FIND_ALL_SUBTOTAL_LAST_WEEK_BY_OFFICE = "findAllSubtotalLastWeekByOffice"; + + String QUERY_FIND_ALL_RESUMEN_IN_OUT_WEEK_BY_OFFICE = "findAllResumenInOutThisWeekByOffice"; + String QUERY_FIND_ALL_RESUMEN_IN_OUT_LAST_WEEK_BY_OFFICE = "findAllResumenInOutLastWeekByOffice"; + + String QUERY_FIND_ALL_COBRANZA_WEEK_BY_OFFICE = "findAllCobranzaThisWeekByOffice"; + String QUERY_FIND_ALL_COBRANZA_LAST_WEEK_BY_OFFICE = "findAllCobranzaLastWeekByOffice"; + + String FIELD_VIEW_OFFICE = "idOffice"; + String FIELD_VIEW_OFFICE_COLOCATION = "office"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanByUserPaymentZeroViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanByUserPaymentZeroViewCfg.java new file mode 100644 index 0000000..a59e9cf --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanByUserPaymentZeroViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface LoanByUserPaymentZeroViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_LOANS_PAYMENT_ZERO_BY_USER = "findAllLoansByUserPaymentZero"; + + String FIELD_VIEW_USER = "user"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanEmployeeAllDataCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanEmployeeAllDataCfg.java new file mode 100644 index 0000000..4a362b3 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanEmployeeAllDataCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface LoanEmployeeAllDataCfg extends GenericCfg{ + + String QUERY_FIND_ALL_LOAN_EMPLOYEE_BY_ID = "findAllLoanEmployeeById"; + String QUERY_UPDATE_LOAN_EMPLOYEE_BY_STATUS = "updateLoanEmployeeByStatus"; + String FIELD_ID_LOAN = "idLoanEmployee"; + String FIELD_ACTIVE_STATUS = "loanEmployeeStatus"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanEmployeeDetailAllDataViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanEmployeeDetailAllDataViewCfg.java new file mode 100644 index 0000000..6188d18 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanEmployeeDetailAllDataViewCfg.java @@ -0,0 +1,29 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface LoanEmployeeDetailAllDataViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_LOAN_EMPLOYEE_DETAIL_BY_ID_LOAN = "findAllLoanEmployeeDetailByIdLoan"; + String QUERY_UPDATE_LOAN_EMPLOYEE_DETAIL_BY_STATUS = "updateLoanEmployeeDetailByStatus"; + String QUERY_FIND_LOAN_DETAL_TO_UPDATE = "findLoanDetailToUpdate"; + String FIELD_ID_LOAN = "idLoanEmployee"; + String FIELD_ACTIVE_STATUS = "loanEmployeeDetailStatus"; + + //LoanDetail Delete + + String FIELD_ID_USER = "idUser"; + String FIELD_CREATED_ON = "createdOn"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanEmployeeViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanEmployeeViewCfg.java new file mode 100644 index 0000000..f2eabd5 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanEmployeeViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface LoanEmployeeViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_LOAN_EMPLOYEE_HIST = "findAllLoanEmployeeHist"; + String QUERY_FIND_ALL_LOAN_EMPLOYEE_BY_ID = "findAllLoanEmployeeByIdEmp"; + + String FIEL_LOAN_EMPLOYEE_USERID = "idUser"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanInPendingStatusToDeliveryViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanInPendingStatusToDeliveryViewCfg.java new file mode 100644 index 0000000..dd877d9 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanInPendingStatusToDeliveryViewCfg.java @@ -0,0 +1,17 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanInPendingStatusToDeliveryViewCfg { + + String QUERY_FIND_ALL_LOAN_IN_PENDING_STATUS_TO_DELIVERY_VIEW = "findAllLoanInPendingStatusToDeliveryView"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanRenovationDeliveryWeeklyViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanRenovationDeliveryWeeklyViewCfg.java new file mode 100644 index 0000000..1aa07bd --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/LoanRenovationDeliveryWeeklyViewCfg.java @@ -0,0 +1,21 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface LoanRenovationDeliveryWeeklyViewCfg { + + String QUERY_FIND_LOAN_RENOVATION_DELIVERY_WEEKLY = "findAllLoanRenovationDeliveryWeekly"; + String QUERY_FIND_LOAN_RENOVATION_TOTAL_RENOVATION = "findAllLoanRenovationDeliveryWeeklyTotalRenovable"; + String QUERY_FIND_LOAN_RENOVATION_TOTAL_RENOVATION_AMOUNT = "findAllLoanRenovationDeliveryWeeklyTotalRenovableAmount"; + + String FIELD_RENOVATION= "renovation"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/MoneyDailyByUserCertifierViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/MoneyDailyByUserCertifierViewCfg.java new file mode 100644 index 0000000..9529fcf --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/MoneyDailyByUserCertifierViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface MoneyDailyByUserCertifierViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_MONEY_DAILY_BY_CERTIFIER_BY_OFFICE = "findAllAmountByUserCertifierView"; + + String FIELD_VIEW_OFFICE = "idOffice"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenNewCustomerLastWeekViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenNewCustomerLastWeekViewCfg.java new file mode 100644 index 0000000..b928c29 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenNewCustomerLastWeekViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodríguez Huaracha + */ +public interface ResumenNewCustomerLastWeekViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_RESUMEN_NEW_CUSTOMER = "findAllResumenNewCustomerLastWeek"; + + String FIELD_VIEW_OFFICE = "idOffice"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenNewCustomerWeekViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenNewCustomerWeekViewCfg.java new file mode 100644 index 0000000..78e96b0 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenNewCustomerWeekViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodríguez Huaracha + */ +public interface ResumenNewCustomerWeekViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_RESUMEN_NEW_CUSTOMER = "findAllResumenNewCustomerWeek"; + + String FIELD_VIEW_OFFICE = "idOffice"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenTotalLastWeekViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenTotalLastWeekViewCfg.java new file mode 100644 index 0000000..e531688 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenTotalLastWeekViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface ResumenTotalLastWeekViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_RESUMEN_TOTAL = "findAllResumenTotalLastWeek"; + + String FIELD_VIEW_OFFICE = "idOffice"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenTotalWeekViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenTotalWeekViewCfg.java new file mode 100644 index 0000000..91bd882 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/ResumenTotalWeekViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface ResumenTotalWeekViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_RESUMEN_TOTAL = "findAllResumenTotalWeek"; + + String FIELD_VIEW_OFFICE = "idOffice"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsAdvancesViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsAdvancesViewCfg.java new file mode 100644 index 0000000..9b25416 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsAdvancesViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface StatsAdvancesViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_ADVANCES_BETWEEN_DATES = "findAllAdvancesBetweenDates"; + String QUERY_FIND_ALL_ADVANCES_BETWEEN_DATES_ROUTE = "findAllAdvancesBetweenDatesRoute"; + + String FIELD_ROUTE = "route"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsClosingDayViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsClosingDayViewCfg.java new file mode 100644 index 0000000..4fa52ed --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsClosingDayViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface StatsClosingDayViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_CLOSING_DAY_BETWEEN_DATES = "findAllClosingDayBetweenDates"; + String QUERY_FIND_ALL_CLOSING_DAY_BETWEEN_DATES_USER = "findAllClosingDayBetweenDatesUser"; + + String FIELD_USER = "user"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsDepositsViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsDepositsViewCfg.java new file mode 100644 index 0000000..a5a2deb --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsDepositsViewCfg.java @@ -0,0 +1,21 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface StatsDepositsViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_DEPOSITS_BETWEEN_DATES = "findAllDepositsBetweenDates"; + String QUERY_FIND_ALL_DEPOSITS_BETWEEN_DATES_USER = "findAllDepositsBetweenDatesUser"; + String FIELD_USER = "user"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsEmployeeSavingViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsEmployeeSavingViewCfg.java new file mode 100644 index 0000000..bce608f --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsEmployeeSavingViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface StatsEmployeeSavingViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_EMPLOYEE_SAVING_BETWEEN_DATES = "findAllEmployeeSavingBetweenDates"; + String QUERY_FIND_ALL_EMPLOYEE_SAVING_BY_ID_BETWEEN_DATES = "findAllEmployeeSavingByIdBetweenDates"; + + String USER_ID = "idUser"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsGasolineViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsGasolineViewCfg.java new file mode 100644 index 0000000..1c79834 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsGasolineViewCfg.java @@ -0,0 +1,19 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface StatsGasolineViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_GASOLINE_BETWEEN_DATES = "findAllGasolineBetweenDates"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsOpeningFeesViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsOpeningFeesViewCfg.java new file mode 100644 index 0000000..5f3287a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsOpeningFeesViewCfg.java @@ -0,0 +1,21 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface StatsOpeningFeesViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_OPENING_FEES_BETWEEN_DATES = "findAllOpeningFeesBetweenDates"; + String QUERY_FIND_ALL_OPENING_FEES_BETWEEN_DATES_USER = "findAllOpeningFeesBetweenDatesUser"; + String FIELD_USER = "user"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPaymentRenovationViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPaymentRenovationViewCfg.java new file mode 100644 index 0000000..2974203 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPaymentRenovationViewCfg.java @@ -0,0 +1,21 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface StatsPaymentRenovationViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_PAYMENT_RENOVATION_BETWEEN_DATES = "findAllPaymentRenovationBetweenDates"; + String QUERY_FIND_ALL_PAYMENT_RENOVATION_BETWEEN_DATES_USER = "findAllPaymentRenovationBetweenDatesUser"; + String FIELD_USER = "user"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPaymentRouteViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPaymentRouteViewCfg.java new file mode 100644 index 0000000..b0b0c73 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPaymentRouteViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface StatsPaymentRouteViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_PAYMENT_ROUTE_BETWEEN_DATES = "findAllPaymentRouteBetweenDates"; + String QUERY_FIND_ALL_PAYMENT_ROUTE_BETWEEN_DATES_ROUTE = "findAllPaymentRouteBetweenDatesRoute"; + + String FIELD_ROUTE = "route"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPaymentViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPaymentViewCfg.java new file mode 100644 index 0000000..484fb7a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPaymentViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface StatsPaymentViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_PAYMENT_BETWEEN_DATES = "findAllPaymentBetweenDates"; + String QUERY_FIND_ALL_PAYMENT_BETWEEN_DATES_USER = "findAllPaymentBetweenDatesUser"; + + String FIELD_USER = "user"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPayrollViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPayrollViewCfg.java new file mode 100644 index 0000000..125a917 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsPayrollViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface StatsPayrollViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_PAYROLL_BETWEEN_DATES = "findAllPayrollBetweenDates"; + String QUERY_FIND_ALL_PAYROLL_BETWEEN_DATES_USER = "findAllPayrollBetweenDatesUser"; + + String FIELD_USER = "user"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsVehicleCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsVehicleCfg.java new file mode 100644 index 0000000..34fa452 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsVehicleCfg.java @@ -0,0 +1,19 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface StatsVehicleCfg extends GenericCfg{ + + String QUERY_FIND_ALL_VEHICLES = "findAllVehicles"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsZeroPaymentsViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsZeroPaymentsViewCfg.java new file mode 100644 index 0000000..cae2d8f --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/StatsZeroPaymentsViewCfg.java @@ -0,0 +1,21 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author David Rodriguez + */ +public interface StatsZeroPaymentsViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_ZERO_PAYMENTS_BETWEEN_DATES = "findAllZeroPaymentsBetweenDates"; + String QUERY_FIND_ALL_ZERO_PAYMENTS_BETWEEN_DATES_USER = "findAllZeroPaymentsBetweenDatesUser"; + String FIELD_USER = "user"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/TotalLoansApprovedByOfficeViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/TotalLoansApprovedByOfficeViewCfg.java new file mode 100644 index 0000000..98cdfc2 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/TotalLoansApprovedByOfficeViewCfg.java @@ -0,0 +1,22 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface TotalLoansApprovedByOfficeViewCfg extends GenericCfg{ + + String QUERY_SUM_ALL_LOANS_BY_OFFICE = "sumLoansApprovedByOffice"; + + String FIELD_VIEW_OFFICE = "idOffice"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/TotalLoansByOfficeViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/TotalLoansByOfficeViewCfg.java new file mode 100644 index 0000000..02de056 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/TotalLoansByOfficeViewCfg.java @@ -0,0 +1,25 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +import com.arrebol.apc.model.core.constance.GenericCfg; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface TotalLoansByOfficeViewCfg extends GenericCfg{ + + String QUERY_FIND_ALL_LOANS_BY_OFFICE = "findAllLoansByOfficeView"; + String QUERY_FIND_ALL_LOANS_BY_USER = "findAllLoansByUserIdSumPaymentDaily"; + String QUERY_COUNT_ALL_LOANS_BY_USER = "countAllLoansByUserIdDaily"; + + String FIELD_VIEW_OFFICE = "idOffice"; + String FIELD_VIEW_USER = "userId"; + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/views/constance/TransferInPendingStatusViewCfg.java b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/TransferInPendingStatusViewCfg.java new file mode 100644 index 0000000..a8049c2 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/views/constance/TransferInPendingStatusViewCfg.java @@ -0,0 +1,17 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.views.constance; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public interface TransferInPendingStatusViewCfg { + + String QUERY_FIND_ALL_TRANSFER_IN_PENDING_STATUS = "findAllTransferInPendingStatus"; +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/AmountJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/AmountJaxb.java new file mode 100644 index 0000000..4b9ab4a --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/AmountJaxb.java @@ -0,0 +1,54 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "amount") +public class AmountJaxb { + + private String customerName; + private Double payment; + + public AmountJaxb() { + } + + public AmountJaxb(String customerName, Double payment) { + this.customerName = customerName; + this.payment = payment; + } + + @XmlElement(name = "customerName") + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + @XmlElement(name = "payment") + public Double getPayment() { + return payment; + } + + public void setPayment(Double payment) { + this.payment = payment; + } + + @Override + public String toString() { + return "AmountJaxb{" + "customerName=" + customerName + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/CashRegisterJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/CashRegisterJaxb.java new file mode 100644 index 0000000..5edeec9 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/CashRegisterJaxb.java @@ -0,0 +1,55 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import java.util.List; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "cashRegister") +public class CashRegisterJaxb { + + private Double totalCash; + private List amounts; + + public CashRegisterJaxb() { + } + + public CashRegisterJaxb(Double totalCash, List amounts) { + this.totalCash = totalCash; + this.amounts = amounts; + } + + @XmlElement(name = "totalCash") + public Double getTotalCash() { + return totalCash; + } + + public void setTotalCash(Double totalCash) { + this.totalCash = totalCash; + } + + @XmlElement(name = "amounts") + public List getAmounts() { + return amounts; + } + + public void setAmounts(List amounts) { + this.amounts = amounts; + } + + @Override + public String toString() { + return "CashRegisterJaxb{" + "amounts=" + amounts + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/ConfigurationJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/ConfigurationJaxb.java new file mode 100644 index 0000000..00101d5 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/ConfigurationJaxb.java @@ -0,0 +1,39 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import java.io.Serializable; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "configuration") +public class ConfigurationJaxb implements Serializable { + + private static final long serialVersionUID = -9152601421411768287L; + + private boolean activeButton; + + public ConfigurationJaxb() { + } + + public ConfigurationJaxb(boolean activeButton) { + this.activeButton = activeButton; + } + + public boolean isActiveButton() { + return activeButton; + } + + public void setActiveButton(boolean activeButton) { + this.activeButton = activeButton; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/Exchange.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/Exchange.java new file mode 100644 index 0000000..02c578f --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/Exchange.java @@ -0,0 +1,65 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import java.math.BigDecimal; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public class Exchange { + + private String id; + private boolean owner; + private BigDecimal amount; + private String action; + + public Exchange() { + } + + public Exchange(String id, boolean owner, BigDecimal amount, String action) { + this.id = id; + this.owner = owner; + this.amount = amount; + this.action = action; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public boolean isOwner() { + return owner; + } + + public void setOwner(boolean owner) { + this.owner = owner; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/ExchangeJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/ExchangeJaxb.java new file mode 100644 index 0000000..a430a14 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/ExchangeJaxb.java @@ -0,0 +1,65 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import java.math.BigDecimal; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "exchange") +public class ExchangeJaxb { + + private String senderId; + private String receiverId; + private String officeId; + private BigDecimal amount; + + public ExchangeJaxb() { + } + + @XmlElement(name = "senderId") + public String getSenderId() { + return senderId; + } + + public void setSenderId(String senderId) { + this.senderId = senderId; + } + + @XmlElement(name = "receiverId") + public String getReceiverId() { + return receiverId; + } + + public void setReceiverId(String receiverId) { + this.receiverId = receiverId; + } + + @XmlElement(name = "officeId") + public String getOfficeId() { + return officeId; + } + + public void setOfficeId(String officeId) { + this.officeId = officeId; + } + + @XmlElement(name = "amount") + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/FeeToPayRequestJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/FeeToPayRequestJaxb.java new file mode 100644 index 0000000..eb77471 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/FeeToPayRequestJaxb.java @@ -0,0 +1,44 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "feeToPay") +public class FeeToPayRequestJaxb { + + String id; + String strDateToPay; + + public FeeToPayRequestJaxb() { + } + + @XmlElement(name = "id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + @XmlElement(name = "strDateToPay") + public String getStrDateToPay() { + return strDateToPay; + } + + public void setStrDateToPay(String strDateToPay) { + this.strDateToPay = strDateToPay; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/FeesToPayByLoanRequestJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/FeesToPayByLoanRequestJaxb.java new file mode 100644 index 0000000..f72070f --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/FeesToPayByLoanRequestJaxb.java @@ -0,0 +1,55 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import java.util.List; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "feesToPayByLoan") +public class FeesToPayByLoanRequestJaxb { + + String idLoan; + String idUser; + List feeToPayList; + + public FeesToPayByLoanRequestJaxb() { + } + + @XmlElement(name = "idLoan") + public String getIdLoan() { + return idLoan; + } + + public void setIdLoan(String idLoan) { + this.idLoan = idLoan; + } + + @XmlElement(name = "idUser") + public String getIdUser() { + return idUser; + } + + public void setIdUser(String idUser) { + this.idUser = idUser; + } + + @XmlElement(name = "feeToPayList") + public List getFeeToPayList() { + return feeToPayList; + } + + public void setFeeToPayList(List feeToPayList) { + this.feeToPayList = feeToPayList; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/LoanDetailJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/LoanDetailJaxb.java new file mode 100644 index 0000000..1743a64 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/LoanDetailJaxb.java @@ -0,0 +1,122 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "loanDetail") +public class LoanDetailJaxb { + + private String paymentDate; + private double paymentOfDay; + private double toPay; + private boolean payment; + private String comment; + private String paymentType; + + public LoanDetailJaxb() { + } + + /** + * Created for add transfer accoutn payments. + * + * @param paymentDate + * @param paymentOfDay + * @param toPay + * @param comment + * @param paymentType + */ + public LoanDetailJaxb(String paymentDate, double paymentOfDay, double toPay, String comment, String paymentType) { + this.paymentDate = paymentDate; + this.paymentOfDay = paymentOfDay; + this.toPay = toPay; + this.comment = comment; + this.paymentType = paymentType; + } + + /** + * + * @param paymentDate + * @param paymentOfDay + * @param toPay + * @param payment true eq payment, false eq fee. + * @param comment + */ + public LoanDetailJaxb(String paymentDate, double paymentOfDay, double toPay, boolean payment, String comment) { + this.paymentDate = paymentDate; + this.paymentOfDay = paymentOfDay; + this.toPay = toPay; + this.payment = payment; + this.comment = comment; + } + + @XmlElement(name = "paymentDate") + public String getPaymentDate() { + return paymentDate; + } + + public void setPaymentDate(String paymentDate) { + this.paymentDate = paymentDate; + } + + @XmlElement(name = "paymentOfDay") + public double getPaymentOfDay() { + return paymentOfDay; + } + + public void setPaymentOfDay(double paymentOfDay) { + this.paymentOfDay = paymentOfDay; + } + + @XmlElement(name = "toPay") + public double getToPay() { + return toPay; + } + + public void setToPay(double toPay) { + this.toPay = toPay; + } + + @XmlElement(name = "payment") + public boolean isPayment() { + return payment; + } + + public void setPayment(boolean payment) { + this.payment = payment; + } + + @XmlElement(name = "comment") + public String getComment() { + return comment; + } + + public void setComment(String comment) { + this.comment = comment; + } + + @XmlElement(name = "paymentType") + public String getPaymentType() { + return paymentType; + } + + public void setPaymentType(String paymentType) { + this.paymentType = paymentType; + } + + @Override + public String toString() { + return "LoanDetailJaxb{" + "paymentDate=" + paymentDate + ", paymentOfDay=" + paymentOfDay + ", toPay=" + toPay + ", payment=" + payment + '}'; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/LoanJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/LoanJaxb.java new file mode 100644 index 0000000..36dfdc9 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/LoanJaxb.java @@ -0,0 +1,44 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import java.util.List; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "loan") +public class LoanJaxb { + + private List loanDetails; + + public LoanJaxb() { + } + + public LoanJaxb(List loanDetails) { + this.loanDetails = loanDetails; + } + + @XmlElement(name = "loanDetails") + public List getLoanDetails() { + return loanDetails; + } + + public void setLoanDetails(List loanDetails) { + this.loanDetails = loanDetails; + } + + @Override + public String toString() { + return "LoanJaxb{" + "loanDetails=" + loanDetails + '}'; + } +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/LoanRequestedJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/LoanRequestedJaxb.java new file mode 100644 index 0000000..0baa5f9 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/LoanRequestedJaxb.java @@ -0,0 +1,112 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "loanRequested") +public class LoanRequestedJaxb { + + private String loanTypeId; + private String officeId; + private String userId; + private String routeId; + private PersonJaxb customer; + private PersonJaxb endorsement; + private String strDate; + private String routeIdNewClient; + + public LoanRequestedJaxb() { + } + + @XmlElement(name = "loanTypeId") + public String getLoanTypeId() { + return loanTypeId; + } + + public void setLoanTypeId(String loanTypeId) { + this.loanTypeId = loanTypeId; + } + + @XmlElement(name = "officeId") + public String getOfficeId() { + return officeId; + } + + public void setOfficeId(String officeId) { + this.officeId = officeId; + } + + @XmlElement(name = "userId") + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + @XmlElement(name = "routeId") + public String getRouteId() { + return routeId; + } + + public void setRouteId(String routeId) { + this.routeId = routeId; + } + + @XmlElement(name = "customer") + public PersonJaxb getCustomer() { + return customer; + } + + public void setCustomer(PersonJaxb customer) { + this.customer = customer; + } + + @XmlElement(name = "endorsement") + public PersonJaxb getEndorsement() { + return endorsement; + } + + public void setEndorsement(PersonJaxb endorsement) { + this.endorsement = endorsement; + } + + @XmlElement(name = "strDate") + public String getStrDate() { + return strDate; + } + + public void setStrDate(String strDate) { + this.strDate = strDate; + } + + @XmlElement(name = "routeIdNewClient") + public String getRouteIdNewClient() { + return routeIdNewClient; + } + + public String chooseRouteId() { + try { + return null == getRouteIdNewClient() || "".equals(getRouteIdNewClient()) ? getRouteId() : getRouteIdNewClient(); + } catch (Exception e) { + return getRouteId(); + } + } + + public void setRouteIdNewClient(String routeIdNewClient) { + this.routeIdNewClient = routeIdNewClient; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/NewAmountJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/NewAmountJaxb.java new file mode 100644 index 0000000..6b0b013 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/NewAmountJaxb.java @@ -0,0 +1,118 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import java.math.BigDecimal; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "newAmount") +public class NewAmountJaxb { + + private String loanId; + private String userId; + private String officeId; + private boolean customer; + private BigDecimal amount; + private String strDate; + private boolean fee; + private String comments; + private Boolean manager; + + public NewAmountJaxb() { + } + + @XmlAttribute(name = "loanId") + public String getLoanId() { + return loanId; + } + + public void setLoanId(String loanId) { + this.loanId = loanId; + } + + @XmlAttribute(name = "userId") + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + @XmlAttribute(name = "officeId") + public String getOfficeId() { + return officeId; + } + + public void setOfficeId(String officeId) { + this.officeId = officeId; + } + + @XmlAttribute(name = "customer") + public boolean isCustomer() { + return customer; + } + + public void setCustomer(boolean customer) { + this.customer = customer; + } + + @XmlAttribute(name = "amount") + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + @XmlAttribute(name = "strDate") + public String getStrDate() { + return strDate; + } + + public void setStrDate(String strDate) { + this.strDate = strDate; + } + + @XmlAttribute(name = "fee") + public boolean isFee() { + return fee; + } + + public void setFee(boolean fee) { + this.fee = fee; + } + + @XmlAttribute(name = "comments") + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + @XmlAttribute(name = "manager") + public Boolean getManager() { + if (null == manager) { + manager = false; + } + return manager; + } + + public void setManager(Boolean manager) { + this.manager = manager; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/NewTransferAccountJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/NewTransferAccountJaxb.java new file mode 100644 index 0000000..a765d16 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/NewTransferAccountJaxb.java @@ -0,0 +1,98 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import java.math.BigDecimal; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "newTransferAccount") +public class NewTransferAccountJaxb { + + private String loanId; + private String userId; + private String officeId; + private BigDecimal amount; + private String comments; + private String transferReference; + private Boolean manager; + + public NewTransferAccountJaxb() { + } + + @XmlAttribute(name = "loanId") + public String getLoanId() { + return loanId; + } + + public void setLoanId(String loanId) { + this.loanId = loanId; + } + + @XmlAttribute(name = "userId") + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + @XmlAttribute(name = "officeId") + public String getOfficeId() { + return officeId; + } + + public void setOfficeId(String officeId) { + this.officeId = officeId; + } + + @XmlAttribute(name = "amount") + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + @XmlAttribute(name = "comments") + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + @XmlAttribute(name = "transferReference") + public String getTransferReference() { + return transferReference; + } + + public void setTransferReference(String transferReference) { + this.transferReference = transferReference; + } + + @XmlAttribute(name = "manager") + public Boolean getManager() { + if (null == manager) { + manager = false; + } + return manager; + } + + public void setManager(Boolean manager) { + this.manager = manager; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/PersonJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/PersonJaxb.java new file mode 100644 index 0000000..679ce08 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/PersonJaxb.java @@ -0,0 +1,144 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "person") +public class PersonJaxb { + + private String id; + private String firstName; + private String secondName; + private String lastName; + private String middleName; + private String addressHome; + private String addressWork; + private String phoneHome; + private String phoneWork; + private String thumbnail; + private String companyName; + private boolean createPerson; + + public PersonJaxb() { + } + + @XmlElement(name = "id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + @XmlElement(name = "firstName") + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + @XmlElement(name = "secondName") + public String getSecondName() { + return secondName; + } + + public void setSecondName(String secondName) { + this.secondName = secondName; + } + + @XmlElement(name = "lastName") + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + @XmlElement(name = "middleName") + public String getMiddleName() { + return middleName; + } + + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + + @XmlElement(name = "addressHome") + public String getAddressHome() { + return addressHome; + } + + public void setAddressHome(String addressHome) { + this.addressHome = addressHome; + } + + @XmlElement(name = "addressWork") + public String getAddressWork() { + return addressWork; + } + + public void setAddressWork(String addressWork) { + this.addressWork = addressWork; + } + + @XmlElement(name = "phoneHome") + public String getPhoneHome() { + return phoneHome; + } + + public void setPhoneHome(String phoneHome) { + this.phoneHome = phoneHome; + } + + @XmlElement(name = "phoneWork") + public String getPhoneWork() { + return phoneWork; + } + + public void setPhoneWork(String phoneWork) { + this.phoneWork = phoneWork; + } + + @XmlElement(name = "thumbnail") + public String getThumbnail() { + return thumbnail; + } + + public void setThumbnail(String thumbnail) { + this.thumbnail = thumbnail; + } + + @XmlElement(name = "companyName") + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + @XmlElement(name = "createPerson") + public boolean isCreatePerson() { + return createPerson; + } + + public void setCreatePerson(boolean createPerson) { + this.createPerson = createPerson; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/RenovationWithEndorsementJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/RenovationWithEndorsementJaxb.java new file mode 100644 index 0000000..8be9909 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/RenovationWithEndorsementJaxb.java @@ -0,0 +1,104 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "renovationWithEndorsement") +public class RenovationWithEndorsementJaxb { + + private String loan; + private String credit; + private String user; + private String office; + private double amount; + private String currentOwner; + private PersonJaxb endorsement; + private boolean hasPaymentToday; + + public RenovationWithEndorsementJaxb() { + } + + @XmlElement(name = "loan") + public String getLoan() { + return loan; + } + + public void setLoan(String loan) { + this.loan = loan; + } + + @XmlElement(name = "credit") + public String getCredit() { + return credit; + } + + public void setCredit(String credit) { + this.credit = credit; + } + + @XmlElement(name = "user") + public String getUser() { + return user; + } + + public void setUser(String user) { + this.user = user; + } + + @XmlElement(name = "office") + public String getOffice() { + return office; + } + + public void setOffice(String office) { + this.office = office; + } + + @XmlElement(name = "amount") + public double getAmount() { + return amount; + } + + public void setAmount(double amount) { + this.amount = amount; + } + + @XmlElement(name = "currentOwner") + public String getCurrentOwner() { + return currentOwner; + } + + public void setCurrentOwner(String currentOwner) { + this.currentOwner = currentOwner; + } + + @XmlElement(name = "endorsement") + public PersonJaxb getEndorsement() { + return endorsement; + } + + public void setEndorsement(PersonJaxb endorsement) { + this.endorsement = endorsement; + } + + @XmlElement(name = "hasPaymentToday") + public boolean isHasPaymentToday() { + return hasPaymentToday; + } + + public void setHasPaymentToday(boolean hasPaymentToday) { + this.hasPaymentToday = hasPaymentToday; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/ThumbnailJaxb.java b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/ThumbnailJaxb.java new file mode 100644 index 0000000..fc29062 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/model/ws/parsed/ThumbnailJaxb.java @@ -0,0 +1,48 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.model.ws.parsed; + +import java.io.InputStream; +import java.io.Serializable; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@XmlRootElement(name = "thumbnail") +public class ThumbnailJaxb implements Serializable { + + private static final long serialVersionUID = -2300144785732796661L; + + private String name; + private InputStream file; + + public ThumbnailJaxb() { + } + + @XmlElement(name = "name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @XmlElement(name = "file") + public InputStream getFile() { + return file; + } + + public void setFile(InputStream file) { + this.file = file; + } + +} diff --git a/ace-model/src/main/java/com/arrebol/apc/test/ArrebolTest.java b/ace-model/src/main/java/com/arrebol/apc/test/ArrebolTest.java new file mode 100644 index 0000000..dd64d12 --- /dev/null +++ b/ace-model/src/main/java/com/arrebol/apc/test/ArrebolTest.java @@ -0,0 +1,82 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.test; + +import java.io.Serializable; +import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import org.hibernate.annotations.GenericGenerator; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Entity +@Table(name = "ARREBOL_TEST") +public class ArrebolTest implements Serializable { + + private static final long serialVersionUID = -4942816498584779625L; + + @Id + @GeneratedValue(generator = "uuid") + @GenericGenerator(name = "uuid", strategy = "uuid2") + @Column(name = "id", length = 36) + private String id; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "created_on", length = 19) + private Date createdOn; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "last_updated_on", length = 19) + private Date lastUpdatedOn; + + public ArrebolTest() { + } + + public ArrebolTest(Date createdOn, Date lastUpdatedOn) { + this.createdOn = createdOn; + this.lastUpdatedOn = lastUpdatedOn; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public Date getLastUpdatedOn() { + return lastUpdatedOn; + } + + public void setLastUpdatedOn(Date lastUpdatedOn) { + this.lastUpdatedOn = lastUpdatedOn; + } + + @Override + public String toString() { + return "ArrebolTest{" + "id=" + id + ", createdOn=" + createdOn + ", lastUpdatedOn=" + lastUpdatedOn + '}'; + } + +} diff --git a/ace-model/src/main/resources/apc.cfg.xml b/ace-model/src/main/resources/apc.cfg.xml new file mode 100644 index 0000000..aad54c8 --- /dev/null +++ b/ace-model/src/main/resources/apc.cfg.xml @@ -0,0 +1,230 @@ + + + + + org.hibernate.dialect.MySQLDialect + com.mysql.cj.jdbc.Driver + ${hibernate.connection.url} + ${hibernate.connection.username} + ${hibernate.connection.password} + ${hibernate.connection.min_size} + ${hibernate.connection.max_size} + ${hibernate.connection.timeout} + ${hibernate.connection.max_statements} + 3000 + false + false + true + thread + ${hibernate.connection.noAccessToProcedureBodies} + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/catalog/queries/people.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/catalog/queries/people.queries.hbm.xml new file mode 100644 index 0000000..52cf937 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/catalog/queries/people.queries.hbm.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/catalog/queries/roles.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/catalog/queries/roles.queries.hbm.xml new file mode 100644 index 0000000..7c1fb14 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/catalog/queries/roles.queries.hbm.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/catalog/queries/routes.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/catalog/queries/routes.queries.hbm.xml new file mode 100644 index 0000000..01f6252 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/catalog/queries/routes.queries.hbm.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/advance.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/advance.queries.hbm.xml new file mode 100644 index 0000000..c593942 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/advance.queries.hbm.xml @@ -0,0 +1,41 @@ + + + + + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(createdOn) + ORDER BY createdOn + ]]> + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/bitacora.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/bitacora.queries.hbm.xml new file mode 100644 index 0000000..c2bf3e5 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/bitacora.queries.hbm.xml @@ -0,0 +1,28 @@ + + + + + + + + + + = DATE(:startDate) + AND DATE(:endDate) >= DATE(created_on) + ORDER BY createdOn DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/bonus.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/bonus.queries.hbm.xml new file mode 100644 index 0000000..c18cce4 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/bonus.queries.hbm.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(b.createdOn) + ORDER BY b.createdOn + ]]> + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/closing.day.detail.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/closing.day.detail.queries.hbm.xml new file mode 100644 index 0000000..c4f6ed0 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/closing.day.detail.queries.hbm.xml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/closing_day.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/closing_day.queries.hbm.xml new file mode 100644 index 0000000..96cc9ba --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/closing_day.queries.hbm.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/expense.company.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/expense.company.queries.hbm.xml new file mode 100644 index 0000000..418c214 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/expense.company.queries.hbm.xml @@ -0,0 +1,43 @@ + + + + + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(createdOn) + ORDER BY createdOn DESC + ]]> + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/goal.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/goal.queries.hbm.xml new file mode 100644 index 0000000..e6a9f5a --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/goal.queries.hbm.xml @@ -0,0 +1,42 @@ + + + + + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(createdOn) + ORDER BY createdOn + ]]> + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/money.daily.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/money.daily.queries.hbm.xml new file mode 100644 index 0000000..d080173 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/money.daily.queries.hbm.xml @@ -0,0 +1,43 @@ + + + + + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(m.createdOn) + ORDER BY m.createdOn DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(m.createdOn) AND + m.user = :user + ORDER BY m.createdOn DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/other.expense.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/other.expense.queries.hbm.xml new file mode 100644 index 0000000..ae3183a --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/other.expense.queries.hbm.xml @@ -0,0 +1,43 @@ + + + + + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(e.createdOn) + ORDER BY e.createdOn DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(e.createdOn) AND + user = :user + ORDER BY e.createdOn DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/stable.general.box.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/stable.general.box.queries.hbm.xml new file mode 100644 index 0000000..b4aee08 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/stable.general.box.queries.hbm.xml @@ -0,0 +1,92 @@ + + + + + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(createdOn) AND + active_status = 'ENEBLED' + ORDER BY createdOn DESC + ]]> + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/stable.small.box.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/stable.small.box.queries.hbm.xml new file mode 100644 index 0000000..3552dc6 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/stable.small.box.queries.hbm.xml @@ -0,0 +1,80 @@ + + + + + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(createdOn) + ORDER BY createdOn DESC + ]]> + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/transfer.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/transfer.queries.hbm.xml new file mode 100644 index 0000000..fe07a98 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/admin/transfer.queries.hbm.xml @@ -0,0 +1,100 @@ + + + + + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(createdOn) + ORDER BY createdOn + ]]> + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/human.resource.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/human.resource.queries.hbm.xml new file mode 100644 index 0000000..2dd9a27 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/human.resource.queries.hbm.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/mobile.user.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/mobile.user.queries.hbm.xml new file mode 100644 index 0000000..620a689 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/mobile.user.queries.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/office.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/office.queries.hbm.xml new file mode 100644 index 0000000..1e299d7 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/office.queries.hbm.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/permission.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/permission.queries.hbm.xml new file mode 100644 index 0000000..0b4d8c7 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/permission.queries.hbm.xml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/user.by.office.has.permission.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/user.by.office.has.permission.queries.hbm.xml new file mode 100644 index 0000000..8841c93 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/user.by.office.has.permission.queries.hbm.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/user.by.office.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/user.by.office.queries.hbm.xml new file mode 100644 index 0000000..446e1fa --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/user.by.office.queries.hbm.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/user.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/user.queries.hbm.xml new file mode 100644 index 0000000..bf1475a --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/core/user.queries.hbm.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/delivery.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/delivery.queries.hbm.xml new file mode 100644 index 0000000..5093589 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/delivery.queries.hbm.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.by.renovation.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.by.renovation.queries.hbm.xml new file mode 100644 index 0000000..a47c73a --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.by.renovation.queries.hbm.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.by.user.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.by.user.queries.hbm.xml new file mode 100644 index 0000000..0fbf585 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.by.user.queries.hbm.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.details.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.details.queries.hbm.xml new file mode 100644 index 0000000..8e4ad9d --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.details.queries.hbm.xml @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.employee.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.employee.hbm.xml new file mode 100644 index 0000000..2ecd466 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.employee.hbm.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.fee.notification.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.fee.notification.queries.hbm.xml new file mode 100644 index 0000000..8f7f2d2 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.fee.notification.queries.hbm.xml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.queries.hbm.xml new file mode 100644 index 0000000..7b85383 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.queries.hbm.xml @@ -0,0 +1,495 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + 30 + AND l.loanStatus = 'APPROVED' + AND (l.amountToPay - l.amountPaid) > 0 + ORDER BY + l.createdOn + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(l.fecha) + ORDER BY l.fecha + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(l.fechaJuridico) + ORDER BY l.fecha + ]]> + + + + + + + + + + + + + + + + + + + + = lt.paymentDaily + THEN + lt.paymentDaily + ELSE + (l.amountToPay - l.amountPaid) + END + )AS paymentDaily, + lt.fee AS fee, + (SELECT count(notificationNumber) FROM LoanFeeNotification WHERE loan = l.id) AS notificationNumber, + ( + CASE + WHEN + l.amountPaid >= (SELECT FLOOR(lt.paymentTotal * .6364) FROM LoanType WHERE id = l.loanType) + THEN + CASE + WHEN + (SELECT COUNT(notificationNumber) as total + FROM LoanFeeNotification + WHERE loan = l.id + ) < 4 + THEN 'ENEBLED' + WHEN + (SELECT count(notificationNumber) as total + FROM LoanFeeNotification + WHERE loan = l.id + ) BETWEEN 4 AND 5 + AND + (SELECT COUNT(lt_inner.id) + FROM Loan l_inner + INNER JOIN LoanType lt_inner ON l_inner.loanType = lt_inner.id + WHERE l_inner.id = l.id AND + lt.payment <= lt_inner.payment - 1000) > 0 + THEN 'ENEBLED' + ELSE 'DISABLED' + END + ELSE + 'DISABLED' + END + ) AS renovation, + (SELECT amountToPay - amountPaid FROM Loan WHERE id = l.id) AS maxAmountToPay, + ( + CASE + WHEN + (SELECT COUNT(count_ld.id) FROM LoanDetails count_ld WHERE count_ld.loan = l.id AND DATE(count_ld.createdOn) = CURDATE()) > 0 + THEN + 1 + ELSE + 0 + END + ) AS hasPaymentToday, + l.id AS loanId, + ( + SELECT + inner_lby.user.id + FROM + LoanByUser inner_lby + INNER JOIN + Loan inner_l ON inner_lby.loan = inner_l.id + WHERE + inner_l.loanStatus = 'APPROVED' AND + inner_lby.ownerLoan = 'CURRENT_OWNER' AND + inner_lby.loan = l.id + ) AS currentOwner + FROM + LoanByUser lbu + INNER JOIN Loan l ON lbu.loan = l.id + INNER JOIN LoanType lt ON l.loanType = lt.id + INNER JOIN People cstmr ON l.customer = cstmr.id + INNER JOIN People ndrsmnt ON l.endorsement = ndrsmnt.id + WHERE + l.customer = :customer AND + l.loanStatus = 'APPROVED' AND + 1 = (CASE + WHEN + (SELECT COUNT(case_l.id) AS TOTAL + FROM Loan case_l + INNER JOIN LoanByUser case_lbu ON case_l.id = case_lbu.loan + WHERE + case_l.customer = :customer AND + case_l.loanStatus = 'APPROVED' AND + case_lbu.ownerLoan = 'CURRENT_OWNER' AND + case_lbu.user = :user + + ) = 1 + THEN + 1 + WHEN + l.routeCtlg IN (SELECT case_hrhr.routeCtlg + FROM HumanResourceHasRoute case_hrhr + INNER JOIN User case_u ON case_hrhr.humanResource = case_u.humanResource + WHERE + case_u.id = :id AND + case_u.certifier = 'ENEBLED') + THEN + 1 + ELSE + 0 + END) + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.type.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.type.queries.hbm.xml new file mode 100644 index 0000000..8b96da1 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/loan/loan.type.queries.hbm.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/gasoline/gasoline.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/gasoline/gasoline.hbm.xml new file mode 100644 index 0000000..33242f8 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/gasoline/gasoline.hbm.xml @@ -0,0 +1,23 @@ + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/preference/user.mobile.preference.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/preference/user.mobile.preference.queries.hbm.xml new file mode 100644 index 0000000..cd593c7 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/preference/user.mobile.preference.queries.hbm.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/reports/user.week.report.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/reports/user.week.report.hbm.xml new file mode 100644 index 0000000..296a849 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/reports/user.week.report.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/available.customers.view.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/available.customers.view.queries.hbm.xml new file mode 100644 index 0000000..9284cb4 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/available.customers.view.queries.hbm.xml @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/available.endorsements.view.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/available.endorsements.view.queries.hbm.xml new file mode 100644 index 0000000..8a471bf --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/available.endorsements.view.queries.hbm.xml @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/availables.owners.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/availables.owners.view.hbm.xml new file mode 100644 index 0000000..9e7c932 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/availables.owners.view.hbm.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/cash.register.curdate.by.user.view.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/cash.register.curdate.by.user.view.queries.hbm.xml new file mode 100644 index 0000000..492081d --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/cash.register.curdate.by.user.view.queries.hbm.xml @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/current.customer.by.loan.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/current.customer.by.loan.view.hbm.xml new file mode 100644 index 0000000..4794c46 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/current.customer.by.loan.view.hbm.xml @@ -0,0 +1,19 @@ + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/exchange.enebled.users.view.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/exchange.enebled.users.view.queries.hbm.xml new file mode 100644 index 0000000..c928e43 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/exchange.enebled.users.view.queries.hbm.xml @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.approved.detail.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.approved.detail.view.hbm.xml new file mode 100644 index 0000000..8ec52b2 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.approved.detail.view.hbm.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.by.user.order.preference.view.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.by.user.order.preference.view.queries.hbm.xml new file mode 100644 index 0000000..57c4acf --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.by.user.order.preference.view.queries.hbm.xml @@ -0,0 +1,18 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.by.user.view.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.by.user.view.queries.hbm.xml new file mode 100644 index 0000000..7846824 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.by.user.view.queries.hbm.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.in.pending.status.to.delivery.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.in.pending.status.to.delivery.view.hbm.xml new file mode 100644 index 0000000..23b43dc --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.in.pending.status.to.delivery.view.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.to.delivery.by.ciertifier.view.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.to.delivery.by.ciertifier.view.queries.hbm.xml new file mode 100644 index 0000000..2a0f54e --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/loan.to.delivery.by.ciertifier.view.queries.hbm.xml @@ -0,0 +1,17 @@ + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/person.search.detail.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/person.search.detail.view.hbm.xml new file mode 100644 index 0000000..5093589 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/person.search.detail.view.hbm.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/person.search.historical.details.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/person.search.historical.details.view.hbm.xml new file mode 100644 index 0000000..4fe154a --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/person.search.historical.details.view.hbm.xml @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/person.search.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/person.search.view.hbm.xml new file mode 100644 index 0000000..cf19b32 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/person.search.view.hbm.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/total.cash.by.curdate.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/total.cash.by.curdate.view.hbm.xml new file mode 100644 index 0000000..a227b3c --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/mobile/views/total.cash.by.curdate.view.hbm.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/payroll/payroll.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/payroll/payroll.queries.hbm.xml new file mode 100644 index 0000000..f89e04f --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/payroll/payroll.queries.hbm.xml @@ -0,0 +1,201 @@ + + + + + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(createdOn) + ORDER BY createdOn DESC + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/payroll/total.expected.payment.daily.by.user.queries.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/payroll/total.expected.payment.daily.by.user.queries.hbm.xml new file mode 100644 index 0000000..03052b9 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/payroll/total.expected.payment.daily.by.user.queries.hbm.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/administration.person.serch.view.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/administration.person.serch.view.xml new file mode 100644 index 0000000..c92cf67 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/administration.person.serch.view.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/advance.user.daily.detail.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/advance.user.daily.detail.view.hbm.xml new file mode 100644 index 0000000..f2e5cf0 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/advance.user.daily.detail.view.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/advance.user.daily.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/advance.user.daily.view.hbm.xml new file mode 100644 index 0000000..468b34b --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/advance.user.daily.view.hbm.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/customer.without.renovation.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/customer.without.renovation.view.hbm.xml new file mode 100644 index 0000000..5cbfc4a --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/customer.without.renovation.view.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/enabled.user.details.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/enabled.user.details.view.hbm.xml new file mode 100644 index 0000000..fb1e0df --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/enabled.user.details.view.hbm.xml @@ -0,0 +1,24 @@ + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/general.box.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/general.box.view.hbm.xml new file mode 100644 index 0000000..633fc1a --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/general.box.view.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/information.loan.last.week.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/information.loan.last.week.view.hbm.xml new file mode 100644 index 0000000..805147d --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/information.loan.last.week.view.hbm.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/information.loan.week.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/information.loan.week.view.hbm.xml new file mode 100644 index 0000000..f7d3ed3 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/information.loan.week.view.hbm.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.by.user.payment.zero.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.by.user.payment.zero.view.hbm.xml new file mode 100644 index 0000000..54e0c6a --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.by.user.payment.zero.view.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.employee.detail.all.data.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.employee.detail.all.data.view.hbm.xml new file mode 100644 index 0000000..13b1f75 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.employee.detail.all.data.view.hbm.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.employee.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.employee.view.hbm.xml new file mode 100644 index 0000000..65cc817 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.employee.view.hbm.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.renovation.devilery.weekly.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.renovation.devilery.weekly.view.hbm.xml new file mode 100644 index 0000000..a168f2f --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/loan.renovation.devilery.weekly.view.hbm.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/money.daily.by.user.certifier.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/money.daily.by.user.certifier.view.hbm.xml new file mode 100644 index 0000000..26bc378 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/money.daily.by.user.certifier.view.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/payment.detail.from.user.by.curdate.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/payment.detail.from.user.by.curdate.view.hbm.xml new file mode 100644 index 0000000..f45b768 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/payment.detail.from.user.by.curdate.view.hbm.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.new.customer.last.week.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.new.customer.last.week.view.hbm.xml new file mode 100644 index 0000000..d790893 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.new.customer.last.week.view.hbm.xml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.new.customer.week.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.new.customer.week.view.hbm.xml new file mode 100644 index 0000000..0386697 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.new.customer.week.view.hbm.xml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.total.last.week.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.total.last.week.view.hbm.xml new file mode 100644 index 0000000..6f1ae3e --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.total.last.week.view.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.total.week.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.total.week.view.hbm.xml new file mode 100644 index 0000000..ca6c87e --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/resumen.total.week.view.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.advances.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.advances.view.hbm.xml new file mode 100644 index 0000000..375cf45 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.advances.view.hbm.xml @@ -0,0 +1,31 @@ + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) + ORDER BY created_on DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) AND + idRoute = :route + ORDER BY created_on DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.closing.day.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.closing.day.view.hbm.xml new file mode 100644 index 0000000..93853cb --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.closing.day.view.hbm.xml @@ -0,0 +1,31 @@ + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) + ORDER BY created_on DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) AND + idUser = :user + ORDER BY created_on DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.deposits.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.deposits.view.hbm.xml new file mode 100644 index 0000000..73d9254 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.deposits.view.hbm.xml @@ -0,0 +1,31 @@ + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) + ORDER BY created_on DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) AND + idUser = :user + ORDER BY created_on DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.employee.saving.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.employee.saving.view.hbm.xml new file mode 100644 index 0000000..c51338c --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.employee.saving.view.hbm.xml @@ -0,0 +1,31 @@ + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) + ORDER BY created_on DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) + AND id_user = :idUser + ORDER BY created_on DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.fees.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.fees.view.hbm.xml new file mode 100644 index 0000000..b56a963 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.fees.view.hbm.xml @@ -0,0 +1,44 @@ + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) + ORDER BY created_on DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) AND + idUser = :user + ORDER BY created_on DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) AND + idRoute = :route + ORDER BY created_on DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.gasoline.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.gasoline.view.hbm.xml new file mode 100644 index 0000000..8939642 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.gasoline.view.hbm.xml @@ -0,0 +1,18 @@ + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) + ORDER BY created_on DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.opening.fees.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.opening.fees.view.hbm.xml new file mode 100644 index 0000000..1b4f5d4 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.opening.fees.view.hbm.xml @@ -0,0 +1,31 @@ + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) + ORDER BY created_on DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) AND + idUser = :user + ORDER BY created_on DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payment.renovation.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payment.renovation.view.hbm.xml new file mode 100644 index 0000000..481d931 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payment.renovation.view.hbm.xml @@ -0,0 +1,31 @@ + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) + ORDER BY created_on DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) AND + idUser = :user + ORDER BY created_on DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payment.route.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payment.route.view.hbm.xml new file mode 100644 index 0000000..3f0f1a0 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payment.route.view.hbm.xml @@ -0,0 +1,31 @@ + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) + ORDER BY created_on DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) AND + idRoute = :route + ORDER BY created_on DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payment.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payment.view.hbm.xml new file mode 100644 index 0000000..9d30582 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payment.view.hbm.xml @@ -0,0 +1,31 @@ + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) + ORDER BY created_on DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) AND + idUser = :user + ORDER BY created_on DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payroll.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payroll.view.hbm.xml new file mode 100644 index 0000000..cdf5d4b --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.payroll.view.hbm.xml @@ -0,0 +1,31 @@ + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) + ORDER BY created_on DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) AND + idUser = :user + ORDER BY created_on DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.vehicle.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.vehicle.view.hbm.xml new file mode 100644 index 0000000..9f5a1f8 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.vehicle.view.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.zero.payments.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.zero.payments.view.hbm.xml new file mode 100644 index 0000000..e45d6f4 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/stats.zero.payments.view.hbm.xml @@ -0,0 +1,31 @@ + + + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) + ORDER BY created_on DESC + ]]> + + + + = DATE(:startDate) AND + DATE(:endDate) >= DATE(created_on) AND + idUser = :user + ORDER BY created_on DESC + ]]> + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.closing.daily.detail.from.user.by.curdate.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.closing.daily.detail.from.user.by.curdate.view.hbm.xml new file mode 100644 index 0000000..0cd4796 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.closing.daily.detail.from.user.by.curdate.view.hbm.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.closing.day.by.curdate.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.closing.day.by.curdate.view.hbm.xml new file mode 100644 index 0000000..525bcf0 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.closing.day.by.curdate.view.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.loans.approved.by.office.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.loans.approved.by.office.view.hbm.xml new file mode 100644 index 0000000..74dbe53 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.loans.approved.by.office.view.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.loans.by.office.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.loans.by.office.view.hbm.xml new file mode 100644 index 0000000..35ebd64 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/total.loans.by.office.view.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/transfer.in.pending.status.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/transfer.in.pending.status.view.hbm.xml new file mode 100644 index 0000000..7a1a1e8 --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/transfer.in.pending.status.view.hbm.xml @@ -0,0 +1,20 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/user.by.route.view.hbm.xml b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/user.by.route.view.hbm.xml new file mode 100644 index 0000000..5ecc37e --- /dev/null +++ b/ace-model/src/main/resources/com/arrebol/apc/model/queries/view/user.by.route.view.hbm.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/ace-security/nb-configuration.xml b/ace-security/nb-configuration.xml new file mode 100644 index 0000000..a65c451 --- /dev/null +++ b/ace-security/nb-configuration.xml @@ -0,0 +1,18 @@ + + + + + + JDK_1.8 + + diff --git a/ace-security/pom.xml b/ace-security/pom.xml new file mode 100644 index 0000000..4cbf081 --- /dev/null +++ b/ace-security/pom.xml @@ -0,0 +1,58 @@ + + + 4.0.0 + com.arrebol + ace-security + 1.0.0 + jar + + UTF-8 + 1.8 + 1.8 + 2.17.0 + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12.4 + + true + + + + + + + + org.apache.logging.log4j + log4j-api + ${log4j.version} + + + org.apache.logging.log4j + log4j-core + ${log4j.version} + + + + junit + junit + 4.12 + test + + + ace-security + \ No newline at end of file diff --git a/ace-security/src/main/java/com/arrebol/apc/security/APCSecure.java b/ace-security/src/main/java/com/arrebol/apc/security/APCSecure.java new file mode 100644 index 0000000..177acb6 --- /dev/null +++ b/ace-security/src/main/java/com/arrebol/apc/security/APCSecure.java @@ -0,0 +1,68 @@ +package com.arrebol.apc.security; + +import java.nio.charset.Charset; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.xml.bind.DatatypeConverter; + +/** + * + * @author Picasso + */ +public class APCSecure { + + private static final String DIGEST_METHOD = "SHA-256"; + private static final String ENCODING = "UTF-8"; + private static final String[] SECRET = {"Capoeira", "CaperucitaRoja", "Guardian"}; + + private final String app; + private String password; + + public APCSecure(String app, String password) { + this.app = app; + this.password = password; + } + + public String getPassword() { + MessageDigest md = null; + StringBuilder builder = new StringBuilder().append(SECRET[0].charAt(SECRET[0].length() - 2)); + + try { + md = MessageDigest.getInstance(DIGEST_METHOD); + + builder.append(password.charAt(1)); + builder.append(password.charAt(password.length() - 2)); + builder.append(password); + builder.append(SECRET[1]); + builder.append(password.charAt(0)); + builder.append(password.charAt(password.length() - 1)); + + for (int i = app.length(); i > 0; i--) { + builder.append(app.charAt(i - 1)); + } + + for (int i = SECRET[0].length(); i > 0; i--) { + builder.append(SECRET[0].charAt(i - 1)); + } + + for (int i = password.length(); i > 0; i--) { + builder.append(password.charAt(i - 1)); + } + + for (int i = 0; i < SECRET[2].length(); i++) { + builder.append(SECRET[2].charAt(i)); + } + + byte[] digest = md.digest(builder.toString().getBytes(Charset.forName(ENCODING))); + + return this.password = DatatypeConverter.printHexBinary(digest).toUpperCase(); + + } catch (NoSuchAlgorithmException ex) { + Logger.getLogger(APCSecure.class.getName()).log(Level.SEVERE, null, ex); + return ""; + } + } + +} diff --git a/ace-security/src/main/resources/log4j2.xml b/ace-security/src/main/resources/log4j2.xml new file mode 100644 index 0000000..4b01a88 --- /dev/null +++ b/ace-security/src/main/resources/log4j2.xml @@ -0,0 +1,19 @@ + + + + + + %d{dd-MM-yyyy HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-security/src/test/java/com/arrebol/apc/security/APCSecureTest.java b/ace-security/src/test/java/com/arrebol/apc/security/APCSecureTest.java new file mode 100644 index 0000000..d39de3a --- /dev/null +++ b/ace-security/src/test/java/com/arrebol/apc/security/APCSecureTest.java @@ -0,0 +1,40 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.security; + +import org.junit.Before; +import org.junit.Test; +import static org.junit.Assert.*; + +/** + * + * @author Picasso + */ +public class APCSecureTest { + + private static final String APP_NAME = "ApoyoAProyectosComerciales"; + private static final String PASSWORD = "12345678"; + private APCSecure apcSecure; + + public APCSecureTest() { + } + + @Before + public void setUp() { + this.apcSecure = new APCSecure(APP_NAME, PASSWORD); + } + + @Test + public void getPassword() { + try { + String pwd = apcSecure.getPassword(); + System.out.println(pwd); + assertNotNull(pwd); + } catch (Exception e) { + } + } + +} diff --git a/ace-web/faces-config.NavData b/ace-web/faces-config.NavData new file mode 100644 index 0000000..298bfc5 --- /dev/null +++ b/ace-web/faces-config.NavData @@ -0,0 +1,6 @@ + + + + + + diff --git a/ace-web/faces-config_old.NavData b/ace-web/faces-config_old.NavData new file mode 100644 index 0000000..e69de29 diff --git a/ace-web/nb-configuration.xml b/ace-web/nb-configuration.xml new file mode 100644 index 0000000..1dab374 --- /dev/null +++ b/ace-web/nb-configuration.xml @@ -0,0 +1,22 @@ + + + + + + 1.8-web + Tomcat + true + JDK_1.8 + JSP + + diff --git a/ace-web/pom.xml b/ace-web/pom.xml new file mode 100644 index 0000000..7a485f4 --- /dev/null +++ b/ace-web/pom.xml @@ -0,0 +1,220 @@ + + + 4.0.0 + + com.arrebol + ace-web + 1.0.0 + war + + ace-web + + + ${project.build.directory}/endorsed + UTF-8 + 2.17.0 + + + + + com.amazonaws + aws-java-sdk-ses + 1.12.460 + jar + + + javax + javaee-api + 8.0 + provided + + + + org.apache.tomcat + tomcat-dbcp + 8.5.35 + + + + org.apache.poi + poi + 4.0.1 + + + + org.apache.logging.log4j + log4j-api + ${log4j.version} + + + org.apache.logging.log4j + log4j-core + ${log4j.version} + + + org.apache.logging.log4j + log4j-slf4j-impl + ${log4j.version} + + + + com.arrebol + ace-layout + 1.0.0 + jar + + + com.arrebol + ace-controller + 1.0.0 + jar + + + com.arrebol + ace-security + 1.0.0 + jar + + + org.apache.logging.log4j + log4j-api + + + org.apache.logging.log4j + log4j-core + + + + + + com.itextpdf + itextpdf + 5.5.13.3 + + + + com.twilio.sdk + twilio + 9.0.0-rc.2 + + + + + + AWS-EC2 + + jdbc:mysql://localhost:3306/apo_pro_com_april_ten?serverTimezone=UTC + root + Saladeespera2_ + false + /var/log/tomcat/cardriver.log + + + + Localhost + + jdbc:mysql://localhost:3306/apo_pro_com_april_ten?serverTimezone=GMT-5 + apoprocomlocalhost + Yj$2Da0z! + + + + Amazon-Web-Services + + jdbc:mysql://3.143.107.236:3306/apo_pro_com_april_ten?serverTimezone=GMT-6 + ace_remoto + Saladeespera2_ + + + + Amazon-Web-Services-Test + + jdbc:mysql://apc.clwlkknfqkjh.us-east-2.rds.amazonaws.com:3306/apo_pro_com_april_ten + apoprocom + Yj$2Da0z! + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.8 + 1.8 + + ${endorsed.dir} + + + + + org.apache.maven.plugins + maven-war-plugin + 2.3 + + + + src/main/webapp/META-INF + true + META-INF + + + false + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.6 + + + validate + + copy + + + ${endorsed.dir} + true + + + javax + javaee-api + 8.0 + jar + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12.4 + + true + + + + + + diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/Datatable.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/Datatable.java new file mode 100644 index 0000000..d43e57d --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/Datatable.java @@ -0,0 +1,30 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans; + +import java.util.List; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +public interface Datatable { + + public void editRow(RowEditEvent event); + + public void onRowCancel(RowEditEvent event); + + public void onRowReorder(ReorderEvent event); + + public void addRow(); + + public void deleteRow(); + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/GenericBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/GenericBean.java new file mode 100644 index 0000000..3b071f4 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/GenericBean.java @@ -0,0 +1,209 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans; + +import com.arrebol.apc.controller.util.DateWrapper; +import com.arrebol.apc.model.core.UserByOffice; +import java.text.MessageFormat; +import java.text.NumberFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.ResourceBundle; +import javax.faces.application.FacesMessage; +import javax.faces.context.ExternalContext; +import javax.faces.context.FacesContext; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public abstract class GenericBean { + + /** + * It Shows messages in xhtml. + * + * @param success True shows info, False shows warn, null shows fatal. + */ + public void testActionButtom(Boolean success) { + try { + if (success) { + showMessage(FacesMessage.SEVERITY_INFO, + getBundlePropertyFile().getString("generic.title"), + getBundlePropertyFile().getString("generic.true")); + } else { + showMessage(FacesMessage.SEVERITY_WARN, + getBundlePropertyFile().getString("generic.title"), + getBundlePropertyFile().getString("generic.false")); + } + } catch (Exception e) { + showMessage(FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("generic.title"), + getBundlePropertyFile().getString("generic.exception")); + } + + } + + /** + * + * @param field + * @param value + */ + public void initStartAndEndDates(int field, int value) { + try { + Calendar starDateCalendar = Calendar.getInstance(); + + starDateCalendar.setTime(DateWrapper.getTodayMXTime()); + starDateCalendar.set(field, value); + + setStarDate(starDateCalendar.getTime()); + setEndDate(DateWrapper.getTodayMXTime()); + } catch (Exception e) { + + } + } + + public void initOneWeekBeforeToCurrdate() { + try { + Calendar start = Calendar.getInstance(); + + start.set(Calendar.WEEK_OF_YEAR, start.get(Calendar.WEEK_OF_YEAR) - 1); + start.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); + + setStarDate(start.getTime()); + setEndDate(DateWrapper.getTodayMXTime()); + } catch (Exception e) { + + } + } + + public void initThisWeekToCurrdate() { + try { + Calendar start = Calendar.getInstance(); + + //start.set(Calendar.WEEK_OF_YEAR, start.get(Calendar.WEEK_OF_YEAR) - 1); + start.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); + setStarDate(start.getTime()); + + setEndDate(DateWrapper.getTodayMXTime()); + } catch (Exception e) { + + } + } + + /** + * + * @return + */ + protected synchronized FacesContext facesContext() { + return FacesContext.getCurrentInstance(); + } + + /** + * + * @return + */ + protected synchronized ExternalContext externalContext() { + return facesContext().getExternalContext(); + } + + /** + * + * @return + */ + public synchronized UserByOffice getLoggedUser() { + return (UserByOffice) externalContext().getSessionMap().get(APC_SESSION); + } + + /** + * + * @param userByOffice + */ + protected synchronized void setLoggedUser(UserByOffice userByOffice) { + externalContext().getSessionMap().put(APC_SESSION, userByOffice); + } + + /** + * + * @param severity + * @param title + * @param details + */ + protected void showMessage(FacesMessage.Severity severity, String title, String details) { + facesContext().addMessage(null, new FacesMessage(severity, title, details)); + } + + /** + * + * @param number Must be numeric (BigDecimal, Double, Float or Integer) + * @return + */ + public String currencyFormatNumber(Object number) { + String currency; + try { + NumberFormat defaultFormat = NumberFormat.getCurrencyInstance(); + currency = defaultFormat.format(number); + } catch (Exception e) { + currency = "$0.00"; + } + return currency; + } + + /** + * Construye y envia el mensaje de notification del resultado de la accion + * ejecutada. + * + * @param params argumentos {0},{1}, etc. + * @param msg mesage que se sustituira lo {0},{1}, etc. + * @param severity Solo se permiten INFO, WARN or FATAL. + * @param title Titulo que aparece en message + */ + protected void buildAndSendMessage(Object[] params, String msg, + FacesMessage.Severity severity, String title) { + MessageFormat mf = new MessageFormat(msg); + + facesContext().addMessage(null, new FacesMessage(severity, title, mf.format(params))); + } + + protected static final String APP = "ApoyoAProyectosComerciales"; + + protected static final String APC_SESSION = "APCAuthorization"; + private ResourceBundle bundlePropertyFile; + private final String PROPERTY_FILE = "com.arrebol.apc.i18n.app_background"; + private final int pwdMaxlength = 15; + private Date starDate; + private Date endDate; + + public ResourceBundle getBundlePropertyFile() { + return bundlePropertyFile; + } + + public void loadBundlePropertyFile() { + this.bundlePropertyFile = ResourceBundle.getBundle(PROPERTY_FILE); + } + + public int getPwdMaxlength() { + return pwdMaxlength; + } + + public Date getStarDate() { + return starDate; + } + + public void setStarDate(Date starDate) { + this.starDate = starDate; + } + + public Date getEndDate() { + return endDate; + } + + public void setEndDate(Date endDate) { + this.endDate = endDate; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/SendMSN.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/SendMSN.java new file mode 100644 index 0000000..a1509a3 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/SendMSN.java @@ -0,0 +1,49 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans; + +import com.twilio.Twilio; +import com.twilio.rest.api.v2010.account.Message; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * + * @author Oscar + */ +public class SendMSN { + + public static final String ACCOUNT_SID = "AC3f21ebff784532f98229abfd8bc0e227"; + public static final String AUTH_TOKEN = "08e8c76db40ea5cc9ed772671909f292"; + private String text = ""; + private String phone = ""; + + public SendMSN(String aMessage, String aPhone) { + text = aMessage; + phone = aPhone; + } + + public void sendMessage() { + Twilio.init(ACCOUNT_SID, AUTH_TOKEN); + Message message = Message.creator( + new com.twilio.type.PhoneNumber(phone), + new com.twilio.type.PhoneNumber("+18504076816"), + text) + .create(); + + System.out.println(message.getSid()); + } + + public static boolean validarMovil(String movil) { + Pattern p = Pattern.compile("^\\d{10}$"); + Matcher m = p.matcher(movil); + return (m.matches()); + } + + public static String getNumberPhoneFormat(String movil) { + return "+52" + movil.trim(); + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/AdvanceBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/AdvanceBean.java new file mode 100644 index 0000000..b63d32d --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/AdvanceBean.java @@ -0,0 +1,252 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.GenericValidationController; +import com.arrebol.apc.controller.admin.AdvanceController; +import com.arrebol.apc.model.admin.Advance; +import com.arrebol.apc.model.admin.ExpenseCompany; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("advanceManager") +@ViewScoped +public class AdvanceBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setAdvance(fillDatatableAdvance()); + } + } catch (Exception e) { + } + } + + public List fillDatatableAdvance() { + + return getAdvanceCtrl().fillAdvanceDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + } + + public List getHr() { + + return genericCtrl.getAllHRByOffice(getLoggedUser().getOffice().getId()); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + Date date = new Date(); + if (genericCtrl.existStableGeneralBoxByCreatedOn(date)) { + showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden agregar más adelantos porque ya se existe un cuadre de caja general de hoy."); + return; + } + + if(new BigDecimal(amount).compareTo(BigDecimal.ZERO)==0){ + + showMessage(FacesMessage.SEVERITY_WARN, "Adelanto Incorrecta", "No se pueden dar adelantos de 0"); + return; + + } + + if(new BigDecimal(amount).compareTo(BigDecimal.ZERO)<0){ + + showMessage(FacesMessage.SEVERITY_WARN, "Adelanto Incorrecto", "No se puede dar adelanto de un numero negativo"); + return; + + } + + Advance advanceSave = new Advance(); + advanceSave.setActiveStatus(ActiveStatus.ENEBLED); + advanceSave.setAmount(new BigDecimal(amount)); + advanceSave.setHumanResource(new HumanResource(humanResourceId)); + advanceSave.setOffice(new Office(getLoggedUser().getOffice().getId())); + advanceSave.setCreatedOn(date); + advanceSave.setCreatedBy(getLoggedUser().getId()); + advanceCtrl.saveAdvance(advanceSave); + advance.clear(); + advance = fillDatatableAdvance(); + humanResourceId = ""; + amount = ""; + FacesMessage msg = new FacesMessage("Nuevo adelanto", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + + } + + @Override + public void deleteRow() { + if (genericCtrl.existStableGeneralBoxByCreatedOn(selectedAdvance.getCreatedOn())) { + showMessage(FacesMessage.SEVERITY_WARN, "Adelanto", "No se puede borrar porque ya se realizo el cuadre de caja general del día."); + } else { + advanceCtrl.updateAdvanceByStatus(ActiveStatus.DISABLED, selectedAdvance.getId(), getLoggedUser().getUser().getId()); + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Eliminar adelanto"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacora.setDescription("Se eliminó el adelanto con monto $" + + selectedAdvance.getAmount() + " y fecha " + selectedAdvance.getCreatedOn()); + + searchHistoricalAction(); + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + //advance.remove(selectedAdvance); + selectedAdvance = null; + showMessage(FacesMessage.SEVERITY_INFO, "Adelanto Eliminado", "Se eliminó correctamente."); + } + } + + public AdvanceController getAdvanceCtrl() { + return advanceCtrl; + } + + public void setAdvanceCtrl(AdvanceController advanceCtrl) { + this.advanceCtrl = advanceCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List getAdvance() { + return advance; + } + + public void setAdvance(List advance) { + this.advance = advance; + } + + public List getHumanResource() { + return humanResource; + } + + public void setHumanResource(List humanResource) { + this.humanResource = humanResource; + } + + public String getHumanResourceId() { + return humanResourceId; + } + + public void setHumanResourceId(String humanResourceId) { + this.humanResourceId = humanResourceId; + } + + public Advance getSelectedAdvance() { + return selectedAdvance; + } + + public void setSelectedAdvance(Advance selectedAdvance) { + this.selectedAdvance = selectedAdvance; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public GenericValidationController getGenericValidateController() { + return genericValidateController; + } + + public void setGenericValidateController(GenericValidationController genericController) { + this.genericValidateController = genericController; + } + + public Date getLastStableGeneralBox() { + return lastStableGeneralBox; + } + + public void setLastStableGeneralBox(Date lastStableGeneralBox) { + this.lastStableGeneralBox = lastStableGeneralBox; + } + + public String getCommentsBitacora() { + return commentsBitacora; + } + + public void setCommentsBitacora(String commentsBitacora) { + this.commentsBitacora = commentsBitacora; + } + + private AdvanceController advanceCtrl; + private GenericController genericCtrl; + private BitacoraController bitacoraCtrl; + private GenericValidationController genericValidateController; + private Date lastStableGeneralBox; + private String commentsBitacora; + + private List advance; + private List humanResource; + + private String humanResourceId; + private Advance selectedAdvance; + private String amount; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initOneWeekBeforeToCurrdate(); + + advanceCtrl = new AdvanceController(); + genericCtrl = new GenericController(); + bitacoraCtrl = new BitacoraController(); + setGenericValidateController(new GenericValidationController()); + setLastStableGeneralBox(getGenericValidateController().lastStableGeneralBoxByDate(getLoggedUser().getUser())); + commentsBitacora = ""; + advance = fillDatatableAdvance(); + humanResource = getHr(); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/BonusBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/BonusBean.java new file mode 100644 index 0000000..b3dade8 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/BonusBean.java @@ -0,0 +1,158 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.admin.BonusController; +import com.arrebol.apc.model.admin.Bonus; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ + +@Named("bonusManager") +@ViewScoped +public class BonusBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setBonus(getBonusCtrl().fillBonusDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate())); + } + } catch (Exception e) { + } + } + + public List fillDatatableBonus() { + + return getBonusCtrl().fillBonusDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + } + + @Override + public void editRow(RowEditEvent event) { + Bonus bonus = (Bonus) event.getObject(); + if (bonus != null) { + bonusCtrl.updateByBonusId(bonus); + showMessage(FacesMessage.SEVERITY_INFO, "Registro Editado", "Se hizo el cambio correctamente."); + } + } + + @Override + public void onRowCancel(RowEditEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Edición Cancelada", ((Bonus) event.getObject()).getName().toString()); + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + if (administrative) { + saveBonus.setAdministrative(ActiveStatus.ENEBLED); + } else { + saveBonus.setAdministrative(ActiveStatus.DISABLED); + } + saveBonus.setActiveStatus(ActiveStatus.ENEBLED); + saveBonus.setCreatedBy(getLoggedUser().getId()); + saveBonus.setOffice(new Office(getLoggedUser().getOffice().getId())); + saveBonus.setCreatedOn(new Date()); + if (bonusCtrl.saveBonus(saveBonus)) { + saveBonus = new Bonus(); + administrative = false; + bonus.clear(); + bonus = fillDatatableBonus(); + FacesMessage msg = new FacesMessage("Nuevo bono", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + } + + @Override + public void deleteRow() { + bonusCtrl.updateBonusByStatus(ActiveStatus.DISABLED, selectedBonus.getId(), getLoggedUser().getUser().getId()); + bonus.remove(selectedBonus); + selectedBonus = null; + showMessage(FacesMessage.SEVERITY_INFO, "Bono Eliminado", "Se eliminó correctamente."); + } + + public BonusController getBonusCtrl() { + return bonusCtrl; + } + + public void setBonusCtrl(BonusController bonusCtrl) { + this.bonusCtrl = bonusCtrl; + } + + public List getBonus() { + return bonus; + } + + public void setBonus(List bonus) { + this.bonus = bonus; + } + + public Bonus getSelectedBonus() { + return selectedBonus; + } + + public void setSelectedBonus(Bonus selectedBonus) { + this.selectedBonus = selectedBonus; + } + + public Bonus getSaveBonus() { + return saveBonus; + } + + public void setSaveBonus(Bonus saveBonus) { + this.saveBonus = saveBonus; + } + + public boolean isAdministrative() { + return administrative; + } + + public void setAdministrative(boolean administrative) { + this.administrative = administrative; + } + + private BonusController bonusCtrl; + private List bonus; + private Bonus selectedBonus; + private Bonus saveBonus; + private boolean administrative; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initOneWeekBeforeToCurrdate(); + + bonusCtrl = new BonusController(); + bonus = fillDatatableBonus(); + saveBonus = new Bonus(); + administrative = false; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ChangeOwnerBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ChangeOwnerBean.java new file mode 100644 index 0000000..92c8240 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ChangeOwnerBean.java @@ -0,0 +1,241 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.admin.ChangeOwnerController; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.views.AvailablesOwnersView; +import com.arrebol.apc.model.views.CurrentCustomerByLoanView; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.primefaces.model.DualListModel; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Named() +@ViewScoped +public class ChangeOwnerBean extends GenericBean implements Serializable { + + /** + * + */ + public void onCurrentOwnerChange() { + logger.debug("onCurrentOwnerChange"); + try { + setNewOwners(getController().findAllNewOwners(getLoggedUser().getOffice().getId(), getCurrentOwner())); + + setLoansByCurrentOwner( + new DualListModel<>( + getController().findAllLoansByCurrentOwner(getLoggedUser().getOffice().getId(), getCurrentOwner()), + new ArrayList<>() + ) + ); + + AvailablesOwnersView owner = getCurrentOwners() + .stream() + .filter(value -> getCurrentOwner().equals(value.getUserId())) + .findAny() + .orElse(null); + + setCurrentOwnerFullName(null == owner ? "Error" : owner.getFullName()); + + setNewOwner(null); + setNewOwnerFullName(""); + } catch (Exception e) { + logger.error("onCurrentOwnerChange", e); + + setNewOwner(null); + setNewOwnerFullName(""); + setNewOwners(new ArrayList<>()); + setLoansByCurrentOwner(new DualListModel<>(new ArrayList<>(), new ArrayList<>())); + setCurrentOwners(new ArrayList<>()); + } + } + + /** + * + */ + public void onNewOwnerChange() { + logger.debug("onNewOwnerChange"); + try { + setLoansByCurrentOwner( + new DualListModel<>( + getController().findAllLoansByCurrentOwner(getLoggedUser().getOffice().getId(), getCurrentOwner()), + new ArrayList<>() + ) + ); + + AvailablesOwnersView owner = getNewOwners() + .stream() + .filter(value -> getNewOwner().equals(value.getUserId())) + .findAny() + .orElse(null); + + setNewOwnerFullName(null == owner ? "Error" : owner.getFullName()); + } catch (Exception e) { + logger.error("onNewOwnerChange", e); + + setNewOwners(new ArrayList<>()); + setLoansByCurrentOwner(new DualListModel<>(new ArrayList<>(), new ArrayList<>())); + } + } + + /** + * + */ + public void changeLoansBetweenUsers() { + logger.debug("changeLoansBetweenUsers"); + + try { + FacesMessage.Severity severity = FacesMessage.SEVERITY_WARN; + String messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + String messageTitle = getBundlePropertyFile().getString("change.owner.upper"); + String messageAction = getBundlePropertyFile().getString("updated"); + + List loans = new ArrayList<>(); + + getLoansByCurrentOwner().getTarget().forEach((loanView) -> { + loans.add(new Loan(loanView.getLoanId())); + }); + + if (getController().changeLoansBetweenUsers(getNewOwner(), loans)) { + setCurrentOwner(null); + setCurrentOwnerFullName(""); + setCurrentOwners(getController().findAllCurrentOwners(getLoggedUser().getOffice().getId())); + setNewOwner(null); + setNewOwnerFullName(""); + setNewOwners(new ArrayList<>()); + setLoansByCurrentOwner(new DualListModel<>(new ArrayList<>(), new ArrayList<>())); + + severity = FacesMessage.SEVERITY_INFO; + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + } + + Object[] param = {messageTitle, messageAction}; + + buildAndSendMessage(param, messafeFormat, severity, messageTitle); + } catch (Exception e) { + logger.error("changeLoansBetweenUsers", e); + Object[] param = {getBundlePropertyFile().getString("change.owner.upper")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("change.owner") + ); + } + } + + @PostConstruct + public void init() { + try { + loadBundlePropertyFile(); + + setController(new ChangeOwnerController()); + setCurrentOwners(getController().findAllCurrentOwners(getLoggedUser().getOffice().getId())); + + setLoansByCurrentOwner( + new DualListModel<>( + new ArrayList<>(), + new ArrayList<>() + ) + ); + } catch (Exception e) { + logger.error("init", e); + } + } + + private static final long serialVersionUID = -7947550003483328090L; + final Logger logger = LogManager.getLogger(getClass().getName()); + + private ChangeOwnerController controller; + private List currentOwners; + private List newOwners; + private DualListModel loansByCurrentOwner; + + private String currentOwner; + private String newOwner; + private String currentOwnerFullName; + private String newOwnerFullName; + + public ChangeOwnerController getController() { + return controller; + } + + public void setController(ChangeOwnerController controller) { + this.controller = controller; + } + + public List getCurrentOwners() { + return currentOwners; + } + + public void setCurrentOwners(List currentOwners) { + this.currentOwners = currentOwners; + } + + public List getNewOwners() { + return newOwners; + } + + public void setNewOwners(List newOwners) { + this.newOwners = newOwners; + } + + public DualListModel getLoansByCurrentOwner() { + return loansByCurrentOwner; + } + + public void setLoansByCurrentOwner(DualListModel loansByCurrentOwner) { + this.loansByCurrentOwner = loansByCurrentOwner; + } + + public String getCurrentOwner() { + return currentOwner; + } + + public void setCurrentOwner(String currentOwner) { + this.currentOwner = currentOwner; + } + + public String getNewOwner() { + return newOwner; + } + + public void setNewOwner(String newOwner) { + this.newOwner = newOwner; + } + + public String getCurrentOwnerFullName() { + return currentOwnerFullName; + } + + public void setCurrentOwnerFullName(String currentOwnerFullName) { + this.currentOwnerFullName = currentOwnerFullName; + } + + public String getNewOwnerFullName() { + return newOwnerFullName; + } + + public void setNewOwnerFullName(String newOwnerFullName) { + this.newOwnerFullName = newOwnerFullName; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayBean.java new file mode 100644 index 0000000..772eef3 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayBean.java @@ -0,0 +1,1277 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.ClosingDayController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.model.admin.ClosingDay; +import com.arrebol.apc.model.admin.ClosingDayDetail; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView; +import com.arrebol.apc.model.views.LoanByUserPaymentZeroView; +import com.arrebol.apc.model.views.TotalCashByCurdateDashboardView; +import com.arrebol.apc.model.views.TotalCashByCurdateView; +import com.arrebol.apc.model.views.TotalClosingDayByCurdateView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import com.itextpdf.text.BaseColor; +import com.itextpdf.text.Chunk; +import com.itextpdf.text.Document; +import com.itextpdf.text.Element; +import com.itextpdf.text.FontFactory; +import com.itextpdf.text.Image; +import com.itextpdf.text.PageSize; +import com.itextpdf.text.Paragraph; +import com.itextpdf.text.pdf.PdfPCell; +import com.itextpdf.text.pdf.PdfPTable; +import com.itextpdf.text.pdf.PdfWriter; +import java.awt.Font; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.time.ZoneId; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.TimeZone; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import javax.servlet.ServletContext; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("closingDayManager") +@ViewScoped +public class ClosingDayBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setClosingDay(getClosingDayCtrl().fillClosingDayDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate())); + } + } catch (Exception e) { + } + } + + public List fillDatatableClosingDay() { + + return getClosingDayCtrl().fillClosingDayDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + } + + /** + * + * @param outcome + * @return + */ + public String detailClosingDay(String outcome) { + return outcome; + } + + public List getUsers() { + + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + public List fillDatatableClosingDetails(String idUser) { + + return closingDayCtrl.findAllClosingDailyDetailFromUserByCurdateView(idUser); + } + + public List getLoansPaymentZeroByUser(String idUser) { + + return closingDayCtrl.getLoansPaymentZeroByUser(idUser); + } + + public void getResumen() { + + List listTotal = closingDayCtrl.getAllTotalCashByCurdateDashboardView(getLoggedUser().getOffice().getId()); + totalAmount = BigDecimal.ZERO; + totalTransferSender = BigDecimal.ZERO; + totalTransferReceiver = BigDecimal.ZERO; + totalMoneyDaily = BigDecimal.ZERO; + totalDelivery = BigDecimal.ZERO; + totalFinal = BigDecimal.ZERO; + totalCaja = BigDecimal.ZERO; + totalOtherExpense = BigDecimal.ZERO; + deposit = BigDecimal.ZERO; + + for (TotalCashByCurdateDashboardView temp : listTotal) { + totalAmount = totalAmount.add(temp.getPaymentDaily()); + totalTransferSender = totalTransferSender.add(temp.getTransferSender()); + totalTransferReceiver = totalTransferReceiver.add(temp.getTransferReceiver()); + totalMoneyDaily = totalMoneyDaily.add(temp.getMoneyDaily()); + totalDelivery = totalDelivery.add(temp.getDelivery()); + deposit = deposit.add(temp.getDepositDaily()); + totalFinal = totalFinal.add(temp.getTotal()); + totalOtherExpense = totalOtherExpense.add(temp.getOtherExpense()); + } + + List closingTotal = closingDayCtrl.findAllClosingDayByCurdate(getLoggedUser().getOffice().getId()); + if (closingTotal != null && !closingTotal.isEmpty()) { + for (TotalClosingDayByCurdateView temp : closingTotal) { + totalCaja = totalCaja.add(temp.getAmountPaid()); + } + } + + } + + public void getCashTotal() { + + if (userId.equalsIgnoreCase("")) { + FacesMessage msg = new FacesMessage("ERROR", "Debes de elegir un usuario para poder ver sus totales"); + FacesContext.getCurrentInstance().addMessage(null, msg); + imprimirStatus = true; + userId = ""; + return; + } + if (loanCtrl.countLoanDetailsAuthorize(userId) > 0) { + FacesMessage msg = new FacesMessage("Depositos pendientes", "No se puede realizar el corte de caja, autorice todas los depositos pendientes"); + FacesContext.getCurrentInstance().addMessage(null, msg); + userId = ""; + return; + } + + if (closingDayCtrl.getClosingDayCurdateByUserId(userId, getLoggedUser().getOffice().getId()) > 0) { + FacesMessage msg = new FacesMessage("Corte encontrado", "El usuario ya tiene un corte registrado el día de hoy."); + FacesContext.getCurrentInstance().addMessage(null, msg); + userId = ""; + return; + } + totales = new TotalCashByCurdateView(); + totales.setMoneyDaily(BigDecimal.ZERO); + totales.setPaymentDaily(BigDecimal.ZERO); + totales.setTransferReceiver(BigDecimal.ZERO); + totales.setTransferSender(BigDecimal.ZERO); + totales.setDelivery(BigDecimal.ZERO); + totales.setTransferPending(BigDecimal.ZERO); + totales.setOtherExpense(BigDecimal.ZERO); + totales.setDepositDaily(BigDecimal.ZERO); + total = BigDecimal.ZERO.toString(); + totalCustomerWithOutAction = new Long(0); + comments = ""; + TotalCashByCurdateView temp; + temp = closingDayCtrl.getTotalCashByCurdateViewById(userId); + if (temp != null) { + totales = temp; + total = temp.getTotal().toString(); + } + + if (closingDetail != null && !closingDetail.isEmpty()) { + closingDetail.clear(); + } + + User userObj = closingDayCtrl.getUserById(userId); + + if (userObj.getCertifier().equals(ActiveStatus.DISABLED)) { + closingDetail = fillDatatableClosingDetails(userId); + } else { + closingDetail = closingDayCtrl.findAllClosingDailyDetailFromUserCertifierByCurdateView(userId); + } + + totalCustomerWithOutAction = closingDayCtrl.getLoansCountDailyByUser(userId); + paymentoZeroDetail = getLoansPaymentZeroByUser(userId); + + imprimirStatus = false; + // imprimirStatus(); + } + + public void imprimir() { + if (userId.equalsIgnoreCase("")) { + FacesMessage msg = new FacesMessage("ERROR", "Debes de elegir un usuario para poder imprimir el corte."); + FacesContext.getCurrentInstance().addMessage(null, msg); + userId = ""; + imprimirStatus = true; + return; + } + Document document = new Document(PageSize.LETTER); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + PdfWriter.getInstance(document, baos); + List results = new ArrayList<>(); + results = closingDayCtrl.findDetailsFromClosingDayCurDate(userId); + document.open(); + + DateFormat formatter = new SimpleDateFormat("dd/MM/yy"); + DateFormat formatter2 = new SimpleDateFormat("dd/MM/yyyy HH:mm:SS"); + formatter2.setTimeZone(TimeZone.getTimeZone("GMT-6")); + + Paragraph printDate = new Paragraph("Fecha de impresión: " + formatter.format(new Date()), FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.DARK_GRAY)); + printDate.setAlignment(Element.ALIGN_RIGHT); + document.add(printDate); + + ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext(); + String carpetaImagen = (String) servletContext.getRealPath("resources/serenity-layout/images"); + + Image imagen = Image.getInstance(carpetaImagen + "/ace_logo.jpg"); + imagen.scalePercent(4f); + imagen.setAlignment(Element.ALIGN_CENTER); + document.add(imagen); + + Paragraph title = new Paragraph("Corte del día", FontFactory.getFont("arial", 18, Font.BOLD, BaseColor.DARK_GRAY)); + title.setAlignment(Element.ALIGN_CENTER); + document.add(title); + + document.add(Chunk.NEWLINE); + + Object[] res = (Object[]) results.get(0); + BigDecimal totalesRep = BigDecimal.ZERO; + BigDecimal recuperado = BigDecimal.ZERO; + BigDecimal transEnv = BigDecimal.ZERO; + BigDecimal transRec = BigDecimal.ZERO; + BigDecimal inicio = BigDecimal.ZERO; + BigDecimal gastos = BigDecimal.ZERO; + BigDecimal depositos = BigDecimal.ZERO; + BigDecimal entrPrestamos = BigDecimal.ZERO; + + PdfPTable tableGen = new PdfPTable(4); + tableGen.setWidthPercentage(100); + tableGen.setTotalWidth(new float[]{100f, 170f, 140f, 150f}); + tableGen.setLockedWidth(true); + + PdfPCell cellGen = new PdfPCell(new Paragraph("Asesor: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(res[8] == null ? "" : res[8].toString(), + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(3); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Monto recuperado: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + recuperado = new BigDecimal(res[9] == null ? "0.0" : res[9].toString()); + cellGen = new PdfPCell(new Paragraph(res[9] != null ? "$" + res[9].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto enviado por transferencia: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + transEnv = new BigDecimal(res[11] == null ? "0.0" : res[11].toString()); + cellGen = new PdfPCell(new Paragraph(res[11] != null ? "$" + res[11].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Monto de inicio: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + inicio = new BigDecimal(res[13] == null ? "0.0" : res[13].toString()); + cellGen = new PdfPCell(new Paragraph(res[13] != null ? "$" + res[13].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto recibido por transferencia: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + transRec = new BigDecimal(res[12] == null ? "0.0" : res[12].toString()); + cellGen = new PdfPCell(new Paragraph(res[12] != null ? "$" + res[12].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Entrega de préstamos: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + entrPrestamos = new BigDecimal(res[15] == null ? "0.0" : res[15].toString()); + cellGen = new PdfPCell(new Paragraph(res[15] != null ? "$" + res[15].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Gastos: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + gastos = new BigDecimal(res[14] == null ? "0.0" : res[14].toString()); + cellGen = new PdfPCell(new Paragraph(res[14] != null ? "$" + res[14].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Depósitos: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + depositos = new BigDecimal(res[10] == null ? "0.0" : res[10].toString()); + cellGen = new PdfPCell(new Paragraph(res[10] != null ? "$" + res[10].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + totalesRep = totalesRep.add(recuperado).subtract(transEnv).add(transRec).add(inicio).subtract(gastos).subtract(entrPrestamos); + cellGen = new PdfPCell(new Paragraph("Total: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(totalesRep != null ? "$" + totalesRep.toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Monto Esperado: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(totales.getTotal() != null ? "$" + totales.getTotal().toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto Entregado: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(new BigDecimal(total) != null ? "$" + new BigDecimal(total).toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + document.add(tableGen); + document.add(Chunk.NEWLINE); + + PdfPTable table = new PdfPTable(7); + table.setTotalWidth(new float[]{60, 60, 60, 60, 170, 60, 100}); + + table.setLockedWidth(true); + PdfPCell cell = new PdfPCell(new Paragraph("Detalles del corte", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setBackgroundColor(new BaseColor(41, 171, 225)); + cell.setColspan(7); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Detalle", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("P. anterior", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("C. apertura", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Monto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Saldo insoluto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Tipo", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Fecha", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + for (Object result : results) { + Object[] tmp = (Object[]) result; + // Detalle + cell = new PdfPCell(new Paragraph(tmp[0] == null ? "" : tmp[0].toString(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + //Préstamo anterior + cell = new PdfPCell(new Paragraph(tmp[6] != null ? "$" + tmp[6].toString() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + // Comisión por apertura + cell = new PdfPCell(new Paragraph(tmp[5] != null ? "$" + tmp[5].toString() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + // Monto + cell = new PdfPCell(new Paragraph(tmp[1] != null ? "$" + tmp[1].toString() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + // Saldo insoluto + cell = new PdfPCell(new Paragraph(tmp[3] != null ? "$" + tmp[3].toString() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + // Tipo + cell = new PdfPCell(new Paragraph(tmp[2] == null ? "" : tmp[2].toString(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + // Fecha + cell = new PdfPCell(new Paragraph(tmp[4] == null ? "" : formatter2.format((Date) tmp[4]), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + } + + document.add(table); + + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + + document.add(new Paragraph(" __________________________ __________________________")); + document.add(new Paragraph(" Firma Nombre y firma cajero responsable")); + document.add(new Paragraph(" " + res[8] == null ? "" : res[8].toString())); + + } catch (Exception e) { + System.out.print("Error 1: " + e.getMessage()); + } + + document.close(); + FacesContext context = FacesContext.getCurrentInstance(); + Object response = context.getExternalContext().getResponse(); + if (response instanceof HttpServletResponse) { + HttpServletResponse hrs = (HttpServletResponse) response; + hrs.setContentType("application/pdf"); + //hrs.setHeader("Content-disposition", "attachment"); + hrs.setHeader("Content-disposition", "attachment;filename=corte_del_día.pdf"); + hrs.setContentLength(baos.size()); + try { + ServletOutputStream out = hrs.getOutputStream(); + baos.writeTo(out); + out.flush(); + + } catch (IOException e) { + System.out.print("Error 2: " + e.getMessage()); + } + context.responseComplete(); + } + } + + public void imprimirHistory() { + + Document document = new Document(PageSize.LETTER); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + PdfWriter.getInstance(document, baos); + List results = new ArrayList<>(); + results = closingDayCtrl.findDetailsFromClosingDayHisotry(selectedClosingDay.getId()); + document.open(); + DateFormat formatter2 = new SimpleDateFormat("dd/MM/yyyy HH:mm:SS"); + formatter2.setTimeZone(TimeZone.getTimeZone("GMT-6")); + + Object[] res = (Object[]) results.get(0); + BigDecimal totalesRep = BigDecimal.ZERO; + BigDecimal recuperado = BigDecimal.ZERO; + BigDecimal transEnv = BigDecimal.ZERO; + BigDecimal transRec = BigDecimal.ZERO; + BigDecimal inicio = BigDecimal.ZERO; + BigDecimal gastos = BigDecimal.ZERO; + BigDecimal depositos = BigDecimal.ZERO; + BigDecimal entrPrestamos = BigDecimal.ZERO; + + Paragraph printDate = new Paragraph("Fecha de impresión: " + res[3], FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.DARK_GRAY)); + printDate.setAlignment(Element.ALIGN_RIGHT); + document.add(printDate); + + ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext(); + String carpetaImagen = (String) servletContext.getRealPath("resources/serenity-layout/images"); + + Image imagen = Image.getInstance(carpetaImagen + "/ace_logo.jpg"); + imagen.scalePercent(4f); + imagen.setAlignment(Element.ALIGN_CENTER); + document.add(imagen); + + Paragraph title = new Paragraph("Corte del día", FontFactory.getFont("arial", 18, Font.BOLD, BaseColor.DARK_GRAY)); + title.setAlignment(Element.ALIGN_CENTER); + document.add(title); + + document.add(Chunk.NEWLINE); + + PdfPTable tableGen = new PdfPTable(4); + tableGen.setWidthPercentage(100); + tableGen.setTotalWidth(new float[]{100f, 170f, 140f, 150f}); + tableGen.setLockedWidth(true); + + PdfPCell cellGen = new PdfPCell(new Paragraph("Asesor: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(res[6] == null ? "" : res[6].toString(), + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(3); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Monto recuperado: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + recuperado = new BigDecimal(res[7] == null ? "0.0" : res[7].toString()); + cellGen = new PdfPCell(new Paragraph(res[7] != null ? "$" + res[7].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto enviado por transferencia: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + transEnv = new BigDecimal(res[9] == null ? "0.0" : res[9].toString()); + cellGen = new PdfPCell(new Paragraph(res[9] != null ? "$" + res[9].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Monto de inicio: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + inicio = new BigDecimal(res[10] == null ? "0.0" : res[11].toString()); + cellGen = new PdfPCell(new Paragraph(res[11] != null ? "$" + res[11].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto recibido por transferencia: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + transRec = new BigDecimal(res[10] == null ? "0.0" : res[10].toString()); + cellGen = new PdfPCell(new Paragraph(res[10] != null ? "$" + res[10].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Entrega de préstamos: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + entrPrestamos = new BigDecimal(res[13] == null ? "0.0" : res[13].toString()); + cellGen = new PdfPCell(new Paragraph(res[13] != null ? "$" + res[13].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Gastos: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + gastos = new BigDecimal(res[12] == null ? "0.0" : res[12].toString()); + cellGen = new PdfPCell(new Paragraph(res[12] != null ? "$" + res[12].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Depósitos: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + depositos = new BigDecimal(res[8] == null ? "0.0" : res[8].toString()); + cellGen = new PdfPCell(new Paragraph(res[8] != null ? "$" + res[8].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + totalesRep = totalesRep.add(recuperado).subtract(transEnv).add(transRec).add(inicio).subtract(gastos).subtract(entrPrestamos); + cellGen = new PdfPCell(new Paragraph("Total: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(totalesRep != null ? "$" + totalesRep.toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Monto Esperado: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(res[4] != null ? "$" + res[4].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto Entregado: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(res[5] != null ? "$" + res[5].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + document.add(tableGen); + document.add(Chunk.NEWLINE); + + PdfPTable table = new PdfPTable(7); + table.setTotalWidth(new float[]{60, 60, 60, 60, 170, 60, 100}); + + table.setLockedWidth(true); + PdfPCell cell = new PdfPCell(new Paragraph("Detalles del corte", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setBackgroundColor(new BaseColor(41, 171, 225)); + cell.setColspan(7); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Detalle", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("P. anterior", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("C. apertura", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Monto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Saldo insoluto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Tipo", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Fecha", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + for (Object result : results) { + Object[] tmp = (Object[]) result; + // Detalle + cell = new PdfPCell(new Paragraph(tmp[0] == null ? "" : tmp[0].toString(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + cell = new PdfPCell(new Paragraph("", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + cell = new PdfPCell(new Paragraph("", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + + // Monto + cell = new PdfPCell(new Paragraph(tmp[1] != null ? "$" + tmp[1].toString() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + + // Tipo + cell = new PdfPCell(new Paragraph(tmp[2] == null ? "" : tmp[2].toString(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + // Fecha + cell = new PdfPCell(new Paragraph(tmp[15] == null ? "" : formatter2.format((Date) tmp[15]), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + } + + document.add(table); + + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + + document.add(new Paragraph(" __________________________ __________________________")); + document.add(new Paragraph(" Firma Nombre y firma cajero responsable")); + document.add(new Paragraph(" " + res[6] == null ? "" : res[6].toString())); + + } catch (Exception e) { + System.out.print("Error 1: " + e.getMessage()); + } + + document.close(); + FacesContext context = FacesContext.getCurrentInstance(); + Object response = context.getExternalContext().getResponse(); + if (response instanceof HttpServletResponse) { + HttpServletResponse hrs = (HttpServletResponse) response; + hrs.setContentType("application/pdf"); + //hrs.setHeader("Content-disposition", "attachment"); + hrs.setHeader("Content-disposition", "attachment;filename=corte_del_día.pdf"); + hrs.setContentLength(baos.size()); + try { + ServletOutputStream out = hrs.getOutputStream(); + baos.writeTo(out); + out.flush(); + + } catch (IOException e) { + System.out.print("Error 2: " + e.getMessage()); + } + context.responseComplete(); + } + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + if (userId.equalsIgnoreCase("")) { + FacesMessage msg = new FacesMessage("ERROR", "Debes de elegir un usuario para poder generar el corte."); + FacesContext.getCurrentInstance().addMessage(null, msg); + imprimirStatus = true; + userId = ""; + return; + } + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); + calendar.set(Calendar.HOUR_OF_DAY, 12); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); + + if (!(dayOfWeek == Calendar.SUNDAY) && !(userId.equalsIgnoreCase("aad0c673-eb93-11ea-b7e1-02907d0fb4e6"))) { + if (totalCustomerWithOutAction.compareTo(new Long(0)) == 1) { + FacesMessage msg = new FacesMessage("ERROR", "El asesor debe de realizar una acción en todos sus préstamos."); + FacesContext.getCurrentInstance().addMessage(null, msg); + return; + } + } + + if (totales.getTotal().compareTo(new BigDecimal(total)) != 0) { + if (comments == null || comments.trim().equals("")) { + FacesMessage msg = new FacesMessage("ERROR", "Es necesario capturar las observaciones."); + FacesContext.getCurrentInstance().addMessage(null, msg); + return; + } + } + + User userData = null; + for (User us : user) { + if (us.getId().equalsIgnoreCase(userId)) { + userData = us; + break; + } + } + + ClosingDay closingSave = new ClosingDay(); + closingSave.setActiveStatus(ActiveStatus.ENEBLED); + closingSave.setAmountExpected(totales.getTotal()); + closingSave.setAmountPaid(new BigDecimal(total)); + closingSave.setOffice(new Office(getLoggedUser().getOffice().getId())); + closingSave.setUser(new User(userId)); + closingSave.setCreatedBy(getLoggedUser()); + closingSave.setCreatedOn(new Date()); + closingSave.setComments(comments); + closingSave.setRouteCtlg(userData.getHumanResource().getHumanResourceHasRoutes().get(0).getRouteCtlg()); + if (closingDayCtrl.saveClosingDay(closingSave)) { + if (closingDetail != null && !closingDetail.isEmpty()) { + List detail = new ArrayList(); + + for (ClosingDailyDetailFromUserByCurdateView info : closingDetail) { + ClosingDayDetail detailInfo = new ClosingDayDetail(); + detailInfo.setAmount(info.getAmount()); + detailInfo.setClosingDay(closingSave); + detailInfo.setComments(info.getComments()); + detailInfo.setCreatedBy(getLoggedUser().getId()); + detailInfo.setCreatedOn(new Date()); + detailInfo.setDateDetail(info.getCreatedOn()); + detailInfo.setType(info.getType()); + detail.add(detailInfo); + } + closingDayCtrl.saveClosingDayDetail(detail); + } + + } + getResumen(); + totales = new TotalCashByCurdateView(); + totales.setMoneyDaily(BigDecimal.ZERO); + totales.setPaymentDaily(BigDecimal.ZERO); + totales.setTransferReceiver(BigDecimal.ZERO); + totales.setTransferSender(BigDecimal.ZERO); + totales.setDelivery(BigDecimal.ZERO); + totales.setTotal(BigDecimal.ZERO); + totales.setTransferPending(BigDecimal.ZERO); + totales.setOtherExpense(BigDecimal.ZERO); + totales.setDepositDaily(BigDecimal.ZERO); + total = BigDecimal.ZERO.toString(); + totalBox = BigDecimal.ZERO; + totalCustomerWithOutAction = new Long(0); + totalBox = genericCtrl.findAllSmallBox(getLoggedUser().getOffice().getId()); + comments = ""; + closingDetail.clear(); + paymentoZeroDetail.clear(); + FacesMessage msg = new FacesMessage("Nuevo corte registrado", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + + @Override + public void deleteRow() { + try { + if (closingDayCtrl.existStableSmallBoxByCreatedOn(selectedClosingDay.getCreatedOn())) { + showMessage(FacesMessage.SEVERITY_WARN, "Corte del día", "No se puede borrar porque ya se realizo el cuadre de caja chica del día."); + } else { + boolean delete = true; + delete = selectedClosingDay.getActiveStatus() == ActiveStatus.ENEBLED ? true : false; + + if (delete) { + Bitacora bitacora = new Bitacora(); + ClosingDay closing = closingDayCtrl.getClosingDayById(selectedClosingDay.getId()); + bitacora.setAction("Eliminar corte del día"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacora.setDescription("Se eliminó el corte del asesor " + closing.getUser().getUserName() + " con monto $" + + selectedClosingDay.getAmountPaid() + " y fecha " + closing.getCreatedOn()); + closingDayCtrl.updateClosingDayByStatus(ActiveStatus.DISABLED, selectedClosingDay.getId(), getLoggedUser().getUser().getId()); + //closingDay.remove(selectedClosingDay); + searchHistoricalAction(); + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + selectedClosingDay = null; + showMessage(FacesMessage.SEVERITY_INFO, "Corte del día", "Se eliminó correctamente."); + } + } + } catch (Exception e) { + } + } + + public ClosingDayController getClosingDayCtrl() { + return closingDayCtrl; + } + + public void setClosingDayCtrl(ClosingDayController closingDayCtrl) { + this.closingDayCtrl = closingDayCtrl; + } + + public List getClosingDay() { + return closingDay; + } + + public void setClosingDay(List closingDay) { + this.closingDay = closingDay; + } + + public List getUser() { + return user; + } + + public void setUser(List user) { + this.user = user; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public ClosingDay getSelectedClosingDay() { + return selectedClosingDay; + } + + public void setSelectedClosingDay(ClosingDay selectedClosingDay) { + this.selectedClosingDay = selectedClosingDay; + } + + public TotalCashByCurdateView getTotales() { + return totales; + } + + public void setTotales(TotalCashByCurdateView totales) { + this.totales = totales; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + public BigDecimal getTotalAmount() { + return totalAmount; + } + + public void setTotalAmount(BigDecimal totalAmount) { + this.totalAmount = totalAmount; + } + + public BigDecimal getTotalTransferSender() { + return totalTransferSender; + } + + public void setTotalTransferSender(BigDecimal totalTransferSender) { + this.totalTransferSender = totalTransferSender; + } + + public BigDecimal getTotalTransferReceiver() { + return totalTransferReceiver; + } + + public void setTotalTransferReceiver(BigDecimal totalTransferReceiver) { + this.totalTransferReceiver = totalTransferReceiver; + } + + public BigDecimal getTotalMoneyDaily() { + return totalMoneyDaily; + } + + public void setTotalMoneyDaily(BigDecimal totalMoneyDaily) { + this.totalMoneyDaily = totalMoneyDaily; + } + + public BigDecimal getTotalDelivery() { + return totalDelivery; + } + + public void setTotalDelivery(BigDecimal totalDelivery) { + this.totalDelivery = totalDelivery; + } + + public BigDecimal getTotalFinal() { + return totalFinal; + } + + public void setTotalFinal(BigDecimal totalFinal) { + this.totalFinal = totalFinal; + } + + public BigDecimal getTotalCaja() { + return totalCaja; + } + + public void setTotalCaja(BigDecimal totalCaja) { + this.totalCaja = totalCaja; + } + + public BigDecimal getTotalOtherExpense() { + return totalOtherExpense; + } + + public void setTotalOtherExpense(BigDecimal totalOtherExpense) { + this.totalOtherExpense = totalOtherExpense; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List getClosingDetail() { + return closingDetail; + } + + public void setClosingDetail(List closingDetail) { + this.closingDetail = closingDetail; + } + + public BigDecimal getTotalBox() { + return totalBox; + } + + public void setTotalBox(BigDecimal totalBox) { + this.totalBox = totalBox; + } + + public Long getTotalCustomerWithOutAction() { + return totalCustomerWithOutAction; + } + + public void setTotalCustomerWithOutAction(Long totalCustomerWithOutAction) { + this.totalCustomerWithOutAction = totalCustomerWithOutAction; + } + + public List getPaymentoZeroDetail() { + return paymentoZeroDetail; + } + + public void setPaymentoZeroDetail(List paymentoZeroDetail) { + this.paymentoZeroDetail = paymentoZeroDetail; + } + + public BigDecimal getDeposit() { + return deposit; + } + + public void setDeposit(BigDecimal deposit) { + this.deposit = deposit; + } + + public String getCommentsBitacora() { + return commentsBitacora; + } + + public void setCommentsBitacora(String commentsBitacora) { + this.commentsBitacora = commentsBitacora; + } + + public LoanController getLoanCtrl() { + return loanCtrl; + } + + public void setLoanCtrl(LoanController loanCtrl) { + this.loanCtrl = loanCtrl; + } + + public boolean getImprimirStatus() { + return imprimirStatus; + } + + public void setImprimirStatus(boolean imprimirStatus) { + this.imprimirStatus = imprimirStatus; + } + + private ClosingDayController closingDayCtrl; + private GenericController genericCtrl; + private BitacoraController bitacoraCtrl; + private LoanController loanCtrl; + + private List closingDay; + private List user; + + private String userId; + private String amount; + private String total; + + private BigDecimal totalAmount; + private BigDecimal totalTransferSender; + private BigDecimal totalTransferReceiver; + private BigDecimal totalMoneyDaily; + private BigDecimal totalDelivery; + private BigDecimal totalFinal; + private BigDecimal totalCaja; + private BigDecimal totalOtherExpense; + private BigDecimal totalBox; + private Long totalCustomerWithOutAction; + private BigDecimal deposit; + + private String commentsBitacora; + + private String comments; + private boolean imprimirStatus; + + private TotalCashByCurdateView totales; + + private ClosingDay selectedClosingDay; + + private List closingDetail; + private List paymentoZeroDetail; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + + loanCtrl = new LoanController(); + closingDayCtrl = new ClosingDayController(); + bitacoraCtrl = new BitacoraController(); + genericCtrl = new GenericController(); + + //initOneWeekBeforeToCurrdate(); + initThisWeekToCurrdate(); + + imprimirStatus = true; + closingDay = fillDatatableClosingDay(); + commentsBitacora = ""; + user = getUsers(); + getResumen(); + comments = ""; + totalBox = genericCtrl.findAllSmallBox(getLoggedUser().getOffice().getId()); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayBean.java.bak b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayBean.java.bak new file mode 100644 index 0000000..c5733cc --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayBean.java.bak @@ -0,0 +1,1281 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.ClosingDayController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.model.admin.ClosingDay; +import com.arrebol.apc.model.admin.ClosingDayDetail; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.model.views.ClosingDailyDetailFromUserByCurdateView; +import com.arrebol.apc.model.views.LoanByUserPaymentZeroView; +import com.arrebol.apc.model.views.TotalCashByCurdateDashboardView; +import com.arrebol.apc.model.views.TotalCashByCurdateView; +import com.arrebol.apc.model.views.TotalClosingDayByCurdateView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import com.itextpdf.text.BaseColor; +import com.itextpdf.text.Chunk; +import com.itextpdf.text.Document; +import com.itextpdf.text.Element; +import com.itextpdf.text.FontFactory; +import com.itextpdf.text.Image; +import com.itextpdf.text.PageSize; +import com.itextpdf.text.Paragraph; +import com.itextpdf.text.pdf.PdfPCell; +import com.itextpdf.text.pdf.PdfPTable; +import com.itextpdf.text.pdf.PdfWriter; +import java.awt.Font; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.time.ZoneId; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.TimeZone; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("closingDayManager") +@ViewScoped +public class ClosingDayBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setClosingDay(getClosingDayCtrl().fillClosingDayDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate())); + } + } catch (Exception e) { + } + } + + public List fillDatatableClosingDay() { + + return getClosingDayCtrl().fillClosingDayDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + } + + /** + * + * @param outcome + * @return + */ + public String detailClosingDay(String outcome) { + return outcome; + } + + public List getUsers() { + + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + public List fillDatatableClosingDetails(String idUser) { + + return closingDayCtrl.findAllClosingDailyDetailFromUserByCurdateView(idUser); + } + + public List getLoansPaymentZeroByUser(String idUser) { + + return closingDayCtrl.getLoansPaymentZeroByUser(idUser); + } + + public void getResumen() { + + List listTotal = closingDayCtrl.getAllTotalCashByCurdateDashboardView(getLoggedUser().getOffice().getId()); + totalAmount = BigDecimal.ZERO; + totalTransferSender = BigDecimal.ZERO; + totalTransferReceiver = BigDecimal.ZERO; + totalMoneyDaily = BigDecimal.ZERO; + totalDelivery = BigDecimal.ZERO; + totalFinal = BigDecimal.ZERO; + totalCaja = BigDecimal.ZERO; + totalOtherExpense = BigDecimal.ZERO; + deposit = BigDecimal.ZERO; + + for (TotalCashByCurdateDashboardView temp : listTotal) { + totalAmount = totalAmount.add(temp.getPaymentDaily()); + totalTransferSender = totalTransferSender.add(temp.getTransferSender()); + totalTransferReceiver = totalTransferReceiver.add(temp.getTransferReceiver()); + totalMoneyDaily = totalMoneyDaily.add(temp.getMoneyDaily()); + totalDelivery = totalDelivery.add(temp.getDelivery()); + deposit = deposit.add(temp.getDepositDaily()); + totalFinal = totalFinal.add(temp.getTotal()); + totalOtherExpense = totalOtherExpense.add(temp.getOtherExpense()); + } + + List closingTotal = closingDayCtrl.findAllClosingDayByCurdate(getLoggedUser().getOffice().getId()); + if (closingTotal != null && !closingTotal.isEmpty()) { + for (TotalClosingDayByCurdateView temp : closingTotal) { + totalCaja = totalCaja.add(temp.getAmountPaid()); + } + } + + } + + public void getCashTotal() { + + + if(userId.equalsIgnoreCase("")){ + FacesMessage msg = new FacesMessage("ERROR", "Debes de elegir un usuario para poder ver sus totales"); + FacesContext.getCurrentInstance().addMessage(null, msg); + imprimirStatus = true; + userId = ""; + return; + } + if(loanCtrl.countLoanDetailsAuthorize(userId)>0){ + FacesMessage msg = new FacesMessage("Depositos pendientes", "No se puede realizar el corte de caja, autorice todas los depositos pendientes"); + FacesContext.getCurrentInstance().addMessage(null, msg); + userId = ""; + return; + } + + if (closingDayCtrl.getClosingDayCurdateByUserId(userId, getLoggedUser().getOffice().getId()) > 0) { + FacesMessage msg = new FacesMessage("Corte encontrado", "El usuario ya tiene un corte registrado el día de hoy."); + FacesContext.getCurrentInstance().addMessage(null, msg); + userId = ""; + return; + } + totales = new TotalCashByCurdateView(); + totales.setMoneyDaily(BigDecimal.ZERO); + totales.setPaymentDaily(BigDecimal.ZERO); + totales.setTransferReceiver(BigDecimal.ZERO); + totales.setTransferSender(BigDecimal.ZERO); + totales.setDelivery(BigDecimal.ZERO); + totales.setTransferPending(BigDecimal.ZERO); + totales.setOtherExpense(BigDecimal.ZERO); + totales.setDepositDaily(BigDecimal.ZERO); + total = BigDecimal.ZERO.toString(); + totalCustomerWithOutAction = new Long(0); + comments = ""; + TotalCashByCurdateView temp; + temp = closingDayCtrl.getTotalCashByCurdateViewById(userId); + if (temp != null) { + totales = temp; + total = temp.getTotal().toString(); + } + + if (closingDetail != null && !closingDetail.isEmpty()) { + closingDetail.clear(); + } + + User userObj = closingDayCtrl.getUserById(userId); + + + if (userObj.getCertifier().equals(ActiveStatus.DISABLED)) { + closingDetail = fillDatatableClosingDetails(userId); + } else { + closingDetail = closingDayCtrl.findAllClosingDailyDetailFromUserCertifierByCurdateView(userId); + } + + totalCustomerWithOutAction = closingDayCtrl.getLoansCountDailyByUser(userId); + paymentoZeroDetail = getLoansPaymentZeroByUser(userId); + + imprimirStatus = false; + // imprimirStatus(); + } + + public void imprimir() { + if (userId.equalsIgnoreCase("")) { + FacesMessage msg = new FacesMessage("ERROR", "Debes de elegir un usuario para poder imprimir el corte."); + FacesContext.getCurrentInstance().addMessage(null, msg); + userId = ""; + imprimirStatus = true; + return; + } + Document document = new Document(PageSize.LETTER); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + PdfWriter.getInstance(document, baos); + List results = new ArrayList<>(); + results = closingDayCtrl.findDetailsFromClosingDayCurDate(userId); + document.open(); + + DateFormat formatter = new SimpleDateFormat("dd/MM/yy"); + DateFormat formatter2 = new SimpleDateFormat("dd/MM/yyyy HH:mm:SS"); + formatter2.setTimeZone(TimeZone.getTimeZone("GMT-6")); + + Paragraph printDate = new Paragraph("Fecha de impresión: " + formatter.format(new Date()), FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.DARK_GRAY)); + printDate.setAlignment(Element.ALIGN_RIGHT); + document.add(printDate); + +// Image imagen = Image.getInstance("other sources/resources/serenity-layout/images/ace_logo.jpg"); +// imagen.scaleAbsoluteWidth(100f); +// document.add(imagen); + + Paragraph title = new Paragraph("Corte del día", FontFactory.getFont("arial", 18, Font.BOLD, BaseColor.DARK_GRAY)); + title.setAlignment(Element.ALIGN_CENTER); + document.add(title); + + document.add(Chunk.NEWLINE); + + Object[] res = (Object[]) results.get(0); + BigDecimal totalesRep = BigDecimal.ZERO; + BigDecimal recuperado = BigDecimal.ZERO; + BigDecimal transEnv = BigDecimal.ZERO; + BigDecimal transRec = BigDecimal.ZERO; + BigDecimal inicio = BigDecimal.ZERO; + BigDecimal gastos = BigDecimal.ZERO; + BigDecimal depositos = BigDecimal.ZERO; + BigDecimal entrPrestamos = BigDecimal.ZERO; + + + PdfPTable tableGen = new PdfPTable(4); + tableGen.setWidthPercentage(100); + tableGen.setTotalWidth(new float[]{100f, 170f, 140f, 150f}); + tableGen.setLockedWidth(true); + + PdfPCell cellGen = new PdfPCell(new Paragraph("Asesor: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(res[8] == null ? "" : res[8].toString(), + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(3); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Monto recuperado: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + recuperado = new BigDecimal(res[9] == null ? "0.0" : res[9].toString()); + cellGen = new PdfPCell(new Paragraph(res[9] != null ? "$" + res[9].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto enviado por transferencia: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + transEnv = new BigDecimal(res[11] == null ? "0.0" : res[11].toString()); + cellGen = new PdfPCell(new Paragraph(res[11] != null ? "$" + res[11].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Monto de inicio: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + inicio = new BigDecimal(res[13] == null ? "0.0" : res[13].toString()); + cellGen = new PdfPCell(new Paragraph(res[13] != null ? "$" + res[13].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto recibido por transferencia: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + transRec = new BigDecimal(res[12] == null ? "0.0" : res[12].toString()); + cellGen = new PdfPCell(new Paragraph(res[12] != null ? "$" + res[12].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Entrega de préstamos: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + entrPrestamos = new BigDecimal(res[15] == null ? "0.0" : res[15].toString()); + cellGen = new PdfPCell(new Paragraph(res[15] != null ? "$" + res[15].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Gastos: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + gastos = new BigDecimal(res[14] == null ? "0.0" : res[14].toString()); + cellGen = new PdfPCell(new Paragraph(res[14] != null ? "$" + res[14].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Depósitos: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + depositos = new BigDecimal(res[10] == null ? "0.0" : res[10].toString()); + cellGen = new PdfPCell(new Paragraph(res[10] != null ? "$" + res[10].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + totalesRep = totalesRep.add(recuperado).subtract(transEnv).add(transRec).add(inicio).subtract(gastos).subtract(entrPrestamos); + cellGen = new PdfPCell(new Paragraph("Total: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(totalesRep != null ? "$" + totalesRep.toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + + + cellGen = new PdfPCell(new Paragraph("Monto Esperado: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(totales.getTotal() != null ? "$" + totales.getTotal().toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto Entregado: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(new BigDecimal(total) != null ? "$" + new BigDecimal(total).toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + document.add(tableGen); + document.add(Chunk.NEWLINE); + + PdfPTable table = new PdfPTable(7); + table.setTotalWidth(new float[]{60, 60, 60, 60, 170, 60, 100}); + + table.setLockedWidth(true); + PdfPCell cell = new PdfPCell(new Paragraph("Detalles del corte", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setBackgroundColor(new BaseColor( 41, 171, 225 )); + cell.setColspan(7); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Detalle", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("P. anterior", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("C. apertura", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Monto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Saldo insoluto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Tipo", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Fecha", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + for(Object result : results){ + Object[] tmp = (Object[]) result; + // Detalle + cell = new PdfPCell(new Paragraph(tmp[0] == null ? "" : tmp[0].toString(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + //Préstamo anterior + cell = new PdfPCell(new Paragraph(tmp[6] != null ? "$" + tmp[6].toString() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + // Comisión por apertura + cell = new PdfPCell(new Paragraph(tmp[5] != null ? "$" + tmp[5].toString() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + // Monto + cell = new PdfPCell(new Paragraph(tmp[1] != null ? "$" + tmp[1].toString() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + // Saldo insoluto + cell = new PdfPCell(new Paragraph(tmp[3] != null ? "$" + tmp[3].toString() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + // Tipo + cell = new PdfPCell(new Paragraph(tmp[2] == null ? "" : tmp[2].toString(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + // Fecha + cell = new PdfPCell(new Paragraph(tmp[4] == null ? "" : formatter2.format((Date) tmp[4]), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + } + + document.add(table); + + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + + document.add(new Paragraph(" __________________________ __________________________")); + document.add(new Paragraph(" Firma Nombre y firma cajero responsable")); + document.add(new Paragraph(" " + res[8] == null ? "" : res[8].toString())); + + } catch (Exception e) { + System.out.print("Error 1: " + e.getMessage()); + } + + document.close(); + FacesContext context = FacesContext.getCurrentInstance(); + Object response = context.getExternalContext().getResponse(); + if (response instanceof HttpServletResponse) { + HttpServletResponse hrs = (HttpServletResponse) response; + hrs.setContentType("application/pdf"); + //hrs.setHeader("Content-disposition", "attachment"); + hrs.setHeader("Content-disposition", "attachment;filename=corte_del_día.pdf"); + hrs.setContentLength(baos.size()); + try { + ServletOutputStream out = hrs.getOutputStream(); + baos.writeTo(out); + out.flush(); + + } catch (IOException e) { + System.out.print("Error 2: " + e.getMessage()); + } + context.responseComplete(); + } + } + + public void imprimirHistory() { + + Document document = new Document(PageSize.LETTER); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + PdfWriter.getInstance(document, baos); + List results = new ArrayList<>(); + results = closingDayCtrl.findDetailsFromClosingDayHisotry(selectedClosingDay.getId()); + document.open(); + DateFormat formatter2 = new SimpleDateFormat("dd/MM/yyyy HH:mm:SS"); + formatter2.setTimeZone(TimeZone.getTimeZone("GMT-6")); + + Object[] res = (Object[]) results.get(0); + BigDecimal totalesRep = BigDecimal.ZERO; + BigDecimal recuperado = BigDecimal.ZERO; + BigDecimal transEnv = BigDecimal.ZERO; + BigDecimal transRec = BigDecimal.ZERO; + BigDecimal inicio = BigDecimal.ZERO; + BigDecimal gastos = BigDecimal.ZERO; + BigDecimal depositos = BigDecimal.ZERO; + BigDecimal entrPrestamos = BigDecimal.ZERO; + + Paragraph printDate = new Paragraph("Fecha de impresión: " +res[3], FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.DARK_GRAY)); + printDate.setAlignment(Element.ALIGN_RIGHT); + document.add(printDate); + +// Image imagen = Image.getInstance("other sources/resources/serenity-layout/images/apc_card.png"); +// imagen.scaleAbsoluteWidth(100f); +// document.add(imagen); + + Paragraph title = new Paragraph("Corte del día", FontFactory.getFont("arial", 18, Font.BOLD, BaseColor.DARK_GRAY)); + title.setAlignment(Element.ALIGN_CENTER); + document.add(title); + + document.add(Chunk.NEWLINE); + + + + + PdfPTable tableGen = new PdfPTable(4); + tableGen.setWidthPercentage(100); + tableGen.setTotalWidth(new float[]{100f, 170f, 140f, 150f}); + tableGen.setLockedWidth(true); + + PdfPCell cellGen = new PdfPCell(new Paragraph("Asesor: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(res[6] == null ? "" : res[6].toString(), + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(3); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Monto recuperado: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + recuperado = new BigDecimal(res[7] == null ? "0.0" : res[7].toString()); + cellGen = new PdfPCell(new Paragraph(res[7] != null ? "$" + res[7].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto enviado por transferencia: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + transEnv = new BigDecimal(res[11] == null ? "0.0" : res[11].toString()); + cellGen = new PdfPCell(new Paragraph(res[11] != null ? "$" + res[11].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Monto de inicio: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + inicio = new BigDecimal(res[10] == null ? "0.0" : res[10].toString()); + cellGen = new PdfPCell(new Paragraph(res[10] != null ? "$" + res[10].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto recibido por transferencia: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + transRec = new BigDecimal(res[11] == null ? "0.0" : res[11].toString()); + cellGen = new PdfPCell(new Paragraph(res[11] != null ? "$" + res[11].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Entrega de préstamos: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + entrPrestamos = new BigDecimal(res[13] == null ? "0.0" : res[13].toString()); + cellGen = new PdfPCell(new Paragraph(res[13] != null ? "$" + res[13].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Gastos: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + gastos = new BigDecimal(res[12] == null ? "0.0" : res[12].toString()); + cellGen = new PdfPCell(new Paragraph(res[12] != null ? "$" + res[12].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Depósitos: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + depositos = new BigDecimal(res[8] == null ? "0.0" : res[8].toString()); + cellGen = new PdfPCell(new Paragraph(res[8] != null ? "$" + res[8].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + totalesRep = totalesRep.add(recuperado).subtract(transEnv).add(transRec).add(inicio).subtract(gastos).subtract(entrPrestamos); + cellGen = new PdfPCell(new Paragraph("Total: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(totalesRep != null ? "$" + totalesRep.toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + + + cellGen = new PdfPCell(new Paragraph("Monto Esperado: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(res[4] != null ? "$" + res[4].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto Entregado: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph(res[5] != null ? "$" + res[5].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + document.add(tableGen); + document.add(Chunk.NEWLINE); + + PdfPTable table = new PdfPTable(7); + table.setTotalWidth(new float[]{60, 60, 60, 60, 170, 60, 100}); + + table.setLockedWidth(true); + PdfPCell cell = new PdfPCell(new Paragraph("Detalles del corte", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setBackgroundColor(new BaseColor( 41, 171, 225 )); + cell.setColspan(7); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Detalle", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("P. anterior", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("C. apertura", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Monto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Saldo insoluto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Tipo", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Fecha", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + for(Object result : results){ + Object[] tmp = (Object[]) result; + // Detalle + cell = new PdfPCell(new Paragraph(tmp[0] == null ? "" : tmp[0].toString(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + cell = new PdfPCell(new Paragraph( "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + cell = new PdfPCell(new Paragraph( "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + + + // Monto + cell = new PdfPCell(new Paragraph(tmp[1] != null ? "$" + tmp[1].toString() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph( "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + + // Tipo + cell = new PdfPCell(new Paragraph(tmp[2] == null ? "" : tmp[2].toString(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + // Fecha + cell = new PdfPCell(new Paragraph(tmp[15] == null ? "" : formatter2.format((Date) tmp[15]), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + } + + document.add(table); + + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + + document.add(new Paragraph(" __________________________ __________________________")); + document.add(new Paragraph(" Firma Nombre y firma cajero responsable")); + document.add(new Paragraph(" " + res[6] == null ? "" : res[6].toString())); + + } catch (Exception e) { + System.out.print("Error 1: " + e.getMessage()); + } + + document.close(); + FacesContext context = FacesContext.getCurrentInstance(); + Object response = context.getExternalContext().getResponse(); + if (response instanceof HttpServletResponse) { + HttpServletResponse hrs = (HttpServletResponse) response; + hrs.setContentType("application/pdf"); + //hrs.setHeader("Content-disposition", "attachment"); + hrs.setHeader("Content-disposition", "attachment;filename=corte_del_día.pdf"); + hrs.setContentLength(baos.size()); + try { + ServletOutputStream out = hrs.getOutputStream(); + baos.writeTo(out); + out.flush(); + + } catch (IOException e) { + System.out.print("Error 2: " + e.getMessage()); + } + context.responseComplete(); + } + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + if (userId.equalsIgnoreCase("")) { + FacesMessage msg = new FacesMessage("ERROR", "Debes de elegir un usuario para poder generar el corte."); + FacesContext.getCurrentInstance().addMessage(null, msg); + imprimirStatus = true; + userId = ""; + return; + } + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); + calendar.set(Calendar.HOUR_OF_DAY, 12); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); + + if (!(dayOfWeek == Calendar.SUNDAY) && !(userId.equalsIgnoreCase("aad0c673-eb93-11ea-b7e1-02907d0fb4e6"))) { + if (totalCustomerWithOutAction.compareTo(new Long(0)) == 1) { + FacesMessage msg = new FacesMessage("ERROR", "El asesor debe de realizar una acción en todos sus préstamos."); + FacesContext.getCurrentInstance().addMessage(null, msg); + return; + } + } + + if (totales.getTotal().compareTo(new BigDecimal(total)) != 0) { + if (comments == null || comments.trim().equals("")) { + FacesMessage msg = new FacesMessage("ERROR", "Es necesario capturar las observaciones."); + FacesContext.getCurrentInstance().addMessage(null, msg); + return; + } + } + + User userData = null; + for(User us : user){ + if(us.getId().equalsIgnoreCase(userId)){ + userData = us; + break; + } + } + + ClosingDay closingSave = new ClosingDay(); + closingSave.setActiveStatus(ActiveStatus.ENEBLED); + closingSave.setAmountExpected(totales.getTotal()); + closingSave.setAmountPaid(new BigDecimal(total)); + closingSave.setOffice(new Office(getLoggedUser().getOffice().getId())); + closingSave.setUser(new User(userId)); + closingSave.setCreatedBy(getLoggedUser().getId()); + closingSave.setCreatedOn(new Date()); + closingSave.setComments(comments); + closingSave.setRouteCtlg(userData.getHumanResource().getHumanResourceHasRoutes().get(0).getRouteCtlg()); + if (closingDayCtrl.saveClosingDay(closingSave)) { + if (closingDetail != null && !closingDetail.isEmpty()) { + List detail = new ArrayList(); + + for (ClosingDailyDetailFromUserByCurdateView info : closingDetail) { + ClosingDayDetail detailInfo = new ClosingDayDetail(); + detailInfo.setAmount(info.getAmount()); + detailInfo.setClosingDay(closingSave); + detailInfo.setComments(info.getComments()); + detailInfo.setCreatedBy(getLoggedUser().getId()); + detailInfo.setCreatedOn(new Date()); + detailInfo.setDateDetail(info.getCreatedOn()); + detailInfo.setType(info.getType()); + detail.add(detailInfo); + } + closingDayCtrl.saveClosingDayDetail(detail); + } + + } + getResumen(); + totales = new TotalCashByCurdateView(); + totales.setMoneyDaily(BigDecimal.ZERO); + totales.setPaymentDaily(BigDecimal.ZERO); + totales.setTransferReceiver(BigDecimal.ZERO); + totales.setTransferSender(BigDecimal.ZERO); + totales.setDelivery(BigDecimal.ZERO); + totales.setTotal(BigDecimal.ZERO); + totales.setTransferPending(BigDecimal.ZERO); + totales.setOtherExpense(BigDecimal.ZERO); + totales.setDepositDaily(BigDecimal.ZERO); + total = BigDecimal.ZERO.toString(); + totalBox = BigDecimal.ZERO; + totalCustomerWithOutAction = new Long(0); + totalBox = genericCtrl.findAllSmallBox(getLoggedUser().getOffice().getId()); + comments = ""; + closingDetail.clear(); + paymentoZeroDetail.clear(); + FacesMessage msg = new FacesMessage("Nuevo corte registrado", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + + @Override + public void deleteRow() { + try { + if (closingDayCtrl.existStableSmallBoxByCreatedOn(selectedClosingDay.getCreatedOn())) { + showMessage(FacesMessage.SEVERITY_WARN, "Corte del día", "No se puede borrar porque ya se realizo el cuadre de caja chica del día."); + } else { + boolean delete = true; + delete = selectedClosingDay.getActiveStatus() == ActiveStatus.ENEBLED ? true : false; + + if (delete) { + Bitacora bitacora = new Bitacora(); + ClosingDay closing = closingDayCtrl.getClosingDayById(selectedClosingDay.getId()); + bitacora.setAction("Eliminar corte del día"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacora.setDescription("Se eliminó el corte del asesor " + closing.getUser().getUserName() + " con monto $" + + selectedClosingDay.getAmountPaid() + " y fecha " + closing.getCreatedOn()); + closingDayCtrl.updateClosingDayByStatus(ActiveStatus.DISABLED, selectedClosingDay.getId(), getLoggedUser().getUser().getId()); + //closingDay.remove(selectedClosingDay); + searchHistoricalAction(); + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + selectedClosingDay = null; + showMessage(FacesMessage.SEVERITY_INFO, "Corte del día", "Se eliminó correctamente."); + } + } + } catch (Exception e) { + } + } + + public ClosingDayController getClosingDayCtrl() { + return closingDayCtrl; + } + + public void setClosingDayCtrl(ClosingDayController closingDayCtrl) { + this.closingDayCtrl = closingDayCtrl; + } + + public List getClosingDay() { + return closingDay; + } + + public void setClosingDay(List closingDay) { + this.closingDay = closingDay; + } + + public List getUser() { + return user; + } + + public void setUser(List user) { + this.user = user; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public ClosingDay getSelectedClosingDay() { + return selectedClosingDay; + } + + public void setSelectedClosingDay(ClosingDay selectedClosingDay) { + this.selectedClosingDay = selectedClosingDay; + } + + public TotalCashByCurdateView getTotales() { + return totales; + } + + public void setTotales(TotalCashByCurdateView totales) { + this.totales = totales; + } + + public String getTotal() { + return total; + } + + public void setTotal(String total) { + this.total = total; + } + + public BigDecimal getTotalAmount() { + return totalAmount; + } + + public void setTotalAmount(BigDecimal totalAmount) { + this.totalAmount = totalAmount; + } + + public BigDecimal getTotalTransferSender() { + return totalTransferSender; + } + + public void setTotalTransferSender(BigDecimal totalTransferSender) { + this.totalTransferSender = totalTransferSender; + } + + public BigDecimal getTotalTransferReceiver() { + return totalTransferReceiver; + } + + public void setTotalTransferReceiver(BigDecimal totalTransferReceiver) { + this.totalTransferReceiver = totalTransferReceiver; + } + + public BigDecimal getTotalMoneyDaily() { + return totalMoneyDaily; + } + + public void setTotalMoneyDaily(BigDecimal totalMoneyDaily) { + this.totalMoneyDaily = totalMoneyDaily; + } + + public BigDecimal getTotalDelivery() { + return totalDelivery; + } + + public void setTotalDelivery(BigDecimal totalDelivery) { + this.totalDelivery = totalDelivery; + } + + public BigDecimal getTotalFinal() { + return totalFinal; + } + + public void setTotalFinal(BigDecimal totalFinal) { + this.totalFinal = totalFinal; + } + + public BigDecimal getTotalCaja() { + return totalCaja; + } + + public void setTotalCaja(BigDecimal totalCaja) { + this.totalCaja = totalCaja; + } + + public BigDecimal getTotalOtherExpense() { + return totalOtherExpense; + } + + public void setTotalOtherExpense(BigDecimal totalOtherExpense) { + this.totalOtherExpense = totalOtherExpense; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List getClosingDetail() { + return closingDetail; + } + + public void setClosingDetail(List closingDetail) { + this.closingDetail = closingDetail; + } + + public BigDecimal getTotalBox() { + return totalBox; + } + + public void setTotalBox(BigDecimal totalBox) { + this.totalBox = totalBox; + } + + public Long getTotalCustomerWithOutAction() { + return totalCustomerWithOutAction; + } + + public void setTotalCustomerWithOutAction(Long totalCustomerWithOutAction) { + this.totalCustomerWithOutAction = totalCustomerWithOutAction; + } + + public List getPaymentoZeroDetail() { + return paymentoZeroDetail; + } + + public void setPaymentoZeroDetail(List paymentoZeroDetail) { + this.paymentoZeroDetail = paymentoZeroDetail; + } + + public BigDecimal getDeposit() { + return deposit; + } + + public void setDeposit(BigDecimal deposit) { + this.deposit = deposit; + } + + public String getCommentsBitacora() { + return commentsBitacora; + } + + public void setCommentsBitacora(String commentsBitacora) { + this.commentsBitacora = commentsBitacora; + } + + public LoanController getLoanCtrl() { + return loanCtrl; + } + + public void setLoanCtrl(LoanController loanCtrl) { + this.loanCtrl = loanCtrl; + } + + public boolean getImprimirStatus() { + return imprimirStatus; + } + + public void setImprimirStatus(boolean imprimirStatus) { + this.imprimirStatus = imprimirStatus; + } + + + + private ClosingDayController closingDayCtrl; + private GenericController genericCtrl; + private BitacoraController bitacoraCtrl; + private LoanController loanCtrl; + + private List closingDay; + private List user; + + private String userId; + private String amount; + private String total; + + private BigDecimal totalAmount; + private BigDecimal totalTransferSender; + private BigDecimal totalTransferReceiver; + private BigDecimal totalMoneyDaily; + private BigDecimal totalDelivery; + private BigDecimal totalFinal; + private BigDecimal totalCaja; + private BigDecimal totalOtherExpense; + private BigDecimal totalBox; + private Long totalCustomerWithOutAction; + private BigDecimal deposit; + + private String commentsBitacora; + + private String comments; + private boolean imprimirStatus; + + private TotalCashByCurdateView totales; + + private ClosingDay selectedClosingDay; + + private List closingDetail; + private List paymentoZeroDetail; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + + loanCtrl = new LoanController(); + closingDayCtrl = new ClosingDayController(); + bitacoraCtrl = new BitacoraController(); + genericCtrl = new GenericController(); + + //initOneWeekBeforeToCurrdate(); + initThisWeekToCurrdate(); + + imprimirStatus = true; + closingDay = fillDatatableClosingDay(); + commentsBitacora = ""; + user = getUsers(); + getResumen(); + comments = ""; + totalBox = genericCtrl.findAllSmallBox(getLoggedUser().getOffice().getId()); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayDetailBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayDetailBean.java new file mode 100644 index 0000000..6e94c08 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ClosingDayDetailBean.java @@ -0,0 +1,100 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.admin.ClosingDayController; +import com.arrebol.apc.model.admin.ClosingDay; +import com.arrebol.apc.model.admin.ClosingDayDetail; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("closingDayDetailManager") +@ViewScoped +public class ClosingDayDetailBean extends GenericBean implements Serializable, Datatable{ + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public ClosingDayController getClosingDayCtrl() { + return closingDayCtrl; + } + + public void setClosingDayCtrl(ClosingDayController closingDayCtrl) { + this.closingDayCtrl = closingDayCtrl; + } + + public String getClosingDayId() { + return closingDayId; + } + + public void setClosingDayId(String closingDayId) { + this.closingDayId = closingDayId; + } + + public ClosingDay getClosingDay() { + return closingDay; + } + + public void setClosingDay(ClosingDay closingDay) { + this.closingDay = closingDay; + } + + public List getClosingDayDetail() { + return closingDayDetail; + } + + public void setClosingDayDetail(List closingDayDetail) { + this.closingDayDetail = closingDayDetail; + } + + private ClosingDayController closingDayCtrl; + private String closingDayId; + private ClosingDay closingDay; + private List closingDayDetail; + + @PostConstruct + public void init() { + closingDayCtrl = new ClosingDayController(); + setClosingDayId(externalContext().getRequestParameterMap().get("form:dtClosingDay_selection")); + setClosingDay(closingDayCtrl.getClosingDayById(closingDayId)); + setClosingDayDetail(closingDayCtrl.getClosingDayDetailByIdClosingDay(getClosingDayId())); + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/CustomerBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/CustomerBean.java new file mode 100644 index 0000000..d409dcd --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/CustomerBean.java @@ -0,0 +1,169 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.admin.CustomerController; +import com.arrebol.apc.controller.catalog.RouteController; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("customerManager") +@ViewScoped +public class CustomerBean extends GenericBean implements Serializable, Datatable{ + + public List fillDatatableCustomer() { + + return customerCtrl.fillCustomersDatatable(getLoggedUser().getOffice().getId()); + } + + public void changeRoute(){ + if(!routeId.isEmpty()){ + if(customerCtrl.updateRouteById(new RouteCtlg(routeId), selectedCustomer.getId(), getLoggedUser().getUser().getId())) + { + showMessage(FacesMessage.SEVERITY_INFO, "Ruta modificada", "Se modificó correctamente."); + } + else + { + showMessage(FacesMessage.SEVERITY_WARN, "Ruta modificada", "Ocurrió un error durante el proceso."); + } + + } + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + customerCtrl.updatePeopleByStatus(ActiveStatus.DISABLED, selectedCustomer.getId(), getLoggedUser().getUser().getId()); + customer.remove(selectedCustomer); + selectedCustomer = null; + showMessage(FacesMessage.SEVERITY_INFO, "Cliente Eliminado", "Se eliminó correctamente."); + } + + public void updatePeopleTypeById() { + if(selectedCustomer.getPeopleType().equals(PeopleType.BOTH)) + { + showMessage(FacesMessage.SEVERITY_INFO, "Advertencia", "El cliente ya se encuentra como Aval."); + return; + } + customerCtrl.updatePeopleTypeById(PeopleType.BOTH, selectedCustomer.getId(), getLoggedUser().getUser().getId()); + customer = null; + selectedCustomer = null; + customer = fillDatatableCustomer(); + showMessage(FacesMessage.SEVERITY_INFO, "Cliente modificado", "Se modificó correctamente."); + } + + /** + * + * @param outcome + * @return + */ + public String detailCustomer(String outcome) { + return outcome; + } + + public CustomerController getCustomerCtrl() { + return customerCtrl; + } + + public void setCustomerCtrl(CustomerController customerCtrl) { + this.customerCtrl = customerCtrl; + } + + public List getCustomer() { + return customer; + } + + public void setCustomer(List customer) { + this.customer = customer; + } + + public People getSelectedCustomer() { + return selectedCustomer; + } + + public void setSelectedCustomer(People selectedCustomer) { + this.selectedCustomer = selectedCustomer; + } + + public String getRouteId() { + return routeId; + } + + public void setRouteId(String routeId) { + this.routeId = routeId; + } + + public RouteController getRouteCtrl() { + return routeCtrl; + } + + public void setRouteCtrl(RouteController routeCtrl) { + this.routeCtrl = routeCtrl; + } + + public List getRoute() { + return route; + } + + public void setRoute(List route) { + this.route = route; + } + + private CustomerController customerCtrl; + private RouteController routeCtrl; + + private List customer; + private List route; + + private People selectedCustomer; + private String routeId; + + @PostConstruct + public void init() { + customerCtrl = new CustomerController(); + routeCtrl = new RouteController(); + customer = fillDatatableCustomer(); + route = routeCtrl.fillRoutesDatatable(getLoggedUser().getOffice().getId()); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/CustomerDetailBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/CustomerDetailBean.java new file mode 100644 index 0000000..1f44911 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/CustomerDetailBean.java @@ -0,0 +1,175 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.admin.CustomerController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("customerDetailManager") +@ViewScoped +public class CustomerDetailBean extends GenericBean implements Serializable, Datatable { + + public List getDetails(String id) { + try { + loanDetails = loanCtrl.getLoanDetailsbyId(id); + + } catch (Exception e) { + } + return null == loanDetails ? new ArrayList<>() : loanDetails; + } + + public People getCustomerDetail(String peopleId){ + return customerCtrl.findPeopleById(peopleId); + } + + public List getLoanByPeople(String peopleId){ + return customerCtrl.findLoanByCustomer(peopleId); + } + + public void editPeople() + { + if(customer.getBirthdate() == null){ + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "La fecha de cumpleaños es obligatoria"); + return; + } + if(customer.getFirstName() == null){ + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El primer nombre es obligatoria"); + return; + } + if(customer.getLastName() == null){ + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El apellido paterno es obligatoria"); + return; + } + if(customer.getMiddleName() == null){ + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El apellido materno es obligatoria"); + return; + } + if(customer.getPhoneHome()== null){ + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El teléfono de casa es obligatoria"); + return; + } + if(customer.getAddressHome()== null){ + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El domicilio personal es obligatoria"); + return; + } + if(customerCtrl.updateByPeopleId(customer)) + { + showMessage(FacesMessage.SEVERITY_INFO, "Cliente modificado", "Se modificó correctamente."); + } + } + + @Override + public void editRow(RowEditEvent event) { + + + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public CustomerController getCustomerCtrl() { + return customerCtrl; + } + + public void setCustomerCtrl(CustomerController customerCtrl) { + this.customerCtrl = customerCtrl; + } + + public People getCustomer() { + return customer; + } + + public void setCustomer(People customer) { + this.customer = customer; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public List getLoan() { + return loan; + } + + public void setLoan(List loan) { + this.loan = loan; + } + + public LoanController getLoanCtrl() { + return loanCtrl; + } + + public void setLoanCtrl(LoanController loanCtrl) { + this.loanCtrl = loanCtrl; + } + + public List getLoanDetails() { + return loanDetails; + } + + public void setLoanDetails(List loanDetails) { + this.loanDetails = loanDetails; + } + + private CustomerController customerCtrl; + private LoanController loanCtrl; + private People customer; + private String customerId; + private List loan; + private List loanDetails; + + @PostConstruct + public void init() { + customerCtrl = new CustomerController(); + loanCtrl = new LoanController(); + setCustomerId(externalContext().getRequestParameterMap().get("form:dtCustomer_selection")); + customer = getCustomerDetail(getCustomerId()); + loan = getLoanByPeople(getCustomerId()); + + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/EmployeeListBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/EmployeeListBean.java new file mode 100644 index 0000000..2b74d92 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/EmployeeListBean.java @@ -0,0 +1,100 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.system.employee.EmployeeController; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.HumanResourceStatus; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar + */ +@Named("employeeListManager") +@ViewScoped +public class EmployeeListBean extends GenericBean implements Serializable, Datatable { + + + + + public List fillDatatableEmployee() { + return getController().findEmployeesByType( + getLoggedUser().getOffice(), + HumanResourceStatus.ENEBLED, + getLoggedUser().getUser().getHumanResource().getId()); + } + + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public EmployeeController getController() { + return controller; + } + + public void setController(EmployeeController controller) { + this.controller = controller; + } + + public List getHumanResource() { + return humanResource; + } + + public void setHumanResource(List humanResource) { + this.humanResource = humanResource; + } + + + private EmployeeController controller; + + private List humanResource; + + + @PostConstruct() + public void init() { + loadBundlePropertyFile(); + + controller = new EmployeeController(); + + + setHumanResource(fillDatatableEmployee()); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/EndorsementBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/EndorsementBean.java new file mode 100644 index 0000000..14aaf0d --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/EndorsementBean.java @@ -0,0 +1,178 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.admin.AdministrationPersonSearchViewController; +import com.arrebol.apc.controller.admin.EndorsementController; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.model.views.AdministrationPersonSerchView; +import com.sun.javafx.scene.control.skin.VirtualFlow; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("endorsementManager") +@ViewScoped +public class EndorsementBean extends GenericPersonSearchBean implements Serializable { + + public List autoCompleteSearchByName(String nameToSearch) { + List results; + try { + results = executeAutoComplete(nameToSearch, PeopleType.ENDORSEMENT); + } catch (Exception e) { + results = new ArrayList<>(); + + logger.error("autoCompleteSearchByName", e); + } + return results; + } + + public void searchPersonAction() { + try { + if ((null == getSearchPersonName() || "".equals(getSearchPersonName().trim())) && getRouteId().equals("All")) { + showMessage(FacesMessage.SEVERITY_WARN, "Ingresar nombre de persona a buscar", "Para hacer una busqueda general en las rutas debes propocionar el nombre de la persona a buscar-"); + } else { + if (getRouteId().equals("All")) { + executeQueryLike(true, PeopleType.ENDORSEMENT); + } else if (null != getSearchPersonName() && !"".equals(getSearchPersonName().trim())) { + boolean allRoutes = false; + + if (getRouteId().equals("All")) { + allRoutes = true; + } + + executeQueryLike(allRoutes, PeopleType.ENDORSEMENT); + } else if (null == getSearchPersonName() || "".equals(getSearchPersonName().trim())) { + fillPersonList(PeopleType.ENDORSEMENT); + } + } + } catch (Exception e) { + logger.error("searchPersonAction", e); + setPersonList(new ArrayList<>()); + } + } + + public List fillDatatableEndorsement() { + return endorsementCtrl.fillEndorsementsDatatable(getLoggedUser().getOffice().getId()); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + getEndorsementCtrl().updatePeopleByStatus(ActiveStatus.DISABLED, getSelectedPerson().getId(), getLoggedUser().getUser().getId()); + cleaningView(); + + showMessage(FacesMessage.SEVERITY_INFO, "Aval Eliminado", "Se eliminó correctamente."); + } + + public void updatePeopleTypeById() { + if (selectedEndorsement.getPeopleType().equals(PeopleType.BOTH)) { + showMessage(FacesMessage.SEVERITY_INFO, "Advertencia", "El aval ya se encuentra como cliente."); + return; + } + //endorsementCtrl.updatePeopleTypeById(PeopleType.BOTH, selectedEndorsement.getId(), getLoggedUser().getUser().getId()); + //endorsement = null; + //endorsement = fillDatatableEndorsement(); + //selectedEndorsement = null; + + getEndorsementCtrl().updatePeopleTypeById(PeopleType.BOTH, getSelectedPerson().getId(), getLoggedUser().getUser().getId()); + cleaningView(); + + showMessage(FacesMessage.SEVERITY_INFO, "Aval modificado", "Se modificó correctamente."); + } + + private void cleaningView() { + getPersonList().remove(getSelectedPerson()); + setSelectedPerson(null); + } + + final Logger logger = LogManager.getLogger(getClass()); + + private EndorsementController endorsementCtrl; + private List endorsement; + private People selectedEndorsement; + + @PostConstruct + public void init() { + try { + loadBundlePropertyFile(); + + endorsementCtrl = new EndorsementController(); + setAdminSearchController(new AdministrationPersonSearchViewController()); + + setRoutes(getAdminSearchController().findAllActiveRoutesByOfficce(getLoggedUser().getOffice().getId())); + } catch (Exception e) { + } + } + + /** + * + * @param outcome + * @return + */ + public String detailEndorsement(String outcome) { + return outcome; + } + + public EndorsementController getEndorsementCtrl() { + return endorsementCtrl; + } + + public void setEndorsementCtrl(EndorsementController endorsementCtrl) { + this.endorsementCtrl = endorsementCtrl; + } + + public List getEndorsement() { + return endorsement; + } + + public void setEndorsement(List endorsement) { + this.endorsement = endorsement; + } + + public People getSelectedEndorsement() { + return selectedEndorsement; + } + + public void setSelectedEndorsement(People selectedEndorsement) { + this.selectedEndorsement = selectedEndorsement; + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/EndorsementDetailBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/EndorsementDetailBean.java new file mode 100644 index 0000000..96ba33f --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/EndorsementDetailBean.java @@ -0,0 +1,143 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.admin.EndorsementController; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("endorsementDetailManager") +@ViewScoped +public class EndorsementDetailBean extends GenericBean implements Serializable, Datatable { + + public People getEndorsementDetail(String peopleId){ + return endorsementCtrl.findPeopleById(peopleId); + } + + public List getLoanByPeople(String peopleId){ + return endorsementCtrl.findLoanByEndorsement(peopleId); + } + + public void editPeople() + { + if(endorsement.getBirthdate() == null){ + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "La fecha de cumpleaños es obligatoria"); + return; + } + if(endorsement.getFirstName() == null){ + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El primer nombre es obligatoria"); + return; + } + if(endorsement.getLastName() == null){ + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El apellido paterno es obligatoria"); + return; + } + if(endorsement.getMiddleName() == null){ + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El apellido materno es obligatoria"); + return; + } + if(endorsement.getPhoneHome()== null){ + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El teléfono de casa es obligatoria"); + return; + } + if(endorsement.getAddressHome()== null){ + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El domicilio personal es obligatoria"); + return; + } + if(endorsementCtrl.updateByPeopleId(endorsement)) + { + showMessage(FacesMessage.SEVERITY_INFO, "Aval modificado", "Se modificó correctamente."); + } + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public EndorsementController getCustomerCtrl() { + return endorsementCtrl; + } + + public void setEndorsementCtrl(EndorsementController endorsementCtrl) { + this.endorsementCtrl = endorsementCtrl; + } + + public People getEndorsement() { + return endorsement; + } + + public void setEndorsement(People endorsement) { + this.endorsement = endorsement; + } + + public String getEndorsementId() { + return endorsementId; + } + + public void setEndorsementId(String endorsementId) { + this.endorsementId = endorsementId; + } + + public List getLoan() { + return loan; + } + + public void setLoan(List loan) { + this.loan = loan; + } + + private EndorsementController endorsementCtrl; + private People endorsement; + private String endorsementId; + private List loan; + + @PostConstruct + public void init() { + endorsementCtrl = new EndorsementController(); + setEndorsementId(externalContext().getRequestParameterMap().get("form:dtEndorsement_selection")); + endorsement = getEndorsementDetail(getEndorsementId()); + loan = getLoanByPeople(getEndorsementId()); + + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ExpenseCompanyInBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ExpenseCompanyInBean.java new file mode 100644 index 0000000..eb3942f --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ExpenseCompanyInBean.java @@ -0,0 +1,239 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.GenericValidationController; +import com.arrebol.apc.controller.admin.ExpenseCompanyController; +import com.arrebol.apc.controller.admin.StableGeneralBoxController; +import com.arrebol.apc.model.admin.ExpenseCompany; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.ExpenseCompanyType; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("expenseCompanyInManager") +@ViewScoped +public class ExpenseCompanyInBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setExpenseCompany(fillDatatableExpenseCompany()); + } + } catch (Exception e) { + } + } + + public List fillDatatableExpenseCompany() { + + return getExpenseCompanyCtrl().fillxpenseCompanyInDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + Date date = new Date(); + if (genericCtrl.existStableGeneralBoxByCreatedOn(date)) { + showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden agregar más entradas porque ya se existe un cuadre de caja general de hoy."); + return; + } + + ExpenseCompany expense = new ExpenseCompany(); + expense.setActiveStatus(ActiveStatus.ENEBLED); + expense.setExpenseCompanyType(ExpenseCompanyType.PAYMENT_IN); + expense.setOffice(new Office(getLoggedUser().getOffice().getId())); + expense.setAmount(new BigDecimal(amount)); + expense.setDescription(comments); + expense.setCreatedOn(new Date()); + expense.setCreatedBy(getLoggedUser().getId()); + expenseCompanyCtrl.saveExpenseCompany(expense); + expenseCompany.clear(); + expenseCompany = fillDatatableExpenseCompany(); + amount = ""; + comments = ""; + FacesMessage msg = new FacesMessage("Nueva entrada", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + + @Override + public void deleteRow() { + if (genericCtrl.existStableGeneralBoxByCreatedOn(selectedExpenseCompany.getCreatedOn())) { + showMessage(FacesMessage.SEVERITY_WARN, "Entradas", "No se puede borrar porque ya se realizo el cuadre de caja general del día."); + } else { + boolean delete = true; + delete = selectedExpenseCompany.getActiveStatus() == ActiveStatus.ENEBLED ? true : false; + + if (delete) { + Bitacora bitacora = new Bitacora(); + ExpenseCompany expenseIn = expenseCompanyCtrl.getExpenseById(selectedExpenseCompany.getId()); + bitacora.setAction("Eliminar entrada"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacora.setDescription("Se eliminó la entrada con monto $" + + expenseIn.getAmount() + " y fecha " + expenseIn.getCreatedOn()); + + expenseCompanyCtrl.updateExpenseCompanyByStatus(ActiveStatus.DISABLED, selectedExpenseCompany.getId(), getLoggedUser().getUser().getId()); + //expenseCompany.remove(selectedExpenseCompany); + searchHistoricalAction(); + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + selectedExpenseCompany = null; + showMessage(FacesMessage.SEVERITY_INFO, "Entrada Eliminada", "Se eliminó correctamente."); + } + } + } + + public ExpenseCompanyController getExpenseCompanyCtrl() { + return expenseCompanyCtrl; + } + + public void setExpenseCompanyCtrl(ExpenseCompanyController expenseCompanyCtrl) { + this.expenseCompanyCtrl = expenseCompanyCtrl; + } + + public List getExpenseCompany() { + return expenseCompany; + } + + public void setExpenseCompany(List expenseCompany) { + this.expenseCompany = expenseCompany; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public ExpenseCompany getSelectedExpenseCompany() { + return selectedExpenseCompany; + } + + public void setSelectedExpenseCompany(ExpenseCompany selectedExpenseCompany) { + this.selectedExpenseCompany = selectedExpenseCompany; + } + + public String getCommentsBitacora() { + return commentsBitacora; + } + + public void setCommentsBitacora(String commentsBitacora) { + this.commentsBitacora = commentsBitacora; + } + + public BitacoraController getBitacoraCtrl() { + return bitacoraCtrl; + } + + public void setBitacoraCtrl(BitacoraController bitacoraCtrl) { + this.bitacoraCtrl = bitacoraCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public GenericValidationController getGenericValidateController() { + return genericValidateController; + } + + public void setGenericValidateController(GenericValidationController genericController) { + this.genericValidateController = genericController; + } + + public Date getLastStableGeneralBox() { + return lastStableGeneralBox; + } + + public void setLastStableGeneralBox(Date lastStableGeneralBox) { + this.lastStableGeneralBox = lastStableGeneralBox; + } + + private ExpenseCompanyController expenseCompanyCtrl; + private BitacoraController bitacoraCtrl; + private GenericController genericCtrl; + private GenericValidationController genericValidateController; + private Date lastStableGeneralBox; + + private List expenseCompany; + + private String amount; + private String comments; + + private ExpenseCompany selectedExpenseCompany; + + private String commentsBitacora; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initOneWeekBeforeToCurrdate(); + + expenseCompanyCtrl = new ExpenseCompanyController(); + bitacoraCtrl = new BitacoraController(); + genericCtrl = new GenericController(); + setGenericValidateController(new GenericValidationController()); + setLastStableGeneralBox(getGenericValidateController().lastStableGeneralBoxByDate(getLoggedUser().getUser())); + expenseCompany = fillDatatableExpenseCompany(); + commentsBitacora = ""; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ExpenseCompanyOutBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ExpenseCompanyOutBean.java new file mode 100644 index 0000000..eafadd4 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/ExpenseCompanyOutBean.java @@ -0,0 +1,248 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.GenericValidationController; +import com.arrebol.apc.controller.admin.ExpenseCompanyController; +import com.arrebol.apc.controller.admin.StableGeneralBoxController; +import com.arrebol.apc.model.admin.ExpenseCompany; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.ExpenseCompanyType; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("expenseCompanyOutManager") +@ViewScoped +public class ExpenseCompanyOutBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setExpenseCompany(fillDatatableExpenseCompany()); + } + } catch (Exception e) { + } + } + + public List fillDatatableExpenseCompany() { + return getExpenseCompanyCtrl().fillxpenseCompanyOutDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + Date date = new Date(); + if (genericCtrl.existStableGeneralBoxByCreatedOn(date)) { + showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden agregar más gastos administrativos porque ya se existe un cuadre de caja general de hoy."); + return; + } + if(stableGeneralBoxCtrl.getTotalBox().compareTo(new BigDecimal(amount))>=0){ + ExpenseCompany expense = new ExpenseCompany(); + expense.setActiveStatus(ActiveStatus.ENEBLED); + expense.setExpenseCompanyType(ExpenseCompanyType.PAYMENT_OUT); + expense.setOffice(new Office(getLoggedUser().getOffice().getId())); + expense.setAmount(new BigDecimal(amount)); + expense.setDescription(comments); + expense.setCreatedOn(new Date()); + expense.setCreatedBy(getLoggedUser().getUser().getId()); + expenseCompanyCtrl.saveExpenseCompany(expense); + expenseCompany.clear(); + + amount = ""; + comments = ""; + totalCaja= stableGeneralBoxCtrl.getTotalBox(); + FacesMessage msg = new FacesMessage("Nueva Salida", "Se agregó correctamente"); + + setExpenseCompany(fillDatatableExpenseCompany()); + FacesContext.getCurrentInstance().addMessage(null, msg);} + else{ + showMessage(FacesMessage.SEVERITY_WARN, "Salida incorrecta", "No se pueden generar la salida porque es mas grande que la cantidad en caja general."); + } + } + + @Override + public void deleteRow() { + if (genericCtrl.existStableGeneralBoxByCreatedOn(selectedExpenseCompany.getCreatedOn())) { + showMessage(FacesMessage.SEVERITY_WARN, "Gasto administrativo", "No se puede borrar porque ya se realizo el cuadre de caja general del día."); + } else { + boolean delete = true; + delete = selectedExpenseCompany.getActiveStatus() == ActiveStatus.ENEBLED ? true : false; + + if (delete) { + Bitacora bitacora = new Bitacora(); + ExpenseCompany expenseOut = expenseCompanyCtrl.getExpenseById(selectedExpenseCompany.getId()); + bitacora.setAction("Eliminar gasto administrativo"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacora.setDescription("Se eliminó el gasto administrativo con monto $" + + expenseOut.getAmount() + " y fecha " + expenseOut.getCreatedOn()); + + expenseCompanyCtrl.updateExpenseCompanyByStatus(ActiveStatus.DISABLED, selectedExpenseCompany.getId(), getLoggedUser().getUser().getId()); + // expenseCompany.remove(selectedExpenseCompany); + searchHistoricalAction(); + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + selectedExpenseCompany = null; + showMessage(FacesMessage.SEVERITY_INFO, "Gasto administrativo eliminado", "Se eliminó correctamente."); + } + } + } + + public ExpenseCompanyController getExpenseCompanyCtrl() { + return expenseCompanyCtrl; + } + + public void setExpenseCompanyCtrl(ExpenseCompanyController expenseCompanyCtrl) { + this.expenseCompanyCtrl = expenseCompanyCtrl; + } + + public List getExpenseCompany() { + return expenseCompany; + } + + public void setExpenseCompany(List expenseCompany) { + this.expenseCompany = expenseCompany; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public ExpenseCompany getSelectedExpenseCompany() { + return selectedExpenseCompany; + } + + public void setSelectedExpenseCompany(ExpenseCompany selectedExpenseCompany) { + this.selectedExpenseCompany = selectedExpenseCompany; + } + + public BitacoraController getBitacoraCtrl() { + return bitacoraCtrl; + } + + public void setBitacoraCtrl(BitacoraController bitacoraCtrl) { + this.bitacoraCtrl = bitacoraCtrl; + } + + public String getCommentsBitacora() { + return commentsBitacora; + } + + public void setCommentsBitacora(String commentsBitacora) { + this.commentsBitacora = commentsBitacora; + } + + public GenericValidationController getGenericValidateController() { + return genericValidateController; + } + + public void setGenericValidateController(GenericValidationController genericController) { + this.genericValidateController = genericController; + } + + public Date getLastStableGeneralBox() { + return lastStableGeneralBox; + } + + public BigDecimal getTotalCaja() { + return totalCaja; + } + + public void setTotalCaja(BigDecimal totalCaja) { + this.totalCaja = totalCaja; + } + + public void setLastStableGeneralBox(Date lastStableGeneralBox) { + this.lastStableGeneralBox = lastStableGeneralBox; + } + + private ExpenseCompanyController expenseCompanyCtrl; + private BitacoraController bitacoraCtrl; + private GenericController genericCtrl; + private StableGeneralBoxController stableGeneralBoxCtrl; + + private GenericValidationController genericValidateController; + private Date lastStableGeneralBox; + + private List expenseCompany; + + private String amount; + private String comments; + + private BigDecimal totalCaja; + private ExpenseCompany selectedExpenseCompany; + private String commentsBitacora; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initOneWeekBeforeToCurrdate(); + + expenseCompanyCtrl = new ExpenseCompanyController(); + stableGeneralBoxCtrl = new StableGeneralBoxController(); + totalCaja= stableGeneralBoxCtrl.getTotalBox(); + bitacoraCtrl = new BitacoraController(); + genericCtrl = new GenericController(); + setGenericValidateController(new GenericValidationController()); + setLastStableGeneralBox(getGenericValidateController().lastStableGeneralBoxByDate(getLoggedUser().getUser())); + commentsBitacora = ""; + expenseCompany = fillDatatableExpenseCompany(); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/FeesBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/FeesBean.java new file mode 100644 index 0000000..c79c92e --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/FeesBean.java @@ -0,0 +1,212 @@ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.FeesController; +import com.arrebol.apc.controller.catalog.RouteController; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.views.FeesView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +/** + * + * @author David Rodriguez + */ +@Named("feesManager") +@ViewScoped +public class FeesBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setFees(fillDatatableFees()); + setTotalValue(); + } + } catch (Exception e) { + } + } + + public void searchHistoricalActionByRoute() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setFees(fillDatatableFeesByRoute()); + setTotalValue(); + } + } catch (Exception e) { + } + } + + public BigDecimal searchTotalFeesAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalValue(); + } + } catch (Exception e) { + } + return getTotalFees(); + } + + public FeesController getFeesCtrl() { + return feesCtrl; + } + + public void setFeesCtrl(FeesController feesCtrl) { + this.feesCtrl = feesCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatableFees() { + return getFeesCtrl().fillFeesDataTable(getStarDate(), getEndDate(), getUserSelectedId()); + } + + public List fillDatatableFeesByRoute() { + return getFeesCtrl().fillFeesDataTableByRoute(getStarDate(), getEndDate(), getRouteSelectedId()); + } + + public BigDecimal fillTotalFees() { + return getFeesCtrl().fillTotalFees(getStarDate(), getEndDate()); + } + + public List getFees() { + return fees; + } + + public void setFees(List fees) { + this.fees = fees; + } + + public FeesView getSelectedFees() { + return selectedFees; + } + + public void setSelectedFees(FeesView selectedFees) { + this.selectedFees = selectedFees; + } + + public BigDecimal getTotalFees() { + return totalFees; + } + + public void setTotalFees(BigDecimal totalFees) { + this.totalFees = totalFees; + } + + public List getUsers() { + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + public String getUserSelectedId() { + return userSelectedId; + } + + public void setUserSelectedId(String userSelectedId) { + this.userSelectedId = userSelectedId; + } + + public List getRoutes() { + return routes; + } + + public RouteController getRouteCtrl() { + return routeCtrl; + } + + public void setRouteCtrl(RouteController routeCtrl) { + this.routeCtrl = routeCtrl; + } + + public String getRouteSelectedId() { + return routeSelectedId; + } + + public void setRouteSelectedId(String routeSelectedId) { + this.routeSelectedId = routeSelectedId; + } + + private FeesController feesCtrl; + private GenericController genericCtrl; + private List fees; + private FeesView selectedFees; + private BigDecimal totalFees; + + private RouteController routeCtrl; + private List routes; + private String routeSelectedId; + + private List users; + private String userSelectedId; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initOneWeekBeforeToCurrdate(); + + feesCtrl = new FeesController(); + genericCtrl = new GenericController(); + routeCtrl = new RouteController(); + fees = fillDatatableFees(); + setTotalValue(); + routes = routeCtrl.fillRoutesDatatable(getLoggedUser().getOffice().getId()); + } + + private void setTotalValue() { + if (fees != null && !fees.isEmpty()) { + setTotalFees(fees.stream().map(FeesView::getTotalFees).reduce(BigDecimal::add).get()); + } else { + setTotalFees(BigDecimal.ZERO); + } + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/GenericPersonSearchBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/GenericPersonSearchBean.java new file mode 100644 index 0000000..537e543 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/GenericPersonSearchBean.java @@ -0,0 +1,193 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.admin.AdministrationPersonSearchViewController; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.model.views.AdministrationPersonSerchView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.util.ArrayList; +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.primefaces.event.SelectEvent; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +public abstract class GenericPersonSearchBean extends GenericBean implements Datatable { + + public void onSearchSinglePersonByNameItemSelect(SelectEvent event) { + try { + getPersonList().clear(); + getPersonList().add(getAdminSearchController().administrationPersonSerchViewById(((AdministrationPersonSerchView) event.getObject()).getId())); + } catch (Exception e) { + logger.error("onItemSelect", e); + } + } + + /** + * + * @param type + */ + protected void fillPersonList(PeopleType type) { + try { + setPersonList(getAdminSearchController().findPersonByTypeAndRouteAndOffice(type, getRouteId(), getLoggedUser().getOffice().getId())); + } catch (Exception e) { + setPersonList(new ArrayList<>()); + logger.error("fillPersonList", e); + } + } + + /** + * + * @param nameToSearch + * @param type + * @return + */ + protected List executeAutoComplete(String nameToSearch, PeopleType type) { + List results; + try { + results = getAdminSearchController().likePersonNameInPersonTypeAllRoutesByOffice("%" + nameToSearch + "%", type, getLoggedUser().getOffice().getId()); + } catch (Exception e) { + results = new ArrayList<>(); + + logger.error("executeAutoComplete", e); + } + return results; + } + + /** + * + * @param isAll + * @param peopleType + */ + protected void executeQueryLike(boolean isAll, PeopleType peopleType) { + try { + cleanAndPrepareRoutesDetails(isAll); + fillPersonListLikePersonName(peopleType); + } catch (Exception e) { + logger.error("executeQueryLike", e); + } + } + + /** + * + * @param type + */ + private void fillPersonListLikePersonName(PeopleType type) { + try { + setPersonList(getAdminSearchController().likePersonNameInPersonTypeInRoutesAndOffice("%" + getSearchPersonName() + "%", type, getIdRoutes(), getLoggedUser().getOffice().getId())); + } catch (Exception e) { + setPersonList(new ArrayList<>()); + logger.error("fillPersonListLikePersonName", e); + } + } + + /** + * + * @param isAll + */ + private void cleanAndPrepareRoutesDetails(boolean isAll) { + getIdRoutes().clear(); + + if (isAll) { + getRoutes().forEach((t) -> { + getIdRoutes().add(t.getId()); + }); + } else { + getIdRoutes().add(getRouteId()); + } + + } + + final Logger logger = LogManager.getLogger(getClass()); + + private AdministrationPersonSearchViewController adminSearchController; + private List personList; + private List routes; + private List idRoutes; + private String routeId; + private AdministrationPersonSerchView selectedPerson; + private String searchPersonName; + private AdministrationPersonSerchView searchSinglePersonByName; + + public AdministrationPersonSearchViewController getAdminSearchController() { + return adminSearchController; + } + + public void setAdminSearchController(AdministrationPersonSearchViewController adminSearchController) { + this.adminSearchController = adminSearchController; + } + + public List getPersonList() { + if (null == personList) { + personList = new ArrayList<>(); + } + return personList; + } + + public void setPersonList(List personList) { + this.personList = personList; + } + + public List getRoutes() { + return routes; + } + + public void setRoutes(List routes) { + this.routes = routes; + } + + public List getIdRoutes() { + if (null == idRoutes) { + idRoutes = new ArrayList<>(); + } + return idRoutes; + } + + public void setIdRoutes(List idRoutes) { + this.idRoutes = idRoutes; + } + + public String getRouteId() { + return routeId; + } + + public void setRouteId(String routeId) { + this.routeId = routeId; + } + + public AdministrationPersonSerchView getSelectedPerson() { + return selectedPerson; + } + + public void setSelectedPerson(AdministrationPersonSerchView selectedPerson) { + this.selectedPerson = selectedPerson; + } + + public String getSearchPersonName() { + return searchPersonName; + } + + public void setSearchPersonName(String searchPersonName) { + this.searchPersonName = searchPersonName; + } + + public AdministrationPersonSerchView getSearchSinglePersonByName() { + return searchSinglePersonByName; + } + + public void setSearchSinglePersonByName(AdministrationPersonSerchView searchSinglePersonByName) { + this.searchSinglePersonByName = searchSinglePersonByName; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/GoalBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/GoalBean.java new file mode 100644 index 0000000..2251cfa --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/GoalBean.java @@ -0,0 +1,155 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.admin.GoalController; +import com.arrebol.apc.model.admin.Goal; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; + +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("goalManager") +@ViewScoped +public class GoalBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setGoal(getGoalCtrl().fillGoalDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate())); + } + } catch (Exception e) { + } + } + + public List fillDatatableGoal() { + + return getGoalCtrl().fillGoalDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + } + + @Override + public void editRow(RowEditEvent event) { + Goal goal = (Goal) event.getObject(); + if (goal != null) { + goalCtrl.updateByGoalId(goal); + showMessage(FacesMessage.SEVERITY_INFO, "Registro Editado", "Se hizo el cambio correctamente."); + } + } + + @Override + public void onRowCancel(RowEditEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Edición Cancelada", ((Goal) event.getObject()).getAmount().toString()); + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + goalSave.setActiveStatus(ActiveStatus.ENEBLED); + goalSave.setAmount(new BigDecimal(amount)); + goalSave.setOffice(new Office(getLoggedUser().getOffice().getId())); + goalSave.setCreatedOn(new Date()); + goalSave.setCreatedBy(getLoggedUser().getId()); + goalCtrl.saveGoal(goalSave); + goalSave = new Goal(); + goal.clear(); + goal = fillDatatableGoal(); + amount = ""; + FacesMessage msg = new FacesMessage("Nueva meta", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + + @Override + public void deleteRow() { + goalCtrl.updateGoalByStatus(ActiveStatus.DISABLED, selectedGoal.getId(), getLoggedUser().getUser().getId()); + goal.remove(selectedGoal); + selectedGoal = null; + showMessage(FacesMessage.SEVERITY_INFO, "Meta Eliminada", "Se eliminó correctamente."); + } + + public GoalController getGoalCtrl() { + return goalCtrl; + } + + public void setGoalCtrl(GoalController goalCtrl) { + this.goalCtrl = goalCtrl; + } + + public List getGoal() { + return goal; + } + + public void setGoal(List goal) { + this.goal = goal; + } + + public Goal getSelectedGoal() { + return selectedGoal; + } + + public void setSelectedGoal(Goal selectedGoal) { + this.selectedGoal = selectedGoal; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public Goal getGoalSave() { + return goalSave; + } + + public void setGoalSave(Goal goalSave) { + this.goalSave = goalSave; + } + + private GoalController goalCtrl; + + private List goal; + + private Goal selectedGoal; + private String amount; + + private Goal goalSave; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initOneWeekBeforeToCurrdate(); + + goalCtrl = new GoalController(); + goal = fillDatatableGoal(); + goalSave = new Goal(); + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanDetailTransferBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanDetailTransferBean.java new file mode 100644 index 0000000..3accefd --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanDetailTransferBean.java @@ -0,0 +1,332 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.controller.catalog.LoanTypeController; +import com.arrebol.apc.controller.catalog.RouteController; +import com.arrebol.apc.controller.util.DateWrapper; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.FeeStatus; +import com.arrebol.apc.model.enums.LoanDetailsType; +import com.arrebol.apc.model.enums.LoanStatus; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.model.enums.TransferStatus; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.model.loan.LoanFeeNotification; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar + */ + +@Named("loanDetailTransferManager") +@ViewScoped +public class LoanDetailTransferBean extends GenericBean implements Serializable, Datatable { + + + public List fillDatatableLoan() { + return getLoanCtrl().fillAllTransfersLoanDetails(); + } + + + public void authorizeLoanDetail(){ + getLoanCtrl().updateAuthorizeLoanDetailById(selectedLoanDetails.getId()); + + showMessage(FacesMessage.SEVERITY_INFO, "Deposito validado", "El depostio fue autorizado."); + setLoanDetails(fillDatatableLoan()); + + } + + + public void rejectLoanDetail(){ + + + showMessage(FacesMessage.SEVERITY_INFO, "Deposito validado", "El depostio fue rechazado."); + + + LoanDetails detail = new LoanDetails(); + Loan loan = selectedLoanDetails.getLoan(); + detail.setComments("Transferencia cancelada"); + detail.setCreatedBy(getLoggedUser().getUser().getId()); + detail.setCreatedOn(new Date()); + detail.setLoan(loan); + detail.setLoanDetailsType(LoanDetailsType.FEE); + detail.setTransferStatus(TransferStatus.AUTHORIZED); + detail.setTransferNumber("N/A"); + detail.setFeeStatus(FeeStatus.TO_PAY); + detail.setPaymentAmount(loan.getLoanType().getFee()); + detail.setPeopleType(PeopleType.CUSTOMER); + detail.setReferenceNumber(selectedLoanDetails.getLoan().getLastReferenceNumber() + 1); + detail.setUser(selectedLoanDetails.getUser()); + if (loanCtrl.saveLoanDetail(detail)) { + Loan loanUpdate = loanCtrl.getLoanById(loan.getId()); + loanUpdate.setAmountToPay(loanUpdate.getAmountToPay().add(loan.getLoanType().getFee())); + loanUpdate.setAmountPaid(loanUpdate.getAmountPaid().subtract(selectedLoanDetails.getPaymentAmount())); + loanUpdate.setLastUpdatedOn(new Date()); + loanUpdate.setLastUpdatedBy(getLoggedUser().getUser().getId()); + loanUpdate.setLastReferenceNumber(loanUpdate.getLastReferenceNumber() + 1); + loanCtrl.updateLoan(loanUpdate); + + LoanFeeNotification notification = new LoanFeeNotification(); + notification.setCreatedBy(getLoggedUser().getUser().getId()); + notification.setCreatedOn(new Date()); + notification.setLoan(loanUpdate); + notification.setUser(selectedLoanDetails.getUser()); + notification.setNotificationNumber(loanUpdate.getTotalFeeByLoan() + 1); + loanCtrl.saveLoanNotificationFee(notification); + + + showMessage(FacesMessage.SEVERITY_INFO, "Multa creada", "Se creo la multa de forma correcta."); + } + loanCtrl.deleteLoanDetails(selectedLoanDetails); + setLoanDetails(fillDatatableLoan()); + + } + public void deleteLoan() { + /* loanCtrl.updateLoanByStatusWeb(LoanStatus.DELETED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.DELETED, selectedLoan); + loan.remove(selectedLoan); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Eliminado' de forma correcta.");*/ + } + + public void changeApprovedStatus() { + /*loanCtrl.updateLoanByStatusWeb(LoanStatus.APPROVED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, selectedLoan); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/ + } + + public void changeFinishStatus() { + /*loanCtrl.updateLoanByStatusWeb(LoanStatus.FINISH, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.FINISH, selectedLoan); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/ + } + + public void deletePaymentLoan() { + + /*if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) { + + List details = loanCtrl.getLoanDetailsCurdatebyIdLoan(selectedLoan.getId()); + if (details != null && !details.isEmpty()) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + for (LoanDetails detail : details) { + loanUpdate.setAmountPaid(loanUpdate.getAmountPaid().subtract(detail.getPaymentAmount())); + loanUpdate.setLastReferenceNumber(loanUpdate.getLastReferenceNumber() - 1); + } + if (loanCtrl.deleteLoanDetailsByLoanCurdate(selectedLoan)) { + loanCtrl.updateLoan(loanUpdate); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_INFO, "Abonos eliminados", "Se eliminó el/los abonos del día de hoy correctamente."); + } + } else { + showMessage(FacesMessage.SEVERITY_WARN, "Advertencia", "El préstamo no tiene registrado abonos el día de hoy"); + } + } + else + { + showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar abono", "Solo puedes eliminar el abono de préstamos en estatus Aprobados o Pendiente por renovación"); + return; + }*/ + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + /** + * + * @param outcome + * @return + */ + public String detailLoan(String outcome) { + return outcome; + } + + public LoanController getLoanCtrl() { + return loanCtrl; + } + + public void setLoanCtrl(LoanController loanCtrl) { + this.loanCtrl = loanCtrl; + } + + public List getLoanDetails() { + return loanDetails; + } + + public void setLoanDetails(List loanDetails) { + this.loanDetails = loanDetails; + } + + public LoanDetails getSelectedLoanDetails() { + return selectedLoanDetails; + } + + public void setSelectedLoanDetails(LoanDetails selectedLoanDetails) { + this.selectedLoanDetails = selectedLoanDetails; + } + + + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List getUsers() { + return users; + } + + public void setUsers(List users) { + this.users = users; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + public BigDecimal getFee() { + return fee; + } + + public void setFee(BigDecimal fee) { + this.fee = fee; + } + + public LoanTypeController getLoanTypeCtrl() { + return loanTypeCtrl; + } + + public void setLoanTypeCtrl(LoanTypeController loanTypeCtrl) { + this.loanTypeCtrl = loanTypeCtrl; + } + + public String getLoanTypeId() { + return loanTypeId; + } + + public void setLoanTypeId(String loanTypeId) { + this.loanTypeId = loanTypeId; + } + + public String getRouteId() { + return routeId; + } + + public void setRouteId(String routeId) { + this.routeId = routeId; + } + + public RouteController getRouteCtrl() { + return routeCtrl; + } + + public void setRouteCtrl(RouteController routeCtrl) { + this.routeCtrl = routeCtrl; + } + + private LoanController loanCtrl; + private LoanTypeController loanTypeCtrl; + private GenericController genericCtrl; + private RouteController routeCtrl; + + private List loanDetails; + private List users; + private LoanDetails selectedLoanDetails; + private String comments; + private String userId; + private BigDecimal payment; + private BigDecimal fee; + private String loanTypeId; + private String routeId; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + + loanCtrl = new LoanController(); + genericCtrl = new GenericController(); + loanTypeCtrl = new LoanTypeController(); + routeCtrl = new RouteController(); + users = genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + + setLoanDetails(fillDatatableLoan()); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanEmployeeListBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanEmployeeListBean.java new file mode 100644 index 0000000..2a8f406 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanEmployeeListBean.java @@ -0,0 +1,411 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.GenericValidationController; +import com.arrebol.apc.controller.admin.LoanEmployeeController; +import com.arrebol.apc.model.admin.ExpenseCompany; +import com.arrebol.apc.model.admin.LoanEmployee; +import com.arrebol.apc.model.admin.LoanEmployeeDetails; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.views.LoanEmployeeView; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.model.views.LoanEmployeeDetailAllDataView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Administrador + */ +@Named("loanEmployeeListBean") +@ViewScoped +public class LoanEmployeeListBean extends GenericBean implements Serializable, Datatable { + + public List getDetails(String idLoan) { + try { + setLoanEmployeeDetails(getController().getLoanEmployeeDetailByIdLoan(idLoan)); + setTotalAmountLoan(fillTotalAmountLoan()); + } catch (Exception e) { + } + return null == loanEmployeeDetails ? new ArrayList<>() : loanEmployeeDetails; + } + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate())); + } + } catch (Exception e) { + } + } + + public BigDecimal searchTotalAmountLoan() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalAmountLoan(fillTotalAmountLoan()); + } + } catch (Exception e) { + } + return getTotalAmountLoan(); + } + + public BigDecimal fillTotalAmountLoan() { + return getController().fillTotalAmountLoan(getStarDate(), getEndDate()); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + Date date = new Date(); + if (genericCtrl.existStableGeneralBoxByCreatedOn(date)) { + showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden agregar más préstamos a empleados porque ya se existe un cuadre de caja general de hoy."); + return; + } + + if(amountLoan.compareTo(BigDecimal.ZERO)==0 || amountToPay.compareTo(BigDecimal.ZERO)==0 ){ + + showMessage(FacesMessage.SEVERITY_WARN, "Prestamo Incorrecto", "No se pueden agregar préstamos a empleados con monto o monto de abonos de 0"); + return; + + } + + if(amountLoan.compareTo(amountToPay)<=0){ + + showMessage(FacesMessage.SEVERITY_WARN, "Prestamo Incorrecto", "No se pueden agregar préstamos a empleados con valor a pagar menor a sus abonos"); + return; + + } + + LoanEmployee loan = new LoanEmployee(); + loan.setIdEmployee(userId); + loan.setCreatedOn(new Date()); + loan.setCreatedBy(getLoggedUser().getUser().getId()); + loan.setAmountLoan(amountLoan); + loan.setAmountToPay(amountToPay); + loan.setLoanEmployeeStatus(ActiveStatus.ENEBLED); + + // Calcula numero de semanas + Double interes = 0.05; + Double interesReal = 0.0; + Double semanasD = amountLoan.doubleValue()/amountToPay.doubleValue(); + int numSemanas = semanasD.intValue(); + double residuo = semanasD - numSemanas; + if(residuo != 0.0){ + numSemanas += 1; + } + + // Calcula número de meses + int numMeses = numSemanas/4; + if(numSemanas % 4 > 0){ + numMeses += 1; + } + + // Calcula el interes real 0.05 por el número de meses + interesReal = interes * numMeses; + Double saldoTotal = (amountLoan.doubleValue() * interesReal) + amountLoan.doubleValue(); + loan.setTotalAmountToPay(new BigDecimal(saldoTotal)); + loan.setBalance(new BigDecimal(saldoTotal)); + + HumanResource hr = users.stream().filter(p -> p.getId().equals(userId)).findFirst().get(); + hr.setBalance(hr.getBalance().add(new BigDecimal(saldoTotal))); + + getController().saveLoanEmployee(loan, hr); + + userId = ""; + amountLoan = BigDecimal.ZERO; + amountToPay = BigDecimal.ZERO; + + setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate())); + } + + public void addRowLoanDetail() { + + if(loanDetailAmount.compareTo(BigDecimal.ZERO)==0){ + + showMessage(FacesMessage.SEVERITY_WARN, "Abono Incorrecto", "No se pueden agregar un abono de 0"); + return; + + } + + if(loanDetailAmount.compareTo(BigDecimal.ZERO)<0){ + + showMessage(FacesMessage.SEVERITY_WARN, "Abono Incorrecto", "No se pueden agregar un abono negativo"); + return; + + } + + if (genericCtrl.existStableGeneralBoxByCreatedOn(new Date())) { + showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden hacer mas abonos a prestamos porque ya se existe un cuadre de caja general de hoy."); + return; + } + + + if(loanDetailAmount.compareTo(selectedLoan.getBalance())<=0){ + if(selectedLoan.getLoanEmployeeStatus()== ActiveStatus.ENEBLED){ + LoanEmployeeDetails loanDetail = new LoanEmployeeDetails(); + loanDetail.setIdLoan(selectedLoan.getId()); + loanDetail.setIdUser(selectedLoan.getIdUser()); + loanDetail.setPaymentAmount(loanDetailAmount); + loanDetail.setReferenceNumber(selectedLoan.getReferenceNumber() + 1); + loanDetail.setCreatedOn(new Date()); + loanDetail.setCreatedBy(getLoggedUser().getUser().getId()); + loanDetail.setLoanEmployeeDetailStatus(ActiveStatus.ENEBLED); + loanDetail.setPayroll(ActiveStatus.DISABLED); + + HumanResource hr = users.stream().filter(p -> p.getId().equals(selectedLoan.getIdUser())).findFirst().get(); + hr.setBalance(hr.getBalance().subtract(loanDetailAmount)); + + LoanEmployee loan = getController().getLoanEmployeeById(selectedLoan.getId()); + loan.setBalance(loan.getBalance().subtract(loanDetailAmount)); + + getController().saveLoanEmployeeDetail(loanDetail, hr, loan); + loanDetailAmount = BigDecimal.ZERO; + + setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate())); + showMessage(FacesMessage.SEVERITY_INFO, "Abono correcto", "Abono creado correctamente.");} + else{ + showMessage(FacesMessage.SEVERITY_WARN, "Prestamo deshabilitado", "No se puede abonar a un préstamo deshabilitado"); + } + }else{ + showMessage(FacesMessage.SEVERITY_WARN, "Cantidad incorrecta", "La cantidad a abonar es mayor a la deuda faltante del préstamo"); + } + + } + + @Override + public void deleteRow() { + + if (genericCtrl.existStableGeneralBoxByCreatedOn(selectedLoan.getCreatedOn())) { + showMessage(FacesMessage.SEVERITY_WARN, "Préstamo a empleado", "No se puede borrar porque ya se realizó el cuadre de caja general del día."); + } else { + if(selectedLoan.getTotalAmountToPay().compareTo(selectedLoan.getBalance())==0){ + boolean delete = true; + delete = selectedLoan.getLoanEmployeeStatus() == ActiveStatus.ENEBLED ? true : false; + + if (delete) { + getController().updateLoanEmployeeByStatus(ActiveStatus.DISABLED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate())); + + Bitacora bitacora = new Bitacora(); + LoanEmployee loan = getController().getLoanEmployeeById(selectedLoan.getId()); + bitacora.setAction("Eliminar gasto administrativo"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacora.setDescription("Se eliminó el prestamo con monto $" + + loan.getAmountLoan()+ " y fecha " + loan.getCreatedOn()); + + /* + List details = getDetails(selectedLoan.getId()); + if (details != null) { + for (LoanEmployeeDetailAllDataView detail : details) { + getController().updateLoanEmployeeDetailByStatus(ActiveStatus.DISABLED, detail.getId(), getLoggedUser().getUser().getId()); + } + }*/ + + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_INFO, "Préstamo a empleado eliminado", "Se eliminó correctamente."); + } + } + else{ + showMessage(FacesMessage.SEVERITY_INFO, "Préstamo tiene abonos agregados", "No se puede borrar un préstamo con abonos."); + } + + } + } + + private LoanEmployeeController controller; + private GenericController genericCtrl; + private List loanEmployeeView; + private List loanEmployeeDetails; + private LoanEmployeeView selectedLoan; + private List users; + private String userId; + private BigDecimal amountLoan; + private BigDecimal amountToPay; + private BigDecimal loanDetailAmount; + private BigDecimal totalAmountLoan; + + private BitacoraController bitacoraCtrl; + private GenericValidationController genericValidateController; + private Date lastStableGeneralBox; + private String commentsBitacora; + + public BigDecimal getTotalAmountLoan() { + return totalAmountLoan; + } + + public void setTotalAmountLoan(BigDecimal totalAmountLoan) { + this.totalAmountLoan = totalAmountLoan; + } + + public BigDecimal getAmountLoan() { + return amountLoan; + } + + public void setAmountLoan(BigDecimal amountLoan) { + this.amountLoan = amountLoan; + } + + public BigDecimal getLoanDetailAmount() { + return loanDetailAmount; + } + + public void setLoanDetailAmount(BigDecimal loanDetailAmount) { + this.loanDetailAmount = loanDetailAmount; + } + + public BigDecimal getAmountToPay() { + return amountToPay; + } + + public void setAmountToPay(BigDecimal amountToPay) { + this.amountToPay = amountToPay; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List getUsers() { + return users; + } + + public void setUsers(List users) { + this.users = users; + } + + public List getLoanEmployeeView() { + return loanEmployeeView; + } + + public void setLoanEmployeeView(List loanEmployeeView) { + this.loanEmployeeView = loanEmployeeView; + } + + public LoanEmployeeView getSelectedLoan() { + return selectedLoan; + } + + public void setSelectedLoan(LoanEmployeeView selectedLoan) { + this.selectedLoan = selectedLoan; + } + + public LoanEmployeeController getController() { + return controller; + } + + public void setController(LoanEmployeeController controller) { + this.controller = controller; + } + + public List getLoanEmployee() { + return loanEmployeeView; + } + + public void setLoanEmployee(List loanEmployee) { + this.loanEmployeeView = loanEmployee; + } + + public List getLoanEmployeeDetails() { + return loanEmployeeDetails; + } + + public void setLoanEmployeeDetails(List loanEmployeeDetails) { + this.loanEmployeeDetails = loanEmployeeDetails; + } + + public String getCommentsBitacora() { + return commentsBitacora; + } + + public void setCommentsBitacora(String commentsBitacora) { + this.commentsBitacora = commentsBitacora; + } + + public GenericValidationController getGenericValidateController() { + return genericValidateController; + } + + public void setGenericValidateController(GenericValidationController genericController) { + this.genericValidateController = genericController; + } + + public Date getLastStableGeneralBox() { + return lastStableGeneralBox; + } + + public void setLastStableGeneralBox(Date lastStableGeneralBox) { + this.lastStableGeneralBox = lastStableGeneralBox; + } + + @PostConstruct + public void init() { + try { + loadBundlePropertyFile(); + genericCtrl = new GenericController(); + setController(new LoanEmployeeController()); + bitacoraCtrl = new BitacoraController(); + setGenericValidateController(new GenericValidationController()); + setLastStableGeneralBox(getGenericValidateController().lastStableGeneralBoxByDate(getLoggedUser().getUser())); + setLoanEmployee(getController().fillLoanEmployeeDataTable(getStarDate(), getEndDate())); + // users = genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + users = genericCtrl.getAllHRByOffice(getLoggedUser().getOffice().getId()); + totalAmountLoan = fillTotalAmountLoan(); + } catch (Exception e) { + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanHistoryBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanHistoryBean.java new file mode 100644 index 0000000..574408d --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanHistoryBean.java @@ -0,0 +1,546 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.controller.catalog.LoanTypeController; +import com.arrebol.apc.controller.catalog.RouteController; +import com.arrebol.apc.controller.util.DateWrapper; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.LoanStatus; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanType; +import com.arrebol.apc.model.views.HistoryLoanView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("loanHistoryManager") +@ViewScoped +public class LoanHistoryBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setLoan(getLoanCtrl().fillAllLoansViewDatatable(getStarDate(), getEndDate())); + } + } catch (Exception e) { + } + } + + public List fillDatatableLoan() { + return getLoanCtrl().fillAllLoansViewDatatable(getStarDate(), getEndDate()); + } + + public void changeBonusNewCustomer() { + loanCtrl.updateBonusNewCustomer(ActiveStatus.ENEBLED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "El préstamo empezó a contar como bono de cliente nuevo."); + } + + public void removeBonusNewCustomer() { + loanCtrl.updateBonusNewCustomer(ActiveStatus.DISABLED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "El préstamo ya no contará como bono de cliente nuevo."); + } + + public void deleteFeeLoan() { + + /* if (selectedLoan.getEstatusPrestamo()== LoanStatus.APPROVED.getValue() || selectedLoan.getEstatusPrestamo() == LoanStatus.PENDING_RENOVATION.getValue()) { + + List details = loanCtrl.getLoanDetailsFeeCurdatebyIdLoan(selectedLoan.getId()); + if (details != null && !details.isEmpty()) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + for (LoanDetails detail : details) { + loanUpdate.setAmountToPay(loanUpdate.getAmountToPay().subtract(detail.getPaymentAmount())); + } + if (loanCtrl.deleteLoanDetailsFeeByLoanCurdate(selectedLoan)) { + loanCtrl.deleteLoanFeeNotificationByLoanCurdate(selectedLoan); + loanCtrl.updateLoan(loanUpdate); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_INFO, "Multas eliminadas", "Se eliminó el/las multas del día de hoy correctamente."); + } + } else { + showMessage(FacesMessage.SEVERITY_WARN, "Advertencia", "El préstamo no tiene registrado multas el día de hoy"); + } + } + else + { + showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar la multa", "Solo puedes eliminar la multa de préstamos en estatus Aprobados o Pendiente por renovación"); + return; + }*/ + } + + public void changeRoute() { + if (!routeId.isEmpty()) { + if (loanCtrl.updateRouteById(new RouteCtlg(routeId), selectedLoan.getId(), getLoggedUser().getUser().getId())) { + showMessage(FacesMessage.SEVERITY_INFO, "Ruta modificada", "Se modificó correctamente."); + } else { + showMessage(FacesMessage.SEVERITY_WARN, "Ruta modificada", "Ocurrió un error durante el proceso."); + } + + } + } + + public void changeLoanType() { + if (selectedLoan.getEstatusPrestamo() != LoanStatus.TO_DELIVERY.getValue()) { + loanTypeId = ""; + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_WARN, "No se puede cambiar el tipo de préstamo", "Solo puedes cambiar el monto a prestar de préstamos en estatus Por liberar"); + return; + } + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + loanUpdate.setLoanType(new LoanType(loanTypeId)); + loanUpdate.setAmountToPay(loanTypeCtrl.getLoanTypeById(loanTypeId).getPaymentTotal()); + if (loanCtrl.updateLoan(loanUpdate)) { + loan.clear(); + loan = fillDatatableLoan(); + loanTypeId = ""; + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de tipo de préstamo", "El préstamo se cambió correctamente"); + } + + } + + public void deleteLoan() { + /* loanCtrl.updateLoanByStatusWeb(LoanStatus.DELETED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.DELETED, selectedLoan); + loan.remove(selectedLoan); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Eliminado' de forma correcta.");*/ + } + + public void changeApprovedStatus() { + /*loanCtrl.updateLoanByStatusWeb(LoanStatus.APPROVED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, selectedLoan); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/ + } + + public void changeFinishStatus() { + /*loanCtrl.updateLoanByStatusWeb(LoanStatus.FINISH, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.FINISH, selectedLoan); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/ + } + + public void deletePaymentLoan() { + + /*if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) { + + List details = loanCtrl.getLoanDetailsCurdatebyIdLoan(selectedLoan.getId()); + if (details != null && !details.isEmpty()) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + for (LoanDetails detail : details) { + loanUpdate.setAmountPaid(loanUpdate.getAmountPaid().subtract(detail.getPaymentAmount())); + loanUpdate.setLastReferenceNumber(loanUpdate.getLastReferenceNumber() - 1); + } + if (loanCtrl.deleteLoanDetailsByLoanCurdate(selectedLoan)) { + loanCtrl.updateLoan(loanUpdate); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_INFO, "Abonos eliminados", "Se eliminó el/los abonos del día de hoy correctamente."); + } + } else { + showMessage(FacesMessage.SEVERITY_WARN, "Advertencia", "El préstamo no tiene registrado abonos el día de hoy"); + } + } + else + { + showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar abono", "Solo puedes eliminar el abono de préstamos en estatus Aprobados o Pendiente por renovación"); + return; + }*/ + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public void addPayment() { + /*if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) { + LoanDetails detail = new LoanDetails(); + detail.setComments(comments); + detail.setCreatedBy(getLoggedUser().getUser().getId()); + detail.setCreatedOn(new Date()); + detail.setLoan(selectedLoan); + detail.setLoanDetailsType(LoanDetailsType.PAYMENT); + detail.setPaymentAmount(payment); + detail.setPeopleType(PeopleType.CUSTOMER); + detail.setReferenceNumber(selectedLoan.getLastReferenceNumber() + 1); + detail.setUser(new User(userId)); + if (loanCtrl.saveLoanDetail(detail)) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + loanUpdate.setAmountPaid(loanUpdate.getAmountPaid().add(payment)); + loanUpdate.setLastReferenceNumber(loanUpdate.getLastReferenceNumber() + 1); + if (loanUpdate.getAmountToPay().compareTo(loanUpdate.getAmountPaid()) == 0) { + + LoanByUser loanByUser = loanCtrl.getLoanByUserByIdLoan(loanUpdate); + loanByUser.setLoanByUserStatus(LoanStatus.FINISH); + if (loanCtrl.updateLoanByUser(loanByUser)) { + loanUpdate.setLoanStatus(LoanStatus.FINISH); + } + } + loanCtrl.updateLoan(loanUpdate); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + userId = ""; + comments = ""; + payment = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_INFO, "Agregar abono", "Se agregó el abono de forma correcta."); + } + } else { + selectedLoan = null; + userId = ""; + comments = ""; + payment = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_WARN, "No se puede abonar", "Solo puedes abonar préstamos en estatus Aprobados o Pendientes por renovación"); + return; + }*/ + + } + + public void addFee() { + /*if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) { + selectedLoan = null; + userId = ""; + comments = ""; + fee = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_WARN, "No se puede multar", "Solo puedes multar préstamos en estatus Aprobados"); + return; + } + LoanDetails detail = new LoanDetails(); + detail.setComments(comments); + detail.setCreatedBy(getLoggedUser().getUser().getId()); + detail.setCreatedOn(new Date()); + detail.setLoan(selectedLoan); + detail.setLoanDetailsType(LoanDetailsType.FEE); + detail.setPaymentAmount(fee); + detail.setPeopleType(PeopleType.CUSTOMER); + detail.setReferenceNumber(selectedLoan.getLastReferenceNumber() + 1); + detail.setUser(new User(userId)); + if (loanCtrl.saveLoanDetail(detail)) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + loanUpdate.setAmountToPay(loanUpdate.getAmountToPay().add(fee)); + loanUpdate.setLastReferenceNumber(loanUpdate.getLastReferenceNumber() + 1); + loanCtrl.updateLoan(loanUpdate); + + LoanFeeNotification notification = new LoanFeeNotification(); + notification.setCreatedBy(getLoggedUser().getUser().getId()); + notification.setCreatedOn(new Date()); + notification.setLoan(loanUpdate); + notification.setUser(new User(userId)); + notification.setNotificationNumber(loanUpdate.getTotalFeeByLoan() + 1); + loanCtrl.saveLoanNotificationFee(notification); + + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + userId = ""; + comments = ""; + fee = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_INFO, "Agregar multa", "Se agregó la multa de forma correcta."); + }*/ + } + + public void changeOwner() { + /*if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) { + selectedLoan = null; + userId = ""; + showMessage(FacesMessage.SEVERITY_WARN, "No se puede modificar propietario", "Solo puedes cambiar de propietario a préstamos en estatus Aprobados"); + return; + } + LoanByUser old = new LoanByUser(); + old = loanCtrl.getLoanByUserByIdLoan(selectedLoan); + + LoanByUser loanByUser = new LoanByUser(); + LoanByUserId idRelation = new LoanByUserId(); + + idRelation.setIdLoan(selectedLoan.getId()); + idRelation.setIdUser(userId); + + loanByUser.setId(idRelation); + loanByUser.setComments(old.getComments()); + loanByUser.setCreatedBy(old.getCreatedBy()); + loanByUser.setLoanByUserStatus(old.getLoanByUserStatus()); + loanByUser.setLoan(selectedLoan); + loanByUser.setOrderInList(old.getOrderInList()); + loanByUser.setOwnerLoan(OwnerLoan.CURRENT_OWNER); + loanByUser.setUser(new User(userId)); + if (loanCtrl.deleteLoanByUser(old)) { + loanCtrl.saveLoanByUser(loanByUser); + selectedLoan = null; + userId = ""; + loan.clear(); + loan = fillDatatableLoan(); + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de propietario", "Se reasignó el préstamo de forma correcta."); + } else { + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_ERROR, "Cambio de propietario", "Ocurrió un error al intentar hacer el cambio de propietario."); + }*/ + } + + /** + * + */ + private void initStartAndEndDates() { + try { + Calendar starDateCalendar = Calendar.getInstance(); + + starDateCalendar.setTime(DateWrapper.getTodayMXTime()); + starDateCalendar.add(Calendar.MONTH, -1); + + setStarDate(starDateCalendar.getTime()); + setEndDate(DateWrapper.getTodayMXTime()); + } catch (Exception e) { + + } + } + + public void approvedLoan() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + /** + * + * @param outcome + * @return + */ + public String detailLoan(String outcome) { + return outcome; + } + + public LoanController getLoanCtrl() { + return loanCtrl; + } + + public void setLoanCtrl(LoanController loanCtrl) { + this.loanCtrl = loanCtrl; + } + + public List getLoan() { + return loan; + } + + public void setLoan(List loan) { + this.loan = loan; + } + + public HistoryLoanView getSelectedLoan() { + return selectedLoan; + } + + public void setSelectedLoan(HistoryLoanView selectedLoan) { + this.selectedLoan = selectedLoan; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List getUsers() { + return users; + } + + public void setUsers(List users) { + this.users = users; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + public BigDecimal getFee() { + return fee; + } + + public void setFee(BigDecimal fee) { + this.fee = fee; + } + + public LoanTypeController getLoanTypeCtrl() { + return loanTypeCtrl; + } + + public void setLoanTypeCtrl(LoanTypeController loanTypeCtrl) { + this.loanTypeCtrl = loanTypeCtrl; + } + + public List getLoanType() { + return loanType; + } + + public void setLoanType(List loanType) { + this.loanType = loanType; + } + + public String getLoanTypeId() { + return loanTypeId; + } + + public void setLoanTypeId(String loanTypeId) { + this.loanTypeId = loanTypeId; + } + + public String getRouteId() { + return routeId; + } + + public void setRouteId(String routeId) { + this.routeId = routeId; + } + + public RouteController getRouteCtrl() { + return routeCtrl; + } + + public void setRouteCtrl(RouteController routeCtrl) { + this.routeCtrl = routeCtrl; + } + + public List getRoute() { + return route; + } + + public void setRoute(List route) { + this.route = route; + } + + public Date getStarDate() { + return starDate; + } + + public void setStarDate(Date starDate) { + this.starDate = starDate; + } + + public Date getEndDate() { + return endDate; + } + + public void setEndDate(Date endDate) { + this.endDate = endDate; + } + + private LoanController loanCtrl; + private LoanTypeController loanTypeCtrl; + private GenericController genericCtrl; + private RouteController routeCtrl; + + private List loan; + private List users; + private List loanType; + private List route; + private HistoryLoanView selectedLoan; + private String comments; + private String userId; + private BigDecimal payment; + private BigDecimal fee; + private String loanTypeId; + private String routeId; + + private Date starDate; + private Date endDate; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + + loanCtrl = new LoanController(); + genericCtrl = new GenericController(); + loanTypeCtrl = new LoanTypeController(); + routeCtrl = new RouteController(); + initStartAndEndDates(); + users = genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + loanType = loanTypeCtrl.fillLoanTypeDatatable(getLoggedUser().getOffice().getId()); + route = routeCtrl.fillRoutesDatatable(getLoggedUser().getOffice().getId()); + + setLoan(fillDatatableLoan()); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanHistoryDetailBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanHistoryDetailBean.java new file mode 100644 index 0000000..ec8c5bf --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanHistoryDetailBean.java @@ -0,0 +1,220 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.admin.CustomerController; +import com.arrebol.apc.controller.admin.EndorsementController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.enums.LoanStatus; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("loanHistoryDetailManager") +@ViewScoped +public class LoanHistoryDetailBean extends GenericBean implements Serializable, Datatable { + + public List getDetails(String id) { + try { + loanDetails = loanCtrl.getLoanDetailsbyId(id); + + } catch (Exception e) { + } + return null == loanDetails ? new ArrayList<>() : loanDetails; + } + + public People getCustomerDetail(String peopleId){ + return customerCtrl.findPeopleById(peopleId); + } + + public List getLoanByCustomer(String peopleId){ + return customerCtrl.findLoanByCustomer(peopleId); + } + + public List getLoanByEndorsement(String peopleId){ + return endorsementCtrl.findLoanByEndorsement(peopleId); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public CustomerController getCustomerCtrl() { + return customerCtrl; + } + + public void setCustomerCtrl(CustomerController customerCtrl) { + this.customerCtrl = customerCtrl; + } + + public People getCustomer() { + return customer; + } + + public void setCustomer(People customer) { + this.customer = customer; + } + + public List getLoanCustomer() { + return loanCustomer; + } + + public void setLoanCustomer(List loanCustomer) { + this.loanCustomer = loanCustomer; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public LoanController getLoanCtrl() { + return loanCtrl; + } + + public void setLoanCtrl(LoanController loanCtrl) { + this.loanCtrl = loanCtrl; + } + + public String getLoanId() { + return loanId; + } + + public void setLoanId(String loanId) { + this.loanId = loanId; + } + + public Loan getLoan() { + return loan; + } + + public void setLoan(Loan loan) { + this.loan = loan; + } + + public EndorsementController getEndorsementCtrl() { + return endorsementCtrl; + } + + public void setEndorsementCtrl(EndorsementController endorsementCtrl) { + this.endorsementCtrl = endorsementCtrl; + } + + public People getEndorsement() { + return endorsement; + } + + public void setEndorsement(People endorsement) { + this.endorsement = endorsement; + } + + public String getEndorsementId() { + return endorsementId; + } + + public void setEndorsementId(String endorsementId) { + this.endorsementId = endorsementId; + } + + public List getLoanEndorsement() { + return loanEndorsement; + } + + public void setLoanEndorsement(List loanEndorsement) { + this.loanEndorsement = loanEndorsement; + } + + public Loan getSelectedLoanCustomer() { + return selectedLoanCustomer; + } + + public void setSelectedLoanCustomer(Loan selectedLoanCustomer) { + this.selectedLoanCustomer = selectedLoanCustomer; + } + + public List getLoanDetails() { + return loanDetails; + } + + public void setLoanDetails(List loanDetails) { + this.loanDetails = loanDetails; + } + + private CustomerController customerCtrl; + private LoanController loanCtrl; + private EndorsementController endorsementCtrl; + + private People customer; + private Loan loan; + private People endorsement; + + private String customerId; + private String loanId; + private String endorsementId; + + private List loanEndorsement; + private List loanCustomer; + private Loan selectedLoanCustomer; + + private List loanDetails; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + customerCtrl = new CustomerController(); + loanCtrl = new LoanController(); + endorsementCtrl = new EndorsementController(); + + setLoanId(externalContext().getRequestParameterMap().get("form:dtLoan_selection")); + loan = loanCtrl.getLoanById(getLoanId()); + customer = loan.getCustomer(); + endorsement = loan.getEndorsement(); + loanEndorsement = getLoanByEndorsement(loan.getEndorsement().getId()); + loanCustomer = getLoanByCustomer(loan.getCustomer().getId()); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanHistoryJuridicalBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanHistoryJuridicalBean.java new file mode 100644 index 0000000..6d39ef0 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanHistoryJuridicalBean.java @@ -0,0 +1,546 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.controller.catalog.LoanTypeController; +import com.arrebol.apc.controller.catalog.RouteController; +import com.arrebol.apc.controller.util.DateWrapper; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.LoanStatus; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanType; +import com.arrebol.apc.model.views.HistoryLoanView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("loanHistoryJuridicalManager") +@ViewScoped +public class LoanHistoryJuridicalBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setLoan(getLoanCtrl().fillAllLoansJuridicalViewDatatable(getStarDate(), getEndDate())); + } + } catch (Exception e) { + } + } + + public List fillDatatableLoan() { + return getLoanCtrl().fillAllLoansJuridicalViewDatatable(getStarDate(), getEndDate()); + } + + public void changeBonusNewCustomer() { + loanCtrl.updateBonusNewCustomer(ActiveStatus.ENEBLED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "El préstamo empezó a contar como bono de cliente nuevo."); + } + + public void removeBonusNewCustomer() { + loanCtrl.updateBonusNewCustomer(ActiveStatus.DISABLED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "El préstamo ya no contará como bono de cliente nuevo."); + } + + public void deleteFeeLoan() { + + /* if (selectedLoan.getEstatusPrestamo()== LoanStatus.APPROVED.getValue() || selectedLoan.getEstatusPrestamo() == LoanStatus.PENDING_RENOVATION.getValue()) { + + List details = loanCtrl.getLoanDetailsFeeCurdatebyIdLoan(selectedLoan.getId()); + if (details != null && !details.isEmpty()) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + for (LoanDetails detail : details) { + loanUpdate.setAmountToPay(loanUpdate.getAmountToPay().subtract(detail.getPaymentAmount())); + } + if (loanCtrl.deleteLoanDetailsFeeByLoanCurdate(selectedLoan)) { + loanCtrl.deleteLoanFeeNotificationByLoanCurdate(selectedLoan); + loanCtrl.updateLoan(loanUpdate); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_INFO, "Multas eliminadas", "Se eliminó el/las multas del día de hoy correctamente."); + } + } else { + showMessage(FacesMessage.SEVERITY_WARN, "Advertencia", "El préstamo no tiene registrado multas el día de hoy"); + } + } + else + { + showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar la multa", "Solo puedes eliminar la multa de préstamos en estatus Aprobados o Pendiente por renovación"); + return; + }*/ + } + + public void changeRoute() { + if (!routeId.isEmpty()) { + if (loanCtrl.updateRouteById(new RouteCtlg(routeId), selectedLoan.getId(), getLoggedUser().getUser().getId())) { + showMessage(FacesMessage.SEVERITY_INFO, "Ruta modificada", "Se modificó correctamente."); + } else { + showMessage(FacesMessage.SEVERITY_WARN, "Ruta modificada", "Ocurrió un error durante el proceso."); + } + + } + } + + public void changeLoanType() { + if (selectedLoan.getEstatusPrestamo() != LoanStatus.TO_DELIVERY.getValue()) { + loanTypeId = ""; + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_WARN, "No se puede cambiar el tipo de préstamo", "Solo puedes cambiar el monto a prestar de préstamos en estatus Por liberar"); + return; + } + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + loanUpdate.setLoanType(new LoanType(loanTypeId)); + loanUpdate.setAmountToPay(loanTypeCtrl.getLoanTypeById(loanTypeId).getPaymentTotal()); + if (loanCtrl.updateLoan(loanUpdate)) { + loan.clear(); + loan = fillDatatableLoan(); + loanTypeId = ""; + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de tipo de préstamo", "El préstamo se cambió correctamente"); + } + + } + + public void deleteLoan() { + /* loanCtrl.updateLoanByStatusWeb(LoanStatus.DELETED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.DELETED, selectedLoan); + loan.remove(selectedLoan); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Eliminado' de forma correcta.");*/ + } + + public void changeApprovedStatus() { + /*loanCtrl.updateLoanByStatusWeb(LoanStatus.APPROVED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, selectedLoan); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/ + } + + public void changeFinishStatus() { + /*loanCtrl.updateLoanByStatusWeb(LoanStatus.FINISH, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.FINISH, selectedLoan); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta.");*/ + } + + public void deletePaymentLoan() { + + /*if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) { + + List details = loanCtrl.getLoanDetailsCurdatebyIdLoan(selectedLoan.getId()); + if (details != null && !details.isEmpty()) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + for (LoanDetails detail : details) { + loanUpdate.setAmountPaid(loanUpdate.getAmountPaid().subtract(detail.getPaymentAmount())); + loanUpdate.setLastReferenceNumber(loanUpdate.getLastReferenceNumber() - 1); + } + if (loanCtrl.deleteLoanDetailsByLoanCurdate(selectedLoan)) { + loanCtrl.updateLoan(loanUpdate); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_INFO, "Abonos eliminados", "Se eliminó el/los abonos del día de hoy correctamente."); + } + } else { + showMessage(FacesMessage.SEVERITY_WARN, "Advertencia", "El préstamo no tiene registrado abonos el día de hoy"); + } + } + else + { + showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar abono", "Solo puedes eliminar el abono de préstamos en estatus Aprobados o Pendiente por renovación"); + return; + }*/ + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public void addPayment() { + /*if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) { + LoanDetails detail = new LoanDetails(); + detail.setComments(comments); + detail.setCreatedBy(getLoggedUser().getUser().getId()); + detail.setCreatedOn(new Date()); + detail.setLoan(selectedLoan); + detail.setLoanDetailsType(LoanDetailsType.PAYMENT); + detail.setPaymentAmount(payment); + detail.setPeopleType(PeopleType.CUSTOMER); + detail.setReferenceNumber(selectedLoan.getLastReferenceNumber() + 1); + detail.setUser(new User(userId)); + if (loanCtrl.saveLoanDetail(detail)) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + loanUpdate.setAmountPaid(loanUpdate.getAmountPaid().add(payment)); + loanUpdate.setLastReferenceNumber(loanUpdate.getLastReferenceNumber() + 1); + if (loanUpdate.getAmountToPay().compareTo(loanUpdate.getAmountPaid()) == 0) { + + LoanByUser loanByUser = loanCtrl.getLoanByUserByIdLoan(loanUpdate); + loanByUser.setLoanByUserStatus(LoanStatus.FINISH); + if (loanCtrl.updateLoanByUser(loanByUser)) { + loanUpdate.setLoanStatus(LoanStatus.FINISH); + } + } + loanCtrl.updateLoan(loanUpdate); + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + userId = ""; + comments = ""; + payment = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_INFO, "Agregar abono", "Se agregó el abono de forma correcta."); + } + } else { + selectedLoan = null; + userId = ""; + comments = ""; + payment = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_WARN, "No se puede abonar", "Solo puedes abonar préstamos en estatus Aprobados o Pendientes por renovación"); + return; + }*/ + + } + + public void addFee() { + /*if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) { + selectedLoan = null; + userId = ""; + comments = ""; + fee = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_WARN, "No se puede multar", "Solo puedes multar préstamos en estatus Aprobados"); + return; + } + LoanDetails detail = new LoanDetails(); + detail.setComments(comments); + detail.setCreatedBy(getLoggedUser().getUser().getId()); + detail.setCreatedOn(new Date()); + detail.setLoan(selectedLoan); + detail.setLoanDetailsType(LoanDetailsType.FEE); + detail.setPaymentAmount(fee); + detail.setPeopleType(PeopleType.CUSTOMER); + detail.setReferenceNumber(selectedLoan.getLastReferenceNumber() + 1); + detail.setUser(new User(userId)); + if (loanCtrl.saveLoanDetail(detail)) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + loanUpdate.setAmountToPay(loanUpdate.getAmountToPay().add(fee)); + loanUpdate.setLastReferenceNumber(loanUpdate.getLastReferenceNumber() + 1); + loanCtrl.updateLoan(loanUpdate); + + LoanFeeNotification notification = new LoanFeeNotification(); + notification.setCreatedBy(getLoggedUser().getUser().getId()); + notification.setCreatedOn(new Date()); + notification.setLoan(loanUpdate); + notification.setUser(new User(userId)); + notification.setNotificationNumber(loanUpdate.getTotalFeeByLoan() + 1); + loanCtrl.saveLoanNotificationFee(notification); + + loan.clear(); + loan = fillDatatableLoan(); + selectedLoan = null; + userId = ""; + comments = ""; + fee = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_INFO, "Agregar multa", "Se agregó la multa de forma correcta."); + }*/ + } + + public void changeOwner() { + /*if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) { + selectedLoan = null; + userId = ""; + showMessage(FacesMessage.SEVERITY_WARN, "No se puede modificar propietario", "Solo puedes cambiar de propietario a préstamos en estatus Aprobados"); + return; + } + LoanByUser old = new LoanByUser(); + old = loanCtrl.getLoanByUserByIdLoan(selectedLoan); + + LoanByUser loanByUser = new LoanByUser(); + LoanByUserId idRelation = new LoanByUserId(); + + idRelation.setIdLoan(selectedLoan.getId()); + idRelation.setIdUser(userId); + + loanByUser.setId(idRelation); + loanByUser.setComments(old.getComments()); + loanByUser.setCreatedBy(old.getCreatedBy()); + loanByUser.setLoanByUserStatus(old.getLoanByUserStatus()); + loanByUser.setLoan(selectedLoan); + loanByUser.setOrderInList(old.getOrderInList()); + loanByUser.setOwnerLoan(OwnerLoan.CURRENT_OWNER); + loanByUser.setUser(new User(userId)); + if (loanCtrl.deleteLoanByUser(old)) { + loanCtrl.saveLoanByUser(loanByUser); + selectedLoan = null; + userId = ""; + loan.clear(); + loan = fillDatatableLoan(); + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de propietario", "Se reasignó el préstamo de forma correcta."); + } else { + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_ERROR, "Cambio de propietario", "Ocurrió un error al intentar hacer el cambio de propietario."); + }*/ + } + + /** + * + */ + private void initStartAndEndDates() { + try { + Calendar starDateCalendar = Calendar.getInstance(); + + starDateCalendar.setTime(DateWrapper.getTodayMXTime()); + starDateCalendar.add(Calendar.MONTH, -1); + + setStarDate(starDateCalendar.getTime()); + setEndDate(DateWrapper.getTodayMXTime()); + } catch (Exception e) { + + } + } + + public void approvedLoan() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + /** + * + * @param outcome + * @return + */ + public String detailLoan(String outcome) { + return outcome; + } + + public LoanController getLoanCtrl() { + return loanCtrl; + } + + public void setLoanCtrl(LoanController loanCtrl) { + this.loanCtrl = loanCtrl; + } + + public List getLoan() { + return loan; + } + + public void setLoan(List loan) { + this.loan = loan; + } + + public HistoryLoanView getSelectedLoan() { + return selectedLoan; + } + + public void setSelectedLoan(HistoryLoanView selectedLoan) { + this.selectedLoan = selectedLoan; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List getUsers() { + return users; + } + + public void setUsers(List users) { + this.users = users; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + public BigDecimal getFee() { + return fee; + } + + public void setFee(BigDecimal fee) { + this.fee = fee; + } + + public LoanTypeController getLoanTypeCtrl() { + return loanTypeCtrl; + } + + public void setLoanTypeCtrl(LoanTypeController loanTypeCtrl) { + this.loanTypeCtrl = loanTypeCtrl; + } + + public List getLoanType() { + return loanType; + } + + public void setLoanType(List loanType) { + this.loanType = loanType; + } + + public String getLoanTypeId() { + return loanTypeId; + } + + public void setLoanTypeId(String loanTypeId) { + this.loanTypeId = loanTypeId; + } + + public String getRouteId() { + return routeId; + } + + public void setRouteId(String routeId) { + this.routeId = routeId; + } + + public RouteController getRouteCtrl() { + return routeCtrl; + } + + public void setRouteCtrl(RouteController routeCtrl) { + this.routeCtrl = routeCtrl; + } + + public List getRoute() { + return route; + } + + public void setRoute(List route) { + this.route = route; + } + + public Date getStarDate() { + return starDate; + } + + public void setStarDate(Date starDate) { + this.starDate = starDate; + } + + public Date getEndDate() { + return endDate; + } + + public void setEndDate(Date endDate) { + this.endDate = endDate; + } + + private LoanController loanCtrl; + private LoanTypeController loanTypeCtrl; + private GenericController genericCtrl; + private RouteController routeCtrl; + + private List loan; + private List users; + private List loanType; + private List route; + private HistoryLoanView selectedLoan; + private String comments; + private String userId; + private BigDecimal payment; + private BigDecimal fee; + private String loanTypeId; + private String routeId; + + private Date starDate; + private Date endDate; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + + loanCtrl = new LoanController(); + genericCtrl = new GenericController(); + loanTypeCtrl = new LoanTypeController(); + routeCtrl = new RouteController(); + initStartAndEndDates(); + users = genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + loanType = loanTypeCtrl.fillLoanTypeDatatable(getLoggedUser().getOffice().getId()); + route = routeCtrl.fillRoutesDatatable(getLoggedUser().getOffice().getId()); + + setLoan(fillDatatableLoan()); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanPendingBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanPendingBean.java new file mode 100644 index 0000000..a29a339 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanPendingBean.java @@ -0,0 +1,478 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.CustomerController; +import com.arrebol.apc.controller.admin.EndorsementController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.controller.catalog.LoanTypeController; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.LoanDetailsType; +import com.arrebol.apc.model.enums.LoanRenovationStatus; +import com.arrebol.apc.model.enums.LoanStatus; +import com.arrebol.apc.model.enums.OwnerLoan; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanByRenovation; +import com.arrebol.apc.model.loan.LoanByUser; +import com.arrebol.apc.model.loan.LoanByUserId; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.model.loan.LoanType; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("loanPendingManager") +@ViewScoped +public class LoanPendingBean extends GenericBean implements Serializable, Datatable{ + + public List fillDatatableLoan() { + + return loanCtrl.fillLoanByStatusPendingDatatable(getLoggedUser().getOffice().getId()); + } + + @Override + public void editRow(RowEditEvent event) { + + } + + public void calculationFunction() + { + if(loanTypeId != null && !loanTypeId.isEmpty()) + total = loanTypeCtrl.getLoanTypeById(loanTypeId).getPaymentTotal().add(totalFee).subtract(totalPayment); + else + total = BigDecimal.ZERO; + } + + public void approvedLoan() { + loanCtrl.updateLoanByStatus(LoanStatus.TO_DELIVERY, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.TO_DELIVERY, selectedLoan); + loan.remove(selectedLoan); + selectedLoan = null; + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'A conciliar' de forma correcta."); + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + Loan loanSave = new Loan(); + loanSave.setComments(comments); + loanSave.setCustomer(new People(customerId)); + loanSave.setEndorsement(new People(endorsementId)); + loanSave.setLoanType(new LoanType(loanTypeId)); + if(aprobado) + loanSave.setLoanStatus(LoanStatus.APPROVED); + else if(terminado) + loanSave.setLoanStatus(LoanStatus.FINISH); + else + loanSave.setLoanStatus(LoanStatus.PENDING); + loanSave.setAmountPaid(totalPayment); + loanSave.setRouteCtlg(customerCtrl.findPeopleById(customerId).getRouteCtlg()); + if(totalPayment.compareTo(BigDecimal.ZERO) == 0 && totalFee.compareTo(BigDecimal.ZERO) == 0) + loanSave.setLastReferenceNumber(0); + if(totalPayment.compareTo(BigDecimal.ZERO) > 0 && totalFee.compareTo(BigDecimal.ZERO) == 0) + loanSave.setLastReferenceNumber(1); + if(totalPayment.compareTo(BigDecimal.ZERO) == 0 && totalFee.compareTo(BigDecimal.ZERO) > 0) + loanSave.setLastReferenceNumber(1); + if(totalPayment.compareTo(BigDecimal.ZERO) > 0 && totalFee.compareTo(BigDecimal.ZERO) > 0) + loanSave.setLastReferenceNumber(2); + loanSave.setAmountToPay(loanTypeCtrl.getLoanTypeById(loanTypeId).getPaymentTotal().add(totalFee)); + loanSave.setCreatedBy(userId); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(createdOn); + calendar.set(Calendar.HOUR_OF_DAY, 12); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + loanSave.setCreatedOn(new Date()); + loanSave.setLastUpdatedOn(new Date()); + + if(loanCtrl.saveLoan(loanSave)) + { + Loan temp = loanCtrl.getLoanById(loanSave.getId()); + String userName = ""; + for(User user : users){ + if (user.getId().equalsIgnoreCase(userId)) { + userName = user.getHumanResource().getFirstName() + " " + + user.getHumanResource().getLastName(); + break; + } + } + Calendar fechaAct = Calendar.getInstance(); + if (fechaAct.before(calendar)) { + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Préstamo postfechado"); + bitacora.setCommentsUser(""); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setDescription("El usuario " + userName + " postfechó el préstamo del cliente " + temp.getCustomer().getFullName() + + ", con cantidad de $" + temp.getLoanType().getPayment() + " al día " + temp.getCreatedOn()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacoraCtrl.saveBitacora(bitacora); + } + + LoanByUser loanByUser = new LoanByUser(); + LoanByUserId idRelation = new LoanByUserId(); + + idRelation.setIdLoan(loanSave.getId()); + idRelation.setIdUser(userId); + + loanByUser.setId(idRelation); + loanByUser.setComments(comments); + loanByUser.setCreatedBy(getLoggedUser().getUser().getId()); + if(aprobado) + loanByUser.setLoanByUserStatus(LoanStatus.APPROVED); + else if(terminado) + loanByUser.setLoanByUserStatus(LoanStatus.FINISH); + else + loanByUser.setLoanByUserStatus(LoanStatus.PENDING); + loanByUser.setLoan(loanSave); + loanByUser.setOrderInList(0); + loanByUser.setOwnerLoan(OwnerLoan.CURRENT_OWNER); + loanByUser.setUser(new User(userId)); + loanCtrl.saveLoanByUser(loanByUser); + + int contador = 1; + if(totalPayment.compareTo(BigDecimal.ZERO) > 0) + { + LoanDetails detail = new LoanDetails(); + detail.setComments(comments); + detail.setCreatedBy(getLoggedUser().getUser().getId()); + detail.setCreatedOn(createdOn); + detail.setLoan(loanSave); + detail.setLoanDetailsType(LoanDetailsType.PAYMENT); + detail.setPaymentAmount(totalPayment); + detail.setPeopleType(PeopleType.CUSTOMER); + detail.setReferenceNumber(contador); + detail.setUser(new User(userId)); + if(loanCtrl.saveLoanDetail(detail)){ + contador++; + } + } + if(totalFee.compareTo(BigDecimal.ZERO) > 0) + { + LoanDetails detail = new LoanDetails(); + detail.setComments(comments); + detail.setCreatedBy(getLoggedUser().getUser().getId()); + detail.setCreatedOn(createdOn); + detail.setLoan(loanSave); + detail.setLoanDetailsType(LoanDetailsType.FEE); + detail.setPaymentAmount(totalFee); + detail.setPeopleType(PeopleType.CUSTOMER); + detail.setReferenceNumber(contador); + detail.setUser(new User(userId)); + if(loanCtrl.saveLoanDetail(detail)){ + contador++; + } + } + + } + loan.clear(); + createdOn = new Date(); + comments = ""; + customerId = ""; + endorsementId = ""; + loanTypeId = ""; + userId = ""; + total = BigDecimal.ZERO; + totalFee = BigDecimal.ZERO; + totalPayment = BigDecimal.ZERO; + aprobado = false; + terminado = false; + loan = fillDatatableLoan(); + FacesMessage msg = new FacesMessage("Nuevo préstamo", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + + @Override + public void deleteRow() { + loanCtrl.updateLoanByStatus(LoanStatus.REJECTED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.REJECTED, selectedLoan); + + LoanByRenovation renovation; + renovation = loanCtrl.getLoanByRenovationByIdLoanNew(selectedLoan); + if(renovation != null) + { + loanCtrl.updateLoanByRenovationByStatus(LoanRenovationStatus.REJECTED, selectedLoan, getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByStatus(LoanStatus.APPROVED, renovation.getLoanOld().getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, renovation.getLoanOld()); + } + loan.remove(selectedLoan); + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Rechazado' de forma correcta."); + } + + /** + * + * @param outcome + * @return + */ + public String detailLoan(String outcome) { + return outcome; + } + + public LoanController getLoanCtrl() { + return loanCtrl; + } + + public void setLoanCtrl(LoanController loanCtrl) { + this.loanCtrl = loanCtrl; + } + + public List getLoan() { + return loan; + } + + public void setLoan(List loan) { + this.loan = loan; + } + + public Loan getSelectedLoan() { + return selectedLoan; + } + + public void setSelectedLoan(Loan selectedLoan) { + this.selectedLoan = selectedLoan; + } + + public CustomerController getCustomerCtrl() { + return customerCtrl; + } + + public void setCustomerCtrl(CustomerController customerCtrl) { + this.customerCtrl = customerCtrl; + } + + public EndorsementController getEndorsementCtrl() { + return endorsementCtrl; + } + + public void setEndorsementCtrl(EndorsementController endorsementCtrl) { + this.endorsementCtrl = endorsementCtrl; + } + + public LoanTypeController getLoanTypeCtrl() { + return loanTypeCtrl; + } + + public void setLoanTypeCtrl(LoanTypeController loanTypeCtrl) { + this.loanTypeCtrl = loanTypeCtrl; + } + + public List getCustomer() { + return customer; + } + + public void setCustomer(List customer) { + this.customer = customer; + } + + public List getEndorsement() { + return endorsement; + } + + public void setEndorsement(List endorsement) { + this.endorsement = endorsement; + } + + public List getLoanType() { + return loanType; + } + + public void setLoanType(List loanType) { + this.loanType = loanType; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getEndorsementId() { + return endorsementId; + } + + public void setEndorsementId(String endorsementId) { + this.endorsementId = endorsementId; + } + + public String getLoanTypeId() { + return loanTypeId; + } + + public void setLoanTypeId(String loanTypeId) { + this.loanTypeId = loanTypeId; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public List getUsers() { + return users; + } + + public void setUsers(List users) { + this.users = users; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public BigDecimal getTotalPayment() { + return totalPayment; + } + + public void setTotalPayment(BigDecimal totalPayment) { + this.totalPayment = totalPayment; + } + + public BigDecimal getTotalFee() { + return totalFee; + } + + public void setTotalFee(BigDecimal totalFee) { + this.totalFee = totalFee; + } + + public BigDecimal getTotal() { + return total; + } + + public void setTotal(BigDecimal total) { + this.total = total; + } + + public boolean isAprobado() { + return aprobado; + } + + public void setAprobado(boolean aprobado) { + this.aprobado = aprobado; + } + + public boolean isTerminado() { + return terminado; + } + + public void setTerminado(boolean terminado) { + this.terminado = terminado; + } + + private LoanController loanCtrl; + private CustomerController customerCtrl; + private EndorsementController endorsementCtrl; + private LoanTypeController loanTypeCtrl; + private GenericController genericCtrl; + + private List loan; + private Loan selectedLoan; + private String comments; + + private List customer; + private List endorsement; + private List loanType; + private List users; + + private String customerId; + private String endorsementId; + private String loanTypeId; + private String userId; + + private Date createdOn; + private BigDecimal totalPayment; + private BigDecimal totalFee; + private BigDecimal total; + private boolean aprobado; + private boolean terminado; + + private BitacoraController bitacoraCtrl; + + @PostConstruct + public void init() { + loanCtrl = new LoanController(); + customerCtrl = new CustomerController(); + endorsementCtrl = new EndorsementController(); + loanTypeCtrl = new LoanTypeController(); + genericCtrl = new GenericController(); + totalPayment = BigDecimal.ZERO; + totalFee = BigDecimal.ZERO; + total = BigDecimal.ZERO; + aprobado = false; + terminado = false; + bitacoraCtrl = new BitacoraController(); + + customer = customerCtrl.fillCustomersDatatable(getLoggedUser().getOffice().getId()); + endorsement = endorsementCtrl.fillEndorsementsDatatable(getLoggedUser().getOffice().getId()); + loanType = loanTypeCtrl.fillLoanTypeDatatable(getLoggedUser().getOffice().getId()); + users = genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + + loan = fillDatatableLoan(); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanPendingDetailBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanPendingDetailBean.java new file mode 100644 index 0000000..ba9b59a --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanPendingDetailBean.java @@ -0,0 +1,333 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.CustomerController; +import com.arrebol.apc.controller.admin.EndorsementController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.controller.catalog.LoanTypeController; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.enums.LoanRenovationStatus; +import com.arrebol.apc.model.enums.LoanStatus; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanByRenovation; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.model.loan.LoanType; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("loanPendingDetailManager") +@ViewScoped +public class LoanPendingDetailBean extends GenericBean implements Serializable, Datatable { + + public void changeLoanType(){ + loan.setLoanType(new LoanType(typeLoanId)); + loan.setAmountToPay(loanTypeCtrl.getLoanTypeById(typeLoanId).getPaymentTotal()); + if(loanCtrl.updateLoan(loan)){ + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de tipo de préstamo", "El préstamo se cambió correctamente"); + } + + } + + public void changeDateAndApprovedLoan(){ + loan.setCreatedOn(createdOn); + loan.setComments(comments); + if(loanCtrl.updateLoan(loan)){ + approvedLoan(); + } + + } + + public List getDetails(String id) { + try { + loanDetails = loanCtrl.getLoanDetailsbyId(id); + + } catch (Exception e) { + } + return null == loanDetails ? new ArrayList<>() : loanDetails; + } + + public People getCustomerDetail(String peopleId){ + return customerCtrl.findPeopleById(peopleId); + } + + public List getLoanByCustomer(String peopleId){ + return customerCtrl.findLoanByCustomer(peopleId); + } + + public List getLoanByEndorsement(String peopleId){ + return endorsementCtrl.findLoanByEndorsement(peopleId); + } + + public void rejectedLoan() { + loanCtrl.updateLoanByStatus(LoanStatus.REJECTED, loan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.REJECTED, loan); + + LoanByRenovation renovation; + renovation = loanCtrl.getLoanByRenovationByIdLoanNew(loan); + if(renovation != null) + { + loanCtrl.updateLoanByRenovationByStatus(LoanRenovationStatus.REJECTED, loan, getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByStatus(LoanStatus.APPROVED, renovation.getLoanOld().getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, renovation.getLoanOld()); + } + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Rechazado' de forma correcta."); + } + + public void approvedLoan() { + loanCtrl.updateLoanByStatus(LoanStatus.TO_DELIVERY, loan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.TO_DELIVERY, loan); + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'A conciliar' de forma correcta."); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public CustomerController getCustomerCtrl() { + return customerCtrl; + } + + public void setCustomerCtrl(CustomerController customerCtrl) { + this.customerCtrl = customerCtrl; + } + + public People getCustomer() { + return customer; + } + + public void setCustomer(People customer) { + this.customer = customer; + } + + public List getLoanCustomer() { + return loanCustomer; + } + + public void setLoanCustomer(List loanCustomer) { + this.loanCustomer = loanCustomer; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public LoanController getLoanCtrl() { + return loanCtrl; + } + + public void setLoanCtrl(LoanController loanCtrl) { + this.loanCtrl = loanCtrl; + } + + public String getLoanId() { + return loanId; + } + + public void setLoanId(String loanId) { + this.loanId = loanId; + } + + public Loan getLoan() { + return loan; + } + + public void setLoan(Loan loan) { + this.loan = loan; + } + + public EndorsementController getEndorsementCtrl() { + return endorsementCtrl; + } + + public void setEndorsementCtrl(EndorsementController endorsementCtrl) { + this.endorsementCtrl = endorsementCtrl; + } + + public People getEndorsement() { + return endorsement; + } + + public void setEndorsement(People endorsement) { + this.endorsement = endorsement; + } + + public String getEndorsementId() { + return endorsementId; + } + + public void setEndorsementId(String endorsementId) { + this.endorsementId = endorsementId; + } + + public List getLoanEndorsement() { + return loanEndorsement; + } + + public void setLoanEndorsement(List loanEndorsement) { + this.loanEndorsement = loanEndorsement; + } + + public Loan getSelectedLoanCustomer() { + return selectedLoanCustomer; + } + + public void setSelectedLoanCustomer(Loan selectedLoanCustomer) { + this.selectedLoanCustomer = selectedLoanCustomer; + } + + public List getLoanDetails() { + return loanDetails; + } + + public void setLoanDetails(List loanDetails) { + this.loanDetails = loanDetails; + } + + public String getTypeLoanId() { + return typeLoanId; + } + + public void setTypeLoanId(String typeLoanId) { + this.typeLoanId = typeLoanId; + } + + public LoanTypeController getLoanTypeCtrl() { + return loanTypeCtrl; + } + + public void setLoanTypeCtrl(LoanTypeController loanTypeCtrl) { + this.loanTypeCtrl = loanTypeCtrl; + } + + public List getLoanType() { + return loanType; + } + + public void setLoanType(List loanType) { + this.loanType = loanType; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public List getCustomers() { + return customers; + } + + public void setCustomers(List customers) { + this.customers = customers; + } + + public String getCustomerTest() { + return customerTest; + } + + public void setCustomerTest(String customerTest) { + this.customerTest = customerTest; + } + + private CustomerController customerCtrl; + private LoanController loanCtrl; + private EndorsementController endorsementCtrl; + private LoanTypeController loanTypeCtrl; + + private People customer; + private Loan loan; + private People endorsement; + + private String customerId; + private String loanId; + private String endorsementId; + private String typeLoanId; + private String customerTest; + + private List loanEndorsement; + private List loanCustomer; + private Loan selectedLoanCustomer; + private List loanType; + private List customers; + + private List loanDetails; + + private Date createdOn; + private String comments; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + customerCtrl = new CustomerController(); + loanCtrl = new LoanController(); + endorsementCtrl = new EndorsementController(); + loanTypeCtrl = new LoanTypeController(); + + setLoanId(externalContext().getRequestParameterMap().get("form:dtLoanPending_selection")); + loan = loanCtrl.getLoanById(getLoanId()); + customer = loan.getCustomer(); + endorsement = loan.getEndorsement(); + loanEndorsement = getLoanByEndorsement(loan.getEndorsement().getId()); + loanCustomer = getLoanByCustomer(loan.getCustomer().getId()); + loanType = loanTypeCtrl.fillLoanTypeDatatable(getLoggedUser().getOffice().getId()); + customers = customerCtrl.fillCustomersDatatable(getLoggedUser().getOffice().getId()); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanRenovationDeliveryWeeklyBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanRenovationDeliveryWeeklyBean.java new file mode 100644 index 0000000..312ea95 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/LoanRenovationDeliveryWeeklyBean.java @@ -0,0 +1,138 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.admin.LoanRenovationDeliveryWeeklyController; +import com.arrebol.apc.model.views.LoanRenovationDeliveryWeeklyView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar + */ +@Named("loanRenovationWeeklyManager") +@ViewScoped +public class LoanRenovationDeliveryWeeklyBean extends GenericBean implements Serializable, Datatable { + + + public List fillDatatableLoan() { + return getLoanRenovationController().fillLoanRenovationDatatable(); + } + + public int getTotalRenovation() { + int quantity = 0; + for(LoanRenovationDeliveryWeeklyView p : loan) { + if(p.getRenovation().equals("Renovable")){ + quantity++; + } + + } + return quantity; + } + + + public Double getTotalRenovationAmount() { + Double quantity = 0.0; + for(LoanRenovationDeliveryWeeklyView p : loan) { + if(p.getRenovation().equals("Renovable")){ + quantity = quantity + Double.valueOf(p.getAmountLoan()); + } + + } + return quantity; + } + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + + private LoanRenovationDeliveryWeeklyController LoanRenovationController; + + private List loan; + + private int totalRenovable; + private Double totalRenovableAmount; + + public LoanRenovationDeliveryWeeklyController getLoanRenovationController() { + return LoanRenovationController; + } + + public void setLoanRenovationController(LoanRenovationDeliveryWeeklyController LoanRenovationController) { + this.LoanRenovationController = LoanRenovationController; + } + + public List getLoan() { + return loan; + } + + public void setLoan(List loan) { + this.loan = loan; + } + + public int getTotalRenovable() { + return totalRenovable; + } + + public void setTotalRenovable(int totalRenovable) { + this.totalRenovable = totalRenovable; + } + + public Double getTotalRenovableAmount() { + return totalRenovableAmount; + } + + public void setTotalRenovableAmount(Double totalRenovableAmount) { + this.totalRenovableAmount = totalRenovableAmount; + } + + + + + + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + + LoanRenovationController = new LoanRenovationDeliveryWeeklyController(); + + setLoan(fillDatatableLoan()); + setTotalRenovable(getTotalRenovation()); + setTotalRenovableAmount(getTotalRenovationAmount()); + } + + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/MoneyDailyBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/MoneyDailyBean.java new file mode 100644 index 0000000..a0a3265 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/MoneyDailyBean.java @@ -0,0 +1,327 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.GenericValidationController; +import com.arrebol.apc.controller.admin.MoneyDailyController; +import com.arrebol.apc.controller.admin.StableGeneralBoxController; +import com.arrebol.apc.model.admin.MoneyDaily; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.model.views.MoneyDailyByUserCertifier; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("moneyDailyManager") +@ViewScoped +public class MoneyDailyBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setMoneyDaily(getMoneyDailyCtrl().fillMoneyDailyDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate(), getUserSelectedId())); + setTotalValue(); + } + } catch (Exception e) { + } + } + + public List fillDatatableMoneyDaily() { + + return getMoneyDailyCtrl().fillMoneyDailyDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate(), getUserSelectedId()); + } + + public List getUsers() { + + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + public String getUserSelectedId() { + return userSelectedId; + } + + public void setUserSelectedId(String userSelectedId) { + this.userSelectedId = userSelectedId; + } + + public BigDecimal getTotal() { + return total; + } + + public void setTotal(BigDecimal total) { + this.total = total; + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + /*if(!genericCtrl.verifyStableGeneralBoxVsClosingDay(getLoggedUser().getOffice().getId())) + { + FacesMessage msg = new FacesMessage("Día laborable no cuadrado.", "Falta de realizar un cuadre de caja general en el último día laborable."); + FacesContext.getCurrentInstance().addMessage(null, msg); + return; + }*/ + Date date = new Date(); + if (genericCtrl.existStableGeneralBoxByCreatedOn(date)) { + showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden agregar más inicios porque ya se existe un cuadre de caja general de hoy."); + return; + } + + if(stableGeneralBoxCtrl.getTotalBox().compareTo(new BigDecimal(amount))>=0){ + MoneyDaily money = new MoneyDaily(); + money.setMoneyDailyDate(new Date()); + money.setOffice(new Office(getLoggedUser().getOffice().getId())); + money.setAmount(new BigDecimal(amount)); + money.setUser(new User(userId)); + money.setCreatedOn(new Date()); + money.setCreatedBy(getLoggedUser().getId()); + moneyDailyCtrl.saveMoneyDaily(money); + moneyDaily.clear(); + moneyDaily = fillDatatableMoneyDaily(); + setTotalValue(); + totalCaja= stableGeneralBoxCtrl.getTotalBox(); + amount = ""; + userId = ""; + FacesMessage msg = new FacesMessage("Nueva entrega de dinero", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + }else{ + showMessage(FacesMessage.SEVERITY_WARN, "Incicio incorrecto", "No se pueden agregar el inicio porque es mas grande que la cantidad en caja general."); + } + + } + + @Override + public void deleteRow() { + + if (genericCtrl.existStableSmallBoxByCreatedOn(selectedMoneyDaily.getCreatedOn())) { + showMessage(FacesMessage.SEVERITY_WARN, "Inicio", "No se puede borrar porque ya se realizo el cuadre de caja chica del día."); + } else { + Bitacora bitacora = new Bitacora(); + MoneyDaily money = moneyDailyCtrl.getMoneyDailyById(selectedMoneyDaily.getId()); + bitacora.setAction("Eliminar inicio"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacora.setDescription("Se eliminó el inicio del asesor " + money.getUser().getUserName() + " con monto $" + + money.getAmount() + " y fecha " + money.getCreatedOn()); + moneyDailyCtrl.deleteMoneyDaily(selectedMoneyDaily); + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + selectedMoneyDaily = null; + moneyDaily.clear(); + moneyDaily = fillDatatableMoneyDaily(); + setTotalValue(); + FacesMessage msg = new FacesMessage("Eliminación de inicio", "Se eliminó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + + } + + public MoneyDailyController getMoneyDailyCtrl() { + return moneyDailyCtrl; + } + + public void setMoneyDailyCtrl(MoneyDailyController moneyDailyCtrl) { + this.moneyDailyCtrl = moneyDailyCtrl; + } + + public List getMoneyDaily() { + return moneyDaily; + } + + public void setMoneyDaily(List moneyDaily) { + this.moneyDaily = moneyDaily; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public MoneyDaily getSelectedMoneyDaily() { + return selectedMoneyDaily; + } + + public void setSelectedMoneyDaily(MoneyDaily selectedMoneyDaily) { + this.selectedMoneyDaily = selectedMoneyDaily; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List getMoneyDailyCertifier() { + return moneyDailyCertifier; + } + + public void setMoneyDailyCertifier(List moneyDailyCertifier) { + this.moneyDailyCertifier = moneyDailyCertifier; + } + + public MoneyDaily getSelectedMoneyDailyCertifier() { + return selectedMoneyDailyCertifier; + } + + public void setSelectedMoneyDailyCertifier(MoneyDaily selectedMoneyDailyCertifier) { + this.selectedMoneyDailyCertifier = selectedMoneyDailyCertifier; + } + + public BitacoraController getBitacoraCtrl() { + return bitacoraCtrl; + } + + public void setBitacoraCtrl(BitacoraController bitacoraCtrl) { + this.bitacoraCtrl = bitacoraCtrl; + } + + public String getCommentsBitacora() { + return commentsBitacora; + } + + public void setCommentsBitacora(String commentsBitacora) { + this.commentsBitacora = commentsBitacora; + } + + public GenericValidationController getGenericValidateController() { + return genericValidateController; + } + + public void setGenericValidateController(GenericValidationController genericController) { + this.genericValidateController = genericController; + } + + public Date getLastStableGeneralBox() { + return lastStableGeneralBox; + } + + public void setLastStableGeneralBox(Date lastStableGeneralBox) { + this.lastStableGeneralBox = lastStableGeneralBox; + } + + public StableGeneralBoxController getStableGeneralBoxCtrl() { + return stableGeneralBoxCtrl; + } + + public void setStableGeneralBoxCtrl(StableGeneralBoxController stableGeneralBoxCtrl) { + this.stableGeneralBoxCtrl = stableGeneralBoxCtrl; + } + + public BigDecimal getTotalCaja() { + return totalCaja; + } + + public void setTotalCaja(BigDecimal totalCaja) { + this.totalCaja = totalCaja; + } + + + + private MoneyDailyController moneyDailyCtrl; + private GenericController genericCtrl; + private BitacoraController bitacoraCtrl; + private GenericValidationController genericValidateController; + private StableGeneralBoxController stableGeneralBoxCtrl; + private Date lastStableGeneralBox; + + private List moneyDaily; + private List moneyDailyCertifier; + private List users; + private String userSelectedId; + private BigDecimal total; + private BigDecimal totalCaja; + + private String userId; + private String amount; + private String commentsBitacora; + + private MoneyDaily selectedMoneyDaily; + private MoneyDaily selectedMoneyDailyCertifier; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + + stableGeneralBoxCtrl = new StableGeneralBoxController(); + + moneyDailyCtrl = new MoneyDailyController(); + genericCtrl = new GenericController(); + bitacoraCtrl = new BitacoraController(); + setGenericValidateController(new GenericValidationController()); + setLastStableGeneralBox(getGenericValidateController().lastStableGeneralBoxByDate(getLoggedUser().getUser())); + + initOneWeekBeforeToCurrdate(); + + totalCaja= stableGeneralBoxCtrl.getTotalBox(); + moneyDaily = fillDatatableMoneyDaily(); + setTotalValue(); + moneyDailyCertifier = moneyDailyCtrl.findAllAmountByUserCertifierView(getLoggedUser().getOffice().getId()); + users = getUsers(); + commentsBitacora = ""; + + } + + private void setTotalValue() { + if (moneyDaily != null && !moneyDaily.isEmpty()) { + setTotal(moneyDaily.stream().map(MoneyDaily::getAmount).reduce(BigDecimal::add).get()); + } else { + setTotal(BigDecimal.ZERO); + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/OtherExpenseBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/OtherExpenseBean.java new file mode 100644 index 0000000..f2c03c5 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/OtherExpenseBean.java @@ -0,0 +1,294 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.GenericValidationController; +import com.arrebol.apc.controller.admin.OtherExpenseController; +import com.arrebol.apc.model.admin.ClosingDay; +import com.arrebol.apc.model.admin.OtherExpense; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("otherExpenseManager") +@ViewScoped +public class OtherExpenseBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setOtherExpense(getOtherExpenseCtrl().fillOtherExpenseDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate(), getUserSelectedId())); + setTotalValue(); + } + } catch (Exception e) { + } + } + + public List fillDatatableOtherExpense() { + + return getOtherExpenseCtrl().fillOtherExpenseDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate(), getUserSelectedId()); + } + + public List getUsers() { + + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + Date date = new Date(); + if (genericCtrl.existStableSmallBoxByCreatedOn(date)) { + showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden agregar más gastos porque ya se existe un cuadre de caja chica de hoy."); + return; + } + OtherExpense saveOtherExpense = new OtherExpense(); + saveOtherExpense.setDescription(comments); + saveOtherExpense.setCreatedBy(getLoggedUser().getUser().getId()); + saveOtherExpense.setCreatedOn(new Date()); + saveOtherExpense.setExpense(new BigDecimal(amount)); + saveOtherExpense.setUser(new User(userId)); + saveOtherExpense.setOffice(new Office(getLoggedUser().getOffice().getId())); + otherExpenseCtrl.saveOtherExpense(saveOtherExpense); + otherExpense.clear(); + otherExpense = fillDatatableOtherExpense(); + setTotalValue(); + comments = ""; + userId = ""; + amount = ""; + fecha = new Date(); + FacesMessage msg = new FacesMessage("Nuevo gasto", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + + @Override + public void deleteRow() { + if (selectedOtherExpense != null) { + + otherExpenseCtrl.deleteOtherExpense(selectedOtherExpense); + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Eliminar gasto"); + bitacora.setCommentsUser(getCommentsBitacora()); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacora.setDescription("Se eliminó correctamente el gasto con fecha: " + selectedOtherExpense.getCreatedOn() + ", con monto $" + + selectedOtherExpense.getExpense()); + bitacoraCtrl.saveBitacora(bitacora); + selectedOtherExpense = null; + otherExpense.clear(); + otherExpense = fillDatatableOtherExpense(); + setTotalValue(); + commentsBitacora = ""; + + FacesMessage msg = new FacesMessage("Eliminación de gasto", "Se eliminó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + + } + } + + public OtherExpenseController getOtherExpenseCtrl() { + return otherExpenseCtrl; + } + + public void setOtherExpenseCtrl(OtherExpenseController otherExpenseCtrl) { + this.otherExpenseCtrl = otherExpenseCtrl; + } + + public List getOtherExpense() { + return otherExpense; + } + + public void setOtherExpense(List otherExpense) { + this.otherExpense = otherExpense; + } + + public OtherExpense getSelectedOtherExpense() { + return selectedOtherExpense; + } + + public void setSelectedOtherExpense(OtherExpense selectedOtherExpense) { + this.selectedOtherExpense = selectedOtherExpense; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getUserSelectedId() { + return userSelectedId; + } + + public void setUserSelectedId(String userSelectedId) { + this.userSelectedId = userSelectedId; + } + + public BigDecimal getTotal() { + return total; + } + + public void setTotal(BigDecimal total) { + this.total = total; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public Date getFecha() { + return fecha; + } + + public void setFecha(Date fecha) { + this.fecha = fecha; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public GenericValidationController getGenericValidateController() { + return genericValidateController; + } + + public void setGenericValidateController(GenericValidationController genericController) { + this.genericValidateController = genericController; + } + + public Date getLastStableSmallBox() { + return lastStableSmallBox; + } + + public void setLastStableSmallBox(Date lastStableSmallBox) { + this.lastStableSmallBox = lastStableSmallBox; + } + + public BitacoraController getBitacoraCtrl() { + return bitacoraCtrl; + } + + public void setBitacoraCtrl(BitacoraController bitacoraCtrl) { + this.bitacoraCtrl = bitacoraCtrl; + } + + public String getCommentsBitacora() { + return commentsBitacora; + } + + public void setCommentsBitacora(String commentsBitacora) { + this.commentsBitacora = commentsBitacora; + } + + public List getClosingDayToday() { + return closingDayToday; + } + + public void setClosingDayToday(List closingDayToday) { + this.closingDayToday = closingDayToday; + } + + private OtherExpenseController otherExpenseCtrl; + private GenericController genericCtrl; + private List otherExpense; + private OtherExpense selectedOtherExpense; + private List users; + private String userId; + private String userSelectedId; + private BigDecimal total; + private String comments; + private String amount; + private Date fecha; + + private BitacoraController bitacoraCtrl; + private String commentsBitacora; + private GenericValidationController genericValidateController; + private Date lastStableSmallBox; + private List closingDayToday; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + + otherExpenseCtrl = new OtherExpenseController(); + genericCtrl = new GenericController(); + bitacoraCtrl = new BitacoraController(); + setGenericValidateController(new GenericValidationController()); + setLastStableSmallBox(getGenericValidateController().lastStableSmallBoxByDate(getLoggedUser().getUser())); + setClosingDayToday(getGenericValidateController().allClosingDayByDate()); + + initOneWeekBeforeToCurrdate(); + + otherExpense = fillDatatableOtherExpense(); + setTotalValue(); + users = getUsers(); + } + + private void setTotalValue() { + if (otherExpense != null && !otherExpense.isEmpty()) { + setTotal(otherExpense.stream().map(OtherExpense::getExpense).reduce(BigDecimal::add).get()); + } else { + setTotal(BigDecimal.ZERO); + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/PayRollBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/PayRollBean.java new file mode 100644 index 0000000..7d19cbf --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/PayRollBean.java @@ -0,0 +1,953 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.GenericValidationController; +import com.arrebol.apc.controller.admin.LoanEmployeeController; +import com.arrebol.apc.controller.admin.PayRollController; +import com.arrebol.apc.controller.drive.DriverController; +import com.arrebol.apc.model.admin.EmployeeSaving; +import com.arrebol.apc.model.admin.Goal; +import com.arrebol.apc.model.admin.LoanEmployee; +import com.arrebol.apc.model.admin.LoanEmployeeDetails; +import com.arrebol.apc.model.admin.StableGeneralBox; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.EmployeeSavingType; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.payroll.Payroll; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.model.views.InformationLoanLastWeekView; +import com.arrebol.apc.model.views.LoanEmployeeView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.math.RoundingMode; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("payrollManager") +@ViewScoped +public class PayRollBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setPayroll(getPayrollCtrl().fillPayrollDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate())); + } + } catch (Exception e) { + } + } + + public List getUsers() { + + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + public void calculationFunction() { + total = BigDecimal.ZERO; + BigDecimal moraDiscount = BonusMora.divide(new BigDecimal(5)).multiply(new BigDecimal(daysBonus)); + BigDecimal colocationDiscount = bonusColocation.divide(new BigDecimal(5)).multiply(new BigDecimal(daysBonus)); + BigDecimal salaryDiscount = salary.divide(new BigDecimal(5)).multiply(new BigDecimal(daysSalary)); + granTotalDeducciones = imss.add(advances).add(discounts).add(boxed).add(saving).add(paymentToDebt); + total = total.add(salaryDiscount).add(moraDiscount).add(colocationDiscount).add(newCustomer) + .subtract(imss).subtract(advances).subtract(discounts).subtract(boxed).subtract(saving).subtract(paymentToDebt).add(increases); + } + + public void getResumenByUser() { + + salary = BigDecimal.ZERO; + imss = BigDecimal.ZERO; + advances = BigDecimal.ZERO; + newCustomer = BigDecimal.ZERO; + bonusColocation = BigDecimal.ZERO; + BonusMora = BigDecimal.ZERO; + granTotal = BigDecimal.ZERO; + granTotalDeducciones = BigDecimal.ZERO; + total = BigDecimal.ZERO; + discounts = BigDecimal.ZERO; + increases = BigDecimal.ZERO; + metaInfo = BigDecimal.ZERO; + newCustomerInfo = BigDecimal.ZERO; + toalColocadoInfo = BigDecimal.ZERO; + toalPaymentInfo = BigDecimal.ZERO; + toalFeeInfo = BigDecimal.ZERO; + saldoInsoluto = BigDecimal.ZERO; + bonusNewCustomerInfo = BigDecimal.ZERO; + bonusColocationInfo = BigDecimal.ZERO; + bonusMoraInfo = BigDecimal.ZERO; + tipoBonusInfo = ""; + commentsDiscounts = ""; + commentsIncreases = ""; + commentsIncreases = ""; + boxed = BigDecimal.ZERO; + saving = BigDecimal.ZERO; + paymentToDebt = BigDecimal.ZERO; + BigDecimal divider; + + if (userId == null || userId.isEmpty()) { + showMessage(FacesMessage.SEVERITY_WARN, "Empleado obligatorio", "Debes seleccionar un empleado para calcular la nómina"); + userId = ""; + return; + } + + if (dateInit == null || dateEnd == null) { + showMessage(FacesMessage.SEVERITY_WARN, "Fechas obligatorias", "Debes seleccionar las fechas para calcular la nómina"); + userId = ""; + return; + } + + User userPayRoll = payrollCtrl.getUserById(userId); + if (userPayRoll != null) { + if (userPayRoll.getHumanResource().getBonus() == null) { + showMessage(FacesMessage.SEVERITY_WARN, "Usuario incompleto", "El empleado no tiene un bono registrado, es obligatorio tenerlo registrado"); + userId = ""; + return; + } + //obtengo salario del empleado + salary = userPayRoll.getHumanResource().getPayment(); + //obtengo imss del empleado + imss = userPayRoll.getHumanResource().getImss(); + //Lleno la información de los bonos *** INFORMATIVO + bonusColocationInfo = userPayRoll.getHumanResource().getBonus().getLoanBonus(); + bonusMoraInfo = userPayRoll.getHumanResource().getBonus().getMoraBonus(); + bonusNewCustomerInfo = userPayRoll.getHumanResource().getBonus().getNewCustomerBonus(); + tipoBonusInfo = userPayRoll.getHumanResource().getBonus().getAdministrative() == ActiveStatus.ENEBLED ? "Administrativo" : "Operativo"; + //Obtengo todos los adelantos que tuvo el usuario en las fechas dadas y que esten activos. + Date fechaAdvance = new Date(); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(fechaAdvance); // Configuramos la fecha que se recibe + calendar.add(Calendar.DAY_OF_YEAR, -6); + + advances = payrollCtrl.getSumAdvanceByUser(userPayRoll.getHumanResource().getId(), getLoggedUser().getOffice().getId(), calendar.getTime(), fechaAdvance); + + if (saving.compareTo(BigDecimal.ZERO) == 0) { + saving = userPayRoll.getHumanResource().getEmployeeSaving(); + } + + if (advances == null) { + advances = BigDecimal.ZERO; + } + + //Valido que el bono del usuario no sea administrativo, ya que el bono de clientes nuevos solo se paga a asesores y certificadores, de + //lo contrario va en 0 + if (userPayRoll.getHumanResource().getBonus().getAdministrative() == ActiveStatus.DISABLED) { + //Obtengo cuantos prestamos con clientes nuevos dio de alta el asesor en esas fechas y lo multiplico por el valor del bono de clientes nuevos + List loansNew = payrollCtrl.getTotalNewCustomerLoansByUser(userId, dateInit, dateEnd); + int contador = 0; + for (Loan loan : loansNew) { + newCustomer = newCustomer.add((loan.getLoanType().getPayment().divide(new BigDecimal(1000))).multiply(userPayRoll.getHumanResource().getBonus().getNewCustomerBonus())); + contador++; + } + newCustomerInfo = newCustomerInfo.add(new BigDecimal(contador)); + } + + //Obtengo la meta que consta de esas fechas + //goal = payrollCtrl.getGoalByDates(getLoggedUser().getOffice().getId(), dateInit, dateEnd); + // La meta se obtiene de la última capturada + goal = payrollCtrl.getLastGoal(getLoggedUser().getOffice().getId()); + metaInfo = goal.getAmount(); + + // Se llena el control de abono a deuda + List loanEmployeeList = payrollCtrl.getPaymentToDebtByUser(userPayRoll.getHumanResource().getId()); + if (loanEmployeeList != null && !loanEmployeeList.isEmpty()) { + loanEmployeeList.forEach((loanEmployee) -> { + saldoInsoluto = saldoInsoluto.add(loanEmployee.getBalance()); + if(loanEmployee.getBalance().compareTo(loanEmployee.getAmountToPay()) < 0){ + if (loanEmployee.getBalance().compareTo(BigDecimal.ZERO) > 0) { + paymentToDebt = paymentToDebt.add(loanEmployee.getBalance()); + } + }else{ + paymentToDebt = paymentToDebt.add(loanEmployee.getAmountToPay()); + } + }); + } + + //********Bono de colocación********* + //Obtengo el total del monto colocado por usuario en esas fechas. + BigDecimal amountColocationByUser = payrollCtrl.getTotalLoansByUserForDates(userId, dateInit, dateEnd); + toalColocadoInfo = amountColocationByUser; + + //Valido que si halla obtenido una meta y que el bono del empleado no sea administrativo para calcular el bono por colocacion. + if (goal != null && amountColocationByUser != null && userPayRoll.getHumanResource().getBonus().getAdministrative() == ActiveStatus.DISABLED) { + BigDecimal maxPorcentaje = new BigDecimal(100); + BigDecimal minPorcentaje = new BigDecimal(80); + BigDecimal porcentaje = (amountColocationByUser.multiply(maxPorcentaje)).divide(goal.getAmount(), 2, RoundingMode.HALF_UP); + + if (porcentaje != null) { + if (porcentaje.compareTo(minPorcentaje) == -1) { + bonusColocation = BigDecimal.ZERO; + } + if (porcentaje.compareTo(minPorcentaje.subtract(BigDecimal.ONE)) == 1 && porcentaje.compareTo(maxPorcentaje) == -1) { + bonusColocation = ((goal.getAmount().multiply(userPayRoll.getHumanResource().getBonus().getLoanBonus())).divide(maxPorcentaje)).divide(new BigDecimal(2)); + } + if (porcentaje.compareTo(maxPorcentaje) == 0 || porcentaje.compareTo(maxPorcentaje) == 1) { + bonusColocation = (goal.getAmount().multiply(userPayRoll.getHumanResource().getBonus().getLoanBonus())).divide(maxPorcentaje); + } + } + + } + if (userPayRoll.getHumanResource().getBonus().getAdministrative() == ActiveStatus.ENEBLED) { + bonusColocation = userPayRoll.getHumanResource().getBonus().getLoanBonus(); + } + + //********Bono de mora********* + //Obtengo todos los abonos por usuario en ese rango de fechas + BigDecimal amountPayments = payrollCtrl.getLoanDetailsByUserForDates(userId, dateInit, dateEnd); + Long openingFee = payrollCtrl.getTotalOpeningFeeByUser(userId, dateInit, dateEnd); + + //Obtengo todas las multas por usuario en ese rango de fechas + //BigDecimal amountFee = payrollCtrl.getFeeByUserForDates(userId, dateInit, dateEnd); + //************************** + Double sumFaltante = data.stream().filter(p -> p.getIdUser().equalsIgnoreCase(userId)).mapToDouble(h -> h.getFaltante().doubleValue()).sum(); + BigDecimal amountFee = BigDecimal.valueOf(sumFaltante); + //************************** + + if (openingFee == null) { + openingFee = 0L; + } + if (amountPayments == null) { + amountPayments = BigDecimal.ZERO; + } + if (amountFee == null) { + amountFee = BigDecimal.ZERO; + } + amountPayments = amountPayments.add(BigDecimal.valueOf(openingFee)); + toalPaymentInfo = amountPayments; + toalFeeInfo = amountFee; + + if (userPayRoll.getHumanResource().getBonus().getAdministrative() == ActiveStatus.ENEBLED) { + BonusMora = userPayRoll.getHumanResource().getBonus().getMoraBonus(); + } else { + if (amountPayments.compareTo(BigDecimal.ZERO) == 1) { + BigDecimal totalPorcentaje = new BigDecimal(100); + BigDecimal maxPorcentaje = new BigDecimal(2); + BigDecimal middlePorcentaje = new BigDecimal(1); + if (amountFee.compareTo(BigDecimal.ZERO) == 0 || amountFee.compareTo(BigDecimal.ZERO) < 0) { + BonusMora = (amountPayments.multiply(userPayRoll.getHumanResource().getBonus().getMoraBonus())); + } else { + + if(payrollCtrl.getTotalExpectedWeekByUser(userId)==null){ + + divider = BigDecimal.ONE; + }else{ + divider = payrollCtrl.getTotalExpectedWeekByUser(userId); + } + + + BigDecimal porcentaje = (amountFee.multiply(totalPorcentaje)).divide(divider, 2, RoundingMode.HALF_UP); + if (porcentaje.compareTo(maxPorcentaje) == 0 || porcentaje.compareTo(maxPorcentaje) == 1) { + BonusMora = BigDecimal.ZERO; + } + if ((porcentaje.compareTo(BigDecimal.ZERO) == 0) || (porcentaje.compareTo(BigDecimal.ZERO) == 1 && porcentaje.compareTo(middlePorcentaje) == -1)) { + BonusMora = (amountPayments.multiply(userPayRoll.getHumanResource().getBonus().getMoraBonus())); + } + if ((porcentaje.compareTo(middlePorcentaje) == 0) || (porcentaje.compareTo(middlePorcentaje) == 1 && porcentaje.compareTo(maxPorcentaje) == -1)) { + BonusMora = (amountPayments.multiply(userPayRoll.getHumanResource().getBonus().getMoraBonus())).divide(maxPorcentaje); + } + } + + } + } + boxed = payrollCtrl.getDiscountByUserThisWeek(userId); + if (boxed == null || boxed.compareTo(BigDecimal.ZERO) < 0) { + boxed = BigDecimal.ZERO; + } + /* Se comenta debido a que el campo cajeado toma el valor + else { + commentsDiscounts = "Descuentos por cajeado en cortes del día"; + }*/ + granTotal = salary.add(BonusMora).add(bonusColocation).add(newCustomer).subtract(advances); + granTotalDeducciones = imss.add(advances).add(discounts).add(boxed).add(saving).add(paymentToDebt); + total = granTotal.subtract(boxed).subtract(imss).subtract(saving).subtract(paymentToDebt); + } + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + if (userId == null || userId.isEmpty()) { + showMessage(FacesMessage.SEVERITY_WARN, "Empleado obligatorio", "Debes seleccionar un empleado para calcular la nómina"); + userId = ""; + return; + } + + if (dateInit == null || dateEnd == null) { + showMessage(FacesMessage.SEVERITY_WARN, "Fechas obligatorias", "Debes seleccionar las fechas para calcular la nómina"); + userId = ""; + return; + } + + + if (genericCtrl.existStableGeneralBoxByCreatedOn(new Date())) { + showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden crear mas nominas porque ya se existe un cuadre de caja general de hoy."); + return; + } + + + Payroll payroll = new Payroll(); + + User userPayRoll = payrollCtrl.getUserById(userId); + + payroll.setActiveStatus(ActiveStatus.ENEBLED); + payroll.setAdvance(advances); + payroll.setCommentsDiscounts(commentsDiscounts); + payroll.setCommentsIncreases(commentsIncreases); + payroll.setCreatedBy(getLoggedUser().getUser().getId()); + payroll.setCreatedOn(new Date()); + payroll.setDiscounts(discounts); + payroll.setHumanResource(userPayRoll.getHumanResource()); + payroll.setImss(imss); + payroll.setIncreases(increases); + payroll.setObservation(comments); + payroll.setOffice(new Office(getLoggedUser().getOffice().getId())); + payroll.setSalary(salary); + payroll.setTotalBonusColocation(bonusColocation); + payroll.setTotalBonusMora(BonusMora); + payroll.setTotalBonusNewCustomer(newCustomer); + payroll.setTotalDaysBonus(daysBonus); + payroll.setTotalDaysSalary(daysSalary); + payroll.setTotalPayment(total); + payroll.setBoxed(boxed); + payroll.setSaving(saving); + payroll.setPaymentToDebt(paymentToDebt); + + // ADD new Fields values + + if (payrollCtrl.savePayroll(payroll)) { + createPaymentLoanEmployee(userPayRoll.getHumanResource()); + // Guarda el registro en la tabla de ahorro + if (saving.compareTo(BigDecimal.ZERO) > 0) { + createEmployeeSaving(userPayRoll.getHumanResource()); + } + + FacesMessage msg = new FacesMessage("Nómina creada.", "Se registró la nómina correctamente."); + FacesContext.getCurrentInstance().addMessage(null, msg); + salary = BigDecimal.ZERO; + imss = BigDecimal.ZERO; + advances = BigDecimal.ZERO; + newCustomer = BigDecimal.ZERO; + bonusColocation = BigDecimal.ZERO; + BonusMora = BigDecimal.ZERO; + granTotal = BigDecimal.ZERO; + granTotalDeducciones = BigDecimal.ZERO; + total = BigDecimal.ZERO; + discounts = BigDecimal.ZERO; + increases = BigDecimal.ZERO; + metaInfo = BigDecimal.ZERO; + newCustomerInfo = BigDecimal.ZERO; + toalColocadoInfo = BigDecimal.ZERO; + toalPaymentInfo = BigDecimal.ZERO; + toalFeeInfo = BigDecimal.ZERO; + saldoInsoluto = BigDecimal.ZERO; + bonusNewCustomerInfo = BigDecimal.ZERO; + bonusColocationInfo = BigDecimal.ZERO; + bonusMoraInfo = BigDecimal.ZERO; + tipoBonusInfo = ""; + commentsDiscounts = ""; + commentsIncreases = ""; + comments = ""; + userId = ""; + boxed = BigDecimal.ZERO; + saving = BigDecimal.ZERO; + paymentToDebt = BigDecimal.ZERO; + } + + } + + private void createPaymentLoanEmployee(HumanResource humanResource) { + List loanEmployeeList = payrollCtrl.getPaymentToDebtByUser(humanResource.getId()); + BigDecimal paymentToDebtResp = paymentToDebt; + if (loanEmployeeList != null && !loanEmployeeList.isEmpty()) { + for (LoanEmployeeView loan : loanEmployeeList) { + BigDecimal detailPay = loan.getAmountToPay(); + if (paymentToDebtResp.compareTo(BigDecimal.ZERO) == 1) { + LoanEmployeeDetails loanDetail = new LoanEmployeeDetails(); + loanDetail.setIdLoan(loan.getId()); + loanDetail.setIdUser(loan.getIdUser()); + loanDetail.setPaymentAmount(detailPay); + loanDetail.setReferenceNumber(loan.getReferenceNumber() + 1); + loanDetail.setCreatedOn(new Date()); + loanDetail.setCreatedBy(getLoggedUser().getId()); + loanDetail.setLoanEmployeeDetailStatus(ActiveStatus.ENEBLED); + loanDetail.setPayroll(ActiveStatus.ENEBLED); + + humanResource.setBalance(humanResource.getBalance().subtract(detailPay)); + LoanEmployee loanE = payrollCtrl.getLoanEmployeeById(loan.getId()); + if(loanE.getBalance().compareTo(detailPay) < 0 || detailPay.compareTo(loanE.getBalance()) == 0){ + paymentToDebtResp.subtract(loanE.getBalance()); + loanDetail.setPaymentAmount(loanE.getBalance()); + loanE.setBalance(BigDecimal.ZERO); + }else{ + loanE.setBalance(loanE.getBalance().subtract(detailPay)); + paymentToDebtResp.subtract(detailPay); + } + + + payrollCtrl.saveLoanEmployeeDetail(loanDetail, humanResource, loanE); + } + } + } + } + + private void createEmployeeSaving(HumanResource humanResource) { + EmployeeSaving employeeSaving = new EmployeeSaving(); + employeeSaving.setIdUser(humanResource.getId()); + employeeSaving.setEmployeeSaving(saving); + employeeSaving.setCreatedOn(new Date()); + employeeSaving.setCreatedBy(getLoggedUser().getId()); + employeeSaving.setType(EmployeeSavingType.SAVING); + humanResource.setEmployeeSaving(saving); + payrollCtrl.saveEmployeeSaving(employeeSaving, humanResource); + } + + private void cancelEmployeeSaving(Payroll payroll) { + EmployeeSaving employeeSaving = new EmployeeSaving(); + employeeSaving.setIdUser(payroll.getHumanResource().getId()); + employeeSaving.setEmployeeSaving(payroll.getSaving()); + employeeSaving.setCreatedOn(new Date()); + employeeSaving.setCreatedBy(getLoggedUser().getId()); + employeeSaving.setType(EmployeeSavingType.CANCEL); + payrollCtrl.saveEmployeeSaving(employeeSaving, payroll.getHumanResource()); + } + + @Override + public void deleteRow() { + boolean delete = true; + delete = selectedPayroll.getActiveStatus() == ActiveStatus.ENEBLED ? true : false; + + + + if (delete) { + + List listGeneralBox = payrollCtrl.getStableGeneralBoxByDate(getLoggedUser().getOffice().getId(), + selectedPayroll.getCreatedOn(), selectedPayroll.getCreatedOn()); + if (listGeneralBox == null || listGeneralBox.isEmpty()) { + payrollCtrl.updatePayrollByStatus(ActiveStatus.DISABLED, selectedPayroll.getId(), getLoggedUser().getUser().getId()); + + List loanEmployeeList = loanEmployeeController.findLoanDetailToUpdate(selectedPayroll.getHumanResource().getId(),selectedPayroll.getCreatedOn()); + + for(LoanEmployeeDetails loanDetail: loanEmployeeList){ + + LoanEmployee loan = payrollCtrl.getLoanEmployeeById(loanDetail.getIdLoan()); + + loan.setBalance(loan.getBalance().add(loanDetail.getPaymentAmount())); + loan.setLastUpdatedBy(getLoggedUser().getId()); + loan.setLastUpdatedOn(new Date()); + + + loanEmployeeController.updateLoanEmployee(loan); + + } + + loanEmployeeController.updateLoanEmployeeDetailByStatus(selectedPayroll.getHumanResource().getId(),selectedPayroll.getCreatedOn()); + cancelEmployeeSaving(selectedPayroll); + searchHistoricalAction(); + + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Eliminar nómina"); + bitacora.setCommentsUser(getComments()); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacora.setDescription("Se eliminó correctamente la nómina con fecha: " + selectedPayroll.getCreatedOn() + ", con monto $" + + selectedPayroll.getTotalPayment()); + bitacoraCtrl.saveBitacora(bitacora); + comments = ""; + selectedPayroll = null; + showMessage(FacesMessage.SEVERITY_INFO, "Nómina eliminada", "Se eliminó correctamente."); + } + else{ + showMessage(FacesMessage.SEVERITY_ERROR, "Error", "La nómina no se pudo eliminar porque existe un corte de caja general con esa fecha."); + } + } + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List getUser() { + return user; + } + + public void setUser(List user) { + this.user = user; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public Date getDateInit() { + return dateInit; + } + + public void setDateInit(Date dateInit) { + this.dateInit = dateInit; + } + + public Date getDateEnd() { + return dateEnd; + } + + public void setDateEnd(Date dateEnd) { + this.dateEnd = dateEnd; + } + + public PayRollController getPayrollCtrl() { + return payrollCtrl; + } + + public void setPayrollCtrl(PayRollController payrollCtrl) { + this.payrollCtrl = payrollCtrl; + } + + public BigDecimal getSalary() { + return salary; + } + + public void setSalary(BigDecimal salary) { + this.salary = salary; + } + + public BigDecimal getImss() { + return imss; + } + + public void setImss(BigDecimal imss) { + this.imss = imss; + } + + public BigDecimal getAdvances() { + return advances; + } + + public void setAdvances(BigDecimal advances) { + this.advances = advances; + } + + public BigDecimal getNewCustomer() { + return newCustomer; + } + + public void setNewCustomer(BigDecimal newCustomer) { + this.newCustomer = newCustomer; + } + + public BigDecimal getBonusColocation() { + return bonusColocation; + } + + public void setBonusColocation(BigDecimal bonusColocation) { + this.bonusColocation = bonusColocation; + } + + public BigDecimal getBonusMora() { + return BonusMora; + } + + public void setBonusMora(BigDecimal BonusMora) { + this.BonusMora = BonusMora; + } + + public Goal getGoal() { + return goal; + } + + public void setGoal(Goal goal) { + this.goal = goal; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public BigDecimal getGranTotal() { + return granTotal; + } + + public void setGranTotal(BigDecimal granTotal) { + this.granTotal = granTotal; + } + + public BigDecimal getGranTotalDeducciones() { + return granTotalDeducciones; + } + + public void setGranTotalDeducciones(BigDecimal granTotalDeducciones) { + this.granTotalDeducciones = granTotalDeducciones; + } + + public BigDecimal getDiscounts() { + return discounts; + } + + public void setDiscounts(BigDecimal discounts) { + this.discounts = discounts; + } + + public String getCommentsDiscounts() { + return commentsDiscounts; + } + + public void setCommentsDiscounts(String commentsDiscounts) { + this.commentsDiscounts = commentsDiscounts; + } + + public BigDecimal getIncreases() { + return increases; + } + + public void setIncreases(BigDecimal increases) { + this.increases = increases; + } + + public String getCommentsIncreases() { + return commentsIncreases; + } + + public void setCommentsIncreases(String commentsIncreases) { + this.commentsIncreases = commentsIncreases; + } + + public BigDecimal getTotal() { + return total; + } + + public void setTotal(BigDecimal total) { + this.total = total; + } + + public BigDecimal getMetaInfo() { + return metaInfo; + } + + public void setMetaInfo(BigDecimal metaInfo) { + this.metaInfo = metaInfo; + } + + public BigDecimal getNewCustomerInfo() { + return newCustomerInfo; + } + + public void setNewCustomerInfo(BigDecimal newCustomerInfo) { + this.newCustomerInfo = newCustomerInfo; + } + + public BigDecimal getToalColocadoInfo() { + return toalColocadoInfo; + } + + public void setToalColocadoInfo(BigDecimal toalColocadoInfo) { + this.toalColocadoInfo = toalColocadoInfo; + } + + public BigDecimal getToalPaymentInfo() { + return toalPaymentInfo; + } + + public void setToalPaymentInfo(BigDecimal toalPaymentInfo) { + this.toalPaymentInfo = toalPaymentInfo; + } + + public BigDecimal getToalFeeInfo() { + return toalFeeInfo; + } + + public void setToalFeeInfo(BigDecimal toalFeeInfo) { + this.toalFeeInfo = toalFeeInfo; + } + public BigDecimal getSaldoInsoluto() { + return saldoInsoluto; + } + + public void setSaldoInsoluto(BigDecimal saldoInsoluto) { + this.saldoInsoluto = saldoInsoluto; + } + + public BigDecimal getBonusNewCustomerInfo() { + return bonusNewCustomerInfo; + } + + public void setBonusNewCustomerInfo(BigDecimal bonusNewCustomerInfo) { + this.bonusNewCustomerInfo = bonusNewCustomerInfo; + } + + public BigDecimal getBonusColocationInfo() { + return bonusColocationInfo; + } + + public void setBonusColocationInfo(BigDecimal bonusColocationInfo) { + this.bonusColocationInfo = bonusColocationInfo; + } + + public BigDecimal getBonusMoraInfo() { + return bonusMoraInfo; + } + + public void setBonusMoraInfo(BigDecimal bonusMoraInfo) { + this.bonusMoraInfo = bonusMoraInfo; + } + + public String getTipoBonusInfo() { + return tipoBonusInfo; + } + + public void setTipoBonusInfo(String tipoBonusInfo) { + this.tipoBonusInfo = tipoBonusInfo; + } + + public Integer getDaysSalary() { + return daysSalary; + } + + public void setDaysSalary(Integer daysSalary) { + this.daysSalary = daysSalary; + } + + public Integer getDaysBonus() { + return daysBonus; + } + + public void setDaysBonus(Integer daysBonus) { + this.daysBonus = daysBonus; + } + + public List getPayroll() { + return payroll; + } + + public void setPayroll(List payroll) { + this.payroll = payroll; + } + + public Payroll getSelectedPayroll() { + return selectedPayroll; + } + + public void setSelectedPayroll(Payroll selectedPayroll) { + this.selectedPayroll = selectedPayroll; + } + + public DriverController getDriverCtrl() { + return driverCtrl; + } + + public void setDriverCtrl(DriverController driverCtrl) { + this.driverCtrl = driverCtrl; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public BigDecimal getBoxed() { + return boxed; + } + + public void setBoxed(BigDecimal boxed) { + this.boxed = boxed; + } + + public BigDecimal getSaving() { + return saving; + } + + public void setSaving(BigDecimal saving) { + this.saving = saving; + } + + public BigDecimal getPaymentToDebt() { + return paymentToDebt; + } + + public void setPaymentToDebt(BigDecimal paymentToDebt) { + this.paymentToDebt = paymentToDebt; + } + + public GenericValidationController getGenericValidateController() { + return genericValidateController; + } + + public void setGenericValidateController(GenericValidationController genericController) { + this.genericValidateController = genericController; + } + + public Date getLastStableGeneralBox() { + return lastStableGeneralBox; + } + + public void setLastStableGeneralBox(Date lastStableGeneralBox) { + this.lastStableGeneralBox = lastStableGeneralBox; + } + + private GenericController genericCtrl; + private PayRollController payrollCtrl; + private BitacoraController bitacoraCtrl; + private GenericValidationController genericValidateController; + private LoanEmployeeController loanEmployeeController; + + private Date lastStableGeneralBox; + private List user; + private List payroll; + private Payroll selectedPayroll; + + private String userId; + private Date dateInit; + private Date dateEnd; + private String comments; + + private BigDecimal salary; + private BigDecimal imss; + private BigDecimal advances; + private BigDecimal newCustomer; + private BigDecimal bonusColocation; + private BigDecimal BonusMora; + private Goal goal; + private BigDecimal granTotal; + private BigDecimal granTotalDeducciones; + private BigDecimal discounts; + private String commentsDiscounts; + private BigDecimal increases; + private String commentsIncreases; + private BigDecimal total; + + private BigDecimal metaInfo; + private BigDecimal newCustomerInfo; + private BigDecimal toalColocadoInfo; + private BigDecimal toalPaymentInfo; + private BigDecimal toalFeeInfo; + private BigDecimal saldoInsoluto; + + private BigDecimal bonusNewCustomerInfo; + private BigDecimal bonusColocationInfo; + private BigDecimal bonusMoraInfo; + private String tipoBonusInfo; + private Integer daysSalary; + private Integer daysBonus; + private DriverController driverCtrl; + private List data; + + private BigDecimal boxed; + private BigDecimal saving; + private BigDecimal paymentToDebt; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initOneWeekBeforeToCurrdate(); + + genericCtrl = new GenericController(); + payrollCtrl = new PayRollController(); + driverCtrl = new DriverController(); + bitacoraCtrl = new BitacoraController(); + loanEmployeeController = new LoanEmployeeController(); + data = driverCtrl.getAllLoanLastWeekByOffice(getLoggedUser().getOffice().getId()); + payroll = payrollCtrl.fillPayrollDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + setGenericValidateController(new GenericValidationController()); + setLastStableGeneralBox(getGenericValidateController().lastStableGeneralBoxByDate(getLoggedUser().getUser())); + user = getUsers(); + salary = BigDecimal.ZERO; + imss = BigDecimal.ZERO; + advances = BigDecimal.ZERO; + newCustomer = BigDecimal.ZERO; + bonusColocation = BigDecimal.ZERO; + BonusMora = BigDecimal.ZERO; + granTotal = BigDecimal.ZERO; + granTotalDeducciones = BigDecimal.ZERO; + total = BigDecimal.ZERO; + discounts = BigDecimal.ZERO; + increases = BigDecimal.ZERO; + metaInfo = BigDecimal.ZERO; + newCustomerInfo = BigDecimal.ZERO; + toalColocadoInfo = BigDecimal.ZERO; + toalPaymentInfo = BigDecimal.ZERO; + toalFeeInfo = BigDecimal.ZERO; + saldoInsoluto = BigDecimal.ZERO; + bonusNewCustomerInfo = BigDecimal.ZERO; + bonusColocationInfo = BigDecimal.ZERO; + bonusMoraInfo = BigDecimal.ZERO; + tipoBonusInfo = ""; + commentsDiscounts = ""; + commentsIncreases = ""; + daysBonus = 5; + daysSalary = 5; + + boxed = BigDecimal.ZERO; + saving = BigDecimal.ZERO; + paymentToDebt = BigDecimal.ZERO; + + Calendar c = Calendar.getInstance(); + if(c.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY){ + c.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); + dateInit = new Date(c.getTimeInMillis()); + c.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY); + dateEnd = new Date(c.getTimeInMillis()); + } + else{ + c.add(Calendar.DAY_OF_WEEK, -7); + c.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); + dateInit = new Date(c.getTimeInMillis()); + c.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY); + dateEnd = new Date(c.getTimeInMillis()); + } + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/PeopleBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/PeopleBean.java new file mode 100644 index 0000000..6d6e1b3 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/PeopleBean.java @@ -0,0 +1,162 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.admin.PeopleController; +import com.arrebol.apc.controller.catalog.RouteController; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("peopleManager") +@ViewScoped +public class PeopleBean extends GenericBean implements Serializable{ + + public void addPeople() { + try + { + logger.debug("addPeople"); + getSavePeople().setCreatedBy(getLoggedUser().getUser().getId()); + getSavePeople().setCreatedOn(new Date()); + getSavePeople().setOffice(new Office(getLoggedUser().getOffice().getId())); + getSavePeople().setActiveStatus(ActiveStatus.ENEBLED); + getSavePeople().setRouteCtlg(new RouteCtlg(routeId)); + getSavePeople().setThumbnail(""); + + if(isCustomer == true && isEndorsement == false) + getSavePeople().setPeopleType(PeopleType.CUSTOMER); + if(isCustomer == true && isEndorsement == true) + getSavePeople().setPeopleType(PeopleType.BOTH); + if(isCustomer == false && isEndorsement == true) + getSavePeople().setPeopleType(PeopleType.ENDORSEMENT); + if(isCustomer == false && isEndorsement == false) + getSavePeople().setPeopleType(PeopleType.BOTH); + + + String messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + FacesMessage.Severity severity = FacesMessage.SEVERITY_WARN; + + if(getPeopleCtrl().savePeople(getSavePeople())){ + setSavePeople(new People()); + isCustomer = false; + isEndorsement = false; + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + severity = FacesMessage.SEVERITY_INFO; + } + + Object[] param = {getBundlePropertyFile().getString("people"), getBundlePropertyFile().getString("created")}; + + buildAndSendMessage(param, messafeFormat, severity, getBundlePropertyFile().getString("people")); + + }catch(Exception e) + { + logger.error("savePeople", e); + Object[] param = {getBundlePropertyFile().getString("created")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("people") + ); + } + } + + public PeopleController getPeopleCtrl() { + return peopleCtrl; + } + + public void setPeopleCtrl(PeopleController peopleCtrl) { + this.peopleCtrl = peopleCtrl; + } + + public boolean isIsCustomer() { + return isCustomer; + } + + public void setIsCustomer(boolean isCustomer) { + this.isCustomer = isCustomer; + } + + public boolean isIsEndorsement() { + return isEndorsement; + } + + public void setIsEndorsement(boolean isEndorsement) { + this.isEndorsement = isEndorsement; + } + + public People getSavePeople() { + return savePeople; + } + + public void setSavePeople(People savePeople) { + this.savePeople = savePeople; + } + + public String getRouteId() { + return routeId; + } + + public void setRouteId(String routeId) { + this.routeId = routeId; + } + + public List getRoutes() { + return routes; + } + + public void setRoutes(List routes) { + this.routes = routes; + } + + public RouteController getRouteCtrl() { + return routeCtrl; + } + + public void setRouteCtrl(RouteController routeCtrl) { + this.routeCtrl = routeCtrl; + } + + final Logger logger = LogManager.getLogger(PeopleBean.class); + + private PeopleController peopleCtrl; + private RouteController routeCtrl; + boolean isCustomer; + boolean isEndorsement; + private People savePeople; + String routeId; + List routes; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + peopleCtrl = new PeopleController(); + routeCtrl = new RouteController(); + setSavePeople(new People()); + isCustomer = false; + isEndorsement = false; + routes = routeCtrl.fillRoutesDatatable(getLoggedUser().getOffice().getId()); + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StableGeneralBoxBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StableGeneralBoxBean.java new file mode 100644 index 0000000..b34e3cd --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StableGeneralBoxBean.java @@ -0,0 +1,1247 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.amazonaws.AmazonServiceException; +import com.amazonaws.auth.AWSStaticCredentialsProvider; +import com.amazonaws.auth.BasicAWSCredentials; +import com.amazonaws.services.simpleemail.AmazonSimpleEmailService; +import com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClientBuilder; +import com.amazonaws.services.simpleemail.model.Body; +import com.amazonaws.services.simpleemail.model.Content; +import com.amazonaws.services.simpleemail.model.Destination; +import com.amazonaws.services.simpleemail.model.Message; +import com.amazonaws.services.simpleemail.model.SendEmailRequest; +import com.amazonaws.services.simpleemail.model.SendEmailResult; +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.GenericValidationController; +import com.arrebol.apc.controller.admin.StableGeneralBoxController; +import com.arrebol.apc.model.admin.Advance; +import com.arrebol.apc.model.admin.ClosingDay; +import com.arrebol.apc.model.admin.ExpenseCompany; +import com.arrebol.apc.model.admin.MoneyDaily; +import com.arrebol.apc.model.admin.StableGeneralBox; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.ExpenseCompanyType; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.model.payroll.Payroll; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import com.arrebol.apc.web.beans.SendMSN; +import com.itextpdf.text.BaseColor; +import com.itextpdf.text.Chunk; +import com.itextpdf.text.Document; +import com.itextpdf.text.Element; +import com.itextpdf.text.FontFactory; +import com.itextpdf.text.Image; +import com.itextpdf.text.PageSize; +import com.itextpdf.text.Paragraph; +import com.itextpdf.text.pdf.PdfPCell; +import com.itextpdf.text.pdf.PdfPTable; +import com.itextpdf.text.pdf.PdfWriter; +import java.awt.Font; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.DecimalFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import javax.servlet.ServletContext; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import static org.hibernate.annotations.common.util.impl.LoggerFactory.logger; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("stableGeneralBoxManager") +@ViewScoped +public class StableGeneralBoxBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setStableGeneralBox(fillDatatableStableGeneralBox()); + } + } catch (Exception e) { + } + } + + public List fillDatatableStableGeneralBox() { + + return getStableGeneralBoxCtrl().fillStableGeneralBoxDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + } + + public void calculationFunction() { + total = sobres.add(efectivo).add(monedas); + total = total.subtract(totalBox); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + if (createdOn == null) { + FacesMessage msg = new FacesMessage("Datos incorrectos", "La fecha es obligatoria"); + FacesContext.getCurrentInstance().addMessage(null, msg); + return; + } + // BigDecimal totalBoxTemp = genericCtrl.findAllGeneralBox(getLoggedUser().getOffice().getId()); + BigDecimal totalBoxTemp = stableGeneralBoxCtrl.getTotalBox(); + + if (totalBox.compareTo(totalBoxTemp) != 0) { + FacesMessage msg = new FacesMessage("Advertencia", "Otros usuarios han movido la información de caja general, por lo cual cambio el monto. Favor de refrescar la página."); + FacesContext.getCurrentInstance().addMessage(null, msg); + return; + } + Calendar calendar = Calendar.getInstance(); + calendar.setTime(createdOn); + calendar.set(Calendar.HOUR_OF_DAY, 12); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + + if (stableGeneralBoxCtrl.getCountStableGeneralBoxByOfficeAndDate(calendar.getTime(), getLoggedUser().getOffice().getId()) > 0) { + FacesMessage msg = new FacesMessage("Cuadre de caja encontrado.", "Ya se encuentra registrado un cuadre de caja general para ese día."); + FacesContext.getCurrentInstance().addMessage(null, msg); + return; + } + + if (stableGeneralBoxCtrl.getPendingByClosingDay(getLoggedUser().getOffice().getId()).compareTo(BigDecimal.ZERO) > 0) { + FacesMessage msg = new FacesMessage("ATENCION - CORTES FALTANTES.", "Falta hacer cortes del dia."); + FacesContext.getCurrentInstance().addMessage(null, msg); + return; + } + + StableGeneralBox box = new StableGeneralBox(); + box.setActiveStatus(ActiveStatus.ENEBLED); + box.setDescription(description); + box.setOffice(new Office(getLoggedUser().getOffice().getId())); + box.setTotalGeneralBox(totalBox); + box.setTotalBankNote(efectivo); + box.setTotalEnvelope(sobres); + box.setTotalCoin(monedas); + BigDecimal temp = sobres.add(efectivo).add(monedas); + box.setTotalStable(temp.subtract(totalBox)); + + box.setCreatedOn(new Date()); + box.setCreatedBy(getLoggedUser().getUser().getId()); + stableGeneralBoxCtrl.saveStableGeneralBox(box); + + + if (total.compareTo(BigDecimal.ZERO) > 0) { + Calendar calendarDate = calendar; + calendarDate.add(Calendar.DAY_OF_YEAR, 1); + Date date = calendarDate.getTime(); + + ExpenseCompany expense = new ExpenseCompany(); + expense.setActiveStatus(ActiveStatus.ENEBLED); + expense.setExpenseCompanyType(ExpenseCompanyType.PAYMENT_IN); + expense.setOffice(new Office(getLoggedUser().getOffice().getId())); + expense.setAmount(total); + expense.setDescription("Entrada automática por sobrante de caja general"); + expense.setCreatedOn(date); + expense.setCreatedBy(box.getCreatedBy()); + + stableGeneralBoxCtrl.autoSaveEntry(expense); + } + + + box.setUser(getLoggedUser().getUser()); + setEmail(box); + + efectivo = BigDecimal.ZERO; + sobres = BigDecimal.ZERO; + monedas = BigDecimal.ZERO; + total = BigDecimal.ZERO; + description = ""; + FacesMessage msg = new FacesMessage("Nuevo cuadre de caja general", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + + private boolean setEmail(StableGeneralBox sgb) { + + String ACCESS_KEY = getBundlePropertyFile().getString("aws.access.key"); + String SECRET_KEY = getBundlePropertyFile().getString("aws.secret.access.key"); + // se valida si la locasion tiene un correo asociado + + // Remitente y destinatario + String sender = "crov.technology.services@gmail.com"; + //String recipient = getLoggedUser().getLocation().getMail(); + String recipient = "camposbueno77@gmail.com"; + + // Configurar credenciales de AWS + BasicAWSCredentials awsCredentials = new BasicAWSCredentials(ACCESS_KEY, SECRET_KEY); + AmazonSimpleEmailService client = AmazonSimpleEmailServiceClientBuilder.standard() + .withCredentials(new AWSStaticCredentialsProvider(awsCredentials)) + .withRegion(getBundlePropertyFile().getString("aws.region")) // Cambia la región según tus necesidades + .build(); + + String SUBJECT = "ACE Caja General"; + BigDecimal temp = sgb.getTotalEnvelope().add(sgb.getTotalCoin()).add(sgb.getTotalBankNote()); + String HTMLBODY = "" + + "" + + "" + + "" + + "" + + "

Cuadre de caja general ACE

" + + "

ACE - Caja general

" + + "

Por entregar: " + currencyFormatNumber(sgb.getTotalGeneralBox()) + "

" + + "

Entregado: " + currencyFormatNumber(temp) + "

" + + "

Diferencia: " + currencyFormatNumber(sgb.getTotalStable()) + "

" + + "

Comentario: " + sgb.getDescription() + "

" + + "

Cuadre realizado por: " + sgb.getUser().getHumanResource().getFirstName()+" "+sgb.getUser().getHumanResource().getLastName()+"

" + + "" + + ""; + + + String TEXTBODY = "Este mensaje ha sido enviado automáticamente desde ACE.\n\n"; + + // Crear el mensaje + SendEmailRequest request = new SendEmailRequest() + .withDestination(new Destination().withToAddresses(recipient)) + .withMessage(new Message() + .withBody(new Body() + .withHtml(new Content() + .withCharset("UTF-8").withData(HTMLBODY)) + .withText(new Content() + .withCharset("UTF-8").withData(TEXTBODY))) + .withSubject(new Content() + .withCharset("UTF-8").withData(SUBJECT))) + .withSource(sender); + + // Enviar el correo + try { + SendEmailResult result = client.sendEmail(request); + showMessage(FacesMessage.SEVERITY_INFO, "El correo se ha enviado correctamente", "El correo se ha enviado correctamente"); + + return true; + } catch (AmazonServiceException ex) { + showMessage(FacesMessage.SEVERITY_ERROR, "Error al enviar el correo", "Error al enviar el correo"); + + return false; + } + + } + + @Override + public void deleteRow() { + try { + if (stableGeneralBoxCtrl.existNextPaidStableGeneralBoxByCreatedOn(selectedStableGeneralBox.getCreatedOn())) { + showMessage(FacesMessage.SEVERITY_WARN, "Historial cadre de caja general", "No se puede borrar porque existe un cuadre de caja posterior."); + } else { + boolean delete = true; + delete = selectedStableGeneralBox.getActiveStatus() == ActiveStatus.ENEBLED ? true : false; + + if (delete) { + stableGeneralBoxCtrl.updateStableGeneralBoxByStatus(ActiveStatus.DISABLED, selectedStableGeneralBox.getId(), getLoggedUser().getUser().getId()); + searchHistoricalAction(); + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Eliminar corte de caja general"); + bitacora.setCommentsUser(getComments()); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacora.setDescription("Se eliminó el corte de caja general con total en caja " + currencyFormatNumber(getSelectedStableGeneralBox().getTotalGeneralBox()) + + ", total sobre " + currencyFormatNumber(getSelectedStableGeneralBox().getTotalEnvelope()) + + ", total monedas " + currencyFormatNumber(getSelectedStableGeneralBox().getTotalCoin()) + + ", total efectivo " + currencyFormatNumber(getSelectedStableGeneralBox().getTotalBankNote()) + + ", diferencia de " + currencyFormatNumber(getSelectedStableGeneralBox().getTotalGeneralBox().subtract(getSelectedStableGeneralBox().getTotalEnvelope()).subtract(getSelectedStableGeneralBox().getTotalCoin()).subtract(getSelectedStableGeneralBox().getTotalBankNote())) + + " y fecha " + getSelectedStableGeneralBox().getCreatedOn()); + bitacoraCtrl.saveBitacora(bitacora); + comments = ""; + selectedStableGeneralBox = null; + showMessage(FacesMessage.SEVERITY_INFO, "Historial cadre de caja general", "Se eliminó correctamente."); + } + } + } catch (Exception e) { + } + } + + public StableGeneralBoxController getStableGeneralBoxCtrl() { + return stableGeneralBoxCtrl; + } + + public void setStableGeneralBoxCtrl(StableGeneralBoxController stableGeneralBoxCtrl) { + this.stableGeneralBoxCtrl = stableGeneralBoxCtrl; + } + + public List getStableGeneralBox() { + return stableGeneralBox; + } + + public void setStableGeneralBox(List stableGeneralBox) { + this.stableGeneralBox = stableGeneralBox; + } + + public StableGeneralBox getSelectedStableGeneralBox() { + return selectedStableGeneralBox; + } + + public void setSelectedStableGeneralBox(StableGeneralBox selectedStableGeneralBox) { + this.selectedStableGeneralBox = selectedStableGeneralBox; + } + + public BigDecimal getTotalBox() { + return totalBox; + } + + public void setTotalBox(BigDecimal totalBox) { + this.totalBox = totalBox; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public BigDecimal getSobres() { + return sobres; + } + + public void setSobres(BigDecimal sobres) { + this.sobres = sobres; + } + + public BigDecimal getEfectivo() { + return efectivo; + } + + public void setEfectivo(BigDecimal efectivo) { + this.efectivo = efectivo; + } + + public BigDecimal getMonedas() { + return monedas; + } + + public void setMonedas(BigDecimal monedas) { + this.monedas = monedas; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public BigDecimal getTotal() { + return total; + } + + public void setTotal(BigDecimal total) { + this.total = total; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public GenericValidationController getGenericValidateController() { + return genericValidateController; + } + + public void setGenericValidateController(GenericValidationController genericController) { + this.genericValidateController = genericController; + } + + public Date getLastStableGeneralBox() { + return lastStableGeneralBox; + } + + public void setLastStableGeneralBox(Date lastStableGeneralBox) { + this.lastStableGeneralBox = lastStableGeneralBox; + } + + public void imprimir() { + Document document = new Document(PageSize.LETTER); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + + PdfWriter.getInstance(document, baos); + + List resultsClosing = new ArrayList<>(); + List resultsExpenseIn = new ArrayList<>(); + List resultsExpenseOut = new ArrayList<>(); + List resultsExpenseAll = new ArrayList<>(); + List resultsPayroll = new ArrayList<>(); + List resultsMoneyDaily = new ArrayList<>(); + List resultsAdelantos = new ArrayList<>(); + List resultsDepositos = new ArrayList<>(); + + + Double totalCortes = 0D; + Double totalExpenseIn = 0D; + Double totalExpenseOut = 0D; + Double totalPayroll = 0D; + Double totalInicios = 0D; + Double totalAdelantos = 0D; + Double totalDepositos = 0D; + + + List results = new ArrayList<>(); + + + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(selectedStableGeneralBox.getCreatedOn()); + calendar.add(Calendar.HOUR_OF_DAY, -6); + Date fecha = calendar.getTime(); + + + Calendar calendarImpresion = Calendar.getInstance(); + calendarImpresion.setTime(new Date()); + calendarImpresion.add(Calendar.HOUR_OF_DAY, -6); + + BigDecimal lastStable = BigDecimal.ZERO; + + resultsClosing = getStableGeneralBoxCtrl().findClosingDailyListByStableGeneralBox(fecha); + resultsExpenseIn = getStableGeneralBoxCtrl().findExpenseCompanyInListByStableGeneralBox(fecha); + resultsExpenseOut = getStableGeneralBoxCtrl().findExpenseCompanyOutListByStableGeneralBox(fecha); + resultsExpenseAll = getStableGeneralBoxCtrl().findExpenseCompanyAllListByStableGeneralBox(fecha); + resultsPayroll = getStableGeneralBoxCtrl().findPayrollListByStableGeneralBox(fecha); + resultsMoneyDaily = getStableGeneralBoxCtrl().findIniciosListByStableGeneralBox(fecha); + resultsAdelantos = getStableGeneralBoxCtrl().findAdelantosListByStableGeneralBox(fecha); + resultsDepositos = getStableGeneralBoxCtrl().findLoanDetailsDepositByStableGeneralBox(fecha); + + lastStable = getStableGeneralBoxCtrl().getLastStableGeneralBox(fecha); + + DecimalFormat df2 = new DecimalFormat( "#,###,###,##0.00" ); + + results = stableGeneralBoxCtrl.getDataReport(fecha); + document.open(); + + DateFormat formatter = new SimpleDateFormat("dd/MM/yy"); + + Paragraph printDate = new Paragraph("Fecha de impresión: " + formatter.format(calendarImpresion.getTime()), FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.DARK_GRAY)); + printDate.setAlignment(Element.ALIGN_RIGHT); + document.add(printDate); + + ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext(); + String carpetaImagen = (String) servletContext.getRealPath("resources/serenity-layout/images"); + + Image imagen = Image.getInstance(carpetaImagen + "/ace_logo.jpg"); + imagen.scalePercent(4f); + imagen.setAlignment(Element.ALIGN_CENTER); + document.add(imagen); + + Paragraph title = new Paragraph("CUADRE CAJA GENERAL", FontFactory.getFont("arial", 18, Font.BOLD, BaseColor.DARK_GRAY)); + title.setAlignment(Element.ALIGN_CENTER); + document.add(title); + + document.add(Chunk.NEWLINE); + + Object[] res = (Object[]) results.get(0); + BigDecimal sobresCajaChica = BigDecimal.ZERO; + BigDecimal efectivoCajaChica = BigDecimal.ZERO; + BigDecimal monedasCajaChica = BigDecimal.ZERO; + BigDecimal totalCajaChica = BigDecimal.ZERO; + + BigDecimal sobresCajaGral = BigDecimal.ZERO; + BigDecimal efectivoCajaGral = BigDecimal.ZERO; + BigDecimal monedasCajaGral = BigDecimal.ZERO; + BigDecimal totalCajaGral = BigDecimal.ZERO; + + PdfPTable tableGen = new PdfPTable(3); + tableGen.setWidthPercentage(100); + tableGen.setTotalWidth(new float[]{150f, 205f, 205f}); + tableGen.setLockedWidth(true); + + + + PdfPTable table = new PdfPTable(7); + table.setTotalWidth(new float[]{100, 60, 60, 60, 80, 100, 100}); + + table.setLockedWidth(true); + PdfPCell cell = new PdfPCell(new Paragraph("Cortes del dia", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setBackgroundColor(new BaseColor(41, 171, 225)); + cell.setColspan(7); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Usuario", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Monto a reportar", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Monto reportado", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Diferencia", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Fecha", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Comentarios", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph("Creado por", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_CENTER); + cell.setColspan(1); + table.addCell(cell); + + if (resultsClosing != null && !resultsClosing.isEmpty()) { + for (ClosingDay tmp : resultsClosing) { + totalCortes = totalCortes + tmp.getAmountPaid().doubleValue(); + cell = new PdfPCell(new Paragraph(tmp.getUser().getHumanResource().getFirstName() + " " + tmp.getUser().getHumanResource().getLastName(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph(df2.format(tmp.getAmountExpected().doubleValue()) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph(df2.format(tmp.getAmountPaid().doubleValue()) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph(df2.format((tmp.getAmountPaid().subtract(tmp.getAmountExpected())).doubleValue()) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + + Calendar calendarClosing = Calendar.getInstance(); + calendarClosing.setTime(tmp.getCreatedOn()); + calendarClosing.add(Calendar.HOUR_OF_DAY, -6); + + + cell = new PdfPCell(new Paragraph(formatter.format(calendarClosing.getTime()), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph(tmp.getComments(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + + cell = new PdfPCell(new Paragraph(tmp.getCreatedBy().getUser().getHumanResource().getFirstName() + " " + tmp.getCreatedBy().getUser().getHumanResource().getLastName(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cell.setHorizontalAlignment(Element.ALIGN_LEFT); + cell.setColspan(1); + table.addCell(cell); + } + document.add(table); + + document.add(Chunk.createWhitespace("")); + } + + PdfPTable tableExpenseIn = new PdfPTable(3); + tableExpenseIn.setTotalWidth(new float[]{100, 100, 100}); + + tableExpenseIn.setLockedWidth(true); + PdfPCell cellExpenseIn = new PdfPCell(new Paragraph("Entradas/Gastos administrativos", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + + cellExpenseIn.setHorizontalAlignment(Element.ALIGN_CENTER); + cellExpenseIn.setBackgroundColor(new BaseColor(41, 171, 225)); + cellExpenseIn.setColspan(4); + tableExpenseIn.addCell(cellExpenseIn); + + cellExpenseIn = new PdfPCell(new Paragraph("Monto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellExpenseIn.setHorizontalAlignment(Element.ALIGN_CENTER); + cellExpenseIn.setColspan(1); + tableExpenseIn.addCell(cellExpenseIn); + + cellExpenseIn = new PdfPCell(new Paragraph("Tipo", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellExpenseIn.setHorizontalAlignment(Element.ALIGN_CENTER); + cellExpenseIn.setColspan(1); + tableExpenseIn.addCell(cellExpenseIn); + + cellExpenseIn = new PdfPCell(new Paragraph("Descripción", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellExpenseIn.setHorizontalAlignment(Element.ALIGN_CENTER); + cellExpenseIn.setColspan(1); + tableExpenseIn.addCell(cellExpenseIn); + + /*cellExpenseIn = new PdfPCell(new Paragraph("Usuario", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellExpenseIn.setHorizontalAlignment(Element.ALIGN_CENTER); + cellExpenseIn.setColspan(1); + tableExpenseIn.addCell(cellExpenseIn);*/ + + if (resultsExpenseAll != null && !resultsExpenseAll.isEmpty()) { + for (ExpenseCompany tmp : resultsExpenseAll) { + cellExpenseIn = new PdfPCell(new Paragraph(df2.format(tmp.getAmount().doubleValue()) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellExpenseIn.setHorizontalAlignment(Element.ALIGN_LEFT); + cellExpenseIn.setColspan(1); + tableExpenseIn.addCell(cellExpenseIn); + + cellExpenseIn = new PdfPCell(new Paragraph(tmp.getExpenseCompanyType().getLabel(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellExpenseIn.setHorizontalAlignment(Element.ALIGN_LEFT); + cellExpenseIn.setColspan(1); + tableExpenseIn.addCell(cellExpenseIn); + + cellExpenseIn = new PdfPCell(new Paragraph(tmp.getDescription(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellExpenseIn.setHorizontalAlignment(Element.ALIGN_LEFT); + cellExpenseIn.setColspan(1); + tableExpenseIn.addCell(cellExpenseIn); + + /*cellExpenseIn = new PdfPCell(new Paragraph(tmp.getUser().getUser().getHumanResource().getFirstName() + " " + tmp.getUser().getUser().getHumanResource().getLastName(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellExpenseIn.setHorizontalAlignment(Element.ALIGN_LEFT); + cellExpenseIn.setColspan(1); + tableExpenseIn.addCell(cellExpenseIn);*/ + } + document.add(tableExpenseIn); + + document.add(Chunk.NEWLINE); + } + + if (resultsExpenseIn != null && !resultsExpenseIn.isEmpty()) { + for (ExpenseCompany tmp : resultsExpenseIn) { + totalExpenseIn = totalExpenseIn + tmp.getAmount().doubleValue(); + + } + } + + if (resultsExpenseOut != null && !resultsExpenseOut.isEmpty()) { + for (ExpenseCompany tmp : resultsExpenseOut) { + totalExpenseOut = totalExpenseOut + tmp.getAmount().doubleValue(); + + } + } + + PdfPTable tablePayroll = new PdfPTable(3); + tablePayroll.setTotalWidth(new float[]{100, 100, 100}); + + tablePayroll.setLockedWidth(true); + PdfPCell cellPayroll = new PdfPCell(new Paragraph("Nóminas", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + + cellPayroll.setHorizontalAlignment(Element.ALIGN_CENTER); + cellPayroll.setBackgroundColor(new BaseColor(41, 171, 225)); + cellPayroll.setColspan(3); + tablePayroll.addCell(cellPayroll); + + cellPayroll = new PdfPCell(new Paragraph("Monto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellPayroll.setHorizontalAlignment(Element.ALIGN_CENTER); + cellPayroll.setColspan(1); + tablePayroll.addCell(cellPayroll); + + cellPayroll = new PdfPCell(new Paragraph("Empleado", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellPayroll.setHorizontalAlignment(Element.ALIGN_CENTER); + cellPayroll.setColspan(1); + tablePayroll.addCell(cellPayroll); + + cellPayroll = new PdfPCell(new Paragraph("Usuario creación", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellPayroll.setHorizontalAlignment(Element.ALIGN_CENTER); + cellPayroll.setColspan(1); + tablePayroll.addCell(cellPayroll); + + if (resultsPayroll != null && !resultsPayroll.isEmpty()) { + for (Payroll tmp : resultsPayroll) { + totalPayroll = totalPayroll + tmp.getTotalPayment().doubleValue(); + cellPayroll = new PdfPCell(new Paragraph(df2.format(tmp.getTotalPayment())+ "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellPayroll.setHorizontalAlignment(Element.ALIGN_LEFT); + cellPayroll.setColspan(1); + tablePayroll.addCell(cellPayroll); + + cellPayroll = new PdfPCell(new Paragraph(tmp.getHumanResource().getFirstName() + " " + tmp.getHumanResource().getLastName(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellPayroll.setHorizontalAlignment(Element.ALIGN_LEFT); + cellPayroll.setColspan(1); + tablePayroll.addCell(cellPayroll); + + cellPayroll = new PdfPCell(new Paragraph(tmp.getUser().getHumanResource().getFirstName() + " " + tmp.getUser().getHumanResource().getLastName(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellPayroll.setHorizontalAlignment(Element.ALIGN_LEFT); + cellPayroll.setColspan(1); + tablePayroll.addCell(cellPayroll); + } + document.add(tablePayroll); + + document.add(Chunk.NEWLINE); + } + + PdfPTable tableInicios = new PdfPTable(2); + tableInicios.setTotalWidth(new float[]{150,150}); + + + PdfPCell cellInicios = new PdfPCell(new Paragraph("Inicios", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + + cellInicios.setHorizontalAlignment(Element.ALIGN_CENTER); + cellInicios.setBackgroundColor(new BaseColor(41, 171, 225)); + cellInicios.setColspan(3); + tableInicios.addCell(cellInicios); + + cellInicios = new PdfPCell(new Paragraph("Monto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellInicios.setHorizontalAlignment(Element.ALIGN_CENTER); + cellInicios.setColspan(1); + tableInicios.addCell(cellInicios); + + + + cellInicios = new PdfPCell(new Paragraph("Usuario", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellInicios.setHorizontalAlignment(Element.ALIGN_CENTER); + cellInicios.setColspan(1); + tableInicios.addCell(cellInicios); + + if (resultsMoneyDaily != null && !resultsMoneyDaily.isEmpty()) { + for (MoneyDaily tmp : resultsMoneyDaily) { + totalInicios = totalInicios + tmp.getAmount().doubleValue(); + cellInicios = new PdfPCell(new Paragraph(df2.format(tmp.getAmount()) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellInicios.setHorizontalAlignment(Element.ALIGN_LEFT); + cellInicios.setColspan(1); + tableInicios.addCell(cellInicios); + + + + cellInicios = new PdfPCell(new Paragraph(tmp.getUser().getHumanResource().getFirstName() + " " + tmp.getUser().getHumanResource().getLastName(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellInicios.setHorizontalAlignment(Element.ALIGN_LEFT); + cellInicios.setColspan(1); + tableInicios.addCell(cellInicios); + } + document.add(tableInicios); + + document.add(Chunk.NEWLINE); + } + + PdfPTable tableAdelantos = new PdfPTable(4); + tableAdelantos.setTotalWidth(new float[]{100, 100, 100, 100}); + + tableAdelantos.setLockedWidth(true); + PdfPCell cellAdelantos = new PdfPCell(new Paragraph("Adelantos", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + + cellAdelantos.setHorizontalAlignment(Element.ALIGN_CENTER); + cellAdelantos.setBackgroundColor(BaseColor.BLUE); + cellAdelantos.setColspan(4); + tableAdelantos.addCell(cellAdelantos); + + cellAdelantos = new PdfPCell(new Paragraph("Empleado", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellAdelantos.setHorizontalAlignment(Element.ALIGN_CENTER); + cellAdelantos.setColspan(1); + tableAdelantos.addCell(cellAdelantos); + + cellAdelantos = new PdfPCell(new Paragraph("Monto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellAdelantos.setHorizontalAlignment(Element.ALIGN_CENTER); + cellAdelantos.setColspan(1); + tableAdelantos.addCell(cellAdelantos); + + cellAdelantos = new PdfPCell(new Paragraph("Descripción", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellAdelantos.setHorizontalAlignment(Element.ALIGN_CENTER); + cellAdelantos.setColspan(1); + tableAdelantos.addCell(cellAdelantos); + + cellAdelantos = new PdfPCell(new Paragraph("Usuario creación", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellAdelantos.setHorizontalAlignment(Element.ALIGN_CENTER); + cellAdelantos.setColspan(1); + tableAdelantos.addCell(cellAdelantos); + + if (resultsAdelantos != null && !resultsAdelantos.isEmpty()) { + for (Advance tmp : resultsAdelantos) { + totalAdelantos = totalAdelantos + tmp.getAmount().doubleValue(); + cellAdelantos = new PdfPCell(new Paragraph(tmp.getHumanResource().getFirstName() + " " + tmp.getHumanResource().getLastName(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellAdelantos.setHorizontalAlignment(Element.ALIGN_LEFT); + cellAdelantos.setColspan(1); + tableAdelantos.addCell(cellAdelantos); + + cellAdelantos = new PdfPCell(new Paragraph(df2.format(tmp.getAmount()) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellAdelantos.setHorizontalAlignment(Element.ALIGN_LEFT); + cellAdelantos.setColspan(1); + tableAdelantos.addCell(cellAdelantos); + + + cellAdelantos = new PdfPCell(new Paragraph(tmp.getUser().getHumanResource().getFirstName() + " " + tmp.getUser().getHumanResource().getLastName(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellAdelantos.setHorizontalAlignment(Element.ALIGN_LEFT); + cellAdelantos.setColspan(1); + tableAdelantos.addCell(cellAdelantos); + } + document.add(tableAdelantos); + + document.add(Chunk.NEWLINE); + } + + PdfPTable tableSaleDeposit = new PdfPTable(4); + tableSaleDeposit.setTotalWidth(new float[]{100, 100, 100, 100}); + + tableSaleDeposit.setLockedWidth(true); + PdfPCell cellSaleDeposit = new PdfPCell(new Paragraph("Depositos", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + + cellSaleDeposit.setHorizontalAlignment(Element.ALIGN_CENTER); + cellSaleDeposit.setBackgroundColor(new BaseColor(41, 171, 225)); + cellSaleDeposit.setColspan(4); + tableSaleDeposit.addCell(cellSaleDeposit); + + cellSaleDeposit = new PdfPCell(new Paragraph("Monto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellSaleDeposit.setHorizontalAlignment(Element.ALIGN_CENTER); + cellSaleDeposit.setColspan(1); + tableSaleDeposit.addCell(cellSaleDeposit); + + cellSaleDeposit = new PdfPCell(new Paragraph("Cliente", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellSaleDeposit.setHorizontalAlignment(Element.ALIGN_CENTER); + cellSaleDeposit.setColspan(1); + tableSaleDeposit.addCell(cellSaleDeposit); + + cellSaleDeposit = new PdfPCell(new Paragraph("Fecha", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellSaleDeposit.setHorizontalAlignment(Element.ALIGN_CENTER); + cellSaleDeposit.setColspan(1); + tableSaleDeposit.addCell(cellSaleDeposit); + + cellSaleDeposit = new PdfPCell(new Paragraph("Usuario creación", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellSaleDeposit.setHorizontalAlignment(Element.ALIGN_CENTER); + cellSaleDeposit.setColspan(1); + tableSaleDeposit.addCell(cellSaleDeposit); + + if (resultsDepositos != null && !resultsDepositos.isEmpty()) { + for (LoanDetails tmp : resultsDepositos) { + + + cellSaleDeposit = new PdfPCell(new Paragraph(df2.format(tmp.getPaymentAmount()) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellSaleDeposit.setHorizontalAlignment(Element.ALIGN_LEFT); + cellSaleDeposit.setColspan(1); + tableSaleDeposit.addCell(cellSaleDeposit); + + cellSaleDeposit = new PdfPCell(new Paragraph(tmp.getLoan().getCustomer().getFirstName() + " "+ tmp.getLoan().getCustomer().getLastName() , + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellSaleDeposit.setHorizontalAlignment(Element.ALIGN_LEFT); + cellSaleDeposit.setColspan(1); + tableSaleDeposit.addCell(cellSaleDeposit); + + cellSaleDeposit = new PdfPCell(new Paragraph(tmp.getCreatedOn() + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellSaleDeposit.setHorizontalAlignment(Element.ALIGN_LEFT); + cellSaleDeposit.setColspan(1); + tableSaleDeposit.addCell(cellSaleDeposit); + + cellSaleDeposit = new PdfPCell(new Paragraph(tmp.getUser().getHumanResource().getFirstName() + " "+ tmp.getUser().getHumanResource().getLastName() , + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellSaleDeposit.setHorizontalAlignment(Element.ALIGN_LEFT); + cellSaleDeposit.setColspan(1); + tableSaleDeposit.addCell(cellSaleDeposit); + } + document.add(tableSaleDeposit); + + document.add(Chunk.NEWLINE); + } + + PdfPTable tableTotal = new PdfPTable(7); + tableTotal.setTotalWidth(new float[]{60, 45, 45, 55, 50, 45, 45}); + + tableTotal.setLockedWidth(true); + PdfPCell cellTotal = new PdfPCell(new Paragraph("Totales", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + + cellTotal.setHorizontalAlignment(Element.ALIGN_CENTER); + cellTotal.setBackgroundColor(new BaseColor(41, 171, 225)); + cellTotal.setColspan(7); + tableTotal.addCell(cellTotal); + + cellTotal = new PdfPCell(new Paragraph("Cuadre anterior", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_CENTER); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + cellTotal = new PdfPCell(new Paragraph("Cortes", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_CENTER); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + cellTotal = new PdfPCell(new Paragraph("Entradas", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_CENTER); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + cellTotal = new PdfPCell(new Paragraph("Gastos admon.", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_CENTER); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + cellTotal = new PdfPCell(new Paragraph("Nóminas", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_CENTER); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + + + cellTotal = new PdfPCell(new Paragraph("Inicios", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_CENTER); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + + + cellTotal = new PdfPCell(new Paragraph("Adelantos", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_CENTER); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + + + cellTotal = new PdfPCell(new Paragraph(df2.format(lastStable.doubleValue()) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_LEFT); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + cellTotal = new PdfPCell(new Paragraph(df2.format(totalCortes) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_LEFT); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + cellTotal = new PdfPCell(new Paragraph(df2.format(totalExpenseIn) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_LEFT); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + cellTotal = new PdfPCell(new Paragraph(df2.format(totalExpenseOut) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_LEFT); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + cellTotal = new PdfPCell(new Paragraph(df2.format(totalPayroll) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_LEFT); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + + + cellTotal = new PdfPCell(new Paragraph(df2.format(totalInicios) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_LEFT); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + + + cellTotal = new PdfPCell(new Paragraph(df2.format(totalAdelantos) + "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellTotal.setHorizontalAlignment(Element.ALIGN_LEFT); + cellTotal.setColspan(1); + tableTotal.addCell(cellTotal); + + + + document.add(tableTotal); + + document.add(Chunk.NEWLINE); + + + + User userTmp = selectedStableGeneralBox.getUser(); + PdfPTable tableStable = new PdfPTable(8); + tableStable.setTotalWidth(new float[]{50, 50, 60, 60, 50, 50, 65, 100}); + + tableStable.setLockedWidth(true); + PdfPCell cellStable = new PdfPCell(new Paragraph("Cuadre de caja general", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + + cellStable.setHorizontalAlignment(Element.ALIGN_CENTER); + cellStable.setBackgroundColor(new BaseColor(41, 171, 225)); + cellStable.setColspan(8); + tableStable.addCell(cellStable); + + cellStable = new PdfPCell(new Paragraph("Fecha creación", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_CENTER); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + cellStable = new PdfPCell(new Paragraph("Usuario", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_CENTER); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + cellStable = new PdfPCell(new Paragraph("Total en caja", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_CENTER); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + + + cellStable = new PdfPCell(new Paragraph("Deje en sobres", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_CENTER); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + cellStable = new PdfPCell(new Paragraph("Efectivo", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_CENTER); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + cellStable = new PdfPCell(new Paragraph("Monedas", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_CENTER); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + cellStable = new PdfPCell(new Paragraph("Diferencia", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_CENTER); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + cellStable = new PdfPCell(new Paragraph("Descripción", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_CENTER); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + Calendar calendarCreatedOn = Calendar.getInstance(); + calendarCreatedOn.setTime(selectedStableGeneralBox.getCreatedOn()); + calendarCreatedOn.add(Calendar.HOUR_OF_DAY, -6); + + String date = formatter.format(calendarCreatedOn.getTime()); + + cellStable = new PdfPCell(new Paragraph(date, + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_LEFT); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + cellStable = new PdfPCell(new Paragraph(userTmp.getHumanResource().getFirstName() + " " + userTmp.getHumanResource().getLastName(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_LEFT); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + cellStable = new PdfPCell(new Paragraph(df2.format(selectedStableGeneralBox.getTotalGeneralBox()), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_LEFT); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + + + cellStable = new PdfPCell(new Paragraph(df2.format(selectedStableGeneralBox.getTotalEnvelope()), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_LEFT); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + cellStable = new PdfPCell(new Paragraph(df2.format(selectedStableGeneralBox.getTotalBankNote()), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_LEFT); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + cellStable = new PdfPCell(new Paragraph(df2.format(selectedStableGeneralBox.getTotalCoin()), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_LEFT); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + cellStable = new PdfPCell(new Paragraph(df2.format((selectedStableGeneralBox.getTotalGeneralBox().subtract(selectedStableGeneralBox.getTotalBankNote().add(selectedStableGeneralBox.getTotalEnvelope()).add(selectedStableGeneralBox.getTotalCoin())))), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_LEFT); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + cellStable = new PdfPCell(new Paragraph(selectedStableGeneralBox.getDescription(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellStable.setHorizontalAlignment(Element.ALIGN_LEFT); + cellStable.setColspan(1); + tableStable.addCell(cellStable); + + document.add(tableStable); + + + + + + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + + document.add(new Paragraph(" __________________________ __________________________")); + document.add(new Paragraph(" Firma Nombre y firma del revisor")); + document.add(new Paragraph(" "+ userTmp.getHumanResource().getFirstName() + " " + userTmp.getHumanResource().getLastName() +"")); + //document.add(new Paragraph(" " + res[8] == null ? "" : res[8].toString())); + + } catch (Exception e) { + System.out.print("Error 1: " + e.getMessage()); + } + + document.close(); + FacesContext context = FacesContext.getCurrentInstance(); + Object response = context.getExternalContext().getResponse(); + if (response instanceof HttpServletResponse) { + HttpServletResponse hrs = (HttpServletResponse) response; + hrs.setContentType("application/pdf"); + hrs.setHeader("Content-disposition", "attachment;filename=caja_general.pdf"); + hrs.setContentLength(baos.size()); + try { + ServletOutputStream out = hrs.getOutputStream(); + baos.writeTo(out); + out.flush(); + + } catch (IOException e) { + System.out.print("Error 2: " + e.getMessage()); + } + context.responseComplete(); + } + } + + private StableGeneralBoxController stableGeneralBoxCtrl; + private GenericController genericCtrl; + private BitacoraController bitacoraCtrl; + private GenericValidationController genericValidateController; + private Date lastStableGeneralBox; + private String comments; + + private List stableGeneralBox; + + private StableGeneralBox selectedStableGeneralBox; + + private BigDecimal totalBox; + + private String description; + private BigDecimal sobres; + private BigDecimal efectivo; + private BigDecimal monedas; + private Date createdOn; + private BigDecimal total; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initOneWeekBeforeToCurrdate(); + + stableGeneralBoxCtrl = new StableGeneralBoxController(); + genericCtrl = new GenericController(); + bitacoraCtrl = new BitacoraController(); + setGenericValidateController(new GenericValidationController()); + setLastStableGeneralBox(getGenericValidateController().lastStableGeneralBoxByDate(getLoggedUser().getUser())); + stableGeneralBox = fillDatatableStableGeneralBox(); + // totalBox = genericCtrl.findAllGeneralBox(getLoggedUser().getOffice().getId()); + totalBox = stableGeneralBoxCtrl.getTotalBox(); + efectivo = BigDecimal.ZERO; + monedas = BigDecimal.ZERO; + sobres = BigDecimal.ZERO; + total = totalBox; + createdOn=new Date(); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StableSmallBoxBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StableSmallBoxBean.java new file mode 100644 index 0000000..93fcacf --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StableSmallBoxBean.java @@ -0,0 +1,770 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.amazonaws.AmazonServiceException; +import com.amazonaws.auth.AWSStaticCredentialsProvider; +import com.amazonaws.auth.BasicAWSCredentials; +import com.amazonaws.services.simpleemail.AmazonSimpleEmailService; +import com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClientBuilder; +import com.amazonaws.services.simpleemail.model.Body; +import com.amazonaws.services.simpleemail.model.Content; +import com.amazonaws.services.simpleemail.model.Destination; +import com.amazonaws.services.simpleemail.model.Message; +import com.amazonaws.services.simpleemail.model.SendEmailRequest; +import com.amazonaws.services.simpleemail.model.SendEmailResult; +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.GenericValidationController; +import com.arrebol.apc.controller.admin.StableSmallBoxController; +import com.arrebol.apc.model.admin.OtherExpense; +import com.arrebol.apc.model.admin.StableSmallBox; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import com.arrebol.apc.web.beans.SendMSN; +import com.itextpdf.text.BaseColor; +import com.itextpdf.text.Chunk; +import com.itextpdf.text.Document; +import com.itextpdf.text.Element; +import com.itextpdf.text.FontFactory; +import com.itextpdf.text.Image; +import com.itextpdf.text.PageSize; +import com.itextpdf.text.Paragraph; +import com.itextpdf.text.pdf.PdfPCell; +import com.itextpdf.text.pdf.PdfPTable; +import com.itextpdf.text.pdf.PdfWriter; +import java.awt.Font; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.math.BigDecimal; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import javax.servlet.ServletContext; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("stableSmallBoxManager") +@ViewScoped +public class StableSmallBoxBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setStableSmallBox(fillDatatableStableSmallBox()); + } + } catch (Exception e) { + } + } + + public List fillDatatableStableSmallBox() { + return getStableSmallBoxCtrl().fillStableSmallBoxDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + } + + public void calculationFunction() { + total = sobres.add(efectivo).add(monedas); + total = total.subtract(totalBox); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + if (createdOn == null) { + FacesMessage msg = new FacesMessage("Datos incorrectos", "La fecha es obligatoria"); + FacesContext.getCurrentInstance().addMessage(null, msg); + return; + } + + BigDecimal totalBoxTemp = genericCtrl.findAllSmallBoxByLastSmallBox(getLoggedUser().getOffice().getId(), getLastSmallBox());; + + + if (totalBox.compareTo(totalBoxTemp) != 0) { + FacesMessage msg = new FacesMessage("Advertencia", "Otros usuarios han movido la información de caja chica, por lo cual cambio el monto. Favor de refrescar la página."); + FacesContext.getCurrentInstance().addMessage(null, msg); + return; + } + Calendar calendar = Calendar.getInstance(); + calendar.setTime(createdOn); + calendar.set(Calendar.HOUR_OF_DAY, 12); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + + if (stableSmallBoxCtrl.getCountStableSmallBoxByOfficeAndDate(calendar.getTime(), getLoggedUser().getOffice().getId()) > 0) { + FacesMessage msg = new FacesMessage("Cuadre de caja chica encontrado.", "Ya se encuentra registrado un cuadre de caja chica para ese día."); + FacesContext.getCurrentInstance().addMessage(null, msg); + return; + } + + if (stableSmallBoxCtrl.getPendingByClosingDay(getLoggedUser().getOffice().getId()).compareTo(BigDecimal.ZERO) > 0) { + FacesMessage msg = new FacesMessage("ATENCION - CORTES FALTANTES.", "Falta hacer cortes del dia."); + FacesContext.getCurrentInstance().addMessage(null, msg); + return; + } + + Date date = new Date(); + if (genericCtrl.existStableGeneralBoxByCreatedOn(date)) { + showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden agregar más cortes de caja chica porque ya se existe un cuadre de caja general de hoy."); + return; + } + StableSmallBox box = new StableSmallBox(); + box.setActiveStatus(ActiveStatus.ENEBLED); + box.setDescription(description); + box.setOffice(new Office(getLoggedUser().getOffice().getId())); + box.setTotalSmallBox(totalBox); + box.setTotalBankNote(efectivo); + box.setTotalEnvelope(sobres); + box.setTotalCoin(monedas); + BigDecimal temp = sobres.add(efectivo).add(monedas); + box.setTotalStable(temp.subtract(totalBox)); + + + + box.setCreatedOn(new Date()); + box.setCreatedBy(getLoggedUser().getUser().getId()); + stableSmallBoxCtrl.saveStableSmallBox(box); + + box.setUser(getLoggedUser().getUser()); + setEmail(box); + efectivo = BigDecimal.ZERO; + sobres = BigDecimal.ZERO; + monedas = BigDecimal.ZERO; + total = BigDecimal.ZERO; + description = ""; + FacesMessage msg = new FacesMessage("Nuevo cuadre de caja chica", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + + private boolean setEmail(StableSmallBox ssb) { + + + String ACCESS_KEY = getBundlePropertyFile().getString("aws.access.key"); + String SECRET_KEY = getBundlePropertyFile().getString("aws.secret.access.key"); + // se valida si la locasion tiene un correo asociado + + // Remitente y destinatario + String sender = "crov.technology.services@gmail.com"; + //String recipient = getLoggedUser().getLocation().getMail(); + String recipient = "camposbueno77@gmail.com"; + + + // Configurar credenciales de AWS + BasicAWSCredentials awsCredentials = new BasicAWSCredentials(ACCESS_KEY, SECRET_KEY); + AmazonSimpleEmailService client = AmazonSimpleEmailServiceClientBuilder.standard() + .withCredentials(new AWSStaticCredentialsProvider(awsCredentials)) + .withRegion(getBundlePropertyFile().getString("aws.region")) // Cambia la región según tus necesidades + .build(); + + String SUBJECT = "ACE Caja Chica"; + BigDecimal temp = ssb.getTotalEnvelope().add(ssb.getTotalCoin()).add(ssb.getTotalBankNote()); + String HTMLBODY = "" + + "" + + "" + + "" + + "" + + "

Cuadre de caja chica ACE

" + + "

ACE - Caja chica

" + + "

Por entregar: " + currencyFormatNumber(ssb.getTotalSmallBox()) + "

" + + "

Entregado: " + currencyFormatNumber(temp) + "

" + + "

Diferencia: " + currencyFormatNumber(ssb.getTotalStable()) + "

" + + "

Comentario: " + ssb.getDescription() + "

" + + "

Cuadre realizado por: " + ssb.getUser().getHumanResource().getFirstName()+" "+ssb.getUser().getHumanResource().getLastName()+ "

" + + "" + + ""; + + + String TEXTBODY = "Este mensaje ha sido enviado automáticamente desde ACE.\n\n"; + + // Crear el mensaje + SendEmailRequest request = new SendEmailRequest() + .withDestination(new Destination().withToAddresses(recipient)) + .withMessage(new Message() + .withBody(new Body() + .withHtml(new Content() + .withCharset("UTF-8").withData(HTMLBODY)) + .withText(new Content() + .withCharset("UTF-8").withData(TEXTBODY))) + .withSubject(new Content() + .withCharset("UTF-8").withData(SUBJECT))) + .withSource(sender); + + // Enviar el correo + try { + SendEmailResult result = client.sendEmail(request); + showMessage(FacesMessage.SEVERITY_INFO, "El correo se ha enviado correctamente", "El correo se ha enviado correctamente"); + + return true; + } catch (AmazonServiceException ex) { + showMessage(FacesMessage.SEVERITY_ERROR, "Error al enviar el correo", "Error al enviar el correo"); + + return false; + } + + } + @Override + public void deleteRow() { + try { + if (stableSmallBoxCtrl.existStableGeneralBoxByCreatedOn(selectedStableSmallBox.getCreatedOn())) { + showMessage(FacesMessage.SEVERITY_WARN, "Cuadre Caja chica", "No se puede borrar porque ya se realizo el cuadre de caja general del día."); + } else { + if (stableSmallBoxCtrl.existNextPaidStableSmallBoxByCreatedOn(selectedStableSmallBox.getCreatedOn())) { + showMessage(FacesMessage.SEVERITY_WARN, "Cuadre Caja chica", "No se puede borrar porque existe un cuadre de caja chica posterior"); + } else { + boolean delete = true; + delete = selectedStableSmallBox.getActiveStatus() == ActiveStatus.ENEBLED ? true : false; + + if (delete) { + + stableSmallBoxCtrl.updateStableSmallBoxByStatus(ActiveStatus.DISABLED, selectedStableSmallBox.getId(), getLoggedUser().getUser().getId()); + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Eliminar corte de caja general"); + bitacora.setCommentsUser(getComments()); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacora.setDescription("Se eliminó el corte de caja chica con total en caja " + currencyFormatNumber(getSelectedStableSmallBox().getTotalSmallBox()) + + ", total sobre " + currencyFormatNumber(getSelectedStableSmallBox().getTotalEnvelope()) + + ", total monedas " + currencyFormatNumber(getSelectedStableSmallBox().getTotalCoin()) + + ", total efectivo " + currencyFormatNumber(getSelectedStableSmallBox().getTotalBankNote()) + + ", diferencia de " + currencyFormatNumber(getSelectedStableSmallBox().getTotalSmallBox().subtract(getSelectedStableSmallBox().getTotalEnvelope()).subtract(getSelectedStableSmallBox().getTotalCoin()).subtract(getSelectedStableSmallBox().getTotalBankNote())) + + " y fecha " + getSelectedStableSmallBox().getCreatedOn()); + bitacoraCtrl.saveBitacora(bitacora); + comments = ""; + + searchHistoricalAction(); + selectedStableSmallBox = null; + showMessage(FacesMessage.SEVERITY_INFO, "Cuadre Caja chica", "Se eliminó correctamente."); + } + } + } + + } catch (Exception e) { + } + } + + public StableSmallBoxController getStableSmallBoxCtrl() { + return stableSmallBoxCtrl; + } + + public void setStableSmallBoxCtrl(StableSmallBoxController stableSmallBoxCtrl) { + this.stableSmallBoxCtrl = stableSmallBoxCtrl; + } + + public List getStableSmallBox() { + return stableSmallBox; + } + + public void setStableSmallBox(List stableSmallBox) { + this.stableSmallBox = stableSmallBox; + } + + public StableSmallBox getSelectedStableSmallBox() { + return selectedStableSmallBox; + } + + public void setSelectedStableSmallBox(StableSmallBox selectedStableSmallBox) { + this.selectedStableSmallBox = selectedStableSmallBox; + } + + public BigDecimal getTotalBox() { + return totalBox; + } + + public void setTotalBox(BigDecimal totalBox) { + this.totalBox = totalBox; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public BigDecimal getSobres() { + return sobres; + } + + public void setSobres(BigDecimal sobres) { + this.sobres = sobres; + } + + public BigDecimal getEfectivo() { + return efectivo; + } + + public void setEfectivo(BigDecimal efectivo) { + this.efectivo = efectivo; + } + + public BigDecimal getMonedas() { + return monedas; + } + + public void setMonedas(BigDecimal monedas) { + this.monedas = monedas; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public BigDecimal getTotal() { + return total; + } + + public void setTotal(BigDecimal total) { + this.total = total; + } + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public GenericValidationController getGenericValidateController() { + return genericValidateController; + } + + public void setGenericValidateController(GenericValidationController genericController) { + this.genericValidateController = genericController; + } + + public Date getLastStableGeneralBox() { + return lastStableGeneralBox; + } + + public void setLastStableGeneralBox(Date lastStableGeneralBox) { + this.lastStableGeneralBox = lastStableGeneralBox; + } + + public Date getLastSmallBox() { + return lastSmallBox; + } + + public void setLastSmallBox(Date lastSmallBox) { + this.lastSmallBox = lastSmallBox; + } + + + + public void imprimir() { + Document document = new Document(PageSize.LETTER); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + try { + PdfWriter.getInstance(document, baos); + List results = new ArrayList<>(); + + Calendar calendar = Calendar.getInstance(); + calendar.setTime(selectedStableSmallBox.getCreatedOn()); + calendar.add(Calendar.HOUR_OF_DAY, -6); + Date fecha = calendar.getTime(); + + results = stableSmallBoxCtrl.getDataReport(fecha); + List gastos = stableSmallBoxCtrl.fillOtherExpenseDatatable(getLoggedUser().getOffice().getId(), selectedStableSmallBox.getCreatedOn(), selectedStableSmallBox.getCreatedOn()); + document.open(); + + DateFormat formatter = new SimpleDateFormat("dd/MM/yy"); + + Paragraph printDate = new Paragraph("Fecha de impresión: " + formatter.format(fecha), FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.DARK_GRAY)); + printDate.setAlignment(Element.ALIGN_RIGHT); + document.add(printDate); + + ServletContext servletContext = (ServletContext)FacesContext.getCurrentInstance().getExternalContext().getContext(); + String carpetaImagen=(String)servletContext.getRealPath("resources/serenity-layout/images"); + + Image imagen = Image.getInstance(carpetaImagen+"/ace_logo.jpg"); + imagen.scalePercent(4f); + imagen.setAlignment(Element.ALIGN_CENTER); + document.add(imagen); + + Paragraph title = new Paragraph("CORTE DE CAJA CHICA", FontFactory.getFont("arial", 18, Font.BOLD, BaseColor.DARK_GRAY)); + title.setAlignment(Element.ALIGN_CENTER); + document.add(title); + + document.add(Chunk.NEWLINE); + + Object[] res = (Object[]) results.get(0); + BigDecimal sobresC = BigDecimal.ZERO; + BigDecimal efectivoC = BigDecimal.ZERO; + BigDecimal monedasC = BigDecimal.ZERO; + BigDecimal totalC = BigDecimal.ZERO; + BigDecimal dif = BigDecimal.ZERO; + + PdfPTable tableGen = new PdfPTable(5); + tableGen.setWidthPercentage(100); + tableGen.setTotalWidth(new float[]{100f, 100f, 110f, 110f, 120f}); + tableGen.setLockedWidth(true); + + PdfPCell cellGen = new PdfPCell(new Paragraph("Detalle de cortes del día", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + cellGen.setHorizontalAlignment(Element.ALIGN_CENTER); + cellGen.setBackgroundColor(new BaseColor(41, 171, 225)); + cellGen.setColspan(5); + tableGen.addCell(cellGen); + + cellGen = new PdfPCell(new Paragraph("Asesor", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_CENTER); + //cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Ruta", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_CENTER); + //cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto esperado", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_CENTER); + //cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Monto reportado", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_CENTER); + //cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + cellGen = new PdfPCell(new Paragraph("Comentarios", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_CENTER); + //cellGen.setBorder(0); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + + for (Object result : results) { + Object[] tmp = (Object[]) result; + // Detalle + cellGen = new PdfPCell(new Paragraph(tmp[0] == null ? "" : tmp[0].toString(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + //Préstamo anterior + cellGen = new PdfPCell(new Paragraph(tmp[1] != null ? tmp[1].toString() : "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + // Comisión por apertura + cellGen = new PdfPCell(new Paragraph(tmp[2] != null ? "$" + tmp[2].toString() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_CENTER); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + // Monto + cellGen = new PdfPCell(new Paragraph(tmp[3] != null ? "$" + tmp[3].toString() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_CENTER); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + // Saldo insoluto + cellGen = new PdfPCell(new Paragraph(tmp[4] != null ? "$" + tmp[4].toString() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellGen.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGen.setColspan(1); + tableGen.addCell(cellGen); + } + document.add(tableGen); + document.add(new Paragraph(" ", FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.DARK_GRAY))); + + PdfPTable tableGastos = new PdfPTable(4); + tableGastos.setWidthPercentage(100); + tableGastos.setTotalWidth(new float[]{130f, 130f, 140f, 140f}); + tableGastos.setLockedWidth(true); + + PdfPCell cellGastos = new PdfPCell(new Paragraph("Detalle de gastos", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + cellGastos.setHorizontalAlignment(Element.ALIGN_CENTER); + cellGastos.setBackgroundColor(new BaseColor(41, 171, 225)); + cellGastos.setColspan(5); + tableGastos.addCell(cellGastos); + cellGastos = new PdfPCell(new Paragraph("Asesor", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGastos.setHorizontalAlignment(Element.ALIGN_CENTER); + //cellGen.setBorder(0); + cellGastos.setColspan(1); + tableGastos.addCell(cellGastos); + cellGastos = new PdfPCell(new Paragraph("Ruta", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGastos.setHorizontalAlignment(Element.ALIGN_CENTER); + //cellGen.setBorder(0); + cellGastos.setColspan(1); + tableGastos.addCell(cellGastos); + cellGastos = new PdfPCell(new Paragraph("Monto", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGastos.setHorizontalAlignment(Element.ALIGN_CENTER); + //cellGen.setBorder(0); + cellGastos.setColspan(1); + tableGastos.addCell(cellGastos); + cellGastos = new PdfPCell(new Paragraph("Comentarios", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellGastos.setHorizontalAlignment(Element.ALIGN_CENTER); + //cellGen.setBorder(0); + cellGastos.setColspan(1); + tableGastos.addCell(cellGastos); + + for (OtherExpense datoGasto : gastos) { + // usuario + cellGastos = new PdfPCell(new Paragraph(datoGasto == null ? "" : datoGasto.getUser().getHumanResource().getFirstName() + " " + datoGasto.getUser().getHumanResource().getLastName(), + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellGastos.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGastos.setColspan(1); + tableGastos.addCell(cellGastos); + //rutas + cellGastos = new PdfPCell(new Paragraph(datoGasto != null ? datoGasto.getUserRoutes() : "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellGastos.setHorizontalAlignment(Element.ALIGN_LEFT); + cellGastos.setColspan(1); + tableGastos.addCell(cellGastos); + // monto + cellGastos = new PdfPCell(new Paragraph(datoGasto != null ? "$" + datoGasto.getExpense() : "$0.00", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellGastos.setHorizontalAlignment(Element.ALIGN_CENTER); + cellGastos.setColspan(1); + tableGastos.addCell(cellGastos); + // comentarios + cellGastos = new PdfPCell(new Paragraph(datoGasto != null ? datoGasto.getDescription() : "", + FontFactory.getFont("arial", 6, Font.PLAIN, BaseColor.BLACK))); + cellGastos.setHorizontalAlignment(Element.ALIGN_CENTER); + cellGastos.setColspan(1); + tableGastos.addCell(cellGastos); + } + + document.add(tableGastos); + document.add(new Paragraph(" ", FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.DARK_GRAY))); + + PdfPTable tableRes = new PdfPTable(2); + tableRes.setTotalWidth(new float[]{100f, 440f}); + + tableRes.setLockedWidth(true); + PdfPCell cellRes = new PdfPCell(new Paragraph("Detalle del cuadre de caja chica", + FontFactory.getFont("arial", 10, Font.BOLD, BaseColor.WHITE))); + cellRes.setHorizontalAlignment(Element.ALIGN_CENTER); + cellRes.setBackgroundColor(new BaseColor(41, 171, 225)); + cellRes.setColspan(2); + tableRes.addCell(cellRes); + + cellRes = new PdfPCell(new Paragraph("Total caja: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellRes.setHorizontalAlignment(Element.ALIGN_LEFT); + cellRes.setBorder(0); + cellRes.setColspan(1); + tableRes.addCell(cellRes); + cellRes = new PdfPCell(new Paragraph(res[5] != null ? "$" + res[5].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellRes.setHorizontalAlignment(Element.ALIGN_LEFT); + cellRes.setBorder(0); + cellRes.setColspan(1); + tableRes.addCell(cellRes); + totalC = new BigDecimal(res[5] == null ? "0.0" : res[5].toString()); + + cellRes = new PdfPCell(new Paragraph("Total sobres: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellRes.setHorizontalAlignment(Element.ALIGN_LEFT); + cellRes.setBorder(0); + cellRes.setColspan(1); + tableRes.addCell(cellRes); + cellRes = new PdfPCell(new Paragraph(res[6] != null ? "$" + res[6].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellRes.setHorizontalAlignment(Element.ALIGN_LEFT); + cellRes.setBorder(0); + cellRes.setColspan(1); + tableRes.addCell(cellRes); + sobresC = new BigDecimal(res[6] == null ? "0.0" : res[6].toString()); + + cellRes = new PdfPCell(new Paragraph("Total efectivo: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellRes.setHorizontalAlignment(Element.ALIGN_LEFT); + cellRes.setBorder(0); + cellRes.setColspan(1); + tableRes.addCell(cellRes); + cellRes = new PdfPCell(new Paragraph(res[7] != null ? "$" + res[7].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellRes.setHorizontalAlignment(Element.ALIGN_LEFT); + cellRes.setBorder(0); + cellRes.setColspan(1); + tableRes.addCell(cellRes); + efectivoC = new BigDecimal(res[7] == null ? "0.0" : res[7].toString()); + + cellRes = new PdfPCell(new Paragraph("Total monedas: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellRes.setHorizontalAlignment(Element.ALIGN_LEFT); + cellRes.setBorder(0); + cellRes.setColspan(1); + tableRes.addCell(cellRes); + cellRes = new PdfPCell(new Paragraph(res[8] != null ? "$" + res[8].toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellRes.setHorizontalAlignment(Element.ALIGN_LEFT); + cellRes.setBorder(0); + cellRes.setColspan(1); + tableRes.addCell(cellRes); + monedasC = new BigDecimal(res[8] == null ? "0.0" : res[8].toString()); + + cellRes = new PdfPCell(new Paragraph("Diferencia: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellRes.setHorizontalAlignment(Element.ALIGN_LEFT); + cellRes.setBorder(0); + cellRes.setColspan(1); + tableRes.addCell(cellRes); + dif = sobresC.add(efectivoC).add(monedasC).subtract(totalC); + cellRes = new PdfPCell(new Paragraph(dif != null ? "$" + dif.toString() : "$0.00", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellRes.setHorizontalAlignment(Element.ALIGN_LEFT); + cellRes.setBorder(0); + cellRes.setColspan(1); + tableRes.addCell(cellRes); + + cellRes = new PdfPCell(new Paragraph("Comentarios: ", + FontFactory.getFont("arial", 8, Font.BOLD, BaseColor.BLACK))); + cellRes.setHorizontalAlignment(Element.ALIGN_LEFT); + cellRes.setBorder(0); + cellRes.setColspan(1); + tableRes.addCell(cellRes); + cellRes = new PdfPCell(new Paragraph(res[10] != null ? res[10].toString() : "", + FontFactory.getFont("arial", 8, Font.PLAIN, BaseColor.BLACK))); + cellRes.setHorizontalAlignment(Element.ALIGN_LEFT); + cellRes.setBorder(0); + cellRes.setColspan(1); + tableRes.addCell(cellRes); + + document.add(tableRes); + + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + document.add(Chunk.NEWLINE); + + document.add(new Paragraph(" __________________________ __________________________")); + document.add(new Paragraph(" Firma Nombre y firma cajero responsable")); +// document.add(new Paragraph(" " + res[8] == null ? "" : res[8].toString())); + + } catch (Exception e) { + System.out.print("Error 1: " + e.getMessage()); + } + + document.close(); + FacesContext context = FacesContext.getCurrentInstance(); + Object response = context.getExternalContext().getResponse(); + if (response instanceof HttpServletResponse) { + HttpServletResponse hrs = (HttpServletResponse) response; + hrs.setContentType("application/pdf"); + hrs.setHeader("Content-disposition", "attachment"); + hrs.setContentLength(baos.size()); + try { + ServletOutputStream out = hrs.getOutputStream(); + baos.writeTo(out); + out.flush(); + + } catch (IOException e) { + System.out.print("Error 2: " + e.getMessage()); + } + context.responseComplete(); + } + } + + private StableSmallBoxController stableSmallBoxCtrl; + private GenericController genericCtrl; + private BitacoraController bitacoraCtrl; + private GenericValidationController genericValidateController; + private Date lastStableGeneralBox; + private String comments; + + private List stableSmallBox; + + private StableSmallBox selectedStableSmallBox; + + private BigDecimal totalBox; + + private String description; + private BigDecimal sobres; + private BigDecimal efectivo; + private BigDecimal monedas; + private Date createdOn; + private BigDecimal total; + + private Date lastSmallBox; + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initOneWeekBeforeToCurrdate(); + + stableSmallBoxCtrl = new StableSmallBoxController(); + genericCtrl = new GenericController(); + bitacoraCtrl = new BitacoraController(); + setGenericValidateController(new GenericValidationController()); + setLastStableGeneralBox(getGenericValidateController().lastStableGeneralBoxByDate(getLoggedUser().getUser())); + stableSmallBox = fillDatatableStableSmallBox(); + + setLastSmallBox(getStableSmallBoxCtrl().getLastSmallBox(getLoggedUser().getOffice().getId())); + totalBox = genericCtrl.findAllSmallBoxByLastSmallBox(getLoggedUser().getOffice().getId(), getLastSmallBox()); + if(totalBox == null){ + totalBox = BigDecimal.ZERO; + } + efectivo = BigDecimal.ZERO; + monedas = BigDecimal.ZERO; + sobres = BigDecimal.ZERO; + total = totalBox; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsAdvancesBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsAdvancesBean.java new file mode 100644 index 0000000..2338ec9 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsAdvancesBean.java @@ -0,0 +1,180 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.StatsAdvancesController; +import com.arrebol.apc.controller.catalog.RouteController; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.views.StatsAdvancesView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author David Rodriguez + */ +@Named("statsAdvancesManager") +@ViewScoped +public class StatsAdvancesBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setAdvances(fillDatatableAdvances()); + setTotalValue(); + } + } catch (Exception e) { + } + } + + public BigDecimal searchTotalAdvancesAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalValue(); + } + } catch (Exception e) { + } + return getTotalAdvances(); + } + + public StatsAdvancesController getAdvancesCtrl() { + return advancesCtrl; + } + + public void setAdvancesCtrl(StatsAdvancesController advancesCtrl) { + this.advancesCtrl = advancesCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatableAdvances() { + return getAdvancesCtrl().fillAdvancesDataTable(getStarDate(), getEndDate(), getRouteSelectedId()); + } + + public BigDecimal fillTotalAdvances() { + return getAdvancesCtrl().fillTotalAdvances(getStarDate(), getEndDate()); + } + + public List getAdvances() { + return advances; + } + + public void setAdvances(List advances) { + this.advances = advances; + } + + public StatsAdvancesView getSelectedAdvances() { + return selectedAdvances; + } + + public void setSelectedAdvances(StatsAdvancesView selectedAdvances) { + this.selectedAdvances = selectedAdvances; + } + + public BigDecimal getTotalAdvances() { + return totalAdvances; + } + + public void setTotalAdvances(BigDecimal totalAdvances) { + this.totalAdvances = totalAdvances; + } + + public List getRoutes() { + return routes; + } + + public RouteController getRouteCtrl() { + return routeCtrl; + } + + public void setRouteCtrl(RouteController routeCtrl) { + this.routeCtrl = routeCtrl; + } + + public String getRouteSelectedId() { + return routeSelectedId; + } + + public void setRouteSelectedId(String routeSelectedId) { + this.routeSelectedId = routeSelectedId; + } + + private StatsAdvancesController advancesCtrl; + private GenericController genericCtrl; + private RouteController routeCtrl; + private List advances; + private StatsAdvancesView selectedAdvances; + private BigDecimal totalAdvances; + private List routes; + private String routeSelectedId; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + + advancesCtrl = new StatsAdvancesController(); + genericCtrl = new GenericController(); + routeCtrl = new RouteController(); + advances = fillDatatableAdvances(); + setTotalValue(); + routes = routeCtrl.fillRoutesDatatable(getLoggedUser().getOffice().getId()); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + private void setTotalValue() { + if (advances != null && !advances.isEmpty()) { + setTotalAdvances(advances.stream().map(StatsAdvancesView::getTotalAdvances).reduce(BigDecimal::add).get()); + } else { + setTotalAdvances(BigDecimal.ZERO); + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsClosingDayBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsClosingDayBean.java new file mode 100644 index 0000000..5006f76 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsClosingDayBean.java @@ -0,0 +1,169 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.StatsClosingDayController; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.views.StatsClosingDayView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author David Rodriguez + */ +@Named("statsClosingDayManager") +@ViewScoped +public class StatsClosingDayBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setClosingDay(fillDatatableClosingDay()); + setTotalValue(); + } + } catch (Exception e) { + } + } + + public BigDecimal searchTotalClosingDayAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalValue(); + } + } catch (Exception e) { + } + return getTotalClosingDay(); + } + + public StatsClosingDayController getClosingDayCtrl() { + return closingDayCtrl; + } + + public void setClosingDayCtrl(StatsClosingDayController closingDayCtrl) { + this.closingDayCtrl = closingDayCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatableClosingDay() { + return getClosingDayCtrl().fillClosingDayDataTable(getStarDate(), getEndDate(), getUserSelectedId()); + } + + public BigDecimal fillTotalClosingDay() { + return getClosingDayCtrl().fillTotalClosingDay(getStarDate(), getEndDate()); + } + + public List getClosingDay() { + return closingDay; + } + + public void setClosingDay(List closingDay) { + this.closingDay = closingDay; + } + + public StatsClosingDayView getSelectedClosingDay() { + return selectedClosingDay; + } + + public void setSelectedClosingDay(StatsClosingDayView selectedClosingDay) { + this.selectedClosingDay = selectedClosingDay; + } + + public BigDecimal getTotalClosingDay() { + return totalClosingDay; + } + + public void setTotalClosingDay(BigDecimal totalClosingDay) { + this.totalClosingDay = totalClosingDay; + } + + public List getUsers() { + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + public String getUserSelectedId() { + return userSelectedId; + } + + public void setUserSelectedId(String userSelectedId) { + this.userSelectedId = userSelectedId; + } + + private StatsClosingDayController closingDayCtrl; + private GenericController genericCtrl; + private List closingDay; + private StatsClosingDayView selectedClosingDay; + private BigDecimal totalClosingDay; + private List users; + private String userSelectedId; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + + closingDayCtrl = new StatsClosingDayController(); + genericCtrl = new GenericController(); + closingDay = fillDatatableClosingDay(); + setTotalValue(); + users = getUsers(); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + private void setTotalValue() { + if (closingDay != null && !closingDay.isEmpty()) { + setTotalClosingDay(closingDay.stream().map(StatsClosingDayView::getTotalClosingDay).reduce(BigDecimal::add).get()); + } else { + setTotalClosingDay(BigDecimal.ZERO); + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsDepositsBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsDepositsBean.java new file mode 100644 index 0000000..393ea37 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsDepositsBean.java @@ -0,0 +1,169 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.StatsDepositsController; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.views.StatsDepositsView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author David Rodriguez + */ +@Named("statsDepositsManager") +@ViewScoped +public class StatsDepositsBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setDeposits(fillDatatableDeposits()); + setTotalValue(); + } + } catch (Exception e) { + } + } + + public BigDecimal searchTotalDepositsAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalValue(); + } + } catch (Exception e) { + } + return getTotalDeposits(); + } + + public StatsDepositsController getDepositsCtrl() { + return depositsCtrl; + } + + public void setDepositsCtrl(StatsDepositsController depositsCtrl) { + this.depositsCtrl = depositsCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatableDeposits() { + return getDepositsCtrl().fillDepositsDataTable(getStarDate(), getEndDate(), getUserSelectedId()); + } + + public BigDecimal fillTotalDeposits() { + return getDepositsCtrl().fillTotalDeposits(getStarDate(), getEndDate()); + } + + public List getDeposits() { + return deposits; + } + + public void setDeposits(List deposits) { + this.deposits = deposits; + } + + public StatsDepositsView getSelectedDeposits() { + return selectedDeposits; + } + + public void setSelectedDeposits(StatsDepositsView selectedDeposits) { + this.selectedDeposits = selectedDeposits; + } + + public BigDecimal getTotalDeposits() { + return totalDeposits; + } + + public void setTotalDeposits(BigDecimal totalDeposits) { + this.totalDeposits = totalDeposits; + } + + public List getUsers() { + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + public String getUserSelectedId() { + return userSelectedId; + } + + public void setUserSelectedId(String userSelectedId) { + this.userSelectedId = userSelectedId; + } + + private StatsDepositsController depositsCtrl; + private GenericController genericCtrl; + private List deposits; + private StatsDepositsView selectedDeposits; + private BigDecimal totalDeposits; + private List users; + private String userSelectedId; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + + depositsCtrl = new StatsDepositsController(); + genericCtrl = new GenericController(); + deposits = fillDatatableDeposits(); + setTotalValue(); + users = getUsers(); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + private void setTotalValue() { + if (deposits != null && !deposits.isEmpty()) { + setTotalDeposits(deposits.stream().map(StatsDepositsView::getTotalDeposits).reduce(BigDecimal::add).get()); + } else { + setTotalDeposits(BigDecimal.ZERO); + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsEmployeeSavingBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsEmployeeSavingBean.java new file mode 100644 index 0000000..7826915 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsEmployeeSavingBean.java @@ -0,0 +1,264 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.StatsEmployeeSavingController; +import com.arrebol.apc.controller.util.DateWrapper; +import com.arrebol.apc.model.admin.EmployeeSaving; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.EmployeeSavingType; +import com.arrebol.apc.model.views.StatsEmployeeSavingView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author David Rodriguez + */ +@Named("statsEmployeeSavingManager") +@ViewScoped +public class StatsEmployeeSavingBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setEmployeeSaving(fillDatatableEmployeeSaving()); + setTotalEmployeeSaving(fillTotalEmployeeSaving()); + } + } catch (Exception e) { + } + } + + public BigDecimal searchTotalEmployeeSavingAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalEmployeeSaving(fillTotalEmployeeSaving()); + } + } catch (Exception e) { + } + return getTotalEmployeeSaving(); + } + + public List getDetails(String idUser) { + try { + setEmployeeSavingDetails(getEmployeeSavingCtrl().getEmployeeSavingById(getStarDate(), getEndDate(), idUser)); + } catch (Exception e) { + } + return null == employeeSavingsDetails ? new ArrayList<>() : employeeSavingsDetails; + } + + public StatsEmployeeSavingController getEmployeeSavingCtrl() { + return employeeSavingCtrl; + } + + public void setEmployeeSavingCtrl(StatsEmployeeSavingController employeeSavingCtrl) { + this.employeeSavingCtrl = employeeSavingCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatableEmployeeSaving() { + return getEmployeeSavingCtrl().fillEmployeeSavingDataTable(getStarDate(), getEndDate()); + } + + public BigDecimal fillTotalEmployeeSaving() { + return getEmployeeSavingCtrl().fillTotalEmployeeSaving(getStarDate(), getEndDate()); + } + + public List getEmployeeSaving() { + return employeeSavings; + } + + public void setEmployeeSaving(List employeeSaving) { + this.employeeSavings = employeeSaving; + } + + public List getEmployeeSavingDetails() { + return employeeSavingsDetails; + } + + public void setEmployeeSavingDetails(List employeeSavingsDetails) { + this.employeeSavingsDetails = employeeSavingsDetails; + } + + public StatsEmployeeSavingView getSelectedEmployeeSaving() { + return selectedEmployeeSaving; + } + + public void setSelectedEmployeeSaving(StatsEmployeeSavingView selectedEmployeeSaving) { + this.selectedEmployeeSaving = selectedEmployeeSaving; + } + + public BigDecimal getTotalEmployeeSaving() { + return totalEmployeeSaving; + } + + public void setTotalEmployeeSaving(BigDecimal totalEmployeeSaving) { + this.totalEmployeeSaving = totalEmployeeSaving; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public BigDecimal getDisposal() { + return disposal; + } + + public void setDisposal(BigDecimal disposal) { + this.disposal = disposal; + } + + public List getUsers() { + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + public String getUserSelectedId() { + return userSelectedId; + } + + public void setUserSelectedId(String userSelectedId) { + this.userSelectedId = userSelectedId; + } + + private StatsEmployeeSavingController employeeSavingCtrl; + private GenericController genericCtrl; + private List employeeSavings; + private List employeeSavingsDetails; + private StatsEmployeeSavingView selectedEmployeeSaving; + private BigDecimal totalEmployeeSaving; + private String userId; + private BigDecimal disposal; + private List users; + private String userSelectedId; + + public void createEmployeeSaving() { + User userPayRoll = employeeSavingCtrl.getUserById(userSelectedId); + + getDetails(userPayRoll.getHumanResource().getId()); + + if(disposal.compareTo(BigDecimal.ZERO)==0){ + + showMessage(FacesMessage.SEVERITY_WARN, "Disposición Incorrecta", "No se puede disponer de 0"); + return; + + } + + if(disposal.compareTo(BigDecimal.ZERO)<0){ + + showMessage(FacesMessage.SEVERITY_WARN, "Disposición Incorrecta", "No se puede disponer de un numero negativo"); + return; + + } + + if (genericCtrl.existStableGeneralBoxByCreatedOn(new Date())) { + showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden hacer mas disposiciones de ahorro porque ya se existe un cuadre de caja general de hoy."); + return; + } + + BigDecimal totalEmployeeSavingDetail = BigDecimal.ZERO; + for (StatsEmployeeSavingView employeeSaving : employeeSavingsDetails) { + if (employeeSaving.getType().equals(EmployeeSavingType.SAVING)) { + totalEmployeeSavingDetail = totalEmployeeSavingDetail.add(employeeSaving.getEmployeeSaving()); + }else{ + totalEmployeeSavingDetail = totalEmployeeSavingDetail.subtract(employeeSaving.getEmployeeSaving()); + } + } + + if(disposal.compareTo(totalEmployeeSavingDetail)<=0){ + EmployeeSaving employeeSaving = new EmployeeSaving(); + employeeSaving.setIdUser(userPayRoll.getHumanResource().getId()); + employeeSaving.setEmployeeSaving(disposal); + employeeSaving.setCreatedOn(new Date()); + employeeSaving.setCreatedBy(getLoggedUser().getId()); + employeeSaving.setType(EmployeeSavingType.DISPOSAL); + + employeeSavingCtrl.saveEmployeeSaving(employeeSaving); + showMessage(FacesMessage.SEVERITY_INFO, "Disposición de ahorro", "Se guardó correctamente"); + setEmployeeSaving(fillDatatableEmployeeSaving()); + setTotalEmployeeSaving(fillTotalEmployeeSaving()); + } + + else{ + showMessage(FacesMessage.SEVERITY_INFO, "Disposición de ahorro fallida", "No se puede disponer más efectivo del ahorro de esta persona"); + } + + } + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + + Calendar cal = Calendar.getInstance(); + + cal.set(Calendar.DAY_OF_YEAR, 1); + Date start = cal.getTime(); + + setStarDate(start); + setEndDate(DateWrapper.getTodayMXTime()); + + employeeSavingCtrl = new StatsEmployeeSavingController(); + genericCtrl = new GenericController(); + employeeSavings = fillDatatableEmployeeSaving(); + totalEmployeeSaving = fillTotalEmployeeSaving(); + users = getUsers(); + + disposal = BigDecimal.ZERO; + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsGasolineBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsGasolineBean.java new file mode 100644 index 0000000..e2ec866 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsGasolineBean.java @@ -0,0 +1,144 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.StatsGasolineController; +import com.arrebol.apc.model.views.StatsGasolineView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.Calendar; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author David Rodriguez + */ +@Named("statsGasolineManager") +@ViewScoped +public class StatsGasolineBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setGasoline(fillDatatableGasoline()); + setTotalGasoline(fillTotalGasoline()); + } + } catch (Exception e) { + } + } + + public Double searchTotalGasolineAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalGasoline(fillTotalGasoline()); + } + } catch (Exception e) { + } + return getTotalGasoline(); + } + + public StatsGasolineController getGasolineCtrl() { + return gasolineCtrl; + } + + public void setGasolineCtrl(StatsGasolineController gasolineCtrl) { + this.gasolineCtrl = gasolineCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatableGasoline() { + return getGasolineCtrl().fillGasolineDataTable(getStarDate(), getEndDate()); + } + + public Double fillTotalGasoline() { + return getGasolineCtrl().fillTotalGasoline(getStarDate(), getEndDate()); + } + + public List getGasoline() { + return gasoline; + } + + public void setGasoline(List gasoline) { + this.gasoline = gasoline; + } + + public StatsGasolineView getSelectedGasoline() { + return selectedGasoline; + } + + public void setSelectedGasoline(StatsGasolineView selectedGasoline) { + this.selectedGasoline = selectedGasoline; + } + + public Double getTotalGasoline() { + return totalGasoline; + } + + public void setTotalGasoline(Double totalGasoline) { + this.totalGasoline = totalGasoline; + } + + private StatsGasolineController gasolineCtrl; + private GenericController genericCtrl; + private List gasoline; + private StatsGasolineView selectedGasoline; + private Double totalGasoline; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + + gasolineCtrl = new StatsGasolineController(); + genericCtrl = new GenericController(); + gasoline = fillDatatableGasoline(); + totalGasoline = fillTotalGasoline(); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsOpeningFeesBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsOpeningFeesBean.java new file mode 100644 index 0000000..9c095ea --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsOpeningFeesBean.java @@ -0,0 +1,168 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.StatsOpeningFeesController; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.views.StatsOpeningFeesView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author David Rodriguez + */ +@Named("statsOpeningFeesManager") +@ViewScoped +public class StatsOpeningFeesBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setOpeningFees(fillDatatableOpeningFees()); + setTotalValue(); + } + } catch (Exception e) { + } + } + + public BigDecimal searchTotalOpeningFeesAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalValue(); + } + } catch (Exception e) { + } + return getTotalOpeningFees(); + } + + public StatsOpeningFeesController getOpeningFeesCtrl() { + return openingFeesCtrl; + } + + public void setOpeningFeesCtrl(StatsOpeningFeesController openingFeesCtrl) { + this.openingFeesCtrl = openingFeesCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatableOpeningFees() { + return getOpeningFeesCtrl().fillOpeningFeesDataTable(getStarDate(), getEndDate(), getUserSelectedId()); + } + + public BigDecimal fillTotalOpeningFees() { + return getOpeningFeesCtrl().fillTotalOpeningFees(getStarDate(), getEndDate()); + } + + public List getopeningFees() { + return openingFees; + } + + public void setOpeningFees(List openingFees) { + this.openingFees = openingFees; + } + + public StatsOpeningFeesView getSelectedOpeningFees() { + return selectedOpeningFees; + } + + public void setSelectedOpeningFees(StatsOpeningFeesView selectedOpeningFees) { + this.selectedOpeningFees = selectedOpeningFees; + } + + public BigDecimal getTotalOpeningFees() { + return totalOpeningFees; + } + + public void setTotalOpeningFees(BigDecimal totalOpeningFees) { + this.totalOpeningFees = totalOpeningFees; + } + + public List getUsers() { + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + public String getUserSelectedId() { + return userSelectedId; + } + + public void setUserSelectedId(String userSelectedId) { + this.userSelectedId = userSelectedId; + } + + private StatsOpeningFeesController openingFeesCtrl; + private GenericController genericCtrl; + private List openingFees; + private StatsOpeningFeesView selectedOpeningFees; + private BigDecimal totalOpeningFees; + private List users; + private String userSelectedId; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + + openingFeesCtrl = new StatsOpeningFeesController(); + genericCtrl = new GenericController(); + openingFees = fillDatatableOpeningFees(); + setTotalValue(); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + private void setTotalValue() { + if (openingFees != null && !openingFees.isEmpty()) { + setTotalOpeningFees(openingFees.stream().map(StatsOpeningFeesView::getTotalOpeningFees).reduce(BigDecimal::add).get()); + } else { + setTotalOpeningFees(BigDecimal.ZERO); + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPaymentBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPaymentBean.java new file mode 100644 index 0000000..79d9efc --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPaymentBean.java @@ -0,0 +1,169 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.StatsPaymentController; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.views.StatsPaymentView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author David Rodriguez + */ +@Named("statsPaymentManager") +@ViewScoped +public class StatsPaymentBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setPayment(fillDatatablePayment()); + setTotalValue(); + } + } catch (Exception e) { + } + } + + public BigDecimal searchTotalPaymentAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalValue(); + } + } catch (Exception e) { + } + return getTotalPayment(); + } + + public StatsPaymentController getPaymentCtrl() { + return paymentCtrl; + } + + public void setPaymentCtrl(StatsPaymentController paymentCtrl) { + this.paymentCtrl = paymentCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatablePayment() { + return getPaymentCtrl().fillPaymentDataTable(getStarDate(), getEndDate(), getUserSelectedId()); + } + + public BigDecimal fillTotalPayment() { + return getPaymentCtrl().fillTotalPayment(getStarDate(), getEndDate()); + } + + public List getPayment() { + return payment; + } + + public void setPayment(List payment) { + this.payment = payment; + } + + public StatsPaymentView getSelectedPayment() { + return selectedPayment; + } + + public void setSelectedPayment(StatsPaymentView selectedPayment) { + this.selectedPayment = selectedPayment; + } + + public BigDecimal getTotalPayment() { + return totalPayment; + } + + public void setTotalPayment(BigDecimal totalPayment) { + this.totalPayment = totalPayment; + } + + public List getUsers() { + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + public String getUserSelectedId() { + return userSelectedId; + } + + public void setUserSelectedId(String userSelectedId) { + this.userSelectedId = userSelectedId; + } + + private StatsPaymentController paymentCtrl; + private GenericController genericCtrl; + private List payment; + private StatsPaymentView selectedPayment; + private BigDecimal totalPayment; + private List users; + private String userSelectedId; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + + paymentCtrl = new StatsPaymentController(); + genericCtrl = new GenericController(); + payment = fillDatatablePayment(); + setTotalValue(); + users = getUsers(); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + private void setTotalValue() { + if (payment != null && !payment.isEmpty()) { + setTotalPayment(payment.stream().map(StatsPaymentView::getTotalPayment).reduce(BigDecimal::add).get()); + } else { + setTotalPayment(BigDecimal.ZERO); + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPaymentRenovationBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPaymentRenovationBean.java new file mode 100644 index 0000000..4dc97f1 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPaymentRenovationBean.java @@ -0,0 +1,168 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.StatsPaymentRenovationController; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.views.StatsPaymentRenovationView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author David Rodriguez + */ +@Named("statsPaymentRenovationManager") +@ViewScoped +public class StatsPaymentRenovationBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setPaymentRenovation(fillDatatablePayment()); + setTotalValue(); + } + } catch (Exception e) { + } + } + + public BigDecimal searchTotalPaymentAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalValue(); + } + } catch (Exception e) { + } + return getTotalPayment(); + } + + public StatsPaymentRenovationController getPaymentCtrl() { + return paymentCtrl; + } + + public void setPaymentCtrl(StatsPaymentRenovationController paymentCtrl) { + this.paymentCtrl = paymentCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatablePayment() { + return getPaymentCtrl().fillPaymentDataTable(getStarDate(), getEndDate(), getUserSelectedId()); + } + + public BigDecimal fillTotalPayment() { + return getPaymentCtrl().fillTotalPayment(getStarDate(), getEndDate()); + } + + public List getPaymentRenovation() { + return paymentRenovation; + } + + public void setPaymentRenovation(List payment) { + this.paymentRenovation = payment; + } + + public StatsPaymentRenovationView getSelectedPaymentRenovation() { + return selectedPaymentRenovation; + } + + public void setSelectedPaymentRenovation(StatsPaymentRenovationView selectedPayment) { + this.selectedPaymentRenovation = selectedPayment; + } + + public BigDecimal getTotalPayment() { + return totalPayment; + } + + public void setTotalPayment(BigDecimal totalPayment) { + this.totalPayment = totalPayment; + } + + public List getUsers() { + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + public String getUserSelectedId() { + return userSelectedId; + } + + public void setUserSelectedId(String userSelectedId) { + this.userSelectedId = userSelectedId; + } + + private StatsPaymentRenovationController paymentCtrl; + private GenericController genericCtrl; + private List paymentRenovation; + private StatsPaymentRenovationView selectedPaymentRenovation; + private BigDecimal totalPayment; + private List users; + private String userSelectedId; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + + paymentCtrl = new StatsPaymentRenovationController(); + genericCtrl = new GenericController(); + paymentRenovation = fillDatatablePayment(); + setTotalValue(); + users = getUsers(); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + private void setTotalValue() { + if (paymentRenovation != null && !paymentRenovation.isEmpty()) { + setTotalPayment(paymentRenovation.stream().map(StatsPaymentRenovationView::getTotalPayment).reduce(BigDecimal::add).get()); + } else { + setTotalPayment(BigDecimal.ZERO); + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPaymentRouteBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPaymentRouteBean.java new file mode 100644 index 0000000..2c5ff53 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPaymentRouteBean.java @@ -0,0 +1,180 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.StatsPaymentRouteController; +import com.arrebol.apc.controller.catalog.RouteController; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.views.StatsPaymentRouteView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author David Rodriguez + */ +@Named("statsPaymentRouteManager") +@ViewScoped +public class StatsPaymentRouteBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setPayment(fillDatatablePayment()); + setTotalValue(); + } + } catch (Exception e) { + } + } + + public BigDecimal searchTotalPaymentAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalValue(); + } + } catch (Exception e) { + } + return getTotalPayment(); + } + + public StatsPaymentRouteController getPaymentCtrl() { + return paymentCtrl; + } + + public void setPaymentCtrl(StatsPaymentRouteController paymentCtrl) { + this.paymentCtrl = paymentCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatablePayment() { + return getPaymentCtrl().fillPaymentDataTable(getStarDate(), getEndDate(), getRouteSelectedId()); + } + + public BigDecimal fillTotalPayment() { + return getPaymentCtrl().fillTotalPayment(getStarDate(), getEndDate()); + } + + public List getPayment() { + return payment; + } + + public void setPayment(List payment) { + this.payment = payment; + } + + public StatsPaymentRouteView getSelectedPayment() { + return selectedPayment; + } + + public void setSelectedPayment(StatsPaymentRouteView selectedPayment) { + this.selectedPayment = selectedPayment; + } + + public BigDecimal getTotalPayment() { + return totalPayment; + } + + public void setTotalPayment(BigDecimal totalPayment) { + this.totalPayment = totalPayment; + } + + public List getRoutes() { + return routes; + } + + public RouteController getRouteCtrl() { + return routeCtrl; + } + + public void setRouteCtrl(RouteController routeCtrl) { + this.routeCtrl = routeCtrl; + } + + public String getRouteSelectedId() { + return routeSelectedId; + } + + public void setRouteSelectedId(String routeSelectedId) { + this.routeSelectedId = routeSelectedId; + } + + private StatsPaymentRouteController paymentCtrl; + private GenericController genericCtrl; + private RouteController routeCtrl; + private List payment; + private StatsPaymentRouteView selectedPayment; + private BigDecimal totalPayment; + private List routes; + private String routeSelectedId; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + + paymentCtrl = new StatsPaymentRouteController(); + genericCtrl = new GenericController(); + routeCtrl = new RouteController(); + payment = fillDatatablePayment(); + setTotalValue(); + routes = routeCtrl.fillRoutesDatatable(getLoggedUser().getOffice().getId()); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + private void setTotalValue() { + if (payment != null && !payment.isEmpty()) { + setTotalPayment(payment.stream().map(StatsPaymentRouteView::getTotalPayment).reduce(BigDecimal::add).get()); + } else { + setTotalPayment(BigDecimal.ZERO); + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPayrollBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPayrollBean.java new file mode 100644 index 0000000..2e39402 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsPayrollBean.java @@ -0,0 +1,169 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.StatsPayrollController; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.views.StatsPayrollView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author David Rodriguez + */ +@Named("statsPayrollManager") +@ViewScoped +public class StatsPayrollBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setPayroll(fillDatatablePayroll()); + setTotalValue(); + } + } catch (Exception e) { + } + } + + public BigDecimal searchTotalPayrollAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalValue(); + } + } catch (Exception e) { + } + return getTotalPayroll(); + } + + public StatsPayrollController getPayrollCtrl() { + return payrollCtrl; + } + + public void setPayrollCtrl(StatsPayrollController payrollCtrl) { + this.payrollCtrl = payrollCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatablePayroll() { + return getPayrollCtrl().fillPayrollDataTable(getStarDate(), getEndDate(), getUserSelectedId()); + } + + public BigDecimal fillTotalPayroll() { + return getPayrollCtrl().fillTotalPayroll(getStarDate(), getEndDate()); + } + + public List getPayroll() { + return payroll; + } + + public void setPayroll(List payroll) { + this.payroll = payroll; + } + + public StatsPayrollView getSelectedPayroll() { + return selectedPayroll; + } + + public void setSelectedPayroll(StatsPayrollView selectedPayroll) { + this.selectedPayroll = selectedPayroll; + } + + public BigDecimal getTotalPayroll() { + return totalPayroll; + } + + public void setTotalPayroll(BigDecimal totalPayroll) { + this.totalPayroll = totalPayroll; + } + + public List getUsers() { + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + public String getUserSelectedId() { + return userSelectedId; + } + + public void setUserSelectedId(String userSelectedId) { + this.userSelectedId = userSelectedId; + } + + private StatsPayrollController payrollCtrl; + private GenericController genericCtrl; + private List payroll; + private StatsPayrollView selectedPayroll; + private BigDecimal totalPayroll; + private List users; + private String userSelectedId; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + + payrollCtrl = new StatsPayrollController(); + genericCtrl = new GenericController(); + payroll = fillDatatablePayroll(); + setTotalValue(); + users = getUsers(); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + private void setTotalValue() { + if (payroll != null && !payroll.isEmpty()) { + setTotalPayroll(payroll.stream().map(StatsPayrollView::getTotalPayroll).reduce(BigDecimal::add).get()); + } else { + setTotalPayroll(BigDecimal.ZERO); + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsSummaryBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsSummaryBean.java new file mode 100644 index 0000000..b3754ab --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsSummaryBean.java @@ -0,0 +1,145 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.StatsSummaryController; +import com.arrebol.apc.model.views.StatsSummaryView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author David Rodriguez + */ +@Named("statsSummaryManager") +@ViewScoped +public class StatsSummaryBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setSummary(fillDatatableSummary()); + setTotalSummary(fillTotalSummary()); + } + } catch (Exception e) { + } + } + + public BigDecimal searchTotalSummaryAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalSummary(fillTotalSummary()); + } + } catch (Exception e) { + } + return getTotalSummary(); + } + + public StatsSummaryController getSummaryCtrl() { + return summaryCtrl; + } + + public void setSummaryCtrl(StatsSummaryController summaryCtrl) { + this.summaryCtrl = summaryCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatableSummary() { + return getSummaryCtrl().fillSummaryDataTable(getStarDate(), getEndDate()); + } + + public BigDecimal fillTotalSummary() { + return getSummaryCtrl().fillTotalSummary(getStarDate(), getEndDate()); + } + + public List getSummary() { + return summary; + } + + public void setSummary(List summary) { + this.summary = summary; + } + + public StatsSummaryView getSelectedSummary() { + return selectedSummary; + } + + public void setSelectedSummary(StatsSummaryView selectedSummary) { + this.selectedSummary = selectedSummary; + } + + public BigDecimal getTotalSummary() { + return totalSummary; + } + + public void setTotalSummary(BigDecimal totalSummary) { + this.totalSummary = totalSummary; + } + + private StatsSummaryController summaryCtrl; + private GenericController genericCtrl; + private List summary; + private StatsSummaryView selectedSummary; + private BigDecimal totalSummary; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + + summaryCtrl = new StatsSummaryController(); + genericCtrl = new GenericController(); + summary = fillDatatableSummary(); + totalSummary = fillTotalSummary(); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsVehicleBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsVehicleBean.java new file mode 100644 index 0000000..e02eb6c --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsVehicleBean.java @@ -0,0 +1,117 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.StatsVehicleController; +import com.arrebol.apc.model.catalog.Vehicle; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.Calendar; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author David Rodriguez + */ +@Named("statsVehicleManager") +@ViewScoped +public class StatsVehicleBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setVehicle(fillDatatableVehicle()); + } + } catch (Exception e) { + } + } + + public StatsVehicleController getVehicleCtrl() { + return vehicleCtrl; + } + + public void setVehicleCtrl(StatsVehicleController gasolineCtrl) { + this.vehicleCtrl = gasolineCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatableVehicle() { + return getVehicleCtrl().fillVehicleDataTable(getStarDate(), getEndDate()); + } + + public List getVehicle() { + return vehicle; + } + + public void setVehicle(List vehicle) { + this.vehicle = vehicle; + } + + public Vehicle getSelectedVehicle() { + return selectedVehicle; + } + + public void setSelectedVehicle(Vehicle selectedVehicle) { + this.selectedVehicle = selectedVehicle; + } + + private StatsVehicleController vehicleCtrl; + private GenericController genericCtrl; + private List vehicle; + private Vehicle selectedVehicle; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + + vehicleCtrl = new StatsVehicleController(); + genericCtrl = new GenericController(); + vehicle = fillDatatableVehicle(); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsZeroPaymentsBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsZeroPaymentsBean.java new file mode 100644 index 0000000..4d32c28 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/StatsZeroPaymentsBean.java @@ -0,0 +1,168 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.StatsZeroPaymentsController; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.views.StatsZeroPaymentsView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.Calendar; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author David Rodriguez + */ +@Named("statsZeroPaymentsManager") +@ViewScoped +public class StatsZeroPaymentsBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setZeroPayments(fillDatatableZeroPayments()); + setTotalValue(); + } + } catch (Exception e) { + } + } + + public int searchTotalZeroPaymentsAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTotalValue(); + } + } catch (Exception e) { + } + return getTotalZeroPayments(); + } + + public StatsZeroPaymentsController getZeroPaymentsCtrl() { + return zeroPaymentsCtrl; + } + + public void setZeroPaymentsCtrl(StatsZeroPaymentsController zeroPaymentsCtrl) { + this.zeroPaymentsCtrl = zeroPaymentsCtrl; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List fillDatatableZeroPayments() { + return getZeroPaymentsCtrl().fillZeroPaymentsDataTable(getStarDate(), getEndDate(), getUserSelectedId()); + } + + public int fillTotalZeroPayments() { + return getZeroPaymentsCtrl().fillTotalZeroPayments(getStarDate(), getEndDate()); + } + + public List getZeroPayments() { + return zeroPayments; + } + + public void setZeroPayments(List zeroPayments) { + this.zeroPayments = zeroPayments; + } + + public StatsZeroPaymentsView getSelectedZeroPayments() { + return selectedZeroPayments; + } + + public void setSelectedZeroPayments(StatsZeroPaymentsView selectedZeroPayments) { + this.selectedZeroPayments = selectedZeroPayments; + } + + public int getTotalZeroPayments() { + return totalZeroPayments; + } + + public void setTotalZeroPayments(int totalZeroPayments) { + this.totalZeroPayments = totalZeroPayments; + } + + public List getUsers() { + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + public String getUserSelectedId() { + return userSelectedId; + } + + public void setUserSelectedId(String userSelectedId) { + this.userSelectedId = userSelectedId; + } + + private StatsZeroPaymentsController zeroPaymentsCtrl; + private GenericController genericCtrl; + private List zeroPayments; + private StatsZeroPaymentsView selectedZeroPayments; + private int totalZeroPayments; + private List users; + private String userSelectedId; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + + zeroPaymentsCtrl = new StatsZeroPaymentsController(); + genericCtrl = new GenericController(); + zeroPayments = fillDatatableZeroPayments(); + setTotalValue(); + users = getUsers(); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + private void setTotalValue() { + if (zeroPayments != null) { + setTotalZeroPayments(zeroPayments.size()); + } else { + setTotalZeroPayments(0); + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/TransferBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/TransferBean.java new file mode 100644 index 0000000..21e4bad --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/TransferBean.java @@ -0,0 +1,263 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.GenericValidationController; +import com.arrebol.apc.controller.admin.TransferController; +import com.arrebol.apc.model.admin.Transfer; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActionStatus; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("transferManager") +@ViewScoped +public class TransferBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setTransfer(getTransferCtrl().fillTransferDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate())); + } + } catch (Exception e) { + } + } + + public List fillDatatableTransfer() { + + return getTransferCtrl().fillTransferDatatable(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + } + + public List getUsers() { + + return genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + Date date = new Date(); + if (genericCtrl.existStableSmallBoxByCreatedOn(date)) { + showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden agregar más transferencias porque ya se existe un cuadre de caja chica de hoy."); + return; + } + + Transfer saveTransfer = new Transfer(); + saveTransfer.setActionStatus(ActionStatus.PENDING); + saveTransfer.setActiveStatus(ActiveStatus.ENEBLED); + saveTransfer.setOffice(new Office(getLoggedUser().getOffice().getId())); + saveTransfer.setUserReceiver(new User(userReceiveId)); + saveTransfer.setUserTransmitter(new User(userSendId)); + saveTransfer.setAmountToTransfer(new BigDecimal(amountToTransfer)); + saveTransfer.setCreatedBy(getLoggedUser().getId()); + saveTransfer.setCreatedOn(new Date()); + transferCtrl.saveTransfer(saveTransfer); + transfer.clear(); + transfer = fillDatatableTransfer(); + amountToTransfer = ""; + userReceiveId = ""; + userSendId = ""; + FacesMessage msg = new FacesMessage("Nueva transferencia", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + + @Override + public void deleteRow() { + transferCtrl.updateTransferByStatus(ActiveStatus.DISABLED, selectedTransfer.getId(), getLoggedUser().getUser().getId()); + searchHistoricalAction(); + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Eliminar transferencia"); + bitacora.setCommentsUser(getCommentsBitacora()); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacora.setDescription("Se eliminó correctamente la transferencia con fecha: " + selectedTransfer.getCreatedOn() + ", con monto $" + + selectedTransfer.getAmountToTransfer()); + bitacoraCtrl.saveBitacora(bitacora); + selectedTransfer = null; + commentsBitacora = ""; + showMessage(FacesMessage.SEVERITY_INFO, "Transferencia Eliminada", "Se eliminó correctamente."); + } + + public TransferController getTransferCtrl() { + return transferCtrl; + } + + public void setTransferCtrl(TransferController transferCtrl) { + this.transferCtrl = transferCtrl; + } + + public List getTransfer() { + return transfer; + } + + public void setTransfer(List transfer) { + this.transfer = transfer; + } + + public Transfer getSelectedTransfer() { + return selectedTransfer; + } + + public void setSelectedTransfer(Transfer selectedTransfer) { + this.selectedTransfer = selectedTransfer; + } + + public List getUserSend() { + return userSend; + } + + public void setUserSend(List userSend) { + this.userSend = userSend; + } + + public List getUserReceive() { + return userReceive; + } + + public void setUserReceive(List userReceive) { + this.userReceive = userReceive; + } + + public String getUserSendId() { + return userSendId; + } + + public void setUserSendId(String userSendId) { + this.userSendId = userSendId; + } + + public String getUserReceiveId() { + return userReceiveId; + } + + public void setUserReceiveId(String userReceiveId) { + this.userReceiveId = userReceiveId; + } + + public String getAmountToTransfer() { + return amountToTransfer; + } + + public void setAmountToTransfer(String amountToTransfer) { + this.amountToTransfer = amountToTransfer; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public GenericValidationController getGenericValidateController() { + return genericValidateController; + } + + public void setGenericValidateController(GenericValidationController genericController) { + this.genericValidateController = genericController; + } + + public Date getLastStableSmallBox() { + return lastStableSmallBox; + } + + public void setLastStableSmallBox(Date lastStableSmallBox) { + this.lastStableSmallBox = lastStableSmallBox; + } + + public BitacoraController getBitacoraCtrl() { + return bitacoraCtrl; + } + + public void setBitacoraCtrl(BitacoraController bitacoraCtrl) { + this.bitacoraCtrl = bitacoraCtrl; + } + + public String getCommentsBitacora() { + return commentsBitacora; + } + + public void setCommentsBitacora(String commentsBitacora) { + this.commentsBitacora = commentsBitacora; + } + + private TransferController transferCtrl; + private GenericController genericCtrl; + private BitacoraController bitacoraCtrl; + private String commentsBitacora; + private GenericValidationController genericValidateController; + private Date lastStableSmallBox; + + private List transfer; + private List userSend; + private List userReceive; + + private String userSendId; + private String userReceiveId; + private String amountToTransfer; + + private Transfer selectedTransfer; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + + transferCtrl = new TransferController(); + genericCtrl = new GenericController(); + bitacoraCtrl = new BitacoraController(); + setGenericValidateController(new GenericValidationController()); + setLastStableSmallBox(getGenericValidateController().lastStableSmallBoxByDate(getLoggedUser().getUser())); + + initOneWeekBeforeToCurrdate(); + + transfer = fillDatatableTransfer(); + userSend = getUsers(); + userReceive = getUsers(); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/TransferUpgradeBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/TransferUpgradeBean.java new file mode 100644 index 0000000..579ee72 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/TransferUpgradeBean.java @@ -0,0 +1,268 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.model.admin.Transfer; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActionStatus; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.model.views.EnabledUserDetailsView; +import com.arrebol.apc.model.views.TransferView; +import com.arrebol.apc.service.BitacoraService; +import com.arrebol.apc.service.GenericValidationService; +import com.arrebol.apc.service.admin.TransferService; +import com.arrebol.apc.service.views.EnabledUserDetailsViewService; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Inject; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.primefaces.model.LazyDataModel; +import org.primefaces.model.SortOrder; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Named(value = "transferUpgradeBean") +@ViewScoped +public class TransferUpgradeBean extends GenericBean implements Serializable { + + /** + * + */ + public void addRow() { + Date date = new Date(); + if (genericValidationService.existStableSmallBoxByCreatedOn(date)) { + showMessage(FacesMessage.SEVERITY_WARN, "Día cerrado", "No se pueden agregar más transferencias porque ya se existe un cuadre de caja chica de hoy."); + return; + } + + try { + Transfer saveTransfer = new Transfer(); + saveTransfer.setActionStatus(ActionStatus.PENDING); + saveTransfer.setActiveStatus(ActiveStatus.ENEBLED); + saveTransfer.setOffice(new Office(getLoggedUser().getOffice().getId())); + saveTransfer.setUserReceiver(new User(userReceiveId)); + saveTransfer.setUserTransmitter(new User(userSendId)); + saveTransfer.setAmountToTransfer(new BigDecimal(amountToTransfer)); + saveTransfer.setCreatedBy(getLoggedUser().getId()); + saveTransfer.setCreatedOn(new Date()); + transferService.saveTransfer(saveTransfer); + + setAmountToTransfer(""); + setUserReceiveId(""); + setUserSendId(""); + + showMessage(FacesMessage.SEVERITY_INFO, "Transferencia", "No se agrego correctamente la transferencia"); + } catch (Exception e) { + logger.error("addRow", e); + showMessage(FacesMessage.SEVERITY_ERROR, "Transferencia", "No se agrego correctamente la transferencia"); + } + + } + + /** + * + */ + public void deleteRow() { + try { + transferService.updateTransferByStatus(ActiveStatus.DISABLED, getSelectedTransfer().getId(), getLoggedUser().getUser().getId()); + + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Eliminar transferencia"); + bitacora.setCommentsUser(getCommentsBitacora()); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacora.setDescription("Se eliminó correctamente la transferencia con fecha: " + getSelectedTransfer().getStrCreatedOn() + ", con monto $" + + selectedTransfer.getAmountToTransfer()); + bitacoraService.saveBitacora(bitacora); + setSelectedTransfer(null); + setCommentsBitacora(""); + showMessage(FacesMessage.SEVERITY_INFO, "Transferencia", "Se eliminó correctamente la transferencia"); + } catch (Exception e) { + logger.error("deleteRow", e); + showMessage(FacesMessage.SEVERITY_ERROR, "Transferencia", "No se eliminó correctamente la transferencia"); + } + + } + + /** + * + */ + private void loadingLazyDataTable() { + try { + setTransfers(new LazyDataModel() { + private List lazyEntityList; + + @Override + public List load(int first, int pageSize, String sortField, SortOrder sortOrder, Map filterBy) { + try { + Long total = transferService.countPaginator(filterBy, getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + + setRowCount(total.intValue()); + + lazyEntityList = transferService.lazyEntityListPaginator(first, pageSize, sortField, sortOrder, filterBy, getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + + return lazyEntityList; + } catch (Exception e) { + logger.error("lazy Entity List", e); + setRowCount(0); + return new ArrayList<>(); + } + } + + @Override + public String getRowKey(TransferView row) { + return row.getId(); + } + + @Override + public TransferView getRowData(String rowKey) { + return lazyEntityList + .stream() + .filter(row -> rowKey.equals(row.getId())) + .findFirst() + .orElse(null); + } + } + ); + } catch (Exception e) { + logger.error("Lazy Data Model Customer View ", e); + } + } + + /** + * + */ + private void fillUsersComboBoxes() { + setUserSend(enabledUserDetailsViewService.findEnabledUsersByOffice(getLoggedUser().getOffice().getId())); + setUserReceive(getUserSend()); + } + + @PostConstruct + public void init() { + try { + loadBundlePropertyFile(); + initOneWeekBeforeToCurrdate(); + setLastStableSmallBox(genericValidationService.lastStableSmallBoxByDate(getLoggedUser().getUser())); + loadingLazyDataTable(); + fillUsersComboBoxes(); + } catch (Exception e) { + logger.error("TransferUpgradeBean init", e); + } + } + + final Logger logger = LogManager.getLogger(getClass()); + + @Inject + private TransferService transferService; + @Inject + private GenericValidationService genericValidationService; + @Inject + private BitacoraService bitacoraService; + @Inject + private EnabledUserDetailsViewService enabledUserDetailsViewService; + + private Date lastStableSmallBox; + private LazyDataModel transfers; + private TransferView selectedTransfer; + private String commentsBitacora; + private List userSend; + private List userReceive; + private String userSendId; + private String userReceiveId; + private String amountToTransfer; + + public Date getLastStableSmallBox() { + return lastStableSmallBox; + } + + public void setLastStableSmallBox(Date lastStableSmallBox) { + this.lastStableSmallBox = lastStableSmallBox; + } + + public LazyDataModel getTransfers() { + return transfers; + } + + public void setTransfers(LazyDataModel transfers) { + this.transfers = transfers; + } + + public TransferView getSelectedTransfer() { + return selectedTransfer; + } + + public void setSelectedTransfer(TransferView selectedTransfer) { + this.selectedTransfer = selectedTransfer; + } + + public String getCommentsBitacora() { + return commentsBitacora; + } + + public void setCommentsBitacora(String commentsBitacora) { + this.commentsBitacora = commentsBitacora; + } + + public List getUserSend() { + return userSend; + } + + public void setUserSend(List userSend) { + this.userSend = userSend; + } + + public List getUserReceive() { + return userReceive; + } + + public void setUserReceive(List userReceive) { + this.userReceive = userReceive; + } + + public String getUserSendId() { + return userSendId; + } + + public void setUserSendId(String userSendId) { + this.userSendId = userSendId; + } + + public String getUserReceiveId() { + return userReceiveId; + } + + public void setUserReceiveId(String userReceiveId) { + this.userReceiveId = userReceiveId; + } + + public String getAmountToTransfer() { + return amountToTransfer; + } + + public void setAmountToTransfer(String amountToTransfer) { + this.amountToTransfer = amountToTransfer; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/VehicleBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/VehicleBean.java new file mode 100644 index 0000000..c69daed --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/VehicleBean.java @@ -0,0 +1,613 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin; + +import com.arrebol.apc.controller.admin.VehicleController; +import com.arrebol.apc.web.beans.system.employee.*; +import com.arrebol.apc.model.admin.Bonus; +import com.arrebol.apc.model.catalog.RoleCtlg; +import com.arrebol.apc.model.catalog.Vehicle; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.HumanResourceStatus; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.annotation.PreDestroy; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Named +@ViewScoped +public class VehicleBean extends GenericBean implements Serializable { + + public void saveVehicleRow() { + logger.debug("saveVehicle"); + try { + getSaveVehicle().setCreatedBy(getLoggedUser().getUser().getId()); + getSaveVehicle().setCreatedOn(new Date()); + getSaveVehicle().setVehicleStatus(ActiveStatus.ENEBLED); + getSaveVehicle().setIdDriver(getUpdateId()); + + String messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + FacesMessage.Severity severity = FacesMessage.SEVERITY_WARN; + + if (getController().saveVehicle(getSaveVehicle())) { + setSaveVehicle(new Vehicle()); + + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + severity = FacesMessage.SEVERITY_INFO; + + refreshDropBox(); + } + Object[] param = {"Vehicle", getBundlePropertyFile().getString("created")}; + + buildAndSendMessage(param, messafeFormat, severity, "Vehicle"); + } catch (Exception e) { + logger.error("saveVehicle", e); + Object[] param = {getBundlePropertyFile().getString("created")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + "Vehicle" + ); + } + } + + /** + * + * @param action 1 = TO DISABLED, 2 = TO ENEBLED, 3 = TO DELETED, 4 NOT + * ALLOWED + */ + public void actionDropBox(int action) { + logger.debug("actionDropBox"); + try { + String messageTitle = getBundlePropertyFile().getString("employee"); + String actionUserIdSelected = null; + String messageAction = null; + + HumanResourceStatus status = null; + + switch (action) { + case 1: + actionUserIdSelected = getEnebledId(); + messageAction = getBundlePropertyFile().getString("disabled"); + status = HumanResourceStatus.DISABLED; + break; + case 2: + actionUserIdSelected = getDisabledId(); + messageAction = getBundlePropertyFile().getString("enebled"); + status = HumanResourceStatus.ENEBLED; + break; + case 3: + actionUserIdSelected = getDeletedId(); + messageAction = getBundlePropertyFile().getString("deleted"); + status = HumanResourceStatus.DELETED; + break; + default: + throw new Exception(action + " is NOT valid a option"); + } + + if (executeAction(status, actionUserIdSelected, messageTitle, messageAction)) { + refreshDropBox(); + } + } catch (Exception e) { + logger.error("actionDropBox", e); + Object[] param = {getBundlePropertyFile().getString("employee")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("process") + ); + } + } + + public void updateSlctBtnHRAction() { +// logger.debug("updateHR"); +// try { +// getUpdateHumanResource().setLastUpdatedBy(getLoggedUser().getUser().getId()); +// getUpdateHumanResource().setLastUpdatedOn(new Date()); +// getUpdateHumanResource().setRoleCtlg(new RoleCtlg(roleUpdate)); +// +// if (getUpdateHumanResource().getEmployeeSaving() == null) { +// getUpdateHumanResource().setEmployeeSaving(BigDecimal.ZERO); +// } +// +// String messafeFormat = getBundlePropertyFile().getString("message.format.failure"); +// FacesMessage.Severity severity = FacesMessage.SEVERITY_WARN; +// +// if (null != getBonusId() && getBonusId().length() == 36) { +// getUpdateHumanResource().setBonus(new Bonus(getBonusId())); +// } +// +// if (getController().updateByHumanResourceId(getUpdateHumanResource(), false)) { +// messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); +// severity = FacesMessage.SEVERITY_INFO; +// } +// +// Object[] param = {getBundlePropertyFile().getString("employee"), getBundlePropertyFile().getString("updated")}; +// +// buildAndSendMessage(param, messafeFormat, severity, getBundlePropertyFile().getString("employee")); +// } catch (Exception e) { +// logger.error("updateSlctBtnHRActionListener", e); +// Object[] param = {getBundlePropertyFile().getString("updated")}; +// +// buildAndSendMessage( +// param, +// getBundlePropertyFile().getString("message.format.fatal"), +// FacesMessage.SEVERITY_FATAL, +// getBundlePropertyFile().getString("employee") +// ); +// } + } + + public void loadVehicleToUpdate() { +// try { +// setUpdateHumanResource(getController().findHumanResourceById(getUpdateId())); +// setRoleUpdate(getUpdateHumanResource().getBonus().getId()); +// updateBonusId = getRoleUpdate(); +// } catch (Exception e) { +// logger.error("updateSlctBtnHRActionListener", e); +// Object[] param = {getBundlePropertyFile().getString("searching")}; +// +// buildAndSendMessage( +// param, +// getBundlePropertyFile().getString("message.format.fatal"), +// FacesMessage.SEVERITY_FATAL, +// getBundlePropertyFile().getString("employee") +// ); +// } + } + + /** + * + * @param option 1 = to disabled, 2 = to enebled, 4 = to updated + */ + public void enebledDisabledDropBoxListener(int option) { +// logger.debug("enebledDisabledDropBoxListener"); +// try { +// HumanResourceStatus status = HumanResourceStatus.ENEBLED; +// +// boolean goAHead = false; +// +// switch (option) { +// case 1: +// if (isEnebledHR()) { +// goAHead = isEnebledHR(); +// } else { +// setEnebledHumanResourcesLst(null); +// } +// break; +// case 2: +// if (isDisabledHR()) { +// goAHead = isDisabledHR(); +// } else { +// setDeletedHumanResourcesLst(null); +// } +// break; +// case 4: +// if (isSelectedUpdateHR()) { +// goAHead = isSelectedUpdateHR(); +// } else { +// setUpdateHumanResourcesLst(null); +// setUpdateVehicle(new Vehicle()); +// } +// break; +// } +// +// if (goAHead) { +// if (2 == option) { +// status = HumanResourceStatus.DISABLED; +// } +// +// List results = getController().findEmployeesByType( +// new Office(getLoggedUser().getOffice().getId()), +// status, +// getLoggedUser().getUser().getHumanResource().getId() +// ); +// +// switch (option) { +// case 1: +// setEnebledHumanResourcesLst(results); +// break; +// case 2: +// setDisabledHumanResourcesLst(results); +// break; +// case 4: +// setUpdateHumanResourcesLst(results); +// setUpdateHumanResource(new HumanResource()); +// break; +// } +// } +// } catch (Exception e) { +// logger.error("enebledDisabledDropBoxListener"); +// +// Object[] param = {getBundlePropertyFile().getString("searching")}; +// +// buildAndSendMessage( +// param, +// getBundlePropertyFile().getString("message.format.fatal"), +// FacesMessage.SEVERITY_FATAL, +// getBundlePropertyFile().getString("employee") +// ); +// } + } + + public void deletedHRListener() { +// try { +// if (isDeletedHR()) { +// List statusLst = new ArrayList<>(); +// +// statusLst.add(HumanResourceStatus.ENEBLED); +// statusLst.add(HumanResourceStatus.DISABLED); +// +// setDeletedHumanResourcesLst( +// getController().findEmployeesInType( +// new Office(getLoggedUser().getOffice().getId()), +// statusLst, +// getLoggedUser().getUser().getHumanResource().getId() +// ) +// ); +// } else { +// setDeletedHumanResourcesLst(null); +// } +// } catch (Exception e) { +// logger.error("deletedHRListener", e); +// Object[] param = {getBundlePropertyFile().getString("searching")}; +// +// buildAndSendMessage( +// param, +// getBundlePropertyFile().getString("message.format.fatal"), +// FacesMessage.SEVERITY_FATAL, +// getBundlePropertyFile().getString("employee") +// ); +// } + } + + /** + * + * @param status + * @param userIdSelected + * @param msgTitle + * @param msgAction + */ + private boolean executeAction(HumanResourceStatus status, String userIdSelected, String msgTitle, String msgAction) { + logger.debug("executeAction"); + + boolean success = false; + + try { + String messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + FacesMessage.Severity severity = FacesMessage.SEVERITY_WARN; + + success = getController().updateHRByStatus(status, userIdSelected, getLoggedUser().getUser().getId()); + + if (success) { + logger.debug("executeAction"); + + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + severity = FacesMessage.SEVERITY_INFO; + } + + Object[] param = {msgTitle, msgAction}; + + buildAndSendMessage(param, messafeFormat, severity, msgTitle); + } catch (Exception e) { + logger.error("executeAction", e); + Object[] param = {msgTitle}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + msgTitle + ); + } + return success; + } + + private void refreshDropBox() { + try { + if (isEnebledHR()) { + enebledDisabledDropBoxListener(1); + } + if (isDisabledHR()) { + enebledDisabledDropBoxListener(2); + } + + if (isDeletedHR()) { + deletedHRListener(); + } + + if (isSelectedUpdateVehicle()) { + enebledDisabledDropBoxListener(4); + } + } catch (Exception e) { + logger.error("executeAction", e); + } + } + + private static final long serialVersionUID = 2969985354193657703L; + final Logger logger = LogManager.getLogger(EmployeeBean.class); + + private VehicleController controller; + + private Vehicle saveVehicle; + private Vehicle updateVehicle; + + private String role; + private List roles; + + private boolean selectedUpdateVehicle; + private String updateId; + + private String roleUpdate; + private List updateHumanResourcesLst; + private List typeLst; + + private boolean enebledHR; + private String enebledId; + private List enebledHumanResourcesLst; + + private boolean disabledHR; + private String disabledId; + private List disabledHumanResourcesLst; + + private boolean deletedHR; + private String deletedId; + private List deletedHumanResourcesLst; + + private String bonusId; + private List bonuses; + private String updateBonusId; + + private List vehicleType; + + @PostConstruct() + public void init() { + try { + loadBundlePropertyFile(); + setController(new VehicleController()); + setSaveVehicle(new Vehicle()); + setUpdateVehicle(new Vehicle()); + + List results = getController().findEmployeesByType( + new Office(getLoggedUser().getOffice().getId()), + HumanResourceStatus.ENEBLED, + getLoggedUser().getUser().getHumanResource().getId() + ); + + setUpdateHumanResourcesLst(results); + + vehicleType = new ArrayList<>(); + vehicleType.add("Automóvil"); + vehicleType.add("Motocicleta"); + } catch (Exception e) { + logger.error("init", e); + } + } + + @PreDestroy + public void finish() { + try { + setSaveVehicle(new Vehicle()); + setUpdateVehicle(new Vehicle()); + setController(null); + } catch (Exception e) { + logger.error("finish", e); + } + } + + public VehicleController getController() { + return controller; + } + + public void setController(VehicleController controller) { + this.controller = controller; + } + + public Vehicle getSaveVehicle() { + return saveVehicle; + } + + public void setSaveVehicle(Vehicle saveVehicle) { + this.saveVehicle = saveVehicle; + } + + public Vehicle getUpdateVehicle() { + return updateVehicle; + } + + public void setUpdateVehicle(Vehicle updateVehicle) { + this.updateVehicle = updateVehicle; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public List getRoles() { + if (null == roles) { + /* + roles = Stream.of( + HumanResourceType.values()) + .map(Enum::name) + .collect(Collectors.toList() + ); + */ + } + return roles; + } + + public void setRoles(List roles) { + this.roles = roles; + } + + public boolean isSelectedUpdateVehicle() { + return selectedUpdateVehicle; + } + + public void setSelectedUpdateVehicle(boolean selectedUpdateVehicle) { + this.selectedUpdateVehicle = selectedUpdateVehicle; + } + + public String getUpdateId() { + return updateId; + } + + public void setUpdateId(String updateId) { + this.updateId = updateId; + } + + public String getRoleUpdate() { + return roleUpdate; + } + + public void setRoleUpdate(String roleUpdate) { + this.roleUpdate = roleUpdate; + } + + public List getUpdateHumanResourcesLst() { + return updateHumanResourcesLst; + } + + public void setUpdateHumanResourcesLst(List updateHumanResourcesLst) { + this.updateHumanResourcesLst = updateHumanResourcesLst; + } + + public List getTypeLst() { + return typeLst; + } + + public void setTypeLst(List typeLst) { + this.typeLst = typeLst; + } + + public boolean isEnebledHR() { + return enebledHR; + } + + public void setEnebledHR(boolean enebledHR) { + this.enebledHR = enebledHR; + } + + public String getEnebledId() { + return enebledId; + } + + public void setEnebledId(String enebledId) { + this.enebledId = enebledId; + } + + public List getEnebledHumanResourcesLst() { + return enebledHumanResourcesLst; + } + + public void setEnebledHumanResourcesLst(List enebledHumanResourcesLst) { + this.enebledHumanResourcesLst = enebledHumanResourcesLst; + } + + public boolean isDisabledHR() { + return disabledHR; + } + + public void setDisabledHR(boolean disabledHR) { + this.disabledHR = disabledHR; + } + + public String getDisabledId() { + return disabledId; + } + + public void setDisabledId(String disabledId) { + this.disabledId = disabledId; + } + + public List getDisabledHumanResourcesLst() { + return disabledHumanResourcesLst; + } + + public void setDisabledHumanResourcesLst(List disabledHumanResourcesLst) { + this.disabledHumanResourcesLst = disabledHumanResourcesLst; + } + + public boolean isDeletedHR() { + return deletedHR; + } + + public void setDeletedHR(boolean deletedHR) { + this.deletedHR = deletedHR; + } + + public String getDeletedId() { + return deletedId; + } + + public void setDeletedId(String deletedId) { + this.deletedId = deletedId; + } + + public List getDeletedHumanResourcesLst() { + return deletedHumanResourcesLst; + } + + public void setDeletedHumanResourcesLst(List deletedHumanResourcesLst) { + this.deletedHumanResourcesLst = deletedHumanResourcesLst; + } + + public String getBonusId() { + return bonusId; + } + + public void setBonusId(String bonusId) { + this.bonusId = bonusId; + } + + public List getBonuses() { + return bonuses; + } + + public void setBonuses(List bonuses) { + this.bonuses = bonuses; + } + + public String getUpdateBonusId() { + return updateBonusId; + } + + public void setUpdateBonusId(String updateBonusId) { + this.updateBonusId = updateBonusId; + } + + public List getVehicleType() { + return vehicleType; + } + + public void setVehicleType(List vehicleType) { + this.vehicleType = vehicleType; + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/people/PersonCustomerBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/people/PersonCustomerBean.java new file mode 100644 index 0000000..d1d919b --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/admin/people/PersonCustomerBean.java @@ -0,0 +1,648 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.admin.people; + +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.CustomerClassification; +import com.arrebol.apc.model.enums.LoanDetailsType; +import com.arrebol.apc.model.enums.LoanStatus; +import com.arrebol.apc.model.enums.OwnerLoan; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanByUser; +import com.arrebol.apc.model.loan.LoanByUserId; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.model.loan.LoanType; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.model.views.CustomerView; +import com.arrebol.apc.service.BitacoraService; +import com.arrebol.apc.service.admin.CustomerService; +import com.arrebol.apc.service.admin.PeopleService; +import com.arrebol.apc.service.catalog.LoanService; +import com.arrebol.apc.service.catalog.LoanTypeService; +import com.arrebol.apc.service.catalog.PeopleAutoCompleteService; +import com.arrebol.apc.service.catalog.RouteService; +import com.arrebol.apc.service.core.UserService; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.Map; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Inject; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.primefaces.model.LazyDataModel; +import org.primefaces.model.SortOrder; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Named(value = "personCustomerBean") +@ViewScoped +public class PersonCustomerBean extends GenericBean implements Serializable { + + /** + * + * @param query + * @return + */ + public List completeCustomer(String query) { + return peopleAutoCompleteService.findCustomersLike(query.trim()); + } + + /** + * + * @param query + * @return + */ + public List completeEndorsement(String query) { + return peopleAutoCompleteService.findEndorsementsLike(query.trim()); + } + + /** + * + */ + public void changeRoute() { + if (!getRouteId().isEmpty()) { + if (customerService.updateRouteById(new RouteCtlg(getRouteId()), getSelectedCustomerView().getId(), getLoggedUser().getUser().getId())) { + showMessage(FacesMessage.SEVERITY_INFO, "Cliente", "Se modificó la ruta del cliente correctamente."); + } else { + showMessage(FacesMessage.SEVERITY_WARN, "Cliente", "Ocurrió un error durante el proceso de modificacipon de la ruta del cliente."); + } + } + } + + /** + * + */ + public void deleteRow() { + try { + customerService.updatePeopleByStatus(ActiveStatus.DISABLED, getSelectedCustomerView().getId(), getLoggedUser().getUser().getId()); + + setSelectedCustomerView(null); + showMessage(FacesMessage.SEVERITY_INFO, "Cliente", "Se eliminó correctamente."); + } catch (Exception e) { + showMessage(FacesMessage.SEVERITY_ERROR, "Cliente", "No se eliminó correctamente."); + } + } + + /** + * + */ + public void updatePeopleTypeById() { + if (getSelectedCustomerView().getPeopleType().equals(PeopleType.BOTH)) { + showMessage(FacesMessage.SEVERITY_WARN, "Advertencia", "El cliente ya se encuentra como Aval."); + return; + } + try { + customerService.updatePeopleTypeById(PeopleType.BOTH, getSelectedCustomerView().getId(), getLoggedUser().getUser().getId()); + setSelectedCustomerView(null); + // TODO cargar de nuevo el lazy data model para poder actualizar la datatable + showMessage(FacesMessage.SEVERITY_INFO, "Cliente", "Se modificó correctamente."); + } catch (Exception e) { + logger.error("updatePeopleTypeById", e); + showMessage(FacesMessage.SEVERITY_INFO, "Cliente", "No se modificó correctamente."); + } + } + + /** + * + * @param outcome + * @return + */ + public String detailCustomer(String outcome) { + return outcome; + } + + /** + * + */ + public void calculationFunction() { + if (loanTypeId != null && !loanTypeId.isEmpty()) { + total = loanTypeService.getLoanTypeById(loanTypeId).getPaymentTotal().add(totalFee).subtract(totalPayment); + } else { + total = BigDecimal.ZERO; + } + } + + /** + * + */ + public void addRow() { + try { + Loan loanSave = new Loan(); + loanSave.setComments(getComments()); + loanSave.setCustomer(getAutoCompleteCustomer()); + loanSave.setEndorsement(getAutoCompleteEndorsement()); + loanSave.setLoanType(new LoanType(getLoanTypeId())); + if (isAprobado()) { + loanSave.setLoanStatus(LoanStatus.APPROVED); + } else if (isTerminado()) { + loanSave.setLoanStatus(LoanStatus.FINISH); + } else { + loanSave.setLoanStatus(LoanStatus.PENDING); + } + loanSave.setAmountPaid(getTotalPayment()); + loanSave.setRouteCtlg(peopleService.findPeopleById(getAutoCompleteCustomer().getId()).getRouteCtlg()); + if (getTotalPayment().compareTo(BigDecimal.ZERO) == 0 && getTotalFee().compareTo(BigDecimal.ZERO) == 0) { + loanSave.setLastReferenceNumber(0); + } + if (getTotalPayment().compareTo(BigDecimal.ZERO) > 0 && getTotalFee().compareTo(BigDecimal.ZERO) == 0) { + loanSave.setLastReferenceNumber(1); + } + if (getTotalPayment().compareTo(BigDecimal.ZERO) == 0 && getTotalFee().compareTo(BigDecimal.ZERO) > 0) { + loanSave.setLastReferenceNumber(1); + } + if (getTotalPayment().compareTo(BigDecimal.ZERO) > 0 && getTotalFee().compareTo(BigDecimal.ZERO) > 0) { + loanSave.setLastReferenceNumber(2); + } + loanSave.setAmountToPay(loanTypeService.getLoanTypeById(getLoanTypeId()).getPaymentTotal().add(getTotalFee())); + loanSave.setCreatedBy(getUserId()); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(getCreatedOn()); + calendar.set(Calendar.HOUR_OF_DAY, 12); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + calendar.set(Calendar.MILLISECOND, 0); + loanSave.setCreatedOn(new Date()); + loanSave.setLastUpdatedOn(new Date()); + + if (loanService.saveLoan(loanSave)) { + Loan temp = loanService.getLoanById(loanSave.getId()); + String userName = ""; + for (User user : getUsers()) { + if (user.getId().equalsIgnoreCase(getUserId())) { + userName = user.getHumanResource().getFirstName() + " " + + user.getHumanResource().getLastName(); + break; + } + } + Calendar fechaAct = Calendar.getInstance(); + if (fechaAct.before(calendar)) { + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Préstamo postfechado"); + bitacora.setCommentsUser(""); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setDescription("El usuario " + userName + " postfechó el préstamo del cliente " + temp.getCustomer().getFullName() + + ", con cantidad de $" + temp.getLoanType().getPayment() + " al día " + temp.getCreatedOn()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + bitacoraService.saveBitacora(bitacora); + } + + LoanByUser loanByUser = new LoanByUser(); + LoanByUserId idRelation = new LoanByUserId(); + + idRelation.setIdLoan(loanSave.getId()); + idRelation.setIdUser(getUserId()); + + loanByUser.setId(idRelation); + loanByUser.setComments(getComments()); + loanByUser.setCreatedBy(getLoggedUser().getUser().getId()); + if (isAprobado()) { + loanByUser.setLoanByUserStatus(LoanStatus.APPROVED); + } else if (isTerminado()) { + loanByUser.setLoanByUserStatus(LoanStatus.FINISH); + } else { + loanByUser.setLoanByUserStatus(LoanStatus.PENDING); + } + loanByUser.setLoan(loanSave); + loanByUser.setOrderInList(0); + loanByUser.setOwnerLoan(OwnerLoan.CURRENT_OWNER); + loanByUser.setUser(new User(getUserId())); + loanService.saveLoanByUser(loanByUser); + + int contador = 1; + if (getTotalPayment().compareTo(BigDecimal.ZERO) > 0) { + LoanDetails detail = new LoanDetails(); + detail.setComments(getComments()); + detail.setCreatedBy(getLoggedUser().getUser().getId()); + detail.setCreatedOn(getCreatedOn()); + detail.setLoan(loanSave); + detail.setLoanDetailsType(LoanDetailsType.PAYMENT); + detail.setPaymentAmount(getTotalPayment()); + detail.setPeopleType(PeopleType.CUSTOMER); + detail.setReferenceNumber(contador); + detail.setUser(new User(getUserId())); + if (loanService.saveLoanDetail(detail)) { + contador++; + } + } + if (getTotalFee().compareTo(BigDecimal.ZERO) > 0) { + LoanDetails detail = new LoanDetails(); + detail.setComments(getComments()); + detail.setCreatedBy(getLoggedUser().getUser().getId()); + detail.setCreatedOn(getCreatedOn()); + detail.setLoan(loanSave); + detail.setLoanDetailsType(LoanDetailsType.FEE); + detail.setPaymentAmount(getTotalFee()); + detail.setPeopleType(PeopleType.CUSTOMER); + detail.setReferenceNumber(contador); + detail.setUser(new User(getUserId())); + if (loanService.saveLoanDetail(detail)) { + contador++; + } + } + + } + //loan.clear(); + setCreatedOn(new Date()); + setComments(""); + //customerId = ""; + //endorsementId = ""; + setLoanTypeId(""); + setUserId(""); + setTotal(BigDecimal.ZERO); + setTotalFee(BigDecimal.ZERO); + setTotalPayment(BigDecimal.ZERO); + setAprobado(false); + setTerminado(false); + setAutoCompleteCustomer(null); + setAutoCompleteEndorsement(null); + //loan = fillDatatableLoan(); + showMessage(FacesMessage.SEVERITY_INFO, "Cliente", "Se agrego el prestamo al cliente correctamente."); + } catch (Exception e) { + logger.error("", e); + + showMessage(FacesMessage.SEVERITY_INFO, "Cliente", "No se agrego el nuevo prestamos al cliente."); + } + } + + /** + * + */ + public void addPeople() { + try { + logger.debug("addPeople"); + + getSavePeople().setCreatedBy(getLoggedUser().getUser().getId()); + getSavePeople().setOffice(new Office(getLoggedUser().getOffice().getId())); + getSavePeople().setActiveStatus(ActiveStatus.ENEBLED); + getSavePeople().setRouteCtlg(new RouteCtlg(routeId)); + getSavePeople().setThumbnail(""); + getSavePeople().setClassification(CustomerClassification.WHITE); + + if (isCustomer() == true && isEndorsement() == false) { + getSavePeople().setPeopleType(PeopleType.CUSTOMER); + } + if (isCustomer() == true && isEndorsement() == true) { + getSavePeople().setPeopleType(PeopleType.BOTH); + } + if (isCustomer() == false && isEndorsement() == true) { + getSavePeople().setPeopleType(PeopleType.ENDORSEMENT); + } + if (isCustomer() == false && isEndorsement() == false) { + getSavePeople().setPeopleType(PeopleType.BOTH); + } + + String messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + FacesMessage.Severity severity = FacesMessage.SEVERITY_WARN; + + if (peopleService.savePeople(getSavePeople())) { + setSavePeople(new People()); + setCustomer(false); + setEndorsement(false); + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + severity = FacesMessage.SEVERITY_INFO; + } + + Object[] param = {getBundlePropertyFile().getString("people"), getBundlePropertyFile().getString("created")}; + + buildAndSendMessage(param, messafeFormat, severity, getBundlePropertyFile().getString("people")); + + } catch (Exception e) { + logger.error("savePeople", e); + Object[] param = {getBundlePropertyFile().getString("created")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("people") + ); + } + } + + /** + * + */ + private void loadingLazyDataTable() { + try { + setCustomerViews(new LazyDataModel() { + private List lazyEntityList; + + @Override + public List load(int first, int pageSize, String sortField, SortOrder sortOrder, Map filterBy) { + try { + Long total = customerService.countPaginator(filterBy); + + setRowCount(total.intValue()); + + lazyEntityList = customerService.lazyEntityListPaginator(first, pageSize, sortField, sortOrder, filterBy); + + return lazyEntityList; + } catch (Exception e) { + logger.error("lazy Entity List", e); + setRowCount(0); + return new ArrayList<>(); + } + } + + @Override + public String getRowKey(CustomerView row) { + return row.getId(); + } + + @Override + public CustomerView getRowData(String rowKey) { + return lazyEntityList + .stream() + .filter(row -> rowKey.equals(row.getId())) + .findFirst() + .orElse(null); + } + } + ); + } catch (Exception e) { + logger.error("Lazy Data Model Customer View ", e); + } + } + + public void CustomerClassification(String colorClassification) + { + try { + customerService.updatePeopleByClassification( CustomerClassification.valueOf(colorClassification), getSelectedCustomerView().getId(), getLoggedUser().getUser().getId()); + + setSelectedCustomerView(null); + showMessage(FacesMessage.SEVERITY_INFO, "Cliente", "Se clasificó correctamente."); + } catch (Exception e) { + showMessage(FacesMessage.SEVERITY_ERROR, "Cliente", "No se clasificó correctamente."); + } + } + + @PostConstruct + public void init() { + try { + loadBundlePropertyFile(); + loadingLazyDataTable(); + setRoutes(routeService.fillRoutesDatatable(getLoggedUser().getOffice().getId())); + setLoanType(loanTypeService.fillLoanTypeDatatable(getLoggedUser().getOffice().getId())); + setUsers(userService.getAllUsersByOffice(getLoggedUser().getOffice().getId())); + setTotalPayment(BigDecimal.ZERO); + setTotalFee(BigDecimal.ZERO); + setTotal(BigDecimal.ZERO); + setSavePeople(new People()); + } catch (Exception e) { + logger.error("PersonCustomerBean init", e); + } + } + + final Logger logger = LogManager.getLogger(getClass()); + + @Inject + private CustomerService customerService; + @Inject + private PeopleService peopleService; + @Inject + private RouteService routeService; + @Inject + private LoanTypeService loanTypeService; + @Inject + private LoanService loanService; + @Inject + private BitacoraService bitacoraService; + @Inject + private UserService userService; + @Inject + private PeopleAutoCompleteService peopleAutoCompleteService; + + private LazyDataModel customerViews; + private CustomerView selectedCustomerView; + private List customers; + private List routes; + private String routeId; + private String comments; + + private People autoCompleteCustomer; + private People autoCompleteEndorsement; + private People savePeople; + private List loanType; + private List users; + + private String customerId; + private String endorsementId; + private String loanTypeId; + private String userId; + + private Date createdOn; + private BigDecimal totalPayment; + private BigDecimal totalFee; + private BigDecimal total; + private boolean aprobado; + private boolean terminado; + boolean customer; + boolean endorsement; + + public LazyDataModel getCustomerViews() { + return customerViews; + } + + public void setCustomerViews(LazyDataModel customerViews) { + this.customerViews = customerViews; + } + + public CustomerView getSelectedCustomerView() { + return selectedCustomerView; + } + + public void setSelectedCustomerView(CustomerView selectedCustomerView) { + this.selectedCustomerView = selectedCustomerView; + } + + public List getCustomers() { + return customers; + } + + public void setCustomers(List customers) { + this.customers = customers; + } + + public List getRoutes() { + return routes; + } + + public void setRoutes(List routes) { + this.routes = routes; + } + + public String getRouteId() { + return routeId; + } + + public void setRouteId(String routeId) { + this.routeId = routeId; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public List getLoanType() { + return loanType; + } + + public void setLoanType(List loanType) { + this.loanType = loanType; + } + + public List getUsers() { + return users; + } + + public void setUsers(List users) { + this.users = users; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public String getEndorsementId() { + return endorsementId; + } + + public void setEndorsementId(String endorsementId) { + this.endorsementId = endorsementId; + } + + public String getLoanTypeId() { + return loanTypeId; + } + + public void setLoanTypeId(String loanTypeId) { + this.loanTypeId = loanTypeId; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public Date getCreatedOn() { + return createdOn; + } + + public void setCreatedOn(Date createdOn) { + this.createdOn = createdOn; + } + + public BigDecimal getTotalPayment() { + return totalPayment; + } + + public void setTotalPayment(BigDecimal totalPayment) { + this.totalPayment = totalPayment; + } + + public BigDecimal getTotalFee() { + return totalFee; + } + + public void setTotalFee(BigDecimal totalFee) { + this.totalFee = totalFee; + } + + public BigDecimal getTotal() { + return total; + } + + public void setTotal(BigDecimal total) { + this.total = total; + } + + public boolean isAprobado() { + return aprobado; + } + + public void setAprobado(boolean aprobado) { + this.aprobado = aprobado; + } + + public boolean isTerminado() { + return terminado; + } + + public void setTerminado(boolean terminado) { + this.terminado = terminado; + } + + public People getAutoCompleteCustomer() { + return autoCompleteCustomer; + } + + public void setAutoCompleteCustomer(People autoCompleteCustomer) { + this.autoCompleteCustomer = autoCompleteCustomer; + } + + public People getAutoCompleteEndorsement() { + return autoCompleteEndorsement; + } + + public void setAutoCompleteEndorsement(People autoCompleteEndorsement) { + this.autoCompleteEndorsement = autoCompleteEndorsement; + } + + public People getSavePeople() { + return savePeople; + } + + public void setSavePeople(People savePeople) { + this.savePeople = savePeople; + } + + public boolean isCustomer() { + return customer; + } + + public void setCustomer(boolean customer) { + this.customer = customer; + } + + public boolean isEndorsement() { + return endorsement; + } + + public void setEndorsement(boolean endorsement) { + this.endorsement = endorsement; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/catalog/LoanTypeBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/catalog/LoanTypeBean.java new file mode 100644 index 0000000..339bcd5 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/catalog/LoanTypeBean.java @@ -0,0 +1,293 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.catalog; + +import com.arrebol.apc.controller.catalog.LoanTypeController; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.DaysInWeekend; +import com.arrebol.apc.model.loan.LoanType; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("loanTypeManager") +@ViewScoped +public class LoanTypeBean extends GenericBean implements Serializable, Datatable{ + + public List fillDatatableLoanType() { + + return loanTypeCtrl.fillLoanTypeDatatable(getLoggedUser().getOffice().getId()); + } + + @Override + public void editRow(RowEditEvent event) { + LoanType loanType = (LoanType) event.getObject(); + if (loanType != null) { + loanTypeCtrl.updateByLoanTypeId(loanType); + showMessage(FacesMessage.SEVERITY_INFO, "Registro Editado", "Se hizo el cambio correctamente."); + } + } + + @Override + public void onRowCancel(RowEditEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Edición Cancelada", ((LoanType) event.getObject()).getLoanTypeName()); + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + try + { + logger.debug("addRowLoanType"); + getSaveLoanType().setCreatedBy(getLoggedUser().getUser().getId()); + getSaveLoanType().setOffice(new Office(getLoggedUser().getOffice().getId())); + BigDecimal total = getSaveLoanType().getPaymentDaily().multiply(new BigDecimal(getSaveLoanType().getTotalDays())); + getSaveLoanType().setPaymentTotal(total); + + if(isMonday() == true) + getSaveLoanType().setMonday(DaysInWeekend.MONDAY); + else + getSaveLoanType().setMonday(null); + + if(isTuesday()== true) + getSaveLoanType().setTuesday(DaysInWeekend.TUESDAY); + else + getSaveLoanType().setTuesday(null); + + if(isWednesday()== true) + getSaveLoanType().setWednesday(DaysInWeekend.WEDNESDAY); + else + getSaveLoanType().setWednesday(null); + + if(isThrusday()== true) + getSaveLoanType().setThursday(DaysInWeekend.THURSDAY); + else + getSaveLoanType().setThursday(null); + + if(isFriday()== true) + getSaveLoanType().setFriday(DaysInWeekend.FRIDAY); + else + getSaveLoanType().setFriday(null); + + if(isSaturday()== true) + getSaveLoanType().setSaturday(DaysInWeekend.SATURDAY); + else + getSaveLoanType().setSaturday(null); + + if(isSunday()== true) + getSaveLoanType().setSunday(DaysInWeekend.SUNDAY); + else + getSaveLoanType().setSunday(null); + + if(isConvenio()== true) + getSaveLoanType().setConvenio(ActiveStatus.ENEBLED); + else + getSaveLoanType().setConvenio(ActiveStatus.DISABLED); + + String messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + FacesMessage.Severity severity = FacesMessage.SEVERITY_WARN; + + if(getLoanTypeCtrl().saveLoanType(getSaveLoanType())){ + setSaveLoanType(new LoanType()); + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + severity = FacesMessage.SEVERITY_INFO; + } + + Object[] param = {getBundlePropertyFile().getString("loanType"), getBundlePropertyFile().getString("created")}; + + buildAndSendMessage(param, messafeFormat, severity, getBundlePropertyFile().getString("loanType")); + + }catch(Exception e) + { + logger.error("saveLoanType", e); + Object[] param = {getBundlePropertyFile().getString("created")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("loanType") + ); + } + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public LoanTypeController getLoanTypeCtrl() { + return loanTypeCtrl; + } + + public void setLoanTypeCtrl(LoanTypeController loanTypeCtrl) { + this.loanTypeCtrl = loanTypeCtrl; + } + + public List getLoanType() { + return loanType; + } + + public void setLoanType(List loanType) { + this.loanType = loanType; + } + + public LoanType getSelectedLoanType() { + return selectedLoanType; + } + + public void setSelectedLoanType(LoanType selectedLoanType) { + this.selectedLoanType = selectedLoanType; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LoanType getSaveLoanType() { + return saveLoanType; + } + + public void setSaveLoanType(LoanType saveLoanType) { + this.saveLoanType = saveLoanType; + } + + public boolean isMonday() { + return monday; + } + + public void setMonday(boolean monday) { + this.monday = monday; + } + + public boolean isTuesday() { + return tuesday; + } + + public void setTuesday(boolean tuesday) { + this.tuesday = tuesday; + } + + public boolean isWednesday() { + return wednesday; + } + + public void setWednesday(boolean wednesday) { + this.wednesday = wednesday; + } + + public boolean isThrusday() { + return thrusday; + } + + public void setThrusday(boolean thrusday) { + this.thrusday = thrusday; + } + + public boolean isFriday() { + return friday; + } + + public void setFriday(boolean friday) { + this.friday = friday; + } + + public boolean isSaturday() { + return saturday; + } + + public void setSaturday(boolean saturday) { + this.saturday = saturday; + } + + public boolean isSunday() { + return sunday; + } + + public void setSunday(boolean sunday) { + this.sunday = sunday; + } + + public boolean isConvenio() { + return convenio; + } + + public void setConvenio(boolean convenio) { + this.convenio = convenio; + } + + private LoanTypeController loanTypeCtrl; + + private List loanType; + + private LoanType selectedLoanType; + + private LoanType saveLoanType; + + private String id; + private String name; + + final Logger logger = LogManager.getLogger(LoanTypeBean.class); + + boolean monday; + boolean tuesday; + boolean wednesday; + boolean thrusday; + boolean friday; + boolean saturday; + boolean sunday; + boolean convenio; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + loanTypeCtrl = new LoanTypeController(); + setSaveLoanType(new LoanType()); + loanType = fillDatatableLoanType(); + monday = false; + tuesday = false; + wednesday = false; + thrusday = false; + friday = false; + saturday = false; + sunday = false; + convenio = false; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/catalog/RoleBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/catalog/RoleBean.java new file mode 100644 index 0000000..21624f7 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/catalog/RoleBean.java @@ -0,0 +1,132 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.catalog; + +import com.arrebol.apc.controller.catalog.RoleController; +import com.arrebol.apc.model.catalog.RoleCtlg; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("roleManager") +@ViewScoped +public class RoleBean extends GenericBean implements Serializable, Datatable { + + public List fillDatatableRole() { + + return roleCtrl.fillRolesDatatable(); + } + + @Override + public void editRow(RowEditEvent event) { + RoleCtlg role = (RoleCtlg) event.getObject(); + if (role != null) { + roleCtrl.updateByRoleId(role); + showMessage(FacesMessage.SEVERITY_INFO, "Registro Editado", "Se hizo el cambio correctamente."); + } + } + + @Override + public void addRow() { + RoleCtlg roleObj = new RoleCtlg(); + roleObj.setRole(name); + roleObj.setActiveStatus(ActiveStatus.ENEBLED); + roleObj.setCreatedBy(getLoggedUser().getUser().getId()); + + roleCtrl.saveRoles(roleObj); + role.add(roleObj); + FacesMessage msg = new FacesMessage("Nuevo puesto", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + + @Override + public void deleteRow() { + roleCtrl.updateRoleByStatus(ActiveStatus.DISABLED, selectedRole.getId(), getLoggedUser().getUser().getId()); + role.remove(selectedRole); + selectedRole = null; + showMessage(FacesMessage.SEVERITY_INFO, "Puesto Eliminado", "Se eliminó correctamente."); + } + + @Override + public void onRowCancel(RowEditEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Edición Cancelada", ((RoleCtlg) event.getObject()).getRole()); + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + public RoleController getRoleCtrl() { + return roleCtrl; + } + + public void setRoleCtrl(RoleController roleCtrl) { + this.roleCtrl = roleCtrl; + } + + public List getRole() { + return role; + } + + public void setRole(List role) { + this.role = role; + } + + public RoleCtlg getSelectedRole() { + return selectedRole; + } + + public void setSelectedRole(RoleCtlg selectedRole) { + this.selectedRole = selectedRole; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + private RoleController roleCtrl; + + private List role; + + private RoleCtlg selectedRole; + + private String id; + private String name; + + @PostConstruct + public void init() { + roleCtrl = new RoleController(); + role = fillDatatableRole(); + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/catalog/RouteBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/catalog/RouteBean.java new file mode 100644 index 0000000..92394c5 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/catalog/RouteBean.java @@ -0,0 +1,135 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.catalog; + +import com.arrebol.apc.controller.catalog.RouteController; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("routeManager") +@ViewScoped +public class RouteBean extends GenericBean implements Serializable, Datatable{ + + public List fillDatatableRoute() { + + return routeCtrl.fillRoutesDatatable(getLoggedUser().getOffice().getId()); + } + + @Override + public void editRow(RowEditEvent event) { + RouteCtlg route = (RouteCtlg) event.getObject(); + if (route != null) { + routeCtrl.updateByRouteId(route); + showMessage(FacesMessage.SEVERITY_INFO, "Registro Editado", "Se hizo el cambio correctamente."); + } + } + + @Override + public void onRowCancel(RowEditEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Edición Cancelada", ((RouteCtlg) event.getObject()).getRoute()); + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + RouteCtlg routeObj = new RouteCtlg(); + routeObj.setRoute(name); + routeObj.setOffice(new Office(getLoggedUser().getOffice().getId())); + routeObj.setActiveStatus(ActiveStatus.ENEBLED); + routeObj.setCreatedBy(getLoggedUser().getUser().getId()); + + routeCtrl.saveRoute(routeObj); + route.add(routeObj); + FacesMessage msg = new FacesMessage("Nueva ruta", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + + @Override + public void deleteRow() { + routeCtrl.updateRouteByStatus(ActiveStatus.DISABLED, selectedRoute.getId(), getLoggedUser().getUser().getId()); + route.remove(selectedRoute); + selectedRoute = null; + showMessage(FacesMessage.SEVERITY_INFO, "Ruta Eliminada", "Se eliminó correctamente."); + } + + public RouteController getRouteCtrl() { + return routeCtrl; + } + + public void setRouteCtrl(RouteController routeCtrl) { + this.routeCtrl = routeCtrl; + } + + public List getRoute() { + return route; + } + + public void setRoute(List route) { + this.route = route; + } + + public RouteCtlg getSelectedRoute() { + return selectedRoute; + } + + public void setSelectedRoute(RouteCtlg selectedRoute) { + this.selectedRoute = selectedRoute; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + private RouteController routeCtrl; + + private List route; + + private RouteCtlg selectedRoute; + + private String id; + private String name; + + @PostConstruct + public void init() { + routeCtrl = new RouteController(); + route = fillDatatableRoute(); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/CustomerWithoutLoanDetailBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/CustomerWithoutLoanDetailBean.java new file mode 100644 index 0000000..1600091 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/CustomerWithoutLoanDetailBean.java @@ -0,0 +1,172 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.dashboard; + +import com.arrebol.apc.controller.admin.CustomerController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named(value = "customerWithoutLoanDetailManager") +@ViewScoped +public class CustomerWithoutLoanDetailBean extends GenericBean implements Serializable, Datatable { + + public List getDetails(String id) { + try { + loanDetails = loanCtrl.getLoanDetailsbyId(id); + + } catch (Exception e) { + } + return null == loanDetails ? new ArrayList<>() : loanDetails; + } + + public People getCustomerDetail(String peopleId) { + return customerCtrl.findPeopleById(peopleId); + } + + public List getLoanByPeople(String peopleId) { + return customerCtrl.findLoanByCustomer(peopleId); + } + + public void editPeople() { + if (customer.getBirthdate() == null) { + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "La fecha de cumpleaños es obligatoria"); + return; + } + if (customer.getFirstName() == null) { + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El primer nombre es obligatoria"); + return; + } + if (customer.getLastName() == null) { + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El apellido paterno es obligatoria"); + return; + } + if (customer.getMiddleName() == null) { + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El apellido materno es obligatoria"); + return; + } + if (customer.getPhoneHome() == null) { + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El teléfono de casa es obligatoria"); + return; + } + if (customer.getAddressHome() == null) { + showMessage(FacesMessage.SEVERITY_FATAL, "Campo obligatorio", "El domicilio personal es obligatoria"); + return; + } + if (customerCtrl.updateByPeopleId(customer)) { + showMessage(FacesMessage.SEVERITY_INFO, "Cliente modificado", "Se modificó correctamente."); + } + } + + @Override + public void editRow(RowEditEvent event) { + + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public CustomerController getCustomerCtrl() { + return customerCtrl; + } + + public void setCustomerCtrl(CustomerController customerCtrl) { + this.customerCtrl = customerCtrl; + } + + public People getCustomer() { + return customer; + } + + public void setCustomer(People customer) { + this.customer = customer; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public List getLoan() { + return loan; + } + + public void setLoan(List loan) { + this.loan = loan; + } + + public LoanController getLoanCtrl() { + return loanCtrl; + } + + public void setLoanCtrl(LoanController loanCtrl) { + this.loanCtrl = loanCtrl; + } + + public List getLoanDetails() { + return loanDetails; + } + + public void setLoanDetails(List loanDetails) { + this.loanDetails = loanDetails; + } + + private CustomerController customerCtrl; + private LoanController loanCtrl; + private People customer; + private String customerId; + private List loan; + private List loanDetails; + + @PostConstruct + public void init() { + customerCtrl = new CustomerController(); + loanCtrl = new LoanController(); + setCustomerId(externalContext().getRequestParameterMap().get("selectedId")); + customer = getCustomerDetail(getCustomerId()); + loan = getLoanByPeople(getCustomerId()); + + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/DashboardBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/DashboardBean.java new file mode 100644 index 0000000..50482c9 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/DashboardBean.java @@ -0,0 +1,1483 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.dashboard; + +import com.arrebol.apc.controller.BitacoraController; +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.GenericValidationController; +import com.arrebol.apc.controller.admin.ClosingDayController; +import com.arrebol.apc.controller.admin.CustomerController; +import com.arrebol.apc.controller.admin.EndorsementController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.controller.catalog.LoanTypeController; +import com.arrebol.apc.controller.catalog.RouteController; +import com.arrebol.apc.controller.dashboard.CustomerWithoutRenovationViewService; +import com.arrebol.apc.controller.dashboard.DashboardController; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.CustomerClassification; +import com.arrebol.apc.model.enums.FeeStatus; +import com.arrebol.apc.model.enums.LoanDetailsType; +import com.arrebol.apc.model.enums.LoanStatus; +import com.arrebol.apc.model.enums.OwnerLoan; +import com.arrebol.apc.model.enums.PeopleType; +import com.arrebol.apc.model.enums.TransferStatus; +import com.arrebol.apc.model.enums.UserType; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanByUser; +import com.arrebol.apc.model.loan.LoanByUserId; +import com.arrebol.apc.model.views.LoanDetailZeroView; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.model.loan.LoanFeeNotification; +import com.arrebol.apc.model.loan.LoanType; +import com.arrebol.apc.model.payroll.TotalExpectedPaymentDailyByUser; +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.model.views.AdvanceUserDailyDetail; +import com.arrebol.apc.model.views.AdvanceUserDailyView; +import com.arrebol.apc.model.views.CustomerWithoutRenovationView; +import com.arrebol.apc.model.views.LoanFinishedView; +import com.arrebol.apc.model.views.TotalCashByCurdateDashboardView; +import com.arrebol.apc.model.views.TotalClosingDayByCurdateView; +import com.arrebol.apc.service.admin.CustomerService; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.math.RoundingMode; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.Map; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Inject; +import javax.inject.Named; +import org.primefaces.model.LazyDataModel; +import org.primefaces.model.SortOrder; +import org.primefaces.model.chart.BarChartModel; +import org.primefaces.model.chart.PieChartModel; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named(value = "dashboardManager") +@ViewScoped +public class DashboardBean extends GenericBean implements Serializable { + + public String detailCustomer(String outcome) { + return outcome; + } + + public void deleteFeeLoan() { + + if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) { + + List details = loanCtrl.getLoanDetailsFeeCurdatebyIdLoan(selectedLoan.getId()); + if (details != null && !details.isEmpty()) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Eliminar multa"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + BigDecimal tempMonto = BigDecimal.ZERO; + for (LoanDetails detail : details) { + loanUpdate.setAmountToPay(loanUpdate.getAmountToPay().subtract(detail.getPaymentAmount())); + tempMonto = tempMonto.add(detail.getPaymentAmount()); + } + bitacora.setDescription("El préstamo del cliente " + loanUpdate.getCustomer().getFullName() + " del asesor " + loanUpdate.getAsesor() + " con monto a prestar de $" + loanUpdate.getLoanType().getPayment() + " " + + "se eliminó una multa de $" + tempMonto.toString()); + if (loanCtrl.deleteLoanDetailsFeeByLoanCurdate(selectedLoan)) { + loanCtrl.deleteLoanFeeNotificationByLoanCurdate(selectedLoan); + + Date date = new Date(); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.add(Calendar.DAY_OF_YEAR, -1); + date = calendar.getTime(); + loanUpdate.setLastUpdatedOn(date); + + loanCtrl.updateLoan(loanUpdate); + loan.clear(); + loan = customerCtrl.findLoanByCustomer(customerId); + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_INFO, "Multas eliminadas", "Se eliminó el/las multas del día de hoy correctamente."); + } + } else { + showMessage(FacesMessage.SEVERITY_WARN, "Advertencia", "El préstamo no tiene registrado multas el día de hoy"); + } + } else { + showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar la multa", "Solo puedes eliminar la multa de préstamos en estatus Aprobados o Pendiente por renovación"); + return; + } + + } + + public void changeRoute() { + if (!routeId.isEmpty()) { + if (loanCtrl.updateRouteById(new RouteCtlg(routeId), selectedLoan.getId(), getLoggedUser().getUser().getId())) { + showMessage(FacesMessage.SEVERITY_INFO, "Ruta modificada", "Se modificó correctamente."); + if (loanCtrl.updatePeopleRoute(new RouteCtlg(routeId), selectedLoan.getCustomer())) { + showMessage(FacesMessage.SEVERITY_INFO, "Cliente modificado", "Se modificó correctamente."); + } + if (loanCtrl.updatePeopleRoute(new RouteCtlg(routeId), selectedLoan.getEndorsement())) { + showMessage(FacesMessage.SEVERITY_INFO, "Aval modificado", "Se modificó correctamente."); + } + } else { + showMessage(FacesMessage.SEVERITY_WARN, "Ruta modificada", "Ocurrió un error durante el proceso."); + } + + } + } + + /** + * + * @param outcome + * @return + */ + public String detailLoan(String outcome) { + return outcome; + } + + /** + * + * @param outcome + * @return + */ + public String detailLoanEndorsement(String outcome) { + return outcome; + } + + public List fillAdvanceUserDaily() { + return dashboardCtrl.fillAllAdvanceUserDailyByOffice(getLoggedUser().getOffice().getId()); + } + + public void getAdvanceDetailsByUser() { + advancesDetail = dashboardCtrl.findAllAdvancesUserDailyDetailByUser(userId); + } + + public void getLoansByCustomer() { + loan = customerCtrl.findLoanByCustomer(customerId); + } + + public void getLoansJuridical() { + String idUser = "aad0c673-eb93-11ea-b7e1-02907d0fb4e6"; + loanJuridical = customerCtrl.findLoanJuridical(idUser); + } + + public void getLoansZero() { + loanZero = customerCtrl.findLoanZero(); + } + + public void getLoansFinished() { + loanFinished = customerCtrl.findLoanFinished(); + } + + public void getLoansByEndorsement() { + loanEndorsement = endorsementCtrl.findLoanByEndorsement(endorsementId); + } + + public List findAllCustomerWithOutRenovationByOffice() { + return dashboardCtrl.findAllCustomerWithOutRenovationByOffice(getLoggedUser().getOffice().getId()); + } + + public void getPaymentDailyExpectByUser() { + List usersTmp = genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + if (usersTmp != null && !usersTmp.isEmpty()) { + usersTmp.stream().filter(user -> (user.getUserType() == UserType.MOBILE && user.getCertifier() == ActiveStatus.DISABLED)).map(user -> { + BigDecimal amountByUser = BigDecimal.valueOf(dashboardCtrl.getLoansSumPaymentDailyByUser(user.getId())); + BigDecimal amountMoneyByUser = dashboardCtrl.getLoansSumPaymentDailyByUserMoney(user.getId()); + TotalExpectedPaymentDailyByUser expectedToday = new TotalExpectedPaymentDailyByUser(); + expectedToday.setActiveStatus(ActiveStatus.ENEBLED); + expectedToday.setOffice(new Office(getLoggedUser().getOffice().getId())); + expectedToday.setCreatedBy(getLoggedUser().getUser().getId()); + expectedToday.setCreatedOn(new Date()); + if (amountByUser != null) { + expectedToday.setTotalExpected(amountByUser); + } else { + expectedToday.setTotalExpected(BigDecimal.ZERO); + } + if (amountMoneyByUser != null) { + expectedToday.setTotalExpectedPayment(amountMoneyByUser); + } else { + expectedToday.setTotalExpectedPayment(BigDecimal.ZERO); + } + expectedToday.setUser(new User(user.getId())); + return expectedToday; + }).map(expectedToday -> { + expectedToday.setLastUpdatedOn(new Date()); + return expectedToday; + }).forEachOrdered(expectedToday -> { + dashboardCtrl.saveTotalExpectedPaymentDailyByUser(expectedToday); + }); + } + } + + public void getResumenLoans() { + + totalExpectedToday = new BigDecimal(BigInteger.ONE); + totalExpectedToday = dashboardCtrl.sumLoansApprovedByOffice(getLoggedUser().getOffice().getId()); + if (totalExpectedToday == null || totalExpectedToday == BigDecimal.ZERO) { + totalExpectedToday = new BigDecimal(BigInteger.ONE); + } + + } + + public void getResumenDaily() { + + List listTotal = closingDayCtrl.getAllTotalCashByCurdateDashboardView(getLoggedUser().getOffice().getId()); + totalAmountDaily = BigDecimal.ZERO; + totalTransferSenderDaily = BigDecimal.ZERO; + totalTransferReceiverDaily = BigDecimal.ZERO; + totalMoneyDailyDaily = BigDecimal.ZERO; + totalDeliveryDaily = BigDecimal.ZERO; + totalDepositDaily = BigDecimal.ZERO; + totalFinalDaily = BigDecimal.ZERO; + totalCajaDaily = BigDecimal.ZERO; + totalOtherExpenseDaily = BigDecimal.ZERO; + + for (TotalCashByCurdateDashboardView temp : listTotal) { + totalAmountDaily = totalAmountDaily.add(temp.getPaymentDaily()); + totalTransferSenderDaily = totalTransferSenderDaily.add(temp.getTransferSender()); + totalTransferReceiverDaily = totalTransferReceiverDaily.add(temp.getTransferReceiver()); + totalMoneyDailyDaily = totalMoneyDailyDaily.add(temp.getMoneyDaily()); + totalDeliveryDaily = totalDeliveryDaily.add(temp.getDelivery()); + totalDepositDaily = totalDepositDaily.add(temp.getDepositDaily()); + totalFinalDaily = totalFinalDaily.add(temp.getTotal()); + totalOtherExpenseDaily = totalOtherExpenseDaily.add(temp.getOtherExpense()); + } + + List closingTotal = closingDayCtrl.findAllClosingDayByCurdate(getLoggedUser().getOffice().getId()); + if (closingTotal != null && !closingTotal.isEmpty()) { + for (TotalClosingDayByCurdateView temp : closingTotal) { + totalCajaDaily = totalCajaDaily.add(temp.getAmountPaid()); + } + } + + } + + public void deletePaymentLoan() { + + if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) { + + List details = loanCtrl.getLoanDetailsCurdatebyIdLoan(selectedLoan.getId()); + if (details != null && !details.isEmpty()) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Eliminar abono"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + BigDecimal tempMonto = BigDecimal.ZERO; + for (LoanDetails detail : details) { + loanUpdate.setAmountPaid(loanUpdate.getAmountPaid().subtract(detail.getPaymentAmount())); + loanUpdate.setLastReferenceNumber(loanUpdate.getLastReferenceNumber() - 1); + tempMonto = tempMonto.add(detail.getPaymentAmount()); + } + bitacora.setDescription("El préstamo del cliente " + loanUpdate.getCustomer().getFullName() + " del asesor " + loanUpdate.getAsesor() + " con monto a prestar de $" + loanUpdate.getLoanType().getPayment() + " " + + "se eliminó un abono de $" + tempMonto.toString()); + if (loanCtrl.deleteLoanDetailsByLoanCurdate(selectedLoan)) { + Date date = new Date(); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(date); + calendar.add(Calendar.DAY_OF_YEAR, -1); + date = calendar.getTime(); + loanUpdate.setLastUpdatedOn(date); + + loanCtrl.updateLoan(loanUpdate); + loan.clear(); + loan = customerCtrl.findLoanByCustomer(customerId); + selectedLoan = null; + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + showMessage(FacesMessage.SEVERITY_INFO, "Abonos eliminados", "Se eliminó el/los abonos del día de hoy correctamente."); + } + } else { + showMessage(FacesMessage.SEVERITY_WARN, "Advertencia", "El préstamo no tiene registrado abonos el día de hoy"); + } + } else { + showMessage(FacesMessage.SEVERITY_WARN, "No se puede eliminar abono", "Solo puedes eliminar el abono de préstamos en estatus Aprobados o Pendiente por renovación"); + return; + } + + } + + public void deleteLoan() { + Bitacora bitacora = new Bitacora(); + Loan temp = loanCtrl.getLoanById(selectedLoan.getId()); + bitacora.setAction("Eliminar préstamo"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setDescription("El préstamo del cliente " + temp.getCustomer().getFullName() + " del asesor " + temp.getAsesor() + " con monto a prestar de $" + temp.getLoanType().getPayment() + " se cambió a estatus 'Eliminado' "); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + loanCtrl.updateLoanByStatusWeb(LoanStatus.DELETED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.DELETED, selectedLoan); + loan.remove(selectedLoan); + selectedLoan = null; + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Eliminado' de forma correcta."); + } + + public void changeApprovedStatus() { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Cambio de estatus a aprobado"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setDescription("El préstamo del cliente " + loanUpdate.getCustomer().getFullName() + " del asesor " + loanUpdate.getAsesor() + " con monto a prestar de $" + loanUpdate.getLoanType().getPayment() + " " + + "se cambia a estatus Aprobado"); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + loanCtrl.updateLoanByStatusWeb(LoanStatus.APPROVED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.APPROVED, selectedLoan); + loan.clear(); + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + loan = customerCtrl.findLoanByCustomer(customerId); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Aprobado' de forma correcta."); + } + + public void changeBonusNewCustomer() { + loanCtrl.updateBonusNewCustomer(ActiveStatus.ENEBLED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loan.clear(); + loan = customerCtrl.findLoanByCustomer(customerId); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "El préstamo empezó a contar como bono de cliente nuevo."); + } + + public void removeBonusNewCustomer() { + loanCtrl.updateBonusNewCustomer(ActiveStatus.DISABLED, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loan.clear(); + loan = customerCtrl.findLoanByCustomer(customerId); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de bono", "El préstamo ya no contará como bono de cliente nuevo."); + } + + public void updateReleaseDate() { + SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yyyy"); + Date date = new Date(); + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + loanUpdate.setCreatedOn(date); + loanCtrl.updateLoan(loanUpdate); + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Cambio de fecha de liberación a " + sdf.format(date)); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(date); + bitacora.setDescription("El préstamo del cliente " + loanUpdate.getCustomer().getFullName() + + " del asesor " + loanUpdate.getAsesor() + + " con monto a prestar de $" + loanUpdate.getLoanType().getPayment() + + " cambia a fecha de liberación del día de hoy " + sdf.format(date)); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + loan.clear(); + loan = customerCtrl.findLoanByCustomer(customerId); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Fecha de liberación", "Se actualizó la fecha de liberación al día de hoy " + sdf.format(date)); + } + + public void allowRenew() { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + loanCtrl.deleteLoanFeeNotificationByLoan(loanUpdate); + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Se eliminan las multas del préstamo " + selectedLoan.getId()); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setDescription("El préstamo del cliente " + loanUpdate.getCustomer().getFullName() + + " del asesor " + loanUpdate.getAsesor() + + " con monto a prestar de $" + loanUpdate.getLoanType().getPayment() + + " se eliminaron las multas"); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + loan.clear(); + loan = customerCtrl.findLoanByCustomer(customerId); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Multas eliminadas", "Se eliminó la/las multas del préstamo correctamente."); + } + + public void changeFrozenStatus(boolean freeze) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + Bitacora bitacora = new Bitacora(); + if (freeze) { + bitacora.setAction("Cambio de estatus a congelado"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setDescription("El préstamo del cliente " + loanUpdate.getCustomer().getFullName() + " del asesor " + loanUpdate.getAsesor() + " con monto a prestar de $" + loanUpdate.getLoanType().getPayment() + " " + + "se cambia a estatus Congelado"); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + + loanUpdate.setFrozen(ActiveStatus.ENEBLED); + loanCtrl.updateLoan(loanUpdate); + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Congelado' de forma correcta."); + } else { + bitacora.setAction("Cambio de estatus a descongelado"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setDescription("El préstamo del cliente " + loanUpdate.getCustomer().getFullName() + " del asesor " + loanUpdate.getAsesor() + " con monto a prestar de $" + loanUpdate.getLoanType().getPayment() + " " + + "se cambia a estatus Desongelado"); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + + loanUpdate.setFrozen(ActiveStatus.DISABLED); + loanCtrl.updateLoan(loanUpdate); + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Descongelado' de forma correcta."); + } + + loan.clear(); + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + loan = customerCtrl.findLoanByCustomer(customerId); + selectedLoan = null; + } + + public void changeFinishStatus() { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Cambio de estatus a finalizado"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setDescription("El préstamo del cliente " + loanUpdate.getCustomer().getFullName() + " del asesor " + loanUpdate.getAsesor() + " con monto a prestar de $" + loanUpdate.getLoanType().getPayment() + " " + + "se cambia a estatus Finalizado"); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + loanCtrl.updateLoanByStatusWeb(LoanStatus.FINISH, selectedLoan.getId(), getLoggedUser().getUser().getId()); + loanCtrl.updateLoanByUserByStatus(LoanStatus.FINISH, selectedLoan); + loan.clear(); + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + loan = customerCtrl.findLoanByCustomer(customerId); + selectedLoan = null; + + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de estatus", "El préstamo se cambió a estatus 'Terminado' de forma correcta."); + } + + public void changeOwner() { + /*if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) { + selectedLoan = null; + userId = ""; + showMessage(FacesMessage.SEVERITY_WARN, "No se puede modificar propietario", "Solo puedes cambiar de propietario a préstamos en estatus Aprobados"); + return; + }*/ + LoanByUser old = new LoanByUser(); + old = loanCtrl.getLoanByUserByIdLoan(selectedLoan); + + LoanByUser loanByUser = new LoanByUser(); + LoanByUserId idRelation = new LoanByUserId(); + + idRelation.setIdLoan(selectedLoan.getId()); + idRelation.setIdUser(userId); + + loanByUser.setId(idRelation); + loanByUser.setComments(old.getComments()); + loanByUser.setCreatedBy(old.getCreatedBy()); + loanByUser.setLoanByUserStatus(old.getLoanByUserStatus()); + loanByUser.setLoan(selectedLoan); + loanByUser.setCreatedOn(new Date()); + loanByUser.setOrderInList(old.getOrderInList()); + loanByUser.setOwnerLoan(OwnerLoan.CURRENT_OWNER); + loanByUser.setUser(new User(userId)); + if (loanCtrl.deleteLoanByUser(old)) { + loanCtrl.saveLoanByUser(loanByUser); + selectedLoan = null; + userId = ""; + loan.clear(); + loan = customerCtrl.findLoanByCustomer(customerId); + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de propietario", "Se reasignó el préstamo de forma correcta."); + } else { + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_ERROR, "Cambio de propietario", "Ocurrió un error al intentar hacer el cambio de propietario."); + } + } + + public void changeOwnerToJuridical(){ + // Id de usuario laura.marquez + String idUser = "aad0c673-eb93-11ea-b7e1-02907d0fb4e6"; +// String idUser = "3338ce43-24fc-4d35-b51e-d8ec848937fc"; + + Loan loanUpdate = selectedLoanJuridical; + loanUpdate.setJuridicalDate(new Date()); + + loanCtrl.updateLoan(loanUpdate); + + LoanByUser old = new LoanByUser(); + old = loanCtrl.getLoanByUserByIdLoan(selectedLoanJuridical); + + LoanByUser loanByUser = new LoanByUser(); + LoanByUserId idRelation = new LoanByUserId(); + + idRelation.setIdLoan(selectedLoanJuridical.getId()); + idRelation.setIdUser(idUser); + + loanByUser.setId(idRelation); + loanByUser.setComments(old.getComments()); + loanByUser.setCreatedBy(old.getCreatedBy()); + loanByUser.setLoanByUserStatus(old.getLoanByUserStatus()); + loanByUser.setLoan(selectedLoanJuridical); + loanByUser.setCreatedOn(new Date()); + loanByUser.setOrderInList(old.getOrderInList()); + loanByUser.setOwnerLoan(OwnerLoan.CURRENT_OWNER); + loanByUser.setUser(new User(idUser)); + if (loanCtrl.deleteLoanByUser(old)) { + loanCtrl.saveLoanByUser(loanByUser); + selectedLoanJuridical = null; + loanJuridical.clear(); + getLoansJuridical(); + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de propietario", "Se mandó el préstamo a jurídico."); + } else { + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_ERROR, "Cambio de propietario", "Ocurrió un error al intentar hacer el cambio de propietario."); + } + + + selectedLoanJuridical = null; + } + + public void addPayment() { + if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) { + LoanDetails detail = new LoanDetails(); + detail.setComments(comments); + detail.setCreatedBy(getLoggedUser().getUser().getId()); + detail.setCreatedOn(new Date()); + detail.setLoan(selectedLoan); + detail.setLoanDetailsType(LoanDetailsType.PAYMENT); + detail.setPaymentAmount(payment); + detail.setPeopleType(PeopleType.CUSTOMER); + detail.setTransferStatus(TransferStatus.AUTHORIZED); + detail.setTransferNumber("N/A"); + detail.setReferenceNumber(selectedLoan.getLastReferenceNumber() + 1); + detail.setUser(new User(userId)); + if (loanCtrl.saveLoanDetail(detail)) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + loanUpdate.setAmountPaid(loanUpdate.getAmountPaid().add(payment)); + loanUpdate.setLastReferenceNumber(loanUpdate.getLastReferenceNumber() + 1); + if (loanUpdate.getAmountToPay().compareTo(loanUpdate.getAmountPaid()) == 0) { + + LoanByUser loanByUser = loanCtrl.getLoanByUserByIdLoan(loanUpdate); + loanByUser.setLoanByUserStatus(LoanStatus.FINISH); + if (loanCtrl.updateLoanByUser(loanByUser)) { + loanUpdate.setLoanStatus(LoanStatus.FINISH); + } + } + loanCtrl.updateLoan(loanUpdate); + loan.clear(); + loan = customerCtrl.findLoanByCustomer(customerId); + selectedLoan = null; + userId = ""; + comments = ""; + payment = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_INFO, "Agregar abono", "Se agregó el abono de forma correcta."); + } + } else { + selectedLoan = null; + userId = ""; + comments = ""; + payment = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_WARN, "No se puede abonar", "Solo puedes abonar préstamos en estatus Aprobados o Pendientes por renovación"); + return; + } + + } + + public void addDeposit() { + if (selectedLoan.getLoanStatus() == LoanStatus.APPROVED || selectedLoan.getLoanStatus() == LoanStatus.PENDING_RENOVATION) { + LoanDetails detail = new LoanDetails(); + BigDecimal amountWithoutIVA = payment.divide(new BigDecimal(1.16),RoundingMode.FLOOR); + + amountWithoutIVA = amountWithoutIVA.setScale(2, RoundingMode.FLOOR); + + StringBuilder commentsTemp = new StringBuilder(comments); + + commentsTemp.append(". Monto de transferencia con IVA: $"); + commentsTemp.append(payment); + commentsTemp.append(", monto de transferencia sin IVA: $"); + commentsTemp.append(amountWithoutIVA); + + detail.setComments(comments); + detail.setCreatedBy(getLoggedUser().getUser().getId()); + detail.setCreatedOn(new Date()); + detail.setLoan(selectedLoan); + detail.setLoanDetailsType(LoanDetailsType.TRANSFER); + detail.setPaymentAmount(amountWithoutIVA); + detail.setPeopleType(PeopleType.CUSTOMER); + detail.setTransferStatus(TransferStatus.PENDING); + detail.setTransferNumber("N/A"); + detail.setReferenceNumber(selectedLoan.getLastReferenceNumber() + 1); + detail.setUser(new User(userId)); + if (loanCtrl.saveLoanDetail(detail)) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + loanUpdate.setAmountPaid(loanUpdate.getAmountPaid().add(payment)); + loanUpdate.setLastReferenceNumber(loanUpdate.getLastReferenceNumber() + 1); + if (loanUpdate.getAmountToPay().compareTo(loanUpdate.getAmountPaid()) == 0) { + + LoanByUser loanByUser = loanCtrl.getLoanByUserByIdLoan(loanUpdate); + loanByUser.setLoanByUserStatus(LoanStatus.FINISH); + if (loanCtrl.updateLoanByUser(loanByUser)) { + loanUpdate.setLoanStatus(LoanStatus.FINISH); + } + } + loanCtrl.updateLoan(loanUpdate); + loan.clear(); + loan = customerCtrl.findLoanByCustomer(customerId); + selectedLoan = null; + userId = ""; + comments = ""; + payment = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_INFO, "Agregar depósito", "Se agregó el depósito de forma correcta."); + } + } else { + selectedLoan = null; + userId = ""; + comments = ""; + payment = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_WARN, "No se puede abonar", "Solo puedes abonar préstamos en estatus Aprobados o Pendientes por renovación"); + return; + } + + } + + public void addFee() { + if (selectedLoan.getLoanStatus() != LoanStatus.APPROVED) { + selectedLoan = null; + userId = ""; + comments = ""; + fee = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_WARN, "No se puede multar", "Solo puedes multar préstamos en estatus Aprobados"); + return; + } + LoanDetails detail = new LoanDetails(); + detail.setComments(comments); + detail.setCreatedBy(getLoggedUser().getUser().getId()); + detail.setCreatedOn(new Date()); + detail.setLoan(selectedLoan); + detail.setLoanDetailsType(LoanDetailsType.FEE); + detail.setPaymentAmount(fee); + detail.setPeopleType(PeopleType.CUSTOMER); + detail.setTransferStatus(TransferStatus.AUTHORIZED); + detail.setTransferNumber("N/A"); + detail.setFeeStatus(FeeStatus.TO_PAY); + detail.setReferenceNumber(selectedLoan.getLastReferenceNumber() + 1); + detail.setUser(new User(userId)); + if (loanCtrl.saveLoanDetail(detail)) { + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + loanUpdate.setAmountToPay(loanUpdate.getAmountToPay().add(fee)); + loanUpdate.setLastReferenceNumber(loanUpdate.getLastReferenceNumber() + 1); + loanCtrl.updateLoan(loanUpdate); + + LoanFeeNotification notification = new LoanFeeNotification(); + notification.setCreatedBy(getLoggedUser().getUser().getId()); + notification.setCreatedOn(new Date()); + notification.setLoan(loanUpdate); + notification.setUser(new User(userId)); + notification.setNotificationNumber(loanUpdate.getTotalFeeByLoan() + 1); + loanCtrl.saveLoanNotificationFee(notification); + + loan.clear(); + loan = customerCtrl.findLoanByCustomer(customerId); + selectedLoan = null; + userId = ""; + comments = ""; + fee = BigDecimal.ZERO; + showMessage(FacesMessage.SEVERITY_INFO, "Agregar multa", "Se agregó la multa de forma correcta."); + } + } + + public void changeLoanType() { + if (selectedLoan.getLoanStatus() != LoanStatus.TO_DELIVERY && selectedLoan.getLoanStatus() != LoanStatus.APPROVED) { + loanTypeId = ""; + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_WARN, "No se puede cambiar el tipo de préstamo", "Solo puedes cambiar el monto a prestar de préstamos en estatus Por liberar"); + return; + } + Loan loanUpdate = loanCtrl.getLoanById(selectedLoan.getId()); + LoanType loanTypeUpdate = loanTypeCtrl.getLoanTypeById(loanTypeId); + Bitacora bitacora = new Bitacora(); + bitacora.setAction("Cambio de monto de préstamo"); + bitacora.setCommentsUser(commentsBitacora); + bitacora.setCreatedBy(getLoggedUser().getUser().getId()); + bitacora.setCreatedOn(new Date()); + bitacora.setDescription("El préstamo del cliente " + loanUpdate.getCustomer().getFullName() + " del asesor " + loanUpdate.getAsesor() + " con monto a prestar de $" + loanUpdate.getLoanType().getPayment() + " " + + "se cambia a monto de préstamo por " + loanTypeUpdate.getLoanTypeName()); + bitacora.setNameUser(getLoggedUser().getUser().getUserName()); + bitacora.setOffice(new Office(getLoggedUser().getOffice().getId())); + + loanUpdate.setLoanType(new LoanType(loanTypeId)); + loanUpdate.setAmountToPay(loanTypeUpdate.getPaymentTotal()); + if (loanCtrl.updateLoan(loanUpdate)) { + loan.clear(); + loan = customerCtrl.findLoanByCustomer(customerId); + loanTypeId = ""; + bitacoraCtrl.saveBitacora(bitacora); + commentsBitacora = ""; + selectedLoan = null; + showMessage(FacesMessage.SEVERITY_INFO, "Cambio de tipo de préstamo", "El préstamo se cambió correctamente"); + } + + } + + public void CustomerClassification(String colorClassification) + { + try { + customerService.updatePeopleByClassification( CustomerClassification.valueOf(colorClassification), getSelectedLoanFinished().getCustomerId(), getLoggedUser().getUser().getId()); + + showMessage(FacesMessage.SEVERITY_INFO, "Cliente", "Se clasificó correctamente."); + } catch (Exception e) { + showMessage(FacesMessage.SEVERITY_ERROR, "Cliente", "No se clasificó correctamente."); + } + } + + public ClosingDayController getClosingDayCtrl() { + return closingDayCtrl; + } + + public void setClosingDayCtrl(ClosingDayController closingDayCtrl) { + this.closingDayCtrl = closingDayCtrl; + } + + public DashboardController getDashboardCtrl() { + return dashboardCtrl; + } + + public void setDashboardCtrl(DashboardController dashboardCtrl) { + this.dashboardCtrl = dashboardCtrl; + } + + public BigDecimal getTotalAmountDaily() { + return totalAmountDaily; + } + + public void setTotalAmountDaily(BigDecimal totalAmountDaily) { + this.totalAmountDaily = totalAmountDaily; + } + + public BigDecimal getTotalTransferSenderDaily() { + return totalTransferSenderDaily; + } + + public void setTotalTransferSenderDaily(BigDecimal totalTransferSenderDaily) { + this.totalTransferSenderDaily = totalTransferSenderDaily; + } + + public BigDecimal getTotalTransferReceiverDaily() { + return totalTransferReceiverDaily; + } + + public void setTotalTransferReceiverDaily(BigDecimal totalTransferReceiverDaily) { + this.totalTransferReceiverDaily = totalTransferReceiverDaily; + } + + public BigDecimal getTotalMoneyDailyDaily() { + return totalMoneyDailyDaily; + } + + public void setTotalMoneyDailyDaily(BigDecimal totalMoneyDailyDaily) { + this.totalMoneyDailyDaily = totalMoneyDailyDaily; + } + + public BigDecimal getTotalDeliveryDaily() { + return totalDeliveryDaily; + } + + public void setTotalDeliveryDaily(BigDecimal totalDeliveryDaily) { + this.totalDeliveryDaily = totalDeliveryDaily; + } + + public BigDecimal getTotalFinalDaily() { + return totalFinalDaily; + } + + public void setTotalFinalDaily(BigDecimal totalFinalDaily) { + this.totalFinalDaily = totalFinalDaily; + } + + public BigDecimal getTotalCajaDaily() { + return totalCajaDaily; + } + + public void setTotalCajaDaily(BigDecimal totalCajaDaily) { + this.totalCajaDaily = totalCajaDaily; + } + + public int getNumPending() { + return numPending; + } + + public void setNumPending(int numPending) { + this.numPending = numPending; + } + + public int getNumApproved() { + return numApproved; + } + + public void setNumApproved(int numApproved) { + this.numApproved = numApproved; + } + + public int getNumFinish() { + return numFinish; + } + + public void setNumFinish(int numFinish) { + this.numFinish = numFinish; + } + + public int getNumRejected() { + return numRejected; + } + + public void setNumRejected(int numRejected) { + this.numRejected = numRejected; + } + + public int getNumToDelivery() { + return numToDelivery; + } + + public void setNumToDelivery(int numToDelivery) { + this.numToDelivery = numToDelivery; + } + + public BigDecimal getTotalExpectedToday() { + return totalExpectedToday; + } + + public void setTotalExpectedToday(BigDecimal totalExpectedToday) { + this.totalExpectedToday = totalExpectedToday; + } + + public LoanController getLoanCtrl() { + return loanCtrl; + } + + public void setLoanCtrl(LoanController loanCtrl) { + this.loanCtrl = loanCtrl; + } + + public PieChartModel getLivePieModel() { + + livePieModel.getData().put("Total cobrado", totalAmountDaily); + livePieModel.getData().put("Total esperado por cobro", totalExpectedToday.subtract(totalAmountDaily)); + + livePieModel.setTitle("Gráfica de recuperación diaria"); + livePieModel.setLegendPosition("ne"); + + return livePieModel; + } + + public void setLivePieModel(PieChartModel livePieModel) { + this.livePieModel = livePieModel; + } + + public PieChartModel getPieResumenCaja() { + pieResumenCaja.getData().put("Total del día", totalFinalDaily.subtract(totalCajaDaily)); + pieResumenCaja.getData().put("Total en caja", totalCajaDaily); + + pieResumenCaja.setTitle("Gráfica de recuperación en caja"); + pieResumenCaja.setLegendPosition("ne"); + + return pieResumenCaja; + } + + public void setPieResumenCaja(PieChartModel pieResumenCaja) { + this.pieResumenCaja = pieResumenCaja; + } + + public BarChartModel getBarResumenLoans() { + return barResumenLoans; + } + + public void setBarResumenLoans(BarChartModel barResumenLoans) { + this.barResumenLoans = barResumenLoans; + } + + public BigDecimal getTotalOtherExpenseDaily() { + return totalOtherExpenseDaily; + } + + public void setTotalOtherExpenseDaily(BigDecimal totalOtherExpenseDaily) { + this.totalOtherExpenseDaily = totalOtherExpenseDaily; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public List getAdvances() { + return advances; + } + + public void setAdvances(List advances) { + this.advances = advances; + } + + public List getCustomersWithoutRenovation() { + return customersWithoutRenovation; + } + + public void setCustomersWithoutRenovation(List customersWithoutRenovation) { + this.customersWithoutRenovation = customersWithoutRenovation; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public List getAdvancesDetail() { + return advancesDetail; + } + + public void setAdvancesDetail(List advancesDetail) { + this.advancesDetail = advancesDetail; + } + + public List getUsers() { + return users; + } + + public void setUsers(List users) { + this.users = users; + } + + public CustomerController getCustomerCtrl() { + return customerCtrl; + } + + public void setCustomerCtrl(CustomerController customerCtrl) { + this.customerCtrl = customerCtrl; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public List getCustomers() { + return customers; + } + + public void setCustomers(List customers) { + this.customers = customers; + } + + public List getLoan() { + return loan; + } + + public void setLoan(List loan) { + this.loan = loan; + } + + public List getLoanJuridical() { + return loanJuridical; + } + + public void setLoanJuridical(List loanJuridical) { + this.loanJuridical = loanJuridical; + } + + public List getLoanZero() { + return loanZero; + } + + public void setLoanZero(List loanZero) { + this.loanZero = loanZero; + } + + public List getLoanFinished() { + return loanFinished; + } + + public void setLoanFinished(List loanFinished) { + this.loanFinished = loanFinished; + } + + public Loan getSelectedLoan() { + return selectedLoan; + } + + public void setSelectedLoan(Loan selectedLoan) { + this.selectedLoan = selectedLoan; + } + + public Loan getSelectedLoanJuridical() { + return selectedLoanJuridical; + } + + public void setSelectedLoanJuridical(Loan selectedLoanJuridical) { + this.selectedLoanJuridical = selectedLoanJuridical; + } + + public LoanDetailZeroView getSelectedLoanZero() { + return selectedLoanZero; + } + + public void setSelectedLoanZero(LoanDetailZeroView selectedLoanZero) { + this.selectedLoanZero = selectedLoanZero; + } + + public LoanFinishedView getSelectedLoanFinished() { + return selectedLoanFinished; + } + + public void setSelectedLoanFinished(LoanFinishedView selectedLoanFinished) { + this.selectedLoanFinished = selectedLoanFinished; + } + + public BigDecimal getPayment() { + return payment; + } + + public void setPayment(BigDecimal payment) { + this.payment = payment; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public BigDecimal getFee() { + return fee; + } + + public void setFee(BigDecimal fee) { + this.fee = fee; + } + + public String getLoanTypeId() { + return loanTypeId; + } + + public void setLoanTypeId(String loanTypeId) { + this.loanTypeId = loanTypeId; + } + + public LoanTypeController getLoanTypeCtrl() { + return loanTypeCtrl; + } + + public void setLoanTypeCtrl(LoanTypeController loanTypeCtrl) { + this.loanTypeCtrl = loanTypeCtrl; + } + + public List getLoanType() { + return loanType; + } + + public void setLoanType(List loanType) { + this.loanType = loanType; + } + + public RouteController getRouteCtrl() { + return routeCtrl; + } + + public void setRouteCtrl(RouteController routeCtrl) { + this.routeCtrl = routeCtrl; + } + + public String getRouteId() { + return routeId; + } + + public void setRouteId(String routeId) { + this.routeId = routeId; + } + + public List getRoute() { + return route; + } + + public void setRoute(List route) { + this.route = route; + } + + public BigDecimal getTotalDepositDaily() { + return totalDepositDaily; + } + + public void setTotalDepositDaily(BigDecimal totalDepositDaily) { + this.totalDepositDaily = totalDepositDaily; + } + + public BigDecimal getTotalColocationApproved() { + return totalColocationApproved; + } + + public void setTotalColocationApproved(BigDecimal totalColocationApproved) { + this.totalColocationApproved = totalColocationApproved; + } + + public BigDecimal getTotalColocationToDelivery() { + return totalColocationToDelivery; + } + + public void setTotalColocationToDelivery(BigDecimal totalColocationToDelivery) { + this.totalColocationToDelivery = totalColocationToDelivery; + } + + public BigDecimal getTotalDiference() { + return totalDiference; + } + + public void setTotalDiference(BigDecimal totalDiference) { + this.totalDiference = totalDiference; + } + + public BigDecimal getTotalPorcentajeDiference() { + return totalPorcentajeDiference; + } + + public void setTotalPorcentajeDiference(BigDecimal totalPorcentajeDiference) { + this.totalPorcentajeDiference = totalPorcentajeDiference; + } + + public BigDecimal getGeneralExpectedWeek() { + return GeneralExpectedWeek; + } + + public void setGeneralExpectedWeek(BigDecimal GeneralExpectedWeek) { + this.GeneralExpectedWeek = GeneralExpectedWeek; + } + + public BigDecimal getGeneralReportedWeek() { + return generalReportedWeek; + } + + public void setGeneralReportedWeek(BigDecimal generalReportedWeek) { + this.generalReportedWeek = generalReportedWeek; + } + + public List getEndorsement() { + return endorsement; + } + + public void setEndorsement(List endorsement) { + this.endorsement = endorsement; + } + + public EndorsementController getEndorsementCtrl() { + return endorsementCtrl; + } + + public void setEndorsementCtrl(EndorsementController endorsementCtrl) { + this.endorsementCtrl = endorsementCtrl; + } + + public String getEndorsementId() { + return endorsementId; + } + + public void setEndorsementId(String endorsementId) { + this.endorsementId = endorsementId; + } + + public List getLoanEndorsement() { + return loanEndorsement; + } + + public void setLoanEndorsement(List loanEndorsement) { + this.loanEndorsement = loanEndorsement; + } + + public Loan getSelectedLoanEndorsement() { + return selectedLoanEndorsement; + } + + public void setSelectedLoanEndorsement(Loan selectedLoanEndorsement) { + this.selectedLoanEndorsement = selectedLoanEndorsement; + } + + public BitacoraController getBitacoraCtrl() { + return bitacoraCtrl; + } + + public void setBitacoraCtrl(BitacoraController bitacoraCtrl) { + this.bitacoraCtrl = bitacoraCtrl; + } + + public String getCommentsBitacora() { + return commentsBitacora; + } + + public void setCommentsBitacora(String commentsBitacora) { + this.commentsBitacora = commentsBitacora; + } + + public LazyDataModel getCustomersWithoutRenovationPaginator() { + return customersWithoutRenovationPaginator; + } + + public void setCustomersWithoutRenovationPaginator(LazyDataModel customersWithoutRenovationPaginator) { + this.customersWithoutRenovationPaginator = customersWithoutRenovationPaginator; + } + + public GenericValidationController getGenericValidateController() { + return genericValidateController; + } + + public void setGenericValidateController(GenericValidationController genericController) { + this.genericValidateController = genericController; + } + + public Date getLastStableSmallBox() { + return lastStableSmallBox; + } + + public void setLastStableSmallBox(Date lastStableSmallBox) { + this.lastStableSmallBox = lastStableSmallBox; + } + + @Inject + private CustomerWithoutRenovationViewService customerWithoutRenovationViewService; + + private ClosingDayController closingDayCtrl; + private DashboardController dashboardCtrl; + private LoanController loanCtrl; + private GenericController genericCtrl; + private CustomerController customerCtrl; + private EndorsementController endorsementCtrl; + private LoanTypeController loanTypeCtrl; + private RouteController routeCtrl; + private BitacoraController bitacoraCtrl; + + private BigDecimal totalAmountDaily; + private BigDecimal totalTransferSenderDaily; + private BigDecimal totalTransferReceiverDaily; + private BigDecimal totalMoneyDailyDaily; + private BigDecimal totalDeliveryDaily; + private BigDecimal totalFinalDaily; + private BigDecimal totalCajaDaily; + private BigDecimal totalOtherExpenseDaily; + private BigDecimal totalDepositDaily; + + private BigDecimal totalExpectedToday; + + private BigDecimal payment; + private BigDecimal fee; + + private int numPending; + private int numApproved; + private int numFinish; + private int numRejected; + private int numToDelivery; + private String userId; + private String customerId; + private String endorsementId; + private String comments; + private String loanTypeId; + private String routeId; + private String commentsBitacora; + private List users; + private List customers; + private List endorsement; + private List route; + + private PieChartModel livePieModel; + private PieChartModel pieResumenCaja; + private BarChartModel barResumenLoans; + + private List advances; + private List customersWithoutRenovation; + private LazyDataModel customersWithoutRenovationPaginator; + private List advancesDetail; + private List loan; + private List loanJuridical; + private List loanZero; + private List loanFinished; + private List loanEndorsement; + private List loanType; + + private BigDecimal totalColocationApproved; + private BigDecimal totalColocationToDelivery; + private BigDecimal totalDiference; + private BigDecimal totalPorcentajeDiference; + private BigDecimal GeneralExpectedWeek; + private BigDecimal generalReportedWeek; + + private Loan selectedLoan; + private Loan selectedLoanJuridical; + private LoanDetailZeroView selectedLoanZero; + private LoanFinishedView selectedLoanFinished; + private Loan selectedLoanEndorsement; + + private GenericValidationController genericValidateController; + private Date lastStableSmallBox; + private boolean stableSmallBoxToday; + + @Inject + private CustomerService customerService; + + @PostConstruct + public void init() { + livePieModel = new PieChartModel(); + pieResumenCaja = new PieChartModel(); + closingDayCtrl = new ClosingDayController(); + dashboardCtrl = new DashboardController(); + loanCtrl = new LoanController(); + genericCtrl = new GenericController(); + customerCtrl = new CustomerController(); + endorsementCtrl = new EndorsementController(); + loanTypeCtrl = new LoanTypeController(); + routeCtrl = new RouteController(); + bitacoraCtrl = new BitacoraController(); + commentsBitacora = ""; + setGenericValidateController(new GenericValidationController()); + setLastStableSmallBox(getGenericValidateController().lastStableSmallBoxByDate(getLoggedUser().getUser())); + + if (dashboardCtrl.verifyTotalExpectedPaymentDailyByUserCreatedByOffice(getLoggedUser().getOffice().getId()) == 0) { + getPaymentDailyExpectByUser(); + } + advances = fillAdvanceUserDaily(); + totalColocationApproved = BigDecimal.ZERO; + totalColocationToDelivery = BigDecimal.ZERO; + GeneralExpectedWeek = BigDecimal.ZERO; + generalReportedWeek = BigDecimal.ZERO; + totalDiference = BigDecimal.ZERO; + totalPorcentajeDiference = BigDecimal.ZERO; + + if (advances != null && !advances.isEmpty()) { + for (AdvanceUserDailyView advance : advances) { + totalColocationApproved = totalColocationApproved.add(advance.getColocationApproved()); + totalColocationToDelivery = totalColocationToDelivery.add(advance.getColocationToDelivery()); + GeneralExpectedWeek = GeneralExpectedWeek.add(advance.getTotalExpectedWeek()); + generalReportedWeek = generalReportedWeek.add(advance.getTotalReportedWeek()); + + } + totalDiference = generalReportedWeek.subtract(GeneralExpectedWeek); + if (GeneralExpectedWeek.compareTo(BigDecimal.ZERO) == 1) { + totalPorcentajeDiference = ((GeneralExpectedWeek.subtract(generalReportedWeek)).multiply(new BigDecimal(100))).divide(GeneralExpectedWeek, 2, RoundingMode.HALF_UP); + } else { + totalPorcentajeDiference = BigDecimal.ZERO; + } + + } + customersWithoutRenovation = findAllCustomerWithOutRenovationByOffice(); + listenerCustomerWithoutRenovationView(); + users = genericCtrl.getAllUsersByOffice(getLoggedUser().getOffice().getId()); + customers = customerCtrl.fillCustomersDatatable(getLoggedUser().getOffice().getId()); + endorsement = endorsementCtrl.fillEndorsementsDatatable(getLoggedUser().getOffice().getId()); + loanType = loanTypeCtrl.fillLoanTypeDatatable(getLoggedUser().getOffice().getId()); + route = routeCtrl.fillRoutesDatatable(getLoggedUser().getOffice().getId()); + getResumenDaily(); + getResumenLoans(); + getLoansJuridical(); + getLoansZero(); + } + + public boolean getAction( ) { + Date date = new Date(); + System.out.println("Fecha: " + date); + if (genericCtrl.existStableSmallBoxByCreatedOn(date)) { + return false; + } + return true; + } + + private void listenerCustomerWithoutRenovationView() { + try { + setCustomersWithoutRenovationPaginator( + new LazyDataModel() { + + private List listOfData; + + @Override + public List load(int first, int pageSize, String sortField, SortOrder sortOrder, Map filterBy) { + String generalSearch = (null != filterBy && !filterBy.isEmpty() && null != filterBy.get("globalFilter") && !filterBy.get("globalFilter").toString().equals("")) + ? "%" + filterBy.get("globalFilter").toString() + "%" + : ""; + + if (null != filterBy) { + filterBy.remove("globalFilter"); + } + + Long total = customerWithoutRenovationViewService + .countAllCustomerWithOutRenovationByOfficePaginator( + getLoggedUser().getOffice().getId(), + generalSearch, + filterBy); + + setRowCount(total.intValue()); + + listOfData = customerWithoutRenovationViewService + .findAllCustomerWithOutRenovationByOfficePaginator( + getLoggedUser().getOffice().getId(), + first, + pageSize, + generalSearch, + sortField, + sortOrder.toString().equals("ASCENDING") ? "ASC" : "DESC", + filterBy); + + return listOfData; + } + + @Override + public String getRowKey(CustomerWithoutRenovationView selectedRow) { + return selectedRow.getId(); + } + + @Override + public CustomerWithoutRenovationView getRowData(String rowKey) { + return listOfData + .stream() + .filter(rowData -> rowKey.equals(rowData.getId())) + .findFirst() + .orElse(null); + } + + }); + } catch (Exception e) { + } + } + + } diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/LoanDetailBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/LoanDetailBean.java new file mode 100644 index 0000000..292b363 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/LoanDetailBean.java @@ -0,0 +1,245 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.dashboard; + +import com.arrebol.apc.controller.admin.CustomerController; +import com.arrebol.apc.controller.admin.EndorsementController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.enums.LoanDetailsType; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named(value = "loanDetailManager") +@ViewScoped +public class LoanDetailBean extends GenericBean implements Serializable, Datatable { + + public List getDetails(String id) { + try { + loanDetails = loanCtrl.getLoanDetailsbyId(id); + getSaldoInsolutoAbono(); + } catch (Exception e) { + } + return null == loanDetails ? new ArrayList<>() : loanDetails; + } + + public void getSaldoInsolutoAbono( ) { + Double sumaAbonosAnteriores; + Double totalAPagar; + Double saldoInsoluto; + Double saldoMultas; + // + for (LoanDetails detail : loanDetails) { + sumaAbonosAnteriores = loanDetails.stream().filter(p -> p.getReferenceNumber() <= detail.getReferenceNumber() && !p.getLoanDetailsType().equals(LoanDetailsType.FEE) ) + .mapToDouble(LoanDetails::getAbonoD) + .sum(); + saldoMultas = loanDetails.stream().filter(p -> p.getReferenceNumber() <= detail.getReferenceNumber() && p.getLoanDetailsType().equals(LoanDetailsType.FEE)) + .mapToDouble(LoanDetails::getAbonoD) + .sum(); + + totalAPagar = detail.getLoan().getLoanType().getPaymentTotal().doubleValue(); + saldoInsoluto = totalAPagar - sumaAbonosAnteriores + saldoMultas; + + detail.setSaldoInsoluto(new BigDecimal(saldoInsoluto)); + } + } + + public People getCustomerDetail(String peopleId) { + return customerCtrl.findPeopleById(peopleId); + } + + public List getLoanByCustomer(String peopleId) { + return customerCtrl.findLoanByCustomer(peopleId); + } + + public List getLoanByEndorsement(String peopleId) { + return endorsementCtrl.findLoanByEndorsement(peopleId); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public CustomerController getCustomerCtrl() { + return customerCtrl; + } + + public void setCustomerCtrl(CustomerController customerCtrl) { + this.customerCtrl = customerCtrl; + } + + public People getCustomer() { + return customer; + } + + public void setCustomer(People customer) { + this.customer = customer; + } + + public List getLoanCustomer() { + return loanCustomer; + } + + public void setLoanCustomer(List loanCustomer) { + this.loanCustomer = loanCustomer; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public LoanController getLoanCtrl() { + return loanCtrl; + } + + public void setLoanCtrl(LoanController loanCtrl) { + this.loanCtrl = loanCtrl; + } + + public String getLoanId() { + return loanId; + } + + public void setLoanId(String loanId) { + this.loanId = loanId; + } + + public Loan getLoan() { + return loan; + } + + public void setLoan(Loan loan) { + this.loan = loan; + } + + public EndorsementController getEndorsementCtrl() { + return endorsementCtrl; + } + + public void setEndorsementCtrl(EndorsementController endorsementCtrl) { + this.endorsementCtrl = endorsementCtrl; + } + + public People getEndorsement() { + return endorsement; + } + + public void setEndorsement(People endorsement) { + this.endorsement = endorsement; + } + + public String getEndorsementId() { + return endorsementId; + } + + public void setEndorsementId(String endorsementId) { + this.endorsementId = endorsementId; + } + + public List getLoanEndorsement() { + return loanEndorsement; + } + + public void setLoanEndorsement(List loanEndorsement) { + this.loanEndorsement = loanEndorsement; + } + + public Loan getSelectedLoanCustomer() { + return selectedLoanCustomer; + } + + public void setSelectedLoanCustomer(Loan selectedLoanCustomer) { + this.selectedLoanCustomer = selectedLoanCustomer; + } + + public List getLoanDetails() { + return loanDetails; + } + + public void setLoanDetails(List loanDetails) { + this.loanDetails = loanDetails; + } + + private CustomerController customerCtrl; + private LoanController loanCtrl; + private EndorsementController endorsementCtrl; + + private People customer; + private Loan loan; + private People endorsement; + + private String customerId; + private String loanId; + private String endorsementId; + + private List loanEndorsement; + private List loanCustomer; + private Loan selectedLoanCustomer; + + private List loanDetails; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + customerCtrl = new CustomerController(); + loanCtrl = new LoanController(); + endorsementCtrl = new EndorsementController(); + + setLoanId(externalContext().getRequestParameterMap().get("selectedId")); + loan = loanCtrl.getLoanById(getLoanId()); + customer = loan.getCustomer(); + endorsement = loan.getEndorsement(); + loanEndorsement = getLoanByEndorsement(loan.getEndorsement().getId()); + loanCustomer = getLoanByCustomer(loan.getCustomer().getId()); + + if(loanCustomer.size() > 2){ + loanCustomer = getLoanByCustomer(loan.getCustomer().getId()).subList(0, 2); + } + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/LoanDetailEndorsementBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/LoanDetailEndorsementBean.java new file mode 100644 index 0000000..41a7e1d --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/dashboard/LoanDetailEndorsementBean.java @@ -0,0 +1,218 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.dashboard; + +import com.arrebol.apc.controller.admin.CustomerController; +import com.arrebol.apc.controller.admin.EndorsementController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.model.catalog.People; +import com.arrebol.apc.model.loan.Loan; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named(value = "loanDetailEndorsementManager") +@ViewScoped +public class LoanDetailEndorsementBean extends GenericBean implements Serializable, Datatable { + + public List getDetails(String id) { + try { + loanDetails = loanCtrl.getLoanDetailsbyId(id); + + } catch (Exception e) { + } + return null == loanDetails ? new ArrayList<>() : loanDetails; + } + + public People getCustomerDetail(String peopleId){ + return customerCtrl.findPeopleById(peopleId); + } + + public List getLoanByCustomer(String peopleId){ + return customerCtrl.findLoanByCustomer(peopleId); + } + + public List getLoanByEndorsement(String peopleId){ + return endorsementCtrl.findLoanByEndorsement(peopleId); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public CustomerController getCustomerCtrl() { + return customerCtrl; + } + + public void setCustomerCtrl(CustomerController customerCtrl) { + this.customerCtrl = customerCtrl; + } + + public People getCustomer() { + return customer; + } + + public void setCustomer(People customer) { + this.customer = customer; + } + + public List getLoanCustomer() { + return loanCustomer; + } + + public void setLoanCustomer(List loanCustomer) { + this.loanCustomer = loanCustomer; + } + + public String getCustomerId() { + return customerId; + } + + public void setCustomerId(String customerId) { + this.customerId = customerId; + } + + public LoanController getLoanCtrl() { + return loanCtrl; + } + + public void setLoanCtrl(LoanController loanCtrl) { + this.loanCtrl = loanCtrl; + } + + public String getLoanId() { + return loanId; + } + + public void setLoanId(String loanId) { + this.loanId = loanId; + } + + public Loan getLoan() { + return loan; + } + + public void setLoan(Loan loan) { + this.loan = loan; + } + + public EndorsementController getEndorsementCtrl() { + return endorsementCtrl; + } + + public void setEndorsementCtrl(EndorsementController endorsementCtrl) { + this.endorsementCtrl = endorsementCtrl; + } + + public People getEndorsement() { + return endorsement; + } + + public void setEndorsement(People endorsement) { + this.endorsement = endorsement; + } + + public String getEndorsementId() { + return endorsementId; + } + + public void setEndorsementId(String endorsementId) { + this.endorsementId = endorsementId; + } + + public List getLoanEndorsement() { + return loanEndorsement; + } + + public void setLoanEndorsement(List loanEndorsement) { + this.loanEndorsement = loanEndorsement; + } + + public Loan getSelectedLoanCustomer() { + return selectedLoanCustomer; + } + + public void setSelectedLoanCustomer(Loan selectedLoanCustomer) { + this.selectedLoanCustomer = selectedLoanCustomer; + } + + public List getLoanDetails() { + return loanDetails; + } + + public void setLoanDetails(List loanDetails) { + this.loanDetails = loanDetails; + } + + private CustomerController customerCtrl; + private LoanController loanCtrl; + private EndorsementController endorsementCtrl; + + private People customer; + private Loan loan; + private People endorsement; + + private String customerId; + private String loanId; + private String endorsementId; + + private List loanEndorsement; + private List loanCustomer; + private Loan selectedLoanCustomer; + + private List loanDetails; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + customerCtrl = new CustomerController(); + loanCtrl = new LoanController(); + endorsementCtrl = new EndorsementController(); + + setLoanId(externalContext().getRequestParameterMap().get("selectedId")); + loan = loanCtrl.getLoanById(getLoanId()); + customer = loan.getCustomer(); + endorsement = loan.getEndorsement(); + loanEndorsement = getLoanByEndorsement(loan.getEndorsement().getId()); + loanCustomer = getLoanByCustomer(loan.getCustomer().getId()); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/login/LoginBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/login/LoginBean.java new file mode 100644 index 0000000..961068c --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/login/LoginBean.java @@ -0,0 +1,220 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.login; + +import com.arrebol.apc.controller.login.LoginService; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.web.beans.GenericBean; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.security.APCSecure; +import java.io.IOException; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.annotation.PreDestroy; +import javax.enterprise.context.SessionScoped; +import javax.faces.application.FacesMessage; +import javax.faces.context.ExternalContext; +import javax.faces.context.FacesContext; +import javax.inject.Inject; +import javax.inject.Named; +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Named +@SessionScoped +public class LoginBean extends GenericBean implements Serializable { + + /** + * Authentication and authorization user. + * + * @throws IOException from {@link ExternalContext#redirect(String)} + */ + public void login() throws IOException { + ExternalContext externalContext = externalContext(); + HttpServletRequest request = (HttpServletRequest) externalContext.getRequest(); + + try { + logger.info("User: " + getUsername()); + request.login(getUsername() + getOfficeId(), getPassword()); + + User user = new User("", getUsername()); + Office office = new Office(getOfficeId(), getOfficeName()); + + setLoggedUser(loginService.findUserLoggedController(new UserByOffice(user, office))); + + externalContext.redirect(forwardUrl); + + } catch (ServletException | IOException e) { + logger.error("Login() - " + e, e); + //logout(); + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("error.access.title"), getBundlePropertyFile().getString("error.access.details")); + //showMessage(FacesMessage.SEVERITY_ERROR, "¡Acceso denegado!", "Verifica tus datos de ingreso."); + } catch (Exception e) { + logger.error("Login() - " + e, e); + //logout(); + showMessage(FacesMessage.SEVERITY_FATAL, getBundlePropertyFile().getString("fatal.access.title"), getBundlePropertyFile().getString("fatal.access.details")); + //showMessage(FacesMessage.SEVERITY_ERROR, "¡Acceso denegado!", "Por favor contacta a tu administrador."); + } + } + + /** + * Remove current user from session. + * + * @throws IOException from {@link ExternalContext#redirect(String)} + */ + public void logout() throws IOException { + try { + ExternalContext externalContext = externalContext(); + + externalContext.invalidateSession(); + externalContext.redirect(externalContext.getRequestContextPath() + LOGIN); + } catch (IOException e) { + logger.error("logout() - " + e, e); + } + } + + /** + * Check if currently user has the given role. + * + * @param role Role to be search. + * @return true if user has given role otherwise false.. + */ + public boolean isUserInRole(String role) { + FacesContext context = facesContext(); + ExternalContext externalContext = context.getExternalContext(); + + return externalContext.isUserInRole(role); + } + + /** + * + * @return + */ + private String extractRequestedUrlBeforeLogin() { + ExternalContext externalContext = externalContext(); + + String requestedUrl = (String) externalContext.getRequestMap().get(RequestDispatcher.FORWARD_REQUEST_URI); + if (null == requestedUrl) { + return externalContext.getRequestContextPath() + LOGIN; + } + + String queryString = (String) externalContext.getRequestMap().get(RequestDispatcher.FORWARD_QUERY_STRING); + + return requestedUrl + (queryString == null ? "" : "?" + queryString); + } + + /** + * Class contants. + */ + private static final long serialVersionUID = -6130715794722525144L; + + private static final String LOGIN = "/"; + + final Logger logger = LogManager.getLogger(LoginBean.class); + + /** + * Class variables. + */ + @Inject + private LoginService loginService; + + private String forwardUrl; + private String password; + private String username; + private String officeName; + private String officeId; + //private LoginController controller; + List offices; + + /** + * Contructors and pre/post contructors. + */ + @PostConstruct + public void init() { + try { + loadBundlePropertyFile(); + this.forwardUrl = extractRequestedUrlBeforeLogin(); + setOffices(loginService.getAllActiveOfficeController()); + } catch (Exception e) { + logger.error(e.getClass() + " --> " + e.getMessage(), e); + } + } + + @PreDestroy + public void finish() { + try { + logout(); + } catch (Exception e) { + logger.error(e.getClass() + " --> " + e.getMessage(), e); + } + } + + /** + * Getters and Setters. + * + * @return + */ + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = new APCSecure(APP, password).getPassword(); + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getOfficeName() { + try { + int index = offices.indexOf(new Office(officeId)); + officeName = offices.get(index).getOfficeName(); + } catch (Exception e) { + } + return officeName; + } + + public void setOfficeName(String officeName) { + this.officeName = officeName; + } + + public String getOfficeId() { + return officeId; + } + + public void setOfficeId(String officeId) { + this.officeId = officeId; + } + + public List getOffices() { + if (null == offices) { + offices = new ArrayList<>(); + } + return offices; + } + + public void setOffices(List offices) { + this.offices = offices; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/system/bitacora/BitacoraBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/bitacora/BitacoraBean.java new file mode 100644 index 0000000..fe6a465 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/bitacora/BitacoraBean.java @@ -0,0 +1,127 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.system.bitacora; + +import com.arrebol.apc.controller.BitacoraController; + +import com.arrebol.apc.model.system.logs.Bitacora; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.Calendar; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("bitacoraManager") +@ViewScoped +public class BitacoraBean extends GenericBean implements Serializable, Datatable { + + public void searchHistoricalAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setBitacora(fillDatatableBitacoraByDate()); + } + } catch (Exception e) { + } + } + + public void searchAllAction() { + try { + if (getStarDate().after(getEndDate())) { + showMessage(FacesMessage.SEVERITY_ERROR, getBundlePropertyFile().getString("generic.start.date"), getBundlePropertyFile().getString("generic.end.date.error")); + } else { + setBitacora(fillDatatableBitacora()); + } + } catch (Exception e) { + } + } + + public List fillDatatableBitacora() { + + return bitacoraCtrl.fillBitacoraDatatable(getLoggedUser().getOffice().getId()); + } + + public List fillDatatableBitacoraByDate() { + + return bitacoraCtrl.fillBitacoraDatatableByDate(getLoggedUser().getOffice().getId(), getStarDate(), getEndDate()); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + } + + @Override + public void deleteRow() { + + } + + public BitacoraController getBitacoraCtrl() { + return bitacoraCtrl; + } + + public void setBitacoraCtrl(BitacoraController bitacoraCtrl) { + this.bitacoraCtrl = bitacoraCtrl; + } + + public List getBitacora() { + return bitacora; + } + + public void setBitacora(List bitacora) { + this.bitacora = bitacora; + } + + public Bitacora getSelectedBitacora() { + return selectedBitacora; + } + + public void setSelectedBitacora(Bitacora selectedBitacora) { + this.selectedBitacora = selectedBitacora; + } + + private BitacoraController bitacoraCtrl; + + private List bitacora; + + private Bitacora selectedBitacora; + + @PostConstruct + public void init() { + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + bitacoraCtrl = new BitacoraController(); + bitacora = fillDatatableBitacora(); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/system/employee/EmployeeBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/employee/EmployeeBean.java new file mode 100644 index 0000000..0b10e19 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/employee/EmployeeBean.java @@ -0,0 +1,622 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.system.employee; + +import com.arrebol.apc.controller.catalog.RoleController; +import com.arrebol.apc.controller.system.employee.EmployeeController; +import com.arrebol.apc.model.admin.Bonus; +import com.arrebol.apc.model.catalog.RoleCtlg; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.HumanResourceByOffice; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.ApplicationOwner; +import com.arrebol.apc.model.enums.HumanResourceStatus; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.annotation.PreDestroy; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Named +@ViewScoped +public class EmployeeBean extends GenericBean implements Serializable { + + public void saveHR() { + logger.debug("saveHR"); + try { + getSaveHumanResource().setAvatar("images/avatar.png"); + getSaveHumanResource().setRoleCtlg(new RoleCtlg(role)); + getSaveHumanResource().setHumanResourceStatus(HumanResourceStatus.ENEBLED); + getSaveHumanResource().setCreatedBy(getLoggedUser().getUser().getId()); + getSaveHumanResource().setBalance(BigDecimal.ZERO); + + if (getSaveHumanResource().getEmployeeSaving() == null) { + getSaveHumanResource().setEmployeeSaving(BigDecimal.ZERO); + } + + String messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + FacesMessage.Severity severity = FacesMessage.SEVERITY_WARN; + + HumanResourceByOffice humanResourceByOffice = new HumanResourceByOffice( + new Office(getLoggedUser().getOffice().getId()), + getLoggedUser().getUser().getId(), + new Date(), + ApplicationOwner.APP_USER + ); + + if (null != getBonusId() && getBonusId().length() == 36) { + getSaveHumanResource().setBonus(new Bonus(getBonusId())); + } + + if (getController().saveHRController(humanResourceByOffice, getSaveHumanResource())) { + setSaveHumanResource(new HumanResource()); + + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + severity = FacesMessage.SEVERITY_INFO; + + refreshDropBox(); + } + Object[] param = {getBundlePropertyFile().getString("employee"), getBundlePropertyFile().getString("created")}; + + buildAndSendMessage(param, messafeFormat, severity, getBundlePropertyFile().getString("employee")); + } catch (Exception e) { + logger.error("saveHR", e); + Object[] param = {getBundlePropertyFile().getString("created")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("employee") + ); + } + } + + /** + * + * @param action 1 = TO DISABLED, 2 = TO ENEBLED, 3 = TO DELETED, 4 NOT + * ALLOWED + */ + public void actionDropBox(int action) { + logger.debug("actionDropBox"); + try { + String messageTitle = getBundlePropertyFile().getString("employee"); + String actionUserIdSelected = null; + String messageAction = null; + + HumanResourceStatus status = null; + + switch (action) { + case 1: + actionUserIdSelected = getEnebledId(); + messageAction = getBundlePropertyFile().getString("disabled"); + status = HumanResourceStatus.DISABLED; + break; + case 2: + actionUserIdSelected = getDisabledId(); + messageAction = getBundlePropertyFile().getString("enebled"); + status = HumanResourceStatus.ENEBLED; + break; + case 3: + actionUserIdSelected = getDeletedId(); + messageAction = getBundlePropertyFile().getString("deleted"); + status = HumanResourceStatus.DELETED; + break; + default: + throw new Exception(action + " is NOT valid a option"); + } + + if (executeAction(status, actionUserIdSelected, messageTitle, messageAction)) { + refreshDropBox(); + } + } catch (Exception e) { + logger.error("actionDropBox", e); + Object[] param = {getBundlePropertyFile().getString("employee")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("process") + ); + } + } + + public void updateSlctBtnHRAction() { + logger.debug("updateHR"); + try { + getUpdateHumanResource().setLastUpdatedBy(getLoggedUser().getUser().getId()); + getUpdateHumanResource().setLastUpdatedOn(new Date()); + getUpdateHumanResource().setRoleCtlg(new RoleCtlg(roleUpdate)); + + if (getUpdateHumanResource().getEmployeeSaving() == null) { + getUpdateHumanResource().setEmployeeSaving(BigDecimal.ZERO); + } + + String messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + FacesMessage.Severity severity = FacesMessage.SEVERITY_WARN; + + if (null != getBonusId() && getBonusId().length() == 36) { + getUpdateHumanResource().setBonus(new Bonus(getBonusId())); + } + + if (getController().updateByHumanResourceId(getUpdateHumanResource(), false)) { + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + severity = FacesMessage.SEVERITY_INFO; + } + + Object[] param = {getBundlePropertyFile().getString("employee"), getBundlePropertyFile().getString("updated")}; + + buildAndSendMessage(param, messafeFormat, severity, getBundlePropertyFile().getString("employee")); + } catch (Exception e) { + logger.error("updateSlctBtnHRActionListener", e); + Object[] param = {getBundlePropertyFile().getString("updated")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("employee") + ); + } + } + + public void loadUserToUpdate() { + try { + setUpdateHumanResource(getController().findHumanResourceById(getUpdateId())); + setRoleUpdate(getUpdateHumanResource().getBonus().getId()); + updateBonusId = getRoleUpdate(); + } catch (Exception e) { + logger.error("updateSlctBtnHRActionListener", e); + Object[] param = {getBundlePropertyFile().getString("searching")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("employee") + ); + } + } + + /** + * + * @param option 1 = to disabled, 2 = to enebled, 4 = to updated + */ + public void enebledDisabledDropBoxListener(int option) { + logger.debug("enebledDisabledDropBoxListener"); + try { + HumanResourceStatus status = HumanResourceStatus.ENEBLED; + + boolean goAHead = false; + + switch (option) { + case 1: + if (isEnebledHR()) { + goAHead = isEnebledHR(); + } else { + setEnebledHumanResourcesLst(null); + } + break; + case 2: + if (isDisabledHR()) { + goAHead = isDisabledHR(); + } else { + setDeletedHumanResourcesLst(null); + } + break; + case 4: + if (isSelectedUpdateHR()) { + goAHead = isSelectedUpdateHR(); + } else { + setUpdateHumanResourcesLst(null); + setUpdateHumanResource(new HumanResource()); + setRoleUpdate("N/A"); + } + break; + } + + if (goAHead) { + if (2 == option) { + status = HumanResourceStatus.DISABLED; + } + + List results = getController().findEmployeesByType( + new Office(getLoggedUser().getOffice().getId()), + status, + getLoggedUser().getUser().getHumanResource().getId() + ); + + switch (option) { + case 1: + setEnebledHumanResourcesLst(results); + break; + case 2: + setDisabledHumanResourcesLst(results); + break; + case 4: + setUpdateHumanResourcesLst(results); + setUpdateHumanResource(new HumanResource()); + break; + } + } + } catch (Exception e) { + logger.error("enebledDisabledDropBoxListener"); + + Object[] param = {getBundlePropertyFile().getString("searching")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("employee") + ); + } + } + + public void deletedHRListener() { + try { + if (isDeletedHR()) { + List statusLst = new ArrayList<>(); + + statusLst.add(HumanResourceStatus.ENEBLED); + statusLst.add(HumanResourceStatus.DISABLED); + + setDeletedHumanResourcesLst( + getController().findEmployeesInType( + new Office(getLoggedUser().getOffice().getId()), + statusLst, + getLoggedUser().getUser().getHumanResource().getId() + ) + ); + } else { + setDeletedHumanResourcesLst(null); + } + } catch (Exception e) { + logger.error("deletedHRListener", e); + Object[] param = {getBundlePropertyFile().getString("searching")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("employee") + ); + } + } + + /** + * + * @param status + * @param userIdSelected + * @param msgTitle + * @param msgAction + */ + private boolean executeAction(HumanResourceStatus status, String userIdSelected, String msgTitle, String msgAction) { + logger.debug("executeAction"); + + boolean success = false; + + try { + String messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + FacesMessage.Severity severity = FacesMessage.SEVERITY_WARN; + + success = getController().updateHRByStatus(status, userIdSelected, getLoggedUser().getUser().getId()); + + if (success) { + logger.debug("executeAction"); + + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + severity = FacesMessage.SEVERITY_INFO; + } + + Object[] param = {msgTitle, msgAction}; + + buildAndSendMessage(param, messafeFormat, severity, msgTitle); + } catch (Exception e) { + logger.error("executeAction", e); + Object[] param = {msgTitle}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + msgTitle + ); + } + return success; + } + + private void refreshDropBox() { + try { + if (isEnebledHR()) { + enebledDisabledDropBoxListener(1); + } + if (isDisabledHR()) { + enebledDisabledDropBoxListener(2); + } + + if (isDeletedHR()) { + deletedHRListener(); + } + + if (isSelectedUpdateHR()) { + enebledDisabledDropBoxListener(4); + } + } catch (Exception e) { + logger.error("executeAction", e); + } + } + + private static final long serialVersionUID = 2969985354193657703L; + final Logger logger = LogManager.getLogger(EmployeeBean.class); + + private EmployeeController controller; + private RoleController roleCtrl; + + private HumanResource saveHumanResource; + private HumanResource updateHumanResource; + + private String role; + private List roles; + + private boolean selectedUpdateHR; + private String updateId; + + private String roleUpdate; + private List updateHumanResourcesLst; + private List typeLst; + + private boolean enebledHR; + private String enebledId; + private List enebledHumanResourcesLst; + + private boolean disabledHR; + private String disabledId; + private List disabledHumanResourcesLst; + + private boolean deletedHR; + private String deletedId; + private List deletedHumanResourcesLst; + + private String bonusId; + private List bonuses; + private String updateBonusId; + + @PostConstruct() + public void init() { + try { + loadBundlePropertyFile(); + setController(new EmployeeController()); + setRoleCtrl(new RoleController()); + setSaveHumanResource(new HumanResource()); + setUpdateHumanResource(new HumanResource()); + roles = getRoleCtrl().fillRolesDatatable(); + setBonuses(getController().findAllActiveBonus(getLoggedUser().getOffice().getId())); + } catch (Exception e) { + logger.error("init", e); + } + } + + @PreDestroy + public void finish() { + try { + setSaveHumanResource(new HumanResource()); + setUpdateHumanResource(new HumanResource()); + setController(null); + } catch (Exception e) { + logger.error("finish", e); + } + } + + public RoleController getRoleCtrl() { + return roleCtrl; + } + + public void setRoleCtrl(RoleController roleCtrl) { + this.roleCtrl = roleCtrl; + } + + public EmployeeController getController() { + return controller; + } + + public void setController(EmployeeController controller) { + this.controller = controller; + } + + public HumanResource getSaveHumanResource() { + return saveHumanResource; + } + + public void setSaveHumanResource(HumanResource saveHumanResource) { + this.saveHumanResource = saveHumanResource; + } + + public HumanResource getUpdateHumanResource() { + return updateHumanResource; + } + + public void setUpdateHumanResource(HumanResource updateHumanResource) { + this.updateHumanResource = updateHumanResource; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public List getRoles() { + if (null == roles) { + /* + roles = Stream.of( + HumanResourceType.values()) + .map(Enum::name) + .collect(Collectors.toList() + ); + */ + } + return roles; + } + + public void setRoles(List roles) { + this.roles = roles; + } + + public boolean isSelectedUpdateHR() { + return selectedUpdateHR; + } + + public void setSelectedUpdateHR(boolean selectedUpdateHR) { + this.selectedUpdateHR = selectedUpdateHR; + } + + public String getUpdateId() { + return updateId; + } + + public void setUpdateId(String updateId) { + this.updateId = updateId; + } + + public String getRoleUpdate() { + return roleUpdate; + } + + public void setRoleUpdate(String roleUpdate) { + this.roleUpdate = roleUpdate; + } + + public List getUpdateHumanResourcesLst() { + return updateHumanResourcesLst; + } + + public void setUpdateHumanResourcesLst(List updateHumanResourcesLst) { + this.updateHumanResourcesLst = updateHumanResourcesLst; + } + + public List getTypeLst() { + return typeLst; + } + + public void setTypeLst(List typeLst) { + this.typeLst = typeLst; + } + + public boolean isEnebledHR() { + return enebledHR; + } + + public void setEnebledHR(boolean enebledHR) { + this.enebledHR = enebledHR; + } + + public String getEnebledId() { + return enebledId; + } + + public void setEnebledId(String enebledId) { + this.enebledId = enebledId; + } + + public List getEnebledHumanResourcesLst() { + return enebledHumanResourcesLst; + } + + public void setEnebledHumanResourcesLst(List enebledHumanResourcesLst) { + this.enebledHumanResourcesLst = enebledHumanResourcesLst; + } + + public boolean isDisabledHR() { + return disabledHR; + } + + public void setDisabledHR(boolean disabledHR) { + this.disabledHR = disabledHR; + } + + public String getDisabledId() { + return disabledId; + } + + public void setDisabledId(String disabledId) { + this.disabledId = disabledId; + } + + public List getDisabledHumanResourcesLst() { + return disabledHumanResourcesLst; + } + + public void setDisabledHumanResourcesLst(List disabledHumanResourcesLst) { + this.disabledHumanResourcesLst = disabledHumanResourcesLst; + } + + public boolean isDeletedHR() { + return deletedHR; + } + + public void setDeletedHR(boolean deletedHR) { + this.deletedHR = deletedHR; + } + + public String getDeletedId() { + return deletedId; + } + + public void setDeletedId(String deletedId) { + this.deletedId = deletedId; + } + + public List getDeletedHumanResourcesLst() { + return deletedHumanResourcesLst; + } + + public void setDeletedHumanResourcesLst(List deletedHumanResourcesLst) { + this.deletedHumanResourcesLst = deletedHumanResourcesLst; + } + + public String getBonusId() { + return bonusId; + } + + public void setBonusId(String bonusId) { + this.bonusId = bonusId; + } + + public List getBonuses() { + return bonuses; + } + + public void setBonuses(List bonuses) { + this.bonuses = bonuses; + } + + public String getUpdateBonusId() { + return updateBonusId; + } + + public void setUpdateBonusId(String updateBonusId) { + this.updateBonusId = updateBonusId; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/system/office/OfficeBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/office/OfficeBean.java new file mode 100644 index 0000000..028d8dd --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/office/OfficeBean.java @@ -0,0 +1,142 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.system.office; + +import com.arrebol.apc.controller.system.office.OfficeController; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.enums.OfficeStatus; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.context.FacesContext; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("officeManager") +@ViewScoped +public class OfficeBean extends GenericBean implements Serializable, Datatable{ + + public List fillDatatableOffice() { + + return officeCtrl.fillOfficeDatatable(); + } + + @Override + public void editRow(RowEditEvent event) { + Office office = (Office) event.getObject(); + if (office != null) { + officeCtrl.updateByOfficeId(office); + showMessage(FacesMessage.SEVERITY_INFO, "Registro Editado", "Se hizo el cambio correctamente."); + } } + + @Override + public void onRowCancel(RowEditEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Edición Cancelada", ((Office) event.getObject()).getOfficeName()); + } + + @Override + public void onRowReorder(ReorderEvent event) { + showMessage(FacesMessage.SEVERITY_INFO, "Registro Movido", "De columna: " + (event.getFromIndex() + 1) + " a columna: " + (event.getToIndex() + 1)); + } + + @Override + public void addRow() { + Office officeObj = new Office(); + officeObj.setOfficeName(name); + officeObj.setAddress(address); + officeObj.setOfficeStatus(OfficeStatus.ENEBLED); + officeObj.setCreatedBy(getLoggedUser().getUser().getId()); + + officeCtrl.saveOffice(officeObj); + office.add(officeObj); + FacesMessage msg = new FacesMessage("Nueva oficina", "Se agregó correctamente"); + FacesContext.getCurrentInstance().addMessage(null, msg); + } + + @Override + public void deleteRow() { + officeCtrl.updateOfficeByStatus(OfficeStatus.DISABLED, selectedOffice.getId(), getLoggedUser().getUser().getId()); + office.remove(selectedOffice); + selectedOffice = null; + showMessage(FacesMessage.SEVERITY_INFO, "Oficina eliminada", "Se eliminó correctamente."); + } + + public OfficeController getOfficeCtrl() { + return officeCtrl; + } + + public void setOfficeCtrl(OfficeController officeCtrl) { + this.officeCtrl = officeCtrl; + } + + public List getOffice() { + return office; + } + + public void setOffice(List office) { + this.office = office; + } + + public Office getSelectedOffice() { + return selectedOffice; + } + + public void setSelectedOffice(Office selectedOffice) { + this.selectedOffice = selectedOffice; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + private OfficeController officeCtrl; + + private List office; + + private Office selectedOffice; + + private String id; + private String name; + private String address; + + @PostConstruct + public void init() { + officeCtrl = new OfficeController(); + office = fillDatatableOffice(); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserAccessBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserAccessBean.java new file mode 100644 index 0000000..5a32052 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserAccessBean.java @@ -0,0 +1,195 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.system.user; + +import com.arrebol.apc.controller.system.user.UserAccessController; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Permission; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.model.enums.UserStatus; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.primefaces.model.DualListModel; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Named +@ViewScoped +public class UserAccessBean extends GenericBean implements Serializable { + + public void dropBoxOnchange() { + try { + List source = new ArrayList<>(); + List target = new ArrayList<>(); + + setHr(new HumanResource()); + setDualPermissionLst(new DualListModel<>(source, target)); + setUpdateForm(false); + } catch (Exception e) { + logger.error("saveHR", e); + Object[] param = {getBundlePropertyFile().getString("searching")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("user") + ); + } + } + + public void loadUserByOfficePermissionLst() { + try { + UserByOffice loadUserByOffice = new UserByOffice(getUserByOfficeId()); + + List source = getController().loadUserByOfficePermissionLst(loadUserByOffice, true); + List target = getController().loadUserByOfficePermissionLst(loadUserByOffice, false); + + int index = getUserByOfficeLst().indexOf(loadUserByOffice); + + setHr(getUserByOfficeLst().get(index).getUser().getHumanResource()); + setDualPermissionLst(new DualListModel<>(source, target)); + setUpdateForm(true); + } catch (Exception e) { + logger.error("saveHR", e); + Object[] param = {getBundlePropertyFile().getString("searching")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("user") + ); + } + } + + public void savePermission() { + logger.debug("savePermission"); + + String messafeFormat = getBundlePropertyFile().getString("message.format.fatal"); + String messageTitle = getBundlePropertyFile().getString("user"); + String messageAction = getBundlePropertyFile().getString("updated"); + + FacesMessage.Severity severity = FacesMessage.SEVERITY_FATAL; + try { + if (getController().updatePermissionsController(dualPermissionLst.getTarget(), getUserByOfficeId(), getLoggedUser().getUser().getId())) { + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + severity = FacesMessage.SEVERITY_INFO; + } else { + messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + severity = FacesMessage.SEVERITY_WARN; + } + + Object[] param = {messageTitle, messageAction}; + + buildAndSendMessage(param, messafeFormat, severity, messageTitle); + } catch (Exception e) { + logger.error("savePermission", e); + Object[] param = {messageAction}; + + buildAndSendMessage(param, messafeFormat, severity, messageTitle); + } + } + + private static final long serialVersionUID = 6738057461247413139L; + final Logger logger = LogManager.getLogger(UserAccessBean.class); + + private UserAccessController controller; + private String userByOfficeId; + private List userByOfficeLst; + private DualListModel dualPermissionLst; + private HumanResource hr; + private boolean updateForm; + + @PostConstruct + public void init() { + try { + loadBundlePropertyFile(); + + setController(new UserAccessController()); + + List statuses = new ArrayList<>(); + + statuses.add(UserStatus.ENEBLED); + + setUserByOfficeLst( + getController().findUsersInOfficeInStatuses( + statuses, + getLoggedUser().getOffice().getId(), + getLoggedUser().getUser().getId() + ) + ); + + List source = new ArrayList<>(); + List target = new ArrayList<>(); + + setDualPermissionLst(new DualListModel<>(source, target)); + } catch (Exception e) { + logger.error("init", e); + } + } + + public UserAccessController getController() { + return controller; + } + + public void setController(UserAccessController controller) { + this.controller = controller; + } + + public String getUserByOfficeId() { + return userByOfficeId; + } + + public void setUserByOfficeId(String userByOfficeId) { + this.userByOfficeId = userByOfficeId; + } + + public List getUserByOfficeLst() { + return userByOfficeLst; + } + + public void setUserByOfficeLst(List userByOfficeLst) { + this.userByOfficeLst = userByOfficeLst; + } + + public DualListModel getDualPermissionLst() { + return dualPermissionLst; + } + + public void setDualPermissionLst(DualListModel dualPermissionLst) { + this.dualPermissionLst = dualPermissionLst; + } + + public HumanResource getHr() { + return hr; + } + + public void setHr(HumanResource hr) { + this.hr = hr; + } + + public boolean isUpdateForm() { + return updateForm; + } + + public void setUpdateForm(boolean updateForm) { + this.updateForm = updateForm; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserAdminBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserAdminBean.java new file mode 100644 index 0000000..decbbc5 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserAdminBean.java @@ -0,0 +1,567 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.system.user; + +import com.arrebol.apc.controller.system.user.UserAdminController; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.model.enums.UserStatus; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.primefaces.model.DualListModel; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Named +@ViewScoped +public class UserAdminBean extends GenericBean implements Serializable { + + /** + * + * @param option 1 = enebled,2 = disabled, 3 = deleted, 4 = username, 5 = + * password, 6 = avatar, 7 = routes + */ + public void enebledDisabledListener(int option) { + try { + boolean goAHead = false; + + List statuses = new ArrayList<>(); + + switch (option) { + case 1: + if (isEnebled()) { + goAHead = true; + statuses.add(UserStatus.ENEBLED); + } else { + setEnebledLst(null); + } + break; + case 2: + if (isDisabled()) { + goAHead = true; + statuses.add(UserStatus.DISABLED); + } else { + setDisabledLst(null); + } + break; + case 3: + if (isDeleted()) { + goAHead = true; + statuses.add(UserStatus.ENEBLED); + statuses.add(UserStatus.DISABLED); + } else { + setDeletedLst(null); + } + break; + case 4: + if (isUsername()) { + goAHead = true; + statuses.add(UserStatus.ENEBLED); + } else { + setUserNameLst(null); + } + break; + case 5: + if (isPwd()) { + goAHead = true; + statuses.add(UserStatus.ENEBLED); + } else { + setPwdLst(null); + } + break; + case 6: + if (isAvatar()) { + goAHead = true; + statuses.add(UserStatus.ENEBLED); + } else { + setAvatarLst(null); + } + case 7: + if (isRoute()) { + goAHead = true; + statuses.add(UserStatus.ENEBLED); + } else { + setRouteLst(null); + } + break; + } + + if (goAHead) { + loadDropBoxData(statuses, option); + } + } catch (Exception e) { + logger.error("enebledDisabledListener", e); + Object[] param = {getBundlePropertyFile().getString("searching")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("user") + ); + } + } + + /** + * + * @param option 1 = enebled, 2 = disabled, 3 = deleted, 4 = username, 5 = + * password, 6 = avatar: + */ + public void dropBoxListener(int option) { + switch (option) { + case 1: + setEnebledSelected(getEnebledLst().get(getEnebledLst().indexOf(new UserByOffice(getEnebledId())))); + break; + case 2: + setDisabledSelected(getDisabledLst().get(getDisabledLst().indexOf(new UserByOffice(getDisabledId())))); + break; + case 3: + setDeletedSelected(getDeletedLst().get(getDeletedLst().indexOf(new UserByOffice(getDeletedId())))); + break; + case 4: + setUserNameSelected(getUserNameLst().get(getUserNameLst().indexOf(new UserByOffice(getUsernameId())))); + break; + case 5: + setPwdSelected(getPwdLst().get(getPwdLst().indexOf(new UserByOffice(getPwdId())))); + break; + case 6: + setAvatarSelect(getAvatarLst().get(getAvatarLst().indexOf(new UserByOffice(getAvatarId())))); + break; + case 7: + setRouteSelect(getRouteLst().get(getRouteLst().indexOf(new UserByOffice(getRouteId())))); + // getRouteId() = user selected id + + break; + } + } + + /** + * + */ + public void onUserTypeSlctChange() { + if (null == getUserType() || getUserType().equals("WEB") || getUserType().equals("N/A")) { + setCertifier(false); + setRouteCtlgLst(new ArrayList<>()); + setDualRouteCtlgLst(new DualListModel<>(new ArrayList<>(), new ArrayList<>())); + } else if (getUserType().equals("BOTH") || getUserType().equals("MOBILE")) { + try { + setRouteCtlgLst(getController().findRoutesByOffice(getLoggedUser().getOffice().getId())); + setDualRouteCtlgLst(new DualListModel<>(getController().findRoutesWithNoCertifierUser(getLoggedUser().getOffice().getId()), new ArrayList<>())); + } catch (Exception ex) { + logger.error("onUserTypeSlctChange", ex); + } + } + } + + /** + * + */ + public void onCertifiedChange() { + try { + if (isCertifier()) { + setDualRouteCtlgLst( + new DualListModel<>( + getController().findRoutesWithNoCertifierUser(getLoggedUser().getOffice().getId()), + new ArrayList<>() + ) + ); + setRouteCtlgLst(new ArrayList<>()); + } else { + setDualRouteCtlgLst(new DualListModel<>(new ArrayList<>(), new ArrayList<>())); + setRouteCtlgLst(getController().findRoutesByOffice(getLoggedUser().getOffice().getId())); + } + } catch (Exception e) { + logger.error("onCertifiedChange", e); + } + } + + /** + * + * @param option 1 = enebled, 2 = disabled, 3 = deleted, 4 = username, 5 = + * password, 6 = avatar: + */ + private void loadDropBoxData(List statuses, int option) { + try { + + List retults = getController().findUsersInOfficeInStatuses(statuses, getLoggedUser().getOffice().getId(), getLoggedUser().getUser().getId()); + + switch (option) { + case 1: + setEnebledLst(retults); + break; + case 2: + setDisabledLst(retults); + break; + case 3: + setDeletedLst(retults); + break; + case 4: + setUserNameLst(retults); + break; + case 5: + setPwdLst(retults); + break; + case 6: + setAvatarLst(retults); + break; + case 7: + setRouteLst(retults); + break; + } + } catch (Exception e) { + logger.error("loadDropBoxData", e); + throw e; + } + } + + private static final long serialVersionUID = -2325684946201829629L; + final Logger logger = LogManager.getLogger(UserAdminBean.class); + + private UserAdminController controller; + + private List enebledLst; + private List disabledLst; + private List deletedLst; + private List userNameLst; + private List pwdLst; + private List avatarLst; + private List routeLst; + + private UserByOffice enebledSelected; + private UserByOffice disabledSelected; + private UserByOffice deletedSelected; + private UserByOffice userNameSelected; + private UserByOffice pwdSelected; + private UserByOffice avatarSelect; + private UserByOffice routeSelect; + + private String enebledId; + private String disabledId; + private String deletedId; + private String usernameId; + private String pwdId; + private String avatarId; + private String routeId; + + private boolean enebled; + private boolean disabled; + private boolean deleted; + private boolean username; + private boolean pwd; + private boolean avatar; + private boolean route; + + private String userType; + private boolean certifier; + private boolean enebledGrants; + private String routeSelectedId; + private List routeCtlgLst; + private DualListModel dualRouteCtlgLst; + + @PostConstruct + public void init() { + try { + loadBundlePropertyFile(); + + setController(new UserAdminController()); + } catch (Exception e) { + logger.error("init", e); + } + } + + public UserAdminController getController() { + return controller; + } + + public void setController(UserAdminController controller) { + this.controller = controller; + } + + public List getEnebledLst() { + return enebledLst; + } + + public void setEnebledLst(List enebledLst) { + this.enebledLst = enebledLst; + } + + public List getDisabledLst() { + return disabledLst; + } + + public void setDisabledLst(List disabledLst) { + this.disabledLst = disabledLst; + } + + public List getDeletedLst() { + return deletedLst; + } + + public void setDeletedLst(List deletedLst) { + this.deletedLst = deletedLst; + } + + public List getUserNameLst() { + return userNameLst; + } + + public void setUserNameLst(List userNameLst) { + this.userNameLst = userNameLst; + } + + public List getPwdLst() { + return pwdLst; + } + + public void setPwdLst(List pwdLst) { + this.pwdLst = pwdLst; + } + + public List getAvatarLst() { + return avatarLst; + } + + public void setAvatarLst(List avatarLst) { + this.avatarLst = avatarLst; + } + + public List getRouteLst() { + return routeLst; + } + + public void setRouteLst(List routeLst) { + this.routeLst = routeLst; + } + + public UserByOffice getEnebledSelected() { + return enebledSelected; + } + + public void setEnebledSelected(UserByOffice enebledSelected) { + this.enebledSelected = enebledSelected; + } + + public UserByOffice getDisabledSelected() { + return disabledSelected; + } + + public void setDisabledSelected(UserByOffice disabledSelected) { + this.disabledSelected = disabledSelected; + } + + public UserByOffice getDeletedSelected() { + return deletedSelected; + } + + public void setDeletedSelected(UserByOffice deletedSelected) { + this.deletedSelected = deletedSelected; + } + + public UserByOffice getUserNameSelected() { + return userNameSelected; + } + + public void setUserNameSelected(UserByOffice userNameSelected) { + this.userNameSelected = userNameSelected; + } + + public UserByOffice getPwdSelected() { + return pwdSelected; + } + + public void setPwdSelected(UserByOffice pwdSelected) { + this.pwdSelected = pwdSelected; + } + + public UserByOffice getAvatarSelect() { + return avatarSelect; + } + + public void setAvatarSelect(UserByOffice avatarSelect) { + this.avatarSelect = avatarSelect; + } + + public UserByOffice getRouteSelect() { + return routeSelect; + } + + public void setRouteSelect(UserByOffice routeSelect) { + this.routeSelect = routeSelect; + } + + public String getEnebledId() { + return enebledId; + } + + public void setEnebledId(String enebledId) { + this.enebledId = enebledId; + } + + public String getDisabledId() { + return disabledId; + } + + public void setDisabledId(String disabledId) { + this.disabledId = disabledId; + } + + public String getDeletedId() { + return deletedId; + } + + public void setDeletedId(String deletedId) { + this.deletedId = deletedId; + } + + public String getUsernameId() { + return usernameId; + } + + public void setUsernameId(String usernameId) { + this.usernameId = usernameId; + } + + public String getPwdId() { + return pwdId; + } + + public void setPwdId(String pwdId) { + this.pwdId = pwdId; + } + + public String getAvatarId() { + return avatarId; + } + + public void setAvatarId(String avatarId) { + this.avatarId = avatarId; + } + + public String getRouteId() { + return routeId; + } + + public void setRouteId(String routeId) { + this.routeId = routeId; + } + + public boolean isEnebled() { + return enebled; + } + + public void setEnebled(boolean enebled) { + this.enebled = enebled; + } + + public boolean isDisabled() { + return disabled; + } + + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + + public boolean isDeleted() { + return deleted; + } + + public void setDeleted(boolean deleted) { + this.deleted = deleted; + } + + public boolean isUsername() { + return username; + } + + public void setUsername(boolean username) { + this.username = username; + } + + public boolean isPwd() { + return pwd; + } + + public void setPwd(boolean pwd) { + this.pwd = pwd; + } + + public boolean isAvatar() { + return avatar; + } + + public void setAvatar(boolean avatar) { + this.avatar = avatar; + } + + public boolean isRoute() { + return route; + } + + public void setRoute(boolean route) { + this.route = route; + } + + public String getUserType() { + return userType; + } + + public void setUserType(String userType) { + this.userType = userType; + } + + public boolean isCertifier() { + return certifier; + } + + public void setCertifier(boolean certifier) { + this.certifier = certifier; + } + + public boolean isEnebledGrants() { + return enebledGrants; + } + + public void setEnebledGrants(boolean enebledGrants) { + this.enebledGrants = enebledGrants; + } + + public String getRouteSelectedId() { + return routeSelectedId; + } + + public void setRouteSelectedId(String routeSelectedId) { + this.routeSelectedId = routeSelectedId; + } + + public List getRouteCtlgLst() { + return routeCtlgLst; + } + + public void setRouteCtlgLst(List routeCtlgLst) { + this.routeCtlgLst = routeCtlgLst; + } + + public DualListModel getDualRouteCtlgLst() { + return dualRouteCtlgLst; + } + + public void setDualRouteCtlgLst(DualListModel dualRouteCtlgLst) { + this.dualRouteCtlgLst = dualRouteCtlgLst; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserCreateBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserCreateBean.java new file mode 100644 index 0000000..997eb9e --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserCreateBean.java @@ -0,0 +1,428 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.system.user; + +import com.arrebol.apc.controller.system.user.UserCreateController; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.HumanResource; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.model.core.Permission; +import com.arrebol.apc.model.core.User; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.ApplicationOwner; +import com.arrebol.apc.model.enums.HumanResourceStatus; +import com.arrebol.apc.model.enums.UserByOfficeStatus; +import com.arrebol.apc.model.enums.UserStatus; +import com.arrebol.apc.model.enums.UserType; +import com.arrebol.apc.security.APCSecure; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.annotation.PreDestroy; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.primefaces.model.DualListModel; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Named +@ViewScoped +public class UserCreateBean extends GenericBean implements Serializable { + + /** + * 1) Verifica que el usuario aun este disponible 2) Verifica que tipo de + * usuario se va a crear y en todos los casos se debera de guardar usuario y + * oficina más las carecteristicas propias de cada tipo de usuario: A) WEB + * debe guardar permisos B) MOBILE debe guardar rutas C) BOTH debe guardar + * rutas y permisos. + */ + public void saveUser() { + logger.debug("saveUser"); + + try { + FacesMessage.Severity severity = FacesMessage.SEVERITY_WARN; + String messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + String messageTitle = getBundlePropertyFile().getString("user"); + String messageAction = getBundlePropertyFile().getString("available"); + + if (null != getUserType() && (getUserType().equals("MOBILE") || getUserType().equals("BOTH"))) { + getUser().setCertifier(isCertifier() ? ActiveStatus.ENEBLED : ActiveStatus.DISABLED); + getUser().setManagement(isManagement()? ActiveStatus.ENEBLED : ActiveStatus.DISABLED); + } else { + getUser().setCertifier(ActiveStatus.DISABLED); + getUser().setManagement(ActiveStatus.DISABLED); + } + + getUser().setPassword(new APCSecure(APP, getPwdConfirm()).getPassword()); + getUser().setHumanResource(new HumanResource(getIdHRSelected())); + getUser().setApplicationOwner(ApplicationOwner.APP_USER); + getUser().setUserStatus(UserStatus.ENEBLED); + getUser().setUserType(UserType.valueOf(getUserType())); + getUser().setCreatedBy(getLoggedUser().getUser().getId()); + + List selectedRoutes = new ArrayList<>(); + List selectedPermissions = new ArrayList<>(); + + if (UserType.MOBILE.equals(getUser().getUserType()) + || UserType.BOTH.equals(getUser().getUserType())) { + selectedRoutes.addAll(getDualRouteCtlgLst().getTarget()); + } + + if (UserType.WEB.equals(getUser().getUserType()) + || UserType.BOTH.equals(getUser().getUserType())) { + selectedPermissions.addAll(getDualPermissionLst().getTarget()); + } + + if (isAvailableUserName()) { + messageAction = getBundlePropertyFile().getString("created"); + + setUserByOffice( + new UserByOffice( + new Office(getLoggedUser().getOffice().getId()), + UserByOfficeStatus.ENEBLED, + ApplicationOwner.APP_USER, + getLoggedUser().getUser().getId(), + new Date() + ) + ); + + if (getController().saveUserController(getUser(), getUserByOffice(), selectedRoutes, selectedPermissions)) { + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + severity = FacesMessage.SEVERITY_INFO; + cleanForm(); + } else { + severity = FacesMessage.SEVERITY_WARN; + } + } + + Object[] param = {messageTitle, messageAction}; + + buildAndSendMessage(param, messafeFormat, severity, messageTitle); + } catch (Exception e) { + logger.error("saveUser", e); + Object[] param = {getBundlePropertyFile().getString("created")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("user") + ); + } + } + + /** + * + */ + private void savePermission() { + logger.debug("savePermission"); + + String messafeFormat = getBundlePropertyFile().getString("message.format.fatal"); + String messageTitle = getBundlePropertyFile().getString("user"); + String messageAction = getBundlePropertyFile().getString("updated"); + + FacesMessage.Severity severity = FacesMessage.SEVERITY_FATAL; + try { + if (!isUpdatePermissions()) { + if (getController().saveManyController(dualPermissionLst.getTarget(), getUserByOffice().getId(), getLoggedUser().getUser().getId())) { + setUpdatePermissions(true); + + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + severity = FacesMessage.SEVERITY_INFO; + } else { + messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + severity = FacesMessage.SEVERITY_WARN; + } + } else { + if (getController().updatePermissionsController(dualPermissionLst.getTarget(), getUserByOffice().getId(), getLoggedUser().getUser().getId())) { + setUpdatePermissions(true); + + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + severity = FacesMessage.SEVERITY_INFO; + } else { + messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + severity = FacesMessage.SEVERITY_WARN; + } + } + Object[] param = {messageTitle, messageAction}; + + buildAndSendMessage(param, messafeFormat, severity, messageTitle); + } catch (Exception e) { + logger.error("savePermission", e); + Object[] param = {messageAction}; + + buildAndSendMessage(param, messafeFormat, severity, messageTitle); + } + } + + /** + * + */ + public void isUsernameAvailable() { + logger.debug("isUsernameAvailable"); + try { + if (null != getUser().getUserName() + && getUser().getUserName().trim().length() >= 5 + && getController().isUsernameAvailableController(getUser().getUserName(), getLoggedUser().getOffice().getId())) { + setAvailableUserName(true); + } else { + setAvailableUserName(false); + } + } catch (Exception e) { + logger.error("isUsernameAvailable", e); + Object[] param = {getBundlePropertyFile().getString("searching")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("user")); + } + } + + /** + * SE TIENE QUE ACTUALIZAR A SOLO MOSTRAR TODAS LAS RUTAS + */ + public void onUserTypeSlctChange() { + if (null == getUserType() || getUserType().equals("WEB") || getUserType().equals("N/A")) { + setCertifier(false); + setManagement(false); + setDualRouteCtlgLst(new DualListModel<>(new ArrayList<>(), new ArrayList<>())); + } else if (getUserType().equals("BOTH") || getUserType().equals("MOBILE")) { + try { + setDualRouteCtlgLst(new DualListModel<>(controller.findRoutesByOffice(getLoggedUser().getOffice().getId()), new ArrayList<>())); + } catch (Exception ex) { + setDualRouteCtlgLst(new DualListModel<>(new ArrayList<>(), new ArrayList<>())); + logger.error("onUserTypeSlctChange", ex); + } + } + } + + private void cleanForm() { + logger.info("cleanForm"); + try { + setIdHRSelected(null); + setUser(null); + setCertifier(false); + setManagement(false); + setUserType("N/A"); + setPwdConfirm(""); + List source = getController().getAllActivePermissionController(); + List target = new ArrayList<>(); + + setDualPermissionLst(new DualListModel<>(source, target)); + + loadHumanResourcesAvailables(); + setDualRouteCtlgLst(new DualListModel<>(new ArrayList<>(), new ArrayList<>())); + } catch (Exception e) { + logger.error("cleanForm", e); + } + } + + private void loadHumanResourcesAvailables() { + try { + setHumanResourcesAvailables( + getController().findAllHRsWithoutUser( + new Office(getLoggedUser().getOffice().getId()), + HumanResourceStatus.ENEBLED + ) + ); + } catch (Exception e) { + logger.error("loadHumanResourcesAvailables", e); + } + } + + private static final long serialVersionUID = 1501878035779416819L; + final Logger logger = LogManager.getLogger(UserCreateBean.class); + + private UserCreateController controller; + private User user; + private List roles; + private String pwdConfirm; + private boolean availableUserName; + private String role; + private DualListModel dualPermissionLst; + private boolean updatePermissions; + private List humanResourcesAvailables; + private String idHRSelected; + private UserByOffice userByOffice; + private String userType; + private boolean certifier; + private boolean management; + + private DualListModel dualRouteCtlgLst; + + @PostConstruct + public void init() { + try { + loadBundlePropertyFile(); + + setController(new UserCreateController()); + + List source = getController().getAllActivePermissionController(); + List target = new ArrayList<>(); + + setDualPermissionLst(new DualListModel<>(source, target)); + + loadHumanResourcesAvailables(); + setDualRouteCtlgLst(new DualListModel<>(new ArrayList<>(), new ArrayList<>())); + } catch (Exception e) { + logger.error("init", e); + } + } + + @PreDestroy + public void finish() { + setUser(null); + setHumanResourcesAvailables(null); + setDualPermissionLst(null); + setController(null); + } + + public UserCreateController getController() { + return controller; + } + + public void setController(UserCreateController controller) { + this.controller = controller; + } + + public User getUser() { + if (null == user) { + user = new User(); + } + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public List getRoles() { + if (null == roles) { + /* + roles = Stream.of( + HumanResourceType.values()) + .map(Enum::name) + .collect(Collectors.toList() + ); + */ + } + return roles; + } + + public void setRoles(List roles) { + this.roles = roles; + } + + public String getPwdConfirm() { + return pwdConfirm; + } + + public void setPwdConfirm(String pwdConfirm) { + this.pwdConfirm = pwdConfirm; + } + + public boolean isAvailableUserName() { + return availableUserName; + } + + public void setAvailableUserName(boolean availableUserName) { + this.availableUserName = availableUserName; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public DualListModel getDualPermissionLst() { + return dualPermissionLst; + } + + public void setDualPermissionLst(DualListModel dualPermissionLst) { + this.dualPermissionLst = dualPermissionLst; + } + + public boolean isUpdatePermissions() { + return updatePermissions; + } + + public void setUpdatePermissions(boolean updatePermissions) { + this.updatePermissions = updatePermissions; + } + + public List getHumanResourcesAvailables() { + return humanResourcesAvailables; + } + + public void setHumanResourcesAvailables(List humanResourcesAvailables) { + this.humanResourcesAvailables = humanResourcesAvailables; + } + + public String getIdHRSelected() { + return idHRSelected; + } + + public void setIdHRSelected(String idHRSelected) { + this.idHRSelected = idHRSelected; + } + + public UserByOffice getUserByOffice() { + return userByOffice; + } + + public void setUserByOffice(UserByOffice userByOffice) { + this.userByOffice = userByOffice; + } + + public String getUserType() { + return userType; + } + + public void setUserType(String userType) { + this.userType = userType; + } + + public boolean isCertifier() { + return certifier; + } + + public void setCertifier(boolean certifier) { + this.certifier = certifier; + } + + public boolean isManagement() { + return management; + } + + public void setManagement(boolean management) { + this.management = management; + } + + public DualListModel getDualRouteCtlgLst() { + return dualRouteCtlgLst; + } + + public void setDualRouteCtlgLst(DualListModel dualRouteCtlgLst) { + this.dualRouteCtlgLst = dualRouteCtlgLst; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserUpdateBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserUpdateBean.java new file mode 100644 index 0000000..e7a2632 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/system/user/UserUpdateBean.java @@ -0,0 +1,663 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.system.user; + +import com.arrebol.apc.controller.system.user.UserUpdateController; +import com.arrebol.apc.model.catalog.RouteCtlg; +import com.arrebol.apc.model.core.Permission; +import com.arrebol.apc.model.core.UserByOffice; +import com.arrebol.apc.model.enums.ActiveStatus; +import com.arrebol.apc.model.enums.PermissionType; +import com.arrebol.apc.model.enums.UserStatus; +import com.arrebol.apc.model.enums.UserType; +import com.arrebol.apc.security.APCSecure; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.primefaces.model.DualListModel; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Named +@ViewScoped +public class UserUpdateBean extends GenericBean implements Serializable { + + public void onClickUpdateUserBtn() { + logger.info("onClickUpdateUserBtn"); + try { + FacesMessage.Severity severity = FacesMessage.SEVERITY_WARN; + + String messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + String messageTitle = getBundlePropertyFile().getString("user"); + String messageAction = getBundlePropertyFile().getString("updated"); + + UserType userType = UserType.valueOf(getIdUserType()); + getUserByOfficeUpdateSelected().setCreatedBy(getLoggedUser().getUser().getId()); + + List routes = new ArrayList<>(); + List permissions = new ArrayList<>(); + ActiveStatus certifierUser = ActiveStatus.DISABLED; + ActiveStatus managementUser = ActiveStatus.DISABLED; + + + switch (userType) { + case WEB: + permissions.addAll(getGeneralPublicPermissionLst()); + permissions.addAll(getDualPermissionLst().getTarget()); + break; + case MOBILE: + routes = getDualRouteCtlgLst().getTarget(); + certifierUser = isCertifier() ? ActiveStatus.ENEBLED : ActiveStatus.DISABLED; + managementUser = isManagment() ? ActiveStatus.ENEBLED : ActiveStatus.DISABLED; + break; + case BOTH: + permissions.addAll(getGeneralPublicPermissionLst()); + permissions.addAll(getDualPermissionLst().getTarget()); + + routes = getDualRouteCtlgLst().getTarget(); + certifierUser = isCertifier() ? ActiveStatus.ENEBLED : ActiveStatus.DISABLED; + managementUser = isManagment() ? ActiveStatus.ENEBLED : ActiveStatus.DISABLED; + break; + } + + if (getController().updateUser(userType, getUserByOfficeUpdateSelected(), routes, permissions, certifierUser,managementUser)) { + severity = FacesMessage.SEVERITY_INFO; + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + + cleanFormFields(); + refreshUserEnebledLst(); + } + + Object[] param = {messageTitle, messageAction}; + setAllowU(true); + + buildAndSendMessage(param, messafeFormat, severity, messageTitle); + } catch (Exception e) { + logger.error("onClickUpdateUserBtn", e); + Object[] param = {getBundlePropertyFile().getString("updated")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("user") + ); + } + } + + /** + * + */ + public void onClickOtherActionsBtn() { + logger.info("onClickUpdateUserBtn"); + try { + FacesMessage.Severity severity = FacesMessage.SEVERITY_WARN; + + String messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + String messageTitle = getBundlePropertyFile().getString("user"); + String messageAction = getBundlePropertyFile().getString("updated"); + boolean goAhead = false; + UserStatus userStatus = null; + + switch (getAction()) { + case "N/A": + break; + case "pwd": + setPwd(new APCSecure(APP, getPwdConfirm()).getPassword()); + goAhead = true; + break; + case "usr": + isUsernameAvailable(); + goAhead = isAvailableUserName(); + break; + default: + userStatus = UserStatus.valueOf(getAction().toUpperCase()); + goAhead = true; + break; + } + + if (goAhead + && getController().updateUserOtherActions( + getAction(), + getUsrOtherActionSelected().getUser().getId(), + userStatus, getPwd(), + getUserName(), + getLoggedUser().getUser().getId() + )) { + severity = FacesMessage.SEVERITY_INFO; + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + + cleanOtherActionsFormFields(); + refreshUserEnebledLst(); + } + + Object[] param = {messageTitle, messageAction}; + + buildAndSendMessage(param, messafeFormat, severity, messageTitle); + } catch (Exception e) { + logger.error("onClickOtherActionsBtn", e); + Object[] param = {getBundlePropertyFile().getString("updated")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("user") + ); + } + } + + /** + * + */ + public void onUsrEnebledSlctChange() { + logger.info("onUsrEnebledSlctChange"); + if(getUserByOfficeUpdateSelected()==null){ + cleanFormFields(); + setAllowU(true); + return; + } + try { + cleanFormFields(); + setIdUserType(getUserByOfficeUpdateSelected().getUser().getUserType().toString()); + fillUBOData(); + } catch (Exception e) { + logger.error("onUsrEnebledSlctChange", e); + } + } + + /** + * + */ + public void onUserTypeSlctChange() { + logger.info("onUserTypeSlctChange"); + try { + fillUBOData(); + + switch (getUserByOfficeUpdateSelected().getUser().getUserType()) { + //Si USUARIO es WEB y selecciona tipo web no se debe hacer nada + //Si USUARIO es WEB y selecciona tipo mobile, se deberá cargar rutas + //Si USUARIO es WEB y seleccion tipo both, se deberà cargar rutas + case WEB: + if ("MOBILE".equals(getIdUserType()) + || "BOTH".equals(getIdUserType())) { + setDualRouteCtlgLst(new DualListModel<>(getGeneralRouteCtlgLst(), new ArrayList<>())); + } + break; + //Si USUARIO es MOBILE y selecciona tipo web, se debe cargar permisos privados + //Si USUARIO es MOBILE y selecciona tipo mobile, hacer nada + //Si USUARIO es MOBILE y seleccion tipo both, se debe cargar permisos privados + case MOBILE: + if ("WEB".equals(getIdUserType()) + || "BOTH".equals(getIdUserType())) { + setDualPermissionLst(new DualListModel<>(getGeneralPrivatePermissionLst(), new ArrayList<>())); + } + break; + } + } catch (Exception e) { + logger.error("onUserTypeSlctChange", e); + } + } + + /** + * + */ + public void onSelectedOtherUserAction() { + try { + boolean goAhead = true; + + List statuses = new ArrayList<>(); + + switch (getAction()) { + case "pwd": + statuses.add(UserStatus.ENEBLED); + statuses.add(UserStatus.DISABLED); + break; + case "usr": + statuses.add(UserStatus.ENEBLED); + statuses.add(UserStatus.DISABLED); + break; + case "enebled": + statuses.add(UserStatus.DISABLED); + break; + case "disabled": + statuses.add(UserStatus.ENEBLED); + break; + case "deleted": + statuses.add(UserStatus.ENEBLED); + statuses.add(UserStatus.DISABLED); + break; + default: + goAhead = false; + break; + } + + if (goAhead) { + setPwd(null); + setPwdConfirm(null); + setUserName(null); + setUsrOtherActionSelected(null); + setUsrOtherActionLst( + getController().findUsersInOfficeInStatuses( + statuses, + getLoggedUser().getOffice().getId(), + getLoggedUser().getUser().getId() + ) + ); + } else { + setUsrOtherActionLst(new ArrayList<>()); + } + } catch (Exception e) { + logger.error("enebledDisabledListener", e); + Object[] param = {getBundlePropertyFile().getString("searching")}; + + setUsrOtherActionLst(new ArrayList<>()); + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("user") + ); + } + } + + /** + * + */ + public void isUsernameAvailable() { + logger.debug("isUsernameAvailable"); + try { + if (null != getUserName() + && getUserName().trim().length() >= 5 + && getController().isUsernameAvailableController(getUserName(), getLoggedUser().getOffice().getId())) { + setAvailableUserName(true); + } else { + setAvailableUserName(false); + } + } catch (Exception e) { + logger.error("isUsernameAvailable", e); + Object[] param = {getBundlePropertyFile().getString("searching")}; + + buildAndSendMessage( + param, + getBundlePropertyFile().getString("message.format.fatal"), + FacesMessage.SEVERITY_FATAL, + getBundlePropertyFile().getString("user")); + } + } + + /** + * + */ + private void refreshUserEnebledLst() { + logger.info("refreshUserEnebledLst"); + try { + List statuses = new ArrayList<>(); + statuses.add(UserStatus.ENEBLED); + + setUserByOfficeUpdateSelected(null); + setUserEnebledLst( + getController().findUsersInOfficeInStatuses( + statuses, + getLoggedUser().getOffice().getId(), + getLoggedUser().getUser().getId() + ) + ); + } catch (Exception e) { + logger.error("refreshUserEnebledLst", e); + setUserEnebledLst(new ArrayList<>()); + } + } + + /** + * + */ + private void fillUBOData() { + logger.debug("fillUBOData"); + try { + switch (getUserByOfficeUpdateSelected().getUser().getUserType()) { + // Bring all grants + case WEB: + setDualPermissionLst( + new DualListModel<>( + findAllPermissionsByUBO(false, false, getUserByOfficeUpdateSelected().getId()), + findAllPermissionsByUBO(false, true, getUserByOfficeUpdateSelected().getId()) + ) + ); + setCertifier(false); + break; + //Bring all routes + case MOBILE: + setDualRouteCtlgLst( + new DualListModel<>( + findAllRoutesByHRHR(true, false, getUserByOfficeUpdateSelected().getUser().getHumanResource().getId(), getLoggedUser().getOffice().getId()), + findAllRoutesByHRHR(true, true, getUserByOfficeUpdateSelected().getUser().getHumanResource().getId(), getLoggedUser().getOffice().getId()) + ) + ); + setCertifier(ActiveStatus.ENEBLED.equals(getUserByOfficeUpdateSelected().getUser().getCertifier())); + setManagment(ActiveStatus.ENEBLED.equals(getUserByOfficeUpdateSelected().getUser().getManagement())); + break; + // Bring all grants and routes + case BOTH: + setDualPermissionLst( + new DualListModel<>( + findAllPermissionsByUBO(false, false, getUserByOfficeUpdateSelected().getId()), + findAllPermissionsByUBO(false, true, getUserByOfficeUpdateSelected().getId()) + ) + ); + setDualRouteCtlgLst( + new DualListModel<>( + findAllRoutesByHRHR(true, false, getUserByOfficeUpdateSelected().getUser().getHumanResource().getId(), getLoggedUser().getOffice().getId()), + findAllRoutesByHRHR(true, true, getUserByOfficeUpdateSelected().getUser().getHumanResource().getId(), getLoggedUser().getOffice().getId()) + ) + ); + setCertifier(ActiveStatus.ENEBLED.equals(getUserByOfficeUpdateSelected().getUser().getCertifier())); + setManagment(ActiveStatus.ENEBLED.equals(getUserByOfficeUpdateSelected().getUser().getManagement())); + break; + } + + setAllowU(false); + } catch (Exception e) { + logger.error("fillUBOData", e); + } + } + + /** + * Find all permissions that has assigned the User By Office selected. + * + * @param uboId User By Office Identification number. + * @return + */ + private List findAllPermissionsByUBO(boolean isRuoute, boolean in, String uboId) { + logger.info("findAllPermissionsByUBO"); + List results = new ArrayList<>(); + + try { + results = getController().findList(isRuoute, in, uboId, null, null); + } catch (Exception e) { + logger.error("findAllPermissionsByUBO", e); + } + return results; + } + + /** + * Find all routes that has assigned the User By Office selected. + * + * @param hrhrId Human Resources Has Route Identification number. + * @param officeId + * @return + */ + private List findAllRoutesByHRHR(boolean isRuoute, boolean in, String hrhrId, String officeId) { + logger.info("findAllRoutesByHRHR"); + List results = new ArrayList<>(); + + try { + results = getController().findList(isRuoute, in, null, hrhrId, officeId); + } catch (Exception e) { + logger.error("findAllRoutesByHRHR", e); + } + return results; + } + + /** + * Clean all forms fields values + */ + private void cleanFormFields() { + logger.info("clean"); + try { + setIdUserType("N/A"); + setCertifier(false); + setDualPermissionLst(new DualListModel<>(new ArrayList<>(), new ArrayList<>())); + setDualRouteCtlgLst(new DualListModel<>(new ArrayList<>(), new ArrayList<>())); + } catch (Exception e) { + logger.error("clean", e); + } + } + + /** + * + */ + private void cleanOtherActionsFormFields() { + logger.info("cleanOtherActionsFormFields"); + try { + setAction("N/A"); + setUsrOtherActionSelected(null); + setUserName(null); + setPwd(null); + setPwdConfirm(null); + } catch (Exception e) { + logger.error("cleanOtherActionsFormFields", e); + } + } + + private static final long serialVersionUID = -3695498920999228355L; + final Logger logger = LogManager.getLogger(UserUpdateBean.class); + + @PostConstruct + public void init() { + try { + loadBundlePropertyFile(); + + List statuses = new ArrayList<>(); + List types = new ArrayList<>(); + + types.add(PermissionType.PRIVATE); + statuses.add(UserStatus.ENEBLED); + + setController(new UserUpdateController()); + setUserEnebledLst(getController().findUsersInOfficeInStatuses(statuses, getLoggedUser().getOffice().getId(), getLoggedUser().getUser().getId())); + setGeneralRouteCtlgLst(getController().findGeneralList(true, null, getLoggedUser().getOffice().getId())); + setGeneralPrivatePermissionLst(getController().findGeneralList(false, types, null)); + + types.clear(); + types.add(PermissionType.PUBLIC); + + setGeneralPublicPermissionLst(getController().findGeneralList(false, types, null)); + + cleanFormFields(); + + allowU=true; + } catch (Exception e) { + logger.error("init", e); + } + } + + private UserUpdateController controller; + private List userEnebledLst; + private UserByOffice userByOfficeUpdateSelected; + private DualListModel dualPermissionLst; + private DualListModel dualRouteCtlgLst; + private boolean refresh; + private String idUserType; + private boolean certifier; + private boolean managment; + private boolean allowU; + private List generalPrivatePermissionLst; + private List generalPublicPermissionLst; + private List generalRouteCtlgLst; + private String action; + private List usrOtherActionLst; + private UserByOffice usrOtherActionSelected; + private boolean availableUserName; + private String userName; + private String pwd; + private String pwdConfirm; + + public UserUpdateController getController() { + return controller; + } + + public void setController(UserUpdateController controller) { + this.controller = controller; + } + + public List getUserEnebledLst() { + return userEnebledLst; + } + + public void setUserEnebledLst(List userEnebledLst) { + this.userEnebledLst = userEnebledLst; + } + + public UserByOffice getUserByOfficeUpdateSelected() { + return userByOfficeUpdateSelected; + } + + public void setUserByOfficeUpdateSelected(UserByOffice userByOfficeUpdateSelected) { + this.userByOfficeUpdateSelected = userByOfficeUpdateSelected; + } + + public DualListModel getDualPermissionLst() { + return dualPermissionLst; + } + + public void setDualPermissionLst(DualListModel dualPermissionLst) { + this.dualPermissionLst = dualPermissionLst; + } + + public DualListModel getDualRouteCtlgLst() { + return dualRouteCtlgLst; + } + + public void setDualRouteCtlgLst(DualListModel dualRouteCtlgLst) { + this.dualRouteCtlgLst = dualRouteCtlgLst; + } + + public boolean isRefresh() { + return refresh; + } + + public void setRefresh(boolean refresh) { + this.refresh = refresh; + } + + public String getIdUserType() { + return idUserType; + } + + public void setIdUserType(String idUserType) { + this.idUserType = idUserType; + } + + public boolean isCertifier() { + return certifier; + } + + public void setCertifier(boolean certifier) { + this.certifier = certifier; + } + + public boolean isManagment() { + return managment; + } + + public void setManagment(boolean managment) { + this.managment = managment; + } + + public boolean isAllowU() { + return allowU; + } + + public void setAllowU(boolean allowU) { + this.allowU = allowU; + } + + + + + public List getGeneralPrivatePermissionLst() { + return generalPrivatePermissionLst; + } + + public void setGeneralPrivatePermissionLst(List generalPrivatePermissionLst) { + this.generalPrivatePermissionLst = generalPrivatePermissionLst; + } + + public List getGeneralPublicPermissionLst() { + return generalPublicPermissionLst; + } + + public void setGeneralPublicPermissionLst(List generalPublicPermissionLst) { + this.generalPublicPermissionLst = generalPublicPermissionLst; + } + + public List getGeneralRouteCtlgLst() { + return generalRouteCtlgLst; + } + + public void setGeneralRouteCtlgLst(List generalRouteCtlgLst) { + this.generalRouteCtlgLst = generalRouteCtlgLst; + } + + public String getAction() { + return action; + } + + public void setAction(String action) { + this.action = action; + } + + public List getUsrOtherActionLst() { + return usrOtherActionLst; + } + + public void setUsrOtherActionLst(List usrOtherActionLst) { + this.usrOtherActionLst = usrOtherActionLst; + } + + public UserByOffice getUsrOtherActionSelected() { + return usrOtherActionSelected; + } + + public void setUsrOtherActionSelected(UserByOffice usrOtherActionSelected) { + this.usrOtherActionSelected = usrOtherActionSelected; + } + + public boolean isAvailableUserName() { + return availableUserName; + } + + public void setAvailableUserName(boolean availableUserName) { + this.availableUserName = availableUserName; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getPwd() { + return pwd; + } + + public void setPwd(String pwd) { + this.pwd = pwd; + } + + public String getPwdConfirm() { + return pwdConfirm; + } + + public void setPwdConfirm(String pwdConfirm) { + this.pwdConfirm = pwdConfirm; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/topbar/PrivacyBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/topbar/PrivacyBean.java new file mode 100644 index 0000000..5a9bfb2 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/topbar/PrivacyBean.java @@ -0,0 +1,119 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.topbar; + +import com.arrebol.apc.controller.topbar.PrivacyController; +import com.arrebol.apc.security.APCSecure; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import javax.annotation.PostConstruct; +import javax.faces.application.FacesMessage; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Named +@ViewScoped +public class PrivacyBean extends GenericBean implements Serializable { + + /** + * + */ + public void updatePassword() { + String messafeFormat = getBundlePropertyFile().getString("message.format.fatal"); + String messageTitle = getBundlePropertyFile().getString("user"); + String messageAction = getBundlePropertyFile().getString("modified"); + + FacesMessage.Severity severity = FacesMessage.SEVERITY_FATAL; + try { + if (validatePwd() && getController().updatePasswordByUserId(new APCSecure(APP, getPwd()).getPassword(), getLoggedUser().getUser().getId())) { + + messageTitle = getBundlePropertyFile().getString("password"); + messafeFormat = getBundlePropertyFile().getString("message.format.sucess"); + severity = FacesMessage.SEVERITY_INFO; + } else { + messageTitle = getBundlePropertyFile().getString("password"); + messafeFormat = getBundlePropertyFile().getString("message.format.failure"); + severity = FacesMessage.SEVERITY_WARN; + } + + Object[] param = {messageTitle, messageAction}; + + buildAndSendMessage(param, messafeFormat, severity, messageTitle); + } catch (Exception e) { + logger.error("savePermission", e); + Object[] param = {messageAction}; + + buildAndSendMessage(param, messafeFormat, severity, messageTitle); + } + } + + @PostConstruct + public void init() { + try { + loadBundlePropertyFile(); + setController(new PrivacyController()); + } catch (Exception e) { + logger.error("init", e); + } + } + + /** + * + * @return + */ + private boolean validatePwd() { + boolean isValidPwd = false; + try { + if (getPwd().trim().length() > 4) { + isValidPwd = true; + } + } catch (Exception e) { + logger.error("validatePwd", e); + } + return isValidPwd; + } + + private static final long serialVersionUID = 9192662395164473848L; + + final Logger logger = LogManager.getLogger(PrivacyBean.class); + + private PrivacyController controller; + private String pwd; + private String confirmPwd; + + public PrivacyController getController() { + return controller; + } + + public void setController(PrivacyController controller) { + this.controller = controller; + } + + public String getPwd() { + return pwd; + } + + public void setPwd(String pwd) { + this.pwd = pwd; + } + + public String getConfirmPwd() { + return confirmPwd; + } + + public void setConfirmPwd(String confirmPwd) { + this.confirmPwd = confirmPwd; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/beans/topbar/TopBarBean.java b/ace-web/src/main/java/com/arrebol/apc/web/beans/topbar/TopBarBean.java new file mode 100644 index 0000000..06082f2 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/beans/topbar/TopBarBean.java @@ -0,0 +1,64 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.beans.topbar; + +import com.arrebol.apc.controller.topbar.TopBarController; +import com.arrebol.apc.model.core.Office; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Named +@ViewScoped +public class TopBarBean extends GenericBean implements Serializable { + + private static final long serialVersionUID = -410735400441974978L; + final Logger logger = LogManager.getLogger(TopBarBean.class); + + private TopBarController controller; + private List offices; + + @PostConstruct + public void init() { + try { + loadBundlePropertyFile(); + + setController(new TopBarController()); + //setLoggedUser(getController().findUserLogged(userByOffice)); + setOffices(getController().findAllOfficesByUserController(getLoggedUser().getUser().getId())); + } catch (Exception e) { + logger.error("Topbar init", e); + } + } + + public TopBarController getController() { + return controller; + } + + public void setController(TopBarController controller) { + this.controller = controller; + } + + public List getOffices() { + return offices; + } + + public void setOffices(List offices) { + this.offices = offices; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/converters/GenericConverter.java b/ace-web/src/main/java/com/arrebol/apc/web/converters/GenericConverter.java new file mode 100644 index 0000000..280e1c5 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/converters/GenericConverter.java @@ -0,0 +1,41 @@ +package com.arrebol.apc.web.converters; + +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; +import javax.faces.convert.FacesConverter; +import org.primefaces.component.picklist.PickList; +import org.primefaces.model.DualListModel; + +/** + * + * @author Carlos Janitzio Zavala Lopez. + */ +@FacesConverter("genericConverter") +public class GenericConverter implements Converter { + + @Override + public Object getAsObject(FacesContext facesContext, UIComponent component, String submittedValue) { + PickList p = (PickList) component; + DualListModel dl = (DualListModel) p.getValue(); + for (int i = 0; i < dl.getSource().size(); i++) { + if (dl.getSource().get(i).toString().contentEquals(submittedValue)) { + return dl.getSource().get(i); + } + } + for (int i = 0; i < dl.getTarget().size(); i++) { + if (dl.getTarget().get(i).toString().contentEquals(submittedValue)) { + return dl.getTarget().get(i); + } + } + return null; + } + + @Override + public String getAsString(FacesContext facesContext, UIComponent component, Object value) { + PickList p = (PickList) component; + DualListModel dl = (DualListModel) p.getValue(); + return value.toString(); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/converters/PeopleConverter.java b/ace-web/src/main/java/com/arrebol/apc/web/converters/PeopleConverter.java new file mode 100644 index 0000000..ad50c9a --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/converters/PeopleConverter.java @@ -0,0 +1,44 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.converters; + +import com.arrebol.apc.model.catalog.People; +import javax.faces.application.FacesMessage; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; +import javax.faces.convert.ConverterException; +import javax.faces.convert.FacesConverter; +import javax.inject.Named; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@Named +@FacesConverter(value = "peopleConverter", managed = true) +public class PeopleConverter implements Converter { + + @Override + public People getAsObject(FacesContext context, UIComponent component, String id) { + try { + return new People(id); + } catch (Exception e) { + throw new ConverterException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error en búsqueda", "No se pudo obtener los datos de la persona búscada.")); + } + } + + @Override + public String getAsString(FacesContext context, UIComponent component, People value) { + if (value != null) { + return value.getId(); + } else { + return null; + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/converters/PerseonSearchConverter.java b/ace-web/src/main/java/com/arrebol/apc/web/converters/PerseonSearchConverter.java new file mode 100644 index 0000000..c509405 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/converters/PerseonSearchConverter.java @@ -0,0 +1,42 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.converters; + +import com.arrebol.apc.model.views.AdministrationPersonSerchView; +import javax.faces.application.FacesMessage; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; +import javax.faces.convert.ConverterException; +import javax.faces.convert.FacesConverter; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@FacesConverter("perseonSearchConverter") +public class PerseonSearchConverter implements Converter { + + @Override + public AdministrationPersonSerchView getAsObject(FacesContext context, UIComponent component, String id) { + try { + return new AdministrationPersonSerchView(id); + } catch (Exception e) { + throw new ConverterException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error en búsqueda", "No se pudo obtener los datos de la persona búscada.")); + } + } + + @Override + public String getAsString(FacesContext context, UIComponent component, AdministrationPersonSerchView value) { + if (value != null) { + return value.getId(); + } else { + return null; + } + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/converters/UserByOfficeConverter.java b/ace-web/src/main/java/com/arrebol/apc/web/converters/UserByOfficeConverter.java new file mode 100644 index 0000000..0b6f589 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/converters/UserByOfficeConverter.java @@ -0,0 +1,82 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.converters; + +import com.arrebol.apc.model.core.UserByOffice; +import java.util.List; +import javax.faces.application.FacesMessage; +import javax.faces.component.UIComponent; +import javax.faces.component.UISelectItem; +import javax.faces.component.UISelectItems; +import javax.faces.context.FacesContext; +import javax.faces.convert.Converter; +import javax.faces.convert.ConverterException; +import javax.faces.convert.FacesConverter; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@FacesConverter("userByOfficeConverter") +public class UserByOfficeConverter implements Converter { + + @Override + public Object getAsObject(FacesContext facesContext, UIComponent component, String submittedValue) { + try { + + if (!component.getChildren().isEmpty()) { + + for (final UIComponent chidren : component.getChildren()) { + if (chidren instanceof UISelectItems) { + return convertFromSelect(chidren, submittedValue); + } + } + } + return null; + } catch (Exception e) { + throw new ConverterException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error", "Usuario/s no validos")); + } + } + + @Override + public String getAsString(FacesContext fc, UIComponent uic, Object object) { + if (object != null) { + return String.valueOf(((UserByOffice) object).getId()); + } else { + return null; + } + } + + /** + * + * @param component + * @param submittedValue + * @return + */ + private Object convertFromSelect(UIComponent component, String submittedValue) { + if (component instanceof UISelectItem) { + final UISelectItem item = (UISelectItem) component; + final UserByOffice value = (UserByOffice) item.getValue(); + if (submittedValue.equals(value.getId())) { + return value; + } + } + if (component instanceof UISelectItems) { + UISelectItems items = (UISelectItems) component; + List elements = (List) items.getValue(); + + for (UserByOffice element : elements) { + if (submittedValue.equals(element.getId())) { + return element; + } + } + } + return null; + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/drive/DriverBean.java b/ace-web/src/main/java/com/arrebol/apc/web/drive/DriverBean.java new file mode 100644 index 0000000..3d6bacf --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/drive/DriverBean.java @@ -0,0 +1,589 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.drive; + +import com.arrebol.apc.controller.drive.DriverController; +import com.arrebol.apc.model.views.CobranzaWeekByUserView; +import com.arrebol.apc.model.views.ColocationWeekByUserView; +import com.arrebol.apc.model.views.InformationLoanWeekView; +import com.arrebol.apc.model.views.ResumeNewCustomerLastWeekView; +import com.arrebol.apc.model.views.ResumeNewCustomerWeekView; +import com.arrebol.apc.model.views.ResumenInOutWeekByUserView; +import com.arrebol.apc.model.views.ResumenTotalWeekView; +import com.arrebol.apc.model.views.SubtotalWeekByUserView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFFont; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.hssf.util.HSSFColor; +import org.apache.poi.ss.usermodel.BorderStyle; +import org.apache.poi.ss.usermodel.CellType; +import org.apache.poi.ss.usermodel.FillPatternType; +import org.apache.poi.ss.usermodel.IndexedColors; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("driverManager") +@ViewScoped +public class DriverBean extends GenericBean implements Serializable, Datatable { + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public DriverController getDriverCtrl() { + return driverCtrl; + } + + public void setDriverCtrl(DriverController driverCtrl) { + this.driverCtrl = driverCtrl; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public InformationLoanWeekView getSelectedData() { + return selectedData; + } + + public void setSelectedData(InformationLoanWeekView selectedData) { + this.selectedData = selectedData; + } + + public List getDataColocation() { + return dataColocation; + } + + public void setDataColocation(List dataColocation) { + this.dataColocation = dataColocation; + } + + public ColocationWeekByUserView getSelectedColocation() { + return selectedColocation; + } + + public void setSelectedColocation(ColocationWeekByUserView selectedColocation) { + this.selectedColocation = selectedColocation; + } + + public List getDataSubtotal() { + return dataSubtotal; + } + + public void setDataSubtotal(List dataSubtotal) { + this.dataSubtotal = dataSubtotal; + } + + public SubtotalWeekByUserView getSelectedSubtotal() { + return selectedSubtotal; + } + + public void setSelectedSubtotal(SubtotalWeekByUserView selectedSubtotal) { + this.selectedSubtotal = selectedSubtotal; + } + + public List getDataResumen() { + return dataResumen; + } + + public void setDataResumen(List dataResumen) { + this.dataResumen = dataResumen; + } + + public ResumenInOutWeekByUserView getSelectedResumen() { + return selectedResumen; + } + + public void setSelectedResumen(ResumenInOutWeekByUserView selectedResumen) { + this.selectedResumen = selectedResumen; + } + + public List getDataCobranza() { + return dataCobranza; + } + + public void setDataCobranza(List dataCobranza) { + this.dataCobranza = dataCobranza; + } + + public CobranzaWeekByUserView getSelectedCobranza() { + return selectedCobranza; + } + + public void setSelectedCobranza(CobranzaWeekByUserView selectedCobranza) { + this.selectedCobranza = selectedCobranza; + } + + public List getDataTotal() { + return dataTotal; + } + + public void setDataTotal(List dataTotal) { + this.dataTotal = dataTotal; + } + + public ResumenTotalWeekView getSelectedTotal() { + return selectedTotal; + } + + public void setSelectedTotal(ResumenTotalWeekView selectedTotal) { + this.selectedTotal = selectedTotal; + } + + public List getDataCtesNvos() { + return dataCtesNvos; + } + + public void setDataCtesNvos(List dataCtesNvos) { + this.dataCtesNvos = dataCtesNvos; + } + + public ResumeNewCustomerWeekView getSelectedCtesNvos() { + return selectedCtesNvos; + } + + public void setSelectedCtesNvos(ResumeNewCustomerWeekView selectedCtesNvos) { + this.selectedCtesNvos = selectedCtesNvos; + } + + public void paintDataXLS(Object document) { + HSSFWorkbook wb = (HSSFWorkbook) document; + HSSFSheet sheet = wb.getSheetAt(0); + HSSFRow header = sheet.getRow(0); + HSSFCellStyle cellStyle = wb.createCellStyle(); + HSSFFont font = wb.createFont(); + font.setBold(true); + cellStyle.setFont(font); + cellStyle.setBorderTop(BorderStyle.DOUBLE); + cellStyle.setBorderBottom(BorderStyle.DOUBLE); + cellStyle.setBorderLeft(BorderStyle.DOUBLE); + cellStyle.setBorderRight(BorderStyle.DOUBLE); + cellStyle.setFillForegroundColor(HSSFColor.HSSFColorPredefined.LEMON_CHIFFON.getIndex()); + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + + short dataFormat = wb.createDataFormat().getFormat("$#,##0.00"); + + initCellStyle(wb); + + for (int i = 0; i < header.getPhysicalNumberOfCells(); i++) { + HSSFCell cell = header.getCell(i); + cell.setCellStyle(cellStyle); + } + + String aux = ""; + for (int i = 1; i < sheet.getPhysicalNumberOfRows(); i++) { + HSSFRow row = sheet.getRow(i); + InformationLoanWeekView loanWeekData = data.get(i - 1); + HSSFCell cell; + String rowRenov = loanWeekData.getConditionRenovation(); + //cellStyleRow = getCellStyle(rowRenov); + // Row General + for (int j = 0; j < row.getPhysicalNumberOfCells(); j++) { + cell = row.getCell(j); + cell.setCellStyle(getCellStyle(rowRenov)); + + if ((j >= 7 && j <= 22) || (j == 2 || j == 3)) { + cell.getCellStyle().setDataFormat(dataFormat); + aux = cell.getStringCellValue().replace("$", ""); + aux = aux.replace(",", ""); + cell.setCellValue(Double.parseDouble(aux)); + cell.setCellType(CellType.NUMERIC); + } + } + + // Lunes + cell = row.getCell(10); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionLunes())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(11); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionLunes())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Martes + cell = row.getCell(12); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionMartes())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(13); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionMartes())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Miércoles + cell = row.getCell(14); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionMiercoles())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(15); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionMiercoles())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Jueves + cell = row.getCell(16); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionJueves())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(17); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionJueves())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Viernes + cell = row.getCell(18); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionViernes())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(19); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionViernes())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Sábado + cell = row.getCell(20); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionSabado())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(21); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionSabado())); + cell.getCellStyle().setDataFormat(dataFormat); + } + + String ruta = data.get(0).getRouteName(); + int regInsertados = 0; + + for (int i = 1; i < sheet.getPhysicalNumberOfRows(); i++) { + //HSSFRow row = sheet.getRow(i); + //InformationLoanWeekView loanWeekData = data.get(i - 1 - regInsertados); + + if (!ruta.equalsIgnoreCase(data.get(i - 1 - regInsertados).getRouteName())) { + creaRegistroTotales(ruta, sheet, dataFormat, false, i); + ruta = data.get(i - 1 - regInsertados).getRouteName(); + regInsertados++; + } + } + creaRegistroTotales(ruta, sheet, dataFormat, true, sheet.getPhysicalNumberOfRows() + 1); + } + + private void creaRegistroTotales(String ruta, HSSFSheet sheet, short dataFormat, boolean lastRow, int i) { + HSSFRow r; + HSSFCell cellNew; + String rutaAux = ruta; + if (lastRow) { + r = sheet.createRow(sheet.getPhysicalNumberOfRows() + 1); + } else { + sheet.shiftRows(i, sheet.getLastRowNum(), 1, true, false); + r = sheet.createRow(i); + } + + // Apoyos + cellNew = r.createCell(3); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + BigDecimal suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux) && p.getWeekLoanDate() == p.getWeekCurrentDate())).map((py) -> py.getApoyos()).reduce(BigDecimal::add).isPresent() + ? data.stream().filter((p) -> (p.getRouteName().equals(rutaAux) && p.getWeekLoanDate() == p.getWeekCurrentDate())).map((py) -> py.getApoyos()).reduce(BigDecimal::add).get() + : BigDecimal.ZERO; + cellNew.setCellValue(suma.doubleValue()); + // Comsion por apertura + cellNew = r.createCell(4); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux) && p.getWeekLoanDate() == p.getWeekCurrentDate())).map((py) -> py.getComisionApertura()).reduce(BigDecimal::add).isPresent() + ? data.stream().filter((p) -> (p.getRouteName().equals(rutaAux) && p.getWeekLoanDate() == p.getWeekCurrentDate())).map((py) -> py.getComisionApertura()).reduce(BigDecimal::add).get() + : BigDecimal.ZERO; + cellNew.setCellValue(suma.doubleValue()); + + //Totales + cellNew = r.createCell(9); + cellNew.setCellType(CellType.STRING); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.setCellValue("TOTALES: "); + // Lunes + cellNew = r.createCell(10); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentMonday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(11); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeMonday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Martes + cellNew = r.createCell(12); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentTuesday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(13); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeTuesday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Miércoles + cellNew = r.createCell(14); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentWednesday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(15); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeWednesday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Jueves + cellNew = r.createCell(16); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentThursday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(17); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeThursday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Viernes + cellNew = r.createCell(18); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentFriday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(19); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeFriday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Sábado + cellNew = r.createCell(20); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentSaturday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(21); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeSaturday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Faltante + cellNew = r.createCell(22); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFaltante()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + } + + private HSSFCellStyle getCellStyle(String cellStyleColor) { + if (cellStyleColor == null) { + cellStyleColor = "White"; + } + + switch (cellStyleColor) { + case "redRow": + return cellStyleRed; + case "greenRow": + return cellStyleGreen; + case "yellowRow": + return cellStyleYellow; + case "blueRow": + return cellStyleBlue; + case "blueLightRow": + return cellStyleBlueLight; + case "greenLigthRow": + return cellStyleGreenLight; + case "greenStrongRow": + return cellStyleGreenStrong; + case "greyRow": + return cellStyleGrey; + case "orangeRow": + return cellStyleOrange; + default: + return cellStyleWhite; + } + } + + private void initCellStyle(HSSFWorkbook wb) { + // MULTA + fontRed = wb.createFont(); + cellStyleRed = wb.createCellStyle(); + fontRed.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleRed.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleRed.setFillForegroundColor(IndexedColors.RED.getIndex()); + //cellStyleRed.setFont(fontRed); + + // ABONO 0 + fontGreen = wb.createFont(); + cellStyleGreen = wb.createCellStyle(); + fontGreen.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleGreen.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleGreen.setFillForegroundColor(IndexedColors.SEA_GREEN.getIndex()); + //cellStyleGreen.setFont(fontGreen); + + // ABONÓ MENOS + fontYellow = wb.createFont(); + cellStyleYellow = wb.createCellStyle(); + fontYellow.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleYellow.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleYellow.setFillForegroundColor(IndexedColors.LIGHT_YELLOW.getIndex()); + //cellStyleYellow.setFont(fontYellow); + + // ABONÓ DE MÃS + fontBlue = wb.createFont(); + cellStyleBlue = wb.createCellStyle(); + fontBlue.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleBlue.setFillPattern(FillPatternType.SOLID_FOREGROUND); + //cellStyleBlue.setFillForegroundColor(HSSFColor.HSSFColorPredefined.BLUE.getIndex()); + cellStyleBlue.setFillForegroundColor(IndexedColors.TURQUOISE.getIndex()); + //cellStyleBlue.setFont(fontBlue); + + // PAGO CONGELADO + fontBlueLight = wb.createFont(); + cellStyleBlueLight = wb.createCellStyle(); + fontBlueLight.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleBlueLight.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleBlueLight.setFillForegroundColor(IndexedColors.LIGHT_BLUE.getIndex()); + + // RENOVÓ + fontGreenLight = wb.createFont(); + cellStyleGreenLight = wb.createCellStyle(); + fontGreenLight.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleGreenLight.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleGreenLight.setFillForegroundColor(IndexedColors.BRIGHT_GREEN.getIndex()); + //cellStyleGreenLight.setFont(fontGreenLight); + + // getSaldoInsoluto == 0 + fontGreenStrong = wb.createFont(); + cellStyleGreenStrong = wb.createCellStyle(); + fontGreenStrong.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleGreenStrong.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleGreenStrong.setFillForegroundColor(IndexedColors.GREEN.getIndex()); + //cellStyleGreenStrong.setFont(fontGreenStrong); + + // CLIENTE NUEVO + fontOrange = wb.createFont(); + cellStyleOrange = wb.createCellStyle(); + fontOrange.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleOrange.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleOrange.setFillForegroundColor(IndexedColors.ORANGE.getIndex()); + //cellStyleGreenLight.setFont(fontGreenLight); + + // Totales + fontGrey = wb.createFont(); + cellStyleGrey = wb.createCellStyle(); + fontGrey.setColor(HSSFColor.HSSFColorPredefined.WHITE.getIndex()); + cellStyleGrey.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleGrey.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex()); + cellStyleGrey.setFont(fontGrey); + + cellStyleWhite = wb.createCellStyle(); + cellStyleWhite.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleWhite.setFillForegroundColor(HSSFColor.HSSFColorPredefined.WHITE.getIndex()); + } + + private DriverController driverCtrl; + private List data; + private InformationLoanWeekView selectedData; + + private List dataColocation; + private ColocationWeekByUserView selectedColocation; + + private List dataSubtotal; + private SubtotalWeekByUserView selectedSubtotal; + + private List dataResumen; + private ResumenInOutWeekByUserView selectedResumen; + + private List dataCobranza; + private CobranzaWeekByUserView selectedCobranza; + + private List dataTotal; + private ResumenTotalWeekView selectedTotal; + + private List dataCtesNvos; + private ResumeNewCustomerWeekView selectedCtesNvos; + + // Datos para pintar las celdas + HSSFCellStyle cellStyleRed; + HSSFFont fontRed; + HSSFCellStyle cellStyleGreen; + HSSFFont fontGreen; + HSSFCellStyle cellStyleYellow; + HSSFFont fontYellow; + HSSFCellStyle cellStyleBlue; + HSSFFont fontBlue; + HSSFCellStyle cellStyleBlueLight; + HSSFFont fontBlueLight; + HSSFCellStyle cellStyleGreenLight; + HSSFFont fontGreenLight; + HSSFCellStyle cellStyleGreenStrong; + HSSFFont fontGreenStrong; + HSSFCellStyle cellStyleOrange; + HSSFFont fontOrange; + HSSFCellStyle cellStyleWhite; + HSSFCellStyle cellStyleGrey; + HSSFFont fontGrey; + + @PostConstruct + public void init() { + driverCtrl = new DriverController(); + data = driverCtrl.getAllLoanThisWeekByOffice(getLoggedUser().getOffice().getId()); + dataColocation = driverCtrl.getAllColocationWeekByOffice(getLoggedUser().getOffice().getId()); + dataSubtotal = driverCtrl.getAllSubtotalThisWeekByOffice(getLoggedUser().getOffice().getId()); + dataResumen = driverCtrl.getAllResumenInOutThisWeekByOffice(getLoggedUser().getOffice().getId()); + dataCobranza = driverCtrl.getAllCobranzaThisWeekByOffice(getLoggedUser().getOffice().getId()); + dataTotal = driverCtrl.getAllResumenTotalWeekByOffice(getLoggedUser().getOffice().getId()); + + dataCtesNvos = driverCtrl.getAllResumenNewCustomerWeekByOffice(); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/drive/DriverDateBean.java b/ace-web/src/main/java/com/arrebol/apc/web/drive/DriverDateBean.java new file mode 100644 index 0000000..b6812a3 --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/drive/DriverDateBean.java @@ -0,0 +1,871 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.drive; + +import com.arrebol.apc.controller.GenericController; +import com.arrebol.apc.controller.admin.LoanController; +import com.arrebol.apc.controller.drive.DriverController; +import com.arrebol.apc.model.enums.LoanDetailsType; +import com.arrebol.apc.model.loan.LoanDetails; +import com.arrebol.apc.model.views.CobranzaWeekByUserView; +import com.arrebol.apc.model.views.ColocationWeekByUserView; +import com.arrebol.apc.model.views.InformationLoanWeekView; +import com.arrebol.apc.model.views.ResumenInOutWeekByUserView; +import com.arrebol.apc.model.views.ResumenTotalWeekView; +import com.arrebol.apc.model.views.SubtotalWeekByUserView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.List; +import java.util.stream.Stream; +import javax.annotation.PostConstruct; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFFont; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.hssf.util.HSSFColor; +import org.apache.poi.ss.usermodel.BorderStyle; +import org.apache.poi.ss.usermodel.CellType; +import org.apache.poi.ss.usermodel.FillPatternType; +import org.apache.poi.ss.usermodel.IndexedColors; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("driverDateManager") +@ViewScoped +public class DriverDateBean extends GenericBean implements Serializable, Datatable { + + public void searchLoanWeekByDate() { + try { + setData(fillDataTable()); + searchResumenDataWeekByDate(); + } catch (Exception e) { + } + } + + public List getDetails(String id) { + try { + loanDetails = loanCtrl.getLoanDetailsbyId(id); + getSaldoInsolutoAbono(); + } catch (Exception e) { + } + return null == loanDetails ? new ArrayList<>() : loanDetails; + } + + public void getSaldoInsolutoAbono( ) { + Double sumaAbonosAnteriores; + Double totalAPagar; + Double saldoInsoluto; + Double saldoMultas; + // + for (LoanDetails detail : loanDetails) { + sumaAbonosAnteriores = loanDetails.stream().filter(p -> p.getReferenceNumber() <= detail.getReferenceNumber() && !p.getLoanDetailsType().equals(LoanDetailsType.FEE) ) + .mapToDouble(LoanDetails::getAbonoD) + .sum(); + saldoMultas = loanDetails.stream().filter(p -> p.getReferenceNumber() <= detail.getReferenceNumber() && p.getLoanDetailsType().equals(LoanDetailsType.FEE)) + .mapToDouble(LoanDetails::getAbonoD) + .sum(); + + totalAPagar = detail.getLoan().getLoanType().getPaymentTotal().doubleValue(); + saldoInsoluto = totalAPagar - sumaAbonosAnteriores + saldoMultas; + + detail.setSaldoInsoluto(new BigDecimal(saldoInsoluto)); + } + } + + public void searchResumenDataWeekByDate() { + try { + SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); + String date = DATE_FORMAT.format(getStarDate()); + + dataColocation = driverCtrl.getAllColocationWeekByOfficeMySQLQuery(date, getLoggedUser().getOffice().getId()); + dataSubtotal = driverCtrl.getAllSubtotalThisWeekByOfficeMySQLQuery(date, getLoggedUser().getOffice().getId()); + dataResumen = driverCtrl.getAllResumenInOutThisWeekByOfficeMySQLQuery(date, getLoggedUser().getOffice().getId()); + dataCobranza = driverCtrl.getAllCobranzaThisWeekByOfficeMySQLQuery(date, getLoggedUser().getOffice().getId()); + dataTotal = driverCtrl.getAllResumenTotalWeekByOfficeMySQLQuery(date, getLoggedUser().getOffice().getId()); + } catch (Exception e) { + } + } + + public List fillDataTable() { + SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); + String starDate = ""; + if (getStarDate() != null) { + starDate = DATE_FORMAT.format(getStarDate()); + } + return getDriverCtrl().getAllLoanWeekByOfficeMySQLQuery(starDate, getLoggedUser().getOffice().getId()); + } + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public DriverController getDriverCtrl() { + return driverCtrl; + } + + public void setDriverCtrl(DriverController driverCtrl) { + this.driverCtrl = driverCtrl; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public InformationLoanWeekView getSelectedData() { + return selectedData; + } + + public void setSelectedData(InformationLoanWeekView selectedData) { + this.selectedData = selectedData; + } + + public List getDataColocation() { + return dataColocation; + } + + public void setDataColocation(List dataColocation) { + this.dataColocation = dataColocation; + } + + public ColocationWeekByUserView getSelectedColocation() { + return selectedColocation; + } + + public void setSelectedColocation(ColocationWeekByUserView selectedColocation) { + this.selectedColocation = selectedColocation; + } + + public List getDataSubtotal() { + return dataSubtotal; + } + + public void setDataSubtotal(List dataSubtotal) { + this.dataSubtotal = dataSubtotal; + } + + public SubtotalWeekByUserView getSelectedSubtotal() { + return selectedSubtotal; + } + + public void setSelectedSubtotal(SubtotalWeekByUserView selectedSubtotal) { + this.selectedSubtotal = selectedSubtotal; + } + + public List getDataResumen() { + return dataResumen; + } + + public void setDataResumen(List dataResumen) { + this.dataResumen = dataResumen; + } + + public ResumenInOutWeekByUserView getSelectedResumen() { + return selectedResumen; + } + + public void setSelectedResumen(ResumenInOutWeekByUserView selectedResumen) { + this.selectedResumen = selectedResumen; + } + + public List getDataCobranza() { + return dataCobranza; + } + + public void setDataCobranza(List dataCobranza) { + this.dataCobranza = dataCobranza; + } + + public CobranzaWeekByUserView getSelectedCobranza() { + return selectedCobranza; + } + + public void setSelectedCobranza(CobranzaWeekByUserView selectedCobranza) { + this.selectedCobranza = selectedCobranza; + } + + public List getDataTotal() { + return dataTotal; + } + + public void setDataTotal(List dataTotal) { + this.dataTotal = dataTotal; + } + + public ResumenTotalWeekView getSelectedTotal() { + return selectedTotal; + } + + public void setSelectedTotal(ResumenTotalWeekView selectedTotal) { + this.selectedTotal = selectedTotal; + } + + public GenericController getGenericCtrl() { + return genericCtrl; + } + + public void setGenericCtrl(GenericController genericCtrl) { + this.genericCtrl = genericCtrl; + } + + public void paintDataXLS(Object document) { + HSSFWorkbook wb = (HSSFWorkbook) document; + HSSFSheet sheet = wb.getSheetAt(0); + HSSFRow header = sheet.getRow(0); + HSSFCellStyle cellStyle = wb.createCellStyle(); + HSSFFont font = wb.createFont(); + font.setBold(true); + cellStyle.setFont(font); + cellStyle.setBorderTop(BorderStyle.DOUBLE); + cellStyle.setBorderBottom(BorderStyle.DOUBLE); + cellStyle.setBorderLeft(BorderStyle.DOUBLE); + cellStyle.setBorderRight(BorderStyle.DOUBLE); + cellStyle.setFillForegroundColor(HSSFColor.HSSFColorPredefined.LEMON_CHIFFON.getIndex()); + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + + short dataFormat = wb.createDataFormat().getFormat("$#,##0.00"); + + initCellStyle(wb); + HSSFCell cellNew; + + + for (int i = 0; i < header.getPhysicalNumberOfCells(); i++) { + HSSFCell cell = header.getCell(i); + cell.setCellStyle(cellStyle); + } + + String aux = ""; + for (int i = 1; i < sheet.getPhysicalNumberOfRows(); i++) { + HSSFRow row = sheet.getRow(i); + InformationLoanWeekView loanWeekData = data.get(i - 1); + HSSFCell cell; + String rowRenov = loanWeekData.getConditionRenovation(); + //cellStyleRow = getCellStyle(rowRenov); + // Row General + for (int j = 0; j < row.getPhysicalNumberOfCells(); j++) { + cell = row.getCell(j); + cell.setCellStyle(getCellStyle(rowRenov)); + + if ((j >= 5 && j <= 23) || (j == 2) || (j==3)) { + cell.getCellStyle().setDataFormat(dataFormat); + aux = cell.getStringCellValue().replace("$", ""); + aux = aux.replace(",", ""); + cell.setCellValue(Double.parseDouble(aux)); + cell.setCellType(CellType.NUMERIC); + } + } + + // Lunes + cell = row.getCell(9); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionLunes())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(10); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionLunes())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Martes + cell = row.getCell(11); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionMartes())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(12); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionMartes())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Miércoles + cell = row.getCell(13); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionMiercoles())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(14); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionMiercoles())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Jueves + cell = row.getCell(15); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionJueves())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(16); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionJueves())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Viernes + cell = row.getCell(17); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionViernes())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(18); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionViernes())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Sábado + cell = row.getCell(19); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionSabado())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(20); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionSabado())); + cell.getCellStyle().setDataFormat(dataFormat); + + /* cell = row.createCell(24); + BigDecimal suma = loanWeekData.getPaymentMonday().add(loanWeekData.getPaymentTuesday().add(loanWeekData.getPaymentWednesday() + .add(loanWeekData.getPaymentThursday().add(loanWeekData.getPaymentFriday().add(loanWeekData.getPaymentSaturday()))))); + if (suma.compareTo(suma.subtract(loanWeekData.getFaltante())) != 0) { + cell.setCellStyle(getCellStyle("difRow")); + } + cell.setCellType(CellType.NUMERIC); + cell.setCellValue(suma.doubleValue()); + cell.getCellStyle().setDataFormat(dataFormat); + + cell = row.createCell(25); + if (suma.compareTo(suma.subtract(loanWeekData.getFaltante())) != 0) { + cell.setCellStyle(getCellStyle("difRow")); + } + cell.setCellType(CellType.NUMERIC); + BigDecimal dif = suma.subtract(loanWeekData.getFaltante()); + cell.setCellValue(dif.doubleValue()); + cell.getCellStyle().setDataFormat(dataFormat);*/ + } + + String ruta = data.get(0).getRouteName(); + int regInsertados = 0; + int regSize = sheet.getPhysicalNumberOfRows(); + + for (int i = 1; i < regSize; i++) { + if (!ruta.equalsIgnoreCase(data.get(i - 1 - regInsertados).getRouteName())) { + //creaRegistroTotalesGeneral(ruta, sheet, dataFormat, false, i); + creaRegistroTotales(ruta, sheet, dataFormat, false, i); + ruta = data.get(i - 1 - regInsertados).getRouteName(); + regInsertados++; + } + } + + ruta = data.get(0).getRouteName(); + regInsertados = 0; + int recorrido= 1; + for (int i = 1; i < regSize; i++) { + if (!ruta.equalsIgnoreCase(data.get(i - 1 - regInsertados).getRouteName())) { + creaRegistroTotalesGeneral(ruta, sheet, dataFormat, false, i+recorrido); + //creaRegistroTotales(ruta, sheet, dataFormat, false, i); + ruta = data.get(i - 1 - regInsertados).getRouteName(); + regInsertados++; + recorrido++; + } + } + + creaRegistroTotales(ruta, sheet, dataFormat, true, sheet.getPhysicalNumberOfRows() + 1); + creaRegistroTotalesGeneral(ruta, sheet, dataFormat, true, sheet.getPhysicalNumberOfRows() + 1); + + + } + + private void creaRegistroTotales(String ruta, HSSFSheet sheet, short dataFormat, boolean lastRow, int i) { + HSSFRow r; + HSSFCell cellNew; + String rutaAux = ruta; + if (lastRow) { + r = sheet.createRow(sheet.getPhysicalNumberOfRows() + 1); + } else { + sheet.shiftRows(i, sheet.getLastRowNum(), 1, true, false); + r = sheet.createRow(i); + } + + Calendar c2 = Calendar.getInstance(); + c2.setTime(getStarDate()); + int weekDate = c2.get(Calendar.WEEK_OF_YEAR); + + // Apoyos + cellNew = r.createCell(2); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + BigDecimal suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux) && p.getWeekLoanDate() == weekDate)).map((py) -> py.getApoyos()).reduce(BigDecimal::add).isPresent() + ? data.stream().filter((p) -> (p.getRouteName().equals(rutaAux) && p.getWeekLoanDate() == weekDate)).map((py) -> py.getApoyos()).reduce(BigDecimal::add).get() + : BigDecimal.ZERO; + cellNew.setCellValue(suma.doubleValue()); + // Comsion por apertura + /*cellNew = r.createCell(3); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux) && p.getWeekLoanDate() == weekDate)).map((py) -> py.getComisionApertura()).reduce(BigDecimal::add).isPresent() + ? data.stream().filter((p) -> (p.getRouteName().equals(rutaAux) && p.getWeekLoanDate() == weekDate)).map((py) -> py.getComisionApertura()).reduce(BigDecimal::add).get() + : BigDecimal.ZERO; + cellNew.setCellValue(suma.doubleValue());*/ + + //Totales + cellNew = r.createCell(7); + cellNew.setCellType(CellType.STRING); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.setCellValue("TOTALES: "); + // Lunes + cellNew = r.createCell(9); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentMonday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(10); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeMonday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Martes + cellNew = r.createCell(11); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentTuesday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(12); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeTuesday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Miércoles + cellNew = r.createCell(13); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentWednesday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(14); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeWednesday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Jueves + cellNew = r.createCell(15); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentThursday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(16); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeThursday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Viernes + cellNew = r.createCell(17); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentFriday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(18); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeFriday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Sábado + cellNew = r.createCell(19); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentSaturday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(20); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeSaturday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Faltante + cellNew = r.createCell(22); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFaltante()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + + + } + + private void creaRegistroTotalesGeneral(String ruta, HSSFSheet sheet, short dataFormat, boolean lastRow, int i) { + HSSFRow r; + HSSFCell cellNew; + String rutaAux = ruta; + if (lastRow) { + r = sheet.createRow(sheet.getPhysicalNumberOfRows() + 1); + } else { + sheet.shiftRows(i, sheet.getLastRowNum(), 1, true, false); + r = sheet.createRow(i); + } + + Calendar calendar = Calendar.getInstance(); + Calendar calendarFor = Calendar.getInstance(); + calendar.setTime(getStarDate()); + int numberWeekOfYear = calendar.get(Calendar.WEEK_OF_YEAR); + + // Falta sacar el calculo + + Entrego = BigDecimal.ZERO; + ComisionAp = BigDecimal.ZERO; + AbonosSemana = BigDecimal.ZERO; + Presto = BigDecimal.ZERO; + data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).forEach(py -> { + calendarFor.setTime(py.getFecha()); + + if (numberWeekOfYear == calendarFor.get(Calendar.WEEK_OF_YEAR)) { + setComisionAp(py.getComisionApertura()); + setAbonosSemana(py.getPaymentMonday()); + setAbonosSemana(py.getPaymentTuesday()); + setAbonosSemana(py.getPaymentWednesday()); + setAbonosSemana(py.getPaymentThursday()); + setAbonosSemana(py.getPaymentFriday()); + setAbonosSemana(py.getPaymentSaturday()); + setPresto(py.getApoyos()); + } + }); + Entrego = Entrego.add(ComisionAp.add(AbonosSemana)); + + Long BonosNuevos = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).filter((py) -> (py.getNewCustomer().equalsIgnoreCase("Si"))).count(); + BigDecimal sumaAbonosSemana = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentMonday().add(py.getPaymentTuesday() + .add(py.getPaymentWednesday().add(py.getPaymentThursday().add(py.getPaymentFriday().add(py.getPaymentSaturday())))))).reduce(BigDecimal::add).get(); + BigDecimal sumaFaltante = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFaltante()).reduce(BigDecimal::add).get(); + BigDecimal faltanteReal = sumaAbonosSemana.subtract(sumaFaltante); + + //(FALTANTE REAL* 100) / ENTREGO + BigDecimal porcentajeReal = faltanteReal.multiply(BigDecimal.valueOf(100.0)); + double entr = Entrego.doubleValue(); + double porcReal = porcentajeReal.doubleValue(); + + if (Entrego.compareTo(BigDecimal.ZERO) > 0 && porcentajeReal.compareTo(BigDecimal.ZERO) != 0) { + porcentajeReal = new BigDecimal(porcReal/entr); + } + else{ + porcentajeReal = BigDecimal.ZERO; + } + + //Totales + cellNew = r.createCell(1); + cellNew.setCellType(CellType.STRING); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.setCellValue("TOTALES GENERAL: "); + + //Entregó + cellNew = r.createCell(2); + cellNew.setCellType(CellType.STRING); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.setCellValue("Entregó: "); + cellNew = r.createCell(3); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + cellNew.setCellValue(Entrego.doubleValue()); + + //Prestó + cellNew = r.createCell(4); + cellNew.setCellType(CellType.STRING); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.setCellValue("Prestó: "); + cellNew = r.createCell(5); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + cellNew.setCellValue(Presto.doubleValue()); + + //Faltante Real + cellNew = r.createCell(6); + cellNew.setCellType(CellType.STRING); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.setCellValue("Faltante Real: "); + cellNew = r.createCell(7); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + cellNew.setCellValue(faltanteReal.doubleValue()); + + //Porcentaje Real + cellNew = r.createCell(8); + cellNew.setCellType(CellType.STRING); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.setCellValue("Porcentaje Real: "); + cellNew = r.createCell(9); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + cellNew.setCellValue(porcentajeReal.doubleValue()); + + //Bonos Nuevos + cellNew = r.createCell(10); + cellNew.setCellType(CellType.STRING); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.setCellValue("Bonos Nuevos: "); + cellNew = r.createCell(11); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.setCellValue(BonosNuevos); + + } + // Se calcula el campo Entrego y Presto + BigDecimal Entrego = BigDecimal.ZERO; + BigDecimal ComisionAp = BigDecimal.ZERO; + BigDecimal AbonosSemana = BigDecimal.ZERO; + BigDecimal Presto = BigDecimal.ZERO; + + public BigDecimal getComisionAp() { + return ComisionAp; + } + + public void setComisionAp(BigDecimal ComisionAp) { + this.ComisionAp = this.ComisionAp.add(ComisionAp); + } + + public BigDecimal getAbonosSemana() { + return AbonosSemana; + } + + public void setAbonosSemana(BigDecimal AbonosSemana) { + this.AbonosSemana = this.AbonosSemana.add(AbonosSemana); + } + + public BigDecimal getPresto() { + return Presto; + } + + public void setPresto(BigDecimal Presto) { + this.Presto = this.Presto.add(Presto); + } + + private HSSFCellStyle getCellStyle(String cellStyleColor) { + if (cellStyleColor == null) { + cellStyleColor = "White"; + } + + switch (cellStyleColor) { + case "redRow": + return cellStyleRed; + case "greenRow": + return cellStyleGreen; + case "yellowRow": + return cellStyleYellow; + case "blueRow": + return cellStyleBlue; + case "blueLightRow": + return cellStyleBlueLight; + case "greenLigthRow": + return cellStyleGreenLight; + case "greenStrongRow": + return cellStyleGreenStrong; + case "greyRow": + return cellStyleGrey; + case "orangeRow": + return cellStyleOrange; + case "difRow": + return cellStyleDif; + case "whiteRow": + return cellStyleWhite; + case "limeGreenRow": + return cellStyleLimeGreen; + default: + return cellStyleWhite; + } + } + + private void initCellStyle(HSSFWorkbook wb) { + // MULTA + fontRed = wb.createFont(); + cellStyleRed = wb.createCellStyle(); + fontRed.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleRed.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleRed.setFillForegroundColor(IndexedColors.RED.getIndex()); + //cellStyleRed.setFont(fontRed); + + // ABONO 0 + fontGreen = wb.createFont(); + cellStyleGreen = wb.createCellStyle(); + fontGreen.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleGreen.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleGreen.setFillForegroundColor(IndexedColors.SEA_GREEN.getIndex()); + //cellStyleGreen.setFont(fontGreen); + + // ABONÓ MENOS + fontYellow = wb.createFont(); + cellStyleYellow = wb.createCellStyle(); + fontYellow.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleYellow.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleYellow.setFillForegroundColor(IndexedColors.LIGHT_YELLOW.getIndex()); + //cellStyleYellow.setFont(fontYellow); + + // ABONÓ DE MÃS + fontBlue = wb.createFont(); + cellStyleBlue = wb.createCellStyle(); + fontBlue.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleBlue.setFillPattern(FillPatternType.SOLID_FOREGROUND); + //cellStyleBlue.setFillForegroundColor(HSSFColor.HSSFColorPredefined.BLUE.getIndex()); + cellStyleBlue.setFillForegroundColor(IndexedColors.TURQUOISE.getIndex()); + //cellStyleBlue.setFont(fontBlue); + + // PAGO CONGELADO + fontBlueLight = wb.createFont(); + cellStyleBlueLight = wb.createCellStyle(); + fontBlueLight.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleBlueLight.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleBlueLight.setFillForegroundColor(IndexedColors.LIGHT_BLUE.getIndex()); + + // RENOVÓ + fontGreenLight = wb.createFont(); + cellStyleGreenLight = wb.createCellStyle(); + fontGreenLight.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleGreenLight.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleGreenLight.setFillForegroundColor(IndexedColors.BRIGHT_GREEN.getIndex()); + //cellStyleGreenLight.setFont(fontGreenLight); + + // getSaldoInsoluto == 0 + fontGreenStrong = wb.createFont(); + cellStyleGreenStrong = wb.createCellStyle(); + fontGreenStrong.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleGreenStrong.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleGreenStrong.setFillForegroundColor(IndexedColors.GREEN.getIndex()); + //cellStyleGreenStrong.setFont(fontGreenStrong); + + //Reactivacion + fontLimeGreen= wb.createFont(); + cellStyleLimeGreen = wb.createCellStyle(); + fontLimeGreen.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleLimeGreen.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleLimeGreen.setFillForegroundColor(IndexedColors.LIME.getIndex()); + + // CLIENTE NUEVO + fontOrange = wb.createFont(); + cellStyleOrange = wb.createCellStyle(); + fontOrange.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleOrange.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleOrange.setFillForegroundColor(IndexedColors.ORANGE.getIndex()); + //cellStyleGreenLight.setFont(fontGreenLight); + + // Totales + fontGrey = wb.createFont(); + cellStyleGrey = wb.createCellStyle(); + fontGrey.setColor(HSSFColor.HSSFColorPredefined.WHITE.getIndex()); + cellStyleGrey.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleGrey.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex()); + cellStyleGrey.setFont(fontGrey); + + // Totales + fontDif = wb.createFont(); + cellStyleDif = wb.createCellStyle(); + fontDif.setColor(HSSFColor.HSSFColorPredefined.RED.getIndex()); + //cellStyleDif.setFillPattern(FillPatternType.SOLID_FOREGROUND); + //cellStyleDif.setFillForegroundColor(IndexedColors.WHITE.getIndex()); + cellStyleDif.setFont(fontDif); + + cellStyleWhite = wb.createCellStyle(); + cellStyleWhite.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleWhite.setFillForegroundColor(HSSFColor.HSSFColorPredefined.WHITE.getIndex()); + } + + private DriverController driverCtrl; + private GenericController genericCtrl; + private List data; + private InformationLoanWeekView selectedData; + private LoanController loanCtrl; + + private List dataColocation; + private ColocationWeekByUserView selectedColocation; + + private List dataSubtotal; + private SubtotalWeekByUserView selectedSubtotal; + + private List dataResumen; + private ResumenInOutWeekByUserView selectedResumen; + + private List dataCobranza; + private CobranzaWeekByUserView selectedCobranza; + + private List dataTotal; + private ResumenTotalWeekView selectedTotal; + + private List loanDetails; + + // Datos para pintar las celdas + HSSFCellStyle cellStyleRed; + HSSFFont fontRed; + HSSFCellStyle cellStyleGreen; + HSSFFont fontGreen; + HSSFCellStyle cellStyleYellow; + HSSFFont fontYellow; + HSSFCellStyle cellStyleBlue; + HSSFFont fontBlue; + HSSFCellStyle cellStyleBlueLight; + HSSFFont fontBlueLight; + HSSFCellStyle cellStyleGreenLight; + HSSFFont fontGreenLight; + HSSFCellStyle cellStyleGreenStrong; + HSSFFont fontGreenStrong; + HSSFCellStyle cellStyleOrange; + HSSFFont fontOrange; + HSSFCellStyle cellStyleWhite; + HSSFCellStyle cellStyleGrey; + HSSFFont fontGrey; + HSSFCellStyle cellStyleDif; + HSSFFont fontDif; + HSSFCellStyle cellStyleLimeGreen; + HSSFFont fontLimeGreen; + + + @PostConstruct + public void init() { + SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); + loadBundlePropertyFile(); + initStartAndEndDates(Calendar.DAY_OF_WEEK, 2); + String date = DATE_FORMAT.format(getStarDate()); + + driverCtrl = new DriverController(); + genericCtrl = new GenericController(); + loanCtrl = new LoanController(); + data = fillDataTable(); + dataColocation = driverCtrl.getAllColocationWeekByOfficeMySQLQuery(date, getLoggedUser().getOffice().getId()); + dataSubtotal = driverCtrl.getAllSubtotalThisWeekByOfficeMySQLQuery(date, getLoggedUser().getOffice().getId()); + dataResumen = driverCtrl.getAllResumenInOutThisWeekByOfficeMySQLQuery(date, getLoggedUser().getOffice().getId()); + dataCobranza = driverCtrl.getAllCobranzaThisWeekByOfficeMySQLQuery(date, getLoggedUser().getOffice().getId()); + dataTotal = driverCtrl.getAllResumenTotalWeekByOfficeMySQLQuery(date, getLoggedUser().getOffice().getId()); + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/drive/DriverLastBean.java b/ace-web/src/main/java/com/arrebol/apc/web/drive/DriverLastBean.java new file mode 100644 index 0000000..3ccf22a --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/drive/DriverLastBean.java @@ -0,0 +1,593 @@ +/* + * Arrebol Consultancy copyright. + * + * This code belongs to Arrebol Consultancy + * its use, redistribution or modification are prohibited + * without written authorization from Arrebol Consultancy. + */ +package com.arrebol.apc.web.drive; + +import com.arrebol.apc.controller.drive.DriverController; +import com.arrebol.apc.model.views.CobranzaLastWeekByUserView; +import com.arrebol.apc.model.views.ColocationLastWeekByUserView; +import com.arrebol.apc.model.views.InformationLoanLastWeekView; +import com.arrebol.apc.model.views.ResumeNewCustomerLastWeekView; +import com.arrebol.apc.model.views.ResumenInOutLastWeekByUserView; +import com.arrebol.apc.model.views.ResumenTotalLastWeekView; +import com.arrebol.apc.model.views.SubtotalLastWeekByUserView; +import com.arrebol.apc.web.beans.Datatable; +import com.arrebol.apc.web.beans.GenericBean; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import org.apache.poi.hssf.usermodel.HSSFCell; +import org.apache.poi.hssf.usermodel.HSSFCellStyle; +import org.apache.poi.hssf.usermodel.HSSFFont; +import org.apache.poi.hssf.usermodel.HSSFRow; +import org.apache.poi.hssf.usermodel.HSSFSheet; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.hssf.util.HSSFColor; +import org.apache.poi.ss.usermodel.BorderStyle; +import org.apache.poi.ss.usermodel.CellType; +import org.apache.poi.ss.usermodel.FillPatternType; +import org.apache.poi.ss.usermodel.IndexedColors; +import org.primefaces.event.ReorderEvent; +import org.primefaces.event.RowEditEvent; + +/** + * + * @author Oscar Armando Vargas Cardenas + */ +@Named("driverLastManager") +@ViewScoped +public class DriverLastBean extends GenericBean implements Serializable, Datatable{ + + @Override + public void editRow(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowCancel(RowEditEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void onRowReorder(ReorderEvent event) { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void addRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + @Override + public void deleteRow() { + throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. + } + + public DriverController getDriverCtrl() { + return driverCtrl; + } + + public void setDriverCtrl(DriverController driverCtrl) { + this.driverCtrl = driverCtrl; + } + + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public InformationLoanLastWeekView getSelectedData() { + return selectedData; + } + + public void setSelectedData(InformationLoanLastWeekView selectedData) { + this.selectedData = selectedData; + } + + public List getDataColocation() { + return dataColocation; + } + + public void setDataColocation(List dataColocation) { + this.dataColocation = dataColocation; + } + + public ColocationLastWeekByUserView getSelectedColocation() { + return selectedColocation; + } + + public void setSelectedColocation(ColocationLastWeekByUserView selectedColocation) { + this.selectedColocation = selectedColocation; + } + + public List getDataSubtotal() { + return dataSubtotal; + } + + public void setDataSubtotal(List dataSubtotal) { + this.dataSubtotal = dataSubtotal; + } + + public SubtotalLastWeekByUserView getSelectedSubtotal() { + return selectedSubtotal; + } + + public void setSelectedSubtotal(SubtotalLastWeekByUserView selectedSubtotal) { + this.selectedSubtotal = selectedSubtotal; + } + + public List getDataResumen() { + return dataResumen; + } + + public void setDataResumen(List dataResumen) { + this.dataResumen = dataResumen; + } + + public ResumenInOutLastWeekByUserView getSelectedResumen() { + return selectedResumen; + } + + public void setSelectedResumen(ResumenInOutLastWeekByUserView selectedResumen) { + this.selectedResumen = selectedResumen; + } + + public List getDataCobranza() { + return dataCobranza; + } + + public void setDataCobranza(List dataCobranza) { + this.dataCobranza = dataCobranza; + } + + public CobranzaLastWeekByUserView getSelectedCobranza() { + return selectedCobranza; + } + + public void setSelectedCobranza(CobranzaLastWeekByUserView selectedCobranza) { + this.selectedCobranza = selectedCobranza; + } + + public List getDataTotal() { + return dataTotal; + } + + public void setDataTotal(List dataTotal) { + this.dataTotal = dataTotal; + } + + public ResumenTotalLastWeekView getSelectedTotal() { + return selectedTotal; + } + + public void setSelectedTotal(ResumenTotalLastWeekView selectedTotal) { + this.selectedTotal = selectedTotal; + } + + public List getDataCtesNvos() { + return dataCtesNvos; + } + + public void setDataCtesNvos(List dataCtesNvos) { + this.dataCtesNvos = dataCtesNvos; + } + + public ResumeNewCustomerLastWeekView getSelectedCtesNvos() { + return selectedCtesNvos; + } + + public void setSelectedCtesNvos(ResumeNewCustomerLastWeekView selectedCtesNvos) { + this.selectedCtesNvos = selectedCtesNvos; + } + + public void paintDataXLS(Object document) { + HSSFWorkbook wb = (HSSFWorkbook) document; + HSSFSheet sheet = wb.getSheetAt(0); + HSSFRow header = sheet.getRow(0); + HSSFCellStyle cellStyle = wb.createCellStyle(); + HSSFFont font = wb.createFont(); + font.setBold(true); + cellStyle.setFont(font); + cellStyle.setBorderTop(BorderStyle.DOUBLE); + cellStyle.setBorderBottom(BorderStyle.DOUBLE); + cellStyle.setBorderLeft(BorderStyle.DOUBLE); + cellStyle.setBorderRight(BorderStyle.DOUBLE); + cellStyle.setFillForegroundColor(HSSFColor.HSSFColorPredefined.LEMON_CHIFFON.getIndex()); + cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + + short dataFormat = wb.createDataFormat().getFormat("$#,##0.00"); + + initCellStyle(wb); + + for (int i = 0; i < header.getPhysicalNumberOfCells(); i++) { + HSSFCell cell = header.getCell(i); + cell.setCellStyle(cellStyle); + } + + String aux = ""; + for (int i = 1; i < sheet.getPhysicalNumberOfRows(); i++) { + HSSFRow row = sheet.getRow(i); + InformationLoanLastWeekView loanWeekData = data.get(i-1); + HSSFCell cell; + String rowRenov = loanWeekData.getConditionRenovation(); + //cellStyleRow = getCellStyle(rowRenov); + // Row General + for (int j = 0; j < row.getPhysicalNumberOfCells(); j++) { + cell = row.getCell(j); + cell.setCellStyle(getCellStyle(rowRenov)); + + if((j >= 7 && j <= 22) || (j == 2 || j == 3)){ + cell.getCellStyle().setDataFormat(dataFormat); + aux = cell.getStringCellValue().replace("$", ""); + aux = aux.replace(",", ""); + cell.setCellValue(Double.parseDouble(aux)); + cell.setCellType(CellType.NUMERIC); + } + } + + // Lunes + cell = row.getCell(10); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionLunes())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(11); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionLunes())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Martes + cell = row.getCell(12); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionMartes())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(13); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionMartes())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Miércoles + cell = row.getCell(14); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionMiercoles())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(15); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionMiercoles())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Jueves + cell = row.getCell(16); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionJueves())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(17); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionJueves())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Viernes + cell = row.getCell(18); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionViernes())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(19); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionViernes())); + cell.getCellStyle().setDataFormat(dataFormat); + + // Sábado + cell = row.getCell(20); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionSabado())); + cell.getCellStyle().setDataFormat(dataFormat); + cell = row.getCell(21); + cell.setCellStyle(getCellStyle(loanWeekData.getConditionSabado())); + cell.getCellStyle().setDataFormat(dataFormat); + } + + String ruta = data.get(0).getRouteName(); + int regInsertados = 0; + + for (int i = 1; i < sheet.getPhysicalNumberOfRows(); i++) { + HSSFRow row = sheet.getRow(i); + InformationLoanLastWeekView loanWeekData = data.get(i-1-regInsertados); + + if(!ruta.equalsIgnoreCase(data.get(i-1-regInsertados).getRouteName())){ + creaRegistroTotales(ruta, sheet, dataFormat, false, i); + ruta = data.get(i-1-regInsertados).getRouteName(); + regInsertados++; + } + } + creaRegistroTotales(ruta, sheet, dataFormat, true, sheet.getPhysicalNumberOfRows()+1); + } + + private void creaRegistroTotales(String ruta, HSSFSheet sheet, short dataFormat, boolean lastRow, int i){ + HSSFRow r; + HSSFCell cellNew; + String rutaAux = ruta; + if (lastRow) { + r = sheet.createRow(sheet.getPhysicalNumberOfRows() + 1); + } else { + sheet.shiftRows(i, sheet.getLastRowNum(), 1, true, false); + r = sheet.createRow(i); + } + + // Apoyos + cellNew = r.createCell(3); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + BigDecimal suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux) && p.getWeekLoanDate() == p.getWeekCurrentDate())).map((py) -> py.getApoyos()).reduce(BigDecimal::add).isPresent() + ? data.stream().filter((p) -> (p.getRouteName().equals(rutaAux) && p.getWeekLoanDate() == p.getWeekCurrentDate())).map((py) -> py.getApoyos()).reduce(BigDecimal::add).get() + : BigDecimal.ZERO; + cellNew.setCellValue(suma.doubleValue()); + // Comsion por apertura + cellNew = r.createCell(4); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux) && p.getWeekLoanDate() == p.getWeekCurrentDate())).map((py) -> py.getComisionApertura()).reduce(BigDecimal::add).isPresent() + ? data.stream().filter((p) -> (p.getRouteName().equals(rutaAux) && p.getWeekLoanDate() == p.getWeekCurrentDate())).map((py) -> py.getComisionApertura()).reduce(BigDecimal::add).get() + : BigDecimal.ZERO; + cellNew.setCellValue(suma.doubleValue()); + + //Totales + cellNew = r.createCell(9); + cellNew.setCellType(CellType.STRING); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.setCellValue("TOTALES: "); + // Lunes + cellNew = r.createCell(10); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentMonday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(11); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeMonday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Martes + cellNew = r.createCell(12); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentTuesday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(13); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeTuesday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Miércoles + cellNew = r.createCell(14); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentWednesday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(15); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeWednesday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Jueves + cellNew = r.createCell(16); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentThursday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(17); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeThursday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Viernes + cellNew = r.createCell(18); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentFriday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(19); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeFriday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Sábado + cellNew = r.createCell(20); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getPaymentSaturday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + cellNew = r.createCell(21); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFeeSaturday()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + // Faltante + cellNew = r.createCell(22); + cellNew.setCellType(CellType.NUMERIC); + cellNew.setCellStyle(getCellStyle("greyRow")); + cellNew.getCellStyle().setDataFormat(dataFormat); + suma = data.stream().filter((p) -> (p.getRouteName().equals(rutaAux))).map((py) -> py.getFaltante()).reduce(BigDecimal::add).get(); + cellNew.setCellValue(suma.doubleValue()); + } + + private HSSFCellStyle getCellStyle (String cellStyleColor){ + if(cellStyleColor == null){ + cellStyleColor = "White"; + } + + switch(cellStyleColor){ + case "redRow": + return cellStyleRed; + case "greenRow": + return cellStyleGreen; + case "yellowRow": + return cellStyleYellow; + case "blueRow": + return cellStyleBlue; + case "blueLightRow": + return cellStyleBlueLight; + case "greenLigthRow": + return cellStyleGreenLight; + case "greenStrongRow": + return cellStyleGreenStrong; + case "greyRow": + return cellStyleGrey; + case "orangeRow": + return cellStyleOrange; + default: + return cellStyleWhite; + } + } + + private void initCellStyle(HSSFWorkbook wb){ + // MULTA + fontRed = wb.createFont(); + cellStyleRed = wb.createCellStyle(); + fontRed.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleRed.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleRed.setFillForegroundColor(IndexedColors.RED.getIndex()); + //cellStyleRed.setFont(fontRed); + + // ABONO 0 + fontGreen = wb.createFont(); + cellStyleGreen = wb.createCellStyle(); + fontGreen.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleGreen.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleGreen.setFillForegroundColor(IndexedColors.SEA_GREEN.getIndex()); + //cellStyleGreen.setFont(fontGreen); + + // ABONÓ MENOS + fontYellow = wb.createFont(); + cellStyleYellow = wb.createCellStyle(); + fontYellow.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleYellow.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleYellow.setFillForegroundColor(IndexedColors.LIGHT_YELLOW.getIndex()); + //cellStyleYellow.setFont(fontYellow); + + // ABONÓ DE MÃS + fontBlue = wb.createFont(); + cellStyleBlue = wb.createCellStyle(); + fontBlue.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleBlue.setFillPattern(FillPatternType.SOLID_FOREGROUND); + //cellStyleBlue.setFillForegroundColor(HSSFColor.HSSFColorPredefined.BLUE.getIndex()); + cellStyleBlue.setFillForegroundColor(IndexedColors.TURQUOISE.getIndex()); + //cellStyleBlue.setFont(fontBlue); + + // PAGO CONGELADO + fontBlueLight = wb.createFont(); + cellStyleBlueLight = wb.createCellStyle(); + fontBlueLight.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleBlueLight.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleBlueLight.setFillForegroundColor(IndexedColors.LIGHT_BLUE.getIndex()); + + // RENOVÓ + fontGreenLight = wb.createFont(); + cellStyleGreenLight = wb.createCellStyle(); + fontGreenLight.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleGreenLight.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleGreenLight.setFillForegroundColor(IndexedColors.BRIGHT_GREEN.getIndex()); + //cellStyleGreenLight.setFont(fontGreenLight); + + // getSaldoInsoluto == 0 + fontGreenStrong = wb.createFont(); + cellStyleGreenStrong = wb.createCellStyle(); + fontGreenStrong.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleGreenStrong.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleGreenStrong.setFillForegroundColor(IndexedColors.GREEN.getIndex()); + //cellStyleGreenStrong.setFont(fontGreenStrong); + + // CLIENTE NUEVO + fontOrange = wb.createFont(); + cellStyleOrange = wb.createCellStyle(); + fontOrange.setColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()); + cellStyleOrange.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleOrange.setFillForegroundColor(IndexedColors.ORANGE.getIndex()); + //cellStyleGreenLight.setFont(fontGreenLight); + + // Totales + fontGrey = wb.createFont(); + cellStyleGrey = wb.createCellStyle(); + fontGrey.setColor(HSSFColor.HSSFColorPredefined.WHITE.getIndex()); + cellStyleGrey.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleGrey.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex()); + cellStyleGrey.setFont(fontGrey); + + cellStyleWhite = wb.createCellStyle(); + cellStyleWhite.setFillPattern(FillPatternType.SOLID_FOREGROUND); + cellStyleWhite.setFillForegroundColor(HSSFColor.HSSFColorPredefined.WHITE.getIndex()); + } + + private DriverController driverCtrl; + private List data; + private InformationLoanLastWeekView selectedData; + + private List dataColocation; + private ColocationLastWeekByUserView selectedColocation; + + private List dataSubtotal; + private SubtotalLastWeekByUserView selectedSubtotal; + + private List dataResumen; + private ResumenInOutLastWeekByUserView selectedResumen; + + private List dataCobranza; + private CobranzaLastWeekByUserView selectedCobranza; + + private List dataTotal; + private ResumenTotalLastWeekView selectedTotal; + + private List dataCtesNvos; + private ResumeNewCustomerLastWeekView selectedCtesNvos; + + // Datos para pintar las celdas + HSSFCellStyle cellStyleRed; + HSSFFont fontRed; + HSSFCellStyle cellStyleGreen; + HSSFFont fontGreen; + HSSFCellStyle cellStyleYellow; + HSSFFont fontYellow; + HSSFCellStyle cellStyleBlue; + HSSFFont fontBlue; + HSSFCellStyle cellStyleBlueLight; + HSSFFont fontBlueLight; + HSSFCellStyle cellStyleGreenLight; + HSSFFont fontGreenLight; + HSSFCellStyle cellStyleGreenStrong; + HSSFFont fontGreenStrong; + HSSFCellStyle cellStyleOrange; + HSSFFont fontOrange; + HSSFCellStyle cellStyleWhite; + HSSFCellStyle cellStyleGrey; + HSSFFont fontGrey; + + @PostConstruct + public void init() { + driverCtrl = new DriverController(); + data = driverCtrl.getAllLoanLastWeekByOffice(getLoggedUser().getOffice().getId()); + dataColocation = driverCtrl.getAllColocationLastWeekByOffice(getLoggedUser().getOffice().getId()); + dataSubtotal = driverCtrl.getAllSubtotalLastWeekByOffice(getLoggedUser().getOffice().getId()); + dataResumen = driverCtrl.getAllResumenInOutLastWeekByOffice(getLoggedUser().getOffice().getId()); + dataCobranza = driverCtrl.getAllCobranzaLastWeekByOffice(getLoggedUser().getOffice().getId()); + dataTotal = driverCtrl.getAllResumenTotalLastWeekByOffice(getLoggedUser().getOffice().getId()); + dataCtesNvos = driverCtrl.getAllResumenNewCustomerLastWeekByOffice(); + + for(SubtotalLastWeekByUserView subtotal : dataSubtotal) + { + Double sumFaltante = data.stream().filter(p -> p.getIdUser().equalsIgnoreCase(subtotal.getId())).mapToDouble(h -> h.getFaltante().doubleValue()).sum(); + subtotal.setFaltante(new BigDecimal(sumFaltante)); + } + } + +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/validators/GenericValidator.java b/ace-web/src/main/java/com/arrebol/apc/web/validators/GenericValidator.java new file mode 100644 index 0000000..406713e --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/validators/GenericValidator.java @@ -0,0 +1,42 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.arrebol.apc.web.validators; + +import java.util.ResourceBundle; +import javax.faces.application.FacesMessage; +import javax.faces.validator.ValidatorException; + +/** + * + * @author Picasso + */ +public abstract class GenericValidator { + + /** + * Raise a message with SEVERITY_ERROR.s + * + * @param message + * @throws ValidatorException + */ + protected void errorSeverity(String message) throws ValidatorException { + FacesMessage msg = new FacesMessage(message); + + msg.setSeverity(FacesMessage.SEVERITY_ERROR); + + throw new ValidatorException(msg); + } + + protected ResourceBundle bundlePropertyFile; + private final String PROPERTY_FILE = "com.arrebol.apc.i18n.app_background"; + + public ResourceBundle getBundlePropertyFile() { + return bundlePropertyFile; + } + + public synchronized void loadBundlePropertyFile() { + this.bundlePropertyFile = ResourceBundle.getBundle(PROPERTY_FILE); + } +} diff --git a/ace-web/src/main/java/com/arrebol/apc/web/validators/SelectOneMenuValidator.java b/ace-web/src/main/java/com/arrebol/apc/web/validators/SelectOneMenuValidator.java new file mode 100644 index 0000000..813e8bb --- /dev/null +++ b/ace-web/src/main/java/com/arrebol/apc/web/validators/SelectOneMenuValidator.java @@ -0,0 +1,27 @@ +package com.arrebol.apc.web.validators; + +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.validator.FacesValidator; +import javax.faces.validator.Validator; +import javax.faces.validator.ValidatorException; + +/** + * + * @author Carlos Janitzio Zavala Lopez + */ +@FacesValidator("selectOneMenuValidator") +public class SelectOneMenuValidator extends GenericValidator implements Validator { + + @Override + public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException { + loadBundlePropertyFile(); + + if (null == value + || "".equals(value.toString()) + || "N/A".equals(value.toString())) { + errorSeverity(getBundlePropertyFile().getString("validator.select.one.menu.invalid.option")); + } + } + +} diff --git a/ace-web/src/main/resources/com/arrebol/apc/i18n/app.properties b/ace-web/src/main/resources/com/arrebol/apc/i18n/app.properties new file mode 100644 index 0000000..a0d6329 --- /dev/null +++ b/ace-web/src/main/resources/com/arrebol/apc/i18n/app.properties @@ -0,0 +1,599 @@ +project.short.name=ACE +project.complete.name=ACE Guadalajara +arrebol.reserved=Todos los Derechos Reservados. +############### +# ERROR PAGES # +############### +error.title=Ha ocurrido un error +error.return.dashboard=Regresar al tablero +error.contact.admin=Por favor contacte al administrador +error.forbidden=Acceso denegado +error.not.found=P\u00e1gina no encontrada +######### +# Login # +######### +user=Usuario +password=Contrase\u00f1a +confirm=Confirmar +sign.in=Iniciar sesi\u00f3n +sign.out=Cerrar sesi\u00f3n +password.reset=Restablecer contrase\u00f1a +remember.me=\u00bfRecordarme? +new.account=\u00bfNo tienes una cuenta? +now=ahora +sign.up=Reg\u00edstrate +require.msg.user.empty=Ingrese el usuario. +require.msg.password.empty=Ingrese la contrase\u00f1a. +############# +# Dashboard # +############# +dashboard.title=Tablero +########## +# System # +########## +system.title=Sistema +system.users=Usuarios +system.users.add=Alta +system.users.setting=Actualizaci\u00f3n +system.users.permission=Accesos +user.create=Crear usuario +user.update=Actualizar usuario +user.add.access=Asignar accesos +user.update.access=Asignar accesos +user.update.routes=Actualizar ruta de usuario +access.from=Permisos disponibles +access.to=Permisos asignados +access.updte=Modificar accesos +permission.add=Agregar permisos +permission.update=Actualizar permisos +user.disable=Deshabilitar usuarios +user.disable.btn=Deshabilitar usuario +user.eneble=Habilitar usuarios +user.eneble.btn=Habilitar usuario +user.delete=Borrar usuarios +user.delete.btn=Borrar usuario +user.update.pwd=Actualizaci\u00f3n de contrase\u00f1a +user.update.pwd.btn=Actualizar contrase\u00f1a +user.update.username.btn=Modificar nombre de usuario +select.user=Elegir usuario +load.user.access=Cargar accesos del usuario +user.confirm.header=Datos del usuario +user.confirm.question=\u00bfLos datos del usuario son correctos? +user.are.you.sure.enebled=\u00bfEstas seguro de habilitar al usuario? +user.are.you.sure.disabled=\u00bfEstas seguro deshabilitar al usuario? +user.are.you.sure.deleted=\u00bfEstas seguro de eliminar al usuario? +user.are.you.sure.username=\u00bfEstas seguro de modificar el nombre de usuario? +user.are.you.sure.pwd=\u00bfEstas seguro de modificar la contrase\u00f1a? +user.are.you.sure.avatar=\u00bfEstas seguro de modificar la imagen del usuario? +system.office=Oficina +system.office.datatable.empty=No hay oficina para mostrar +system.office.datatable.column.name=Nombre +system.office.datatable.column.address=Domicilio +system.office.dialog.require.msg.name.empty=El nombre de la oficina es obligatorio +system.office.dialog.require.msg.address.empty=La direcci\u00f3n de la oficina es obligatorio +system.bitacora=Bit\u00e1cora +system.bitacoras.datatable.empty=No hay registros por mostrar +system.bitacoras.datatable.column.action=Acci\u00f3n +system.bitacoras.datatable.column.description=Descripci\u00f3n +system.bitacoras.datatable.column.commentsUser=Comentarios del usuario +system.bitacoras.datatable.column.user=Usuario +system.bitacoras.datatable.column.createdOn=Fecha +################## +# Human Resource # +################## +hr=Empleado +add.hr=Alta empleado +first.name=Nombre +second.name=Segundo nombre +last.name=Apellido paterno +middle.name=Apellido materno +date.birthdate=Fecha de nacimiento +date.addmission=Fecha de ingreso +role=Puesto +role.choose=Seleccione el puesto +SECRETARY=Secretaria +CEO=Director ejecutivo +ADVISER=Supervisor +hr.create.btn=Crear empleado +hr.update.btn=Actualizar empleado +first.name.required=Nombre obligatorio +last.name.required=Apellido paterno obligatorio +middle.name.required=Apellido materno obligatoio +role.choose.required=Puesto es obligatorio +user.type.required=Tipo usuario es obligatorio +hr.confirm.header=Datos del empleado +hr.confirm.question=\u00bfLos datos del empleado son correctos? +employee.disable=Deshabilitar empleados +employee.disable.btn=Deshabilitar empleado +employee.eneble=Habilitar empleados +employee.eneble.btn=Habilitar empleado +employee.delete=Borrar empleados +employee.delete.btn=Borrar empleado +employee.update.load.btn=Cargar datos del empleado +employee.update.pwd=Actualizaci\u00f3n de contrase\u00f1a +employee.update.pwd.btn=Actualizar contrase\u00f1a +select.employee=Elegir empleado +select.employee.required=Empleado es obligatorio +########### +# Catalog # +########### +catalog.title=Cat\u00e1logos +catalog.roles=Puestos +catalog.typeLoan=Tipo de prestamos +catalog.route=Rutas +catalog.roles.datatable.empty=No hay puestos para mostrar +catalog.roles.datatable.column.name=Nombre +catalog.roles.dialog.title=Puesto +catalog.roles.dialog.require.msg.color.empty=El nombre del puesto es obligatorio +catalog.routes.datatable.empty=No hay rutas para mostrar +catalog.routes.datatable.column.name=Nombre +catalog.routes.dialog.title=Rutas +catalog.routes.dialog.require.msg.color.empty=El nombre de la ruta es obligatorio +catalog.loanTypes.datatable.empty=No hay tipos de pr\u00e9stamo para mostrar +catalog.loanTypes.datatable.column.name=Nombre +catalog.loanTypes.datatable.column.totalDays=Total d\u00edas +catalog.loanTypes.datatable.column.fee=Multa +catalog.loanTypes.datatable.column.payment=Pr\u00e9stamo +catalog.loanTypes.datatable.column.paymentDaily=Abono diario +catalog.loanTypes.datatable.column.paymentTotal=Total a pagar +catalog.loanTypes.datatable.column.openingFee=Comisi\u00f3n por apertura +catalog.loanTypes.dialog.name.require.msg.empty=El nombre es obligatorio +catalog.loanTypes.dialog.name.title=Nombre +catalog.loanTypes.dialog.totalDays.require.msg.empty=El total de d\u00edas es obligatorio +catalog.loanTypes.dialog.totalDays.title=Total de d\u00edas +catalog.loanTypes.dialog.payment.require.msg.empty=El valor del pr\u00e9stamo es obligatorio +catalog.loanTypes.dialog.payment.title=Importe a prestar +catalog.loanTypes.dialog.fee.require.msg.empty=El valor de la multa es obligatorio +catalog.loanTypes.dialog.fee.title=Multa +catalog.loanTypes.dialog.paymentDaily.require.msg.empty=El valor del abono diario es obligatorio +catalog.loanTypes.dialog.paymentDaily.title=Abono diario +catalog.loanTypes.dialog.openingFee.require.msg.empty=La comisi\u00f3n por apertura es obligatoria +catalog.loanTypes.dialog.openingFee.title=Comisi\u00f3n por apertura +catalog.loanTypes.dialog.monday.title=Lunes +catalog.loanTypes.dialog.tuesday.title=Martes +catalog.loanTypes.dialog.wednesday.title=Miercoles +catalog.loanTypes.dialog.thursday.title=Jueves +catalog.loanTypes.dialog.friday.title=Viernes +catalog.loanTypes.dialog.saturday.title=Sabado +catalog.loanTypes.dialog.sunday.title=Domingo +########### +# Admin # +########### +admin.title=Administraci\u00f3n +admin.people.title=Clientes/Avales +admin.customer=Clientes +admin.endorsement=Avales +admin.people.add=Crear cliente/aval +admin.loan=Pr\u00e9stamos +admin.loan.to.approve=Por autorizar +admin.loan.history=Historial +admin.loan.historyJuridical=Historial jur\u00eddico +admin.loan.detail.title=Detalle del pr\u00e9stamo +admin.financial=Financiero +admin.financial.transfer=Transferencias +admin.financial.moneyDaily=Inicios +admin.financial.closingDay=Corte del d\u00eda +admin.financial.closingDayHistory=Historial de cortes +admin.financial.otherExpense=Gastos +admin.payroll=N\u00f3mina +admin.payroll.goals=Metas +admin.payroll.bonus=Bonos +admin.payroll.advance=Adelantos +admin.payroll.create=Crear n\u00f3mina +admin.payroll.history=Historial n\u00f3mina +admin.payroll.loanemployee=Pr\u00e9stamos +admin.stats.fees=Multas +admin.stats.closingday=Corte caja chica +admin.stats.openingfee=Comisi\u00f3n por apertura +admin.stats.payment=Cobro de cartera +admin.stats.paymentroute=Cobro de cartera por ruta +admin.stats.paymentrenovation=Pagos renovados +admin.stats.payroll=N\u00f3mina +admin.stats.summary=Res\u00famen asesor +admin.general.box=Caja general +admin.stats.deposits=Dep\u00f3sitos bancarios +admin.stats.zeropayments=Abonos en cero +admin.stats.employeesaving=Ahorro empleados +admin.stats.advances=Adelantos +admin.stats.gasoline=Gasolinas +admin.stats.vehicle=Veh\u00edculos +admin.general.box.expenseCompanyIn=Entradas +admin.general.box.expenseCompanyOut=Gastos administrativos +admin.general.box.expense.company.in=Entradas +admin.general.box.expense.company.out=Gastos administrativos +admin.general.box.stable=Cuadre de caja +admin.general.box.stable.history=Historial de cuadre de caja +admin.customers.datatable.empty=No hay clientes para mostrar +admin.customers.datatable.column.name=Nombre +admin.customers.datatable.column.companyName=Negocio +admin.customers.datatable.column.addressBusiness=Direcci\u00f3n negocio +admin.customers.datatable.column.addressPersonal=Direcci\u00f3n personal +admin.customers.datatable.column.routeCtlg=Ruta +admin.customers.datatable.column.peopleType=Tipo +admin.customers.datatable.column.office=Sucursal +admin.customers.detail.title=Detalle del cliente +admin.customers.company.title=Informaci\u00f3n del negocio +admin.customers.loan.title=Historial de pr\u00e9stamos +admin.customers.detail.field.name=Nombre +admin.customers.detail.field.firstName=Primer nombre +admin.customers.detail.field.secondName=Segundo nombre +admin.customers.detail.field.lastName=Apellido paterno +admin.customers.detail.field.middleName=Apellido materno +admin.customers.detail.field.birthdate=Fecha de nacimiento +admin.customers.detail.field.phoneHome=Tel\u00e9fono de casa +admin.customers.detail.field.addressHome=Domicilio personal +admin.customers.detail.field.peopleType=Tipo +admin.customers.detail.field.routeCtlg=Ruta +admin.customers.detail.field.companyName=Nombre del negocio +admin.customers.detail.field.phoneBusiness=Tel\u00e9fono del negocio +admin.customers.detail.field.addressBusiness=Direcci\u00f3n del negocio +admin.customers.detail.datatable.empty=No hay pr\u00e9stamos por mostrar +admin.customers.detail.datatable.column.endorsement=Aval +admin.customers.detail.datatable.column.loanStatus=Estatus +admin.customers.detail.datatable.column.amountToPay=Monto a pagar +admin.customers.detail.datatable.column.amountPaid=Monto pagado +admin.customers.detail.datatable.column.createdOn=Fecha +admin.customers.detail.datatable.column.routeCtlg=Ruta +admin.customers.detail.datatable.column.comments=Observaciones +admin.customers.detail.datatable.column.totalFee=No. de multas +admin.endorsements.datatable.empty=No hay avales para mostrar +admin.endorsements.datatable.column.name=Nombre +admin.endorsements.datatable.column.phoneHome=Tel\u00e9fono +admin.endorsements.datatable.column.addressHome=Domicilio personal +admin.endorsements.datatable.column.routeCtlg=Ruta +admin.endorsements.datatable.column.peopleType=Tipo +admin.endorsements.detail.title=Detalle del aval +admin.endorsements.company.title=Informaci\u00f3n del negocio +admin.endorsements.loan.title=Historial de pr\u00e9stamos como aval +admin.endorsements.detail.field.name=Nombre +admin.endorsements.detail.field.birthdate=Fecha de nacimiento +admin.endorsements.detail.field.phoneHome=Tel\u00e9fono de casa +admin.endorsements.detail.field.addressHome=Domicilio personal +admin.endorsements.detail.field.peopleType=Tipo +admin.endorsements.detail.field.routeCtlg=Ruta +admin.endorsements.detail.field.companyName=Nombre del negocio +admin.endorsements.detail.field.phoneBusiness=Tel\u00e9fono del negocio +admin.endorsements.detail.field.addressBusiness=Direcci\u00f3n del negocio +admin.endorsements.detail.datatable.empty=No hay pr\u00e9stamos por mostrar +admin.endorsements.detail.datatable.column.customer=Cliente +admin.endorsements.detail.datatable.column.loanStatus=Estatus +admin.endorsements.detail.datatable.column.amountToPay=Monto a pagar +admin.endorsements.detail.datatable.column.amountPaid=Monto pagado +admin.endorsements.detail.datatable.column.createdOn=Fecha +admin.endorsements.detail.datatable.column.routeCtlg=Ruta +admin.endorsements.detail.datatable.column.comments=Observaciones +admin.endorsements.detail.datatable.column.totalFee=No. de multas +admin.people.form.firstName.require.msg.empty=El primer nombre es obligatorio +admin.people.dialog.firstName.title=Primer nombre +admin.people.dialog.secondName.title=Segundo +admin.people.form.lastName.require.msg.empty=El apellido paterno es obligatorio +admin.people.dialog.lastName.title=Apellido paterno +admin.people.form.middleName.require.msg.empty=El apellido materno es obligatorio +admin.people.dialog.middleName.title=Apellido materno +admin.people.dialog.isCustomer.title=Es cliente +admin.people.dialog.isEndorsement.title=Es aval +admin.people.form.phoneHome.require.msg.empty=El tel\u00e9fono personal es obligatorio +admin.people.dialog.phoneHome.title=Tel\u00e9fono personal +admin.people.form.addressHome.require.msg.empty=El domicilio particular es obligatorio +admin.people.dialog.addressHome.title=Domicilio particular +admin.people.form.phoneBusiness.require.msg.empty=El tel\u00e9fono del negocio es obligatorio +admin.people.dialog.phoneBusiness.title=Tel\u00e9fono del negocio +admin.people.form.addressBusiness.require.msg.empty=El domicilio del negocio es obligatorio +admin.people.dialog.addressBusiness.title=Domicilio del negocio +admin.people.form.companyName.require.msg.empty=El nombre del negocio es obligatorio +admin.people.dialog.companyName.title=Nombre del negocio +admin.people.form.birthdate.require.msg.empty=La fecha de nacimiento es obligatorio +admin.people.dialog.birthdate.title=Fecha de nacimiento +admin.people.form.route.require.msg.empty=La ruta es obligatoria +admin.loans.datatable.empty=No hay pr\u00e9stamos por mostrar. +admin.loans.datatable.column.customer=Cliente +admin.loans.datatable.column.routeCtlg=Ruta +admin.loans.datatable.column.endorsement=Aval +admin.loans.datatable.column.amountPaid=Monto a prestar +admin.loans.datatable.column.loan.amountPaid=Monto pagado +admin.loans.datatable.column.loan.amountToPaid=Monto a pagar +admin.loans.datatable.column.loan.saldo=Saldo insoluto +admin.loans.datatable.column.loanFeeNotifications=No. de multas +admin.loans.datatable.column.asesor=Asesor +admin.loans.datatable.column.createdOn=Fecha +admin.loans.datatable.column.loanStatus=Estatus +admin.loans.datatable.column.comments=Comentarios +admin.loans.datatable.column.office=Sucursal +admin.loan.form.typeLoan.require.msg.empty=El tipo de pr\u00e9stamo es obligatorio +admin.loan.form.customer.require.msg.empty=El cliente es obligatorio +admin.loan.form.endorsement.require.msg.empty=El aval es obligatorio +admin.loan.form.user.require.msg.empty=El asesor es obligatorio +admin.loan.form.loanStatus.require.msg.empty=El estatus es obligatorio +admin.loan.form.field.comments=Comentarios +admin.loan.form.field.createdOn=Fecha +admin.loan.form.field.totalPayment=Total abonado +admin.loan.form.field.totalFee=Total en multas +admin.transfers.datatable.empty=No hay transferencias por mostrar +admin.transfers.datatable.column.userTransmitter=Asesor emisor +admin.transfers.datatable.column.userReceiver=Asesor receptor +admin.transfers.datatable.column.amountToTransfer=Monto +admin.transfers.datatable.column.actionStatus=Estatus +admin.transfer.form.userSend.require.msg.empty=El usuario emisor es obligatorio +admin.transfer.form.userReceive.require.msg.empty=El usuario receptor es obligatorio +admin.transfer.form.field.amountToTransfer=Monto a transferir +admin.moneyDailys.datatable.empty=No hay registros por mostrar +admin.moneyDailys.datatable.column.moneyDailyDate=Fecha +admin.moneyDailys.datatable.column.amount=Monto +admin.moneyDailys.datatable.column.user=Empleado +admin.moneyDaily.form.user.require.msg.empty=El empleado es obligatorio +admin.moneyDaily.form.field.amount=Monto +admin.closingDays.datatable.empty=No hay registros por mostrar +admin.closingDays.datatable.column.user=Usuario +admin.closingDays.datatable.column.amountPaid=Monto reportado +admin.closingDays.datatable.column.amountExpected=Monto a reportar +admin.closingDays.datatable.column.createdOn=Fecha +admin.closingDays.datatable.column.comments=Comentarios +admin.closingDays.form.user.require.msg.empty=El usuario es obligatorio +admin.closingDays.dialog.paymentDaily.title=Monto recuperado +admin.closingDays.dialog.transferSender.title=Monto enviado por transferencia +admin.closingDays.dialog.transferReceiver.title=Monto recibido por transferencia +admin.closingDays.dialog.moneyDaily.title=Monto de inicio +admin.closingDays.dialog.delivery.title=Entrega de prestamos +admin.closingDays.dialog.otherExpense.title=Gastos +admin.closingDays.dialog.total.title=Total +admin.closingDays.dialog.transferPending.title=Transferencias sin autorizar +admin.otherExpenses.datatable.empty=No hay gastos por mostrar +admin.otherExpenses.datatable.column.user=Usuario +admin.otherExpenses.datatable.column.expense=Monto +admin.otherExpenses.datatable.column.description=Comentarios +admin.otherExpense.form.user.require.msg.empty=Debes seleccionar un usuario +admin.otherExpense.form.field.expense=Monto +admin.otherExpense.form.field.description=Descripci\u00f3n +admin.advances.datatable.empty=No hay registros por mostrar. +admin.gasoline.datatable.empty=No hay registros por mostrar. +admin.advances.datatable.column.humanResource=Empleado +admin.advances.datatable.column.amount=Monto +admin.advance.form.humanResource.require.msg.empty=El empleado es obligatorio +admin.advance.form.field.amount=Monto +admin.goals.datatable.empty=No hay registros por mostrar. +admin.goals.datatable.column.startDate=Fecha inicial +admin.goals.datatable.column.endDate=Fecha final +admin.goals.datatable.column.amount=Monto +admin.goal.form.startDate.require.msg.empty=La fecha inicial es obligatoria. +admin.goal.dialog.startDate.title=Fecha inicial +admin.goal.form.endDate.require.msg.empty=La fecha final es obligatoria. +admin.goal.dialog.endDate.title=Fecha final +admin.goal.form.field.amount=Monto +admin.fees.datatable.column.startDate=Fecha inicial +admin.fees.datatable.column.endDate=Fecha final +admin.closingday.datatable.column.startDate=Fecha inicial +admin.closingday.datatable.column.endDate=Fecha final +admin.openingfees.datatable.column.startDate=Fecha inicial +admin.openingfees.datatable.column.endDate=Fecha final +admin.payment.datatable.column.startDate=Fecha inicial +admin.payment.datatable.column.endDate=Fecha final +admin.payroll.datatable.column.startDate=Fecha inicial +admin.payroll.datatable.column.endDate=Fecha final +admin.payroll.datatable.empty=No hay registros por mostrar. +admin.deposits.datatable.column.startDate=Fecha inicial +admin.deposits.datatable.column.endDate=Fecha final +admin.zeropayments.datatable.column.startDate=Fecha inicial +admin.zeropayments.datatable.column.endDate=Fecha final +admin.employeesaving.datatable.column.startDate=Fecha inicial +admin.employeesaving.datatable.column.endDate=Fecha final +admin.advances.datatable.column.startDate=Fecha inicial +admin.advances.datatable.column.endDate=Fecha final +admin.gasoline.datatable.column.startDate=Fecha inicial +admin.gasoline.datatable.column.endDate=Fecha final +admin.expenseCompany.datatable.empty=No hay registros por mostrar +admin.expenseCompany.datatable.column.createdOn=Fecha +admin.expenseCompany.datatable.column.amount=Monto +admin.expenseCompany.datatable.column.description=Motivo +admin.expenseCompany.form.field.amount=Monto +admin.expenseCompany.form.field.comments=Motivo +admin.stableGeneralBox.datatable.empty=No hay registros por mostrar +admin.stableGeneralBox.datatable.column.createdOn=Fecha +admin.stableGeneralBox.datatable.column.totalGeneralBox=Total en caja +admin.stableGeneralBox.datatable.column.totalEnvelope=Deje en sobres +admin.stableGeneralBox.datatable.column.totalBankNote=Efectivo +admin.stableGeneralBox.datatable.column.totalCoin=Monedas +admin.stableGeneralBox.datatable.column.totalStable=Diferencia +admin.stableGeneralBox.datatable.column.description=Descripci\u00f3n +admin.stableSmallBox.datatable.empty=No hay registros por mostrar +admin.stableSmallBox.datatable.column.createdOn=Fecha +admin.stableSmallBox.datatable.column.totalSmallBox=Total en caja chica +admin.stableSmallBox.datatable.column.totalEnvelope=Deje en sobres +admin.stableSmallBox.datatable.column.totalBankNote=Efectivo +admin.stableSmallBox.datatable.column.totalCoin=Monedas +admin.stableSmallBox.datatable.column.totalStable=Diferencia +admin.stableSmallBox.datatable.column.description=Descripci\u00f3n +admin.bonuss.datatable.empty=No hay registros por mostrar +admin.bonuss.datatable.column.name=Nombre +admin.bonuss.datatable.column.loanBonus=Porcentaje/Monto por colocaci\u00f3n +admin.bonuss.datatable.column.moraBonus=Porcentaje/Monto por mora +admin.bonuss.datatable.column.newCustomerBonus=Porcentaje/Monto por nuevos clientes +admin.bonuss.datatable.column.administrative=Administrativo +admin.payroll.form.user.require.msg.empty=El usuario es requerido +admin.payroll.form.field.dateInit=Fecha inicial +admin.payroll.form.field.dateEnd=Fecha final +admin.payroll.dialog.salary.title=Salario +admin.payroll.dialog.imss.title=IMSS +admin.payroll.dialog.advances.title=Adelantos +admin.payroll.dialog.bonusColocation.title=Bono de colocaci\u00f3n +admin.payroll.dialog.newCustomer.title=Bono por clientes nuevos +admin.payroll.dialog.bonusMora.title=Bono por mora +admin.payroll.dialog.granTotal.title=Total +admin.payrolls.datatable.empty=Sin registros que mostrar +admin.payrolls.datatable.column.hr=Empleado +admin.payrolls.datatable.column.salary=Salario +admin.payrolls.datatable.column.imss=Imss +admin.payrolls.datatable.column.advance=Adelantos +admin.payrolls.datatable.column.totalBonusNewCustomer=Bono por clientes nuevos +admin.payrolls.datatable.column.totalBonusColocation=Bono por colocaci\u00f3n +admin.payrolls.datatable.column.totalBonusMora=Bono por mora +admin.payrolls.datatable.column.discounts=Descuentos +admin.payrolls.datatable.column.commentsDiscounts=Comentarios por descuentos +admin.payrolls.datatable.column.increases=Incremento extra +admin.payrolls.datatable.column.commentsIncreases=Comentarios por incremento +admin.payrolls.datatable.column.totalPayment=Total n\u00f3mina +admin.payrolls.datatable.column.totalDaysSalary=D\u00edas para salario +admin.payrolls.datatable.column.totalDaysBonus=D\u00edas para bonos +admin.payrolls.datatable.column.observation=Observaciones +admin.payrolls.datatable.column.createdOn=Fecha +############ +# Outcomes # +############ +outcome.dashboard=/dashboard +outcome.system.user.add=/app/system/user/add/main +outcome.system.user.setting=/app/system/user/setting/main +outcome.system.user.access=/app/system/user/access/main +outcome.system.log=/app/system/log/main +outcome.system.office=/app/system/office/index +outcome.employee=/app/system/employee/main +outcome.employee.employeeList=/app/system/employee/employeeList +outcome.catalog.role=/app/catalog/role/index +outcome.catalog.typeLoan=/app/catalog/loanType/index +outcome.catalog.typeLoan.add=/app/catalog/loanType/add +outcome.catalog.route=/app/catalog/route/index +outcome.admin.customer=/app/admin/customer/index +outcome.admin.customer.detail=/app/admin/customer/detail +outcome.admin.endorsement=/app/admin/endorsement/index +outcome.admin.endorsement.detail=/app/admin/endorsement/detail +outcome.admin.endorsement.customer.add=/app/admin/customer/add +outcome.admin.loan.pending=/app/admin/loan/index +outcome.admin.loan.pending.detail=/app/admin/loan/detail +outcome.admin.loan.history=/app/admin/loan/history +outcome.admin.loan.loanDetailTransfer=/app/admin/loan/loanDetailTransfer +outcome.admin.loan.historyJuridical=/app/admin/loan/historyJuridical +outcome.admin.loan.drive=/app/admin/loan/drive +outcome.admin.loan.renovation=/app/admin/loan/loanRenovationWeekly +outcome.admin.loan.drive.last=/app/admin/loan/driveLast +outcome.admin.loan.drive.date=/app/admin/loan/driveDate +outcome.admin.loan.history.detail=/app/admin/loan/historyDetail +outcome.admin.loan.change.owner=/app/admin/loan/changeOwner +outcome.admin.financial.transfer=/app/admin/transfer/index +outcome.admin.financial.moneyDaily=/app/admin/moneyDaily/index +outcome.admin.financial.closingDay=/app/admin/closingDay/index +outcome.admin.financial.closingDayHistory=/app/admin/closingDay/history +outcome.admin.financial.closingDayHistory.detail=/app/admin/closingDay/detail +outcome.admin.financial.stableSmallBox=/app/admin/stableSmallBox/index +outcome.admin.financial.stableSmallBoxHistory=/app/admin/stableSmallBox/history +outcome.admin.financial.otherExpense=/app/admin/otherExpense/index +outcome.admin.payroll.goal=/app/payroll/goal/index +outcome.admin.payroll.bonus=/app/payroll/bonus/index +outcome.admin.payroll.advance=/app/payroll/advance/index +outcome.admin.payroll.create=/app/payroll/createPayroll/index +outcome.admin.payroll.history=/app/payroll/history +outcome.admin.vehicles.addvehicle=/app/admin/vehicles/main +outcome.admin.fees.fees=/app/stats/feesByRoute/index +outcome.admin.stats.fees=/app/stats/fees/index +outcome.admin.stats.closingday=/app/stats/closingDay/index +outcome.admin.stats.openingfee=/app/stats/openingFee/index +outcome.admin.stats.payment=/app/stats/payment/index +outcome.admin.stats.paymentroute=/app/stats/paymentRoute/index +outcome.admin.stats.payroll=/app/stats/payroll/index +outcome.admin.stats.deposits=/app/stats/deposits/index +outcome.admin.stats.zeropayments=/app/stats/zeroPayments/index +outcome.admin.stats.employeesaving=/app/stats/employeeSaving/index +outcome.admin.stats.advances=/app/stats/advances/index +outcome.admin.stats.paymentrenovation=/app/stats/paymentRenovation/index +outcome.admin.stats.gasoline=/app/stats/gasoline/index +outcome.admin.stats.vehicle=/app/stats/vehicles/index +outcome.admin.stats.summary=/app/stats/summary/index +outcome.payroll.loanemployee=/app/payroll/loanEmployee/index +outcome.admin.general.box.expense.company.in=/app/generalBox/expenseCompanyIn/index +outcome.admin.general.box.expense.company.out=/app/generalBox/expenseCompanyOut/index +outcome.admin.general.box.stable=/app/generalBox/stableGeneralBox/index +outcome.admin.general.box.history=/app/generalBox/stableGeneralBox/history +outcome.privacy=/app/topbar/privacy +outcome.admin.customer.without.loan.detail=/customerWithoutLoanDetail +outcome.dashboard.loan.detail=/loanDetail +outcome.dashboard.loan.detailEndorsement=/loanDetailEndorsement +outcome.system.bitacora=/app/system/bitacora/index +########### +# General # +########### +profile=Perfil +privacy=Privacidad +setting=Configuraci\u00f3n +logout=Salir +choose.office=Seleccione la sucursal +office=Sucursal +office.selected=Sucursal {0} +photo.add=Agregar imagen +select=Seleccionar +upload=Cargar +cancel=Cancelar +add=Agregar +add.all=Agregar todos +remove=Quitar +remove.all=Quitar todos +arrebol.reserved=Todos los Derechos Reservados. +validator.select.office=Oficina no v\u00e1lida. +office.confirm.header=Cambiar de sucursal +office.confirm.question=\u00bfEstas seguro que deseas cambiar de sucursal? +pwd.promptLabel=Introduce tu contrase\u00f1a +pwd.weakLabel=Contrase\u00f1a d\u00e9bil +pwd.goodLabel=Contrase segura +pwd.strongLabel=Contrase\u00f1a s\u00faper segura +pwd.promptLabel.confirm=Confirma tu contrase\u00f1a +pwd.match.passwords=Las contrase\u00f1as son diferentes. +pattern.date=dd - MMMM - yyyy +pick.down=Bajar +pick.up=Subir +pick.bottom=Mover al fondo +pick.top=Mover al inicio +pick.add=Agregar +pick.add.all=Agregar todos +pick.remove=Remover +pick.remove.all=Remover todos +dual.list.permissions.required=Seleccione al menos un permiso +dual.list.permissions.available=Permisos disponibles +dual.list.permissions.taken=Permisos asignados +dual.list.routes.required=Seleccione al menos una ruta +dual.list.routes.available=Rutas disponibles +dual.list.routes.taken=Rutas asignadas +permission.add.btn=Asisgar permisos +permission.update.btn=Actualizar permisos +permission.confirm.header=Datos del trabajador +permission.confirm.question=\u00bfLos datos del trabajador son correctos? +permission=Permiso +screen=Pantalla +confirm.yes=Aceptar +confirm.no=Rechazar +invalid.file=Imagen no v\u00e1lida. +invalid.size=Imagen muy grande. +user.required=Usuario requerido. +user.load.permission=\u00bfQuiere buscar los permisos del usuario? +button.add=Agregar +general.search=Buscar +button.edit=Editar +button.save=Guardar +button.authorize=Autorizar +general.confirm.header=Validaci\u00f3n de informaci\u00f3n +general.confirm.confirm=\u00bfEst\u00e1s seguro de continuar con la acci\u00f3n? +salario=Salario +imss=IMSS +payment.required=Salario obligatorio +imss.required=IMSS obligatorio +other.actions=Otras acciones +choose.action=Elegir acci\u00f3n +execute.action=Ejecutar acci\u00f3n +change.owner=Cambiar asesor +change.owner.of.loans=Cambiar los prestamos al asesor destino +current.owner.select=Elegir asesor origen +current.owner.select.name=Nombre del asesor origen +new.owner.select=Elegir asesor destino +new.owner.select.name=Nombre del asesor destino +current.owner.from=Prestamos asesor origen +current.owner.to=Prestamos asesor destino +dual.list.current.owner.required=Seleccione al menos un presamo a cambiar de asesor +change.owner.confirm.question=\u00bfDesea cambiar los prestamos al asesor destino? +stats.closingday=Corte +stats.openingFees=Comisi\u00f3n por apertura +stats.openingFees.comisiones=Comisiones +stats.payment=Cobro de cartera +stats.paymentrenovation=Pagos renovados +stats.paymentroute=Cobro de cartera por ruta +stats.payment.cobros=Cobros +stats.payroll=N\u00f3mina +stats.deposits=Dep\u00f3sitos +stats.zeropayments=Abonos en cero +stats.employeesaving=Ahorro empleados +stats.advances=Adelantos +stats.gasoline=Gasolinas \ No newline at end of file diff --git a/ace-web/src/main/resources/com/arrebol/apc/i18n/app.properties.bak b/ace-web/src/main/resources/com/arrebol/apc/i18n/app.properties.bak new file mode 100644 index 0000000..1c9d69f --- /dev/null +++ b/ace-web/src/main/resources/com/arrebol/apc/i18n/app.properties.bak @@ -0,0 +1,599 @@ +project.short.name=ACE +project.complete.name=APOYO A COMERCIOS EMPRESARIALES +arrebol.reserved=Todos los Derechos Reservados. +############### +# ERROR PAGES # +############### +error.title=Ha ocurrido un error +error.return.dashboard=Regresar al tablero +error.contact.admin=Por favor contacte al administrador +error.forbidden=Acceso denegado +error.not.found=P\u00e1gina no encontrada +######### +# Login # +######### +user=Usuario +password=Contrase\u00f1a +confirm=Confirmar +sign.in=Iniciar sesi\u00f3n +sign.out=Cerrar sesi\u00f3n +password.reset=Restablecer contrase\u00f1a +remember.me=\u00bfRecordarme? +new.account=\u00bfNo tienes una cuenta? +now=ahora +sign.up=Reg\u00edstrate +require.msg.user.empty=Ingrese el usuario. +require.msg.password.empty=Ingrese la contrase\u00f1a. +############# +# Dashboard # +############# +dashboard.title=Tablero +########## +# System # +########## +system.title=Sistema +system.users=Usuarios +system.users.add=Alta +system.users.setting=Actualizaci\u00f3n +system.users.permission=Accesos +user.create=Crear usuario +user.update=Actualizar usuario +user.add.access=Asignar accesos +user.update.access=Asignar accesos +user.update.routes=Actualizar ruta de usuario +access.from=Permisos disponibles +access.to=Permisos asignados +access.updte=Modificar accesos +permission.add=Agregar permisos +permission.update=Actualizar permisos +user.disable=Deshabilitar usuarios +user.disable.btn=Deshabilitar usuario +user.eneble=Habilitar usuarios +user.eneble.btn=Habilitar usuario +user.delete=Borrar usuarios +user.delete.btn=Borrar usuario +user.update.pwd=Actualizaci\u00f3n de contrase\u00f1a +user.update.pwd.btn=Actualizar contrase\u00f1a +user.update.username.btn=Modificar nombre de usuario +select.user=Elegir usuario +load.user.access=Cargar accesos del usuario +user.confirm.header=Datos del usuario +user.confirm.question=\u00bfLos datos del usuario son correctos? +user.are.you.sure.enebled=\u00bfEstas seguro de habilitar al usuario? +user.are.you.sure.disabled=\u00bfEstas seguro deshabilitar al usuario? +user.are.you.sure.deleted=\u00bfEstas seguro de eliminar al usuario? +user.are.you.sure.username=\u00bfEstas seguro de modificar el nombre de usuario? +user.are.you.sure.pwd=\u00bfEstas seguro de modificar la contrase\u00f1a? +user.are.you.sure.avatar=\u00bfEstas seguro de modificar la imagen del usuario? +system.office=Oficina +system.office.datatable.empty=No hay oficina para mostrar +system.office.datatable.column.name=Nombre +system.office.datatable.column.address=Domicilio +system.office.dialog.require.msg.name.empty=El nombre de la oficina es obligatorio +system.office.dialog.require.msg.address.empty=La direcci\u00f3n de la oficina es obligatorio +system.bitacora=Bit\u00e1cora +system.bitacoras.datatable.empty=No hay registros por mostrar +system.bitacoras.datatable.column.action=Acci\u00f3n +system.bitacoras.datatable.column.description=Descripci\u00f3n +system.bitacoras.datatable.column.commentsUser=Comentarios del usuario +system.bitacoras.datatable.column.user=Usuario +system.bitacoras.datatable.column.createdOn=Fecha +################## +# Human Resource # +################## +hr=Empleado +add.hr=Alta empleado +first.name=Nombre +second.name=Segundo nombre +last.name=Apellido paterno +middle.name=Apellido materno +date.birthdate=Fecha de nacimiento +date.addmission=Fecha de ingreso +role=Puesto +role.choose=Seleccione el puesto +SECRETARY=Secretaria +CEO=Director ejecutivo +ADVISER=Supervisor +hr.create.btn=Crear empleado +hr.update.btn=Actualizar empleado +first.name.required=Nombre obligatorio +last.name.required=Apellido paterno obligatorio +middle.name.required=Apellido materno obligatoio +role.choose.required=Puesto es obligatorio +user.type.required=Tipo usuario es obligatorio +hr.confirm.header=Datos del empleado +hr.confirm.question=\u00bfLos datos del empleado son correctos? +employee.disable=Deshabilitar empleados +employee.disable.btn=Deshabilitar empleado +employee.eneble=Habilitar empleados +employee.eneble.btn=Habilitar empleado +employee.delete=Borrar empleados +employee.delete.btn=Borrar empleado +employee.update.load.btn=Cargar datos del empleado +employee.update.pwd=Actualizaci\u00f3n de contrase\u00f1a +employee.update.pwd.btn=Actualizar contrase\u00f1a +select.employee=Elegir empleado +select.employee.required=Empleado es obligatorio +########### +# Catalog # +########### +catalog.title=Cat\u00e1logos +catalog.roles=Puestos +catalog.typeLoan=Tipo de prestamos +catalog.route=Rutas +catalog.roles.datatable.empty=No hay puestos para mostrar +catalog.roles.datatable.column.name=Nombre +catalog.roles.dialog.title=Puesto +catalog.roles.dialog.require.msg.color.empty=El nombre del puesto es obligatorio +catalog.routes.datatable.empty=No hay rutas para mostrar +catalog.routes.datatable.column.name=Nombre +catalog.routes.dialog.title=Rutas +catalog.routes.dialog.require.msg.color.empty=El nombre de la ruta es obligatorio +catalog.loanTypes.datatable.empty=No hay tipos de pr\u00e9stamo para mostrar +catalog.loanTypes.datatable.column.name=Nombre +catalog.loanTypes.datatable.column.totalDays=Total d\u00edas +catalog.loanTypes.datatable.column.fee=Multa +catalog.loanTypes.datatable.column.payment=Pr\u00e9stamo +catalog.loanTypes.datatable.column.paymentDaily=Abono diario +catalog.loanTypes.datatable.column.paymentTotal=Total a pagar +catalog.loanTypes.datatable.column.openingFee=Comisi\u00f3n por apertura +catalog.loanTypes.dialog.name.require.msg.empty=El nombre es obligatorio +catalog.loanTypes.dialog.name.title=Nombre +catalog.loanTypes.dialog.totalDays.require.msg.empty=El total de d\u00edas es obligatorio +catalog.loanTypes.dialog.totalDays.title=Total de d\u00edas +catalog.loanTypes.dialog.payment.require.msg.empty=El valor del pr\u00e9stamo es obligatorio +catalog.loanTypes.dialog.payment.title=Importe a prestar +catalog.loanTypes.dialog.fee.require.msg.empty=El valor de la multa es obligatorio +catalog.loanTypes.dialog.fee.title=Multa +catalog.loanTypes.dialog.paymentDaily.require.msg.empty=El valor del abono diario es obligatorio +catalog.loanTypes.dialog.paymentDaily.title=Abono diario +catalog.loanTypes.dialog.openingFee.require.msg.empty=La comisi\u00f3n por apertura es obligatoria +catalog.loanTypes.dialog.openingFee.title=Comisi\u00f3n por apertura +catalog.loanTypes.dialog.monday.title=Lunes +catalog.loanTypes.dialog.tuesday.title=Martes +catalog.loanTypes.dialog.wednesday.title=Miercoles +catalog.loanTypes.dialog.thursday.title=Jueves +catalog.loanTypes.dialog.friday.title=Viernes +catalog.loanTypes.dialog.saturday.title=Sabado +catalog.loanTypes.dialog.sunday.title=Domingo +########### +# Admin # +########### +admin.title=Administraci\u00f3n +admin.people.title=Clientes/Avales +admin.customer=Clientes +admin.endorsement=Avales +admin.people.add=Crear cliente/aval +admin.loan=Pr\u00e9stamos +admin.loan.to.approve=Por autorizar +admin.loan.history=Historial +admin.loan.historyJuridical=Historial jur\u00eddico +admin.loan.detail.title=Detalle del pr\u00e9stamo +admin.financial=Financiero +admin.financial.transfer=Transferencias +admin.financial.moneyDaily=Inicios +admin.financial.closingDay=Corte del d\u00eda +admin.financial.closingDayHistory=Historial de cortes +admin.financial.otherExpense=Gastos +admin.payroll=N\u00f3mina +admin.payroll.goals=Metas +admin.payroll.bonus=Bonos +admin.payroll.advance=Adelantos +admin.payroll.create=Crear n\u00f3mina +admin.payroll.history=Historial n\u00f3mina +admin.payroll.loanemployee=Pr\u00e9stamos +admin.stats.fees=Multas +admin.stats.closingday=Corte caja chica +admin.stats.openingfee=Comisi\u00f3n por apertura +admin.stats.payment=Cobro de cartera +admin.stats.paymentroute=Cobro de cartera por ruta +admin.stats.paymentrenovation=Pagos renovados +admin.stats.payroll=N\u00f3mina +admin.stats.summary=Res\u00famen asesor +admin.general.box=Caja general +admin.stats.deposits=Dep\u00f3sitos bancarios +admin.stats.zeropayments=Abonos en cero +admin.stats.employeesaving=Ahorro empleados +admin.stats.advances=Adelantos +admin.stats.gasoline=Gasolinas +admin.stats.vehicle=Veh\u00edculos +admin.general.box.expenseCompanyIn=Entradas +admin.general.box.expenseCompanyOut=Gastos administrativos +admin.general.box.expense.company.in=Entradas +admin.general.box.expense.company.out=Gastos administrativos +admin.general.box.stable=Cuadre de caja +admin.general.box.stable.history=Historial de cuadre de caja +admin.customers.datatable.empty=No hay clientes para mostrar +admin.customers.datatable.column.name=Nombre +admin.customers.datatable.column.companyName=Negocio +admin.customers.datatable.column.addressBusiness=Direcci\u00f3n negocio +admin.customers.datatable.column.addressPersonal=Direcci\u00f3n personal +admin.customers.datatable.column.routeCtlg=Ruta +admin.customers.datatable.column.peopleType=Tipo +admin.customers.datatable.column.office=Sucursal +admin.customers.detail.title=Detalle del cliente +admin.customers.company.title=Informaci\u00f3n del negocio +admin.customers.loan.title=Historial de pr\u00e9stamos +admin.customers.detail.field.name=Nombre +admin.customers.detail.field.firstName=Primer nombre +admin.customers.detail.field.secondName=Segundo nombre +admin.customers.detail.field.lastName=Apellido paterno +admin.customers.detail.field.middleName=Apellido materno +admin.customers.detail.field.birthdate=Fecha de nacimiento +admin.customers.detail.field.phoneHome=Tel\u00e9fono de casa +admin.customers.detail.field.addressHome=Domicilio personal +admin.customers.detail.field.peopleType=Tipo +admin.customers.detail.field.routeCtlg=Ruta +admin.customers.detail.field.companyName=Nombre del negocio +admin.customers.detail.field.phoneBusiness=Tel\u00e9fono del negocio +admin.customers.detail.field.addressBusiness=Direcci\u00f3n del negocio +admin.customers.detail.datatable.empty=No hay pr\u00e9stamos por mostrar +admin.customers.detail.datatable.column.endorsement=Aval +admin.customers.detail.datatable.column.loanStatus=Estatus +admin.customers.detail.datatable.column.amountToPay=Monto a pagar +admin.customers.detail.datatable.column.amountPaid=Monto pagado +admin.customers.detail.datatable.column.createdOn=Fecha +admin.customers.detail.datatable.column.routeCtlg=Ruta +admin.customers.detail.datatable.column.comments=Observaciones +admin.customers.detail.datatable.column.totalFee=No. de multas +admin.endorsements.datatable.empty=No hay avales para mostrar +admin.endorsements.datatable.column.name=Nombre +admin.endorsements.datatable.column.phoneHome=Tel\u00e9fono +admin.endorsements.datatable.column.addressHome=Domicilio personal +admin.endorsements.datatable.column.routeCtlg=Ruta +admin.endorsements.datatable.column.peopleType=Tipo +admin.endorsements.detail.title=Detalle del aval +admin.endorsements.company.title=Informaci\u00f3n del negocio +admin.endorsements.loan.title=Historial de pr\u00e9stamos como aval +admin.endorsements.detail.field.name=Nombre +admin.endorsements.detail.field.birthdate=Fecha de nacimiento +admin.endorsements.detail.field.phoneHome=Tel\u00e9fono de casa +admin.endorsements.detail.field.addressHome=Domicilio personal +admin.endorsements.detail.field.peopleType=Tipo +admin.endorsements.detail.field.routeCtlg=Ruta +admin.endorsements.detail.field.companyName=Nombre del negocio +admin.endorsements.detail.field.phoneBusiness=Tel\u00e9fono del negocio +admin.endorsements.detail.field.addressBusiness=Direcci\u00f3n del negocio +admin.endorsements.detail.datatable.empty=No hay pr\u00e9stamos por mostrar +admin.endorsements.detail.datatable.column.customer=Cliente +admin.endorsements.detail.datatable.column.loanStatus=Estatus +admin.endorsements.detail.datatable.column.amountToPay=Monto a pagar +admin.endorsements.detail.datatable.column.amountPaid=Monto pagado +admin.endorsements.detail.datatable.column.createdOn=Fecha +admin.endorsements.detail.datatable.column.routeCtlg=Ruta +admin.endorsements.detail.datatable.column.comments=Observaciones +admin.endorsements.detail.datatable.column.totalFee=No. de multas +admin.people.form.firstName.require.msg.empty=El primer nombre es obligatorio +admin.people.dialog.firstName.title=Primer nombre +admin.people.dialog.secondName.title=Segundo +admin.people.form.lastName.require.msg.empty=El apellido paterno es obligatorio +admin.people.dialog.lastName.title=Apellido paterno +admin.people.form.middleName.require.msg.empty=El apellido materno es obligatorio +admin.people.dialog.middleName.title=Apellido materno +admin.people.dialog.isCustomer.title=Es cliente +admin.people.dialog.isEndorsement.title=Es aval +admin.people.form.phoneHome.require.msg.empty=El tel\u00e9fono personal es obligatorio +admin.people.dialog.phoneHome.title=Tel\u00e9fono personal +admin.people.form.addressHome.require.msg.empty=El domicilio particular es obligatorio +admin.people.dialog.addressHome.title=Domicilio particular +admin.people.form.phoneBusiness.require.msg.empty=El tel\u00e9fono del negocio es obligatorio +admin.people.dialog.phoneBusiness.title=Tel\u00e9fono del negocio +admin.people.form.addressBusiness.require.msg.empty=El domicilio del negocio es obligatorio +admin.people.dialog.addressBusiness.title=Domicilio del negocio +admin.people.form.companyName.require.msg.empty=El nombre del negocio es obligatorio +admin.people.dialog.companyName.title=Nombre del negocio +admin.people.form.birthdate.require.msg.empty=La fecha de nacimiento es obligatorio +admin.people.dialog.birthdate.title=Fecha de nacimiento +admin.people.form.route.require.msg.empty=La ruta es obligatoria +admin.loans.datatable.empty=No hay pr\u00e9stamos por mostrar. +admin.loans.datatable.column.customer=Cliente +admin.loans.datatable.column.routeCtlg=Ruta +admin.loans.datatable.column.endorsement=Aval +admin.loans.datatable.column.amountPaid=Monto a prestar +admin.loans.datatable.column.loan.amountPaid=Monto pagado +admin.loans.datatable.column.loan.amountToPaid=Monto a pagar +admin.loans.datatable.column.loan.saldo=Saldo insoluto +admin.loans.datatable.column.loanFeeNotifications=No. de multas +admin.loans.datatable.column.asesor=Asesor +admin.loans.datatable.column.createdOn=Fecha +admin.loans.datatable.column.loanStatus=Estatus +admin.loans.datatable.column.comments=Comentarios +admin.loans.datatable.column.office=Sucursal +admin.loan.form.typeLoan.require.msg.empty=El tipo de pr\u00e9stamo es obligatorio +admin.loan.form.customer.require.msg.empty=El cliente es obligatorio +admin.loan.form.endorsement.require.msg.empty=El aval es obligatorio +admin.loan.form.user.require.msg.empty=El asesor es obligatorio +admin.loan.form.loanStatus.require.msg.empty=El estatus es obligatorio +admin.loan.form.field.comments=Comentarios +admin.loan.form.field.createdOn=Fecha +admin.loan.form.field.totalPayment=Total abonado +admin.loan.form.field.totalFee=Total en multas +admin.transfers.datatable.empty=No hay transferencias por mostrar +admin.transfers.datatable.column.userTransmitter=Asesor emisor +admin.transfers.datatable.column.userReceiver=Asesor receptor +admin.transfers.datatable.column.amountToTransfer=Monto +admin.transfers.datatable.column.actionStatus=Estatus +admin.transfer.form.userSend.require.msg.empty=El usuario emisor es obligatorio +admin.transfer.form.userReceive.require.msg.empty=El usuario receptor es obligatorio +admin.transfer.form.field.amountToTransfer=Monto a transferir +admin.moneyDailys.datatable.empty=No hay registros por mostrar +admin.moneyDailys.datatable.column.moneyDailyDate=Fecha +admin.moneyDailys.datatable.column.amount=Monto +admin.moneyDailys.datatable.column.user=Empleado +admin.moneyDaily.form.user.require.msg.empty=El empleado es obligatorio +admin.moneyDaily.form.field.amount=Monto +admin.closingDays.datatable.empty=No hay registros por mostrar +admin.closingDays.datatable.column.user=Usuario +admin.closingDays.datatable.column.amountPaid=Monto reportado +admin.closingDays.datatable.column.amountExpected=Monto a reportar +admin.closingDays.datatable.column.createdOn=Fecha +admin.closingDays.datatable.column.comments=Comentarios +admin.closingDays.form.user.require.msg.empty=El usuario es obligatorio +admin.closingDays.dialog.paymentDaily.title=Monto recuperado +admin.closingDays.dialog.transferSender.title=Monto enviado por transferencia +admin.closingDays.dialog.transferReceiver.title=Monto recibido por transferencia +admin.closingDays.dialog.moneyDaily.title=Monto de inicio +admin.closingDays.dialog.delivery.title=Entrega de prestamos +admin.closingDays.dialog.otherExpense.title=Gastos +admin.closingDays.dialog.total.title=Total +admin.closingDays.dialog.transferPending.title=Transferencias sin autorizar +admin.otherExpenses.datatable.empty=No hay gastos por mostrar +admin.otherExpenses.datatable.column.user=Usuario +admin.otherExpenses.datatable.column.expense=Monto +admin.otherExpenses.datatable.column.description=Comentarios +admin.otherExpense.form.user.require.msg.empty=Debes seleccionar un usuario +admin.otherExpense.form.field.expense=Monto +admin.otherExpense.form.field.description=Descripci\u00f3n +admin.advances.datatable.empty=No hay registros por mostrar. +admin.gasoline.datatable.empty=No hay registros por mostrar. +admin.advances.datatable.column.humanResource=Empleado +admin.advances.datatable.column.amount=Monto +admin.advance.form.humanResource.require.msg.empty=El empleado es obligatorio +admin.advance.form.field.amount=Monto +admin.goals.datatable.empty=No hay registros por mostrar. +admin.goals.datatable.column.startDate=Fecha inicial +admin.goals.datatable.column.endDate=Fecha final +admin.goals.datatable.column.amount=Monto +admin.goal.form.startDate.require.msg.empty=La fecha inicial es obligatoria. +admin.goal.dialog.startDate.title=Fecha inicial +admin.goal.form.endDate.require.msg.empty=La fecha final es obligatoria. +admin.goal.dialog.endDate.title=Fecha final +admin.goal.form.field.amount=Monto +admin.fees.datatable.column.startDate=Fecha inicial +admin.fees.datatable.column.endDate=Fecha final +admin.closingday.datatable.column.startDate=Fecha inicial +admin.closingday.datatable.column.endDate=Fecha final +admin.openingfees.datatable.column.startDate=Fecha inicial +admin.openingfees.datatable.column.endDate=Fecha final +admin.payment.datatable.column.startDate=Fecha inicial +admin.payment.datatable.column.endDate=Fecha final +admin.payroll.datatable.column.startDate=Fecha inicial +admin.payroll.datatable.column.endDate=Fecha final +admin.payroll.datatable.empty=No hay registros por mostrar. +admin.deposits.datatable.column.startDate=Fecha inicial +admin.deposits.datatable.column.endDate=Fecha final +admin.zeropayments.datatable.column.startDate=Fecha inicial +admin.zeropayments.datatable.column.endDate=Fecha final +admin.employeesaving.datatable.column.startDate=Fecha inicial +admin.employeesaving.datatable.column.endDate=Fecha final +admin.advances.datatable.column.startDate=Fecha inicial +admin.advances.datatable.column.endDate=Fecha final +admin.gasoline.datatable.column.startDate=Fecha inicial +admin.gasoline.datatable.column.endDate=Fecha final +admin.expenseCompany.datatable.empty=No hay registros por mostrar +admin.expenseCompany.datatable.column.createdOn=Fecha +admin.expenseCompany.datatable.column.amount=Monto +admin.expenseCompany.datatable.column.description=Motivo +admin.expenseCompany.form.field.amount=Monto +admin.expenseCompany.form.field.comments=Motivo +admin.stableGeneralBox.datatable.empty=No hay registros por mostrar +admin.stableGeneralBox.datatable.column.createdOn=Fecha +admin.stableGeneralBox.datatable.column.totalGeneralBox=Total en caja +admin.stableGeneralBox.datatable.column.totalEnvelope=Deje en sobres +admin.stableGeneralBox.datatable.column.totalBankNote=Efectivo +admin.stableGeneralBox.datatable.column.totalCoin=Monedas +admin.stableGeneralBox.datatable.column.totalStable=Diferencia +admin.stableGeneralBox.datatable.column.description=Descripci\u00f3n +admin.stableSmallBox.datatable.empty=No hay registros por mostrar +admin.stableSmallBox.datatable.column.createdOn=Fecha +admin.stableSmallBox.datatable.column.totalSmallBox=Total en caja chica +admin.stableSmallBox.datatable.column.totalEnvelope=Deje en sobres +admin.stableSmallBox.datatable.column.totalBankNote=Efectivo +admin.stableSmallBox.datatable.column.totalCoin=Monedas +admin.stableSmallBox.datatable.column.totalStable=Diferencia +admin.stableSmallBox.datatable.column.description=Descripci\u00f3n +admin.bonuss.datatable.empty=No hay registros por mostrar +admin.bonuss.datatable.column.name=Nombre +admin.bonuss.datatable.column.loanBonus=Porcentaje/Monto por colocaci\u00f3n +admin.bonuss.datatable.column.moraBonus=Porcentaje/Monto por mora +admin.bonuss.datatable.column.newCustomerBonus=Porcentaje/Monto por nuevos clientes +admin.bonuss.datatable.column.administrative=Administrativo +admin.payroll.form.user.require.msg.empty=El usuario es requerido +admin.payroll.form.field.dateInit=Fecha inicial +admin.payroll.form.field.dateEnd=Fecha final +admin.payroll.dialog.salary.title=Salario +admin.payroll.dialog.imss.title=IMSS +admin.payroll.dialog.advances.title=Adelantos +admin.payroll.dialog.bonusColocation.title=Bono de colocaci\u00f3n +admin.payroll.dialog.newCustomer.title=Bono por clientes nuevos +admin.payroll.dialog.bonusMora.title=Bono por mora +admin.payroll.dialog.granTotal.title=Total +admin.payrolls.datatable.empty=Sin registros que mostrar +admin.payrolls.datatable.column.hr=Empleado +admin.payrolls.datatable.column.salary=Salario +admin.payrolls.datatable.column.imss=Imss +admin.payrolls.datatable.column.advance=Adelantos +admin.payrolls.datatable.column.totalBonusNewCustomer=Bono por clientes nuevos +admin.payrolls.datatable.column.totalBonusColocation=Bono por colocaci\u00f3n +admin.payrolls.datatable.column.totalBonusMora=Bono por mora +admin.payrolls.datatable.column.discounts=Descuentos +admin.payrolls.datatable.column.commentsDiscounts=Comentarios por descuentos +admin.payrolls.datatable.column.increases=Incremento extra +admin.payrolls.datatable.column.commentsIncreases=Comentarios por incremento +admin.payrolls.datatable.column.totalPayment=Total n\u00f3mina +admin.payrolls.datatable.column.totalDaysSalary=D\u00edas para salario +admin.payrolls.datatable.column.totalDaysBonus=D\u00edas para bonos +admin.payrolls.datatable.column.observation=Observaciones +admin.payrolls.datatable.column.createdOn=Fecha +############ +# Outcomes # +############ +outcome.dashboard=/dashboard +outcome.system.user.add=/app/system/user/add/main +outcome.system.user.setting=/app/system/user/setting/main +outcome.system.user.access=/app/system/user/access/main +outcome.system.log=/app/system/log/main +outcome.system.office=/app/system/office/index +outcome.employee=/app/system/employee/main +outcome.employee.employeeList=/app/system/employee/employeeList +outcome.catalog.role=/app/catalog/role/index +outcome.catalog.typeLoan=/app/catalog/loanType/index +outcome.catalog.typeLoan.add=/app/catalog/loanType/add +outcome.catalog.route=/app/catalog/route/index +outcome.admin.customer=/app/admin/customer/index +outcome.admin.customer.detail=/app/admin/customer/detail +outcome.admin.endorsement=/app/admin/endorsement/index +outcome.admin.endorsement.detail=/app/admin/endorsement/detail +outcome.admin.endorsement.customer.add=/app/admin/customer/add +outcome.admin.loan.pending=/app/admin/loan/index +outcome.admin.loan.pending.detail=/app/admin/loan/detail +outcome.admin.loan.history=/app/admin/loan/history +outcome.admin.loan.loanDetailTransfer=/app/admin/loan/loanDetailTransfer +outcome.admin.loan.historyJuridical=/app/admin/loan/historyJuridical +outcome.admin.loan.drive=/app/admin/loan/drive +outcome.admin.loan.renovation=/app/admin/loan/loanRenovationWeekly +outcome.admin.loan.drive.last=/app/admin/loan/driveLast +outcome.admin.loan.drive.date=/app/admin/loan/driveDate +outcome.admin.loan.history.detail=/app/admin/loan/historyDetail +outcome.admin.loan.change.owner=/app/admin/loan/changeOwner +outcome.admin.financial.transfer=/app/admin/transfer/index +outcome.admin.financial.moneyDaily=/app/admin/moneyDaily/index +outcome.admin.financial.closingDay=/app/admin/closingDay/index +outcome.admin.financial.closingDayHistory=/app/admin/closingDay/history +outcome.admin.financial.closingDayHistory.detail=/app/admin/closingDay/detail +outcome.admin.financial.stableSmallBox=/app/admin/stableSmallBox/index +outcome.admin.financial.stableSmallBoxHistory=/app/admin/stableSmallBox/history +outcome.admin.financial.otherExpense=/app/admin/otherExpense/index +outcome.admin.payroll.goal=/app/payroll/goal/index +outcome.admin.payroll.bonus=/app/payroll/bonus/index +outcome.admin.payroll.advance=/app/payroll/advance/index +outcome.admin.payroll.create=/app/payroll/createPayroll/index +outcome.admin.payroll.history=/app/payroll/history +outcome.admin.vehicles.addvehicle=/app/admin/vehicles/main +outcome.admin.fees.fees=/app/stats/feesByRoute/index +outcome.admin.stats.fees=/app/stats/fees/index +outcome.admin.stats.closingday=/app/stats/closingDay/index +outcome.admin.stats.openingfee=/app/stats/openingFee/index +outcome.admin.stats.payment=/app/stats/payment/index +outcome.admin.stats.paymentroute=/app/stats/paymentRoute/index +outcome.admin.stats.payroll=/app/stats/payroll/index +outcome.admin.stats.deposits=/app/stats/deposits/index +outcome.admin.stats.zeropayments=/app/stats/zeroPayments/index +outcome.admin.stats.employeesaving=/app/stats/employeeSaving/index +outcome.admin.stats.advances=/app/stats/advances/index +outcome.admin.stats.paymentrenovation=/app/stats/paymentRenovation/index +outcome.admin.stats.gasoline=/app/stats/gasoline/index +outcome.admin.stats.vehicle=/app/stats/vehicles/index +outcome.admin.stats.summary=/app/stats/summary/index +outcome.payroll.loanemployee=/app/payroll/loanEmployee/index +outcome.admin.general.box.expense.company.in=/app/generalBox/expenseCompanyIn/index +outcome.admin.general.box.expense.company.out=/app/generalBox/expenseCompanyOut/index +outcome.admin.general.box.stable=/app/generalBox/stableGeneralBox/index +outcome.admin.general.box.history=/app/generalBox/stableGeneralBox/history +outcome.privacy=/app/topbar/privacy +outcome.admin.customer.without.loan.detail=/customerWithoutLoanDetail +outcome.dashboard.loan.detail=/loanDetail +outcome.dashboard.loan.detailEndorsement=/loanDetailEndorsement +outcome.system.bitacora=/app/system/bitacora/index +########### +# General # +########### +profile=Perfil +privacy=Privacidad +setting=Configuraci\u00f3n +logout=Salir +choose.office=Seleccione la sucursal +office=Sucursal +office.selected=Sucursal {0} +photo.add=Agregar imagen +select=Seleccionar +upload=Cargar +cancel=Cancelar +add=Agregar +add.all=Agregar todos +remove=Quitar +remove.all=Quitar todos +arrebol.reserved=Todos los Derechos Reservados. +validator.select.office=Oficina no v\u00e1lida. +office.confirm.header=Cambiar de sucursal +office.confirm.question=\u00bfEstas seguro que deseas cambiar de sucursal? +pwd.promptLabel=Introduce tu contrase\u00f1a +pwd.weakLabel=Contrase\u00f1a d\u00e9bil +pwd.goodLabel=Contrase segura +pwd.strongLabel=Contrase\u00f1a s\u00faper segura +pwd.promptLabel.confirm=Confirma tu contrase\u00f1a +pwd.match.passwords=Las contrase\u00f1as son diferentes. +pattern.date=dd - MMMM - yyyy +pick.down=Bajar +pick.up=Subir +pick.bottom=Mover al fondo +pick.top=Mover al inicio +pick.add=Agregar +pick.add.all=Agregar todos +pick.remove=Remover +pick.remove.all=Remover todos +dual.list.permissions.required=Seleccione al menos un permiso +dual.list.permissions.available=Permisos disponibles +dual.list.permissions.taken=Permisos asignados +dual.list.routes.required=Seleccione al menos una ruta +dual.list.routes.available=Rutas disponibles +dual.list.routes.taken=Rutas asignadas +permission.add.btn=Asisgar permisos +permission.update.btn=Actualizar permisos +permission.confirm.header=Datos del trabajador +permission.confirm.question=\u00bfLos datos del trabajador son correctos? +permission=Permiso +screen=Pantalla +confirm.yes=Aceptar +confirm.no=Rechazar +invalid.file=Imagen no v\u00e1lida. +invalid.size=Imagen muy grande. +user.required=Usuario requerido. +user.load.permission=\u00bfQuiere buscar los permisos del usuario? +button.add=Agregar +general.search=Buscar +button.edit=Editar +button.save=Guardar +button.authorize=Autorizar +general.confirm.header=Validaci\u00f3n de informaci\u00f3n +general.confirm.confirm=\u00bfEst\u00e1s seguro de continuar con la acci\u00f3n? +salario=Salario +imss=IMSS +payment.required=Salario obligatorio +imss.required=IMSS obligatorio +other.actions=Otras acciones +choose.action=Elegir acci\u00f3n +execute.action=Ejecutar acci\u00f3n +change.owner=Cambiar asesor +change.owner.of.loans=Cambiar los prestamos al asesor destino +current.owner.select=Elegir asesor origen +current.owner.select.name=Nombre del asesor origen +new.owner.select=Elegir asesor destino +new.owner.select.name=Nombre del asesor destino +current.owner.from=Prestamos asesor origen +current.owner.to=Prestamos asesor destino +dual.list.current.owner.required=Seleccione al menos un presamo a cambiar de asesor +change.owner.confirm.question=\u00bfDesea cambiar los prestamos al asesor destino? +stats.closingday=Corte +stats.openingFees=Comisi\u00f3n por apertura +stats.openingFees.comisiones=Comisiones +stats.payment=Cobro de cartera +stats.paymentrenovation=Pagos renovados +stats.paymentroute=Cobro de cartera por ruta +stats.payment.cobros=Cobros +stats.payroll=N\u00f3mina +stats.deposits=Dep\u00f3sitos +stats.zeropayments=Abonos en cero +stats.employeesaving=Ahorro empleados +stats.advances=Adelantos +stats.gasoline=Gasolinas \ No newline at end of file diff --git a/ace-web/src/main/resources/com/arrebol/apc/i18n/app_background.properties b/ace-web/src/main/resources/com/arrebol/apc/i18n/app_background.properties new file mode 100644 index 0000000..61c7edb --- /dev/null +++ b/ace-web/src/main/resources/com/arrebol/apc/i18n/app_background.properties @@ -0,0 +1,50 @@ +############################ +# Login and Recovery forms # +############################ +error.access.title=\u00a1Acceso denegado! +error.access.details=Verifica tus datos de ingreso. +fatal.access.title=\u00a1APC fuera de l\u00ednea! +fatal.access.details=Por favor contacta a tu administrador. +############## +# Validators # +############## +validators.email=Correo no v\u00e1lido. +validators.password=Contrase\u00f1a no v\u00e1lida. +validator.select.one.menu.invalid.option=Opci\u00f3n no v\u00e1lida. +user=Usuario +employee=Empleado +loanType=Tipo de pr\u00e9stamo +people=Persona +prmssn.update.title=Actualizaci\u00f3n de Permisos +prmssn.add.true=Se asignaron los permisos al usuario. +prmssn.add.false=No asignaron los permisos al usuario. +prmssn.add.exception=Grave error al asignar los permisos al usuario. +############## +# generic # +############## +updated=actualizado +deleted=borrado +created=creado +enebled=habilitado +disabled=deshabilitado +searching=cargado de datos +available=disponible +process=procesamiento +password=contrase\u00f1a +modified=modificada +change.owner.upper=Cambio de Asesor +change.owner=Cambio de asesor +message.format.sucess=\u00a1{0} {1}! +message.format.failure=\u00a1{0} no {1}! +message.format.fatal=Grave error en el {0} +generic.title=APC +generic.true=\u00a1Operaci\u00f3n exitosa! +generic.false=\u00a1No se pudo realizar la operac\u00f3n! +generic.exception=\u00a1Error! Contacte al administrado. +generic.start.date=Fecha inicio +generic.end.date.error=La fecha de inicio no puede ser mayor a la fecha final + + +aws.access.key=AKIA2VMOWRI77XODNEUN +aws.secret.access.key=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 +aws.region=us-east-2 \ No newline at end of file diff --git a/ace-web/src/main/resources/com/arrebol/apc/i18n/app_permission.properties b/ace-web/src/main/resources/com/arrebol/apc/i18n/app_permission.properties new file mode 100644 index 0000000..e2274da --- /dev/null +++ b/ace-web/src/main/resources/com/arrebol/apc/i18n/app_permission.properties @@ -0,0 +1,357 @@ +################## +# DASHBOARD Menu # +################## +public.access=Acceso Publico +############### +# SYSTEM Menu # +############### +#Add users +system.employee=Empleado +system.employee.description=Men\u00fa empleado. +system.employee.path=Sistema / Empleado + +system.employee.add=Crear empleado +system.employee.add.description=Permite crear empleados. +system.employee.add.path=Sistema / Empleado (crear) + +system.employee.enebled=Habilitar empleado +system.employee.enebled.description=Permite habilitar empleados. +system.employee.enebled.path=Sistema / Empleado (Habilitar) + +system.employee.disabled=Deshabilitar empleado +system.employee.disabled.description=Permite deshabilitar empleados. +system.employee.disabled.path=Sistema / Empleado (Deshabilitar) + +system.employee.deleted=Borrar empleado +system.employee.deleted.description=Permite borrar empleados. +system.employee.deleted.path=Sistema / Empleado (Borrar) + +system.employee.updated=Actualizar empleado +system.employee.updated.description=Permite actualizar empleados. +system.employee.updated.path=Sistema / Empleado (Actualizar) +#Add users +system.user.create=Crear usuarios +system.user.create.description=Permite agregar Usuarios. +system.user.create.path=Sistema / Usuarios / Alta + +system.user.create.permission=Asignar permisos +system.user.create.permission.description=Permite asignar permisos a usuarios nuevos. +system.user.create.permission.path=Sistema / Usuarios / Alta (Asignar permisos) +#Settings users +system.user.admin=Actualizaci\u00f3n +system.user.admin.description=Permite la actualizaci\u00f3n de los usuarios del sistema. +system.user.admin.path=Sistema / Usuarios / Actualizaci\u00f3n + +system.user.admin.enebled=Habilitar usuarios +system.user.admin.enebled.description=Permite habilitar usuarios. +system.user.admin.enebled.path=Sistema / Usuarios / Actualizaci\u00f3n (Habilitar) + +system.user.admin.disabled=Deshabilitar usuarios +system.user.admin.disabled.description=Permite deshabilitar usuarios. +system.user.admin.disabled.path=Sistema / Usuarios / Actualizaci\u00f3n (Deshabilitar) + +system.user.admin.deleted=Borrar usuarios +system.user.admin.deleted.description=Permite borrar usuarios. +system.user.admin.deleted.path=Sistema / Usuarios / Actualizaci\u00f3n (Borrar) + +system.user.admin.updated=Cambiar nombre de usuarios +system.user.admin.updated.description=Permite cambiar nombre de usuarios. +system.user.admin.updated.path=Sistema / Usuarios / Actualizaci\u00f3n (Nombre de usuario) + +system.user.admin.pwd=Modificar contrase\u00f1a de usuarios +system.user.admin.pwd.description=Permite modificar contrase\u00f1a de usuarios. +system.user.admin.pwd.path=Sistema / Usuarios / Actualizaci\u00f3n (Modificar Contrase\u00f1a) + +system.user.admin.avatar=Cargar imagen de usuarios +system.user.admin.avatar.description=Permite cargar imagen de usuarios. +system.user.admin.avatar.path=Sistema / Usuarios / Actualizaci\u00f3n (Cargar imagen) +#Access users +system.user.access=Acceso +system.user.access.description=Permite agregar/eliminar accesos a los usuairos del sistema. +system.user.access.path=Sistema / Usuarios / Acceso +#Office +system.office=Oficina +system.office.description=Men\u00fa oficina. +system.office.path=Sistema / Oficina + +system.office.add=Crear oficina +system.office.add.description=Permite crear una oficina. +system.office.add.path=Sistema / Oficina / Alta + +system.office.updated=Editar oficina +system.office.updated.description=Permite editar una oficina. +system.office.updated.path=Sistema / Oficina / Editar + +system.office.deleted=Eliminar oficina +system.office.deleted.description=Permite eliminar una oficina. +system.office.deleted.path=Sistema / Oficina / Eliminar + +############### +# CATALOG Menu # +############### +#Puestos +catalog.role=Puesto +catalog.role.description=Men\u00fa puesto. +catalog.role.path=Cat\u00e1logo / Puesto + +catalog.role.add=Crear puesto +catalog.role.add.description=Men\u00fa puesto. +catalog.role.add.path=Cat\u00e1logo / Puesto (crear) + +catalog.role.updated=Editar puesto +catalog.role.updated.description=Permite editar puesto. +catalog.role.updated.path=Cat\u00e1logo / Puesto (editar) + +catalog.role.deleted=Eliminar puesto +catalog.role.deleted.description=Permite eliminar puesto. +catalog.role.deleted.path=Cat\u00e1logo / Puesto (eliminar) +#Tipo prestamo +catalog.typeLoan=Tipo de pr\u00e9stamos +catalog.typeLoan.description=Men\u00fa tipo de pr\u00e9stamos. +catalog.typeLoan.path=Cat\u00e1logo / Tipo de pr\u00e9stamos + +catalog.typeLoan.add=Crear tipo de pr\u00e9stamos +catalog.typeLoan.add.description=Men\u00fa tipo de pr\u00e9stamos. +catalog.typeLoan.add.path=Cat\u00e1logo / Tipo de pr\u00e9stamos (crear) + +catalog.typeLoan.updated=Editar tipo de pr\u00e9stamos +catalog.typeLoan.updated.description=Permite editar tipo de pr\u00e9stamos. +catalog.typeLoan.updated.path=Cat\u00e1logo / Tipo de pr\u00e9stamos (editar) + +catalog.typeLoan.deleted=Eliminar tipo de pr\u00e9stamos +catalog.typeLoan.deleted.description=Permite eliminar tipo de pr\u00e9stamos. +catalog.typeLoan.deleted.path=Cat\u00e1logo / Tipo de pr\u00e9stamos (eliminar) +#Rutas +catalog.route=Rutas +catalog.route.description=Men\u00fa de rutas. +catalog.route.path=Cat\u00e1logo / Rutas + +catalog.route.add=Crear rutas +catalog.route.add.description=Men\u00fa rutas. +catalog.route.add.path=Cat\u00e1logo / Rutas (crear) + +catalog.route.updated=Editar rutas +catalog.route.updated.description=Permite editar rutas. +catalog.route.updated.path=Cat\u00e1logo / Rutas (editar) + +catalog.route.deleted=Eliminar rutas +catalog.route.deleted.description=Permite eliminar rutas. +catalog.route.deleted.path=Cat\u00e1logo / Rutas (eliminar) +#Clientes +admin.customer=Clientes +admin.customer.description=Men\u00fa de clientes. +admin.customer.path=Administraci\u00f3n / Clientes + +admin.customer.add=Crear clientes +admin.customer.add.description=Men\u00fa de clientes. +admin.customer.add.path=Administraci\u00f3n / Clientes (crear) + +admin.customer.updated=Editar clientes +admin.customer.updated.description=Permite editar clientes. +admin.customer.updated.path=Administraci\u00f3n / Clientes (editar) + +admin.customer.deleted=Eliminar clientes +admin.customer.deleted.description=Permite eliminar clientes. +admin.customer.deleted.path=Administraci\u00f3n / Clientes (eliminar) +#Avales +admin.endorsement=Avales +admin.endorsement.description=Men\u00fa de avales. +admin.endorsement.path=Administraci\u00f3n / Avales + +admin.endorsement.add=Crear avales +admin.endorsement.add.description=Men\u00fa de avales. +admin.endorsement.add.path=Administraci\u00f3n / Avales (crear) + +admin.endorsement.updated=Editar avales +admin.endorsement.updated.description=Permite editar avales. +admin.endorsement.updated.path=Administraci\u00f3n / Avales (editar) + +admin.endorsement.deleted=Eliminar avales +admin.endorsement.deleted.description=Permite eliminar avales. +admin.endorsement.deleted.path=Administraci\u00f3n / Avales (eliminar) +#Prestamos +admin.loan=Pr\u00e9stamos +admin.loan.description=Men\u00fa de pr\u00e9stamos. +admin.loan.path=Administraci\u00f3n / Pr\u00e9stamos + +admin.loan.add=Crear pr\u00e9stamos +admin.loan.add.description=Men\u00fa de pr\u00e9stamos. +admin.loan.add.path=Administraci\u00f3n / Pr\u00e9stamos (crear) + +admin.loan.updated=Editar pr\u00e9stamos +admin.loan.updated.description=Permite editar pr\u00e9stamos. +admin.loan.updated.path=Administraci\u00f3n / Pr\u00e9stamos (editar) + +admin.loan.deleted=Eliminar pr\u00e9stamos +admin.loan.deleted.description=Permite eliminar pr\u00e9stamos. +admin.loan.deleted.path=Administraci\u00f3n / Pr\u00e9stamos (eliminar) + +admin.loan.change.owner=Cambiar asesor +admin.loan.change.owner.description=Submen\u00fa cambiar asesor. +admin.loan.change.owner.path=Administraci\u00f3n / Pr\u00e9stamos / Cambiar asesor + +admin.loan.change.owner.update=Cambiar prestamo asesor +admin.loan.change.owner.update.description=Permite cambiar el prestamo de asesor origen para el asesor destino. +admin.loan.change.owner.update.path=Administraci\u00f3n / Pr\u00e9stamos / Cambiar asesor (bot\u00f3n cambiar asesor) +#Transferencias +admin.transfer=Transferencias +admin.transfer.description=Men\u00fa de transferencias. +admin.transfer.path=Administraci\u00f3n / Transferencias + +admin.transfer.add=Crear transferencias +admin.transfer.add.description=Men\u00fa de transferencias. +admin.transfer.add.path=Administraci\u00f3n / Transferencias (crear) + +admin.transfer.updated=Editar transferencias +admin.transfer.updated.description=Permite editar transferencias. +admin.transfer.updated.path=Administraci\u00f3n / Transferencias (editar) + +admin.transfer.deleted=Eliminar transferencias +admin.transfer.deleted.description=Permite eliminar transferencias. +admin.transfer.deleted.path=Administraci\u00f3n / Transferencias (eliminar) +#Entregas diarias +admin.moneyDaily=Entregas diarias +admin.moneyDaily.description=Men\u00fa de entregas diarias. +admin.moneyDaily.path=Administraci\u00f3n / Entregas diarias + +admin.moneyDaily.add=Crear entregas diarias +admin.moneyDaily.add.description=Men\u00fa de entregas diarias. +admin.moneyDaily.add.path=Administraci\u00f3n / Entregas diarias (crear) + +admin.moneyDaily.updated=Editar entregas diarias +admin.moneyDaily.updated.description=Permite editar entregas diarias. +admin.moneyDaily.updated.path=Administraci\u00f3n / Entregas diarias (editar) + +admin.moneyDaily.deleted=Eliminar entregas diarias +admin.moneyDaily.deleted.description=Permite eliminar entregas diarias. +admin.moneyDaily.deleted.path=Administraci\u00f3n / Entregas diarias (eliminar) +#Cierre del dia +admin.closingDay=Corte del d\u00eda +admin.closingDay.description=Men\u00fa del corte del d\u00eda. +admin.closingDay.path=Administraci\u00f3n / Corte del d\u00eda + +admin.closingDay.add=Crear del corte del d\u00eda +admin.closingDay.add.description=Men\u00fa del corte del d\u00eda. +admin.closingDay.add.path=Administraci\u00f3n / Corte del d\u00eda (crear) + +admin.closingDay.updated=Editar el corte del d\u00eda +admin.closingDay.updated.description=Permite editar el corte del d\u00eda. +admin.closingDay.updated.path=Administraci\u00f3n / Corte del d\u00eda (editar) + +admin.closingDay.deleted=Eliminar el corte del d\u00eda +admin.closingDay.deleted.description=Permite eliminar el corte del d\u00eda. +admin.closingDay.deleted.path=Administraci\u00f3n / Corte del d\u00eda (eliminar) +#Otros gastos +admin.otherExpense=Gastos +admin.otherExpense.description=Men\u00fa de gastos. +admin.otherExpense.path=Administraci\u00f3n / Gastos + +admin.otherExpense.add=Crear gastos +admin.otherExpense.add.description=Men\u00fa de gastos. +admin.otherExpense.add.path=Administraci\u00f3n / Gastos (crear) + +admin.otherExpense.updated=Editar gastos +admin.otherExpense.updated.description=Permite editar gastos. +admin.otherExpense.updated.path=Administraci\u00f3n / Gastos (editar) + +admin.otherExpense.deleted=Eliminar gastos +admin.otherExpense.deleted.description=Permite eliminar gastos. +admin.otherExpense.deleted.path=Administraci\u00f3n / Gastos (eliminar) +#Metas +admin.goal=Metas +admin.goal.description=Men\u00fa de metas. +admin.goal.path=Administraci\u00f3n / Metas + +admin.goal.add=Crear metas +admin.goal.add.description=Men\u00fa de metas. +admin.goal.add.path=Administraci\u00f3n / Metas (crear) + +admin.goal.updated=Editar metas +admin.goal.updated.description=Permite editar metas. +admin.goal.updated.path=Administraci\u00f3n / Metas (editar) + +admin.goal.deleted=Eliminar metas +admin.goal.deleted.description=Permite eliminar metas. +admin.goal.deleted.path=Administraci\u00f3n / Metas (eliminar) +#Bonos +admin.bonus=Bonos +admin.bonus.description=Men\u00fa de bonos. +admin.bonus.path=Administraci\u00f3n / Bonos + +admin.bonus.add=Crear bonos +admin.bonus.add.description=Men\u00fa de bonos. +admin.bonus.add.path=Administraci\u00f3n / Bonos (crear) + +admin.bonus.updated=Editar bonos +admin.bonus.updated.description=Permite editar bonos. +admin.bonus.updated.path=Administraci\u00f3n / Bonos (editar) + +admin.bonus.deleted=Eliminar bonos +admin.bonus.deleted.description=Permite eliminar bonos. +admin.bonus.deleted.path=Administraci\u00f3n / Bonos (eliminar) +#Adelantos +admin.advance=Adelantos +admin.advance.description=Men\u00fa de adelantos. +admin.advance.path=Administraci\u00f3n / Adelantos + +admin.advance.add=Crear adelantos +admin.advance.add.description=Men\u00fa de adelantos. +admin.advance.add.path=Administraci\u00f3n / Adelantos (crear) + +admin.advance.updated=Editar adelantos +admin.advance.updated.description=Permite editar adelantos. +admin.advance.updated.path=Administraci\u00f3n / Adelantos (editar) + +admin.advance.deleted=Eliminar adelantos +admin.advance.deleted.description=Permite eliminar adelantos. +admin.advance.deleted.path=Administraci\u00f3n / Adelantos (eliminar) +#Entradas caja general +admin.expenseCompanyIn=Entradas +admin.expenseCompanyIn.description=Men\u00fa de entradas. +admin.expenseCompanyIn.path=Administraci\u00f3n / Entradas + +admin.expenseCompanyIn.add=Crear entradas +admin.expenseCompanyIn.add.description=Men\u00fa de entradas. +admin.expenseCompanyIn.add.path=Administraci\u00f3n / Entradas (crear) + +admin.expenseCompanyIn.updated=Editar entradas +admin.expenseCompanyIn.updated.description=Permite editar entradas. +admin.expenseCompanyIn.updated.path=Administraci\u00f3n / Entradas (editar) + +admin.expenseCompanyIn.deleted=Eliminar entradas +admin.expenseCompanyIn.deleted.description=Permite eliminar entradas. +admin.expenseCompanyIn.deleted.path=Administraci\u00f3n / Entradas (eliminar) +#Salidas caja general +admin.expenseCompanyOut=Salidas +admin.expenseCompanyOut.description=Men\u00fa de salidas. +admin.expenseCompanyOut.path=Administraci\u00f3n / Salidas + +admin.expenseCompanyOut.add=Crear salidas +admin.expenseCompanyOut.add.description=Men\u00fa de salidas. +admin.expenseCompanyOut.add.path=Administraci\u00f3n / Salidas (crear) + +admin.expenseCompanyOut.updated=Editar salidas +admin.expenseCompanyOut.updated.description=Permite editar salidas. +admin.expenseCompanyOut.updated.path=Administraci\u00f3n / Salidas (editar) + +admin.expenseCompanyOut.deleted=Eliminar salidas +admin.expenseCompanyOut.deleted.description=Permite eliminar salidas. +admin.expenseCompanyOut.deleted.path=Administraci\u00f3n / Salidas (eliminar) +#Cuadres caja general +admin.stableGeneralBox=Cuadre de caja +admin.stableGeneralBox.description=Men\u00fa de cuadre de caja. +admin.stableGeneralBox.path=Administraci\u00f3n / Cuadre de caja + +admin.stableGeneralBox.add=Crear cuadre de caja +admin.stableGeneralBox.add.description=Men\u00fa de cuadre de caja. +admin.stableGeneralBox.add.path=Administraci\u00f3n / Cuadre de caja (crear) + +admin.stableGeneralBox.updated=Editar cuadre de caja +admin.stableGeneralBox.updated.description=Permite editar cuadre de caja. +admin.stableGeneralBox.updated.path=Administraci\u00f3n / Cuadre de caja (editar) + +admin.stableGeneralBox.deleted=Eliminar cuadre de caja +admin.stableGeneralBox.deleted.description=Permite eliminar cuadre de caja. +admin.stableGeneralBox.deleted.path=Administraci\u00f3n / Cuadre de caja (eliminar) +#Estad\u00edsticas/Multas +admin.fees=Multas \ No newline at end of file diff --git a/ace-web/src/main/resources/log4j2.xml b/ace-web/src/main/resources/log4j2.xml new file mode 100644 index 0000000..fc24817 --- /dev/null +++ b/ace-web/src/main/resources/log4j2.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + %d{dd-MM-yyyy HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-web/src/main/webapp/META-INF/context.xml b/ace-web/src/main/webapp/META-INF/context.xml new file mode 100644 index 0000000..4e79863 --- /dev/null +++ b/ace-web/src/main/webapp/META-INF/context.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + diff --git a/ace-web/src/main/webapp/WEB-INF/error-pages/access.xhtml b/ace-web/src/main/webapp/WEB-INF/error-pages/access.xhtml new file mode 100644 index 0000000..0d4e1e2 --- /dev/null +++ b/ace-web/src/main/webapp/WEB-INF/error-pages/access.xhtml @@ -0,0 +1,37 @@ + + + + + + + + + + + + #{i18n['project.short.name']} + + + +
+
+ +
+ +
+
+ +
+

#{i18n['error.forbidden']}

+

#{i18n['error.contact.admin']}

+ +
+
+ + +
+ + \ No newline at end of file diff --git a/ace-web/src/main/webapp/WEB-INF/error-pages/error.xhtml b/ace-web/src/main/webapp/WEB-INF/error-pages/error.xhtml new file mode 100644 index 0000000..31fbba2 --- /dev/null +++ b/ace-web/src/main/webapp/WEB-INF/error-pages/error.xhtml @@ -0,0 +1,38 @@ + + + + + + + + + + + + #{i18n['project.short.name']} + + + +
+
+ +
+ +
+ +
+ +
+

#{i18n['error.title']}

+

#{i18n['error.contact.admin']}

+ +
+
+ + +
+ + diff --git a/ace-web/src/main/webapp/WEB-INF/error-pages/notfound.xhtml b/ace-web/src/main/webapp/WEB-INF/error-pages/notfound.xhtml new file mode 100644 index 0000000..72b9bb4 --- /dev/null +++ b/ace-web/src/main/webapp/WEB-INF/error-pages/notfound.xhtml @@ -0,0 +1,37 @@ + + + + + + + + + + + #{i18n['project.short.name']} + + + +
+
+ +
+ +
+ +
+ +
+

#{i18n['error.not.found']}

+

#{i18n['error.contact.admin']}

+ +
+
+ + +
+ + \ No newline at end of file diff --git a/ace-web/src/main/webapp/WEB-INF/faces-config.xml b/ace-web/src/main/webapp/WEB-INF/faces-config.xml new file mode 100644 index 0000000..ca7d5d9 --- /dev/null +++ b/ace-web/src/main/webapp/WEB-INF/faces-config.xml @@ -0,0 +1,46 @@ + + + + + + + + com.arrebol.apc.i18n.app + i18n + + + com.arrebol.apc.i18n.app_permission + permission + + + + com.arrebol.apc.i18n.app_background + + + + taxiservicios + + + org.primefaces.component.SerenityMenu + org.primefaces.serenity.component.SerenityMenu + + + + + org.primefaces.component + org.primefaces.component.SerenityMenuRenderer + org.primefaces.serenity.component.SerenityMenuRenderer + + + \ No newline at end of file diff --git a/ace-web/src/main/webapp/WEB-INF/footer.xhtml b/ace-web/src/main/webapp/WEB-INF/footer.xhtml new file mode 100644 index 0000000..aff3f44 --- /dev/null +++ b/ace-web/src/main/webapp/WEB-INF/footer.xhtml @@ -0,0 +1,15 @@ + + + + \ No newline at end of file diff --git a/ace-web/src/main/webapp/WEB-INF/primefaces-serenity.taglib.xml b/ace-web/src/main/webapp/WEB-INF/primefaces-serenity.taglib.xml new file mode 100644 index 0000000..6fa2673 --- /dev/null +++ b/ace-web/src/main/webapp/WEB-INF/primefaces-serenity.taglib.xml @@ -0,0 +1,66 @@ + + + + http://primefaces.org/serenity + + + + menu + + org.primefaces.component.SerenityMenu + org.primefaces.component.SerenityMenuRenderer + + + + id + false + java.lang.String + + + + rendered + false + java.lang.Boolean + + + + binding + false + javax.faces.component.UIComponent + + + + widgetVar + false + java.lang.String + + + + model + false + org.primefaces.model.menu.MenuModel + + + + style + false + java.lang.String + + + + styleClass + false + java.lang.String + + + + closeDelay + false + java.lang.Integer + 250 + + + \ No newline at end of file diff --git a/ace-web/src/main/webapp/WEB-INF/sidebar.xhtml b/ace-web/src/main/webapp/WEB-INF/sidebar.xhtml new file mode 100644 index 0000000..bc80050 --- /dev/null +++ b/ace-web/src/main/webapp/WEB-INF/sidebar.xhtml @@ -0,0 +1,417 @@ + + +
+ + +
+ +
+
+ +
diff --git a/ace-web/src/main/webapp/WEB-INF/template.xhtml b/ace-web/src/main/webapp/WEB-INF/template.xhtml new file mode 100644 index 0000000..e9782a0 --- /dev/null +++ b/ace-web/src/main/webapp/WEB-INF/template.xhtml @@ -0,0 +1,71 @@ + + + + + + + + + + + <ui:insert name="title">#{i18n['project.short.name']}</ui:insert> + + + + + + + +
+ + +
+ + +
+
    +
  • +
  • /
  • + +
+ +
+ + + + + +
+
+ +
+ +
+ + + +
+
+
+ + + + + + + + + + + + + + +
+ + \ No newline at end of file diff --git a/ace-web/src/main/webapp/WEB-INF/topbar.xhtml b/ace-web/src/main/webapp/WEB-INF/topbar.xhtml new file mode 100644 index 0000000..eb2432b --- /dev/null +++ b/ace-web/src/main/webapp/WEB-INF/topbar.xhtml @@ -0,0 +1,109 @@ + + +
+ + + + + + + + + + + + +
+ + + + +
+
+ +
\ No newline at end of file diff --git a/ace-web/src/main/webapp/WEB-INF/web.xml b/ace-web/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..199d61a --- /dev/null +++ b/ace-web/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,241 @@ + + + + + + 120 + + + dashboard.jsf + + + javax.faces.STATE_SAVING_METHOD + server + + + javax.faces.PROJECT_STAGE + Development + + + primefaces.THEME + serenity-green + + + primefaces.FONT_AWESOME + true + + + javax.faces.FACELETS_LIBRARIES + /WEB-INF/primefaces-serenity.taglib.xml + + + + org.apache.webbeans.servlet.WebBeansConfigurationListener + + + com.sun.faces.config.ConfigureListener + + + Character Encoding Filter + org.primefaces.serenity.filter.CharacterEncodingFilter + + + Character Encoding Filter + Faces Servlet + + + Faces Servlet + javax.faces.webapp.FacesServlet + + + Faces Servlet + *.jsf + + + ttf + application/font-sfnt + + + woff + application/font-woff + + + png + image/png + + + woff2 + application/font-woff2 + + + eot + application/vnd.ms-fontobject + + + eot?#iefix + application/vnd.ms-fontobject + + + svg + image/svg+xml + + + svg#exosemibold + image/svg+xml + + + svg#exobolditalic + image/svg+xml + + + svg#exomedium + image/svg+xml + + + svg#exoregular + image/svg+xml + + + svg#fontawesomeregular + image/svg+xml + + + + FORM + + /login.jsf + /WEB-INF/error-pages/access.jsf + + + + + + + Views only available when logged has a DASHBOARD grant + /dashboard.jsf + + + Views only available when user has a PROFILE/PRIVACY/SETTINGS grant + /app/topbar/* + + + public.access + + + + + + Views only available when logged has a EMPLOYEE grant + /app/system/employee/main.jsf + + + system.employee + + + + + Views only available when logged has a USER CREATE grant + /app/system/user/add/main.jsf + + + system.user.create + + + + + Views only available when logged has a USER SETTINGS grant + /app/system/user/setting/main.jsf + + + system.user.admin + + + + + Views only available when logged has a USER ACCESS grant + /app/system/user/access/main.jsf + + + system.user.access + + + + + Views only available when logged has a CHANGE LOANS BETWEEN USER grant + /app/admin/loan/changeOwner.jsf + + + admin.loan.change.owner + + + + + + + + public.access + + + + system.employee + + + system.user.create + + + system.user.admin + + + system.user.access + + + admin.loan.change.owner + + + + 403 + /WEB-INF/error-pages/access.jsf + + + 404 + /WEB-INF/error-pages/notfound.jsf + + + 500 + /WEB-INF/error-pages/error.jsf + + + + DB Connection + jdbc/apcAuth + javax.sql.DataSource + Container + + \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/closingDay/detail.xhtml b/ace-web/src/main/webapp/app/admin/closingDay/detail.xhtml new file mode 100644 index 0000000..2dbd2c7 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/closingDay/detail.xhtml @@ -0,0 +1,145 @@ + + + + + + #{i18n['project.short.name']} - #{permission['admin.closingDay']} + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.financial.closingDayHistory']}
  • +
  • /
  • +
  • Detalle del corte
  • +
    + + +
    +
    + + +
    +
    + + + +

    Información del corte

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + + +

    Detalle del corte

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/closingDay/history.xhtml b/ace-web/src/main/webapp/app/admin/closingDay/history.xhtml new file mode 100644 index 0000000..faf8a3c --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/closingDay/history.xhtml @@ -0,0 +1,170 @@ + + #{i18n['project.short.name']} - #{permission['admin.closingDay']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.financial.closingDayHistory']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.financial.closingDayHistory']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +

    + + + + + + +

    +
    + +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/closingDay/index.xhtml b/ace-web/src/main/webapp/app/admin/closingDay/index.xhtml new file mode 100644 index 0000000..3a4266e --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/closingDay/index.xhtml @@ -0,0 +1,372 @@ + + + + + + #{i18n['project.short.name']} - #{permission['admin.closingDay.add']} + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.closingDay.add']}
  • +
    + + +
    +
    + +
    +
    + + +

    #{permission['admin.closingDay.add']}

    + + + + + + + + + + + + + + +
    + + +
    +
    +
    + + + + + +

    Totales

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +



    + +

    Detalle del corte

    + + + +
    + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    +
    + +
    +
    +

    Abonos en ceros

    + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +

    Resumen del día

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +

    Caja chica

    + + + + + + + +
    +
    + +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/customer/add.xhtml b/ace-web/src/main/webapp/app/admin/customer/add.xhtml new file mode 100644 index 0000000..56f0f04 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/customer/add.xhtml @@ -0,0 +1,225 @@ + + + + + + #{i18n['project.short.name']} - #{i18n['admin.people.add']} + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.people.add']}
  • +
    + + +
    +
    +
    + +
    +
    + + + + +

    #{i18n['admin.people.add']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #{i18n['admin.people.dialog.isCustomer.title']} + + + + + #{i18n['admin.people.dialog.isEndorsement.title']} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/customer/detail.xhtml b/ace-web/src/main/webapp/app/admin/customer/detail.xhtml new file mode 100644 index 0000000..c211331 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/customer/detail.xhtml @@ -0,0 +1,315 @@ + + + + + + #{i18n['project.short.name']} - #{permission['admin.customer']} + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.customer']}
  • +
  • /
  • +
  • #{i18n['admin.customers.detail.title']}
  • +
    + + +
    +
    + +
    +
    + + + + +

    #{i18n['admin.customers.detail.title']}

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + + +

    #{i18n['admin.customers.company.title']}

    +

    + + + + + + +



    + + + + +



    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + +

    Información adicional

    +

    + + + + + +



    + + + + + +
    +
    +
    +
    + +
    + +
    +
    + +

    #{i18n['admin.customers.loan.title']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    + + + + Detalle de pagos + + + + Fecha + Pago + Tipo + No. Referencia + Comentarios + + + + + + + + + + + + + + + + + + #{detail.loanDetailsType.value} + #{detail.referenceNumber} + #{detail.comments} + + + + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/customer/index.xhtml b/ace-web/src/main/webapp/app/admin/customer/index.xhtml new file mode 100644 index 0000000..4d306fb --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/customer/index.xhtml @@ -0,0 +1,494 @@ + + #{i18n['project.short.name']} - #{permission['admin.customer']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.customer']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.customer']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +

    + + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + +

    + + + + + + + + + +

    + + + + + + +

    + + + + + + +

    + + + + + + + +

    +

    + + + + + + + + +

    + + + + + + + + +

    + + + + + + +

    + + + + + + +

    + + Cambiar a estatus Aprobado + + + +

    + + Cambiar a estatus Terminado + + + + + + + + + + + + + +
    +
    + + + + +

    + +

    #{i18n['admin.people.add']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #{i18n['admin.people.dialog.isCustomer.title']} + + + + + #{i18n['admin.people.dialog.isEndorsement.title']} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/customer/index_old.xhtml b/ace-web/src/main/webapp/app/admin/customer/index_old.xhtml new file mode 100644 index 0000000..a2b1604 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/customer/index_old.xhtml @@ -0,0 +1,431 @@ + + #{i18n['project.short.name']} - #{permission['admin.customer']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.customer']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.customer']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +- + + + + + + + + + + + + + + + + + + +
    +
    + + + + +

    + + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + +

    + + + + + + + + + +

    + + + + + + + +

    + + + + + + + +

    + + + + + + + +

    +

    + + + + + + + + +

    + + + + + + + + +

    + + + + + + +

    + + + + + + +

    + + Cambiar a estatus Aprobado + + + +

    + + Cambiar a estatus Terminado + + + +

    +
    + +
    +
    +
    + + + + +

    + +

    #{i18n['admin.people.add']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #{i18n['admin.people.dialog.isCustomer.title']} + + + + + #{i18n['admin.people.dialog.isEndorsement.title']} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/endorsement/detail.xhtml b/ace-web/src/main/webapp/app/admin/endorsement/detail.xhtml new file mode 100644 index 0000000..5736a8a --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/endorsement/detail.xhtml @@ -0,0 +1,258 @@ + + + + + + #{i18n['project.short.name']} - #{permission['admin.endorsement']} + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.endorsement']}
  • +
  • /
  • +
  • #{i18n['admin.endorsements.detail.title']}
  • +
    + + +
    +
    + +
    +
    + + + + +

    #{i18n['admin.endorsements.detail.title']}

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + +

    #{i18n['admin.endorsements.company.title']}

    +

    + + + + + + +



    + + + + +



    + + + + + + + + + + +
    +
    +
    +
    +
    + + + +

    Información adicional

    +

    + + + + + +



    + + + + + +
    +
    +
    +
    + +
    + +
    +
    + +

    #{i18n['admin.endorsements.loan.title']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/endorsement/index.xhtml b/ace-web/src/main/webapp/app/admin/endorsement/index.xhtml new file mode 100644 index 0000000..cf0caa1 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/endorsement/index.xhtml @@ -0,0 +1,162 @@ + + #{i18n['project.short.name']} - #{permission['admin.endorsement']} + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.endorsement']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.endorsement']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/loan/changeOwner.xhtml b/ace-web/src/main/webapp/app/admin/loan/changeOwner.xhtml new file mode 100644 index 0000000..004b88d --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/loan/changeOwner.xhtml @@ -0,0 +1,212 @@ + + + + + + #{i18n['project.short.name']} - #{permission['admin.loan.change.owner']} + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.loan']}
  • +
  • /
  • +
  • #{permission['admin.loan.change.owner']}
  • +
    + + +
    +
    +
    + + + + +

    + + + +

    +

    + #{permission['admin.loan.change.owner']} +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #{i18n['current.owner.from']} + + + + + #{i18n['current.owner.to']} + + + + + + + #{i18n['admin.endorsements.detail.datatable.column.customer']}: + + + + + + #{i18n['admin.loans.datatable.column.endorsement']}: + + + + + + #{i18n['admin.loans.datatable.column.amountPaid']}: + + + + + + + + #{i18n['admin.payrolls.datatable.column.createdOn']} (dd-mm-yyyy): + + + + + + + + #{i18n['admin.customers.datatable.column.routeCtlg']}: + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/loan/detail.xhtml b/ace-web/src/main/webapp/app/admin/loan/detail.xhtml new file mode 100644 index 0000000..6203ee8 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/loan/detail.xhtml @@ -0,0 +1,641 @@ + + + + + + #{i18n['project.short.name']} - #{permission['admin.loan']} + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.loan']}
  • +
  • /
  • +
  • #{i18n['admin.loan.detail.title']}
  • +
    + + + + +
    +
    + +
    +
    + + + +

    #{i18n['admin.customers.detail.title']}

    +

    + + + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    +
    + + + +

    #{i18n['admin.customers.company.title']}

    +

    + + + + + + +



    + + + + +



    + + + + +



    +

    Buscador de clientes

    + + + + + + + + +
    +
    +
    +
    + +
    + +
    +
    + +

    #{i18n['admin.customers.loan.title']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    + + + + Detalle de pagos + + + + Fecha + Pago + Tipo + No. Referencia + Comentarios + + + + + + + + + + + + + + + + + + #{detail.loanDetailsType.value} + #{detail.referenceNumber} + #{detail.comments} + + + + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + +

    #{i18n['admin.endorsements.detail.title']}

    +

    + + + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    +
    + + + +

    #{i18n['admin.endorsements.company.title']}

    +

    + + + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    + +
    + +
    +
    + +

    #{i18n['admin.endorsements.loan.title']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    + + + +

    Préstamo

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +

    +

    Modificar el tipo de préstamo

    + + + + + + + + + + + + + + + +

    +

    +

    Modificar fecha de entrega

    + + + + + + + + + + + + + +

    + + + + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/loan/drive.xhtml b/ace-web/src/main/webapp/app/admin/loan/drive.xhtml new file mode 100644 index 0000000..7864507 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/loan/drive.xhtml @@ -0,0 +1,902 @@ + + #{i18n['project.short.name']} - Google Drive semana actual + + + + +
  • #{i18n['admin.title']}
  • +
    + + + + +
    +
    +
    +

    Semana actual

    + + + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +

    Colocación

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    Subtotales de cobros y comisión por apertura por cartera de asesor

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Préstamos enviados a Cobranza

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Resumen de cortes

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Resumen de gastos

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Resumen de inicios

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Clientes nuevos

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + +
    +
    + +

    Resumen total de la semana

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/loan/driveDate.xhtml b/ace-web/src/main/webapp/app/admin/loan/driveDate.xhtml new file mode 100644 index 0000000..3a41278 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/loan/driveDate.xhtml @@ -0,0 +1,1035 @@ + + #{i18n['project.short.name']} - Google Drive + + + + + +
  • #{i18n['admin.title']}
  • +
    + + + + +
    +
    +
    +

    Google Drive

    + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    + + + + Detalles + + + + Cantidad Pagada Actual + Tipo de Prestamo + Abono Diario + Comisión por Apertura + Cliente Nuevo + Numero de accion + Multas Acumuladas + Multas Semana + + + + + + + + + + + + + + #{driver.loanTypeName} + + + + + + + + + + + #{driver.newCustomer} + #{driver.numPagosAll} + + + + + + + + + + + + + + + + + + + + + Detalle de pagos + + + + Fecha + Pago + Saldo insoluto + Tipo + No. Referencia + Comentarios + + + + + + + + + + + + + + + + + + + + + + + #{detail.loanDetailsType.value} + #{detail.referenceNumber} + #{detail.comments} + + + + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +

    Colocación

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +

    Subtotales de cobros y comisión por apertura por cartera de asesor

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Préstamos enviados a Cobranza

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Resumen de cortes

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Resumen de gastos

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Resumen de inicios

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Resumen total de la semana

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/loan/driveLast.xhtml b/ace-web/src/main/webapp/app/admin/loan/driveLast.xhtml new file mode 100644 index 0000000..ed72318 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/loan/driveLast.xhtml @@ -0,0 +1,898 @@ + + #{i18n['project.short.name']} - Google Drive semana anterior + + + + +
  • #{i18n['admin.title']}
  • +
    + + + + +
    +
    +
    +

    Semana anterior

    + + + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +

    Colocación

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Subtotales de cobros y comisión por apertura por cartera de asesor

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Préstamos enviados a Cobranza

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Resumen de cortes

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Resumen de gastos

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Resumen de inicios

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +

    Clientes nuevos

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + +
    +
    + +

    Resumen total de la semana

    + + + + + +
    + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/loan/history.xhtml b/ace-web/src/main/webapp/app/admin/loan/history.xhtml new file mode 100644 index 0000000..14e5f8e --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/loan/history.xhtml @@ -0,0 +1,299 @@ + + #{i18n['project.short.name']} - #{permission['admin.loan']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.loan']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.loan.history']}

    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + +

    + + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + +

    + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + +

    + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + + +

    +
    + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/loan/historyDetail.xhtml b/ace-web/src/main/webapp/app/admin/loan/historyDetail.xhtml new file mode 100644 index 0000000..536ecfe --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/loan/historyDetail.xhtml @@ -0,0 +1,523 @@ + + + + + + #{i18n['project.short.name']} - #{permission['admin.loan']} + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.loan']}
  • +
  • /
  • +
  • #{i18n['admin.loan.detail.title']}
  • +
    + + + + +
    +
    + +
    +
    + + + +

    #{i18n['admin.customers.detail.title']}

    +

    + + + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    +
    + + + +

    #{i18n['admin.customers.company.title']}

    +

    + + + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    + +
    + +
    +
    + +

    #{i18n['admin.customers.loan.title']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    + + + + Detalle de pagos + + + + Fecha + Pago + Tipo + No. Referencia + Comentarios + + + + + + + + + + + + + + + + + + #{detail.loanDetailsType.value} + #{detail.referenceNumber} + #{detail.comments} + + + + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + +

    #{i18n['admin.endorsements.detail.title']}

    +

    + + + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    +
    + + + +

    #{i18n['admin.endorsements.company.title']}

    +

    + + + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    + +
    + +
    +
    + +

    #{i18n['admin.endorsements.loan.title']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    + + + +

    Préstamo

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/loan/historyJuridical.xhtml b/ace-web/src/main/webapp/app/admin/loan/historyJuridical.xhtml new file mode 100644 index 0000000..fd737c3 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/loan/historyJuridical.xhtml @@ -0,0 +1,144 @@ + + #{i18n['project.short.name']} - #{permission['admin.loan']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.loan']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.loan.history']}

    + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/loan/index.xhtml b/ace-web/src/main/webapp/app/admin/loan/index.xhtml new file mode 100644 index 0000000..b55fb71 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/loan/index.xhtml @@ -0,0 +1,220 @@ + + #{i18n['project.short.name']} - #{permission['admin.loan']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.loan']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.loan.to.approve']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + +
    +
    + + + +

    + + + + + + +

    + + + + + + + + + +

    + + + + + + + +

    + + + + + + + +

    + + + + + + + +

    +

    + + + + + + + + +

    + + + + + + + + +

    + + + + + + +

    + + + + + + +

    + + Cambiar a estatus Aprobado + + + +

    + + Cambiar a estatus Terminado + + + +

    +
    + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/loan/loanDetailTransfer.xhtml b/ace-web/src/main/webapp/app/admin/loan/loanDetailTransfer.xhtml new file mode 100644 index 0000000..a1fa280 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/loan/loanDetailTransfer.xhtml @@ -0,0 +1,112 @@ + + #{i18n['project.short.name']} - #{permission['admin.loan']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.loan']}
  • +
    + + +
    +
    +
    +

    Confirmacion de Trasnferencias

    + + + + + + + + + + + + +
    + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +
    +
    + + + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/loan/loanRenovationWeekly.xhtml b/ace-web/src/main/webapp/app/admin/loan/loanRenovationWeekly.xhtml new file mode 100644 index 0000000..d2ac398 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/loan/loanRenovationWeekly.xhtml @@ -0,0 +1,118 @@ + + #{i18n['project.short.name']} - #{permission['admin.loan']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • Colocación de Renovación
  • +
    + + +
    +
    +
    +

    Colocación de Renovación

    + + + + + + + + + + +
    + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    +
    +
    + + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/moneyDaily/index.xhtml b/ace-web/src/main/webapp/app/admin/moneyDaily/index.xhtml new file mode 100644 index 0000000..3aa2e2a --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/moneyDaily/index.xhtml @@ -0,0 +1,245 @@ + + #{i18n['project.short.name']} - #{permission['admin.moneyDaily']} + + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.moneyDaily']}
  • +
    + + +
    +
    +
    +
    +

    #{i18n['admin.financial.moneyDaily']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + +
    + +
    +
    +
    +

    Inicio propuesto para certificadores

    + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + +

    + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/otherExpense/index.xhtml b/ace-web/src/main/webapp/app/admin/otherExpense/index.xhtml new file mode 100644 index 0000000..90db859 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/otherExpense/index.xhtml @@ -0,0 +1,214 @@ + + #{i18n['project.short.name']} - #{permission['admin.otherExpense']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.otherExpense']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.financial.otherExpense']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + + +

    + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/stableSmallBox/history.xhtml b/ace-web/src/main/webapp/app/admin/stableSmallBox/history.xhtml new file mode 100644 index 0000000..b80ce7d --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/stableSmallBox/history.xhtml @@ -0,0 +1,189 @@ + + #{i18n['project.short.name']} - Caja chica + + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • Historia cuadre caja chica
  • +
    + + +
    +
    +
    +

    Historial cuadre caja chica

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/stableSmallBox/index.xhtml b/ace-web/src/main/webapp/app/admin/stableSmallBox/index.xhtml new file mode 100644 index 0000000..144da2f --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/stableSmallBox/index.xhtml @@ -0,0 +1,141 @@ + + + + + + #{i18n['project.short.name']} - Caja chica + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • Cuadre de caja chica
  • +
    + + +
    +
    +
    + +
    +
    + +

    Cuadre de caja chica

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/transfer/index.xhtml b/ace-web/src/main/webapp/app/admin/transfer/index.xhtml new file mode 100644 index 0000000..6ffe588 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/transfer/index.xhtml @@ -0,0 +1,216 @@ + + #{i18n['project.short.name']} - #{permission['admin.transfer']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.transfer']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.financial.transfer']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + +

    + + + + + + + +

    + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/transfer/index_backup.xhtml b/ace-web/src/main/webapp/app/admin/transfer/index_backup.xhtml new file mode 100644 index 0000000..b714974 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/transfer/index_backup.xhtml @@ -0,0 +1,208 @@ + + #{i18n['project.short.name']} - #{permission['admin.transfer']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.transfer']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.financial.transfer']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + +

    + + + + + + + +

    + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/admin/vehicles/main.xhtml b/ace-web/src/main/webapp/app/admin/vehicles/main.xhtml new file mode 100644 index 0000000..9557f20 --- /dev/null +++ b/ace-web/src/main/webapp/app/admin/vehicles/main.xhtml @@ -0,0 +1,278 @@ + + + + + + #{i18n['project.short.name']} - #{permission['system.employee']} + + +
  • #{i18n['system.title']}
  • +
  • /
  • +
  • #{i18n['system.users']}
  • +
  • /
  • +
  • #{permission['system.employee']}
  • +
    + + +
    + + +
    +
    + + + +

    + + + +

    +

    Alta vehículo

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GPS + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + + + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/catalog/loanType/add.xhtml b/ace-web/src/main/webapp/app/catalog/loanType/add.xhtml new file mode 100644 index 0000000..0e818d2 --- /dev/null +++ b/ace-web/src/main/webapp/app/catalog/loanType/add.xhtml @@ -0,0 +1,195 @@ + + + + + + #{i18n['project.short.name']} - #{permission['catalog.typeLoan.add']} + + +
  • #{i18n['catalog.title']}
  • +
  • /
  • +
  • #{permission['catalog.typeLoan']}
  • +
  • /
  • +
  • #{permission['catalog.typeLoan.add']}
  • +
    + + +
    +
    +
    + +
    +
    + + + + +

    #{permission['catalog.typeLoan.add']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Convenio

    + + + Convenio + + + + +

    Días de cobro

    + + + #{i18n['catalog.loanTypes.dialog.monday.title']} + + + + + #{i18n['catalog.loanTypes.dialog.tuesday.title']} + + + + + #{i18n['catalog.loanTypes.dialog.wednesday.title']} + + + + + #{i18n['catalog.loanTypes.dialog.thursday.title']} + + + + + #{i18n['catalog.loanTypes.dialog.friday.title']} + + + + + #{i18n['catalog.loanTypes.dialog.saturday.title']} + + + + + #{i18n['catalog.loanTypes.dialog.sunday.title']} + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + + + + + + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/catalog/loanType/index.xhtml b/ace-web/src/main/webapp/app/catalog/loanType/index.xhtml new file mode 100644 index 0000000..f6a2113 --- /dev/null +++ b/ace-web/src/main/webapp/app/catalog/loanType/index.xhtml @@ -0,0 +1,116 @@ + + #{i18n['project.short.name']} - #{permission['catalog.typeLoan']} + + + + +
  • #{i18n['catalog.title']}
  • +
  • /
  • +
  • #{permission['catalog.typeLoan']}
  • +
    + + +
    +
    +
    +

    #{i18n['catalog.typeLoan']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/catalog/role/index.xhtml b/ace-web/src/main/webapp/app/catalog/role/index.xhtml new file mode 100644 index 0000000..7ad9b95 --- /dev/null +++ b/ace-web/src/main/webapp/app/catalog/role/index.xhtml @@ -0,0 +1,90 @@ + + #{i18n['project.short.name']} - #{permission['catalog.role']} + + + + +
  • #{i18n['catalog.title']}
  • +
  • /
  • +
  • #{permission['catalog.role']}
  • +
    + + +
    +
    +
    +

    #{i18n['catalog.roles']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +

    + + + + + + +

    +
    + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/catalog/route/index.xhtml b/ace-web/src/main/webapp/app/catalog/route/index.xhtml new file mode 100644 index 0000000..7f69ce5 --- /dev/null +++ b/ace-web/src/main/webapp/app/catalog/route/index.xhtml @@ -0,0 +1,90 @@ + + #{i18n['project.short.name']} - #{permission['catalog.route']} + + + + +
  • #{i18n['catalog.title']}
  • +
  • /
  • +
  • #{permission['catalog.route']}
  • +
    + + +
    +
    +
    +

    #{i18n['catalog.route']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +

    + + + + + + +

    +
    + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/generalBox/expenseCompanyIn/index.xhtml b/ace-web/src/main/webapp/app/generalBox/expenseCompanyIn/index.xhtml new file mode 100644 index 0000000..8bc0479 --- /dev/null +++ b/ace-web/src/main/webapp/app/generalBox/expenseCompanyIn/index.xhtml @@ -0,0 +1,182 @@ + + #{i18n['project.short.name']} - #{permission['admin.expenseCompanyIn']} + + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.expenseCompanyIn']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.general.box.expenseCompanyIn']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +

    + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + + + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/generalBox/expenseCompanyOut/index.xhtml b/ace-web/src/main/webapp/app/generalBox/expenseCompanyOut/index.xhtml new file mode 100644 index 0000000..b1defe2 --- /dev/null +++ b/ace-web/src/main/webapp/app/generalBox/expenseCompanyOut/index.xhtml @@ -0,0 +1,189 @@ + + #{i18n['project.short.name']} - #{permission['admin.expenseCompanyOut']} + + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.expenseCompanyOut']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.general.box.expenseCompanyOut']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +

    + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/generalBox/stableGeneralBox/history.xhtml b/ace-web/src/main/webapp/app/generalBox/stableGeneralBox/history.xhtml new file mode 100644 index 0000000..a1aa101 --- /dev/null +++ b/ace-web/src/main/webapp/app/generalBox/stableGeneralBox/history.xhtml @@ -0,0 +1,188 @@ + + #{i18n['project.short.name']} - #{permission['admin.stableGeneralBox']} + + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.stableGeneralBox']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.general.box.stable.history']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/generalBox/stableGeneralBox/index.xhtml b/ace-web/src/main/webapp/app/generalBox/stableGeneralBox/index.xhtml new file mode 100644 index 0000000..6d3c4a0 --- /dev/null +++ b/ace-web/src/main/webapp/app/generalBox/stableGeneralBox/index.xhtml @@ -0,0 +1,142 @@ + + + + + + #{i18n['project.short.name']} - #{permission['admin.stableGeneralBox.add']} + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.stableGeneralBox.add']}
  • +
    + + +
    +
    +
    + +
    +
    + +

    #{permission['admin.stableGeneralBox.add']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/payroll/advance/index.xhtml b/ace-web/src/main/webapp/app/payroll/advance/index.xhtml new file mode 100644 index 0000000..c08900b --- /dev/null +++ b/ace-web/src/main/webapp/app/payroll/advance/index.xhtml @@ -0,0 +1,184 @@ + + #{i18n['project.short.name']} - #{permission['admin.advance']} + + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.advance']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.payroll.advance']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    +
    +
    + + + +

    + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/payroll/bonus/index.xhtml b/ace-web/src/main/webapp/app/payroll/bonus/index.xhtml new file mode 100644 index 0000000..b74713d --- /dev/null +++ b/ace-web/src/main/webapp/app/payroll/bonus/index.xhtml @@ -0,0 +1,168 @@ + + #{i18n['project.short.name']} - #{permission['admin.bonus']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.bonus']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.payroll.bonus']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +

    + + + + + + +

    + + + + + + +

    + + + + + + +

    + + + + + + +

    + + Administrativo + + + +

    +

    Cuando un bono no es administrativo, los valores que pones en bono de mora y colocación se toman como porcentaje, de lo contrario como un monto.

    +
    + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/payroll/createPayroll/index.xhtml b/ace-web/src/main/webapp/app/payroll/createPayroll/index.xhtml new file mode 100644 index 0000000..2dc0b4d --- /dev/null +++ b/ace-web/src/main/webapp/app/payroll/createPayroll/index.xhtml @@ -0,0 +1,432 @@ + + + + + + #{i18n['project.short.name']} - #{i18n['admin.payroll.create']} + + +
  • #{i18n['admin.payroll']}
  • +
  • /
  • +
  • #{i18n['admin.payroll.create']}
  • +
    + + +
    +
    + +
    +
    + +

    #{i18n['admin.payroll.create']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Resumen de nómina - percepciones

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Resumen nómina - deducciones

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Registro

    + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +

    Meta

    + + + + + + + + +

    Bono

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Detalles

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/payroll/goal/index.xhtml b/ace-web/src/main/webapp/app/payroll/goal/index.xhtml new file mode 100644 index 0000000..6569d28 --- /dev/null +++ b/ace-web/src/main/webapp/app/payroll/goal/index.xhtml @@ -0,0 +1,164 @@ + + #{i18n['project.short.name']} - #{permission['admin.goal']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.goal']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.payroll.goals']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +

    + + + + + + +

    + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/payroll/history.xhtml b/ace-web/src/main/webapp/app/payroll/history.xhtml new file mode 100644 index 0000000..1634dbe --- /dev/null +++ b/ace-web/src/main/webapp/app/payroll/history.xhtml @@ -0,0 +1,232 @@ + + #{i18n['project.short.name']} - #{i18n['admin.payroll.history']} + + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.payroll.history']}
  • +
    + + +
    +
    +
    +

    #{i18n['admin.payroll.history']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/payroll/loanEmployee/index.xhtml b/ace-web/src/main/webapp/app/payroll/loanEmployee/index.xhtml new file mode 100644 index 0000000..c6136de --- /dev/null +++ b/ace-web/src/main/webapp/app/payroll/loanEmployee/index.xhtml @@ -0,0 +1,262 @@ + + Préstamos a empleados + + + + + +
  • #{grant['admin.name']}
  • +
  • /
  • +
  • Préstamos empleados
  • +
    + + +
    +
    +
    +

    Préstamos de empleados

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + Total #{fn:length(loanEmployeeListBean.loanEmployeeView)} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Abonos + + + + Fecha + Monto + Número + + + + + + + + + + + + + #{detailDetail.paymentAmount} + #{detailDetail.referenceNumber} + + + + + + + + + + + + + + + + + + + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + + +

    +

    + + + + + + +

    + + + + + + +
    + +
    +
    +
    + + + + +

    + + + + + + +
    + +
    +
    +
    +
    +
    +
    +
    + +
    diff --git a/ace-web/src/main/webapp/app/stats/advances/index.xhtml b/ace-web/src/main/webapp/app/stats/advances/index.xhtml new file mode 100644 index 0000000..70ed097 --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/advances/index.xhtml @@ -0,0 +1,109 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.stats.advances']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.advances']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/closingDay/index.xhtml b/ace-web/src/main/webapp/app/stats/closingDay/index.xhtml new file mode 100644 index 0000000..655b239 --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/closingDay/index.xhtml @@ -0,0 +1,114 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.stats.closingday']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.closingday']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/deposits/index.xhtml b/ace-web/src/main/webapp/app/stats/deposits/index.xhtml new file mode 100644 index 0000000..18c5fc8 --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/deposits/index.xhtml @@ -0,0 +1,138 @@ + + + #{i18n['project.short.name']} + + + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.stats.deposits']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.deposits']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/employeeSaving/index.xhtml b/ace-web/src/main/webapp/app/stats/employeeSaving/index.xhtml new file mode 100644 index 0000000..1a19507 --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/employeeSaving/index.xhtml @@ -0,0 +1,184 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.stats.employeesaving']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.employeesaving']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ahorros + + + + Fecha + Monto + Tipo + + + + + + + + + + + + + #{employeeSaving.employeeSaving} + #{employeeSaving.typeText} + + + + + + + + + + + + + + +

    + + + + + + +

    +

    + + + + + + + +

    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/fees/index.xhtml b/ace-web/src/main/webapp/app/stats/fees/index.xhtml new file mode 100644 index 0000000..c7af0aa --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/fees/index.xhtml @@ -0,0 +1,116 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.fees']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.fees']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/feesByRoute/index.xhtml b/ace-web/src/main/webapp/app/stats/feesByRoute/index.xhtml new file mode 100644 index 0000000..c9e9dae --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/feesByRoute/index.xhtml @@ -0,0 +1,111 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{permission['admin.fees']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.fees']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/gasoline/index.xhtml b/ace-web/src/main/webapp/app/stats/gasoline/index.xhtml new file mode 100644 index 0000000..ff7be2f --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/gasoline/index.xhtml @@ -0,0 +1,119 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.stats.gasoline']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.gasoline']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/openingFee/index.xhtml b/ace-web/src/main/webapp/app/stats/openingFee/index.xhtml new file mode 100644 index 0000000..63c4bb1 --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/openingFee/index.xhtml @@ -0,0 +1,113 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.stats.openingfee']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.openingfee']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/payment/index.xhtml b/ace-web/src/main/webapp/app/stats/payment/index.xhtml new file mode 100644 index 0000000..aca0658 --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/payment/index.xhtml @@ -0,0 +1,113 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.stats.payment']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.payment']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/paymentRenovation/index.xhtml b/ace-web/src/main/webapp/app/stats/paymentRenovation/index.xhtml new file mode 100644 index 0000000..b9669f1 --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/paymentRenovation/index.xhtml @@ -0,0 +1,112 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.stats.paymentrenovation']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.paymentrenovation']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/paymentRoute/index.xhtml b/ace-web/src/main/webapp/app/stats/paymentRoute/index.xhtml new file mode 100644 index 0000000..5da2410 --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/paymentRoute/index.xhtml @@ -0,0 +1,114 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.stats.paymentroute']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.paymentroute']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/payroll/index.xhtml b/ace-web/src/main/webapp/app/stats/payroll/index.xhtml new file mode 100644 index 0000000..42de611 --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/payroll/index.xhtml @@ -0,0 +1,110 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.stats.payroll']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.payroll']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/summary/index.xhtml b/ace-web/src/main/webapp/app/stats/summary/index.xhtml new file mode 100644 index 0000000..e354976 --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/summary/index.xhtml @@ -0,0 +1,145 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.stats.summary']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.summary']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/vehicles/index.xhtml b/ace-web/src/main/webapp/app/stats/vehicles/index.xhtml new file mode 100644 index 0000000..76433ad --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/vehicles/index.xhtml @@ -0,0 +1,93 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.stats.vehicle']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.vehicle']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/stats/zeroPayments/index.xhtml b/ace-web/src/main/webapp/app/stats/zeroPayments/index.xhtml new file mode 100644 index 0000000..c670c22 --- /dev/null +++ b/ace-web/src/main/webapp/app/stats/zeroPayments/index.xhtml @@ -0,0 +1,112 @@ + + + #{i18n['project.short.name']} + + + + + +
  • #{i18n['admin.title']}
  • +
  • /
  • +
  • #{i18n['admin.stats.zeropayments']}
  • +
    + +
    +
    +
    +

    #{i18n['admin.stats.zeropayments']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/system/bitacora/index.xhtml b/ace-web/src/main/webapp/app/system/bitacora/index.xhtml new file mode 100644 index 0000000..63a242c --- /dev/null +++ b/ace-web/src/main/webapp/app/system/bitacora/index.xhtml @@ -0,0 +1,104 @@ + + #{i18n['project.short.name']} - Bitácora} + + + + + +
  • #{i18n['system.title']}
  • +
  • /
  • +
  • Bitácora
  • +
    + + +
    +
    +
    +

    #{i18n['system.bitacora']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/system/employee/employeeList.xhtml b/ace-web/src/main/webapp/app/system/employee/employeeList.xhtml new file mode 100644 index 0000000..8d66337 --- /dev/null +++ b/ace-web/src/main/webapp/app/system/employee/employeeList.xhtml @@ -0,0 +1,95 @@ + + + + + + #{i18n['project.short.name']} - #{permission['system.employee']} + + +
  • #{i18n['system.title']}
  • +
  • /
  • +
  • #{i18n['system.users']}
  • +
  • /
  • +
  • #{permission['system.employee']}
  • +
    + + +
    + + +
    +
    +

    + + + +

    + + + + + + + + + + + + + +
    + + + + +
    + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    +
    +
    + + + + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/system/employee/main.xhtml b/ace-web/src/main/webapp/app/system/employee/main.xhtml new file mode 100644 index 0000000..cf88d1d --- /dev/null +++ b/ace-web/src/main/webapp/app/system/employee/main.xhtml @@ -0,0 +1,621 @@ + + + + + + #{i18n['project.short.name']} - #{permission['system.employee']} + + +
  • #{i18n['system.title']}
  • +
  • /
  • +
  • #{i18n['system.users']}
  • +
  • /
  • +
  • #{permission['system.employee']}
  • +
    + + +
    + + +
    +
    + + + +

    + + + +

    +

    #{i18n['add.hr']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    +
    + + + +

    + + + +

    +

    + #{i18n['employee.disable']} + + + +

    + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    +
    + + + +

    + + + +

    +

    + #{i18n['employee.eneble']} + + + +

    + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    +
    + + + +

    + + + +

    +

    #{i18n['employee.delete']} + + + +

    + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    +
    + + + +

    + + + +

    +

    + #{i18n['hr.update.btn']} + + + +

    +
    + + + +
    + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/system/log/main.xhtml b/ace-web/src/main/webapp/app/system/log/main.xhtml new file mode 100644 index 0000000..1b60134 --- /dev/null +++ b/ace-web/src/main/webapp/app/system/log/main.xhtml @@ -0,0 +1,25 @@ + + #{i18n.project} - #{grant['system.submenu.log.name']} + + +
  • #{grant['system.menu.name']}
  • +
  • /
  • +
  • #{grant['system.submenu.log.name']}
  • +
    + + +
    +
    +
    +

    DASHBOARD

    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/system/office/index.xhtml b/ace-web/src/main/webapp/app/system/office/index.xhtml new file mode 100644 index 0000000..d871bef --- /dev/null +++ b/ace-web/src/main/webapp/app/system/office/index.xhtml @@ -0,0 +1,104 @@ + + #{i18n['project.short.name']} - #{permission['system.office']} + + + + +
  • #{i18n['system.title']}
  • +
  • /
  • +
  • #{permission['system.office']}
  • +
    + + +
    +
    +
    +

    #{i18n['system.office']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +

    + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/system/user/access/main.xhtml b/ace-web/src/main/webapp/app/system/user/access/main.xhtml new file mode 100644 index 0000000..d6975a6 --- /dev/null +++ b/ace-web/src/main/webapp/app/system/user/access/main.xhtml @@ -0,0 +1,172 @@ + + + #{i18n['project.short.name']} - #{i18n['system.users']} + + +
  • #{i18n['system.title']}
  • +
  • /
  • +
  • #{i18n['system.users']}
  • +
  • /
  • +
  • #{permission['system.user.access']}
  • +
    + + +
    +
    +
    + + +

    + + + +

    +

    #{i18n['access.updte']}

    + +
    + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + #{i18n['dual.list.permissions.available']} + + + + + #{i18n['dual.list.permissions.taken']} + + + + + + + #{i18n.screen}: + + + + + + #{i18n.permission}: + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/system/user/add/main.xhtml b/ace-web/src/main/webapp/app/system/user/add/main.xhtml new file mode 100644 index 0000000..9a27e2b --- /dev/null +++ b/ace-web/src/main/webapp/app/system/user/add/main.xhtml @@ -0,0 +1,275 @@ + + + + + + #{i18n['project.short.name']} - #{i18n['system.users']} + + +
  • #{i18n['system.title']}
  • +
  • /
  • +
  • #{i18n['system.users']}
  • +
  • /
  • +
  • #{permission['system.user.create']}
  • +
    + + + +
    + + +
    +
    + + +

    + + + +

    +

    #{i18n['user.create']}

    + + + + + + + + + + + + + + + + + + + + + + + + Certificador + + + + + Gerencia + + + + + +
    + + + + + + + + + + #{userCreateBean.user.userName eq null or userCreateBean.user.userName.trim() eq "" ? 'thumbs_up_down' : (userCreateBean.availableUserName ? 'thumb_up': 'thumb_down')} + + +
    + +
    + + + + + + + + + + + + +
    + + + + + + + #{i18n['dual.list.permissions.available']} + + + + + #{i18n['dual.list.permissions.taken']} + + + + + + + #{i18n.screen}: + + + + + + #{i18n.permission}: + + + + + + + + + + + + + + + #{i18n['dual.list.routes.available']} + + + + + #{i18n['dual.list.routes.taken']} + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + +
    +
    + +
    diff --git a/ace-web/src/main/webapp/app/system/user/setting/main.xhtml b/ace-web/src/main/webapp/app/system/user/setting/main.xhtml new file mode 100644 index 0000000..d82fadd --- /dev/null +++ b/ace-web/src/main/webapp/app/system/user/setting/main.xhtml @@ -0,0 +1,450 @@ + + + #{i18n['project.short.name']} - #{i18n['system.users']} + + +
  • #{i18n['system.title']}
  • +
  • /
  • +
  • #{i18n['system.users']}
  • +
  • /
  • +
  • #{permission['system.user.admin']}
  • +
    + + +
    + + +
    +
    + + + + +

    + + + +

    +

    + #{i18n['user.update']} +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Certificador + + + + + Gerencia + + + + + + + + + #{i18n['dual.list.permissions.available']} + + + + + #{i18n['dual.list.permissions.taken']} + + + + + + + #{i18n.screen}: + + + + + + #{i18n.permission}: + + + + + + + + + + + + + + + #{i18n['dual.list.routes.available']} + + + + + #{i18n['dual.list.routes.taken']} + + + + + + + + + + + + + + +
    +
    +
    + + +
    +
    + + + + +

    + + + +

    +

    + #{i18n['other.actions']} + + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + #{userUpdateBean.userName eq null or userUpdateBean.userName.trim() eq "" ? 'thumbs_up_down' : (userUpdateBean.availableUserName ? 'thumb_up': 'thumb_down')} + + +
    + +
    +
    + + + + + + + + + +
    +
    +
    + + + + + + + + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/system/user/setting/main_1.xhtml b/ace-web/src/main/webapp/app/system/user/setting/main_1.xhtml new file mode 100644 index 0000000..d23c57c --- /dev/null +++ b/ace-web/src/main/webapp/app/system/user/setting/main_1.xhtml @@ -0,0 +1,663 @@ + + + #{i18n['project.short.name']} - #{i18n['system.users']} + + +
  • #{i18n['system.title']}
  • +
  • /
  • +
  • #{i18n['system.users']}
  • +
  • /
  • +
  • #{permission['system.user.admin']}
  • +
    + + +
    + + +
    +
    + + + + +

    + + + +

    +

    + #{i18n['user.disable']} + + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    +
    + + + + +

    + + + +

    +

    + #{i18n['user.eneble']} + + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    +
    + + + + +

    + + + +

    +

    + #{i18n['user.delete']} + + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    +
    + + + + +

    + + + +

    +

    + #{i18n['user.update']} + + + +

    + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + #{userCreateBean.user.userName eq null or userCreateBean.user.userName.trim() eq "" ? 'thumbs_up_down' : (userCreateBean.availableUserName ? 'thumb_up': 'thumb_down')} + + +
    + +
    +
    + + + + + + + + + +
    +
    +
    + + + + + + + + + + +
    +
    + + + + +

    + + + +

    +

    + #{i18n['user.update.routes']} + + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Certificador + + + + + + + + + + + + + + + + + + + #{i18n['dual.list.routes.available']} + + + + + #{i18n['dual.list.routes.taken']} + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + + + + +
    +
    + + + + +

    + + + +

    +

    + #{i18n['user.update.pwd.btn']} + + + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + +
    +
    + + +

    + + + +

    +

    #{i18n['photo.add']}

    + + +
    +
    +
    + + + + + + + + +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/app/topbar/privacy.xhtml b/ace-web/src/main/webapp/app/topbar/privacy.xhtml new file mode 100644 index 0000000..4641532 --- /dev/null +++ b/ace-web/src/main/webapp/app/topbar/privacy.xhtml @@ -0,0 +1,87 @@ + + #{i18n['project.short.name']} - #{i18n['user.update.pwd']} + + +
  • #{i18n['user.update.pwd']}
  • +
    + + +
    +
    +
    + + + + +

    + #{i18n['user.update.pwd']} +

    + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + +
    +
    + +
    diff --git a/ace-web/src/main/webapp/customerWithoutLoanDetail.xhtml b/ace-web/src/main/webapp/customerWithoutLoanDetail.xhtml new file mode 100644 index 0000000..1d34e1d --- /dev/null +++ b/ace-web/src/main/webapp/customerWithoutLoanDetail.xhtml @@ -0,0 +1,311 @@ + + + + + + #{i18n['project.short.name']} - #{permission['admin.customer']} + + +
  • #{i18n['admin.customers.detail.title']}
  • +
    + + +
    +
    + +
    +
    + + + + +

    #{i18n['admin.customers.detail.title']}

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + + +

    #{i18n['admin.customers.company.title']}

    +

    + + + + + + +



    + + + + +



    + + + + + + + + + + + +
    +
    +
    +
    +
    + + + +

    Información adicional

    +

    + + + + + +



    + + + + + +
    +
    +
    +
    + +
    + +
    +
    + +

    #{i18n['admin.customers.loan.title']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    + + + + Detalle de pagos + + + + Fecha + Pago + Tipo + No. Referencia + Comentarios + + + + + + + + + + + + + + + + + + #{detail.loanDetailsType.value} + #{detail.referenceNumber} + #{detail.comments} + + + + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/dashboard.xhtml b/ace-web/src/main/webapp/dashboard.xhtml new file mode 100644 index 0000000..6d0e0b6 --- /dev/null +++ b/ace-web/src/main/webapp/dashboard.xhtml @@ -0,0 +1,1109 @@ + + + + + +
  • #{i18n['dashboard.title']}
  • +
    + + +
    +
    + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Detalle de avance del día por asesor

    + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + +

    Clientes sin renovar

    + + + + + +
    + + + + +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    + +

    Préstamos jurídico

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +

    Historial de préstamos por cliente

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Historial de préstamos por Aval

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Corte del día

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +

    Abonos en ceros del día

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +

    Préstamos terminados del día

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Información faltante del día

    + + + + + + + + + + + + + + + + + + + + + + + + + +

    Resumen semanal de colocación y faltante general

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + +
    + + + + +

    + + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + +

    + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + +

    + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + +

    + + + + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + +

    +
    + +
    +
    +
    + + + + +

    + + + + + + +

    +
    + +
    +
    +
    +
    +
    +
    + +
    diff --git a/ace-web/src/main/webapp/loanDetail.xhtml b/ace-web/src/main/webapp/loanDetail.xhtml new file mode 100644 index 0000000..95c6450 --- /dev/null +++ b/ace-web/src/main/webapp/loanDetail.xhtml @@ -0,0 +1,530 @@ + + + + + + #{i18n['project.short.name']} - #{permission['admin.loan']} + + +
  • #{i18n['admin.loan.detail.title']}
  • +
    + + + + +
    +
    + +
    +
    + + + +

    #{i18n['admin.customers.detail.title']}

    +

    + + + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    +
    + + + +

    #{i18n['admin.customers.company.title']}

    +

    + + + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    + +
    + +
    +
    + +

    #{i18n['admin.customers.loan.title']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    + + + + Detalle de pagos + + + + Fecha + Pago + Saldo insoluto + Tipo + No. Referencia + Comentarios + + + + + + + + + + + + + + + + + + + + + + + #{detail.loanDetailsType.value} + #{detail.referenceNumber} + #{detail.comments} + + + + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + +

    #{i18n['admin.endorsements.detail.title']}

    +

    + + + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    +
    + + + +

    #{i18n['admin.endorsements.company.title']}

    +

    + + + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    + +
    + +
    +
    + +

    #{i18n['admin.endorsements.loan.title']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    + + + +

    Préstamo

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/loanDetailEndorsement.xhtml b/ace-web/src/main/webapp/loanDetailEndorsement.xhtml new file mode 100644 index 0000000..c29797f --- /dev/null +++ b/ace-web/src/main/webapp/loanDetailEndorsement.xhtml @@ -0,0 +1,524 @@ + + + + + + #{i18n['project.short.name']} - #{permission['admin.loan']} + + +
  • #{i18n['admin.loan.detail.title']}
  • +
    + + + + +
    +
    + +
    +
    + + + +

    #{i18n['admin.customers.detail.title']}

    +

    + + + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    +
    + + + +

    #{i18n['admin.customers.company.title']}

    +

    + + + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    + +
    + +
    +
    + +

    #{i18n['admin.customers.loan.title']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    + +
    +
    + + + + Detalle de pagos + + + + Fecha + Pago + Tipo + No. Referencia + Comentarios + + + + + + + + + + + + + + + + + + #{detail.loanDetailsType.value} + #{detail.referenceNumber} + #{detail.comments} + + + + + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + + + +

    #{i18n['admin.endorsements.detail.title']}

    +

    + + + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    +
    + + + +

    #{i18n['admin.endorsements.company.title']}

    +

    + + + + + + +



    + + + + +



    + + + + + +
    +
    +
    +
    + +
    + +
    +
    + +

    #{i18n['admin.endorsements.loan.title']}

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    + + + +

    Préstamo

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    +
    + + +
    +
    +
    + +
    + +
    \ No newline at end of file diff --git a/ace-web/src/main/webapp/login.xhtml b/ace-web/src/main/webapp/login.xhtml new file mode 100644 index 0000000..45e0042 --- /dev/null +++ b/ace-web/src/main/webapp/login.xhtml @@ -0,0 +1,85 @@ + + + + + + + + + + + #{i18n['project.short.name']} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/js/scriptGeneric/bitacora.js b/ace-web/src/main/webapp/resources/js/scriptGeneric/bitacora.js new file mode 100644 index 0000000..1473bb9 --- /dev/null +++ b/ace-web/src/main/webapp/resources/js/scriptGeneric/bitacora.js @@ -0,0 +1,7 @@ +function deleteEventBitacora(xhr, status, args) { + if (undefined === args.validationFailed || false === args.validationFailed) { + PF('deleteEventBitacora').hide(); + } else { + PF('deleteEventBitacora').show(); + } +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/js/scriptGeneric/dialogGeneric.js b/ace-web/src/main/webapp/resources/js/scriptGeneric/dialogGeneric.js new file mode 100644 index 0000000..5bd74b9 --- /dev/null +++ b/ace-web/src/main/webapp/resources/js/scriptGeneric/dialogGeneric.js @@ -0,0 +1,96 @@ +function validNewObjectGeneric(xhr, status, args) { + if (undefined === args.validationFailed || false === args.validationFailed) { + PF('dlg2').hide(); + } else { + PF('dlg2').show(); + } +} + +function validNewObjectGeneric2(xhr, status, args) { + if (undefined === args.validationFailed || false === args.validationFailed) { + PF('dlg3').hide(); + } else { + PF('dlg3').show(); + } +} + +function validNewObjectGeneric3(xhr, status, args) { + if (undefined === args.validationFailed || false === args.validationFailed) { + PF('dlg4').hide(); + } else { + PF('dlg4').show(); + } +} + +function validNewObjectGeneric4(xhr, status, args) { + if (undefined === args.validationFailed || false === args.validationFailed) { + PF('dlg5').hide(); + } else { + PF('dlg5').show(); + } +} + +function validNewObjectGeneric5(xhr, status, args) { + if (undefined === args.validationFailed || false === args.validationFailed) { + PF('dlg6').hide(); + } else { + PF('dlg6').show(); + } +} + +function validNewObjectGeneric6(xhr, status, args) { + if (undefined === args.validationFailed || false === args.validationFailed) { + PF('dlg7').hide(); + } else { + PF('dlg7').show(); + } +} + +function validNewObjectGeneric7(xhr, status, args) { + if (undefined === args.validationFailed || false === args.validationFailed) { + PF('dlg8').hide(); + } else { + PF('dlg8').show(); + } +} + +function validNewObjectGeneric8(xhr, status, args) { + if (undefined === args.validationFailed || false === args.validationFailed) { + PF('dlg9').hide(); + } else { + PF('dlg9').show(); + } +} + +function validNewObjectGeneric9(xhr, status, args) { + if (undefined === args.validationFailed || false === args.validationFailed) { + PF('dlg10').hide(); + } else { + PF('dlg10').show(); + } +} + +function validNewObjectGeneric10(xhr, status, args) { + if (undefined === args.validationFailed || false === args.validationFailed) { + PF('dlg11').hide(); + } else { + PF('dlg11').show(); + } +} + +function validNewObjectGeneric11(xhr, status, args) { + if (undefined === args.validationFailed || false === args.validationFailed) { + PF('dlg12').hide(); + } else { + PF('dlg12').show(); + } +} + +function deleteEventBitacora(xhr, status, args) { + if (undefined === args.validationFailed || false === args.validationFailed) { + PF('deleteEventBitacora').hide(); + } else { + PF('deleteEventBitacora').show(); + } +} +; diff --git a/ace-web/src/main/webapp/resources/primefaces-serenity-green/theme.css b/ace-web/src/main/webapp/resources/primefaces-serenity-green/theme.css new file mode 100644 index 0000000..04aec8b --- /dev/null +++ b/ace-web/src/main/webapp/resources/primefaces-serenity-green/theme.css @@ -0,0 +1,7653 @@ +@charset "UTF-8"; +/******************************/ +/* Common */ +/******************************/ +/* Predefined Colors */ +body .ui-widget, +body .ui-widget .ui-widget { + font-family: "Roboto", "Helvetica Neue", sans-serif; + text-decoration: none; +} +body .ui-widget-content { + background-color: #ffffff; + border: 1px solid #d8d8d8; + padding: 8px 14px; +} +body .ui-widget-content .ui-icon { + color: #757575; +} +body .ui-widget-header { + background-color: #29ABE1; + color: #ffffff; + border: 1px solid #29ABE1; + padding: 8px 14px; +} +body .ui-widget-header .ui-icon { + color: #ffffff; +} +body .ui-state-active, body .ui-state-highlight { + background-color: #29ABE1; + color: #ffffff; +} +body .ui-state-active .ui-icon, body .ui-state-highlight .ui-icon { + color: #ffffff; +} +body .ui-state-disabled { + opacity: 0.35; + filter: Alpha(Opacity=35); + background-image: none; +} +body .ui-corner-all { + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; +} +body .ui-corner-top { + -moz-border-radius-topleft: 0px; + -webkit-border-top-left-radius: 0px; + border-top-left-radius: 0px; + -moz-border-radius-topright: 0px; + -webkit-border-top-right-radius: 0px; + border-top-right-radius: 0px; +} +body .ui-corner-bottom { + -moz-border-radius-bottomleft: 0px; + -webkit-border-bottom-left-radius: 0px; + border-bottom-left-radius: 0px; + -moz-border-radius-bottomright: 0px; + -webkit-border-bottom-right-radius: 0px; + border-bottom-right-radius: 0px; +} +body .ui-corner-left { + -moz-border-radius-topleft: 0px; + -webkit-border-top-left-radius: 0px; + border-top-left-radius: 0px; + -moz-border-radius-bottomleft: 0px; + -webkit-border-bottom-left-radius: 0px; + border-bottom-left-radius: 0px; +} +body .ui-corner-right { + -moz-border-radius-topright: 0px; + -webkit-border-top-right-radius: 0px; + border-top-right-radius: 0px; + -moz-border-radius-bottomright: 0px; + -webkit-border-bottom-right-radius: 0px; + border-bottom-right-radius: 0px; +} +body .ui-widget-overlay { + background-color: #58575c; + opacity: 0.8; + filter: alpha(opacity=80); +} +body .ui-icon { + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 20px; + display: inline-block; + width: 20px; + height: 20px; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + text-indent: 0; + overflow: visible; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; +} +body .material-icons { + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; +} +body .fa { + font-family: "FontAwesome"; +} +body a { + color: #29ABE1; + text-decoration: none; +} + +body .ui-inputfield { + background: white no-repeat; + background-image: linear-gradient(to bottom, #29ABE1, #29ABE1), linear-gradient(to bottom, #bdbdbd, #bdbdbd); + background-size: 0 2px, 100% 1px; + background-position: 50% 100%, 50% 100%; + transition: background-size 0.3s cubic-bezier(0.64, 0.09, 0.08, 1); + border-width: 0; + padding: 2px 2px 2px 2px; + font-size: 14px; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; +} +body .ui-inputfield.ui-state-focus { + border-width: 0; + background-size: 100% 2px, 100% 1px; + outline: none; + padding-bottom: 2px; +} +body .ui-inputfield.ui-state-disabled { + border-bottom: 1px dotted; +} +body .ui-inputfield.ui-widget-content { + border-width: 1px; + background: transparent; + background-image: none; +} +body .ui-inputfield.ui-state-error { + border-color: #e62a10; +} +body .ui-inputfield:-webkit-autofill { + border-color: #bdbdbd; + border-style: solid; + border-width: 0px 0px 1px 0px; +} +body .ui-inputfield:-webkit-autofill.ui-state-focus { + padding-bottom: 0px; +} +body .md-inputfield { + display: block; + position: relative; +} +body .md-inputfield input:focus ~ label, +body .md-inputfield input.ui-state-filled ~ label, +body .md-inputfield textarea:focus ~ label, +body .md-inputfield textarea.ui-state-filled ~ label, +body .md-inputfield .md-inputwrapper-focus ~ label, +body .md-inputfield .md-inputwrapper-filled ~ label { + top: -20px; + font-size: 12px; + color: #29ABE1; +} +body .md-inputfield input:-webkit-autofill ~ label { + top: -20px; + font-size: 12px; + color: #29ABE1; +} +body .md-inputfield label { + color: #999; + font-weight: normal; + position: absolute; + pointer-events: none; + left: 5px; + top: 1px; + transition: 0.3s ease all; + -moz-transition: 0.3s ease all; + -webkit-transition: 0.3s ease all; +} +body .md-inputfield input.ui-state-error ~ label { + color: #e62a10; +} +body .ui-selectonelistbox { + background-color: #ffffff; + border: 0 none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; +} +body .ui-selectonelistbox.ui-inputfield { + padding: 0; +} +body .ui-selectonelistbox .ui-selectlistbox-list { + padding: 0; + border: 1px solid #d8d8d8; +} +body .ui-selectonelistbox .ui-selectlistbox-item { + overflow: hidden; + padding: 6px 10px; + margin: 0; + position: relative; + overflow: hidden; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-selectonelistbox .ui-selectlistbox-item.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-selectonelistbox .ui-selectlistbox-filter-container { + margin: 0; + padding: 6px 10px; + background-color: #29ABE1; + -moz-border-radius-topleft: 0px; + -webkit-border-top-left-radius: 0px; + border-top-left-radius: 0px; + -moz-border-radius-topright: 0px; + -webkit-border-top-right-radius: 0px; + border-top-right-radius: 0px; +} +body .ui-selectonelistbox .ui-selectlistbox-filter-container .ui-inputfield { + border-color: #d9d9d9; + color: #ffffff; + width: 100%; + padding-left: 2px; + padding-right: 20px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +body .ui-selectonelistbox .ui-selectlistbox-filter-container .ui-inputfield.ui-state-focus { + border-color: #ffffff; +} +body .ui-selectonelistbox .ui-selectlistbox-filter-container .ui-icon { + color: #ffffff; + top: 6px; + right: 12px; +} +body .ui-multiselectlistbox .ui-multiselectlistbox-header { + padding: 6px 10px; + position: relative; + bottom: -1px; +} +body .ui-multiselectlistbox .ui-multiselectlistbox-list { + padding: 0; + background-color: #ffffff; +} +body .ui-multiselectlistbox li.ui-multiselectlistbox-item { + padding: 6px 10px; + margin: 0; + position: relative; + overflow: hidden; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; +} +body .ui-multiselectlistbox li.ui-multiselectlistbox-item.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-button { + overflow: hidden; + background-color: #29ABE1; + color: #ffffff; + height: 30px; + padding: 0 14px; + border: 0 none; + -moz-box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.26), 0 1px 5px 0 rgba(0, 0, 0, 0.16); + -webkit-box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.26), 0 1px 5px 0 rgba(0, 0, 0, 0.16); + box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.26), 0 1px 5px 0 rgba(0, 0, 0, 0.16); + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +body .ui-button.ui-state-hover { + background-color: #2341BB; +} +body .ui-button.ui-state-focus { + outline: 0 none; + background-color: #A8E1F7; +} +body .ui-button .ui-button-text { + padding: 0; + line-height: 30px; + font-size: 14px; +} +body .ui-button .ui-icon { + color: #ffffff; +} +body .ui-button.ui-button-icon-only { + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + width: 30px; + height: 30px; +} +body .ui-button.ui-button-icon-only .ui-icon { + margin-top: -10px; + margin-left: -10px; +} +body .ui-button.ui-button-text-icon-left .ui-icon, body .ui-button.ui-button-text-icon-right .ui-icon { + margin-top: -10px; +} +body .ui-button.ui-button-text-icon-left { + padding-left: 36px; +} +body .ui-button.ui-button-text-icon-right { + padding-right: 36px; +} +body .ui-button.secondary-btn { + background-color: #29ABE1; + color: #ffffff; +} +body .ui-button.secondary-btn.ui-state-hover { + background-color: #2341BB; +} +body .ui-button.secondary-btn.ui-state-focus { + outline: 0 none; + background-color: #ddc061; +} +body .ui-button.secondary-btn .ui-icon { + color: #ffffff; +} +body .ui-button.blue-grey-btn { + background-color: #607D8B; +} +body .ui-button.blue-grey-btn.ui-state-hover { + background-color: #37474F; +} +body .ui-button.blue-grey-btn.ui-state-focus { + outline: 0 none; + background-color: #7b96a3; +} +body .ui-button.cyan-btn { + background-color: #00BCD4; +} +body .ui-button.cyan-btn.ui-state-hover { + background-color: #00838F; +} +body .ui-button.cyan-btn.ui-state-focus { + outline: 0 none; + background-color: #08e3ff; +} +body .ui-button.teal-btn { + background-color: #009688; +} +body .ui-button.teal-btn.ui-state-hover { + background-color: #00695C; +} +body .ui-button.teal-btn.ui-state-focus { + outline: 0 none; + background-color: #00c9b6; +} +body .ui-button.red-btn { + background-color: #F44336; +} +body .ui-button.red-btn.ui-state-hover { + background-color: #C62828; +} +body .ui-button.red-btn.ui-state-focus { + outline: 0 none; + background-color: #f77066; +} +body .ui-button.green-btn { + background-color: #29ABE1; +} +body .ui-button.green-btn.ui-state-hover { + background-color: #2341BB; +} +body .ui-button.green-btn.ui-state-focus { + outline: 0 none; + background-color: #A8E1F7; +} +body .ui-button.deep-orange-btn { + background-color: #FF5722; +} +body .ui-button.deep-orange-btn.ui-state-hover { + background-color: #D84315; +} +body .ui-button.deep-orange-btn.ui-state-focus { + outline: 0 none; + background-color: #ff7e55; +} +body .ui-button.purple-btn { + background-color: #673AB7; +} +body .ui-button.purple-btn.ui-state-hover { + background-color: #4527A0; +} +body .ui-button.purple-btn.ui-state-focus { + outline: 0 none; + background-color: #8259cb; +} +body .ui-button.pink-btn { + background-color: #E91E63; +} +body .ui-button.pink-btn.ui-state-hover { + background-color: #AD1457; +} +body .ui-button.pink-btn.ui-state-focus { + outline: 0 none; + background-color: #ee4c83; +} +body .ui-button.amber-btn { + background-color: #FFC107; + color: #212121; +} +body .ui-button.amber-btn.ui-state-hover { + background-color: #FF8F00; +} +body .ui-button.amber-btn.ui-state-focus { + outline: 0 none; + background-color: #ffce3a; +} +body .ui-button.orange-btn { + background-color: #FF9800; +} +body .ui-button.orange-btn.ui-state-hover { + background-color: #EF6C00; +} +body .ui-button.orange-btn.ui-state-focus { + outline: 0 none; + background-color: #ffad33; +} +body .ui-button.brown-btn { + background-color: #795548; +} +body .ui-button.brown-btn.ui-state-hover { + background-color: #4E342E; +} +body .ui-button.brown-btn.ui-state-focus { + outline: 0 none; + background-color: #996b5b; +} +body .ui-button.flat { + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; +} +body .ui-buttonset .ui-state-active { + background-color: #29ABE1; + color: #ffffff; +} +body .ui-splitbutton { + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; + -moz-box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.26), 0 1px 5px 0 rgba(0, 0, 0, 0.16); + -webkit-box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.26), 0 1px 5px 0 rgba(0, 0, 0, 0.16); + box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.26), 0 1px 5px 0 rgba(0, 0, 0, 0.16); +} +body .ui-splitbutton > .ui-button { + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; +} +body .ui-splitbutton > .ui-button.ui-state-active { + background-color: #A8E1F7; +} +body .ui-splitbutton .ui-splitbutton-menubutton { + height: 30px; + -moz-border-radius-topleft: 0; + -webkit-border-top-left-radius: 0; + border-top-left-radius: 0; + -moz-border-radius-bottomleft: 0; + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-topright: 3px; + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; +} +body .ui-selectbooleanbutton.ui-state-active { + background-color: #29ABE1; + color: #ffffff; +} +body .ui-selectbooleanbutton.ui-state-active .ui-icon { + color: #ffffff; +} +body .ui-chkbox { + display: inline-block; + vertical-align: middle; + width: 18px; + height: 18px; + cursor: default; + margin: 0 4px 0 0; +} +body .ui-chkbox .ui-chkbox-box { + border: 2px solid #757575; + width: 14px; + height: 14px; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +body .ui-chkbox .ui-chkbox-box .ui-chkbox-icon { + font-size: 18px; + margin-left: -2px; + margin-top: -2px; +} +body .ui-chkbox .ui-chkbox-box.ui-state-active { + border-color: #29ABE1; + background-color: #29ABE1; +} +body .ui-chkbox .ui-chkbox-box.ui-state-active .ui-chkbox-icon { + color: #ffffff; +} +body .ui-chkbox .ui-chkbox-box.ui-state-active.ui-state-focus .ui-chkbox-icon { + color: #ffffff; +} +body .ui-chkbox .ui-chkbox-box.ui-state-focus { + border-color: #29ABE1; + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -moz-transition: box-shadow 0.3s; + -o-transition: box-shadow 0.3s; + -webkit-transition: box-shadow 0.3s; + transition: box-shadow 0.3s; +} +body .ui-chkbox .ui-chkbox-box.ui-state-focus .ui-chkbox-icon { + color: #29ABE1; +} +body .ui-radiobutton { + position: relative; + margin: 0 4px 0 0; + display: inline-block; + vertical-align: middle; +} +body .ui-radiobutton .ui-radiobutton-box { + width: 14px -1px; + height: 14px -1px; + border: 2px solid #757575; + -moz-transition: box-shadow 0.3s; + -o-transition: box-shadow 0.3s; + -webkit-transition: box-shadow 0.3s; + transition: box-shadow 0.3s; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; +} +body .ui-radiobutton .ui-radiobutton-box.ui-state-focus { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); +} +body .ui-radiobutton .ui-radiobutton-box.ui-state-active { + border-color: #29ABE1; + background-color: transparent; +} +body .ui-radiobutton .ui-radiobutton-box .ui-radiobutton-icon { + top: 0; + left: 0; + width: 20px; + height: 20px; + display: block; + box-sizing: border-box; + position: absolute; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + transition: -webkit-transform ease 0.28s; + transition: transform ease 0.28s; + -webkit-transform: scale(0); + transform: scale(0); +} +body .ui-radiobutton .ui-radiobutton-box .ui-icon-bullet { + background-color: #29ABE1; + -webkit-transform: scale(0.5); + transform: scale(0.5); + margin-left: 0; +} +body .ui-selectmanycheckbox.ui-widget label, body .ui-selectoneradio.ui-widget label { + display: inline-block; + vertical-align: middle; + margin-top: 0; +} +body .ui-autocomplete-panel { + padding: 0; + border: 0 none; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-autocomplete-panel.ui-shadow { + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); +} +body .ui-autocomplete-panel .ui-autocomplete-list { + padding: 0; +} +body .ui-autocomplete-panel .ui-autocomplete-list .ui-autocomplete-item { + padding: 6px 10px; + margin: 0; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +body .ui-autocomplete-panel .ui-autocomplete-list .ui-autocomplete-item .ui-autocomplete-query { + font-weight: 700; +} +body .ui-autocomplete-panel .ui-autocomplete-list .ui-autocomplete-group { + padding: 6px 10px; +} +body .ui-autocomplete .ui-autocomplete-dropdown { + right: 0; + margin-right: 0; +} +body .ui-autocomplete .ui-autocomplete-dropdown.ui-button.ui-button-icon-only { + background-color: transparent; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + height: 20px; + width: 20px; + padding: 0; +} +body .ui-autocomplete .ui-autocomplete-dropdown.ui-button.ui-button-icon-only .ui-button-text { + display: none; +} +body .ui-autocomplete .ui-autocomplete-dropdown.ui-button.ui-button-icon-only .ui-icon { + color: #757575; +} +body .ui-autocomplete.ui-autocomplete-multiple .ui-autocomplete-multiple-container.ui-inputfield { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 2px 2px 1px 2px; +} +body .ui-autocomplete.ui-autocomplete-multiple .ui-autocomplete-multiple-container.ui-state-focus { + padding-bottom: 0; +} +body .ui-autocomplete.ui-autocomplete-multiple .ui-autocomplete-input-token { + float: none; + display: inline-block; + margin: 0 1px; + vertical-align: middle; +} +body .ui-autocomplete.ui-autocomplete-multiple .ui-autocomplete-input-token > input { + padding: 0; + font-size: 14px; + margin: 0; +} +body .ui-autocomplete.ui-autocomplete-multiple .ui-autocomplete-token { + display: inline-block; + float: none; + vertical-align: middle; +} +body .ui-autocomplete.ui-autocomplete-multiple .ui-autocomplete-token .ui-autocomplete-token-icon { + margin-top: -10px; +} +body .ui-selectonemenu { + border-width: 0; + background: white no-repeat; + background-image: linear-gradient(to bottom, #3F51B5, #3F51B5), linear-gradient(to bottom, #bdbdbd, #bdbdbd); + background-size: 0 2px, 100% 1px; + background-position: 50% 100%, 50% 100%; + transition: background-size 0.3s cubic-bezier(0.64, 0.09, 0.08, 1); + padding-bottom: 2px; + box-sizing: border-box; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-selectonemenu.ui-state-focus { + border-width: 0; + background-size: 100% 2px, 100% 1px; + outline: none; + padding-bottom: 2px; +} +body .ui-selectonemenu .ui-selectonemenu-trigger { + height: 20px; + width: 20px; + font-size: 20px; + margin-top: 0; + padding: 0; + top: 0; + margin-right: 0; +} +body .ui-selectonemenu .ui-selectonemenu-trigger .ui-icon { + height: 20px; + width: 20px; + margin-top: 0; + color: #757575; +} +body .ui-selectonemenu .ui-selectonemenu-label.ui-inputfield { + background: none; + font-family: "Roboto", "Helvetica Neue", sans-serif; +} +body .ui-selectonemenu-panel { + padding: 0; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-selectonemenu-panel .ui-selectonemenu-list { + padding: 0; +} +body .ui-selectonemenu-panel .ui-selectonemenu-item { + margin: 0; + padding: 6px 10px; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-selectonemenu-panel .ui-selectonemenu-item.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-selectonemenu-panel .ui-selectonemenu-item-group { + padding: 8px; +} +body .ui-selectonemenu-panel.ui-shadow { + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); +} +body .ui-selectonemenu-panel .ui-selectonemenu-filter-container .ui-icon { + top: 5px; + right: 8px; +} +body .ui-selectcheckboxmenu { + border-bottom: 1px solid #bdbdbd; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-selectcheckboxmenu .ui-selectcheckboxmenu-label-container { + display: block; +} +body .ui-selectcheckboxmenu .ui-selectcheckboxmenu-label-container .ui-selectcheckboxmenu-label { + padding-top: 2px; + padding-bottom: 1px; + padding-left: 2px; +} +body .ui-selectcheckboxmenu .ui-selectcheckboxmenu-trigger { + height: 20px; + width: 20px; + font-size: 20px; + padding: 0; +} +body .ui-selectcheckboxmenu .ui-selectcheckboxmenu-trigger .ui-icon { + height: 20px; + width: 20px; + margin-top: 0; + color: #757575; +} +body .ui-selectcheckboxmenu-panel { + padding: 0; + border: 0 none; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header { + padding: 6px 10px; + margin: 0; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-chkbox { + float: none; + margin: 0 8px 0 1px; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-chkbox .ui-chkbox-box { + border-color: #ffffff; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-chkbox .ui-chkbox-box .ui-chkbox-icon { + border-color: #ffffff; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-chkbox .ui-chkbox-box.ui-state-active .ui-chkbox-icon { + border-color: #ffffff; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-chkbox .ui-chkbox-box.ui-state-focus { + background-color: #8AD4F2; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-selectcheckboxmenu-filter-container { + width: 70%; + display: inline-block; + vertical-align: middle; + float: none; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-selectcheckboxmenu-filter-container .ui-icon { + top: -2px; + right: 0px; + color: #ffffff; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-selectcheckboxmenu-filter-container .ui-inputfield { + border-color: #d9d9d9; + padding-right: 30px; + width: 100%; + border-color: #ffffff; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-selectcheckboxmenu-filter-container .ui-inputfield:focus { + border-color: #ffffff; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-selectcheckboxmenu-close { + margin-right: -6px; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-selectcheckboxmenu-close span { + color: #ffffff; + -moz-transition: color 0.3s; + -o-transition: color 0.3s; + -webkit-transition: color 0.3s; + transition: color 0.3s; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-selectcheckboxmenu-close.ui-state-hover { + padding: 1px; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header .ui-selectcheckboxmenu-close.ui-state-hover span { + color: #29ABE1; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-items-wrapper { + padding: 0; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-items-wrapper .ui-selectcheckboxmenu-items { + padding: 0; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-item { + padding: 6px 10px; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-item label { + vertical-align: middle; + display: inline-block; +} +body .ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-item .ui-chkbox { + margin-left: 2px; +} +body .ui-fluid .ui-selectonemenu .ui-selectonemenu-trigger { + width: 20px; + padding: 0; +} +body #keypad-div { + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body #keypad-div .keypad-key { + border: 0 none; + background-color: #ffffff; + font-size: 14px; + padding: 4px; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +body #keypad-div .keypad-key.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body #keypad-div .keypad-shift, body #keypad-div .keypad-enter, body #keypad-div .keypad-spacebar, body #keypad-div .keypad-back, body #keypad-div .keypad-close, body #keypad-div .keypad-clear { + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + background-color: #29ABE1; + color: #ffffff; +} +body #keypad-div .keypad-shift.ui-state-hover, body #keypad-div .keypad-enter.ui-state-hover, body #keypad-div .keypad-spacebar.ui-state-hover, body #keypad-div .keypad-back.ui-state-hover, body #keypad-div .keypad-close.ui-state-hover, body #keypad-div .keypad-clear.ui-state-hover { + background-color: #2341BB; + color: #ffffff; +} +body #keypad-div.ui-shadow { + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); +} +body .ui-selectmanymenu { + padding: 0; + background-color: #ffffff; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; +} +body .ui-selectmanymenu .ui-selectlistbox-item { + padding: 6px 10px; + margin: 0; + position: relative; + overflow: hidden; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-selectmanymenu .ui-selectlistbox-item.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-selectmanymenu .ui-selectlistbox-item .ui-chkbox { + background-color: transparent; + margin: -2px 8px 0 0; +} +body .ui-selectmanymenu .ui-selectlistbox-item .ui-chkbox .ui-chkbox-box.ui-state-active { + border-color: #ffffff; + background-color: #29ABE1; +} +body .ui-selectmanymenu .ui-selectlistbox-filter-container { + margin: 0; + padding: 6px 10px; + background-color: #29ABE1; + -moz-border-radius-topleft: 0px; + -webkit-border-top-left-radius: 0px; + border-top-left-radius: 0px; + -moz-border-radius-topright: 0px; + -webkit-border-top-right-radius: 0px; + border-top-right-radius: 0px; +} +body .ui-selectmanymenu .ui-selectlistbox-filter-container .ui-inputfield { + border-color: #d9d9d9; + color: #ffffff; + width: 100%; + padding-left: 2px; + padding-right: 20px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +body .ui-selectmanymenu .ui-selectlistbox-filter-container .ui-inputfield.ui-state-focus { + border-color: #ffffff; +} +body .ui-selectmanymenu .ui-selectlistbox-filter-container .ui-icon { + color: #ffffff; + top: 6px; + right: 12px; +} +body .ui-selectmanymenu tr.ui-selectlistbox-item td { + padding: 6px; +} +body .ui-spinner .ui-spinner-button { + width: 18px; + height: 10px; + padding: 0; + margin-right: 0; + background-color: transparent; + color: #212121; + z-index: auto; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; +} +body .ui-spinner .ui-spinner-button .ui-icon-triangle-1-n { + color: #212121; +} +body .ui-spinner .ui-spinner-button .ui-icon-triangle-1-s { + color: #212121; +} +body .ui-spinner .ui-spinner-button .ui-icon { + top: 0px; + height: 12px; + color: #757575; +} +body .ui-spinner .ui-spinner-up .ui-icon { + top: 4px; +} +body .ui-spinner .ui-spinner-down .ui-icon { + top: 2px; +} +body .ui-spinner .ui-spinner-input { + padding-right: 30px; +} +body .ui-fluid .ui-spinner .ui-spinner-button { + width: 25px; + height: 10px; +} +body .ui-fluid .ui-spinner .ui-spinner-input { + padding-right: 30px; +} +body .ui-inputswitch { + height: 14px; + width: 34px !important; + overflow: visible; + background-color: #9e9e9e; + border-color: #9e9e9e; + padding: 0; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + border-radius: 8px; +} +body .ui-inputswitch .ui-inputswitch-handle { + top: -3px; + background-color: #ffffff; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; + width: 20px !important; + height: 20px !important; + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 3px 0px, rgba(0, 0, 0, 0.137255) 0px 1px 1px 0px, rgba(0, 0, 0, 0.117647) 0px 2px 1px -1px; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 3px 0px, rgba(0, 0, 0, 0.137255) 0px 1px 1px 0px, rgba(0, 0, 0, 0.117647) 0px 2px 1px -1px; + box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 3px 0px, rgba(0, 0, 0, 0.137255) 0px 1px 1px 0px, rgba(0, 0, 0, 0.117647) 0px 2px 1px -1px; +} +body .ui-inputswitch .ui-inputswitch-on { + visibility: hidden; +} +body .ui-inputswitch .ui-inputswitch-off span, body .ui-inputswitch .ui-inputswitch-on span { + visibility: hidden; +} +body .ui-inputswitch.ui-inputswitch-checked { + background-color: #8AD4F2; + border-color: #8AD4F2; +} +body .ui-inputswitch.ui-inputswitch-checked .ui-inputswitch-handle { + background-color: #29ABE1; + color: #ffffff; +} +body .ui-slider { + padding: 0; +} +body .ui-slider .ui-slider-handle { + background-color: #29ABE1; + color: #ffffff; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + width: 20px; + height: 20px; + transform: scale(0.7); + -moz-transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); + -o-transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); + -webkit-transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); + transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); +} +body .ui-slider .ui-slider-handle.ui-state-hover, body .ui-slider .ui-slider-handle.ui-state-focus { + transform: scale(1); +} +body .ui-slider .ui-slider-handle:focus { + outline: 0 none; +} +body .ui-slider.ui-slider-horizontal { + height: 2px; + border: 0 none; + background-color: #bdbdbd; +} +body .ui-slider.ui-slider-horizontal .ui-slider-handle { + top: -0.65em; +} +body .ui-slider.ui-slider-vertical { + width: 2px; + border: 0 none; + background-color: #bdbdbd; +} +body .ui-slider.ui-slider-vertical .ui-slider-handle { + left: -9px; +} +body .ui-slider .ui-slider-range { + padding: 0; + background-color: #29ABE1; + color: #ffffff; +} +body .ui-calendar .ui-datepicker-trigger { + top: 7px; + right: 28px; + background-color: transparent; + color: #212121; + height: 20px; + width: 20px; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-calendar .ui-datepicker-trigger .ui-icon { + color: #757575; +} +body .ui-datepicker { + padding: 0; + width: 275px; +} +body .ui-datepicker.ui-shadow { + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); +} +body .ui-datepicker .ui-datepicker-header { + padding: 8px 14px; + background: #2341BB; + border-color: #2341BB; + -moz-border-radius-topleft: 2px; + -webkit-border-top-left-radius: 2px; + border-top-left-radius: 2px; + -moz-border-radius-topright: 2px; + -webkit-border-top-right-radius: 2px; + border-top-right-radius: 2px; + -moz-border-radius-bottomleft: 0; + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomright: 0; + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; +} +body .ui-datepicker .ui-datepicker-header .ui-datepicker-next { + cursor: pointer; + top: 8px; + font-size: 20px; + right: 8px; + color: #ffffff; + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; +} +body .ui-datepicker .ui-datepicker-header .ui-datepicker-next:before { + content: ""; +} +body .ui-datepicker .ui-datepicker-header .ui-datepicker-next .ui-icon { + display: none; +} +body .ui-datepicker .ui-datepicker-header .ui-datepicker-next.ui-datepicker-next-hover { + right: 8px; +} +body .ui-datepicker .ui-datepicker-header .ui-datepicker-prev { + cursor: pointer; + top: 8px; + font-size: 20px; + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -o-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); + left: 8px; + color: #ffffff; +} +body .ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before { + content: ""; +} +body .ui-datepicker .ui-datepicker-header .ui-datepicker-prev .ui-icon { + display: none; +} +body .ui-datepicker .ui-datepicker-header .ui-datepicker-prev.ui-datepicker-prev-hover { + left: 8px; +} +body .ui-datepicker table { + table-layout: fixed; + border-spacing: 0; + border-collapse: collapse; +} +body .ui-datepicker thead tr { + color: #ffffff; + background: #29ABE1; +} +body .ui-datepicker tbody td { + padding: 2px; + box-sizing: border-box; +} +body .ui-datepicker tbody td a, body .ui-datepicker tbody td span { + padding: 0.2em; + margin: 0; + text-align: center; + color: #212121; + display: inline-block; + height: 28px; + width: 28px; + line-height: 28px; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; +} +body .ui-datepicker tbody td a.ui-state-hover, body .ui-datepicker tbody td span.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-datepicker tbody td a.ui-state-active, body .ui-datepicker tbody td span.ui-state-active { + color: #ffffff; + background-color: #29ABE1; + color: #ffffff; +} +body .ui-datepicker tbody td.ui-datepicker-today a, body .ui-datepicker tbody td.ui-datepicker-today span { + color: #212121; + background-color: #ffffff; + border: 1px solid #29ABE1; +} +body .ui-datepicker tbody td.ui-datepicker-today a.ui-state-active, body .ui-datepicker tbody td.ui-datepicker-today span.ui-state-active { + color: #ffffff; + background-color: #29ABE1; + color: #ffffff; +} +body .ui-datepicker.ui-datepicker-multi .ui-datepicker-header { + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-datepicker.ui-datepicker-multi .ui-datepicker-group table { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +body .ui-datepicker .ui-timepicker-div .ui_tpicker_time input { + border-color: #bdbdbd; + -moz-transition: border-color 0.3s; + -o-transition: border-color 0.3s; + -webkit-transition: border-color 0.3s; + transition: border-color 0.3s; + width: 100%; + position: relative; + top: 5px; + left: -5px; +} +body .ui-datepicker .ui-timepicker-div .ui_tpicker_time input.ui-state-focus { + border-width: 0 0 2px 0; + border-color: #29ABE1; + padding-bottom: 0px; +} +body .ui-datepicker .ui-timepicker-div dl { + margin: -16px 0 40px 0; +} +body .ui-datepicker .ui-timepicker-div dl dt { + padding: 6px 10px; +} +body .ui-datepicker .ui-timepicker-div dl dd { + margin-top: 42px; +} +body .ui-fluid .ui-calendar .ui-datepicker-trigger.ui-button { + top: -4px; + width: 24px; +} +body .ui-rating .ui-rating-cancel { + text-indent: 0; +} +body .ui-rating .ui-rating-cancel a { + color: #757575; + background: none; + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 20px; +} +body .ui-rating .ui-rating-cancel a:before { + content: "î—‰"; +} +body .ui-rating .ui-rating-star { + text-indent: 0; +} +body .ui-rating .ui-rating-star a { + font-size: 20px; + color: #757575; + background: none; + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 20px; +} +body .ui-rating .ui-rating-star a:before { + content: "î º"; +} +body .ui-rating .ui-rating-star.ui-rating-star-on a { + color: #29ABE1; + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 20px; +} +body .ui-rating .ui-rating-star.ui-rating-star-on a:before { + content: "î ¸"; +} +body .ui-password-panel.ui-shadow { + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); +} +body .ui-fileupload .ui-fileupload-buttonbar { + padding: 8px 14px; +} +body .ui-fileupload .ui-fileupload-buttonbar .ui-icon-arrowreturnthick-1-n:before { + content: "file_upload"; +} +body .ui-fileupload .ui-fileupload-buttonbar .ui-button { + background-color: #29ABE1; + color: #ffffff; + margin-right: 6px; +} +body .ui-fileupload .ui-fileupload-buttonbar .ui-button .ui-icon { + color: #ffffff; +} +body .ui-fileupload .ui-fileupload-buttonbar .ui-button.ui-state-hover { + background-color: #2341BB; +} +body .ui-fileupload .ui-fileupload-content .ui-messages-error .ui-icon { + color: #ffffff; +} +body .ui-editor.ui-widget-content { + padding: 0px; +} +body .ui-inputgroup { + height: 100%; +} +body .ui-inputgroup .ui-inputgroup-addon, +body .ui-inputgroup .ui-inputgroup-addon-checkbox { + padding: 2px 2px 1px 2px; + border-color: #bdbdbd; + background-color: transparent; + color: #757575; + min-width: 28px; + border-left: 0; + border-right: 0; + border-top: 0; +} +body .ui-inputgroup .ui-inputgroup-addon:first-child, +body .ui-inputgroup .ui-inputgroup-addon-checkbox:first-child { + -moz-border-radius-topleft: 0; + -webkit-border-top-left-radius: 0; + border-top-left-radius: 0; + -moz-border-radius-bottomleft: 0; + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; +} +body .ui-inputgroup .ui-inputgroup-addon:last-child, +body .ui-inputgroup .ui-inputgroup-addon-checkbox:last-child { + -moz-border-radius-topright: 0px; + -webkit-border-top-right-radius: 0px; + border-top-right-radius: 0px; + -moz-border-radius-bottomright: 0px; + -webkit-border-bottom-right-radius: 0px; + border-bottom-right-radius: 0px; +} +body .ui-inputgroup .ui-inputgroup-addon { + align-self: flex-end; +} +body .ui-inputgroup .ui-inputgroup-addon > i { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + align-self: flex-end; + font-size: 1.5em; +} +body .ui-inputgroup .ui-inputtext { + align-self: flex-end; +} +body .ui-inputgroup .md-inputfield { + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + width: 1%; + display: inherit; +} +body .ui-inputgroup .md-inputfield label { + top: 5px; +} +body .ui-inputgroup .ui-button .ui-button-text { + padding: 0; +} +body .ui-inputgroup .ui-inputgroup-addon-checkbox { + padding: 0; + position: relative; +} +body .ui-inputgroup .ui-inputgroup-addon-checkbox .ui-chkbox { + vertical-align: baseline; + position: absolute; + top: 50%; + left: 50%; + margin-top: -9px; + margin-left: -9px; +} +body .ui-fluid .ui-inputgroup .ui-button.ui-button-icon-only { + width: 1.643em; + height: 1.643em; + min-width: 0; + padding: 0; +} +body .ui-fluid .ui-inputgroup .ui-button.ui-button-icon-only .ui-button-icon-left { + margin-left: -0.45em; +} + +body .ui-paginator { + padding: 6px 10px; + background-color: #2341BB; +} +body .ui-paginator > a { + margin-top: -1px; + box-sizing: border-box; + color: #ffffff; +} +body .ui-paginator > a span { + display: none; +} +body .ui-paginator > a.ui-state-hover { + background-color: #8AD4F2; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +body .ui-paginator .ui-paginator-next { + padding: 0 6px; + vertical-align: middle; + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; +} +body .ui-paginator .ui-paginator-next:before { + content: "î‰"; +} +body .ui-paginator .ui-paginator-next:before { + position: relative; + left: -6px; +} +body .ui-paginator .ui-paginator-last { + padding: 0 6px; + vertical-align: middle; + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; +} +body .ui-paginator .ui-paginator-last:before { + content: "î—"; +} +body .ui-paginator .ui-paginator-last:before { + position: relative; + left: -6px; +} +body .ui-paginator .ui-paginator-prev { + padding: 0 6px; + vertical-align: middle; + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; +} +body .ui-paginator .ui-paginator-prev:before { + content: "îˆ"; +} +body .ui-paginator .ui-paginator-prev:before { + position: relative; + left: -5px; +} +body .ui-paginator .ui-paginator-first { + padding: 0 6px; + vertical-align: middle; + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; +} +body .ui-paginator .ui-paginator-first:before { + content: "î—œ"; +} +body .ui-paginator .ui-paginator-first:before { + position: relative; + left: -5px; +} +body .ui-paginator .ui-paginator-pages { + vertical-align: middle; + margin: 0 6px 0 12px; + padding: 0; +} +body .ui-paginator .ui-paginator-pages a { + color: #ffffff; + padding: 0; + width: 24px; + height: 24px; + line-height: 24px; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +body .ui-paginator .ui-paginator-pages a.ui-state-active { + color: #ffffff; +} +body .ui-paginator .ui-paginator-pages a.ui-state-hover { + background-color: #8AD4F2; +} +body .ui-datagrid .ui-datagrid-header { + padding: 8px 14px; +} +body .ui-datagrid .ui-panel .ui-panel-titlebar { + background-color: #ffffff; + color: #212121; + border-color: #dbdbdb; +} +body .ui-datalist .ui-datalist-header { + padding: 8px 14px; +} +body .ui-datatable .ui-datatable-header, +body .ui-datatable .ui-datatable-footer { + padding: 8px 14px; +} +body .ui-datatable .ui-datatable-header .ui-inputfield, +body .ui-datatable .ui-datatable-footer .ui-inputfield { + color: #ffffff; +} +body .ui-datatable .ui-datatable-header .ui-inputfield:focus, +body .ui-datatable .ui-datatable-footer .ui-inputfield:focus { + border-color: #ffffff; +} +body .ui-datatable .ui-paginator { + padding: 6px 10px; +} +body .ui-datatable thead th { + padding: 6px 10px; + border: 0 none; + border-top: 1px solid #d8d8d8; + background-color: #ffffff; +} +body .ui-datatable thead th:first-child { + border-left: 1px solid #d8d8d8; +} +body .ui-datatable thead th:last-child { + border-right: 1px solid #d8d8d8; +} +body .ui-datatable thead th.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-datatable thead th .ui-sortable-column-icon { + vertical-align: middle; + margin: -4px 0 0 0; + color: #757575; +} +body .ui-datatable thead th .ui-sortable-column-icon.ui-icon-carat-2-n-s { + margin-left: 4px; +} +body .ui-datatable thead th .ui-column-resizer { + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 16px; + color: #757575; +} +body .ui-datatable thead th .ui-column-resizer:before { + content: ""; +} +body .ui-datatable thead th.ui-state-active, body .ui-datatable thead th.ui-state-highlight { + background-color: #29ABE1; + color: #ffffff; + border-top-color: #29ABE1; +} +body .ui-datatable thead th.ui-state-active .ui-icon, body .ui-datatable thead th.ui-state-highlight .ui-icon { + color: #ffffff; +} +body .ui-datatable thead th.ui-state-active .ui-inputfield, body .ui-datatable thead th.ui-state-highlight .ui-inputfield { + color: #ffffff; +} +body .ui-datatable thead th.ui-state-active .ui-inputfield.ui-state-focus, body .ui-datatable thead th.ui-state-highlight .ui-inputfield.ui-state-focus { + border-color: #ffffff; +} +body .ui-datatable thead tr th { + border: 1px solid #d8d8d8; +} +body .ui-datatable tfoot td { + padding: 6px 10px; + border: 1px solid #d8d8d8; + background-color: #ffffff; +} +body .ui-datatable tbody tr.ui-datatable-even { + background-color: #f4f4f4; +} +body .ui-datatable tbody tr.ui-datatable-even.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-datatable tbody tr.ui-datatable-even.ui-state-highlight { + background-color: #29ABE1; + color: #ffffff; +} +body .ui-datatable tbody tr td { + border: 1px solid #d8d8d8; + padding: 6px 10px; +} +body .ui-datatable tbody tr td .ui-row-toggler { + display: inherit; +} +body .ui-datatable tbody tr td.ui-state-highlight .ui-inputfield { + color: #ffffff; + border-color: #ffffff; +} +body .ui-datatable tbody tr td.ui-state-highlight .ui-inputfield:focus { + border-color: #ffffff; +} +body .ui-datatable tbody tr td.ui-state-error { + background-color: #e62a10; + border-color: #e62a10; + color: #ffffff; +} +body .ui-datatable tbody tr.ui-widget-content { + border: 0 none; +} +body .ui-datatable tbody tr.ui-state-highlight  { + background-color: #29ABE1; + color: #ffffff; +} +body .ui-datatable tbody tr .ui-cell-editor-input input { + color: #ffffff; +} +body .ui-datatable tbody tr.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-datatable tbody tr.ui-state-error { + background-color: #e62a10; + border-color: #e62a10; + color: #ffffff; +} +body .ui-datatable tbody tr.ui-state-error .ui-inputfield, +body .ui-datatable tbody tr.ui-state-error .ui-inputfield.ui-state-error { + border-color: #ffffff; +} +body .ui-datatable tbody tr.ui-state-highlight td { + border-right-color: #2341BB; +} +body .ui-datatable tbody tr.ui-state-highlight td:last-child { + border-right-color: #d8d8d8; +} +body .ui-datatable tbody tr.ui-state-highlight td.ui-selection-column .ui-radiobutton-box { + border-color: #ffffff; + background-color: transparent; +} +body .ui-datatable tbody tr.ui-state-highlight td.ui-selection-column .ui-radiobutton-box .ui-radiobutton-icon { + background-color: #ffffff; +} +body .ui-datatable tbody tr.ui-state-highlight td.ui-selection-column .ui-chkbox-box { + border-color: #ffffff; + background-color: transparent; +} +body .ui-datatable tbody tr.ui-state-highlight td.ui-selection-column .ui-chkbox-box .ui-chkbox-icon { + color: #ffffff; + margin-left: -3px; +} +body .ui-datatable tbody tr.ui-state-highlight .ui-inputfield { + color: #ffffff; + border-color: #ffffff; +} +body .ui-datatable tbody tr.ui-state-highlight .ui-inputfield:focus { + border-color: #ffffff; +} +body .ui-datatable > .ui-icon-arrowthick-1-s { + font-size: 18px; + color: #29ABE1; +} +body .ui-datatable > .ui-icon-arrowthick-1-n { + display: none !important; +} +body .ui-datatable.ui-datatable-scrollable .ui-datatable-scrollable-header, body .ui-datatable.ui-datatable-scrollable .ui-datatable-scrollable-footer { + border: 0 none; + background-color: transparent; + padding: 0px; +} +body .ui-datatable.ui-datatable-scrollable .ui-datatable-scrollable-header .ui-datatable-data tr.ui-widget-content, body .ui-datatable.ui-datatable-scrollable .ui-datatable-scrollable-footer .ui-datatable-data tr.ui-widget-content { + padding: 0px; +} +body .ui-datatable.ui-datatable-scrollable .ui-datatable-scrollable-header .ui-datatable-data td, body .ui-datatable.ui-datatable-scrollable .ui-datatable-scrollable-footer .ui-datatable-data td { + color: #212121; +} +body .ui-datatable.ui-datatable-scrollable thead tr th { + color: #212121; + font-size: 14px; +} +body .ui-datatable.ui-datatable-scrollable tfoot tr td { + color: #212121; + font-size: 14px; +} +body .ui-draggable-dragging.ui-state-default { + background-color: #29ABE1; +} +body .ui-picklist .ui-picklist-list { + padding: 0; +} +body .ui-picklist .ui-picklist-caption { + padding: 8px 14px; +} +body .ui-picklist li.ui-picklist-item { + padding: 6px 10px; + margin: 0; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; +} +body .ui-picklist li.ui-picklist-item.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-picklist .ui-picklist-buttons { + width: 48px; +} +body .ui-picklist .ui-picklist-buttons .ui-button.ui-button-icon-only { + width: 32px; + margin-right: 0; + display: inline-block; + margin-bottom: 4px; +} +body .ui-picklist .ui-picklist-buttons-cell { + text-align: center; +} +body .ui-picklist .ui-picklist-filter-container { + margin-bottom: 4px; +} +body .ui-picklist .ui-picklist-filter-container .ui-picklist-filter { + width: 100%; +} +body .ui-picklist .ui-picklist-filter-container .ui-icon { + color: #757575; + top: 0px; +} +body .ui-picklist.ui-picklist-responsive .ui-picklist-buttons { + width: 48px; +} +body .ui-picklist.ui-picklist-responsive .ui-picklist-buttons .ui-button.ui-button-icon-only { + margin: 0 auto; + display: block; + margin-bottom: 8px; +} +body .ui-picklist.ui-picklist-responsive .ui-picklist-list .ui-picklist-item .ui-chkbox { + margin-right: 8px; + vertical-align: top; +} +body .ui-picklist.ui-picklist-responsive .ui-picklist-list .ui-picklist-item .ui-chkbox, body .ui-picklist.ui-picklist-responsive .ui-picklist-list .ui-picklist-item .ui-chkbox * { + box-sizing: content-box; +} +body .ui-picklist.ui-picklist-responsive .ui-chkbox-box { + width: 14px; + height: 14px; +} +body .ui-orderlist .ui-orderlist-caption { + padding: 8px 14px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +body .ui-orderlist .ui-orderlist-list { + padding: 0; + box-sizing: border-box; +} +body .ui-orderlist .ui-orderlist-list li.ui-orderlist-item { + padding: 6px 10px; + margin: 0; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; +} +body .ui-orderlist .ui-orderlist-list li.ui-orderlist-item.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-orderlist .ui-orderlist-controls { + width: 60px; + text-align: center; +} +body .ui-orderlist .ui-orderlist-controls .ui-button.ui-button-icon-only { + width: 32px; + margin: 0 0 8px 0; + display: inline-block; +} +body .ui-carousel { + padding: 0; + border: 0 none; +} +body .ui-carousel .ui-carousel-header { + margin: 0; +} +body .ui-carousel .ui-carousel-header .ui-icon { + color: #ffffff; +} +body .ui-carousel .ui-carousel-header .ui-carousel-dropdown, +body .ui-carousel .ui-carousel-header .ui-carousel-mobile-dropdown { + margin: 5px 10px; +} +body .ui-carousel .ui-carousel-footer { + margin: 0; + padding: 8px 14px-2px; + font-size: 12px; +} +body .ui-carousel .ui-carousel-page-links { + margin-top: 2px; +} +body .ui-tree { + padding: 4px 7px; +} +body .ui-tree .ui-treenode-children { + padding-left: 28px; +} +body .ui-tree .ui-treenode-leaf-icon { + width: 23px; +} +body .ui-tree .ui-tree-container { + overflow: visible; +} +body .ui-tree .ui-treenode-content .ui-chkbox { + margin: 0 4px 0 4px; +} +body .ui-tree .ui-treenode-content .ui-chkbox .ui-icon { + color: #757575; +} +body .ui-tree .ui-treenode-content .ui-tree-toggler { + vertical-align: middle; +} +body .ui-tree .ui-treenode-content .ui-treenode-icon { + vertical-align: middle; + margin: 0 4px 0 4px; +} +body .ui-tree .ui-treenode-content .ui-treenode-label { + padding: 0 4px; + margin: 0; + vertical-align: middle; +} +body .ui-tree .ui-tree-droppoint.ui-state-hover { + background-color: #29ABE1; +} +body .ui-tree.ui-tree-horizontal { + padding-left: 0; + padding-right: 0; +} +body .ui-tree.ui-tree-horizontal .ui-treenode-content { + background-color: #ffffff; + border: 1px solid #d8d8d8; +} +body .ui-tree.ui-tree-horizontal .ui-treenode-content .ui-tree-toggler { + vertical-align: middle; +} +body .ui-tree.ui-tree-horizontal .ui-treenode-content .ui-treenode-icon { + vertical-align: middle; + margin-right: 4px; +} +body .ui-tree.ui-tree-horizontal .ui-treenode-content.ui-state-highlight { + background-color: #29ABE1; + color: #ffffff; +} +body .ui-tree.ui-tree-horizontal .ui-treenode-content.ui-state-highlight .ui-chkbox-box { + border-color: #ffffff; +} +body .ui-tree.ui-tree-horizontal .ui-treenode-content.ui-state-highlight .ui-chkbox-box .ui-chkbox-icon { + color: #ffffff; +} +body .ui-tree-draghelper { + border: 1px solid #29ABE1; +} +body .fc .fc-button-group .ui-icon { + margin-top: 3px; +} +body .fc .fc-button-group .ui-state-active { + background-color: #29ABE1; + color: #ffffff; +} +body .fc .fc-event { + background-color: #8AD4F2; + color: #ffffff; +} +body .fc table { + box-sizing: border-box; +} +body .fc div.ui-widget-content { + padding-left: 0px; + padding-right: 0px; +} +body .ui-treetable .ui-treetable-header, +body .ui-treetable .ui-treetable-footer { + padding: 8px 14px; +} +body .ui-treetable thead th { + background-color: #ffffff; + padding: 6px 10px; + border: 0 none; + border-top: 1px solid #d8d8d8; +} +body .ui-treetable thead th .ui-icon { + color: #757575; +} +body .ui-treetable thead th:first-child { + border-left: 1px solid #d8d8d8; +} +body .ui-treetable thead th:last-child { + border-right: 1px solid #d8d8d8; +} +body .ui-treetable thead th.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-treetable thead th .ui-sortable-column-icon { + vertical-align: middle; + margin: -4px 0 0 0; + color: #757575; +} +body .ui-treetable thead th .ui-sortable-column-icon.ui-icon-carat-2-n-s { + margin-left: 4px; +} +body .ui-treetable thead th.ui-state-active { + background-color: #29ABE1; + color: #ffffff; +} +body .ui-treetable thead th.ui-state-active .ui-icon { + color: #ffffff; +} +body .ui-treetable thead th .ui-column-resizer { + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 16px; + color: #757575; +} +body .ui-treetable thead th .ui-column-resizer:before { + content: ""; +} +body .ui-treetable tr th { + border: 1px solid #d8d8d8; +} +body .ui-treetable tfoot td { + border: 0 none; + padding: 10px 14px; +} +body .ui-treetable tbody tr td { + border: 1px solid #d8d8d8; + padding: 6px 10px; +} +body .ui-treetable tbody tr td .ui-treetable-toggler { + display: inline-block; + vertical-align: middle; + margin: 0 4px; + float: none; +} +body .ui-treetable tbody tr td .ui-chkbox { + margin-right: 8px; +} +body .ui-treetable tbody tr td .ui-chkbox .ui-chkbox-icon { + color: #757575; +} +body .ui-treetable tbody tr.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-treetable tbody tr.ui-state-highlight .ui-chkbox .ui-chkbox-box { + border-color: #ffffff; +} +body .ui-treetable tbody tr.ui-state-highlight .ui-chkbox .ui-chkbox-box .ui-icon { + color: #ffffff; +} +body .ui-treetable.ui-treetable-scrollable .ui-treetable-scrollable-header, body .ui-treetable.ui-treetable-scrollable .ui-treetable-scrollable-footer { + background-color: transparent; + border: 0 none; + padding: 0px; +} +body .ui-treetable.ui-treetable-scrollable thead th { + background-color: #ffffff; + color: #212121; + border-bottom: 1px solid #dbdbdb; + border-top: 1px solid #dbdbdb; +} +body .ui-treetable.ui-treetable-scrollable thead th.ui-state-active { + background-color: #29ABE1; + color: #ffffff; +} +body .ui-treetable.ui-treetable-scrollable thead.ui-treetable-scrollable-theadclone th { + padding-bottom: 0px; + padding-top: 0px; + line-height: 0px; + border-top: 0 none; +} +body .ui-treetable.ui-treetable-scrollable tbody.ui-widget-content { + padding: 0px; +} +body .ui-treetable.ui-treetable-scrollable tbody tr.ui-widget-content { + padding: 0px; +} +body .ui-panelgrid tbody tr.ui-widget-content { + border: 1px solid #d8d8d8; +} + +body .ui-panel { + padding: 0; +} +body .ui-panel .ui-panel-titlebar { + border: 0 none; + padding: 8px 14px; + -moz-border-radius-topleft: 2px; + -webkit-border-top-left-radius: 2px; + border-top-left-radius: 2px; + -moz-border-radius-topright: 2px; + -webkit-border-top-right-radius: 2px; + border-top-right-radius: 2px; + -moz-border-radius-bottomleft: 0px; + -webkit-border-bottom-left-radius: 0px; + border-bottom-left-radius: 0px; + -moz-border-radius-bottomright: 0px; + -webkit-border-bottom-right-radius: 0px; + border-bottom-right-radius: 0px; +} +body .ui-panel .ui-panel-titlebar .ui-panel-title { + margin: 0; + line-height: 20px; +} +body .ui-panel .ui-panel-titlebar .ui-panel-titlebar-icon { + width: 20px; + height: 20px; + color: #ffffff; + margin: 0; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; +} +body .ui-panel .ui-panel-titlebar .ui-panel-titlebar-icon:hover { + background-color: #8AD4F2; +} +body .ui-panel .ui-panel-content { + height: 100%; + box-sizing: border-box; + padding: 8px 14px; +} +body .ui-panel .ui-panel-footer { + padding: 8px 14px; + border: 0 none; + border-top: 1px solid #dbdbdb; + margin: 0; +} +body .ui-panel.ui-panel-collapsed-h .ui-panel-titlebar { + padding-left: 40px; +} +body .ui-fieldset { + padding: 8px 14px; +} +body .ui-fieldset .ui-fieldset-legend { + padding: 8px 14px; + padding-left: 2px; + padding-right: 8px; + color: #29ABE1; +} +body .ui-fieldset .ui-fieldset-legend .ui-fieldset-toggler { + padding: 8px; + background-color: #29ABE1; + color: #ffffff; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; + margin-top: -10px; + margin-right: 8px; + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); +} +body .ui-fieldset .ui-fieldset-legend .ui-fieldset-toggler:hover { + background-color: #2341BB; +} +body .ui-fieldset .ui-fieldset-legend.ui-state-focus { + background-color: transparent; +} +body .ui-fieldset .ui-fieldset-legend.ui-state-active { + background-color: transparent; +} +body .ui-notificationbar { + background-color: #29ABE1; + color: #ffffff; +} +body .ui-panelgrid .ui-panelgrid-cell { + padding: 8px 14px; +} +body .ui-panelgrid .ui-panelgrid-header > .ui-widget-header, +body .ui-panelgrid .ui-panelgrid-footer > .ui-widget-header { + border-color: #2341BB; +} +body .ui-panelgrid tbody .ui-panelgrid-cell.ui-widget-header { + background-color: #8AD4F2; +} +body .ui-accordion .ui-accordion-header { + background-color: #29ABE1; + padding: 8px 14px; + padding-left: 36px; + font-size: 14px; + color: #ffffff; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +body .ui-accordion .ui-accordion-header.ui-state-hover { + background-color: #2341BB; +} +body .ui-accordion .ui-accordion-header.ui-state-active { + background-color: #29ABE1; + color: #ffffff; +} +body .ui-accordion .ui-accordion-header.ui-state-active.ui-tabs-outline { + outline: 0 none; + background-color: #ddc061; +} +body .ui-accordion .ui-accordion-header .ui-icon-triangle-1-e { + margin-top: -10px; +} +body .ui-accordion .ui-accordion-header .ui-icon-triangle-1-s { + margin-top: -10px; +} +body .ui-accordion .ui-accordion-header.ui-tabs-outline { + background-color: #A8E1F7; +} +body .ui-accordion .ui-accordion-content { + padding: 8px 14px; + line-height: 18px; +} +body .ui-scrollpanel { + padding: 0; +} +body .ui-scrollpanel .ui-scrollpanel-track { + background-color: #ffffff; + border-color: transparent; + padding: 0; +} +body .ui-scrollpanel .ui-scrollpanel-drag { + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background-color: #dbdbdb; +} +body .ui-toolbar { + background-color: #2341BB; + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + padding: 10px; +} +body .ui-toolbar .ui-button { + margin-right: 6px; +} +body .ui-tabs { + padding: 0; +} +body .ui-tabs .ui-tabs-nav { + background-color: #ffffff; + border: 0 none; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-tabs .ui-tabs-nav > li { + padding: 0; + -moz-transition: border-color 0.3s; + -o-transition: border-color 0.3s; + -webkit-transition: border-color 0.3s; + transition: border-color 0.3s; +} +body .ui-tabs .ui-tabs-nav > li > a { + padding: 8px 14px; +} +body .ui-tabs .ui-tabs-nav > li > a:focus { + outline: 0 none; +} +body .ui-tabs .ui-tabs-nav > li > .ui-icon-close { + margin: 7px 0 0 0; + -moz-transition: color 0.3s; + -o-transition: color 0.3s; + -webkit-transition: color 0.3s; + transition: color 0.3s; + color: #757575; +} +body .ui-tabs .ui-tabs-nav > li.ui-state-default a { + color: #757575; +} +body .ui-tabs .ui-tabs-nav > li.ui-state-hover { + background-color: #ffffff; +} +body .ui-tabs .ui-tabs-nav > li.ui-state-active { + background-color: #ffffff; + border-color: #29ABE1; + border-style: solid; +} +body .ui-tabs .ui-tabs-nav > li.ui-state-active a { + color: #29ABE1; + font-weight: 700; +} +body .ui-tabs .ui-tabs-nav > li.ui-state-active > .ui-icon-close { + color: #29ABE1; +} +body .ui-tabs .ui-tabs-nav > li.ui-tabs-outline { + outline: 0 none; + border-color: #8AD4F2; +} +body .ui-tabs .ui-tabs-panel { + padding: 8px 14px; +} +body .ui-tabs.ui-tabs-top > .ui-tabs-nav { + padding: 0; + margin: 0; + -moz-border-radius-topleft: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #dbdbdb; +} +body .ui-tabs.ui-tabs-top > .ui-tabs-nav > li { + border-style: solid; + border-width: 0 0 2px 0; +} +body .ui-tabs.ui-tabs-bottom > .ui-tabs-nav { + padding: 0; + margin: 0; + -moz-border-radius-bottomleft: 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomright: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + border-top: 1px solid #dbdbdb; +} +body .ui-tabs.ui-tabs-bottom > .ui-tabs-nav > li { + border-width: 2px 0 0 0; +} +body .ui-tabs.ui-tabs-left > .ui-tabs-nav { + padding: 0; + margin: 0; + -moz-border-radius-topleft: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + border-right: 1px solid #dbdbdb; +} +body .ui-tabs.ui-tabs-left > .ui-tabs-nav > li { + box-sizing: border-box; + border-width: 0 2px 0 0; +} +body .ui-tabs.ui-tabs-left > .ui-tabs-nav > li > a { + width: 100%; + box-sizing: border-box; +} +body .ui-tabs.ui-tabs-right > .ui-tabs-nav { + padding: 0; + -moz-border-radius-topright: 4px; + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + border-left: 1px solid #dbdbdb; +} +body .ui-tabs.ui-tabs-right > .ui-tabs-nav > li { + box-sizing: border-box; + border-width: 0 0 0 2px; +} +body .ui-tabs.ui-tabs-right > .ui-tabs-nav > li > a { + width: 100%; + box-sizing: border-box; +} +body .ui-tabs.ui-tabs-right > .ui-tabs-nav > li.ui-state-active > a { + padding-left: 14px; +} +body .ui-tabs.ui-tabs-scrollable .ui-tabs-navscroller > .ui-tabs-navscroller-btn { + outline: 0 none; + width: 18px; + display: block; + height: 42px; + background-color: #ffffff; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +body .ui-tabs.ui-tabs-scrollable .ui-tabs-navscroller > .ui-tabs-navscroller-btn > span { + margin-top: 10px; +} +body .ui-tabs.ui-tabs-scrollable .ui-tabs-navscroller > .ui-tabs-navscroller-btn:hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-tabs.ui-tabs-scrollable .ui-tabs-navscroller > .ui-tabs-navscroller-btn-left { + z-index: 1; + left: 0; + border-right: 1px solid #dbdbdb; +} +body .ui-tabs.ui-tabs-scrollable .ui-tabs-navscroller > .ui-tabs-navscroller-btn-left > span:before { + position: relative; + left: -2px; +} +body .ui-tabs.ui-tabs-scrollable .ui-tabs-navscroller > .ui-tabs-navscroller-btn-right { + z-index: 1; + right: 0; + border-left: 1px solid #dbdbdb; +} +body .ui-tabs.ui-tabs-scrollable .ui-tabs-navscroller > .ui-tabs-navscroller-btn-right > span:before { + position: relative; + right: 2px; +} +body .ui-tabs.ui-tabs-scrollable .ui-tabs-navscroller .ui-tabs-nav > li { + margin: 0; +} +body .ui-tabs.ui-tabs-scrollable.ui-tabs-top .ui-tabs-navscroller > .ui-tabs-nav { + border-bottom: 1px solid #dbdbdb; +} +body .ui-tabs.ui-tabs-scrollable.ui-tabs-top .ui-tabs-navscroller > .ui-tabs-nav > li { + border-style: solid; + border-width: 0 0 2px 0; +} +body .ui-tabs.ui-tabs-scrollable.ui-tabs-top .ui-tabs-navscroller > .ui-tabs-navscroller-btn-left { + border-top: 0 none; + border-bottom: 1px solid #dbdbdb; +} +body .ui-tabs.ui-tabs-scrollable.ui-tabs-bottom .ui-tabs-navscroller > .ui-tabs-nav { + border-top: 1px solid #dbdbdb; +} +body .ui-tabs.ui-tabs-scrollable.ui-tabs-bottom .ui-tabs-navscroller > .ui-tabs-nav > li { + border-style: solid; + border-width: 2px 0 0 0; +} +body .ui-tabs.ui-tabs-scrollable.ui-tabs-bottom .ui-tabs-navscroller > .ui-tabs-navscroller-btn-left { + border-bottom: 0 none; + border-top: 1px solid #dbdbdb; +} +body .ui-tabs.ui-tabs-scrollable.ui-tabs-bottom .ui-tabs-navscroller > .ui-tabs-navscroller-btn-right { + border-top: 1px solid #dbdbdb; +} +body .ui-wizard .ui-wizard-step-titles { + background-color: #2341BB; + -moz-border-radius-topleft: 3px; + -webkit-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -moz-border-radius-topright: 3px; + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; +} +body .ui-wizard .ui-wizard-step-titles > li { + padding: 8px 14px; + color: #ffffff; +} +body .ui-wizard .ui-wizard-step-titles > li.ui-state-highlight { + color: #ffffff; + background-color: transparent; + border-bottom: 2px solid #29ABE1; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-wizard .ui-wizard-content { + margin: 0; +} +body .ui-wizard .ui-wizard-content .ui-panel .ui-panel-titlebar { + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} + +body .ui-breadcrumb a { + color: #ffffff; +} +body .ui-breadcrumb li:first-child a { + position: relative; + font-size: 20px; + margin-top: 0; +} +body .ui-breadcrumb li:first-child a span { + display: none; +} +body .ui-steps { + position: relative; +} +body .ui-steps .ui-steps-item { + background-color: transparent; +} +body .ui-steps .ui-steps-item.ui-state-disabled { + opacity: 1; + filter: alpha(opacity=100); +} +body .ui-steps .ui-steps-item .ui-menuitem-link { + display: inline-block; + text-align: left; + background-color: #ffffff; + overflow: hidden; +} +body .ui-steps .ui-steps-item .ui-menuitem-link .ui-steps-number { + display: inline-block; + background-color: #757575; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + padding: 4px 8px; + font-size: 16px; + color: #ffffff; +} +body .ui-steps .ui-steps-item .ui-menuitem-link .ui-steps-title { + display: inline; + margin-left: 10px; + color: #757575; +} +body .ui-steps .ui-steps-item.ui-state-highlight .ui-steps-number { + background-color: #29ABE1; +} +body .ui-steps .ui-steps-item.ui-state-highlight .ui-steps-title { + font-weight: 700; + color: #212121; +} +body .ui-steps .ui-steps-item:last-child .ui-menuitem-link { + display: block; +} +body .ui-steps:before { + content: " "; + border: 1px solid #dbdbdb; + width: 90%; + top: 45%; + left: 0; + display: block; + position: absolute; +} +body .ui-menu { + padding: 8px 0; +} +body .ui-menu .ui-shadow, body .ui-menu.ui-shadow { + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); +} +body .ui-menu .ui-menu-list { + padding: 0; + margin: 0; +} +body .ui-menu .ui-menu-list li.ui-widget-header { + margin: 0 0 1px 0; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + border: 0 none; + width: 100%; + box-sizing: border-box; + padding: 0; +} +body .ui-menu .ui-menu-list li.ui-widget-header h3 { + display: block; + float: none; + font-size: 14px; + padding: 6px 10px; + font-weight: 400; +} +body .ui-menu .ui-menu-list li.ui-widget-header h3 .ui-icon.ui-icon-triangle-1-s, body .ui-menu .ui-menu-list li.ui-widget-header h3 .ui-icon.ui-icon-triangle-1-e { + margin: -12px 0 0 0; +} +body .ui-menu .ui-menu-list li.ui-menuitem { + margin: 0; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-menu .ui-menu-list li.ui-menuitem.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-menu .ui-menu-list li.ui-menuitem .ui-menuitem-link { + border: 0 none; + padding: 6px 10px; + width: 100%; + min-height: 32px; + box-sizing: border-box; + color: #212121; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + position: relative; +} +body .ui-menu .ui-menu-list li.ui-menuitem .ui-menuitem-link.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-menu .ui-menu-list li.ui-menuitem .ui-menuitem-link .ui-menuitem-icon { + margin-right: 8px; + display: inline-block; + vertical-align: middle; + float: none; + font-size: 18px; + height: auto; +} +body .ui-menu .ui-menu-list li.ui-menuitem .ui-menuitem-link .ui-menuitem-text { + display: inline-block; + vertical-align: middle; + float: none; +} +body .ui-menu .ui-menu-list .ui-separator { + height: 1px; + background-color: #dbdbdb; + width: 100%; + box-sizing: border-box; +} +body .ui-menu.ui-menu-toggleable .ui-menu-list li.ui-widget-header { + padding-left: 30px; +} +body .ui-menu.ui-menu-toggleable .ui-menu-list li.ui-widget-header .ui-icon { + color: #ffffff; +} +body .ui-menu.ui-menu-toggleable .ui-menu-list li.ui-widget-header .ui-icon.ui-icon-triangle-1-s { + margin-top: -10px; +} +body .ui-menu.ui-menu-toggleable .ui-menu-list li.ui-widget-header .ui-icon.ui-icon-triangle-1-e { + margin-top: -10px; +} +body .ui-menu.ui-tieredmenu .ui-icon-triangle-1-e { + position: absolute; + right: 8px; + top: 6px; + float: none; +} +body .ui-menu.ui-tieredmenu .ui-menu-child { + padding: 8px 0; +} +body .ui-menu.ui-menubar { + padding: 0; +} +body .ui-menu.ui-menubar .ui-menu-child { + padding: 8px 0; +} +body .ui-menu.ui-menubar .ui-menubar-options { + padding: 0 10px; +} +body .ui-menu.ui-menubar.ui-megamenu.ui-megamenu-vertical > .ui-menu-list { + padding: 8px 0; +} +body .ui-menu.ui-slidemenu .ui-menu-parent .ui-menu-child { + padding: 0; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; +} +body .ui-menu.ui-slidemenu .ui-slidemenu-backward { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; +} +body .ui-tabmenu { + padding: 0; +} +body .ui-tabmenu .ui-tabmenu-nav { + padding: 0; + background-color: #ffffff; + border: 0 none; + -moz-border-radius: 0px; + -webkit-border-radius: 0px; + border-radius: 0px; +} +body .ui-tabmenu .ui-tabmenu-nav > .ui-tabmenuitem { + top: auto; + margin: 0 4px 0 0; + padding: 0; + border-style: solid; + border-width: 0 0 2px 0; + -moz-transition: border-color 0.3s; + -o-transition: border-color 0.3s; + -webkit-transition: border-color 0.3s; + transition: border-color 0.3s; +} +body .ui-tabmenu .ui-tabmenu-nav > .ui-tabmenuitem > a { + padding: 8px 14px; +} +body .ui-tabmenu .ui-tabmenu-nav > .ui-tabmenuitem > a:focus { + outline: 0 none; +} +body .ui-tabmenu .ui-tabmenu-nav > .ui-tabmenuitem > a .ui-menuitem-icon, body .ui-tabmenu .ui-tabmenu-nav > .ui-tabmenuitem > a .ui-menuitem-text { + float: none; + display: inline-block; + vertical-align: middle; +} +body .ui-tabmenu .ui-tabmenu-nav > .ui-tabmenuitem > a .ui-menuitem-icon { + margin-right: 12px; +} +body .ui-tabmenu .ui-tabmenu-nav > .ui-tabmenuitem.ui-state-default a { + color: #757575; +} +body .ui-tabmenu .ui-tabmenu-nav > .ui-tabmenuitem.ui-state-default a .ui-icon { + color: #757575; +} +body .ui-tabmenu .ui-tabmenu-nav > .ui-tabmenuitem.ui-state-hover { + background-color: #ffffff; +} +body .ui-tabmenu .ui-tabmenu-nav > .ui-tabmenuitem.ui-state-active { + background-color: #ffffff; + border-color: #29ABE1; + border-style: solid; +} +body .ui-tabmenu .ui-tabmenu-nav > .ui-tabmenuitem.ui-state-active a { + color: #29ABE1; +} +body .ui-tabmenu .ui-tabmenu-nav > .ui-tabmenuitem.ui-state-active a .ui-icon { + color: #29ABE1; +} +body .ui-panelmenu .ui-panelmenu-header { + background-color: #29ABE1; + margin-bottom: 1px; +} +body .ui-panelmenu .ui-panelmenu-header a { + padding: 6px 10px 6px 36px; + color: #ffffff; + font-size: 14px; +} +body .ui-panelmenu .ui-panelmenu-header .ui-icon { + color: #ffffff; + margin-top: -10px; + font-size: 18px; + height: auto; +} +body .ui-panelmenu .ui-panelmenu-header.ui-state-active { + background-color: #29ABE1; + -moz-border-radius-bottomleft: 0; + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomright: 0; + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; +} +body .ui-panelmenu .ui-panelmenu-header.ui-state-active a, body .ui-panelmenu .ui-panelmenu-header.ui-state-active .ui-icon { + color: #ffffff; +} +body .ui-panelmenu .ui-panelmenu-content { + padding: 0; +} +body .ui-panelmenu .ui-panelmenu-content .ui-menuitem { + margin: 0; +} +body .ui-panelmenu .ui-panelmenu-content .ui-menuitem .ui-menuitem-link { + border: 0 none; + padding: 6px 10px; + width: 100%; + min-height: 30px; + box-sizing: border-box; + color: #212121; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + position: relative; +} +body .ui-panelmenu .ui-panelmenu-content .ui-menuitem .ui-menuitem-link.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-panelmenu .ui-panelmenu-content .ui-menuitem .ui-menuitem-link .ui-menuitem-text { + display: inline-block; + vertical-align: middle; + float: none; +} +body .ui-panelmenu .ui-panelmenu-content .ui-menuitem .ui-menuitem-link .ui-icon { + position: static; + display: inline-block; + vertical-align: middle; + margin-right: 6px; + font-size: 18px; + height: auto; +} + +body { + /* Messages */ + /* Info */ + /* Error */ + /* Warn */ + /* Fatal */ +} +body .ui-messages > div { + padding: 10px 16px; +} +body .ui-messages ul { + display: inline-block; + margin-left: 0; +} +body .ui-messages .ui-messages-info { + background-color: #2196F3; + border-color: #2196F3; + color: #ffffff; +} +body .ui-messages .ui-messages-info .ui-messages-close:hover { + background-color: #6ab8f7; +} +body .ui-messages .ui-messages-warn { + background-color: #ffc107; + border-color: #ffc107; + color: #000000; +} +body .ui-messages .ui-messages-warn .ui-messages-close:hover { + background-color: #ffd454; +} +body .ui-messages .ui-messages-error { + background-color: #e62a10; + border-color: #e62a10; + color: #ffffff; +} +body .ui-messages .ui-messages-error .ui-messages-close:hover { + background-color: #f36450; +} +body .ui-messages .ui-messages-fatal { + background-color: #212121; + border-color: #212121; + color: #ffffff; +} +body .ui-messages .ui-messages-fatal .ui-messages-close:hover { + background-color: #474747; +} +body .ui-message { + padding: 4px 8px; +} +body .ui-message.ui-message-info { + background-color: #2196F3; + border-color: #2196F3; + color: #ffffff; +} +body .ui-message.ui-message-warn { + background-color: #ffc107; + border-color: #ffc107; + color: #ffffff; +} +body .ui-message.ui-message-error { + background-color: #e62a10; + border-color: #e62a10; + color: #ffffff; +} +body .ui-message.ui-message-fatal { + background-color: #212121; + border-color: #212121; + color: #ffffff; +} +body .ui-message.ui-message-icon-only { + text-align: center; +} +body .ui-message.ui-message-icon-only span { + float: none; + margin-top: -1px; + position: static; +} +body .ui-messages .ui-messages-info-icon, body .ui-message .ui-message-info-icon { + background: none; + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 24px; + color: #fff; +} +body .ui-messages .ui-messages-info-icon:before, body .ui-message .ui-message-info-icon:before { + content: ""; +} +body .ui-message .ui-message-info-icon { + margin-top: -1px; + font-size: 18px; + right: 1px; +} +body .ui-messages .ui-messages-error-icon, body .ui-message .ui-message-error-icon { + background: none; + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 24px; + color: #fff; +} +body .ui-messages .ui-messages-error-icon:before, body .ui-message .ui-message-error-icon:before { + content: ""; +} +body .ui-message .ui-message-error-icon { + margin-top: -1px; + font-size: 18px; + right: 1px; +} +body .ui-messages .ui-messages-warn-icon, body .ui-message .ui-message-warn-icon { + background: none; + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 24px; + color: #212121; +} +body .ui-messages .ui-messages-warn-icon:before, body .ui-message .ui-message-warn-icon:before { + content: ""; +} +body .ui-messages .ui-messages-warn .ui-messages-close { + color: #212121; +} +body .ui-message .ui-message-warn-icon { + margin-top: -1px; + font-size: 18px; + right: 1px; +} +body .ui-messages .ui-messages-fatal-icon, body .ui-message .ui-message-fatal-icon { + background: none; + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 24px; + color: #fff; +} +body .ui-messages .ui-messages-fatal-icon:before, body .ui-message .ui-message-fatal-icon:before { + content: ""; +} +body .ui-message .ui-message-fatal-icon { + margin-top: -1px; + font-size: 18px; +} +body .ui-messages-close { + text-decoration: none; + color: #fff; + width: 20px; + height: 20px; + margin-top: -2px; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +body .md-inputfield .ui-message.ui-message-error { + background-color: transparent; + border: 0 none; + margin: 0px; + color: #e62a10; + font-size: 11px; +} +body .md-inputfield .ui-message.ui-message-error .ui-message-error-icon { + color: #e62a10; + font-size: 13px; +} +body .ui-growl { + top: 90px; +} +body .ui-growl > .ui-growl-item-container { + opacity: 1; +} +body .ui-growl > .ui-growl-item-container.ui-growl-info { + background-color: #2196F3; +} +body .ui-growl > .ui-growl-item-container.ui-growl-warn { + background-color: #ffc107; +} +body .ui-growl > .ui-growl-item-container.ui-growl-error { + background-color: #e62a10; +} +body .ui-growl > .ui-growl-item-container.ui-growl-fatal { + background-color: #212121; +} +body .ui-growl > .ui-growl-item-container.ui-shadow { + -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); +} +body .ui-growl .ui-growl-item .ui-growl-image { + background: none; + color: #ffffff; + padding: 4px; +} +body .ui-growl .ui-growl-item .ui-growl-image.ui-growl-image-info { + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 36px; +} +body .ui-growl .ui-growl-item .ui-growl-image.ui-growl-image-info:before { + content: ""; +} +body .ui-growl .ui-growl-item .ui-growl-image.ui-growl-image-error { + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 36px; +} +body .ui-growl .ui-growl-item .ui-growl-image.ui-growl-image-error:before { + content: ""; +} +body .ui-growl .ui-growl-item .ui-growl-image.ui-growl-image-warn { + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 36px; +} +body .ui-growl .ui-growl-item .ui-growl-image.ui-growl-image-warn:before { + content: ""; +} +body .ui-growl .ui-growl-item .ui-growl-image.ui-growl-image-fatal { + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 36px; +} +body .ui-growl .ui-growl-item .ui-growl-image.ui-growl-image-fatal:before { + content: ""; +} +body .ui-growl .ui-growl-item .ui-growl-message { + color: #ffffff; +} +body .ui-growl .ui-growl-item .ui-growl-icon-close { + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + /* Support for IE. */ + font-feature-settings: "liga"; + font-size: 24px; + color: #ffffff; +} +body .ui-growl .ui-growl-item .ui-growl-icon-close:before { + content: "î—"; +} + +body .jqplot-target { + font-family: "Roboto", "Helvetica Neue", sans-serif; +} +body .ui-progressbar { + height: 16px; + padding: 0; + border-color: #d8d8d8; +} +body .ui-progressbar .ui-progressbar-value { + height: 16px; + padding: 0; +} +body .ui-progressbar .ui-progressbar-label { + color: #29ABE1; +} +body .ui-galleria { + padding: 0; +} +body .ui-galleria .ui-galleria-nav-prev { + left: 2px; +} +body .ui-galleria .ui-galleria-nav-next { + right: 2px; +} +body .ui-log .ui-log-header { + padding: 8px 14px; + height: auto; +} +body .ui-log .ui-log-header > .ui-log-button { + line-height: 16px; + position: static; + display: inline-block; + vertical-align: middle; + margin-right: 4px; + border: 1px solid transparent; + padding: 1px 3px; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +body .ui-log .ui-log-header > .ui-log-button.ui-state-hover { + background-color: #8AD4F2; +} +body .ui-tagcloud li { + margin: 4px 0px; +} +body .ui-tagcloud li a { + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} +body .ui-tagcloud li a:hover { + background-color: #e8e8e8; + color: #000000; +} +body .timeline-frame .timeline-event { + border-color: #d8d8d8; + background-color: #ffffff; +} +body .timeline-frame .timeline-event.ui-state-active { + background-color: #29ABE1; + border-color: #29ABE1; + color: #ffffff; +} +body .timeline-frame .timeline-axis { + border-color: #dbdbdb; +} +body .timeline-frame .timeline-navigation { + height: 36px; +} + +body .ui-dialog.ui-shadow { + -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); +} +body .ui-dialog .ui-dialog-titlebar { + background-color: #ffffff; + color: #212121; + padding: 8px 14px; +} +body .ui-dialog .ui-dialog-titlebar .ui-dialog-title { + font-weight: 700; +} +body .ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-icon { + padding: 0; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +body .ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-icon.ui-state-hover, body .ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-icon.ui-state-focus { + background-color: #e8e8e8; + color: #000000; +} +body .ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-icon .ui-icon { + color: #757575; +} +body .ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-icon .ui-icon-extlink:before { + content: "fullscreen"; +} +body .ui-dialog .ui-dialog-titlebar .ui-dialog-titlebar-icon .ui-icon-newwin:before { + content: "fullscreen_exit"; +} +body .ui-dialog .ui-dialog-buttonpane, body .ui-dialog .ui-dialog-footer { + text-align: right; +} +body .ui-dialog .ui-dialog-buttonpane .ui-button, body .ui-dialog .ui-dialog-footer .ui-button { + background-color: #ffffff; + color: #212121; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; +} +body .ui-dialog .ui-dialog-buttonpane .ui-button .ui-icon, body .ui-dialog .ui-dialog-footer .ui-button .ui-icon { + color: #757575; +} +body .ui-dialog .ui-dialog-buttonpane .ui-button.ui-state-hover, body .ui-dialog .ui-dialog-footer .ui-button.ui-state-hover { + background-color: #e8e8e8; + color: #000000; +} +body .ui-dialog .ui-confirm-dialog-severity { + margin: 0px 12px; +} +body .ui-sidebar .ui-sidebar-close:hover { + padding: 1px; +} +body .ui-sidebar .ui-button { + width: auto; +} +body .ui-lightbox.ui-shadow { + -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); +} +body .ui-lightbox .ui-lightbox-caption { + padding: 8px 14px; +} +body .ui-lightbox .ui-lightbox-caption .ui-lightbox-caption-text { + margin: 0; +} +body .ui-lightbox .ui-lightbox-caption .ui-lightbox-close { + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; + padding: 0; + margin: 0; + width: 20px; + height: 20px; +} +body .ui-lightbox .ui-lightbox-caption .ui-lightbox-close.ui-state-hover { + background-color: #8AD4F2; + color: #000000; + padding: 0; +} +body .ui-lightbox .ui-lightbox-content-wrapper .ui-lightbox-nav-right, body .ui-lightbox .ui-lightbox-content-wrapper .ui-lightbox-nav-left { + top: 40%; +} +body .ui-lightbox .ui-lightbox-content-wrapper .ui-lightbox-nav-right .ui-icon, body .ui-lightbox .ui-lightbox-content-wrapper .ui-lightbox-nav-left .ui-icon { + -moz-transition: color 0.3s; + -o-transition: color 0.3s; + -webkit-transition: color 0.3s; + transition: color 0.3s; + font-size: 48px; + color: #8AD4F2; +} +body .ui-lightbox .ui-lightbox-content-wrapper .ui-lightbox-nav-right:hover .ui-icon, body .ui-lightbox .ui-lightbox-content-wrapper .ui-lightbox-nav-left:hover .ui-icon { + color: #ffffff; +} +body .ui-lightbox .ui-lightbox-content-wrapper .ui-lightbox-nav-right { + right: 24px; +} +body .ui-overlaypanel.ui-shadow { + -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); +} +body .ui-overlaypanel .ui-overlaypanel-close { + background-color: #29ABE1; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; + padding: 2px 4px; + right: -16px; + top: -16px; + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); +} +body .ui-overlaypanel .ui-overlaypanel-close span { + color: #ffffff; +} +body .ui-overlaypanel .ui-overlaypanel-close span:before { + position: relative; + top: 2px; +} +body .ui-overlaypanel .ui-overlaypanel-close.ui-state-hover { + background-color: #2341BB; +} +body .ui-tooltip { + opacity: 0.9; + filter: alpha(opacity=90); + font-size: 12px; +} +body .ui-tooltip .ui-tooltip-text { + background-color: #323232; + -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); +} +body .ui-tooltip.ui-tooltip-top .ui-tooltip-arrow { + border-top-color: #323232; +} +body .ui-tooltip.ui-tooltip-bottom .ui-tooltip-arrow { + border-bottom-color: #323232; +} +body .ui-tooltip.ui-tooltip-left .ui-tooltip-arrow { + border-left-color: #323232; +} +body .ui-tooltip.ui-tooltip-right .ui-tooltip-arrow { + border-right-color: #323232; +} +body .ui-state-error, +body .ui-widget.ui-state-error, +body .ui-widget-content .ui-state-error, +body .ui-widget-header .ui-state-error { + border-color: #e62a10; +} + +@media (max-width: 640px) { + body .ui-panelgrid .ui-grid-responsive .ui-grid-row { + border: 0 none; + } + body .ui-steps .ui-steps-item .ui-menuitem-link .ui-steps-title { + display: none; + } + body .ui-picklist.ui-picklist-responsive .ui-picklist-list-wrapper { + margin-bottom: 8px; + } + body .ui-picklist.ui-picklist-responsive .ui-picklist-buttons .ui-button.ui-button-icon-only { + display: inline-block; + margin-right: 4px; + } + body .ui-picklist.ui-picklist-responsive .ui-picklist-buttons .ui-icon-arrow-1-e { + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -o-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + } + body .ui-picklist.ui-picklist-responsive .ui-picklist-buttons .ui-icon-arrow-1-e:before { + content: ""; + } + body .ui-picklist.ui-picklist-responsive .ui-picklist-buttons .ui-icon-arrowstop-1-e { + -webkit-transform: rotate(-90deg); + -moz-transform: rotate(-90deg); + -o-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + } + body .ui-picklist.ui-picklist-responsive .ui-picklist-buttons .ui-icon-arrowstop-1-e:before { + content: "î…"; + } + body .ui-picklist.ui-picklist-responsive .ui-picklist-buttons .ui-icon-arrow-1-w { + -webkit-transform: rotate(-90deg); + -moz-transform: rotate(-90deg); + -o-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + } + body .ui-picklist.ui-picklist-responsive .ui-picklist-buttons .ui-icon-arrow-1-w:before { + content: ""; + } + body .ui-picklist.ui-picklist-responsive .ui-picklist-buttons .ui-icon-arrowstop-1-w { + -webkit-transform: rotate(-90deg); + -moz-transform: rotate(-90deg); + -o-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + } + body .ui-picklist.ui-picklist-responsive .ui-picklist-buttons .ui-icon-arrowstop-1-w:before { + content: "î„"; + } + body .ui-orderlist.ui-grid-responsive .ui-orderlist-controls { + text-align: center; + width: auto; + margin-bottom: 8px; + } + body .ui-orderlist.ui-grid-responsive .ui-orderlist-controls .ui-button { + margin-right: 4px; + } + body .ui-buttonset > .ui-button { + display: block; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + } + body .ui-buttonset > .ui-button:first-child { + -moz-border-radius-topleft: 3px; + -webkit-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -moz-border-radius-topright: 3px; + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + } + body .ui-buttonset > .ui-button:last-child { + -moz-border-radius-bottomleft: 3px; + -webkit-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -moz-border-radius-bottomright: 3px; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + } +} +.ui-icon-carat-2-n-s:before { + content: "î…¤"; +} + +.ui-icon-triangle-1-n:before { + content: ""; +} + +.ui-icon-triangle-1-e:before { + content: ""; +} + +.ui-icon-triangle-1-s:before { + content: ""; +} + +.ui-icon-triangle-1-w:before { + content: ""; +} + +.ui-icon-carat-1-n:before { + content: ""; +} + +.ui-icon-carat-1-e:before { + content: ""; +} + +.ui-icon-carat-1-s:before { + content: ""; +} + +.ui-icon-carat-1-w:before { + content: ""; +} + +.ui-icon-arrow-1-n { + -webkit-transform: rotate(-90deg); + -moz-transform: rotate(-90deg); + -o-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); +} +.ui-icon-arrow-1-n:before { + content: ""; +} + +.ui-icon-arrowstop-1-n { + -webkit-transform: rotate(-90deg); + -moz-transform: rotate(-90deg); + -o-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); +} +.ui-icon-arrowstop-1-n:before { + content: "î„"; +} + +.ui-icon-arrow-1-s { + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -o-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} +.ui-icon-arrow-1-s:before { + content: ""; +} + +.ui-icon-arrowstop-1-s { + -webkit-transform: rotate(-90deg); + -moz-transform: rotate(-90deg); + -o-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); +} +.ui-icon-arrowstop-1-s:before { + content: "î…"; +} + +.ui-icon-arrow-1-w { + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -o-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} +.ui-icon-arrow-1-w:before { + content: ""; +} + +.ui-icon-arrowstop-1-w:before { + content: ""; +} + +.ui-icon-arrow-1-e:before { + content: ""; +} + +.ui-icon-arrowstop-1-e:before { + content: ""; +} + +.ui-icon-arrowthick-1-s { + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -o-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} +.ui-icon-arrowthick-1-s:before { + content: ""; +} + +.ui-icon-arrowthick-1-n { + -webkit-transform: rotate(-90deg); + -moz-transform: rotate(-90deg); + -o-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); +} +.ui-icon-arrowthick-1-n:before { + content: ""; +} + +.ui-icon-circle-triangle-e:before { + content: ""; +} + +.ui-icon-circle-triangle-w { + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -o-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} +.ui-icon-circle-triangle-w:before { + content: ""; +} + +.ui-icon-circle-triangle-s { + -webkit-transform: rotate(90deg); + -moz-transform: rotate(90deg); + -o-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); +} +.ui-icon-circle-triangle-s:before { + content: ""; +} + +.ui-icon-radio-off:before { + content: "î ¶"; +} + +.ui-icon-radio-on:before { + content: "î ·"; +} + +.ui-icon-folder-collapsed:before { + content: ""; +} + +.ui-icon-document:before { + content: "î…"; +} + +.ui-icon-video:before { + content: ""; +} + +.ui-icon-music:before { + content: "î…"; +} + +.ui-icon-plus:before { + content: "î……"; +} + +.ui-icon-minus:before { + content: "î…›"; +} + +.ui-icon-plusthick:before { + content: "î……"; +} + +.ui-icon-minusthick:before { + content: "î…›"; +} + +.ui-icon-pencil:before { + content: "î‰"; +} + +.ui-icon-closethick:before { + content: "î—"; +} + +.ui-icon-circle-close:before { + content: "î—‰"; +} + +.ui-icon-gear:before { + content: ""; +} + +.ui-icon-calendar:before { + content: ""; +} + +.ui-icon-trash:before { + content: ""; +} + +.ui-icon-notice:before { + content: "î€"; +} + +.ui-icon-alert:before { + content: ""; +} + +.ui-icon-circle-zoomin:before { + content: ""; +} + +.ui-icon-circle-zoomout:before { + content: ""; +} + +.ui-icon-circle-arrow-e:before { + content: ""; +} + +.ui-icon-circle-arrow-w { + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -o-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} +.ui-icon-circle-arrow-w:before { + content: ""; +} + +.ui-icon-3d-rotation:before { + content: "î¡"; +} + +.ui-icon-ac-unit:before { + content: ""; +} + +.ui-icon-access-alarm:before { + content: "î†"; +} + +.ui-icon-access-alarms:before { + content: ""; +} + +.ui-icon-access-time:before { + content: ""; +} + +.ui-icon-accessibility:before { + content: "î¡Ž"; +} + +.ui-icon-accessible:before { + content: ""; +} + +.ui-icon-account-balance:before { + content: "î¡"; +} + +.ui-icon-account-balance-wallet:before { + content: "î¡"; +} + +.ui-icon-account-box:before { + content: "î¡‘"; +} + +.ui-icon-account-circle:before { + content: "î¡“"; +} + +.ui-icon-adb:before { + content: ""; +} + +.ui-icon-add:before { + content: "î……"; +} + +.ui-icon-add-a-photo:before { + content: "î¹"; +} + +.ui-icon-add-alarm:before { + content: ""; +} + +.ui-icon-add-alert:before { + content: ""; +} + +.ui-icon-add-box:before { + content: "î…†"; +} + +.ui-icon-add-circle:before { + content: "î…‡"; +} + +.ui-icon-add-circle-outline:before { + content: "î…ˆ"; +} + +.ui-icon-add-location:before { + content: ""; +} + +.ui-icon-add-shopping-cart:before { + content: "î¡”"; +} + +.ui-icon-add-to-photos:before { + content: "îŽ"; +} + +.ui-icon-add-to-queue:before { + content: "îœ"; +} + +.ui-icon-adjust:before { + content: ""; +} + +.ui-icon-airline-seat-flat:before { + content: ""; +} + +.ui-icon-airline-seat-flat-angled:before { + content: ""; +} + +.ui-icon-airline-seat-individual-suite:before { + content: ""; +} + +.ui-icon-airline-seat-legroom-extra:before { + content: ""; +} + +.ui-icon-airline-seat-legroom-normal:before { + content: ""; +} + +.ui-icon-airline-seat-legroom-reduced:before { + content: ""; +} + +.ui-icon-airline-seat-recline-extra:before { + content: ""; +} + +.ui-icon-airline-seat-recline-normal:before { + content: ""; +} + +.ui-icon-airplanemode-active:before { + content: ""; +} + +.ui-icon-airplanemode-inactive:before { + content: ""; +} + +.ui-icon-airplay:before { + content: "î•"; +} + +.ui-icon-airport-shuttle:before { + content: ""; +} + +.ui-icon-alarm:before { + content: "î¡•"; +} + +.ui-icon-alarm-add:before { + content: "î¡–"; +} + +.ui-icon-alarm-off:before { + content: "î¡—"; +} + +.ui-icon-alarm-on:before { + content: ""; +} + +.ui-icon-album:before { + content: ""; +} + +.ui-icon-all-inclusive:before { + content: ""; +} + +.ui-icon-all-out:before { + content: ""; +} + +.ui-icon-android:before { + content: "î¡™"; +} + +.ui-icon-announcement:before { + content: "î¡š"; +} + +.ui-icon-apps:before { + content: "î—ƒ"; +} + +.ui-icon-archive:before { + content: "î…‰"; +} + +.ui-icon-arrow-back:before { + content: "î—„"; +} + +.ui-icon-arrow-downward:before { + content: "î—›"; +} + +.ui-icon-arrow-drop-down:before { + content: "î—…"; +} + +.ui-icon-arrow-drop-down-circle:before { + content: "î—†"; +} + +.ui-icon-arrow-drop-up:before { + content: "î—‡"; +} + +.ui-icon-arrow-forward:before { + content: "î—ˆ"; +} + +.ui-icon-arrow-upward:before { + content: "î—˜"; +} + +.ui-icon-art-track:before { + content: "î "; +} + +.ui-icon-aspect-ratio:before { + content: "î¡›"; +} + +.ui-icon-assessment:before { + content: "î¡œ"; +} + +.ui-icon-assignment:before { + content: "î¡"; +} + +.ui-icon-assignment-ind:before { + content: "î¡ž"; +} + +.ui-icon-assignment-late:before { + content: "î¡Ÿ"; +} + +.ui-icon-assignment-return:before { + content: "î¡ "; +} + +.ui-icon-assignment-returned:before { + content: "î¡¡"; +} + +.ui-icon-assignment-turned-in:before { + content: "î¡¢"; +} + +.ui-icon-assistant:before { + content: ""; +} + +.ui-icon-assistant-photo:before { + content: ""; +} + +.ui-icon-attach-file:before { + content: ""; +} + +.ui-icon-attach-money:before { + content: ""; +} + +.ui-icon-attachment:before { + content: ""; +} + +.ui-icon-audiotrack:before { + content: ""; +} + +.ui-icon-autorenew:before { + content: "î¡£"; +} + +.ui-icon-av-timer:before { + content: ""; +} + +.ui-icon-backspace:before { + content: "î…Š"; +} + +.ui-icon-backup:before { + content: ""; +} + +.ui-icon-battery-alert:before { + content: ""; +} + +.ui-icon-battery-charging-full:before { + content: ""; +} + +.ui-icon-battery-full:before { + content: ""; +} + +.ui-icon-battery-std:before { + content: ""; +} + +.ui-icon-battery-unknown:before { + content: ""; +} + +.ui-icon-beach-access:before { + content: ""; +} + +.ui-icon-beenhere:before { + content: "î”­"; +} + +.ui-icon-block:before { + content: "î…‹"; +} + +.ui-icon-bluetooth:before { + content: ""; +} + +.ui-icon-bluetooth-audio:before { + content: "î˜"; +} + +.ui-icon-bluetooth-connected:before { + content: ""; +} + +.ui-icon-bluetooth-disabled:before { + content: ""; +} + +.ui-icon-bluetooth-searching:before { + content: ""; +} + +.ui-icon-blur-circular:before { + content: ""; +} + +.ui-icon-blur-linear:before { + content: ""; +} + +.ui-icon-blur-off:before { + content: ""; +} + +.ui-icon-blur-on:before { + content: ""; +} + +.ui-icon-book:before { + content: "î¡¥"; +} + +.ui-icon-bookmark:before { + content: ""; +} + +.ui-icon-bookmark-border:before { + content: ""; +} + +.ui-icon-border-all:before { + content: ""; +} + +.ui-icon-border-bottom:before { + content: ""; +} + +.ui-icon-border-clear:before { + content: ""; +} + +.ui-icon-border-color:before { + content: ""; +} + +.ui-icon-border-horizontal:before { + content: ""; +} + +.ui-icon-border-inner:before { + content: ""; +} + +.ui-icon-border-left:before { + content: ""; +} + +.ui-icon-border-outer:before { + content: ""; +} + +.ui-icon-border-right:before { + content: ""; +} + +.ui-icon-border-style:before { + content: ""; +} + +.ui-icon-border-top:before { + content: ""; +} + +.ui-icon-border-vertical:before { + content: ""; +} + +.ui-icon-branding-watermark:before { + content: "î«"; +} + +.ui-icon-brightness-1:before { + content: ""; +} + +.ui-icon-brightness-2:before { + content: ""; +} + +.ui-icon-brightness-3:before { + content: ""; +} + +.ui-icon-brightness-4:before { + content: ""; +} + +.ui-icon-brightness-5:before { + content: ""; +} + +.ui-icon-brightness-6:before { + content: ""; +} + +.ui-icon-brightness-7:before { + content: ""; +} + +.ui-icon-brightness-auto:before { + content: ""; +} + +.ui-icon-brightness-high:before { + content: ""; +} + +.ui-icon-brightness-low:before { + content: ""; +} + +.ui-icon-brightness-medium:before { + content: ""; +} + +.ui-icon-broken-image:before { + content: ""; +} + +.ui-icon-brush:before { + content: ""; +} + +.ui-icon-bubble-chart:before { + content: "î›"; +} + +.ui-icon-bug-report:before { + content: ""; +} + +.ui-icon-build:before { + content: "î¡©"; +} + +.ui-icon-burst-mode:before { + content: "î¼"; +} + +.ui-icon-business:before { + content: ""; +} + +.ui-icon-business-center:before { + content: ""; +} + +.ui-icon-cached:before { + content: ""; +} + +.ui-icon-cake:before { + content: ""; +} + +.ui-icon-call:before { + content: "î‚°"; +} + +.ui-icon-call-end:before { + content: ""; +} + +.ui-icon-call-made:before { + content: ""; +} + +.ui-icon-call-merge:before { + content: ""; +} + +.ui-icon-call-missed:before { + content: "î‚´"; +} + +.ui-icon-call-missed-outgoing:before { + content: ""; +} + +.ui-icon-call-received:before { + content: ""; +} + +.ui-icon-call-split:before { + content: ""; +} + +.ui-icon-call-to-action:before { + content: "î¬"; +} + +.ui-icon-camera:before { + content: ""; +} + +.ui-icon-camera-alt:before { + content: ""; +} + +.ui-icon-camera-enhance:before { + content: ""; +} + +.ui-icon-camera-front:before { + content: ""; +} + +.ui-icon-camera-rear:before { + content: ""; +} + +.ui-icon-camera-roll:before { + content: ""; +} + +.ui-icon-cancel:before { + content: "î—‰"; +} + +.ui-icon-card-giftcard:before { + content: ""; +} + +.ui-icon-card-membership:before { + content: ""; +} + +.ui-icon-card-travel:before { + content: ""; +} + +.ui-icon-casino:before { + content: "î­€"; +} + +.ui-icon-cast:before { + content: ""; +} + +.ui-icon-cast-connected:before { + content: ""; +} + +.ui-icon-center-focus-strong:before { + content: ""; +} + +.ui-icon-center-focus-weak:before { + content: ""; +} + +.ui-icon-change-history:before { + content: "î¡«"; +} + +.ui-icon-chat:before { + content: "î‚·"; +} + +.ui-icon-chat-bubble:before { + content: ""; +} + +.ui-icon-chat-bubble-outline:before { + content: ""; +} + +.ui-icon-check:before { + content: "î—Š"; +} + +.ui-icon-check-box:before { + content: "î ´"; +} + +.ui-icon-check-box-outline-blank:before { + content: "î µ"; +} + +.ui-icon-check-circle:before { + content: ""; +} + +.ui-icon-chevron-left:before { + content: "î—‹"; +} + +.ui-icon-chevron-right:before { + content: "î—Œ"; +} + +.ui-icon-child-care:before { + content: "î­"; +} + +.ui-icon-child-friendly:before { + content: "î­‚"; +} + +.ui-icon-chrome-reader-mode:before { + content: "î¡­"; +} + +.ui-icon-class:before { + content: "î¡®"; +} + +.ui-icon-clear:before { + content: "î…Œ"; +} + +.ui-icon-clear-all:before { + content: ""; +} + +.ui-icon-close:before { + content: "î—"; +} + +.ui-icon-closed-caption:before { + content: ""; +} + +.ui-icon-cloud:before { + content: ""; +} + +.ui-icon-cloud-circle:before { + content: ""; +} + +.ui-icon-cloud-done:before { + content: ""; +} + +.ui-icon-cloud-download:before { + content: "î‹€"; +} + +.ui-icon-cloud-off:before { + content: "î‹"; +} + +.ui-icon-cloud-queue:before { + content: "î‹‚"; +} + +.ui-icon-cloud-upload:before { + content: ""; +} + +.ui-icon-code:before { + content: ""; +} + +.ui-icon-collections:before { + content: ""; +} + +.ui-icon-collections-bookmark:before { + content: "î±"; +} + +.ui-icon-color-lens:before { + content: ""; +} + +.ui-icon-colorize:before { + content: ""; +} + +.ui-icon-comment:before { + content: ""; +} + +.ui-icon-compare:before { + content: ""; +} + +.ui-icon-compare-arrows:before { + content: ""; +} + +.ui-icon-computer:before { + content: ""; +} + +.ui-icon-confirmation-number:before { + content: ""; +} + +.ui-icon-contact-mail:before { + content: "îƒ"; +} + +.ui-icon-contact-phone:before { + content: "îƒ"; +} + +.ui-icon-contacts:before { + content: ""; +} + +.ui-icon-content-copy:before { + content: "î…"; +} + +.ui-icon-content-cut:before { + content: "î…Ž"; +} + +.ui-icon-content-paste:before { + content: "î…"; +} + +.ui-icon-control-point:before { + content: ""; +} + +.ui-icon-control-point-duplicate:before { + content: ""; +} + +.ui-icon-copyright:before { + content: ""; +} + +.ui-icon-create:before { + content: "î…"; +} + +.ui-icon-create-new-folder:before { + content: "î‹Œ"; +} + +.ui-icon-credit-card:before { + content: "î¡°"; +} + +.ui-icon-crop:before { + content: ""; +} + +.ui-icon-crop-16-9:before { + content: ""; +} + +.ui-icon-crop-3-2:before { + content: ""; +} + +.ui-icon-crop-5-4:before { + content: ""; +} + +.ui-icon-crop-7-5:before { + content: "î€"; +} + +.ui-icon-crop-din:before { + content: "î"; +} + +.ui-icon-crop-free:before { + content: "î‚"; +} + +.ui-icon-crop-landscape:before { + content: "îƒ"; +} + +.ui-icon-crop-original:before { + content: "î„"; +} + +.ui-icon-crop-portrait:before { + content: "î…"; +} + +.ui-icon-crop-rotate:before { + content: "î·"; +} + +.ui-icon-crop-square:before { + content: "î†"; +} + +.ui-icon-dashboard:before { + content: ""; +} + +.ui-icon-data-usage:before { + content: ""; +} + +.ui-icon-date-range:before { + content: ""; +} + +.ui-icon-dehaze:before { + content: "î‡"; +} + +.ui-icon-delete:before { + content: ""; +} + +.ui-icon-delete-forever:before { + content: ""; +} + +.ui-icon-delete-sweep:before { + content: "î…¬"; +} + +.ui-icon-description:before { + content: ""; +} + +.ui-icon-desktop-mac:before { + content: ""; +} + +.ui-icon-desktop-windows:before { + content: ""; +} + +.ui-icon-details:before { + content: "îˆ"; +} + +.ui-icon-developer-board:before { + content: "îŒ"; +} + +.ui-icon-developer-mode:before { + content: ""; +} + +.ui-icon-device-hub:before { + content: ""; +} + +.ui-icon-devices:before { + content: ""; +} + +.ui-icon-devices-other:before { + content: ""; +} + +.ui-icon-dialer-sip:before { + content: "î‚»"; +} + +.ui-icon-dialpad:before { + content: ""; +} + +.ui-icon-directions:before { + content: "î”®"; +} + +.ui-icon-directions-bike:before { + content: ""; +} + +.ui-icon-directions-boat:before { + content: ""; +} + +.ui-icon-directions-bus:before { + content: "î”°"; +} + +.ui-icon-directions-car:before { + content: "î”±"; +} + +.ui-icon-directions-railway:before { + content: "î”´"; +} + +.ui-icon-directions-run:before { + content: ""; +} + +.ui-icon-directions-subway:before { + content: ""; +} + +.ui-icon-directions-transit:before { + content: ""; +} + +.ui-icon-directions-walk:before { + content: ""; +} + +.ui-icon-disc-full:before { + content: "î˜"; +} + +.ui-icon-dns:before { + content: ""; +} + +.ui-icon-do-not-disturb:before { + content: ""; +} + +.ui-icon-do-not-disturb-alt:before { + content: ""; +} + +.ui-icon-do-not-disturb-off:before { + content: ""; +} + +.ui-icon-do-not-disturb-on:before { + content: ""; +} + +.ui-icon-dock:before { + content: ""; +} + +.ui-icon-domain:before { + content: ""; +} + +.ui-icon-done:before { + content: ""; +} + +.ui-icon-done-all:before { + content: "î¡·"; +} + +.ui-icon-donut-large:before { + content: ""; +} + +.ui-icon-donut-small:before { + content: ""; +} + +.ui-icon-drafts:before { + content: "î…‘"; +} + +.ui-icon-drag-handle:before { + content: "î‰"; +} + +.ui-icon-drive-eta:before { + content: ""; +} + +.ui-icon-dvr:before { + content: ""; +} + +.ui-icon-edit:before { + content: "î‰"; +} + +.ui-icon-edit-location:before { + content: ""; +} + +.ui-icon-eject:before { + content: ""; +} + +.ui-icon-email:before { + content: ""; +} + +.ui-icon-enhanced-encryption:before { + content: ""; +} + +.ui-icon-equalizer:before { + content: "î€"; +} + +.ui-icon-error:before { + content: ""; +} + +.ui-icon-error-outline:before { + content: "î€"; +} + +.ui-icon-euro-symbol:before { + content: ""; +} + +.ui-icon-ev-station:before { + content: "î•­"; +} + +.ui-icon-event:before { + content: ""; +} + +.ui-icon-event-available:before { + content: ""; +} + +.ui-icon-event-busy:before { + content: ""; +} + +.ui-icon-event-note:before { + content: ""; +} + +.ui-icon-event-seat:before { + content: ""; +} + +.ui-icon-exit-to-app:before { + content: ""; +} + +.ui-icon-expand-less:before { + content: "î—Ž"; +} + +.ui-icon-expand-more:before { + content: "î—"; +} + +.ui-icon-explicit:before { + content: ""; +} + +.ui-icon-explore:before { + content: ""; +} + +.ui-icon-exposure:before { + content: "îŠ"; +} + +.ui-icon-exposure-neg-1:before { + content: "î‹"; +} + +.ui-icon-exposure-neg-2:before { + content: "îŒ"; +} + +.ui-icon-exposure-plus-1:before { + content: "î"; +} + +.ui-icon-exposure-plus-2:before { + content: "îŽ"; +} + +.ui-icon-exposure-zero:before { + content: "î"; +} + +.ui-icon-extension:before { + content: "î¡»"; +} + +.ui-icon-face:before { + content: ""; +} + +.ui-icon-fast-forward:before { + content: ""; +} + +.ui-icon-fast-rewind:before { + content: ""; +} + +.ui-icon-favorite:before { + content: ""; +} + +.ui-icon-favorite-border:before { + content: ""; +} + +.ui-icon-featured-play-list:before { + content: "î­"; +} + +.ui-icon-featured-video:before { + content: "î®"; +} + +.ui-icon-feedback:before { + content: "î¡¿"; +} + +.ui-icon-fiber-dvr:before { + content: "î"; +} + +.ui-icon-fiber-manual-record:before { + content: "î¡"; +} + +.ui-icon-fiber-new:before { + content: "îž"; +} + +.ui-icon-fiber-pin:before { + content: "îª"; +} + +.ui-icon-fiber-smart-record:before { + content: "î¢"; +} + +.ui-icon-file-download:before { + content: "î‹„"; +} + +.ui-icon-file-upload:before { + content: ""; +} + +.ui-icon-filter:before { + content: "î“"; +} + +.ui-icon-filter-1:before { + content: "î"; +} + +.ui-icon-filter-2:before { + content: "î‘"; +} + +.ui-icon-filter-3:before { + content: "î’"; +} + +.ui-icon-filter-4:before { + content: "î”"; +} + +.ui-icon-filter-5:before { + content: "î•"; +} + +.ui-icon-filter-6:before { + content: "î–"; +} + +.ui-icon-filter-7:before { + content: "î—"; +} + +.ui-icon-filter-8:before { + content: "î˜"; +} + +.ui-icon-filter-9:before { + content: "î™"; +} + +.ui-icon-filter-9-plus:before { + content: "îš"; +} + +.ui-icon-filter-b-and-w:before { + content: "î›"; +} + +.ui-icon-filter-center-focus:before { + content: "îœ"; +} + +.ui-icon-filter-drama:before { + content: "î"; +} + +.ui-icon-filter-frames:before { + content: "îž"; +} + +.ui-icon-filter-hdr:before { + content: "îŸ"; +} + +.ui-icon-filter-list:before { + content: "î…’"; +} + +.ui-icon-filter-none:before { + content: "î "; +} + +.ui-icon-filter-tilt-shift:before { + content: "î¢"; +} + +.ui-icon-filter-vintage:before { + content: "î£"; +} + +.ui-icon-find-in-page:before { + content: ""; +} + +.ui-icon-find-replace:before { + content: "î¢"; +} + +.ui-icon-fingerprint:before { + content: "î¤"; +} + +.ui-icon-first-page:before { + content: "î—œ"; +} + +.ui-icon-fitness-center:before { + content: "î­ƒ"; +} + +.ui-icon-flag:before { + content: "î…“"; +} + +.ui-icon-flare:before { + content: "î¤"; +} + +.ui-icon-flash-auto:before { + content: "î¥"; +} + +.ui-icon-flash-off:before { + content: "î¦"; +} + +.ui-icon-flash-on:before { + content: "î§"; +} + +.ui-icon-flight:before { + content: ""; +} + +.ui-icon-flight-land:before { + content: ""; +} + +.ui-icon-flight-takeoff:before { + content: ""; +} + +.ui-icon-flip:before { + content: "î¨"; +} + +.ui-icon-flip-to-back:before { + content: ""; +} + +.ui-icon-flip-to-front:before { + content: ""; +} + +.ui-icon-folder:before { + content: ""; +} + +.ui-icon-folder-open:before { + content: ""; +} + +.ui-icon-folder-shared:before { + content: ""; +} + +.ui-icon-folder-special:before { + content: ""; +} + +.ui-icon-font-download:before { + content: "î…§"; +} + +.ui-icon-format-align-center:before { + content: ""; +} + +.ui-icon-format-align-justify:before { + content: ""; +} + +.ui-icon-format-align-left:before { + content: ""; +} + +.ui-icon-format-align-right:before { + content: ""; +} + +.ui-icon-format-bold:before { + content: ""; +} + +.ui-icon-format-clear:before { + content: ""; +} + +.ui-icon-format-color-fill:before { + content: ""; +} + +.ui-icon-format-color-reset:before { + content: ""; +} + +.ui-icon-format-color-text:before { + content: ""; +} + +.ui-icon-format-indent-decrease:before { + content: ""; +} + +.ui-icon-format-indent-increase:before { + content: ""; +} + +.ui-icon-format-italic:before { + content: ""; +} + +.ui-icon-format-line-spacing:before { + content: ""; +} + +.ui-icon-format-list-bulleted:before { + content: "î‰"; +} + +.ui-icon-format-list-numbered:before { + content: ""; +} + +.ui-icon-format-paint:before { + content: ""; +} + +.ui-icon-format-quote:before { + content: ""; +} + +.ui-icon-format-shapes:before { + content: ""; +} + +.ui-icon-format-size:before { + content: ""; +} + +.ui-icon-format-strikethrough:before { + content: ""; +} + +.ui-icon-format-textdirection-l-to-r:before { + content: ""; +} + +.ui-icon-format-textdirection-r-to-l:before { + content: ""; +} + +.ui-icon-format-underlined:before { + content: ""; +} + +.ui-icon-forum:before { + content: "î‚¿"; +} + +.ui-icon-forward:before { + content: "î…”"; +} + +.ui-icon-forward-10:before { + content: "î–"; +} + +.ui-icon-forward-30:before { + content: "î—"; +} + +.ui-icon-forward-5:before { + content: "î˜"; +} + +.ui-icon-free-breakfast:before { + content: "î­„"; +} + +.ui-icon-fullscreen:before { + content: "î—"; +} + +.ui-icon-fullscreen-exit:before { + content: "î—‘"; +} + +.ui-icon-functions:before { + content: ""; +} + +.ui-icon-g-translate:before { + content: ""; +} + +.ui-icon-gamepad:before { + content: "îŒ"; +} + +.ui-icon-games:before { + content: ""; +} + +.ui-icon-gavel:before { + content: ""; +} + +.ui-icon-gesture:before { + content: "î…•"; +} + +.ui-icon-get-app:before { + content: ""; +} + +.ui-icon-gif:before { + content: ""; +} + +.ui-icon-golf-course:before { + content: "î­…"; +} + +.ui-icon-gps-fixed:before { + content: ""; +} + +.ui-icon-gps-not-fixed:before { + content: ""; +} + +.ui-icon-gps-off:before { + content: ""; +} + +.ui-icon-grade:before { + content: ""; +} + +.ui-icon-gradient:before { + content: "î©"; +} + +.ui-icon-grain:before { + content: "îª"; +} + +.ui-icon-graphic-eq:before { + content: ""; +} + +.ui-icon-grid-off:before { + content: "î«"; +} + +.ui-icon-grid-on:before { + content: "î¬"; +} + +.ui-icon-group:before { + content: ""; +} + +.ui-icon-group-add:before { + content: ""; +} + +.ui-icon-group-work:before { + content: ""; +} + +.ui-icon-hd:before { + content: "î’"; +} + +.ui-icon-hdr-off:before { + content: "î­"; +} + +.ui-icon-hdr-on:before { + content: "î®"; +} + +.ui-icon-hdr-strong:before { + content: "î±"; +} + +.ui-icon-hdr-weak:before { + content: "î²"; +} + +.ui-icon-headset:before { + content: "îŒ"; +} + +.ui-icon-headset-mic:before { + content: ""; +} + +.ui-icon-healing:before { + content: "î³"; +} + +.ui-icon-hearing:before { + content: ""; +} + +.ui-icon-help:before { + content: ""; +} + +.ui-icon-help-outline:before { + content: ""; +} + +.ui-icon-high-quality:before { + content: ""; +} + +.ui-icon-highlight:before { + content: ""; +} + +.ui-icon-highlight-off:before { + content: ""; +} + +.ui-icon-history:before { + content: ""; +} + +.ui-icon-home:before { + content: ""; +} + +.ui-icon-hot-tub:before { + content: "î­†"; +} + +.ui-icon-hotel:before { + content: ""; +} + +.ui-icon-hourglass-empty:before { + content: ""; +} + +.ui-icon-hourglass-full:before { + content: ""; +} + +.ui-icon-http:before { + content: ""; +} + +.ui-icon-https:before { + content: "î¢"; +} + +.ui-icon-image:before { + content: "î´"; +} + +.ui-icon-image-aspect-ratio:before { + content: "îµ"; +} + +.ui-icon-import-contacts:before { + content: ""; +} + +.ui-icon-import-export:before { + content: ""; +} + +.ui-icon-important-devices:before { + content: ""; +} + +.ui-icon-inbox:before { + content: "î…–"; +} + +.ui-icon-indeterminate-check-box:before { + content: ""; +} + +.ui-icon-info:before { + content: ""; +} + +.ui-icon-info-outline:before { + content: "î¢"; +} + +.ui-icon-input:before { + content: "î¢"; +} + +.ui-icon-insert-chart:before { + content: ""; +} + +.ui-icon-insert-comment:before { + content: ""; +} + +.ui-icon-insert-drive-file:before { + content: "î‰"; +} + +.ui-icon-insert-emoticon:before { + content: ""; +} + +.ui-icon-insert-invitation:before { + content: "î‰"; +} + +.ui-icon-insert-link:before { + content: "î‰"; +} + +.ui-icon-insert-photo:before { + content: ""; +} + +.ui-icon-invert-colors:before { + content: ""; +} + +.ui-icon-invert-colors-off:before { + content: ""; +} + +.ui-icon-iso:before { + content: "î¶"; +} + +.ui-icon-keyboard:before { + content: ""; +} + +.ui-icon-keyboard-arrow-down:before { + content: ""; +} + +.ui-icon-keyboard-arrow-left:before { + content: ""; +} + +.ui-icon-keyboard-arrow-right:before { + content: ""; +} + +.ui-icon-keyboard-arrow-up:before { + content: ""; +} + +.ui-icon-keyboard-backspace:before { + content: ""; +} + +.ui-icon-keyboard-capslock:before { + content: ""; +} + +.ui-icon-keyboard-hide:before { + content: ""; +} + +.ui-icon-keyboard-return:before { + content: ""; +} + +.ui-icon-keyboard-tab:before { + content: ""; +} + +.ui-icon-keyboard-voice:before { + content: "îŒ"; +} + +.ui-icon-kitchen:before { + content: "î­‡"; +} + +.ui-icon-label:before { + content: ""; +} + +.ui-icon-label-outline:before { + content: ""; +} + +.ui-icon-landscape:before { + content: "î·"; +} + +.ui-icon-language:before { + content: ""; +} + +.ui-icon-laptop:before { + content: ""; +} + +.ui-icon-laptop-chromebook:before { + content: ""; +} + +.ui-icon-laptop-mac:before { + content: ""; +} + +.ui-icon-laptop-windows:before { + content: ""; +} + +.ui-icon-last-page:before { + content: "î—"; +} + +.ui-icon-launch:before { + content: ""; +} + +.ui-icon-layers:before { + content: "î”»"; +} + +.ui-icon-layers-clear:before { + content: ""; +} + +.ui-icon-leak-add:before { + content: "î¸"; +} + +.ui-icon-leak-remove:before { + content: "î¹"; +} + +.ui-icon-lens:before { + content: "îº"; +} + +.ui-icon-library-add:before { + content: ""; +} + +.ui-icon-library-books:before { + content: ""; +} + +.ui-icon-library-music:before { + content: ""; +} + +.ui-icon-lightbulb-outline:before { + content: "î¤"; +} + +.ui-icon-line-style:before { + content: ""; +} + +.ui-icon-line-weight:before { + content: ""; +} + +.ui-icon-linear-scale:before { + content: ""; +} + +.ui-icon-link:before { + content: "î…—"; +} + +.ui-icon-linked-camera:before { + content: "î¸"; +} + +.ui-icon-list:before { + content: ""; +} + +.ui-icon-live-help:before { + content: ""; +} + +.ui-icon-live-tv:before { + content: ""; +} + +.ui-icon-local-activity:before { + content: ""; +} + +.ui-icon-local-airport:before { + content: ""; +} + +.ui-icon-local-atm:before { + content: ""; +} + +.ui-icon-local-bar:before { + content: "î•€"; +} + +.ui-icon-local-cafe:before { + content: "î•"; +} + +.ui-icon-local-car-wash:before { + content: "î•‚"; +} + +.ui-icon-local-convenience-store:before { + content: ""; +} + +.ui-icon-local-dining:before { + content: "î•–"; +} + +.ui-icon-local-drink:before { + content: "î•„"; +} + +.ui-icon-local-florist:before { + content: "î•…"; +} + +.ui-icon-local-gas-station:before { + content: ""; +} + +.ui-icon-local-grocery-store:before { + content: ""; +} + +.ui-icon-local-hospital:before { + content: ""; +} + +.ui-icon-local-hotel:before { + content: ""; +} + +.ui-icon-local-laundry-service:before { + content: "î•Š"; +} + +.ui-icon-local-library:before { + content: "î•‹"; +} + +.ui-icon-local-mall:before { + content: "î•Œ"; +} + +.ui-icon-local-movies:before { + content: "î•"; +} + +.ui-icon-local-offer:before { + content: "î•Ž"; +} + +.ui-icon-local-parking:before { + content: "î•"; +} + +.ui-icon-local-pharmacy:before { + content: "î•"; +} + +.ui-icon-local-phone:before { + content: "î•‘"; +} + +.ui-icon-local-pizza:before { + content: "î•’"; +} + +.ui-icon-local-play:before { + content: "î•“"; +} + +.ui-icon-local-post-office:before { + content: "î•”"; +} + +.ui-icon-local-printshop:before { + content: "î••"; +} + +.ui-icon-local-see:before { + content: "î•—"; +} + +.ui-icon-local-shipping:before { + content: ""; +} + +.ui-icon-local-taxi:before { + content: "î•™"; +} + +.ui-icon-location-city:before { + content: ""; +} + +.ui-icon-location-disabled:before { + content: ""; +} + +.ui-icon-location-off:before { + content: ""; +} + +.ui-icon-location-on:before { + content: ""; +} + +.ui-icon-location-searching:before { + content: ""; +} + +.ui-icon-lock:before { + content: ""; +} + +.ui-icon-lock-open:before { + content: ""; +} + +.ui-icon-lock-outline:before { + content: ""; +} + +.ui-icon-looks:before { + content: "î¼"; +} + +.ui-icon-looks-3:before { + content: "î»"; +} + +.ui-icon-looks-4:before { + content: "î½"; +} + +.ui-icon-looks-5:before { + content: "î¾"; +} + +.ui-icon-looks-6:before { + content: "î¿"; +} + +.ui-icon-looks-one:before { + content: "î€"; +} + +.ui-icon-looks-two:before { + content: "î"; +} + +.ui-icon-loop:before { + content: ""; +} + +.ui-icon-loupe:before { + content: "î‚"; +} + +.ui-icon-low-priority:before { + content: "î…­"; +} + +.ui-icon-loyalty:before { + content: ""; +} + +.ui-icon-mail:before { + content: "î…˜"; +} + +.ui-icon-mail-outline:before { + content: ""; +} + +.ui-icon-map:before { + content: "î•›"; +} + +.ui-icon-markunread:before { + content: "î…™"; +} + +.ui-icon-markunread-mailbox:before { + content: ""; +} + +.ui-icon-memory:before { + content: ""; +} + +.ui-icon-menu:before { + content: "î—’"; +} + +.ui-icon-merge-type:before { + content: ""; +} + +.ui-icon-message:before { + content: ""; +} + +.ui-icon-mic:before { + content: ""; +} + +.ui-icon-mic-none:before { + content: ""; +} + +.ui-icon-mic-off:before { + content: ""; +} + +.ui-icon-mms:before { + content: ""; +} + +.ui-icon-mode-comment:before { + content: ""; +} + +.ui-icon-mode-edit:before { + content: ""; +} + +.ui-icon-monetization-on:before { + content: ""; +} + +.ui-icon-money-off:before { + content: ""; +} + +.ui-icon-monochrome-photos:before { + content: "îƒ"; +} + +.ui-icon-mood:before { + content: ""; +} + +.ui-icon-mood-bad:before { + content: ""; +} + +.ui-icon-more:before { + content: ""; +} + +.ui-icon-more-horiz:before { + content: "î—“"; +} + +.ui-icon-more-vert:before { + content: "î—”"; +} + +.ui-icon-motorcycle:before { + content: ""; +} + +.ui-icon-mouse:before { + content: ""; +} + +.ui-icon-move-to-inbox:before { + content: "î…¨"; +} + +.ui-icon-movie:before { + content: ""; +} + +.ui-icon-movie-creation:before { + content: "î„"; +} + +.ui-icon-movie-filter:before { + content: "îº"; +} + +.ui-icon-multiline-chart:before { + content: ""; +} + +.ui-icon-music-note:before { + content: "î…"; +} + +.ui-icon-music-video:before { + content: "î£"; +} + +.ui-icon-my-location:before { + content: "î•œ"; +} + +.ui-icon-nature:before { + content: "î†"; +} + +.ui-icon-nature-people:before { + content: "î‡"; +} + +.ui-icon-navigate-before:before { + content: "îˆ"; +} + +.ui-icon-navigate-next:before { + content: "î‰"; +} + +.ui-icon-navigation:before { + content: "î•"; +} + +.ui-icon-near-me:before { + content: "î•©"; +} + +.ui-icon-network-cell:before { + content: ""; +} + +.ui-icon-network-check:before { + content: ""; +} + +.ui-icon-network-locked:before { + content: ""; +} + +.ui-icon-network-wifi:before { + content: ""; +} + +.ui-icon-new-releases:before { + content: ""; +} + +.ui-icon-next-week:before { + content: "î…ª"; +} + +.ui-icon-nfc:before { + content: ""; +} + +.ui-icon-no-encryption:before { + content: "î™"; +} + +.ui-icon-no-sim:before { + content: ""; +} + +.ui-icon-not-interested:before { + content: ""; +} + +.ui-icon-note:before { + content: "î¯"; +} + +.ui-icon-note-add:before { + content: ""; +} + +.ui-icon-notifications:before { + content: ""; +} + +.ui-icon-notifications-active:before { + content: ""; +} + +.ui-icon-notifications-none:before { + content: ""; +} + +.ui-icon-notifications-off:before { + content: ""; +} + +.ui-icon-notifications-paused:before { + content: ""; +} + +.ui-icon-offline-pin:before { + content: ""; +} + +.ui-icon-ondemand-video:before { + content: ""; +} + +.ui-icon-opacity:before { + content: ""; +} + +.ui-icon-open-in-browser:before { + content: "î¢"; +} + +.ui-icon-open-in-new:before { + content: ""; +} + +.ui-icon-open-with:before { + content: ""; +} + +.ui-icon-pages:before { + content: ""; +} + +.ui-icon-pageview:before { + content: ""; +} + +.ui-icon-palette:before { + content: "îŠ"; +} + +.ui-icon-pan-tool:before { + content: ""; +} + +.ui-icon-panorama:before { + content: "î‹"; +} + +.ui-icon-panorama-fish-eye:before { + content: "îŒ"; +} + +.ui-icon-panorama-horizontal:before { + content: "î"; +} + +.ui-icon-panorama-vertical:before { + content: "îŽ"; +} + +.ui-icon-panorama-wide-angle:before { + content: "î"; +} + +.ui-icon-party-mode:before { + content: ""; +} + +.ui-icon-pause:before { + content: ""; +} + +.ui-icon-pause-circle-filled:before { + content: ""; +} + +.ui-icon-pause-circle-outline:before { + content: ""; +} + +.ui-icon-payment:before { + content: ""; +} + +.ui-icon-people:before { + content: ""; +} + +.ui-icon-people-outline:before { + content: ""; +} + +.ui-icon-perm-camera-mic:before { + content: ""; +} + +.ui-icon-perm-contact-calendar:before { + content: ""; +} + +.ui-icon-perm-data-setting:before { + content: ""; +} + +.ui-icon-perm-device-information:before { + content: ""; +} + +.ui-icon-perm-identity:before { + content: ""; +} + +.ui-icon-perm-media:before { + content: ""; +} + +.ui-icon-perm-phone-msg:before { + content: ""; +} + +.ui-icon-perm-scan-wifi:before { + content: ""; +} + +.ui-icon-person:before { + content: ""; +} + +.ui-icon-person-add:before { + content: ""; +} + +.ui-icon-person-outline:before { + content: ""; +} + +.ui-icon-person-pin:before { + content: "î•š"; +} + +.ui-icon-person-pin-circle:before { + content: ""; +} + +.ui-icon-personal-video:before { + content: ""; +} + +.ui-icon-pets:before { + content: "î¤"; +} + +.ui-icon-phone:before { + content: "îƒ"; +} + +.ui-icon-phone-android:before { + content: ""; +} + +.ui-icon-phone-bluetooth-speaker:before { + content: ""; +} + +.ui-icon-phone-forwarded:before { + content: ""; +} + +.ui-icon-phone-in-talk:before { + content: "î˜"; +} + +.ui-icon-phone-iphone:before { + content: ""; +} + +.ui-icon-phone-locked:before { + content: ""; +} + +.ui-icon-phone-missed:before { + content: ""; +} + +.ui-icon-phone-paused:before { + content: ""; +} + +.ui-icon-phonelink:before { + content: ""; +} + +.ui-icon-phonelink-erase:before { + content: ""; +} + +.ui-icon-phonelink-lock:before { + content: ""; +} + +.ui-icon-phonelink-off:before { + content: ""; +} + +.ui-icon-phonelink-ring:before { + content: "îƒ"; +} + +.ui-icon-phonelink-setup:before { + content: ""; +} + +.ui-icon-photo:before { + content: "î"; +} + +.ui-icon-photo-album:before { + content: "î‘"; +} + +.ui-icon-photo-camera:before { + content: "î’"; +} + +.ui-icon-photo-filter:before { + content: "î»"; +} + +.ui-icon-photo-library:before { + content: "î“"; +} + +.ui-icon-photo-size-select-actual:before { + content: "î²"; +} + +.ui-icon-photo-size-select-large:before { + content: "î³"; +} + +.ui-icon-photo-size-select-small:before { + content: "î´"; +} + +.ui-icon-picture-as-pdf:before { + content: "î•"; +} + +.ui-icon-picture-in-picture:before { + content: ""; +} + +.ui-icon-picture-in-picture-alt:before { + content: ""; +} + +.ui-icon-pie-chart:before { + content: ""; +} + +.ui-icon-pie-chart-outlined:before { + content: "î›…"; +} + +.ui-icon-pin-drop:before { + content: "î•ž"; +} + +.ui-icon-place:before { + content: "î•Ÿ"; +} + +.ui-icon-play-arrow:before { + content: ""; +} + +.ui-icon-play-circle-filled:before { + content: ""; +} + +.ui-icon-play-circle-outline:before { + content: ""; +} + +.ui-icon-play-for-work:before { + content: ""; +} + +.ui-icon-playlist-add:before { + content: ""; +} + +.ui-icon-playlist-add-check:before { + content: "î¥"; +} + +.ui-icon-playlist-play:before { + content: "îŸ"; +} + +.ui-icon-plus-one:before { + content: "î €"; +} + +.ui-icon-poll:before { + content: "î "; +} + +.ui-icon-polymer:before { + content: ""; +} + +.ui-icon-pool:before { + content: "î­ˆ"; +} + +.ui-icon-portable-wifi-off:before { + content: ""; +} + +.ui-icon-portrait:before { + content: "î–"; +} + +.ui-icon-power:before { + content: ""; +} + +.ui-icon-power-input:before { + content: ""; +} + +.ui-icon-power-settings-new:before { + content: ""; +} + +.ui-icon-pregnant-woman:before { + content: ""; +} + +.ui-icon-present-to-all:before { + content: ""; +} + +.ui-icon-print:before { + content: ""; +} + +.ui-icon-priority-high:before { + content: "î™…"; +} + +.ui-icon-public:before { + content: "î ‹"; +} + +.ui-icon-publish:before { + content: ""; +} + +.ui-icon-query-builder:before { + content: ""; +} + +.ui-icon-question-answer:before { + content: ""; +} + +.ui-icon-queue:before { + content: ""; +} + +.ui-icon-queue-music:before { + content: ""; +} + +.ui-icon-queue-play-next:before { + content: "î¦"; +} + +.ui-icon-radio:before { + content: ""; +} + +.ui-icon-radio-button-checked:before { + content: "î ·"; +} + +.ui-icon-radio-button-unchecked:before { + content: "î ¶"; +} + +.ui-icon-rate-review:before { + content: "î• "; +} + +.ui-icon-receipt:before { + content: ""; +} + +.ui-icon-recent-actors:before { + content: ""; +} + +.ui-icon-record-voice-over:before { + content: ""; +} + +.ui-icon-redeem:before { + content: ""; +} + +.ui-icon-redo:before { + content: "î…š"; +} + +.ui-icon-refresh:before { + content: "î—•"; +} + +.ui-icon-remove:before { + content: "î…›"; +} + +.ui-icon-remove-circle:before { + content: "î…œ"; +} + +.ui-icon-remove-circle-outline:before { + content: "î…"; +} + +.ui-icon-remove-from-queue:before { + content: "î§"; +} + +.ui-icon-remove-red-eye:before { + content: "î—"; +} + +.ui-icon-remove-shopping-cart:before { + content: ""; +} + +.ui-icon-reorder:before { + content: ""; +} + +.ui-icon-repeat:before { + content: "î€"; +} + +.ui-icon-repeat-one:before { + content: "î"; +} + +.ui-icon-replay:before { + content: "î‚"; +} + +.ui-icon-replay-10:before { + content: "î™"; +} + +.ui-icon-replay-30:before { + content: "îš"; +} + +.ui-icon-replay-5:before { + content: "î›"; +} + +.ui-icon-reply:before { + content: "î…ž"; +} + +.ui-icon-reply-all:before { + content: "î…Ÿ"; +} + +.ui-icon-report:before { + content: "î… "; +} + +.ui-icon-report-problem:before { + content: ""; +} + +.ui-icon-restaurant:before { + content: ""; +} + +.ui-icon-restaurant-menu:before { + content: "î•¡"; +} + +.ui-icon-restore:before { + content: ""; +} + +.ui-icon-restore-page:before { + content: ""; +} + +.ui-icon-ring-volume:before { + content: ""; +} + +.ui-icon-room:before { + content: ""; +} + +.ui-icon-room-service:before { + content: "î­‰"; +} + +.ui-icon-rotate-90-degrees-ccw:before { + content: "î˜"; +} + +.ui-icon-rotate-left:before { + content: "î™"; +} + +.ui-icon-rotate-right:before { + content: "îš"; +} + +.ui-icon-rounded-corner:before { + content: ""; +} + +.ui-icon-router:before { + content: ""; +} + +.ui-icon-rowing:before { + content: ""; +} + +.ui-icon-rss-feed:before { + content: ""; +} + +.ui-icon-rv-hookup:before { + content: ""; +} + +.ui-icon-satellite:before { + content: "î•¢"; +} + +.ui-icon-save:before { + content: "î…¡"; +} + +.ui-icon-scanner:before { + content: ""; +} + +.ui-icon-schedule:before { + content: ""; +} + +.ui-icon-school:before { + content: "î Œ"; +} + +.ui-icon-screen-lock-landscape:before { + content: ""; +} + +.ui-icon-screen-lock-portrait:before { + content: ""; +} + +.ui-icon-screen-lock-rotation:before { + content: ""; +} + +.ui-icon-screen-rotation:before { + content: "î‡"; +} + +.ui-icon-screen-share:before { + content: ""; +} + +.ui-icon-sd-card:before { + content: ""; +} + +.ui-icon-sd-storage:before { + content: ""; +} + +.ui-icon-search:before { + content: ""; +} + +.ui-icon-security:before { + content: ""; +} + +.ui-icon-select-all:before { + content: "î…¢"; +} + +.ui-icon-send:before { + content: "î…£"; +} + +.ui-icon-sentiment-dissatisfied:before { + content: "î ‘"; +} + +.ui-icon-sentiment-neutral:before { + content: "î ’"; +} + +.ui-icon-sentiment-satisfied:before { + content: "î “"; +} + +.ui-icon-sentiment-very-dissatisfied:before { + content: "î ”"; +} + +.ui-icon-sentiment-very-satisfied:before { + content: "î •"; +} + +.ui-icon-settings:before { + content: ""; +} + +.ui-icon-settings-applications:before { + content: ""; +} + +.ui-icon-settings-backup-restore:before { + content: ""; +} + +.ui-icon-settings-bluetooth:before { + content: ""; +} + +.ui-icon-settings-brightness:before { + content: ""; +} + +.ui-icon-settings-cell:before { + content: ""; +} + +.ui-icon-settings-ethernet:before { + content: ""; +} + +.ui-icon-settings-input-antenna:before { + content: ""; +} + +.ui-icon-settings-input-component:before { + content: ""; +} + +.ui-icon-settings-input-composite:before { + content: "î£"; +} + +.ui-icon-settings-input-hdmi:before { + content: ""; +} + +.ui-icon-settings-input-svideo:before { + content: ""; +} + +.ui-icon-settings-overscan:before { + content: ""; +} + +.ui-icon-settings-phone:before { + content: ""; +} + +.ui-icon-settings-power:before { + content: ""; +} + +.ui-icon-settings-remote:before { + content: ""; +} + +.ui-icon-settings-system-daydream:before { + content: ""; +} + +.ui-icon-settings-voice:before { + content: ""; +} + +.ui-icon-share:before { + content: "î "; +} + +.ui-icon-shop:before { + content: ""; +} + +.ui-icon-shop-two:before { + content: ""; +} + +.ui-icon-shopping-basket:before { + content: ""; +} + +.ui-icon-shopping-cart:before { + content: ""; +} + +.ui-icon-short-text:before { + content: ""; +} + +.ui-icon-show-chart:before { + content: ""; +} + +.ui-icon-shuffle:before { + content: "îƒ"; +} + +.ui-icon-signal-cellular-4-bar:before { + content: ""; +} + +.ui-icon-signal-cellular-connected-no-internet-4-bar:before { + content: "î‡"; +} + +.ui-icon-signal-cellular-no-sim:before { + content: ""; +} + +.ui-icon-signal-cellular-null:before { + content: "î‡"; +} + +.ui-icon-signal-cellular-off:before { + content: "î‡"; +} + +.ui-icon-signal-wifi-4-bar:before { + content: ""; +} + +.ui-icon-signal-wifi-4-bar-lock:before { + content: ""; +} + +.ui-icon-signal-wifi-off:before { + content: ""; +} + +.ui-icon-sim-card:before { + content: ""; +} + +.ui-icon-sim-card-alert:before { + content: ""; +} + +.ui-icon-skip-next:before { + content: "î„"; +} + +.ui-icon-skip-previous:before { + content: "î…"; +} + +.ui-icon-slideshow:before { + content: "î›"; +} + +.ui-icon-slow-motion-video:before { + content: "î¨"; +} + +.ui-icon-smartphone:before { + content: ""; +} + +.ui-icon-smoke-free:before { + content: "î­Š"; +} + +.ui-icon-smoking-rooms:before { + content: "î­‹"; +} + +.ui-icon-sms:before { + content: ""; +} + +.ui-icon-sms-failed:before { + content: ""; +} + +.ui-icon-snooze:before { + content: "î†"; +} + +.ui-icon-sort:before { + content: "î…¤"; +} + +.ui-icon-sort-by-alpha:before { + content: "î“"; +} + +.ui-icon-spa:before { + content: "î­Œ"; +} + +.ui-icon-space-bar:before { + content: ""; +} + +.ui-icon-speaker:before { + content: ""; +} + +.ui-icon-speaker-group:before { + content: ""; +} + +.ui-icon-speaker-notes:before { + content: "î£"; +} + +.ui-icon-speaker-notes-off:before { + content: ""; +} + +.ui-icon-speaker-phone:before { + content: ""; +} + +.ui-icon-spellcheck:before { + content: ""; +} + +.ui-icon-star:before { + content: "î ¸"; +} + +.ui-icon-star-border:before { + content: "î º"; +} + +.ui-icon-star-half:before { + content: "î ¹"; +} + +.ui-icon-stars:before { + content: "î£"; +} + +.ui-icon-stay-current-landscape:before { + content: ""; +} + +.ui-icon-stay-current-portrait:before { + content: ""; +} + +.ui-icon-stay-primary-landscape:before { + content: ""; +} + +.ui-icon-stay-primary-portrait:before { + content: ""; +} + +.ui-icon-stop:before { + content: "î‡"; +} + +.ui-icon-stop-screen-share:before { + content: ""; +} + +.ui-icon-storage:before { + content: ""; +} + +.ui-icon-store:before { + content: ""; +} + +.ui-icon-store-mall-directory:before { + content: "î•£"; +} + +.ui-icon-straighten:before { + content: "îœ"; +} + +.ui-icon-streetview:before { + content: "î•®"; +} + +.ui-icon-strikethrough-s:before { + content: ""; +} + +.ui-icon-style:before { + content: "î"; +} + +.ui-icon-subdirectory-arrow-left:before { + content: "î—™"; +} + +.ui-icon-subdirectory-arrow-right:before { + content: "î—š"; +} + +.ui-icon-subject:before { + content: ""; +} + +.ui-icon-subscriptions:before { + content: "î¤"; +} + +.ui-icon-subtitles:before { + content: "îˆ"; +} + +.ui-icon-subway:before { + content: ""; +} + +.ui-icon-supervisor-account:before { + content: ""; +} + +.ui-icon-surround-sound:before { + content: "î‰"; +} + +.ui-icon-swap-calls:before { + content: ""; +} + +.ui-icon-swap-horiz:before { + content: ""; +} + +.ui-icon-swap-vert:before { + content: ""; +} + +.ui-icon-swap-vertical-circle:before { + content: ""; +} + +.ui-icon-switch-camera:before { + content: "îž"; +} + +.ui-icon-switch-video:before { + content: "îŸ"; +} + +.ui-icon-sync:before { + content: ""; +} + +.ui-icon-sync-disabled:before { + content: ""; +} + +.ui-icon-sync-problem:before { + content: ""; +} + +.ui-icon-system-update:before { + content: ""; +} + +.ui-icon-system-update-alt:before { + content: ""; +} + +.ui-icon-tab:before { + content: ""; +} + +.ui-icon-tab-unselected:before { + content: ""; +} + +.ui-icon-tablet:before { + content: ""; +} + +.ui-icon-tablet-android:before { + content: ""; +} + +.ui-icon-tablet-mac:before { + content: ""; +} + +.ui-icon-tag-faces:before { + content: "î "; +} + +.ui-icon-tap-and-play:before { + content: ""; +} + +.ui-icon-terrain:before { + content: ""; +} + +.ui-icon-text-fields:before { + content: ""; +} + +.ui-icon-text-format:before { + content: "î…¥"; +} + +.ui-icon-textsms:before { + content: ""; +} + +.ui-icon-texture:before { + content: "î¡"; +} + +.ui-icon-theaters:before { + content: ""; +} + +.ui-icon-thumb-down:before { + content: ""; +} + +.ui-icon-thumb-up:before { + content: ""; +} + +.ui-icon-thumbs-up-down:before { + content: "î£"; +} + +.ui-icon-time-to-leave:before { + content: ""; +} + +.ui-icon-timelapse:before { + content: "î¢"; +} + +.ui-icon-timeline:before { + content: ""; +} + +.ui-icon-timer:before { + content: "î¥"; +} + +.ui-icon-timer-10:before { + content: "î£"; +} + +.ui-icon-timer-3:before { + content: "î¤"; +} + +.ui-icon-timer-off:before { + content: "î¦"; +} + +.ui-icon-title:before { + content: ""; +} + +.ui-icon-toc:before { + content: ""; +} + +.ui-icon-today:before { + content: ""; +} + +.ui-icon-toll:before { + content: ""; +} + +.ui-icon-tonality:before { + content: "î§"; +} + +.ui-icon-touch-app:before { + content: ""; +} + +.ui-icon-toys:before { + content: ""; +} + +.ui-icon-track-changes:before { + content: ""; +} + +.ui-icon-traffic:before { + content: "î•¥"; +} + +.ui-icon-train:before { + content: "î•°"; +} + +.ui-icon-tram:before { + content: ""; +} + +.ui-icon-transfer-within-a-station:before { + content: ""; +} + +.ui-icon-transform:before { + content: "î¨"; +} + +.ui-icon-translate:before { + content: ""; +} + +.ui-icon-trending-down:before { + content: ""; +} + +.ui-icon-trending-flat:before { + content: ""; +} + +.ui-icon-trending-up:before { + content: ""; +} + +.ui-icon-tune:before { + content: "î©"; +} + +.ui-icon-turned-in:before { + content: ""; +} + +.ui-icon-turned-in-not:before { + content: ""; +} + +.ui-icon-tv:before { + content: ""; +} + +.ui-icon-unarchive:before { + content: "î…©"; +} + +.ui-icon-undo:before { + content: "î…¦"; +} + +.ui-icon-unfold-less:before { + content: "î—–"; +} + +.ui-icon-unfold-more:before { + content: "î——"; +} + +.ui-icon-update:before { + content: ""; +} + +.ui-icon-usb:before { + content: ""; +} + +.ui-icon-verified-user:before { + content: ""; +} + +.ui-icon-vertical-align-bottom:before { + content: ""; +} + +.ui-icon-vertical-align-center:before { + content: ""; +} + +.ui-icon-vertical-align-top:before { + content: ""; +} + +.ui-icon-vibration:before { + content: ""; +} + +.ui-icon-video-call:before { + content: "î°"; +} + +.ui-icon-video-label:before { + content: "î±"; +} + +.ui-icon-video-library:before { + content: "îŠ"; +} + +.ui-icon-videocam:before { + content: "î‹"; +} + +.ui-icon-videocam-off:before { + content: "îŒ"; +} + +.ui-icon-videogame-asset:before { + content: ""; +} + +.ui-icon-view-agenda:before { + content: ""; +} + +.ui-icon-view-array:before { + content: ""; +} + +.ui-icon-view-carousel:before { + content: ""; +} + +.ui-icon-view-column:before { + content: ""; +} + +.ui-icon-view-comfy:before { + content: "îª"; +} + +.ui-icon-view-compact:before { + content: "î«"; +} + +.ui-icon-view-day:before { + content: ""; +} + +.ui-icon-view-headline:before { + content: ""; +} + +.ui-icon-view-list:before { + content: ""; +} + +.ui-icon-view-module:before { + content: ""; +} + +.ui-icon-view-quilt:before { + content: ""; +} + +.ui-icon-view-stream:before { + content: ""; +} + +.ui-icon-view-week:before { + content: ""; +} + +.ui-icon-vignette:before { + content: "îµ"; +} + +.ui-icon-visibility:before { + content: ""; +} + +.ui-icon-visibility-off:before { + content: ""; +} + +.ui-icon-voice-chat:before { + content: ""; +} + +.ui-icon-voicemail:before { + content: ""; +} + +.ui-icon-volume-down:before { + content: "î"; +} + +.ui-icon-volume-mute:before { + content: "îŽ"; +} + +.ui-icon-volume-off:before { + content: "î"; +} + +.ui-icon-volume-up:before { + content: "î"; +} + +.ui-icon-vpn-key:before { + content: ""; +} + +.ui-icon-vpn-lock:before { + content: ""; +} + +.ui-icon-wallpaper:before { + content: ""; +} + +.ui-icon-warning:before { + content: ""; +} + +.ui-icon-watch:before { + content: ""; +} + +.ui-icon-watch-later:before { + content: ""; +} + +.ui-icon-wb-auto:before { + content: "î¬"; +} + +.ui-icon-wb-cloudy:before { + content: "î­"; +} + +.ui-icon-wb-incandescent:before { + content: "î®"; +} + +.ui-icon-wb-iridescent:before { + content: "î¶"; +} + +.ui-icon-wb-sunny:before { + content: "î°"; +} + +.ui-icon-wc:before { + content: ""; +} + +.ui-icon-web:before { + content: "î‘"; +} + +.ui-icon-web-asset:before { + content: "î©"; +} + +.ui-icon-weekend:before { + content: "î…«"; +} + +.ui-icon-whatshot:before { + content: "î Ž"; +} + +.ui-icon-widgets:before { + content: ""; +} + +.ui-icon-wifi:before { + content: ""; +} + +.ui-icon-wifi-lock:before { + content: ""; +} + +.ui-icon-wifi-tethering:before { + content: ""; +} + +.ui-icon-work:before { + content: ""; +} + +.ui-icon-wrap-text:before { + content: ""; +} + +.ui-icon-youtube-searched-for:before { + content: ""; +} + +.ui-icon-zoom-in:before { + content: ""; +} + +.ui-icon-zoom-out:before { + content: ""; +} + +.ui-icon-zoom-out-map:before { + content: "î•«"; +} + +/* Add your customizations of theme here */ diff --git a/ace-web/src/main/webapp/resources/primefaces-serenity-green/theme.scss b/ace-web/src/main/webapp/resources/primefaces-serenity-green/theme.scss new file mode 100644 index 0000000..7028105 --- /dev/null +++ b/ace-web/src/main/webapp/resources/primefaces-serenity-green/theme.scss @@ -0,0 +1,11 @@ +$primaryColor:#29ABE1; +$primaryDarkColor:#2341BB; +$primaryLightColor:#8AD4F2; +$primaryLightestColor:#A8E1F7; +$primaryTextColor:#ffffff; +$accentColor:#29ABE1; +$accentDarkColor: #2341BB; +$accentLightColor: #8AD4F2; +$accentTextColor: #ffffff; + +@import '../sass/theme/_theme'; diff --git a/ace-web/src/main/webapp/resources/sass/_fonts.scss b/ace-web/src/main/webapp/resources/sass/_fonts.scss new file mode 100644 index 0000000..01221e2 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/_fonts.scss @@ -0,0 +1,51 @@ +/* roboto-300 - latin */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 300; + src: url("\#{resource['serenity-layout:fonts/roboto-v15-latin-300.eot']}"); /* IE9 Compat Modes */ + src: local('Roboto Light'), local('Roboto-Light'), + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-300.eot']}#iefix") format('embedded-opentype'), /* IE6-IE8 */ + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-300.woff2']}") format('woff2'), /* Super Modern Browsers */ + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-300.woff']}") format('woff'), /* Modern Browsers */ + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-300.ttf']}") format('truetype'), /* Safari, Android, iOS */ + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-300.svg']}#Roboto") format('svg'); /* Legacy iOS */ +} +/* roboto-regular - latin */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: url("\#{resource['serenity-layout:fonts/roboto-v15-latin-regular.eot']}"); /* IE9 Compat Modes */ + src: local('Roboto'), local('Roboto-Regular'), + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-regular.eot']}#iefix") format('embedded-opentype'), /* IE6-IE8 */ + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-regular.woff2']}") format('woff2'), /* Super Modern Browsers */ + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-regular.woff']}") format('woff'), /* Modern Browsers */ + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-regular.ttf']}") format('truetype'), /* Safari, Android, iOS */ + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-regular.svg']}#Roboto") format('svg'); /* Legacy iOS */ +} +/* roboto-700 - latin */ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: 700; + src: url("\#{resource['serenity-layout:fonts/roboto-v15-latin-700.eot']}"); /* IE9 Compat Modes */ + src: local('Roboto Bold'), local('Roboto-Bold'), + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-700.eot']}#iefix") format('embedded-opentype'), /* IE6-IE8 */ + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-700.woff2']}") format('woff2'), /* Super Modern Browsers */ + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-700.woff']}") format('woff'), /* Modern Browsers */ + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-700.ttf']}") format('truetype'), /* Safari, Android, iOS */ + url("\#{resource['serenity-layout:fonts/roboto-v15-latin-700.svg']}#Roboto") format('svg'); /* Legacy iOS */ +} + +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: url("\#{resource['serenity-layout:fonts/MaterialIcons-Regular.eot']}"); /* For IE6-8 */ + src: local('Material Icons'), + local('MaterialIcons-Regular'), + url("\#{resource['serenity-layout:fonts/MaterialIcons-Regular.woff2']}") format('woff2'), + url("\#{resource['serenity-layout:fonts/MaterialIcons-Regular.woff']}") format('woff'), + url("\#{resource['serenity-layout:fonts/MaterialIcons-Regular.ttf']}") format('truetype'); +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/_layout_styles.scss b/ace-web/src/main/webapp/resources/sass/_layout_styles.scss new file mode 100644 index 0000000..bff78a4 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/_layout_styles.scss @@ -0,0 +1 @@ +/* Add your customizations of layout here */ \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/_mixins.scss b/ace-web/src/main/webapp/resources/sass/_mixins.scss new file mode 100644 index 0000000..c726b8e --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/_mixins.scss @@ -0,0 +1,225 @@ +@mixin border-radius($val) { + -moz-border-radius: $val; + -webkit-border-radius: $val; + border-radius: $val; +} + +@mixin border-radius-right($val) { + -moz-border-radius-topright: $val; + -webkit-border-top-right-radius: $val; + border-top-right-radius: $val; + -moz-border-radius-bottomright: $val; + -webkit-border-bottom-right-radius: $val; + border-bottom-right-radius: $val; +} + +@mixin border-radius-left($val) { + -moz-border-radius-topleft: $val; + -webkit-border-top-left-radius: $val; + border-top-left-radius: $val; + -moz-border-radius-bottomleft: $val; + -webkit-border-bottom-left-radius: $val; + border-bottom-left-radius: $val; +} + +@mixin border-radius-top($val) { + -moz-border-radius-topleft: $val; + -webkit-border-top-left-radius: $val; + border-top-left-radius: $val; + -moz-border-radius-topright: $val; + -webkit-border-top-right-radius: $val; + border-top-right-radius: $val; +} + +@mixin border-radius-bottom($val) { + -moz-border-radius-bottomleft: $val; + -webkit-border-bottom-left-radius: $val; + border-bottom-left-radius: $val; + -moz-border-radius-bottomright: $val; + -webkit-border-bottom-right-radius: $val; + border-bottom-right-radius: $val; +} + +@mixin gradient($deg, $color1, $color2) { + background: -moz-linear-gradient($deg, $color1 0%, $color2 100%); /* ff3.6+ */ + background: -webkit-gradient(linear, left bottom, right top, color-stop(0%, $color1), color-stop(100%, $color2)); /* safari4+,chrome */ + background: -webkit-linear-gradient($deg, $color1 0%, $color2 100%); /* safari5.1+,chrome10+ */ + background: -o-linear-gradient($deg, $color1 0%, $color2 100%); /* opera 11.10+ */ + background: -ms-linear-gradient($deg, $color1 0%, $color2 100%); /* ie10+ */ + background: linear-gradient($deg, $color1 0%, $color2 100%); /* w3c */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#{$color1}', endColorstr='#{$color2}',GradientType=1 ); /* ie6-9 */ +} + +@mixin background-gradient-left2right($start-color, $end-color) { + background-color: $start-color; + background-image: -webkit-gradient(linear, left top, right top, from($start-color), to($end-color)); + background-image: -webkit-linear-gradient(left, $start-color, $end-color); + background-image: -moz-linear-gradient(left, $start-color, $end-color); + background-image: -ms-linear-gradient(left, $start-color, $end-color); + background-image: -o-linear-gradient(left, $start-color, $end-color); + background-image: linear-gradient(left, $start-color, $end-color); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start-color}', endColorstr='#{$end-color}', gradientType='1'); +} + +@mixin background-gradient-top2bottom($start-color, $end-color) { + background-color: $start-color; + background-image: -webkit-gradient(linear, left top, left bottom, from($start-color), to($end-color)); + background-image: -webkit-linear-gradient(top, $start-color, $end-color); + background-image: -moz-linear-gradient(top, $start-color, $end-color); + background-image: -ms-linear-gradient(top, $start-color, $end-color); + background-image: -o-linear-gradient(top, $start-color, $end-color); + background-image: linear-gradient(to bottom, $start-color, $end-color); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$start-color}', endColorstr='#{$end-color}'); +} + +@mixin transition($transition...) { + -moz-transition: $transition; + -o-transition: $transition; + -webkit-transition: $transition; + transition: $transition; +} + +@mixin content-shadow() { + box-shadow: 0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12); + -webkit-box-shadow: 0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12); + -moz-box-shadow: 0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12) +} + +@mixin overlay-shadow { + -webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3); + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3); +} + +@mixin overlay-content-shadow() { + -webkit-box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); + -moz-box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); + box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); +} + +@mixin overlay-input-shadow() { + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); + -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); + box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); +} + +@mixin no-shadow() { + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; +} + +@mixin shadow($value) { + -webkit-box-shadow: $value; + -moz-box-shadow: $value; + box-shadow: $value; +} + +@mixin multi-shadow($value1, $value2, $value3) { + -webkit-box-shadow: $value1, $value2, $value3; + -moz-box-shadow: $value1, $value2, $value3; + box-shadow: $value1, $value2, $value3; +} + +@mixin box-sizing($box-model) { + -webkit-box-sizing: $box-model; + -moz-box-sizing: $box-model; + box-sizing: $box-model; +} + +@mixin hover-element { + background-color: $hoverBgColor; + color: $hoverTextColor; +} + +@mixin hover-element-primary { + background-color: $primaryLightColor; + color: $hoverTextColor; +} + +@mixin opacity($opacity) { + opacity: $opacity; + $opacity-ie: $opacity * 100; + filter: alpha(opacity=$opacity-ie); +} + +@mixin icon-override($icon) { + &:before { + content: $icon; + } +} + +@mixin border-box-sizing() { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +@mixin material-icon($icon) { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + + /* Support for IE. */ + font-feature-settings: 'liga'; + + &:before { + content: $icon; + } +} + +@mixin rotate($deg) { + -webkit-transform: rotate($deg); + -moz-transform: rotate($deg); + -o-transform: rotate($deg); + -ms-transform: rotate($deg); + transform: rotate($deg); +} + +@mixin scale($deg) { + -webkit-transform: scale($deg); + -moz-transform: scale($deg); + -o-transform: scale($deg); + -ms-transform: scale($deg); + transform: scale($deg); +} + +@mixin rippleitem() { + position: relative; + overflow: hidden; +} + +@mixin clearfix() { + &:before, + &:after { + content: ""; + display: table; + } + &:after { + clear: both; + } +} + +@mixin flex() { + display: -webkit-box; + display: -ms-flexbox; + display: flex; +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/_theme_styles.scss b/ace-web/src/main/webapp/resources/sass/_theme_styles.scss new file mode 100644 index 0000000..3b23bff --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/_theme_styles.scss @@ -0,0 +1 @@ +/* Add your customizations of theme here */ \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/layout/_dashboard.scss b/ace-web/src/main/webapp/resources/sass/layout/_dashboard.scss new file mode 100644 index 0000000..92f13bc --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/layout/_dashboard.scss @@ -0,0 +1,768 @@ +.dashboard { + + .task-box { + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + + .task-box-header { + @include clearfix(); + padding: 8px 14px; + + i { + float: right; + color: #ffffff; + } + } + + .task-box-content { + background-color: #ffffff; + padding: 8px 14px; + + h3 { + font-weight: bold; + font-size: $fontSize; + margin: 14px 0 7px 0; + padding: 0; + } + + p { + color: $textSecondaryColor; + margin: 0 0 28px 0; + padding: 0; + } + } + + .task-box-footer { + @include clearfix(); + background-color: #ffffff; + padding: 8px 14px; + + img { + width: 32px; + float: right; + margin-left: 4px; + } + + .task-status { + @include border-radius(9px); + padding: 2px 8px; + color: #ffffff; + } + } + + &.task-box-1 { + .task-box-header { + background-color: #e91e63; + } + + .task-box-footer { + .task-status { + background-color: #e91e63; + } + } + } + + &.task-box-2 { + .task-box-header { + background-color: #ffc107; + } + + .task-box-footer { + .task-status { + background-color: #ffc107; + } + } + } + + &.task-box-3 { + .task-box-header { + background-color: #00bcd4; + } + + .task-box-footer { + .task-status { + background-color: #00bcd4; + } + } + } + } + + .overview-box { + text-align: center; + color: #ffffff; + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + + .overview-box-header { + height: 24px; + } + + .overview-box-content { + padding: 8px 14px 14px 14px; + + .overview-box-icon { + @include border-radius(50%); + width: 40px; + height: 40px; + line-height: 40px; + margin: 0 auto; + margin-top: -28px; + + i { + line-height: inherit; + font-size: 28px; + } + } + + .overview-box-title { + font-size: 16px; + } + + .overview-box-count { + font-size: 24px; + } + } + + &.overview-box-1 { + .overview-box-header { + background-color: #f06292; + } + + .overview-box-content { + background-color: #e91e63; + + .overview-box-icon { + background-color: #e91e63; + } + } + } + + &.overview-box-2 { + .overview-box-header { + background-color: #4dd0e1; + } + + .overview-box-content { + background-color: #00bcd4; + + .overview-box-icon { + background-color: #00bcd4; + } + } + } + + &.overview-box-3 { + .overview-box-header { + background-color: #ffd54f; + } + + .overview-box-content { + background-color: #ffc107; + + .overview-box-icon { + background-color: #ffc107; + } + } + } + + &.overview-box-4 { + .overview-box-header { + background-color: #9e9e9e; + } + + .overview-box-content { + background-color: #616161; + + .overview-box-icon { + background-color: #616161; + } + } + } + } + + .task-list { + overflow: hidden; + + > .ui-panel { + min-height: 340px; + border: 0 none; + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + } + + .ui-panel-content { + padding: 10px 0 !important; + } + + button { + margin-top: -25px; + margin-right: 10px; + float: right; + } + + ul { + list-style-type: none; + margin: 0; + padding: 0; + + li { + padding: 9.76px 14px; + border-bottom: 1px solid #dbdbdb; + + &:first-child { + margin-top: 10px; + } + } + + .ui-chkbox { + vertical-align: middle; + margin-right: 5px; + } + + .task-name { + vertical-align: middle; + } + + i { + color: $textSecondaryColor; + float: right; + } + } + } + + .contact-form { + overflow: hidden; + + .ui-panel { + min-height: 340px; + border: 0 none; + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + } + + .ui-g-12 { + padding: 16px 10px; + } + + .ui-button { + margin-top: 20px; + } + } + + .messages { + overflow: hidden; + + > .ui-panel { + min-height: 340px; + border: 0 none; + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + } + + .ui-panel-content { + padding: 15px 0 10px 0 !important; + } + + ul { + list-style-type: none; + padding: 0; + margin: 0; + + li { + border-bottom: 1px solid #d8d8d8; + + a { + padding: 9px; + width: 100%; + box-sizing: border-box; + text-decoration: none; + position: relative; + display: block; + @include border-radius(2px); + @include transition(background-color .2s); + @include clearfix(); + + img { + float: left; + } + + > div { + float: left; + margin-left: 10px; + + .name { + font-size: 14px; + font-weight: 700; + display: block; + color: $textColor; + } + + .message { + font-size: 14px; + color: $textSecondaryColor; + } + } + + button { + position: absolute; + top: 15px; + + &.message-btn { + right: 20px; + } + + &.remove-btn { + right: 60px; + } + } + + &:hover { + cursor: pointer; + background-color: #e8e8e8; + } + } + + &:last-child { + border: 0; + } + } + } + } + + .chat { + .ui-panel { + border: 0 none; + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + } + + .ui-panel-content { + padding: 0 !important; + } + + .ui-tabs { + border-color: transparent; + } + + ul { + padding: 12px; + margin: 0; + list-style-type: none; + + li { + padding: 6px 0; + @include clearfix(); + + img { + width: 36px; + float: left; + } + + span { + padding: 6px 12px; + float: left; + display: inline-block; + margin: 4px 0; + @include border-radius(10px); + } + + &.message-from { + img, span { + float: left; + } + + img { + margin-right: 8px; + } + + span { + background-color: #e8eaf6; + } + } + + &.message-own { + img, span { + float: right; + } + + img { + margin-left: 8px; + } + + span { + background: #c8e6c9; + color: #000000; + } + } + } + } + + .new-message { + height: 40px; + border-top: 1px solid #dce2e7; + color: #afafc0; + + .message-attachment { + display: inline-block; + border-right: 1px solid #dce2e7; + width: 40px; + line-height: 40px; + height: 100%; + text-align: center; + + i { + line-height: inherit; + font-size: 24px; + } + } + + .message-input { + position: relative; + top: -6px; + width: calc(100% - 100px); + display: inline-block; + + input { + border: 0 none; + font-size: 14px; + width: 100%; + background-color: transparent; + outline: 0 none; + color: $textSecondaryColor; + } + } + } + } + + .global-sales { + .header-helper { + float:right; + @include opacity(.7); + } + + .ui-panel { + border: 0 none; + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + } + + .ui-panel-content { + padding: 14px 9px 0px 9px; + } + + table { + width: 100%; + border-collapse: collapse; + + th { + font-weight: 700; + text-align: left; + padding: 8px 5px; + } + + tbody { + tr { + border-top: 1px solid $dividerColor; + + img { + width: 36px; + height: 36px; + } + + td { + padding: 8px 5px; + + &:nth-child(1) { + font-weight: 700; + text-align: center; + } + + &:nth-child(3) { + font-weight: 700; + } + + &:nth-child(7) { + text-align: right; + + button { + margin-left: 10px; + } + } + + .up-arrow { + color: #cddc39; + } + + .down-arrow { + color: #e91e63; + } + } + } + } + } + } + + .status-bars { + ul { + margin: 0; + padding: 0; + list-style-type: none; + + li { + padding: 8px 14px; + position: relative; + + span { + position: absolute; + right: 36px; + top: 8px; + } + + i { + position: absolute; + right: 4px; + top: 4px; + } + } + } + + .status-bar { + height: 18px; + width: 75%; + background-color: #d8d8d8; + @include border-radius(6px); + + .status-bar-value { + height: 100%; + color: #ffffff; + text-align: right; + padding-right: 4px; + padding-top: 1px; + @include box-sizing(border-box); + @include border-radius(6px); + } + + &.status-bar-1 { + .status-bar-value { + background-color: #e91e63; + } + + ~ i { + color: #e91e63; + } + } + + &.status-bar-2 { + .status-bar-value { + background-color: #00bcd4; + } + + ~ i { + color: #00bcd4; + } + } + + &.status-bar-3 { + .status-bar-value { + background-color: #ffc107; + } + + ~ i { + color: #ffc107; + } + } + + &.status-bar-4 { + .status-bar-value { + background-color: #cddc39; + } + + ~ i { + color: #cddc39; + } + } + + &.status-bar-5 { + .status-bar-value { + background-color: #ff9800; + } + + ~ i { + color: #ff9800; + } + } + } + } + + .image-box { + .card { + padding: 0; + img { + width: 100%; + } + + .image-box-content { + padding: 16px; + + h3 { + font-weight: 700; + margin-top: 0; + } + + .image-box-tag { + width: 40px; + text-align: left; + color: #ffffff; + background-color: #e91e63; + padding: 0 8px; + @include border-radius(6px); + } + } + + .image-box-footer { + text-align: right; + } + } + } + + .user-card { + border:1px solid $dividerColor; + padding: 0; + @include border-radius($borderRadius); + + .user-card-header { + height: 100px; + overflow: hidden; + + img { + width: 100%; + } + } + + .user-card-content { + min-height: 340px; + background-color: #ffffff; + position: relative; + + img { + position: absolute; + top: -90px; + left: 24px; + } + + .ui-button { + position: absolute; + width: 36px; + height: 36px; + top: -18px; + right: 24px; + } + + .user-card-name { + font-size: 20px; + color: $textColor; + position: absolute; + top: -60px; + margin-left: 110px; + font-weight: 700; + white-space: nowrap; + } + + .user-detail { + text-align: left; + + ul { + padding: 0px 0 32px 0; + margin: 0; + list-style-type: none; + + li { + padding: 16px 24px; + border-top: 1px solid $dividerColor; + + &:last-child { + border-bottom: 1px solid $dividerColor; + } + + i { + font-size: 24px; + margin-right: 8px; + width: 32px; + vertical-align: middle; + } + + .project-title { + font-weight: 700; + margin-right: 8px; + } + + .project-detail { + color: $textSecondaryColor; + } + + .project-progressbar { + display: inline-block; + width: 100px; + background-color: $dividerColor; + float: right; + margin-top: 12px; + + .project-progressbar-value { + background-color: $primaryColor; + height: 4px; + } + } + } + } + } + } + } + + .map { + .ui-panel { + border: 0 none; + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + + .ui-panel-content { + padding: 8px; + + img { + width: 100%; + } + } + } + } + + .schedule { + .ui-panel { + border: 0 none; + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + + .fc-today-button { + display: none; + } + } + } +} + +@media (max-width: 640px) { + .dashboard { + .status-bars { + .status-bar { + width: 65%; + } + } + + .global-sales { + table { + tbody { + tr td:nth-child(7) { + text-align: left; + + button { + display: block; + margin-left: 0; + + &:first-child { + margin-bottom: 4px; + } + } + } + } + } + } + } +} diff --git a/ace-web/src/main/webapp/resources/sass/layout/_exception.scss b/ace-web/src/main/webapp/resources/sass/layout/_exception.scss new file mode 100644 index 0000000..2d36c76 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/layout/_exception.scss @@ -0,0 +1,168 @@ +.exception-body { + height: 100%; + background-position: center; + background-repeat: no-repeat; + background-size: cover; + + &.error { + background-image: url("\#{resource['serenity-layout:images/exception/error-bg.jpg']}"); + + .exception-panel { + .exception-code { + background-color: #e91e63; + + img { + margin-left: -194px; + } + } + + .exception-icon { + background-color: #e91e63; + } + } + } + + &.notfound { + background-image: url("\#{resource['serenity-layout:images/exception/notfound-bg.jpg']}"); + + .exception-panel { + .exception-code { + background-color: #e91e63; + + img { + margin-left: -206px; + } + } + + .exception-icon { + background-color: #e91e63; + } + } + } + + &.accessdenied { + background-image: url("\#{resource['serenity-layout:images/exception/access-bg.jpg']}"); + + .exception-panel { + .exception-code { + background-color: #ffb300; + + img { + margin-left: -178px; + } + } + + .exception-icon { + background-color: #ffb300; + } + } + } + + .exception-panel { + width: 550px; + height: 480px; + background-color: #ffffff; + position: absolute; + left: 50%; + top: 50%; + margin-left: -275px; + margin-top: -240px; + padding: 0; + text-align: center; + @include border-radius(2px); + @include multi-shadow(0 3px 5px 0 rgba(0, 0, 0, 0.2), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 6px 10px 0 rgba(0, 0, 0, 0.14)); + + .exception-code { + height: 240px; + position: relative; + + img { + position: absolute; + bottom: 0; + height: 190px; + left: 50%; + } + } + + .exception-detail { + height: 240px; + position: relative; + padding: 60px 0 0 0; + + .exception-icon { + width: 90px; + height: 90px; + line-height: 90px; + text-align: center; + display: inline-block; + z-index: 100; + position: absolute; + top: -45px; + left: 50%; + margin-left: -45px; + @include border-radius(50%); + @include multi-shadow(0 1px 2px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 0 1px 0 rgba(0, 0, 0, 0.14)); + + i { + font-size: 45px; + line-height: inherit; + color: #ffffff; + } + } + + h1 { + font-size: 15px; + font-weight: bold; + margin: 10px 0 8px 0; + } + + p { + color: $textSecondaryColor; + margin: 0 0 60px 0; + } + } + } +} + +@media (max-width: 640px) { + .exception-body { + .exception-panel { + left: 0; + margin-left: 0; + width: 100%; + } + + &.error { + .exception-panel { + .exception-code { + img { + height: 150px; + margin-left: -150px; + } + } + } + } + + &.notfound { + .exception-panel { + .exception-code { + img { + height: 150px; + margin-left: -163px; + } + } + } + } + + &.accessdenied { + .exception-panel { + .exception-code { + img { + height: 150px; + margin-left: -141px; + } + } + } + } + } +} diff --git a/ace-web/src/main/webapp/resources/sass/layout/_horizontal.scss b/ace-web/src/main/webapp/resources/sass/layout/_horizontal.scss new file mode 100644 index 0000000..7e54e9e --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/layout/_horizontal.scss @@ -0,0 +1,453 @@ +@media (min-width: 1025px) { + .layout-wrapper { + &.layout-menu-horizontal { + + .layout-sidebar { + width: 100%; + height: auto; + top: 64px; + left: 0; + z-index: 99; + + @if variable-exists(horizontalMenuBgImageLight) { + background-image: url("\#{resource['serenity-layout:images/special/#{$horizontalMenuBgImageLight}']}"); + background-size: auto; + background-repeat: no-repeat; + background-color: $horizontalMenuBgColor; + } + + .sidebar-logo { + display: none; + } + + > .nano { + overflow: visible; + + > .nano-content { + margin-right: 0 !important; + display: inherit; + height: auto; + position: static; + overflow: visible; + overflow-x: visible; + + &.sidebar-scroll-content .layout-menu { + padding-bottom: 0; + } + } + + > .nano-pane { + display: none !important; + } + } + + .layout-menu { + margin: 0; + + > li { + width: auto; + padding: 0; + position: relative; + float: left; + + > a { + height: 44px; + padding-top: 12px; + @include box-sizing(border-box); + @include border-radius(0); + + &:hover { + background-color: $horizontalSubmenuitemHoverBgColor; + } + + .menuitem-text { + vertical-align: middle; + } + + i { + float: none; + position: static; + vertical-align: middle; + margin-top: 0; + top: auto; + right: auto; + margin-right: 5px; + + &.layout-submenu-toggler { + display: inline-block; + margin-top: 2px; + } + } + } + + &.active-menuitem { + > a { + color: $horizontalMenuActiveTextColor; + + i { + color: $horizontalMenuActiveTextColor; + } + + &:hover { + color: $horizontalMenuActiveHoverTextColor; + + i { + color: $horizontalMenuActiveHoverTextColor; + } + } + } + } + + > ul { + top: 44px; + left: 0; + width: 230px; + position: absolute; + padding: 0; + margin: 0; + z-index: 100; + overflow: auto; + max-height: 450px; + @include overlay-content-shadow(); + + li { + a { + padding-left: 40px; + + &:hover { + background-color: $horizontalSubmenuitemHoverBgColor; + } + + i { + float: none; + left: 10px; + + &:last-child { + right: 10px; + left: auto; + } + } + + .layout-submenu-toggler { + display: block; + left: auto; + right: 10px; + } + } + + ul { + li { + a { + padding-left: 50px; + + &:hover { + background-color: $horizontalSubmenuitemHoverBgColor; + } + + i:first-child { + left: 20px; + } + } + } + + ul { + li { + a { + padding-left: 60px; + + &:hover { + background-color: $horizontalSubmenuitemHoverBgColor; + } + + i:first-child { + left: 30px; + } + } + } + } + } + } + } + + &.active-menuitem { + > ul { + background-color: $horizontalSubmenuBgColor; + } + } + } + + li { + + a { + &:hover { + background-color: $horizontalSubmenuitemHoverBgColor; + color: $horizontalMenuActiveHoverTextColor; + i { + color: $horizontalMenuActiveHoverTextColor; + } + } + + .menuitem-badge { + left: 18px; + top: 15px; + display: block; + } + } + } + } + + &.layout-sidebar-dark { + background-color: $horizontalDarkSubmenuBgColor; + + @if variable-exists(horizontalMenuBgImageDark) { + background-image: url("\#{resource['serenity-layout:images/special/#{$horizontalMenuBgImageDark}']}"); + background-color: $horizontalDarkMenuBgColor; + } + + .layout-menu { + > li { + > a { + &:hover { + background-color: $horizontalSubmenuitemDarkHoverBgColor; + color: $horizontalSubmenuitemDarkHoverTextColor; + + i { + color:$horizontalDarkMenuActiveTextColor; + } + } + } + + > ul { + li { + a { + &:hover { + background-color: $horizontalSubmenuitemDarkHoverBgColor; + } + } + } + } + } + + li { + a { + &:hover { + color: $horizontalSubmenuitemDarkHoverTextColor; + + i { + color: $horizontalSubmenuitemDarkHoverTextColor; + } + } + } + + &.active-menuitem { + > a { + @if not variable-exists(horizontalMenuBgImageDark) { + color: lighten($primaryLightColor, 6%); + + i { + color: lighten($primaryLightColor, 6%); + } + } + + &:hover { + color: $horizontalDarkMenuActiveHoverTextColor; + + i { + color: $horizontalDarkMenuActiveHoverTextColor; + } + } + } + } + } + + > li { + &.active-menuitem { + > a { + color: $horizontalDarkMenuActiveTextColor; + + i { + color: $horizontalDarkMenuActiveTextColor; + } + } + + > ul { + background-color: $horizontalDarkSubmenuBgColor; + } + } + } + } + } + } + + .layout-main { + margin-left: 0px; + } + + .layout-topbar { + width: 100%; + + .topbar-logo { + float: left; + margin-top: -10px; + margin-right: 20px; + display: inline-block; + + img { + height: 56px; + vertical-align: middle; + } + + .app-name { + color: $primaryTextColor; + font-size: 26px; + } + } + + .layout-topbar-menu-wrapper { + .topbar-menu { + > li.profile-item { + float: right; + margin-left: 20px; + + > ul { + left: auto; + right: 105px; + + &:before { + left: 232px; + } + } + } + } + + } + } + + .layout-breadcrumb { + padding-top: 108px; + } + + &.layout-rtl { + .layout-main { + margin-right: 0px; + + .layout-topbar { + .layout-topbar-menu-wrapper { + .topbar-menu { + > li { + &.profile-item { + float: left; + margin-right: 20px; + margin-left: auto; + + > ul { + left: 105px; + right: auto; + + &:before { + left: auto; + right: 232px; + } + } + } + } + } + } + + .topbar-logo { + float: right; + margin-right: auto; + margin-left: 20px; + } + } + } + + .layout-sidebar { + @include transition(right 0s); + + .layout-menu { + > li { + float: right; + + > a { + i { + margin-right: auto; + margin-left: 5px; + } + } + + > ul { + left: auto; + + li { + a { + padding-right: 40px; + padding-left: 0px; + + i { + right: 10px; + left: auto; + + &:last-child { + left: 10px; + right: auto; + } + } + + .layout-submenu-toggler { + right: auto; + left: 10px; + } + } + + ul { + li { + a { + padding-right: 50px; + padding-left: 0px; + + i:first-child { + right: 20px; + left: auto; + } + } + } + + ul { + li { + a { + padding-right: 60px; + padding-left: 0px; + + i:first-child { + right: 30px; + left: auto; + } + } + } + } + } + } + } + } + + li { + a { + .menuitem-badge { + right: 18px; + left: auto; + } + + i { + &:last-child { + margin-right: 3px; + } + } + } + } + } + } + } + } + } + } diff --git a/ace-web/src/main/webapp/resources/sass/layout/_landing.scss b/ace-web/src/main/webapp/resources/sass/layout/_landing.scss new file mode 100644 index 0000000..e1ed1c0 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/layout/_landing.scss @@ -0,0 +1,551 @@ +.landing-body { + background-color: $bodyBgColor; + + * { + @include border-box-sizing(); + } + + p { + line-height: 1.5; + } + + #header { + background-color: $bodyBgColor; + + > div { + width: 960px; + margin: 0 auto; + height: 90px; + padding: 15px 0; + + img { + height: 60px; + } + + #landing-menu { + float: right; + list-style-type: none; + padding: 0; + margin: 20px 0 0 0; + + > li { + display: inline-block; + + a { + border-bottom: 5px solid transparent; + color: #616161; + display: inline-block; + min-width: 80px; + text-align: center; + height: 55px; + font-size: 15px; + @include transition(border-color $transitionDuration); + } + + &:hover { + a { + color: #3f51b5; + border-color: #3f51b5; + } + } + } + } + + #landing-menu-button { + color: #3f51b5; + display: none; + float: right; + margin-right: 15px; + margin-top: 5px; + + i { + font-size: 48px; + } + } + } + } + + #introduction { + > div { + background: url("\#{resource['serenity-layout:images/landing/landing-header.png']}") no-repeat; + min-height: 400px; + color: #ffffff; + text-align: center; + padding-top: 120px; + background-size: cover; + + h1 { + padding: 0; + margin: 0 0 20px 0; + } + + p { + max-width: 400px; + margin: 0 auto; + margin-bottom: 40px; + } + + button { + min-width: 180px; + } + } + } + + #features { + > div { + width: 960px; + margin: 0 auto; + padding: 60px 0; + + .feature-box { + @include clearfix(); + padding: 30px 15px 30px 0; + + img { + float: left; + margin-right: 30px; + } + + > div { + padding: 16px 0; + + h3 { + font-size: 15px; + margin: 0; + } + + p { + color: $textSecondaryColor; + margin: 8px; + } + } + } + } + } + + #stats { + @include background-gradient-top2bottom(#212121, #424242); + + > div { + width: 960px; + margin: 0 auto; + padding: 40px 0; + + .ui-g-12 { + padding: 20px; + } + + .stat-box { + @include border-radius($borderRadius); + background-color: #ffffff; + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + padding: 18px; + text-align: center; + color: #e91e63; + + h3 { + font-weight: 400; + margin: 0; + } + + p { + margin: 0; + } + + &.stat-box-active { + background-color: #e91e63; + color: #ffffff; + } + } + } + } + + #video { + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + + > div { + width: 960px; + margin: 0 auto; + padding: 60px 0; + + .video-description { + padding-top: 80px; + padding-right: 50px; + + h3 { + font-weight: 400; + font-size: 24px; + margin: 0 0 12px 0; + } + + p { + margin: 0 0 24px 0; + } + } + } + } + + #pricing { + > div { + width: 960px; + margin: 0 auto; + padding: 60px 0; + text-align: center; + + > h2 { + font-size: 24px; + font-weight: normal; + margin: 0 0 12px 0; + } + + > p { + color: $textSecondaryColor; + margin: 0 0 40px 0; + } + + .pricing-box { + width: 100%; + text-align: left; + @include border-radius($borderRadius); + + .pricing-header { + background-color: #212121; + padding: 16px; + text-align: center; + + h3 { + margin: 0; + color: #ffffff; + font-size: 15px; + font-weight: 400; + padding-bottom: 4px; + border-bottom: 1px solid #a7a5a5; + } + + p { + color: #a7a5a5; + margin: 0; + padding: 4px 0 0 0; + } + } + + .pricing-content { + padding: 16px; + min-height: 350px; + position: relative; + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + + ul { + list-style-type: none; + margin: 0; + padding: 0; + + + li { + padding: 8px 0; + + i { + color: #4caf50; + vertical-align: middle; + margin-right: 6px; + } + } + } + + button { + position: absolute; + min-width: 180px; + bottom: 20px; + left: 50%; + margin-left: -90px; + } + + .pricing-fee { + position: absolute; + top: -24px; + right: 14px; + margin-left: -90px; + text-align: center; + font-size: 16px; + width: 48px; + height: 48px; + line-height: 48px; + background-color: #e91e63; + color: #ffffff; + @include border-radius(50%); + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + } + } + + &.pricing-box-pro { + .pricing-header { + background-color: #e91e63; + color: #ffffff; + + h3 { + border-bottom: 1px solid #ffffff; + } + + p { + color: #ffffff; + } + } + + .pricing-content { + .pricing-fee { + background-color: #212121; + color: #ffffff; + } + } + } + } + } + } + + #contact { + background-color: #424242; + + > div { + width: 960px; + margin: 0 auto; + padding: 60px 0; + text-align: center; + + > h2 { + font-size: 24px; + font-weight: normal; + margin: 0 0 12px 0; + color: #f5f5f5; + } + + > p { + margin: 0 0 40px 0; + color: #e0e0e0; + } + + .contact-form { + text-align: left; + + > div { + padding: 1em .5em; + } + + button { + width: auto; + min-width: 180px; + margin-left: 15px; + margin-top: 40px; + } + + .md-inputfield { + input:focus ~ label, + input.ui-state-filled ~ label, + textarea:focus ~ label, + textarea.ui-state-filled ~ label, + .md-inputwrapper-focus ~ label, + .md-inputwrapper-filled ~ label { + color:$primaryLightColor; + } + + input:-webkit-autofill ~ label { + color:$primaryLightColor; + } + + input:focus { + border-color: $primaryLightColor; + } + + input { + color: #ffffff; + } + } + } + } + } + + #footer { + background-color: #212121; + color: #ffffff; + + > div { + width: 960px; + margin: 0 auto; + padding: 30px 0; + + .footer-logo { + height: 54px; + float: left; + margin-right: 14px; + } + + h4 { + margin: 0 0 8px 0; + font-weight: 700; + } + + p { + margin: 0; + line-height: 1.5; + + &:last-child { + margin-top: 8px; + } + } + + i { + vertical-align: middle; + } + + .footer-social { + a { + margin-right: 14px; + @include opacity(.7); + + img { + width: 30px; + height: 30px; + } + + &:hover { + @include opacity(1); + } + } + } + } + } +} + +@media screen and (max-width: 64em) { + + .landing-body { + padding-top: 90px; + + #header { + position: fixed; + top: 0; + z-index: 100; + width: 100%; + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + + > div { + width: 100%; + padding-left: 15px; + + #landing-menu-button { + display: block; + } + + #landing-menu { + -webkit-animation-duration: .5s; + -moz-animation-duration: .5s; + animation-duration: .5s; + display: none; + float: none; + width: 100%; + text-align: center; + background-color: $bodyBgColor; + position: fixed; + top: 70px; + left: 0; + @include multi-shadow(0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)); + + li { + display: block; + + a { + height: auto; + border-bottom: 0 none; + padding: 15px; + } + } + + &.landing-menu-active { + display: block; + } + } + } + } + + #introduction { + width: 100%; + + > div { + h1, p { + padding-left: 15px; + padding-right: 15px; + } + } + } + + #features { + > div { + width: 100%; + padding-left: 15px; + } + } + + #stats { + > div { + width: 100%; + } + } + + #video { + > div { + width: 100%; + text-align: center; + padding-left: 15px; + padding-right: 15px; + + .video-description { + padding-top: 0; + padding-right: 0; + } + + iframe { + width: 300px; + height: 200px; + } + } + } + + #pricing { + > div { + width: 100%; + adding-left: 15px; + padding-right: 15px; + } + } + + #contact { + > div { + width: 100%; + text-align: center; + + .contact-map { + text-align: center; + + img { + width: 100%; + } + } + + .contact-form { + .ui-g-12 { + padding: 15px; + } + } + } + } + + #footer { + > div { + width: 100%; + + .ui-g-12 { + padding-top: 24px; + } + } + } + } +} diff --git a/ace-web/src/main/webapp/resources/sass/layout/_layout.scss b/ace-web/src/main/webapp/resources/sass/layout/_layout.scss new file mode 100644 index 0000000..148d6c2 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/layout/_layout.scss @@ -0,0 +1,11 @@ +@import '../variables/_layout'; +@import '../_mixins'; +@import '../_fonts'; +@import './_utils'; +@import './_dashboard'; +@import './_login'; +@import './_exception'; +@import './_landing'; +@import './_main'; +@import './_horizontal'; +@import '../_layout_styles.scss'; \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/layout/_login.scss b/ace-web/src/main/webapp/resources/sass/layout/_login.scss new file mode 100644 index 0000000..e8352d9 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/layout/_login.scss @@ -0,0 +1,82 @@ +.login-body { + //background-image: url("\#{resource['serenity-layout:images/login/login-bg.jpg']}"); + height: 100%; + background-position: center; + background-repeat: no-repeat; + background-size: cover; + + .login-panel { + width: 550px; + height: 480px; + background-color: #ffffff; + position: absolute; + left: 50%; + top: 50%; + margin-left: -275px; + margin-top: -240px; + padding: 0; + @include border-radius(2px); + @include multi-shadow(0 3px 5px 0 rgba(0, 0, 0, 0.2), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 6px 10px 0 rgba(0, 0, 0, 0.14)); + + .login-panel-header { + background-color: $accentColor; + text-align: center; + padding: 8px 14px; + + img { + vertical-align: middle; + width: 135px; + } + } + + .login-panel-content { + padding: 50px 100px; + + h1 { + font-size: 16px; + margin-top: 0; + margin-bottom: 16px; + text-align: center; + } + + .ui-g-12, .ui-g-6 { + padding: 1em; + + &:last-child { + text-align: center; + + a { + color: $accentColor; + } + } + } + + .password-reset { + text-align: right; + + a { + color: $textSecondaryColor; + } + } + + .ui-chkbox-label { + margin: 0 0 0 8px; + vertical-align: middle; + } + } + } +} + +@media (max-width: 640px) { + .login-body { + .login-panel { + left: 0; + margin-left: 0; + width: 100%; + + .login-panel-content { + padding: 50px 25px; + } + } + } +} diff --git a/ace-web/src/main/webapp/resources/sass/layout/_main.scss b/ace-web/src/main/webapp/resources/sass/layout/_main.scss new file mode 100644 index 0000000..9f8ed14 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/layout/_main.scss @@ -0,0 +1,1399 @@ +html { + height: 100%; +} + +body { + font-family: $fontFamily; + font-size: $fontSize; + color: $textColor; + -webkit-font-smoothing: antialiased; + padding: 0; + margin: 0; + min-height: 100%; + background-color: $bodyBgColor; + + .ajax-loader { + font-size: 32px; + color: $accentColor; + } +} + +.layout-wrapper { + + .layout-sidebar { + width: 240px; + height: 100%; + position: fixed; + left: -180px; + top: 0; + -webkit-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + z-index: 999999; + background-color: $sidebarBgColor; + @include box-sizing(border-box); + @include transition(left $transitionDuration); + @include shadow(3px 0 6px rgba(0, 0, 0, 0.3)); + + @if variable-exists(menuBgImageLight) { + background-image: url("\#{resource['serenity-layout:images/special/#{$menuBgImageLight}']}"); + background-size: 240px 100%; + background-repeat: no-repeat; + } + + .sidebar-logo { + height: 64px; + background-color: $sidebarLogoBgColor; + padding-top: 8px; + @include box-sizing(border-box); + + img { + height: 48px; + margin-left: 12px; + vertical-align: middle; + } + + .sidebar-anchor { + display: none; + width: 18px; + height: 18px; + border: 2px solid $primaryTextColor; + background-color: $primaryColor; + vertical-align: middle; + float: right; + margin-right: 8px; + margin-top: 12px; + @include border-radius(50%); + @include transition(background-color $transitionDuration); + } + + .app-name { + color: $primaryTextColor; + vertical-align: middle; + font-size: 26px; + } + } + + .layout-menu { + list-style-type: none; + margin: 10px 0 0 0; + padding: 0; + + li { + padding: 4px 10px; + width: 100%; + @include box-sizing(border-box); + + &.active-menuitem { + > a { + color: $subMenuitemActiveTextColor; + + i { + color: $subMenuitemActiveIconTextColor; + } + + i.layout-submenu-toggler { + @include rotate(-180deg); + } + } + } + + > a { + color: $menuitemTextColor; + display: block; + padding: 10px 10px 10px 10px; + position: relative; + @include border-radius(0); + @include box-sizing(border-box); + @include transition(all $transitionDuration); + + &:hover { + background-color: $menuitemHoverBgColor; + color: $menuitemHoverTextColor; + + i { + color: $menuitemHoverIconTextColor; + } + } + + > .menuitem-text { + display: inline-block; + max-width: 145px; + word-break: break-all; + } + + i { + color: $menuitemIconTextColor; + float: right; + width: 20px; + height: 20px; + font-size: 20px; + position: absolute; + right: 10px; + top: 50%; + margin-top: -10px; + + &.layout-submenu-toggler { + @include transition(all $transitionDuration); + right: 34px; + display: none; + } + } + + .menuitem-badge { + display: none; + position: absolute; + right: 54px; + top: 50%; + margin-top: -8px; + } + } + + ul { + display: none; + list-style-type: none; + margin: 0; + padding: 0; + + li { + padding: 4px 0; + + a { + padding-left: 20px; + } + + ul { + li { + a { + padding-left: 30px; + } + + ul { + li { + a { + padding-left: 40px; + } + } + + ul { + li { + a { + padding-left: 50px; + } + } + + ul { + li { + a { + padding-left: 60px; + } + } + + ul { + li { + a { + padding-left: 70px; + } + } + + ul { + li { + a { + padding-left: 80px; + } + } + } + } + } + } + } + } + } + } + } + } + + > li { + > a { + @include border-radius(6px); + } + + &.active-menuitem { + > a { + color: $menuitemActiveTextColor; + background-color: $menuitemActiveBgColor; + @include border-radius(6px); + @include border-radius-bottom(0); + @include multi-shadow(0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px rgba(60,72,88,.3),0 7px 10px -5px rgba(60,72,88,.1)); + + i { + color: $menuitemActiveIconTextColor; + } + } + + > ul { + background-color: $submenuBgColor; + @include border-radius-bottom(6px); + } + } + } + + .menuitem-badge { + float: right; + display: inline-block; + width: 16px; + height: 16px; + margin-right: 6px; + text-align: center; + background-color: $accentColor; + color: $accentTextColor; + font-size: $fontSize - 2; + font-weight: 700; + line-height: 16px; + @include border-radius(50%); + } + } + + &.layout-sidebar-active { + left: 0; + + .sidebar-logo { + img { + display: inline; + } + + .sidebar-anchor { + display: inline-block; + } + } + + .layout-menu { + li { + a { + i.layout-submenu-toggler { + display: inline-block; + } + + .menuitem-badge { + display: inline-block; + } + } + } + } + } + + .nano { + .sidebar-scroll-content { + display: block; + height: 100%; + position: relative; + + .layout-menu { + padding-bottom: 120px; + } + } + + .nano-pane .nano-slider { + background-color: $nanoSliderBgColor; + opacity: 0.3; + filter: alpha(opacity=30); + } + } + + &.layout-sidebar-dark { + background-color: $darkSidebarBgColor; + + @if variable-exists(menuBgImageDark) { + background-image: url("\#{resource['serenity-layout:images/special/#{$menuBgImageDark}']}"); + } + + .layout-menu { + li { + > a { + color: $darkMenuitemTextColor; + + &:hover { + background-color: $darkMenuitemHoverBgColor; + color: $darkMenuitemHoverTextColor; + + i { + color: $darkMenuitemHoverIconTextColor; + } + } + + i { + color: $darkMenuitemIconTextColor; + } + } + + &.active-menuitem { + > a { + color: $darksubMenuitemActiveTextColor; + + i { + color: $darksubMenuitemActiveIconTextColor; + } + } + } + } + + > li { + &.active-menuitem { + > a { + background-color: $darkMenuitemActiveBgColor; + color: $darkMenuitemActiveTextColor; + + i { + color: $darkMenuitemActiveIconTextColor; + } + } + + > ul { + background-color: $darkSubmenuBgColor; + } + } + } + } + } + } + + .layout-main { + margin-left: 60px; + @include transition(margin-left $transitionDuration); + @include box-sizing(border-box); + + .layout-topbar { + height: 64px; + background-color: $primaryColor; + padding: 16px 42px 16px 24px; + position: fixed; + width: calc(100% - 40px); + @include transition(width $transitionDuration); + @include multi-shadow(0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 4px 5px 0 rgba(0, 0, 0, 0.14)); + @include box-sizing(border-box); + z-index: 999997; + + .topbar-logo { + display: none; + } + + .menu-btn { + display: none; + color: $topbarIconColor; + float: left; + + i { + font-size: 32px; + } + } + + .topbar-menu-btn { + display: none; + color: $topbarIconColor; + float: right; + + i { + font-size: 32px; + } + } + + .mobile-logo { + display: none; + height: 48px; + margin-top: -8px; + } + + .layout-topbar-menu-wrapper { + .sidebar-logo { + display: none; + } + + .topbar-menu { + list-style-type: none; + margin: 0; + padding: 0; + vertical-align: middle; + margin: 0; + -webkit-animation-duration: 0s; + -moz-animation-duration: 0s; + animation-duration: 0s; + @include clearfix(); + + .topbar-badge { + width: 16px; + height: 16px; + text-align: center; + background-color: $accentColor; + color: $accentTextColor; + font-size: $fontSize - 2; + font-weight: 700; + line-height: 16px; + @include border-radius(50%); + } + + > li { + float: right; + position: relative; + margin-left: 20px; + + > a { + color: $topbarTextColor; + position: relative; + + .topbar-item-name { + display: none; + } + + i { + font-size: 32px; + color: $topbarTextColor; + @include transition(color $transitionDuration); + + &:hover { + color: darken($topbarTextColor, 10%); + } + } + + .topbar-badge { + position: absolute; + right: -4px; + top: -24px; + } + } + + &.profile-item { + float: left; + margin-left: 0; + padding-top: 4px; + + > a { + display: inline-block; + position: relative; + top: -10px; + color: $topbarTextColor; + + .profile-image-wrapper { + display: inline-block; + vertical-align: middle; + border: 2px solid transparent; + width: 40px; + height: 40px; + @include border-radius(50%); + @include transition(border-color $transitionDuration); + + img { + width: 40px; + height: 40px; + } + } + + .profile-name { + display: inline-block; + margin-left: 6px; + vertical-align: middle; + margin-top: -4px; + } + + &:hover { + .profile-image-wrapper { + border-color: $accentColor; + } + } + } + + > ul { + right: auto; + left: 5px; + + &:before { + left: 8px; + } + } + } + + &.search-item { + position: relative; + display: inline-block; + vertical-align: middle; + height: 40px; + @include box-sizing(border-box); + + input { + border: 0 none; + width: 150px; + padding: 6px 24px 6px 6px; + border-bottom: 1px solid $topbarTextColor; + @include transition(all $transitionDuration); + outline: 0 none; + color: $topbarTextColor; + + &:focus { + border-bottom-color: $primaryTextColor; + + label { + color: $topbarTextColor; + } + } + } + + i { + position: absolute; + right: 0; + top: 0; + color: $topbarTextColor; + font-size: 28px; + } + + label { + color: $topbarTextColor; + margin-top: 6px; + } + + input:focus ~ i { + color: $primaryTextColor; + } + } + + > ul { + position: absolute; + top: 60px; + right: 5px; + display: none; + width: 250px; + background-color: $topbarSubmenuBgColor; + -webkit-animation-duration: .5s; + -moz-animation-duration: .5s; + animation-duration: .5s; + list-style-type: none; + margin: 0; + padding: 8px 0; + border-top: 4px solid $primaryColor; + @include overlay-content-shadow(); + + a { + padding: 10px 10px 10px 10px; + display: block; + width: 100%; + box-sizing: border-box; + color: $textColor; + + i { + color: $textSecondaryColor; + margin-right: 8px; + } + + img { + margin-right: 8px; + } + + i,img,span { + vertical-align: middle; + display: inline-block; + } + + .topbar-submenuitem-badge { + background-color: $accentColor; + padding: 2px 4px; + display: block; + font-size: 12px; + @include border-radius($borderRadius); + color: $accentTextColor; + float: right; + } + + &:hover { + background-color: $topbarSubmenuHoverBgColor; + @include transition(background-color $transitionDuration); + + i { + color: $textColor; + } + } + } + + &:before { + width: 0; + height: 0; + border-left: 8px solid transparent; + border-right: 8px solid transparent; + border-bottom: 15px solid $primaryColor; + content: " "; + position: absolute; + top: -15px; + left: 232px; + } + } + + &.active-topmenuitem { + > ul { + display: block; + } + } + } + } + } + } + + .layout-breadcrumb { + background-color: $breadcrumbBgColor; + @include shadow(inset 0 -2px 4px 0 rgba(0, 0, 0, 0.14)); + min-height: 42px; + padding-top: 64px; + @include clearfix(); + + ul { + margin: 8px 0 0 0; + padding: 0 0 0 20px; + list-style: none; + color: $textSecondaryColor; + display: inline-block; + + li { + display: inline-block; + vertical-align: middle; + color: $textSecondaryColor; + + &:nth-child(even) { + font-size: 20px; + } + + &:first-child(even) { + color: $primaryColor; + } + + a { + color: $textSecondaryColor; + } + } + } + + .layout-breadcrumb-options { + float: right; + padding: 0px 20px 0 0; + height: 100%; + + a { + color: $textSecondaryColor; + display: inline-block; + width: 42px; + height: 42px; + line-height: 42px; + text-align: center; + @include transition(background-color $transitionDuration); + + &:hover { + background-color: $hoverBgColor; + } + + i { + line-height: inherit; + } + } + } + } + + .layout-content { + padding: 17px 17px 24px 17px; + } + + .layout-main-mask { + display: none; + } + + .layout-footer { + padding: 16px 24px; + border: 0 none; + border: 1px solid $dividerColor; + background: $footerBgColor; + + img { + margin-top: 5px; + width: 100px; + } + + .footer-text-right { + float: right; + margin-top: 10px; + + span { + vertical-align: middle; + } + } + } + } +} + +.layout-wrapper-static { + .layout-sidebar { + left: 0; + + .sidebar-logo { + .sidebar-anchor { + display: inline-block; + background-color: $primaryTextColor; + } + } + + .layout-menu { + li { + a { + i.layout-submenu-toggler { + display: inline-block; + } + + .menuitem-badge { + display: inline-block; + } + } + } + } + } + + .layout-main { + margin-left: 240px; + + .layout-topbar { + width: calc(100% - 240px); + } + } +} + +.layout-wrapper-static-restore { + .layout-sidebar { + @include transition(none); + } +} + +@media (max-width: $mobileBreakpoint) { + .layout-wrapper { + .layout-sidebar { + left: -240px; + + .sidebar-logo { + .sidebar-anchor { + display: none !important; + } + } + } + + .layout-main { + margin-left: 0; + left: 0; + @include transition(left $transitionDuration); + -webkit-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + + .layout-topbar { + width: 100%; + @include clearfix(); + text-align: center; + padding: 16px 24px; + + .menu-btn { + display: inline-block; + } + + .topbar-menu-btn { + display: inline-block; + } + + .mobile-logo { + display: inline; + } + + .layout-topbar-menu-wrapper { + + .topbar-menu { + display: none; + -webkit-animation-duration: .5s; + -moz-animation-duration: .5s; + animation-duration: .5s; + text-align: left; + @include overlay-shadow(); + + &:before { + width: 0; + height: 0; + border-left: 8px solid transparent; + border-right: 8px solid transparent; + border-bottom: 15px solid $primaryColor; + content: " "; + position: absolute; + top: -15px; + left: 232px; + } + + &.topbar-menu-active { + position: fixed; + top: 75px; + right: 30px; + width: 250px; + display: block; + padding: 8px 0; + background-color: $topbarMobileMenuBgColor; + border-top: 4px solid $primaryColor; + + > li { + float: none; + display: block; + margin: 0; + + > a { + padding: 8px 14px; + display: block; + color: $textColor; + + &:hover { + background-color: $hoverBgColor; + + i { + color: $textColor; + } + } + + i { + color: $textSecondaryColor; + display: inline-block; + vertical-align: middle; + margin-right: 8px; + } + + .topbar-item-name { + display: inline-block; + vertical-align: middle; + } + + .topbar-badge { + position: static; + float: right; + margin-top: 4px; + } + } + + > ul { + position: static; + @include no-shadow(); + padding: 0; + width: 100%; + border-top: 0 none; + @include box-sizing(border-box); + + &:before { + display: none; + } + + a { + padding-left: 28px; + } + } + + &.profile-item { + img { + width: 24px; + height: 24px; + } + } + } + } + + li { + a { + font-size: $fontSize; + + i { + font-size: 24px; + } + } + + &.search-item { + padding: 8px 14px; + + input { + padding: 2px 2px 1px 2px; + border-color: $textSecondaryColor; + border-width: 0 0 1px 0; + border-style: solid; + color: $textColor; + margin-left: 28px; + width: 85%; + + &:focus { + border-bottom-color: $primaryColor; + border-width: 0 0 2px 0; + width: 85%; + + ~ i { + color: $primaryColor; + } + + ~ label { + color: $primaryColor; + top: -15px; + } + } + } + + i { + color: $textSecondaryColor; + right: auto; + left: 0px; + } + + label { + color: $textSecondaryColor; + left: 32px; + margin-top: 0; + } + } + } + } + } + } + } + + &.layout-wrapper-active { + overflow: hidden; + + .layout-sidebar { + left: 0; + @include no-shadow(); + + .layout-menu { + li { + a { + i.layout-submenu-toggler { + display: inline-block; + } + + .menuitem-badge { + display: inline-block; + } + } + } + } + } + + .layout-main { + position: fixed; + left: 240px; + width: calc(100%); + @include shadow(inset 3px 0px 6px 1px rgba(0, 0, 0, 0.3)); + + .layout-topbar { + @include shadow(inset 3px 0px 6px 1px rgba(0, 0, 0, 0.3)); + } + + .layout-breadcrumb { + @include shadow(inset 3px 0px 6px 1px rgba(0, 0, 0, 0.3)); + + .layout-breadcrumb-options { + display: none; + } + } + } + + .layout-main-mask { + z-index: 999998; + position: absolute; + left: 0; + top: 0; + background-color: $contentMobileMaskBgColor; + display: block; + @include opacity(.5); + width: 100%; + height: 100%; + overflow: hidden; + } + } + } + + body { + &.hidden-overflow { + overflow: hidden; + } + } +} + +.layout-rtl { + + &.layout-wrapper { + + .layout-sidebar { + left: auto; + right: -180px; + @include transition(right .3s); + direction: rtl; + + .sidebar-logo { + direction: rtl; + + img { + margin-left: 0px; + margin-right: 12px; + } + + .sidebar-anchor { + float: left; + margin-right: 0px; + margin-left: 8px; + } + } + + .layout-menu { + direction: rtl; + + li { + > a { + i { + float: left; + right: auto; + left: 10px; + + &.layout-submenu-toggler { + right: auto; + left: 34px; + } + } + + .menuitem-badge { + right: auto; + left: 54px; + } + } + + ul { + li { + a { + padding-right: 20px; + padding-left: 0px; + } + + ul { + li { + a { + padding-right: 30px; + padding-left: 0px; + } + + ul { + li { + a { + padding-right: 40px; + padding-left: 0px; + } + } + + ul { + li { + a { + padding-right: 50px; + padding-left: 0px; + } + } + + ul { + li { + a { + padding-right: 60px; + padding-left: 0px; + } + } + + ul { + li { + a { + padding-right: 70px; + padding-left: 0px; + } + } + + ul { + li { + a { + padding-right: 80px; + padding-left: 0px; + } + } + } + } + } + } + } + } + } + } + } + } + + .menuitem-badge { + float: left; + margin-right: 0px; + margin-left: 6px; + } + } + + &.layout-sidebar-active { + left: auto; + right: 0px; + } + + .nano { + + .nano-pane { + right: auto; + left: 0; + } + } + } + + .layout-main { + margin-left: 0px; + margin-right: 60px; + @include transition(margin-right .3s); + + .layout-topbar { + .menu-btn { + float: right; + } + + .topbar-menu-btn { + float: left; + } + + .layout-topbar-menu-wrapper { + .topbar-menu { + > li { + float: left; + margin-left: 0px; + margin-right: 20px; + + > a { + .topbar-badge { + left: -4px; + right: auto; + } + } + + &.profile-item { + float: right; + margin-left: 0px; + margin-right: 0px; + + > a { + .profile-name { + margin-left: 0px; + margin-right: 6px; + margin-top: 13px; + float: left; + } + } + + > ul { + left: auto; + right: 5px; + direction: rtl; + text-align: right; + + &:before { + left: auto; + right: 8px; + } + } + } + + &.search-item { + direction: rtl; + + input { + padding: 6px 6px 6px 24px; + } + + i { + right: auto; + left: 0; + } + + label { + right: 5px; + left: auto; + } + } + + > ul { + left: 5px; + right: auto; + direction: rtl; + text-align: right; + + a { + i, img { + margin-right: 0px; + margin-left: 8px; + } + + .topbar-submenuitem-badge { + float: left; + } + } + + &:before { + left: auto; + right: 232px; + } + } + } + } + } + } + + .layout-breadcrumb { + direction: rtl; + + ul { + padding: 0 20px 0 0; + } + + .layout-breadcrumb-options { + float: left; + padding: 0px 0px 0 20px; + } + } + + .layout-footer { + direction: rtl; + + .footer-text-right { + float: left; + margin-top: 10px; + } + } + } + } + + &.layout-wrapper-static { + .layout-sidebar { + left: auto; + right: 0; + } + + .layout-main { + margin-left: 0px; + margin-right: 240px; + } + } + + &.layout-wrapper-static-restore { + .layout-sidebar { + @include transition(none); + } + } + + @media (max-width: $mobileBreakpoint) { + &.layout-wrapper { + .layout-sidebar { + left: auto; + right: -240px; + } + + .layout-main { + margin-right: 0px; + margin-left: 0px; + left: auto; + right: 0; + @include transition(right .3s); + + .layout-topbar { + + .layout-topbar-menu-wrapper { + + .topbar-menu { + direction: rtl; + text-align: right; + + &:before { + right: 232px; + left: auto; + } + + &.topbar-menu-active { + left: 30px; + right: auto; + + > li { + float: none; + margin: 0px; + + > a { + i { + margin-right: 0px; + margin-left: 8px; + } + + .topbar-badge { + float: left; + } + } + + > ul { + a { + padding-left: 0px; + padding-right: 28px; + } + } + } + } + + > li { + &.profile-item { + > a { + .profile-name { + float: none; + } + } + } + } + + li { + &.search-item { + input { + margin-left: 0px; + margin-right: 28px; + padding: 2px 2px 1px 2px; + } + + i { + left: auto; + right: 0px; + } + + label { + right: 32px; + left: auto; + } + } + } + } + } + } + } + + &.layout-wrapper-active { + .layout-sidebar { + right: 0; + left: auto; + } + + .layout-main { + left: auto; + right: 240px; + } + + .layout-main-mask { + left: auto; + right: 0; + } + } + } + } +} + + diff --git a/ace-web/src/main/webapp/resources/sass/layout/_utils.scss b/ace-web/src/main/webapp/resources/sass/layout/_utils.scss new file mode 100644 index 0000000..a0f5354 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/layout/_utils.scss @@ -0,0 +1,169 @@ +/* Utils */ +.clearfix:after { + content:" "; + display:block; + clear:both; +} + +.card { + @include content-shadow(); + @include border-radius(2px); + background: #ffffff; + padding: 16px; + margin-bottom: 16px; + box-sizing: border-box; + + &.card-w-title { + padding-bottom: 32px; + } + + h1 { + font-size: 24px; + font-weight: 400; + margin: 24px 0; + + &:first-child { + margin-top: 16px; + } + } + + h2 { + font-size: 22px; + font-weight: 400; + } + + h3 { + font-size: 20px; + font-weight: 400; + } + + h4 { + font-size: 18px; + font-weight: 400; + } +} + +.nopad { + padding: 0; + + .ui-panel-content { + padding: 0; + } +} + +@-webkit-keyframes fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} + +@keyframes fadeInDown { + from { + opacity: 0; + transform: translate3d(0, -20px, 0); + } + + to { + opacity: 1; + transform: none; + } +} + +@-webkit-keyframes fadeOutUp { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } +} + +@keyframes fadeOutUp { + from { + opacity: 1; + } + + to { + opacity: 0; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } +} + +.fadeInDown { + -webkit-animation: fadeInDown 5s; /* Safari 4.0 - 8.0 */ + animation: fadeInDown 5s; +} + +.fadeOutUp { + -webkit-animation: fadeOutUp $transitionDuration; /* Safari 4.0 - 8.0 */ + animation: fadeOutUp $transitionDuration; +} + +.ui-shadow-1 { + -webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); + -moz-box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); + box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); +} + +.ui-shadow-2 { + -webkit-box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); + -moz-box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} + +.ui-shadow-3 { + -webkit-box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); + -moz-box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); + box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); +} + +.ui-shadow-4 { + -webkit-box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); + -moz-box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); + box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); +} + +.ui-shadow-5 { + -webkit-box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); + -moz-box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); + box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22); +} + +.ui-g { + -ms-flex-wrap: wrap; + + &.form-group { + > div { + padding: 12px 16px; + } + } +} + +.ui-panelgrid { + &.form-group { + .ui-panelgrid-cell { + padding: 12px 16px; + } + } +} + +.ui-selectoneradio, .ui-selectmanycheckbox { + &.form-group { + .ui-grid-row > div { + padding: 8px 16px; + } + } +} + diff --git a/ace-web/src/main/webapp/resources/sass/theme/_common.scss b/ace-web/src/main/webapp/resources/sass/theme/_common.scss new file mode 100644 index 0000000..07144c4 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/theme/_common.scss @@ -0,0 +1,138 @@ +body { + .ui-widget, + .ui-widget .ui-widget { + font-family:$fontFamily; + text-decoration: none; + } + + .ui-widget-content { + background-color: $contentBgColor; + border: 1px solid $contentBorderColor; + padding: $contentPadding; + + .ui-icon { + color: $textSecondaryColor; + } + } + + .ui-widget-header { + background-color: $primaryColor; + color: $headerTextColor; + border: 1px solid $primaryColor; + padding: $headerPadding; + + .ui-icon { + color: $headerTextColor; + } + } + + .ui-state-active, .ui-state-highlight { + background-color: $accentColor; + color: $accentTextColor; + + .ui-icon { + color: $accentTextColor; + } + } + + .ui-state-disabled { + opacity: .35; + filter: Alpha(Opacity=35); + background-image: none; + } + + .ui-corner-all { + @include border-radius($borderRadius); + } + + .ui-corner-top { + @include border-radius-top($borderRadius); + } + + .ui-corner-bottom { + @include border-radius-bottom($borderRadius); + } + + .ui-corner-left { + @include border-radius-left($borderRadius); + } + + .ui-corner-right { + @include border-radius-right($borderRadius); + } + + .ui-widget-overlay { + background-color: #58575c; + @include opacity(.8); + } + + .ui-shadow { + + } + + .ui-icon { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: $iconFontSize; + display: inline-block; + width: $iconWidth; + height: $iconHeight; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + text-indent: 0; + overflow: visible; + + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + + /* Support for IE. */ + font-feature-settings: 'liga'; + } + + .material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; /* Preferred icon size */ + display: inline-block; + width: 1em; + height: 1em; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; + + /* Support for IE. */ + font-feature-settings: 'liga'; + } + + .fa { + font-family: 'FontAwesome'; + } + + a { + color: $primaryColor; + text-decoration: none; + } + +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/theme/_data.scss b/ace-web/src/main/webapp/resources/sass/theme/_data.scss new file mode 100644 index 0000000..82dc389 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/theme/_data.scss @@ -0,0 +1,779 @@ +body { + .ui-paginator { + padding: $paginatorPadding; + background-color: $primaryDarkColor; + + > a { + margin-top: -1px; + box-sizing: border-box; + color: #ffffff; + + span { + display: none; + } + + &.ui-state-hover { + background-color: $primaryLightColor; + @include border-radius(50%); + @include transition(background-color $transitionDuration); + } + } + + .ui-paginator-next { + padding: 0 6px; + vertical-align: middle; + @include material-icon("\e409"); + + &:before { + position: relative; + left: -6px; + } + } + + .ui-paginator-last { + padding: 0 6px; + vertical-align: middle; + @include material-icon("\e5dd"); + + &:before { + position: relative; + left: -6px; + } + } + + .ui-paginator-prev { + padding: 0 6px; + vertical-align: middle; + @include material-icon("\e408"); + + &:before { + position: relative; + left: -5px; + } + } + + .ui-paginator-first { + padding: 0 6px; + vertical-align: middle; + @include material-icon("\e5dc"); + + &:before { + position: relative; + left: -5px; + } + } + + .ui-paginator-pages { + vertical-align: middle; + margin: 0 6px 0 12px; + padding: 0; + + a { + color: $headerTextColor; + padding: 0; + width: 24px; + height: 24px; + line-height: 24px; + @include border-radius(50%); + @include transition(background-color $transitionDuration); + + &.ui-state-active { + color: $accentTextColor; + } + + &.ui-state-hover { + background-color: $primaryLightColor; + } + } + } + } + + .ui-datagrid { + .ui-datagrid-header { + padding: $headerPadding; + } + + .ui-panel { + .ui-panel-titlebar { + background-color: #ffffff; + color: $textColor; + border-color: $dividerColor; + } + } + } + + .ui-datalist { + .ui-datalist-header { + padding: $headerPadding; + } + } + + .ui-datatable { + .ui-datatable-header, + .ui-datatable-footer { + padding: $headerPadding; + + .ui-inputfield { + color: $inputBgColor; + + &:focus { + border-color: $inputBgColor; + } + } + } + + .ui-paginator { + padding: $paginatorPadding; + } + + thead { + th { + padding: $listItemPadding; + border: 0 none; + border-top: 1px solid $contentBorderColor; + background-color: #ffffff; + + &:first-child { + border-left: 1px solid $contentBorderColor; + } + + &:last-child { + border-right: 1px solid $contentBorderColor; + } + + &.ui-state-hover { + @include hover-element(); + } + + .ui-sortable-column-icon { + vertical-align: middle; + margin: -4px 0 0 0; + color: $textSecondaryColor; + + &.ui-icon-carat-2-n-s { + margin-left: 4px; + } + } + + .ui-column-resizer { + @include material-icon("\e86f"); + font-size: $fontSize + 2; + color: $textSecondaryColor; + } + + &.ui-state-active,&.ui-state-highlight { + background-color: $accentColor; + color: $accentTextColor; + border-top-color: $accentColor; + + .ui-icon { + color: $accentTextColor; + } + + .ui-inputfield { + color: $accentTextColor; + + &.ui-state-focus { + border-color: $accentTextColor; + } + } + } + } + + tr { + th { + border: 1px solid $contentBorderColor; + } + } + } + + tfoot { + td { + padding: $listItemPadding; + border: 1px solid $contentBorderColor; + background-color: $contentBgColor; + } + } + + tbody { + tr.ui-datatable-even { + background-color: $dataTableRowBgColorEven; + + &.ui-state-hover { + @include hover-element(); + } + + &.ui-state-highlight { + background-color: $accentColor; + color: $accentTextColor; + } + } + + tr { + td { + border: 1px solid $contentBorderColor; + padding: $listItemPadding; + + .ui-row-toggler { + display: inherit; + } + + &.ui-state-highlight { + .ui-inputfield { + color: $inputBgColor; + border-color: $inputBgColor; + + &:focus { + border-color: $inputBgColor; + } + } + } + + &.ui-state-error { + background-color: #e62a10; + border-color: #e62a10; + color: #ffffff; + } + } + + &.ui-widget-content { + border: 0 none; + } + + &.ui-state-highlight { + background-color: $accentColor; + color: $accentTextColor; + } + + .ui-cell-editor-input { + input { + color: $accentTextColor; + } + } + } + + tr.ui-state-hover { + @include hover-element(); + } + + tr.ui-state-error { + background-color: #e62a10; + border-color: #e62a10; + color: #ffffff; + + .ui-inputfield, + .ui-inputfield.ui-state-error { + border-color: #ffffff; + } + } + + tr.ui-state-highlight { + td { + border-right-color: $accentDarkColor; + + &:last-child { + border-right-color: $contentBorderColor; + } + + &.ui-selection-column { + .ui-radiobutton-box { + border-color: $accentTextColor; + background-color: transparent; + + .ui-radiobutton-icon { + background-color: $accentTextColor; + } + } + + .ui-chkbox-box { + border-color: $accentTextColor; + background-color: transparent; + + .ui-chkbox-icon { + color: $accentTextColor; + margin-left: -3px; + } + } + } + } + + .ui-inputfield { + color: $inputBgColor; + border-color: $inputBgColor; + + &:focus { + border-color: $inputBgColor; + } + } + } + } + + > .ui-icon-arrowthick-1-s { + font-size: 18px; + color: $accentColor; + } + + > .ui-icon-arrowthick-1-n { + display: none !important; + } + + &.ui-datatable-scrollable { + .ui-datatable-scrollable-header, .ui-datatable-scrollable-footer { + border: 0 none; + background-color: transparent; + padding: 0px; + + .ui-datatable-data { + tr { + &.ui-widget-content { + padding: 0px; + } + } + + td { + color: $textColor; + } + } + } + + thead { + tr { + th { + color: $textColor; + font-size: $fontSize; + } + } + } + + tfoot { + tr { + td { + color: $textColor; + font-size: $fontSize; + } + } + } + } + } + + .ui-draggable-dragging.ui-state-default { + background-color: $primaryColor; + } + + .ui-picklist { + .ui-picklist-list { + padding: 0; + } + + .ui-picklist-caption { + padding: $headerPadding; + } + + li.ui-picklist-item { + padding: $listItemPadding; + margin: 0; + @include border-radius(0px); + + &.ui-state-hover { + @include hover-element(); + } + } + + .ui-picklist-buttons { + width: 48px; + + .ui-button { + &.ui-button-icon-only { + width: 32px; + margin-right: 0; + display: inline-block; + margin-bottom: 4px; + } + } + } + + .ui-picklist-buttons-cell { + text-align: center; + } + + .ui-picklist-filter-container { + margin-bottom: 4px; + + .ui-picklist-filter { + width: 100%; + } + + .ui-icon { + color: $textSecondaryColor; + top: 0px; + } + } + + &.ui-picklist-responsive { + .ui-picklist-buttons { + width: 48px; + + .ui-button { + &.ui-button-icon-only { + margin: 0 auto; + display: block; + margin-bottom: 8px; + } + } + } + + .ui-picklist-list { + .ui-picklist-item { + .ui-chkbox { + margin-right: 8px; + vertical-align: top; + } + + .ui-chkbox,.ui-chkbox * { + box-sizing: content-box; + } + } + } + + .ui-chkbox-box { + width: $iconWidth - 6px; + height: $iconHeight - 6px; + } + } + } + + .ui-orderlist { + .ui-orderlist-caption { + padding: $headerPadding; + @include border-box-sizing(); + } + + .ui-orderlist-list { + padding: 0; + box-sizing: border-box; + + li.ui-orderlist-item { + padding: $listItemPadding; + margin: 0; + @include border-radius(0px); + + &.ui-state-hover { + @include hover-element(); + } + } + } + + .ui-orderlist-controls { + width: 60px; + text-align: center; + + .ui-button { + &.ui-button-icon-only { + width: 32px; + margin: 0 0 8px 0; + display: inline-block; + } + } + } + } + + .ui-carousel { + padding: 0; + border: 0 none; + + .ui-carousel-header { + margin: 0; + + .ui-icon { + color: $headerTextColor; + } + + .ui-carousel-dropdown, + .ui-carousel-mobile-dropdown { + margin: 5px 10px; + } + } + + .ui-carousel-footer { + margin: 0; + padding: $headerPadding - 2px; + font-size: $fontSize - 2px; + } + + .ui-carousel-page-links { + margin-top: 2px; + } + } + + .ui-tree { + padding: 4px 7px; + + .ui-treenode-children { + padding-left: 28px; + } + + .ui-treenode-leaf-icon { + width: 23px; + } + + .ui-tree-container { + overflow: visible; + } + + .ui-treenode-content { + + .ui-chkbox { + margin: 0 4px 0 4px; + + .ui-icon { + color: #757575; + } + } + + .ui-tree-toggler { + vertical-align: middle; + } + + .ui-treenode-icon { + vertical-align: middle; + margin: 0 4px 0 4px; + } + + .ui-treenode-label { + padding: 0 4px; + margin: 0; + vertical-align: middle; + } + } + + .ui-tree-droppoint.ui-state-hover { + background-color: $accentColor; + } + + &.ui-tree-horizontal { + padding-left: 0; + padding-right: 0; + + .ui-treenode-content { + background-color: $contentBgColor; + border: 1px solid $contentBorderColor; + + .ui-tree-toggler { + vertical-align: middle; + } + + .ui-treenode-icon { + vertical-align: middle; + margin-right: 4px; + } + + &.ui-state-highlight { + background-color: $accentColor; + color: $accentTextColor; + + .ui-chkbox-box { + border-color: $accentTextColor; + + .ui-chkbox-icon { + color: $accentTextColor; + } + } + } + } + } + } + + .ui-tree-draghelper { + border: 1px solid $primaryColor; + } + + .fc { + .fc-button-group { + .ui-icon { + margin-top: 3px; + } + + .ui-state-active { + background-color: $accentColor; + color: $accentTextColor; + } + } + + .fc-event { + background-color: $primaryLightColor; + color: $primaryTextColor; + } + + table { + box-sizing: border-box; + } + + div.ui-widget-content { + padding-left: 0px; + padding-right: 0px; + } + } + + .ui-treetable { + .ui-treetable-header, + .ui-treetable-footer { + padding: $headerPadding; + } + + thead { + th { + background-color: $contentBgColor; + padding: $listItemPadding; + border: 0 none; + border-top: 1px solid $contentBorderColor; + + .ui-icon { + color: $textSecondaryColor; + } + + &:first-child { + border-left: 1px solid $contentBorderColor; + } + + &:last-child { + border-right: 1px solid $contentBorderColor; + } + + &.ui-state-hover { + @include hover-element(); + } + + .ui-sortable-column-icon { + vertical-align: middle; + margin: -4px 0 0 0; + color: $textSecondaryColor; + + &.ui-icon-carat-2-n-s { + margin-left: 4px; + } + } + + &.ui-state-active { + background-color: $accentColor; + color: $accentTextColor; + + .ui-icon { + color: $accentTextColor; + } + } + + .ui-column-resizer { + @include material-icon("\e86f"); + font-size: 16px; + color: $textSecondaryColor; + } + } + } + + tr { + th { + border: 1px solid $contentBorderColor; + } + } + + tfoot { + td { + border: 0 none; + padding: 10px 14px; + } + } + + tbody { + tr { + td { + border: 1px solid $contentBorderColor; + padding: $listItemPadding; + + .ui-treetable-toggler { + display: inline-block; + vertical-align: middle; + margin: 0 4px; + float: none; + } + + .ui-chkbox { + margin-right: 8px; + + .ui-chkbox-icon { + color: $textSecondaryColor; + } + } + } + + &.ui-state-hover { + @include hover-element(); + } + + &.ui-state-highlight { + .ui-chkbox { + .ui-chkbox-box { + border-color: $accentTextColor; + + .ui-icon { + color: $accentTextColor; + } + } + } + } + } + } + + &.ui-treetable-scrollable { + .ui-treetable-scrollable-header, .ui-treetable-scrollable-footer { + background-color: transparent; + border: 0 none; + padding: 0px; + } + + thead { + th { + background-color: #ffffff; + color: $textColor; + border-bottom: 1px solid $dividerColor; + border-top: 1px solid $dividerColor; + + &.ui-state-active { + background-color: $accentColor; + color: $accentTextColor; + } + } + + &.ui-treetable-scrollable-theadclone { + th { + padding-bottom: 0px; + padding-top: 0px; + line-height: 0px; + border-top: 0 none; + } + } + } + + tbody { + &.ui-widget-content { + padding: 0px; + } + + tr { + &.ui-widget-content { + padding: 0px; + } + } + } + } + } + + .ui-panelgrid { + tbody { + tr { + &.ui-widget-content { + border: 1px solid #d8d8d8; + } + } + } + } +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/theme/_forms.scss b/ace-web/src/main/webapp/resources/sass/theme/_forms.scss new file mode 100644 index 0000000..ca63a10 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/theme/_forms.scss @@ -0,0 +1,1419 @@ +body { + .ui-inputfield { + background: white no-repeat; + background-image: linear-gradient(to bottom, #D4AF37, #D4AF37), linear-gradient(to bottom, #bdbdbd, #bdbdbd); + background-size: 0 2px, 100% 1px; + background-position: 50% 100%, 50% 100%; + transition: background-size 0.3s cubic-bezier(0.64, 0.09, 0.08, 1); + border-width: 0; + padding: 2px 2px 2px 2px; + font-size: $fontSize; + @include border-radius(0px); + + &.ui-state-focus { + border-width: 0; + background-size: 100% 2px, 100% 1px; + outline: none; + padding-bottom: 2px; + } + + &.ui-state-disabled { + border-bottom: 1px dotted; + } + + &.ui-widget-content { + border-width: 1px; + background: transparent; + background-image: none; + } + + &.ui-state-error { + border-color: $inputInvalidBorderColor; + } + } + + .ui-inputfield:-webkit-autofill { + border-color: #bdbdbd; + border-style: solid; + border-width: 0px 0px 1px 0px; + + &.ui-state-focus { + padding-bottom: 0px; + } + } + + .md-inputfield { + display: block; + position:relative; + + input:focus ~ label, + input.ui-state-filled ~ label, + textarea:focus ~ label, + textarea.ui-state-filled ~ label, + .md-inputwrapper-focus ~ label, + .md-inputwrapper-filled ~ label { + top:-20px; + font-size:12px; + color:$primaryColor; + } + + input:-webkit-autofill ~ label { + top:-20px; + font-size:12px; + color:$primaryColor; + } + + label { + color:#999; + font-weight:normal; + position:absolute; + pointer-events:none; + left:5px; + top:1px; + transition: $transitionDuration ease all; + -moz-transition: $transitionDuration ease all; + -webkit-transition: $transitionDuration ease all; + } + + input.ui-state-error ~ label { + color: $inputErrorTextColor; + } + } + + .ui-selectonelistbox { + background-color: $inputBgColor; + border: 0 none; + @include border-radius($borderRadius); + + &.ui-inputfield { + padding: 0; + } + + .ui-selectlistbox-list { + padding: 0; + border: 1px solid $contentBorderColor; + } + + .ui-selectlistbox-item { + overflow: hidden; + padding: $listItemPadding; + margin: 0; + @include rippleitem(); + @include transition(background-color $transitionDuration); + @include border-radius(0); + + &.ui-state-hover { + @include hover-element(); + } + } + + .ui-selectlistbox-filter-container { + margin: 0; + padding: $inputHeaderPadding; + background-color: $primaryColor; + @include border-radius-top($borderRadius); + + .ui-inputfield { + border-color: darken($headerTextColor, 15%); + color: $headerTextColor; + width: 100%; + padding-left: 2px; + padding-right: $iconWidth; + @include border-box-sizing(); + + &.ui-state-focus { + border-color: $headerTextColor; + } + } + + .ui-icon { + color: $headerTextColor; + top: 6px; + right: 12px; + } + } + } + + .ui-multiselectlistbox { + .ui-multiselectlistbox-header { + padding: $inputHeaderPadding; + position: relative; + bottom: -1px; + } + + .ui-multiselectlistbox-list { + padding: 0; + background-color: $contentBgColor; + } + + li.ui-multiselectlistbox-item { + padding: $listItemPadding; + margin: 0; + @include rippleitem(); + @include transition(background-color $transitionDuration); + @include border-radius(0px); + + &.ui-state-hover { + @include hover-element(); + } + } + } + + .ui-button { + overflow: hidden; + background-color: $primaryColor; + color: $buttonTextColor; + height: 30px; + padding: 0 14px; + border: 0 none; + -moz-box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.26), 0 1px 5px 0 rgba(0, 0, 0, 0.16); + -webkit-box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.26), 0 1px 5px 0 rgba(0, 0, 0, 0.16); + box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.26), 0 1px 5px 0 rgba(0, 0, 0, 0.16); + @include transition(background-color $transitionDuration); + + &.ui-state-hover { + background-color: $primaryDarkColor; + } + + &.ui-state-focus { + outline: 0 none; + background-color: lighten($primaryColor,10%); + } + + .ui-button-text { + padding: 0; + line-height: 30px; + font-size: $fontSize; + } + + .ui-icon { + color: #ffffff; + } + + &.ui-button-icon-only { + @include border-radius(50%); + width: 30px; + height: 30px; + + .ui-icon { + margin-top: -1 * $iconWidth / 2; + margin-left: -1 * $iconHeight / 2; + } + } + + &.ui-button-text-icon-left, + &.ui-button-text-icon-right { + .ui-icon { + margin-top: -1 * $iconWidth / 2; + } + } + + &.ui-button-text-icon-left { + padding-left: 36px; + } + + &.ui-button-text-icon-right { + padding-right: 36px; + } + + &.secondary-btn { + background-color: $accentColor; + color: $accentTextColor; + + &.ui-state-hover { + background-color: $accentDarkColor; + } + + &.ui-state-focus { + outline: 0 none; + background-color: lighten($accentColor,10%); + } + + .ui-icon { + color: $accentTextColor; + } + } + + &.blue-grey-btn { + background-color: #607D8B; + + &.ui-state-hover { + background-color: #37474F; + } + + &.ui-state-focus { + outline: 0 none; + background-color: lighten(#607D8B,10%); + } + } + + &.cyan-btn { + background-color: #00BCD4; + + &.ui-state-hover { + background-color: #00838F; + } + + &.ui-state-focus { + outline: 0 none; + background-color: lighten(#00BCD4,10%); + } + } + + &.teal-btn { + background-color: #009688; + + &.ui-state-hover { + background-color: #00695C; + } + + &.ui-state-focus { + outline: 0 none; + background-color: lighten(#009688,10%); + } + } + + &.red-btn { + background-color: #F44336; + + &.ui-state-hover { + background-color: #C62828; + } + + &.ui-state-focus { + outline: 0 none; + background-color: lighten(#F44336,10%); + } + } + + &.green-btn { + background-color: #4CAF50; + + &.ui-state-hover { + background-color: #2E7D32; + } + + &.ui-state-focus { + outline: 0 none; + background-color: lighten(#4CAF50,10%); + } + } + + &.deep-orange-btn { + background-color: #FF5722; + + &.ui-state-hover { + background-color: #D84315; + } + + &.ui-state-focus { + outline: 0 none; + background-color: lighten(#FF5722,10%); + } + } + + &.purple-btn { + background-color: #673AB7; + + &.ui-state-hover { + background-color: #4527A0; + } + + &.ui-state-focus { + outline: 0 none; + background-color: lighten(#673AB7,10%); + } + } + + &.pink-btn { + background-color: #E91E63; + + &.ui-state-hover { + background-color: #AD1457; + } + + &.ui-state-focus { + outline: 0 none; + background-color: lighten(#E91E63,10%); + } + } + + &.amber-btn { + background-color: #FFC107; + color: #212121; + + &.ui-state-hover { + background-color: #FF8F00; + } + + &.ui-state-focus { + outline: 0 none; + background-color: lighten(#FFC107,10%); + } + } + + &.orange-btn { + background-color: #FF9800; + + &.ui-state-hover { + background-color: #EF6C00; + } + + &.ui-state-focus { + outline: 0 none; + background-color: lighten(#FF9800,10%); + } + } + + &.brown-btn { + background-color: #795548; + + &.ui-state-hover { + background-color: #4E342E; + } + + &.ui-state-focus { + outline: 0 none; + background-color: lighten(#795548,10%); + } + } + + &.flat { + @include no-shadow(); + } + } + + .ui-buttonset { + .ui-state-active { + background-color: $accentColor; + color: $accentTextColor; + } + } + + .ui-splitbutton { + @include border-radius($borderRadius); + -moz-box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.26), 0 1px 5px 0 rgba(0, 0, 0, 0.16); + -webkit-box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.26), 0 1px 5px 0 rgba(0, 0, 0, 0.16); + box-shadow: 0 1px 2.5px 0 rgba(0, 0, 0, 0.26), 0 1px 5px 0 rgba(0, 0, 0, 0.16); + + > .ui-button { + @include no-shadow(); + + &.ui-state-active { + background-color: lighten($primaryColor,10%); + } + } + + .ui-splitbutton-menubutton { + height: 30px; + @include border-radius-left(0); + @include border-radius-right(3px); + } + } + + .ui-selectbooleanbutton { + &.ui-state-active { + background-color: $accentColor; + color: $accentTextColor; + + .ui-icon { + color: $accentTextColor; + } + } + } + + .ui-chkbox { + display: inline-block; + vertical-align: middle; + width: $iconWidth - 2px; + height: $iconHeight - 2px; + cursor: default; + margin: 0 4px 0 0; + + .ui-chkbox-box { + border: 2px solid $checkboxBorderColor; + width: $iconWidth - 6px; + height: $iconHeight - 6px; + + @include transition(background-color $transitionDuration); + + .ui-chkbox-icon { + font-size: $fontSize + 4; + margin-left: -2px; + margin-top: -2px; + } + + &.ui-state-active { + border-color: $primaryColor; + background-color: $primaryColor; + + .ui-chkbox-icon { + color: $primaryTextColor; + } + + &.ui-state-focus { + .ui-chkbox-icon { + color: $primaryTextColor; + } + } + } + + &.ui-state-focus { + border-color: $primaryColor; + @include content-shadow(); + @include transition(box-shadow $transitionDuration); + + .ui-chkbox-icon { + color: $primaryColor; + } + } + } + } + + .ui-radiobutton { + position: relative; + margin: 0 4px 0 0; + display: inline-block; + vertical-align: middle; + + .ui-radiobutton-box { + width: $fontSize -1px; + height: $fontSize -1px; + border: 2px solid $radioButtonBorderColor; + @include transition(box-shadow $transitionDuration); + @include border-radius(50%); + + &.ui-state-focus { + @include content-shadow(); + } + + &.ui-state-active { + border-color: $primaryColor; + background-color: transparent; + } + + .ui-radiobutton-icon { + top: 0; + left: 0; + width: 20px; + height: 20px; + display: block; + box-sizing: border-box; + position: absolute; + @include border-radius(50%); + transition: -webkit-transform ease .28s; + transition: transform ease .28s; + -webkit-transform: scale(0); + transform: scale(0); + } + + .ui-icon-bullet { + background-color: $primaryColor; + -webkit-transform: scale(0.5); + transform: scale(0.5); + margin-left: 0; + } + } + } + + .ui-selectmanycheckbox, .ui-selectoneradio { + &.ui-widget { + label { + display: inline-block; + vertical-align: middle; + margin-top: 0; + } + } + } + + .ui-autocomplete-panel { + padding: 0; + border: 0 none; + @include border-radius(0); + + &.ui-shadow { + @include overlay-input-shadow(); + } + + .ui-autocomplete-list { + padding: 0; + + .ui-autocomplete-item { + padding: $listItemPadding; + margin: 0; + @include border-radius(0); + @include transition(background-color $transitionDuration); + + .ui-autocomplete-query { + font-weight: 700; + } + } + + .ui-autocomplete-group { + padding: $listItemPadding; + } + } + } + + .ui-autocomplete { + .ui-autocomplete-dropdown { + right: 0; + margin-right: 0; + + &.ui-button.ui-button-icon-only { + background-color: transparent; + @include no-shadow(); + height: 20px; + width: 20px; + padding: 0; + + .ui-button-text { + display: none; + } + + .ui-icon { + color: $textSecondaryColor; + } + } + } + + &.ui-autocomplete-multiple { + .ui-autocomplete-multiple-container { + &.ui-inputfield { + @include border-box-sizing(); + padding: 2px 2px 1px 2px; + } + + &.ui-state-focus { + padding-bottom: 0; + } + } + + .ui-autocomplete-input-token { + float: none; + display: inline-block; + margin: 0 1px; + vertical-align: middle; + + > input { + padding: 0; + font-size: $fontSize; + margin: 0; + } + } + + .ui-autocomplete-token { + display: inline-block; + float: none; + vertical-align: middle; + + .ui-autocomplete-token-icon { + margin-top: -10px; + } + } + } + } + + .ui-selectonemenu { + border-width: 0; + background: white no-repeat; + background-image: linear-gradient(to bottom, #3F51B5, #3F51B5), linear-gradient(to bottom, #bdbdbd, #bdbdbd); + background-size: 0 2px, 100% 1px; + background-position: 50% 100%, 50% 100%; + transition: background-size 0.3s cubic-bezier(0.64, 0.09, 0.08, 1); + padding-bottom: 2px; + box-sizing: border-box; + @include border-radius(0); + + &.ui-state-focus { + border-width: 0; + background-size: 100% 2px, 100% 1px; + outline: none; + padding-bottom: 2px; + } + + .ui-selectonemenu-trigger { + height: $iconHeight; + width: $iconWidth; + font-size: $iconFontSize; + margin-top: 0; + padding: 0; + top: 0; + margin-right: 0; + + .ui-icon { + height: $iconHeight; + width: $iconWidth; + margin-top: 0; + color: $textSecondaryColor; + } + } + + .ui-selectonemenu-label { + &.ui-inputfield { + background: none; + font-family: $fontFamily; + } + } + } + + .ui-selectonemenu-panel { + padding: 0; + @include border-radius(0); + + .ui-selectonemenu-list { + padding: 0; + } + + .ui-selectonemenu-item { + margin: 0; + padding: $listItemPadding; + @include transition(background-color $transitionDuration); + @include border-radius(0); + + &.ui-state-hover { + @include hover-element(); + } + } + + .ui-selectonemenu-item-group { + padding: 8px; + } + + &.ui-shadow { + @include overlay-input-shadow(); + } + + .ui-selectonemenu-filter-container { + .ui-icon { + top: 5px; + right: 8px; + } + } + } + + .ui-selectcheckboxmenu { + border-bottom: 1px solid $inputBorderColor; + @include border-box-sizing(); + @include border-radius(0); + + .ui-selectcheckboxmenu-label-container { + display: block; + + .ui-selectcheckboxmenu-label { + padding-top: 2px; + padding-bottom: 1px; + padding-left: 2px; + } + } + + .ui-selectcheckboxmenu-trigger { + height: $iconHeight; + width: $iconWidth; + font-size: $iconFontSize; + padding: 0; + + .ui-icon { + height: $iconHeight; + width: $iconWidth; + margin-top: 0; + color: $textSecondaryColor; + } + } + } + + .ui-selectcheckboxmenu-panel { + padding: 0; + border: 0 none; + @include border-radius(0); + @include overlay-input-shadow(); + + .ui-selectcheckboxmenu-header { + padding: $inputHeaderPadding; + margin: 0; + @include border-radius(0); + + .ui-chkbox { + float: none; + margin: 0 8px 0 1px; + + .ui-chkbox-box { + border-color: $headerTextColor; + + .ui-chkbox-icon { + border-color: $headerTextColor; + } + + &.ui-state-active { + .ui-chkbox-icon { + border-color: $headerTextColor; + } + } + + &.ui-state-focus { + background-color: $primaryLightColor; + @include transition(background-color $transitionDuration); + } + } + } + + .ui-selectcheckboxmenu-filter-container { + width: 70%; + display: inline-block; + vertical-align: middle; + float: none; + + .ui-icon { + top: -2px; + right: 0px; + color: $headerTextColor; + } + + .ui-inputfield { + border-color: darken($headerTextColor, 15%); + padding-right: 30px; + width: 100%; + border-color: $headerTextColor; + @include border-box-sizing(); + + &:focus { + border-color: $headerTextColor; + } + } + } + + .ui-selectcheckboxmenu-close { + margin-right: -6px; + + span { + color: #ffffff; + @include transition(color $transitionDuration); + } + + &.ui-state-hover { + padding: 1px; + + span { + color: $accentColor; + } + } + } + } + + .ui-selectcheckboxmenu-items-wrapper { + padding: 0; + + .ui-selectcheckboxmenu-items { + padding: 0; + } + } + + .ui-selectcheckboxmenu-item { + padding: $listItemPadding; + + label { + vertical-align: middle; + display: inline-block; + } + + .ui-chkbox { + margin-left: 2px; + } + } + } + + .ui-fluid { + .ui-selectonemenu { + .ui-selectonemenu-trigger { + width: $iconWidth; + padding: 0; + } + } + } + + #keypad-div { + @include border-radius(0); + + .keypad-key { + border: 0 none; + background-color: #ffffff; + font-size: $fontSize; + padding: 4px; + @include border-radius(50%); + @include transition(background-color $transitionDuration); + + &.ui-state-hover { + @include hover-element(); + } + } + + .keypad-shift, .keypad-enter, .keypad-spacebar, .keypad-back, .keypad-close, .keypad-clear { + @include border-radius(0); + background-color: $primaryColor; + color: #ffffff; + + &.ui-state-hover { + background-color: $primaryDarkColor; + color: #ffffff; + } + } + + &.ui-shadow { + @include overlay-input-shadow(); + } + } + + .ui-selectmanymenu { + padding: 0; + background-color: $inputBgColor; + @include border-radius($borderRadius); + + .ui-selectlistbox-item { + padding: $listItemPadding; + margin: 0; + position: relative; + overflow: hidden; + @include border-radius(0); + + &.ui-state-hover { + @include hover-element(); + } + + .ui-chkbox { + background-color: transparent; + margin: -2px 8px 0 0; + + .ui-chkbox-box { + &.ui-state-active { + border-color: #ffffff; + background-color: $accentColor; + } + } + } + } + + .ui-selectlistbox-filter-container { + margin: 0; + padding: $inputHeaderPadding; + background-color: $primaryColor; + @include border-radius-top($borderRadius); + + .ui-inputfield { + border-color: darken($headerTextColor, 15%); + color: $headerTextColor; + width: 100%; + padding-left: 2px; + padding-right: $iconWidth; + @include border-box-sizing(); + + &.ui-state-focus { + border-color: $headerTextColor; + } + } + + .ui-icon { + color: $headerTextColor; + top: 6px; + right: 12px; + } + } + + tr { + &.ui-selectlistbox-item { + td { + padding: 6px; + } + } + } + } + + .ui-spinner { + .ui-spinner-button { + width: 18px; + height: 10px; + padding: 0; + margin-right: 0; + background-color: transparent; + color: $textColor; + z-index: auto; + @include no-shadow(); + + .ui-icon-triangle-1-n { + color: $textColor; + } + + .ui-icon-triangle-1-s { + color: $textColor; + } + + .ui-icon { + top: 0px; + height: 12px; + color: $textSecondaryColor; + } + } + + .ui-spinner-up { + .ui-icon { + top: 4px; + } + } + + .ui-spinner-down { + .ui-icon { + top: 2px; + } + } + + .ui-spinner-input { + padding-right: 30px; + } + } + + .ui-fluid { + .ui-spinner { + .ui-spinner-button { + width: 25px; + height: 10px; + } + + .ui-spinner-input { + padding-right: 30px; + } + } + } + + .ui-inputswitch { + height: 14px; + width: 34px !important; + overflow: visible; + background-color: rgb(158,158,158); + border-color: rgb(158,158,158); + padding: 0; + @include border-radius(8px); + + .ui-inputswitch-handle { + top: -3px; + background-color: #ffffff; + @include border-radius(50%); + @include transition(background-color $transitionDuration); + width: 20px !important; + height: 20px !important; + -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 3px 0px, rgba(0, 0, 0, 0.137255) 0px 1px 1px 0px, rgba(0, 0, 0, 0.117647) 0px 2px 1px -1px; + -moz-box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 3px 0px, rgba(0, 0, 0, 0.137255) 0px 1px 1px 0px, rgba(0, 0, 0, 0.117647) 0px 2px 1px -1px; + box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 3px 0px, rgba(0, 0, 0, 0.137255) 0px 1px 1px 0px, rgba(0, 0, 0, 0.117647) 0px 2px 1px -1px; + } + + .ui-inputswitch-on { + visibility: hidden; + } + + .ui-inputswitch-off, .ui-inputswitch-on { + span { + visibility: hidden; + } + } + + &.ui-inputswitch-checked { + background-color: $accentLightColor; + border-color: $accentLightColor; + + .ui-inputswitch-handle { + background-color: $accentColor; + color: $accentTextColor; + } + } + } + + .ui-slider { + padding: 0; + + .ui-slider-handle { + background-color: $accentColor; + color: $accentTextColor; + @include border-radius(50%); + width: 20px; + height: 20px; + transform: scale(.7); + @include transition(all .4s cubic-bezier(.25,.8,.25,1)); + + &.ui-state-hover, + &.ui-state-focus { + transform: scale(1); + } + + &:focus { + outline: 0 none; + } + } + + &.ui-slider-horizontal { + height: 2px; + border: 0 none; + background-color: #bdbdbd; + + .ui-slider-handle { + top: -.65em; + } + } + + &.ui-slider-vertical { + width: 2px; + border: 0 none; + background-color: #bdbdbd; + + .ui-slider-handle { + left: -9px; + } + } + + .ui-slider-range { + padding: 0; + background-color: $accentColor; + color: $accentTextColor; + } + } + + .ui-calendar { + .ui-datepicker-trigger { + top: 7px; + right: 28px; + background-color: transparent; + color: $textColor; + height: $iconHeight; + width: $iconWidth; + @include no-shadow(); + @include border-radius(0); + + .ui-icon { + color: $textSecondaryColor; + } + } + } + + .ui-datepicker { + padding: 0; + width: 275px; + + &.ui-shadow { + @include overlay-input-shadow(); + } + + .ui-datepicker-header { + padding: $headerPadding; + background: $primaryDarkColor; + border-color: $primaryDarkColor; + @include border-radius-top(2px); + @include border-radius-bottom(0); + + .ui-datepicker-next { + cursor: pointer; + top: 8px; + font-size: $iconFontSize; + right: 8px; + color: #ffffff; + @include material-icon("\e039"); + + .ui-icon { + display: none; + } + + &.ui-datepicker-next-hover { + right: 8px; + } + } + + .ui-datepicker-prev { + cursor: pointer; + top: 8px; + font-size: $iconFontSize; + @include material-icon("\e039"); + @include rotate(180deg); + left: 8px; + color: #ffffff; + + .ui-icon { + display: none; + } + + &.ui-datepicker-prev-hover { + left: 8px; + } + } + } + + table { + table-layout: fixed; + border-spacing: 0; + border-collapse: collapse; + } + + thead { + tr { + color: #ffffff; + background: $primaryColor; + } + } + + tbody { + td { + padding: 2px; + box-sizing: border-box; + + a,span { + padding: .2em; + margin: 0; + text-align: center; + color: $textColor; + display: inline-block; + height: 28px; + width: 28px; + line-height: 28px; + @include border-radius(50%); + + &.ui-state-hover { + @include hover-element(); + } + + &.ui-state-active { + color: #ffffff; + background-color: $accentColor; + color: $accentTextColor; + } + } + + &.ui-datepicker-today { + a,span { + color: $textColor; + background-color: #ffffff; + border: 1px solid $accentColor; + + &.ui-state-active { + color: #ffffff; + background-color: $accentColor; + color: $accentTextColor; + } + } + } + } + } + + &.ui-datepicker-multi { + .ui-datepicker-header { + @include border-radius(0); + } + + .ui-datepicker-group { + table { + width: 100%; + @include border-box-sizing(); + } + } + } + + .ui-timepicker-div { + .ui_tpicker_time { + input { + border-color: #bdbdbd; + @include transition(border-color $transitionDuration); + width: 100%; + position: relative; + top: 5px; + left: -5px; + + &.ui-state-focus { + border-width: 0 0 2px 0; + border-color: $primaryColor; + padding-bottom: 0px; + } + } + } + + dl { + margin: -16px 0 40px 0; + + dt { + padding: $listItemPadding; + } + + dd { + margin-top: 42px; + } + } + } + + } + + .ui-fluid { + .ui-calendar { + .ui-datepicker-trigger.ui-button { + top: -4px; + width: 24px; + } + } + } + + .ui-rating { + .ui-rating-cancel { + text-indent: 0; + + a { + color: $textSecondaryColor; + background: none; + @include material-icon("\e5c9"); + font-size: $iconFontSize; + } + } + + .ui-rating-star { + text-indent: 0; + + a { + font-size: $iconFontSize; + color: $textSecondaryColor; + background: none; + @include material-icon("\e83a"); + font-size: $iconFontSize; + } + + &.ui-rating-star-on { + a { + color: $accentColor; + @include material-icon("\e838"); + font-size: $iconFontSize; + } + } + } + } + + .ui-password-panel { + &.ui-shadow { + @include overlay-input-shadow(); + } + } + + .ui-fileupload { + .ui-fileupload-buttonbar { + padding: $headerPadding; + + .ui-icon-arrowreturnthick-1-n { + @include icon_override('file_upload'); + } + + .ui-button { + background-color: $accentColor; + color: $accentTextColor; + margin-right: 6px; + + .ui-icon { + color: $accentTextColor; + } + + &.ui-state-hover { + background-color: $accentDarkColor; + } + } + } + + .ui-fileupload-content { + .ui-messages-error { + .ui-icon { + color: #ffffff; + } + } + } + } + + .ui-editor { + &.ui-widget-content { + padding: 0px; + } + } + + .ui-inputgroup { + height: 100%; + + .ui-inputgroup-addon, + .ui-inputgroup-addon-checkbox { + padding: $inputGroupPadding; + border-color: $inputGroupBorderColor; + background-color: $inputGroupBgColor; + color: $inputGroupTextColor; + min-width: $inputGroupAddonMinWidth; + border-left: 0; + border-right: 0; + border-top: 0; + + &:first-child { + @include border-radius-left(0); + } + + &:last-child { + @include border-radius-right($borderRadius); + } + } + + .ui-inputgroup-addon { + align-self: flex-end; + + > i { + @include flex(); + align-self: flex-end; + font-size: $inputGroupIconFontSize; + } + } + + .ui-inputtext { + align-self: flex-end; + } + + .md-inputfield { + -webkit-box-flex: 1; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + width: 1%; + display: inherit; + + label { + top: 5px; + } + } + + .ui-button { + .ui-button-text { + padding: 0; + } + } + + .ui-inputgroup-addon-checkbox { + padding: 0; + position: relative; + + .ui-chkbox { + vertical-align: baseline; + position: absolute; + top: 50%; + left: 50%; + margin-top: -1 * $checkboxHeight / 2; + margin-left: -1 * $checkboxWidth / 2; + } + } + } + + .ui-fluid { + .ui-inputgroup { + .ui-button { + &.ui-button-icon-only { + width: 1.643em; + height: 1.643em; + min-width: 0; + padding: 0; + + .ui-button-icon-left { + margin-left: -.45em; + } + } + } + } + } +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/theme/_icons.scss b/ace-web/src/main/webapp/resources/sass/theme/_icons.scss new file mode 100644 index 0000000..30e9d4f --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/theme/_icons.scss @@ -0,0 +1,977 @@ +.ui-icon-carat-2-n-s {@include icon-override("\e164");} +.ui-icon-triangle-1-n { @include icon-override("\e316"); } +.ui-icon-triangle-1-e { @include icon-override("\e315"); } +.ui-icon-triangle-1-s { @include icon-override("\e313"); } +.ui-icon-triangle-1-w { @include icon-override("\e314"); } +.ui-icon-carat-1-n { @include icon-override("\e316"); } +.ui-icon-carat-1-e { @include icon-override("\e315"); } +.ui-icon-carat-1-s { @include icon-override("\e313"); } +.ui-icon-carat-1-w { @include icon-override("\e314"); } +.ui-icon-arrow-1-n { @include icon-override("\e037"); @include rotate(-90deg);} +.ui-icon-arrowstop-1-n { @include icon-override("\e044"); @include rotate(-90deg);} +.ui-icon-arrow-1-s { @include icon-override("\e037"); @include rotate(90deg);} +.ui-icon-arrowstop-1-s { @include icon-override("\e045"); @include rotate(-90deg);} +.ui-icon-arrow-1-w { @include icon-override("\e037"); @include rotate(180deg);} +.ui-icon-arrowstop-1-w { @include icon-override("\e020"); } +.ui-icon-arrow-1-e { @include icon-override("\e037"); } +.ui-icon-arrowstop-1-e { @include icon-override("\e01f"); } +.ui-icon-arrowthick-1-s { @include icon-override("\e037"); @include rotate(90deg);} +.ui-icon-arrowthick-1-n { @include icon-override("\e037"); @include rotate(-90deg);} +.ui-icon-circle-triangle-e {@include icon-override("\e039"); } +.ui-icon-circle-triangle-w {@include icon-override("\e039"); @include rotate(180deg);} +.ui-icon-circle-triangle-s {@include icon-override("\e039"); @include rotate(90deg);} +.ui-icon-radio-off {@include icon-override("\e836");} +.ui-icon-radio-on {@include icon-override("\e837");} +.ui-icon-folder-collapsed {@include icon-override("\e2c7");} +.ui-icon-document {@include icon-override("\e14f");} +.ui-icon-video {@include icon-override("\e02c");} +.ui-icon-music {@include icon-override("\e405");} +.ui-icon-plus {@include icon-override("\e145");} +.ui-icon-minus {@include icon-override("\e15b");} +.ui-icon-plusthick {@include icon-override("\e145");} +.ui-icon-minusthick {@include icon-override("\e15b");} +.ui-icon-pencil {@include icon-override("\e3c9");} +.ui-icon-closethick { @include icon-override("\e5cd"); } +.ui-icon-circle-close { @include icon-override("\e5c9"); } +.ui-icon-gear { @include icon-override("\e8b8"); } +.ui-icon-calendar { @include icon-override("\e916"); } +.ui-icon-trash { @include icon-override("\e92b"); } +.ui-icon-notice { @include icon-override("\e001"); } +.ui-icon-alert { @include icon-override("\e002"); } +.ui-icon-circle-zoomin { @include icon-override("\e8ff"); } +.ui-icon-circle-zoomout { @include icon-override("\e900"); } +.ui-icon-circle-arrow-e { @include icon-override("\e039"); } +.ui-icon-circle-arrow-w { @include icon-override("\e039"); @include rotate(180deg); } + +.ui-icon-3d-rotation { @include icon-override("\e84d"); } +.ui-icon-ac-unit { @include icon-override("\eb3b"); } +.ui-icon-access-alarm { @include icon-override("\e190"); } +.ui-icon-access-alarms { @include icon-override("\e191"); } +.ui-icon-access-time { @include icon-override("\e192"); } +.ui-icon-accessibility { @include icon-override("\e84e"); } +.ui-icon-accessible { @include icon-override("\e914"); } +.ui-icon-account-balance { @include icon-override("\e84f"); } +.ui-icon-account-balance-wallet { @include icon-override("\e850"); } +.ui-icon-account-box { @include icon-override("\e851"); } +.ui-icon-account-circle { @include icon-override("\e853"); } +.ui-icon-adb { @include icon-override("\e60e"); } +.ui-icon-add { @include icon-override("\e145"); } +.ui-icon-add-a-photo { @include icon-override("\e439"); } +.ui-icon-add-alarm { @include icon-override("\e193"); } +.ui-icon-add-alert { @include icon-override("\e003"); } +.ui-icon-add-box { @include icon-override("\e146"); } +.ui-icon-add-circle { @include icon-override("\e147"); } +.ui-icon-add-circle-outline { @include icon-override("\e148"); } +.ui-icon-add-location { @include icon-override("\e567"); } +.ui-icon-add-shopping-cart { @include icon-override("\e854"); } +.ui-icon-add-to-photos { @include icon-override("\e39d"); } +.ui-icon-add-to-queue { @include icon-override("\e05c"); } +.ui-icon-adjust { @include icon-override("\e39e"); } +.ui-icon-airline-seat-flat { @include icon-override("\e630"); } +.ui-icon-airline-seat-flat-angled { @include icon-override("\e631"); } +.ui-icon-airline-seat-individual-suite { @include icon-override("\e632"); } +.ui-icon-airline-seat-legroom-extra { @include icon-override("\e633"); } +.ui-icon-airline-seat-legroom-normal { @include icon-override("\e634"); } +.ui-icon-airline-seat-legroom-reduced { @include icon-override("\e635"); } +.ui-icon-airline-seat-recline-extra { @include icon-override("\e636"); } +.ui-icon-airline-seat-recline-normal { @include icon-override("\e637"); } +.ui-icon-airplanemode-active { @include icon-override("\e195"); } +.ui-icon-airplanemode-inactive { @include icon-override("\e194"); } +.ui-icon-airplay { @include icon-override("\e055"); } +.ui-icon-airport-shuttle { @include icon-override("\eb3c"); } +.ui-icon-alarm { @include icon-override("\e855"); } +.ui-icon-alarm-add { @include icon-override("\e856"); } +.ui-icon-alarm-off { @include icon-override("\e857"); } +.ui-icon-alarm-on { @include icon-override("\e858"); } +.ui-icon-album { @include icon-override("\e019"); } +.ui-icon-all-inclusive { @include icon-override("\eb3d"); } +.ui-icon-all-out { @include icon-override("\e90b"); } +.ui-icon-android { @include icon-override("\e859"); } +.ui-icon-announcement { @include icon-override("\e85a"); } +.ui-icon-apps { @include icon-override("\e5c3"); } +.ui-icon-archive { @include icon-override("\e149"); } +.ui-icon-arrow-back { @include icon-override("\e5c4"); } +.ui-icon-arrow-downward { @include icon-override("\e5db"); } +.ui-icon-arrow-drop-down { @include icon-override("\e5c5"); } +.ui-icon-arrow-drop-down-circle { @include icon-override("\e5c6"); } +.ui-icon-arrow-drop-up { @include icon-override("\e5c7"); } +.ui-icon-arrow-forward { @include icon-override("\e5c8"); } +.ui-icon-arrow-upward { @include icon-override("\e5d8"); } +.ui-icon-art-track { @include icon-override("\e060"); } +.ui-icon-aspect-ratio { @include icon-override("\e85b"); } +.ui-icon-assessment { @include icon-override("\e85c"); } +.ui-icon-assignment { @include icon-override("\e85d"); } +.ui-icon-assignment-ind { @include icon-override("\e85e"); } +.ui-icon-assignment-late { @include icon-override("\e85f"); } +.ui-icon-assignment-return { @include icon-override("\e860"); } +.ui-icon-assignment-returned { @include icon-override("\e861"); } +.ui-icon-assignment-turned-in { @include icon-override("\e862"); } +.ui-icon-assistant { @include icon-override("\e39f"); } +.ui-icon-assistant-photo { @include icon-override("\e3a0"); } +.ui-icon-attach-file { @include icon-override("\e226"); } +.ui-icon-attach-money { @include icon-override("\e227"); } +.ui-icon-attachment { @include icon-override("\e2bc"); } +.ui-icon-audiotrack { @include icon-override("\e3a1"); } +.ui-icon-autorenew { @include icon-override("\e863"); } +.ui-icon-av-timer { @include icon-override("\e01b"); } +.ui-icon-backspace { @include icon-override("\e14a"); } +.ui-icon-backup { @include icon-override("\e864"); } +.ui-icon-battery-alert { @include icon-override("\e19c"); } +.ui-icon-battery-charging-full { @include icon-override("\e1a3"); } +.ui-icon-battery-full { @include icon-override("\e1a4"); } +.ui-icon-battery-std { @include icon-override("\e1a5"); } +.ui-icon-battery-unknown { @include icon-override("\e1a6"); } +.ui-icon-beach-access { @include icon-override("\eb3e"); } +.ui-icon-beenhere { @include icon-override("\e52d"); } +.ui-icon-block { @include icon-override("\e14b"); } +.ui-icon-bluetooth { @include icon-override("\e1a7"); } +.ui-icon-bluetooth-audio { @include icon-override("\e60f"); } +.ui-icon-bluetooth-connected { @include icon-override("\e1a8"); } +.ui-icon-bluetooth-disabled { @include icon-override("\e1a9"); } +.ui-icon-bluetooth-searching { @include icon-override("\e1aa"); } +.ui-icon-blur-circular { @include icon-override("\e3a2"); } +.ui-icon-blur-linear { @include icon-override("\e3a3"); } +.ui-icon-blur-off { @include icon-override("\e3a4"); } +.ui-icon-blur-on { @include icon-override("\e3a5"); } +.ui-icon-book { @include icon-override("\e865"); } +.ui-icon-bookmark { @include icon-override("\e866"); } +.ui-icon-bookmark-border { @include icon-override("\e867"); } +.ui-icon-border-all { @include icon-override("\e228"); } +.ui-icon-border-bottom { @include icon-override("\e229"); } +.ui-icon-border-clear { @include icon-override("\e22a"); } +.ui-icon-border-color { @include icon-override("\e22b"); } +.ui-icon-border-horizontal { @include icon-override("\e22c"); } +.ui-icon-border-inner { @include icon-override("\e22d"); } +.ui-icon-border-left { @include icon-override("\e22e"); } +.ui-icon-border-outer { @include icon-override("\e22f"); } +.ui-icon-border-right { @include icon-override("\e230"); } +.ui-icon-border-style { @include icon-override("\e231"); } +.ui-icon-border-top { @include icon-override("\e232"); } +.ui-icon-border-vertical { @include icon-override("\e233"); } +.ui-icon-branding-watermark { @include icon-override("\e06b"); } +.ui-icon-brightness-1 { @include icon-override("\e3a6"); } +.ui-icon-brightness-2 { @include icon-override("\e3a7"); } +.ui-icon-brightness-3 { @include icon-override("\e3a8"); } +.ui-icon-brightness-4 { @include icon-override("\e3a9"); } +.ui-icon-brightness-5 { @include icon-override("\e3aa"); } +.ui-icon-brightness-6 { @include icon-override("\e3ab"); } +.ui-icon-brightness-7 { @include icon-override("\e3ac"); } +.ui-icon-brightness-auto { @include icon-override("\e1ab"); } +.ui-icon-brightness-high { @include icon-override("\e1ac"); } +.ui-icon-brightness-low { @include icon-override("\e1ad"); } +.ui-icon-brightness-medium { @include icon-override("\e1ae"); } +.ui-icon-broken-image { @include icon-override("\e3ad"); } +.ui-icon-brush { @include icon-override("\e3ae"); } +.ui-icon-bubble-chart { @include icon-override("\e6dd"); } +.ui-icon-bug-report { @include icon-override("\e868"); } +.ui-icon-build { @include icon-override("\e869"); } +.ui-icon-burst-mode { @include icon-override("\e43c"); } +.ui-icon-business { @include icon-override("\e0af"); } +.ui-icon-business-center { @include icon-override("\eb3f"); } +.ui-icon-cached { @include icon-override("\e86a"); } +.ui-icon-cake { @include icon-override("\e7e9"); } +.ui-icon-call { @include icon-override("\e0b0"); } +.ui-icon-call-end { @include icon-override("\e0b1"); } +.ui-icon-call-made { @include icon-override("\e0b2"); } +.ui-icon-call-merge { @include icon-override("\e0b3"); } +.ui-icon-call-missed { @include icon-override("\e0b4"); } +.ui-icon-call-missed-outgoing { @include icon-override("\e0e4"); } +.ui-icon-call-received { @include icon-override("\e0b5"); } +.ui-icon-call-split { @include icon-override("\e0b6"); } +.ui-icon-call-to-action { @include icon-override("\e06c"); } +.ui-icon-camera { @include icon-override("\e3af"); } +.ui-icon-camera-alt { @include icon-override("\e3b0"); } +.ui-icon-camera-enhance { @include icon-override("\e8fc"); } +.ui-icon-camera-front { @include icon-override("\e3b1"); } +.ui-icon-camera-rear { @include icon-override("\e3b2"); } +.ui-icon-camera-roll { @include icon-override("\e3b3"); } +.ui-icon-cancel { @include icon-override("\e5c9"); } +.ui-icon-card-giftcard { @include icon-override("\e8f6"); } +.ui-icon-card-membership { @include icon-override("\e8f7"); } +.ui-icon-card-travel { @include icon-override("\e8f8"); } +.ui-icon-casino { @include icon-override("\eb40"); } +.ui-icon-cast { @include icon-override("\e307"); } +.ui-icon-cast-connected { @include icon-override("\e308"); } +.ui-icon-center-focus-strong { @include icon-override("\e3b4"); } +.ui-icon-center-focus-weak { @include icon-override("\e3b5"); } +.ui-icon-change-history { @include icon-override("\e86b"); } +.ui-icon-chat { @include icon-override("\e0b7"); } +.ui-icon-chat-bubble { @include icon-override("\e0ca"); } +.ui-icon-chat-bubble-outline { @include icon-override("\e0cb"); } +.ui-icon-check { @include icon-override("\e5ca"); } +.ui-icon-check-box { @include icon-override("\e834"); } +.ui-icon-check-box-outline-blank { @include icon-override("\e835"); } +.ui-icon-check-circle { @include icon-override("\e86c"); } +.ui-icon-chevron-left { @include icon-override("\e5cb"); } +.ui-icon-chevron-right { @include icon-override("\e5cc"); } +.ui-icon-child-care { @include icon-override("\eb41"); } +.ui-icon-child-friendly { @include icon-override("\eb42"); } +.ui-icon-chrome-reader-mode { @include icon-override("\e86d"); } +.ui-icon-class { @include icon-override("\e86e"); } +.ui-icon-clear { @include icon-override("\e14c"); } +.ui-icon-clear-all { @include icon-override("\e0b8"); } +.ui-icon-close { @include icon-override("\e5cd"); } +.ui-icon-closed-caption { @include icon-override("\e01c"); } +.ui-icon-cloud { @include icon-override("\e2bd"); } +.ui-icon-cloud-circle { @include icon-override("\e2be"); } +.ui-icon-cloud-done { @include icon-override("\e2bf"); } +.ui-icon-cloud-download { @include icon-override("\e2c0"); } +.ui-icon-cloud-off { @include icon-override("\e2c1"); } +.ui-icon-cloud-queue { @include icon-override("\e2c2"); } +.ui-icon-cloud-upload { @include icon-override("\e2c3"); } +.ui-icon-code { @include icon-override("\e86f"); } +.ui-icon-collections { @include icon-override("\e3b6"); } +.ui-icon-collections-bookmark { @include icon-override("\e431"); } +.ui-icon-color-lens { @include icon-override("\e3b7"); } +.ui-icon-colorize { @include icon-override("\e3b8"); } +.ui-icon-comment { @include icon-override("\e0b9"); } +.ui-icon-compare { @include icon-override("\e3b9"); } +.ui-icon-compare-arrows { @include icon-override("\e915"); } +.ui-icon-computer { @include icon-override("\e30a"); } +.ui-icon-confirmation-number { @include icon-override("\e638"); } +.ui-icon-contact-mail { @include icon-override("\e0d0"); } +.ui-icon-contact-phone { @include icon-override("\e0cf"); } +.ui-icon-contacts { @include icon-override("\e0ba"); } +.ui-icon-content-copy { @include icon-override("\e14d"); } +.ui-icon-content-cut { @include icon-override("\e14e"); } +.ui-icon-content-paste { @include icon-override("\e14f"); } +.ui-icon-control-point { @include icon-override("\e3ba"); } +.ui-icon-control-point-duplicate { @include icon-override("\e3bb"); } +.ui-icon-copyright { @include icon-override("\e90c"); } +.ui-icon-create { @include icon-override("\e150"); } +.ui-icon-create-new-folder { @include icon-override("\e2cc"); } +.ui-icon-credit-card { @include icon-override("\e870"); } +.ui-icon-crop { @include icon-override("\e3be"); } +.ui-icon-crop-16-9 { @include icon-override("\e3bc"); } +.ui-icon-crop-3-2 { @include icon-override("\e3bd"); } +.ui-icon-crop-5-4 { @include icon-override("\e3bf"); } +.ui-icon-crop-7-5 { @include icon-override("\e3c0"); } +.ui-icon-crop-din { @include icon-override("\e3c1"); } +.ui-icon-crop-free { @include icon-override("\e3c2"); } +.ui-icon-crop-landscape { @include icon-override("\e3c3"); } +.ui-icon-crop-original { @include icon-override("\e3c4"); } +.ui-icon-crop-portrait { @include icon-override("\e3c5"); } +.ui-icon-crop-rotate { @include icon-override("\e437"); } +.ui-icon-crop-square { @include icon-override("\e3c6"); } +.ui-icon-dashboard { @include icon-override("\e871"); } +.ui-icon-data-usage { @include icon-override("\e1af"); } +.ui-icon-date-range { @include icon-override("\e916"); } +.ui-icon-dehaze { @include icon-override("\e3c7"); } +.ui-icon-delete { @include icon-override("\e872"); } +.ui-icon-delete-forever { @include icon-override("\e92b"); } +.ui-icon-delete-sweep { @include icon-override("\e16c"); } +.ui-icon-description { @include icon-override("\e873"); } +.ui-icon-desktop-mac { @include icon-override("\e30b"); } +.ui-icon-desktop-windows { @include icon-override("\e30c"); } +.ui-icon-details { @include icon-override("\e3c8"); } +.ui-icon-developer-board { @include icon-override("\e30d"); } +.ui-icon-developer-mode { @include icon-override("\e1b0"); } +.ui-icon-device-hub { @include icon-override("\e335"); } +.ui-icon-devices { @include icon-override("\e1b1"); } +.ui-icon-devices-other { @include icon-override("\e337"); } +.ui-icon-dialer-sip { @include icon-override("\e0bb"); } +.ui-icon-dialpad { @include icon-override("\e0bc"); } +.ui-icon-directions { @include icon-override("\e52e"); } +.ui-icon-directions-bike { @include icon-override("\e52f"); } +.ui-icon-directions-boat { @include icon-override("\e532"); } +.ui-icon-directions-bus { @include icon-override("\e530"); } +.ui-icon-directions-car { @include icon-override("\e531"); } +.ui-icon-directions-railway { @include icon-override("\e534"); } +.ui-icon-directions-run { @include icon-override("\e566"); } +.ui-icon-directions-subway { @include icon-override("\e533"); } +.ui-icon-directions-transit { @include icon-override("\e535"); } +.ui-icon-directions-walk { @include icon-override("\e536"); } +.ui-icon-disc-full { @include icon-override("\e610"); } +.ui-icon-dns { @include icon-override("\e875"); } +.ui-icon-do-not-disturb { @include icon-override("\e612"); } +.ui-icon-do-not-disturb-alt { @include icon-override("\e611"); } +.ui-icon-do-not-disturb-off { @include icon-override("\e643"); } +.ui-icon-do-not-disturb-on { @include icon-override("\e644"); } +.ui-icon-dock { @include icon-override("\e30e"); } +.ui-icon-domain { @include icon-override("\e7ee"); } +.ui-icon-done { @include icon-override("\e876"); } +.ui-icon-done-all { @include icon-override("\e877"); } +.ui-icon-donut-large { @include icon-override("\e917"); } +.ui-icon-donut-small { @include icon-override("\e918"); } +.ui-icon-drafts { @include icon-override("\e151"); } +.ui-icon-drag-handle { @include icon-override("\e25d"); } +.ui-icon-drive-eta { @include icon-override("\e613"); } +.ui-icon-dvr { @include icon-override("\e1b2"); } +.ui-icon-edit { @include icon-override("\e3c9"); } +.ui-icon-edit-location { @include icon-override("\e568"); } +.ui-icon-eject { @include icon-override("\e8fb"); } +.ui-icon-email { @include icon-override("\e0be"); } +.ui-icon-enhanced-encryption { @include icon-override("\e63f"); } +.ui-icon-equalizer { @include icon-override("\e01d"); } +.ui-icon-error { @include icon-override("\e000"); } +.ui-icon-error-outline { @include icon-override("\e001"); } +.ui-icon-euro-symbol { @include icon-override("\e926"); } +.ui-icon-ev-station { @include icon-override("\e56d"); } +.ui-icon-event { @include icon-override("\e878"); } +.ui-icon-event-available { @include icon-override("\e614"); } +.ui-icon-event-busy { @include icon-override("\e615"); } +.ui-icon-event-note { @include icon-override("\e616"); } +.ui-icon-event-seat { @include icon-override("\e903"); } +.ui-icon-exit-to-app { @include icon-override("\e879"); } +.ui-icon-expand-less { @include icon-override("\e5ce"); } +.ui-icon-expand-more { @include icon-override("\e5cf"); } +.ui-icon-explicit { @include icon-override("\e01e"); } +.ui-icon-explore { @include icon-override("\e87a"); } +.ui-icon-exposure { @include icon-override("\e3ca"); } +.ui-icon-exposure-neg-1 { @include icon-override("\e3cb"); } +.ui-icon-exposure-neg-2 { @include icon-override("\e3cc"); } +.ui-icon-exposure-plus-1 { @include icon-override("\e3cd"); } +.ui-icon-exposure-plus-2 { @include icon-override("\e3ce"); } +.ui-icon-exposure-zero { @include icon-override("\e3cf"); } +.ui-icon-extension { @include icon-override("\e87b"); } +.ui-icon-face { @include icon-override("\e87c"); } +.ui-icon-fast-forward { @include icon-override("\e01f"); } +.ui-icon-fast-rewind { @include icon-override("\e020"); } +.ui-icon-favorite { @include icon-override("\e87d"); } +.ui-icon-favorite-border { @include icon-override("\e87e"); } +.ui-icon-featured-play-list { @include icon-override("\e06d"); } +.ui-icon-featured-video { @include icon-override("\e06e"); } +.ui-icon-feedback { @include icon-override("\e87f"); } +.ui-icon-fiber-dvr { @include icon-override("\e05d"); } +.ui-icon-fiber-manual-record { @include icon-override("\e061"); } +.ui-icon-fiber-new { @include icon-override("\e05e"); } +.ui-icon-fiber-pin { @include icon-override("\e06a"); } +.ui-icon-fiber-smart-record { @include icon-override("\e062"); } +.ui-icon-file-download { @include icon-override("\e2c4"); } +.ui-icon-file-upload { @include icon-override("\e2c6"); } +.ui-icon-filter { @include icon-override("\e3d3"); } +.ui-icon-filter-1 { @include icon-override("\e3d0"); } +.ui-icon-filter-2 { @include icon-override("\e3d1"); } +.ui-icon-filter-3 { @include icon-override("\e3d2"); } +.ui-icon-filter-4 { @include icon-override("\e3d4"); } +.ui-icon-filter-5 { @include icon-override("\e3d5"); } +.ui-icon-filter-6 { @include icon-override("\e3d6"); } +.ui-icon-filter-7 { @include icon-override("\e3d7"); } +.ui-icon-filter-8 { @include icon-override("\e3d8"); } +.ui-icon-filter-9 { @include icon-override("\e3d9"); } +.ui-icon-filter-9-plus { @include icon-override("\e3da"); } +.ui-icon-filter-b-and-w { @include icon-override("\e3db"); } +.ui-icon-filter-center-focus { @include icon-override("\e3dc"); } +.ui-icon-filter-drama { @include icon-override("\e3dd"); } +.ui-icon-filter-frames { @include icon-override("\e3de"); } +.ui-icon-filter-hdr { @include icon-override("\e3df"); } +.ui-icon-filter-list { @include icon-override("\e152"); } +.ui-icon-filter-none { @include icon-override("\e3e0"); } +.ui-icon-filter-tilt-shift { @include icon-override("\e3e2"); } +.ui-icon-filter-vintage { @include icon-override("\e3e3"); } +.ui-icon-find-in-page { @include icon-override("\e880"); } +.ui-icon-find-replace { @include icon-override("\e881"); } +.ui-icon-fingerprint { @include icon-override("\e90d"); } +.ui-icon-first-page { @include icon-override("\e5dc"); } +.ui-icon-fitness-center { @include icon-override("\eb43"); } +.ui-icon-flag { @include icon-override("\e153"); } +.ui-icon-flare { @include icon-override("\e3e4"); } +.ui-icon-flash-auto { @include icon-override("\e3e5"); } +.ui-icon-flash-off { @include icon-override("\e3e6"); } +.ui-icon-flash-on { @include icon-override("\e3e7"); } +.ui-icon-flight { @include icon-override("\e539"); } +.ui-icon-flight-land { @include icon-override("\e904"); } +.ui-icon-flight-takeoff { @include icon-override("\e905"); } +.ui-icon-flip { @include icon-override("\e3e8"); } +.ui-icon-flip-to-back { @include icon-override("\e882"); } +.ui-icon-flip-to-front { @include icon-override("\e883"); } +.ui-icon-folder { @include icon-override("\e2c7"); } +.ui-icon-folder-open { @include icon-override("\e2c8"); } +.ui-icon-folder-shared { @include icon-override("\e2c9"); } +.ui-icon-folder-special { @include icon-override("\e617"); } +.ui-icon-font-download { @include icon-override("\e167"); } +.ui-icon-format-align-center { @include icon-override("\e234"); } +.ui-icon-format-align-justify { @include icon-override("\e235"); } +.ui-icon-format-align-left { @include icon-override("\e236"); } +.ui-icon-format-align-right { @include icon-override("\e237"); } +.ui-icon-format-bold { @include icon-override("\e238"); } +.ui-icon-format-clear { @include icon-override("\e239"); } +.ui-icon-format-color-fill { @include icon-override("\e23a"); } +.ui-icon-format-color-reset { @include icon-override("\e23b"); } +.ui-icon-format-color-text { @include icon-override("\e23c"); } +.ui-icon-format-indent-decrease { @include icon-override("\e23d"); } +.ui-icon-format-indent-increase { @include icon-override("\e23e"); } +.ui-icon-format-italic { @include icon-override("\e23f"); } +.ui-icon-format-line-spacing { @include icon-override("\e240"); } +.ui-icon-format-list-bulleted { @include icon-override("\e241"); } +.ui-icon-format-list-numbered { @include icon-override("\e242"); } +.ui-icon-format-paint { @include icon-override("\e243"); } +.ui-icon-format-quote { @include icon-override("\e244"); } +.ui-icon-format-shapes { @include icon-override("\e25e"); } +.ui-icon-format-size { @include icon-override("\e245"); } +.ui-icon-format-strikethrough { @include icon-override("\e246"); } +.ui-icon-format-textdirection-l-to-r { @include icon-override("\e247"); } +.ui-icon-format-textdirection-r-to-l { @include icon-override("\e248"); } +.ui-icon-format-underlined { @include icon-override("\e249"); } +.ui-icon-forum { @include icon-override("\e0bf"); } +.ui-icon-forward { @include icon-override("\e154"); } +.ui-icon-forward-10 { @include icon-override("\e056"); } +.ui-icon-forward-30 { @include icon-override("\e057"); } +.ui-icon-forward-5 { @include icon-override("\e058"); } +.ui-icon-free-breakfast { @include icon-override("\eb44"); } +.ui-icon-fullscreen { @include icon-override("\e5d0"); } +.ui-icon-fullscreen-exit { @include icon-override("\e5d1"); } +.ui-icon-functions { @include icon-override("\e24a"); } +.ui-icon-g-translate { @include icon-override("\e927"); } +.ui-icon-gamepad { @include icon-override("\e30f"); } +.ui-icon-games { @include icon-override("\e021"); } +.ui-icon-gavel { @include icon-override("\e90e"); } +.ui-icon-gesture { @include icon-override("\e155"); } +.ui-icon-get-app { @include icon-override("\e884"); } +.ui-icon-gif { @include icon-override("\e908"); } +.ui-icon-golf-course { @include icon-override("\eb45"); } +.ui-icon-gps-fixed { @include icon-override("\e1b3"); } +.ui-icon-gps-not-fixed { @include icon-override("\e1b4"); } +.ui-icon-gps-off { @include icon-override("\e1b5"); } +.ui-icon-grade { @include icon-override("\e885"); } +.ui-icon-gradient { @include icon-override("\e3e9"); } +.ui-icon-grain { @include icon-override("\e3ea"); } +.ui-icon-graphic-eq { @include icon-override("\e1b8"); } +.ui-icon-grid-off { @include icon-override("\e3eb"); } +.ui-icon-grid-on { @include icon-override("\e3ec"); } +.ui-icon-group { @include icon-override("\e7ef"); } +.ui-icon-group-add { @include icon-override("\e7f0"); } +.ui-icon-group-work { @include icon-override("\e886"); } +.ui-icon-hd { @include icon-override("\e052"); } +.ui-icon-hdr-off { @include icon-override("\e3ed"); } +.ui-icon-hdr-on { @include icon-override("\e3ee"); } +.ui-icon-hdr-strong { @include icon-override("\e3f1"); } +.ui-icon-hdr-weak { @include icon-override("\e3f2"); } +.ui-icon-headset { @include icon-override("\e310"); } +.ui-icon-headset-mic { @include icon-override("\e311"); } +.ui-icon-healing { @include icon-override("\e3f3"); } +.ui-icon-hearing { @include icon-override("\e023"); } +.ui-icon-help { @include icon-override("\e887"); } +.ui-icon-help-outline { @include icon-override("\e8fd"); } +.ui-icon-high-quality { @include icon-override("\e024"); } +.ui-icon-highlight { @include icon-override("\e25f"); } +.ui-icon-highlight-off { @include icon-override("\e888"); } +.ui-icon-history { @include icon-override("\e889"); } +.ui-icon-home { @include icon-override("\e88a"); } +.ui-icon-hot-tub { @include icon-override("\eb46"); } +.ui-icon-hotel { @include icon-override("\e53a"); } +.ui-icon-hourglass-empty { @include icon-override("\e88b"); } +.ui-icon-hourglass-full { @include icon-override("\e88c"); } +.ui-icon-http { @include icon-override("\e902"); } +.ui-icon-https { @include icon-override("\e88d"); } +.ui-icon-image { @include icon-override("\e3f4"); } +.ui-icon-image-aspect-ratio { @include icon-override("\e3f5"); } +.ui-icon-import-contacts { @include icon-override("\e0e0"); } +.ui-icon-import-export { @include icon-override("\e0c3"); } +.ui-icon-important-devices { @include icon-override("\e912"); } +.ui-icon-inbox { @include icon-override("\e156"); } +.ui-icon-indeterminate-check-box { @include icon-override("\e909"); } +.ui-icon-info { @include icon-override("\e88e"); } +.ui-icon-info-outline { @include icon-override("\e88f"); } +.ui-icon-input { @include icon-override("\e890"); } +.ui-icon-insert-chart { @include icon-override("\e24b"); } +.ui-icon-insert-comment { @include icon-override("\e24c"); } +.ui-icon-insert-drive-file { @include icon-override("\e24d"); } +.ui-icon-insert-emoticon { @include icon-override("\e24e"); } +.ui-icon-insert-invitation { @include icon-override("\e24f"); } +.ui-icon-insert-link { @include icon-override("\e250"); } +.ui-icon-insert-photo { @include icon-override("\e251"); } +.ui-icon-invert-colors { @include icon-override("\e891"); } +.ui-icon-invert-colors-off { @include icon-override("\e0c4"); } +.ui-icon-iso { @include icon-override("\e3f6"); } +.ui-icon-keyboard { @include icon-override("\e312"); } +.ui-icon-keyboard-arrow-down { @include icon-override("\e313"); } +.ui-icon-keyboard-arrow-left { @include icon-override("\e314"); } +.ui-icon-keyboard-arrow-right { @include icon-override("\e315"); } +.ui-icon-keyboard-arrow-up { @include icon-override("\e316"); } +.ui-icon-keyboard-backspace { @include icon-override("\e317"); } +.ui-icon-keyboard-capslock { @include icon-override("\e318"); } +.ui-icon-keyboard-hide { @include icon-override("\e31a"); } +.ui-icon-keyboard-return { @include icon-override("\e31b"); } +.ui-icon-keyboard-tab { @include icon-override("\e31c"); } +.ui-icon-keyboard-voice { @include icon-override("\e31d"); } +.ui-icon-kitchen { @include icon-override("\eb47"); } +.ui-icon-label { @include icon-override("\e892"); } +.ui-icon-label-outline { @include icon-override("\e893"); } +.ui-icon-landscape { @include icon-override("\e3f7"); } +.ui-icon-language { @include icon-override("\e894"); } +.ui-icon-laptop { @include icon-override("\e31e"); } +.ui-icon-laptop-chromebook { @include icon-override("\e31f"); } +.ui-icon-laptop-mac { @include icon-override("\e320"); } +.ui-icon-laptop-windows { @include icon-override("\e321"); } +.ui-icon-last-page { @include icon-override("\e5dd"); } +.ui-icon-launch { @include icon-override("\e895"); } +.ui-icon-layers { @include icon-override("\e53b"); } +.ui-icon-layers-clear { @include icon-override("\e53c"); } +.ui-icon-leak-add { @include icon-override("\e3f8"); } +.ui-icon-leak-remove { @include icon-override("\e3f9"); } +.ui-icon-lens { @include icon-override("\e3fa"); } +.ui-icon-library-add { @include icon-override("\e02e"); } +.ui-icon-library-books { @include icon-override("\e02f"); } +.ui-icon-library-music { @include icon-override("\e030"); } +.ui-icon-lightbulb-outline { @include icon-override("\e90f"); } +.ui-icon-line-style { @include icon-override("\e919"); } +.ui-icon-line-weight { @include icon-override("\e91a"); } +.ui-icon-linear-scale { @include icon-override("\e260"); } +.ui-icon-link { @include icon-override("\e157"); } +.ui-icon-linked-camera { @include icon-override("\e438"); } +.ui-icon-list { @include icon-override("\e896"); } +.ui-icon-live-help { @include icon-override("\e0c6"); } +.ui-icon-live-tv { @include icon-override("\e639"); } +.ui-icon-local-activity { @include icon-override("\e53f"); } +.ui-icon-local-airport { @include icon-override("\e53d"); } +.ui-icon-local-atm { @include icon-override("\e53e"); } +.ui-icon-local-bar { @include icon-override("\e540"); } +.ui-icon-local-cafe { @include icon-override("\e541"); } +.ui-icon-local-car-wash { @include icon-override("\e542"); } +.ui-icon-local-convenience-store { @include icon-override("\e543"); } +.ui-icon-local-dining { @include icon-override("\e556"); } +.ui-icon-local-drink { @include icon-override("\e544"); } +.ui-icon-local-florist { @include icon-override("\e545"); } +.ui-icon-local-gas-station { @include icon-override("\e546"); } +.ui-icon-local-grocery-store { @include icon-override("\e547"); } +.ui-icon-local-hospital { @include icon-override("\e548"); } +.ui-icon-local-hotel { @include icon-override("\e549"); } +.ui-icon-local-laundry-service { @include icon-override("\e54a"); } +.ui-icon-local-library { @include icon-override("\e54b"); } +.ui-icon-local-mall { @include icon-override("\e54c"); } +.ui-icon-local-movies { @include icon-override("\e54d"); } +.ui-icon-local-offer { @include icon-override("\e54e"); } +.ui-icon-local-parking { @include icon-override("\e54f"); } +.ui-icon-local-pharmacy { @include icon-override("\e550"); } +.ui-icon-local-phone { @include icon-override("\e551"); } +.ui-icon-local-pizza { @include icon-override("\e552"); } +.ui-icon-local-play { @include icon-override("\e553"); } +.ui-icon-local-post-office { @include icon-override("\e554"); } +.ui-icon-local-printshop { @include icon-override("\e555"); } +.ui-icon-local-see { @include icon-override("\e557"); } +.ui-icon-local-shipping { @include icon-override("\e558"); } +.ui-icon-local-taxi { @include icon-override("\e559"); } +.ui-icon-location-city { @include icon-override("\e7f1"); } +.ui-icon-location-disabled { @include icon-override("\e1b6"); } +.ui-icon-location-off { @include icon-override("\e0c7"); } +.ui-icon-location-on { @include icon-override("\e0c8"); } +.ui-icon-location-searching { @include icon-override("\e1b7"); } +.ui-icon-lock { @include icon-override("\e897"); } +.ui-icon-lock-open { @include icon-override("\e898"); } +.ui-icon-lock-outline { @include icon-override("\e899"); } +.ui-icon-looks { @include icon-override("\e3fc"); } +.ui-icon-looks-3 { @include icon-override("\e3fb"); } +.ui-icon-looks-4 { @include icon-override("\e3fd"); } +.ui-icon-looks-5 { @include icon-override("\e3fe"); } +.ui-icon-looks-6 { @include icon-override("\e3ff"); } +.ui-icon-looks-one { @include icon-override("\e400"); } +.ui-icon-looks-two { @include icon-override("\e401"); } +.ui-icon-loop { @include icon-override("\e028"); } +.ui-icon-loupe { @include icon-override("\e402"); } +.ui-icon-low-priority { @include icon-override("\e16d"); } +.ui-icon-loyalty { @include icon-override("\e89a"); } +.ui-icon-mail { @include icon-override("\e158"); } +.ui-icon-mail-outline { @include icon-override("\e0e1"); } +.ui-icon-map { @include icon-override("\e55b"); } +.ui-icon-markunread { @include icon-override("\e159"); } +.ui-icon-markunread-mailbox { @include icon-override("\e89b"); } +.ui-icon-memory { @include icon-override("\e322"); } +.ui-icon-menu { @include icon-override("\e5d2"); } +.ui-icon-merge-type { @include icon-override("\e252"); } +.ui-icon-message { @include icon-override("\e0c9"); } +.ui-icon-mic { @include icon-override("\e029"); } +.ui-icon-mic-none { @include icon-override("\e02a"); } +.ui-icon-mic-off { @include icon-override("\e02b"); } +.ui-icon-mms { @include icon-override("\e618"); } +.ui-icon-mode-comment { @include icon-override("\e253"); } +.ui-icon-mode-edit { @include icon-override("\e254"); } +.ui-icon-monetization-on { @include icon-override("\e263"); } +.ui-icon-money-off { @include icon-override("\e25c"); } +.ui-icon-monochrome-photos { @include icon-override("\e403"); } +.ui-icon-mood { @include icon-override("\e7f2"); } +.ui-icon-mood-bad { @include icon-override("\e7f3"); } +.ui-icon-more { @include icon-override("\e619"); } +.ui-icon-more-horiz { @include icon-override("\e5d3"); } +.ui-icon-more-vert { @include icon-override("\e5d4"); } +.ui-icon-motorcycle { @include icon-override("\e91b"); } +.ui-icon-mouse { @include icon-override("\e323"); } +.ui-icon-move-to-inbox { @include icon-override("\e168"); } +.ui-icon-movie { @include icon-override("\e02c"); } +.ui-icon-movie-creation { @include icon-override("\e404"); } +.ui-icon-movie-filter { @include icon-override("\e43a"); } +.ui-icon-multiline-chart { @include icon-override("\e6df"); } +.ui-icon-music-note { @include icon-override("\e405"); } +.ui-icon-music-video { @include icon-override("\e063"); } +.ui-icon-my-location { @include icon-override("\e55c"); } +.ui-icon-nature { @include icon-override("\e406"); } +.ui-icon-nature-people { @include icon-override("\e407"); } +.ui-icon-navigate-before { @include icon-override("\e408"); } +.ui-icon-navigate-next { @include icon-override("\e409"); } +.ui-icon-navigation { @include icon-override("\e55d"); } +.ui-icon-near-me { @include icon-override("\e569"); } +.ui-icon-network-cell { @include icon-override("\e1b9"); } +.ui-icon-network-check { @include icon-override("\e640"); } +.ui-icon-network-locked { @include icon-override("\e61a"); } +.ui-icon-network-wifi { @include icon-override("\e1ba"); } +.ui-icon-new-releases { @include icon-override("\e031"); } +.ui-icon-next-week { @include icon-override("\e16a"); } +.ui-icon-nfc { @include icon-override("\e1bb"); } +.ui-icon-no-encryption { @include icon-override("\e641"); } +.ui-icon-no-sim { @include icon-override("\e0cc"); } +.ui-icon-not-interested { @include icon-override("\e033"); } +.ui-icon-note { @include icon-override("\e06f"); } +.ui-icon-note-add { @include icon-override("\e89c"); } +.ui-icon-notifications { @include icon-override("\e7f4"); } +.ui-icon-notifications-active { @include icon-override("\e7f7"); } +.ui-icon-notifications-none { @include icon-override("\e7f5"); } +.ui-icon-notifications-off { @include icon-override("\e7f6"); } +.ui-icon-notifications-paused { @include icon-override("\e7f8"); } +.ui-icon-offline-pin { @include icon-override("\e90a"); } +.ui-icon-ondemand-video { @include icon-override("\e63a"); } +.ui-icon-opacity { @include icon-override("\e91c"); } +.ui-icon-open-in-browser { @include icon-override("\e89d"); } +.ui-icon-open-in-new { @include icon-override("\e89e"); } +.ui-icon-open-with { @include icon-override("\e89f"); } +.ui-icon-pages { @include icon-override("\e7f9"); } +.ui-icon-pageview { @include icon-override("\e8a0"); } +.ui-icon-palette { @include icon-override("\e40a"); } +.ui-icon-pan-tool { @include icon-override("\e925"); } +.ui-icon-panorama { @include icon-override("\e40b"); } +.ui-icon-panorama-fish-eye { @include icon-override("\e40c"); } +.ui-icon-panorama-horizontal { @include icon-override("\e40d"); } +.ui-icon-panorama-vertical { @include icon-override("\e40e"); } +.ui-icon-panorama-wide-angle { @include icon-override("\e40f"); } +.ui-icon-party-mode { @include icon-override("\e7fa"); } +.ui-icon-pause { @include icon-override("\e034"); } +.ui-icon-pause-circle-filled { @include icon-override("\e035"); } +.ui-icon-pause-circle-outline { @include icon-override("\e036"); } +.ui-icon-payment { @include icon-override("\e8a1"); } +.ui-icon-people { @include icon-override("\e7fb"); } +.ui-icon-people-outline { @include icon-override("\e7fc"); } +.ui-icon-perm-camera-mic { @include icon-override("\e8a2"); } +.ui-icon-perm-contact-calendar { @include icon-override("\e8a3"); } +.ui-icon-perm-data-setting { @include icon-override("\e8a4"); } +.ui-icon-perm-device-information { @include icon-override("\e8a5"); } +.ui-icon-perm-identity { @include icon-override("\e8a6"); } +.ui-icon-perm-media { @include icon-override("\e8a7"); } +.ui-icon-perm-phone-msg { @include icon-override("\e8a8"); } +.ui-icon-perm-scan-wifi { @include icon-override("\e8a9"); } +.ui-icon-person { @include icon-override("\e7fd"); } +.ui-icon-person-add { @include icon-override("\e7fe"); } +.ui-icon-person-outline { @include icon-override("\e7ff"); } +.ui-icon-person-pin { @include icon-override("\e55a"); } +.ui-icon-person-pin-circle { @include icon-override("\e56a"); } +.ui-icon-personal-video { @include icon-override("\e63b"); } +.ui-icon-pets { @include icon-override("\e91d"); } +.ui-icon-phone { @include icon-override("\e0cd"); } +.ui-icon-phone-android { @include icon-override("\e324"); } +.ui-icon-phone-bluetooth-speaker { @include icon-override("\e61b"); } +.ui-icon-phone-forwarded { @include icon-override("\e61c"); } +.ui-icon-phone-in-talk { @include icon-override("\e61d"); } +.ui-icon-phone-iphone { @include icon-override("\e325"); } +.ui-icon-phone-locked { @include icon-override("\e61e"); } +.ui-icon-phone-missed { @include icon-override("\e61f"); } +.ui-icon-phone-paused { @include icon-override("\e620"); } +.ui-icon-phonelink { @include icon-override("\e326"); } +.ui-icon-phonelink-erase { @include icon-override("\e0db"); } +.ui-icon-phonelink-lock { @include icon-override("\e0dc"); } +.ui-icon-phonelink-off { @include icon-override("\e327"); } +.ui-icon-phonelink-ring { @include icon-override("\e0dd"); } +.ui-icon-phonelink-setup { @include icon-override("\e0de"); } +.ui-icon-photo { @include icon-override("\e410"); } +.ui-icon-photo-album { @include icon-override("\e411"); } +.ui-icon-photo-camera { @include icon-override("\e412"); } +.ui-icon-photo-filter { @include icon-override("\e43b"); } +.ui-icon-photo-library { @include icon-override("\e413"); } +.ui-icon-photo-size-select-actual { @include icon-override("\e432"); } +.ui-icon-photo-size-select-large { @include icon-override("\e433"); } +.ui-icon-photo-size-select-small { @include icon-override("\e434"); } +.ui-icon-picture-as-pdf { @include icon-override("\e415"); } +.ui-icon-picture-in-picture { @include icon-override("\e8aa"); } +.ui-icon-picture-in-picture-alt { @include icon-override("\e911"); } +.ui-icon-pie-chart { @include icon-override("\e6c4"); } +.ui-icon-pie-chart-outlined { @include icon-override("\e6c5"); } +.ui-icon-pin-drop { @include icon-override("\e55e"); } +.ui-icon-place { @include icon-override("\e55f"); } +.ui-icon-play-arrow { @include icon-override("\e037"); } +.ui-icon-play-circle-filled { @include icon-override("\e038"); } +.ui-icon-play-circle-outline { @include icon-override("\e039"); } +.ui-icon-play-for-work { @include icon-override("\e906"); } +.ui-icon-playlist-add { @include icon-override("\e03b"); } +.ui-icon-playlist-add-check { @include icon-override("\e065"); } +.ui-icon-playlist-play { @include icon-override("\e05f"); } +.ui-icon-plus-one { @include icon-override("\e800"); } +.ui-icon-poll { @include icon-override("\e801"); } +.ui-icon-polymer { @include icon-override("\e8ab"); } +.ui-icon-pool { @include icon-override("\eb48"); } +.ui-icon-portable-wifi-off { @include icon-override("\e0ce"); } +.ui-icon-portrait { @include icon-override("\e416"); } +.ui-icon-power { @include icon-override("\e63c"); } +.ui-icon-power-input { @include icon-override("\e336"); } +.ui-icon-power-settings-new { @include icon-override("\e8ac"); } +.ui-icon-pregnant-woman { @include icon-override("\e91e"); } +.ui-icon-present-to-all { @include icon-override("\e0df"); } +.ui-icon-print { @include icon-override("\e8ad"); } +.ui-icon-priority-high { @include icon-override("\e645"); } +.ui-icon-public { @include icon-override("\e80b"); } +.ui-icon-publish { @include icon-override("\e255"); } +.ui-icon-query-builder { @include icon-override("\e8ae"); } +.ui-icon-question-answer { @include icon-override("\e8af"); } +.ui-icon-queue { @include icon-override("\e03c"); } +.ui-icon-queue-music { @include icon-override("\e03d"); } +.ui-icon-queue-play-next { @include icon-override("\e066"); } +.ui-icon-radio { @include icon-override("\e03e"); } +.ui-icon-radio-button-checked { @include icon-override("\e837"); } +.ui-icon-radio-button-unchecked { @include icon-override("\e836"); } +.ui-icon-rate-review { @include icon-override("\e560"); } +.ui-icon-receipt { @include icon-override("\e8b0"); } +.ui-icon-recent-actors { @include icon-override("\e03f"); } +.ui-icon-record-voice-over { @include icon-override("\e91f"); } +.ui-icon-redeem { @include icon-override("\e8b1"); } +.ui-icon-redo { @include icon-override("\e15a"); } +.ui-icon-refresh { @include icon-override("\e5d5"); } +.ui-icon-remove { @include icon-override("\e15b"); } +.ui-icon-remove-circle { @include icon-override("\e15c"); } +.ui-icon-remove-circle-outline { @include icon-override("\e15d"); } +.ui-icon-remove-from-queue { @include icon-override("\e067"); } +.ui-icon-remove-red-eye { @include icon-override("\e417"); } +.ui-icon-remove-shopping-cart { @include icon-override("\e928"); } +.ui-icon-reorder { @include icon-override("\e8fe"); } +.ui-icon-repeat { @include icon-override("\e040"); } +.ui-icon-repeat-one { @include icon-override("\e041"); } +.ui-icon-replay { @include icon-override("\e042"); } +.ui-icon-replay-10 { @include icon-override("\e059"); } +.ui-icon-replay-30 { @include icon-override("\e05a"); } +.ui-icon-replay-5 { @include icon-override("\e05b"); } +.ui-icon-reply { @include icon-override("\e15e"); } +.ui-icon-reply-all { @include icon-override("\e15f"); } +.ui-icon-report { @include icon-override("\e160"); } +.ui-icon-report-problem { @include icon-override("\e8b2"); } +.ui-icon-restaurant { @include icon-override("\e56c"); } +.ui-icon-restaurant-menu { @include icon-override("\e561"); } +.ui-icon-restore { @include icon-override("\e8b3"); } +.ui-icon-restore-page { @include icon-override("\e929"); } +.ui-icon-ring-volume { @include icon-override("\e0d1"); } +.ui-icon-room { @include icon-override("\e8b4"); } +.ui-icon-room-service { @include icon-override("\eb49"); } +.ui-icon-rotate-90-degrees-ccw { @include icon-override("\e418"); } +.ui-icon-rotate-left { @include icon-override("\e419"); } +.ui-icon-rotate-right { @include icon-override("\e41a"); } +.ui-icon-rounded-corner { @include icon-override("\e920"); } +.ui-icon-router { @include icon-override("\e328"); } +.ui-icon-rowing { @include icon-override("\e921"); } +.ui-icon-rss-feed { @include icon-override("\e0e5"); } +.ui-icon-rv-hookup { @include icon-override("\e642"); } +.ui-icon-satellite { @include icon-override("\e562"); } +.ui-icon-save { @include icon-override("\e161"); } +.ui-icon-scanner { @include icon-override("\e329"); } +.ui-icon-schedule { @include icon-override("\e8b5"); } +.ui-icon-school { @include icon-override("\e80c"); } +.ui-icon-screen-lock-landscape { @include icon-override("\e1be"); } +.ui-icon-screen-lock-portrait { @include icon-override("\e1bf"); } +.ui-icon-screen-lock-rotation { @include icon-override("\e1c0"); } +.ui-icon-screen-rotation { @include icon-override("\e1c1"); } +.ui-icon-screen-share { @include icon-override("\e0e2"); } +.ui-icon-sd-card { @include icon-override("\e623"); } +.ui-icon-sd-storage { @include icon-override("\e1c2"); } +.ui-icon-search { @include icon-override("\e8b6"); } +.ui-icon-security { @include icon-override("\e32a"); } +.ui-icon-select-all { @include icon-override("\e162"); } +.ui-icon-send { @include icon-override("\e163"); } +.ui-icon-sentiment-dissatisfied { @include icon-override("\e811"); } +.ui-icon-sentiment-neutral { @include icon-override("\e812"); } +.ui-icon-sentiment-satisfied { @include icon-override("\e813"); } +.ui-icon-sentiment-very-dissatisfied { @include icon-override("\e814"); } +.ui-icon-sentiment-very-satisfied { @include icon-override("\e815"); } +.ui-icon-settings { @include icon-override("\e8b8"); } +.ui-icon-settings-applications { @include icon-override("\e8b9"); } +.ui-icon-settings-backup-restore { @include icon-override("\e8ba"); } +.ui-icon-settings-bluetooth { @include icon-override("\e8bb"); } +.ui-icon-settings-brightness { @include icon-override("\e8bd"); } +.ui-icon-settings-cell { @include icon-override("\e8bc"); } +.ui-icon-settings-ethernet { @include icon-override("\e8be"); } +.ui-icon-settings-input-antenna { @include icon-override("\e8bf"); } +.ui-icon-settings-input-component { @include icon-override("\e8c0"); } +.ui-icon-settings-input-composite { @include icon-override("\e8c1"); } +.ui-icon-settings-input-hdmi { @include icon-override("\e8c2"); } +.ui-icon-settings-input-svideo { @include icon-override("\e8c3"); } +.ui-icon-settings-overscan { @include icon-override("\e8c4"); } +.ui-icon-settings-phone { @include icon-override("\e8c5"); } +.ui-icon-settings-power { @include icon-override("\e8c6"); } +.ui-icon-settings-remote { @include icon-override("\e8c7"); } +.ui-icon-settings-system-daydream { @include icon-override("\e1c3"); } +.ui-icon-settings-voice { @include icon-override("\e8c8"); } +.ui-icon-share { @include icon-override("\e80d"); } +.ui-icon-shop { @include icon-override("\e8c9"); } +.ui-icon-shop-two { @include icon-override("\e8ca"); } +.ui-icon-shopping-basket { @include icon-override("\e8cb"); } +.ui-icon-shopping-cart { @include icon-override("\e8cc"); } +.ui-icon-short-text { @include icon-override("\e261"); } +.ui-icon-show-chart { @include icon-override("\e6e1"); } +.ui-icon-shuffle { @include icon-override("\e043"); } +.ui-icon-signal-cellular-4-bar { @include icon-override("\e1c8"); } +.ui-icon-signal-cellular-connected-no-internet-4-bar { @include icon-override("\e1cd"); } +.ui-icon-signal-cellular-no-sim { @include icon-override("\e1ce"); } +.ui-icon-signal-cellular-null { @include icon-override("\e1cf"); } +.ui-icon-signal-cellular-off { @include icon-override("\e1d0"); } +.ui-icon-signal-wifi-4-bar { @include icon-override("\e1d8"); } +.ui-icon-signal-wifi-4-bar-lock { @include icon-override("\e1d9"); } +.ui-icon-signal-wifi-off { @include icon-override("\e1da"); } +.ui-icon-sim-card { @include icon-override("\e32b"); } +.ui-icon-sim-card-alert { @include icon-override("\e624"); } +.ui-icon-skip-next { @include icon-override("\e044"); } +.ui-icon-skip-previous { @include icon-override("\e045"); } +.ui-icon-slideshow { @include icon-override("\e41b"); } +.ui-icon-slow-motion-video { @include icon-override("\e068"); } +.ui-icon-smartphone { @include icon-override("\e32c"); } +.ui-icon-smoke-free { @include icon-override("\eb4a"); } +.ui-icon-smoking-rooms { @include icon-override("\eb4b"); } +.ui-icon-sms { @include icon-override("\e625"); } +.ui-icon-sms-failed { @include icon-override("\e626"); } +.ui-icon-snooze { @include icon-override("\e046"); } +.ui-icon-sort { @include icon-override("\e164"); } +.ui-icon-sort-by-alpha { @include icon-override("\e053"); } +.ui-icon-spa { @include icon-override("\eb4c"); } +.ui-icon-space-bar { @include icon-override("\e256"); } +.ui-icon-speaker { @include icon-override("\e32d"); } +.ui-icon-speaker-group { @include icon-override("\e32e"); } +.ui-icon-speaker-notes { @include icon-override("\e8cd"); } +.ui-icon-speaker-notes-off { @include icon-override("\e92a"); } +.ui-icon-speaker-phone { @include icon-override("\e0d2"); } +.ui-icon-spellcheck { @include icon-override("\e8ce"); } +.ui-icon-star { @include icon-override("\e838"); } +.ui-icon-star-border { @include icon-override("\e83a"); } +.ui-icon-star-half { @include icon-override("\e839"); } +.ui-icon-stars { @include icon-override("\e8d0"); } +.ui-icon-stay-current-landscape { @include icon-override("\e0d3"); } +.ui-icon-stay-current-portrait { @include icon-override("\e0d4"); } +.ui-icon-stay-primary-landscape { @include icon-override("\e0d5"); } +.ui-icon-stay-primary-portrait { @include icon-override("\e0d6"); } +.ui-icon-stop { @include icon-override("\e047"); } +.ui-icon-stop-screen-share { @include icon-override("\e0e3"); } +.ui-icon-storage { @include icon-override("\e1db"); } +.ui-icon-store { @include icon-override("\e8d1"); } +.ui-icon-store-mall-directory { @include icon-override("\e563"); } +.ui-icon-straighten { @include icon-override("\e41c"); } +.ui-icon-streetview { @include icon-override("\e56e"); } +.ui-icon-strikethrough-s { @include icon-override("\e257"); } +.ui-icon-style { @include icon-override("\e41d"); } +.ui-icon-subdirectory-arrow-left { @include icon-override("\e5d9"); } +.ui-icon-subdirectory-arrow-right { @include icon-override("\e5da"); } +.ui-icon-subject { @include icon-override("\e8d2"); } +.ui-icon-subscriptions { @include icon-override("\e064"); } +.ui-icon-subtitles { @include icon-override("\e048"); } +.ui-icon-subway { @include icon-override("\e56f"); } +.ui-icon-supervisor-account { @include icon-override("\e8d3"); } +.ui-icon-surround-sound { @include icon-override("\e049"); } +.ui-icon-swap-calls { @include icon-override("\e0d7"); } +.ui-icon-swap-horiz { @include icon-override("\e8d4"); } +.ui-icon-swap-vert { @include icon-override("\e8d5"); } +.ui-icon-swap-vertical-circle { @include icon-override("\e8d6"); } +.ui-icon-switch-camera { @include icon-override("\e41e"); } +.ui-icon-switch-video { @include icon-override("\e41f"); } +.ui-icon-sync { @include icon-override("\e627"); } +.ui-icon-sync-disabled { @include icon-override("\e628"); } +.ui-icon-sync-problem { @include icon-override("\e629"); } +.ui-icon-system-update { @include icon-override("\e62a"); } +.ui-icon-system-update-alt { @include icon-override("\e8d7"); } +.ui-icon-tab { @include icon-override("\e8d8"); } +.ui-icon-tab-unselected { @include icon-override("\e8d9"); } +.ui-icon-tablet { @include icon-override("\e32f"); } +.ui-icon-tablet-android { @include icon-override("\e330"); } +.ui-icon-tablet-mac { @include icon-override("\e331"); } +.ui-icon-tag-faces { @include icon-override("\e420"); } +.ui-icon-tap-and-play { @include icon-override("\e62b"); } +.ui-icon-terrain { @include icon-override("\e564"); } +.ui-icon-text-fields { @include icon-override("\e262"); } +.ui-icon-text-format { @include icon-override("\e165"); } +.ui-icon-textsms { @include icon-override("\e0d8"); } +.ui-icon-texture { @include icon-override("\e421"); } +.ui-icon-theaters { @include icon-override("\e8da"); } +.ui-icon-thumb-down { @include icon-override("\e8db"); } +.ui-icon-thumb-up { @include icon-override("\e8dc"); } +.ui-icon-thumbs-up-down { @include icon-override("\e8dd"); } +.ui-icon-time-to-leave { @include icon-override("\e62c"); } +.ui-icon-timelapse { @include icon-override("\e422"); } +.ui-icon-timeline { @include icon-override("\e922"); } +.ui-icon-timer { @include icon-override("\e425"); } +.ui-icon-timer-10 { @include icon-override("\e423"); } +.ui-icon-timer-3 { @include icon-override("\e424"); } +.ui-icon-timer-off { @include icon-override("\e426"); } +.ui-icon-title { @include icon-override("\e264"); } +.ui-icon-toc { @include icon-override("\e8de"); } +.ui-icon-today { @include icon-override("\e8df"); } +.ui-icon-toll { @include icon-override("\e8e0"); } +.ui-icon-tonality { @include icon-override("\e427"); } +.ui-icon-touch-app { @include icon-override("\e913"); } +.ui-icon-toys { @include icon-override("\e332"); } +.ui-icon-track-changes { @include icon-override("\e8e1"); } +.ui-icon-traffic { @include icon-override("\e565"); } +.ui-icon-train { @include icon-override("\e570"); } +.ui-icon-tram { @include icon-override("\e571"); } +.ui-icon-transfer-within-a-station { @include icon-override("\e572"); } +.ui-icon-transform { @include icon-override("\e428"); } +.ui-icon-translate { @include icon-override("\e8e2"); } +.ui-icon-trending-down { @include icon-override("\e8e3"); } +.ui-icon-trending-flat { @include icon-override("\e8e4"); } +.ui-icon-trending-up { @include icon-override("\e8e5"); } +.ui-icon-tune { @include icon-override("\e429"); } +.ui-icon-turned-in { @include icon-override("\e8e6"); } +.ui-icon-turned-in-not { @include icon-override("\e8e7"); } +.ui-icon-tv { @include icon-override("\e333"); } +.ui-icon-unarchive { @include icon-override("\e169"); } +.ui-icon-undo { @include icon-override("\e166"); } +.ui-icon-unfold-less { @include icon-override("\e5d6"); } +.ui-icon-unfold-more { @include icon-override("\e5d7"); } +.ui-icon-update { @include icon-override("\e923"); } +.ui-icon-usb { @include icon-override("\e1e0"); } +.ui-icon-verified-user { @include icon-override("\e8e8"); } +.ui-icon-vertical-align-bottom { @include icon-override("\e258"); } +.ui-icon-vertical-align-center { @include icon-override("\e259"); } +.ui-icon-vertical-align-top { @include icon-override("\e25a"); } +.ui-icon-vibration { @include icon-override("\e62d"); } +.ui-icon-video-call { @include icon-override("\e070"); } +.ui-icon-video-label { @include icon-override("\e071"); } +.ui-icon-video-library { @include icon-override("\e04a"); } +.ui-icon-videocam { @include icon-override("\e04b"); } +.ui-icon-videocam-off { @include icon-override("\e04c"); } +.ui-icon-videogame-asset { @include icon-override("\e338"); } +.ui-icon-view-agenda { @include icon-override("\e8e9"); } +.ui-icon-view-array { @include icon-override("\e8ea"); } +.ui-icon-view-carousel { @include icon-override("\e8eb"); } +.ui-icon-view-column { @include icon-override("\e8ec"); } +.ui-icon-view-comfy { @include icon-override("\e42a"); } +.ui-icon-view-compact { @include icon-override("\e42b"); } +.ui-icon-view-day { @include icon-override("\e8ed"); } +.ui-icon-view-headline { @include icon-override("\e8ee"); } +.ui-icon-view-list { @include icon-override("\e8ef"); } +.ui-icon-view-module { @include icon-override("\e8f0"); } +.ui-icon-view-quilt { @include icon-override("\e8f1"); } +.ui-icon-view-stream { @include icon-override("\e8f2"); } +.ui-icon-view-week { @include icon-override("\e8f3"); } +.ui-icon-vignette { @include icon-override("\e435"); } +.ui-icon-visibility { @include icon-override("\e8f4"); } +.ui-icon-visibility-off { @include icon-override("\e8f5"); } +.ui-icon-voice-chat { @include icon-override("\e62e"); } +.ui-icon-voicemail { @include icon-override("\e0d9"); } +.ui-icon-volume-down { @include icon-override("\e04d"); } +.ui-icon-volume-mute { @include icon-override("\e04e"); } +.ui-icon-volume-off { @include icon-override("\e04f"); } +.ui-icon-volume-up { @include icon-override("\e050"); } +.ui-icon-vpn-key { @include icon-override("\e0da"); } +.ui-icon-vpn-lock { @include icon-override("\e62f"); } +.ui-icon-wallpaper { @include icon-override("\e1bc"); } +.ui-icon-warning { @include icon-override("\e002"); } +.ui-icon-watch { @include icon-override("\e334"); } +.ui-icon-watch-later { @include icon-override("\e924"); } +.ui-icon-wb-auto { @include icon-override("\e42c"); } +.ui-icon-wb-cloudy { @include icon-override("\e42d"); } +.ui-icon-wb-incandescent { @include icon-override("\e42e"); } +.ui-icon-wb-iridescent { @include icon-override("\e436"); } +.ui-icon-wb-sunny { @include icon-override("\e430"); } +.ui-icon-wc { @include icon-override("\e63d"); } +.ui-icon-web { @include icon-override("\e051"); } +.ui-icon-web-asset { @include icon-override("\e069"); } +.ui-icon-weekend { @include icon-override("\e16b"); } +.ui-icon-whatshot { @include icon-override("\e80e"); } +.ui-icon-widgets { @include icon-override("\e1bd"); } +.ui-icon-wifi { @include icon-override("\e63e"); } +.ui-icon-wifi-lock { @include icon-override("\e1e1"); } +.ui-icon-wifi-tethering { @include icon-override("\e1e2"); } +.ui-icon-work { @include icon-override("\e8f9"); } +.ui-icon-wrap-text { @include icon-override("\e25b"); } +.ui-icon-youtube-searched-for { @include icon-override("\e8fa"); } +.ui-icon-zoom-in { @include icon-override("\e8ff"); } +.ui-icon-zoom-out { @include icon-override("\e900"); } +.ui-icon-zoom-out-map { @include icon-override("\e56b"); } \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/theme/_media.scss b/ace-web/src/main/webapp/resources/sass/theme/_media.scss new file mode 100644 index 0000000..ac0dda8 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/theme/_media.scss @@ -0,0 +1,80 @@ +@media (max-width: 640px) { + body { + .ui-panelgrid { + .ui-grid-responsive { + .ui-grid-row { + border: 0 none; + } + } + } + + .ui-steps { + .ui-steps-item { + .ui-menuitem-link { + .ui-steps-title { + display: none; + } + } + } + } + + .ui-picklist { + &.ui-picklist-responsive { + .ui-picklist-list-wrapper { + margin-bottom: 8px; + } + .ui-picklist-buttons { + .ui-button { + &.ui-button-icon-only { + display: inline-block; + margin-right: 4px; + } + } + + .ui-icon-arrow-1-e { + @include icon-override("\e037"); @include rotate(90deg); + } + .ui-icon-arrowstop-1-e { + @include icon-override("\e045"); @include rotate(-90deg); + + } + .ui-icon-arrow-1-w { + @include icon-override("\e037"); @include rotate(-90deg); + } + .ui-icon-arrowstop-1-w { + @include icon-override("\e044"); @include rotate(-90deg); + } + } + } + } + + .ui-orderlist { + &.ui-grid-responsive { + .ui-orderlist-controls { + text-align: center; + width: auto; + margin-bottom: 8px; + + .ui-button { + margin-right: 4px; + } + } + } + } + + .ui-buttonset { + > .ui-button { + display: block; + @include border-radius(0); + + &:first-child { + @include border-radius-top(3px); + } + + &:last-child { + @include border-radius-bottom(3px); + } + } + } + } +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/theme/_menus.scss b/ace-web/src/main/webapp/resources/sass/theme/_menus.scss new file mode 100644 index 0000000..7281eca --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/theme/_menus.scss @@ -0,0 +1,367 @@ +body { + .ui-breadcrumb { + a { + color: #ffffff; + } + + li:first-child { + a { + position: relative; + font-size: $iconFontSize; + margin-top: 0; + + span { + display: none; + } + } + } + } + + .ui-steps { + position: relative; + + .ui-steps-item { + background-color: transparent; + + &.ui-state-disabled { + @include opacity(1); + } + + .ui-menuitem-link { + display: inline-block; + text-align: left; + background-color: #ffffff; + overflow: hidden; + + .ui-steps-number { + display: inline-block; + background-color: $grayBgColor; + @include border-radius(50%); + padding: 4px 8px; + font-size: 16px; + color: #ffffff; + } + + .ui-steps-title { + display: inline; + margin-left: 10px; + color: $textSecondaryColor; + } + } + + &.ui-state-highlight { + .ui-steps-number { + background-color: $primaryColor; + } + + .ui-steps-title { + font-weight: 700; + color: $textColor; + } + } + + &:last-child { + .ui-menuitem-link { + display: block; + } + } + } + + &:before { + content:' '; + border: 1px solid $dividerColor; + width: 90%; + top: 45%; + left: 0; + display: block; + position: absolute; + } + } + + .ui-menu { + padding: 8px 0; + + .ui-shadow, &.ui-shadow { + @include overlay-input-shadow(); + } + + .ui-menu-list { + padding: 0; + margin: 0; + + li { + &.ui-widget-header { + margin: 0 0 1px 0; + @include border-radius(0); + border: 0 none; + width: 100%; + box-sizing: border-box; + padding: 0; + + h3 { + display: block; + float: none; + font-size: $fontSize; + padding: $menuitemPadding; + font-weight: 400; + + .ui-icon { + &.ui-icon-triangle-1-s, &.ui-icon-triangle-1-e { + margin: -12px 0 0 0; + } + } + } + } + + &.ui-menuitem { + margin: 0; + @include border-radius(0); + + &.ui-state-hover { + @include hover-element(); + } + + .ui-menuitem-link { + border: 0 none; + padding: $menuitemPadding; + width: 100%; + min-height: 32px; + box-sizing: border-box; + color: $textColor; + @include border-radius(0); + position: relative; + + &.ui-state-hover { + @include hover-element(); + } + + .ui-menuitem-icon { + margin-right: 8px; + display: inline-block; + vertical-align: middle; + float: none; + font-size: $iconFontSize - 2; + height: auto; + } + + .ui-menuitem-text { + display: inline-block; + vertical-align: middle; + float: none; + } + } + } + } + + .ui-separator { + height: 1px; + background-color: $dividerColor; + width: 100%; + box-sizing: border-box; + } + } + + &.ui-menu-toggleable { + .ui-menu-list { + li { + &.ui-widget-header { + padding-left: 30px; + + .ui-icon { + color: #ffffff; + + &.ui-icon-triangle-1-s { + margin-top: -10px; + } + + &.ui-icon-triangle-1-e { + margin-top: -10px; + } + } + } + } + } + } + + &.ui-tieredmenu { + .ui-icon-triangle-1-e { + position: absolute; + right: 8px; + top: 6px; + float: none; + } + + .ui-menu-child { + padding: 8px 0; + } + } + + &.ui-menubar { + padding: 0; + + .ui-menu-child { + padding: 8px 0; + } + + .ui-menubar-options { + padding: 0 10px; + } + + &.ui-megamenu { + &.ui-megamenu-vertical { + > .ui-menu-list { + padding: 8px 0; + } + } + } + } + + &.ui-slidemenu { + + .ui-menu-parent { + .ui-menu-child { + padding: 0; + @include no-shadow(); + } + } + + .ui-slidemenu-backward { + width: 100%; + @include border-box-sizing(); + @include border-radius(0); + } + } + } + + .ui-tabmenu { + padding: 0; + + .ui-tabmenu-nav { + padding: 0; + background-color: #ffffff; + border: 0 none; + @include border-radius(0px); + + > .ui-tabmenuitem { + top: auto; + margin: 0 4px 0 0; + padding: 0; + border-style: solid; + border-width: 0 0 2px 0; + @include transition(border-color $transitionDuration); + + > a { + padding: $headerPadding; + + &:focus { + outline: 0 none; + } + + .ui-menuitem-icon, .ui-menuitem-text { + float: none; + display: inline-block; + vertical-align: middle; + } + + .ui-menuitem-icon { + margin-right: 12px; + } + } + + &.ui-state-default { + a { + color: $textSecondaryColor; + + .ui-icon { + color: $textSecondaryColor; + } + } + } + + &.ui-state-hover { + background-color: #ffffff; + } + + &.ui-state-active { + background-color: #ffffff; + border-color: $accentColor; + border-style: solid; + + a { + color: $primaryColor; + + .ui-icon { + color: $primaryColor; + } + } + } + } + } + } + + .ui-panelmenu { + .ui-panelmenu-header { + background-color: $primaryColor; + margin-bottom: 1px; + + a { + padding: 6px 10px 6px 36px; + color: #ffffff; + font-size: $fontSize; + } + + .ui-icon { + color: #ffffff; + margin-top: -10px; + font-size: $iconFontSize - 2; + height: auto; + } + + &.ui-state-active { + background-color: $accentColor; + @include border-radius-bottom(0); + a, .ui-icon { + color: $accentTextColor; + } + } + } + + .ui-panelmenu-content { + padding: 0; + + .ui-menuitem { + margin: 0; + + .ui-menuitem-link { + border: 0 none; + padding: $menuitemPadding; + width: 100%; + min-height: 30px; + box-sizing: border-box; + color: $textColor; + @include border-radius(0); + position: relative; + + &.ui-state-hover { + @include hover-element(); + } + + .ui-menuitem-text { + display: inline-block; + vertical-align: middle; + float: none; + } + + .ui-icon { + position: static; + display: inline-block; + vertical-align: middle; + margin-right: 6px; + font-size: $iconFontSize - 2; + height: auto; + } + } + } + } + } +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/theme/_messages.scss b/ace-web/src/main/webapp/resources/sass/theme/_messages.scss new file mode 100644 index 0000000..f8386ed --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/theme/_messages.scss @@ -0,0 +1,245 @@ +body { + /* Messages */ + .ui-messages { + > div { + padding: 10px 16px; + } + + ul { + display: inline-block; + margin-left: 0; + } + + .ui-messages-info { + background-color: #2196F3; + border-color: #2196F3; + color: #ffffff; + + .ui-messages-close:hover { + background-color: lighten(#2196F3,15%); + } + } + + .ui-messages-warn { + background-color: #ffc107; + border-color: #ffc107; + color: #000000; + + .ui-messages-close:hover { + background-color: lighten(#ffc107,15%); + } + } + + .ui-messages-error { + background-color: #e62a10; + border-color: #e62a10; + color: #ffffff; + + .ui-messages-close:hover { + background-color: lighten(#e62a10,15%); + } + } + + .ui-messages-fatal { + background-color: #212121; + border-color: #212121; + color: #ffffff; + + .ui-messages-close:hover { + background-color: lighten(#212121,15%); + } + } + } + + .ui-message { + padding: 4px 8px; + + &.ui-message-info { + background-color: #2196F3; + border-color: #2196F3; + color: #ffffff; + } + + &.ui-message-warn { + background-color: #ffc107; + border-color: #ffc107; + color: #ffffff; + } + + &.ui-message-error { + background-color: #e62a10; + border-color: #e62a10; + color: #ffffff; + } + + &.ui-message-fatal { + background-color: #212121; + border-color: #212121; + color: #ffffff; + } + + &.ui-message-icon-only { + text-align: center; + + span { + float: none; + margin-top: -1px; + position: static; + } + } + } + + /* Info */ + .ui-messages .ui-messages-info-icon,.ui-message .ui-message-info-icon { + background: none; + @include material-icon("\e88e"); + font-size: 24px; + color: #fff; + } + + .ui-message .ui-message-info-icon { + margin-top: -1px; + font-size: 18px; + right: 1px; + } + + /* Error */ + .ui-messages .ui-messages-error-icon, .ui-message .ui-message-error-icon { + background: none; + @include material-icon("\e000"); + font-size: 24px; + color: #fff; + } + + .ui-message .ui-message-error-icon { + margin-top: -1px; + font-size: 18px; + right: 1px; + } + + /* Warn */ + .ui-messages .ui-messages-warn-icon,.ui-message .ui-message-warn-icon { + background: none; + @include material-icon("\e002"); + font-size: 24px; + color: $textColor; + } + + .ui-messages .ui-messages-warn { + .ui-messages-close { + color: $textColor; + } + } + + .ui-message .ui-message-warn-icon { + margin-top: -1px; + font-size: 18px; + right: 1px; + } + + /* Fatal */ + .ui-messages .ui-messages-fatal-icon,.ui-message .ui-message-fatal-icon { + background: none; + @include material-icon("\e000"); + font-size: 24px; + color: #fff; + } + + .ui-message .ui-message-fatal-icon { + margin-top: -1px; + font-size: 18px; + } + + .ui-messages-close { + text-decoration: none; + color: #fff; + width: $iconWidth; + height: $iconWidth; + margin-top: -2px; + @include border-radius(50%); + @include transition(background-color $transitionDuration); + } + + .md-inputfield { + .ui-message { + &.ui-message-error { + background-color: transparent; + border: 0 none; + margin: 0px; + color: $inputErrorTextColor; + font-size: $errorMessageFontSize; + + .ui-message-error-icon { + color: $inputErrorTextColor; + font-size: $errorMessageIconFontSize; + } + } + } + } + + .ui-growl { + top: 90px; + + > .ui-growl-item-container { + opacity: 1; + + &.ui-growl-info { + background-color: #2196F3; + } + + &.ui-growl-warn { + background-color: #ffc107; + } + + &.ui-growl-error { + background-color: #e62a10; + } + + &.ui-growl-fatal { + background-color: #212121; + } + + &.ui-shadow { + @include overlay-content-shadow(); + } + } + + .ui-growl-item { + .ui-growl-image { + background: none; + color: #ffffff; + padding: 4px; + + &.ui-growl-image-info { + @include material-icon("\e88e"); + font-size: 36px; + } + + &.ui-growl-image-error { + @include material-icon("\e000"); + font-size: 36px; + } + + &.ui-growl-image-warn { + @include material-icon("\e002"); + font-size: 36px; + } + + &.ui-growl-image-fatal { + @include material-icon("\e000"); + font-size: 36px; + } + } + + .ui-growl-message { + color: #ffffff; + } + + .ui-growl-icon-close { + @include material-icon("\e5cd"); + font-size: 24px; + color: #ffffff; + } + } + } +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/theme/_misc.scss b/ace-web/src/main/webapp/resources/sass/theme/_misc.scss new file mode 100644 index 0000000..941df64 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/theme/_misc.scss @@ -0,0 +1,91 @@ +body { + .jqplot-target { + font-family: $fontFamily; + } + + .ui-progressbar { + height: 16px; + padding: 0; + border-color: $contentBorderColor; + + .ui-progressbar-value { + height: 16px; + padding: 0; + } + + .ui-progressbar-label { + color: $accentColor; + } + } + + .ui-galleria { + padding: 0; + + .ui-galleria-nav-prev { + left: 2px; + } + + .ui-galleria-nav-next { + right: 2px; + } + } + + .ui-log { + .ui-log-header { + padding: $headerPadding; + height: auto; + + > .ui-log-button { + line-height: 16px; + position: static; + display: inline-block; + vertical-align: middle; + margin-right: 4px; + border: 1px solid transparent; + padding: 1px 3px; + @include border-radius(50%); + @include transition(background-color $transitionDuration); + + &.ui-state-hover { + background-color: $primaryLightColor; + } + } + } + } + + .ui-tagcloud { + li { + margin: 4px 0px; + + a { + @include transition(background-color $transitionDuration); + @include border-radius(3px); + + &:hover { + @include hover-element(); + } + } + } + } + + .timeline-frame { + .timeline-event { + border-color: $contentBorderColor; + background-color: $contentBgColor; + + &.ui-state-active { + background-color: $accentColor; + border-color: $accentColor; + color: $accentTextColor; + } + } + + .timeline-axis { + border-color: $dividerColor; + } + + .timeline-navigation { + height: 36px; + } + } +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/theme/_overlays.scss b/ace-web/src/main/webapp/resources/sass/theme/_overlays.scss new file mode 100644 index 0000000..e207b44 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/theme/_overlays.scss @@ -0,0 +1,193 @@ +body { + .ui-dialog { + &.ui-shadow { + @include overlay-content-shadow(); + } + + .ui-dialog-titlebar { + background-color: #ffffff; + color: $textColor; + padding: $headerPadding; + + .ui-dialog-title { + font-weight: 700; + } + + .ui-dialog-titlebar-icon { + padding: 0; + @include border-radius(50%); + @include transition(background-color $transitionDuration); + + &.ui-state-hover, &.ui-state-focus { + @include hover-element(); + } + + .ui-icon { + color: $textSecondaryColor; + } + + .ui-icon-extlink { + @include icon_override('fullscreen'); + } + + .ui-icon-newwin { + @include icon_override('fullscreen_exit'); + } + } + } + + .ui-dialog-buttonpane, .ui-dialog-footer { + text-align: right; + + .ui-button { + background-color: #ffffff; + color: $textColor; + @include no-shadow(); + + .ui-icon { + color: $textSecondaryColor; + } + + &.ui-state-hover { + @include hover-element(); + } + } + } + + .ui-confirm-dialog-severity { + margin: 0px 12px; + } + } + + .ui-sidebar { + .ui-sidebar-close { + &:hover { + padding: 1px; + } + } + + .ui-button { + width: auto; + } + } + + .ui-lightbox { + &.ui-shadow { + @include overlay-content-shadow(); + } + + .ui-lightbox-caption { + padding: $headerPadding; + + .ui-lightbox-caption-text { + margin: 0; + } + + .ui-lightbox-close { + @include border-radius(50%); + @include transition(background-color $transitionDuration); + padding: 0; + margin: 0; + width: $iconWidth; + height: $iconHeight; + + &.ui-state-hover { + @include hover-element-primary(); + padding: 0; + } + } + } + + .ui-lightbox-content-wrapper { + .ui-lightbox-nav-right, .ui-lightbox-nav-left { + top: 40%; + + .ui-icon { + @include transition(color $transitionDuration); + font-size: 48px; + color: $primaryLightColor; + } + + &:hover { + .ui-icon { + color: #ffffff; + } + } + } + + .ui-lightbox-nav-right { + right: 24px; + } + } + } + + .ui-overlaypanel { + &.ui-shadow { + @include overlay-content-shadow(); + } + + .ui-overlaypanel-close { + background-color: $accentColor; + @include border-radius(50%); + @include transition(background-color $transitionDuration); + padding: 2px 4px; + right: -16px; + top: -16px; + @include content-shadow(); + + span { + color: $accentTextColor; + + &:before { + position: relative; + top: 2px; + } + } + + &.ui-state-hover { + background-color: $accentDarkColor; + } + } + } + + .ui-tooltip { + @include opacity(.9); + font-size: $fontSize - 2px; + + .ui-tooltip-text { + background-color: #323232; + @include overlay-content-shadow(); + } + + &.ui-tooltip-top { + .ui-tooltip-arrow { + border-top-color: #323232; + } + } + + &.ui-tooltip-bottom { + .ui-tooltip-arrow { + border-bottom-color: #323232; + } + } + + &.ui-tooltip-left { + .ui-tooltip-arrow { + border-left-color: #323232; + } + } + + &.ui-tooltip-right { + .ui-tooltip-arrow { + border-right-color: #323232; + } + } + } + + .ui-state-error, + .ui-widget.ui-state-error, + .ui-widget-content .ui-state-error, + .ui-widget-header .ui-state-error { + border-color: #e62a10; + } +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/theme/_panels.scss b/ace-web/src/main/webapp/resources/sass/theme/_panels.scss new file mode 100644 index 0000000..02b4086 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/theme/_panels.scss @@ -0,0 +1,432 @@ +body { + .ui-panel { + padding: 0; + + .ui-panel-titlebar { + border: 0 none; + padding: $headerPadding; + @include border-radius-top(2px); + @include border-radius-bottom(0px); + + .ui-panel-title { + margin: 0; + line-height: $lineHeight + 2; + } + + .ui-panel-titlebar-icon { + width: $iconWidth; + height: $iconHeight; + color: $headerTextColor; + margin: 0; + @include transition(background-color $transitionDuration); + @include border-radius(50%); + + &:hover { + background-color: $primaryLightColor; + } + } + } + + .ui-panel-content { + height: 100%; + box-sizing: border-box; + padding: $contentPadding; + } + + .ui-panel-footer { + padding: $headerPadding; + border: 0 none; + border-top: 1px solid $dividerColor; + margin: 0; + } + + &.ui-panel-collapsed-h { + .ui-panel-titlebar { + padding-left: 40px; + } + } + } + + .ui-fieldset { + padding: $contentPadding; + + .ui-fieldset-legend { + padding: $headerPadding; + padding-left: 2px; + padding-right: 8px; + color: $primaryColor; + + .ui-fieldset-toggler { + padding: 8px; + background-color: $primaryColor; + color: #ffffff; + @include border-radius(50%); + @include transition(background-color $transitionDuration); + margin-top: -10px; + margin-right: 8px; + @include content-shadow(); + + &:hover { + background-color: $primaryDarkColor; + } + } + + &.ui-state-focus { + background-color: transparent; + } + + &.ui-state-active { + background-color: transparent; + } + } + } + + .ui-notificationbar { + background-color: $accentColor; + color: $accentTextColor; + } + + .ui-panelgrid { + .ui-panelgrid-cell { + padding: $contentPadding; + } + + .ui-panelgrid-header, + .ui-panelgrid-footer { + > .ui-widget-header { + border-color: $primaryDarkColor; + } + } + + tbody { + .ui-panelgrid-cell { + &.ui-widget-header { + background-color: $primaryLightColor; + } + } + } + } + + .ui-accordion { + .ui-accordion-header { + background-color: $primaryColor; + padding: $headerPadding; + padding-left: 36px; + font-size: $fontSize; + color: $primaryTextColor; + @include transition(background-color $transitionDuration); + + &.ui-state-hover { + background-color: $primaryDarkColor; + } + + &.ui-state-active { + background-color: $accentColor; + color: $accentTextColor; + + &.ui-tabs-outline { + outline: 0 none; + background-color: lighten($accentColor, 10%); + } + } + + .ui-icon-triangle-1-e { + margin-top: -10px; + } + + .ui-icon-triangle-1-s { + margin-top: -10px; + } + + &.ui-tabs-outline { + background-color: lighten($primaryColor, 10%); + } + } + + .ui-accordion-content { + padding: $contentPadding; + line-height: $lineHeight; + } + } + + .ui-scrollpanel { + padding: 0; + + .ui-scrollpanel-track { + background-color: #ffffff; + border-color: transparent; + padding: 0; + } + + .ui-scrollpanel-drag { + @include border-radius(3px); + background-color: $dividerColor; + } + } + + .ui-toolbar { + background-color: $primaryDarkColor; + @include content-shadow(); + padding: 10px; + + .ui-button { + margin-right: 6px; + } + } + + .ui-tabs { + padding: 0; + + .ui-tabs-nav { + background-color: #ffffff; + border: 0 none; + @include border-radius(0); + + > li { + padding: 0; + @include transition(border-color $transitionDuration); + + > a { + padding: $headerPadding; + + &:focus { + outline: 0 none; + } + } + + > .ui-icon-close { + margin: 7px 0 0 0; + @include transition(color $transitionDuration); + color: $textSecondaryColor; + } + + &.ui-state-default { + a { + color: $textSecondaryColor; + } + } + + &.ui-state-hover { + background-color: #ffffff; + } + + &.ui-state-active { + background-color: #ffffff; + border-color: $accentColor; + border-style: solid; + + a { + color: $primaryColor; + font-weight: 700; + } + + > .ui-icon-close { + color: $accentColor; + } + } + + &.ui-tabs-outline { + outline: 0 none; + border-color: $accentLightColor; + } + } + } + + .ui-tabs-panel { + padding: $contentPadding; + } + + &.ui-tabs-top { + > .ui-tabs-nav { + padding: 0; + margin: 0; + @include border-radius-top(4px); + border-bottom: 1px solid $dividerColor; + + > li { + border-style: solid; + border-width: 0 0 2px 0; + } + } + } + + &.ui-tabs-bottom { + > .ui-tabs-nav { + padding: 0; + margin: 0; + @include border-radius-bottom(4px); + border-top: 1px solid $dividerColor; + + > li { + border-width: 2px 0 0 0; + } + } + } + + &.ui-tabs-left { + > .ui-tabs-nav { + padding: 0; + margin: 0; + @include border-radius-left(4px); + border-right: 1px solid $dividerColor; + + > li { + box-sizing: border-box; + border-width: 0 2px 0 0; + + > a { + width: 100%; + box-sizing: border-box; + } + } + } + } + + &.ui-tabs-right { + > .ui-tabs-nav { + padding: 0; + @include border-radius-right(4px); + border-left: 1px solid $dividerColor; + + > li { + box-sizing: border-box; + border-width: 0 0 0 2px; + + > a { + width: 100%; + box-sizing: border-box; + } + + &.ui-state-active { + > a { + padding-left: 14px; + } + } + } + } + } + + &.ui-tabs-scrollable { + .ui-tabs-navscroller { + > .ui-tabs-navscroller-btn { + outline: 0 none; + width: 18px; + display: block; + height: 42px; + background-color: #ffffff; + @include border-radius(0); + @include transition(background-color $transitionDuration); + + > span { + margin-top: 10px; + } + + &:hover { + @include hover-element(); + } + } + + > .ui-tabs-navscroller-btn-left { + z-index: 1; + left: 0; + border-right: 1px solid $dividerColor; + > span { + &:before { + position: relative; + left: -2px; + } + } + } + + > .ui-tabs-navscroller-btn-right { + z-index: 1; + right: 0; + border-left: 1px solid $dividerColor; + + > span { + &:before { + position: relative; + right: 2px; + } + } + } + + .ui-tabs-nav { + > li { + margin: 0; + } + } + } + + &.ui-tabs-top { + .ui-tabs-navscroller { + > .ui-tabs-nav { + border-bottom: 1px solid $dividerColor; + + > li { + border-style: solid; + border-width: 0 0 2px 0; + } + } + + > .ui-tabs-navscroller-btn-left { + border-top: 0 none; + border-bottom: 1px solid $dividerColor; + } + } + } + + &.ui-tabs-bottom { + .ui-tabs-navscroller { + > .ui-tabs-nav { + border-top: 1px solid $dividerColor; + + > li { + border-style: solid; + border-width: 2px 0 0 0; + } + } + + > .ui-tabs-navscroller-btn-left { + border-bottom: 0 none; + border-top: 1px solid $dividerColor; + } + + > .ui-tabs-navscroller-btn-right { + border-top: 1px solid $dividerColor; + } + } + } + } + } + + .ui-wizard { + .ui-wizard-step-titles { + background-color: $primaryDarkColor; + @include border-radius-top(3px); + + > li { + padding: $headerPadding; + color: #ffffff; + + &.ui-state-highlight { + color: #ffffff; + background-color: transparent; + border-bottom: 2px solid $accentColor; + @include border-radius(0); + } + } + } + + .ui-wizard-content { + margin: 0; + + .ui-panel { + .ui-panel-titlebar { + @include border-radius(0); + } + } + } + } + +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/theme/_theme.scss b/ace-web/src/main/webapp/resources/sass/theme/_theme.scss new file mode 100644 index 0000000..4783066 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/theme/_theme.scss @@ -0,0 +1,14 @@ +@import '../variables/_theme'; +@import '../_mixins'; +@import '_common'; +@import '_forms'; +@import '_data'; +@import '_panels'; +@import '_menus'; +@import '_messages'; +@import '_misc'; +@import '_overlays'; +@import '_media'; +@import '_icons'; +@import '../_theme_styles.scss'; + diff --git a/ace-web/src/main/webapp/resources/sass/variables/_common.scss b/ace-web/src/main/webapp/resources/sass/variables/_common.scss new file mode 100644 index 0000000..aec4366 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/variables/_common.scss @@ -0,0 +1,29 @@ +/******************************/ +/* Common */ +/******************************/ +$fontSize:14px; +$fontFamily:"Roboto","Helvetica Neue",sans-serif; +$textColor:#212121; +$textSecondaryColor:#757575; +$lineHeight:18px; +$borderRadius:3px; +$dividerColor:#dbdbdb; +$dividerLightColor:#f8f8f8; +$transitionDuration:.3s; +$iconWidth:20px; +$iconHeight:20px; +$iconFontSize:20px; +$hoverBgColor:#e8e8e8; +$hoverTextColor:#000000; + +/* Predefined Colors */ +$blue:#147df0; +$pink:#ed3c76; +$green:#3e9018; +$red:#da2f31; +$orange:#ffb200; +$teal:#599597; +$purple:#633ea5; +$black:#000000; +$yellow:#ffd644; +$grayBgColor:#757575; \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/sass/variables/_layout.scss b/ace-web/src/main/webapp/resources/sass/variables/_layout.scss new file mode 100644 index 0000000..d3a3890 --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/variables/_layout.scss @@ -0,0 +1,11 @@ +@import './common'; + +$bodyBgColor:#F5F5F5; +$topbarSubmenuHoverBgColor:#f1f2f7; +$topbarMobileMenuBgColor:#ffffff; +$mobileBreakpoint:1024px; +$contentMobileMaskBgColor:#424242; +$breadcrumbBgColor:#ffffff; +$footerBgColor:#ffffff; +$nanoSliderBgColor:#aaaaaa; +$topbarSubmenuBgColor:#ffffff; diff --git a/ace-web/src/main/webapp/resources/sass/variables/_theme.scss b/ace-web/src/main/webapp/resources/sass/variables/_theme.scss new file mode 100644 index 0000000..738a81f --- /dev/null +++ b/ace-web/src/main/webapp/resources/sass/variables/_theme.scss @@ -0,0 +1,40 @@ +@import './common'; + +$headerPadding:8px 14px; +$headerTextColor:#ffffff; + +$contentPadding:8px 14px; +$contentBorderColor:#d8d8d8; +$contentBgColor:#ffffff; + +$inputBorderColor:#bdbdbd; +$inputInvalidBorderColor:#e62a10; +$inputBgColor:#ffffff; +$inputErrorTextColor:#e62a10; +$inputHeaderPadding:6px 10px; + +//groups +$inputGroupBorderColor:#bdbdbd; +$inputGroupBgColor:transparent; +$inputGroupTextColor:#757575; +$inputGroupIconColor:#bdbdbd; +$inputGroupAddonMinWidth:2*$fontSize; +$checkboxWidth:18px; +$checkboxHeight:18px; +$inputGroupPadding:2px 2px 1px 2px; +$borderRadius:0px; +$inputGroupIconFontSize: 1.5em; + +$buttonTextColor:#ffffff; + +$listItemPadding:6px 10px; + +$radioButtonBorderColor:#757575; +$checkboxBorderColor:#757575; + +$errorMessageFontSize:11px; +$errorMessageIconFontSize:13px; + +$dataTableRowBgColorEven:#f4f4f4; +$paginatorPadding:6px 10px; +$menuitemPadding:6px 10px; \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/serenity-layout/css/grid.css b/ace-web/src/main/webapp/resources/serenity-layout/css/grid.css new file mode 100644 index 0000000..5506190 --- /dev/null +++ b/ace-web/src/main/webapp/resources/serenity-layout/css/grid.css @@ -0,0 +1,347 @@ +/* + * New Grid CSS + * Only necessary to add if your PrimeFaces version is older than 5.3.14 + */ +.ui-g { + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + flex-wrap: wrap; +} + +.ui-g:after { + clear: both; + content: ""; + display: table; +} + +.ui-g-1, +.ui-g-2, +.ui-g-3, +.ui-g-4, +.ui-g-5, +.ui-g-6, +.ui-g-7, +.ui-g-8, +.ui-g-9, +.ui-g-10, +.ui-g-11, +.ui-g-12 { + float: left; + box-sizing: border-box; + padding: 0.5em; +} + +.ui-g-1 { + width: 8.3333%; +} + +.ui-g-2 { + width: 16.6667%; +} + +.ui-g-3 { + width: 25%; +} + +.ui-g-4 { + width: 33.3333%; +} + +.ui-g-5 { + width: 41.6667%; +} + +.ui-g-6 { + width: 50%; +} + +.ui-g-7 { + width: 58.3333%; +} + +.ui-g-8 { + width: 66.6667%; +} + +.ui-g-9 { + width: 75%; +} + +.ui-g-10 { + width: 83.3333%; +} + +.ui-g-11 { + width: 91.6667%; +} + +.ui-g-12 { + width: 100%; +} + +@media screen and (max-width: 40em) { + .ui-sm-1, + .ui-sm-2, + .ui-sm-3, + .ui-sm-4, + .ui-sm-5, + .ui-sm-6, + .ui-sm-7, + .ui-sm-8, + .ui-sm-9, + .ui-sm-10, + .ui-sm-11, + .ui-sm-12 { + padding: 0.5em; + } + + .ui-sm-1 { + width: 8.3333%; + } + + .ui-sm-2 { + width: 16.6667%; + } + + .ui-sm-3 { + width: 25%; + } + + .ui-sm-4 { + width: 33.3333%; + } + + .ui-sm-5 { + width: 41.6667%; + } + + .ui-sm-6 { + width: 50%; + } + + .ui-sm-7 { + width: 58.3333%; + } + + .ui-sm-8 { + width: 66.6667%; + } + + .ui-sm-9 { + width: 75%; + } + + .ui-sm-10 { + width: 83.3333%; + } + + .ui-sm-11 { + width: 91.6667%; + } + + .ui-sm-12 { + width: 100%; + } +} + +@media screen and (min-width: 40.063em) { + .ui-md-1, + .ui-md-2, + .ui-md-3, + .ui-md-4, + .ui-md-5, + .ui-md-6, + .ui-md-7, + .ui-md-8, + .ui-md-9, + .ui-md-10, + .ui-md-11, + .ui-md-12 { + padding: 0.5em; + } + + .ui-md-1 { + width: 8.3333%; + } + + .ui-md-2 { + width: 16.6667%; + } + + .ui-md-3 { + width: 25%; + } + + .ui-md-4 { + width: 33.3333%; + } + + .ui-md-5 { + width: 41.6667%; + } + + .ui-md-6 { + width: 50%; + } + + .ui-md-7 { + width: 58.3333%; + } + + .ui-md-8 { + width: 66.6667%; + } + + .ui-md-9 { + width: 75%; + } + + .ui-md-10 { + width: 83.3333%; + } + + .ui-md-11 { + width: 91.6667%; + } + + .ui-md-12 { + width: 100%; + } +} + +@media screen and (min-width: 64.063em) { + .ui-lg-1, + .ui-lg-2, + .ui-lg-3, + .ui-lg-4, + .ui-lg-5, + .ui-lg-6, + .ui-lg-7, + .ui-lg-8, + .ui-lg-9, + .ui-lg-10, + .ui-lg-11, + .ui-lg-12 { + padding: 0.5em; + } + + .ui-lg-1 { + width: 8.3333%; + } + + .ui-lg-2 { + width: 16.6667%; + } + + .ui-lg-3 { + width: 25%; + } + + .ui-lg-4 { + width: 33.3333%; + } + + .ui-lg-5 { + width: 41.6667%; + } + + .ui-lg-6 { + width: 50%; + } + + .ui-lg-7 { + width: 58.3333%; + } + + .ui-lg-8 { + width: 66.6667%; + } + + .ui-lg-9 { + width: 75%; + } + + .ui-lg-10 { + width: 83.3333%; + } + + .ui-lg-11 { + width: 91.6667%; + } + + .ui-lg-12 { + width: 100%; + } +} + +@media screen and (min-width: 90.063em) { + .ui-xl-1, + .ui-xl-2, + .ui-xl-3, + .ui-xl-4, + .ui-xl-5, + .ui-xl-6, + .ui-xl-7, + .ui-xl-8, + .ui-xl-9, + .ui-xl-10, + .ui-xl-11, + .ui-xl-12 { + padding: 0.5em; + } + + .ui-xl-1 { + width: 8.3333%; + } + + .ui-xl-2 { + width: 16.6667%; + } + + .ui-xl-3 { + width: 25%; + } + + .ui-xl-4 { + width: 33.3333%; + } + + .ui-xl-5 { + width: 41.6667%; + } + + .ui-xl-6 { + width: 50%; + } + + .ui-xl-7 { + width: 58.3333%; + } + + .ui-xl-8 { + width: 66.6667%; + } + + .ui-xl-9 { + width: 75%; + } + + .ui-xl-10 { + width: 83.3333%; + } + + .ui-xl-11 { + width: 91.6667%; + } + + .ui-xl-12 { + width: 100%; + } +} + +.ui-g-nopad { + padding: 0px; +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/serenity-layout/css/layout-green.css b/ace-web/src/main/webapp/resources/serenity-layout/css/layout-green.css new file mode 100644 index 0000000..ae6b20b --- /dev/null +++ b/ace-web/src/main/webapp/resources/serenity-layout/css/layout-green.css @@ -0,0 +1,2938 @@ +/* Sidebar */ +/* Primary */ +/* Accent */ +/* Topbar */ +/* Submenu */ +/* Default MenuItem */ +/* Hover MenuItem */ +/* Active MenuItem */ +/* Dark Default MenuItem */ +/* Dark Hover MenuItem */ +/* Dark Active MenuItem */ +/******************************/ +/* Common */ +/******************************/ +/* Predefined Colors */ +/* roboto-300 - latin */ +@font-face { + font-family: "Roboto"; + font-style: normal; + font-weight: 300; + src: url("#{resource['serenity-layout:fonts/roboto-v15-latin-300.eot']}"); + /* IE9 Compat Modes */ + src: local("Roboto Light"), local("Roboto-Light"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-300.eot']}#iefix") format("embedded-opentype"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-300.woff2']}") format("woff2"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-300.woff']}") format("woff"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-300.ttf']}") format("truetype"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-300.svg']}#Roboto") format("svg"); + /* Legacy iOS */ +} +/* roboto-regular - latin */ +@font-face { + font-family: "Roboto"; + font-style: normal; + font-weight: 400; + src: url("#{resource['serenity-layout:fonts/roboto-v15-latin-regular.eot']}"); + /* IE9 Compat Modes */ + src: local("Roboto"), local("Roboto-Regular"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-regular.eot']}#iefix") format("embedded-opentype"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-regular.woff2']}") format("woff2"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-regular.woff']}") format("woff"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-regular.ttf']}") format("truetype"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-regular.svg']}#Roboto") format("svg"); + /* Legacy iOS */ +} +/* roboto-700 - latin */ +@font-face { + font-family: "Roboto"; + font-style: normal; + font-weight: 700; + src: url("#{resource['serenity-layout:fonts/roboto-v15-latin-700.eot']}"); + /* IE9 Compat Modes */ + src: local("Roboto Bold"), local("Roboto-Bold"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-700.eot']}#iefix") format("embedded-opentype"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-700.woff2']}") format("woff2"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-700.woff']}") format("woff"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-700.ttf']}") format("truetype"), url("#{resource['serenity-layout:fonts/roboto-v15-latin-700.svg']}#Roboto") format("svg"); + /* Legacy iOS */ +} +@font-face { + font-family: "Material Icons"; + font-style: normal; + font-weight: 400; + src: url("#{resource['serenity-layout:fonts/MaterialIcons-Regular.eot']}"); + /* For IE6-8 */ + src: local("Material Icons"), local("MaterialIcons-Regular"), url("#{resource['serenity-layout:fonts/MaterialIcons-Regular.woff2']}") format("woff2"), url("#{resource['serenity-layout:fonts/MaterialIcons-Regular.woff']}") format("woff"), url("#{resource['serenity-layout:fonts/MaterialIcons-Regular.ttf']}") format("truetype"); +} +/* Utils */ +.clearfix:after { + content: " "; + display: block; + clear: both; +} + +.card { + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + background: #ffffff; + padding: 16px; + margin-bottom: 16px; + box-sizing: border-box; +} +.card.card-w-title { + padding-bottom: 32px; +} +.card h1 { + font-size: 24px; + font-weight: 400; + margin: 24px 0; +} +.card h1:first-child { + margin-top: 16px; +} +.card h2 { + font-size: 22px; + font-weight: 400; +} +.card h3 { + font-size: 20px; + font-weight: 400; +} +.card h4 { + font-size: 18px; + font-weight: 400; +} + +.nopad { + padding: 0; +} +.nopad .ui-panel-content { + padding: 0; +} + +@-webkit-keyframes fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } + to { + opacity: 1; + -webkit-transform: none; + transform: none; + } +} +@keyframes fadeInDown { + from { + opacity: 0; + transform: translate3d(0, -20px, 0); + } + to { + opacity: 1; + transform: none; + } +} +@-webkit-keyframes fadeOutUp { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } +} +@keyframes fadeOutUp { + from { + opacity: 1; + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0); + } +} +.fadeInDown { + -webkit-animation: fadeInDown 5s; + /* Safari 4.0 - 8.0 */ + animation: fadeInDown 5s; +} + +.fadeOutUp { + -webkit-animation: fadeOutUp 0.3s; + /* Safari 4.0 - 8.0 */ + animation: fadeOutUp 0.3s; +} + +.ui-shadow-1 { + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); +} + +.ui-shadow-2 { + -webkit-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); + -moz-box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); +} + +.ui-shadow-3 { + -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); +} + +.ui-shadow-4 { + -webkit-box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); + -moz-box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); +} + +.ui-shadow-5 { + -webkit-box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); + -moz-box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); + box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); +} + +.ui-g { + -ms-flex-wrap: wrap; +} +.ui-g.form-group > div { + padding: 12px 16px; +} + +.ui-panelgrid.form-group .ui-panelgrid-cell { + padding: 12px 16px; +} + +.ui-selectoneradio.form-group .ui-grid-row > div, .ui-selectmanycheckbox.form-group .ui-grid-row > div { + padding: 8px 16px; +} + +.dashboard .task-box { + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); +} +.dashboard .task-box .task-box-header { + padding: 8px 14px; +} +.dashboard .task-box .task-box-header:before, .dashboard .task-box .task-box-header:after { + content: ""; + display: table; +} +.dashboard .task-box .task-box-header:after { + clear: both; +} +.dashboard .task-box .task-box-header i { + float: right; + color: #ffffff; +} +.dashboard .task-box .task-box-content { + background-color: #ffffff; + padding: 8px 14px; +} +.dashboard .task-box .task-box-content h3 { + font-weight: bold; + font-size: 14px; + margin: 14px 0 7px 0; + padding: 0; +} +.dashboard .task-box .task-box-content p { + color: #757575; + margin: 0 0 28px 0; + padding: 0; +} +.dashboard .task-box .task-box-footer { + background-color: #ffffff; + padding: 8px 14px; +} +.dashboard .task-box .task-box-footer:before, .dashboard .task-box .task-box-footer:after { + content: ""; + display: table; +} +.dashboard .task-box .task-box-footer:after { + clear: both; +} +.dashboard .task-box .task-box-footer img { + width: 32px; + float: right; + margin-left: 4px; +} +.dashboard .task-box .task-box-footer .task-status { + -moz-border-radius: 9px; + -webkit-border-radius: 9px; + border-radius: 9px; + padding: 2px 8px; + color: #ffffff; +} +.dashboard .task-box.task-box-1 .task-box-header { + background-color: #e91e63; +} +.dashboard .task-box.task-box-1 .task-box-footer .task-status { + background-color: #e91e63; +} +.dashboard .task-box.task-box-2 .task-box-header { + background-color: #ffc107; +} +.dashboard .task-box.task-box-2 .task-box-footer .task-status { + background-color: #ffc107; +} +.dashboard .task-box.task-box-3 .task-box-header { + background-color: #00bcd4; +} +.dashboard .task-box.task-box-3 .task-box-footer .task-status { + background-color: #00bcd4; +} +.dashboard .overview-box { + text-align: center; + color: #ffffff; + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); +} +.dashboard .overview-box .overview-box-header { + height: 24px; +} +.dashboard .overview-box .overview-box-content { + padding: 8px 14px 14px 14px; +} +.dashboard .overview-box .overview-box-content .overview-box-icon { + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + width: 40px; + height: 40px; + line-height: 40px; + margin: 0 auto; + margin-top: -28px; +} +.dashboard .overview-box .overview-box-content .overview-box-icon i { + line-height: inherit; + font-size: 28px; +} +.dashboard .overview-box .overview-box-content .overview-box-title { + font-size: 16px; +} +.dashboard .overview-box .overview-box-content .overview-box-count { + font-size: 24px; +} +.dashboard .overview-box.overview-box-1 .overview-box-header { + background-color: #f06292; +} +.dashboard .overview-box.overview-box-1 .overview-box-content { + background-color: #e91e63; +} +.dashboard .overview-box.overview-box-1 .overview-box-content .overview-box-icon { + background-color: #e91e63; +} +.dashboard .overview-box.overview-box-2 .overview-box-header { + background-color: #4dd0e1; +} +.dashboard .overview-box.overview-box-2 .overview-box-content { + background-color: #00bcd4; +} +.dashboard .overview-box.overview-box-2 .overview-box-content .overview-box-icon { + background-color: #00bcd4; +} +.dashboard .overview-box.overview-box-3 .overview-box-header { + background-color: #ffd54f; +} +.dashboard .overview-box.overview-box-3 .overview-box-content { + background-color: #ffc107; +} +.dashboard .overview-box.overview-box-3 .overview-box-content .overview-box-icon { + background-color: #ffc107; +} +.dashboard .overview-box.overview-box-4 .overview-box-header { + background-color: #9e9e9e; +} +.dashboard .overview-box.overview-box-4 .overview-box-content { + background-color: #616161; +} +.dashboard .overview-box.overview-box-4 .overview-box-content .overview-box-icon { + background-color: #616161; +} +.dashboard .task-list { + overflow: hidden; +} +.dashboard .task-list > .ui-panel { + min-height: 340px; + border: 0 none; + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); +} +.dashboard .task-list .ui-panel-content { + padding: 10px 0 !important; +} +.dashboard .task-list button { + margin-top: -25px; + margin-right: 10px; + float: right; +} +.dashboard .task-list ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.dashboard .task-list ul li { + padding: 9.76px 14px; + border-bottom: 1px solid #dbdbdb; +} +.dashboard .task-list ul li:first-child { + margin-top: 10px; +} +.dashboard .task-list ul .ui-chkbox { + vertical-align: middle; + margin-right: 5px; +} +.dashboard .task-list ul .task-name { + vertical-align: middle; +} +.dashboard .task-list ul i { + color: #757575; + float: right; +} +.dashboard .contact-form { + overflow: hidden; +} +.dashboard .contact-form .ui-panel { + min-height: 340px; + border: 0 none; + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); +} +.dashboard .contact-form .ui-g-12 { + padding: 16px 10px; +} +.dashboard .contact-form .ui-button { + margin-top: 20px; +} +.dashboard .messages { + overflow: hidden; +} +.dashboard .messages > .ui-panel { + min-height: 340px; + border: 0 none; + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); +} +.dashboard .messages .ui-panel-content { + padding: 15px 0 10px 0 !important; +} +.dashboard .messages ul { + list-style-type: none; + padding: 0; + margin: 0; +} +.dashboard .messages ul li { + border-bottom: 1px solid #d8d8d8; +} +.dashboard .messages ul li a { + padding: 9px; + width: 100%; + box-sizing: border-box; + text-decoration: none; + position: relative; + display: block; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + -moz-transition: background-color 0.2s; + -o-transition: background-color 0.2s; + -webkit-transition: background-color 0.2s; + transition: background-color 0.2s; +} +.dashboard .messages ul li a:before, .dashboard .messages ul li a:after { + content: ""; + display: table; +} +.dashboard .messages ul li a:after { + clear: both; +} +.dashboard .messages ul li a img { + float: left; +} +.dashboard .messages ul li a > div { + float: left; + margin-left: 10px; +} +.dashboard .messages ul li a > div .name { + font-size: 14px; + font-weight: 700; + display: block; + color: #212121; +} +.dashboard .messages ul li a > div .message { + font-size: 14px; + color: #757575; +} +.dashboard .messages ul li a button { + position: absolute; + top: 15px; +} +.dashboard .messages ul li a button.message-btn { + right: 20px; +} +.dashboard .messages ul li a button.remove-btn { + right: 60px; +} +.dashboard .messages ul li a:hover { + cursor: pointer; + background-color: #e8e8e8; +} +.dashboard .messages ul li:last-child { + border: 0; +} +.dashboard .chat .ui-panel { + border: 0 none; + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); +} +.dashboard .chat .ui-panel-content { + padding: 0 !important; +} +.dashboard .chat .ui-tabs { + border-color: transparent; +} +.dashboard .chat ul { + padding: 12px; + margin: 0; + list-style-type: none; +} +.dashboard .chat ul li { + padding: 6px 0; +} +.dashboard .chat ul li:before, .dashboard .chat ul li:after { + content: ""; + display: table; +} +.dashboard .chat ul li:after { + clear: both; +} +.dashboard .chat ul li img { + width: 36px; + float: left; +} +.dashboard .chat ul li span { + padding: 6px 12px; + float: left; + display: inline-block; + margin: 4px 0; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; +} +.dashboard .chat ul li.message-from img, .dashboard .chat ul li.message-from span { + float: left; +} +.dashboard .chat ul li.message-from img { + margin-right: 8px; +} +.dashboard .chat ul li.message-from span { + background-color: #e8eaf6; +} +.dashboard .chat ul li.message-own img, .dashboard .chat ul li.message-own span { + float: right; +} +.dashboard .chat ul li.message-own img { + margin-left: 8px; +} +.dashboard .chat ul li.message-own span { + background: #c8e6c9; + color: #000000; +} +.dashboard .chat .new-message { + height: 40px; + border-top: 1px solid #dce2e7; + color: #afafc0; +} +.dashboard .chat .new-message .message-attachment { + display: inline-block; + border-right: 1px solid #dce2e7; + width: 40px; + line-height: 40px; + height: 100%; + text-align: center; +} +.dashboard .chat .new-message .message-attachment i { + line-height: inherit; + font-size: 24px; +} +.dashboard .chat .new-message .message-input { + position: relative; + top: -6px; + width: calc(100% - 100px); + display: inline-block; +} +.dashboard .chat .new-message .message-input input { + border: 0 none; + font-size: 14px; + width: 100%; + background-color: transparent; + outline: 0 none; + color: #757575; +} +.dashboard .global-sales .header-helper { + float: right; + opacity: 0.7; + filter: alpha(opacity=70); +} +.dashboard .global-sales .ui-panel { + border: 0 none; + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); +} +.dashboard .global-sales .ui-panel-content { + padding: 14px 9px 0px 9px; +} +.dashboard .global-sales table { + width: 100%; + border-collapse: collapse; +} +.dashboard .global-sales table th { + font-weight: 700; + text-align: left; + padding: 8px 5px; +} +.dashboard .global-sales table tbody tr { + border-top: 1px solid #dbdbdb; +} +.dashboard .global-sales table tbody tr img { + width: 36px; + height: 36px; +} +.dashboard .global-sales table tbody tr td { + padding: 8px 5px; +} +.dashboard .global-sales table tbody tr td:nth-child(1) { + font-weight: 700; + text-align: center; +} +.dashboard .global-sales table tbody tr td:nth-child(3) { + font-weight: 700; +} +.dashboard .global-sales table tbody tr td:nth-child(7) { + text-align: right; +} +.dashboard .global-sales table tbody tr td:nth-child(7) button { + margin-left: 10px; +} +.dashboard .global-sales table tbody tr td .up-arrow { + color: #cddc39; +} +.dashboard .global-sales table tbody tr td .down-arrow { + color: #e91e63; +} +.dashboard .status-bars ul { + margin: 0; + padding: 0; + list-style-type: none; +} +.dashboard .status-bars ul li { + padding: 8px 14px; + position: relative; +} +.dashboard .status-bars ul li span { + position: absolute; + right: 36px; + top: 8px; +} +.dashboard .status-bars ul li i { + position: absolute; + right: 4px; + top: 4px; +} +.dashboard .status-bars .status-bar { + height: 18px; + width: 75%; + background-color: #d8d8d8; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} +.dashboard .status-bars .status-bar .status-bar-value { + height: 100%; + color: #ffffff; + text-align: right; + padding-right: 4px; + padding-top: 1px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} +.dashboard .status-bars .status-bar.status-bar-1 .status-bar-value { + background-color: #e91e63; +} +.dashboard .status-bars .status-bar.status-bar-1 ~ i { + color: #e91e63; +} +.dashboard .status-bars .status-bar.status-bar-2 .status-bar-value { + background-color: #00bcd4; +} +.dashboard .status-bars .status-bar.status-bar-2 ~ i { + color: #00bcd4; +} +.dashboard .status-bars .status-bar.status-bar-3 .status-bar-value { + background-color: #ffc107; +} +.dashboard .status-bars .status-bar.status-bar-3 ~ i { + color: #ffc107; +} +.dashboard .status-bars .status-bar.status-bar-4 .status-bar-value { + background-color: #cddc39; +} +.dashboard .status-bars .status-bar.status-bar-4 ~ i { + color: #cddc39; +} +.dashboard .status-bars .status-bar.status-bar-5 .status-bar-value { + background-color: #ff9800; +} +.dashboard .status-bars .status-bar.status-bar-5 ~ i { + color: #ff9800; +} +.dashboard .image-box .card { + padding: 0; +} +.dashboard .image-box .card img { + width: 100%; +} +.dashboard .image-box .card .image-box-content { + padding: 16px; +} +.dashboard .image-box .card .image-box-content h3 { + font-weight: 700; + margin-top: 0; +} +.dashboard .image-box .card .image-box-content .image-box-tag { + width: 40px; + text-align: left; + color: #ffffff; + background-color: #e91e63; + padding: 0 8px; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} +.dashboard .image-box .card .image-box-footer { + text-align: right; +} +.dashboard .user-card { + border: 1px solid #dbdbdb; + padding: 0; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} +.dashboard .user-card .user-card-header { + height: 100px; + overflow: hidden; +} +.dashboard .user-card .user-card-header img { + width: 100%; +} +.dashboard .user-card .user-card-content { + min-height: 340px; + background-color: #ffffff; + position: relative; +} +.dashboard .user-card .user-card-content img { + position: absolute; + top: -90px; + left: 24px; +} +.dashboard .user-card .user-card-content .ui-button { + position: absolute; + width: 36px; + height: 36px; + top: -18px; + right: 24px; +} +.dashboard .user-card .user-card-content .user-card-name { + font-size: 20px; + color: #212121; + position: absolute; + top: -60px; + margin-left: 110px; + font-weight: 700; + white-space: nowrap; +} +.dashboard .user-card .user-card-content .user-detail { + text-align: left; +} +.dashboard .user-card .user-card-content .user-detail ul { + padding: 0px 0 32px 0; + margin: 0; + list-style-type: none; +} +.dashboard .user-card .user-card-content .user-detail ul li { + padding: 16px 24px; + border-top: 1px solid #dbdbdb; +} +.dashboard .user-card .user-card-content .user-detail ul li:last-child { + border-bottom: 1px solid #dbdbdb; +} +.dashboard .user-card .user-card-content .user-detail ul li i { + font-size: 24px; + margin-right: 8px; + width: 32px; + vertical-align: middle; +} +.dashboard .user-card .user-card-content .user-detail ul li .project-title { + font-weight: 700; + margin-right: 8px; +} +.dashboard .user-card .user-card-content .user-detail ul li .project-detail { + color: #757575; +} +.dashboard .user-card .user-card-content .user-detail ul li .project-progressbar { + display: inline-block; + width: 100px; + background-color: #dbdbdb; + float: right; + margin-top: 12px; +} +.dashboard .user-card .user-card-content .user-detail ul li .project-progressbar .project-progressbar-value { + background-color: #29ABE1; + height: 4px; +} +.dashboard .map .ui-panel { + border: 0 none; + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); +} +.dashboard .map .ui-panel .ui-panel-content { + padding: 8px; +} +.dashboard .map .ui-panel .ui-panel-content img { + width: 100%; +} +.dashboard .schedule .ui-panel { + border: 0 none; + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); +} +.dashboard .schedule .ui-panel .fc-today-button { + display: none; +} + +@media (max-width: 640px) { + .dashboard .status-bars .status-bar { + width: 65%; + } + .dashboard .global-sales table tbody tr td:nth-child(7) { + text-align: left; + } + .dashboard .global-sales table tbody tr td:nth-child(7) button { + display: block; + margin-left: 0; + } + .dashboard .global-sales table tbody tr td:nth-child(7) button:first-child { + margin-bottom: 4px; + } +} +.login-body { + + height: 100%; + background-position: center; + background-repeat: no-repeat; + background-size: cover; +} +.login-body .login-panel { + width: 550px; + height: 480px; + background-color: #ffffff; + position: absolute; + left: 50%; + top: 50%; + margin-left: -275px; + margin-top: -240px; + padding: 0; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + -webkit-box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.2), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 6px 10px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.2), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 6px 10px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.2), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 6px 10px 0 rgba(0, 0, 0, 0.14); +} +.login-body .login-panel .login-panel-header { + background-color: #29ABE1; + text-align: center; + padding: 8px 14px; +} +.login-body .login-panel .login-panel-header img { + vertical-align: middle; + width: 135px; +} +.login-body .login-panel .login-panel-content { + padding: 50px 100px; +} +.login-body .login-panel .login-panel-content h1 { + font-size: 16px; + margin-top: 0; + margin-bottom: 16px; + text-align: center; +} +.login-body .login-panel .login-panel-content .ui-g-12, .login-body .login-panel .login-panel-content .ui-g-6 { + padding: 1em; +} +.login-body .login-panel .login-panel-content .ui-g-12:last-child, .login-body .login-panel .login-panel-content .ui-g-6:last-child { + text-align: center; +} +.login-body .login-panel .login-panel-content .ui-g-12:last-child a, .login-body .login-panel .login-panel-content .ui-g-6:last-child a { + color: #29ABE1; +} +.login-body .login-panel .login-panel-content .password-reset { + text-align: right; +} +.login-body .login-panel .login-panel-content .password-reset a { + color: #757575; +} +.login-body .login-panel .login-panel-content .ui-chkbox-label { + margin: 0 0 0 8px; + vertical-align: middle; +} + +@media (max-width: 640px) { + .login-body .login-panel { + left: 0; + margin-left: 0; + width: 100%; + } + .login-body .login-panel .login-panel-content { + padding: 50px 25px; + } +} +.exception-body { + height: 100%; + background-position: center; + background-repeat: no-repeat; + background-size: cover; +} +.exception-body.error { + background-image: url("#{resource['serenity-layout:images/exception/error-bg.jpg']}"); +} +.exception-body.error .exception-panel .exception-code { + background-color: #e91e63; +} +.exception-body.error .exception-panel .exception-code img { + margin-left: -194px; +} +.exception-body.error .exception-panel .exception-icon { + background-color: #e91e63; +} +.exception-body.notfound { + background-image: url("#{resource['serenity-layout:images/exception/notfound-bg.jpg']}"); +} +.exception-body.notfound .exception-panel .exception-code { + background-color: #e91e63; +} +.exception-body.notfound .exception-panel .exception-code img { + margin-left: -206px; +} +.exception-body.notfound .exception-panel .exception-icon { + background-color: #e91e63; +} +.exception-body.accessdenied { + background-image: url("#{resource['serenity-layout:images/exception/access-bg.jpg']}"); +} +.exception-body.accessdenied .exception-panel .exception-code { + background-color: #ffb300; +} +.exception-body.accessdenied .exception-panel .exception-code img { + margin-left: -178px; +} +.exception-body.accessdenied .exception-panel .exception-icon { + background-color: #ffb300; +} +.exception-body .exception-panel { + width: 550px; + height: 480px; + background-color: #ffffff; + position: absolute; + left: 50%; + top: 50%; + margin-left: -275px; + margin-top: -240px; + padding: 0; + text-align: center; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + border-radius: 2px; + -webkit-box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.2), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 6px 10px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.2), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 6px 10px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.2), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 6px 10px 0 rgba(0, 0, 0, 0.14); +} +.exception-body .exception-panel .exception-code { + height: 240px; + position: relative; +} +.exception-body .exception-panel .exception-code img { + position: absolute; + bottom: 0; + height: 190px; + left: 50%; +} +.exception-body .exception-panel .exception-detail { + height: 240px; + position: relative; + padding: 60px 0 0 0; +} +.exception-body .exception-panel .exception-detail .exception-icon { + width: 90px; + height: 90px; + line-height: 90px; + text-align: center; + display: inline-block; + z-index: 100; + position: absolute; + top: -45px; + left: 50%; + margin-left: -45px; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -webkit-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 0 1px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 0 1px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 0 1px 0 rgba(0, 0, 0, 0.14); +} +.exception-body .exception-panel .exception-detail .exception-icon i { + font-size: 45px; + line-height: inherit; + color: #ffffff; +} +.exception-body .exception-panel .exception-detail h1 { + font-size: 15px; + font-weight: bold; + margin: 10px 0 8px 0; +} +.exception-body .exception-panel .exception-detail p { + color: #757575; + margin: 0 0 60px 0; +} + +@media (max-width: 640px) { + .exception-body .exception-panel { + left: 0; + margin-left: 0; + width: 100%; + } + .exception-body.error .exception-panel .exception-code img { + height: 150px; + margin-left: -150px; + } + .exception-body.notfound .exception-panel .exception-code img { + height: 150px; + margin-left: -163px; + } + .exception-body.accessdenied .exception-panel .exception-code img { + height: 150px; + margin-left: -141px; + } +} +.landing-body { + background-color: #F5F5F5; +} +.landing-body * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.landing-body p { + line-height: 1.5; +} +.landing-body #header { + background-color: #F5F5F5; +} +.landing-body #header > div { + width: 960px; + margin: 0 auto; + height: 90px; + padding: 15px 0; +} +.landing-body #header > div img { + height: 60px; +} +.landing-body #header > div #landing-menu { + float: right; + list-style-type: none; + padding: 0; + margin: 20px 0 0 0; +} +.landing-body #header > div #landing-menu > li { + display: inline-block; +} +.landing-body #header > div #landing-menu > li a { + border-bottom: 5px solid transparent; + color: #616161; + display: inline-block; + min-width: 80px; + text-align: center; + height: 55px; + font-size: 15px; + -moz-transition: border-color 0.3s; + -o-transition: border-color 0.3s; + -webkit-transition: border-color 0.3s; + transition: border-color 0.3s; +} +.landing-body #header > div #landing-menu > li:hover a { + color: #3f51b5; + border-color: #3f51b5; +} +.landing-body #header > div #landing-menu-button { + color: #3f51b5; + display: none; + float: right; + margin-right: 15px; + margin-top: 5px; +} +.landing-body #header > div #landing-menu-button i { + font-size: 48px; +} +.landing-body #introduction > div { + background: url("#{resource['serenity-layout:images/landing/landing-header.png']}") no-repeat; + min-height: 400px; + color: #ffffff; + text-align: center; + padding-top: 120px; + background-size: cover; +} +.landing-body #introduction > div h1 { + padding: 0; + margin: 0 0 20px 0; +} +.landing-body #introduction > div p { + max-width: 400px; + margin: 0 auto; + margin-bottom: 40px; +} +.landing-body #introduction > div button { + min-width: 180px; +} +.landing-body #features > div { + width: 960px; + margin: 0 auto; + padding: 60px 0; +} +.landing-body #features > div .feature-box { + padding: 30px 15px 30px 0; +} +.landing-body #features > div .feature-box:before, .landing-body #features > div .feature-box:after { + content: ""; + display: table; +} +.landing-body #features > div .feature-box:after { + clear: both; +} +.landing-body #features > div .feature-box img { + float: left; + margin-right: 30px; +} +.landing-body #features > div .feature-box > div { + padding: 16px 0; +} +.landing-body #features > div .feature-box > div h3 { + font-size: 15px; + margin: 0; +} +.landing-body #features > div .feature-box > div p { + color: #757575; + margin: 8px; +} +.landing-body #stats { + background-color: #212121; + background-image: -webkit-gradient(linear, left top, left bottom, from(#212121), to(#424242)); + background-image: -webkit-linear-gradient(top, #212121, #424242); + background-image: -moz-linear-gradient(top, #212121, #424242); + background-image: -ms-linear-gradient(top, #212121, #424242); + background-image: -o-linear-gradient(top, #212121, #424242); + background-image: linear-gradient(to bottom, #212121, #424242); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#212121", endColorstr="#424242"); +} +.landing-body #stats > div { + width: 960px; + margin: 0 auto; + padding: 40px 0; +} +.landing-body #stats > div .ui-g-12 { + padding: 20px; +} +.landing-body #stats > div .stat-box { + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background-color: #ffffff; + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + padding: 18px; + text-align: center; + color: #e91e63; +} +.landing-body #stats > div .stat-box h3 { + font-weight: 400; + margin: 0; +} +.landing-body #stats > div .stat-box p { + margin: 0; +} +.landing-body #stats > div .stat-box.stat-box-active { + background-color: #e91e63; + color: #ffffff; +} +.landing-body #video { + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); +} +.landing-body #video > div { + width: 960px; + margin: 0 auto; + padding: 60px 0; +} +.landing-body #video > div .video-description { + padding-top: 80px; + padding-right: 50px; +} +.landing-body #video > div .video-description h3 { + font-weight: 400; + font-size: 24px; + margin: 0 0 12px 0; +} +.landing-body #video > div .video-description p { + margin: 0 0 24px 0; +} +.landing-body #pricing > div { + width: 960px; + margin: 0 auto; + padding: 60px 0; + text-align: center; +} +.landing-body #pricing > div > h2 { + font-size: 24px; + font-weight: normal; + margin: 0 0 12px 0; +} +.landing-body #pricing > div > p { + color: #757575; + margin: 0 0 40px 0; +} +.landing-body #pricing > div .pricing-box { + width: 100%; + text-align: left; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} +.landing-body #pricing > div .pricing-box .pricing-header { + background-color: #212121; + padding: 16px; + text-align: center; +} +.landing-body #pricing > div .pricing-box .pricing-header h3 { + margin: 0; + color: #ffffff; + font-size: 15px; + font-weight: 400; + padding-bottom: 4px; + border-bottom: 1px solid #a7a5a5; +} +.landing-body #pricing > div .pricing-box .pricing-header p { + color: #a7a5a5; + margin: 0; + padding: 4px 0 0 0; +} +.landing-body #pricing > div .pricing-box .pricing-content { + padding: 16px; + min-height: 350px; + position: relative; + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); +} +.landing-body #pricing > div .pricing-box .pricing-content ul { + list-style-type: none; + margin: 0; + padding: 0; +} +.landing-body #pricing > div .pricing-box .pricing-content ul li { + padding: 8px 0; +} +.landing-body #pricing > div .pricing-box .pricing-content ul li i { + color: #4caf50; + vertical-align: middle; + margin-right: 6px; +} +.landing-body #pricing > div .pricing-box .pricing-content button { + position: absolute; + min-width: 180px; + bottom: 20px; + left: 50%; + margin-left: -90px; +} +.landing-body #pricing > div .pricing-box .pricing-content .pricing-fee { + position: absolute; + top: -24px; + right: 14px; + margin-left: -90px; + text-align: center; + font-size: 16px; + width: 48px; + height: 48px; + line-height: 48px; + background-color: #e91e63; + color: #ffffff; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); +} +.landing-body #pricing > div .pricing-box.pricing-box-pro .pricing-header { + background-color: #e91e63; + color: #ffffff; +} +.landing-body #pricing > div .pricing-box.pricing-box-pro .pricing-header h3 { + border-bottom: 1px solid #ffffff; +} +.landing-body #pricing > div .pricing-box.pricing-box-pro .pricing-header p { + color: #ffffff; +} +.landing-body #pricing > div .pricing-box.pricing-box-pro .pricing-content .pricing-fee { + background-color: #212121; + color: #ffffff; +} +.landing-body #contact { + background-color: #424242; +} +.landing-body #contact > div { + width: 960px; + margin: 0 auto; + padding: 60px 0; + text-align: center; +} +.landing-body #contact > div > h2 { + font-size: 24px; + font-weight: normal; + margin: 0 0 12px 0; + color: #f5f5f5; +} +.landing-body #contact > div > p { + margin: 0 0 40px 0; + color: #e0e0e0; +} +.landing-body #contact > div .contact-form { + text-align: left; +} +.landing-body #contact > div .contact-form > div { + padding: 1em 0.5em; +} +.landing-body #contact > div .contact-form button { + width: auto; + min-width: 180px; + margin-left: 15px; + margin-top: 40px; +} +.landing-body #contact > div .contact-form .md-inputfield input:focus ~ label, +.landing-body #contact > div .contact-form .md-inputfield input.ui-state-filled ~ label, +.landing-body #contact > div .contact-form .md-inputfield textarea:focus ~ label, +.landing-body #contact > div .contact-form .md-inputfield textarea.ui-state-filled ~ label, +.landing-body #contact > div .contact-form .md-inputfield .md-inputwrapper-focus ~ label, +.landing-body #contact > div .contact-form .md-inputfield .md-inputwrapper-filled ~ label { + color: #8AD4F2; +} +.landing-body #contact > div .contact-form .md-inputfield input:-webkit-autofill ~ label { + color: #8AD4F2; +} +.landing-body #contact > div .contact-form .md-inputfield input:focus { + border-color: #8AD4F2; +} +.landing-body #contact > div .contact-form .md-inputfield input { + color: #ffffff; +} +.landing-body #footer { + background-color: #212121; + color: #ffffff; +} +.landing-body #footer > div { + width: 960px; + margin: 0 auto; + padding: 30px 0; +} +.landing-body #footer > div .footer-logo { + height: 54px; + float: left; + margin-right: 14px; +} +.landing-body #footer > div h4 { + margin: 0 0 8px 0; + font-weight: 700; +} +.landing-body #footer > div p { + margin: 0; + line-height: 1.5; +} +.landing-body #footer > div p:last-child { + margin-top: 8px; +} +.landing-body #footer > div i { + vertical-align: middle; +} +.landing-body #footer > div .footer-social a { + margin-right: 14px; + opacity: 0.7; + filter: alpha(opacity=70); +} +.landing-body #footer > div .footer-social a img { + width: 30px; + height: 30px; +} +.landing-body #footer > div .footer-social a:hover { + opacity: 1; + filter: alpha(opacity=100); +} + +@media screen and (max-width: 64em) { + .landing-body { + padding-top: 90px; + } + .landing-body #header { + position: fixed; + top: 0; + z-index: 100; + width: 100%; + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + } + .landing-body #header > div { + width: 100%; + padding-left: 15px; + } + .landing-body #header > div #landing-menu-button { + display: block; + } + .landing-body #header > div #landing-menu { + -webkit-animation-duration: 0.5s; + -moz-animation-duration: 0.5s; + animation-duration: 0.5s; + display: none; + float: none; + width: 100%; + text-align: center; + background-color: #F5F5F5; + position: fixed; + top: 70px; + left: 0; + -webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14); + } + .landing-body #header > div #landing-menu li { + display: block; + } + .landing-body #header > div #landing-menu li a { + height: auto; + border-bottom: 0 none; + padding: 15px; + } + .landing-body #header > div #landing-menu.landing-menu-active { + display: block; + } + .landing-body #introduction { + width: 100%; + } + .landing-body #introduction > div h1, .landing-body #introduction > div p { + padding-left: 15px; + padding-right: 15px; + } + .landing-body #features > div { + width: 100%; + padding-left: 15px; + } + .landing-body #stats > div { + width: 100%; + } + .landing-body #video > div { + width: 100%; + text-align: center; + padding-left: 15px; + padding-right: 15px; + } + .landing-body #video > div .video-description { + padding-top: 0; + padding-right: 0; + } + .landing-body #video > div iframe { + width: 300px; + height: 200px; + } + .landing-body #pricing > div { + width: 100%; + adding-left: 15px; + padding-right: 15px; + } + .landing-body #contact > div { + width: 100%; + text-align: center; + } + .landing-body #contact > div .contact-map { + text-align: center; + } + .landing-body #contact > div .contact-map img { + width: 100%; + } + .landing-body #contact > div .contact-form .ui-g-12 { + padding: 15px; + } + .landing-body #footer > div { + width: 100%; + } + .landing-body #footer > div .ui-g-12 { + padding-top: 24px; + } +} +html { + height: 100%; +} + +body { + font-family: "Roboto", "Helvetica Neue", sans-serif; + font-size: 14px; + color: #212121; + -webkit-font-smoothing: antialiased; + padding: 0; + margin: 0; + min-height: 100%; + background-color: #F5F5F5; +} +body .ajax-loader { + font-size: 32px; + color: #29ABE1; +} + +.layout-wrapper .layout-sidebar { + width: 240px; + height: 100%; + position: fixed; + left: -180px; + top: 0; + -webkit-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + z-index: 999999; + background-color: #ffffff; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -moz-transition: left 0.3s; + -o-transition: left 0.3s; + -webkit-transition: left 0.3s; + transition: left 0.3s; + -webkit-box-shadow: 3px 0 6px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 3px 0 6px rgba(0, 0, 0, 0.3); + box-shadow: 3px 0 6px rgba(0, 0, 0, 0.3); +} +.layout-wrapper .layout-sidebar .sidebar-logo { + height: 64px; + background-color: #29ABE1; + padding-top: 8px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.layout-wrapper .layout-sidebar .sidebar-logo img { + height: 48px; + margin-left: 12px; + vertical-align: middle; +} +.layout-wrapper .layout-sidebar .sidebar-logo .sidebar-anchor { + display: none; + width: 18px; + height: 18px; + border: 2px solid #ffffff; + background-color: #29ABE1; + vertical-align: middle; + float: right; + margin-right: 8px; + margin-top: 12px; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +.layout-wrapper .layout-sidebar .sidebar-logo .app-name { + color: #ffffff; + vertical-align: middle; + font-size: 26px; +} +.layout-wrapper .layout-sidebar .layout-menu { + list-style-type: none; + margin: 10px 0 0 0; + padding: 0; +} +.layout-wrapper .layout-sidebar .layout-menu li { + padding: 4px 10px; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.layout-wrapper .layout-sidebar .layout-menu li.active-menuitem > a { + color: #29ABE1; +} +.layout-wrapper .layout-sidebar .layout-menu li.active-menuitem > a i { + color: #29ABE1; +} +.layout-wrapper .layout-sidebar .layout-menu li.active-menuitem > a i.layout-submenu-toggler { + -webkit-transform: rotate(-180deg); + -moz-transform: rotate(-180deg); + -o-transform: rotate(-180deg); + -ms-transform: rotate(-180deg); + transform: rotate(-180deg); +} +.layout-wrapper .layout-sidebar .layout-menu li > a { + color: #212121; + display: block; + padding: 10px 10px 10px 10px; + position: relative; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -webkit-transition: all 0.3s; + transition: all 0.3s; +} +.layout-wrapper .layout-sidebar .layout-menu li > a:hover { + background-color: #E0E0E0; + color: #212121; +} +.layout-wrapper .layout-sidebar .layout-menu li > a:hover i { + color: #212121; +} +.layout-wrapper .layout-sidebar .layout-menu li > a > .menuitem-text { + display: inline-block; + max-width: 145px; + word-break: break-all; +} +.layout-wrapper .layout-sidebar .layout-menu li > a i { + color: #616161; + float: right; + width: 20px; + height: 20px; + font-size: 20px; + position: absolute; + right: 10px; + top: 50%; + margin-top: -10px; +} +.layout-wrapper .layout-sidebar .layout-menu li > a i.layout-submenu-toggler { + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -webkit-transition: all 0.3s; + transition: all 0.3s; + right: 34px; + display: none; +} +.layout-wrapper .layout-sidebar .layout-menu li > a .menuitem-badge { + display: none; + position: absolute; + right: 54px; + top: 50%; + margin-top: -8px; +} +.layout-wrapper .layout-sidebar .layout-menu li ul { + display: none; + list-style-type: none; + margin: 0; + padding: 0; +} +.layout-wrapper .layout-sidebar .layout-menu li ul li { + padding: 4px 0; +} +.layout-wrapper .layout-sidebar .layout-menu li ul li a { + padding-left: 20px; +} +.layout-wrapper .layout-sidebar .layout-menu li ul li ul li a { + padding-left: 30px; +} +.layout-wrapper .layout-sidebar .layout-menu li ul li ul li ul li a { + padding-left: 40px; +} +.layout-wrapper .layout-sidebar .layout-menu li ul li ul li ul ul li a { + padding-left: 50px; +} +.layout-wrapper .layout-sidebar .layout-menu li ul li ul li ul ul ul li a { + padding-left: 60px; +} +.layout-wrapper .layout-sidebar .layout-menu li ul li ul li ul ul ul ul li a { + padding-left: 70px; +} +.layout-wrapper .layout-sidebar .layout-menu li ul li ul li ul ul ul ul ul li a { + padding-left: 80px; +} +.layout-wrapper .layout-sidebar .layout-menu > li > a { + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; +} +.layout-wrapper .layout-sidebar .layout-menu > li.active-menuitem > a { + color: #ffffff; + background-color: #29ABE1; + -moz-border-radius: 6px; + -webkit-border-radius: 6px; + border-radius: 6px; + -moz-border-radius-bottomleft: 0; + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomright: 0; + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -webkit-box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(60, 72, 88, 0.3), 0 7px 10px -5px rgba(60, 72, 88, 0.1); + -moz-box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(60, 72, 88, 0.3), 0 7px 10px -5px rgba(60, 72, 88, 0.1); + box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(60, 72, 88, 0.3), 0 7px 10px -5px rgba(60, 72, 88, 0.1); +} +.layout-wrapper .layout-sidebar .layout-menu > li.active-menuitem > a i { + color: #ffffff; +} +.layout-wrapper .layout-sidebar .layout-menu > li.active-menuitem > ul { + background-color: #EEEEEE; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; +} +.layout-wrapper .layout-sidebar .layout-menu .menuitem-badge { + float: right; + display: inline-block; + width: 16px; + height: 16px; + margin-right: 6px; + text-align: center; + background-color: #29ABE1; + color: #ffffff; + font-size: 12px; + font-weight: 700; + line-height: 16px; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; +} +.layout-wrapper .layout-sidebar.layout-sidebar-active { + left: 0; +} +.layout-wrapper .layout-sidebar.layout-sidebar-active .sidebar-logo img { + display: inline; +} +.layout-wrapper .layout-sidebar.layout-sidebar-active .sidebar-logo .sidebar-anchor { + display: inline-block; +} +.layout-wrapper .layout-sidebar.layout-sidebar-active .layout-menu li a i.layout-submenu-toggler { + display: inline-block; +} +.layout-wrapper .layout-sidebar.layout-sidebar-active .layout-menu li a .menuitem-badge { + display: inline-block; +} +.layout-wrapper .layout-sidebar .nano .sidebar-scroll-content { + display: block; + height: 100%; + position: relative; +} +.layout-wrapper .layout-sidebar .nano .sidebar-scroll-content .layout-menu { + padding-bottom: 120px; +} +.layout-wrapper .layout-sidebar .nano .nano-pane .nano-slider { + background-color: #aaaaaa; + opacity: 0.3; + filter: alpha(opacity=30); +} +.layout-wrapper .layout-sidebar.layout-sidebar-dark { + background-color: #29ABE1; +} +.layout-wrapper .layout-sidebar.layout-sidebar-dark .layout-menu li > a { + color: #dee0e3; +} +.layout-wrapper .layout-sidebar.layout-sidebar-dark .layout-menu li > a:hover { + background-color: #2341BB; + color: #ffffff; +} +.layout-wrapper .layout-sidebar.layout-sidebar-dark .layout-menu li > a:hover i { + color: #ffffff; +} +.layout-wrapper .layout-sidebar.layout-sidebar-dark .layout-menu li > a i { + color: #dee0e3; +} +.layout-wrapper .layout-sidebar.layout-sidebar-dark .layout-menu li.active-menuitem > a { + color: #8AD4F2; +} +.layout-wrapper .layout-sidebar.layout-sidebar-dark .layout-menu li.active-menuitem > a i { + color: #8AD4F2; +} +.layout-wrapper .layout-sidebar.layout-sidebar-dark .layout-menu > li.active-menuitem > a { + background-color: #2341BB; + color: #ffffff; +} +.layout-wrapper .layout-sidebar.layout-sidebar-dark .layout-menu > li.active-menuitem > a i { + color: #ffffff; +} +.layout-wrapper .layout-sidebar.layout-sidebar-dark .layout-menu > li.active-menuitem > ul { + background-color: #2341BB; +} +.layout-wrapper .layout-main { + margin-left: 60px; + -moz-transition: margin-left 0.3s; + -o-transition: margin-left 0.3s; + -webkit-transition: margin-left 0.3s; + transition: margin-left 0.3s; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.layout-wrapper .layout-main .layout-topbar { + height: 64px; + background-color: #29ABE1; + padding: 16px 42px 16px 24px; + position: fixed; + width: calc(100% - 40px); + -moz-transition: width 0.3s; + -o-transition: width 0.3s; + -webkit-transition: width 0.3s; + transition: width 0.3s; + -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 4px 5px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 4px 5px 0 rgba(0, 0, 0, 0.14); + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 4px 5px 0 rgba(0, 0, 0, 0.14); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + z-index: 999997; +} +.layout-wrapper .layout-main .layout-topbar .topbar-logo { + display: none; +} +.layout-wrapper .layout-main .layout-topbar .menu-btn { + display: none; + color: #ffffff; + float: left; +} +.layout-wrapper .layout-main .layout-topbar .menu-btn i { + font-size: 32px; +} +.layout-wrapper .layout-main .layout-topbar .topbar-menu-btn { + display: none; + color: #ffffff; + float: right; +} +.layout-wrapper .layout-main .layout-topbar .topbar-menu-btn i { + font-size: 32px; +} +.layout-wrapper .layout-main .layout-topbar .mobile-logo { + display: none; + height: 48px; + margin-top: -8px; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .sidebar-logo { + display: none; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu { + list-style-type: none; + margin: 0; + padding: 0; + vertical-align: middle; + margin: 0; + -webkit-animation-duration: 0s; + -moz-animation-duration: 0s; + animation-duration: 0s; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu:before, .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu:after { + content: ""; + display: table; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu:after { + clear: both; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu .topbar-badge { + width: 16px; + height: 16px; + text-align: center; + background-color: #29ABE1; + color: #ffffff; + font-size: 12px; + font-weight: 700; + line-height: 16px; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li { + float: right; + position: relative; + margin-left: 20px; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > a { + color: #ffffff; + position: relative; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > a .topbar-item-name { + display: none; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > a i { + font-size: 32px; + color: #ffffff; + -moz-transition: color 0.3s; + -o-transition: color 0.3s; + -webkit-transition: color 0.3s; + transition: color 0.3s; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > a i:hover { + color: #e6e6e6; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > a .topbar-badge { + position: absolute; + right: -4px; + top: -24px; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item { + float: left; + margin-left: 0; + padding-top: 4px; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > a { + display: inline-block; + position: relative; + top: -10px; + color: #ffffff; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > a .profile-image-wrapper { + display: inline-block; + vertical-align: middle; + border: 2px solid transparent; + width: 40px; + height: 40px; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + border-radius: 50%; + -moz-transition: border-color 0.3s; + -o-transition: border-color 0.3s; + -webkit-transition: border-color 0.3s; + transition: border-color 0.3s; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > a .profile-image-wrapper img { + width: 40px; + height: 40px; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > a .profile-name { + display: inline-block; + margin-left: 6px; + vertical-align: middle; + margin-top: -4px; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > a:hover .profile-image-wrapper { + border-color: #29ABE1; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > ul { + right: auto; + left: 5px; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > ul:before { + left: 8px; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.search-item { + position: relative; + display: inline-block; + vertical-align: middle; + height: 40px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.search-item input { + border: 0 none; + width: 150px; + padding: 6px 24px 6px 6px; + border-bottom: 1px solid #ffffff; + -moz-transition: all 0.3s; + -o-transition: all 0.3s; + -webkit-transition: all 0.3s; + transition: all 0.3s; + outline: 0 none; + color: #ffffff; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.search-item input:focus { + border-bottom-color: #ffffff; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.search-item input:focus label { + color: #ffffff; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.search-item i { + position: absolute; + right: 0; + top: 0; + color: #ffffff; + font-size: 28px; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.search-item label { + color: #ffffff; + margin-top: 6px; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.search-item input:focus ~ i { + color: #ffffff; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul { + position: absolute; + top: 60px; + right: 5px; + display: none; + width: 250px; + background-color: #ffffff; + -webkit-animation-duration: 0.5s; + -moz-animation-duration: 0.5s; + animation-duration: 0.5s; + list-style-type: none; + margin: 0; + padding: 8px 0; + border-top: 4px solid #29ABE1; + -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul a { + padding: 10px 10px 10px 10px; + display: block; + width: 100%; + box-sizing: border-box; + color: #212121; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul a i { + color: #757575; + margin-right: 8px; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul a img { + margin-right: 8px; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul a i, .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul a img, .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul a span { + vertical-align: middle; + display: inline-block; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul a .topbar-submenuitem-badge { + background-color: #29ABE1; + padding: 2px 4px; + display: block; + font-size: 12px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + color: #ffffff; + float: right; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul a:hover { + background-color: #f1f2f7; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul a:hover i { + color: #212121; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul:before { + width: 0; + height: 0; + border-left: 8px solid transparent; + border-right: 8px solid transparent; + border-bottom: 15px solid #29ABE1; + content: " "; + position: absolute; + top: -15px; + left: 232px; +} +.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.active-topmenuitem > ul { + display: block; +} +.layout-wrapper .layout-main .layout-breadcrumb { + background-color: #ffffff; + -webkit-box-shadow: inset 0 -2px 4px 0 rgba(0, 0, 0, 0.14); + -moz-box-shadow: inset 0 -2px 4px 0 rgba(0, 0, 0, 0.14); + box-shadow: inset 0 -2px 4px 0 rgba(0, 0, 0, 0.14); + min-height: 42px; + padding-top: 64px; +} +.layout-wrapper .layout-main .layout-breadcrumb:before, .layout-wrapper .layout-main .layout-breadcrumb:after { + content: ""; + display: table; +} +.layout-wrapper .layout-main .layout-breadcrumb:after { + clear: both; +} +.layout-wrapper .layout-main .layout-breadcrumb ul { + margin: 8px 0 0 0; + padding: 0 0 0 20px; + list-style: none; + color: #757575; + display: inline-block; +} +.layout-wrapper .layout-main .layout-breadcrumb ul li { + display: inline-block; + vertical-align: middle; + color: #757575; +} +.layout-wrapper .layout-main .layout-breadcrumb ul li:nth-child(even) { + font-size: 20px; +} +.layout-wrapper .layout-main .layout-breadcrumb ul li:first-child(even) { + color: #29ABE1; +} +.layout-wrapper .layout-main .layout-breadcrumb ul li a { + color: #757575; +} +.layout-wrapper .layout-main .layout-breadcrumb .layout-breadcrumb-options { + float: right; + padding: 0px 20px 0 0; + height: 100%; +} +.layout-wrapper .layout-main .layout-breadcrumb .layout-breadcrumb-options a { + color: #757575; + display: inline-block; + width: 42px; + height: 42px; + line-height: 42px; + text-align: center; + -moz-transition: background-color 0.3s; + -o-transition: background-color 0.3s; + -webkit-transition: background-color 0.3s; + transition: background-color 0.3s; +} +.layout-wrapper .layout-main .layout-breadcrumb .layout-breadcrumb-options a:hover { + background-color: #e8e8e8; +} +.layout-wrapper .layout-main .layout-breadcrumb .layout-breadcrumb-options a i { + line-height: inherit; +} +.layout-wrapper .layout-main .layout-content { + padding: 17px 17px 24px 17px; +} +.layout-wrapper .layout-main .layout-main-mask { + display: none; +} +.layout-wrapper .layout-main .layout-footer { + padding: 16px 24px; + border: 0 none; + border: 1px solid #dbdbdb; + background: #ffffff; +} +.layout-wrapper .layout-main .layout-footer img { + margin-top: 5px; + width: 100px; +} +.layout-wrapper .layout-main .layout-footer .footer-text-right { + float: right; + margin-top: 10px; +} +.layout-wrapper .layout-main .layout-footer .footer-text-right span { + vertical-align: middle; +} + +.layout-wrapper-static .layout-sidebar { + left: 0; +} +.layout-wrapper-static .layout-sidebar .sidebar-logo .sidebar-anchor { + display: inline-block; + background-color: #ffffff; +} +.layout-wrapper-static .layout-sidebar .layout-menu li a i.layout-submenu-toggler { + display: inline-block; +} +.layout-wrapper-static .layout-sidebar .layout-menu li a .menuitem-badge { + display: inline-block; +} +.layout-wrapper-static .layout-main { + margin-left: 240px; +} +.layout-wrapper-static .layout-main .layout-topbar { + width: calc(100% - 240px); +} + +.layout-wrapper-static-restore .layout-sidebar { + -moz-transition: none; + -o-transition: none; + -webkit-transition: none; + transition: none; +} + +@media (max-width: 1024px) { + .layout-wrapper .layout-sidebar { + left: -240px; + } + .layout-wrapper .layout-sidebar .sidebar-logo .sidebar-anchor { + display: none !important; + } + .layout-wrapper .layout-main { + margin-left: 0; + left: 0; + -moz-transition: left 0.3s; + -o-transition: left 0.3s; + -webkit-transition: left 0.3s; + transition: left 0.3s; + -webkit-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1); + } + .layout-wrapper .layout-main .layout-topbar { + width: 100%; + text-align: center; + padding: 16px 24px; + } + .layout-wrapper .layout-main .layout-topbar:before, .layout-wrapper .layout-main .layout-topbar:after { + content: ""; + display: table; + } + .layout-wrapper .layout-main .layout-topbar:after { + clear: both; + } + .layout-wrapper .layout-main .layout-topbar .menu-btn { + display: inline-block; + } + .layout-wrapper .layout-main .layout-topbar .topbar-menu-btn { + display: inline-block; + } + .layout-wrapper .layout-main .layout-topbar .mobile-logo { + display: inline; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu { + display: none; + -webkit-animation-duration: 0.5s; + -moz-animation-duration: 0.5s; + animation-duration: 0.5s; + text-align: left; + -webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3); + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3); + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu:before { + width: 0; + height: 0; + border-left: 8px solid transparent; + border-right: 8px solid transparent; + border-bottom: 15px solid #29ABE1; + content: " "; + position: absolute; + top: -15px; + left: 232px; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active { + position: fixed; + top: 75px; + right: 30px; + width: 250px; + display: block; + padding: 8px 0; + background-color: #ffffff; + border-top: 4px solid #29ABE1; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li { + float: none; + display: block; + margin: 0; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li > a { + padding: 8px 14px; + display: block; + color: #212121; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li > a:hover { + background-color: #e8e8e8; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li > a:hover i { + color: #212121; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li > a i { + color: #757575; + display: inline-block; + vertical-align: middle; + margin-right: 8px; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li > a .topbar-item-name { + display: inline-block; + vertical-align: middle; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li > a .topbar-badge { + position: static; + float: right; + margin-top: 4px; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li > ul { + position: static; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + padding: 0; + width: 100%; + border-top: 0 none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li > ul:before { + display: none; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li > ul a { + padding-left: 28px; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li.profile-item img { + width: 24px; + height: 24px; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu li a { + font-size: 14px; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu li a i { + font-size: 24px; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu li.search-item { + padding: 8px 14px; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu li.search-item input { + padding: 2px 2px 1px 2px; + border-color: #757575; + border-width: 0 0 1px 0; + border-style: solid; + color: #212121; + margin-left: 28px; + width: 85%; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu li.search-item input:focus { + border-bottom-color: #29ABE1; + border-width: 0 0 2px 0; + width: 85%; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu li.search-item input:focus ~ i { + color: #29ABE1; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu li.search-item input:focus ~ label { + color: #29ABE1; + top: -15px; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu li.search-item i { + color: #757575; + right: auto; + left: 0px; + } + .layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu li.search-item label { + color: #757575; + left: 32px; + margin-top: 0; + } + .layout-wrapper.layout-wrapper-active { + overflow: hidden; + } + .layout-wrapper.layout-wrapper-active .layout-sidebar { + left: 0; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + } + .layout-wrapper.layout-wrapper-active .layout-sidebar .layout-menu li a i.layout-submenu-toggler { + display: inline-block; + } + .layout-wrapper.layout-wrapper-active .layout-sidebar .layout-menu li a .menuitem-badge { + display: inline-block; + } + .layout-wrapper.layout-wrapper-active .layout-main { + position: fixed; + left: 240px; + width: calc(100%); + -webkit-box-shadow: inset 3px 0px 6px 1px rgba(0, 0, 0, 0.3); + -moz-box-shadow: inset 3px 0px 6px 1px rgba(0, 0, 0, 0.3); + box-shadow: inset 3px 0px 6px 1px rgba(0, 0, 0, 0.3); + } + .layout-wrapper.layout-wrapper-active .layout-main .layout-topbar { + -webkit-box-shadow: inset 3px 0px 6px 1px rgba(0, 0, 0, 0.3); + -moz-box-shadow: inset 3px 0px 6px 1px rgba(0, 0, 0, 0.3); + box-shadow: inset 3px 0px 6px 1px rgba(0, 0, 0, 0.3); + } + .layout-wrapper.layout-wrapper-active .layout-main .layout-breadcrumb { + -webkit-box-shadow: inset 3px 0px 6px 1px rgba(0, 0, 0, 0.3); + -moz-box-shadow: inset 3px 0px 6px 1px rgba(0, 0, 0, 0.3); + box-shadow: inset 3px 0px 6px 1px rgba(0, 0, 0, 0.3); + } + .layout-wrapper.layout-wrapper-active .layout-main .layout-breadcrumb .layout-breadcrumb-options { + display: none; + } + .layout-wrapper.layout-wrapper-active .layout-main-mask { + z-index: 999998; + position: absolute; + left: 0; + top: 0; + background-color: #424242; + display: block; + opacity: 0.5; + filter: alpha(opacity=50); + width: 100%; + height: 100%; + overflow: hidden; + } + + body.hidden-overflow { + overflow: hidden; + } +} +.layout-rtl.layout-wrapper .layout-sidebar { + left: auto; + right: -180px; + -moz-transition: right 0.3s; + -o-transition: right 0.3s; + -webkit-transition: right 0.3s; + transition: right 0.3s; + direction: rtl; +} +.layout-rtl.layout-wrapper .layout-sidebar .sidebar-logo { + direction: rtl; +} +.layout-rtl.layout-wrapper .layout-sidebar .sidebar-logo img { + margin-left: 0px; + margin-right: 12px; +} +.layout-rtl.layout-wrapper .layout-sidebar .sidebar-logo .sidebar-anchor { + float: left; + margin-right: 0px; + margin-left: 8px; +} +.layout-rtl.layout-wrapper .layout-sidebar .layout-menu { + direction: rtl; +} +.layout-rtl.layout-wrapper .layout-sidebar .layout-menu li > a i { + float: left; + right: auto; + left: 10px; +} +.layout-rtl.layout-wrapper .layout-sidebar .layout-menu li > a i.layout-submenu-toggler { + right: auto; + left: 34px; +} +.layout-rtl.layout-wrapper .layout-sidebar .layout-menu li > a .menuitem-badge { + right: auto; + left: 54px; +} +.layout-rtl.layout-wrapper .layout-sidebar .layout-menu li ul li a { + padding-right: 20px; + padding-left: 0px; +} +.layout-rtl.layout-wrapper .layout-sidebar .layout-menu li ul li ul li a { + padding-right: 30px; + padding-left: 0px; +} +.layout-rtl.layout-wrapper .layout-sidebar .layout-menu li ul li ul li ul li a { + padding-right: 40px; + padding-left: 0px; +} +.layout-rtl.layout-wrapper .layout-sidebar .layout-menu li ul li ul li ul ul li a { + padding-right: 50px; + padding-left: 0px; +} +.layout-rtl.layout-wrapper .layout-sidebar .layout-menu li ul li ul li ul ul ul li a { + padding-right: 60px; + padding-left: 0px; +} +.layout-rtl.layout-wrapper .layout-sidebar .layout-menu li ul li ul li ul ul ul ul li a { + padding-right: 70px; + padding-left: 0px; +} +.layout-rtl.layout-wrapper .layout-sidebar .layout-menu li ul li ul li ul ul ul ul ul li a { + padding-right: 80px; + padding-left: 0px; +} +.layout-rtl.layout-wrapper .layout-sidebar .layout-menu .menuitem-badge { + float: left; + margin-right: 0px; + margin-left: 6px; +} +.layout-rtl.layout-wrapper .layout-sidebar.layout-sidebar-active { + left: auto; + right: 0px; +} +.layout-rtl.layout-wrapper .layout-sidebar .nano .nano-pane { + right: auto; + left: 0; +} +.layout-rtl.layout-wrapper .layout-main { + margin-left: 0px; + margin-right: 60px; + -moz-transition: margin-right 0.3s; + -o-transition: margin-right 0.3s; + -webkit-transition: margin-right 0.3s; + transition: margin-right 0.3s; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .menu-btn { + float: right; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .topbar-menu-btn { + float: left; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li { + float: left; + margin-left: 0px; + margin-right: 20px; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > a .topbar-badge { + left: -4px; + right: auto; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item { + float: right; + margin-left: 0px; + margin-right: 0px; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > a .profile-name { + margin-left: 0px; + margin-right: 6px; + margin-top: 13px; + float: left; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > ul { + left: auto; + right: 5px; + direction: rtl; + text-align: right; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > ul:before { + left: auto; + right: 8px; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.search-item { + direction: rtl; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.search-item input { + padding: 6px 6px 6px 24px; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.search-item i { + right: auto; + left: 0; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.search-item label { + right: 5px; + left: auto; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul { + left: 5px; + right: auto; + direction: rtl; + text-align: right; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul a i, .layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul a img { + margin-right: 0px; + margin-left: 8px; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul a .topbar-submenuitem-badge { + float: left; +} +.layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li > ul:before { + left: auto; + right: 232px; +} +.layout-rtl.layout-wrapper .layout-main .layout-breadcrumb { + direction: rtl; +} +.layout-rtl.layout-wrapper .layout-main .layout-breadcrumb ul { + padding: 0 20px 0 0; +} +.layout-rtl.layout-wrapper .layout-main .layout-breadcrumb .layout-breadcrumb-options { + float: left; + padding: 0px 0px 0 20px; +} +.layout-rtl.layout-wrapper .layout-main .layout-footer { + direction: rtl; +} +.layout-rtl.layout-wrapper .layout-main .layout-footer .footer-text-right { + float: left; + margin-top: 10px; +} +.layout-rtl.layout-wrapper-static .layout-sidebar { + left: auto; + right: 0; +} +.layout-rtl.layout-wrapper-static .layout-main { + margin-left: 0px; + margin-right: 240px; +} +.layout-rtl.layout-wrapper-static-restore .layout-sidebar { + -moz-transition: none; + -o-transition: none; + -webkit-transition: none; + transition: none; +} +@media (max-width: 1024px) { + .layout-rtl.layout-wrapper .layout-sidebar { + left: auto; + right: -240px; + } + .layout-rtl.layout-wrapper .layout-main { + margin-right: 0px; + margin-left: 0px; + left: auto; + right: 0; + -moz-transition: right 0.3s; + -o-transition: right 0.3s; + -webkit-transition: right 0.3s; + transition: right 0.3s; + } + .layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu { + direction: rtl; + text-align: right; + } + .layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu:before { + right: 232px; + left: auto; + } + .layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active { + left: 30px; + right: auto; + } + .layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li { + float: none; + margin: 0px; + } + .layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li > a i { + margin-right: 0px; + margin-left: 8px; + } + .layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li > a .topbar-badge { + float: left; + } + .layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu.topbar-menu-active > li > ul a { + padding-left: 0px; + padding-right: 28px; + } + .layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > a .profile-name { + float: none; + } + .layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu li.search-item input { + margin-left: 0px; + margin-right: 28px; + padding: 2px 2px 1px 2px; + } + .layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu li.search-item i { + left: auto; + right: 0px; + } + .layout-rtl.layout-wrapper .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu li.search-item label { + right: 32px; + left: auto; + } + .layout-rtl.layout-wrapper.layout-wrapper-active .layout-sidebar { + right: 0; + left: auto; + } + .layout-rtl.layout-wrapper.layout-wrapper-active .layout-main { + left: auto; + right: 240px; + } + .layout-rtl.layout-wrapper.layout-wrapper-active .layout-main-mask { + left: auto; + right: 0; + } +} + +@media (min-width: 1025px) { + .layout-wrapper.layout-menu-horizontal .layout-sidebar { + width: 100%; + height: auto; + top: 64px; + left: 0; + z-index: 99; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .sidebar-logo { + display: none; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar > .nano { + overflow: visible; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar > .nano > .nano-content { + margin-right: 0 !important; + display: inherit; + height: auto; + position: static; + overflow: visible; + overflow-x: visible; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar > .nano > .nano-content.sidebar-scroll-content .layout-menu { + padding-bottom: 0; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar > .nano > .nano-pane { + display: none !important; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu { + margin: 0; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li { + width: auto; + padding: 0; + position: relative; + float: left; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > a { + height: 44px; + padding-top: 12px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > a:hover { + background-color: #E0E0E0; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > a .menuitem-text { + vertical-align: middle; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > a i { + float: none; + position: static; + vertical-align: middle; + margin-top: 0; + top: auto; + right: auto; + margin-right: 5px; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > a i.layout-submenu-toggler { + display: inline-block; + margin-top: 2px; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li.active-menuitem > a { + color: #ffffff; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li.active-menuitem > a i { + color: #ffffff; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li.active-menuitem > a:hover { + color: #212121; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li.active-menuitem > a:hover i { + color: #212121; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > ul { + top: 44px; + left: 0; + width: 230px; + position: absolute; + padding: 0; + margin: 0; + z-index: 100; + overflow: auto; + max-height: 450px; + -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > ul li a { + padding-left: 40px; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > ul li a:hover { + background-color: #E0E0E0; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > ul li a i { + float: none; + left: 10px; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > ul li a i:last-child { + right: 10px; + left: auto; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > ul li a .layout-submenu-toggler { + display: block; + left: auto; + right: 10px; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > ul li ul li a { + padding-left: 50px; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > ul li ul li a:hover { + background-color: #E0E0E0; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > ul li ul li a i:first-child { + left: 20px; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > ul li ul ul li a { + padding-left: 60px; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > ul li ul ul li a:hover { + background-color: #E0E0E0; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li > ul li ul ul li a i:first-child { + left: 30px; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu > li.active-menuitem > ul { + background-color: #EEEEEE; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu li a:hover { + background-color: #E0E0E0; + color: #212121; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu li a:hover i { + color: #212121; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar .layout-menu li a .menuitem-badge { + left: 18px; + top: 15px; + display: block; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar.layout-sidebar-dark { + background-color: #616161; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar.layout-sidebar-dark .layout-menu > li > a:hover { + background-color: #545454; + color: #ffffff; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar.layout-sidebar-dark .layout-menu > li > a:hover i { + color: #ffffff; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar.layout-sidebar-dark .layout-menu > li > ul li a:hover { + background-color: #545454; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar.layout-sidebar-dark .layout-menu li a:hover { + color: #ffffff; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar.layout-sidebar-dark .layout-menu li a:hover i { + color: #ffffff; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar.layout-sidebar-dark .layout-menu li.active-menuitem > a { + color: #96d099; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar.layout-sidebar-dark .layout-menu li.active-menuitem > a i { + color: #96d099; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar.layout-sidebar-dark .layout-menu li.active-menuitem > a:hover { + color: #ffffff; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar.layout-sidebar-dark .layout-menu li.active-menuitem > a:hover i { + color: #ffffff; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar.layout-sidebar-dark .layout-menu > li.active-menuitem > a { + color: #ffffff; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar.layout-sidebar-dark .layout-menu > li.active-menuitem > a i { + color: #ffffff; + } + .layout-wrapper.layout-menu-horizontal .layout-sidebar.layout-sidebar-dark .layout-menu > li.active-menuitem > ul { + background-color: #616161; + } + .layout-wrapper.layout-menu-horizontal .layout-main { + margin-left: 0px; + } + .layout-wrapper.layout-menu-horizontal .layout-topbar { + width: 100%; + } + .layout-wrapper.layout-menu-horizontal .layout-topbar .topbar-logo { + float: left; + margin-top: -10px; + margin-right: 20px; + display: inline-block; + } + .layout-wrapper.layout-menu-horizontal .layout-topbar .topbar-logo img { + height: 56px; + vertical-align: middle; + } + .layout-wrapper.layout-menu-horizontal .layout-topbar .topbar-logo .app-name { + color: #ffffff; + font-size: 26px; + } + .layout-wrapper.layout-menu-horizontal .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item { + float: right; + margin-left: 20px; + } + .layout-wrapper.layout-menu-horizontal .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > ul { + left: auto; + right: 105px; + } + .layout-wrapper.layout-menu-horizontal .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > ul:before { + left: 232px; + } + .layout-wrapper.layout-menu-horizontal .layout-breadcrumb { + padding-top: 108px; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-main { + margin-right: 0px; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item { + float: left; + margin-right: 20px; + margin-left: auto; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > ul { + left: 105px; + right: auto; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-main .layout-topbar .layout-topbar-menu-wrapper .topbar-menu > li.profile-item > ul:before { + left: auto; + right: 232px; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-main .layout-topbar .topbar-logo { + float: right; + margin-right: auto; + margin-left: 20px; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar { + -moz-transition: right 0s; + -o-transition: right 0s; + -webkit-transition: right 0s; + transition: right 0s; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar .layout-menu > li { + float: right; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar .layout-menu > li > a i { + margin-right: auto; + margin-left: 5px; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar .layout-menu > li > ul { + left: auto; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar .layout-menu > li > ul li a { + padding-right: 40px; + padding-left: 0px; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar .layout-menu > li > ul li a i { + right: 10px; + left: auto; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar .layout-menu > li > ul li a i:last-child { + left: 10px; + right: auto; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar .layout-menu > li > ul li a .layout-submenu-toggler { + right: auto; + left: 10px; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar .layout-menu > li > ul li ul li a { + padding-right: 50px; + padding-left: 0px; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar .layout-menu > li > ul li ul li a i:first-child { + right: 20px; + left: auto; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar .layout-menu > li > ul li ul ul li a { + padding-right: 60px; + padding-left: 0px; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar .layout-menu > li > ul li ul ul li a i:first-child { + right: 30px; + left: auto; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar .layout-menu li a .menuitem-badge { + right: 18px; + left: auto; + } + .layout-wrapper.layout-menu-horizontal.layout-rtl .layout-sidebar .layout-menu li a i:last-child { + margin-right: 3px; + } +} +/* Add your customizations of layout here */ diff --git a/ace-web/src/main/webapp/resources/serenity-layout/css/layout-green.scss b/ace-web/src/main/webapp/resources/serenity-layout/css/layout-green.scss new file mode 100644 index 0000000..64875ed --- /dev/null +++ b/ace-web/src/main/webapp/resources/serenity-layout/css/layout-green.scss @@ -0,0 +1,67 @@ +/* Sidebar */ +$sidebarLogoBgColor:#29ABE1; +$sidebarBgColor:#ffffff; +$darkSidebarBgColor:#29ABE1; + +/* Primary */ +$primaryColor:#29ABE1; +$primaryDarkColor:#2341BB; +$primaryLightColor:#8AD4F2; +$primaryLightestColor:#A8E1F7; +$primaryTextColor:#ffffff; + +/* Accent */ +$accentColor:#29ABE1; +$accentDarkColor: #2341BB; +$accentLightColor: #8AD4F2; + +/* Topbar */ +$topbarTextColor:#ffffff; +$topbarIconColor:#ffffff; + +/* Submenu */ +$submenuBgColor:#EEEEEE; +$darkSubmenuBgColor:#2341BB; +$horizontalSubmenuBgColor:#EEEEEE; +$horizontalDarkSubmenuBgColor:#616161; +$horizontalSubmenuitemHoverBgColor:#E0E0E0; +$horizontalSubmenuitemDarkHoverBgColor:#545454; +$horizontalSubmenuitemDarkHoverTextColor:#ffffff; +$horizontalMenuActiveTextColor:#ffffff; +$horizontalMenuActiveHoverTextColor:#212121; +$horizontalDarkMenuActiveTextColor:#ffffff; +$horizontalDarkMenuActiveHoverTextColor:#ffffff; + +/* Default MenuItem */ +$menuitemTextColor:#212121; +$menuitemIconTextColor:#616161; + +/* Hover MenuItem */ +$menuitemHoverBgColor:#E0E0E0; +$menuitemHoverTextColor:#212121; +$menuitemHoverIconTextColor:#212121; + +/* Active MenuItem */ +$menuitemActiveBgColor:#29ABE1; +$menuitemActiveTextColor:#ffffff; +$menuitemActiveIconTextColor:#ffffff; +$subMenuitemActiveTextColor:#29ABE1; +$subMenuitemActiveIconTextColor:#29ABE1; + +/* Dark Default MenuItem */ +$darkMenuitemTextColor:#dee0e3; +$darkMenuitemIconTextColor:#dee0e3; + +/* Dark Hover MenuItem */ +$darkMenuitemHoverBgColor:#2341BB; +$darkMenuitemHoverTextColor:#ffffff; +$darkMenuitemHoverIconTextColor:#ffffff; + +/* Dark Active MenuItem */ +$darkMenuitemActiveBgColor:#2341BB; +$darkMenuitemActiveTextColor:#ffffff; +$darkMenuitemActiveIconTextColor:#ffffff; +$darksubMenuitemActiveTextColor:#8AD4F2; +$darksubMenuitemActiveIconTextColor:#8AD4F2; + +@import '../../sass/layout/_layout'; diff --git a/ace-web/src/main/webapp/resources/serenity-layout/css/nanoscroller.css b/ace-web/src/main/webapp/resources/serenity-layout/css/nanoscroller.css new file mode 100644 index 0000000..db3de71 --- /dev/null +++ b/ace-web/src/main/webapp/resources/serenity-layout/css/nanoscroller.css @@ -0,0 +1,58 @@ +/** initial setup **/ +.nano { + position : relative; + width : 100%; + height : 100%; + overflow : hidden; +} +.nano > .nano-content { + /* position : absolute; */ + overflow : scroll; + overflow-x : hidden; + top : 0; + right : 0; + bottom : 0; + left : 0; +} +.nano > .nano-content:focus { + outline: thin dotted; +} +.nano > .nano-content::-webkit-scrollbar { + display: none; +} +.has-scrollbar > .nano-content::-webkit-scrollbar { + display: block; +} +.nano > .nano-pane { + background : transparent; + position : absolute; + width : 10px; + right : 0; + top : 0; + bottom : 0; + visibility : hidden\9; /* Target only IE7 and IE8 with this hack */ + opacity : .01; + -webkit-transition : .2s; + -moz-transition : .2s; + -o-transition : .2s; + transition : .2s; + -moz-border-radius : 5px; + -webkit-border-radius : 5px; + border-radius : 5px; +} +.nano > .nano-pane.nano-pane-rtl { + right: auto; + left: 0; +} +.nano > .nano-pane > .nano-slider { + background:rgba(255,255,255,0.1); + position : relative; + margin : 0 1px; + -moz-border-radius : 2px; + -webkit-border-radius : 2px; + border-radius : 2px; +} +.nano:hover > .nano-pane, .nano-pane.active, .nano-pane.flashed { + visibility : visible\9; /* Target only IE7 and IE8 with this hack */ + opacity : 0.99; +} diff --git a/ace-web/src/main/webapp/resources/serenity-layout/css/ripple.css b/ace-web/src/main/webapp/resources/serenity-layout/css/ripple.css new file mode 100644 index 0000000..552d0b9 --- /dev/null +++ b/ace-web/src/main/webapp/resources/serenity-layout/css/ripple.css @@ -0,0 +1,50 @@ +/* Ripple Effect Style like Google Material Buttons Effect*/ + +.ripplelink{ + /* display:block; */ + /*color:#fff;*/ + text-decoration:none; + position:relative; + overflow:hidden; + -webkit-transition: all 0.2s ease; + -moz-transition: all 0.2s ease; + -o-transition: all 0.2s ease; + transition: all 0.2s ease; + z-index:0; +} + +.ripplelink:hover{ + /*z-index:1000;*/ +} + +.ink { + display: block; + position: absolute; + background:rgba(255, 255, 255, 0.4); + border-radius: 100%; + -webkit-transform:scale(0); + -moz-transform:scale(0); + -o-transform:scale(0); + transform:scale(0); +} + +.ripple-animate { + -webkit-animation:ripple 0.65s linear; + -moz-animation:ripple 0.65s linear; + -ms-animation:ripple 0.65s linear; + -o-animation:ripple 0.65s linear; + animation:ripple 0.65s linear; +} + +@-webkit-keyframes ripple { + 100% {opacity: 0; -webkit-transform: scale(2.5);} +} +@-moz-keyframes ripple { + 100% {opacity: 0; -moz-transform: scale(2.5);} +} +@-o-keyframes ripple { + 100% {opacity: 0; -o-transform: scale(2.5);} +} +@keyframes ripple { + 100% {opacity: 0; transform: scale(2.5);} +} \ No newline at end of file diff --git a/ace-web/src/main/webapp/resources/serenity-layout/fonts/MaterialIcons-Regular.eot b/ace-web/src/main/webapp/resources/serenity-layout/fonts/MaterialIcons-Regular.eot new file mode 100644 index 0000000000000000000000000000000000000000..70508ebabc9992e64f1314f866b2d7ab90438c58 GIT binary patch literal 143258 zcmeFad3;;dnKyoqti`)5$yc%^Tb3=$a&*1Kl4UuYqioJ%CnO|N7M40831EdRkc1F6 zmC_Kl5Ei)mw$t5k8E|9iKTcyj8v|KtH&n}d9;mLZWk)#?a z%2Qv4^pwgabx3W}RO~x&PS5{*jz~gPs=yBQ>+M~&bWi)gluDYm=jr8z^B44LnY2=3 z|4@qS#)ZqzS~*(vyZi7wj_a<4DMcs^BV#fAOw{3z6x5JRi8=lJ(nv z|7pjlBo*BvNqWr%yLY-I6Pqtd#)EjSy>R_y+fSX63h+Kbr|`lpS8TrIm8#n$$u?DD zyS}(+)B272cW=G``BC{@7vYAsQv)bd9#Z2)m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kV?xzEyvWD48=mNMp0O7!zJe4G7> zu~Lv&SjDC%(IPDj`)R62Z{)$iwTc;d&QeEe6Be-ZM*Va_sKpIeSfpdhQA7*1a}z(R zcN-P-KdcN`w3z5f|KOk#^^RmuCrRAx(m82dA1qT=HG>^v_7I3>ErC zp>VfsBJ;tpW|3>iw5%;mvY0#!8tw7LDgJUv5%XZP_XY(BC*ixQ(NPk(OFBbXIj@m$ zLs_Bv)AjvhC3X8X?-N9WPEdYN>6Grjr*!R=o7owfq*{;YU->^;76-4ndsF=T>W}uN Hzx)3OGG_Ot literal 0 HcmV?d00001 diff --git a/ace-web/src/main/webapp/resources/serenity-layout/fonts/MaterialIcons-Regular.ttf b/ace-web/src/main/webapp/resources/serenity-layout/fonts/MaterialIcons-Regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..7015564ad166a3e9d88c82f17829f0cc01ebe29a GIT binary patch literal 128180 zcmeEvcYK@Gx&M1)4R2eLU&)qiS+*?6)@#Q@mX+x!dpHRhNLkQ2n^?%nyrxK)q?B3sZ zV)JZV|5B0+M=#vAZq1~o{wt7w4A*yUS+jq;)+-&y^A$+%+`4AVhU&7w+Y-AP^<@XQ zZ`-x|^p#SF#I6~l=MuG@X?}XnH|mdkwrui;Qh^3HB+*Oy+A$M$RE3dWOlmuQdZcu^om&H^q~Mv6Zi_T@_TTbTBt?>?5cVPbh4~g3xr$0r z{)|#lIz@`{vjpGMJ$jSgr+346O3y_a@hmFE`BS>8M@mYi{>eN?$|a05%AN9(rDmiR zXX0*%KMSF~VQC+pMR63l)1J;1UQc=}%C8j3&+`x->Z1J+4_iD-O5oc5m)t>SRp+%xbu@Tr(I{FiJ5~Yh=sm63hxn}>U9LkB_qchsR zgfwUSqf`=})3au&9ea8!&flgURU`+_>8X!DQOlzIb4wL9jG>MShYLNWd!i<^r$4%D zk_h^ARylH)+OZP%+?iCORua-sE^56O@cK}l=xwSe;R3xSdNsz=(tWiwN=X~_2fZQl z^mIl2NB7m#6LE)9(4Q>z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T|r~*q=Dj^uSTokn$=4{y|&Ta2fU&jQQ7B9A=E+H#9c!n zsz%gea1tZwhgxL289^GkH??ANENaCnCn-hpJ}+B~a;%MUFr-@e3@rCj3$_6Y)bnz- z4k;|f6RxO{b|XfSQm7D{Sc7}*74g3X5wMhEz$1J}LA|&qXZLrKn9Ct^{PDS6B2^Fv zVeiG2!tx~WcZ}113v#8(!yAR%XP^_Q4MuI2G)SHnNDJjG$`2iS+u<#-9|RXs3pTLc ohyj3!`#ee%L;DTjx@8!5k5~VH0QmdE^#A|> literal 0 HcmV?d00001 diff --git a/ace-web/src/main/webapp/resources/serenity-layout/fonts/MaterialIcons-Regular.woff b/ace-web/src/main/webapp/resources/serenity-layout/fonts/MaterialIcons-Regular.woff new file mode 100644 index 0000000000000000000000000000000000000000..b648a3eea2d16b6ce783906d6b7d5f251b9eb56c GIT binary patch literal 57620 zcmY&^NelVwr$(CZQHhO+t!`$=Dp;-onGnG%1YJl`q9)OmoxnxQ~!cx z7yTwvL_vxFmrDfzAms%BFq1u;FO!o|pk)96AY1*_{QHG2qyvG0ft8*u0022U001yH z001b^-7WpDiJrqRN5%B30sjv_KLEfcmTtzs92WpU*)#y4J?2lST9B!co*@9hGW4&8 z`4=pp>u1uYzvM6XUw$aRAo>Fc^vBf7(e;Ws_PPwU|4;c6vAY`D4U;s#9fGPn0SECQP7GZX@2I3WUo4pB*5bE|8|@Fm_rEMeislDJkxA(b z7tCUlVW`i$#DWbQZsJMnX?Wci4^U?JYSLP9^{854ZTD(mZmHb5Kg#0WKDy&x2*LAw zTo>W>_}n7h_S_HghvODJCnAQCPwY%2)^GlIWGK?6;jNOlF0WOptuo*kv8|j_g}1_c zE+(DP(B{zS(DhLNP{BA|<)Y%`;w0l_Q6WO2EZKL|*ys_L#EFFrpqv(C%GE%Zc>Y>~HgyL!|@;oHhHQP}pO{tpwUsv%B#6 zd!u<`WFA2+30r%fO!U*(zhn@xA;rJNv7)dPqcC&`Gkpup)6p#8t-&S%`VH#+Vw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9%%5${2uTHtlCV6b~|LGVZ@Tc~$vYDf!R31mvG`=H#Hc>3mFR>wUAXzL4B`>G4ry8UNrH-b4rrq>;zluNC z7k1{)08KD3UjP6B000Bc0I&cU0000000IC2009620000$04@Lk004Lae2z6z17QG0 zAMW%xE$&+3?hXy^?s@{wm~*7go5@<0wa<5cpo9Yo$SW)Zjv(N9)T^>QpKAUBUcd(b z0WVB+il`+O@M2m?Gsz=QeDlIJmt65iGre@v!+>no^iltgbK2GOJa9^_DIsOzhhUsw8 z5uAUJ9c-IkV~b|JPE5QrLpKXyk}j&N0DosT5CC`qV_;?gga6G8MhsX004PKOxB#p3 BJ$(QG literal 0 HcmV?d00001 diff --git a/ace-web/src/main/webapp/resources/serenity-layout/fonts/MaterialIcons-Regular.woff2 b/ace-web/src/main/webapp/resources/serenity-layout/fonts/MaterialIcons-Regular.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..9fa211252080046a23b2449dbdced6abc2b0bb34 GIT binary patch literal 44300 zcmV(qLaH4god-Bm<8i3y&NC1Rw>1dIum|RgzJoZ2Lrs zpu7QWyVk0GD*tRm1RDn#*n?jf3b-+JGsXb`o^K4<|9?_)Fopu#Ks7Vl-V09HrK0t1 z8~Zi}2F+TgDCMZDV{d4SjNq*5tBjvq-#O>6QvbMhde0G@=1>WT6AD?FYHu0ikega; z>#mApX-iw$(w6QH48JEw30FN{_sf5mTE?Y}D*r#_=EX+*uo1&#?f0LDsnA_;;~H3% zLxCTdVy;vtIwBs?ZoLX9$L7>X+VkW~9@$mBGp(v>Ob<@a910>RNex5OognF)o!ohs!So!2}}rZG)$IL^H=v$DKWnv|V>w-8hao zagH}G<;94Yj2XA;q^>=(%^d5(wx|WmmDKWTsi$hebmD*KGM53NIwPkx<@V<0<%C7b zQ3^@BU!oKcp8vnvoo~GfclBBJR-x#20u3VxJj}9%>0o@O93))a-xfrYnDq0!ZvFug z2s1C_1qdS{Adq{*5`qetJRqzDWxe|t4%kYf;$S)Id$m@mtr~kQIgrpb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r*Kcd-b95dg!6H1ufiv<8{p2JL+eUybi6-Y;6tLguk^_$$0h1VylXhhE_c(^)D@3!>j9uBbt==Bc(c(rftQ_by<(>>?a QW8}wPUeo^@jR61v08@RD2LJ#7 literal 0 HcmV?d00001 diff --git a/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-300.eot b/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-300.eot new file mode 100644 index 0000000000000000000000000000000000000000..826acfda9102ca6aba858813c72fa34b6968da36 GIT binary patch literal 16205 zcmaKSV{j!-^yN!lY}YNPbRi)+qN|m+qUgwGI28d`)}=5?WgTix9+*;-saxm%KzX1`vIf?WzzqXDgXnJ{14^fBggwc z(*NUd0IC2dfa!ns<3A$-$OCKuRsie&A^-sCznsN?kvqU1U;=RcPhkLP{-?MC-2SU_ z0yzFx&kA4yfc^u^f8hAf`2M%{KQa4%_5Z)w0RT}oDdqoXDgT=S0mjY%WtB|%)n_ir7W?W_+Y_D#KddL>QE(& zw5`rjqdYfL2Oda3oBl}8Dtlj$K;$ty-6Q}88}BWHMVg2meMD{_J}DrIM?^cd_G_Z%>dMUOKuavUwP6bWnce=$v@pt~?}ya~lbiE5>`%b;0t zbna09biI99;!2GdWU2H`p6EK0z$fHb{ytD{mh;mBueows!Cte)=0O%YPPbZKGX;9F z)LaM26Yv{Bq4WqBa;kQWwLNKU;*Cn2aBpZ6zeY{_G{-H2XND7>!e9>|hE@I=CtFqpGo?2%j=rym zS5Lsp>Gh)&UiIxY(JmkAY1t*=)^3t3@dhP@`H*ku%epYu$GPh?hec!66$#TH>vn~m ziSyFVAU%4KPvp-JOlyNkAEAEGUC^_Y+;&UEU+%9YrPyFgS~tK@xS@wa7Gd+!7Ka`o ziBtT60s(yRLdGax{(=vOq6%j=b9WWL)rCqK#=C(T^m0s8dO0pu^MFwPYI7Thum(*A zEe36h9Q02(tAvL?Cw9YUdN?Cdff9nq!4)BDVAIjG=?0t*D(Z!i#xw1(A{R z+O%0e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wStv zkBrRASyV~`>G|hlI9M4D(%s9Ku?PdV0K>e?XLX4#hAmS?D+NIe;n^Ram{?znVU z^nRi>3{BRV?KDyiUtw=JD;b~TlA+*IG__1>F_xt$DRx#&8^I~+$C=jOJA!8Zw>0f% z?7EjL%gF!a3Z>habESukFiaF(GS3HZ*&Px=M$jeww_fj(q&_fLS{n$LJeZR`LhxhD zWKKS4k%FEA)lwWU6+PUvi1M1_utBBoh+{t0>a z26ApIRq+BS*A{7v6-i49!NsGA2g{fEv)i-{BXUrRWz$w~R0Mg}n65+VM=59`^3wVr z81!538-hfzW3eH$eDfjmv9+iC5`#@#*m$9oQ5Ag!5A6xwH6awFgd~{Y6?n9!ABcF0RwJqeg1ruA^~u+O{d+d0*xa z2WBd-CLlDopbVDm!;BWH#`X zM~uKX7^%<>PzQSl2E&2Y?9s!c&FavwpnNxe<#?lbMNt)vz&ac?0KZAfiyxg&2$y{P z34?uTCe#yvwSY0-_EL>_v%%TVt`po;#mo*@P;3$-Zo1FN>iq}f>WX(8BD zEh_<@QbS?@MxlYgaF}TW2SZsEgf1(g64D6R=dB6nGp+e>uN!o1 zY;*UJeYnNGBd7v1o@HL`gC6V(d-bPU?FDYry3Xo4HlnwQ@j7c_p&&*~k_2l>@k(Rh z3(w7VIY`S zI1qu0jzb~0b5VfOzBj8VlOFc!@JRT{v*;msp^8u}(8G4E(Q6wsEmB|xvmI|j3}Elv zYzO}hWFm01aqddCZLeDzXys-A5lC9}>D9B&mLBCFNwW3Phc5v0%{y;OkeLLCqtm#z z6M4t3kBGNy;v@{>b$b05GtB=QOPqe@vmV|fYsAUN5Y$Bm(303LQ#>U$i!R}bv%Z8& zqH7jD^wJCxSU|^OXs@elKP#I_EJLNM?UavL_3hFzf)Sx{KD`i)x(MTm5s)84qa~$T GcK$C}BGQQf literal 0 HcmV?d00001 diff --git a/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-300.svg b/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-300.svg new file mode 100644 index 0000000..52b2832 --- /dev/null +++ b/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-300.svg @@ -0,0 +1,314 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-300.ttf b/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-300.ttf new file mode 100644 index 0000000000000000000000000000000000000000..66bc5ab8e299e9948a6fce6b7867cc638bc703c7 GIT binary patch literal 32664 zcmb`w2YeL8`#(OjyLXqKyR-{Emym>#aDfm)2bCfpJz6N5<*P)k%+N* zyR;59-~H|IF6z+E`*-7l}tkOz}3 zT?xr~L5Ntp->4B$;@Zl~2^q2u*Wb$;G9YjGUln!|GAMx%dUQaa;X{ZI2}S!jCIJI- z$7D5oZXStiWeMqfC%b=MzK;C$0PO|f`lIa3KK=hr-YF20c@xLAvT?$1yFLrgpMm3w z*?A-KhemYyf{-l0CyvS;+^4ros83#|sYhZ< zzz29~z6Gf55|@7d2#9=8&li@{$P|{0PT~h>l$oE9q=RBzodY0!T0!EC(1( zrjR`_2s{T#l%LMrrQK-nY}`}h8g^T;D7`+%#bC4;7(bmZVc+ihi`0t zcjN%|M4);?FxrCdBvrRqOcv2ZsfmgfnnEpNC3}70R4wIK_%peq|E!?LCE_GlZT*ARjvZrVTm#fux?S4+>_G>lx&4fHMGa1~54FI=`yvmYZc> zWY}o2jarkc(-<*XtXZo@M0l7!I*yhdtS_9E&^j@(bpl-?m3g@|+G>rqBqrjC^QC(9 zTRo#EUlLAiqSYo8106O)u}w7Ee2SB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tX(=&OjAs6C?qA5rYA)IQ~dB}BIN?7IUO$0=gD|46_xoq zdq}KHVN7SG$*eqysh~D@HP5DbJnD0$D>H*){l%zboEk)q5pKF{2`)f3!dn1=h%>e( zR6G61kz6b)14BxO@!48>R4kN>KmZdR*(qiZ&sHx1?^eB>X@<3Rsy@+`q=!lrnCH)Nja6xPlWK~`7j?EI3s-wV&;kMT`@|i{xMSujzw7M8iAr` zXFGpsg|ti&GnI8YVPO>I?=)ZBA71t#6VlgKwX#}bvy$|ck@n9-bH?Gg#QD)3SNuJX z*pDisp*#5?QmgS%M&#yA!~%krf4aJWwl9wqtUA~5(Tu}ElLOu8xaCn6w`y4_pH#qe zZjxHZMKM)vuWx*kbWaecvBK@`-Kug$6?okt&lZVmY`3};$I)*3!yZq|JbS_Gl#Gca z9@jXn9DgB(4~tKOGFOjv$daBdS^hFtktb=lMyEqFC@EZ4-fNkJ0CV5XC?x{OA%Yzh N69Ue10BL+3|3BR=Qi%Wn literal 0 HcmV?d00001 diff --git a/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-700.svg b/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-700.svg new file mode 100644 index 0000000..fc8d42f --- /dev/null +++ b/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-700.svg @@ -0,0 +1,310 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-700.ttf b/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-700.ttf new file mode 100644 index 0000000000000000000000000000000000000000..19090af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dov4ynmy9NRCvPYJq^6`!raPwZq+bvgVjXdW)RBeANtB0b zLam~%QQv5Zu1n9MSI~#(%k&eb1hay9#@1q2asloJUy`3M1cWZa7||~-5wA*Ksk+oq zYAubH)=Oulo6=J`Cg+!H%RS`b@@yrgWL0J>@6?3aL4B*?jJdVx+B)rkc3pd^{Q*9Z z0@*-W&;)b`qrgJ21DpnT!58R)EX)h5!ZxrUoCue|-S8~D55FQSiX#o>MrBYv)CCPf zGtqi<4BbSp&>!r@JkE(r<3_kA9*yVX_4wd_4cmyI000000RR91-T;pP7648F1pom6 z000004gdfG00IaA1^@wg0acANdjkL%gx}g-in(iTB~xrWQ*86^=i=n~jJpGlNVCVz z{s}vr!=m5iSkt`UtNtjHlEoFSvrcmu0>64X_R$sP}QzTONvFs zD_&e!u;C}7{5;p60PeCQ2LJ$g0b^ih0E7Qo3@Hp)001f<0nq?>0o%Z%y@5fSVG|=4 zlQzS4MnesGF+K(k?d?o1RyqnoAQm%RjAdeZjFmEo#afo&Z6*t1v8l>S2y%m1>`rD{ za$p@CR{Ba3{2&&mnGTf2742=MB?)9PY~to(2imFNTAL~1vdMs#v3S!4ejpLR&segl a0Ynt=GnQ`R7YB;vi!+u207`fxkN^PiJMWMH literal 0 HcmV?d00001 diff --git a/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-700.woff2 b/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-700.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..11cde5d04c470947b1c88e42a684fcf0d5b396b0 GIT binary patch literal 14552 zcmV;}I48$18V4W@ zfg&3$aa9L;j{_j`-Or;D5n~(}6R`7Grq^DpD zs)0K$0bI%m4aF^?&|#6Q9HHKo9+2tww3qe?-!_9y!cL5PTXL$u9% zK#W4cXwa>hGZLdvK^qK2tN>9lB4^H=Zf0+DQP!NbHW%rpy>OL>I;$Bw4veJu0K0oY z=)Ss6vV*j{2OOA2{%3o)Xr8)n0c$2ZIU8 z2RQWW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g=26p;H^Agto24toH48HJ_h_Za)>mS+uOXcqpZ{ArH2=7m+|Mdl! z962-qn0nrCm4BMNdEYC(`;$=-{{_1YA*N1UL2{QfUX#SU24ipX+Qux)no+&a-;sHT zMonazC*AUe(nwlZQ>FIbe3m6%l?oeQQ)WA>TJa8b7#`*9I>G3>J4mjqa5&+eR8?z- z`T8ug;Y86}5BK;#xUCZ--adh~$H=W~PVxrWjtGv@;72DxwVg(@LR=Zb7oO?L40nWz z)Gx@ja^@>ha4QIHOq!d8@LWng-pNf!!d$taLgl!7CyA7!Q-|@%n=XDJ*u5s(M2R&7 zfMY?cZlh9>p#MZDb}CqHDt*=QTjTt8A;+~2QxPD2a|6a)=W$qYnPLU=9~@jvlc;FA zV4!kjq%Iq7{hM~UVJfv#zXOUv(<20kt$57F>Qlf{Us*9Y^Q(8zi4(r=u+k+=QHgv##yq z0@^(W2;8p|H2PF2adr-DBW40B*c5;)3X@-vkf6pp3J3rf5)2PmOo0=JSrRdY3*M0_ zNa9@dgg9ZN2&$`D+%6tN~4?n>I3VPup1v!q587Kk5L`5Wu>DeGNW6lm0_G6~GFNHlMtW#DD zQwRRko`6o`nI@Z%{SRMSo*HbCJpYlWvrhLiCoRteFQ%{A&%~bJ_Ba#Yn;P!c!{TwD zCZ%VRx3^}8+W~cboz9@2?VLs$g{H~YpdXH}{Ojk`_hCOCsK3hp_^BMcOZX2y C(C%db literal 0 HcmV?d00001 diff --git a/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-regular.eot b/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-regular.eot new file mode 100644 index 0000000000000000000000000000000000000000..d26bc8f519b5b90a0639f82a18bfef133599196a GIT binary patch literal 16227 zcmZ8{Wl$VU(B|&q&Z3LEyE|E6akt>^?(QxDg1fti;2zxFf(O^2fdozN{jTn+u5P+| z`k80Cdj8D(nC`at0088O0|21^1Rn4|_WuqbAQ|{SSV`?4Dqt^!3ZO>yf3}K%0LuS? zjp`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2LwBsIkK(ivGFo6`u(yuHt10AlBg?ER&rr1|_sxB0W|K!$otb;(k3Ob4K~NdC!J1TI@2J zyNtdPVPm>92&Qia!t!jHkwG|UF?FoS#Fl~ZkT66_#|B#Gt_$qJ zzBtiW%P5-q>Zpk`AtC|Wi4#RHuF^r-wvlxI^+vow(vNNfMc>gS=@^ymMzsjTPYc2} z#uH$rqg?5kgO(%H<_a<;)0ECL2=5IGuTC&2rvLKiO%ziLt)VD}t}Wb1bB~+Rm=%t8 zi?$in$UN28?ug598CFAjN^*0NhkC!wSr>gU$fyF{v+#CC&-Lj@|9M65FRaiCaIr9j zqMi@QhwQoJxvkOAK;tFI;(HV1MDE!IQ~%=2$y`b(7}=Md@Mz*R z(M+)dLZPDNevx4y_;Hx`#`r+sE>j0na=)8tZCVy>>H`~VU^|aoAF)^7AF!R2JMRta zvQ4bifD%;@G# zwipJlmixX+7!MsAwR_PhyEWsEsSflZ;A&_}>dxlD15$7mF$0-9AnYqbGzE`hV4M^8 zCEV~wc|$DFjOmj`KAmooW}peu9y7N*PF+1Ms5I>9D|rek7c5<^+I}yA*gdS03c(jrBfJ%UZtNO8ClNQN#topdhS}r`^zuH8@=nb z6+V?-sk7kkM*8&fwhpfHGi$?G0d!dQqf>CPH8cvysvl`jj@nq5>8Tu2%vBD>_fJ9$ z!pl94YmXN(M1$&WdpNV2AMF_2mqyF0@eWNSxRutI`rNUp-Z0CZ1NcO^QW?eUJGj{0 zr3Vd(>2Sgo79=+gqkTaluzs#u`+c~i5&FUGYzR4mt&)1s&Rm{?u< zreEj-2Ss_%fV%@qtYGk;^Sre`kPlcT`rVXSmITpL<@yFTab{hJa7V`~RGz-!wqeAh v#g4%>=-%`rNTT$Q3+IGsv=@uepU+g& + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-regular.ttf b/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..7b25f3ce940cbba3001420d38b7d0f12fb7f2142 GIT binary patch literal 32652 zcmbt-2YeL8+yBh&-d%d`QXv6ymm>)!At4ozF1>dGNE3*J-g~d1_uf%D!es>{K_Ms| z!61l$h@dE-QS2h*_Ws|Qy}g3GzxVff|F@snIy?K!GtWG2o|z+*5E6o&M9fVaHEyCy zk$xj&l%7N5}{>D=%lnTSMRa>HFn5YHbE9MHG_vnB_E2pN!$>&$_; z;a8}iO31*6xUM*G=$HvJySLwl=R@%QaYKgp>szbTg1Yn@gECJJ?K@$F7$p3I>rTjT z9@cm00ORn)eSi=7sd2>c(PJD#Nq@jIg*_iJYQTsw+n1FPGQ1J4za%>LOsu4{5s~PL zF9{&QWTYHmG?_wb+5(I=Qq1;xzW3$(z+z$}jk9e+a&*2>u5LGeL2yBgb-T%uK=7ul zQx699;KL93egS{T0qUJVey|C~{Gfn8QmR`lCW~mI)I>!K&7c;slD)QYCR6!YDWm}p z1yNC`V7KdR&)?A*>{EsDFHFJ&doQ6^p3sX3WV_=}I+@oXfF!>HIDY`=&w$hG{HkVK zZbkpmO{RJQaHdqJRxwRX&rFR7)5pfs9(w{mx|lVjMvWm^bdwbR{N1EFb-KUy8orSy zg$PzXqbXlfme|B(S@07Xj)Y{Jq1YxGZ9c^)O|*ul>DZ2jR~Swg(;&9jO;9${pYzxb zC5=ZR*8y!bi6P5WXafLXfQCvVE{xg*M>0U?NRGmjC{~a10Sx#lw(`kkWFl&HvPs3Z z^1Q9E_b;~jC(AzWhyF%e5bhamA;mTyqb-c*jVQJeqpb|TQ-Q&60qoWcOQ;1YO=Kx8 z92i2f;>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aX!#w?YV`R18$XK?d962cNwgZ)gC_wvxV_IwaHJZd@qj)y~->!sB1QeAa zp%S4*3n-@=qy^K+4bUM{pfgp6RwF=zOGD0dYz)>KD7z*$KWGqaJ+0TU1wr?#4K1S% zwm{UTF8E<%Y(`iXP4Mle*s%I3woqQTFs=cHK?m%J*%Ft@O*|X3|^uy013lj1l~*M7?d~$A#1S(F^S%5kLQI10tw z)6Tfx61 z$R2DV(7+F&UJQ>a?gWlIk>k#v<1QSSyModf)lv_VO zz&-8Mxq}(yYc`O2ghe(a_buqvd>?^+!fYDK6SLOz&{vo~MNv9MiRw`z+wrWm$CD7( N6K0jQ!xePm{|7p>-q!#C literal 0 HcmV?d00001 diff --git a/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-regular.woff b/ace-web/src/main/webapp/resources/serenity-layout/fonts/roboto-v15-latin-regular.woff new file mode 100644 index 0000000000000000000000000000000000000000..941dfa4bae83483cf1784641063ce1deceda1406 GIT binary patch literal 18520 zcmYgWV{j+k)BVNS*tV06ZQHi(Y;4<3HnwfswrwXHJ9+c`KfSl++?jLg^i+T7n(FGg zu5zNH03g865?2Qx{df0``r-dm{$u}ti3y8{0sufsKN|lJq`~Mx@5JQglzy~D003+P z0Dy&?emay8Q&JHG03dRIJla19OCrlwlvAQ({Lwysxatq|b4%)qjcg45005B6Kk-EX z00{ejAfcv_ixU9=@asRH^nV}`06#MQV`c*YK#BkOxPH)S_Mly1X5jb}3mx?1f%zXG z0mx?7?xsIl900)T000=0L1NIpnH$@<0RV!aKOW;BoPq+s?3_(ULo^635#oF9axHU@4# zxrmPb#1Z@l5IEphTLT-DAMNyqr~UX45bUVS{@6J>0RUn_KN|9XzHb|V@gE11pIEWK zKfLP)8&0{gmu^6?eRV*6@)+Q~@7YkxwIS13PqRS$^+NL|WtR!xvb7-0*q#vfPDm&1 z4psIwx8=80w=0o-rD>D(0C*rMVmF|qd5}NE(ip?H-^cUWjuz`P%{CjH8$a96#X8Yo z({S@Vsa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^Sb%<40Rl`&2=G&+S-B~OTV(6ifCjb>jC%7q zYjDu$JLPP^jts*A7FxJXi@*{Fx9}`sbe>jo4yK%$2x#O0A+==U)~q9xFDC@%nlV8z zF9H1V5hqM^Viki8FK@!xo{|CfCbWw@Ep#pjBuB&^j)bi!utqKpO1Rjumd70Ra zzu*Q1AL;4AQK!iO9)eH;t{=f27Vmp1l{9?MDmP!lO`XM|+of}LNW{^%y4;@YF#&QX z`by^@;d3<)`a~^{l)1J=VJ3%2VjBwDAE$7$r*P>VTOTPR=sYcPUW&}SV?pjRMa5lV zB+En5riV!jwiFX~;T`D<>ul1cPje{l$=eK<`zfAl-ZSS4L1Eu96>aETgN14PYxs5k iW}TvF68t_Y*SW=LUda36ErCkt`%axV{Q*}%p#T635GXkS literal 0 HcmV?d00001 diff --git a/ace-web/src/main/webapp/resources/serenity-layout/images/ace_logo.jpg b/ace-web/src/main/webapp/resources/serenity-layout/images/ace_logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c4b9e4128c809ae89de73ed017ec5f377f68237c GIT binary patch literal 161381 zcmeFa2V7Il)-N0cq$(mHC?yIAC|y8`Ktu#Y1f+@7ND~185s*$)6p$7H0RbgSmllyG zHS~`3BE9#LPy?jg?bFUV&-2{xJHFpN_xHW`Cc5L!xb~h||M}0%T5D$SAr28IK__mi zs;h#?$jCs=z#kBCil0}-)9yY9q^SwI2m*nqK}SJ!pd-K;AMnGH>?DXBI41-CfXKxE zNDn5v^vgLjAd?ql2cq~z21H%E%mJbT(&&NTcR(OURgPugj2bvd9})s21V{*w5FjBy zLg4>O1Ptw*terhv&)$CE?B;w{#oErz`SDqCF%dBlaWOG*aS`#$5;BsYe^2U?*riKy z;^J~*QfI|vEKE{TCaM_-fwZj~@{yr%f$Tr4W`mveG4KqxBeALk#){$btx!*ZcH z@uPZ3mdpQ@Bqb?LLV$z-2>}uUBn19I;8$xy?1!}>E+r=+DJLZf`nxpXf}>>Qzu6Q= zfr!Z&5G9ZX#7-FBkg@-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iJ9?4UDFN(KIlc21e7sXc`zz1EXnR qG!2ZVfzdQDng&MGz-Ss6O#`E8U^ESkrh(BkFq#GiZ5puue-i-BqHqcT literal 0 HcmV?d00001 diff --git a/ace-web/src/main/webapp/resources/serenity-layout/images/apc_card.png b/ace-web/src/main/webapp/resources/serenity-layout/images/apc_card.png new file mode 100644 index 0000000000000000000000000000000000000000..be5efc9efd78df84da40104b8c044a129aa29018 GIT binary patch literal 145977 zcmY(r2{_by8#g}FWQH`1>=VYM!YPG}?8exp5<)3Uii&2mkS$pTQzi*X+BMef;vh>X z(I}O5kSI%qAzR3j`rp&@Jn#Q~uXCO2oTE;e-|zdqKkMC9TWd?~I{Z2W0)gE_HM2t? z1g8*)wQNB&d?k1G_aXSlT2GVxCJ01vyzsB%0`T989#p&i2t@E!1cJdtAeP}vj8O!_ zUmbzq9YY}W?jR7-=O0uZFn}LGyYI6!L;T_Y#jbgL6TTvJo_gd00)gEA_wNg=G59?h zh&^T|4ne&WtKqS(KktqN8nvjd`nKiQ#ySX>zxKY{x4r%Ahko`wN$rxGC)?$$DV&EX z0b=rNugY4hcxipyze#^+tB=lxRs@N*s)X9uX00!hd|AsppFdh$U898M5GpxmMWOWVx?978pOHs%yQ)35{^~pWfpk-WQ=NIxIDG5x_rbhJ)MMD}I_KRT3VAN501gwcqE><4TY&C+ z6ZocGp{TE@lg8GPPD#9Om|3%iZvLmA#u45%KgFTMqs}e_oGy1;s?3tZye-A!;!%S| zjEF#$ZpKH~UH1$7-qnm#uocyF`WJp~oTOkS7RptBdKSuKVul{J=hBa*ogZ7e&>e@G z4Ko)D2%r32SUD&2N#h5vPWWk|D#=!&ed=vr<}i7%@Y5p)l=$U+B-@}=E;+S}v0Tj! zu%nZ8UrArC^QgbzKItl)k0h|srNeuP3K*AQHI;QsOL-wY?eLQF+b;G)K4ksmJ>k+j zx*3asba!kvN3x^KF`J~G%4J~woGn8|WC<1`=MOu>mzsRo5^*T=HqzK?%tDH-p-6W4 z=h+#`jtHLoJ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