From bdd9dba62648cbfda8f01cecee8dc20289b05526 Mon Sep 17 00:00:00 2001 From: Ethanell Date: Wed, 29 Jun 2022 22:08:01 +0200 Subject: [PATCH] Add discount and prodCode to list and detail --- .../WEB-INF/classes/DAO/MagasinHelper.class | Bin 10786 -> 12856 bytes .../classes/controller/BddController.class | Bin 7562 -> 8124 bytes build/web/WEB-INF/classes/jsp/detail.jsp | 37 ++++++- build/web/WEB-INF/classes/jsp/resultat.jsp | 4 +- build/web/WEB-INF/jsp/detail.jsp | 34 +++++- build/web/WEB-INF/jsp/resultat.jsp | 4 +- src/java/DAO/MagasinHelper.java | 99 +++++++++++++++++- src/java/controller/BddController.java | 19 +++- web/WEB-INF/jsp/detail.jsp | 34 +++++- web/WEB-INF/jsp/resultat.jsp | 4 +- 10 files changed, 214 insertions(+), 21 deletions(-) diff --git a/build/web/WEB-INF/classes/DAO/MagasinHelper.class b/build/web/WEB-INF/classes/DAO/MagasinHelper.class index e3f950b2ded65dfb143c767e403db252ccae4fa3..21edcfdb8d89bae4c4ee281b97266fc6addb5fa7 100644 GIT binary patch literal 12856 zcmd5>YhV=B75?sKliehXXn460brH}ILQ+vt!lTll63GMQC4$DuW=Mu?c9(qsL5gjy z3ZnG|D#q3)P~TuxjHqaB?Mtn#R$HyMYHiiFKB_HRtM-CJG^+*i^pW=k3D$Yi=TM$QxBdfz-atTzUJqJ_yv9`|9&Ogo|J7* zdGWNo{@ROYy!ed=zxCo-51uQ)c>KvhRCiZ@$p46&uCCKA*_bG4Wu zpRGoBqQ#(`18SyCt*@xnnzgtQp00&7qTBjCh?O_V2pfqh0y!n4=L#G|DQCta zP03&)PHB^Ee1ljb(Qra`YEqB2^F4ynSxBi3pSV1zM-xPuecqTJPlgg&Lf}9fP}XK$ ziRA*rx-2_8riJ5L&{|-ybKC9F)YcE{vfLzvfhD&>yWgyY7HqB6q6#bze(%8_XrCUu zXlf$0M}gs4kdlbnS1ZV%!o8GKk9NFIz-2TMifVy=jt&|;hfBSO3_Y9y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DRU;(z%`&xKr z%I9`+j(pmqU=NM3mqzHM5%$pt_t6OVGYTHS0&y5EVn6)i0MG8jI3OOjMZs{3Y5ZIz l&NPP-WxxT&FY+&y2buIQBZBrQs1qkqlPcZ+DwSgm@jpVE`i1}i diff --git a/build/web/WEB-INF/classes/controller/BddController.class b/build/web/WEB-INF/classes/controller/BddController.class index f1b11c08862179824c7771a7b8350be77da30b44..a273922326ed75ce758c3267bf86b22c548307ae 100644 GIT binary patch literal 8124 zcmdT}d0-Uhb$@TQyYp!^NMf)s!e9%`A&|v#S&qRth(!bu39yC1!Zt8kjiiCSn4J}1 zY-2mIYtuN*(aTNJCT$vgG_4!k0zzXawo|uBoHmDZHtyv#O;a~LlC&vxoZp*EyC6#3 z|GM_h_kC}^@7=%mJuRR6*(aYNqE&oinlYM|5f$p$(@e7QiB4;1~gqSqAti=rPY`d3B&rs&@l{fE5# zk)j_f`iY|dRP3#; zFQk+_8Wig?PE*_{W0T@$8K=v`P&`A%OBA=rI1~2qr81i(k581dle4$KkYW$XRZB%ymoY&3Fv>JFq!%qEx z$xfztrZ{XdHTBsAYilJxWH~#`p&TeiUomUucAAbY>wp+{$84xPyDwWTxK1&bvz+vX z;o(fQf`EoVn_h@vTH1bLl{_79v<_CRvb$E4(HwulwD=c1#WZceHM0l$%~Ggh-YQg> zj{Tx?FDj^9Di+Gt+9iEOXEa?dNnl1CGjAO#ItS8+tf9!+{qSV2yD+@dwhqA$%CY>T zOc&QB5Q6X^8;TV;E{=f9;2tR<8nOI1)3P_Gf|qYy8eap10{Bd+p2JzIlEap3+Bt|Cu?tw&dqMD1ZARb5?rrIQbJQ%`h0Rv3gnR@3Vcba3$@}}0W_HYU zkrnZ>ISy5mB@^yh5l&WylU3nlbvOYQ{LNjMz;~7_$19~_BzpMj8mK)`tT)q@>3l7((Ri)S*YP@?-a+pK;HvS0-F&@H_tE`2zm?ZR?FwFN z+^zEl&gk@R`W1~g>fFPdm@YjRk{c>^ZrB0{wZf2`Tc`8ec(c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TUktcj%$%w?7ViB8S5t~90s~J5NGrB+uI)@ESF&dsZhgG!~ z4%>?kYh)@0!#1PS8V;d8?X4dfol~+03GPX9eu@%*j0x^EYrrRP2v1ifxS?2=p;(up zIKd6fkl=nP(n{*6lXi3=OmG3v`a7&qU*-+O-dHe8c35sOOLbU>gPGA`9SLSCR3{GL zY~oO}Q9FTLvzkEO2V#NdvIeLVs#5qc(M|F%r9aKa2JhrlIksGbNF%2lBAiY@lF!0-MEz|JW06S&UW}2 z&eSw~eKIl-j)wT^s1C|$PCHtyoHtFmpkw?TSzka4zEFj~j#!C~Sc#4q@b}A+Aks|{ zb;oon^i%*UdMflqoFz8UQ=#|hsnC1$ROmew`>c*YjTV0E>nEJfb0|%q+??>8muyZo z8_lY@ZUU8RJ&#S(a}63O*%ztjm*~VV(}^$A>|de5U!tjBrjftOUgZ_sjju6jeBHOh zNT5w@hf}c~PQ}iAFm|RFJ98{{=7HFm`(kJA2%WiuJb#65t?o!_@F_}JL!gawtY?Rk I=E%?g0N0s2IRF3v diff --git a/build/web/WEB-INF/classes/jsp/detail.jsp b/build/web/WEB-INF/classes/jsp/detail.jsp index 25094f9..c7a0739 100644 --- a/build/web/WEB-INF/classes/jsp/detail.jsp +++ b/build/web/WEB-INF/classes/jsp/detail.jsp @@ -33,10 +33,10 @@

- - - +

@@ -92,7 +92,6 @@

-

result: ${result}

@@ -123,7 +122,7 @@

- +

@@ -134,6 +133,34 @@

+ +

+ + +

+

+ + +

+
+ +

+ + +

+

+ + +

+

+ + +

+
diff --git a/build/web/WEB-INF/classes/jsp/resultat.jsp b/build/web/WEB-INF/classes/jsp/resultat.jsp index e3b1710..7c7897a 100644 --- a/build/web/WEB-INF/classes/jsp/resultat.jsp +++ b/build/web/WEB-INF/classes/jsp/resultat.jsp @@ -35,7 +35,7 @@
- +
@@ -48,7 +48,7 @@
- +
diff --git a/build/web/WEB-INF/jsp/detail.jsp b/build/web/WEB-INF/jsp/detail.jsp index 17956f9..c7a0739 100644 --- a/build/web/WEB-INF/jsp/detail.jsp +++ b/build/web/WEB-INF/jsp/detail.jsp @@ -33,10 +33,10 @@

- - - +

@@ -133,6 +133,34 @@

+ +

+ + +

+

+ + +

+
+ +

+ + +

+

+ + +

+

+ + +

+
diff --git a/build/web/WEB-INF/jsp/resultat.jsp b/build/web/WEB-INF/jsp/resultat.jsp index e3b1710..7c7897a 100644 --- a/build/web/WEB-INF/jsp/resultat.jsp +++ b/build/web/WEB-INF/jsp/resultat.jsp @@ -35,7 +35,7 @@
- +
@@ -48,7 +48,7 @@
- +
diff --git a/src/java/DAO/MagasinHelper.java b/src/java/DAO/MagasinHelper.java index c766991..458a469 100644 --- a/src/java/DAO/MagasinHelper.java +++ b/src/java/DAO/MagasinHelper.java @@ -180,6 +180,27 @@ public class MagasinHelper { return resultat; } + public List getProductCodesColums(){ + List resultat=null; + Transaction tx=null; + try{ + if(!session.isOpen())session=HibernateUtil.getSessionFactory().openSession(); + session.flush(); + + tx=session.beginTransaction(); + Query q=session.createQuery("select p.prodCode, p.discountCode, p.description from ProductCode p"); + resultat=q.list(); + + + } catch (Exception e) { + e.printStackTrace(); + } finally{ + if (session.isOpen())session.close(); + } + + return resultat; + } + public List getProductCodes(){ List resultat=null; Transaction tx=null; @@ -200,8 +221,30 @@ public class MagasinHelper { return resultat; } + + public ProductCode getProductCode(String id){ + ProductCode resultat=null; + Transaction tx=null; + try{ + if(!session.isOpen())session=HibernateUtil.getSessionFactory().openSession(); + session.flush(); + + tx=session.beginTransaction(); + Query q=session.createQuery("from ProductCode p where p.prodCode = :_id"); + q.setString("_id", id); + resultat=(ProductCode)q.list().iterator().next(); + + + } catch (Exception e) { + e.printStackTrace(); + } finally{ + if (session.isOpen())session.close(); + } -public List getDiscountCode(){ + return resultat; + } + +public List getDiscountCodesColums(){ List resultat=null; Transaction tx=null; try{ @@ -210,7 +253,7 @@ List resultat=null; session.flush(); tx=session.beginTransaction(); - Query q=session.createQuery("select a.discountCode from DiscountCode a"); + Query q=session.createQuery("select dc.discountCode, dc.rate from DiscountCode dc"); resultat=q.list(); } catch (Exception e) { @@ -225,6 +268,58 @@ List resultat=null; } + +public List getDiscountCodes(){ + List resultat=null; + Transaction tx=null; + try{ + if(!session.isOpen()) + session=HibernateUtil.getSessionFactory().openSession(); + session.flush(); + + tx=session.beginTransaction(); + Query q=session.createQuery(" from DiscountCode dc"); + resultat=q.list(); + } + catch (Exception e) { + e.printStackTrace(); + } + finally{ + if (session.isOpen())session.close(); + + } + + return resultat; + + +} + +public DiscountCode getDiscountCode(char c){ + DiscountCode resultat=null; + Transaction tx=null; + try{ + if(!session.isOpen()) + session=HibernateUtil.getSessionFactory().openSession(); + session.flush(); + + tx=session.beginTransaction(); + Query q=session.createQuery(" from DiscountCode dc where dc.discountCode = :_id"); + q.setCharacter("_id", c); + resultat=(DiscountCode)q.list().iterator().next(); + } + catch (Exception e) { + e.printStackTrace(); + } + finally{ + if (session.isOpen())session.close(); + + } + + return resultat; + + +} + public List getMicroMarket(){ List resultat=null; Transaction tx=null; diff --git a/src/java/controller/BddController.java b/src/java/controller/BddController.java index 56fc3fe..da41b5a 100644 --- a/src/java/controller/BddController.java +++ b/src/java/controller/BddController.java @@ -84,6 +84,14 @@ public class BddController extends MultiActionController { put("productId", "product"); }}); break; + case "discount": + mv.addObject("results", new MagasinHelper().getDiscountCodesColums()); + mv.addObject("colonnes", Arrays.asList("discountCode", "rate")); + break; + case "prodCode": + mv.addObject("results", new MagasinHelper().getProductCodesColums()); + mv.addObject("colonnes", Arrays.asList("prodCode", "discountCode", "description")); + break; default: mv.addObject("error", "Type not found"); } @@ -97,7 +105,7 @@ public class BddController extends MultiActionController { ModelAndView mv = new ModelAndView("form_inscription"); mv.addObject("user",session.getAttribute("user")); - mv.addObject("discount",new MagasinHelper().getDiscountCode()); + mv.addObject("discount",new MagasinHelper().getDiscountCodesColums()); mv.addObject("code",new MagasinHelper().getZipCode()); return mv; } @@ -112,7 +120,7 @@ public class BddController extends MultiActionController { switch (type) { case "customer": mv.addObject("result", new MagasinHelper().getClient(Integer.parseInt(request.getParameter("num")))); - mv.addObject("code",new MagasinHelper().getDiscountCode()); + mv.addObject("code",new MagasinHelper().getDiscountCodes()); mv.addObject("cpostaux",new MagasinHelper().getZipCode()); break; case "product": @@ -125,6 +133,13 @@ public class BddController extends MultiActionController { mv.addObject("customers", new MagasinHelper().getClients()); mv.addObject("products", new MagasinHelper().getProducts()); break; + case "discount": + mv.addObject("result", new MagasinHelper().getDiscountCode(request.getParameter("num").charAt(0))); + break; + case "prodCode": + mv.addObject("result", new MagasinHelper().getProductCode(request.getParameter("num"))); + mv.addObject("code",new MagasinHelper().getDiscountCodes()); + break; default: mv.addObject("error", "Type not found"); } diff --git a/web/WEB-INF/jsp/detail.jsp b/web/WEB-INF/jsp/detail.jsp index 17956f9..c7a0739 100644 --- a/web/WEB-INF/jsp/detail.jsp +++ b/web/WEB-INF/jsp/detail.jsp @@ -33,10 +33,10 @@

- - - +

@@ -133,6 +133,34 @@

+ +

+ + +

+

+ + +

+
+ +

+ + +

+

+ + +

+

+ + +

+
diff --git a/web/WEB-INF/jsp/resultat.jsp b/web/WEB-INF/jsp/resultat.jsp index e3b1710..7c7897a 100644 --- a/web/WEB-INF/jsp/resultat.jsp +++ b/web/WEB-INF/jsp/resultat.jsp @@ -35,7 +35,7 @@
- +
@@ -48,7 +48,7 @@
- +