| Line 1... |
Line 1... |
| 1 |
|
1 |
|
| 2 |
package com.spice.profitmandi.web.controller;
|
2 |
package com.spice.profitmandi.web.controller;
|
| 3 |
|
3 |
|
| 4 |
import java.time.LocalDate;
|
- |
|
| 5 |
import java.time.LocalDateTime;
|
- |
|
| 6 |
import java.util.ArrayList;
|
- |
|
| 7 |
import java.util.Collection;
|
- |
|
| 8 |
import java.util.HashMap;
|
- |
|
| 9 |
import java.util.List;
|
- |
|
| 10 |
import java.util.Map;
|
- |
|
| 11 |
import java.util.Set;
|
- |
|
| 12 |
import java.util.stream.Collectors;
|
- |
|
| 13 |
|
- |
|
| 14 |
import javax.servlet.http.HttpServletRequest;
|
- |
|
| 15 |
|
- |
|
| 16 |
import org.apache.logging.log4j.LogManager;
|
- |
|
| 17 |
import org.apache.logging.log4j.Logger;
|
- |
|
| 18 |
import org.springframework.beans.factory.annotation.Autowired;
|
- |
|
| 19 |
import org.springframework.stereotype.Controller;
|
- |
|
| 20 |
import org.springframework.transaction.annotation.Transactional;
|
- |
|
| 21 |
import org.springframework.ui.Model;
|
- |
|
| 22 |
import org.springframework.web.bind.annotation.RequestBody;
|
- |
|
| 23 |
import org.springframework.web.bind.annotation.RequestMapping;
|
- |
|
| 24 |
import org.springframework.web.bind.annotation.RequestMethod;
|
- |
|
| 25 |
import org.springframework.web.bind.annotation.RequestParam;
|
- |
|
| 26 |
|
- |
|
| 27 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
4 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 28 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
5 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
| 29 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
6 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
| 30 |
import com.spice.profitmandi.dao.entity.fofo.CustomerAddress;
|
7 |
import com.spice.profitmandi.dao.entity.fofo.CustomerAddress;
|
| 31 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
|
8 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
|
| 32 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrderItem;
|
9 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrderItem;
|
| 33 |
import com.spice.profitmandi.dao.entity.fofo.HygieneData;
|
10 |
import com.spice.profitmandi.dao.entity.fofo.HygieneData;
|
| 34 |
import com.spice.profitmandi.dao.model.DateRangeModel;
|
11 |
import com.spice.profitmandi.dao.model.DateRangeModel;
|
| 35 |
import com.spice.profitmandi.dao.repository.catalog.HygieneDataModel;
|
12 |
import com.spice.profitmandi.dao.repository.catalog.HygieneDataModel;
|
| 36 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
13 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
| 37 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
- |
|
| 38 |
import com.spice.profitmandi.dao.repository.fofo.CustomerAddressRepository;
|
14 |
import com.spice.profitmandi.dao.repository.fofo.CustomerAddressRepository;
|
| 39 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderItemRepository;
|
15 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderItemRepository;
|
| 40 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderRepository;
|
16 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderRepository;
|
| 41 |
import com.spice.profitmandi.dao.repository.fofo.HygieneDataRepository;
|
17 |
import com.spice.profitmandi.dao.repository.fofo.HygieneDataRepository;
|
| 42 |
import com.spice.profitmandi.service.user.RetailerService;
|
18 |
import com.spice.profitmandi.service.user.RetailerService;
|
| 43 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
19 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
| - |
|
20 |
import org.apache.logging.log4j.LogManager;
|
| - |
|
21 |
import org.apache.logging.log4j.Logger;
|
| - |
|
22 |
import org.springframework.beans.factory.annotation.Autowired;
|
| - |
|
23 |
import org.springframework.stereotype.Controller;
|
| - |
|
24 |
import org.springframework.transaction.annotation.Transactional;
|
| - |
|
25 |
import org.springframework.ui.Model;
|
| - |
|
26 |
import org.springframework.web.bind.annotation.RequestBody;
|
| - |
|
27 |
import org.springframework.web.bind.annotation.RequestMapping;
|
| - |
|
28 |
import org.springframework.web.bind.annotation.RequestMethod;
|
| - |
|
29 |
import org.springframework.web.bind.annotation.RequestParam;
|
| - |
|
30 |
|
| - |
|
31 |
import javax.servlet.http.HttpServletRequest;
|
| - |
|
32 |
import java.time.LocalDateTime;
|
| - |
|
33 |
import java.util.*;
|
| - |
|
34 |
import java.util.stream.Collectors;
|
| 44 |
|
35 |
|
| 45 |
@Controller
|
36 |
@Controller
|
| 46 |
@Transactional(rollbackFor = Throwable.class)
|
37 |
@Transactional(rollbackFor = Throwable.class)
|
| 47 |
public class HygieneController {
|
38 |
public class HygieneController {
|
| 48 |
|
39 |
|
| Line 275... |
Line 266... |
| 275 |
hygieneData.setNextTimestamp(null);
|
266 |
hygieneData.setNextTimestamp(null);
|
| 276 |
hygieneDataRepository.persist(hygieneData);
|
267 |
hygieneDataRepository.persist(hygieneData);
|
| 277 |
}
|
268 |
}
|
| 278 |
}
|
269 |
}
|
| 279 |
|
270 |
|
| 280 |
model.addAttribute("response", mvcResponseSender.createResponseString(true));
|
271 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
| 281 |
|
272 |
|
| 282 |
return "response";
|
273 |
return "response";
|
| 283 |
}
|
274 |
}
|
| 284 |
|
275 |
|
| 285 |
}
|
276 |
}
|