| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.web.controller;
|
1 |
package com.spice.profitmandi.web.controller;
|
| 2 |
|
2 |
|
| - |
|
3 |
import java.io.ByteArrayInputStream;
|
| - |
|
4 |
import java.io.ByteArrayOutputStream;
|
| - |
|
5 |
import java.io.IOException;
|
| - |
|
6 |
import java.io.InputStream;
|
| - |
|
7 |
import java.io.InputStreamReader;
|
| - |
|
8 |
import java.net.URISyntaxException;
|
| - |
|
9 |
import java.time.LocalDate;
|
| - |
|
10 |
import java.time.LocalDateTime;
|
| - |
|
11 |
import java.time.YearMonth;
|
| - |
|
12 |
import java.time.format.DateTimeFormatter;
|
| - |
|
13 |
import java.time.temporal.ChronoUnit;
|
| - |
|
14 |
import java.util.ArrayList;
|
| - |
|
15 |
import java.util.Arrays;
|
| - |
|
16 |
import java.util.Collection;
|
| - |
|
17 |
import java.util.Comparator;
|
| - |
|
18 |
import java.util.HashMap;
|
| - |
|
19 |
import java.util.HashSet;
|
| - |
|
20 |
import java.util.Iterator;
|
| - |
|
21 |
import java.util.List;
|
| - |
|
22 |
import java.util.Map;
|
| - |
|
23 |
import java.util.Optional;
|
| - |
|
24 |
import java.util.Set;
|
| - |
|
25 |
import java.util.stream.Collectors;
|
| - |
|
26 |
import java.util.stream.Stream;
|
| - |
|
27 |
|
| - |
|
28 |
import javax.servlet.http.HttpServletRequest;
|
| - |
|
29 |
import javax.servlet.http.HttpServletResponse;
|
| - |
|
30 |
|
| - |
|
31 |
import org.apache.commons.csv.CSVFormat;
|
| - |
|
32 |
import org.apache.commons.csv.CSVParser;
|
| - |
|
33 |
import org.apache.commons.csv.CSVRecord;
|
| - |
|
34 |
import org.apache.commons.io.FileUtils;
|
| - |
|
35 |
import org.apache.commons.lang3.StringUtils;
|
| - |
|
36 |
import org.apache.logging.log4j.LogManager;
|
| - |
|
37 |
import org.apache.logging.log4j.Logger;
|
| - |
|
38 |
import org.apache.thrift.TException;
|
| - |
|
39 |
import org.json.JSONObject;
|
| - |
|
40 |
import org.springframework.beans.factory.annotation.Autowired;
|
| - |
|
41 |
import org.springframework.beans.factory.annotation.Qualifier;
|
| - |
|
42 |
import org.springframework.beans.factory.annotation.Value;
|
| - |
|
43 |
import org.springframework.core.io.ByteArrayResource;
|
| - |
|
44 |
import org.springframework.core.io.ClassPathResource;
|
| - |
|
45 |
import org.springframework.core.io.InputStreamResource;
|
| - |
|
46 |
import org.springframework.http.HttpHeaders;
|
| - |
|
47 |
import org.springframework.http.HttpStatus;
|
| - |
|
48 |
import org.springframework.http.MediaType;
|
| - |
|
49 |
import org.springframework.http.ResponseEntity;
|
| - |
|
50 |
import org.springframework.mail.javamail.JavaMailSender;
|
| - |
|
51 |
import org.springframework.stereotype.Controller;
|
| - |
|
52 |
import org.springframework.transaction.annotation.Transactional;
|
| - |
|
53 |
import org.springframework.ui.Model;
|
| - |
|
54 |
import org.springframework.web.bind.annotation.GetMapping;
|
| - |
|
55 |
import org.springframework.web.bind.annotation.PostMapping;
|
| - |
|
56 |
import org.springframework.web.bind.annotation.RequestBody;
|
| - |
|
57 |
import org.springframework.web.bind.annotation.RequestMapping;
|
| - |
|
58 |
import org.springframework.web.bind.annotation.RequestMethod;
|
| - |
|
59 |
import org.springframework.web.bind.annotation.RequestParam;
|
| - |
|
60 |
import org.springframework.web.bind.annotation.RequestPart;
|
| - |
|
61 |
import org.springframework.web.multipart.MultipartFile;
|
| - |
|
62 |
|
| 3 |
import com.fasterxml.jackson.databind.ObjectMapper;
|
63 |
import com.fasterxml.jackson.databind.ObjectMapper;
|
| 4 |
import com.google.gson.Gson;
|
64 |
import com.google.gson.Gson;
|
| 5 |
import com.spice.profitmandi.common.enumuration.MessageType;
|
65 |
import com.spice.profitmandi.common.enumuration.MessageType;
|
| 6 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
66 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| - |
|
67 |
import com.spice.profitmandi.common.model.CustomCurrentInventorySnapshot;
|
| 7 |
import com.spice.profitmandi.common.model.*;
|
68 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
| - |
|
69 |
import com.spice.profitmandi.common.model.InventoryItemAgingModel;
|
| - |
|
70 |
import com.spice.profitmandi.common.model.InvoicePdfModel;
|
| - |
|
71 |
import com.spice.profitmandi.common.model.ItemFeatureDataModel;
|
| - |
|
72 |
import com.spice.profitmandi.common.model.NotifyItemIdModel;
|
| - |
|
73 |
import com.spice.profitmandi.common.model.NotifyOrderIdModel;
|
| - |
|
74 |
import com.spice.profitmandi.common.model.NotifyOrderModel;
|
| - |
|
75 |
import com.spice.profitmandi.common.model.OrderCancellationModel;
|
| - |
|
76 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| - |
|
77 |
import com.spice.profitmandi.common.model.SendNotificationModel;
|
| 8 |
import com.spice.profitmandi.common.util.ExcelUtils;
|
78 |
import com.spice.profitmandi.common.util.ExcelUtils;
|
| 9 |
import com.spice.profitmandi.common.util.PdfUtils;
|
79 |
import com.spice.profitmandi.common.util.PdfUtils;
|
| 10 |
import com.spice.profitmandi.common.util.Utils;
|
80 |
import com.spice.profitmandi.common.util.Utils;
|
| 11 |
import com.spice.profitmandi.common.util.Utils.Attachment;
|
81 |
import com.spice.profitmandi.common.util.Utils.Attachment;
|
| 12 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
82 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
| - |
|
83 |
import com.spice.profitmandi.dao.entity.catalog.ComboMappedModel;
|
| - |
|
84 |
import com.spice.profitmandi.dao.entity.catalog.ComboModel;
|
| - |
|
85 |
import com.spice.profitmandi.dao.entity.catalog.FocusedModelByPassRequest;
|
| - |
|
86 |
import com.spice.profitmandi.dao.entity.catalog.HighDemandItem;
|
| 13 |
import com.spice.profitmandi.dao.entity.catalog.*;
|
87 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
| - |
|
88 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
| - |
|
89 |
import com.spice.profitmandi.dao.entity.catalog.TagRanking;
|
| 14 |
import com.spice.profitmandi.dao.entity.cs.Position;
|
90 |
import com.spice.profitmandi.dao.entity.cs.Position;
|
| 15 |
import com.spice.profitmandi.dao.entity.dtr.WebOffer;
|
91 |
import com.spice.profitmandi.dao.entity.dtr.WebOffer;
|
| 16 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
|
92 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
|
| 17 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
93 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
| 18 |
import com.spice.profitmandi.dao.entity.fofo.InventoryItem;
|
94 |
import com.spice.profitmandi.dao.entity.fofo.InventoryItem;
|
| 19 |
import com.spice.profitmandi.dao.entity.fofo.LiveDemoSerialNumber;
|
95 |
import com.spice.profitmandi.dao.entity.fofo.LiveDemoSerialNumber;
|
| - |
|
96 |
import com.spice.profitmandi.dao.entity.transaction.NotifyCancel;
|
| - |
|
97 |
import com.spice.profitmandi.dao.entity.transaction.NotifyColorChange;
|
| - |
|
98 |
import com.spice.profitmandi.dao.entity.transaction.NotifyMessage;
|
| - |
|
99 |
import com.spice.profitmandi.dao.entity.transaction.NotifyOrder;
|
| 20 |
import com.spice.profitmandi.dao.entity.transaction.*;
|
100 |
import com.spice.profitmandi.dao.entity.transaction.Order;
|
| 21 |
import com.spice.profitmandi.dao.enumuration.catalog.ByPassRequestStatus;
|
101 |
import com.spice.profitmandi.dao.enumuration.catalog.ByPassRequestStatus;
|
| 22 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
102 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
| - |
|
103 |
import com.spice.profitmandi.dao.model.BrandItemWiseTertiaryModel;
|
| - |
|
104 |
import com.spice.profitmandi.dao.model.BrandRegionModel;
|
| - |
|
105 |
import com.spice.profitmandi.dao.model.BrandWiseTertiaryModel;
|
| 23 |
import com.spice.profitmandi.dao.model.*;
|
106 |
import com.spice.profitmandi.dao.model.ContentPojo;
|
| - |
|
107 |
import com.spice.profitmandi.dao.model.ImeiActivationTimestampModel;
|
| - |
|
108 |
import com.spice.profitmandi.dao.model.OpenPoItemModel;
|
| - |
|
109 |
import com.spice.profitmandi.dao.model.OpenPoModel;
|
| - |
|
110 |
import com.spice.profitmandi.dao.model.OurPurchaseItemModel;
|
| - |
|
111 |
import com.spice.profitmandi.dao.model.OurPurchaseModel;
|
| - |
|
112 |
import com.spice.profitmandi.dao.model.SecondaeryOrderDateRange;
|
| - |
|
113 |
import com.spice.profitmandi.dao.model.SecondaryOrderBillingModel;
|
| - |
|
114 |
import com.spice.profitmandi.dao.model.SecondaryOrderItemBillingModel;
|
| - |
|
115 |
import com.spice.profitmandi.dao.model.SecondaryWarehouseWiseOrderBilllingModel;
|
| - |
|
116 |
import com.spice.profitmandi.dao.model.Specification;
|
| - |
|
117 |
import com.spice.profitmandi.dao.model.SpecificationGroup;
|
| 24 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
118 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
| - |
|
119 |
import com.spice.profitmandi.dao.repository.catalog.ComboMappedModelRepository;
|
| - |
|
120 |
import com.spice.profitmandi.dao.repository.catalog.ComboModelRepository;
|
| - |
|
121 |
import com.spice.profitmandi.dao.repository.catalog.FocusedModelByPassRepository;
|
| - |
|
122 |
import com.spice.profitmandi.dao.repository.catalog.HighDemandItemsRepository;
|
| 25 |
import com.spice.profitmandi.dao.repository.catalog.*;
|
123 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
| - |
|
124 |
import com.spice.profitmandi.dao.repository.catalog.TagListingRepository;
|
| - |
|
125 |
import com.spice.profitmandi.dao.repository.catalog.TagRankingRepository;
|
| 26 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
126 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
| 27 |
import com.spice.profitmandi.dao.repository.cs.PositionRepository;
|
127 |
import com.spice.profitmandi.dao.repository.cs.PositionRepository;
|
| 28 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
128 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
| 29 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
129 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
| 30 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
130 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
| 31 |
import com.spice.profitmandi.dao.repository.dtr.WebOfferRepository;
|
131 |
import com.spice.profitmandi.dao.repository.dtr.WebOfferRepository;
|
| - |
|
132 |
import com.spice.profitmandi.dao.repository.fofo.ActivatedImeiRepository;
|
| - |
|
133 |
import com.spice.profitmandi.dao.repository.fofo.CurrentInventorySnapshotRepository;
|
| 32 |
import com.spice.profitmandi.dao.repository.fofo.*;
|
134 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderRepository;
|
| - |
|
135 |
import com.spice.profitmandi.dao.repository.fofo.InventoryItemRepository;
|
| - |
|
136 |
import com.spice.profitmandi.dao.repository.fofo.LiveDemoBillingRespository;
|
| 33 |
import com.spice.profitmandi.dao.repository.inventory.NotifyStatus;
|
137 |
import com.spice.profitmandi.dao.repository.inventory.NotifyStatus;
|
| - |
|
138 |
import com.spice.profitmandi.dao.repository.transaction.NotifyCancelOrderRepository;
|
| - |
|
139 |
import com.spice.profitmandi.dao.repository.transaction.NotifyColorChangeRepository;
|
| - |
|
140 |
import com.spice.profitmandi.dao.repository.transaction.NotifyItemRepository;
|
| - |
|
141 |
import com.spice.profitmandi.dao.repository.transaction.NotifyMessageRepository;
|
| - |
|
142 |
import com.spice.profitmandi.dao.repository.transaction.NotifyOrderRespository;
|
| 34 |
import com.spice.profitmandi.dao.repository.transaction.*;
|
143 |
import com.spice.profitmandi.dao.repository.transaction.OrderRepository;
|
| 35 |
import com.spice.profitmandi.dao.repository.warehouse.WarehousePurchaseOrderRepository;
|
144 |
import com.spice.profitmandi.dao.repository.warehouse.WarehousePurchaseOrderRepository;
|
| 36 |
import com.spice.profitmandi.dao.repository.warehouse.WarehouseScanRepository;
|
145 |
import com.spice.profitmandi.dao.repository.warehouse.WarehouseScanRepository;
|
| 37 |
import com.spice.profitmandi.service.NotificationService;
|
146 |
import com.spice.profitmandi.service.NotificationService;
|
| - |
|
147 |
import com.spice.profitmandi.service.inventory.Combo;
|
| 38 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
148 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
| - |
|
149 |
import com.spice.profitmandi.service.inventory.MappedComboModel;
|
| 39 |
import com.spice.profitmandi.service.order.OrderService;
|
150 |
import com.spice.profitmandi.service.order.OrderService;
|
| 40 |
import com.spice.profitmandi.service.user.RetailerService;
|
151 |
import com.spice.profitmandi.service.user.RetailerService;
|
| 41 |
import com.spice.profitmandi.web.model.LoginDetails;
|
152 |
import com.spice.profitmandi.web.model.LoginDetails;
|
| 42 |
import com.spice.profitmandi.web.util.CookiesProcessor;
|
153 |
import com.spice.profitmandi.web.util.CookiesProcessor;
|
| 43 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
154 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
| - |
|
155 |
|
| 44 |
import in.shop2020.model.v1.order.OrderStatus;
|
156 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 45 |
import in.shop2020.model.v1.order.TransactionServiceException;
|
157 |
import in.shop2020.model.v1.order.TransactionServiceException;
|
| 46 |
import org.apache.commons.csv.CSVFormat;
|
- |
|
| 47 |
import org.apache.commons.csv.CSVParser;
|
- |
|
| 48 |
import org.apache.commons.csv.CSVRecord;
|
- |
|
| 49 |
import org.apache.commons.io.FileUtils;
|
- |
|
| 50 |
import org.apache.commons.lang3.StringUtils;
|
- |
|
| 51 |
import org.apache.logging.log4j.LogManager;
|
- |
|
| 52 |
import org.apache.logging.log4j.Logger;
|
- |
|
| 53 |
import org.apache.thrift.TException;
|
- |
|
| 54 |
import org.json.JSONObject;
|
- |
|
| 55 |
import org.springframework.beans.factory.annotation.Autowired;
|
- |
|
| 56 |
import org.springframework.beans.factory.annotation.Qualifier;
|
- |
|
| 57 |
import org.springframework.beans.factory.annotation.Value;
|
- |
|
| 58 |
import org.springframework.core.io.ByteArrayResource;
|
- |
|
| 59 |
import org.springframework.core.io.ClassPathResource;
|
- |
|
| 60 |
import org.springframework.core.io.InputStreamResource;
|
- |
|
| 61 |
import org.springframework.http.HttpHeaders;
|
- |
|
| 62 |
import org.springframework.http.HttpStatus;
|
- |
|
| 63 |
import org.springframework.http.MediaType;
|
- |
|
| 64 |
import org.springframework.http.ResponseEntity;
|
- |
|
| 65 |
import org.springframework.mail.javamail.JavaMailSender;
|
- |
|
| 66 |
import org.springframework.stereotype.Controller;
|
- |
|
| 67 |
import org.springframework.transaction.annotation.Transactional;
|
- |
|
| 68 |
import org.springframework.ui.Model;
|
- |
|
| 69 |
import org.springframework.web.bind.annotation.*;
|
- |
|
| 70 |
import org.springframework.web.multipart.MultipartFile;
|
- |
|
| 71 |
|
- |
|
| 72 |
import javax.servlet.http.HttpServletRequest;
|
- |
|
| 73 |
import javax.servlet.http.HttpServletResponse;
|
- |
|
| 74 |
import java.io.*;
|
- |
|
| 75 |
import java.net.URISyntaxException;
|
- |
|
| 76 |
import java.time.LocalDate;
|
- |
|
| 77 |
import java.time.LocalDateTime;
|
- |
|
| 78 |
import java.time.YearMonth;
|
- |
|
| 79 |
import java.time.format.DateTimeFormatter;
|
- |
|
| 80 |
import java.time.temporal.ChronoUnit;
|
- |
|
| 81 |
import java.util.*;
|
- |
|
| 82 |
import java.util.stream.Collectors;
|
- |
|
| 83 |
import java.util.stream.Stream;
|
- |
|
| 84 |
|
158 |
|
| 85 |
@Controller
|
159 |
@Controller
|
| 86 |
@Transactional(rollbackFor = Throwable.class)
|
160 |
@Transactional(rollbackFor = Throwable.class)
|
| 87 |
public class InventoryController {
|
161 |
public class InventoryController {
|
| 88 |
|
162 |
|
| Line 204... |
Line 278... |
| 204 |
HighDemandItemsRepository highDemandItemsRepository;
|
278 |
HighDemandItemsRepository highDemandItemsRepository;
|
| 205 |
|
279 |
|
| 206 |
@Autowired
|
280 |
@Autowired
|
| 207 |
WebOfferRepository webOfferRepository;
|
281 |
WebOfferRepository webOfferRepository;
|
| 208 |
|
282 |
|
| - |
|
283 |
@Autowired
|
| - |
|
284 |
ComboModelRepository comboModelRepository;
|
| - |
|
285 |
|
| - |
|
286 |
@Autowired
|
| - |
|
287 |
ComboMappedModelRepository comboMappedModelRepository;
|
| - |
|
288 |
|
| 209 |
@RequestMapping(value = "/getCurrentInventorySnapshot")
|
289 |
@RequestMapping(value = "/getCurrentInventorySnapshot")
|
| 210 |
public String getCurrentAvailability(HttpServletRequest request,
|
290 |
public String getCurrentAvailability(HttpServletRequest request,
|
| 211 |
@RequestParam(name = "offset", defaultValue = "0") int offset,
|
291 |
@RequestParam(name = "offset", defaultValue = "0") int offset,
|
| 212 |
@RequestParam(name = "limit", defaultValue = "10") int limit,
|
292 |
@RequestParam(name = "limit", defaultValue = "10") int limit,
|
| 213 |
@RequestParam(name = "searchTerm", required = false, defaultValue = "") String searchTerm, Model model)
|
293 |
@RequestParam(name = "searchTerm", required = false, defaultValue = "") String searchTerm, Model model)
|
| Line 1845... |
Line 1925... |
| 1845 |
|
1925 |
|
| 1846 |
model.addAttribute("response", objectMapper.writeValueAsString(isImei));
|
1926 |
model.addAttribute("response", objectMapper.writeValueAsString(isImei));
|
| 1847 |
return "response";
|
1927 |
return "response";
|
| 1848 |
}
|
1928 |
}
|
| 1849 |
|
1929 |
|
| - |
|
1930 |
@RequestMapping(value = "/createCombo", method = RequestMethod.GET)
|
| - |
|
1931 |
public String createCombo(HttpServletRequest request, Model model) throws Exception {
|
| - |
|
1932 |
|
| - |
|
1933 |
Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
|
| - |
|
1934 |
|
| - |
|
1935 |
List<ComboModel> comboModels = comboModelRepository.selectAll();
|
| - |
|
1936 |
|
| - |
|
1937 |
model.addAttribute("warehouseMap", warehouseMap);
|
| - |
|
1938 |
model.addAttribute("comboModels", comboModels);
|
| - |
|
1939 |
return "create-combo";
|
| - |
|
1940 |
}
|
| - |
|
1941 |
|
| - |
|
1942 |
@RequestMapping(value = "/addCombo", method = RequestMethod.POST)
|
| - |
|
1943 |
public String addCombo(HttpServletRequest request, @RequestBody Combo combo, Model model) throws Exception {
|
| - |
|
1944 |
|
| - |
|
1945 |
for (Integer warehouseId : combo.getWarehouseId()) {
|
| - |
|
1946 |
|
| - |
|
1947 |
ComboModel comboModel = comboModelRepository.selectByCatalogIdWarehouseIdAndQty(combo.getCatalogId(),
|
| - |
|
1948 |
warehouseId, combo.getQty());
|
| - |
|
1949 |
if (comboModel != null) {
|
| - |
|
1950 |
List<ComboMappedModel> comboMappedModels = comboMappedModelRepository
|
| - |
|
1951 |
.selectByComboId(comboModel.getId());
|
| - |
|
1952 |
for (ComboMappedModel comboMappedModel : comboMappedModels) {
|
| - |
|
1953 |
comboMappedModelRepository.delete(comboMappedModel);
|
| - |
|
1954 |
}
|
| - |
|
1955 |
|
| - |
|
1956 |
comboModelRepository.delete(comboModel);
|
| - |
|
1957 |
}
|
| - |
|
1958 |
ComboModel cm = new ComboModel();
|
| - |
|
1959 |
cm.setCatalogId(combo.getCatalogId());
|
| - |
|
1960 |
cm.setQty(combo.getQty());
|
| - |
|
1961 |
cm.setWarehouseId(warehouseId);
|
| - |
|
1962 |
comboModelRepository.persist(cm);
|
| - |
|
1963 |
|
| - |
|
1964 |
LOGGER.info("cm" + cm);
|
| - |
|
1965 |
|
| - |
|
1966 |
for (MappedComboModel mcc : combo.getMappedComboModel()) {
|
| - |
|
1967 |
ComboMappedModel cmm = new ComboMappedModel();
|
| - |
|
1968 |
cmm.setComboCatalogId(mcc.getCatalogId());
|
| - |
|
1969 |
cmm.setComboQty(mcc.getQty());
|
| - |
|
1970 |
cmm.setComboId(cm.getId());
|
| - |
|
1971 |
comboMappedModelRepository.persist(cmm);
|
| - |
|
1972 |
|
| - |
|
1973 |
}
|
| - |
|
1974 |
|
| - |
|
1975 |
}
|
| - |
|
1976 |
|
| - |
|
1977 |
model.addAttribute("response", mvcResponseSender.createResponseString(true));
|
| - |
|
1978 |
|
| - |
|
1979 |
return "response";
|
| - |
|
1980 |
|
| - |
|
1981 |
}
|
| - |
|
1982 |
|
| - |
|
1983 |
@RequestMapping(value = "/combo/remove", method = RequestMethod.POST)
|
| - |
|
1984 |
public String removeCombo(HttpServletRequest request, @RequestParam int id, Model model) throws Exception {
|
| - |
|
1985 |
comboMappedModelRepository.deleteByEquals(id);
|
| - |
|
1986 |
comboModelRepository.deleteById(id);
|
| - |
|
1987 |
model.addAttribute("response", mvcResponseSender.createResponseString(true));
|
| - |
|
1988 |
|
| - |
|
1989 |
return "response";
|
| - |
|
1990 |
|
| - |
|
1991 |
}
|
| 1850 |
}
|
1992 |
}
|