feat: include stopped charging orders (status 4) in battery safety detection stats
| | |
| | | for (List<Integer> chunk : chunkList(gunIds, 500)) { |
| | | Long chunkCount = this.baseMapper.selectCount(new LambdaQueryWrapper<TChargingOrder>() |
| | | .eq(TChargingOrder::getDelFlag, 0)//未删除 |
| | | .in(TChargingOrder::getStatus, Arrays.asList(3, 5))//充电中、已结束 |
| | | .in(TChargingOrder::getStatus, Arrays.asList(3, 4, 5))//充电中、停止中、已结束 |
| | | .in(TChargingOrder::getChargingGunId, chunk));//符合条件的充电枪 |
| | | total += chunkCount == null ? 0L : chunkCount; |
| | | } |
| | |
| | | SELECT COUNT(1) |
| | | FROM t_charging_order |
| | | WHERE del_flag = 0 |
| | | AND status IN (3, 5) |
| | | AND status IN (3, 4, 5) |
| | | AND charging_gun_id IN |
| | | <foreach item="item" index="index" collection="gunIds" open="(" separator="," close=")"> |
| | | #{item} |