| | |
| | | if (null!=conditionVo.getStartTime() && conditionVo.getStartTime()!="" |
| | | && null != conditionVo.getEndTime() && conditionVo.getEndTime()!=""){ |
| | | startDate = conditionVo.getStartTime().substring(0,10); |
| | | System.out.println("startDate = " + startDate); |
| | | endDate = conditionVo.getEndTime().substring(0,10); |
| | | System.out.println("endDate = " + endDate); |
| | | } |
| | | map.put("startDate", startDate); |
| | | map.put("endDate", endDate); |
| | |
| | | //获取包裹数据 |
| | | List<Object> parcelData = getParcelData(conditionVo, PARCEL_URL, PARCEL_KEY, PARCEL_SECRET); |
| | | if (null!=parcelData) { |
| | | //查询当天的包裹总数 |
| | | Integer dangerCount = null; |
| | | Integer contrabandCount = null; |
| | | conditionVo.setStatus(0); |
| | | if (conditionVo.getStatus() == 0) { |
| | | //声明包裹和物品数量 |
| | | Integer dangerCount = 0; |
| | | Integer contrabandCount = 0; |
| | | if (null!=conditionVo.getStartTime()){ |
| | | for (Object object : parcelData) { |
| | | //取出list里面的值转为map |
| | | Map<String, Object> objectMap = (Map<String, Object>) object; |
| | | dangerCount = Integer.parseInt(objectMap.get("dangerCount").toString()); //违禁包裹数量 |
| | | contrabandCount = Integer.parseInt(objectMap.get("contrabandCount").toString()); //违禁物品数量 |
| | | dangerCount += Integer.parseInt(objectMap.get("dangerCount").toString()); //违禁包裹数量 |
| | | contrabandCount += Integer.parseInt(objectMap.get("contrabandCount").toString()); //违禁物品数量 |
| | | } |
| | | }else { |
| | | //查询当天的包裹总数 |
| | | conditionVo.setStatus(0); |
| | | if (conditionVo.getStatus() == 0) { |
| | | for (Object object : parcelData) { |
| | | //取出list里面的值转为map |
| | | Map<String, Object> objectMap = (Map<String, Object>) object; |
| | | dangerCount = Integer.parseInt(objectMap.get("dangerCount").toString()); //违禁包裹数量 |
| | | contrabandCount = Integer.parseInt(objectMap.get("contrabandCount").toString()); //违禁物品数量 |
| | | } |
| | | } |
| | | } |
| | | //封装数据 |
| | |
| | | * @return |
| | | */ |
| | | public List<Integer> getKindServenDataList(ConditionVo conditionVo){ |
| | | if (null==conditionVo){ |
| | | if (null==conditionVo.getStartTime()){ |
| | | conditionVo.setStatus(1);//近7天status 为 1 |
| | | } |
| | | //获取数据 |
| | | List<Object> objectList = getParcelData(conditionVo,PARCEL_CONTRABAND_URL,PARCEL_KEY,PARCEL_SECRET); |
| | | List<String> times = new ArrayList<>(); |
| | | if (null!=objectList) { |
| | | //遍历违禁编码map数据 |
| | | List<String> times = DateUtils.pastDay(new SimpleDateFormat("yyyy-MM-dd").format(new Date())); |
| | | //获取时间 |
| | | if (null!=conditionVo.getStatus()) { |
| | | times = DateUtils.pastDay(new SimpleDateFormat("yyyy-MM-dd").format(new Date())); |
| | | } |
| | | if (null!=conditionVo.getStartTime()){ |
| | | times = DateUtils.getTimeOverOneDate(conditionVo.getStartTime(),conditionVo.getEndTime()); |
| | | } |
| | | |
| | | List<Integer> list = new ArrayList<>(); |
| | | for (String time : times) { |
| | | Integer count = 0; |
| | |
| | | */ |
| | | @Override |
| | | public Object getParcelkindDetailPage(ConditionVo conditionVo) { |
| | | System.out.println("conditionVo = " + conditionVo); |
| | | //获取违禁品数据 |
| | | String result = getParcelDataPageList(conditionVo, PARCEL_KIND_URL, PARCEL_KEY, PARCEL_SECRET).get("result").toString(); |
| | | System.out.println("result = " + result); |
| | | if (null!=result) { |
| | | return JSONObject.parse(result); |
| | | } |