//package com.casic.PgInterface.overtimeInPG.web;
//
//
//import com.casic.PgInterface.overtimeInPG.domain.PGTagMac;
//import com.casic.PgInterface.overtimeInPG.domain.PGTagPosition;
//import com.casic.PgInterface.overtimeInPG.dto.PGTagPositionDBDto;
//import com.casic.PgInterface.overtimeInPG.dto.PGTagPositionDto;
//import com.casic.PgInterface.overtimeInPG.manager.PGInOutRecManager;
//import com.casic.PgInterface.overtimeInPG.manager.PGTagMacManager;
//import com.casic.PgInterface.overtimeInPG.manager.PGTagPositionManager;
//import com.casic.PgInterface.patroler.domain.PgInPgPerson;
//import com.casic.PgInterface.patroler.domain.PgInPgStatus;
//import com.casic.PgInterface.patroler.manager.PgInPgPersonManager;
//import com.casic.PgInterface.patroler.manager.PgInPgStatusManager;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//import javax.annotation.Resource;
//import javax.ws.rs.POST;
//import javax.ws.rs.Path;
//import javax.ws.rs.Produces;
//import javax.ws.rs.core.MediaType;
//import java.util.*;
//
//@Controller
//@RequestMapping("rs")
////@RequestMapping("InOutPGrec")
//public class PGInOutRecController {
//@Resource
//private PGInOutRecManager pgInOutRecManager;
//@Resource
//private PGTagPositionManager pgTagPositionManager;
//@Resource
//private PgInPgPersonManager pgInPgPersonManager;
//@Resource
//private PGTagMacManager pgTagMacManager;
//@Resource
//private PgInPgStatusManager pgInPgStatusManager;
//
//    @POST
//    @Path("query")
//    @Produces(MediaType.APPLICATION_JSON)
//    public Map<String , Object> query(@RequestParam(value = "dtFrom", required = true) String dtFrom,@RequestParam(value = "dtTo", required = true) String dtTo)
//    {
//        Map<String,Object> resultMap = new HashMap<>();
//        resultMap = pgInOutRecManager.getInOutRec(dtFrom,dtTo);
//        return resultMap;
//    }
//
////    @RequestMapping("getRecentPosition")
////    @ResponseBody
//    @POST
//    @Path("getRecentPosition")
//    @Produces(MediaType.APPLICATION_JSON)
//    public Map<String,Object> getRecentPosition(@RequestParam(value = "inPgPersonId",required = true) long inPgPersonId)
//    {
//        Map<String, Object> resultMap = new HashMap<>();
//        PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(inPgPersonId);
//        PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode());
//        long maxId = pgTagPositionManager.getMaxId(pgTagMac.getTagMac());
//        PGTagPosition pgTagPosition = pgTagPositionManager.get(maxId);
//        resultMap.put("msg","success");
//        resultMap.put("result",pgTagPosition);
////        resultMap.put("result",new PGTagPositionDBDto(pgTagPosition));
//        return resultMap;
//    }
//
//    @RequestMapping("getHistoryByTagmac")
//    @ResponseBody
//    public Map<String , Object> getHistoryByTagmac(@RequestParam(value = "inPgPersonId",required = true) long inPgPersonId)
//    {
//        Map<String,Object> resultMap = new HashMap<>();
////        PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("PGINPGPERSONID",inPgPersonId);
////        PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(inPgPersonId);
////        PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("ASSETCODE",pgInPgPerson.getAssetCode());
//
//        return resultMap;
//
//    }
//}
