From c3975ab084ad6ca9b5f831ff513be0cbfca52598 Mon Sep 17 00:00:00 2001 From: Ethanell Date: Wed, 29 Jun 2022 00:27:40 +0200 Subject: [PATCH] Add product and purchase list Start of the detail --- .../WEB-INF/classes/DAO/MagasinHelper.class | Bin 8758 -> 8959 bytes .../classes/controller/BddController$1.class | Bin 0 -> 868 bytes .../classes/controller/BddController.class | Bin 5860 -> 7417 bytes build/web/WEB-INF/classes/jsp/detail.jsp | 118 ++++++++++++------ build/web/WEB-INF/classes/jsp/resultat.jsp | 75 +++++------ build/web/WEB-INF/jsp/detail.jsp | 118 ++++++++++++------ build/web/WEB-INF/jsp/resultat.jsp | 75 +++++------ nbproject/private/private.xml | 8 +- src/java/DAO/MagasinHelper.java | 70 +++++++---- src/java/controller/BddController.java | 80 +++++++++--- web/WEB-INF/jsp/detail.jsp | 118 ++++++++++++------ web/WEB-INF/jsp/resultat.jsp | 75 +++++------ 12 files changed, 473 insertions(+), 264 deletions(-) create mode 100644 build/web/WEB-INF/classes/controller/BddController$1.class diff --git a/build/web/WEB-INF/classes/DAO/MagasinHelper.class b/build/web/WEB-INF/classes/DAO/MagasinHelper.class index 054b5223835d0c24fc3b9033cf77c2eee177c882..9e73c1a1439f1f2b6754ac53c48e1085f15ab66f 100644 GIT binary patch literal 8959 zcmd5>dvH|M9sbT{H@is|fq>vbz@?yuJS!?n5@;c)MDhT63pUqyUX2OAc#=4 zS{_xa@(@#76#=VOk%}0xM(d;1+SclHI_>l^<4pf(r_X6;n09LIch0@LdpB90qV!Ro!}~?3!p+5~#wOXj#f#0waAQ+3w&2SpxD~gR;C6gP z{@fvd?)2fSvfWyOZP+e*JG}T>F^1zVAMW7FLwH{%ZJ@Qgyqy8 zA0F^wuMZD;(N~O#_=eo$p%Q!(-;zHM%dtn~*rPt|lkHwoTyD`?u zU57UtQN1Aw8ZX zzMS)!dLk7`YDs|+4v6e)x{@0N#t+(dv8hE9TFBmDOzwqyBfW5m#-5}06K zH5yZiWUPnyOM6c#AIg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cwJ_36`gXaOp=!3LfqyHYycg=PwoEIzv^MmouqSIep0 z(z}~fv^z;7C{(V0V>Ig&Q?6ODWL7Gz6fkqkyp6?V0WG>kr6;xgBctxIQ1>}~E?=(C zy&q#M^Q65muLmbP;Pdq0u;AzU@+A1|Cc)3^t;|o&p1D)zTi`DsY!dthlnLx5(q$EMVSYI=oB!4`}@!R^xq+@c~olL&cw2vK2WUh+2f)Z4q+tSO}SzCZtcH zc}PNZGdauy*P=@2UQ9ZGQ+ZxIt*~exCd(qUcppmkq4ap`(KJ<$Dyp_ptH8fKsFVq&axug$y4p#Xl+s_nMxVVcP0 z{{Y-*5+3McFxHEFY!LjvwD4k+7=SH&wo?pIEXXt3G?ZFL;|)CUCTpo(DHe8-Lo;c1 zDC`|+;Tom#B)~kW?F;-WvaUXs9N&SgJe?;=@K2-znHWa+hr=mGl29KeiP5MKV=!He z#YN&|G>D046Mn1^;}Pcdc5#|5_>XiTOKR0I9>~mZPHPzcovc#KO{A5a$RyY)Y8^9D zo9z*|diC9>u)&X$b-omTui kaIcDb`Dy4Lo*d+fOIBB7t@H3)@e%5?of)oRCkNL37Z(VaUjP6A diff --git a/build/web/WEB-INF/classes/controller/BddController$1.class b/build/web/WEB-INF/classes/controller/BddController$1.class new file mode 100644 index 0000000000000000000000000000000000000000..a6a8dccb2015391356c60c75e9d31d236372cac9 GIT binary patch literal 868 zcmaJl27F;b|ziLahR#d>mwedwm(?p4;O+b@U@ue@z?g&$tnRRBi_~vi& zK}~${2l%6mcL5ul1~=LJHFwUv_uTpQ`^QfJPtYvE!Fm}bR2^(MxK$?qwu4OvcZ%35 z;x5CI9SKu=%&^u8m9$#LG1vZ!C~BX2Ey~&vQrKOFjr!uWMxUY3RuN}d?g+_Wr{e+F zhruAGh}ThJ5cdNuGJhT{WW^cWeJQza$AK}N-0H#-wQcI9)DuG)*i;khv(9mF68NbV zvA-9XQ8!3-W}!HcL%(OWki*vb$S&cOdn(l-e4BE$ z?XpTG<2bYEcX5gIWwM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mXP`X`@f+q!tsj;GniVztqQMI3!A=GH6^ z?Lj@?o1FJhaCxXPBb1X>5 zM(1~U?hQKbUFaZPfiTWu?7K0F9@togZ8!&4<6MXRGU|bBeD=G2_PagyVcf`>1LUpY z2ACM5RxafnsU~+M#gQ~ejz#DdoB%~ZMnP6VPQhggcrCt+OlE2GX1++L=V=(^RGXhd z$*ueYJjnmRN{7=Da_aAJ1Vfcgq9p(l+td+l_35{{1MU96@y@_hnCCjg&O?OI7chf5 zcx7L~{E;DVbNBK|uk=Z;^hie-#Bn;RrULJTk9RLumv{#qyd8(aI|a|fyL1}fXxtlU zkDlPjsfZJ&5pk1bGl^VCA{RNSv4YSyF^i|j4EkgSeKLbSnRQjjY%h@!b4W(2VBEvf z8H@$nqbGTIPM*XvL4`DwhN7o9x{W#1m%G$Yjh-f9@4+HplnmhM73;VWlSQK*rZmO^)GP~1(!Fzf}>Ddrr9evNQ-izzPaQptRYreWFijFPO_hpoLg(RIT+ol z67i8md}I+1S^4@q{Pj!1+TyI=Rb5zR<@OAg+xF<0POSE0g!X(j zm^MpTRNu;8h%29to$M)GKaRJtr&fsQ?IpiZ+OCM2tA*&?a!#+W;N%`%H}mJtTgpV% z>|<~Cu{T!{*)^s8MF){Z$bDx?IgE?vc|Y+x85b{BjEfg5#>I=3>PIL{HI`nS^WHhH zI`*Tth`w0R2~}+@6jNeqEL=o?IlXli^x7Oyw=p2MGh}zr$#>GdchRwT)1~)dHGlUV zz`d*k_c`>3T@pV1oj(1Ye&{auLudJ+8}&nXu^+k(e(28iLbn<#DV+hLDbLhv>9zo_ FdliwfgoFS9 diff --git a/build/web/WEB-INF/classes/jsp/detail.jsp b/build/web/WEB-INF/classes/jsp/detail.jsp index 6f8c5aa..398d510 100644 --- a/build/web/WEB-INF/classes/jsp/detail.jsp +++ b/build/web/WEB-INF/classes/jsp/detail.jsp @@ -9,47 +9,89 @@ <%@include file="header.jsp" %> -
-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

