diff --git a/src/main/java/com/casic/PgInterface/overtimeInPG/web/PGInOutRecController.java b/src/main/java/com/casic/PgInterface/overtimeInPG/web/PGInOutRecController.java index 74f636b..44707a1 100644 --- a/src/main/java/com/casic/PgInterface/overtimeInPG/web/PGInOutRecController.java +++ b/src/main/java/com/casic/PgInterface/overtimeInPG/web/PGInOutRecController.java @@ -8,15 +8,16 @@ 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 java.util.HashMap; -import java.util.Map; +import java.util.*; @Controller @RequestMapping("rs") @@ -30,6 +31,8 @@ private PgInPgPersonManager pgInPgPersonManager; @Resource private PGTagMacManager pgTagMacManager; +@Resource +private PgInPgStatusManager pgInPgStatusManager; @RequestMapping("query") @ResponseBody @@ -46,7 +49,7 @@ { Map resultMap = new HashMap<>(); PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(inPgPersonId); - PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("ASSETCODE",pgInPgPerson.getAssetCode()); + PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("tagMac",pgInPgPerson.getAssetCode()); PGTagPosition pgTagPosition = pgTagPositionManager.get(pgTagPositionManager.getMaxId(pgTagMac.getTagMac())); resultMap.put("msg","success"); resultMap.put("result",new PGTagPositionDto(pgTagPosition)); @@ -55,9 +58,14 @@ @RequestMapping("getHistoryByTagmac") @ResponseBody - public Map getHistoryByTagmac() + public Map getHistoryByTagmac(@RequestParam(value = "inPgPersonId",required = true) long inPgPersonId) { Map resultMap = new HashMap<>(); +// PgInPgStatus pgInPgStatus = pgInPgStatusManager.findUniqueBy("PGINPGPERSONID",inPgPersonId); +// PgInPgPerson pgInPgPerson = pgInPgPersonManager.get(inPgPersonId); +// PGTagMac pgTagMac = pgTagMacManager.findUniqueBy("ASSETCODE",pgInPgPerson.getAssetCode()); + return resultMap; + } }