[fix] reassignment_status = 1
| | |
| | | PageInfo<XpOperationsUserWithRoleVO> ret = operationUserClient.listByQueryIds(query).getData(); |
| | | |
| | | // 设置距离,然后排序 |
| | | |
| | | if (ret == null || ret.getRecords() == null || ret.getRecords().isEmpty()) { |
| | | return R.ok(); |
| | | } |
| | | ret.getRecords().forEach(e -> e.setDis(disMap.get(e.getId()))); |
| | | List<XpOperationsUserWithRoleVO> sorted = ret.getRecords().stream().sorted(Comparator.comparing(XpOperationsUserWithRoleVO::getDis)).collect(Collectors.toList()); |
| | | ret.setRecords(sorted); |
| | |
| | | LEFT JOIN xp_vehicle v ON t.vehicle_id = v.id AND v.is_deleted = 0 |
| | | LEFT JOIN xp_error_type et ON t.error_type_id = et.id |
| | | WHERE t.is_deleted = 0 |
| | | AND t.reassignment_status = 1 |
| | | AND t.status = 4 |
| | | <if test="query.taskCategory != null"> |
| | | AND t.task_category = #{query.taskCategory} |
| | | </if> |
| | |
| | | public R<?> pushTask(@RequestBody XpTaskVO vo) throws JsonProcessingException { |
| | | |
| | | String handleUserId = vo.getHandleUserId(); |
| | | Map<String, Object> msg = new HashMap(); |
| | | Map<String, Object> msg = new HashMap<>(); |
| | | msg.put("type", "task"); |
| | | msg.put("data", vo); |
| | | webSocketUserService.sendMessageToUser(handleUserId, om.writeValueAsString(msg)); |