|
|
@@ -6,16 +6,17 @@ import com.railway.business.baseinfo.mapper.BusZzdzxxMapper;
|
|
|
import com.railway.business.catenary.domain.BusJlgz;
|
|
|
import com.railway.business.catenary.domain.BusJlgzPic;
|
|
|
import com.railway.business.catenary.domain.vo.BusJlgzListByZzVo;
|
|
|
-import com.railway.business.catenary.domain.vo.BusJlgzQueryVo;
|
|
|
import com.railway.business.catenary.domain.vo.JlgzLineVo;
|
|
|
import com.railway.business.catenary.domain.vo.JlgzSubstationVo;
|
|
|
import com.railway.business.catenary.mapper.BusJlgzMapper;
|
|
|
import com.railway.business.catenary.mapper.BusJlgzPicMapper;
|
|
|
import com.railway.business.catenary.service.IBusJlgzService;
|
|
|
+import com.railway.common.core.domain.entity.SysDictData;
|
|
|
import com.railway.common.enums.DelFlagEnum;
|
|
|
import com.railway.common.utils.SecurityUtils;
|
|
|
import com.railway.common.utils.StringUtils;
|
|
|
import com.railway.common.utils.sql.SqlUtil;
|
|
|
+import com.railway.system.mapper.SysDictDataMapper;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -35,11 +36,13 @@ public class BusJlgzServiceImpl implements IBusJlgzService {
|
|
|
private final BusJlgzMapper busJlgzMapper;
|
|
|
private final BusJlgzPicMapper busJlgzPicMapper;
|
|
|
private final BusZzdzxxMapper busZzdzxxMapper;
|
|
|
+ private final SysDictDataMapper sysDictDataMapper;
|
|
|
|
|
|
- public BusJlgzServiceImpl(BusJlgzMapper busJlgzMapper, BusJlgzPicMapper busJlgzPicMapper, BusZzdzxxMapper busZzdzxxMapper) {
|
|
|
+ public BusJlgzServiceImpl(BusJlgzMapper busJlgzMapper, BusJlgzPicMapper busJlgzPicMapper, BusZzdzxxMapper busZzdzxxMapper, SysDictDataMapper sysDictDataMapper) {
|
|
|
this.busJlgzMapper = busJlgzMapper;
|
|
|
this.busJlgzPicMapper = busJlgzPicMapper;
|
|
|
this.busZzdzxxMapper = busZzdzxxMapper;
|
|
|
+ this.sysDictDataMapper = sysDictDataMapper;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -153,30 +156,25 @@ public class BusJlgzServiceImpl implements IBusJlgzService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<BusJlgzListByZzVo> getListByZz(BusJlgzQueryVo busJlgzQueryVo) {
|
|
|
- if (busJlgzQueryVo.getPillarArea() == null) {
|
|
|
- busJlgzQueryVo.setPillarArea("500");
|
|
|
+ public List<BusJlgzListByZzVo> getListByZz(BusSmartQueryVo busSmartQueryVo) {
|
|
|
+ if (busSmartQueryVo.getPillarArea() == null) {
|
|
|
+ busSmartQueryVo.setPillarArea("500");
|
|
|
}
|
|
|
- // 有站场区间,支柱号 查询支柱公里标
|
|
|
- if (StringUtils.isNoneBlank(busJlgzQueryVo.getPillarCode())
|
|
|
- && busJlgzQueryVo.getStationId() != null) {
|
|
|
- BusSmartQueryVo vo = new BusSmartQueryVo();
|
|
|
- vo.setPillarCode(busJlgzQueryVo.getPillarCode());
|
|
|
- vo.setStationId(busJlgzQueryVo.getStationId());
|
|
|
- vo.setLineId(busJlgzQueryVo.getLineId());
|
|
|
- vo.setXingbie(busJlgzQueryVo.getXingbie());
|
|
|
- List<BusZzdzxx> zzList = busZzdzxxMapper.smartQuery(vo);
|
|
|
- if(zzList != null && zzList.size() == 1){
|
|
|
- BusZzdzxx zz = zzList.get(0);
|
|
|
- busJlgzQueryVo.setMarker(zz.getMarker());
|
|
|
- return busJlgzMapper.getListByZz(busJlgzQueryVo);
|
|
|
- }
|
|
|
- else {
|
|
|
- return new ArrayList<BusJlgzListByZzVo>();
|
|
|
- }
|
|
|
+ List<BusZzdzxx> zzList = busZzdzxxMapper.smartQuery(busSmartQueryVo);
|
|
|
+ if(zzList != null && zzList.size() == 1){
|
|
|
+ return busJlgzMapper.getListByZz(busSmartQueryVo);
|
|
|
}
|
|
|
else {
|
|
|
- return new ArrayList<BusJlgzListByZzVo>();
|
|
|
+ List<BusJlgzListByZzVo> list = new ArrayList<BusJlgzListByZzVo>();
|
|
|
+ List<SysDictData> gzyy = sysDictDataMapper.selectDictDataByType("gzyy");
|
|
|
+ for (SysDictData d : gzyy) {
|
|
|
+ BusJlgzListByZzVo vo = new BusJlgzListByZzVo();
|
|
|
+ vo.setYylx(d.getDictValue());
|
|
|
+ vo.setYylxText(d.getDictLabel());
|
|
|
+ vo.setTotal(0);
|
|
|
+ list.add(vo);
|
|
|
+ }
|
|
|
+ return list;
|
|
|
}
|
|
|
}
|
|
|
|