├── src └── main │ ├── webapp │ ├── resources │ │ ├── fonts │ │ │ ├── open-sans-v18-latin-ext_latin-300.eotb46f.xhtml │ │ │ ├── open-sans-v18-latin-ext_latin-600.eotb46f.xhtml │ │ │ ├── open-sans-v18-latin-ext_latin-700.eotb46f.xhtml │ │ │ ├── open-sans-v18-latin-ext_latin-regular.eotb46f.xhtml │ │ │ ├── open-sans-v18-latin-ext_latin-300.eot │ │ │ ├── open-sans-v18-latin-ext_latin-300.ttf │ │ │ ├── open-sans-v18-latin-ext_latin-600.eot │ │ │ ├── open-sans-v18-latin-ext_latin-600.ttf │ │ │ ├── open-sans-v18-latin-ext_latin-700.eot │ │ │ ├── open-sans-v18-latin-ext_latin-700.ttf │ │ │ ├── open-sans-v18-latin-ext_latin-300.woff │ │ │ ├── open-sans-v18-latin-ext_latin-300.woff2 │ │ │ ├── open-sans-v18-latin-ext_latin-600.woff │ │ │ ├── open-sans-v18-latin-ext_latin-600.woff2 │ │ │ ├── open-sans-v18-latin-ext_latin-700.woff │ │ │ ├── open-sans-v18-latin-ext_latin-700.woff2 │ │ │ ├── open-sans-v18-latin-ext_latin-regular.eot │ │ │ ├── open-sans-v18-latin-ext_latin-regular.ttf │ │ │ ├── open-sans-v18-latin-ext_latin-regular.woff │ │ │ └── open-sans-v18-latin-ext_latin-regular.woff2 │ │ ├── images │ │ │ ├── icon-404.png │ │ │ ├── icon-error.png │ │ │ ├── icon-access.png │ │ │ ├── avatar-profile.png │ │ │ ├── avatar │ │ │ │ ├── annafali.png │ │ │ │ ├── amyelsner.png │ │ │ │ ├── xuxuefeng.png │ │ │ │ ├── asiyajavayant.png │ │ │ │ ├── elwinsharvill.png │ │ │ │ ├── ionibowcher.png │ │ │ │ ├── ivanmagalhaes.png │ │ │ │ ├── onyamalimba.png │ │ │ │ ├── stephenshaw.png │ │ │ │ └── bernardodominic.png │ │ │ ├── logo-conflomark.png │ │ │ ├── logo-poseidon.png │ │ │ ├── pages │ │ │ │ ├── bg-help.jpg │ │ │ │ ├── asset-cover.png │ │ │ │ ├── asset-maps.png │ │ │ │ ├── asset-news.png │ │ │ │ ├── help │ │ │ │ │ ├── blog1.jpg │ │ │ │ │ ├── blog2.jpg │ │ │ │ │ └── blog3.jpg │ │ │ │ ├── avatar-chat-1.png │ │ │ │ ├── avatar-chat-2.png │ │ │ │ └── avatar-profil.png │ │ │ ├── product │ │ │ │ ├── blue-band.jpg │ │ │ │ ├── bracelet.jpg │ │ │ │ ├── lime-band.jpg │ │ │ │ ├── yoga-mat.jpg │ │ │ │ ├── bamboo-watch.jpg │ │ │ │ ├── black-watch.jpg │ │ │ │ ├── blue-t-shirt.jpg │ │ │ │ ├── brown-purse.jpg │ │ │ │ ├── gaming-set.jpg │ │ │ │ ├── grey-t-shirt.jpg │ │ │ │ ├── headphones.jpg │ │ │ │ ├── pink-purse.jpg │ │ │ │ ├── purple-band.jpg │ │ │ │ ├── green-earbuds.jpg │ │ │ │ ├── green-t-shirt.jpg │ │ │ │ ├── mini-speakers.jpg │ │ │ │ ├── purple-t-shirt.jpg │ │ │ │ ├── chakra-bracelet.jpg │ │ │ │ ├── galaxy-earrings.jpg │ │ │ │ ├── game-controller.jpg │ │ │ │ ├── gold-phone-case.jpg │ │ │ │ └── purple-gemstone-necklace.jpg │ │ │ ├── dashboard │ │ │ │ ├── leader-1.png │ │ │ │ ├── leader-2.png │ │ │ │ ├── leader-3.png │ │ │ │ ├── leader-4.png │ │ │ │ ├── seller-1.png │ │ │ │ ├── seller-2.png │ │ │ │ ├── seller-3.png │ │ │ │ ├── seller-4.png │ │ │ │ ├── avatar-conan.png │ │ │ │ ├── avatar-dengra.png │ │ │ │ ├── image-product-1.png │ │ │ │ ├── image-product-2.png │ │ │ │ ├── image-product-3.png │ │ │ │ ├── image-product-4.png │ │ │ │ └── image-product-5.png │ │ │ ├── logo-poseidon-dark.png │ │ │ ├── logo.svg │ │ │ ├── landing │ │ │ │ ├── code.svg │ │ │ │ ├── responsive.svg │ │ │ │ ├── design.svg │ │ │ │ └── documented.svg │ │ │ └── logo-poseidon-dark.svg │ │ ├── fa │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ ├── fontawesome-webfont.woff2 │ │ │ └── fontawesome-webfont.eotbc29.html │ │ ├── css │ │ │ ├── style.css │ │ │ ├── toggleswitch.css │ │ │ ├── default.css │ │ │ ├── cssLayout.css │ │ │ └── flags │ │ │ │ └── flags.css │ │ └── js │ │ │ └── Calendar.js │ ├── recursos │ │ ├── pdf.png │ │ └── xls.png │ ├── reportes │ │ ├── Venta.jasper │ │ ├── Producto.jasper │ │ ├── Venta.jrxml │ │ └── Producto.jrxml │ ├── WEB-INF │ │ ├── glassfish-web.xml │ │ └── web.xml │ └── vistas │ │ ├── Contenido.xhtml │ │ └── Clientes.xhtml │ └── java │ ├── modelo │ ├── TempVta.java │ ├── Familia.java │ ├── Cliente.java │ ├── Empleado.java │ ├── Proveedor.java │ ├── Venta.java │ ├── VentaDetalle.java │ └── Producto.java │ ├── dao │ ├── ICRUD.java │ ├── Conexion.java │ ├── FamiliaImpl.java │ ├── EmpleadoImpl.java │ ├── ProveedorImpl.java │ ├── ClienteImpl.java │ ├── VentaDetalleImpl.java │ └── ProductoImpl.java │ ├── controlador │ ├── EmpleadoC.java │ ├── FamiliaC.java │ ├── ProveedorC.java │ ├── ClienteC.java │ ├── ProductoC.java │ └── VentaDetalleC.java │ └── servicios │ └── ReporteS.java ├── imagenes ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png ├── 9.png ├── 10.png ├── 11.png ├── 12.png ├── 13.png ├── 14.png ├── 15.png ├── 16.png ├── 17.png ├── 18.png ├── 19.png ├── 20.png ├── 21.png ├── 22.png ├── 23.png ├── 24.png ├── 25.png ├── 26.png ├── 27.png ├── 28.png ├── 29.png ├── 30.png ├── 31.png ├── 32.png ├── 33.png ├── 34.png ├── 35.png └── 36.png ├── .gitlab-ci.yml ├── nbactions.xml ├── README.md ├── nb-configuration.xml └── pom.xml /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-300.eotb46f.xhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-600.eotb46f.xhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-700.eotb46f.xhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-regular.eotb46f.xhtml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /imagenes/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/1.png -------------------------------------------------------------------------------- /imagenes/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/2.png -------------------------------------------------------------------------------- /imagenes/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/3.png -------------------------------------------------------------------------------- /imagenes/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/4.png -------------------------------------------------------------------------------- /imagenes/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/5.png -------------------------------------------------------------------------------- /imagenes/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/6.png -------------------------------------------------------------------------------- /imagenes/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/7.png -------------------------------------------------------------------------------- /imagenes/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/8.png -------------------------------------------------------------------------------- /imagenes/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/9.png -------------------------------------------------------------------------------- /imagenes/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/10.png -------------------------------------------------------------------------------- /imagenes/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/11.png -------------------------------------------------------------------------------- /imagenes/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/12.png -------------------------------------------------------------------------------- /imagenes/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/13.png -------------------------------------------------------------------------------- /imagenes/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/14.png -------------------------------------------------------------------------------- /imagenes/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/15.png -------------------------------------------------------------------------------- /imagenes/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/16.png -------------------------------------------------------------------------------- /imagenes/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/17.png -------------------------------------------------------------------------------- /imagenes/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/18.png -------------------------------------------------------------------------------- /imagenes/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/19.png -------------------------------------------------------------------------------- /imagenes/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/20.png -------------------------------------------------------------------------------- /imagenes/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/21.png -------------------------------------------------------------------------------- /imagenes/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/22.png -------------------------------------------------------------------------------- /imagenes/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/23.png -------------------------------------------------------------------------------- /imagenes/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/24.png -------------------------------------------------------------------------------- /imagenes/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/25.png -------------------------------------------------------------------------------- /imagenes/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/26.png -------------------------------------------------------------------------------- /imagenes/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/27.png -------------------------------------------------------------------------------- /imagenes/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/28.png -------------------------------------------------------------------------------- /imagenes/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/29.png -------------------------------------------------------------------------------- /imagenes/30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/30.png -------------------------------------------------------------------------------- /imagenes/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/31.png -------------------------------------------------------------------------------- /imagenes/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/32.png -------------------------------------------------------------------------------- /imagenes/33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/33.png -------------------------------------------------------------------------------- /imagenes/34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/34.png -------------------------------------------------------------------------------- /imagenes/35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/35.png -------------------------------------------------------------------------------- /imagenes/36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/imagenes/36.png -------------------------------------------------------------------------------- /src/main/webapp/recursos/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/recursos/pdf.png -------------------------------------------------------------------------------- /src/main/webapp/recursos/xls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/recursos/xls.png -------------------------------------------------------------------------------- /src/main/webapp/reportes/Venta.jasper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/reportes/Venta.jasper -------------------------------------------------------------------------------- /src/main/webapp/reportes/Producto.jasper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/reportes/Producto.jasper -------------------------------------------------------------------------------- /src/main/webapp/resources/images/icon-404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/icon-404.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/icon-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/icon-error.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/icon-access.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/icon-access.png -------------------------------------------------------------------------------- /src/main/webapp/resources/fa/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fa/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/webapp/resources/fa/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fa/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/webapp/resources/images/avatar-profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/avatar-profile.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/avatar/annafali.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/avatar/annafali.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/logo-conflomark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/logo-conflomark.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/logo-poseidon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/logo-poseidon.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/pages/bg-help.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/pages/bg-help.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/fa/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fa/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/webapp/resources/fa/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fa/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/main/webapp/resources/images/avatar/amyelsner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/avatar/amyelsner.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/avatar/xuxuefeng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/avatar/xuxuefeng.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/pages/asset-cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/pages/asset-cover.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/pages/asset-maps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/pages/asset-maps.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/pages/asset-news.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/pages/asset-news.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/pages/help/blog1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/pages/help/blog1.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/pages/help/blog2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/pages/help/blog2.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/pages/help/blog3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/pages/help/blog3.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/blue-band.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/blue-band.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/bracelet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/bracelet.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/lime-band.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/lime-band.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/yoga-mat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/yoga-mat.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/avatar/asiyajavayant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/avatar/asiyajavayant.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/avatar/elwinsharvill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/avatar/elwinsharvill.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/avatar/ionibowcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/avatar/ionibowcher.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/avatar/ivanmagalhaes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/avatar/ivanmagalhaes.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/avatar/onyamalimba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/avatar/onyamalimba.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/avatar/stephenshaw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/avatar/stephenshaw.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/leader-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/leader-1.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/leader-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/leader-2.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/leader-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/leader-3.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/leader-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/leader-4.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/seller-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/seller-1.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/seller-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/seller-2.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/seller-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/seller-3.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/seller-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/seller-4.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/logo-poseidon-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/logo-poseidon-dark.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/pages/avatar-chat-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/pages/avatar-chat-1.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/pages/avatar-chat-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/pages/avatar-chat-2.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/pages/avatar-profil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/pages/avatar-profil.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/bamboo-watch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/bamboo-watch.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/black-watch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/black-watch.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/blue-t-shirt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/blue-t-shirt.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/brown-purse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/brown-purse.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/gaming-set.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/gaming-set.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/grey-t-shirt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/grey-t-shirt.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/headphones.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/headphones.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/pink-purse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/pink-purse.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/purple-band.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/purple-band.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/avatar/bernardodominic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/avatar/bernardodominic.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/avatar-conan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/avatar-conan.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/green-earbuds.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/green-earbuds.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/green-t-shirt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/green-t-shirt.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/mini-speakers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/mini-speakers.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/purple-t-shirt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/purple-t-shirt.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/avatar-dengra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/avatar-dengra.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/image-product-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/image-product-1.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/image-product-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/image-product-2.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/image-product-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/image-product-3.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/image-product-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/image-product-4.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/dashboard/image-product-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/dashboard/image-product-5.png -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/chakra-bracelet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/chakra-bracelet.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/galaxy-earrings.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/galaxy-earrings.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/game-controller.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/game-controller.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/gold-phone-case.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/gold-phone-case.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-300.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-300.eot -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-300.ttf -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-600.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-600.eot -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-600.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-600.ttf -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-700.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-700.eot -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-700.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-700.ttf -------------------------------------------------------------------------------- /src/main/webapp/resources/images/product/purple-gemstone-necklace.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/images/product/purple-gemstone-necklace.jpg -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-300.woff -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-300.woff2 -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-600.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-600.woff -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-600.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-600.woff2 -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-700.woff -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-700.woff2 -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juancondorijara/GitLab_SonarCloud/HEAD/src/main/webapp/resources/fonts/open-sans-v18-latin-ext_latin-regular.woff2 -------------------------------------------------------------------------------- /src/main/java/modelo/TempVta.java: -------------------------------------------------------------------------------- 1 | package modelo; 2 | 3 | import lombok.Data; 4 | @Data 5 | 6 | public class TempVta { 7 | Integer idpro, cantidad, stockPro; 8 | double precio,subTotal; 9 | String nombre, marca, familia, descripcion, proveedor; 10 | 11 | public TempVta() { 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/webapp/resources/fa/fontawesome-webfont.eotbc29.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 400 Bad Request 4 | 5 |

Bad Request

6 |

Your browser sent a request that this server could not understand.
7 |

8 |
9 |
Apache/2.4.18 (Ubuntu) Server at www.primefaces.org Port 443
10 | 11 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache 3 | GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task 4 | sonarcloud-check: 5 | image: maven:3.6.3-jdk-11 6 | cache: 7 | key: "${CI_JOB_NAME}" 8 | paths: 9 | - .sonar/cache 10 | script: 11 | - mvn verify sonar:sonar -Dsonar.projectKey=condorijara_GitLab_SonarCloud 12 | only: 13 | - main 14 | 15 | -------------------------------------------------------------------------------- /src/main/webapp/resources/css/style.css: -------------------------------------------------------------------------------- 1 | .value { 2 | font-weight: bold; 3 | } 4 | .columna1,columna4{ 5 | width: 10%; 6 | font-weight: bold; 7 | color: orangered; 8 | } 9 | 10 | .columna2{ 11 | width: 50%; 12 | font-weight: bold; 13 | color: blue; 14 | } 15 | .columna4{ 16 | width: 6%; 17 | font-weight: bold; 18 | color: blue; 19 | } 20 | 21 | .contPac{ 22 | width: 67%; 23 | } 24 | .contMed{ 25 | width: 70%; 26 | } 27 | 28 | button.ui-button { 29 | margin-right: .5rem; 30 | } -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/glassfish-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Keep a copy of the generated servlet class' java code. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/java/modelo/Familia.java: -------------------------------------------------------------------------------- 1 | package modelo; 2 | 3 | import lombok.Data; 4 | //import lombok.Getter; 5 | //import lombok.Setter; 6 | 7 | @Data 8 | //@Getter 9 | //@Setter 10 | 11 | public class Familia { 12 | 13 | private String CODFAM; 14 | private String NOMFAM; 15 | private String SUBFAM; 16 | 17 | public Familia() { 18 | } 19 | 20 | public Familia(String CODFAM, String NOMFAM, String SUBFAM) { 21 | this.CODFAM = CODFAM; 22 | this.NOMFAM = NOMFAM; 23 | this.SUBFAM = SUBFAM; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/dao/ICRUD.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | // es la implementación de métodos abstractos de diversas familias 4 | import java.util.List; 5 | 6 | public interface ICRUD { 7 | 8 | void registrar(Generic obj) throws Exception; 9 | 10 | void modificar(Generic obj) throws Exception; 11 | 12 | void eliminar(Generic obj) throws Exception; 13 | 14 | void cambiarEstado(Generic obj) throws Exception; 15 | 16 | // void eliminar(int codigo) throws Exception; 17 | 18 | List listarTodos() throws Exception; 19 | 20 | List listarTodos(char estado) throws Exception; 21 | } 22 | -------------------------------------------------------------------------------- /src/main/webapp/resources/css/toggleswitch.css: -------------------------------------------------------------------------------- 1 | .ui-toggleswitch .ui-toggleswitch-slider { 2 | 3 | -moz-transition: background-color 0.3s; 4 | -o-transition: background-color 0.3s; 5 | -webkit-transition: background-color 0.3s; 6 | transition: background-color 0.3s; 7 | border-radius: 30px; 8 | background-color: #72707080; 9 | 10 | } 11 | 12 | .ui-toggleswitch.ui-toggleswitch-checked .ui-toggleswitch-slider { 13 | 14 | background-color: green; 15 | } 16 | 17 | .ui-toggleswitch .ui-toggleswitch-slider::before { 18 | 19 | background-color: #ffffff; 20 | height: 1.250em; 21 | width: 1.250em; 22 | left: .25em; 23 | bottom: .25em; 24 | border-radius: 50%; 25 | -webkit-transition: 0.3s; 26 | transition: 0.3s; 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/main/webapp/vistas/Contenido.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | BIENVENIDOS AL MINIMARKET CONFLOMARK 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/main/webapp/resources/css/default.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #ffffff; 3 | font-size: 12px; 4 | font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; 5 | color: #000000; 6 | margin: 10px; 7 | } 8 | 9 | h1 { 10 | font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; 11 | border-bottom: 1px solid #AFAFAF; 12 | font-size: 16px; 13 | font-weight: bold; 14 | margin: 0px; 15 | padding: 0px; 16 | color: #D20005; 17 | } 18 | 19 | a:link, a:visited { 20 | color: #045491; 21 | font-weight : bold; 22 | text-decoration: none; 23 | } 24 | 25 | a:link:hover, a:visited:hover { 26 | color: #045491; 27 | font-weight : bold; 28 | text-decoration : underline; 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/modelo/Cliente.java: -------------------------------------------------------------------------------- 1 | package modelo; 2 | 3 | import lombok.Data; 4 | //import lombok.Getter; 5 | //import lombok.Setter; 6 | 7 | @Data 8 | //@Getter 9 | //@Setter 10 | 11 | public class Cliente { 12 | 13 | private Integer IDCLI; 14 | private String NOMCLI; 15 | private String APECLI; 16 | private String DIRCLI; 17 | private String CELCLI; 18 | private String CODUBI; 19 | private String ESTCLI; 20 | 21 | public Cliente() { 22 | } 23 | 24 | public Cliente(Integer IDCLI,String NOMCLI,String APECLI,String DIRCLI,String CELCLI,String CODUBI,String ESTCLI) { 25 | this.IDCLI = IDCLI; 26 | this.NOMCLI = NOMCLI; 27 | this.APECLI = APECLI; 28 | this.DIRCLI = DIRCLI; 29 | this.CELCLI = CELCLI; 30 | this.CODUBI = CODUBI; 31 | this.ESTCLI = ESTCLI; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/modelo/Empleado.java: -------------------------------------------------------------------------------- 1 | package modelo; 2 | 3 | import lombok.Data; 4 | //import lombok.Getter; 5 | //import lombok.Setter; 6 | 7 | @Data 8 | //@Getter 9 | //@Setter 10 | 11 | public class Empleado { 12 | 13 | private Integer IDEMP; 14 | private String NOMEMP; 15 | private String APEEMP; 16 | private String DIREMP; 17 | private String DNIEMP; 18 | private String CELEMP; 19 | private String CODUBI; 20 | private String ESTEMP; 21 | 22 | public Empleado() { 23 | } 24 | 25 | public Empleado(Integer IDEMP,String NOMEMP,String APEEMP,String DIREMP,String DNIEMP,String CELEMP,String CODUBI,String ESTEMP) { 26 | this.IDEMP = IDEMP; 27 | this.NOMEMP = NOMEMP; 28 | this.APEEMP = APEEMP; 29 | this.DIREMP = DIREMP; 30 | this.DNIEMP = DNIEMP; 31 | this.CELEMP = CELEMP; 32 | this.CODUBI = CODUBI; 33 | this.ESTEMP = ESTEMP; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/modelo/Proveedor.java: -------------------------------------------------------------------------------- 1 | package modelo; 2 | 3 | import lombok.Data; 4 | //import lombok.Getter; 5 | //import lombok.Setter; 6 | 7 | @Data 8 | //@Getter 9 | //@Setter 10 | 11 | public class Proveedor { 12 | 13 | private String CODPROV; 14 | private String NOMPROV; 15 | private String DIRPROV; 16 | private String CELPROV; 17 | private String RUCPROV; 18 | private String COMPROV; 19 | private String EMAPROV; 20 | private String CODUBI; 21 | private String ESTPROV; 22 | 23 | public Proveedor() { 24 | } 25 | 26 | public Proveedor(String CODPROV,String NOMPROV,String DIRPROV,String CELPROV,String RUCPROV,String COMPROV,String EMAPROV,String CODUBI,String ESTPROV) { 27 | this.CODPROV = CODPROV; 28 | this.NOMPROV = NOMPROV; 29 | this.DIRPROV = DIRPROV; 30 | this.CELPROV = CELPROV; 31 | this.RUCPROV = RUCPROV; 32 | this.COMPROV = COMPROV; 33 | this.EMAPROV = EMAPROV; 34 | this.CODUBI = CODUBI; 35 | this.ESTPROV = ESTPROV; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/modelo/Venta.java: -------------------------------------------------------------------------------- 1 | package modelo; 2 | 3 | import java.util.Date; 4 | import java.util.GregorianCalendar; 5 | import javax.validation.constraints.Future; 6 | import lombok.Data; 7 | //import lombok.Getter; 8 | //import lombok.Setter; 9 | 10 | @Data 11 | //@Getter 12 | //@Setter 13 | 14 | public class Venta { 15 | private Integer IDVEN; 16 | private Date FECVEN = GregorianCalendar.getInstance().getTime(); 17 | private Cliente cliente = new Cliente(); 18 | private Empleado empleado = new Empleado(); 19 | private String IDEMP; 20 | private Double TOTVEN; 21 | private String ESTVEN; 22 | private Boolean TOGGLESWICHT = false; 23 | 24 | public Venta() { 25 | } 26 | 27 | public Venta(Integer IDVEN, Date FECVEN, String IDEMP, Double TOTVEN, String ESTVEN, Cliente cliente, Empleado empleado) { 28 | this.IDVEN = IDVEN; 29 | this.FECVEN = FECVEN; 30 | this.IDEMP = IDEMP; 31 | this.TOTVEN = TOTVEN; 32 | this.ESTVEN = ESTVEN; 33 | this.cliente = cliente; 34 | this.empleado = empleado; 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /src/main/webapp/resources/css/cssLayout.css: -------------------------------------------------------------------------------- 1 | #top { 2 | position: relative; 3 | background-color: #036fab; 4 | color: white; 5 | padding: 5px; 6 | margin: 0px 0px 10px 0px; 7 | } 8 | 9 | #bottom { 10 | position: relative; 11 | background-color: #c2dfef; 12 | padding: 5px; 13 | margin: 10px 0px 0px 0px; 14 | } 15 | 16 | #left { 17 | float: left; 18 | background-color: #ece3a5; 19 | padding: 5px; 20 | width: 150px; 21 | } 22 | 23 | #right { 24 | float: right; 25 | background-color: #ece3a5; 26 | padding: 5px; 27 | width: 150px; 28 | } 29 | 30 | .center_content { 31 | position: relative; 32 | background-color: #dddddd; 33 | padding: 5px; 34 | } 35 | 36 | .left_content { 37 | background-color: #dddddd; 38 | padding: 5px; 39 | margin-left: 170px; 40 | } 41 | 42 | .right_content { 43 | background-color: #dddddd; 44 | padding: 5px; 45 | margin: 0px 170px 0px 170px; 46 | } 47 | 48 | #top a:link, #top a:visited { 49 | color: white; 50 | font-weight : bold; 51 | text-decoration: none; 52 | } 53 | 54 | #top a:link:hover, #top a:visited:hover { 55 | color: black; 56 | font-weight : bold; 57 | text-decoration : underline; 58 | } 59 | 60 | 61 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | javax.faces.PROJECT_STAGE 5 | Development 6 | 7 | 11 | 12 | Faces Servlet 13 | javax.faces.webapp.FacesServlet 14 | 1 15 | 16 | 17 | Faces Servlet 18 | /faces/* 19 | 20 | 21 | 22 | 30 23 | 24 | 25 | 26 | faces/vistas/Contenido.xhtml 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/java/controlador/EmpleadoC.java: -------------------------------------------------------------------------------- 1 | package controlador; 2 | 3 | import dao.EmpleadoImpl; 4 | import modelo.Empleado; 5 | import java.io.Serializable; 6 | import java.sql.SQLException; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import javax.annotation.PostConstruct; 10 | import javax.inject.Named; 11 | //import javax.enterprise.context.Dependent; 12 | import javax.faces.application.FacesMessage; 13 | import javax.faces.context.FacesContext; 14 | 15 | import javax.enterprise.context.SessionScoped; 16 | import lombok.Data; 17 | @Data 18 | 19 | //Notación CDI 20 | @Named(value = "empleadoC") 21 | //@Dependent 22 | @SessionScoped 23 | public class EmpleadoC implements Serializable { 24 | 25 | private Empleado empleado; 26 | private EmpleadoImpl dao; 27 | private List listadoEmpleado; 28 | 29 | public EmpleadoC() { 30 | empleado = new Empleado(); 31 | dao = new EmpleadoImpl(); 32 | listadoEmpleado = new ArrayList<>(); 33 | } 34 | 35 | public void listar() { 36 | try { 37 | listadoEmpleado = dao.listarTodos(); 38 | } catch (Exception e) { 39 | System.out.println("Error en ListarC " + e.getMessage()); 40 | } 41 | } 42 | 43 | @PostConstruct 44 | public void construir() { 45 | listar(); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/controlador/FamiliaC.java: -------------------------------------------------------------------------------- 1 | package controlador; 2 | 3 | import dao.FamiliaImpl; 4 | import modelo.Familia; 5 | import java.io.Serializable; 6 | import java.sql.SQLException; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import javax.annotation.PostConstruct; 10 | import javax.inject.Named; 11 | //import javax.enterprise.context.Dependent; 12 | import javax.faces.application.FacesMessage; 13 | import javax.faces.context.FacesContext; 14 | 15 | import javax.enterprise.context.SessionScoped; 16 | import lombok.Data; 17 | @Data 18 | 19 | //Notación CDI 20 | @Named(value = "familiaC") 21 | //@Dependent 22 | @SessionScoped 23 | public class FamiliaC implements Serializable { 24 | 25 | private Familia familia; 26 | private FamiliaImpl dao; 27 | private List listadoFamilia; 28 | // private String nombre; 29 | 30 | public FamiliaC() { 31 | familia = new Familia(); 32 | dao = new FamiliaImpl(); 33 | listadoFamilia = new ArrayList<>(); 34 | } 35 | 36 | public void listar() { 37 | try { 38 | listadoFamilia = dao.listarTodos(); 39 | } catch (Exception e) { 40 | System.out.println("Error en ListarC " + e.getMessage()); 41 | } 42 | } 43 | 44 | @PostConstruct 45 | public void construir() { 46 | listar(); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/controlador/ProveedorC.java: -------------------------------------------------------------------------------- 1 | package controlador; 2 | 3 | import dao.ProveedorImpl; 4 | import modelo.Proveedor; 5 | import java.io.Serializable; 6 | import java.sql.SQLException; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import javax.annotation.PostConstruct; 10 | import javax.inject.Named; 11 | //import javax.enterprise.context.Dependent; 12 | import javax.faces.application.FacesMessage; 13 | import javax.faces.context.FacesContext; 14 | 15 | import javax.enterprise.context.SessionScoped; 16 | import lombok.Data; 17 | @Data 18 | 19 | //Notación CDI 20 | @Named(value = "proveedorC") 21 | //@Dependent 22 | @SessionScoped 23 | public class ProveedorC implements Serializable { 24 | 25 | private Proveedor proveedor; 26 | private ProveedorImpl dao; 27 | private List listadoProveedor; 28 | 29 | public ProveedorC() { 30 | proveedor = new Proveedor(); 31 | dao = new ProveedorImpl(); 32 | listadoProveedor = new ArrayList<>(); 33 | } 34 | 35 | public void listar() { 36 | try { 37 | listadoProveedor = dao.listarTodos(); 38 | } catch (Exception e) { 39 | System.out.println("Error en ListarC " + e.getMessage()); 40 | } 41 | } 42 | 43 | @PostConstruct 44 | public void construir() { 45 | listar(); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/webapp/resources/images/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | icon-poseidon 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/webapp/resources/js/Calendar.js: -------------------------------------------------------------------------------- 1 | PrimeFaces.locales['es'] = { 2 | closeText: 'Cerrar', 3 | prevText: 'Anterior', 4 | nextText: 'Siguiente', 5 | monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'], 6 | monthNamesShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'], 7 | dayNames: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'], 8 | dayNamesShort: ['Dom', 'Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab'], 9 | dayNamesMin: ['D', 'L', 'M', 'X', 'J', 'V', 'S'], 10 | weekHeader: 'Semana', 11 | firstDay: 1, 12 | isRTL: false, 13 | showMonthAfterYear: false, 14 | yearSuffix: '', 15 | timeOnlyTitle: 'Sólo hora', 16 | timeText: 'Tiempo', 17 | hourText: 'Hora', 18 | minuteText: 'Minuto', 19 | secondText: 'Segundo', 20 | currentText: 'Fecha actual', 21 | ampm: false, 22 | month: 'Mes', 23 | week: 'Semana', 24 | day: 'Día', 25 | allDayText: 'Todo el día', 26 | today: 'Hoy', 27 | clear: 'Claro' 28 | } 29 | // 10) ? '#81C784' : 'inherit') + ';border-radius:50%;width: 2.5rem;height: 2.5rem;line-height: 2.5rem;display: flex;align-items: center;justify-content: center;">' + date.day + ''; 32 | } 33 | 34 | //]]> 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/main/java/servicios/ReporteS.java: -------------------------------------------------------------------------------- 1 | package servicios; 2 | 3 | import dao.Conexion; 4 | import java.io.File; 5 | import java.io.IOException; 6 | import java.util.Map; 7 | import javax.faces.context.FacesContext; 8 | import javax.servlet.ServletOutputStream; 9 | import javax.servlet.http.HttpServletResponse; 10 | import net.sf.jasperreports.engine.JRException; 11 | import net.sf.jasperreports.engine.JasperExportManager; 12 | import net.sf.jasperreports.engine.JasperFillManager; 13 | import net.sf.jasperreports.engine.JasperPrint; 14 | 15 | public class ReporteS extends Conexion { 16 | 17 | public void exportarPDFGlobal(Map parameters, String url, String nomPDF) throws JRException, IOException, Exception { 18 | this.conectar(); 19 | File jasper = new File(FacesContext.getCurrentInstance().getExternalContext().getRealPath("reportes/" + url + "")); 20 | JasperPrint jasperPrint = JasperFillManager.fillReport(jasper.getPath(), parameters, this.getCn()); 21 | HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse(); 22 | response.addHeader("Content-disposition", "attachment; filename=" + nomPDF + ""); 23 | ServletOutputStream stream = response.getOutputStream(); 24 | JasperExportManager.exportReportToPdfStream(jasperPrint, stream); 25 | stream.flush(); 26 | stream.close(); 27 | FacesContext.getCurrentInstance().responseComplete(); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/modelo/VentaDetalle.java: -------------------------------------------------------------------------------- 1 | package modelo; 2 | 3 | //import java.util.Date; 4 | import lombok.Data; 5 | //import lombok.Getter; 6 | //import lombok.Setter; 7 | 8 | @Data 9 | //@Getter 10 | //@Setter 11 | 12 | public class VentaDetalle { 13 | 14 | private Integer CANVENDET = 1; 15 | private Double PREVENDET; 16 | private int IDPRO; 17 | private String NOMPRO; 18 | private Double PREPRO; //extra 19 | private int IDVEN; 20 | private String NOMCLI; 21 | private Producto producto = new Producto(); 22 | private Venta venta = new Venta(); 23 | private String ESTVENDET; 24 | 25 | public VentaDetalle() { 26 | } 27 | 28 | public VentaDetalle(int CANVENDET, Double PREVENDET, Double PREPRO, int IDPRO, int IDVEN, Producto producto, Venta venta, String NOMPRO, String NOMCLI, String ESTVENDET) { 29 | this.CANVENDET = CANVENDET; 30 | this.PREVENDET = PREVENDET; 31 | this.IDPRO = IDPRO; 32 | this.NOMPRO = NOMPRO; 33 | this.PREPRO = PREPRO; 34 | this.IDVEN = IDVEN; 35 | this.NOMCLI = NOMCLI; 36 | this.producto = producto; 37 | this.venta = venta; 38 | this.ESTVENDET = ESTVENDET; 39 | } 40 | 41 | @Override 42 | public String toString() { 43 | return "VentaDetalle{" + "CANVENDET=" + CANVENDET + ", PREVENDET=" + PREVENDET + ", IDPRO=" + IDPRO + ", NOMPRO=" + PREPRO + ", PREPRO=" + NOMPRO + ", IDVEN=" + IDVEN + ", producto=" + producto + ",ESTVENDET=" + ESTVENDET + ", venta=" + venta + '}'; 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /src/main/java/modelo/Producto.java: -------------------------------------------------------------------------------- 1 | package modelo; 2 | 3 | //import java.sql.Date; 4 | import java.util.Date; 5 | import lombok.Data; 6 | //import lombok.Getter; 7 | //import lombok.Setter; 8 | 9 | @Data 10 | //@Getter 11 | //@Setter 12 | 13 | public class Producto { 14 | 15 | private Integer IDPRO; 16 | private String NOMPRO; 17 | private String MARPRO; 18 | private Familia familia = new Familia(); 19 | private String CODFAM; 20 | private String DESPRO; 21 | private Double PREPRO; 22 | private Integer STOPRO; 23 | private Date VENPRO; 24 | private String CODPROV; 25 | private String ESTPRO; 26 | 27 | public Producto() { 28 | } 29 | 30 | public Producto(Integer IDPRO,String NOMPRO,String MARPRO,Familia familia,String CODFAM,String DESPRO,Double PREPRO,Integer STOPRO,Date VENPRO,String CODPROV,String ESTPRO) { 31 | this.IDPRO = IDPRO; 32 | this.NOMPRO = NOMPRO; 33 | this.MARPRO = MARPRO; 34 | this.familia = familia; 35 | this.CODFAM = CODFAM; 36 | this.DESPRO = DESPRO; 37 | this.PREPRO = PREPRO; 38 | this.STOPRO = STOPRO; 39 | this.VENPRO = VENPRO; 40 | this.CODPROV = CODPROV; 41 | this.ESTPRO = ESTPRO; 42 | } 43 | 44 | @Override 45 | public String toString() { 46 | return "Producto{" + "IDPRO=" + IDPRO + ",NOMPRO=" + NOMPRO + ",MARPRO=" + MARPRO + ",CODFAM=" + CODFAM + ",DESPRO=" + DESPRO + ",PREPRO=" + PREPRO + ",STOPRO=" + STOPRO + ",VENPRO=" + VENPRO + ",CODPROV=" + CODPROV + ",ESTPRO=" + ESTPRO + '}'; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/dao/Conexion.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import java.io.InputStream; 4 | import java.sql.Connection; 5 | import java.sql.DriverManager; 6 | import javax.swing.JOptionPane; 7 | //import java.util.Properties; 8 | 9 | public class Conexion { 10 | 11 | public static Connection cnx = null; 12 | 13 | public static Connection conectar() throws Exception { 14 | try { 15 | // String user = "conflomark"; 16 | // String pwd = "mark12345-"; 17 | // String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; 18 | // String url = "jdbc:sqlserver://conflomark.database.windows.net:1433;databaseName=dbconflomark"; 19 | String user = "sa"; 20 | String pwd = "12345"; 21 | String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; 22 | String url = "jdbc:sqlserver://localhost:1433;databaseName=dbCONFLOMARK"; 23 | Class.forName(driver).newInstance(); 24 | cnx = DriverManager.getConnection(url, user, pwd); 25 | } catch (Exception e) { 26 | JOptionPane.showMessageDialog(null, "Error de conexión, revisa"); 27 | System.out.println("Error de conexion " + e.getMessage()); 28 | } 29 | return cnx; 30 | } 31 | 32 | public void cerrar() throws Exception { 33 | if (cnx != null) { 34 | cnx.close(); 35 | } 36 | } 37 | 38 | public static void main(String[] args) throws Exception { 39 | conectar(); 40 | if (cnx != null) { 41 | System.out.println("CONECTADO"); 42 | } else { 43 | System.out.println("SIN CONEXIÓN REVISA..."); 44 | } 45 | } 46 | 47 | public Connection getCn() { 48 | return cnx; 49 | } 50 | 51 | public void setCn(Connection cnx) { 52 | this.cnx = cnx; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /nbactions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | run 5 | 6 | war 7 | ear 8 | ejb 9 | 10 | 11 | package 12 | 13 | 14 | true 15 | 16 | 17 | 18 | 19 | debug 20 | 21 | war 22 | ear 23 | ejb 24 | 25 | 26 | package 27 | 28 | 29 | true 30 | true 31 | 32 | 33 | 34 | 35 | profile 36 | 37 | ejb 38 | ear 39 | war 40 | 41 | 42 | package 43 | 44 | 45 | true 46 | true 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # **GitLab con Sonarcloud** 2 | Pipeline en GitLab con Sonarcloud en la arquitectura monolítica utilizando un proyecto Maven 3 | 4 | ## **Requisitos Previos** 5 | 6 | - __[Tener una cuenta GitHub](https://github.com/)__ 7 | - __[Tener una cuenta GitLab](https://gitlab.com/)__ 8 | - **Tener un repositorio con un proyecto maven en GitHub** 9 | 10 | ## **Pasos GitLab con Sonarcloud** 11 | 12 | - Crear un grupo en GitLab e importar un repositorio de GitHub 13 | 14 | ![](imagenes/1.png) 15 | ![](imagenes/2.png) 16 | ![](imagenes/3.png) 17 | ![](imagenes/4.png) 18 | ![](imagenes/5.png) 19 | ![](imagenes/6.png) 20 | ![](imagenes/7.png) 21 | ![](imagenes/8.png) 22 | ![](imagenes/9.png) 23 | 24 | - Iniciar sesión en [Sonarcloud](https://sonarcloud.io/login?utm_medium=social&utm_source=youtube&utm_campaign=code-quality&utm_content=onboardingvideo) con GitLab y crear una organización con el grupo de GitLab 25 | 26 | ![](imagenes/10.png) 27 | ![](imagenes/11.png) 28 | ![](imagenes/12.png) 29 | ![](imagenes/13.png) 30 | ![](imagenes/14.png) 31 | ![](imagenes/15.png) 32 | ![](imagenes/16.png) 33 | 34 | - Analizar un proyecto en Sonarcloud con la organización creada 35 | 36 | ![](imagenes/17.png) 37 | ![](imagenes/18.png) 38 | ![](imagenes/19.png) 39 | ![](imagenes/20.png) 40 | ![](imagenes/21.png) 41 | ![](imagenes/22.png) 42 | ![](imagenes/23.png) 43 | ![](imagenes/24.png) 44 | ![](imagenes/25.png) 45 | ![](imagenes/26.png) 46 | ![](imagenes/27.png) 47 | ![](imagenes/28.png) 48 | ![](imagenes/29.png) 49 | ![](imagenes/30.png) 50 | ![](imagenes/31.png) 51 | ![](imagenes/32.png) 52 | ![](imagenes/33.png) 53 | ![](imagenes/34.png) 54 | ![](imagenes/35.png) 55 | ![](imagenes/36.png) 56 | 57 | ## **Bibliografía** 58 | 59 | - __[Youtube - Configuración de Sonarcloud con Gitlab](https://www.youtube.com/watch?v=fgccjdFqPZA&t=533s)__ 60 | 61 | - __[Guía - Cómo instalar SonarCloud para GitLab](https://taledev.com/how-to-install-sonarcloud-for-gitlab/)__ 62 | 63 | - __[Guía - Analice su repositorio con GitLab CI](https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/gitlab-ci/)__ 64 | -------------------------------------------------------------------------------- /nb-configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 17 | 1.7-web 18 | gfv3ee6 19 | Facelets 20 | /less:/css 21 | false 22 | false 23 | 24 | 25 | /scss:/css 26 | js/libs 27 | true 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/main/java/dao/FamiliaImpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | //import com.mysql.jdbc.PreparedStatement; 4 | import java.sql.PreparedStatement; 5 | import java.util.List; 6 | import modelo.Familia; 7 | import java.sql.ResultSet; 8 | import java.sql.Statement; 9 | import java.util.ArrayList; 10 | 11 | import java.sql.SQLException; 12 | 13 | public class FamiliaImpl extends Conexion implements ICRUD { 14 | 15 | @Override 16 | public List listarTodos() throws Exception { 17 | List listado = null; 18 | Familia familia; 19 | String sql = "select * from FAMILIA"; 20 | try { 21 | listado = new ArrayList(); 22 | Statement st = this.conectar().createStatement(); 23 | ResultSet rs = st.executeQuery(sql); 24 | while (rs.next()) { 25 | familia = new Familia(); 26 | familia.setCODFAM(rs.getString("CODFAM")); 27 | familia.setNOMFAM(rs.getString("NOMFAM")); 28 | familia.setSUBFAM(rs.getString("SUBFAM")); 29 | listado.add(familia); 30 | } 31 | rs.close(); 32 | st.close(); 33 | } catch (Exception e) { 34 | System.out.println("Error en ListarTodosD" + e.getMessage()); 35 | } finally { 36 | this.cerrar(); 37 | } 38 | return listado; 39 | } 40 | 41 | @Override 42 | public void registrar(Familia obj) throws Exception { 43 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 44 | } 45 | 46 | @Override 47 | public void modificar(Familia obj) throws Exception { 48 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 49 | } 50 | 51 | @Override 52 | public void eliminar(Familia obj) throws Exception { 53 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 54 | } 55 | 56 | @Override 57 | public void cambiarEstado(Familia obj) throws Exception { 58 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 59 | } 60 | 61 | @Override 62 | public List listarTodos(char estado) throws Exception { 63 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/dao/EmpleadoImpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | //import com.mysql.jdbc.PreparedStatement; 4 | import java.sql.PreparedStatement; 5 | import java.util.List; 6 | import modelo.Empleado; 7 | import java.sql.ResultSet; 8 | import java.sql.Statement; 9 | import java.util.ArrayList; 10 | 11 | import java.sql.SQLException; 12 | 13 | public class EmpleadoImpl extends Conexion implements ICRUD { 14 | 15 | @Override 16 | public List listarTodos() throws Exception { 17 | List listado = null; 18 | Empleado empleado; 19 | String sql = "select * from EMPLEADO where ESTEMP='A' order by IDEMP desc"; 20 | try { 21 | listado = new ArrayList(); 22 | Statement st = this.conectar().createStatement(); 23 | ResultSet rs = st.executeQuery(sql); 24 | while (rs.next()) { 25 | empleado = new Empleado(); 26 | empleado.setIDEMP(rs.getInt("IDEMP")); 27 | empleado.setNOMEMP(rs.getString("NOMEMP")); 28 | empleado.setAPEEMP(rs.getString("APEEMP")); 29 | empleado.setDIREMP(rs.getString("DIREMP")); 30 | empleado.setDNIEMP(rs.getString("DNIEMP")); 31 | empleado.setCELEMP(rs.getString("CELEMP")); 32 | empleado.setCODUBI(rs.getString("CODUBI")); 33 | listado.add(empleado); 34 | } 35 | rs.close(); 36 | st.close(); 37 | } catch (Exception e) { 38 | System.out.println("Error en ListarTodosD" + e.getMessage()); 39 | } finally { 40 | this.cerrar(); 41 | } 42 | return listado; 43 | } 44 | 45 | @Override 46 | public void registrar(Empleado obj) throws Exception { 47 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 48 | } 49 | 50 | @Override 51 | public void modificar(Empleado obj) throws Exception { 52 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 53 | } 54 | 55 | @Override 56 | public void eliminar(Empleado obj) throws Exception { 57 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 58 | } 59 | 60 | @Override 61 | public void cambiarEstado(Empleado obj) throws Exception { 62 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 63 | } 64 | 65 | @Override 66 | public List listarTodos(char estado) throws Exception { 67 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/dao/ProveedorImpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | //import com.mysql.jdbc.PreparedStatement; 4 | import java.sql.PreparedStatement; 5 | import java.util.List; 6 | import modelo.Proveedor; 7 | import java.sql.ResultSet; 8 | import java.sql.Statement; 9 | import java.util.ArrayList; 10 | 11 | import java.sql.SQLException; 12 | 13 | public class ProveedorImpl extends Conexion implements ICRUD { 14 | 15 | @Override 16 | public List listarTodos() throws Exception { 17 | List listado = null; 18 | Proveedor proveedor; 19 | String sql = "select * from PROVEEDOR where ESTPROV='A' order by CODPROV desc"; 20 | try { 21 | listado = new ArrayList(); 22 | Statement st = this.conectar().createStatement(); 23 | ResultSet rs = st.executeQuery(sql); 24 | while (rs.next()) { 25 | proveedor = new Proveedor(); 26 | proveedor.setCODPROV(rs.getString("CODPROV")); 27 | proveedor.setNOMPROV(rs.getString("NOMPROV")); 28 | proveedor.setDIRPROV(rs.getString("DIRPROV")); 29 | proveedor.setCELPROV(rs.getString("CELPROV")); 30 | proveedor.setRUCPROV(rs.getString("RUCPROV")); 31 | proveedor.setCOMPROV(rs.getString("COMPROV")); 32 | proveedor.setEMAPROV(rs.getString("EMAPROV")); 33 | proveedor.setCODUBI(rs.getString("CODUBI")); 34 | listado.add(proveedor); 35 | } 36 | rs.close(); 37 | st.close(); 38 | } catch (Exception e) { 39 | System.out.println("Error en ListarTodosD" + e.getMessage()); 40 | } finally { 41 | this.cerrar(); 42 | } 43 | return listado; 44 | } 45 | 46 | @Override 47 | public void registrar(Proveedor obj) throws Exception { 48 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 49 | } 50 | 51 | @Override 52 | public void modificar(Proveedor obj) throws Exception { 53 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 54 | } 55 | 56 | @Override 57 | public void eliminar(Proveedor obj) throws Exception { 58 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 59 | } 60 | 61 | @Override 62 | public void cambiarEstado(Proveedor obj) throws Exception { 63 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 64 | } 65 | 66 | @Override 67 | public List listarTodos(char estado) throws Exception { 68 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /src/main/webapp/resources/images/landing/code.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | features 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/java/controlador/ClienteC.java: -------------------------------------------------------------------------------- 1 | package controlador; 2 | 3 | import dao.ClienteImpl; 4 | import modelo.Cliente; 5 | import java.io.Serializable; 6 | import java.sql.SQLException; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import javax.annotation.PostConstruct; 10 | import javax.inject.Named; 11 | //import javax.enterprise.context.Dependent; 12 | import javax.faces.application.FacesMessage; 13 | import javax.faces.context.FacesContext; 14 | 15 | import javax.enterprise.context.SessionScoped; 16 | 17 | //Notación CDI 18 | @Named(value = "clienteC") 19 | //@Dependent 20 | @SessionScoped 21 | public class ClienteC implements Serializable { 22 | 23 | private Cliente cliente; 24 | private ClienteImpl dao; 25 | private List listadoCliente; 26 | private String nombre; 27 | 28 | public ClienteC() { 29 | cliente = new Cliente(); 30 | dao = new ClienteImpl(); 31 | listadoCliente = new ArrayList<>(); 32 | } 33 | 34 | public void registrar() throws Exception { 35 | try { 36 | cliente.setCODUBI(dao.obtenerCodigoUbigeo(cliente.getCODUBI())); 37 | dao.registrar(cliente); 38 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "OK", "Registrado con Exito")); 39 | limpiar(); 40 | listar(); 41 | } catch (Exception e) { 42 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "ERROR", "Falta Completar Datos")); 43 | System.out.println("Error en RegistrarC " + e.getMessage()); 44 | } 45 | } 46 | 47 | public void modificar() throws Exception { 48 | try { 49 | cliente.setCODUBI(dao.obtenerCodigoUbigeo(cliente.getCODUBI())); 50 | dao.modificar(cliente); 51 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "OK", "Modificado con éxito")); 52 | limpiar(); 53 | listar(); 54 | } catch (Exception e) { 55 | System.out.println("Error en ModificarC " + e.getMessage()); 56 | } 57 | } 58 | 59 | public void eliminar(Cliente cliente) throws Exception { 60 | try { 61 | dao.eliminar(cliente); 62 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "OK", "Eliminado con éxito")); 63 | limpiar(); 64 | listar(); 65 | } catch (Exception e) { 66 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "ERROR", "Al Eliminar")); 67 | System.out.println("Error en EliminarC " + e.getMessage()); 68 | } 69 | } 70 | 71 | public void eliminarEstado() throws Exception { 72 | try { 73 | dao.EliminarEstado(cliente); 74 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "OK", "Eliminado con éxito")); 75 | limpiar(); 76 | listar(); 77 | } catch (Exception e) { 78 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "ERROR", "Al Eliminar")); 79 | System.out.println("Error en eliminarEstadoC " + e.getMessage()); 80 | } 81 | } 82 | 83 | public void restaurarEstado(Cliente cliente) throws Exception { 84 | try { 85 | dao.RestaurarEstado(cliente); 86 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "OK", "Restaurado con Exito")); 87 | limpiar(); 88 | listar(); 89 | } catch (Exception e) { 90 | System.out.println("Error en restaurarEstadoC " + e.getMessage()); 91 | } 92 | } 93 | 94 | public List completeTextUbigeo(String query) throws SQLException, Exception { 95 | ClienteImpl daoUbigeo = new ClienteImpl(); 96 | return daoUbigeo.autocompleteUbigeo(query); 97 | } 98 | 99 | public void limpiar() { 100 | // FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "OK", "Limpiado")); 101 | this.cliente = new Cliente(); 102 | } 103 | 104 | public void limpia() throws Exception { 105 | try { 106 | // FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "OK", "Limpiado")); 107 | this.cliente.setNOMCLI(""); 108 | this.cliente.setAPECLI(""); 109 | this.cliente.setDIRCLI(""); 110 | this.cliente.setCELCLI(""); 111 | this.cliente.setCODUBI(""); 112 | } catch (Exception e) { 113 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "ERROR", "Al limpiar")); 114 | System.out.println("Error en limpiaC " + e.getMessage()); 115 | } 116 | } 117 | 118 | public void listar() { 119 | try { 120 | listadoCliente = dao.listarTodos(); 121 | } catch (Exception e) { 122 | System.out.println("Error en ListarC " + e.getMessage()); 123 | } 124 | } 125 | 126 | @PostConstruct 127 | public void construir() { 128 | listar(); 129 | } 130 | 131 | // Getter y Setter 132 | 133 | public Cliente getCliente() { 134 | return cliente; 135 | } 136 | 137 | public void setCliente(Cliente cliente) { 138 | this.cliente = cliente; 139 | } 140 | 141 | public ClienteImpl getDao() { 142 | return dao; 143 | } 144 | 145 | public void setDao(ClienteImpl dao) { 146 | this.dao = dao; 147 | } 148 | 149 | public List getListadoCliente() { 150 | return listadoCliente; 151 | } 152 | 153 | public void setListadoCliente(List listadoCliente) { 154 | this.listadoCliente = listadoCliente; 155 | } 156 | 157 | public String getNombre() { 158 | return nombre; 159 | } 160 | 161 | public void setNombre(String nombre) { 162 | this.nombre = nombre; 163 | } 164 | 165 | } 166 | -------------------------------------------------------------------------------- /src/main/webapp/resources/images/landing/responsive.svg: -------------------------------------------------------------------------------- 1 | progressive_app -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.mycompany 6 | Conflomark_Maven 7 | 1.0-SNAPSHOT 8 | war 9 | 10 | Conflomark_Maven 11 | 12 | 13 | ${project.build.directory}/endorsed 14 | UTF-8 15 | condorijara 16 | 17 | 18 | 19 | 20 | 25 | 26 | org.primefaces 27 | primefaces 28 | 10.0.0 29 | 30 | 31 | javax 32 | javaee-web-api 33 | 7.0 34 | provided 35 | 36 | 37 | com.microsoft.sqlserver 38 | mssql-jdbc 39 | 9.2.1.jre8 40 | 41 | 42 | mysql 43 | mysql-connector-java 44 | 5.1.48 45 | 46 | 47 | com.lowagie 48 | itext 49 | 2.1.7 50 | 51 | 52 | org.apache.poi 53 | poi 54 | 4.1.2 55 | 56 | 57 | org.apache.poi 58 | poi-ooxml 59 | 4.1.2 60 | jar 61 | 62 | 63 | commons-codec 64 | commons-codec 65 | 1.13 66 | 67 | 68 | net.sf.jasperreports 69 | jasperreports 70 | 6.17.0 71 | 72 | 73 | net.sf.jasperreports 74 | jasperreports-fonts 75 | 6.17.0 76 | 77 | 78 | org.codehaus.groovy 79 | groovy-all 80 | 2.4.10 81 | 82 | 83 | org.projectlombok 84 | lombok 85 | 1.18.20 86 | provided 87 | 88 | 89 | 90 | 91 | 92 | 93 | org.apache.maven.plugins 94 | maven-compiler-plugin 95 | 3.1 96 | 97 | 1.7 98 | 1.7 99 | 100 | ${endorsed.dir} 101 | 102 | 103 | 104 | 105 | org.apache.maven.plugins 106 | maven-war-plugin 107 | 2.3 108 | 109 | false 110 | 111 | 112 | 113 | org.apache.maven.plugins 114 | maven-dependency-plugin 115 | 2.6 116 | 117 | 118 | validate 119 | 120 | copy 121 | 122 | 123 | ${endorsed.dir} 124 | true 125 | 126 | 127 | javax 128 | javaee-endorsed-api 129 | 7.0 130 | jar 131 | 132 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | http://repository.primefaces.org/ 148 | PrimeFaces-maven-lib 149 | default 150 | Repository for library PrimeFaces-maven-lib 151 | 152 | 153 | 154 | -------------------------------------------------------------------------------- /src/main/java/controlador/ProductoC.java: -------------------------------------------------------------------------------- 1 | package controlador; 2 | 3 | import dao.ProductoImpl; 4 | import modelo.Producto; 5 | import modelo.Familia; 6 | import servicios.ReporteS; 7 | import java.io.Serializable; 8 | import java.util.List; 9 | import javax.inject.Named; 10 | import java.sql.SQLException; 11 | import java.util.ArrayList; 12 | import javax.annotation.PostConstruct; 13 | import javax.enterprise.context.Dependent; 14 | import javax.faces.application.FacesMessage; 15 | import javax.faces.context.FacesContext; 16 | import java.util.Map; 17 | import java.util.HashMap; 18 | import java.util.logging.Level; 19 | import java.util.logging.Logger; 20 | 21 | import javax.enterprise.context.SessionScoped; 22 | 23 | //Notación CDI 24 | @Named(value = "productoC") 25 | //@Dependent 26 | @SessionScoped 27 | public class ProductoC implements Serializable{ 28 | 29 | private Familia familia; 30 | private Producto producto; 31 | private ProductoImpl dao; 32 | private List listadoProducto; 33 | 34 | public ProductoC() { 35 | producto = new Producto(); 36 | dao = new ProductoImpl(); 37 | familia = new Familia(); 38 | listadoProducto = new ArrayList<>(); 39 | } 40 | 41 | public void registrar() throws Exception{ 42 | try { 43 | // producto.setCODFAM(dao.obtenerCodigoFamilia(producto.getCODFAM())); 44 | // producto.setCODPROV(dao.obtenerCodigoProveeedor(producto.getCODPROV())); 45 | dao.registrar(producto); 46 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "OK", "Registrado con Exito")); 47 | limpiar(); 48 | listar(); 49 | } catch (Exception e) { 50 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "ERROR", "Falta Completar Datos")); 51 | System.out.println("Error en registrarC " + e.getMessage()); 52 | } 53 | } 54 | 55 | public void modificar() throws Exception { 56 | try { 57 | // producto.setCODFAM(dao.obtenerCodigoFamilia(producto.getCODFAM())); 58 | // producto.setCODPROV(dao.obtenerCodigoProveeedor(producto.getCODPROV())); 59 | dao.modificar(producto); 60 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "OK", "Modificado con éxito")); 61 | limpiar(); 62 | listar(); 63 | } catch (Exception e) { 64 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "ERROR", "Al Modificar")); 65 | System.out.println("Error en modificarC " + e.getMessage()); 66 | } 67 | } 68 | 69 | public void eliminar(Producto producto) throws Exception{ 70 | try { 71 | dao.eliminar(producto); 72 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "OK", "Eliminado con éxito")); 73 | limpiar(); 74 | listar(); 75 | } catch (Exception e) { 76 | System.out.println("Error en eliminarC " + e.getMessage()); 77 | } 78 | } 79 | 80 | public void eliminarEstado() throws Exception{ 81 | try { 82 | dao.EliminarEstado(producto); 83 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "OK", "Eliminado con éxito")); 84 | limpiar(); 85 | listar(); 86 | } catch (Exception e) { 87 | System.out.println("Error en eliminarEstadoC " + e.getMessage()); 88 | } 89 | } 90 | 91 | public void restaurarEstado(Producto producto) throws Exception{ 92 | try { 93 | dao.RestaurarEstado(producto); 94 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "OK", "Restaurado con Exito")); 95 | limpiar(); 96 | listar(); 97 | } catch (Exception e) { 98 | System.out.println("Error en restaurarEstadoC " + e.getMessage()); 99 | } 100 | } 101 | 102 | public List completeTextFamilia(String query) throws SQLException, Exception { 103 | ProductoImpl daoFamilia = new ProductoImpl(); 104 | return daoFamilia.autocompleteFamilia(query); 105 | } 106 | 107 | public List completeTextProveedor(String query) throws SQLException, Exception { 108 | ProductoImpl daoProveedor = new ProductoImpl(); 109 | return daoProveedor.autocompleteProveedor(query); 110 | } 111 | 112 | public void limpiar(){ 113 | producto = new Producto(); 114 | } 115 | 116 | public void listar(){ 117 | try { 118 | listadoProducto = dao.listarTodos(); 119 | } catch (Exception e) { 120 | System.out.println("Error en listarC " + e.getMessage()); 121 | } 122 | } 123 | 124 | public void reporteProducto() throws Exception { 125 | ReporteS report = new ReporteS(); 126 | try { 127 | Map parameters = new HashMap(); 128 | report.exportarPDFGlobal(parameters, "Producto.jasper", "Reporte de Productos (15-07-2021).pdf"); 129 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "PDF GENERADO", null)); 130 | } catch (Exception e) { 131 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "ERROR AL GENERAR PDF", null)); 132 | throw e; 133 | } 134 | } 135 | 136 | @PostConstruct 137 | public void construir() { 138 | listar(); 139 | } 140 | 141 | // Getter y Setter 142 | 143 | public Familia getFamilia() { 144 | return familia; 145 | } 146 | 147 | public void setFamilia(Familia familia) { 148 | this.familia = familia; 149 | } 150 | 151 | public Producto getProducto() { 152 | return producto; 153 | } 154 | 155 | public void setProducto(Producto producto) { 156 | this.producto = producto; 157 | } 158 | 159 | public ProductoImpl getDao() { 160 | return dao; 161 | } 162 | 163 | public void setDao(ProductoImpl dao) { 164 | this.dao = dao; 165 | } 166 | 167 | public List getListadoProducto() { 168 | return listadoProducto; 169 | } 170 | 171 | public void setListadoProducto(List listadoProducto) { 172 | this.listadoProducto = listadoProducto; 173 | } 174 | 175 | } 176 | -------------------------------------------------------------------------------- /src/main/java/dao/ClienteImpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | //import com.mysql.jdbc.PreparedStatement; 4 | import java.sql.PreparedStatement; 5 | import java.util.List; 6 | import modelo.Cliente; 7 | import java.sql.ResultSet; 8 | import java.sql.Statement; 9 | import java.util.ArrayList; 10 | 11 | import java.sql.SQLException; 12 | 13 | public class ClienteImpl extends Conexion implements ICRUD { 14 | 15 | @Override 16 | public void registrar(Cliente cliente) throws Exception { 17 | String sql = "insert into CLIENTE (NOMCLI, APECLI, DIRCLI, CELCLI, CODUBI, ESTCLI) values (?,?,?,?,?,?)"; 18 | try { 19 | PreparedStatement ps = this.conectar().prepareStatement(sql); 20 | ps.setString(1, cliente.getNOMCLI()); 21 | ps.setString(2, cliente.getAPECLI()); 22 | ps.setString(3, cliente.getDIRCLI()); 23 | ps.setString(4, cliente.getCELCLI()); 24 | ps.setString(5, cliente.getCODUBI()); 25 | ps.setString(6, "A"); 26 | ps.executeUpdate(); 27 | ps.close(); 28 | } catch (Exception e) { 29 | System.out.println("Error en RegistrarD " + e.getMessage()); 30 | } finally { 31 | this.cerrar(); 32 | } 33 | } 34 | 35 | @Override 36 | public void modificar(Cliente cliente) throws Exception { 37 | String sql = "update CLIENTE set NOMCLI=?, APECLI=?, DIRCLI=?, CELCLI=?, CODUBI=?, ESTCLI=? where IDCLI=? "; 38 | try { 39 | PreparedStatement ps = this.conectar().prepareStatement(sql); 40 | ps.setString(1, cliente.getNOMCLI()); 41 | ps.setString(2, cliente.getAPECLI()); 42 | ps.setString(3, cliente.getDIRCLI()); 43 | ps.setString(4, cliente.getCELCLI()); 44 | ps.setString(5, cliente.getCODUBI()); 45 | ps.setString(6, "A"); 46 | ps.setInt(7, cliente.getIDCLI()); 47 | ps.executeUpdate(); 48 | ps.close(); 49 | } catch (Exception e) { 50 | System.out.println("Error en ModificarD " + e.getMessage()); 51 | } finally { 52 | this.cerrar(); 53 | } 54 | } 55 | 56 | @Override 57 | public void eliminar(Cliente cliente) throws Exception { 58 | String sql = "delete from CLIENTE where IDCLI=? "; 59 | try { 60 | PreparedStatement ps = this.conectar().prepareStatement(sql); 61 | ps.setInt(1, cliente.getIDCLI()); 62 | ps.executeUpdate(); 63 | ps.close(); 64 | } catch (Exception e) { 65 | System.out.println("Error en EliminarD " + e.getMessage()); 66 | } finally { 67 | this.cerrar(); 68 | } 69 | } 70 | 71 | 72 | // @Override 73 | // public List listarTodos() throws Exception { 74 | // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 75 | // } 76 | 77 | 78 | @Override 79 | public List listarTodos() throws Exception { 80 | List listado = null; 81 | Cliente cliente; 82 | // String sql = "select * from CLIENTE"; 83 | String sql = "select * from CLIENTE where ESTCLI='A' order by IDCLI desc"; 84 | try { 85 | listado = new ArrayList(); 86 | Statement st = this.conectar().createStatement(); 87 | ResultSet rs = st.executeQuery(sql); 88 | while (rs.next()) { 89 | cliente = new Cliente(); 90 | cliente.setIDCLI(rs.getInt("IDCLI")); 91 | cliente.setNOMCLI(rs.getString("NOMCLI")); 92 | cliente.setAPECLI(rs.getString("APECLI")); 93 | cliente.setDIRCLI(rs.getString("DIRCLI")); 94 | cliente.setCELCLI(rs.getString("CELCLI")); 95 | cliente.setCODUBI(rs.getString("CODUBI")); 96 | listado.add(cliente); 97 | } 98 | rs.close(); 99 | st.close(); 100 | } catch (Exception e) { 101 | System.out.println("Error en ListarTodosD" + e.getMessage()); 102 | } finally { 103 | this.cerrar(); 104 | } 105 | return listado; 106 | } 107 | 108 | public void EliminarEstado(Cliente cliente) throws Exception { 109 | String sql = "update CLIENTE set ESTCLI=? where IDCLI=? "; 110 | try { 111 | PreparedStatement ps = this.conectar().prepareStatement(sql); 112 | ps.setString(1, "I"); 113 | ps.setInt(2, cliente.getIDCLI()); 114 | ps.executeUpdate(); 115 | ps.close(); 116 | } catch (Exception e) { 117 | System.out.println("Error en EliminarEstadoD " + e.getMessage()); 118 | } finally { 119 | this.cerrar(); 120 | } 121 | } 122 | 123 | public void RestaurarEstado(Cliente cliente) throws Exception { 124 | String sql = "update CLIENTE set ESTCLI=? where IDCLI=? "; 125 | try { 126 | PreparedStatement ps = this.conectar().prepareStatement(sql); 127 | ps.setString(1, "A"); 128 | ps.setInt(2, cliente.getIDCLI()); 129 | ps.executeUpdate(); 130 | ps.close(); 131 | } catch (Exception e) { 132 | System.out.println("Error en EliminarEstadoD " + e.getMessage()); 133 | } finally { 134 | this.cerrar(); 135 | } 136 | } 137 | 138 | public List autocompleteUbigeo(String consulta) throws SQLException, Exception { 139 | List lista = new ArrayList<>(); 140 | String sql = "select top 171 DISUBI as UBIGEODESC from UBIGEO where DISUBI like ?"; 141 | try { 142 | PreparedStatement ps = this.conectar().prepareCall(sql); 143 | ps.setString(1, "%" + consulta + "%"); 144 | ResultSet rs = ps.executeQuery(); 145 | while (rs.next()) { 146 | lista.add(rs.getString("UBIGEODESC")); 147 | } 148 | } catch (Exception e) { 149 | System.out.println("Error en autocompleteUbigeoDao" + e.getMessage()); 150 | } 151 | return lista; 152 | } 153 | 154 | public String obtenerCodigoUbigeo(String cadenaUbi) throws SQLException, Exception { 155 | String sql = "select CODUBI from UBIGEO where DISUBI = ?"; 156 | try { 157 | PreparedStatement ps = this.conectar().prepareCall(sql); 158 | ps.setString(1, cadenaUbi); 159 | ResultSet rs = ps.executeQuery(); 160 | while (rs.next()) { 161 | return rs.getString("CODUBI"); 162 | } 163 | return rs.getString("CODUBI"); 164 | } catch (Exception e) { 165 | System.out.println("Error en obtenerCodigoUbigeo " + e.getMessage()); 166 | throw e; 167 | } 168 | } 169 | 170 | @Override 171 | public void cambiarEstado(Cliente obj) throws Exception { 172 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 173 | } 174 | 175 | @Override 176 | public List listarTodos(char estado) throws Exception { 177 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 178 | } 179 | 180 | } 181 | -------------------------------------------------------------------------------- /src/main/webapp/resources/images/logo-poseidon-dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | logo-poseidon 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/webapp/resources/images/landing/design.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/java/dao/VentaDetalleImpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import java.sql.PreparedStatement; 4 | import java.sql.ResultSet; 5 | import java.sql.SQLException; 6 | import java.sql.Statement; 7 | import java.text.DateFormat; 8 | import java.text.ParseException; 9 | import java.text.SimpleDateFormat; 10 | import java.time.Instant; 11 | import java.util.ArrayList; 12 | import java.util.Calendar; 13 | import java.util.Date; 14 | import java.util.List; 15 | import modelo.Cliente; 16 | import modelo.Familia; 17 | import modelo.Producto; 18 | import modelo.Venta; 19 | import modelo.VentaDetalle; 20 | //import servicios.UtilToSql; 21 | 22 | public class VentaDetalleImpl extends Conexion { 23 | 24 | DateFormat formato = new SimpleDateFormat("dd-MM-yyyy"); 25 | 26 | public static Date stringToFecha(String fecha) throws ParseException { 27 | return fecha != null ? new SimpleDateFormat("dd-MM-yyyy").parse(fecha) : null; 28 | } 29 | 30 | public VentaDetalle agregarFila(int idpro) throws SQLException, Exception { 31 | VentaDetalle v = null; 32 | String sql2 = "SELECT IDPRO,NOMPRO,PREPRO FROM PRODUCTO " 33 | + "WHERE IDPRO = " + idpro; 34 | try { 35 | PreparedStatement ps = this.conectar().prepareStatement(sql2); 36 | ResultSet rs = ps.executeQuery(); 37 | while (rs.next()) { 38 | v = new VentaDetalle(); 39 | Producto p = new Producto(); 40 | v.setIDPRO(rs.getInt("IDPRO")); 41 | p.setNOMPRO(rs.getString("NOMPRO")); 42 | p.setPREPRO(rs.getDouble("PREPRO")); 43 | v.setProducto(p); 44 | } 45 | ps.close(); 46 | rs.close(); 47 | } catch (Exception e) { 48 | System.out.println("Error en agregarFilaDAO " + e.getMessage()); 49 | e.printStackTrace(); 50 | } finally { 51 | this.cerrar(); 52 | return v; 53 | } 54 | } 55 | 56 | public void registroMultiple(List listaVentaDetalle, int idVenta) throws Exception { 57 | String sql = "INSERT INTO VENTA_DETALLE (CANVENDET,PREVENDET,IDPRO,IDVEN,ESTVENDET) VALUES (?,?,?,?,?)"; 58 | try { 59 | PreparedStatement ps = this.conectar().prepareStatement(sql); 60 | for (VentaDetalle ventadetalle : listaVentaDetalle) { 61 | ps.setInt(1, ventadetalle.getCANVENDET()); 62 | ps.setDouble(2, ventadetalle.getPREVENDET()); 63 | ps.setInt(3, ventadetalle.getIDPRO()); 64 | ps.setInt(4, idVenta); 65 | ps.setString(5, "A"); 66 | ps.executeUpdate(); 67 | } 68 | ps.close(); 69 | } catch (Exception e) { 70 | System.out.println("Error en registroMultipleDAO " + e.getMessage()); 71 | e.printStackTrace(); 72 | } finally { 73 | this.cerrar(); 74 | } 75 | } 76 | 77 | public void registrar(Venta venta) throws Exception { 78 | String sql = "INSERT INTO VENTA (FECVEN,IDCLI,IDEMP,TOTVEN,ESTVEN) VALUES (?,?,?,?,?)"; 79 | String sql2 = "select now()"; 80 | try { 81 | // Date d = null; 82 | PreparedStatement ps = this.conectar().prepareStatement(sql); 83 | PreparedStatement ps1 = this.conectar().prepareStatement(sql2); 84 | ps.setString(1, formato.format(venta.getFECVEN())); 85 | ps.setInt(2, venta.getCliente().getIDCLI()); 86 | ps.setInt(3, venta.getEmpleado().getIDEMP()); 87 | // ps.setString(3, venta.getIDEMP()); 88 | ps.setDouble(4, venta.getTOTVEN()); 89 | ps.setString(5, "A"); 90 | ps.executeUpdate(); 91 | ps.close(); 92 | } catch (Exception e) { 93 | e.printStackTrace(); 94 | } finally { 95 | this.cerrar(); 96 | } 97 | } 98 | 99 | public int obtenerUltimoId() { 100 | try { 101 | PreparedStatement ps1 = this.conectar().prepareStatement("SELECT MAX(v.idven) as IDVEN FROM VENTA v"); 102 | ResultSet rs = ps1.executeQuery(); 103 | while (rs.next()) { 104 | return rs.getInt("IDVEN"); 105 | } 106 | rs.close(); 107 | } catch (Exception e) { 108 | e.printStackTrace(); 109 | System.out.println("Error en obtenerUltimoIdDAO" + e.getMessage()); 110 | } 111 | return -1; 112 | } 113 | 114 | public List listar() throws Exception { 115 | List listado = new ArrayList<>(); 116 | VentaDetalle ventadetalle; 117 | Producto producto; 118 | Venta venta; 119 | String sql = "SELECT \n" 120 | + " VD.CANVENDET,\n" 121 | + " VD.PREVENDET,\n" 122 | + " P.IDPRO,\n" 123 | + " P.NOMPRO,\n" 124 | + " V.IDVEN,\n" 125 | + " V.FECVEN,\n" 126 | + " C.NOMCLI \n" 127 | + "FROM VENTA_DETALLE VD\n" 128 | + " INNER JOIN PRODUCTO AS P ON \n" 129 | + " VD.IDPRO = P.IDPRO\n" 130 | + " INNER JOIN VENTA AS V ON \n" 131 | + " VD.IDVEN = V.IDVEN\n" 132 | + " INNER JOIN CLIENTE AS C ON \n" 133 | + " V.IDCLI = C.IDCLI\n" 134 | + "ORDER BY \n" 135 | + " V.IDVEN DESC"; 136 | try { 137 | Statement st = this.conectar().createStatement(); 138 | ResultSet rs = st.executeQuery(sql); 139 | while (rs.next()) { 140 | ventadetalle = new VentaDetalle(); 141 | ventadetalle.setCANVENDET(rs.getInt("CANVENDET")); 142 | ventadetalle.setPREVENDET(rs.getDouble("PREVENDET")); 143 | producto = new Producto(); 144 | producto.setIDPRO(rs.getInt("IDPRO")); 145 | producto.setNOMPRO(rs.getString("NOMPRO")); 146 | ventadetalle.setProducto(producto); 147 | venta = new Venta(); 148 | venta.setIDVEN(rs.getInt("IDVEN")); 149 | venta.setFECVEN(rs.getDate("FECVEN")); 150 | ventadetalle.setVenta(venta); 151 | ventadetalle.setNOMCLI(rs.getString("NOMCLI")); 152 | listado.add(ventadetalle); 153 | } 154 | rs.close(); 155 | st.close(); 156 | } catch (Exception e) { 157 | System.out.println("Error en el listadoDaoVentaDetalle" + e.getMessage()); 158 | } finally { 159 | this.cerrar(); 160 | } 161 | return listado; 162 | } 163 | 164 | public List autocompleteEmpleado(String consulta) throws SQLException, Exception { 165 | List lista = new ArrayList<>(); 166 | String sql = "select top 10 CONCAT(NOMEMP, ' ', APEEMP) as EMPLEADODESC from EMPLEADO where NOMEMP like ?"; 167 | try { 168 | PreparedStatement ps = this.conectar().prepareCall(sql); 169 | ps.setString(1, "%" + consulta + "%"); 170 | ResultSet rs = ps.executeQuery(); 171 | while (rs.next()) { 172 | lista.add(rs.getString("EMPLEADODESC")); 173 | } 174 | } catch (Exception e) { 175 | System.out.println("Error en autocompleteEmpleadoDao" + e.getMessage()); 176 | } 177 | return lista; 178 | } 179 | 180 | public String obtenerIdEmpleado(String cadenaEmpleado) throws SQLException, Exception { 181 | String sql = "select IDEMP from EMPLEADO where CONCAT(NOMEMP, ' ', APEEMP) = ?"; 182 | try { 183 | PreparedStatement ps = this.conectar().prepareCall(sql); 184 | ps.setString(1, cadenaEmpleado); 185 | ResultSet rs = ps.executeQuery(); 186 | while (rs.next()) { 187 | return rs.getString("IDEMP"); 188 | } 189 | return rs.getString("IDEMP"); 190 | } catch (Exception e) { 191 | System.out.println("Error en obtenerIdEmpleadoDao " + e.getMessage()); 192 | throw e; 193 | } 194 | } 195 | 196 | public VentaDetalle obtenerDatos(int idpro) throws SQLException, Exception { 197 | VentaDetalle ventadetalle = null; 198 | String sql = "SELECT P.NOMPRO, P.MARPRO, F.NOMFAM, P.PREPRO, P.IDPRO, F.CODFAM \n" 199 | + "FROM PRODUCTO P\n" 200 | + "INNER JOIN FAMILIA F ON\n" 201 | + "P.CODFAM = F.CODFAM\n" 202 | + "WHERE P.IDPRO = " + idpro; 203 | try { 204 | Statement st = this.conectar().createStatement(); 205 | ResultSet rs = st.executeQuery(sql); 206 | while (rs.next()) { 207 | ventadetalle = new VentaDetalle(); 208 | ventadetalle.setIDPRO(rs.getInt("IDPRO")); 209 | Producto producto = new Producto(); 210 | producto.setNOMPRO(rs.getString("NOMPRO")); 211 | producto.setMARPRO(rs.getString("MARPRO")); 212 | producto.setCODFAM(rs.getString("CODFAM")); 213 | producto.setPREPRO(rs.getDouble("PREPRO")); 214 | Familia familia = new Familia(); 215 | familia.setNOMFAM(rs.getString("NOMFAM")); 216 | producto.setFamilia(familia); 217 | ventadetalle.setProducto(producto); 218 | } 219 | rs.close(); 220 | st.close(); 221 | } catch (Exception e) { 222 | System.out.println("Error en obtenerDatos " + e.getMessage()); 223 | e.printStackTrace(); 224 | } finally { 225 | this.cerrar(); 226 | } 227 | return ventadetalle; 228 | } 229 | 230 | } 231 | -------------------------------------------------------------------------------- /src/main/webapp/resources/css/flags/flags.css: -------------------------------------------------------------------------------- 1 | span.flag{width:44px;height:30px;display:inline-block;}img.flag{width:30px}.flag{background:url("\/poseidon/#{request.contextPath}/faces/resources/css/flags/flags_responsive.png.xhtml?ln=demo") no-repeat;background-size:100%;vertical-align: middle;}.flag-ad{background-position:0 .413223%}.flag-ae{background-position:0 .826446%}.flag-af{background-position:0 1.239669%}.flag-ag{background-position:0 1.652893%}.flag-ai{background-position:0 2.066116%}.flag-al{background-position:0 2.479339%}.flag-am{background-position:0 2.892562%}.flag-an{background-position:0 3.305785%}.flag-ao{background-position:0 3.719008%}.flag-aq{background-position:0 4.132231%}.flag-ar{background-position:0 4.545455%}.flag-as{background-position:0 4.958678%}.flag-at{background-position:0 5.371901%}.flag-au{background-position:0 5.785124%}.flag-aw{background-position:0 6.198347%}.flag-az{background-position:0 6.61157%}.flag-ba{background-position:0 7.024793%}.flag-bb{background-position:0 7.438017%}.flag-bd{background-position:0 7.85124%}.flag-be{background-position:0 8.264463%}.flag-bf{background-position:0 8.677686%}.flag-bg{background-position:0 9.090909%}.flag-bh{background-position:0 9.504132%}.flag-bi{background-position:0 9.917355%}.flag-bj{background-position:0 10.330579%}.flag-bm{background-position:0 10.743802%}.flag-bn{background-position:0 11.157025%}.flag-bo{background-position:0 11.570248%}.flag-br{background-position:0 11.983471%}.flag-bs{background-position:0 12.396694%}.flag-bt{background-position:0 12.809917%}.flag-bv{background-position:0 13.22314%}.flag-bw{background-position:0 13.636364%}.flag-by{background-position:0 14.049587%}.flag-bz{background-position:0 14.46281%}.flag-ca{background-position:0 14.876033%}.flag-cc{background-position:0 15.289256%}.flag-cd{background-position:0 15.702479%}.flag-cf{background-position:0 16.115702%}.flag-cg{background-position:0 16.528926%}.flag-ch{background-position:0 16.942149%}.flag-ci{background-position:0 17.355372%}.flag-ck{background-position:0 17.768595%}.flag-cl{background-position:0 18.181818%}.flag-cm{background-position:0 18.595041%}.flag-cn{background-position:0 19.008264%}.flag-co{background-position:0 19.421488%}.flag-cr{background-position:0 19.834711%}.flag-cu{background-position:0 20.247934%}.flag-cv{background-position:0 20.661157%}.flag-cx{background-position:0 21.07438%}.flag-cy{background-position:0 21.487603%}.flag-cz{background-position:0 21.900826%}.flag-de{background-position:0 22.31405%}.flag-dj{background-position:0 22.727273%}.flag-dk{background-position:0 23.140496%}.flag-dm{background-position:0 23.553719%}.flag-do{background-position:0 23.966942%}.flag-dz{background-position:0 24.380165%}.flag-ec{background-position:0 24.793388%}.flag-ee{background-position:0 25.206612%}.flag-eg{background-position:0 25.619835%}.flag-eh{background-position:0 26.033058%}.flag-er{background-position:0 26.446281%}.flag-es{background-position:0 26.859504%}.flag-et{background-position:0 27.272727%}.flag-fi{background-position:0 27.68595%}.flag-fj{background-position:0 28.099174%}.flag-fk{background-position:0 28.512397%}.flag-fm{background-position:0 28.92562%}.flag-fo{background-position:0 29.338843%}.flag-fr{background-position:0 29.752066%}.flag-ga{background-position:0 30.165289%}.flag-gd{background-position:0 30.578512%}.flag-ge{background-position:0 30.991736%}.flag-gf{background-position:0 31.404959%}.flag-gh{background-position:0 31.818182%}.flag-gi{background-position:0 32.231405%}.flag-gl{background-position:0 32.644628%}.flag-gm{background-position:0 33.057851%}.flag-gn{background-position:0 33.471074%}.flag-gp{background-position:0 33.884298%}.flag-gq{background-position:0 34.297521%}.flag-gr{background-position:0 34.710744%}.flag-gs{background-position:0 35.123967%}.flag-gt{background-position:0 35.53719%}.flag-gu{background-position:0 35.950413%}.flag-gw{background-position:0 36.363636%}.flag-gy{background-position:0 36.77686%}.flag-hk{background-position:0 37.190083%}.flag-hm{background-position:0 37.603306%}.flag-hn{background-position:0 38.016529%}.flag-hr{background-position:0 38.429752%}.flag-ht{background-position:0 38.842975%}.flag-hu{background-position:0 39.256198%}.flag-id{background-position:0 39.669421%}.flag-ie{background-position:0 40.082645%}.flag-il{background-position:0 40.495868%}.flag-in{background-position:0 40.909091%}.flag-io{background-position:0 41.322314%}.flag-iq{background-position:0 41.735537%}.flag-ir{background-position:0 42.14876%}.flag-is{background-position:0 42.561983%}.flag-it{background-position:0 42.975207%}.flag-jm{background-position:0 43.38843%}.flag-jo{background-position:0 43.801653%}.flag-jp{background-position:0 44.214876%}.flag-ke{background-position:0 44.628099%}.flag-kg{background-position:0 45.041322%}.flag-kh{background-position:0 45.454545%}.flag-ki{background-position:0 45.867769%}.flag-km{background-position:0 46.280992%}.flag-kn{background-position:0 46.694215%}.flag-kp{background-position:0 47.107438%}.flag-kr{background-position:0 47.520661%}.flag-kw{background-position:0 47.933884%}.flag-ky{background-position:0 48.347107%}.flag-kz{background-position:0 48.760331%}.flag-la{background-position:0 49.173554%}.flag-lb{background-position:0 49.586777%}.flag-lc{background-position:0 50%}.flag-li{background-position:0 50.413223%}.flag-lk{background-position:0 50.826446%}.flag-lr{background-position:0 51.239669%}.flag-ls{background-position:0 51.652893%}.flag-lt{background-position:0 52.066116%}.flag-lu{background-position:0 52.479339%}.flag-lv{background-position:0 52.892562%}.flag-ly{background-position:0 53.305785%}.flag-ma{background-position:0 53.719008%}.flag-mc{background-position:0 54.132231%}.flag-md{background-position:0 54.545455%}.flag-me{background-position:0 54.958678%}.flag-mg{background-position:0 55.371901%}.flag-mh{background-position:0 55.785124%}.flag-mk{background-position:0 56.198347%}.flag-ml{background-position:0 56.61157%}.flag-mm{background-position:0 57.024793%}.flag-mn{background-position:0 57.438017%}.flag-mo{background-position:0 57.85124%}.flag-mp{background-position:0 58.264463%}.flag-mq{background-position:0 58.677686%}.flag-mr{background-position:0 59.090909%}.flag-ms{background-position:0 59.504132%}.flag-mt{background-position:0 59.917355%}.flag-mu{background-position:0 60.330579%}.flag-mv{background-position:0 60.743802%}.flag-mw{background-position:0 61.157025%}.flag-mx{background-position:0 61.570248%}.flag-my{background-position:0 61.983471%}.flag-mz{background-position:0 62.396694%}.flag-na{background-position:0 62.809917%}.flag-nc{background-position:0 63.22314%}.flag-ne{background-position:0 63.636364%}.flag-nf{background-position:0 64.049587%}.flag-ng{background-position:0 64.46281%}.flag-ni{background-position:0 64.876033%}.flag-nl{background-position:0 65.289256%}.flag-no{background-position:0 65.702479%}.flag-np{background-position:0 66.115702%}.flag-nr{background-position:0 66.528926%}.flag-nu{background-position:0 66.942149%}.flag-nz{background-position:0 67.355372%}.flag-om{background-position:0 67.768595%}.flag-pa{background-position:0 68.181818%}.flag-pe{background-position:0 68.595041%}.flag-pf{background-position:0 69.008264%}.flag-pg{background-position:0 69.421488%}.flag-ph{background-position:0 69.834711%}.flag-pk{background-position:0 70.247934%}.flag-pl{background-position:0 70.661157%}.flag-pm{background-position:0 71.07438%}.flag-pn{background-position:0 71.487603%}.flag-pr{background-position:0 71.900826%}.flag-pt{background-position:0 72.31405%}.flag-pw{background-position:0 72.727273%}.flag-py{background-position:0 73.140496%}.flag-qa{background-position:0 73.553719%}.flag-re{background-position:0 73.966942%}.flag-ro{background-position:0 74.380165%}.flag-rs{background-position:0 74.793388%}.flag-ru{background-position:0 75.206612%}.flag-rw{background-position:0 75.619835%}.flag-sa{background-position:0 76.033058%}.flag-sb{background-position:0 76.446281%}.flag-sc{background-position:0 76.859504%}.flag-sd{background-position:0 77.272727%}.flag-se{background-position:0 77.68595%}.flag-sg{background-position:0 78.099174%}.flag-sh{background-position:0 78.512397%}.flag-si{background-position:0 78.92562%}.flag-sj{background-position:0 79.338843%}.flag-sk{background-position:0 79.752066%}.flag-sl{background-position:0 80.165289%}.flag-sm{background-position:0 80.578512%}.flag-sn{background-position:0 80.991736%}.flag-so{background-position:0 81.404959%}.flag-sr{background-position:0 81.818182%}.flag-ss{background-position:0 82.231405%}.flag-st{background-position:0 82.644628%}.flag-sv{background-position:0 83.057851%}.flag-sy{background-position:0 83.471074%}.flag-sz{background-position:0 83.884298%}.flag-tc{background-position:0 84.297521%}.flag-td{background-position:0 84.710744%}.flag-tf{background-position:0 85.123967%}.flag-tg{background-position:0 85.53719%}.flag-th{background-position:0 85.950413%}.flag-tj{background-position:0 86.363636%}.flag-tk{background-position:0 86.77686%}.flag-tl{background-position:0 87.190083%}.flag-tm{background-position:0 87.603306%}.flag-tn{background-position:0 88.016529%}.flag-to{background-position:0 88.429752%}.flag-tp{background-position:0 88.842975%}.flag-tr{background-position:0 89.256198%}.flag-tt{background-position:0 89.669421%}.flag-tv{background-position:0 90.082645%}.flag-tw{background-position:0 90.495868%}.flag-ty{background-position:0 90.909091%}.flag-tz{background-position:0 91.322314%}.flag-ua{background-position:0 91.735537%}.flag-ug{background-position:0 92.14876%}.flag-gb,.flag-uk{background-position:0 92.561983%}.flag-um{background-position:0 92.975207%}.flag-us{background-position:0 93.38843%}.flag-uy{background-position:0 93.801653%}.flag-uz{background-position:0 94.214876%}.flag-va{background-position:0 94.628099%}.flag-vc{background-position:0 95.041322%}.flag-ve{background-position:0 95.454545%}.flag-vg{background-position:0 95.867769%}.flag-vi{background-position:0 96.280992%}.flag-vn{background-position:0 96.694215%}.flag-vu{background-position:0 97.107438%}.flag-wf{background-position:0 97.520661%}.flag-ws{background-position:0 97.933884%}.flag-ye{background-position:0 98.347107%}.flag-za{background-position:0 98.760331%}.flag-zm{background-position:0 99.173554%}.flag-zr{background-position:0 99.586777%}.flag-zw{background-position:0 100%} 2 | -------------------------------------------------------------------------------- /src/main/webapp/reportes/Venta.jrxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | <band height="80" splitType="Stretch"> 38 | <textField pattern="MMMMM dd, yyyy"> 39 | <reportElement x="470" y="10" width="100" height="20" uuid="741956b9-e8d1-4870-803d-f63bbf02a32e"/> 40 | <textElement> 41 | <font size="11" isBold="true"/> 42 | </textElement> 43 | <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> 44 | </textField> 45 | <staticText> 46 | <reportElement x="170" y="60" width="100" height="20" forecolor="#F72D2A" uuid="048f65b1-8aca-4126-98b8-b0a087b3a8df"/> 47 | <textElement> 48 | <font fontName="Stencil" size="20" isBold="true"/> 49 | </textElement> 50 | <text><![CDATA[REPORTE]]></text> 51 | </staticText> 52 | <staticText> 53 | <reportElement x="270" y="60" width="30" height="20" forecolor="#F72D2A" uuid="0ddda5cf-6523-47da-aa4d-eea897d51599"/> 54 | <textElement> 55 | <font fontName="Stencil" size="20" isBold="true"/> 56 | </textElement> 57 | <text><![CDATA[de]]></text> 58 | </staticText> 59 | <staticText> 60 | <reportElement x="300" y="60" width="90" height="20" forecolor="#F72D2A" uuid="366e9fde-bb00-4b8e-922f-e3363f398a0d"/> 61 | <textElement> 62 | <font fontName="Stencil" size="20" isBold="true"/> 63 | </textElement> 64 | <text><![CDATA[ventas]]></text> 65 | </staticText> 66 | <staticText> 67 | <reportElement x="10" y="10" width="130" height="20" forecolor="#2A5AF7" uuid="ce6d2277-f876-4885-910c-82377ebf529d"/> 68 | <textElement> 69 | <font fontName="Stencil" size="20" isBold="true"/> 70 | </textElement> 71 | <text><![CDATA[MINIMARKET]]></text> 72 | </staticText> 73 | <staticText> 74 | <reportElement x="150" y="10" width="140" height="20" forecolor="#2A5AF7" uuid="865fbe68-8ff7-438e-a89d-7ae79230c645"/> 75 | <textElement> 76 | <font fontName="Stencil" size="20" isBold="true"/> 77 | </textElement> 78 | <text><![CDATA[CONFLOMARK]]></text> 79 | </staticText> 80 | </band> 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | -------------------------------------------------------------------------------- /src/main/java/dao/ProductoImpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | //import com.mysql.jdbc.PreparedStatement; 4 | //import java.sql.Date; 5 | import java.sql.CallableStatement; 6 | import java.util.Date; 7 | import java.sql.PreparedStatement; 8 | import java.util.List; 9 | import modelo.Producto; 10 | import java.sql.ResultSet; 11 | import java.sql.Statement; 12 | import java.util.ArrayList; 13 | import java.sql.SQLException; 14 | import java.text.DateFormat; 15 | import java.text.ParseException; 16 | import java.text.SimpleDateFormat; 17 | 18 | public class ProductoImpl extends Conexion implements ICRUD { 19 | 20 | DateFormat formato = new SimpleDateFormat("dd-MM-yyyy"); 21 | public static Date stringToFecha(String fecha) throws ParseException { 22 | return fecha != null ? new SimpleDateFormat("dd-MM-yyyy").parse(fecha) : null; 23 | } 24 | 25 | @Override 26 | public void registrar(Producto producto) throws Exception { 27 | String sql = "insert into PRODUCTO (NOMPRO, MARPRO, CODFAM, DESPRO, PREPRO, STOPRO, VENPRO, CODPROV, ESTPRO) values (?,?,?,?,?,?,?,?,?)"; 28 | try { 29 | PreparedStatement ps = this.conectar().prepareStatement(sql); 30 | ps.setString(1, producto.getNOMPRO()); 31 | ps.setString(2, producto.getMARPRO()); 32 | ps.setString(3, producto.getCODFAM()); 33 | ps.setString(4, producto.getDESPRO()); 34 | ps.setDouble(5, producto.getPREPRO()); 35 | ps.setInt(6, producto.getSTOPRO()); 36 | ps.setString(7, formato.format(producto.getVENPRO())); 37 | ps.setString(8, producto.getCODPROV()); 38 | ps.setString(9, "A"); 39 | ps.executeUpdate(); 40 | ps.close(); 41 | } catch (Exception e) { 42 | System.out.println("Error en RegistrarD " + e.getMessage()); 43 | } finally { 44 | this.cerrar(); 45 | } 46 | } 47 | 48 | @Override 49 | public void modificar(Producto producto) throws Exception { 50 | String sql = "update PRODUCTO set NOMPRO=?, MARPRO=?, CODFAM=?, DESPRO=?, PREPRO=?, STOPRO=?, VENPRO=?, CODPROV=?, ESTPRO=? where IDPRO=?"; //where IDPRO like? 51 | try { 52 | PreparedStatement ps = this.conectar().prepareStatement(sql); 53 | ps.setString(1, producto.getNOMPRO()); 54 | ps.setString(2, producto.getMARPRO()); 55 | ps.setString(3, producto.getCODFAM()); 56 | ps.setString(4, producto.getDESPRO()); 57 | ps.setDouble(5, producto.getPREPRO()); 58 | ps.setInt(6, producto.getSTOPRO()); 59 | ps.setString(7, formato.format(producto.getVENPRO())); 60 | ps.setString(8, producto.getCODPROV()); 61 | ps.setString(9, "A"); 62 | ps.setInt(10, producto.getIDPRO()); 63 | ps.executeUpdate(); 64 | ps.close(); 65 | } catch (Exception e) { 66 | System.out.println("Error en ModificarD " + e.getMessage()); 67 | } finally { 68 | this.cerrar(); 69 | } 70 | } 71 | 72 | @Override 73 | public void eliminar(Producto producto) throws Exception { 74 | String sql = "delete from PRODUCTO where IDPRO=? "; 75 | try { 76 | PreparedStatement ps = this.conectar().prepareStatement(sql); 77 | ps.setInt(1, producto.getIDPRO()); 78 | ps.executeUpdate(); 79 | ps.close(); 80 | } catch (Exception e) { 81 | System.out.println("Error en EliminarD " + e.getMessage()); 82 | } 83 | } 84 | 85 | // @Override 86 | // public List listarTodos() throws Exception { 87 | // throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 88 | // } 89 | 90 | @Override 91 | public List listarTodos() throws Exception { 92 | List listado = null; 93 | Producto producto; 94 | String sql = "SELECT * FROM vProducto"; 95 | try { 96 | listado = new ArrayList(); 97 | Statement st = this.conectar().createStatement(); 98 | ResultSet rs = st.executeQuery(sql); 99 | while (rs.next()) { 100 | producto = new Producto(); 101 | producto.setIDPRO(rs.getInt("IDPRO")); 102 | producto.setNOMPRO(rs.getString("NOMPRO")); 103 | producto.setMARPRO(rs.getString("MARPRO")); 104 | producto.setCODFAM(rs.getString("SUBFAM")); 105 | producto.setDESPRO(rs.getString("DESPRO")); 106 | producto.setPREPRO(rs.getDouble("PREPRO")); 107 | producto.setSTOPRO(rs.getInt("STOPRO")); 108 | producto.setVENPRO(rs.getDate("VENPRO")); 109 | producto.setCODPROV(rs.getString("NOMPROV")); 110 | listado.add(producto); 111 | } 112 | rs.close(); 113 | st.close(); 114 | } catch (Exception e) { 115 | System.out.println("Error en ListarTodosD" + e.getMessage()); 116 | } finally { 117 | this.cerrar(); 118 | } 119 | return listado; 120 | } 121 | 122 | public void EliminarEstado(Producto producto) throws Exception { 123 | String sql = "update PRODUCTO set ESTPRO=? where IDPRO=? "; 124 | try { 125 | PreparedStatement ps = this.conectar().prepareStatement(sql); 126 | ps.setString(1, "I"); 127 | ps.setInt(2, producto.getIDPRO()); 128 | ps.executeUpdate(); 129 | ps.close(); 130 | } catch (Exception e) { 131 | System.out.println("Error en EliminarEstadoD " + e.getMessage()); 132 | } finally { 133 | this.cerrar(); 134 | } 135 | } 136 | 137 | public void RestaurarEstado(Producto producto) throws Exception { 138 | String sql = "update PRODUCTO set ESTPRO=? where IDPRO=? "; 139 | try { 140 | PreparedStatement ps = this.conectar().prepareStatement(sql); 141 | ps.setString(1, "A"); 142 | ps.setInt(2, producto.getIDPRO()); 143 | ps.executeUpdate(); 144 | ps.close(); 145 | } catch (Exception e) { 146 | System.out.println("Error en EliminarEstadoD " + e.getMessage()); 147 | } finally { 148 | this.cerrar(); 149 | } 150 | } 151 | 152 | public List autocompleteFamilia(String consulta) throws SQLException, Exception { 153 | List lista = new ArrayList<>(); 154 | String sql = "select top 52 SUBFAM as FAMILIADESC from FAMILIA where SUBFAM like ?"; 155 | try { 156 | PreparedStatement ps = this.conectar().prepareCall(sql); 157 | ps.setString(1, "%" + consulta + "%"); 158 | ResultSet rs = ps.executeQuery(); 159 | while (rs.next()) { 160 | lista.add(rs.getString("FAMILIADESC")); 161 | } 162 | } catch (Exception e) { 163 | System.out.println("Error en autocompleteFamiliaDao" + e.getMessage()); 164 | } 165 | return lista; 166 | } 167 | 168 | public String obtenerCodigoFamilia(String cadenaFamilia) throws SQLException, Exception { 169 | String sql = "select CODFAM from FAMILIA where SUBFAM = ?"; 170 | try { 171 | PreparedStatement ps = this.conectar().prepareCall(sql); 172 | ps.setString(1, cadenaFamilia); 173 | ResultSet rs = ps.executeQuery(); 174 | while (rs.next()) { 175 | return rs.getString("CODFAM"); 176 | } 177 | return rs.getString("CODFAM"); 178 | } catch (Exception e) { 179 | System.out.println("Error en obtenerCodigoFamiliaDao " + e.getMessage()); 180 | throw e; 181 | } 182 | } 183 | 184 | public List autocompleteProveedor(String consulta) throws SQLException, Exception { 185 | List lista = new ArrayList<>(); 186 | // String sql = "select top 10 (P.NOMPROV) as NOMPROV from PROVEEDOR P where NOMPROV like ?"; 187 | String sql = "select top 10 NOMPROV as PROVEEDORDESC from PROVEEDOR where NOMPROV like ?"; 188 | try { 189 | PreparedStatement ps = this.conectar().prepareCall(sql); 190 | ps.setString(1, "%" + consulta + "%"); 191 | ResultSet rs = ps.executeQuery(); 192 | while (rs.next()) { 193 | lista.add(rs.getString("PROVEEDORDESC")); 194 | } 195 | } catch (Exception e) { 196 | System.out.println("Error en autocompleteProveedorDao" + e.getMessage()); 197 | } 198 | return lista; 199 | } 200 | 201 | public String obtenerCodigoProveeedor(String cadenaProveedor) throws SQLException, Exception { 202 | // String sql = "select CODPROV from PROVEEDOR where (P.NOMPROV) = ?"; 203 | String sql = "select CODPROV from PROVEEDOR where NOMPROV = ?"; 204 | try { 205 | PreparedStatement ps = this.conectar().prepareCall(sql); 206 | ps.setString(1, cadenaProveedor); 207 | ResultSet rs = ps.executeQuery(); 208 | while (rs.next()) { 209 | return rs.getString("CODPROV"); 210 | } 211 | return rs.getString("CODPROV"); 212 | } catch (Exception e) { 213 | System.out.println("Error en obtenerCodigoProveeedorDao " + e.getMessage()); 214 | throw e; 215 | } 216 | } 217 | 218 | public Double precio=0.0; 219 | public Integer stockPro = 0; 220 | public String nombre="", marca="", familia="", descripcion="", proveedor = ""; 221 | 222 | public Integer obteneridProducto(String cadenaPro) throws SQLException, Exception { 223 | Integer idProducto = 0; 224 | try { 225 | CallableStatement ps = this.conectar().prepareCall("{call spDatosAutoCompletPro(?)}"); 226 | ps.setString(1, cadenaPro); 227 | ResultSet rs = ps.executeQuery(); 228 | while (rs.next()) { 229 | idProducto = rs.getInt("IDPRO"); 230 | nombre = rs.getString("NOMPRO"); 231 | marca = rs.getString("MARPRO"); 232 | familia = rs.getString("SUBFAM"); 233 | descripcion = rs.getString("DESPRO"); 234 | precio = rs.getDouble("PREPRO"); 235 | // stockPro = rs.getInt("STOPRO"); 236 | proveedor = rs.getString("NOMPROV"); 237 | } 238 | } catch (Exception e) { 239 | System.out.println("Error en obteneridProducto " + e.getMessage()); 240 | } 241 | return idProducto; 242 | } 243 | 244 | @Override 245 | public void cambiarEstado(Producto obj) throws Exception { 246 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 247 | } 248 | 249 | @Override 250 | public List listarTodos(char estado) throws Exception { 251 | throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. 252 | } 253 | 254 | } 255 | -------------------------------------------------------------------------------- /src/main/webapp/resources/images/landing/documented.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | undraw_File_bundle_xl7g 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /src/main/webapp/reportes/Producto.jrxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | <band height="92" splitType="Stretch"> 42 | <textField pattern="MMMMM dd, yyyy"> 43 | <reportElement x="470" y="0" width="100" height="20" uuid="ada5ea26-3494-4da4-b485-981c120a6fd5"/> 44 | <textElement> 45 | <font size="11" isBold="true"/> 46 | </textElement> 47 | <textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression> 48 | </textField> 49 | <staticText> 50 | <reportElement x="180" y="60" width="60" height="20" forecolor="#F72D2A" uuid="59a18dea-812a-4c9e-88bf-bbfddff62490"/> 51 | <textElement> 52 | <font fontName="Stencil" size="20" isBold="true"/> 53 | </textElement> 54 | <text><![CDATA[Lista]]></text> 55 | </staticText> 56 | <staticText> 57 | <reportElement x="270" y="60" width="120" height="20" forecolor="#F72D2A" uuid="dd063900-5cc1-47a9-a77a-9c9658d90c00"/> 58 | <textElement> 59 | <font fontName="Stencil" size="20" isBold="true"/> 60 | </textElement> 61 | <text><![CDATA[productos]]></text> 62 | </staticText> 63 | <staticText> 64 | <reportElement x="140" y="10" width="140" height="20" forecolor="#2A5AF7" uuid="4a1ddef7-2f0d-459f-84b2-841b312562fb"/> 65 | <textElement> 66 | <font fontName="Stencil" size="20" isBold="true"/> 67 | </textElement> 68 | <text><![CDATA[CONFLOMARK]]></text> 69 | </staticText> 70 | <staticText> 71 | <reportElement x="10" y="10" width="130" height="20" forecolor="#2A5AF7" uuid="107d9f49-7e1f-4657-9858-6dc76955e41a"/> 72 | <textElement> 73 | <font fontName="Stencil" size="20" isBold="true"/> 74 | </textElement> 75 | <text><![CDATA[MINIMARKET]]></text> 76 | </staticText> 77 | <staticText> 78 | <reportElement x="240" y="60" width="30" height="20" forecolor="#F72D2A" uuid="7465a0ec-6bf9-4a2e-8335-9df9ba8fc7cf"/> 79 | <textElement> 80 | <font fontName="Stencil" size="20" isBold="true"/> 81 | </textElement> 82 | <text><![CDATA[de]]></text> 83 | </staticText> 84 | </band> 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | -------------------------------------------------------------------------------- /src/main/java/controlador/VentaDetalleC.java: -------------------------------------------------------------------------------- 1 | package controlador; 2 | 3 | import dao.ClienteImpl; 4 | import dao.ProductoImpl; 5 | import dao.VentaDetalleImpl; 6 | import modelo.Cliente; 7 | import modelo.Producto; 8 | import modelo.Venta; 9 | import modelo.VentaDetalle; 10 | import modelo.TempVta; 11 | import servicios.ReporteS; 12 | import java.io.Serializable; 13 | import java.sql.SQLException; 14 | import java.util.List; 15 | import javax.inject.Named; 16 | //import javax.enterprise.context.Dependent; 17 | import javax.faces.application.FacesMessage; 18 | import javax.faces.context.FacesContext; 19 | //import java.sql.Date; 20 | import java.util.Date; 21 | import java.util.ArrayList; 22 | import java.util.GregorianCalendar; 23 | import java.util.List; 24 | import javax.annotation.PostConstruct; 25 | import javax.enterprise.context.RequestScoped; 26 | import javax.enterprise.context.SessionScoped; 27 | import javax.inject.Named; 28 | //import servicios.UtilToSql; 29 | import javax.enterprise.context.SessionScoped; 30 | import java.util.Map; 31 | import java.util.HashMap; 32 | import java.util.logging.Level; 33 | import java.util.logging.Logger; 34 | import java.util.Calendar; 35 | import lombok.Data; 36 | 37 | @Data 38 | 39 | //Notación CDI 40 | @Named(value = "ventadetalleC") 41 | //@Dependent 42 | @SessionScoped 43 | public class VentaDetalleC implements Serializable { 44 | 45 | // Venta vent; 46 | // Integer cantidad = 1; 47 | double precio = 0.0, monto = 0.0; 48 | Integer stockPro = 0, cantPed = 1; 49 | String cadenaPro = ""; 50 | ProductoImpl daoPro; 51 | List productos; 52 | List selectedProduct; 53 | TempVta tempVta; 54 | 55 | 56 | private Producto producto; 57 | private Venta venta; 58 | private VentaDetalle ventadetalle; 59 | private VentaDetalleImpl dao; 60 | private List listadoVentaDetalle; 61 | private List listadoVentaDetalleFinal; 62 | 63 | public VentaDetalleC() { 64 | producto = new Producto(); 65 | ventadetalle = new VentaDetalle(); 66 | dao = new VentaDetalleImpl(); 67 | venta = new Venta(); 68 | listadoVentaDetalle = new ArrayList<>(); 69 | listadoVentaDetalleFinal = new ArrayList<>(); 70 | venta.setFECVEN(GregorianCalendar.getInstance().getTime()); 71 | } 72 | 73 | public List agregarTmp() throws Exception { 74 | try { 75 | boolean repetido = false; 76 | for (int i = 0; i < productos.size(); i++) { 77 | if (productos.get(i).getIdpro().equals(daoPro.obteneridProducto(cadenaPro))) { 78 | repetido = true; 79 | cadenaPro = ""; 80 | break; 81 | } 82 | } 83 | if (repetido == true) { 84 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Duplicado", "Ya se tiene el producto en la compra")); 85 | } else { 86 | tempVta = new TempVta(); 87 | tempVta.setIdpro(daoPro.obteneridProducto(cadenaPro)); 88 | tempVta.setNombre(daoPro.nombre); 89 | tempVta.setMarca(daoPro.marca); 90 | tempVta.setFamilia(daoPro.familia); 91 | tempVta.setDescripcion(daoPro.descripcion); 92 | tempVta.setPrecio(daoPro.precio); 93 | tempVta.setStockPro(daoPro.stockPro); 94 | tempVta.setCantidad(cantPed); 95 | tempVta.setSubTotal((double) (tempVta.getPrecio() * tempVta.getCantidad())); 96 | this.productos.add(tempVta); 97 | monto += tempVta.getSubTotal(); 98 | limpiarCampos(); 99 | 100 | 101 | VentaDetalle ventadet = dao.agregarFila(ventadetalle.getProducto().getIDPRO()); 102 | ventadet.setIDPRO(this.ventadetalle.getProducto().getIDPRO()); 103 | ventadet.setCANVENDET(this.ventadetalle.getCANVENDET()); 104 | ventadet.setPREPRO(ventadet.getProducto().getPREPRO()); //extra 105 | ventadet.setPREVENDET(ventadet.getProducto().getPREPRO() * this.ventadetalle.getCANVENDET()); 106 | ventadet.setNOMPRO(ventadet.getProducto().getNOMPRO()); 107 | this.listadoVentaDetalle.add(ventadet); 108 | ventadetalle = new VentaDetalle(); 109 | for (VentaDetalle ventaDetalle : listadoVentaDetalle) { 110 | System.out.println(ventaDetalle); 111 | } 112 | sumar(); 113 | } 114 | } catch (Exception e) { 115 | System.out.println("Error en agregarFilaDAO " + e.getMessage()); 116 | e.printStackTrace(); 117 | } 118 | return productos; 119 | } 120 | 121 | public void limpiarListaTemp() throws Exception { 122 | productos.clear(); 123 | monto = 0.0; 124 | } 125 | 126 | public void limpiarCampos() throws Exception { 127 | cadenaPro = ""; 128 | cantPed = 1; 129 | } 130 | 131 | public void anularTmp() throws Exception { 132 | limpiarCampos(); 133 | productos.clear(); 134 | } 135 | 136 | public void eliminarFilaTmp(TempVta tempVta) throws Exception { 137 | try { 138 | productos.remove(tempVta); 139 | sumarMontoTmp(); 140 | } catch (Exception e) { 141 | System.out.println("Error en VentasC/eliminarFilaTmp " + e.getMessage()); 142 | } 143 | } 144 | 145 | private void sumarMontoTmp(){ 146 | for (TempVta tempVta: productos){ 147 | monto += tempVta.getSubTotal(); 148 | } 149 | } 150 | 151 | public void agregarFila() { 152 | try { 153 | VentaDetalle ventadet = dao.agregarFila(ventadetalle.getProducto().getIDPRO()); 154 | ventadet.setIDPRO(this.ventadetalle.getProducto().getIDPRO()); 155 | ventadet.setCANVENDET(this.ventadetalle.getCANVENDET()); 156 | ventadet.setPREPRO(ventadet.getProducto().getPREPRO()); //extra 157 | ventadet.setPREVENDET(ventadet.getProducto().getPREPRO() * this.ventadetalle.getCANVENDET()); 158 | ventadet.setNOMPRO(ventadet.getProducto().getNOMPRO()); 159 | this.listadoVentaDetalle.add(ventadet); 160 | ventadetalle = new VentaDetalle(); 161 | for (VentaDetalle ventaDetalle : listadoVentaDetalle) { 162 | System.out.println(ventaDetalle); 163 | } 164 | sumar(); 165 | } catch (Exception e) { 166 | System.out.println("Error en agregarFilaDAO " + e.getMessage()); 167 | e.printStackTrace(); 168 | } 169 | } 170 | 171 | public void eliminarFila(VentaDetalle v) { 172 | try { 173 | listadoVentaDetalle.remove(v); 174 | sumar(); 175 | } catch (Exception e) { 176 | System.out.println("Error en eliminarFilaDAO " + e.getMessage()); 177 | e.printStackTrace(); 178 | } 179 | } 180 | 181 | public void registrarVenta() { 182 | try { 183 | // venta.setIDEMP(dao.obtenerIdEmpleado(venta.getIDEMP())); 184 | dao.registrar(venta); 185 | int idven = dao.obtenerUltimoId(); 186 | dao.registroMultiple(listadoVentaDetalle, idven); 187 | listadoVentaDetalle.clear(); 188 | listar(); 189 | venta = new Venta(); 190 | } catch (Exception e) { 191 | e.printStackTrace(); 192 | } 193 | } 194 | 195 | // public void modificar() throws Exception { 196 | // try { 197 | // dao.modificar(ventadetalle); 198 | // FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "OK", "Modificado con éxito")); 199 | // limpiar(); 200 | // listar(); 201 | // } catch (Exception e) { 202 | // System.out.println("Error en ModificarC " + e.getMessage()); 203 | // } 204 | // } 205 | // 206 | // public void eliminar(VentaDetalle ventadetalle) throws Exception { 207 | // try { 208 | // dao.eliminar(ventadetalle); 209 | // FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "OK", "Eliminado con éxito")); 210 | // limpiar(); 211 | // listar(); 212 | // } catch (Exception e) { 213 | // FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "ERROR", "Al Eliminar")); 214 | // System.out.println("Error en EliminarC " + e.getMessage()); 215 | // } 216 | // } 217 | // public void eliminarEstado() throws Exception { 218 | // try { 219 | // dao.EliminarEstado(ventadetalle); 220 | // FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "OK", "Eliminado con éxito")); 221 | // limpiar(); 222 | // listar(); 223 | // } catch (Exception e) { 224 | // FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "ERROR", "Al Eliminar")); 225 | // System.out.println("Error en eliminarEstadoC " + e.getMessage()); 226 | // } 227 | // } 228 | // 229 | // public void restaurarEstado(VentaDetalle ventadetalle) throws Exception { 230 | // try { 231 | // dao.RestaurarEstado(ventadetalle); 232 | // FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "OK", "Restaurado con Exito")); 233 | // limpiar(); 234 | // listar(); 235 | // } catch (Exception e) { 236 | // System.out.println("Error en restaurarEstadoC " + e.getMessage()); 237 | // } 238 | // } 239 | // public List completeTextVenta(String query) throws SQLException, Exception { 240 | // VentaDetalleImpl daoVenta = new VentaDetalleImpl(); 241 | // return daoVenta.autocompleteVenta(query); 242 | // } 243 | // 244 | // public List completeTextProducto(String query) throws SQLException, Exception { 245 | // VentaDetalleImpl daoProducto = new VentaDetalleImpl(); 246 | // return daoProducto.autocompleteProducto(query); 247 | // } 248 | public List completeTextEmpleado(String query) throws SQLException, Exception { 249 | VentaDetalleImpl daoEmpleado = new VentaDetalleImpl(); 250 | return daoEmpleado.autocompleteEmpleado(query); 251 | } 252 | 253 | public void limpiar() { 254 | this.ventadetalle = new VentaDetalle(); 255 | // ventadetalle.setCANVENDET(""); 256 | this.venta = new Venta(); 257 | Calendar c1 = Calendar.getInstance(); 258 | } 259 | 260 | public void anular() throws Exception { 261 | limpiar(); 262 | listadoVentaDetalle.clear(); 263 | } 264 | 265 | public void listar() { 266 | try { 267 | listadoVentaDetalleFinal = dao.listar(); 268 | } catch (Exception e) { 269 | System.out.println("Error en ListarC " + e.getMessage()); 270 | e.printStackTrace(); 271 | } 272 | } 273 | 274 | public void reporteVenta() throws Exception { 275 | ReporteS report = new ReporteS(); 276 | try { 277 | Map parameters = new HashMap(); 278 | report.exportarPDFGlobal(parameters, "Venta.jasper", "Reporte de Ventas (15-07-2021).pdf"); 279 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "PDF GENERADO", null)); 280 | } catch (Exception e) { 281 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "ERROR AL GENERAR PDF", null)); 282 | throw e; 283 | } 284 | } 285 | 286 | @PostConstruct 287 | public void start() { 288 | listar(); 289 | daoPro = new ProductoImpl(); 290 | } 291 | 292 | public void addMessage() { 293 | String summary = venta.getTOGGLESWICHT() ? "Activado" : "Desactivado"; 294 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(summary)); 295 | } 296 | 297 | public void sumar() { 298 | double precioTotal = 0.0; 299 | for (VentaDetalle ventaDetalle : listadoVentaDetalle) { 300 | precioTotal += ventaDetalle.getPREVENDET(); 301 | } 302 | System.out.println(precioTotal); 303 | venta.setTOTVEN(precioTotal); 304 | } 305 | 306 | public void agregar() { 307 | try { 308 | VentaDetalle vd = new VentaDetalle(); 309 | vd = dao.obtenerDatos(ventadetalle.getProducto().getIDPRO()); 310 | listadoVentaDetalle.add(vd); 311 | } catch (Exception e) { 312 | System.out.println("Error en agregarFilaDAO " + e.getMessage()); 313 | e.printStackTrace(); 314 | } 315 | } 316 | 317 | } 318 | -------------------------------------------------------------------------------- /src/main/webapp/vistas/Clientes.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | 13 | Registro de Clientes 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
26 | 27 |

Registro de Clientes

28 |
29 | 30 | 31 | 32 |
33 |
34 |
35 |
36 | 37 | 38 |
39 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 68 | 69 | 70 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 |
83 |
84 | 85 | 86 |
87 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | LISTADO DE CLIENTES 100 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | EN TOTAL HAY #{fn:length(clienteC.listadoCliente)} REGISTROS 120 | 121 | 122 |
123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 |
134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 |
144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 166 | 167 | 168 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 |
182 |
183 | 184 |
185 | --------------------------------------------------------------------------------