南昌市物联网技防平台-后台
Administrator
2021-04-08 2c2b1ab406d3049a0e69fff01e3daade5cbe90ea
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/parcel/service/impl/ParcelServiceImpl.java
@@ -237,16 +237,26 @@
      //获取包裹数据
      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()); //违禁物品数量
               }
            }
         }
         //封装数据
@@ -387,8 +397,10 @@
    */
   @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);
      }