| | |
| | | return mapResault; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, List<Map<String, Object>>> getSendPositionALL(String soilderId) { |
| | | Map<String, List<Map<String, Object>>> result = new HashMap(); |
| | | List<Map<String,Object>> ardAppApplicationList = ardAppApplicationMapper.selectArdAppApplicationBySoilderIdALL(soilderId); |
| | | Date date = new Date(); |
| | | //查看指挥端位置申请 |
| | | List<Map<String, Object>> resultCommanderPosition = new ArrayList(); |
| | | //查看车辆位置申请 |
| | | List<Map<String, Object>> resultSYCarsPosition = new ArrayList(); |
| | | for(Map<String, Object> map : ardAppApplicationList){ |
| | | if(((String)map.get("begin")).equals("")){ |
| | | map.put("time",""); |
| | | if(((String)map.get("applicationType")).equals("Commander")){ |
| | | resultCommanderPosition.add(map); |
| | | }else if(((String)map.get("applicationType")).equals("SYCar")){ |
| | | resultSYCarsPosition.add(map); |
| | | } |
| | | }else{ |
| | | Long interval = date.getTime() - Long.parseLong((String)map.get("begin")); |
| | | interval = 24 * 60 * 60 * 1000 - interval; |
| | | Long hour = interval / (60 * 60 * 1000); |
| | | Long min = (interval - hour * 60 * 60 * 1000) / (60 * 1000); |
| | | Long second = (interval - hour * 60 * 60 * 1000 - min * 60 * 1000) / 1000; |
| | | map.put("time",hour + "时" + min + "分" + second + "秒"); |
| | | if(((String)map.get("applicationType")).equals("Commander")){ |
| | | resultCommanderPosition.add(map); |
| | | }else if(((String)map.get("applicationType")).equals("SYCar")){ |
| | | resultSYCarsPosition.add(map); |
| | | } |
| | | } |
| | | } |
| | | result.put("commander",resultCommanderPosition); |
| | | result.put("SYCars",resultSYCarsPosition); |
| | | return result; |
| | | } |
| | | |
| | | public List<Long> getOwnAndChildrenDeptIdList(List<Long> deptIdList,List<Long> deptIdListr){ |
| | | deptIdListr.addAll(deptIdList); |
| | | List<Long> result = sysDeptMapper.getChildrenDeptIdList(deptIdList); |