|
@@ -2,6 +2,7 @@ package com.ruoyi.gas.service.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
|
import com.ruoyi.common.core.page.PagePlus;
|
|
import com.ruoyi.common.core.page.PagePlus;
|
|
@@ -46,6 +47,17 @@ public class GValveWellPositionServiceImpl extends ServicePlusImpl<GValveWellPos
|
|
if (StringUtils.isBlank(districtValue)) {
|
|
if (StringUtils.isBlank(districtValue)) {
|
|
throw new ServiceException("第" + (n + 1) + "行行政区填写错误,导入失败!");
|
|
throw new ServiceException("第" + (n + 1) + "行行政区填写错误,导入失败!");
|
|
}
|
|
}
|
|
|
|
+ GValveWellPosition gValveWellPosition = new GValveWellPosition();
|
|
|
|
+ gValveWellPosition.setDistrict(districtValue);
|
|
|
|
+ gValveWellPosition.setPosition(vo.getPosition());
|
|
|
|
+ gValveWellPosition.setValveWellName(vo.getValveWellName());
|
|
|
|
+ QueryWrapper<GValveWellPosition> query = Wrappers.query(gValveWellPosition);
|
|
|
|
+ query.lambda().last(" LIMIT 1");
|
|
|
|
+ GValveWellPosition gValveWellPosition1 = baseMapper.selectOne(query);
|
|
|
|
+ if (!ObjectUtils.isEmpty(gValveWellPosition1)){
|
|
|
|
+ n++;
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
vo.setDistrict(districtValue);
|
|
vo.setDistrict(districtValue);
|
|
try {
|
|
try {
|
|
n++;
|
|
n++;
|
|
@@ -97,6 +109,7 @@ public class GValveWellPositionServiceImpl extends ServicePlusImpl<GValveWellPos
|
|
lqw.like(StringUtils.isNotBlank(bo.getPosition()), GValveWellPosition::getPosition, bo.getPosition());
|
|
lqw.like(StringUtils.isNotBlank(bo.getPosition()), GValveWellPosition::getPosition, bo.getPosition());
|
|
lqw.eq(StringUtils.isNotBlank(bo.getLongitude()), GValveWellPosition::getLongitude, bo.getLongitude());
|
|
lqw.eq(StringUtils.isNotBlank(bo.getLongitude()), GValveWellPosition::getLongitude, bo.getLongitude());
|
|
lqw.eq(StringUtils.isNotBlank(bo.getLatitude()), GValveWellPosition::getLatitude, bo.getLatitude());
|
|
lqw.eq(StringUtils.isNotBlank(bo.getLatitude()), GValveWellPosition::getLatitude, bo.getLatitude());
|
|
|
|
+ lqw.orderByDesc(GValveWellPosition::getCreateTime);
|
|
return lqw;
|
|
return lqw;
|
|
}
|
|
}
|
|
|
|
|