Le document suivant contient les résultats de l'inspection CPD CPD 5.5.1.
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/stock/modules/billetterie/web/StatisticJspBean.java | 179 |
fr/paris/lutece/plugins/stock/modules/billetterie/web/StatisticJspBean.java | 240 |
public String getManageProducts( HttpServletRequest request ) { Locale locale = getLocale( ); HtmlTemplate template; int nNumberResponse = 0; Map<String, Object> model = new HashMap<String, Object>( ); String strFistResponseDateFilter = request.getParameter( PARAMETER_FIRST_RESPONSE_DATE_FILTER ); String strLastResponseDateFilter = request.getParameter( PARAMETER_LAST_RESPONSE_DATE_FILTER ); String strTimesUnit = request.getParameter( PARAMETER_TIMES_UNIT ); if ( ( strFistResponseDateFilter != null ) && ( strLastResponseDateFilter != null ) && !strFistResponseDateFilter.equals( StringUtils.EMPTY ) && !strLastResponseDateFilter.equals( StringUtils.EMPTY ) ) { if ( DateUtil.formatDate( strFistResponseDateFilter, locale ).after( DateUtil.formatDate( strLastResponseDateFilter, locale ) ) ) { BusinessException fe = new BusinessException( null, MESSAGE_ERROR_INVALID_DATE ); model.put( BilletterieConstants.ERROR, getHtmlError( fe ) ); } } Timestamp tFistResponseDateFilter = null; Timestamp tLastResponseDateFilter = null; if ( strFistResponseDateFilter != null ) { tFistResponseDateFilter = DateUtils.getDateFirstMinute( DateUtil.formatDate( strFistResponseDateFilter, locale ) ); } if ( strLastResponseDateFilter != null ) { tLastResponseDateFilter = DateUtils.getDateLastMinute( DateUtil.formatDate( strLastResponseDateFilter, locale ) ); } nNumberResponse = _serviceStatistic.getCountProductsByDates( strFistResponseDateFilter, strLastResponseDateFilter ); |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/stock/modules/billetterie/web/OfferJspBean.java | 645 |
fr/paris/lutece/plugins/stock/modules/billetterie/web/OfferJspBean.java | 670 |
if (nSuppTickets>0) { if (offerInBdd.getTotalQuantity() != null) { if (offerInBdd.getTotalQuantity().equals(offer.getTotalQuantity())) { offer.setTotalQuantity(offer.getTotalQuantity() + nSuppTickets); } else { offer.setTotalQuantity(offerInBdd.getTotalQuantity() + nSuppTickets); } if (offerInBdd.getQuantity() == offer.getQuantity()) { offer.setQuantity(offer.getQuantity() + nSuppTickets); } else { offer.setQuantity(offer.getQuantity()+nSuppTickets); } } else { offer.setTotalQuantity(offer.getTotalQuantity() + nSuppTickets); if (!isNewOffer) { offer.setQuantity(offer.getQuantity()+nSuppTickets); } else { offer.setQuantity(offer.getTotalQuantity()); } } } |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/stock/modules/billetterie/web/PurchaseJspBean.java | 714 |
fr/paris/lutece/plugins/stock/modules/billetterie/web/StockBilletterieReservationApp.java | 557 |
SeanceDTO seance = this._serviceOffer.findSeanceById( purchase.getOffer( ).getId( ) ); if ( seance != null && seance.getQuantity( ) < seance.getMinTickets( ) ) { // Generate mail content Map<String, Object> model = new HashMap<String, Object>( ); model.put( MARK_SEANCE, seance ); model.put( MARK_BASE_URL, AppPathService.getBaseUrl( request ) ); HtmlTemplate template = AppTemplateService.getTemplate( TEMPLATE_NOTIFICATION_ADMIN_OFFER_QUANTITY, request.getLocale( ), model ); Collection<AdminUser> listUsers = (List<AdminUser>) AdminUserHome.findUserList( ); for ( AdminUser adminUser : listUsers ) { // Create mail object NotificationDTO notificationDTO = new NotificationDTO( ); notificationDTO.setRecipientsTo( adminUser.getEmail( ) ); String [ ] args = new String [ ] { String.valueOf( seance.getId( ) ) |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/stock/modules/billetterie/web/OfferJspBean.java | 757 |
fr/paris/lutece/plugins/stock/modules/billetterie/web/OfferJspBean.java | 801 |
public void doNotifyCreateOffer( HttpServletRequest request, SeanceDTO offer ) { // get all subscription for product Product product = _serviceProduct.findById( offer.getProduct( ).getId( ) ).convert( ); List<String> listUserEmail = _subscriptionProductService.getListEmailSubscriber( Integer.toString( offer.getProduct( ).getId( ) ) ); // Generate mail content Map<String, Object> model = new HashMap<String, Object>( ); model.put( MARK_OFFER, offer ); model.put( MARK_PRODUCT, product ); model.put( MARK_BASE_URL, AppPathService.getBaseUrl( request ) + AppPathService.getPortalUrl( ) + "?" + QUERY_SPECIFIC_PRODUCT + product.getId( ) ); // Create mail object HtmlTemplate template; NotificationDTO notificationDTO; for ( String strUserEmail : listUserEmail ) { model.put( MARK_USER_NAME, strUserEmail ); template = AppTemplateService.getTemplate( TEMPLATE_NOTIFICATION_CREATE_OFFER, request.getLocale( ), model ); |
Fichier | Ligne |
---|---|
fr/paris/lutece/plugins/stock/modules/billetterie/web/ShowJspBean.java | 306 |
fr/paris/lutece/plugins/stock/modules/billetterie/web/ShowJspBean.java | 487 |
model.put( TicketsConstants.MARK_NB_ITEMS_PER_PAGE, String.valueOf( _nItemsPerPage ) ); // Combo ProviderFilter providerFilter = new ProviderFilter( ); providerFilter.setOrderAsc( true ); providerFilter.setOrders( orderList ); ReferenceList providerComboList = ListUtils.toReferenceList( _serviceProvider.findByFilter( providerFilter, null ), BilletterieConstants.ID, BilletterieConstants.NAME, StockConstants.EMPTY_STRING ); CategoryFilter categoryFilter = new CategoryFilter( ); categoryFilter.setOrderAsc( true ); categoryFilter.setOrders( orderList ); ReferenceList categoryComboList = ListUtils.toReferenceList( _serviceCategory.findByFilter( categoryFilter, null ), BilletterieConstants.ID, BilletterieConstants.NAME, StockConstants.EMPTY_STRING ); model.put( MARK_LIST_PROVIDERS, providerComboList ); model.put( MARK_LIST_CATEGORIES, categoryComboList ); // the filter model.put( TicketsConstants.MARK_FILTER, filter ); |