| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, String>> getLockByCarPlate(String usersId, String carPlate) { |
| | | public List<Map<String, Object>> getLockByCarPlate(String usersId, String carPlate) { |
| | | List<ArdTankLock> ardTankLockList = ardTankLockMapper.getAll(); |
| | | ArdSyUser ardSyUser = ardSyUserMapper.userById(usersId); |
| | | if(ardSyUser == null){ |
| | | return new ArrayList(); |
| | |
| | | String passwordMd5 = DigestUtils.md5Hex(ardSyUser.getPassword()); |
| | | Map<String, Object> LogInResult = sYClient.logIn(syURL, passwordMd5, ardSyUser.getUserId()); |
| | | String sessionId = (String) LogInResult.get("sessionId"); |
| | | List<ArdTankLock> ardTankLockList = ardTankLockMapper.getAll(); |
| | | List<Map<String,String>> result = new ArrayList(); |
| | | //List<ArdTankLock> ardTankLockList = ardTankLockMapper.getAll(); |
| | | List<Map<String,Object>> result = new ArrayList(); |
| | | if(!carPlate.equals("")){ |
| | | Map<String,Object> carMap = sYClient.getCarListByPlate(syURL,carPlate,ardSyUser.getUserId(),sessionId);//车牌号模糊搜索车辆 |
| | | List<Map<String,Object>> carList = new ArrayList(); |
| | |
| | | } |
| | | for(ArdTankLock ardTankLock : ardTankLockList){ |
| | | if(carIdList.contains(ardTankLock.getCarId())){//返回的车辆包含数据库录入的车辆 |
| | | Map<String,String> map = new HashMap(); |
| | | Map<String,Object> map = new HashMap(); |
| | | map.put("id",ardTankLock.getId()); |
| | | map.put("lockNum",ardTankLock.getLockNum()); |
| | | map.put("lockName",ardTankLock.getLockName()); |
| | |
| | | } |
| | | }else{ |
| | | for(ArdTankLock ardTankLock : ardTankLockList){ |
| | | Map<String,String> map = new HashMap(); |
| | | Map<String,Object> map = new HashMap(); |
| | | map.put("id",ardTankLock.getId()); |
| | | map.put("lockNum",ardTankLock.getLockNum()); |
| | | map.put("lockName",ardTankLock.getLockName()); |