Commit 8c2a9bfb authored by chenzhao's avatar chenzhao

修改bug 120 119 交接班列表 119警情弹框信息补充 相似警情48小时 视频推送规则

parent 2b2156b9
...@@ -63,10 +63,10 @@ public class WaterResourcePoolDto extends BaseDto { ...@@ -63,10 +63,10 @@ public class WaterResourcePoolDto extends BaseDto {
private String recUserName; private String recUserName;
@ApiModelProperty(value = "最低报警水位(m)") @ApiModelProperty(value = "最低报警水位(m)")
private float minWaterLevel; private Float minWaterLevel;
@ApiModelProperty(value = "最高报警水位(m)") @ApiModelProperty(value = "最高报警水位(m)")
private float maxWaterLevel; private Float maxWaterLevel;
@ApiModelProperty("水池液位显示装置id") @ApiModelProperty("水池液位显示装置id")
private Long levelDeviceId; private Long levelDeviceId;
......
...@@ -105,8 +105,11 @@ ...@@ -105,8 +105,11 @@
</select> </select>
<select id="pageList" resultType="java.util.Map"> <select id="pageList" resultType="java.util.Map">
select select
d.* d.*,
jsc.*
from from
jc_shift_change jsc
LEFT JOIN
( (
select select
i.INSTANCE_ID instanceId, i.INSTANCE_ID instanceId,
...@@ -130,10 +133,10 @@ ...@@ -130,10 +133,10 @@
</if> </if>
</foreach> </foreach>
GROUP by GROUP by
i.INSTANCE_ID) d i.INSTANCE_ID) d on jsc.instance_id = d.instanceId
<if test="params != null and params.size() > 0"> <if test="params != null and params.size() > 0">
where where
1=1 jsc.is_delete = 0
<foreach collection="params" index="key" item="value" separator=""> <foreach collection="params" index="key" item="value" separator="">
<choose> <choose>
<when test="fieldCodes[key] == 'like' and value !=null and value !=''"> <when test="fieldCodes[key] == 'like' and value !=null and value !=''">
...@@ -151,6 +154,9 @@ ...@@ -151,6 +154,9 @@
<if test="params.date != null and params.lift == 'descend'"> <if test="params.date != null and params.lift == 'descend'">
order by endDate desc order by endDate desc
</if> </if>
<if test="params.systemType != null and params.systemType != '' ">
jsc.system_type is not null
</if>
<if test="params.date != null and params.lift == 'ascend'"> <if test="params.date != null and params.lift == 'ascend'">
order by endDate ASC order by endDate ASC
</if> </if>
......
...@@ -422,17 +422,19 @@ public class CommandController extends BaseController { ...@@ -422,17 +422,19 @@ public class CommandController extends BaseController {
QueryWrapper<AirportStand> queryWrapper = new QueryWrapper<>(); QueryWrapper<AirportStand> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("stand_code",alertFormValue.getFieldValue()); queryWrapper.eq("stand_code",alertFormValue.getFieldValue());
AirportStand airportStand = airportStandMapper.selectOne(queryWrapper); AirportStand airportStand = airportStandMapper.selectOne(queryWrapper);
//机位坐标
par.setLatitude(Double.valueOf(airportStand.getLatitude())); par.setLatitude(Double.valueOf(airportStand.getLatitude()));
par.setLongitude(Double.valueOf(airportStand.getLongitude())); par.setLongitude(Double.valueOf(airportStand.getLongitude()));
} }
} }
//集结点坐标
par.setLatitudeTwo(alertCalled.getCoordinateX()); par.setLatitudeTwo(alertCalled.getCoordinateX());
par.setLongitudeTwo(alertCalled.getCoordinateY()); par.setLongitudeTwo(alertCalled.getCoordinateY());
break; break;
case "229": case "229"://一般火灾
if (alertCalled.getAlertSourceCode().equals("1326")){ par.setLatitude(alertCalled.getCoordinateX());
par.setLongitude(alertCalled.getCoordinateY());
if (alertCalled.getAlertSourceCode().equals("1326")){ //警情来源为物联报警的
result = this.getDetailsById(Long.valueOf(alertCalled.getRelationId()),null,null,null); result = this.getDetailsById(Long.valueOf(alertCalled.getRelationId()),null,null,null);
par.setLatitudeTwo(alertCalled.getCoordinateX()); par.setLatitudeTwo(alertCalled.getCoordinateX());
par.setLongitudeTwo(alertCalled.getCoordinateY()); par.setLongitudeTwo(alertCalled.getCoordinateY());
...@@ -453,7 +455,7 @@ public class CommandController extends BaseController { ...@@ -453,7 +455,7 @@ public class CommandController extends BaseController {
} }
ResponseModel<Page<Map<String, Object>>> data = null; ResponseModel<Page<Map<String, Object>>> data = null;
if (ValidationUtil.isEmpty(par.getLatitudeTwo()) ){ if (ValidationUtil.isEmpty(par.getLatitude()) ){
data = equipFeignClient.getVideopagList( String.valueOf((pageNum - 1) * pageSize), pageSize.toString(),par.getBuildingId(),par.getCode(),par.getEquipmentName(),par.getBizOrgCode(),par.getType()); data = equipFeignClient.getVideopagList( String.valueOf((pageNum - 1) * pageSize), pageSize.toString(),par.getBuildingId(),par.getCode(),par.getEquipmentName(),par.getBizOrgCode(),par.getType());
}else { }else {
data = equipFeignClient.pageVideoByAlertType( pageNum, pageSize, par); data = equipFeignClient.pageVideoByAlertType( pageNum, pageSize, par);
......
...@@ -128,14 +128,13 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta ...@@ -128,14 +128,13 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta
return this.baseMapper.selectList(wrapper); return this.baseMapper.selectList(wrapper);
} }
public IPage<Map<String, Object>> pageList(int current, int size, String groupCode) { public IPage<Map<String, Object>> pageList(int current, int size, String groupCode,String systemType) {
Map<String, String> params = this.getRequestParamMap(); Map<String, String> params = this.getRequestParamMap();
//systemType 不是null 则查询的为120系统交接班
List<DynamicFormColumn> columns = dynamicFormColumnService.list(new LambdaQueryWrapper<DynamicFormColumn>().eq(DynamicFormColumn::getGroupCode, groupCode)); List<DynamicFormColumn> columns = dynamicFormColumnService.list(new LambdaQueryWrapper<DynamicFormColumn>().eq(DynamicFormColumn::getGroupCode, groupCode));
Map<String, Object> fieldCodes = Bean.listToMap(columns, "fieldCode", "queryStrategy", DynamicFormColumn.class); Map<String, Object> fieldCodes = Bean.listToMap(columns, "fieldCode", "queryStrategy", DynamicFormColumn.class);
Page page = new Page(); Page page = new Page();
if (current > 0){ page.setCurrent(current);
page.setCurrent((long) (current - 1) *size);
}
page.setSize(size); page.setSize(size);
if (!params.isEmpty()&&params !=null){ if (!params.isEmpty()&&params !=null){
if (!params.get("sort").isEmpty() && params.get("sort") != null){ if (!params.get("sort").isEmpty() && params.get("sort") != null){
...@@ -144,6 +143,7 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta ...@@ -144,6 +143,7 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta
params.put("lift",sorts[1]); params.put("lift",sorts[1]);
} }
} }
return this.getBaseMapper().pageList(page, RequestContext.getAppKey(), fieldCodes, groupCode, params); return this.getBaseMapper().pageList(page, RequestContext.getAppKey(), fieldCodes, groupCode, params);
} }
// 不存在值班数据则不查找 修改sql 方法去除 by kongfm 2021-09-14 // 不存在值班数据则不查找 修改sql 方法去除 by kongfm 2021-09-14
......
...@@ -3135,7 +3135,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -3135,7 +3135,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
if (map1.containsKey(fieldCode.substring(0,fieldCode.length()-4))){ if (map1.containsKey(fieldCode.substring(0,fieldCode.length()-4))){
dynamicFormInstance.setFieldValueLabel(map1.get(fieldCode.substring(0,fieldCode.length()-4)).toString()); dynamicFormInstance.setFieldValueLabel(map1.get(fieldCode.substring(0,fieldCode.length()-4)).toString());
} }
if ("birthdayTime".equals(dynamicFormInstance.getFieldCode()) && ObjectUtils.isEmpty(peopleInfoDto.getFirefighters().getBirthdayTime())){
dynamicFormInstance.setFieldValue(null);
}
dynamicFormInstancelist.add(dynamicFormInstance); dynamicFormInstancelist.add(dynamicFormInstance);
}); });
......
...@@ -171,6 +171,7 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate ...@@ -171,6 +171,7 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
waterResourceNaturalService.createWithModel(waterResourceNaturalDto); waterResourceNaturalService.createWithModel(waterResourceNaturalDto);
break; break;
case "industryPool": case "industryPool":
case "waterTank":
case "pool": case "pool":
// 新增基础信息 // 新增基础信息
model.setIsIot(true); model.setIsIot(true);
......
...@@ -104,9 +104,6 @@ public class ShiftChangeController extends BaseController { ...@@ -104,9 +104,6 @@ public class ShiftChangeController extends BaseController {
public ResponseModel queryForPage( public ResponseModel queryForPage(
@RequestParam(value = "current") int current, @RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) { @RequestParam(value = "size") int size) {
if (current >= 1){
current = (current-1)*size;
}
return ResponseHelper.buildResponse(iShiftChangeService.queryForShiftChangePage(current, size)); return ResponseHelper.buildResponse(iShiftChangeService.queryForShiftChangePage(current, size));
} }
......
...@@ -261,12 +261,20 @@ public class ESAlertCalledService { ...@@ -261,12 +261,20 @@ public class ESAlertCalledService {
boolMustAll.must(qb0); boolMustAll.must(qb0);
} }
//接警时间,距离当前时间不超过48小时的
long currentTime = System.currentTimeMillis();
currentTime = currentTime - 60 * 60 * 1000*48;
BoolQueryBuilder qb9 = QueryBuilders.boolQuery()
.must(QueryBuilders.rangeQuery("callTimeLong").gte(currentTime));
boolMustAll.must(qb9);
BoolQueryBuilder boolMust = QueryBuilders.boolQuery(); BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
//接警时间,距离当前时间不超过半小时的 //接警时间,距离当前时间不超过半小时的
long currentTime = System.currentTimeMillis(); long currentTime2 = System.currentTimeMillis();
currentTime = currentTime - 30 * 60 * 1000; currentTime2 = currentTime2 - 30 * 60 * 1000;
BoolQueryBuilder qb1 = QueryBuilders.boolQuery() BoolQueryBuilder qb1 = QueryBuilders.boolQuery()
.must(QueryBuilders.rangeQuery("callTimeLong").gte(currentTime)); .must(QueryBuilders.rangeQuery("callTimeLong").gte(currentTime2));
boolMust.should(qb1); boolMust.should(qb1);
//报警人及报警电话一致 //报警人及报警电话一致
if (!ValidationUtil.isEmpty(alertCalled.getContactUser()) && !ValidationUtil.isEmpty(alertCalled.getContactPhone())) { if (!ValidationUtil.isEmpty(alertCalled.getContactUser()) && !ValidationUtil.isEmpty(alertCalled.getContactPhone())) {
...@@ -404,12 +412,20 @@ public class ESAlertCalledService { ...@@ -404,12 +412,20 @@ public class ESAlertCalledService {
} }
boolMustAll.must(qb0); boolMustAll.must(qb0);
//接警时间,距离当前时间不超过48小时的
long currentTime = System.currentTimeMillis();
currentTime = currentTime - 60 * 60 * 1000*48;
BoolQueryBuilder qb9 = QueryBuilders.boolQuery()
.must(QueryBuilders.rangeQuery("callTimeLong").gte(currentTime));
boolMustAll.must(qb9);
BoolQueryBuilder boolMust = QueryBuilders.boolQuery(); BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
//接警时间,距离当前时间不超过半小时的 //接警时间,距离当前时间不超过半小时的
long currentTime = System.currentTimeMillis();
currentTime = currentTime - 30 * 60 * 1000; long currentTime2 = System.currentTimeMillis();
currentTime2 = currentTime2 - 30 * 60 * 1000;
BoolQueryBuilder qb1 = QueryBuilders.boolQuery() BoolQueryBuilder qb1 = QueryBuilders.boolQuery()
.must(QueryBuilders.rangeQuery("callTimeLong").gte(currentTime)); .must(QueryBuilders.rangeQuery("callTimeLong").gte(currentTime2));
boolMust.should(qb1); boolMust.should(qb1);
//报警人及报警电话一致 //报警人及报警电话一致
if (!ValidationUtil.isEmpty(alertCalled.getContactUser()) && !ValidationUtil.isEmpty(alertCalled.getContactPhone())) { if (!ValidationUtil.isEmpty(alertCalled.getContactUser()) && !ValidationUtil.isEmpty(alertCalled.getContactPhone())) {
......
...@@ -78,6 +78,7 @@ public class RuleAlertCalledService { ...@@ -78,6 +78,7 @@ public class RuleAlertCalledService {
// 警情 报送类型 // 警情 报送类型
alertCalledRo.setAlertWay(alertWay); alertCalledRo.setAlertWay(alertWay);
alertCalledRo.setCallTimeStr(alertCalledVo.getAlertCalled().getCallTime().toString());
alertCalledRo.setReplaceContent(replaceContent); alertCalledRo.setReplaceContent(replaceContent);
alertCalledRo.setUsIds(usIds); alertCalledRo.setUsIds(usIds);
......
...@@ -4,15 +4,13 @@ import java.io.IOException; ...@@ -4,15 +4,13 @@ import java.io.IOException;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Comparator; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -98,33 +96,14 @@ public class ShiftChangeServiceImpl extends BaseService<ShiftChangeDto, ShiftCha ...@@ -98,33 +96,14 @@ public class ShiftChangeServiceImpl extends BaseService<ShiftChangeDto, ShiftCha
@Override @Override
public IPage<Map<String, Object>> queryForShiftChangePage(int current, int size) { public IPage<Map<String, Object>> queryForShiftChangePage(int current, int size) {
IPage<Map<String, Object>> page = dynamicFormInstanceService.pageList(current,size,GROUP_CODE);
LambdaQueryWrapper<ShiftChange> wrapper = new LambdaQueryWrapper<>(); IPage<Map<String, Object>> page = dynamicFormInstanceService.pageList(current,size,GROUP_CODE,"");
wrapper.isNull(ShiftChange::getSystemType);
wrapper.eq(BaseEntity::getIsDelete,false);
List<ShiftChange> shiftChanges = this.baseMapper.selectList(wrapper);
Map<Long,ShiftChange> shiftChangeMap = shiftChanges.stream().collect(Collectors.toMap(ShiftChange::getInstanceId, Function.identity()));
page.getRecords().forEach(r->{
//instanceId 必输 所以未进行 null判断
ShiftChange shiftChange = shiftChangeMap.get(Long.parseLong(r.get("instanceId").toString()));
r.putAll(Bean.BeantoMap(shiftChange));
});
return page; return page;
} }
@Override @Override
public IPage<Map<String, Object>> queryForShiftChangePageByAid(int current, int size) { public IPage<Map<String, Object>> queryForShiftChangePageByAid(int current, int size) {
IPage<Map<String, Object>> page = dynamicFormInstanceService.pageList(current,size,GROUP_CODE); IPage<Map<String, Object>> page = dynamicFormInstanceService.pageList(current,size,GROUP_CODE,"1214");
LambdaQueryWrapper<ShiftChange> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ShiftChange::getSystemType,"120");
wrapper.eq(BaseEntity::getIsDelete,false);
List<ShiftChange> shiftChanges = this.baseMapper.selectList(wrapper);
Map<Long,ShiftChange> shiftChangeMap = shiftChanges.stream().collect(Collectors.toMap(ShiftChange::getInstanceId, Function.identity()));
page.getRecords().forEach(r->{
//instanceId 必输 所以未进行 null判断
ShiftChange shiftChange = shiftChangeMap.get(Long.parseLong(r.get("instanceId").toString()));
r.putAll(Bean.BeantoMap(shiftChange));
});
return page; return page;
} }
......
...@@ -359,7 +359,7 @@ ...@@ -359,7 +359,7 @@
<select id="pageBuildingVideoList" resultType="com.yeejoin.equipmanage.common.entity.vo.BuildingVideoVO"> <select id="pageBuildingVideoList" resultType="com.yeejoin.equipmanage.common.entity.vo.BuildingVideoVO">
select a.* from ( select a.* from (
<if test="dto.buildingId!=null and dto.buildingId!=''">
SELECT SELECT
v.id AS id, v.id AS id,
v.name AS name, v.name AS name,
...@@ -372,7 +372,7 @@ ...@@ -372,7 +372,7 @@
<choose> <choose>
<when test="dto.buildingId!=null and dto.buildingId!=''"> <when test="dto.buildingId!=null and dto.buildingId!=''">
JOIN wl_video_source vc ON vc.video_id = v.id JOIN wl_video_source vc ON vc.video_id = v.id
join wl_form_instance wfl on wfl.instance_id = vc.source_id JOIN wl_form_instance wfl on wfl.instance_id = vc.source_id
WHERE WHERE
FIND_IN_SET(#{dto.buildingId}, vc.parent_source_ids) FIND_IN_SET(#{dto.buildingId}, vc.parent_source_ids)
<if test="dto.equipmentName!=null and dto.equipmentName!=''"> <if test="dto.equipmentName!=null and dto.equipmentName!=''">
...@@ -387,6 +387,9 @@ ...@@ -387,6 +387,9 @@
<if test="dto.type!=null and dto.type!=''"> <if test="dto.type!=null and dto.type!=''">
and v.type = #{dto.type} and v.type = #{dto.type}
</if> </if>
<if test="dto.bizOrgCode!=null and dto.bizOrgCode!=''">
and v.biz_org_code LIKE CONCAT(#{dto.bizOrgCode}, '%')
</if>
GROUP BY id GROUP BY id
</when> </when>
<when test='dto.buildingId == null || dto.buildingId ==""'> <when test='dto.buildingId == null || dto.buildingId ==""'>
...@@ -410,37 +413,36 @@ ...@@ -410,37 +413,36 @@
GROUP BY id GROUP BY id
</when> </when>
</choose> </choose>
UNION
</if>
SELECT
v.id AS id,
v.name AS name,
v.token AS token,
v.url AS url,
v.code AS code,
v.address,
v.preset_position as presetPosition
FROM wl_video v
JOIN wl_video_source vc ON vc.video_id = v.id
join wl_form_instance wfl on wfl.instance_id = vc.source_id
WHERE
FIND_IN_SET(#{deptId}, vc.parent_source_ids)
<if test="dto.code!=null and dto.code!=''">
and v.code like concat('%',#{dto.code},'%')
</if>
<if test="dto.equipmentName!=null and dto.equipmentName!=''">
and v.name like concat('%',#{dto.equipmentName},'%')
</if>
<if test=" dto.ip!=null and dto.ip!=''">
and v.ip like concat('%',#{dto.ip},'%')
</if>
<if test="dto.type!=null and dto.type!=''">
and v.type =#{dto.type}
</if>
GROUP BY id
) AS a limit #{current},#{size} ) AS a limit #{current},#{size}
</select> </select>
<!-- UNION
SELECT
v.id AS id,
v.name AS name,
v.token AS token,
v.url AS url,
v.code AS code,
v.address,
v.preset_position as presetPosition
FROM wl_video v
JOIN wl_video_source vc ON vc.video_id = v.id
join wl_form_instance wfl on wfl.instance_id = vc.source_id
WHERE
FIND_IN_SET(#{deptId}, vc.parent_source_ids)
<if test="dto.code!=null and dto.code!=''">
and v.code like concat('%',#{dto.code},'%')
</if>
<if test="dto.equipmentName!=null and dto.equipmentName!=''">
and v.name like concat('%',#{dto.equipmentName},'%')
</if>
<if test=" dto.ip!=null and dto.ip!=''">
and v.ip like concat('%',#{dto.ip},'%')
</if>
<if test="dto.type!=null and dto.type!=''">
and v.type =#{dto.type}
</if>
GROUP BY id
) AS a limit #{current},#{size}-->
<select id="pageBuildingVideoCount" resultType="int"> <select id="pageBuildingVideoCount" resultType="int">
select count(a.id) from ( select count(a.id) from (
<if test="dto.buildingId!=null and dto.buildingId!=''"> <if test="dto.buildingId!=null and dto.buildingId!=''">
...@@ -530,8 +532,29 @@ ...@@ -530,8 +532,29 @@
a.* a.*
FROM FROM
( (
<if test='par.longitude!=null and par.latitude!=null '> <if test="par.buildingId!=null and par.buildingId!=''">
SELECT SELECT
v.id AS id,
v.name AS name,
v.token AS token,
v.url AS url,
v.code AS code,
v.address,
'' as distance,
v.longitude,
v.latitude
FROM wl_video v
JOIN wl_video_source vc ON vc.video_id = v.id
join wl_form_instance wfl on wfl.instance_id = vc.source_id
WHERE
FIND_IN_SET(#{par.buildingId}, vc.parent_source_ids)
GROUP BY id
</if>
<if test='par.longitude!=null and par.buildingId!=null '>
UNION ALL
</if>
<if test='par.longitude!=null and par.latitude!=null '>
(SELECT
wle.id , wle.id ,
wle.`code` , wle.`code` ,
wle.url, wle.url,
...@@ -556,12 +579,14 @@ ...@@ -556,12 +579,14 @@
<if test='par.code!=null and par.code!="" '> <if test='par.code!=null and par.code!="" '>
wle.code like concat ('%',#{par.code},'%') wle.code like concat ('%',#{par.code},'%')
</if> </if>
ORDER BY
distance DESC)
</if> </if>
<if test="par.longitudeTwo != null and par.longitude != null"> <if test="par.longitudeTwo != null and par.longitude != null">
UNION UNION
</if> </if>
<if test='par.longitudeTwo !=null and par.latitudeTwo !=null '> <if test='par.longitudeTwo !=null and par.latitudeTwo !=null '>
SELECT (SELECT
wle.id, wle.id,
wle.`code`, wle.`code`,
wle.url, wle.url,
...@@ -584,14 +609,16 @@ ...@@ -584,14 +609,16 @@
&lt;= #{par.distance} &lt;= #{par.distance}
</if> </if>
<if test='par.type!=null and par.type!="" '> <if test='par.type!=null and par.type!="" '>
wle.type = #{par.type} AND wle.type = #{par.type}
</if> </if>
<if test='par.remark!=null and par.remark!="" '> <if test='par.remark!=null and par.remark!="" '>
wle.remake like concat ('%',#{par.remark},'%') AND wle.remake like concat ('%',#{par.remark},'%')
</if> </if>
<if test='par.code!=null and par.code!="" '> <if test='par.code!=null and par.code!="" '>
wle.code like concat ('%',#{par.code},'%') AND wle.code like concat ('%',#{par.code},'%')
</if> </if>
ORDER BY
distance DESC)
</if> </if>
union union
SELECT SELECT
...@@ -610,7 +637,7 @@ ...@@ -610,7 +637,7 @@
WHERE WHERE
FIND_IN_SET(#{deptId}, vc.parent_source_ids) FIND_IN_SET(#{deptId}, vc.parent_source_ids)
GROUP BY id GROUP BY id
) AS a ORDER BY a.distance desc limit #{pageNum},#{pageSize} ) AS a limit #{pageNum},#{pageSize}
</select> </select>
...@@ -637,13 +664,13 @@ ...@@ -637,13 +664,13 @@
&lt;= #{par.distance} &lt;= #{par.distance}
</if> </if>
<if test='par.type!=null and par.type!="" '> <if test='par.type!=null and par.type!="" '>
wle.type = #{type} AND wle.type = #{type}
</if> </if>
<if test='par.remark!=null and par.remark!="" '> <if test='par.remark!=null and par.remark!="" '>
wle.remake like concat ('%',#{par.remake},'%') AND wle.remake like concat ('%',#{par.remake},'%')
</if> </if>
<if test='par.code!=null and par.code!="" '> <if test='par.code!=null and par.code!="" '>
wle.code like concat ('%',#{par.code},'%') AND wle.code like concat ('%',#{par.code},'%')
</if> </if>
</if> </if>
<if test="par.longitudeTwo != null and par.longitude != null"> <if test="par.longitudeTwo != null and par.longitude != null">
...@@ -674,13 +701,13 @@ ...@@ -674,13 +701,13 @@
&lt;= #{par.distance} &lt;= #{par.distance}
</if> </if>
<if test='par.type!=null and par.type!="" '> <if test='par.type!=null and par.type!="" '>
wle.type = #{par.type} AND wle.type = #{par.type}
</if> </if>
<if test='par.remark!=null and par.remark!="" '> <if test='par.remark!=null and par.remark!="" '>
wle.remake like concat ('%',#{par.remark},'%') AND wle.remake like concat ('%',#{par.remark},'%')
</if> </if>
<if test='par.code!=null and par.code!="" '> <if test='par.code!=null and par.code!="" '>
wle.code like concat ('%',#{par.code},'%') AND wle.code like concat ('%',#{par.code},'%')
</if> </if>
</if> </if>
union union
......
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