| | |
| | | //获取包裹数据 |
| | | 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()); //违禁物品数量 |
| | | } |
| | | } |
| | | } |
| | | //封装数据 |
| | |
| | | */ |
| | | @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); |
| | | } |