+ + +

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
+ +

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
+
+ + - + + + +
diff --git a/build/web/WEB-INF/classes/jsp/resultat.jsp b/build/web/WEB-INF/classes/jsp/resultat.jsp index 3e70189..e3b1710 100644 --- a/build/web/WEB-INF/classes/jsp/resultat.jsp +++ b/build/web/WEB-INF/classes/jsp/resultat.jsp @@ -15,42 +15,47 @@ <%@include file="header.jsp" %> - - - - - - - - - - - - - - - -
${col}
${v} - -
- - - -
+ + +

${error}

+
+ + + + + + + - - + + + + + + + + + + + + + + - <%-- - - - - - - - --%> - -
${col}
+
+ + + +
+
${v} +
+ + + +
+
${client.customerId}${client.discountCode}${client.zip}${client.name}
- +
+ + diff --git a/build/web/WEB-INF/jsp/detail.jsp b/build/web/WEB-INF/jsp/detail.jsp index 6f8c5aa..398d510 100644 --- a/build/web/WEB-INF/jsp/detail.jsp +++ b/build/web/WEB-INF/jsp/detail.jsp @@ -9,47 +9,89 @@ <%@include file="header.jsp" %> -
-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

+ + +

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
+ +

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
+
+ + - + + + +
diff --git a/build/web/WEB-INF/jsp/resultat.jsp b/build/web/WEB-INF/jsp/resultat.jsp index 3e70189..e3b1710 100644 --- a/build/web/WEB-INF/jsp/resultat.jsp +++ b/build/web/WEB-INF/jsp/resultat.jsp @@ -15,42 +15,47 @@ <%@include file="header.jsp" %> - - - - - - - - - - - - - - - -
${col}
${v} - -
- - - -
+ + +

