Pārlūkot izejas kodu

'什么都不交'

HUJIANGUO 3 gadi atpakaļ
vecāks
revīzija
13c820fff9
29 mainītis faili ar 866 papildinājumiem un 740 dzēšanām
  1. 1 1
      pom.xml
  2. 13 33
      src/main/java/com/steerinfo/dil/controller/RmsCapacityController.java
  3. 14 30
      src/main/java/com/steerinfo/dil/controller/RmsConsigneeController.java
  4. 8 42
      src/main/java/com/steerinfo/dil/controller/RmsLineController.java
  5. 5 30
      src/main/java/com/steerinfo/dil/controller/RmsSupplierController.java
  6. 2 0
      src/main/java/com/steerinfo/dil/mapper/RmsCapacityMapper.java
  7. 2 0
      src/main/java/com/steerinfo/dil/mapper/RmsConsigneeMapper.java
  8. 2 0
      src/main/java/com/steerinfo/dil/mapper/RmsPersonnelMapper.java
  9. 14 0
      src/main/java/com/steerinfo/dil/model/RmsConsignee.java
  10. 47 32
      src/main/java/com/steerinfo/dil/model/RmsSupplier.java
  11. 2 0
      src/main/java/com/steerinfo/dil/service/IRmsCapacityService.java
  12. 2 0
      src/main/java/com/steerinfo/dil/service/IRmsConsigneeService.java
  13. 1 1
      src/main/java/com/steerinfo/dil/service/IRmsSupplierService.java
  14. 14 4
      src/main/java/com/steerinfo/dil/service/impl/RmsCapacityServiceImpl.java
  15. 36 10
      src/main/java/com/steerinfo/dil/service/impl/RmsConsigneeServiceImpl.java
  16. 7 12
      src/main/java/com/steerinfo/dil/service/impl/RmsMaterialServiceImpl.java
  17. 13 3
      src/main/java/com/steerinfo/dil/service/impl/RmsPersonnelServiceImpl.java
  18. 1 0
      src/main/java/com/steerinfo/dil/service/impl/RmsShipperServiceImpl.java
  19. 77 75
      src/main/java/com/steerinfo/dil/service/impl/RmsSupplierServiceImpl.java
  20. 17 13
      src/main/java/com/steerinfo/dil/util/DataChange.java
  21. 13 2
      src/main/resources/application-dev.yml
  22. 11 0
      src/main/resources/application-prod.yml
  23. 1 11
      src/main/resources/bootstrap.yml
  24. 16 1
      src/main/resources/com/steerinfo/dil/mapper/RmsCapacityMapper.xml
  25. 116 78
      src/main/resources/com/steerinfo/dil/mapper/RmsConsigneeMapper.xml
  26. 3 1
      src/main/resources/com/steerinfo/dil/mapper/RmsLineMapper.xml
  27. 6 0
      src/main/resources/com/steerinfo/dil/mapper/RmsPersonnelMapper.xml
  28. 2 2
      src/main/resources/com/steerinfo/dil/mapper/RmsShipperMapper.xml
  29. 420 359
      src/main/resources/com/steerinfo/dil/mapper/RmsSupplierMapper.xml

+ 1 - 1
pom.xml

@@ -111,7 +111,7 @@
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-                        <param>RMS_PERSONNEL</param>
+                        <param>RMS_SUPPLIER</param>
                     </tables>
                 </configuration>
                 <executions>

+ 13 - 33
src/main/java/com/steerinfo/dil/controller/RmsCapacityController.java

