فهرست منبع

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

胡半仙 3 سال پیش
والد
کامیت
2455f923ce

+ 6 - 0
src/main/java/com/steerinfo/dil/controller/AMScontroller.java

@@ -1649,4 +1649,10 @@ public class AMScontroller{
     public Map<String, Object> getBenPrice(@RequestBody Map<String,Object> map){
         return amsFeign.getBenPrice(map);
     }
+
+    @ApiOperation(value="批量拒绝定向派单")
+    @PostMapping(value = "/refuseDispatchSaleOrderList")
+    public Map<String, Object> refuseDispatchSaleOrderList(@RequestBody List<Map<String, Object>> mapList) {
+        return amsFeign.refuseDispatchSaleOrderList(mapList);
+    }
 }

+ 30 - 0
src/main/java/com/steerinfo/dil/controller/JoinController.java

@@ -0,0 +1,30 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.feign.JoinFeign;
+import com.steerinfo.framework.controller.RESTfulResult;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ author    :TXF
+ * @ time      :2022/2/24 18:09
+ */
+
+@RestController
+@RequestMapping("${api.version}/join")
+public class JoinController {
+
+    @Autowired
+    JoinFeign joinFeign;
+
+    @PostMapping("/receiveTmsTruckWeightResult")
+    public Map<String, Object> receiveTmsTruckWeightResult(@RequestBody(required = false) List<Map<String, Object>> mapList) {
+        return joinFeign.receiveTmsTruckWeightResult(mapList);
+    }
+}

+ 2 - 2
src/main/java/com/steerinfo/dil/controller/OMSController.java

@@ -759,8 +759,8 @@ public class OMSController {
 
     @ApiOperation(value = "查看所有实绩点")
     @PostMapping("/getAllResultLineMes")
-    public Map<String, Object> getAllResultLineMes(Integer orderId){
-        return omsFeign.getAllResultLineMes(orderId);
+    public Map<String, Object> getAllResultLineMes(Integer orderId, String orderNumber){
+        return omsFeign.getAllResultLineMes(orderId, orderNumber);
     }
 
     @ApiOperation(value = "正常关闭运输订单")

+ 19 - 30
src/main/java/com/steerinfo/dil/controller/TMSController.java

@@ -51,12 +51,11 @@ public class TMSController extends BaseRESTfulController {
     public Map<String, Object> getBargeOperationList(@RequestBody(required = false) Map<String, Object> mapValue,
                                                      Integer pageNum,
                                                      Integer pageSize,
-                                                     Integer apiId,
-                                                     String con) {
+                                                     Integer apiId) {
         if (mapValue == null) {
             mapValue = new HashMap<>();
         }
-        return tmsshipFeign.getBargeOperationList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con);
+        return tmsshipFeign.getBargeOperationList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId);
     }
 
     @PostMapping("selectBargeOperation/{bargeOperationId}")
@@ -115,12 +114,11 @@ public class TMSController extends BaseRESTfulController {
     public Map<String, Object> getLoadShipList(@RequestBody(required = false) Map<String, Object> mapValue,
                                                Integer pageNum,
                                                Integer pageSize,
-                                               Integer apiId,
-                                               String con) {
+                                               Integer apiId) {
         if (mapValue == null) {
             mapValue = new HashMap<>();
         }
-        return tmsshipFeign.getLoadShipList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con);
+        return tmsshipFeign.getLoadShipList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId);
     }
 
     @PostMapping("getLoadShip/{resultId}")
@@ -212,12 +210,11 @@ public class TMSController extends BaseRESTfulController {
     public Map<String, Object> listAllOrders(@RequestBody(required = false) Map<String, Object> mapValue,
                                              Integer pageNum,
                                              Integer pageSize,
-                                             Integer apiId,
-                                             String con) {
+                                             Integer apiId) {
         if (mapValue == null) {
             mapValue = new HashMap<>();
         }
-        return tmsshipFeign.listAllOrders(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con);
+        return tmsshipFeign.listAllOrders(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId);
     }
 
 
@@ -225,9 +222,8 @@ public class TMSController extends BaseRESTfulController {
     public Map<String, Object> getBatchList(@RequestBody(required = false) Map<String, Object> mapValue,
                                             Integer pageNum,
                                             Integer pageSize,
-                                            Integer apiId,
-                                            String con){
-        return  tmsshipFeign.getBatchList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId, con);
+                                            Integer apiId){
+        return  tmsshipFeign.getBatchList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId);
     }
 
 
