| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.web.controller;
|
1 |
package com.spice.profitmandi.web.controller;
|
| 2 |
|
2 |
|
| 3 |
import java.io.IOException;
|
- |
|
| 4 |
import java.io.StringWriter;
|
- |
|
| 5 |
import java.time.LocalDateTime;
|
3 |
import java.time.LocalDateTime;
|
| 6 |
import java.util.Base64;
|
- |
|
| 7 |
|
4 |
|
| 8 |
import javax.mail.MessagingException;
|
- |
|
| 9 |
import javax.mail.internet.InternetAddress;
|
- |
|
| 10 |
import javax.mail.internet.MimeMessage;
|
- |
|
| 11 |
import javax.servlet.http.HttpServletRequest;
|
5 |
import javax.servlet.http.HttpServletRequest;
|
| 12 |
|
6 |
|
| 13 |
import org.apache.logging.log4j.LogManager;
|
7 |
import org.apache.logging.log4j.LogManager;
|
| 14 |
import org.apache.logging.log4j.Logger;
|
8 |
import org.apache.logging.log4j.Logger;
|
| 15 |
import org.apache.velocity.Template;
|
- |
|
| 16 |
import org.apache.velocity.VelocityContext;
|
- |
|
| 17 |
import org.apache.velocity.app.VelocityEngine;
|
- |
|
| 18 |
import org.json.JSONArray;
|
- |
|
| 19 |
import org.json.JSONObject;
|
- |
|
| 20 |
import org.springframework.beans.factory.annotation.Autowired;
|
9 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 21 |
import org.springframework.format.annotation.DateTimeFormat;
|
- |
|
| 22 |
import org.springframework.http.MediaType;
|
10 |
import org.springframework.http.MediaType;
|
| 23 |
import org.springframework.http.ResponseEntity;
|
11 |
import org.springframework.http.ResponseEntity;
|
| 24 |
import org.springframework.mail.javamail.JavaMailSender;
|
- |
|
| 25 |
import org.springframework.mail.javamail.MimeMessageHelper;
|
- |
|
| 26 |
import org.springframework.stereotype.Controller;
|
12 |
import org.springframework.stereotype.Controller;
|
| 27 |
import org.springframework.transaction.annotation.Transactional;
|
13 |
import org.springframework.transaction.annotation.Transactional;
|
| 28 |
import org.springframework.web.bind.annotation.RequestBody;
|
14 |
import org.springframework.web.bind.annotation.RequestBody;
|
| 29 |
import org.springframework.web.bind.annotation.RequestMapping;
|
15 |
import org.springframework.web.bind.annotation.RequestMapping;
|
| 30 |
import org.springframework.web.bind.annotation.RequestMethod;
|
16 |
import org.springframework.web.bind.annotation.RequestMethod;
|
| 31 |
import org.springframework.web.bind.annotation.RequestParam;
|
- |
|
| 32 |
|
17 |
|
| 33 |
import com.google.gson.Gson;
|
18 |
import com.google.gson.Gson;
|
| 34 |
import com.mongodb.util.JSON;
|
- |
|
| 35 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
- |
|
| 36 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
19 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
| 37 |
import com.spice.profitmandi.dao.entity.dtr.EmployeeAttendance;
|
- |
|
| 38 |
import com.spice.profitmandi.dao.entity.dtr.HyperTrackKeyModel;
|
20 |
import com.spice.profitmandi.dao.entity.dtr.HyperTrackKeyModel;
|
| 39 |
import com.spice.profitmandi.dao.entity.dtr.HypertrackKey;
|
21 |
import com.spice.profitmandi.dao.entity.dtr.HypertrackKey;
|
| 40 |
import com.spice.profitmandi.dao.entity.fofo.Customer;
|
- |
|
| 41 |
import com.spice.profitmandi.dao.entity.user.Device;
|
- |
|
| 42 |
import com.spice.profitmandi.dao.enumuration.dtr.LeadStatus;
|
- |
|
| 43 |
import com.spice.profitmandi.dao.enumuration.dtr.PunchType;
|
- |
|
| 44 |
import com.spice.profitmandi.dao.repository.dtr.EmployeeAttendanceRepository;
|
- |
|
| 45 |
import com.spice.profitmandi.dao.repository.user.HypertrackKeyRepository;
|
22 |
import com.spice.profitmandi.dao.repository.user.HypertrackKeyRepository;
|
| 46 |
|
23 |
|
| 47 |
import io.swagger.annotations.ApiImplicitParam;
|
24 |
import io.swagger.annotations.ApiImplicitParam;
|
| 48 |
import io.swagger.annotations.ApiImplicitParams;
|
25 |
import io.swagger.annotations.ApiImplicitParams;
|
| 49 |
import io.swagger.annotations.ApiOperation;
|
26 |
import io.swagger.annotations.ApiOperation;
|
| 50 |
import okhttp3.OkHttpClient;
|
- |
|
| 51 |
import okhttp3.Request;
|
- |
|
| 52 |
import okhttp3.Response;
|
- |
|
| 53 |
|
27 |
|
| 54 |
@Controller
|
28 |
@Controller
|
| 55 |
@Transactional(rollbackFor = Throwable.class)
|
29 |
@Transactional(rollbackFor = Throwable.class)
|
| 56 |
public class HyperTrackController {
|
30 |
public class HyperTrackController {
|
| 57 |
|
31 |
|