Bläddra i källkod

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU2/DAL-DAZHOU-OTMS-API

luobang 1 år sedan
förälder
incheckning
b10c4cd0ab

+ 17 - 7
src/main/java/com/steerinfo/dil/controller/OffSiteTransportationController.java

@@ -273,14 +273,24 @@ public class OffSiteTransportationController extends BaseRESTfulController {
     }
 
     @PostMapping(value = "/addTmstruckReceiptResult" )
-    public synchronized RESTfulResult addTmstruckReceiptResult(@RequestBody Map<String,Object>  value , Integer num, String orderNumber, String resultArrivalAddress, Integer imgcount3, Integer imgcount4) throws Exception {
+    public RESTfulResult addTmstruckReceiptResult(@RequestBody Map<String,Object>  value, String orderNumber, String resultArrivalAddress) throws Exception {
         Map<String,Object> map = new HashMap<String,Object>();
         map.put("orderNumber",orderNumber);
         map.put("resultArrivalAddress",resultArrivalAddress);
         map.putAll(value);
         //添加入库实绩
-        Integer resTfulResult = offSiteTransportationService.addTmstruckReceiptResult(map);
-        if (resTfulResult!=4){
+        Integer resTfulResult=-1;
+        try {
+            resTfulResult = offSiteTransportationService.addTmstruckReceiptResult(map);
+        }catch (Exception e){
+            e.printStackTrace();
+            if(e.getMessage()==null||e.getMessage().contains("Exception")){
+                return failed("订单异常,请刷新重试!");
+            }else{
+                return failed(e.getMessage());
+            }
+        }
+        if (resTfulResult==0){
             //关闭运输订单
             offSiteTransportationService.orderClose(orderNumber);
             //查询订单路线实绩
@@ -339,12 +349,12 @@ public class OffSiteTransportationController extends BaseRESTfulController {
                 }
 
             }
-        }else{
+        }else if(resTfulResult ==4 ){
             System.out.println("没有抵达实绩");
             return failed("请先抵达作业!");
+        }else{
+            return failed("签收失败,请刷新重试");
         }
-
-
         return success("签收成功");
     }
 
@@ -354,7 +364,7 @@ public class OffSiteTransportationController extends BaseRESTfulController {
         //入网验证
         String netValidationResult = zhongJiaoXingLu.netValidation(capacityNumber);
         Map netValidationMap = (Map) JSONObject.parse(netValidationResult);
-        if (Integer.parseInt(netValidationMap.get("status").toString())==1001&&netValidationMap.get("result").toString().equals("yes")){
+        if (netValidationMap!=null && Integer.parseInt(netValidationMap.get("status").toString())==1001&&netValidationMap.get("result").toString().equals("yes")){
             String searchPointJson = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address="+ URLEncoder.encode("四川省达州钢铁集团有限责任公司","utf-8")+"&key="+gaodeTonken);
             SearchPoint2 searchPoint=  JSON.parseObject(searchPointJson, SearchPoint2.class);
             String searchPointJson2 = HTTPRequestUtils.sendGet("https://restapi.amap.com/v3/geocode/geo", "address="+URLEncoder.encode("四川省达州钢铁集团有限责任公司","utf-8")+"&key="+gaodeTonken);

+ 1 - 1
src/main/java/com/steerinfo/dil/controller/TmstruckReceiptResultController.java

@@ -102,7 +102,7 @@ public class TmstruckReceiptResultController extends BaseRESTfulController {
             @ApiImplicitParam(name = "map", value = "收货实绩map", required = false, dataType = "java.util.Map")
     })
     @PostMapping(value = "/addTmstruckReceiptResult")
-    public RESTfulResult addTmstruckReceiptResult(@RequestBody(required = false) Map<String, Object> map){
+    public RESTfulResult addTmstruckReceiptResult(@RequestBody(required = false) Map<String, Object> map) throws Exception {
         BigDecimal alreadyExistsArrivalResult = tmstruckArrivalResultMapper.alreadyExistsArrivalResult((String) map.get("orderNumber"));
         if(alreadyExistsArrivalResult!=null){
             TmstruckReceiptResult tmstruckReceiptResult = new TmstruckReceiptResult();

+ 1 - 1
src/main/java/com/steerinfo/dil/service/ITmstruckReceiptResultService.java

@@ -30,7 +30,7 @@ public interface ITmstruckReceiptResultService{
     int addSteelNzReceiptResult(Map<String, Object> map);
 
     //添加收货实绩主表
-    BigDecimal addTmstruckReceiptResult(String orderNumber, TmstruckReceiptResult tmstruckReceiptResult);
+    BigDecimal addTmstruckReceiptResult(String orderNumber, TmstruckReceiptResult tmstruckReceiptResult) throws Exception;
     //获取收货实绩信息
     List<Map<String, Object>> getReceiptResultInfo(Map<String, Object> map);
     //获取抵达作业照片

+ 8 - 1
src/main/java/com/steerinfo/dil/service/impl/OffSiteTransportationServiceImpl.java

@@ -8,6 +8,7 @@ import com.steerinfo.dil.model.TmstruckInTransitWarn;
 import com.steerinfo.dil.model.TmstruckReceiptResult;
 import com.steerinfo.dil.service.ITmstruckReceiptResultService;
 import com.steerinfo.dil.service.OffSiteTransportationService;
+import com.steerinfo.dil.util.DataChange;
 import com.steerinfo.route.mapper.TmstruckArrivalResultMapper;
 import com.steerinfo.route.model.TmstruckReceiptResultChild;
 import com.steerinfo.route.service.ITmstruckReceiptResultChildService;
@@ -241,7 +242,7 @@ public class OffSiteTransportationServiceImpl implements OffSiteTransportationSe
         return routeService.saveRoute(parem).toString();
     }
 
-    public Integer addTmstruckReceiptResult(@RequestBody(required = false) Map<String,Object> map){
+    public Integer addTmstruckReceiptResult(@RequestBody(required = false) Map<String,Object> map) throws Exception {
         BigDecimal alreadyExistsArrivalResult = tmstruckArrivalResultMapper.alreadyExistsArrivalResult((String) map.get("orderNumber"));
         if(alreadyExistsArrivalResult!=null){
             TmstruckReceiptResult tmstruckReceiptResult = new TmstruckReceiptResult();
@@ -252,6 +253,12 @@ public class OffSiteTransportationServiceImpl implements OffSiteTransportationSe
             String resultEmptyContainerPhoto = (String) map.get("url");
             tmstruckReceiptResult.setResultArrivalAddress(resultArrivalAddress);
             tmstruckReceiptResult.setResultEmptyContainerPhoto(resultEmptyContainerPhoto);
+            if(map.get("receiptTime")!=null){
+                tmstruckReceiptResult.setInsertTime(new Date((Long)map.get("receiptTime")));
+                tmstruckReceiptResult.setUpdateTime(new Date());
+            }else{
+                tmstruckReceiptResult.setInsertTime(new Date());
+            }
             //新增收货实绩主表
             BigDecimal receiptResultId = tmstruckReceiptResultService.addTmstruckReceiptResult(orderNumber, tmstruckReceiptResult);
             return 0;

+ 7 - 2
src/main/java/com/steerinfo/dil/service/impl/TmstruckReceiptResultServiceImpl.java

@@ -47,7 +47,7 @@ public class TmstruckReceiptResultServiceImpl implements ITmstruckReceiptResultS
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public synchronized BigDecimal addTmstruckReceiptResult(String orderNumber, TmstruckReceiptResult tmstruckReceiptResult) {
+    public synchronized BigDecimal addTmstruckReceiptResult(String orderNumber, TmstruckReceiptResult tmstruckReceiptResult) throws Exception {
         long id;
         if(tmstruckReceiptResultMapper.selectMaxId()==null){
             id = 1;
@@ -60,10 +60,15 @@ public class TmstruckReceiptResultServiceImpl implements ITmstruckReceiptResultS
         tmstruckReceiptResult.setResultId(new BigDecimal(id));
         //获取并插入总实绩Id
         BigDecimal truckTotalId = tmstruckArrivalResultMapper.getTotalIdByOrderNumber(orderNumber);
+        if(truckTotalId==null){
+            throw new Exception("运单状态异常,无法上传图片,请刷新!");
+        }
         tmstruckReceiptResult.setResultTotalId(truckTotalId);
         //常规字段
         tmstruckReceiptResult.setInsertUsername("admin");
-        tmstruckReceiptResult.setInsertTime(new Date());
+        if(tmstruckReceiptResult.getInsertTime()==null){
+            tmstruckReceiptResult.setInsertTime(new Date());
+        }
         tmstruckReceiptResult.setUpdateUsername("admin");
         tmstruckReceiptResult.setUpdateTime(new Date());
         tmstruckReceiptResult.setInsertUpdateRemark("无");

+ 50 - 4
src/main/java/com/steerinfo/inPlantNavigation/controller/MapVertexController.java

@@ -1,8 +1,11 @@
 package com.steerinfo.inPlantNavigation.controller;
 
+import com.steerinfo.dil.util.ColumnDataUtil;
+import com.steerinfo.dil.util.PageListAdd;
 import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 
+import com.steerinfo.framework.service.pagehelper.PageHelper;
 import com.steerinfo.inPlantNavigation.exception.VertexAngEdgeException;
 import com.steerinfo.inPlantNavigation.model.IPMMSVertex;
 import com.steerinfo.inPlantNavigation.model.IPMMSVertexEdge;
@@ -15,10 +18,8 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
+import java.text.SimpleDateFormat;
+import java.util.*;
 
 /**
  * MapVertex RESTful接口:
@@ -43,6 +44,9 @@ public class MapVertexController extends BaseRESTfulController {
     @Autowired
     IMapVertexEdgeService mapVertexEdgeService;
 
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
     @ApiOperation(value="导入顶点数据,开发用")
     @GetMapping(value = "/importVertex")
     public RESTfulResult importVertex() throws IOException {
@@ -87,4 +91,46 @@ public class MapVertexController extends BaseRESTfulController {
     public RESTfulResult findSelections(){
         return success(mapVertexService.findSelections());
     }
+
+    @PostMapping("/getMapVertex")
+    public RESTfulResult getMapVertex(@RequestBody Map<String,Object> map,
+                                      @RequestParam(required = false,defaultValue = "527",name = "apiId")Integer apiId,
+                                      @RequestParam(required = false,defaultValue = "1",name = "pageNum")Integer pageNum,
+                                      @RequestParam(required = false,defaultValue = "20",name = "pageSize")Integer pageSize){
+        PageHelper.startPage(pageNum, pageSize);
+        List<Map<String,Object>> list= mapVertexService.getMapVertex(map);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, list,list);
+        return success(pageList);
+    }
+
+    @PostMapping("/getMapEdge")
+    public RESTfulResult getMapEdge(@RequestBody Map<String,Object> map,
+                                      @RequestParam(required = false,defaultValue = "528",name = "apiId")Integer apiId,
+                                      @RequestParam(required = false,defaultValue = "1",name = "pageNum")Integer pageNum,
+                                      @RequestParam(required = false,defaultValue = "20",name = "pageSize")Integer pageSize){
+        PageHelper.startPage(pageNum, pageSize);
+        List<Map<String,Object>> list= mapVertexService.getMapEdge(map);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, list,list);
+        return success(pageList);
+    }
+
+    @PostMapping("/addMapVertex")
+    public RESTfulResult addMapVertex(@RequestBody Map<String,Object> map){;
+        return success(mapVertexService.addMapVertex(map));
+    }
+
+    @PostMapping("/addMapEdge")
+    public RESTfulResult addMapEdge(@RequestBody Map<String,Object> map){;
+        return success(mapVertexService.addMapEdge(map));
+    }
+
+    @PostMapping("/delMapVertex")
+    public RESTfulResult delMapVertex(@RequestBody Map<String,Object> map){;
+        return success(mapVertexService.delMapVertex(map));
+    }
+
+    @PostMapping("/delMapEdge")
+    public RESTfulResult delMapEdge(@RequestBody Map<String,Object> map){;
+        return success(mapVertexService.delMapEdge(map));
+    }
 }

+ 16 - 0
src/main/java/com/steerinfo/inPlantNavigation/mapper/MapVertexMapper.java

@@ -14,6 +14,18 @@ import java.util.Map;
 
 @Mapper
 public interface MapVertexMapper extends IBaseMapper<MapVertex, BigDecimal> {
+    @Select("select seq__OTMS_MAPVERTEX.nextval from dual")
+    BigDecimal selectMaxVertextId();
+
+    @Select("select count(*) from MAP_VERTEX where ADDRESS_NAME = #{address}")
+    int isVertexExist(Map<String, Object> map);
+
+    @Select("select seq__OTMS_MAPVERTEXEDGE.nextval from dual")
+    BigDecimal selectMaxEdgeId();
+
+    @Select("select count(*) from MAP_VERTEX_EDGE where INVERTEX_ID = #{startId} AND OUTVERTEX_ID = #{endId}")
+    int isEdgeExist(Map<String, Object> map);
+
     //@Select("SELECT * FROM MAP_VERTEX WHERE STATUS=0")
     List<MapVertex> findAllAvailable();
 
@@ -27,4 +39,8 @@ public interface MapVertexMapper extends IBaseMapper<MapVertex, BigDecimal> {
     String getVertexIdByWarehouseId(String warehouseId);
     //查询导航选项,不包含路口、拐点等
     ArrayList<MapVertex> findSelections();
+
+    List<Map<String, Object>> getMapVertex(Map<String, Object> map);
+
+    List<Map<String, Object>> getMapEdge(Map<String, Object> map);
 }

+ 12 - 0
src/main/java/com/steerinfo/inPlantNavigation/service/IMapVertexService.java

@@ -42,4 +42,16 @@ public interface IMapVertexService {
     //根据订单号判断订单状况,找当前起点终点并返回最短路径
     ArrayList<MapVertex> getPathByOrderID(String orderId,String startStep,String endStep,Map<String, MapVertex> vertexList,Map<String, List<MapVertexEdge>> vertexEdgeList) throws VertexAngEdgeException;
 
+    //查询顶点
+    List<Map<String, Object>> getMapVertex(Map<String,Object> map);
+    //查询边
+    List<Map<String, Object>> getMapEdge(Map<String,Object> map);
+    //新增顶点
+    String addMapVertex(Map<String, Object> map);
+    //新增边
+    String addMapEdge(Map<String, Object> map);
+    //删除点
+    Object delMapVertex(Map<String, Object> map);
+    //删除边
+    Object delMapEdge(Map<String, Object> map);
 }

+ 61 - 0
src/main/java/com/steerinfo/inPlantNavigation/service/impl/MapVertexServiceImpl.java

@@ -1,7 +1,9 @@
 package com.steerinfo.inPlantNavigation.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
+import com.steerinfo.dil.util.DataChange;
 import com.steerinfo.inPlantNavigation.exception.VertexAngEdgeException;
+import com.steerinfo.inPlantNavigation.mapper.MapVertexEdgeMapper;
 import com.steerinfo.inPlantNavigation.mapper.MapVertexMapper;
 import com.steerinfo.inPlantNavigation.model.IPMMSVertex;
 import com.steerinfo.inPlantNavigation.model.IPMMSVertexEdge;
@@ -37,6 +39,9 @@ public class MapVertexServiceImpl implements IMapVertexService {
     @Autowired
     private MapVertexMapper mapVertexMapper;
 
+    @Autowired
+    private MapVertexEdgeMapper mapVertexEdgeMapper;
+
 
     @Override
     public int importVertex(String filePath) throws IOException {
@@ -317,4 +322,60 @@ public class MapVertexServiceImpl implements IMapVertexService {
         }
         return point;
     }
+
+    @Override
+    public List<Map<String, Object>> getMapVertex(Map<String, Object> map) {
+        return mapVertexMapper.getMapVertex(map);
+    }
+
+    @Override
+    public List<Map<String, Object>> getMapEdge(Map<String, Object> map) {
+        return mapVertexMapper.getMapEdge(map);
+    }
+
+    @Override
+    public String addMapVertex(Map<String, Object> map) {
+        MapVertex mapVertex=new MapVertex();
+        if(mapVertexMapper.isVertexExist(map)>0){
+            return "已存在!请勿重复新增!";
+        }
+        mapVertex.setVertexId(mapVertexMapper.selectMaxVertextId());
+        mapVertex.setLongitude(DataChange.dataToBigDecimal(map.get("lon")));
+        mapVertex.setLatitude(DataChange.dataToBigDecimal(map.get("lat")));
+        mapVertex.setStatus(BigDecimal.ZERO);
+        mapVertex.setInsertUpdateRemark(""+map.get("insertUpdateRemark"));
+        mapVertex.setAddressName(""+map.get("address"));
+        return "新增"+mapVertexMapper.insertSelective(mapVertex)+"个成功!";
+    }
+
+    @Override
+    public String addMapEdge(Map<String, Object> map) {
+        MapVertexEdge mapVertexEdge = new MapVertexEdge();
+        if(mapVertexMapper.isEdgeExist(map)>0){
+            return "已存在!请勿重复新增!";
+        }
+        //正
+        mapVertexEdge.setVertexedgeId(mapVertexMapper.selectMaxEdgeId());
+        mapVertexEdge.setOutvertexId(DataChange.dataToBigDecimal(map.get("startId")));
+        mapVertexEdge.setInvertexId(DataChange.dataToBigDecimal(map.get("endId")));
+        mapVertexEdge.setWeigh(DataChange.dataToBigDecimal(map.get("weight")));
+        mapVertexEdgeMapper.insertSelective(mapVertexEdge);
+        //反
+        mapVertexEdge.setVertexedgeId(mapVertexMapper.selectMaxEdgeId());
+        mapVertexEdge.setOutvertexId(DataChange.dataToBigDecimal(map.get("endId")));
+        mapVertexEdge.setInvertexId(DataChange.dataToBigDecimal(map.get("startId")));
+        mapVertexEdge.setWeigh(DataChange.dataToBigDecimal(map.get("weight")));
+        mapVertexEdgeMapper.insertSelective(mapVertexEdge);
+        return "新增成功!";
+    }
+
+    @Override
+    public Object delMapVertex(Map<String, Object> map) {
+        return "删除"+mapVertexMapper.deleteByPrimaryKey(DataChange.dataToBigDecimal(map.get("vertexId")))+"个成功!";
+    }
+
+    @Override
+    public Object delMapEdge(Map<String, Object> map) {
+        return "删除"+mapVertexEdgeMapper.deleteByPrimaryKey(DataChange.dataToBigDecimal(map.get("vertexEdgeId")))+"个成功!";
+    }
 }

+ 9 - 1
src/main/java/com/steerinfo/route/controller/TmstruckArrivalResultController.java

@@ -65,15 +65,23 @@ public class TmstruckArrivalResultController extends BaseRESTfulController {
         TmstruckArrivalResult tmstruckArrivalResult = new TmstruckArrivalResult();
         tmstruckArrivalResult.setResultArrivalAddress(resultArrivalAddress);
         tmstruckArrivalResult.setResultFullContainerPhoto(resultFullContainerPhoto);
+        if(map.get("arrivalTime")!=null){
+            tmstruckArrivalResult.setInsertTime(new Date((Long)map.get("arrivalTime")));
+            tmstruckArrivalResult.setUpdateTime(new Date());
+        }
         int i = tmstruckArrivalResultService.addtmstruckArrivalResult(orderNumber,tmstruckArrivalResult);
         return success(i);
     }
 
     @PostMapping(value = "/addtmstruckArrivalResult")
-    public RESTfulResult addtmstruckArrivalResult(String orderNumber, String resultArrivalAddress, String file) throws Exception {
+    public RESTfulResult addtmstruckArrivalResult(@RequestBody(required=false)Map<String,Object>  map ,String orderNumber, String resultArrivalAddress, String file) throws Exception {
         TmstruckArrivalResult tmstruckArrivalResult = new TmstruckArrivalResult();
         tmstruckArrivalResult.setResultArrivalAddress(resultArrivalAddress);
         tmstruckArrivalResult.setResultFullContainerPhoto(file);
+        if(map.get("arrivalTime")!=null){
+            tmstruckArrivalResult.setInsertTime(new Date((Long)map.get("arrivalTime")));
+            tmstruckArrivalResult.setUpdateTime(new Date());
+        }
         int i = tmstruckArrivalResultService.addtmstruckArrivalResult(orderNumber,tmstruckArrivalResult);
         return success(i);
 

+ 3 - 1
src/main/java/com/steerinfo/route/service/impl/TmstruckArrivalResultServiceImpl.java

@@ -73,7 +73,9 @@ public class TmstruckArrivalResultServiceImpl implements ITmstruckArrivalResultS
         tmstruckArrivalResult.setResultTotalId(truckTotalId);
         //常规字段
         tmstruckArrivalResult.setInsertUsername("admin");
-        tmstruckArrivalResult.setInsertTime(new Date());
+        if(tmstruckArrivalResult.getInsertTime()==null){
+            tmstruckArrivalResult.setInsertTime(new Date());
+        }
         tmstruckArrivalResult.setUpdateUsername("admin");
         tmstruckArrivalResult.setUpdateTime(new Date());
         tmstruckArrivalResult.setInsertUpdateRemark("无");

+ 12 - 4
src/main/java/com/steerinfo/route/threeRequest/ZhongJiaoXingLu.java

@@ -106,12 +106,16 @@ public class ZhongJiaoXingLu {
             map.put("cid", cid);
             map.put("srt", srt);
             map.put("timeNearby", "10");
-            map.put("vnos", capcityNumber+"_2");
+            if(capcityNumber.length()==8){
+                map.put("vnos", capcityNumber+"_3");
+            }else{
+                map.put("vnos", capcityNumber+"_2");
+            }
             String url = "https://openapi.sinoiov.cn/save/apis/transTimeManageV3";
             DataExchangeService des = new DataExchangeService(5000, 8000);
             // 通过 https 方式调用,此方法内部会使用私钥生成签名参数 sign,私钥不会发送
             String res = des.postHttps(url, map);
-            System.out.println("getCurrentLocation:"+res);
+            System.out.println("getCurrentLocation:{capcityNumber:"+capcityNumber+",time:"+new Date()+",res:"+res+"}");
             JSONObject jsonObject = JSONObject.parseObject(res);
             try{
                 jsonObject.put("result",jsonObject.getJSONObject("result").get("firstVcl"));
@@ -218,8 +222,12 @@ public class ZhongJiaoXingLu {
             map.put("cid", cid);
             map.put("srt", srt);
             map.put("vclN", vclN+"_2");
+            if(vclN!=null && vclN.length()==8){
+                //新能源
+                map.put("vclN", vclN+"_3");
+            }
             String url = "https://openapi.sinoiov.cn/save/apis/checkTruckExistV2";
-            DataExchangeService des = new DataExchangeService(5000, 8000);
+            DataExchangeService des = new DataExchangeService(500, 500);
 
             // 通过 https 方式调用,此方法内部会使用私钥生成签名参数 sign,私钥不会发送
             String res = des.postHttps(url, map);
@@ -231,7 +239,7 @@ public class ZhongJiaoXingLu {
             }
             return res;
         } catch (Exception e) {
-            System.out.println("e:" + e.getMessage());
+            System.out.println("中交兴路入网验证异常:" + e.getMessage());
         }
         return null;
     }

+ 1 - 1
src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml

@@ -775,7 +775,7 @@
                     -- 判断出厂实绩的出厂时间不为空
                     TLFR.RESULT_OUT_GATE_TIME IS NOT NULL
                     --   并且订单类型等于1(销售订单),2(焦炭发运计划),3(水渣发运计划)
-                    AND OO.ORDER_TYPE =1 AND OO.ORDER_NUMBER=#{orderNumber}
+                    AND OO.ORDER_NUMBER=#{orderNumber}
                     
                     )
                 FETCH NEXT 1 ROWS ONLY

+ 40 - 2
src/main/resources/com/steerinfo/inPlantNavigation/mapper/MapVertexMapper.xml

@@ -405,8 +405,46 @@
 
   <select id="findSelections" resultMap="BaseResultMap">
     SELECT  MV.*,LOCATION_MAPPING_ID
-    FROM MAP_VERTEX MV,MAP_LOCATION_MAPPING MLM
-    WHERE MV.VERTEX_ID = MLM.VERTEX_ID
+    FROM MAP_VERTEX MV
+    LEFT JOIN MAP_LOCATION_MAPPING MLM
+    ON MV.VERTEX_ID = MLM.VERTEX_ID
+    WHERE MLM.VERTEX_ID IS NOT NULL OR MV.INSERT_UPDATE_REMARK = '非路口'
     ORDER BY LOCATION_MAPPING_ID
     </select>
+    <select id="getMapVertex" resultType="java.util.Map">
+      SELECT VERTEX_ID "vertexId",
+             ADDRESS_NAME "addressName",
+             LONGITUDE "longtitude",
+             LATITUDE "latitude",
+             STATUS "status"
+      FROM MAP_VERTEX
+      <where>
+        <if test="con!=null and con!=''">
+          ADDRESS_NAME like Concat(Concat('%',#{con}),'%')
+        </if>
+      </where>
+      ORDER BY VERTEX_ID DESC
+    </select>
+  <select id="getMapEdge" resultType="java.util.Map">
+    SELECT
+      MV1 .ADDRESS_NAME "startName",
+      MV1 .LONGITUDE "longtitudeS",
+      MV1 .LATITUDE "latitudeS",
+      MV2 .ADDRESS_NAME "endName",
+      MV2 .LONGITUDE "longtitudeE",
+      MV2 .LATITUDE "latitudeE",
+      MVE .VERTEXEDGE_ID "vertexEdgeId",
+      MVE .WEIGH "weight"
+    FROM MAP_VERTEX_EDGE MVE
+   LEFT JOIN MAP_VERTEX MV1 ON MVE .OUTVERTEX_ID = MV1 .VERTEX_ID
+   LEFT JOIN MAP_VERTEX MV2 ON MVE .INVERTEX_ID = MV2 .VERTEX_ID
+    <where>
+      MV1 .ADDRESS_NAME IS NOT NULL
+      AND MV2 .ADDRESS_NAME IS NOT NULL
+      <if test="con!=null and con!=''">
+      AND  MV1 .ADDRESS_NAME || MV2 .ADDRESS_NAME like Concat(Concat('%',#{con}),'%')
+      </if>
+    </where>
+    ORDER BY MVE .VERTEXEDGE_ID DESC
+  </select>
 </mapper>

+ 1 - 1
src/main/resources/com/steerinfo/route/mapper/TmstruckArrivalResultMapper.xml

@@ -530,7 +530,7 @@
         from TMSTRUCK_TOTAL_RESULT t_total
                left join OMSTRUCK_ORDER o_order
                          on t_total.ORDER_ID=o_order.ORDER_ID
-        where o_order.ORDER_NUMBER = #{orderNumber}
+        where o_order.ORDER_NUMBER = #{orderNumber} AND o_order.ORDER_STATUS IN (2,5)
   </select>