@@ -128,50 +128,30 @@ public class RmsCapacityController extends BaseRESTfulController {
                                                Integer pageSize,
                                                String con,
                                                String carrierSSOId) {
-        int count = 0;
-        if (mapValue==null){
-            mapValue=new HashMap<>();
-        }
         if(carrierSSOId != null){
             if(!"null".equals(carrierSSOId)) {
                 mapValue.put("carrierSSOId", carrierSSOId);
-                count++;
             }
         }
-        //框计算
-        if (con != null) {
-            if (!"undefined".equals(con)) {
-                //设置要查询的索引名称
-                String index = "get_capacity_list";
-                //获取查询结果
-                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
+        if(con != null){
+            if(!"".equals(con)){
+                mapValue.put("index", con);
             }
         }
-        //初始化过滤
-        List<Map<String, Object>> listTotal = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size() == count) {
-            //将查询结果存入索引中
-            listTotal = rmsCapacityService.getCapacityList(null);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index", "get_capacity_list");
-            //添加id
-            map.put("indexId", "capacityId");
-            listTotal.add(map);
-            //新建索引
-            String s = JSON.toJSONString(listTotal);
-            esFeign.insertIndex(listTotal);
-            //删除
-            listTotal.remove(listTotal.size() - 1);
-        }
-        if (listTotal == null) {
-            listTotal = rmsCapacityService.getCapacityList(mapValue);
-        }
+        List<Map<String, Object>> listTotal = rmsCapacityService.getCapacityList(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsCapacityService.getCapacityList(mapValue);
         PageListAdd data = columnDataUtil.tableColumnData(apiId, listTotal, columnList);
         return success(data);
     }
+
+    //根据carrierSSOId查询承运商
+    @PostMapping("/getCarrierNameBySSOId")
+        public RESTfulResult getCarrierNameBySSOId(@RequestParam("carrierSSOId") String carrierSSOId){
+        Map<String,Object> map=rmsCapacityService.getCarrierNameBySSOId(carrierSSOId);
+        return success(map);
+    }
+
+
 }

+ 14 - 30
src/main/java/com/steerinfo/dil/controller/RmsConsigneeController.java

@@ -43,40 +43,15 @@ public class RmsConsigneeController extends BaseRESTfulController {
                                          Integer apiId,
                                          Integer pageNum,
                                          Integer pageSize,
-                                         String con) {
+                                         String con
+                                        ) {
         if (mapValue==null){
             mapValue=new HashMap<>();
         }
-        //框计算
-        if (con != null) {
-            if (!"undefined".equals(con)) {
-                //设置要查询的索引名称
-                String index = "get_consignee_list";
-                //获取查询结果
-                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
-            }
-        }
-        //初始化过滤
-        List<Map<String, Object>> listTotal = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size() == 0) {
-            //将查询结果存入索引中
-            listTotal = rmsConsigneeService.getConsigneeList(null);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index", "get_consignee_list");
-            //添加id
-            map.put("indexId", "consigneeId");
-            listTotal.add(map);
-            //新建索引
-            String s = JSON.toJSONString(listTotal);
-            esFeign.insertIndex(listTotal);
-            //删除
-            listTotal.remove(listTotal.size() - 1);
-        }
-        if (listTotal == null) {
-            listTotal = rmsConsigneeService.getConsigneeList(mapValue);
+        if (con != null && !con.equals("undefined")) {
+            mapValue.put("con","%" + con + "%");
         }
+        List<Map<String, Object>> listTotal = rmsConsigneeService.getConsigneeList(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsConsigneeService.getConsigneeList(mapValue);
@@ -142,4 +117,13 @@ public class RmsConsigneeController extends BaseRESTfulController {
         return success(list);
     }
 
+    /*
+    *边输边查收货客户父节点
+    * */
+    @ApiOperation(value = "边输边查收货客户父节点")
+    @PostMapping(value = "getConsigneeFarId")
+    public RESTfulResult getConsigneeFarId(@RequestParam(value ="state") String state){
+        List<Map<String,Object>> result=rmsConsigneeService.getConsigneeFarId(state);
+        return success(result);
+    }
 }

+ 8 - 42
src/main/java/com/steerinfo/dil/controller/RmsLineController.java

@@ -10,6 +10,7 @@ import com.steerinfo.dil.service.IRmsLineService;
 
 import com.steerinfo.dil.util.BaseRESTfulController;
 import com.steerinfo.dil.util.ColumnDataUtil;
+import com.steerinfo.dil.util.DataChange;
 import com.steerinfo.dil.util.PageListAdd;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
@@ -20,6 +21,7 @@ import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.models.auth.In;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import java.math.BigDecimal;
@@ -72,32 +74,13 @@ public class RmsLineController extends BaseRESTfulController {
                                         Integer pageSize,
                                         Integer apiId,
                                         String con){
-        //框计算
+
         if(con != null){
-            if(!"undefined".equals(con)){
-                String index="get_line_list";    //设置要查询的索引名称
-                return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));//获取查询结果
+            if(!"".equals(con)){
+                mapValue.put("index", con);
             }
         }
-        List<Map<String,Object>> list = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if(mapValue.size() == 0){
-            //将查询结果存入索引中
-            list = rmsLineMapper.getAllLineDesk(mapValue);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index","get_line_list");
-            //添加id
-            map.put("indexId","lineId");
-            list.add(map);
-            //新建索引
-            esFeign.insertIndex(list);
-            //删除
-            list.remove(list.size()-1);
-        }
-        if(list == null) {
-            list = rmsLineMapper.getAllLineDesk(mapValue);
-        }
+        List<Map<String, Object>>  list = rmsLineMapper.getAllLineDesk(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsLineMapper.getAllLineDesk(mapValue);
@@ -115,6 +98,7 @@ public class RmsLineController extends BaseRESTfulController {
             @ApiImplicitParam(name = "mapValue", value = "运输路线", required = false, dataType = "Map"),
     })
     @PostMapping("/insertSelective")
+    @Transactional
     public RESTfulResult insertSelective(@RequestBody(required = false) Map<String,Object> mapVal){
         // 创建运输路线主表实体
         RmsLine rmsLine = new RmsLine();
@@ -136,24 +120,7 @@ public class RmsLineController extends BaseRESTfulController {
         //存放到运输路线主表实体中
         rmsLine.setLineEndNodeId(new BigDecimal(lineEndNodeId));
         //生成运输线路编号
-        String lineNo = "";
-        if(lineId < 10){
-            lineNo = "YSXL0000000"+lineId;
-        }else if(lineId >= 10 || lineId <100){
-            lineNo = "YSXL000000"+lineId;
-        }else if(lineId >= 100 || lineId <1000){
-            lineNo = "YSXL00000"+lineId;
-        }else if(lineId >= 1000 || lineId <10000){
-            lineNo = "YSXL0000"+lineId;
-        }else if(lineId >= 10000 || lineId <100000){
-            lineNo = "YSXL000"+lineId;
-        }else if(lineId >= 100000 || lineId <1000000){
-            lineNo = "YSXL00"+lineId;
-        }else if(lineId >= 1000000 || lineId <10000000){
-            lineNo = "YSXL0"+lineId;
-        }else if(lineId >= 10000000 || lineId <100000000){
-            lineNo = "YSXL"+lineId;
-        }
+        String lineNo = DataChange.generateEightDigitsNumber("YSXL", lineId);
         //将运输线路存放进运输线路主表实体中
         rmsLine.setLineNo(lineNo);
         //逻辑删除(0为未删除,1为删除)
@@ -205,7 +172,6 @@ public class RmsLineController extends BaseRESTfulController {
     @ApiOperation(value = "修改运输线路信息")
     @PostMapping("/updateByPrimaryKeySelective")
     public RESTfulResult updateByPrimaryKeySelective(@RequestBody(required = false) Map<String,Object> mapVal) {
-        //创建一个运输线路主表实体
         RmsLine rmsLine = new RmsLine();
         //拿到前端传递的运输线路主表id
         Integer lineId = (Integer) mapVal.get("lineId");

+ 5 - 30
src/main/java/com/steerinfo/dil/controller/RmsSupplierController.java

@@ -59,36 +59,11 @@ public class RmsSupplierController extends BaseRESTfulController {
                                          Integer pageNum,
                                          Integer pageSize,
                                          String con){
-        //框计算
-        if (con != null) {
-            if (!"undefined".equals(con)) {
-                //设置要查询的索引名称
-                String index = "get_supplier_list";
-                //获取查询结果
-                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
-            }
-        }
-        //初始化过滤
-        List<Map<String, Object>> listTotal = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size() == 0) {
-            //将查询结果存入索引中
-            listTotal = rmsSupplierService.getSupplierList(null);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index", "get_supplier_list");
-            //添加id
-            map.put("indexId", "supplierId");
-            listTotal.add(map);
-            //新建索引
-            String s = JSON.toJSONString(listTotal);
-            esFeign.insertIndex(listTotal);
-            //删除
-            listTotal.remove(listTotal.size() - 1);
-        }
-        if (listTotal == null) {
-            listTotal = rmsSupplierService.getSupplierList(mapValue);
-        }
+
+       if (con!=null && !con.equals("undefined")){
+           mapValue.put("con","%"+con+"%");
+       }
+        List<Map<String,Object>>  listTotal = rmsSupplierService.getSupplierList(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页查询数据
         List<Map<String, Object>> columnList = rmsSupplierService.getSupplierList(mapValue);

+ 2 - 0
src/main/java/com/steerinfo/dil/mapper/RmsCapacityMapper.java

@@ -26,4 +26,6 @@ public interface RmsCapacityMapper extends IBaseMapper<RmsCapacity, BigDecimal>
     //通过车牌号查询是否存在重复值
     Integer selectBycapacityNumber(String number);
 
+   //根据ssoId查询承运商名称
+    Map<String, Object> getCarrierNameBySSOId(String carrierSSOId);
 }

+ 2 - 0
src/main/java/com/steerinfo/dil/mapper/RmsConsigneeMapper.java

@@ -19,4 +19,6 @@ public interface RmsConsigneeMapper extends IBaseMapper<RmsConsignee, BigDecimal
     List<Map<String, Object>> getConsigneeById(BigDecimal id);
 
     int getConsigneeByCompanyName(String companyName);
+
+    List<Map<String, Object>> getConsigneeFarId(String state);
 }

+ 2 - 0
src/main/java/com/steerinfo/dil/mapper/RmsPersonnelMapper.java

@@ -20,6 +20,8 @@ public interface RmsPersonnelMapper extends IBaseMapper<RmsPersonnel, BigDecimal
     // 展示人员信息列表
     List<Map<String, Object>> getPersonnelList(Map<String, Object> mapVal);
 
+  //判断数据库中人员工号是否有重复的
+    Integer selectByParametersPersonnelJobNumber(String shipperCompanyBranch);
 //根据id详细查询人员信息
     List<Map<String, Object>> selectPersonnelById(BigDecimal id);
 //获得托运人id

+ 14 - 0
src/main/java/com/steerinfo/dil/model/RmsConsignee.java

@@ -123,8 +123,22 @@ public class RmsConsignee implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="收货客户编码",required=false)
     private String consigneeCode;
 
+    /**
+     * 收货单位父节点ID(CONSIGNEE_FAR_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="收货单位父节点ID",required=false)
+    private BigDecimal consigneeFarId;
+
     private static final long serialVersionUID = 1L;
 
+    public BigDecimal getConsigneeFarId() {
+        return consigneeFarId;
+    }
+
+    public void setConsigneeFarId(BigDecimal consigneeFarId) {
+        this.consigneeFarId = consigneeFarId;
+    }
+
     @Override
     public BigDecimal getId() {
         return this.consigneeId;

+ 47 - 32
src/main/java/com/steerinfo/dil/model/RmsSupplier.java

@@ -10,25 +10,25 @@ import java.util.Date;
 @ApiModel(value="供应商")
 public class RmsSupplier implements IBasePO<BigDecimal> {
     /**
-     * 主键id(SUPPLIER_ID,DECIMAL,38)
+     * 主键id(SUPPLIER_ID,DECIMAL,0)
      */
-    @ApiModelProperty(value="主键id",required=false)
+    @ApiModelProperty(value="主键id",required=true)
     private BigDecimal supplierId;
 
     /**
-     * 供应商名称(SUPPLIER_NAME,VARCHAR,256)
+     * 供应商名称(SUPPLIER_NAME,VARCHAR,100)
      */
     @ApiModelProperty(value="供应商名称",required=false)
     private String supplierName;
 
     /**
-     * 承运人简称(SUPPLIER_ABBREVIATION,VARCHAR,32)
+     * 供应商简称(SUPPLIER_ABBREVIATION,VARCHAR,32)
      */
-    @ApiModelProperty(value="承运人简称",required=false)
+    @ApiModelProperty(value="供应商简称",required=false)
     private String supplierAbbreviation;
 
     /**
-     * 地址(SUPPLIER_ADDRESS,VARCHAR,64)
+     * 地址(SUPPLIER_ADDRESS,VARCHAR,200)
      */
     @ApiModelProperty(value="地址",required=false)
     private String supplierAddress;
@@ -76,9 +76,9 @@ public class RmsSupplier implements IBasePO<BigDecimal> {
     private String supplierAccountBlank;
 
     /**
-     * 税号(SUPPLIER_DUTY_PARAGRAPH,VARCHAR,32)
+     * 供应商代码(SUPPLIER_DUTY_PARAGRAPH,VARCHAR,32)
      */
-    @ApiModelProperty(value="税号",required=false)
+    @ApiModelProperty(value="供应商代码",required=false)
     private String supplierDutyParagraph;
 
     /**
@@ -171,6 +171,18 @@ public class RmsSupplier implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="记录创建或修改备注",required=false)
     private String insertUpdateRemark;
 
+    /**
+     * 金蝶供应商主键ID(EAS_SUPPLIER_ID,VARCHAR,50)
+     */
+    @ApiModelProperty(value="金蝶供应商主键ID",required=false)
+    private String easSupplierId;
+
+    /**
+     * 逻辑删除(DELETED,DECIMAL,0)
+     */
+    @ApiModelProperty(value="逻辑删除",required=false)
+    private BigDecimal deleted;
+
     /**
      * 经营许可证(照片)(SUPPLIER_BUSINESS_LICENSE,BLOB,4000)
      */
@@ -184,35 +196,21 @@ public class RmsSupplier implements IBasePO<BigDecimal> {
     private byte[] supplierBusinessAblelicense;
 
     /**
-     * 金蝶人员信息主键ID(EAS_PERSONNEL_ID,DECIMAL,0)
-     */
-    @ApiModelProperty(value="金蝶人员信息主键ID",required=false)
-    private BigDecimal easSupplierId;
-
-    /**
-     * 逻辑删除(DELETED,DECIMAL,0)
+     * 供应商父节点ID
      */
-    @ApiModelProperty(value="逻辑删除",required=false)
-    private BigDecimal deleted;
+    @ApiModelProperty(value="供应商父节点ID",required=false)
+    private BigDecimal supplierFarId;
 
-    public BigDecimal getDeleted() {
-        return deleted;
-    }
-
-    public void setDeleted(BigDecimal deleted) {
-        this.deleted = deleted;
-    }
+    private static final long serialVersionUID = 1L;
 
-    public BigDecimal getEasSupplierId() {
-        return easSupplierId;
+    public BigDecimal getSupplierFarId() {
+        return supplierFarId;
     }
 
-    public void setEasSupplierId(BigDecimal easSupplierId) {
-        this.easSupplierId = easSupplierId;
+    public void setSupplierFarId(BigDecimal supplierFarId) {
+        this.supplierFarId = supplierFarId;
     }
 
-    private static final long serialVersionUID = 1L;
-
     @Override
     public BigDecimal getId() {
         return this.supplierId;
@@ -439,6 +437,22 @@ public class RmsSupplier implements IBasePO<BigDecimal> {
         this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
     }
 
+    public String getEasSupplierId() {
+        return easSupplierId;
+    }
+
+    public void setEasSupplierId(String easSupplierId) {
+        this.easSupplierId = easSupplierId == null ? null : easSupplierId.trim();
+    }
+
+    public BigDecimal getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(BigDecimal deleted) {
+        this.deleted = deleted;
+    }
+
     public byte[] getSupplierBusinessLicense() {
         return supplierBusinessLicense;
     }
@@ -488,11 +502,12 @@ public class RmsSupplier implements IBasePO<BigDecimal> {
         sb.append(", updateUsername=").append(updateUsername);
         sb.append(", updateTime=").append(updateTime);
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
-        sb.append(", supplierBusinessLicense=").append(supplierBusinessLicense);
-        sb.append(", supplierBusinessAblelicense=").append(supplierBusinessAblelicense);
         sb.append(", easSupplierId=").append(easSupplierId);
         sb.append(", deleted=").append(deleted);
+        sb.append(", supplierBusinessLicense=").append(supplierBusinessLicense);
+        sb.append(", supplierBusinessAblelicense=").append(supplierBusinessAblelicense);
         sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append(", supplierFarId=").append(supplierFarId);
         sb.append("]");
         return sb.toString();
     }

+ 2 - 0
src/main/java/com/steerinfo/dil/service/IRmsCapacityService.java

@@ -35,4 +35,6 @@ public interface IRmsCapacityService{
     List<Map<String,Object>> getCapacityTypeId();
 
     List<Map<String,Object>> getCarrierId();
+
+    Map<String,Object> getCarrierNameBySSOId(String carrierSSOId);
 }

+ 2 - 0
src/main/java/com/steerinfo/dil/service/IRmsConsigneeService.java

@@ -32,4 +32,6 @@ public interface IRmsConsigneeService{
     int deleteConsignee(BigDecimal id);
 
     List<Map<String, Object>> getConsigneeById(BigDecimal id);
+
+    List<Map<String, Object>> getConsigneeFarId(String state);
 }

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

@@ -23,7 +23,7 @@ import java.util.Map;
 public interface IRmsSupplierService {
 
 //    操作供应商
-    int operationSupplier(Map<String, Object> mapVal);
+//    int operationSupplier(Map<String, Object> mapVal);
 //    查询供应商列表
     List<Map<String, Object>> getSupplierList(Map<String, Object> mapVal);
 //增加供应商

+ 14 - 4
src/main/java/com/steerinfo/dil/service/impl/RmsCapacityServiceImpl.java

@@ -43,17 +43,18 @@ public class RmsCapacityServiceImpl implements IRmsCapacityService {
     public int insertCapacity(Map<String,Object> mapValue) {
         RmsCapacity rmsCapacity = new RmsCapacity();
         String capacityNumber = (String) mapValue.get("capacityNumber");
-        String carrierUserId = (String) mapValue.get("carrierUserId");
-        BigDecimal carrierId = rmsCarrierMapper.getCarrierIdByCarrierSSOId(carrierUserId);
+        BigDecimal carrierIds=DataChange.dataToBigDecimal(mapValue.get("carrierId"));
+       // String carrierUserId = (String) mapValue.get("carrierUserId");
+       // BigDecimal carrierId = rmsCarrierMapper.getCarrierIdByCarrierSSOId(carrierUserId);
         //如果车辆已存在  那就是更改承运商
         Integer capacityId = rmsCapacityMapper.selectBycapacityNumber(capacityNumber);
         if(capacityId != null){
             rmsCapacity.setCarrierId(new BigDecimal(capacityId));
-            rmsCapacity.setCarrierId(carrierId);
+            rmsCapacity.setCarrierId(carrierIds);
             return rmsCapacityMapper.updateByPrimaryKeySelective(rmsCapacity);
         }
         rmsCapacity.setCapacityId(rmsCapacityMapper.selectCapacityId());
-        rmsCapacity.setCarrierId(carrierId);
+        rmsCapacity.setCarrierId(carrierIds);
         rmsCapacity.setCapacityTypeId(DataChange.dataToBigDecimal(mapValue.get("capacityTypeId")));
         rmsCapacity.setCapacityNumber(capacityNumber);
         rmsCapacity.setCapacityCorlor((String) mapValue.get("capacityCorlor"));
@@ -107,6 +108,15 @@ public class RmsCapacityServiceImpl implements IRmsCapacityService {
         return rmsCapacityMapper.getCapacityTypeId();
     }
 
+    /*
+    * 查询carrierSSOId是否在承运商表中存在
+    * */
+    @Override
+    public Map<String,Object> getCarrierNameBySSOId(String carrierSSOId) {
+        Map<String,Object> map= rmsCapacityMapper.getCarrierNameBySSOId(carrierSSOId);
+        return map;
+    }
+
     @Override
     public List<Map<String, Object>> getCarrierId() {
         return rmsCapacityMapper.getCarrierId();

+ 36 - 10
src/main/java/com/steerinfo/dil/service/impl/RmsConsigneeServiceImpl.java

@@ -54,31 +54,44 @@ public class RmsConsigneeServiceImpl implements IRmsConsigneeService {
         String consigneeAbbreviation=(String)mapVal.get("consigneeAbbreviation");
         String consigneeRegisteredAddress=(String) mapVal.get("consigneeRegisteredAddress");
         String consigneeReceiveAddress=(String) mapVal.get("consigneeReceiveAddress");
-        String consigneeRegistrationTime=(String)mapVal.get("consigneeRegistrationTime");
-        Date time = simpleDateFormat.parse(consigneeRegistrationTime);
         String consigneeContactName=(String) mapVal.get("consigneeContactName");
         String consigneeContactTel=(String)mapVal.get("consigneeContactTel");
+        //收货客户父节点
+        BigDecimal consigneeFarId=DataChange.dataToBigDecimal(mapVal.get("consigneeFarId"));
         int i=0;
         int rmsConsignees=rmsConsigneeMapper.getConsigneeByCompanyName(companyName);
         RmsConsignee rmsConsignee=new RmsConsignee();
         if(rmsConsignees==0){
+            BigDecimal consigneeId = rmsConsigneeMapper.selectConsigneeId();
+            rmsConsignee.setConsigneeId(consigneeId);
             rmsConsignee.setConsigneeCompanyName(companyName);
-            rmsConsignee.setConsigneeAbbreviation(consigneeAbbreviation);
-            rmsConsignee.setConsigneeRegisteredAddress(consigneeRegisteredAddress);
-            rmsConsignee.setConsigneeReceiveAddress(consigneeReceiveAddress);
-            rmsConsignee.setConsigneeRegistrationTime(time);
-            rmsConsignee.setConsigneeContactName(consigneeContactName);
-            rmsConsignee.setConsigneeContactTel(consigneeContactTel);
+            String consigneeRegistrationTime=(String)mapVal.get("consigneeRegistrationTime");
+            //非必填
+            if (consigneeAbbreviation!=null) {
+                rmsConsignee.setConsigneeAbbreviation(consigneeAbbreviation);
+            } if (consigneeRegisteredAddress!=null) {
+                rmsConsignee.setConsigneeRegisteredAddress(consigneeRegisteredAddress);
+            } if (consigneeReceiveAddress!=null) {
+                rmsConsignee.setConsigneeReceiveAddress(consigneeReceiveAddress);
+            } if(consigneeRegistrationTime!=null) {
+                Date time = simpleDateFormat.parse(consigneeRegistrationTime);
+                rmsConsignee.setConsigneeRegistrationTime(time);
+            } if (consigneeContactName!=null) {
+                rmsConsignee.setConsigneeContactName(consigneeContactName);
+            } if (consigneeContactTel!=null) {
+                rmsConsignee.setConsigneeContactTel(consigneeContactTel);
+            } if (consigneeFarId!=null) {
+                rmsConsignee.setConsigneeFarId(consigneeFarId);
+            }
+            rmsConsignee.setConsigneeCode(DataChange.generateEightDigitsNumber("WL",consigneeId.intValue()));
             rmsConsignee.setDeleted(new BigDecimal(0));
             rmsConsignee.setInsertTime(new Date());
             rmsConsignee.setInsertUsername("admin");
-            rmsConsignee.setConsigneeId(rmsConsigneeMapper.selectConsigneeId());
             i+=rmsConsigneeMapper.insertSelective(rmsConsignee);
         }
       else{
           i=-1;
         }
-
             return  i;
     }
 
@@ -97,6 +110,8 @@ public class RmsConsigneeServiceImpl implements IRmsConsigneeService {
         Date time = simpleDateFormat.parse(consigneeRegistrationTime);
         String consigneeContactName=(String) mapVal.get("consigneeContactName");
         String consigneeContactTel=(String)mapVal.get("consigneeContactTel");
+        //收货客户父节点
+        BigDecimal consigneeFarId=DataChange.dataToBigDecimal(mapVal.get("consigneeFarId"));
         RmsConsignee rmsConsignee=new RmsConsignee();
         rmsConsignee.setConsigneeId(consigneeId);
         rmsConsignee.setConsigneeCompanyName(companyName);
@@ -106,6 +121,7 @@ public class RmsConsigneeServiceImpl implements IRmsConsigneeService {
         rmsConsignee.setConsigneeRegistrationTime(time);
         rmsConsignee.setConsigneeContactName(consigneeContactName);
         rmsConsignee.setConsigneeContactTel(consigneeContactTel);
+        rmsConsignee.setConsigneeFarId(consigneeFarId);
         rmsConsignee.setUpdateTime(new Date());
         rmsConsignee.setUpdateUsername("admin");
         return rmsConsigneeMapper.updateByPrimaryKeySelective(rmsConsignee);
@@ -132,4 +148,14 @@ public class RmsConsigneeServiceImpl implements IRmsConsigneeService {
         return rmsConsigneeMapper.getConsigneeById(id);
     }
 
+
+    /*
+    * 边输边查收货单位父节点
+    * */
+    @Override
+    public List<Map<String, Object>> getConsigneeFarId(String state) {
+        state = "%"+state+"%";
+        return rmsConsigneeMapper.getConsigneeFarId(state);
+    }
+
 }

+ 7 - 12
src/main/java/com/steerinfo/dil/service/impl/RmsMaterialServiceImpl.java

@@ -9,6 +9,7 @@ import com.steerinfo.dil.model.RmsMaterial;
 import com.steerinfo.dil.model.RmsMaterialType;
 import com.steerinfo.dil.model.RmsUnitOfMeasure;
 import com.steerinfo.dil.service.IRmsMaterialService;
+import com.steerinfo.dil.util.DataChange;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -141,21 +142,15 @@ public class RmsMaterialServiceImpl implements IRmsMaterialService {
      */
     @Override
     public int insertMaterial(RmsMaterial rmsMaterial) {
-        int i=0;
-        String materialCode=rmsMaterial.getMaterialCode();
-        int rmsMaterials=rmsMaterialMapper.selectMaterialByCode(materialCode);
-            if (rmsMaterials==0){
+        String code="lx";
+        Integer id=rmsMaterialMapper.getMaterialId().intValue();
+        String materialCode=DataChange.generateEightDigitsNumber(code,id);
+                rmsMaterial.setMaterialCode(materialCode);
                 rmsMaterial.setDeleted(new BigDecimal(0));
-                rmsMaterial.setMaterialId(rmsMaterialMapper.getMaterialId());
+                rmsMaterial.setMaterialId(new BigDecimal(id));
                 rmsMaterial.setInsertTime(new Date());
                 rmsMaterial.setInsertUsername("admin");
-                i += rmsMaterialMapper.insertSelective(rmsMaterial);
-            }
-            else{
-                i=-1;
-            }
-
-        return i;
+        return rmsMaterialMapper.insertSelective(rmsMaterial);
     }
 
     /**

+ 13 - 3
src/main/java/com/steerinfo/dil/service/impl/RmsPersonnelServiceImpl.java

@@ -203,9 +203,19 @@ public class RmsPersonnelServiceImpl implements IRmsPersonnelService {
      */
     @Override
     public int addPersonnel(RmsPersonnel rmsPersonnel) {
-        BigDecimal personnelId = rmsPersonnelMapper.getPersonnelId();
-        rmsPersonnel.setPersonnelId(personnelId);
-        int result = rmsPersonnelMapper.insertSelective(rmsPersonnel);
+        int result=0;
+        String personnelJobNumber =rmsPersonnel.getPersonnelJobNumber();
+        int size=rmsPersonnelMapper.selectByParametersPersonnelJobNumber(personnelJobNumber);
+        if (size==0){
+            BigDecimal personnelId = rmsPersonnelMapper.getPersonnelId();
+            rmsPersonnel.setPersonnelId(personnelId);
+            rmsPersonnel.setDeleted(new BigDecimal(0));
+            rmsPersonnel.setInsertTime(new Date());
+            rmsPersonnel.setInsertUsername("admin");
+            result += rmsPersonnelMapper.insertSelective(rmsPersonnel);
+        }else{
+            result =-1;
+        }
         return result;
     }
 

+ 1 - 0
src/main/java/com/steerinfo/dil/service/impl/RmsShipperServiceImpl.java

@@ -124,6 +124,7 @@ public class RmsShipperServiceImpl implements IRmsShipperService {
         rmsShipper.setShipperDepartmentLevel((String) map.get("depType"));
         rmsShipper.setInsertTime(new Date());
         rmsShipper.setInsertUsername("admin");
+        rmsShipper.setDeleted(new BigDecimal(0));
         return rmsShipperMapper.insertSelective(rmsShipper);
     }
 

+ 77 - 75
src/main/java/com/steerinfo/dil/service/impl/RmsSupplierServiceImpl.java

@@ -3,6 +3,7 @@ package com.steerinfo.dil.service.impl;
 import com.steerinfo.dil.mapper.RmsSupplierMapper;
 import com.steerinfo.dil.model.RmsSupplier;
 import com.steerinfo.dil.service.IRmsSupplierService;
+import com.steerinfo.dil.util.DataChange;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -40,65 +41,65 @@ public class RmsSupplierServiceImpl implements IRmsSupplierService {
      * @param mapVal
      * @return
      */
-    @Override
-    public int operationSupplier(Map<String, Object> mapVal) {
-        // 得到金蝶主键供应商id
-        Integer EASSupplierIdValue = (Integer) mapVal.get("EASSupplierId");
-        BigDecimal EASSupplierId = new BigDecimal(EASSupplierIdValue);
-        // 得到供应商名称
-        String supplierName = (String) mapVal.get("supplierName");
-        // 得到供应商供应商简称
-        String supplierAbbreviation = (String) mapVal.get("supplierAbbreviation");
-        // 得到供应商代码
-        String supplierDutyParagraph = (String) mapVal.get("supplierDutyParagraph");
-        // 得到供应商地址
-        String supplierAddress = (String) mapVal.get("supplierAddress");
-        // 得到注册时间
-        Date supplierRegisterDate = (Date) mapVal.get("supplierRegisterDate");
-        // 得到委托代理人
-        String supplierContactsName = (String) mapVal.get("supplierAgent");
-        // 得到联系电话
-        String supplierContactNumber = (String) mapVal.get("supplierContactNumber");
-        // 得到数据数据状态
-        Integer dataStatus = (Integer) mapVal.get("dataStatus");
-        // 判断是否EASId已存在
-        Map<String,Object> map1 = new HashMap<>();
-        map1.put("easSupplierId",EASSupplierId);
-        BigDecimal deleted = new BigDecimal(0);
-        map1.put("deleted",deleted);
-        List<RmsSupplier> rmsSuppliers = rmsSupplierMapper.selectByParameters(map1);
-        RmsSupplier rmsSupplier = new RmsSupplier();
-        rmsSupplier.setEasSupplierId(EASSupplierId);
-        rmsSupplier.setSupplierName(supplierName);
-        rmsSupplier.setSupplierAbbreviation(supplierAbbreviation);
-        rmsSupplier.setSupplierDutyParagraph(supplierDutyParagraph);
-        rmsSupplier.setSupplierAddress(supplierAddress);
-        rmsSupplier.setSupplierRegisterDate(supplierRegisterDate);
-        rmsSupplier.setSupplierContactsName(supplierContactsName);
-        rmsSupplier.setSupplierContactNumber(supplierContactNumber);
-        int result = 0;
-        // 新增
-        if (rmsSuppliers.size() == 0) {
-            BigDecimal supplierId = rmsSupplierMapper.getSupplierId();
-            rmsSupplier.setSupplierId(supplierId);
-            rmsSupplier.setDeleted(new BigDecimal(0));
-            result = rmsSupplierMapper.insertSelective(rmsSupplier);
-        }
-        // 修改
-        if (rmsSuppliers.size() != 0 && dataStatus == 2) {
-            RmsSupplier rmsSupplier1 = rmsSuppliers.get(0);
-            rmsSupplier.setSupplierId(rmsSupplier1.getSupplierId());
-            result = rmsSupplierMapper.updateByPrimaryKeySelective(rmsSupplier);
-        }
-        // 逻辑删除
-        if (rmsSuppliers.size() != 0 && dataStatus == 3) {
-            RmsSupplier rmsSupplier1 = rmsSuppliers.get(0);
-            rmsSupplier.setSupplierId(rmsSupplier1.getSupplierId());
-            rmsSupplier.setDeleted(new BigDecimal(1));
-            result = rmsSupplierMapper.updateByPrimaryKeySelective(rmsSupplier);
-        }
-        return result;
-    }
+//    @Override
+//    public int operationSupplier(Map<String, Object> mapVal) {
+//        // 得到金蝶主键供应商id
+//        Integer EASSupplierIdValue = (Integer) mapVal.get("EASSupplierId");
+//        BigDecimal EASSupplierId = new BigDecimal(EASSupplierIdValue);
+//        // 得到供应商名称
+//        String supplierName = (String) mapVal.get("supplierName");
+//        // 得到供应商供应商简称
+//        String supplierAbbreviation = (String) mapVal.get("supplierAbbreviation");
+//        // 得到供应商代码
+//        String supplierDutyParagraph = (String) mapVal.get("supplierDutyParagraph");
+//        // 得到供应商地址
+//        String supplierAddress = (String) mapVal.get("supplierAddress");
+//        // 得到注册时间
+//        Date supplierRegisterDate = (Date) mapVal.get("supplierRegisterDate");
+//        // 得到委托代理人
+//        String supplierContactsName = (String) mapVal.get("supplierAgent");
+//        // 得到联系电话
+//        String supplierContactNumber = (String) mapVal.get("supplierContactNumber");
+//        // 得到数据数据状态
+//        Integer dataStatus = (Integer) mapVal.get("dataStatus");
+//        // 判断是否EASId已存在
+//        Map<String,Object> map1 = new HashMap<>();
+//        map1.put("easSupplierId",EASSupplierId);
+//        BigDecimal deleted = new BigDecimal(0);
+//        map1.put("deleted",deleted);
+//        List<RmsSupplier> rmsSuppliers = rmsSupplierMapper.selectByParameters(map1);
+//        RmsSupplier rmsSupplier = new RmsSupplier();
+//        rmsSupplier.setEasSupplierId(EASSupplierId);
+//        rmsSupplier.setSupplierName(supplierName);
+//        rmsSupplier.setSupplierAbbreviation(supplierAbbreviation);
+//        rmsSupplier.setSupplierDutyParagraph(supplierDutyParagraph);
+//        rmsSupplier.setSupplierAddress(supplierAddress);
+//        rmsSupplier.setSupplierRegisterDate(supplierRegisterDate);
+//        rmsSupplier.setSupplierContactsName(supplierContactsName);
+//        rmsSupplier.setSupplierContactNumber(supplierContactNumber);
+//        int result = 0;
+//        // 新增
+//        if (rmsSuppliers.size() == 0) {
+//            BigDecimal supplierId = rmsSupplierMapper.getSupplierId();
+//            rmsSupplier.setSupplierId(supplierId);
+//            rmsSupplier.setDeleted(new BigDecimal(0));
+//            result = rmsSupplierMapper.insertSelective(rmsSupplier);
+//        }
+//        // 修改
+//        if (rmsSuppliers.size() != 0 && dataStatus == 2) {
+//            RmsSupplier rmsSupplier1 = rmsSuppliers.get(0);
+//            rmsSupplier.setSupplierId(rmsSupplier1.getSupplierId());
+//            result = rmsSupplierMapper.updateByPrimaryKeySelective(rmsSupplier);
+//        }
+//        // 逻辑删除
+//        if (rmsSuppliers.size() != 0 && dataStatus == 3) {
+//            RmsSupplier rmsSupplier1 = rmsSuppliers.get(0);
+//            rmsSupplier.setSupplierId(rmsSupplier1.getSupplierId());
+//            rmsSupplier.setDeleted(new BigDecimal(1));
+//            result = rmsSupplierMapper.updateByPrimaryKeySelective(rmsSupplier);
+//        }
+//        return result;
+//    }
 
     /**
      * 查询供应商列表
@@ -117,36 +118,37 @@ public class RmsSupplierServiceImpl implements IRmsSupplierService {
      */
     @Override
     public int insertSupplier(Map<String,Object> mapValue) throws ParseException {
-//        获取日期,进行格式转换
-        String supplierRegisterDate=(String) mapValue.get("supplierRegisterDate");
-//        新增用户名和密码将其传到SSO接口
-//        String username=mapValue.get("username");
-//        String password="123456";
         RmsSupplier rmsSupplier=new RmsSupplier();
-        System.out.println(supplierRegisterDate);
-        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
-        Date registerDate=simpleDateFormat.parse(supplierRegisterDate);
         int i=0;
-        Date date=new Date(0);
-//            判断用户输入的船名在数据库中是否存在
+        // 判断用户输入的供应商在数据库中是否存在
         String supplierName=(String) mapValue.get("supplierName");
         int size = rmsSupplierMapper.selectByParametersSupplierName(supplierName);
         if (size == 0 ) {
+            BigDecimal supplierId = rmsSupplierMapper.getSupplierId();
             rmsSupplier.setSupplierName(supplierName);
             rmsSupplier.setSupplierAddress((String) mapValue.get("supplierAddress"));
             rmsSupplier.setSupplierContactsName((String) mapValue.get("supplierContactsName"));
             rmsSupplier.setSupplierContactNumber((String) mapValue.get("supplierContactNumber"));
-            rmsSupplier.setSupplierRegisterDate(registerDate);
-            if (mapValue.get("supplierRegisterDate").equals(date)) {
-                rmsSupplier.setSupplierRegisterDate(null);
+            rmsSupplier.setSupplierDutyParagraph(DataChange.generateEightDigitsNumber("WL",supplierId.intValue()));
+            String supplierRegisterDate=(String) mapValue.get("supplierRegisterDate");
+//            Date date=new Date(0);
+            if (supplierRegisterDate!=null) {
+                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+                Date registerDate=simpleDateFormat.parse(supplierRegisterDate);
+                rmsSupplier.setSupplierRegisterDate(registerDate);
+            }else {
+                rmsSupplier.setSupplierRegisterDate(new Date());
             }
+            rmsSupplier.setSupplierFarId(DataChange.dataToBigDecimal(mapValue.get("supplierId")));
+//            if (mapValue.get("supplierRegisterDate").equals(date)) {
+//                rmsSupplier.setSupplierRegisterDate(null);
+//            }
             rmsSupplier.setInsertTime(new Date());
             rmsSupplier.setInsertUsername("admin");
             rmsSupplier.setDeleted(new BigDecimal(0));
-            rmsSupplier.setSupplierId(rmsSupplierMapper.getSupplierId());
+            rmsSupplier.setSupplierId(supplierId);
             i+=rmsSupplierMapper.insertSelective(rmsSupplier);
-        }
-        else{
+        }else{
             i=-1;
         }
         return i;

+ 17 - 13
src/main/java/com/steerinfo/dil/util/DataChange.java

@@ -40,16 +40,22 @@ public class DataChange {
      * @param data
      * @return
      */
-    public static BigDecimal
-    dataToBigDecimal(Object data){
+    public static BigDecimal dataToBigDecimal(Object data){
         if (data != null){
             if(data instanceof BigDecimal){
                 return (BigDecimal) data;
-            }else {
-                String s = String.valueOf(data);
-                if(!"".equals(s)){
-                    return new BigDecimal(s);
+            }else{
+                String str = String.valueOf(data);
+                BigDecimal decimal = null;
+                if(!"".equals(str)){
+                    try {
+                        decimal = new BigDecimal(str);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                        return new BigDecimal(0);
+                    }
                 }
+                return decimal;
             }
         }
         return new BigDecimal(0);
@@ -63,8 +69,10 @@ public class DataChange {
     public static String dateToDayDate(Object date){
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
         Date changeDate = null;
+        if(date == null)
+            return null;
         try{
-            changeDate = (Date) date;
+             changeDate = (Date) date;
         }catch (Exception e){
             e.printStackTrace();
         }
@@ -82,12 +90,7 @@ public class DataChange {
             for (String s : key) {
                 //从map中取 date的值 并转换成字符串类型的日期
                 String stringDate = dateToDayDate(map.get(s));
-                if(stringDate.length() == 0){
-                    break;
-                }else {
-                    //修改map中的值
-                    map.put(s, stringDate);
-                }
+                map.put(s, stringDate);
             }
         }
     }
@@ -152,4 +155,5 @@ public class DataChange {
         );
         return sb.toString();
     }
+
 }

+ 13 - 2
src/main/resources/application-dev.yml

@@ -1,9 +1,20 @@
 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: dal-dazhou-rms-api
 
+#测试环境端口
+openFeign:
+    ESFeign:
+      url: ${ESFEIGN_URL:172.16.33.166:8089}
+    ColumnDataFeign:
+      url: ${COLUMNDATAFEIGN_URL:172.16.33.162:8001}
+    AmsFeign:
+      url: ${AMSFEIGN_URL:172.16.33.162:8015}
+server:
+    port: 8014
+

+ 11 - 0
src/main/resources/application-prod.yml

@@ -7,3 +7,14 @@ spring:
   application:
     name: dal-dazhou-rms-api
 
+#正式环境端口
+openFeign:
+    ESFeign:
+      url: ${ESFEIGN_URL:172.16.33.166:8089}
+    ColumnDataFeign:
+      url: ${COLUMNDATAFEIGN_URL:172.16.33.166:8083}
+    AmsFeign:
+      url: ${AMSFEIGN_URL:172.16.33.166:8079}
+server:
+    port: 8060
+

+ 1 - 11
src/main/resources/bootstrap.yml

@@ -1,7 +1,7 @@
 api.version: api/v1/rms
 spring:
   profiles:
-    include: ${SPRING_PROFILES:dev}
+    include: ${SPRING_PROFILES:prod}
   jackson:
       date-format: yyyy-MM-dd HH:mm:ss
       time-zone: GMT+8
@@ -44,13 +44,6 @@ redis:
     time: 864000000
   database: 0
 
-openFeign:
-  ESFeign:
-    url: ${ESFEIGN_URL:172.16.33.166:8089}
-  ColumnDataFeign:
-    url: ${COLUMNDATAFEIGN_URL:172.16.33.166:8083}
-  AmsFeign:
-    url: ${AMSFEIGN_URL:172.16.33.166:8079}
 
 mybatis:
   type-aliases-package: com.steerinfo.dil.model
@@ -58,7 +51,4 @@ mybatis:
   configuration:
     #    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
     mapUnderscoreToCamelCase: true
-    call-setters-on-nulls: true
 
-server:
-  port: 8060

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

@@ -722,11 +722,17 @@
     LEFT JOIN RMS_CARRIER RCA
     ON RCA.CARRIER_ID = RC.CARRIER_ID
     WHERE RC.DELETED != 1
-      <if test="carrierSSOId != null">
+    <if test="carrierSSOId != null">
         and RCA.CARRIER_SSO_ID = #{carrierSSOId}
       </if>
+      <if test="index != null">
+        and (instr(RC.CAPACITY_NUMBER, #{index}) > 0 or instr(RCA.CARRIER_NAME, #{index}) > 0)
+      </if>
     ORDER BY RC.INSERT_TIME DESC
     )
+<!--    <if test="con != null">-->
+<!--      where "capacityNumber" like #{con} or "carrierName" like #{con}-->
+<!--    </if>-->
     <where>
       <if test="capacityId!= null">
         and
@@ -830,4 +836,13 @@
     from RMS_CAPACITY RC
     where RC.CAPACITY_NUMBER=#{number} and RC.DELETED = 0
   </select>
+
+
+  <select id="getCarrierNameBySSOId" parameterType="java.lang.String" resultType="java.util.Map">
+       select
+        RC.CARRIER_ID as "carrierId",
+        RC.CARRIER_NAME as "carrierName"
+       from RMS_CARRIER RC
+      where RC.CARRIER_SSO_ID=#{carrierSSOId}
+  </select>
 </mapper>

+ 116 - 78
src/main/resources/com/steerinfo/dil/mapper/RmsConsigneeMapper.xml

@@ -21,20 +21,22 @@
     <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
     <result column="EAS_CONSIGNEE_ID" jdbcType="VARCHAR" property="easConsigneeId" />
     <result column="CONSIGNEE_CODE" jdbcType="VARCHAR" property="consigneeCode" />
+    <result column="CONSIGNEE_FAR_ID" jdbcType="DECIMAL" property="consigneeFarId" />
   </resultMap>
   <sql id="columns">
     CONSIGNEE_ID, CONSIGNEE_COMPANY_NAME, CONSIGNEE_ABBREVIATION, CONSIGNEE_REGISTERED_ADDRESS, 
     CONSIGNEE_RECEIVE_ADDRESS, CONSIGNEE_REGISTRATION_TIME, CONSIGNEE_CONTACT_NAME, CONSIGNEE_WARRANTY_AMOUNT, 
     CONSIGNEE_WARRANTY_WEIGHT, CONSIGNEE_CONTACT_TEL, CONSIGNEE_EXCHANGE_DELIVERY, INSERT_USERNAME, 
     INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, EAS_CONSIGNEE_ID, 
-    CONSIGNEE_CODE
+    CONSIGNEE_CODE, CONSIGNEE_FAR_ID
   </sql>
   <sql id="columns_alias">
     t.CONSIGNEE_ID, t.CONSIGNEE_COMPANY_NAME, t.CONSIGNEE_ABBREVIATION, t.CONSIGNEE_REGISTERED_ADDRESS, 
     t.CONSIGNEE_RECEIVE_ADDRESS, t.CONSIGNEE_REGISTRATION_TIME, t.CONSIGNEE_CONTACT_NAME, 
     t.CONSIGNEE_WARRANTY_AMOUNT, t.CONSIGNEE_WARRANTY_WEIGHT, t.CONSIGNEE_CONTACT_TEL, 
     t.CONSIGNEE_EXCHANGE_DELIVERY, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, 
-    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.EAS_CONSIGNEE_ID, t.CONSIGNEE_CODE
+    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.EAS_CONSIGNEE_ID, t.CONSIGNEE_CODE, 
+    t.CONSIGNEE_FAR_ID
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM RMS_CONSIGNEE
@@ -101,6 +103,9 @@
       <if test="consigneeCode != null and consigneeCode != ''">
         and CONSIGNEE_CODE = #{consigneeCode}
       </if>
+      <if test="consigneeFarId != null">
+        and CONSIGNEE_FAR_ID = #{consigneeFarId}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -162,6 +167,9 @@
       <if test="consigneeCode != null and consigneeCode != ''">
         and CONSIGNEE_CODE LIKE '%${consigneeCode}%'
       </if>
+      <if test="consigneeFarId != null">
+        and CONSIGNEE_FAR_ID = #{consigneeFarId}
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
@@ -225,6 +233,9 @@
       <if test="consigneeCode != null and consigneeCode != ''">
         or CONSIGNEE_CODE = #{consigneeCode}
       </if>
+      <if test="consigneeFarId != null">
+        or CONSIGNEE_FAR_ID = #{consigneeFarId}
+      </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.RmsConsignee">
     insert into RMS_CONSIGNEE (CONSIGNEE_ID, CONSIGNEE_COMPANY_NAME, 
@@ -235,7 +246,7 @@
       CONSIGNEE_EXCHANGE_DELIVERY, INSERT_USERNAME, 
       INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
       INSERT_UPDATE_REMARK, DELETED, EAS_CONSIGNEE_ID, 
-      CONSIGNEE_CODE)
+      CONSIGNEE_CODE, CONSIGNEE_FAR_ID)
     values (#{consigneeId,jdbcType=DECIMAL}, #{consigneeCompanyName,jdbcType=VARCHAR}, 
       #{consigneeAbbreviation,jdbcType=VARCHAR}, #{consigneeRegisteredAddress,jdbcType=VARCHAR}, 
       #{consigneeReceiveAddress,jdbcType=VARCHAR}, #{consigneeRegistrationTime,jdbcType=TIMESTAMP}, 
@@ -244,7 +255,7 @@
       #{consigneeExchangeDelivery,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, 
       #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
       #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{easConsigneeId,jdbcType=VARCHAR}, 
-      #{consigneeCode,jdbcType=VARCHAR})
+      #{consigneeCode,jdbcType=VARCHAR}, #{consigneeFarId,jdbcType=DECIMAL})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
     insert into RMS_CONSIGNEE
@@ -306,6 +317,9 @@
       <if test="consigneeCode != null">
         CONSIGNEE_CODE,
       </if>
+      <if test="consigneeFarId != null">
+        CONSIGNEE_FAR_ID,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="consigneeId != null">
@@ -365,6 +379,9 @@
       <if test="consigneeCode != null">
         #{consigneeCode,jdbcType=VARCHAR},
       </if>
+      <if test="consigneeFarId != null">
+        #{consigneeFarId,jdbcType=DECIMAL},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsConsignee">
@@ -386,7 +403,8 @@
       INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
       DELETED = #{deleted,jdbcType=DECIMAL},
       EAS_CONSIGNEE_ID = #{easConsigneeId,jdbcType=VARCHAR},
-      CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR}
+      CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR},
+      CONSIGNEE_FAR_ID = #{consigneeFarId,jdbcType=DECIMAL}
     where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
@@ -446,10 +464,13 @@
       <if test="consigneeCode != null">
         CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR},
       </if>
+      <if test="consigneeFarId != null">
+        CONSIGNEE_FAR_ID = #{consigneeFarId,jdbcType=DECIMAL},
+      </if>
     </set>
     where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
   </update>
-  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <include refid="select" />
     where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
   </select>
@@ -472,8 +493,8 @@
       INSERT_USERNAME, INSERT_TIME, 
       UPDATE_USERNAME, UPDATE_TIME, 
       INSERT_UPDATE_REMARK, DELETED, 
-      EAS_CONSIGNEE_ID, CONSIGNEE_CODE
-      )
+      EAS_CONSIGNEE_ID, CONSIGNEE_CODE, 
+      CONSIGNEE_FAR_ID)
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
       #{item.consigneeId,jdbcType=DECIMAL}, 
@@ -485,8 +506,8 @@
       #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, 
       #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
       #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL}, 
-      #{item.easConsigneeId,jdbcType=VARCHAR}, #{item.consigneeCode,jdbcType=VARCHAR}
-       from dual  
+      #{item.easConsigneeId,jdbcType=VARCHAR}, #{item.consigneeCode,jdbcType=VARCHAR}, 
+      #{item.consigneeFarId,jdbcType=DECIMAL} from dual  
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
@@ -568,6 +589,10 @@
        <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
           when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeCode,jdbcType=VARCHAR}
        </foreach>
+       ,CONSIGNEE_FAR_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeFarId,jdbcType=DECIMAL}
+       </foreach>
      where CONSIGNEE_ID in 
      <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.consigneeId,jdbcType=DECIMAL}
@@ -582,76 +607,81 @@
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
- <select id="getConsigneeList" parameterType="java.util.Map" resultType="java.util.Map">
-   SELECT *
-   FROM (
-   SELECT
-      RC.CONSIGNEE_ID AS "consigneeId",
-      RC.CONSIGNEE_COMPANY_NAME AS "companyName",
-      RC.CONSIGNEE_ABBREVIATION AS "consigneeAbbreviation",
-      RC.CONSIGNEE_REGISTERED_ADDRESS AS "consigneeRegisteredAddress",
-      RC.CONSIGNEE_RECEIVE_ADDRESS AS "consigneeReceiveAddress",
-      RC.CONSIGNEE_REGISTRATION_TIME AS "consigneeRegistrationTime",
-      RC.CONSIGNEE_CONTACT_NAME AS "consigneeContactName",
-      RC.CONSIGNEE_CONTACT_TEL AS "consigneeContactTel"
-   FROM RMS_CONSIGNEE RC
-   WHERE RC.DELETED!=1
-   ORDER BY RC.INSERT_TIME DESC
-   )
-   WHERE rownum &lt; 100
-   <where>
-   <if test="companyName!= null">
-     and
-     <foreach collection="companyName" item="item" open="(" separator="," close=")">
-       "companyName" in #{item}
-     </foreach>
-   </if>
-   <if test="consigneeAbbreviation!= null">
-     and
-     <foreach collection="consigneeAbbreviation" item="item" open="(" separator="," close=")">
-       "consigneeAbbreviation" in #{item}
-     </foreach>
-   </if>
-   <if test="consigneeRegisteredAddress!= null">
-     and
-     <foreach collection="consigneeRegisteredAddress" item="item" open="(" separator="," close=")">
-       "consigneeRegisteredAddress" in #{item}
-     </foreach>
-   </if>
-   <if test="consigneeReceiveAddress= null">
-     and
-     <foreach collection="consigneeReceiveAddress" item="item" open="(" separator="," close=")">
-       "consigneeReceiveAddress" in #{item}
-     </foreach>
-   </if>
-   <if test="consigneeRegistrationTime!= null">
-     and
-     <foreach collection="consigneeRegistrationTime" item="item" open="(" separator="," close=")">
-       "consigneeRegistrationTime" in #{item}
-     </foreach>
-   </if>
-   <if test="consigneeContactName!= null">
-     and
-     <foreach collection="consigneeContactName" item="item" open="(" separator="," close=")">
-       "consigneeContactName" in #{item}
-     </foreach>
-   </if>
-   <if test="consigneeContactTel!= null">
-     and
-     <foreach collection="consigneeContactTel" item="item" open="(" separator="," close=")">
-       "consigneeContactTel" in #{item}
-     </foreach>
-   </if>
-   </where>
-   <include refid="orderBy"></include>
- </select>
+  <select id="getConsigneeList" parameterType="java.util.Map" resultType="java.util.Map">
+    SELECT *
+    FROM (
+    SELECT
+    RC.CONSIGNEE_ID AS "consigneeId",
+    RC.CONSIGNEE_COMPANY_NAME AS "companyName",
+    RC.CONSIGNEE_ABBREVIATION AS "consigneeAbbreviation",
+    RC.CONSIGNEE_REGISTERED_ADDRESS AS "consigneeRegisteredAddress",
+    RC.CONSIGNEE_RECEIVE_ADDRESS AS "consigneeReceiveAddress",
+    RC.CONSIGNEE_REGISTRATION_TIME AS "consigneeRegistrationTime",
+    RC.CONSIGNEE_CONTACT_NAME AS "consigneeContactName",
+    RC.CONSIGNEE_CONTACT_TEL AS "consigneeContactTel",
+    RC2.CONSIGNEE_COMPANY_NAME "companyNameFar"
+    FROM RMS_CONSIGNEE RC
+    LEFT JOIN RMS_CONSIGNEE RC2
+    ON RC2.CONSIGNEE_ID=RC.CONSIGNEE_FAR_ID
+    WHERE RC.DELETED!=1
+    ORDER BY RC.INSERT_TIME DESC
+    )
+    <if test="con != null" >
+      where "companyName" like #{con} or "companyNameFar" like #{con}
+    </if>
+    <where>
+      <if test="companyName!= null">
+        and
+        <foreach collection="companyName" item="item" open="(" separator="," close=")">
+          "companyName" in #{item}
+        </foreach>
+      </if>
+      <if test="consigneeAbbreviation!= null">
+        and
+        <foreach collection="consigneeAbbreviation" item="item" open="(" separator="," close=")">
+          "consigneeAbbreviation" in #{item}
+        </foreach>
+      </if>
+      <if test="consigneeRegisteredAddress!= null">
+        and
+        <foreach collection="consigneeRegisteredAddress" item="item" open="(" separator="," close=")">
+          "consigneeRegisteredAddress" in #{item}
+        </foreach>
+      </if>
+      <if test="consigneeReceiveAddress= null">
+        and
+        <foreach collection="consigneeReceiveAddress" item="item" open="(" separator="," close=")">
+          "consigneeReceiveAddress" in #{item}
+        </foreach>
+      </if>
+      <if test="consigneeRegistrationTime!= null">
+        and
+        <foreach collection="consigneeRegistrationTime" item="item" open="(" separator="," close=")">
+          "consigneeRegistrationTime" in #{item}
+        </foreach>
+      </if>
+      <if test="consigneeContactName!= null">
+        and
+        <foreach collection="consigneeContactName" item="item" open="(" separator="," close=")">
+          "consigneeContactName" in #{item}
+        </foreach>
+      </if>
+      <if test="consigneeContactTel!= null">
+        and
+        <foreach collection="consigneeContactTel" item="item" open="(" separator="," close=")">
+          "consigneeContactTel" in #{item}
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderBy"></include>
+  </select>
   <sql id="orderBy">
-  <if test="orderField!=null and orderField !=''">
-    order by "${orderField}"
-    <if test="orderType !=null and orderType !=''">
-      ${orderType}
+    <if test="orderField!=null and orderField !=''">
+      order by "${orderField}"
+      <if test="orderType !=null and orderType !=''">
+        ${orderType}
+      </if>
     </if>
-  </if>
   </sql>
 
 
@@ -680,4 +710,12 @@
     and RC.DELETED!=1
   </select>
 
+  <select id="getConsigneeFarId"  resultType="java.util.Map" parameterType="java.lang.String">
+    select
+        RC.CONSIGNEE_FAR_ID as "consigneeFarId",
+        RC.CONSIGNEE_COMPANY_NAME as "consigneeCompanyName"
+    from RMS_CONSIGNEE RC
+    where RC.CONSIGNEE_FAR_ID=RC.CONSIGNEE_ID
+    and RC.CONSIGNEE_COMPANY_NAME like #{state}
+  </select>
 </mapper>

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

@@ -578,10 +578,12 @@
     FROM
       RMS_LINE RL
     WHERE RL.DELETED = 0
+        <if test="index != null">
+          and instr(RL.LINE_NAME, #{index}) > 0
+        </if>
         )
     <where>
       <if test="lineNo != null">
-        and
         <foreach collection="lineNo" item="item" open="(" separator="or" close=")">
           "lineNo" like '%${item}%'
         </foreach>

+ 6 - 0
src/main/resources/com/steerinfo/dil/mapper/RmsPersonnelMapper.xml

@@ -682,4 +682,10 @@
 FROM RMS_SHIPPER RS
 WHERE RS.SHIPPER_ID = #{shipperId}
   </select>
+  <select id="selectByParametersPersonnelJobNumber" resultType="java.lang.Integer">
+    SELECT RP.PERSONNEL_ID
+    FROM RMS_PERSONNEL RP
+    WHERE RP.PERSONNEL_JOB_NUMBER = #{personnelJobNumber}
+      AND RP.DELETED =0
+  </select>
 </mapper>

+ 2 - 2
src/main/resources/com/steerinfo/dil/mapper/RmsShipperMapper.xml

@@ -320,7 +320,7 @@
       </if>
     </where>
   </sql>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
     delete from RMS_SHIPPER
     where SHIPPER_ID = #{shipperId,jdbcType=DECIMAL}
   </delete>
@@ -892,7 +892,7 @@
     </set>
     where SHIPPER_ID = #{shipperId,jdbcType=DECIMAL}
   </update>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
     <include refid="select" />
     where SHIPPER_ID = #{shipperId,jdbcType=DECIMAL}
   </select>

+ 420 - 359
src/main/resources/com/steerinfo/dil/mapper/RmsSupplierMapper.xml

@@ -29,28 +29,31 @@
     <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
     <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+    <result column="EAS_SUPPLIER_ID" jdbcType="VARCHAR" property="easSupplierId" />
+    <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+    <result column="SUPPLIER_FAR_ID" jdbcType="DECIMAL" property="supplierFarId" />
     <result column="SUPPLIER_BUSINESS_LICENSE" jdbcType="BLOB" property="supplierBusinessLicense" />
     <result column="SUPPLIER_BUSINESS_ABLELICENSE" jdbcType="BLOB" property="supplierBusinessAblelicense" />
-    <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
   </resultMap>
   <sql id="columns">
-    SUPPLIER_ID, SUPPLIER_NAME, SUPPLIER_ABBREVIATION, SUPPLIER_ADDRESS, SUPPLIER_LEGAL_REPRESENTATIVE, 
-    SUPPLIER_REGISTER_NO, SUPPLIER_AGENT, SUPPLIER_CONTACT_NUMBER, SUPPLIER_FAX, SUPPLIER_ACCOUNT, 
-    SUPPLIER_ACCOUNT_BLANK, SUPPLIER_DUTY_PARAGRAPH, SUPPLIER_POSTAL_CODE, SUPPLIER_REGISTER_CAPITAL, 
-    SUPPLIERBUSINESS_SCOPE, SUPPLIER_COMPANY_STATUS, SUPPLIER_OPERATION_PERIOD, SUPPLIER_REGISTER_DATE, 
-    SUPPLIER_REGISTER_ORGANIZATION, SUPPLIER_REGISTER_APTITUDES, SUPPLIER_CREDENTIAL, 
-    SUPPLIER_CONTACTS_NAME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
-    INSERT_UPDATE_REMARK, SUPPLIER_BUSINESS_LICENSE, SUPPLIER_BUSINESS_ABLELICENSE,DELETED
+    SUPPLIER_ID, SUPPLIER_NAME, SUPPLIER_ABBREVIATION, SUPPLIER_ADDRESS, SUPPLIER_LEGAL_REPRESENTATIVE,
+    SUPPLIER_REGISTER_NO, SUPPLIER_AGENT, SUPPLIER_CONTACT_NUMBER, SUPPLIER_FAX, SUPPLIER_ACCOUNT,
+    SUPPLIER_ACCOUNT_BLANK, SUPPLIER_DUTY_PARAGRAPH, SUPPLIER_POSTAL_CODE, SUPPLIER_REGISTER_CAPITAL,
+    SUPPLIERBUSINESS_SCOPE, SUPPLIER_COMPANY_STATUS, SUPPLIER_OPERATION_PERIOD, SUPPLIER_REGISTER_DATE,
+    SUPPLIER_REGISTER_ORGANIZATION, SUPPLIER_REGISTER_APTITUDES, SUPPLIER_CREDENTIAL,
+    SUPPLIER_CONTACTS_NAME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
+    INSERT_UPDATE_REMARK, EAS_SUPPLIER_ID, DELETED, SUPPLIER_FAR_ID, SUPPLIER_BUSINESS_LICENSE,
+    SUPPLIER_BUSINESS_ABLELICENSE
   </sql>
   <sql id="columns_alias">
-    t.SUPPLIER_ID, t.SUPPLIER_NAME, t.SUPPLIER_ABBREVIATION, t.SUPPLIER_ADDRESS, t.SUPPLIER_LEGAL_REPRESENTATIVE, 
-    t.SUPPLIER_REGISTER_NO, t.SUPPLIER_AGENT, t.SUPPLIER_CONTACT_NUMBER, t.SUPPLIER_FAX, 
-    t.SUPPLIER_ACCOUNT, t.SUPPLIER_ACCOUNT_BLANK, t.SUPPLIER_DUTY_PARAGRAPH, t.SUPPLIER_POSTAL_CODE, 
-    t.SUPPLIER_REGISTER_CAPITAL, t.SUPPLIERBUSINESS_SCOPE, t.SUPPLIER_COMPANY_STATUS, 
-    t.SUPPLIER_OPERATION_PERIOD, t.SUPPLIER_REGISTER_DATE, t.SUPPLIER_REGISTER_ORGANIZATION, 
-    t.SUPPLIER_REGISTER_APTITUDES, t.SUPPLIER_CREDENTIAL, t.SUPPLIER_CONTACTS_NAME, t.INSERT_USERNAME, 
-    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.SUPPLIER_BUSINESS_LICENSE, 
-    t.SUPPLIER_BUSINESS_ABLELICENSE,t.DELETED
+    t.SUPPLIER_ID, t.SUPPLIER_NAME, t.SUPPLIER_ABBREVIATION, t.SUPPLIER_ADDRESS, t.SUPPLIER_LEGAL_REPRESENTATIVE,
+    t.SUPPLIER_REGISTER_NO, t.SUPPLIER_AGENT, t.SUPPLIER_CONTACT_NUMBER, t.SUPPLIER_FAX,
+    t.SUPPLIER_ACCOUNT, t.SUPPLIER_ACCOUNT_BLANK, t.SUPPLIER_DUTY_PARAGRAPH, t.SUPPLIER_POSTAL_CODE,
+    t.SUPPLIER_REGISTER_CAPITAL, t.SUPPLIERBUSINESS_SCOPE, t.SUPPLIER_COMPANY_STATUS,
+    t.SUPPLIER_OPERATION_PERIOD, t.SUPPLIER_REGISTER_DATE, t.SUPPLIER_REGISTER_ORGANIZATION,
+    t.SUPPLIER_REGISTER_APTITUDES, t.SUPPLIER_CREDENTIAL, t.SUPPLIER_CONTACTS_NAME, t.INSERT_USERNAME,
+    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.EAS_SUPPLIER_ID,
+    t.DELETED, t.SUPPLIER_FAR_ID, t.SUPPLIER_BUSINESS_LICENSE, t.SUPPLIER_BUSINESS_ABLELICENSE
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM RMS_SUPPLIER
@@ -59,7 +62,7 @@
     SELECT <include refid="columns_alias" /> FROM RMS_SUPPLIER t
   </sql>
   <sql id="where">
-    <where> 
+    <where>
       <if test="supplierId != null">
         and SUPPLIER_ID = #{supplierId}
       </if>
@@ -141,19 +144,25 @@
       <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
         and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
       </if>
+      <if test="easSupplierId != null and easSupplierId != ''">
+        and EAS_SUPPLIER_ID = #{easSupplierId}
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="supplierFarId != null">
+        and SUPPLIER_FAR_ID = #{supplierFarId}
+      </if>
       <if test="supplierBusinessLicense != null">
         and SUPPLIER_BUSINESS_LICENSE = #{supplierBusinessLicense}
       </if>
       <if test="supplierBusinessAblelicense != null">
         and SUPPLIER_BUSINESS_ABLELICENSE = #{supplierBusinessAblelicense}
       </if>
-      <if test="deleted != null">
-        and DELETED = #{deleted}
-      </if>
     </where>
   </sql>
   <sql id="whereLike">
-    <where> 
+    <where>
       <if test="supplierId != null">
         and SUPPLIER_ID = #{supplierId}
       </if>
@@ -235,139 +244,153 @@
       <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
         and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
       </if>
+      <if test="easSupplierId != null and easSupplierId != ''">
+        and EAS_SUPPLIER_ID LIKE '%${easSupplierId}%'
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="supplierFarId != null">
+        and SUPPLIER_FAR_ID = #{supplierFarId}
+      </if>
       <if test="supplierBusinessLicense != null">
         and SUPPLIER_BUSINESS_LICENSE = #{supplierBusinessLicense}
       </if>
       <if test="supplierBusinessAblelicense != null">
         and SUPPLIER_BUSINESS_ABLELICENSE = #{supplierBusinessAblelicense}
       </if>
-      <if test="deleted != null">
-        and DELETED = #{deleted}
-      </if>
     </where>
   </sql>
-  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
     delete from RMS_SUPPLIER
     where SUPPLIER_ID = #{supplierId,jdbcType=DECIMAL}
   </delete>
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from RMS_SUPPLIER
-    where 1!=1 
-      <if test="supplierName != null and supplierName != ''">
-        or SUPPLIER_NAME = #{supplierName}
-      </if>
-      <if test="supplierAbbreviation != null and supplierAbbreviation != ''">
-        or SUPPLIER_ABBREVIATION = #{supplierAbbreviation}
-      </if>
-      <if test="supplierAddress != null and supplierAddress != ''">
-        or SUPPLIER_ADDRESS = #{supplierAddress}
-      </if>
-      <if test="supplierLegalRepresentative != null and supplierLegalRepresentative != ''">
-        or SUPPLIER_LEGAL_REPRESENTATIVE = #{supplierLegalRepresentative}
-      </if>
-      <if test="supplierRegisterNo != null and supplierRegisterNo != ''">
-        or SUPPLIER_REGISTER_NO = #{supplierRegisterNo}
-      </if>
-      <if test="supplierAgent != null and supplierAgent != ''">
-        or SUPPLIER_AGENT = #{supplierAgent}
-      </if>
-      <if test="supplierContactNumber != null and supplierContactNumber != ''">
-        or SUPPLIER_CONTACT_NUMBER = #{supplierContactNumber}
-      </if>
-      <if test="supplierFax != null and supplierFax != ''">
-        or SUPPLIER_FAX = #{supplierFax}
-      </if>
-      <if test="supplierAccount != null and supplierAccount != ''">
-        or SUPPLIER_ACCOUNT = #{supplierAccount}
-      </if>
-      <if test="supplierAccountBlank != null and supplierAccountBlank != ''">
-        or SUPPLIER_ACCOUNT_BLANK = #{supplierAccountBlank}
-      </if>
-      <if test="supplierDutyParagraph != null and supplierDutyParagraph != ''">
-        or SUPPLIER_DUTY_PARAGRAPH = #{supplierDutyParagraph}
-      </if>
-      <if test="supplierPostalCode != null and supplierPostalCode != ''">
-        or SUPPLIER_POSTAL_CODE = #{supplierPostalCode}
-      </if>
-      <if test="supplierRegisterCapital != null and supplierRegisterCapital != ''">
-        or SUPPLIER_REGISTER_CAPITAL = #{supplierRegisterCapital}
-      </if>
-      <if test="supplierbusinessScope != null and supplierbusinessScope != ''">
-        or SUPPLIERBUSINESS_SCOPE = #{supplierbusinessScope}
-      </if>
-      <if test="supplierCompanyStatus != null and supplierCompanyStatus != ''">
-        or SUPPLIER_COMPANY_STATUS = #{supplierCompanyStatus}
-      </if>
-      <if test="supplierOperationPeriod != null and supplierOperationPeriod != ''">
-        or SUPPLIER_OPERATION_PERIOD = #{supplierOperationPeriod}
-      </if>
-      <if test="supplierRegisterDate != null">
-        or TO_CHAR(SUPPLIER_REGISTER_DATE,'yyyy-MM-dd') = '#{supplierRegisterDate}'
-      </if>
-      <if test="supplierRegisterOrganization != null and supplierRegisterOrganization != ''">
-        or SUPPLIER_REGISTER_ORGANIZATION = #{supplierRegisterOrganization}
-      </if>
-      <if test="supplierRegisterAptitudes != null and supplierRegisterAptitudes != ''">
-        or SUPPLIER_REGISTER_APTITUDES = #{supplierRegisterAptitudes}
-      </if>
-      <if test="supplierCredential != null and supplierCredential != ''">
-        or SUPPLIER_CREDENTIAL = #{supplierCredential}
-      </if>
-      <if test="supplierContactsName != null and supplierContactsName != ''">
-        or SUPPLIER_CONTACTS_NAME = #{supplierContactsName}
-      </if>
-      <if test="insertUsername != null and insertUsername != ''">
-        or INSERT_USERNAME = #{insertUsername}
-      </if>
-      <if test="insertTime != null">
-        or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
-      </if>
-      <if test="updateUsername != null and updateUsername != ''">
-        or UPDATE_USERNAME = #{updateUsername}
-      </if>
-      <if test="updateTime != null">
-        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
-      </if>
-      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
-        or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
-      </if>
-      <if test="supplierBusinessLicense != null">
-        or SUPPLIER_BUSINESS_LICENSE = #{supplierBusinessLicense}
-      </if>
-      <if test="supplierBusinessAblelicense != null">
-        or SUPPLIER_BUSINESS_ABLELICENSE = #{supplierBusinessAblelicense}
-      </if>
-      <if test="deleted != null">
-        or DELETED = #{deleted}
-      </if>
+    where 1!=1
+    <if test="supplierName != null and supplierName != ''">
+      or SUPPLIER_NAME = #{supplierName}
+    </if>
+    <if test="supplierAbbreviation != null and supplierAbbreviation != ''">
+      or SUPPLIER_ABBREVIATION = #{supplierAbbreviation}
+    </if>
+    <if test="supplierAddress != null and supplierAddress != ''">
+      or SUPPLIER_ADDRESS = #{supplierAddress}
+    </if>
+    <if test="supplierLegalRepresentative != null and supplierLegalRepresentative != ''">
+      or SUPPLIER_LEGAL_REPRESENTATIVE = #{supplierLegalRepresentative}
+    </if>
+    <if test="supplierRegisterNo != null and supplierRegisterNo != ''">
+      or SUPPLIER_REGISTER_NO = #{supplierRegisterNo}
+    </if>
+    <if test="supplierAgent != null and supplierAgent != ''">
+      or SUPPLIER_AGENT = #{supplierAgent}
+    </if>
+    <if test="supplierContactNumber != null and supplierContactNumber != ''">
+      or SUPPLIER_CONTACT_NUMBER = #{supplierContactNumber}
+    </if>
+    <if test="supplierFax != null and supplierFax != ''">
+      or SUPPLIER_FAX = #{supplierFax}
+    </if>
+    <if test="supplierAccount != null and supplierAccount != ''">
+      or SUPPLIER_ACCOUNT = #{supplierAccount}
+    </if>
+    <if test="supplierAccountBlank != null and supplierAccountBlank != ''">
+      or SUPPLIER_ACCOUNT_BLANK = #{supplierAccountBlank}
+    </if>
+    <if test="supplierDutyParagraph != null and supplierDutyParagraph != ''">
+      or SUPPLIER_DUTY_PARAGRAPH = #{supplierDutyParagraph}
+    </if>
+    <if test="supplierPostalCode != null and supplierPostalCode != ''">
+      or SUPPLIER_POSTAL_CODE = #{supplierPostalCode}
+    </if>
+    <if test="supplierRegisterCapital != null and supplierRegisterCapital != ''">
+      or SUPPLIER_REGISTER_CAPITAL = #{supplierRegisterCapital}
+    </if>
+    <if test="supplierbusinessScope != null and supplierbusinessScope != ''">
+      or SUPPLIERBUSINESS_SCOPE = #{supplierbusinessScope}
+    </if>
+    <if test="supplierCompanyStatus != null and supplierCompanyStatus != ''">
+      or SUPPLIER_COMPANY_STATUS = #{supplierCompanyStatus}
+    </if>
+    <if test="supplierOperationPeriod != null and supplierOperationPeriod != ''">
+      or SUPPLIER_OPERATION_PERIOD = #{supplierOperationPeriod}
+    </if>
+    <if test="supplierRegisterDate != null">
+      or TO_CHAR(SUPPLIER_REGISTER_DATE,'yyyy-MM-dd') = '#{supplierRegisterDate}'
+    </if>
+    <if test="supplierRegisterOrganization != null and supplierRegisterOrganization != ''">
+      or SUPPLIER_REGISTER_ORGANIZATION = #{supplierRegisterOrganization}
+    </if>
+    <if test="supplierRegisterAptitudes != null and supplierRegisterAptitudes != ''">
+      or SUPPLIER_REGISTER_APTITUDES = #{supplierRegisterAptitudes}
+    </if>
+    <if test="supplierCredential != null and supplierCredential != ''">
+      or SUPPLIER_CREDENTIAL = #{supplierCredential}
+    </if>
+    <if test="supplierContactsName != null and supplierContactsName != ''">
+      or SUPPLIER_CONTACTS_NAME = #{supplierContactsName}
+    </if>
+    <if test="insertUsername != null and insertUsername != ''">
+      or INSERT_USERNAME = #{insertUsername}
+    </if>
+    <if test="insertTime != null">
+      or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+    </if>
+    <if test="updateUsername != null and updateUsername != ''">
+      or UPDATE_USERNAME = #{updateUsername}
+    </if>
+    <if test="updateTime != null">
+      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+    </if>
+    <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+      or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+    </if>
+    <if test="easSupplierId != null and easSupplierId != ''">
+      or EAS_SUPPLIER_ID = #{easSupplierId}
+    </if>
+    <if test="deleted != null">
+      or DELETED = #{deleted}
+    </if>
+    <if test="supplierFarId != null">
+      or SUPPLIER_FAR_ID = #{supplierFarId}
+    </if>
+    <if test="supplierBusinessLicense != null">
+      or SUPPLIER_BUSINESS_LICENSE = #{supplierBusinessLicense}
+    </if>
+    <if test="supplierBusinessAblelicense != null">
+      or SUPPLIER_BUSINESS_ABLELICENSE = #{supplierBusinessAblelicense}
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.RmsSupplier">
-    insert into RMS_SUPPLIER (SUPPLIER_ID, SUPPLIER_NAME, SUPPLIER_ABBREVIATION, 
-      SUPPLIER_ADDRESS, SUPPLIER_LEGAL_REPRESENTATIVE, 
-      SUPPLIER_REGISTER_NO, SUPPLIER_AGENT, SUPPLIER_CONTACT_NUMBER, 
-      SUPPLIER_FAX, SUPPLIER_ACCOUNT, SUPPLIER_ACCOUNT_BLANK, 
-      SUPPLIER_DUTY_PARAGRAPH, SUPPLIER_POSTAL_CODE, 
-      SUPPLIER_REGISTER_CAPITAL, SUPPLIERBUSINESS_SCOPE, 
-      SUPPLIER_COMPANY_STATUS, SUPPLIER_OPERATION_PERIOD, 
-      SUPPLIER_REGISTER_DATE, SUPPLIER_REGISTER_ORGANIZATION, 
-      SUPPLIER_REGISTER_APTITUDES, SUPPLIER_CREDENTIAL, 
-      SUPPLIER_CONTACTS_NAME, INSERT_USERNAME, INSERT_TIME, 
-      UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
-      SUPPLIER_BUSINESS_LICENSE, SUPPLIER_BUSINESS_ABLELICENSE,DELETED
-      )
-    values (#{supplierId,jdbcType=DECIMAL}, #{supplierName,jdbcType=VARCHAR}, #{supplierAbbreviation,jdbcType=VARCHAR}, 
-      #{supplierAddress,jdbcType=VARCHAR}, #{supplierLegalRepresentative,jdbcType=VARCHAR}, 
-      #{supplierRegisterNo,jdbcType=VARCHAR}, #{supplierAgent,jdbcType=VARCHAR}, #{supplierContactNumber,jdbcType=VARCHAR}, 
-      #{supplierFax,jdbcType=VARCHAR}, #{supplierAccount,jdbcType=VARCHAR}, #{supplierAccountBlank,jdbcType=VARCHAR}, 
-      #{supplierDutyParagraph,jdbcType=VARCHAR}, #{supplierPostalCode,jdbcType=VARCHAR}, 
-      #{supplierRegisterCapital,jdbcType=VARCHAR}, #{supplierbusinessScope,jdbcType=VARCHAR}, 
-      #{supplierCompanyStatus,jdbcType=VARCHAR}, #{supplierOperationPeriod,jdbcType=VARCHAR}, 
-      #{supplierRegisterDate,jdbcType=TIMESTAMP}, #{supplierRegisterOrganization,jdbcType=VARCHAR}, 
-      #{supplierRegisterAptitudes,jdbcType=VARCHAR}, #{supplierCredential,jdbcType=VARCHAR}, 
-      #{supplierContactsName,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, 
-      #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, 
-      #{supplierBusinessLicense,jdbcType=BLOB}, #{supplierBusinessAblelicense,jdbcType=BLOB}, #{deleted,jdbcType=DECIMAL}
-      )
+    insert into RMS_SUPPLIER (SUPPLIER_ID, SUPPLIER_NAME, SUPPLIER_ABBREVIATION,
+                              SUPPLIER_ADDRESS, SUPPLIER_LEGAL_REPRESENTATIVE,
+                              SUPPLIER_REGISTER_NO, SUPPLIER_AGENT, SUPPLIER_CONTACT_NUMBER,
+                              SUPPLIER_FAX, SUPPLIER_ACCOUNT, SUPPLIER_ACCOUNT_BLANK,
+                              SUPPLIER_DUTY_PARAGRAPH, SUPPLIER_POSTAL_CODE,
+                              SUPPLIER_REGISTER_CAPITAL, SUPPLIERBUSINESS_SCOPE,
+                              SUPPLIER_COMPANY_STATUS, SUPPLIER_OPERATION_PERIOD,
+                              SUPPLIER_REGISTER_DATE, SUPPLIER_REGISTER_ORGANIZATION,
+                              SUPPLIER_REGISTER_APTITUDES, SUPPLIER_CREDENTIAL,
+                              SUPPLIER_CONTACTS_NAME, INSERT_USERNAME, INSERT_TIME,
+                              UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
+                              EAS_SUPPLIER_ID, DELETED, SUPPLIER_FAR_ID,
+                              SUPPLIER_BUSINESS_LICENSE, SUPPLIER_BUSINESS_ABLELICENSE
+    )
+    values (#{supplierId,jdbcType=DECIMAL}, #{supplierName,jdbcType=VARCHAR}, #{supplierAbbreviation,jdbcType=VARCHAR},
+            #{supplierAddress,jdbcType=VARCHAR}, #{supplierLegalRepresentative,jdbcType=VARCHAR},
+            #{supplierRegisterNo,jdbcType=VARCHAR}, #{supplierAgent,jdbcType=VARCHAR}, #{supplierContactNumber,jdbcType=VARCHAR},
+            #{supplierFax,jdbcType=VARCHAR}, #{supplierAccount,jdbcType=VARCHAR}, #{supplierAccountBlank,jdbcType=VARCHAR},
+            #{supplierDutyParagraph,jdbcType=VARCHAR}, #{supplierPostalCode,jdbcType=VARCHAR},
+            #{supplierRegisterCapital,jdbcType=VARCHAR}, #{supplierbusinessScope,jdbcType=VARCHAR},
+            #{supplierCompanyStatus,jdbcType=VARCHAR}, #{supplierOperationPeriod,jdbcType=VARCHAR},
+            #{supplierRegisterDate,jdbcType=TIMESTAMP}, #{supplierRegisterOrganization,jdbcType=VARCHAR},
+            #{supplierRegisterAptitudes,jdbcType=VARCHAR}, #{supplierCredential,jdbcType=VARCHAR},
+            #{supplierContactsName,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+            #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
+            #{easSupplierId,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{supplierFarId,jdbcType=DECIMAL},
+            #{supplierBusinessLicense,jdbcType=BLOB}, #{supplierBusinessAblelicense,jdbcType=BLOB}
+           )
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsSupplier">
     insert into RMS_SUPPLIER
@@ -453,15 +476,21 @@
       <if test="insertUpdateRemark != null">
         INSERT_UPDATE_REMARK,
       </if>
+      <if test="easSupplierId != null">
+        EAS_SUPPLIER_ID,
+      </if>
+      <if test="deleted != null">
+        DELETED,
+      </if>
+      <if test="supplierFarId != null">
+        SUPPLIER_FAR_ID,
+      </if>
       <if test="supplierBusinessLicense != null">
         SUPPLIER_BUSINESS_LICENSE,
       </if>
       <if test="supplierBusinessAblelicense != null">
         SUPPLIER_BUSINESS_ABLELICENSE,
       </if>
-      <if test="deleted != null">
-        DELETED,
-      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="supplierId != null">
@@ -545,48 +574,56 @@
       <if test="insertUpdateRemark != null">
         #{insertUpdateRemark,jdbcType=VARCHAR},
       </if>
+      <if test="easSupplierId != null">
+        #{easSupplierId,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="supplierFarId != null">
+        #{supplierFarId,jdbcType=DECIMAL},
+      </if>
       <if test="supplierBusinessLicense != null">
         #{supplierBusinessLicense,jdbcType=BLOB},
       </if>
       <if test="supplierBusinessAblelicense != null">
         #{supplierBusinessAblelicense,jdbcType=BLOB},
       </if>
-      <if test="deleted != null">
-        #{deleted,jdbcType=DECIMAL},
-      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsSupplier">
     update RMS_SUPPLIER
     set SUPPLIER_NAME = #{supplierName,jdbcType=VARCHAR},
-      SUPPLIER_ABBREVIATION = #{supplierAbbreviation,jdbcType=VARCHAR},
-      SUPPLIER_ADDRESS = #{supplierAddress,jdbcType=VARCHAR},
-      SUPPLIER_LEGAL_REPRESENTATIVE = #{supplierLegalRepresentative,jdbcType=VARCHAR},
-      SUPPLIER_REGISTER_NO = #{supplierRegisterNo,jdbcType=VARCHAR},
-      SUPPLIER_AGENT = #{supplierAgent,jdbcType=VARCHAR},
-      SUPPLIER_CONTACT_NUMBER = #{supplierContactNumber,jdbcType=VARCHAR},
-      SUPPLIER_FAX = #{supplierFax,jdbcType=VARCHAR},
-      SUPPLIER_ACCOUNT = #{supplierAccount,jdbcType=VARCHAR},
-      SUPPLIER_ACCOUNT_BLANK = #{supplierAccountBlank,jdbcType=VARCHAR},
-      SUPPLIER_DUTY_PARAGRAPH = #{supplierDutyParagraph,jdbcType=VARCHAR},
-      SUPPLIER_POSTAL_CODE = #{supplierPostalCode,jdbcType=VARCHAR},
-      SUPPLIER_REGISTER_CAPITAL = #{supplierRegisterCapital,jdbcType=VARCHAR},
-      SUPPLIERBUSINESS_SCOPE = #{supplierbusinessScope,jdbcType=VARCHAR},
-      SUPPLIER_COMPANY_STATUS = #{supplierCompanyStatus,jdbcType=VARCHAR},
-      SUPPLIER_OPERATION_PERIOD = #{supplierOperationPeriod,jdbcType=VARCHAR},
-      SUPPLIER_REGISTER_DATE = #{supplierRegisterDate,jdbcType=TIMESTAMP},
-      SUPPLIER_REGISTER_ORGANIZATION = #{supplierRegisterOrganization,jdbcType=VARCHAR},
-      SUPPLIER_REGISTER_APTITUDES = #{supplierRegisterAptitudes,jdbcType=VARCHAR},
-      SUPPLIER_CREDENTIAL = #{supplierCredential,jdbcType=VARCHAR},
-      SUPPLIER_CONTACTS_NAME = #{supplierContactsName,jdbcType=VARCHAR},
-      INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
-      INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
-      UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
-      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
-      INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
-      SUPPLIER_BUSINESS_LICENSE = #{supplierBusinessLicense,jdbcType=BLOB},
-      SUPPLIER_BUSINESS_ABLELICENSE = #{supplierBusinessAblelicense,jdbcType=BLOB},
-      DELETED = #{deleted,jdbcType=DECIMAL}
+        SUPPLIER_ABBREVIATION = #{supplierAbbreviation,jdbcType=VARCHAR},
+        SUPPLIER_ADDRESS = #{supplierAddress,jdbcType=VARCHAR},
+        SUPPLIER_LEGAL_REPRESENTATIVE = #{supplierLegalRepresentative,jdbcType=VARCHAR},
+        SUPPLIER_REGISTER_NO = #{supplierRegisterNo,jdbcType=VARCHAR},
+        SUPPLIER_AGENT = #{supplierAgent,jdbcType=VARCHAR},
+        SUPPLIER_CONTACT_NUMBER = #{supplierContactNumber,jdbcType=VARCHAR},
+        SUPPLIER_FAX = #{supplierFax,jdbcType=VARCHAR},
+        SUPPLIER_ACCOUNT = #{supplierAccount,jdbcType=VARCHAR},
+        SUPPLIER_ACCOUNT_BLANK = #{supplierAccountBlank,jdbcType=VARCHAR},
+        SUPPLIER_DUTY_PARAGRAPH = #{supplierDutyParagraph,jdbcType=VARCHAR},
+        SUPPLIER_POSTAL_CODE = #{supplierPostalCode,jdbcType=VARCHAR},
+        SUPPLIER_REGISTER_CAPITAL = #{supplierRegisterCapital,jdbcType=VARCHAR},
+        SUPPLIERBUSINESS_SCOPE = #{supplierbusinessScope,jdbcType=VARCHAR},
+        SUPPLIER_COMPANY_STATUS = #{supplierCompanyStatus,jdbcType=VARCHAR},
+        SUPPLIER_OPERATION_PERIOD = #{supplierOperationPeriod,jdbcType=VARCHAR},
+        SUPPLIER_REGISTER_DATE = #{supplierRegisterDate,jdbcType=TIMESTAMP},
+        SUPPLIER_REGISTER_ORGANIZATION = #{supplierRegisterOrganization,jdbcType=VARCHAR},
+        SUPPLIER_REGISTER_APTITUDES = #{supplierRegisterAptitudes,jdbcType=VARCHAR},
+        SUPPLIER_CREDENTIAL = #{supplierCredential,jdbcType=VARCHAR},
+        SUPPLIER_CONTACTS_NAME = #{supplierContactsName,jdbcType=VARCHAR},
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+        EAS_SUPPLIER_ID = #{easSupplierId,jdbcType=VARCHAR},
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        SUPPLIER_FAR_ID = #{supplierFarId,jdbcType=DECIMAL},
+        SUPPLIER_BUSINESS_LICENSE = #{supplierBusinessLicense,jdbcType=BLOB},
+        SUPPLIER_BUSINESS_ABLELICENSE = #{supplierBusinessAblelicense,jdbcType=BLOB}
     where SUPPLIER_ID = #{supplierId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsSupplier">
@@ -670,19 +707,25 @@
       <if test="insertUpdateRemark != null">
         INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
       </if>
+      <if test="easSupplierId != null">
+        EAS_SUPPLIER_ID = #{easSupplierId,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        DELETED = #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="supplierFarId != null">
+        SUPPLIER_FAR_ID = #{supplierFarId,jdbcType=DECIMAL},
+      </if>
       <if test="supplierBusinessLicense != null">
         SUPPLIER_BUSINESS_LICENSE = #{supplierBusinessLicense,jdbcType=BLOB},
       </if>
       <if test="supplierBusinessAblelicense != null">
         SUPPLIER_BUSINESS_ABLELICENSE = #{supplierBusinessAblelicense,jdbcType=BLOB},
       </if>
-      <if test="deleted != null">
-        DELETED = #{deleted,jdbcType=DECIMAL},
-      </if>
     </set>
     where SUPPLIER_ID = #{supplierId,jdbcType=DECIMAL}
   </update>
-  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
     <include refid="select" />
     where SUPPLIER_ID = #{supplierId,jdbcType=DECIMAL}
   </select>
@@ -695,174 +738,184 @@
     <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
-    insert into RMS_SUPPLIER 
-      (SUPPLIER_ID, 
-      SUPPLIER_NAME, SUPPLIER_ABBREVIATION, 
-      SUPPLIER_ADDRESS, SUPPLIER_LEGAL_REPRESENTATIVE, 
-      SUPPLIER_REGISTER_NO, SUPPLIER_AGENT, 
-      SUPPLIER_CONTACT_NUMBER, SUPPLIER_FAX, 
-      SUPPLIER_ACCOUNT, SUPPLIER_ACCOUNT_BLANK, 
-      SUPPLIER_DUTY_PARAGRAPH, SUPPLIER_POSTAL_CODE, 
-      SUPPLIER_REGISTER_CAPITAL, SUPPLIERBUSINESS_SCOPE, 
-      SUPPLIER_COMPANY_STATUS, SUPPLIER_OPERATION_PERIOD, 
-      SUPPLIER_REGISTER_DATE, SUPPLIER_REGISTER_ORGANIZATION, 
-      SUPPLIER_REGISTER_APTITUDES, SUPPLIER_CREDENTIAL, 
-      SUPPLIER_CONTACTS_NAME, INSERT_USERNAME, 
-      INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, 
-      SUPPLIER_BUSINESS_LICENSE, SUPPLIER_BUSINESS_ABLELICENSE,DELETED
-      )
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.supplierId,jdbcType=DECIMAL}, 
-      #{item.supplierName,jdbcType=VARCHAR}, #{item.supplierAbbreviation,jdbcType=VARCHAR}, 
-      #{item.supplierAddress,jdbcType=VARCHAR}, #{item.supplierLegalRepresentative,jdbcType=VARCHAR}, 
-      #{item.supplierRegisterNo,jdbcType=VARCHAR}, #{item.supplierAgent,jdbcType=VARCHAR}, 
-      #{item.supplierContactNumber,jdbcType=VARCHAR}, #{item.supplierFax,jdbcType=VARCHAR}, 
-      #{item.supplierAccount,jdbcType=VARCHAR}, #{item.supplierAccountBlank,jdbcType=VARCHAR}, 
-      #{item.supplierDutyParagraph,jdbcType=VARCHAR}, #{item.supplierPostalCode,jdbcType=VARCHAR}, 
-      #{item.supplierRegisterCapital,jdbcType=VARCHAR}, #{item.supplierbusinessScope,jdbcType=VARCHAR}, 
-      #{item.supplierCompanyStatus,jdbcType=VARCHAR}, #{item.supplierOperationPeriod,jdbcType=VARCHAR}, 
-      #{item.supplierRegisterDate,jdbcType=TIMESTAMP}, #{item.supplierRegisterOrganization,jdbcType=VARCHAR}, 
-      #{item.supplierRegisterAptitudes,jdbcType=VARCHAR}, #{item.supplierCredential,jdbcType=VARCHAR}, 
-      #{item.supplierContactsName,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR}, 
-      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
-      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, 
-      #{item.supplierBusinessLicense,jdbcType=BLOB}, #{item.supplierBusinessAblelicense,jdbcType=BLOB}, #{item.deleted,jdbcType=DECIMAL
-       from dual  
-   </foreach> )
+    insert into RMS_SUPPLIER
+    (SUPPLIER_ID,
+    SUPPLIER_NAME, SUPPLIER_ABBREVIATION,
+    SUPPLIER_ADDRESS, SUPPLIER_LEGAL_REPRESENTATIVE,
+    SUPPLIER_REGISTER_NO, SUPPLIER_AGENT,
+    SUPPLIER_CONTACT_NUMBER, SUPPLIER_FAX,
+    SUPPLIER_ACCOUNT, SUPPLIER_ACCOUNT_BLANK,
+    SUPPLIER_DUTY_PARAGRAPH, SUPPLIER_POSTAL_CODE,
+    SUPPLIER_REGISTER_CAPITAL, SUPPLIERBUSINESS_SCOPE,
+    SUPPLIER_COMPANY_STATUS, SUPPLIER_OPERATION_PERIOD,
+    SUPPLIER_REGISTER_DATE, SUPPLIER_REGISTER_ORGANIZATION,
+    SUPPLIER_REGISTER_APTITUDES, SUPPLIER_CREDENTIAL,
+    SUPPLIER_CONTACTS_NAME, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME,
+    UPDATE_TIME, INSERT_UPDATE_REMARK,
+    EAS_SUPPLIER_ID, DELETED, SUPPLIER_FAR_ID,
+    SUPPLIER_BUSINESS_LICENSE, SUPPLIER_BUSINESS_ABLELICENSE
+    )
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.supplierId,jdbcType=DECIMAL},
+    #{item.supplierName,jdbcType=VARCHAR}, #{item.supplierAbbreviation,jdbcType=VARCHAR},
+    #{item.supplierAddress,jdbcType=VARCHAR}, #{item.supplierLegalRepresentative,jdbcType=VARCHAR},
+    #{item.supplierRegisterNo,jdbcType=VARCHAR}, #{item.supplierAgent,jdbcType=VARCHAR},
+    #{item.supplierContactNumber,jdbcType=VARCHAR}, #{item.supplierFax,jdbcType=VARCHAR},
+    #{item.supplierAccount,jdbcType=VARCHAR}, #{item.supplierAccountBlank,jdbcType=VARCHAR},
+    #{item.supplierDutyParagraph,jdbcType=VARCHAR}, #{item.supplierPostalCode,jdbcType=VARCHAR},
+    #{item.supplierRegisterCapital,jdbcType=VARCHAR}, #{item.supplierbusinessScope,jdbcType=VARCHAR},
+    #{item.supplierCompanyStatus,jdbcType=VARCHAR}, #{item.supplierOperationPeriod,jdbcType=VARCHAR},
+    #{item.supplierRegisterDate,jdbcType=TIMESTAMP}, #{item.supplierRegisterOrganization,jdbcType=VARCHAR},
+    #{item.supplierRegisterAptitudes,jdbcType=VARCHAR}, #{item.supplierCredential,jdbcType=VARCHAR},
+    #{item.supplierContactsName,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
+    #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
+    #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
+    #{item.easSupplierId,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL}, #{item.supplierFarId,jdbcType=DECIMAL},
+    #{item.supplierBusinessLicense,jdbcType=BLOB}, #{item.supplierBusinessAblelicense,jdbcType=BLOB}
+    from dual
+  </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
-     update RMS_SUPPLIER
-     set
-       SUPPLIER_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierId,jdbcType=DECIMAL}
-       </foreach>
-       ,SUPPLIER_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierName,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_ABBREVIATION=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierAbbreviation,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_ADDRESS=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierAddress,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_LEGAL_REPRESENTATIVE=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierLegalRepresentative,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_REGISTER_NO=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierRegisterNo,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_AGENT=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierAgent,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_CONTACT_NUMBER=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierContactNumber,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_FAX=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierFax,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_ACCOUNT=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierAccount,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_ACCOUNT_BLANK=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierAccountBlank,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_DUTY_PARAGRAPH=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierDutyParagraph,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_POSTAL_CODE=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierPostalCode,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_REGISTER_CAPITAL=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierRegisterCapital,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIERBUSINESS_SCOPE=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierbusinessScope,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_COMPANY_STATUS=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierCompanyStatus,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_OPERATION_PERIOD=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierOperationPeriod,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_REGISTER_DATE=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierRegisterDate,jdbcType=TIMESTAMP}
-       </foreach>
-       ,SUPPLIER_REGISTER_ORGANIZATION=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierRegisterOrganization,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_REGISTER_APTITUDES=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierRegisterAptitudes,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_CREDENTIAL=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierCredential,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_CONTACTS_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierContactsName,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,UPDATE_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,UPDATE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,INSERT_UPDATE_REMARK=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
-       </foreach>
-       ,SUPPLIER_BUSINESS_LICENSE=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierBusinessLicense,jdbcType=BLOB}
-       </foreach>
-       ,SUPPLIER_BUSINESS_ABLELICENSE=
-       <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
-          when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierBusinessAblelicense,jdbcType=BLOB}
-       </foreach>
-      ,DELETED=
-      <foreach close="end" collection="list" index="index" item="item" open="case SHIPPER_ID" separator=" ">
-        when #{item.shipperId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
-      </foreach>
-     where SUPPLIER_ID in 
-     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
-    #{item.supplierId,jdbcType=DECIMAL}
-     </foreach> 
+    update RMS_SUPPLIER
+    set
+    SUPPLIER_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierId,jdbcType=DECIMAL}
+    </foreach>
+    ,SUPPLIER_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierName,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_ABBREVIATION=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierAbbreviation,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_ADDRESS=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierAddress,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_LEGAL_REPRESENTATIVE=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierLegalRepresentative,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_REGISTER_NO=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierRegisterNo,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_AGENT=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierAgent,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_CONTACT_NUMBER=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierContactNumber,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_FAX=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierFax,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_ACCOUNT=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierAccount,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_ACCOUNT_BLANK=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierAccountBlank,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_DUTY_PARAGRAPH=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierDutyParagraph,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_POSTAL_CODE=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierPostalCode,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_REGISTER_CAPITAL=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierRegisterCapital,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIERBUSINESS_SCOPE=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierbusinessScope,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_COMPANY_STATUS=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierCompanyStatus,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_OPERATION_PERIOD=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierOperationPeriod,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_REGISTER_DATE=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierRegisterDate,jdbcType=TIMESTAMP}
+    </foreach>
+    ,SUPPLIER_REGISTER_ORGANIZATION=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierRegisterOrganization,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_REGISTER_APTITUDES=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierRegisterAptitudes,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_CREDENTIAL=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierCredential,jdbcType=VARCHAR}
+    </foreach>
+    ,SUPPLIER_CONTACTS_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierContactsName,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,EAS_SUPPLIER_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.easSupplierId,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETED=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    ,SUPPLIER_FAR_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierFarId,jdbcType=DECIMAL}
+    </foreach>
+    ,SUPPLIER_BUSINESS_LICENSE=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierBusinessLicense,jdbcType=BLOB}
+    </foreach>
+    ,SUPPLIER_BUSINESS_ABLELICENSE=
+    <foreach close="end" collection="list" index="index" item="item" open="case SUPPLIER_ID" separator=" ">
+      when #{item.supplierId,jdbcType=DECIMAL} then #{item.supplierBusinessAblelicense,jdbcType=BLOB}
+    </foreach>
+    where SUPPLIER_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.supplierId,jdbcType=DECIMAL}
+    </foreach>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from RMS_SUPPLIER
-    where SUPPLIER_ID in 
+    where SUPPLIER_ID in
     <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
@@ -879,11 +932,18 @@
     RS.SUPPLIER_ADDRESS AS "supplierAddress",
     RS.SUPPLIER_REGISTER_DATE AS "supplierRegisterDate",
     RS.SUPPLIER_CONTACTS_NAME AS "supplierContactsName",
-    RS.SUPPLIER_CONTACT_NUMBER AS "supplierContactNumber"
+    RS.SUPPLIER_CONTACT_NUMBER AS "supplierContactNumber",
+    RS1.SHIPPER_NAME as "farUnitName"
+
     FROM RMS_SUPPLIER RS
+    LEFT JOIN RMS_SHIPPER RS1
+    ON RS1.SHIPPER_ID=RS.SUPPLIER_FAR_ID
     WHERE RS.DELETED != 1
     ORDER BY RS.INSERT_TIME DESC
     )
