From f4e33caffeafeed85d65495ed19a69fc3e138509 Mon Sep 17 00:00:00 2001 From: abazov73 <92822431+abazov73@users.noreply.github.com> Date: Tue, 2 May 2023 17:01:30 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=8F=D1=82=D0=B0=D1=8F=20=D0=BB=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD=D0=B0=D1=8F=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0.=20=D0=93=D0=BE=D1=82?= =?UTF-8?q?=D0=BE=D0=B2=D0=BE.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/ipLab/build.gradle | 2 +- backend/ipLab/data.mv.db | Bin 126976 -> 94208 bytes .../Controllers/ProductController.java | 4 +- .../Controllers/StoreController.java | 6 +- .../ipLab/StoreDataBase/DTO/CustomerDTO.java | 10 +++ .../ipLab/StoreDataBase/DTO/OrderedDTO.java | 20 ++++- .../ipLab/StoreDataBase/DTO/ProductDTO.java | 8 +- .../ipLab/StoreDataBase/DTO/StoreDTO.java | 6 +- .../MVC/OrderedMVCController.java | 65 ++++++++++++++ .../MVC/ProductMVCController.java | 63 +++++++++++++ .../StoreDataBase/MVC/StoreMVCController.java | 84 ++++++++++++++++++ .../ipLab/src/main/resources/public/logo.png | Bin 0 -> 9949 bytes .../main/resources/templates/addToStore.html | 35 ++++++++ .../src/main/resources/templates/default.html | 12 ++- .../main/resources/templates/order-edit.html | 42 +++++++++ .../src/main/resources/templates/order.html | 37 ++++++++ .../resources/templates/product-edit.html | 27 ++++++ .../src/main/resources/templates/product.html | 53 +++++++++++ .../main/resources/templates/store-edit.html | 27 ++++++ .../src/main/resources/templates/store.html | 51 +++++++++++ frontend/src/services/DataService.js | 1 + 21 files changed, 537 insertions(+), 16 deletions(-) create mode 100644 backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/MVC/OrderedMVCController.java create mode 100644 backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/MVC/ProductMVCController.java create mode 100644 backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/MVC/StoreMVCController.java create mode 100644 backend/ipLab/src/main/resources/public/logo.png create mode 100644 backend/ipLab/src/main/resources/templates/addToStore.html create mode 100644 backend/ipLab/src/main/resources/templates/order-edit.html create mode 100644 backend/ipLab/src/main/resources/templates/order.html create mode 100644 backend/ipLab/src/main/resources/templates/product-edit.html create mode 100644 backend/ipLab/src/main/resources/templates/product.html create mode 100644 backend/ipLab/src/main/resources/templates/store-edit.html create mode 100644 backend/ipLab/src/main/resources/templates/store.html diff --git a/backend/ipLab/build.gradle b/backend/ipLab/build.gradle index 292d83d..8e65326 100644 --- a/backend/ipLab/build.gradle +++ b/backend/ipLab/build.gradle @@ -1,6 +1,6 @@ plugins { id 'java' - id 'org.springframework.boot' version '3.0.2' + id 'org.springframework.boot' version '3.0.1' id 'io.spring.dependency-management' version '1.1.0' } diff --git a/backend/ipLab/data.mv.db b/backend/ipLab/data.mv.db index dc923618acf818e08c4085955e4932a1d4662b6d..fcff4ed4c8b4fb24dcd34e5c5e41f1106c932e8d 100644 GIT binary patch delta 13033 zcmeHOe{dDYeZPIu(>qE067U2zmJ5awV+7pZ{vwGV*$5@%D4@H0BHWK|Y$D96iuZ(Am+_H<32Kj=y)qBEnd!64_e9 zcviDUU;E1QD7tL`>Fw}D@|jljy=7=w&1BBIe<7pl3%OtXLTs9%`_SN_gMpuaaok=% z+@F1UQ3@=ULg;l5dETM>#h~};9)r|QpmdIt`Gbk?mJ`6c_w9WkxDABQxeY%-W4jVP zCdt&qz_|x^<4M6ZnH6TMNf8_uXT>y9%sIweK~ROMg2!R1m>cjSN+|$)Gy`fS62!bw zgs>LkMS`sqP>KiE5B!<_Bs|^>WoRjQ+$BYHHH`4AWFe{{X8G#-<#>jhG%&-KXJ-w9 zJu`3kcHXc8!$|L7%CMI<7ma9a#O2W6<x7UBNtre6s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7C1EcN)wk8XL< zF<3d}90i)r~KgBE>*3{=~X#1o72eZ%yTBs?4Neo^yk#*4l={e!6ZEvgl9z8 zrw;~Gl^JJh7CtwCW}D@Y&N=S>piAMe;2C0PbE=&!sAV&BT~zU0aNyuj^wPCa{^}`z zdT9EJE>fLUOYClUa(AmY6F7500O~W39@dSmR|VH~ zizSP#*EsvTh4&l&py-Gu55~(N(SsoZ&m(A?Q}v);`=H6+$R5NxLh}dB1s=pQOVxuH zX4oM z7MoX=?I+c)X*@8Pb^Rn-m1Va^nmiaUU`2!p$3j-rP~O3{+!im4*So5oGc(-QYTlB**-pT$umQB?x*~06*XrJ(%iV(78XnzDH>E zmk#Rf4h1}f`=if5rUQ~fMgaJYF!VJb-|*83*%`b{HQ9)smq8=j$M45-VM0^imRa0% zNR$MH?i(?OYvKM4J-K^EEsOOU#Erq7=4)_C8Jj7<2^{>riMS6LmiifA?jR#(X_ZTV z|5JjczK{ft09p(!4}^OZIsy0}4n!w{Pyv?*L>+$&E}s(WVAWfA%Fhy-G5Y`=5uy0$ z%(66v%lpEcKX+A{dh@rlJs-p6V=@6#;#4{@HwBSa43~EjTNOuf;9af}H#6@0K?5Vw zuAwo3%OiAal_^d7Sw-drDO_IV0_w$IR%+)Vj1Ll^6=SAi8lf)&Q8iH$&$*a#@hDQ&^7!{aeYk}w0cb{*JX!Cy8u0-Oh0*c3@@QCj-?K@y|c z^Rp2?6pbPLIo!;IcT*tzdFD6}{#-(rhVYLC1_*zI9ne^N6{`Wl9}qMk`y&XNbeXjB zt7k?Ckd9yH2>pl=`61^(&Vif*IR|nMyrwx2 getProducts() { return products; } diff --git a/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/MVC/OrderedMVCController.java b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/MVC/OrderedMVCController.java new file mode 100644 index 0000000..10018f9 --- /dev/null +++ b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/MVC/OrderedMVCController.java @@ -0,0 +1,65 @@ +package com.example.ipLab.StoreDataBase.MVC; + +import com.example.ipLab.StoreDataBase.DTO.CustomerDTO; +import com.example.ipLab.StoreDataBase.DTO.OrderedDTO; +import com.example.ipLab.StoreDataBase.DTO.ProductDTO; +import com.example.ipLab.StoreDataBase.Service.CustomerService; +import com.example.ipLab.StoreDataBase.Service.OrderService; +import com.example.ipLab.StoreDataBase.Service.ProductService; +import jakarta.validation.Valid; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.*; + +@Controller +@RequestMapping("/order") +public class OrderedMVCController { + private final OrderService orderedService; + private final ProductService productService; + private final CustomerService customerService; + + public OrderedMVCController(OrderService orderedService, ProductService productService, CustomerService customerService){ + this.productService = productService; + this.customerService = customerService; + this.orderedService = orderedService; + } + + @GetMapping + public String getOrdereds(Model model) { + model.addAttribute("orders", + orderedService.getAllOrders().stream() + .map(OrderedDTO::new) + .toList()); + return "order"; + } + + @GetMapping(value = {"/edit/", "/edit/{id}"}) + public String editOrdered(@PathVariable(required = false) Long id, + Model model) { + model.addAttribute("orderDTO", new OrderedDTO()); + model.addAttribute("customers", customerService.getAllCustomers().stream().map(CustomerDTO::new).toList()); + model.addAttribute("products", productService.getAllProductsWithStores().stream().map(ProductDTO::new).toList()); + return "order-edit"; + } + + @PostMapping(value = {"/", "/{id}"}) + public String saveOrdered(@RequestParam(value = "productId") Long productId, + @RequestParam(value = "customerId") Long customerId, + @ModelAttribute @Valid OrderedDTO orderedDto, + BindingResult bindingResult, + Model model) { + if (bindingResult.hasErrors()) { + model.addAttribute("errors", bindingResult.getAllErrors()); + return "ordered-edit"; + } + orderedService.addOrder(productService.getProduct(productId), customerService.getCustomer(customerId), orderedDto.getQuantity()); + return "redirect:/order"; + } + + @PostMapping("/delete/{id}") + public String deleteOrdered(@PathVariable Long id) { + orderedService.deleteOrder(id); + return "redirect:/order"; + } +} diff --git a/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/MVC/ProductMVCController.java b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/MVC/ProductMVCController.java new file mode 100644 index 0000000..305ff2f --- /dev/null +++ b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/MVC/ProductMVCController.java @@ -0,0 +1,63 @@ +package com.example.ipLab.StoreDataBase.MVC; + +import com.example.ipLab.StoreDataBase.DTO.ProductDTO; +import com.example.ipLab.StoreDataBase.Service.ProductService; +import jakarta.validation.Valid; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.*; + +@Controller +@RequestMapping("/product") +public class ProductMVCController { + private final ProductService productService; + + public ProductMVCController(ProductService productService) { + this.productService = productService; + } + + @GetMapping + public String getProducts(Model model) { + model.addAttribute("products", + productService.getAllProducts().stream() + .map(ProductDTO::new) + .toList()); + return "product"; + } + + @GetMapping(value = {"/edit/", "/edit/{id}"}) + public String editProduct(@PathVariable(required = false) Long id, + Model model) { + if (id == null || id <= 0) { + model.addAttribute("productDTO", new ProductDTO()); + } else { + model.addAttribute("productId", id); + model.addAttribute("productDTO", new ProductDTO(productService.getProduct(id))); + } + return "product-edit"; + } + + @PostMapping(value = {"/", "/{id}"}) + public String saveProduct(@PathVariable(required = false) Long id, + @ModelAttribute @Valid ProductDTO productDto, + BindingResult bindingResult, + Model model) { + if (bindingResult.hasErrors()) { + model.addAttribute("errors", bindingResult.getAllErrors()); + return "product-edit"; + } + if (id == null || id <= 0) { + productService.addProduct(productDto.getproductName()); + } else { + productService.updateProduct(id, productDto.getproductName()); + } + return "redirect:/product"; + } + + @PostMapping("/delete/{id}") + public String deleteProduct(@PathVariable Long id) { + productService.deleteProduct(id); + return "redirect:/product"; + } +} diff --git a/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/MVC/StoreMVCController.java b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/MVC/StoreMVCController.java new file mode 100644 index 0000000..73554ad --- /dev/null +++ b/backend/ipLab/src/main/java/com/example/ipLab/StoreDataBase/MVC/StoreMVCController.java @@ -0,0 +1,84 @@ +package com.example.ipLab.StoreDataBase.MVC; + +import com.example.ipLab.StoreDataBase.DTO.CustomerDTO; +import com.example.ipLab.StoreDataBase.DTO.ProductDTO; +import com.example.ipLab.StoreDataBase.DTO.StoreDTO; +import com.example.ipLab.StoreDataBase.Service.ProductService; +import com.example.ipLab.StoreDataBase.Service.StoreService; +import jakarta.validation.Valid; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.*; + +@Controller +@RequestMapping("/store") +public class StoreMVCController { + private final StoreService storeService; + private final ProductService productService; + + public StoreMVCController(StoreService storeService, ProductService productService) { + this.storeService = storeService; + this.productService = productService; + } + + @GetMapping + public String getStores(Model model) { + model.addAttribute("stores", + storeService.getAllStores().stream() + .map(StoreDTO::new) + .toList()); + return "store"; + } + + @GetMapping(value = {"/edit/", "/edit/{id}"}) + public String editStore(@PathVariable(required = false) Long id, + Model model) { + if (id == null || id <= 0) { + model.addAttribute("storeDTO", new StoreDTO()); + } else { + model.addAttribute("storeId", id); + model.addAttribute("storeDTO", new StoreDTO(storeService.getStore(id))); + } + return "store-edit"; + } + + @GetMapping(value = "/addToStore") + public String addToStore(@PathVariable(required = false) Long id, + Model model) { + model.addAttribute("stores", storeService.getAllStores().stream().map(StoreDTO::new).toList()); + model.addAttribute("products", productService.getAllProductsWithoutStores().stream().map(ProductDTO::new).toList()); + return "addToStore"; + } + + @PostMapping(value = {"/", "/{id}"}) + public String saveStore(@PathVariable(required = false) Long id, + @ModelAttribute @Valid StoreDTO storeDto, + BindingResult bindingResult, + Model model) { + if (bindingResult.hasErrors()) { + model.addAttribute("errors", bindingResult.getAllErrors()); + return "store-edit"; + } + if (id == null || id <= 0) { + storeService.addStore(storeDto.getstoreName()); + } else { + storeService.updateStore(id, storeDto.getstoreName()); + } + return "redirect:/store"; + } + + @PostMapping("/add") + public String addProduct(@RequestParam(value = "storeId") Long storeId, + @RequestParam(value = "productId") Long productId + ){ + storeService.addProduct(storeId, productId); + return "redirect:/product"; + } + + @PostMapping("/delete/{id}") + public String deleteStore(@PathVariable Long id) { + storeService.deleteStore(id); + return "redirect:/store"; + } +} diff --git a/backend/ipLab/src/main/resources/public/logo.png b/backend/ipLab/src/main/resources/public/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..f7c2e6ee02d9d42ebe75e4b482efe87c4bd9f9a6 GIT binary patch literal 9949 zcmd^lcT`i~w(d$m2p|v?6;OJUjz}*Okrs+zXwn3vgA}P6L?SAn(h;Iml_1iBbO8|* z1wjD`V32O1gwRw16589G^E+qUbKe_xyfeoA}X?s3;=NG5)Ked&}sF`ARRif1RL9j0>II}_k(o?J@bGXdBY6Ohgk)Ag+;oB zc!J2tNO|8t|4?_gU{Cp=5bvBNZ9V{m09yaF^_ASk@vFhPw7l7$eU;7OAJWA?tl#0h zq^N=WXeMNKK*{Vq3(MP754Zt*_}HNc2`jC-=DHl3_1d%ShhjBf9-^yNv}*RT;NN(L za(Ev|tU9fVpB^1fm;I6@YhS%&yB@UbbLmzZXVnvq*)28Ua@ciuhJKXgko$b{D zL%=#=t}sG+QrI-c;~bbIuVVXK%-q+<217c{tKwJ|&Qge%zPI|#bW-Ie(VGb=`yC6w z>pwdg^&aYleU84j31#9od4E*cE8I`jy4Wi4luYn#KXuEba9*(n97uqI+5dcG{`o%T zfc>~oAywR_V4iAm02I~EELd$7_nm)uYHdH< zwN}*DL8c6Q5hUosLBivMs@p*(*{W&Z6Hfv|Q6}62QGk1(?l#bRfwWqqGh@%#=HqOO zb+V;(%u(WOB=Ycua0E9D=nu~isrF;5VYbLHf&s_5L8IW-Zs3tPQubl=! z_(gb`OfEvF@4U!i zP^e;x)rS<|frIyj=W=!$#N{sQ^ilNH|7H(>1a0AzD1hNF^{6KEQH*~bsWc-Xf%0D3<`V`0%Bocc02PjKS;*GwEl zF9LOUMi9(exM!ujS#16_nMZ(U(HZRzO}AJd0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^tiO87 z8+E}Ze3O`3ybmG-+SsP^a%?6V?Q14>(&A)he1l0MN%zgt%(J95#wwoNu+3asuvF^d zpI|lbpE}nw`73cI=>pf#-b1!@}3ynnkA4_l-GAJm#KBC)buP%n6eV;SjGgmG|wH z#G!Q+2m?3>B!=v3KE+`^#nf|P_Ql=@JO5sI{eMvjDw)3ebB2mVfWR<*jUQM>kR1Hq zXsH9~an76&gQTZ&KXq^s3w=g~EEQ!zH$#Lp)L19uRum4g&d|p&N)C8qk41OlEOhe~ zJ^a@F4!_Olg|x8uG(`Y}xS2UC3fBDeXf)ogone|X)Wm2QBU8~UAtt4hy7iDC(J2Z8 zIM=%SBh@kK6U|(oCh)eL-E++8_7~K&xnb}$KhPbgCRZXq#+lfPkFV`~|dD=M!m?`AdQyc9{)EWlPH)zpg;`1!#k_`b0g~*#8CN_+yy> literal 0 HcmV?d00001 diff --git a/backend/ipLab/src/main/resources/templates/addToStore.html b/backend/ipLab/src/main/resources/templates/addToStore.html new file mode 100644 index 0000000..720e9c1 --- /dev/null +++ b/backend/ipLab/src/main/resources/templates/addToStore.html @@ -0,0 +1,35 @@ + + + + + +

+
+
+
+ + +
+
+ + +
+
+ +
+
+
+ + \ No newline at end of file diff --git a/backend/ipLab/src/main/resources/templates/default.html b/backend/ipLab/src/main/resources/templates/default.html index c04f4cd..e56935f 100644 --- a/backend/ipLab/src/main/resources/templates/default.html +++ b/backend/ipLab/src/main/resources/templates/default.html @@ -21,10 +21,16 @@ aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> +
+ + * + +
+ boxStore +
+
diff --git a/backend/ipLab/src/main/resources/templates/order-edit.html b/backend/ipLab/src/main/resources/templates/order-edit.html new file mode 100644 index 0000000..e05a360 --- /dev/null +++ b/backend/ipLab/src/main/resources/templates/order-edit.html @@ -0,0 +1,42 @@ + + + + + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + + Назад + +
+
+
+ + \ No newline at end of file diff --git a/backend/ipLab/src/main/resources/templates/order.html b/backend/ipLab/src/main/resources/templates/order.html new file mode 100644 index 0000000..0c14220 --- /dev/null +++ b/backend/ipLab/src/main/resources/templates/order.html @@ -0,0 +1,37 @@ + + + + + +
+ +
+ + + + + + + + + + + + + +
#ФИО покупателяМагазинТовар
+ + + +
+
+
+ + \ No newline at end of file diff --git a/backend/ipLab/src/main/resources/templates/product-edit.html b/backend/ipLab/src/main/resources/templates/product-edit.html new file mode 100644 index 0000000..d318452 --- /dev/null +++ b/backend/ipLab/src/main/resources/templates/product-edit.html @@ -0,0 +1,27 @@ + + + + + +
+
+
+
+ + +
+
+ + + Назад + +
+
+
+ + \ No newline at end of file diff --git a/backend/ipLab/src/main/resources/templates/product.html b/backend/ipLab/src/main/resources/templates/product.html new file mode 100644 index 0000000..3211ccb --- /dev/null +++ b/backend/ipLab/src/main/resources/templates/product.html @@ -0,0 +1,53 @@ + + + + + +
+ +
+ + + + + + + + + + + + + + +
#Название товараНазвание магазина
+ + + +
+ + Изменить + + +
+
+ +
+
+
+
+ + \ No newline at end of file diff --git a/backend/ipLab/src/main/resources/templates/store-edit.html b/backend/ipLab/src/main/resources/templates/store-edit.html new file mode 100644 index 0000000..a6d54a2 --- /dev/null +++ b/backend/ipLab/src/main/resources/templates/store-edit.html @@ -0,0 +1,27 @@ + + + + + +
+
+
+
+ + +
+
+ + + Назад + +
+
+
+ + \ No newline at end of file diff --git a/backend/ipLab/src/main/resources/templates/store.html b/backend/ipLab/src/main/resources/templates/store.html new file mode 100644 index 0000000..6d7f64a --- /dev/null +++ b/backend/ipLab/src/main/resources/templates/store.html @@ -0,0 +1,51 @@ + + + + + +
+ +
+ + + + + + + + + + + + + +
#Название магазина
+ + +
+ + Изменить + + +
+
+ +
+
+
+
+ + \ No newline at end of file diff --git a/frontend/src/services/DataService.js b/frontend/src/services/DataService.js index 7ed9068..6ce513c 100644 --- a/frontend/src/services/DataService.js +++ b/frontend/src/services/DataService.js @@ -17,6 +17,7 @@ export default class DataService { static async readAll(url, transformer) { const response = await axios.get(this.dataUrlPrefix + url); + console.log(response); return response.data.map(item => transformer(item)); }