Commit ab7c7636 authored by 李腾威's avatar 李腾威

地图ES搜索电梯修改,ES初始化电梯信息修改

parent 0dd2d621
......@@ -261,7 +261,7 @@
<select id="getTodayEmergencyCount" resultType="java.util.Map">
SELECT
COUNT(tz.alarm_type_code = '960') as sleepyTncidentTotal,
sum(case when tz.alarm_type_code = '960' then 1 else 0 end) as sleepyTncidentTotal,
sum(
CASE
WHEN
......@@ -412,9 +412,10 @@
AND field_code IN ('injured_num', 'die_num')
and tz_alert_form_value.is_delete=0
group by alert_called_id
)
) and alarm_type_code = '960' and is_delete=0
) tzs left join tcb_elevator te on tzs.equipment_id = te.sequence_nbr
where 1=1
and tzs.call_time >= (select current_date())
and (select date_add(current_date(), interval 1 day)) >= tzs.call_time
<if test="regionCode != null and regionCode != ''">
......
......@@ -395,7 +395,7 @@ public class ElevatorController extends BaseController {
IPage<Elevator> elevatorPage = new Page<>();
Integer count = elevatorService.count();
for(int i = 0; i <= (ValidationUtil.isEmpty(num) ? count : num); i ++ ) {
for(int i = 0; i <= (ValidationUtil.isEmpty(num) ? count%500 : num); ++i ) {
elevatorPage.setCurrent(i);
elevatorPage.setSize(500);
elevatorPage = elevatorService.page(elevatorPage);
......
......@@ -17,6 +17,7 @@ import org.springframework.data.elasticsearch.core.SearchHit;
import org.springframework.data.elasticsearch.core.SearchHits;
import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import java.util.ArrayList;
......@@ -68,17 +69,7 @@ public class ESElevatorServiceImpl {
public EsElevator saveEsElevatorToES(Elevator elevator)
{
EsElevator esElevator = new EsElevator();
esElevator.setSequenceNbr(elevator.getSequenceNbr());
esElevator.setProvince(elevator.getProvince());
esElevator.setAddress(elevator.getAddress());
esElevator.setCity(elevator.getCity());
esElevator.setDistrict(elevator.getDistrict());
esElevator.setLatitude(elevator.getLatitude());
esElevator.setLongitude(elevator.getLongitude());
esElevator.setRegisterCode(elevator.getRegisterCode());
esElevator.setRegionCode(elevator.getRegionCode());
esElevator.setRescueCode(elevator.getRescueCode());
Bean.toPo(elevator,esElevator);
esElavtorRepository.save(esElevator);
return esElevator;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment