Commit ad77ba58 authored by chenhao's avatar chenhao

119优化项

parent 64f98882
......@@ -4,6 +4,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.KeySiteDateDto;
import com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto;
import com.yeejoin.amos.boot.module.common.api.dto.KeySiteExcleDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.entity.KeySite;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import java.util.List;
......@@ -70,5 +71,6 @@ public List<OrgMenuDto> getBuildAndKeyTree(Long sequenceNbr);
public List<KeySiteDateDto> getKeySiteDate(Long id);
public List<KeySite> getKeySiteDateByNameLike(String name);
}
package com.yeejoin.amos.boot.module.jcs.api.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.dto.RequestData;
import com.yeejoin.amos.boot.module.common.api.entity.FailureDetails;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledTodyDto;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledZhDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 警情接警记录 Mapper 接口
......@@ -59,4 +59,12 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
//未结束灾情列表
List<AlertCalled> AlertCalledStatusPage(@Param("current")Integer current, @Param("size")Integer size);
List<Map<String, Object>> getOrgUserLocation(String locationt);
List<Map<String, Object>> getAlertCalledLocation(String locationt);
List<Map<String, Object>> getKeySiteLocation(String locationt);
List<Map<String, Object>> getAirportLocation(String locationt);
}
......@@ -261,11 +261,51 @@
</select>
<select id="getKeySiteLocation" resultType="Map">
SELECT
address_desc AS location,
latitude,
longitude
FROM
cb_key_site
WHERE
address_desc LIKE CONCAT('%',#{locationt},'%') and is_delete=0
</select>
<select id="getAlertCalledLocation" resultType="Map">
SELECT
address as location,
coordinate_x as latitude ,
coordinate_y as longitude
FROM
jc_alert_called
WHERE
address LIKE CONCAT('%',#{locationt},'%') and is_delete=0
</select>
<select id="getOrgUserLocation" resultType="Map">
SELECT
tt.location,
tt.longitude,
tt.latitude
from (
select
case when field_code='companyLocation' then field_value end as location,
case when field_code='longitude' then field_value end as longitude,
case when field_code='latitude' then field_value end as latitude
from cb_dynamic_form_instance
where group_code='244' ) tt where tt.location like CONCAT('%',#{locationt},'%') and tt.location is not null
</select>
<select id="getAirportLocation" resultType="Map">
SELECT
stand_code as location,
longitude,
latitude
FROM
jc_airport_stand
WHERE
stand_code LIKE CONCAT('%',#{locationt},'%') and is_delete=0
</select>
</mapper>
......@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.KeySiteDateDto;
import com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto;
import com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto;
import com.yeejoin.amos.boot.module.common.api.entity.KeySite;
import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
import com.yeejoin.amos.boot.module.common.api.service.IKeySiteService;
import com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService;
......@@ -226,7 +227,11 @@ public class KeySiteController extends BaseController {
return ResponseHelper.buildResponse(keySiteService.getKeySiteDate(id));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "通过名称模糊查询重点部位的信息", notes = "通过名称模糊查询重点部位的信息")
@GetMapping(value = "/getKeySiteDateByNameLike")
public ResponseModel<List<KeySite>> getKeySiteDateByNameLike(@RequestParam String name) {
return ResponseHelper.buildResponse(keySiteService.getKeySiteDateByNameLike(name));
}
}
......@@ -317,4 +317,12 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
public List<String> getAddress(){
return keySiteMapper.getAddress();
}
@Override
public List<KeySite> getKeySiteDateByNameLike(String name) {
LambdaQueryWrapper<KeySite> mapper =new LambdaQueryWrapper<KeySite>();
mapper.eq(KeySite::getIsDelete, false);
mapper.like(KeySite::getName, name);
return this.baseMapper.selectList(mapper);
}
}
......@@ -443,4 +443,14 @@ public class AlertCalledController extends BaseController {
return ResponseHelper.buildResponse(dto);
}
/**
* 获取坐席情况
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getLocation")
@ApiOperation(httpMethod = "GET", value = "模糊获取地址的方法", notes = "模糊获取地址的方法")
public ResponseModel<Object> getLocationLike(@RequestParam String locationt) {
return ResponseHelper.buildResponse(iAlertCalledService.getLocationLike(locationt));
}
}
\ No newline at end of file
......@@ -837,4 +837,15 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
return keyAddress;
}
/*2304 地址 联系人模糊查询缺失 陈召 2021-09-23 结束*/
public List<Map<String, Object>> getLocationLike(String locationt) {
List<Map<String, Object>> orgUserLocation=alertCalledMapper.getOrgUserLocation(locationt);
List<Map<String, Object>> alertCalledLocation=alertCalledMapper.getAlertCalledLocation(locationt);
List<Map<String, Object>> keySiteLocation=alertCalledMapper.getKeySiteLocation(locationt);
List<Map<String, Object>> airportLocation= alertCalledMapper.getAirportLocation(locationt);
orgUserLocation.addAll(alertCalledLocation);
orgUserLocation.addAll(keySiteLocation);
orgUserLocation.addAll(airportLocation);
return orgUserLocation;
}
}
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