| | |
| | | import java.util.*; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysConfig; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | |
| | | return AjaxResult.error("当前车辆正处在电子围栏外"); |
| | | }else{ |
| | | try{ |
| | | if(PositionContainer.getCarLockProcessThreadMap().get(carId).get(lockNum).get("lockProcess") != null){ |
| | | if(PositionContainer.getCarLockProcessThreadMap().get(carId).get(lockNum).get("lockProcess") == null){ |
| | | PositionContainer.getCarLockProcessThreadMap().get(carId).get(lockNum).put("lockProcess",new Thread());//加入容器 |
| | | String lockNumHead = lockNum.substring(0,2); |
| | | String lockNumTail = lockNum.substring(2,4); |
| | |
| | | continue; |
| | | } |
| | | } |
| | | break;//处在任意电子围栏中 |
| | | //break; |
| | | return;//处在任意电子围栏中 |
| | | }else{ |
| | | continue; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getArdTankLockProcessLogByCarPlate(Map<String, Object> para) { |
| | | //分页属性 |
| | | Integer pageNum = (Integer) para.get("pageNum"); |
| | | Integer pageSize = (Integer) para.get("pageSize"); |
| | | |
| | | PageHelper.startPage(pageNum, pageSize);//分页 |
| | | Map<String,Object> resultMap = new HashMap(); |
| | | if(((String) para.get("carPlate")).equals("")){ |
| | | List<ArdTankLockProcessLog> resultList = ardTankLockProcessLogMapper.getArdTankLockProcessLogAll(); |
| | | Long total = ardTankLockProcessLogMapper.getArdTankLockProcessLogTotal(); |
| | | resultMap.put("list",resultList); |
| | | resultMap.put("total",total); |
| | | return resultMap; |
| | | }else{ |
| | | List<ArdTankLockProcessLog> resultList = ardTankLockProcessLogMapper.getArdTankLockProcessLogByCarPlate("%" + (String) para.get("carPlate") + "%"); |
| | | Long total = ardTankLockProcessLogMapper.getArdTankLockProcessLogTotalByCarPlate("%" + (String) para.get("carPlate") + "%"); |
| | | resultMap.put("list",resultList); |
| | | resultMap.put("total",total); |
| | | return resultMap; |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<ArdTankLockProcessLog> exportArdTankLockProcessLog(String carPlate) { |
| | | if(carPlate.equals("")){ |
| | | List<ArdTankLockProcessLog> resultList = ardTankLockProcessLogMapper.getArdTankLockProcessLogAll(); |
| | | return resultList; |
| | | }else{ |
| | | List<ArdTankLockProcessLog> resultList = ardTankLockProcessLogMapper.getArdTankLockProcessLogByCarPlate("%" + carPlate + "%"); |
| | | return resultList; |
| | | } |
| | | } |
| | | |
| | | public Map<String,Object> sendCmd(String syURL,String userId,String carId,Integer cmdId,String cmd,String paramsStr,String sessionId){ |
| | | OkHttpClient okHttpClient = new OkHttpClient(); |
| | | |