+    <if test="con != null">
+      where "supplierName" like #{con} or "farUnitName" like #{con} or "supplierAddress" like #{con}
+    </if>
     <where>
       <if test="supplierId!= null">
         and
@@ -934,22 +994,23 @@
   </sql>
   <!--    根据id值展示供应商信息-->
   <select id="selectSupplierById" resultType="java.util.LinkedHashMap">
-        SELECT
-        RS.SUPPLIER_ID AS "supplierId",
-        RS.SUPPLIER_DUTY_PARAGRAPH AS "supplierDutyParagraph",
-        RS.SUPPLIER_NAME AS "supplierName",
-        RS.SUPPLIER_ADDRESS AS "supplierAddress",
-        RS.SUPPLIER_REGISTER_DATE AS "supplierRegisterDate",
-        RS.SUPPLIER_CONTACTS_NAME AS "supplierContactsName",
-        RS.SUPPLIER_CONTACT_NUMBER AS "supplierContactNumber"
-        FROM RMS_SUPPLIER RS
-        WHERE RS.SUPPLIER_ID=#{id}
-    </select>
-<!--  根据名称查询当前表中相对应的供应商的数量-->
-    <select id="selectByParametersSupplierName" resultType="java.lang.Integer">
-      SELECT count(*)
-        FROM RMS_SUPPLIER RS
-        WHERE RS.SUPPLIER_NAME = #{supplierName}
-        AND RS.DELETED=0
-    </select>
+    SELECT
+      RS.SUPPLIER_ID AS "supplierId",
+      RS.SUPPLIER_DUTY_PARAGRAPH AS "supplierDutyParagraph",
+      RS.SUPPLIER_NAME AS "supplierName",
+      RS.SUPPLIER_ADDRESS AS "supplierAddress",
+      RS.SUPPLIER_REGISTER_DATE AS "supplierRegisterDate",
+      RS.SUPPLIER_CONTACTS_NAME AS "supplierContactsName",
+      RS.SUPPLIER_CONTACT_NUMBER AS "supplierContactNumber"
+    FROM RMS_SUPPLIER RS
+    WHERE RS.SUPPLIER_ID=#{id}
+  </select>
+  <!--  根据名称查询当前表中相对应的供应商的数量-->
+  <select id="selectByParametersSupplierName" resultType="java.lang.Integer">
+    SELECT count(*)
+    FROM RMS_SUPPLIER RS
+    WHERE RS.SUPPLIER_NAME = #{supplierName}
+      AND RS.DELETED=0
+  </select>
+
 </mapper>