@@ -256,12 +252,11 @@ public class TMSController extends BaseRESTfulController {
     public Map<String, Object> getCapacityList(@RequestBody(required = false) Map<String, Object> mapValue,
                                                Integer pageNum,
                                                Integer pageSize,
-                                               Integer apiId,
-                                               String con) {
+                                               Integer apiId) {
         if (mapValue == null) {
             mapValue = new HashMap<>();
         }
-        return tmsshipFeign.getCapacityList(mapValue, pageNum, pageSize, apiId,con);
+        return tmsshipFeign.getCapacityList(mapValue, pageNum, pageSize, apiId);
     }
 
     /**
@@ -277,10 +272,9 @@ public class TMSController extends BaseRESTfulController {
     public Map<String, Object> getUnLoadShipList(@RequestBody(required = false) Map<String, Object> mapValue,
                                                  Integer pageNum,
                                                  Integer pageSize,
-                                                 Integer apiId,
-                                                 String con) {
+                                                 Integer apiId) {
 
-        return tmsshipFeign.getUnLoadShipList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con);
+        return tmsshipFeign.getUnLoadShipList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId);
     }
 
     @PostMapping("getUnloadShip/{resultId}")
@@ -327,10 +321,9 @@ public class TMSController extends BaseRESTfulController {
     public Map<String, Object> getWaterQualityResultList(@RequestBody(required = false) Map<String, Object> mapValue,
                                                          Integer pageNum,
                                                          Integer pageSize,
-                                                         Integer apiId,
-                                                         String con) {
+                                                         Integer apiId) {
 
-        return tmsshipFeign.getWaterQualityResultList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con);
+        return tmsshipFeign.getWaterQualityResultList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId);
     }
 
     @PostMapping("getWaterQuality/{resultId}")
@@ -425,12 +418,11 @@ public class TMSController extends BaseRESTfulController {
                                                            Integer pageNum,
                                                            Integer pageSize,
                                                            Integer apiId,
-                                                           String con,
                                                            String status) {
         if (mapValue == null) {
             mapValue = new HashMap<>();
         }
-        return tmsshipFeign.getShipMentInstructionsList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con,status);
+        return tmsshipFeign.getShipMentInstructionsList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,status);
     }
 
     @PostMapping("getShipmentInstructions/{instructionsId}")
@@ -477,12 +469,11 @@ public class TMSController extends BaseRESTfulController {
     public Map<String, Object> getAmsshipCargoTranferResultList(@RequestBody(required = false) Map<String, Object> mapValue,
                                                                 Integer pageNum,
                                                                 Integer pageSize,
-                                                                Integer apiId,
-                                                                String con) {
+                                                                Integer apiId) {
         if (mapValue == null) {
             mapValue = new HashMap<>();
         }
-        return tmsshipFeign.getAmsshipCargoTranferResultList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con);
+        return tmsshipFeign.getAmsshipCargoTranferResultList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId);
     }
     @PostMapping("getGroupList")
     @ApiOperation(value = "展示收货人列表")
@@ -566,12 +557,11 @@ public class TMSController extends BaseRESTfulController {
                                                               Integer pageNum,
                                                               Integer pageSize,
                                                               Integer apiId,
-                                                              String con,
                                                               Integer status) {
         if (mapValue == null) {
             mapValue = new HashMap<>();
         }
-        return tmsshipFeign.getAmsshipDeliveryAttroneyList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con,status);
+        return tmsshipFeign.getAmsshipDeliveryAttroneyList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,status);
     }
 
     @PostMapping("insertshipDeliveryAttorney")
@@ -619,12 +609,11 @@ public class TMSController extends BaseRESTfulController {
                                                          Integer pageNum,
                                                          Integer pageSize,
                                                          Integer apiId,
-                                                         String con,
                                                          Integer status) {
         if (mapValue == null) {
             mapValue = new HashMap<>();
         }
-        return tmsshipFeign.getshipDeliveryNoticeList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,con,status);
+        return tmsshipFeign.getshipDeliveryNoticeList(mapValue==null?new HashMap<>():mapValue, pageNum, pageSize, apiId,status);
     }
 
     @PostMapping("insertDeliveryNotice")

+ 49 - 4
src/main/java/com/steerinfo/dil/controller/UniversalController.java

@@ -244,10 +244,11 @@ public class UniversalController extends BaseRESTfulController {
     })
     @PostMapping("/queryAPOMaterialByLike")
     public RESTfulResult queryAPOMaterialByLike(@RequestBody(required = false) Map<String,Object> mapValue,
-                                             Integer pageNum,
-                                             Integer pageSize,
-                                             Integer apiId,
-                                             String index) {
+                                                Integer pageNum,
+                                                Integer pageSize,
+                                                Integer apiId,
+                                                String index,
+                                                Integer supplierId) {
 
         if(mapValue == null) {
             mapValue = new HashMap<>();
@@ -255,6 +256,9 @@ public class UniversalController extends BaseRESTfulController {
         if(index != null && !"".equals(index) &&!"null".equals(index)){
             mapValue.put("index", index);
         }
+        if(supplierId != null){
+            mapValue.put("supplierId", supplierId);
+        }
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = universalMapper.queryAPOMaterialByLike(mapValue);
@@ -523,6 +527,13 @@ public class UniversalController extends BaseRESTfulController {
         return success(list);
     }
 
+    @ApiModelProperty(value = "边输边查批次")
+    @GetMapping("/getBatchByLike")
+    public RESTfulResult getBatchByLike(@RequestParam("index") String index) {
+        List<Map<String, Object>> list = universalMapper.getBatchByLike(index == null ? "" : index);
+        return success(list);
+    }
+
     @ApiModelProperty(value = "根据运力id查询所有承运商(下拉框)")
     @GetMapping("/getCarrierByCapacityId")
     public RESTfulResult getCarrierByCapacityId(@RequestParam("capacityId") Integer capacityId) {
@@ -568,4 +579,38 @@ public class UniversalController extends BaseRESTfulController {
         PageListAdd data = columnDataUtil.tableColumnData(apiId, columnList);
         return success(data);
     }
+
+    @ApiModelProperty(value = "获得港口下拉框")
+    @GetMapping("/getPortId")
+    public RESTfulResult getPortId() {
+        return success(universalService.getPortId());
+    }
+
+    @ApiModelProperty(value = "获取车牌号边输边查")
+    @GetMapping("/getCapacityNumber")
+    public RESTfulResult getCapacityNumber(String index) {
+        if(index.length() < 3){
+            return failed();
+        }
+        return success(universalService.getCapacityNumber(index));
+    }
+
+    @ApiModelProperty(value = "获得订单号及订单号下面物资")
+    @GetMapping("/getOrderNumber")
+    public RESTfulResult getOrderNumber(String capacityId) {
+        return success(universalService.getOrderNumber(capacityId));
+    }
+
+    @ApiModelProperty(value = "根据订单查询物资")
+    @GetMapping("/getMaterialIdByOrderId")
+    public RESTfulResult getMaterialIdByOrderId(Integer orderId) {
+        return success(universalService.getMaterialIdByOrderId(orderId));
+    }
+
+    @ApiOperation(value = "修改路段顺序号")
+    @PostMapping("/updateLineSqe")
+    public RESTfulResult updateLineSqe(@RequestBody Map<String,Object> map) {
+        int i = universalMapper.updateLineSqe(map);
+        return success(i);
+    }
 }

+ 0 - 5
src/main/java/com/steerinfo/dil/controller/WMSController.java

@@ -866,11 +866,6 @@ public class WMSController extends BaseRESTfulController {
 
 
 
-    //收发存
-    @PostMapping("/addSendReceive")
-    public RESTfulResult addSendReceive() {
-        return wmsFeign.addSendReceive();
-    }
 
         //    获取物资类型
         @PostMapping(value = "/getMaterialTypeList")

+ 3 - 0
src/main/java/com/steerinfo/dil/feign/AmsFeign.java

@@ -1509,4 +1509,7 @@ public interface AmsFeign {
 
     @PostMapping(value = "/api/v1/ams/amssaleordermaterials/getBenPrice")
     Map<String, Object> getBenPrice(@RequestBody Map<String, Object> map);
+
+    @PostMapping(value = "/api/v1/ams/amsdispatchsaleorders/refuseDispatchSaleOrderList")
+    Map<String, Object> refuseDispatchSaleOrderList(List<Map<String, Object>> mapList);
 }

+ 22 - 0
src/main/java/com/steerinfo/dil/feign/JoinFeign.java

@@ -0,0 +1,22 @@
+package com.steerinfo.dil.feign;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ author    :TXF
+ * @ time      :2022/2/24 18:07
+ */
+
+@FeignClient(value = "dal-dazhou-join-api",url = "${openfeign.JoinFeign.url}")
+public interface JoinFeign {
+
+    @PostMapping("api/v1/join/tmstruckweightresult/receiveTmsTruckWeightResult")
+    Map<String, Object> receiveTmsTruckWeightResult(@RequestBody List<Map<String, Object>> mapList);
+
+}

+ 1 - 1
src/main/java/com/steerinfo/dil/feign/OmsFeign.java

@@ -446,7 +446,7 @@ public interface OmsFeign {
 
 
     @PostMapping("api/v1/oms/omstruckorderseparates/getAllResultLineMes")
-    Map<String, Object> getAllResultLineMes(@RequestParam("orderId") Integer orderId);
+    Map<String, Object> getAllResultLineMes(@RequestParam("orderId") Integer orderId, @RequestParam("orderNumber") String orderNumber);
 
     @PostMapping("api/v1/oms/omstruckorderseparates/closeInwardOrder")
     Map<String, Object> closeInwardOrder(@RequestParam("orderId") Integer orderId);

+ 8 - 19
src/main/java/com/steerinfo/dil/feign/TmsshipFeign.java

@@ -28,8 +28,7 @@ public interface TmsshipFeign {
     Map<String, Object> getBargeOperationList(@RequestBody(required = false) Map<String, Object> mapValue,
                                         @RequestParam Integer pageNum,
                                         @RequestParam Integer pageSize,
-                                        @RequestParam Integer apiId,
-                                              @RequestParam String con);
+                                        @RequestParam Integer apiId);
 
     /**
      * 查询驳船作业信息
@@ -107,8 +106,7 @@ public interface TmsshipFeign {
     Map<String, Object> getLoadShipList(@RequestBody(required = false) Map<String, Object> mapValue,
                                   @RequestParam Integer pageNum,
                                   @RequestParam Integer pageSize,
-                                  @RequestParam Integer apiId,
-                                        @RequestParam String con);
+                                  @RequestParam Integer apiId);
 
     /**
      * 查询装船作业表单
@@ -234,8 +232,7 @@ public interface TmsshipFeign {
     Map<String, Object> listAllOrders(@RequestBody(required = false) Map<String, Object> mapValue,
                                 @RequestParam Integer pageNum,
                                 @RequestParam Integer pageSize,
-                                @RequestParam Integer apiId,
-                                      @RequestParam String con);
+                                @RequestParam Integer apiId);
 
     /**
      * 展示船只信息
@@ -250,8 +247,7 @@ public interface TmsshipFeign {
     Map<String, Object> getCapacityList(@RequestBody(required = false) Map<String, Object> mapValue,
                                         @RequestParam Integer pageNum,
                                         @RequestParam Integer pageSize,
-                                        @RequestParam Integer apiId,
-                                        @RequestParam String con);
+                                        @RequestParam Integer apiId);
 
     /**
      * 展示卸船作业信息列表
@@ -266,8 +262,7 @@ public interface TmsshipFeign {
     Map<String, Object> getUnLoadShipList(@RequestBody(required = false) Map<String, Object> mapValue,
                                           @RequestParam Integer pageNum,
                                           @RequestParam Integer pageSize,
-                                          @RequestParam Integer apiId,
-                                          @RequestParam String con);
+                                          @RequestParam Integer apiId);
 
     /**
      * 查询卸船作业信息
@@ -327,8 +322,7 @@ public interface TmsshipFeign {
     Map<String, Object> getWaterQualityResultList(@RequestBody(required = false) Map<String, Object> mapValue,
                                             @RequestParam Integer pageNum,
                                             @RequestParam Integer pageSize,
-                                            @RequestParam Integer apiId,
-                                                  @RequestParam String con);
+                                            @RequestParam Integer apiId);
 
     /**
      * 查询水分质检信息
@@ -441,7 +435,6 @@ public interface TmsshipFeign {
                                               @RequestParam Integer pageNum,
                                               @RequestParam Integer pageSize,
                                               @RequestParam Integer apiId,
-                                                    @RequestParam String con,
                                                     @RequestParam String status);
 
     /**
@@ -543,8 +536,7 @@ public interface TmsshipFeign {
     Map<String, Object> getBatchList(@RequestBody(required = false) Map<String, Object> mapValue,
                                      @RequestParam Integer pageNum,
                                      @RequestParam Integer pageSize,
-                                     @RequestParam Integer apiId,
-                                     @RequestParam String con);
+                                     @RequestParam Integer apiId);
 
 
 
@@ -572,8 +564,7 @@ public interface TmsshipFeign {
     Map<String, Object> getAmsshipCargoTranferResultList(@RequestBody(required = false) Map<String, Object> mapValue,
                                                          @RequestParam Integer pageNum,
                                                          @RequestParam Integer pageSize,
-                                                         @RequestParam Integer apiId,
-                                                         @RequestParam String con);
+                                                         @RequestParam Integer apiId);
     @PostMapping(value = "/api/v1/shipTms/amsshipcargotransferresults/selectShippeByName")
     Map<String, Object>   selectShippeByName(@RequestBody(required = false) Map<String, Object> mapValue,
                                              @RequestParam Integer pageNum,
@@ -643,7 +634,6 @@ public interface TmsshipFeign {
                                                  @RequestParam Integer pageNum,
                                                  @RequestParam Integer pageSize,
                                                  @RequestParam Integer apiId,
-                                                 @RequestParam String con,
                                                  @RequestParam Integer status);
 
     /**
@@ -705,7 +695,6 @@ public interface TmsshipFeign {
                                             @RequestParam Integer pageNum,
                                             @RequestParam Integer pageSize,
                                             @RequestParam Integer apiId,
-                                            @RequestParam String con,
                                             @RequestParam Integer  status);
 
     /**

+ 0 - 3
src/main/java/com/steerinfo/dil/feign/WMSFeign.java

@@ -767,9 +767,6 @@ public interface WMSFeign {
     @GetMapping("/api/v1/wms/wmspinbounddistributes/getNewDistribute")
 
     public  RESTfulResult getNewDistribute( @RequestParam("personnelWorkshopid") Integer personnelWorkshopid);
-    //收发存定时器
-    @PostMapping("/api/v1/wms/sendReceive/addSendReceive")
-    public RESTfulResult addSendReceive();
 
 
 //

+ 17 - 0
src/main/java/com/steerinfo/dil/mapper/UniversalMapper.java

@@ -14,6 +14,8 @@ import java.util.Map;
 
 @Mapper
 public interface UniversalMapper {
+     int updateLineSqe(Map<String, Object> map);
+
     //通过运输订单号查询订单信息
     Map<String, Object> getTiHuoDan(String orderNumber);
 
@@ -101,6 +103,9 @@ public interface UniversalMapper {
     //边输边查发货单位
     List<Map<String, Object>> getCapacityByLike(String index);
 
+    //模糊查询批次品名
+    List<Map<String, Object>> getBatchByLike(String index);
+
     // 根据运力id查询所有承运商
     List<Map<String, Object>> getCarrierByCapacityId(BigDecimal capacityId);
 
@@ -116,4 +121,16 @@ public interface UniversalMapper {
 
     //边输边查用车单位
     List<Map<String, Object>> getRequireUnitName(String index);
+
+    //获得港口下拉框
+    List<Map<String, Object>> getPortId();
+
+    //根据车牌号查询正在运输的订单号
+    Map<String, Object> getOrderNumber(String num);
+
+    //查询车牌号
+    List<Map<String, Object>> getCapacityNumber(String num);
+
+    //根据订单Id查询物资
+    List<Map<String, Object>> getMaterialIdByOrderId(Integer orderId);
 }

+ 18 - 0
src/main/java/com/steerinfo/dil/service/impl/UniversalServiceImpl.java

@@ -88,4 +88,22 @@ public class UniversalServiceImpl implements UniversalService {
         map.put("capacityId",capacityId);
         return map;
     }
+
+    public List<Map<String, Object>> getPortId() {
+        return universalMapper.getPortId();
+    }
+
+    //获取订单号以及订单号下的物资
+    public Map<String, Object> getOrderNumber(String num) {
+        return universalMapper.getOrderNumber(num);
+    }
+
+    public List<Map<String, Object>> getCapacityNumber(String num) {
+        return universalMapper.getCapacityNumber(num);
+    }
+
+
+    public List<Map<String, Object>> getMaterialIdByOrderId(Integer orderId) {
+        return universalMapper.getMaterialIdByOrderId(orderId);
+    }
 }

+ 4 - 3
src/main/resources/application-dev.yml

@@ -1,8 +1,8 @@
 spring:
   datasource:
     url: jdbc:oracle:thin:@172.16.33.163:1521:ilsdbpri
-    password: Dil123789
-    username: dil
+    password: root123
+    username: DAGANG
     driver-class-name: oracle.jdbc.OracleDriver
   application:
     name: dil-api
@@ -33,6 +33,7 @@ openfeign:
     url: ${OMSFEIGN_URL:172.16.33.162:8016}
   RmsFeign:
     url: ${RMSFEIGN_HRL:172.16.33.162:8014}
-
+  JoinFeign:
+    url: ${JOINFEIGGN_URL:172.16.33.162:8006}
 server:
   port: 8019

+ 2 - 1
src/main/resources/application-prod.yml

@@ -34,6 +34,7 @@ openfeign:
     url: ${OMSFEIGN_URL:172.16.33.166:8095}
   RmsFeign:
     url: ${RMSFEIGN_URL:172.16.33.166:8060}
-
+  JoinFeign:
+    url: ${JOINFEIGGN_URL:172.16.33.166:8066}
 server:
   port: 8080

+ 62 - 6
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -1,6 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.dil.mapper.UniversalMapper">
+    <update id="updateLineSqe" parameterType="java.util.Map">
+        update omstruck_order oo
+        set oo.order_line_sequence = #{orderLineSqe}
+        where oo.order_id = #{orderId}
+    </update>
     <select id="getTiHuoDan" parameterType="string" resultType="java.util.Map">
         select OO.ORDER_NUMBER             "orderNumber",
                RC.CAPACITY_NUMBER          "capacityNumber",
@@ -71,8 +76,11 @@
                     JOIN RMS_MATERIAL RM
                         ON RM.MATERIAL_ID = DB.MATERIAL_ID
                 <where>
+                    <if test="supplierId != null">
+                        and APO.SUPPLIER_UNIT_ID = #{supplierId}
+                    </if>
                     <if test="index != null">
-                        (instr(RM.MATERIAL_NAME, #{index}) > 0 or instr(RM.MATERIAL_SPECIFICATION,#{index}) >0 or instr(RM.MATERIAL_MODEL,#{index}) >0)
+                        and (instr(RM.MATERIAL_NAME, #{index}) > 0 or instr(RM.MATERIAL_SPECIFICATION,#{index}) >0 or instr(RM.MATERIAL_MODEL,#{index}) >0)
                     </if>
                 </where>
                  group by RM.MATERIAL_ID,RM.MATERIAL_NAME,RM.MATERIAL_CODE,RM.MATERIAL_SPECIFICATION,RM.MATERIAL_MODEL
@@ -144,12 +152,12 @@
         FROM (
                  SELECT
                         RC.CAPACITY_ID        "capacityId",
-                        RC.CARRIER_ID         "carrierId",
+                        RCC.CARRIER_ID         "carrierId",
                         RC.CAPACITY_NUMBER     "capacityNumber",
                         RCA.CARRIER_NAME       "carrierName",
                         RC.INSERT_UPDATE_REMARK "remark"
-                 FROM RMS_CAPACITY RC
-                            LEFT JOIN RMS_CAPACITY_CARRIER RCC
+                 FROM RMS_CAPACITY_CARRIER RCC
+                            LEFT JOIN RMS_CAPACITY RC
                      ON RCC.CAPACITY_ID = RC.CAPACITY_ID
                           JOIN RMS_CARRIER RCA
                                 ON RCA.CARRIER_ID = RCC.CARRIER_ID
@@ -160,11 +168,13 @@
             <if test="index != null">
                 and (instr(RC.CAPACITY_NUMBER, #{index}) > 0 or instr(RCA.CARRIER_NAME, #{index}) > 0)
             </if>
+        )
+        <where>
             <if test="con != null">
                 and instr(RC.INSERT_UPDATE_REMARK,#{con}) > 0
+                "capacityNumber" like #{con} or "carrierName" like #{con} or
+                "remark" like #{con}
             </if>
-        )
-        <where>
             <if test="capacityNumber != null">
                 <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
                     "capacityNumber" like '%${item}%'
@@ -676,4 +686,50 @@
         FROM BMSTRUCK_FORMULA BF
         WHERE FORMULA_NAME LIKE #{con}
     </select>
+
+    <select id="getBatchByLike" parameterType="string" resultType="java.util.Map">
+        select *
+        from (
+                 select DB.BATCH_ID                                                         "batchId",
+                        DB.RESULT_FOREIGN_SHIP_NAME                                         "foreignShipName",
+                        CONCAT(DB.RESULT_FOREIGN_SHIP_NAME, '"' || RM.MATERIAL_NAME || '"') "value"
+                 from DIL_BATCH DB
+                          left join RMS_MATERIAL RM on RM.MATERIAL_ID = DB.MATERIAL_ID
+                 where DB.RESULT_FOREIGN_SHIP_NAME is not null
+             )
+        where instr("foreignShipName", #{index}) > 0
+    </select>
+
+    <select id="getPortId" resultType="java.util.Map">
+        SELECT rp.PORT_ID   "id",
+               rp.PORT_ID   "value",
+               rp.PORT_NAME "label"
+        FROM RMS_PORT rp
+    </select>
+
+
+    <select id="getOrderNumber" parameterType="string" resultType="java.util.Map">
+        select OO.ORDER_NUMBER  "orderNumber",
+               OO.ORDER_ID      "orderId"
+        from OMSTRUCK_ORDER OO
+        left join RMS_CAPACITY RC
+            ON RC.CAPACITY_ID = OO.CAPACITY_ID
+        where OO.CAPACITY_ID = #{capacityId} and OO.ORDER_STATUS = 5
+    </select>
+
+    <select id="getCapacityNumber" parameterType="string" resultType="java.util.Map">
+        select RC.CAPACITY_NUMBER "capacityNumber",
+               RC.CAPACITY_ID   "capacityId"
+        from RMS_CAPACITY RC
+        where instr(RC.CAPACITY_NUMBER, #{num}) > 0
+    </select>
+
+    <select id="getMaterialIdByOrderId" resultType="java.util.Map">
+        select OOM.MATERIAL_ID "materialId",
+              CONCAT(CONCAT(RM.MATERIAL_NAME, RM.MATERIAL_SPECIFICATION),RM.MATERIAL_MODEL) "materialName"
+        from OMSTRUCK_ORDER_MATERIAL  OOM
+            left join RMS_MATERIAL RM
+                on RM.MATERIAL_ID = OOM.MATERIAL_ID
+        where OOM.ORDER_ID = #{orderId}
+    </select>
 </mapper>