${error}

+
+ + + + + + + - - + + + + + + + + + + + + + + - <%-- - - - - - - - --%> - -
${col}
+
+ + + +
+
${v} +
+ + + +
+
${client.customerId}${client.discountCode}${client.zip}${client.name}
- +
+ + diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml index 6807a2b..e9dbd15 100644 --- a/nbproject/private/private.xml +++ b/nbproject/private/private.xml @@ -2,6 +2,12 @@ - + + file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/src/java/DAO/Product.hbm.xml + file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/web/WEB-INF/jsp/menu.jsp + file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/web/WEB-INF/jsp/resultat.jsp + file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/src/java/controller/BddController.java + file:/C:/Users/flifloo/Nextcloud/IUT/JEE/JEE%20Project/Code/src/java/DAO/MagasinHelper.java + diff --git a/src/java/DAO/MagasinHelper.java b/src/java/DAO/MagasinHelper.java index 3745e72..a0066e0 100644 --- a/src/java/DAO/MagasinHelper.java +++ b/src/java/DAO/MagasinHelper.java @@ -46,6 +46,28 @@ public class MagasinHelper { return resultat; } + public Product getProduct(int id){ + Product resultat=null; + Transaction tx=null; + try{ + if(!session.isOpen())session=HibernateUtil.getSessionFactory().openSession(); + session.flush(); + + tx=session.beginTransaction(); + Query q=session.createQuery("from Product p where p.productId = :_id"); + q.setInteger("_id", id); + resultat=(Product)q.list().iterator().next(); + + + } catch (Exception e) { + e.printStackTrace(); + } finally{ + if (session.isOpen())session.close(); + } + + return resultat; + } + public List getClients(){ List resultat=null; Transaction tx=null; @@ -227,29 +249,7 @@ public Customer getClient(int id){ return client; } -public Customer getClient(String name){ - - - Customer client=null; - Transaction tx=null; - try{ - if(!session.isOpen())session=HibernateUtil.getSessionFactory().openSession(); - session.flush(); - tx=session.beginTransaction(); - Query q=session.createQuery(" from Customer a where a.customerId =:_name"); - q.setString("_name", name); - client=(Customer)q.list().iterator().next(); - } - catch (Exception e) { - System.out.println("erreur"+e); - e.printStackTrace(); - } - finally{ - if (session.isOpen())session.close(); - } - - return client; -} + public void deleteCustomer (int _id) { Transaction tx=null; @@ -273,7 +273,29 @@ public void deleteCustomer (int _id) { } } - public List getAchats(int id){ + + public List getPurchase(){ + List resultat=null; + Transaction tx=null; + try{ + if(!session.isOpen())session=HibernateUtil.getSessionFactory().openSession(); + session.flush(); + + tx=session.beginTransaction(); + Query q=session.createQuery("select po.customerId, po.productId, po.quantity, po.shippingCost, po.salesDate, po.shippingDate, po.freightCompany from PurchaseOrder po"); + resultat=(List)q.list(); + } + catch (Exception e) { + e.printStackTrace(); + } + finally{ + if (session.isOpen())session.close(); + } + + return resultat; +} + + public List getPurchase(int id){ List resultat=null; Transaction tx=null; try{ diff --git a/src/java/controller/BddController.java b/src/java/controller/BddController.java index ee6de7b..1ead67a 100644 --- a/src/java/controller/BddController.java +++ b/src/java/controller/BddController.java @@ -29,26 +29,29 @@ public class BddController extends MultiActionController { private User utilisateur; private HttpSession session; public BddController() {} + + private void sessionInit(HttpServletRequest request) { + if (login == null) + login=request.getUserPrincipal().getName(); + if (utilisateur == null) + utilisateur =new User(login); + + if (session == null) { + session=request.getSession(); + session.setAttribute("user", utilisateur); + } + } public ModelAndView menu(HttpServletRequest request, HttpServletResponse response){ - - login=request.getUserPrincipal().getName(); - - //pwd=request.getParameter("password"); - - utilisateur =new User(login); - - session=request.getSession(); - session.setAttribute("user", utilisateur); + sessionInit(request); System.out.println ("nbuser="+User.getCompteur()); return new ModelAndView("menu").addObject("user",utilisateur); } public ModelAndView logout(HttpServletRequest request, HttpServletResponse response){ - - + sessionInit(request); request.getSession().invalidate(); @@ -58,46 +61,78 @@ public class BddController extends MultiActionController { public ModelAndView list(HttpServletRequest request, HttpServletResponse response) throws Exception { - + sessionInit(request); String type = request.getParameter("type"); ModelAndView mv = new ModelAndView("resultat"); - + mv.addObject("user",session.getAttribute("user")); mv.addObject("type", type); switch (type) { case "customer": mv.addObject("results", new MagasinHelper().getClients()); + mv.addObject("colonnes", Arrays.asList("customerId", "name", "addressline1", "addressline2", "zip", "rate")); break; case "product": mv.addObject("results", new MagasinHelper().getProducts()); + mv.addObject("colonnes", Arrays.asList("productId", "manufacturerId", "productCode", "purchaseCost", "quantityOnHand", "markup", "available", "description")); break; + case "purchase": + mv.addObject("results", new MagasinHelper().getPurchase()); + mv.addObject("colonnes", Arrays.asList("customerId", "productId", "quantity", "shippingCost", "salesDate", "shippingDate", "freightCompany")); + mv.addObject("relation", new HashMap() {{ + put("customerId", "customer"); + put("productId", "product"); + }}); + break; + default: + mv.addObject("error", "Type not found"); } return mv; } public ModelAndView add(HttpServletRequest request, HttpServletResponse response) throws Exception { - + sessionInit(request); ModelAndView mv = new ModelAndView("form_inscription"); - mv.addObject("user",session.getAttribute("user")); + mv.addObject("user",session.getAttribute("user")); mv.addObject("discount",new MagasinHelper().getDiscountCode()); mv.addObject("code",new MagasinHelper().getZipCode()); return mv; } public ModelAndView detail(HttpServletRequest request, HttpServletResponse response) throws Exception { + sessionInit(request); + String type = request.getParameter("type"); ModelAndView mv = new ModelAndView("detail"); mv.addObject("user",session.getAttribute("user")); - mv.addObject("code",new MagasinHelper().getDiscountCode()); - mv.addObject("cpostaux",new MagasinHelper().getZipCode()); - mv.addObject("client",new MagasinHelper().getClient(request.getParameter("num"))); + mv.addObject("type", type); + + switch (type) { + case "customer": + mv.addObject("result", new MagasinHelper().getClient(Integer.parseInt(request.getParameter("num")))); + mv.addObject("colonnes", Arrays.asList("customerId", "name", "addressline1", "addressline2", "zip", "rate")); + mv.addObject("code",new MagasinHelper().getDiscountCode()); + mv.addObject("cpostaux",new MagasinHelper().getZipCode()); + break; + case "product": + mv.addObject("result", new MagasinHelper().getProduct(Integer.parseInt(request.getParameter("num")))); + mv.addObject("colonnes", Arrays.asList("productId", "manufacturerId", "productCode", "purchaseCost", "quantityOnHand", "markup", "available", "description")); + break; + case "purchase": + mv.addObject("result", new MagasinHelper().getPurchase(Integer.parseInt(request.getParameter("num")))); + mv.addObject("colonnes", Arrays.asList("customerId", "productId", "quantity", "shippingCost", "salesDate", "shippingDate", "freightCompany")); + break; + default: + mv.addObject("error", "Type not found"); + } + return mv; } public ModelAndView find(HttpServletRequest request, HttpServletResponse response) throws Exception { - + sessionInit(request); ModelAndView mv ; MagasinHelper requeteur = new MagasinHelper(); @@ -117,10 +152,12 @@ public class BddController extends MultiActionController { } public ModelAndView formfind(HttpServletRequest request, HttpServletResponse response) throws Exception { + sessionInit(request); return new ModelAndView("recherche"); } public ModelAndView achats(HttpServletRequest request, HttpServletResponse response) throws Exception { + sessionInit(request); ModelAndView mv = new ModelAndView("achats"); @@ -128,12 +165,13 @@ public class BddController extends MultiActionController { mv.addObject("user",session.getAttribute("user")); System.out.println("num "+Integer.parseInt(request.getParameter("numero"))); - mv.addObject("achats",new MagasinHelper().getAchats(Integer.parseInt(request.getParameter("numero")))); + mv.addObject("achats",new MagasinHelper().getPurchase(Integer.parseInt(request.getParameter("numero")))); return mv; } public ModelAndView save(HttpServletRequest request, HttpServletResponse response) throws Exception { + sessionInit(request); String param1 = request.getParameter("nom"); String param2 = request.getParameter("adresse"); String param3 = request.getParameter("telephone"); @@ -146,6 +184,7 @@ public class BddController extends MultiActionController { } public ModelAndView delete(HttpServletRequest request, HttpServletResponse response) throws Exception { + sessionInit(request); new MagasinHelper().deleteCustomer(Integer.parseInt(request.getParameter("numero"))); return new ModelAndView("confirm").addObject("confirm","suppression effectuée"); @@ -153,6 +192,7 @@ public class BddController extends MultiActionController { } public ModelAndView update(HttpServletRequest request, HttpServletResponse response) throws Exception { + sessionInit(request); String param1 = request.getParameter("numero"); String param2 = request.getParameter("code_remise"); String param3 = request.getParameter("nom"); diff --git a/web/WEB-INF/jsp/detail.jsp b/web/WEB-INF/jsp/detail.jsp index 6f8c5aa..398d510 100644 --- a/web/WEB-INF/jsp/detail.jsp +++ b/web/WEB-INF/jsp/detail.jsp @@ -9,47 +9,89 @@ <%@include file="header.jsp" %> -
-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

-

- - -

+ + +

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
+ +

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+

+ + +

+
+
+ + - + + + +
diff --git a/web/WEB-INF/jsp/resultat.jsp b/web/WEB-INF/jsp/resultat.jsp index 3e70189..e3b1710 100644 --- a/web/WEB-INF/jsp/resultat.jsp +++ b/web/WEB-INF/jsp/resultat.jsp @@ -15,42 +15,47 @@ <%@include file="header.jsp" %> - - - - - - - - - - - - - - - -
${col}
${v} - -
- - - -
+ + +

${error}

+
+ + + + + + + - - + + + + + + + + + + + + + + - <%-- - - - - - - - --%> - -
${col}
+
+ + + +
+
${v} +
+ + + +
+
${client.customerId}${client.discountCode}${client.zip}${client.name}
- +
+ +