Browse Source

'港口,码头'

HUJIANGUO 2 years ago
parent
commit
0807627b96

+ 1 - 1
pom.xml

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

+ 19 - 3
src/main/java/com/steerinfo/dil/controller/RmsConsigneeController.java

@@ -60,17 +60,33 @@ public class RmsConsigneeController extends BaseRESTfulController {
     }
 
     /**
-     * 创建收货客户信息
+     * 新增收货客户
      * @param
      * @return
      */
     @ApiOperation(value="创建", notes="根据RmsConsignee对象创建")
     @ApiImplicitParam(name = "rmsCapacity", value = "详细实体rmsConsignee", required = true, dataType = "RmsCapacity")
     @PostMapping(value = "/insertConsignee")
-    public RESTfulResult insertConsignee(@RequestBody Map<String,Object> mapVal)throws ParseException {
+    public RESTfulResult insertConsignee(@RequestBody Map<String,Object> mapVal) throws ParseException {
         int result = rmsConsigneeService.insertConsignee(mapVal);
         if(result==-1){
-            return failed();
+            return failed("收货客户已存在");
+        }
+        return success(result);
+    }
+
+    /**
+     * 收货客户注册
+     * @param
+     * @return
+     */
+    @ApiOperation(value="创建", notes="根据RmsConsignee对象创建")
+    @ApiImplicitParam(name = "rmsCapacity", value = "详细实体rmsConsignee", required = true, dataType = "RmsCapacity")
+    @PostMapping(value = "/signConsignee")
+    public RESTfulResult signConsignee(@RequestBody Map<String,Object> mapVal) {
+        int result = rmsConsigneeService.signConsignee(mapVal);
+        if(result==-1){
+            return failed("请到金蝶系统先添加该收获客户");
         }
         return success(result);
     }

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

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

+ 53 - 7
src/main/java/com/steerinfo/dil/model/RmsConsignee.java

@@ -129,15 +129,25 @@ public class RmsConsignee implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="收货单位父节点ID",required=false)
     private BigDecimal consigneeFarId;
 
-    private static final long serialVersionUID = 1L;
+    /**
+     * 销售组ID(AREA_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="销售组ID",required=false)
+    private BigDecimal areaId;
 
-    public BigDecimal getConsigneeFarId() {
-        return consigneeFarId;
-    }
+    /**
+     * SSO主键(CONSIGNEE_SSO_ID,VARCHAR,40)
+     */
+    @ApiModelProperty(value="SSO主键",required=false)
+    private String consigneeSsoId;
 
-    public void setConsigneeFarId(BigDecimal consigneeFarId) {
-        this.consigneeFarId = consigneeFarId;
-    }
+    /**
+     * SSO账号(CONSIGNEE_SSO_CODE,VARCHAR,36)
+     */
+    @ApiModelProperty(value="SSO账号",required=false)
+    private String consigneeSsoCode;
+
+    private static final long serialVersionUID = 1L;
 
     @Override
     public BigDecimal getId() {
@@ -301,6 +311,38 @@ public class RmsConsignee implements IBasePO<BigDecimal> {
         this.consigneeCode = consigneeCode == null ? null : consigneeCode.trim();
     }
 
+    public BigDecimal getConsigneeFarId() {
+        return consigneeFarId;
+    }
+
+    public void setConsigneeFarId(BigDecimal consigneeFarId) {
+        this.consigneeFarId = consigneeFarId;
+    }
+
+    public BigDecimal getAreaId() {
+        return areaId;
+    }
+
+    public void setAreaId(BigDecimal areaId) {
+        this.areaId = areaId;
+    }
+
+    public String getConsigneeSsoId() {
+        return consigneeSsoId;
+    }
+
+    public void setConsigneeSsoId(String consigneeSsoId) {
+        this.consigneeSsoId = consigneeSsoId == null ? null : consigneeSsoId.trim();
+    }
+
+    public String getConsigneeSsoCode() {
+        return consigneeSsoCode;
+    }
+
+    public void setConsigneeSsoCode(String consigneeSsoCode) {
+        this.consigneeSsoCode = consigneeSsoCode == null ? null : consigneeSsoCode.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -326,6 +368,10 @@ public class RmsConsignee implements IBasePO<BigDecimal> {
         sb.append(", deleted=").append(deleted);
         sb.append(", easConsigneeId=").append(easConsigneeId);
         sb.append(", consigneeCode=").append(consigneeCode);
+        sb.append(", consigneeFarId=").append(consigneeFarId);
+        sb.append(", areaId=").append(areaId);
+        sb.append(", consigneeSsoId=").append(consigneeSsoId);
+        sb.append(", consigneeSsoCode=").append(consigneeSsoCode);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 47 - 2
src/main/java/com/steerinfo/dil/model/RmsPier.java

@@ -21,6 +21,18 @@ public class RmsPier implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="港口ID",required=false)
     private BigDecimal portId;
 
+    /**
+     * 码头经度(PIER_LONGITUDE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="码头经度",required=false)
+    private String pierLongitude;
+
+    /**
+     * 码头纬度(PIER_LATITUDE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="码头纬度",required=false)
+    private String pierLatitude;
+
     /**
      * 码头名称(PIER_NAME,VARCHAR,20)
      */
@@ -58,11 +70,17 @@ public class RmsPier implements IBasePO<BigDecimal> {
     private String insertUpdateRemark;
 
     /**
-     * 逻辑删除(DELETED,DECIMAL,0)
+     * 逻辑删除:0未删除;1已删除(DELETED,DECIMAL,0)
      */
-    @ApiModelProperty(value="逻辑删除",required=false)
+    @ApiModelProperty(value="逻辑删除:0未删除;1已删除",required=false)
     private BigDecimal deleted;
 
+    /**
+     * 码头全称(PIER_ALL_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="码头全称",required=false)
+    private String pierAllName;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -91,6 +109,22 @@ public class RmsPier implements IBasePO<BigDecimal> {
         this.portId = portId;
     }
 
+    public String getPierLongitude() {
+        return pierLongitude;
+    }
+
+    public void setPierLongitude(String pierLongitude) {
+        this.pierLongitude = pierLongitude == null ? null : pierLongitude.trim();
+    }
+
+    public String getPierLatitude() {
+        return pierLatitude;
+    }
+
+    public void setPierLatitude(String pierLatitude) {
+        this.pierLatitude = pierLatitude == null ? null : pierLatitude.trim();
+    }
+
     public String getPierName() {
         return pierName;
     }
@@ -147,6 +181,14 @@ public class RmsPier implements IBasePO<BigDecimal> {
         this.deleted = deleted;
     }
 
+    public String getPierAllName() {
+        return pierAllName;
+    }
+
+    public void setPierAllName(String pierAllName) {
+        this.pierAllName = pierAllName == null ? null : pierAllName.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -155,6 +197,8 @@ public class RmsPier implements IBasePO<BigDecimal> {
         sb.append("Hash = ").append(hashCode());
         sb.append(", pierId=").append(pierId);
         sb.append(", portId=").append(portId);
+        sb.append(", pierLongitude=").append(pierLongitude);
+        sb.append(", pierLatitude=").append(pierLatitude);
         sb.append(", pierName=").append(pierName);
         sb.append(", insertUsername=").append(insertUsername);
         sb.append(", insertTime=").append(insertTime);
@@ -162,6 +206,7 @@ public class RmsPier implements IBasePO<BigDecimal> {
         sb.append(", updateTime=").append(updateTime);
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", deleted=").append(deleted);
+        sb.append(", pierAllName=").append(pierAllName);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 47 - 2
src/main/java/com/steerinfo/dil/model/RmsPort.java

@@ -21,6 +21,18 @@ public class RmsPort implements IBasePO<BigDecimal> {
     @ApiModelProperty(value="港口类型ID",required=false)
     private BigDecimal portTypeId;
 
+    /**
+     * 港口经度(PORT_LONGITUDE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="港口经度",required=false)
+    private String portLongitude;
+
+    /**
+     * 港口纬度(PORT_LATITUDE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="港口纬度",required=false)
+    private String portLatitude;
+
     /**
      * 港口名称(PORT_NAME,VARCHAR,20)
      */
@@ -58,11 +70,17 @@ public class RmsPort implements IBasePO<BigDecimal> {
     private String insertUpdateRemark;
 
     /**
-     * 逻辑删除(DELETED,DECIMAL,0)
+     * 逻辑删除:0未删除;1:已删除(DELETED,DECIMAL,0)
      */
-    @ApiModelProperty(value="逻辑删除",required=false)
+    @ApiModelProperty(value="逻辑删除:0未删除;1:已删除",required=false)
     private BigDecimal deleted;
 
+    /**
+     * 港口全称(PORT_ALL_NAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="港口全称",required=false)
+    private String portAllName;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -91,6 +109,22 @@ public class RmsPort implements IBasePO<BigDecimal> {
         this.portTypeId = portTypeId;
     }
 
+    public String getPortLongitude() {
+        return portLongitude;
+    }
+
+    public void setPortLongitude(String portLongitude) {
+        this.portLongitude = portLongitude == null ? null : portLongitude.trim();
+    }
+
+    public String getPortLatitude() {
+        return portLatitude;
+    }
+
+    public void setPortLatitude(String portLatitude) {
+        this.portLatitude = portLatitude == null ? null : portLatitude.trim();
+    }
+
     public String getPortName() {
         return portName;
     }
@@ -147,6 +181,14 @@ public class RmsPort implements IBasePO<BigDecimal> {
         this.deleted = deleted;
     }
 
+    public String getPortAllName() {
+        return portAllName;
+    }
+
+    public void setPortAllName(String portAllName) {
+        this.portAllName = portAllName == null ? null : portAllName.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -155,6 +197,8 @@ public class RmsPort implements IBasePO<BigDecimal> {
         sb.append("Hash = ").append(hashCode());
         sb.append(", portId=").append(portId);
         sb.append(", portTypeId=").append(portTypeId);
+        sb.append(", portLongitude=").append(portLongitude);
+        sb.append(", portLatitude=").append(portLatitude);
         sb.append(", portName=").append(portName);
         sb.append(", insertUsername=").append(insertUsername);
         sb.append(", insertTime=").append(insertTime);
@@ -162,6 +206,7 @@ public class RmsPort implements IBasePO<BigDecimal> {
         sb.append(", updateTime=").append(updateTime);
         sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
         sb.append(", deleted=").append(deleted);
+        sb.append(", portAllName=").append(portAllName);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

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

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

+ 30 - 5
src/main/java/com/steerinfo/dil/service/impl/RmsConsigneeServiceImpl.java

@@ -44,6 +44,31 @@ public class RmsConsigneeServiceImpl implements IRmsConsigneeService {
         return rmsConsigneeMapper.getConsigneeList(mapValue);
     }
 
+    /*
+     * 收货客户注册
+     * */
+    @Override
+    public int signConsignee(Map<String, Object> mapVal) {
+        // 得到账号
+        String consigneeSsoCode = (String) mapVal.get("consigneeSsoCode");
+        // 得到用户id
+        String userId = (String) mapVal.get("userId");
+        // 得到收获客户名称
+        String companyName = (String) mapVal.get("companyName");
+        int i = 0;
+        BigDecimal consigneeId = rmsConsigneeMapper.getConsigneeByCompanyName(companyName);
+        RmsConsignee rmsConsignee = new RmsConsignee();
+        if (consigneeId == null) {
+            i = -1;
+        } else {
+            rmsConsignee.setConsigneeId(consigneeId);
+            rmsConsignee.setConsigneeSsoId(userId);
+            rmsConsignee.setConsigneeSsoCode(consigneeSsoCode);
+            i += rmsConsigneeMapper.updateByPrimaryKeySelective(rmsConsignee);
+        }
+        return i;
+    }
+
     /*
      * 增加收货客户信息
      * */
@@ -59,9 +84,9 @@ public class RmsConsigneeServiceImpl implements IRmsConsigneeService {
         //收货客户父节点
         BigDecimal consigneeFarId=DataChange.dataToBigDecimal(mapVal.get("consigneeFarId"));
         int i=0;
-        int rmsConsignees=rmsConsigneeMapper.getConsigneeByCompanyName(companyName);
+        BigDecimal rmsConsignees=rmsConsigneeMapper.getConsigneeByCompanyName(companyName);
         RmsConsignee rmsConsignee=new RmsConsignee();
-        if(rmsConsignees==0){
+        if(rmsConsignees==null){
             BigDecimal consigneeId = rmsConsigneeMapper.selectConsigneeId();
             rmsConsignee.setConsigneeId(consigneeId);
             rmsConsignee.setConsigneeCompanyName(companyName);
@@ -89,10 +114,10 @@ public class RmsConsigneeServiceImpl implements IRmsConsigneeService {
             rmsConsignee.setInsertUsername("admin");
             i+=rmsConsigneeMapper.insertSelective(rmsConsignee);
         }
-      else{
-          i=-1;
+        else{
+            i=-1;
         }
-            return  i;
+        return  i;
     }
 
     /*

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

@@ -57,7 +57,7 @@ public class RmsPierServiceImpl implements IRmsPierService {
         RmsPier rmsPier = rmsPierMapper.selectByPrimaryKey(pierId);
         rmsPier.setUpdateTime(new Date());
         rmsPier.setUpdateUsername("admin");
-        rmsPier.setDeleted(new BigDecimal(1));
+//        rmsPier.setDeleted(new BigDecimal(1));
         return rmsPierMapper.updateByPrimaryKeySelective(rmsPier);
     }
 

+ 307 - 231
src/main/resources/com/steerinfo/dil/mapper/RmsConsigneeMapper.xml

@@ -22,21 +22,24 @@
     <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" />
+    <result column="AREA_ID" jdbcType="DECIMAL" property="areaId" />
+    <result column="CONSIGNEE_SSO_ID" jdbcType="VARCHAR" property="consigneeSsoId" />
+    <result column="CONSIGNEE_SSO_CODE" jdbcType="VARCHAR" property="consigneeSsoCode" />
   </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_FAR_ID
+    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_FAR_ID, AREA_ID, CONSIGNEE_SSO_ID, CONSIGNEE_SSO_CODE
   </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.CONSIGNEE_FAR_ID
+    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.CONSIGNEE_FAR_ID, t.AREA_ID, t.CONSIGNEE_SSO_ID, t.CONSIGNEE_SSO_CODE
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM RMS_CONSIGNEE
@@ -45,7 +48,7 @@
     SELECT <include refid="columns_alias" /> FROM RMS_CONSIGNEE t
   </sql>
   <sql id="where">
-    <where> 
+    <where>
       <if test="consigneeId != null">
         and CONSIGNEE_ID = #{consigneeId}
       </if>
@@ -106,10 +109,19 @@
       <if test="consigneeFarId != null">
         and CONSIGNEE_FAR_ID = #{consigneeFarId}
       </if>
+      <if test="areaId != null">
+        and AREA_ID = #{areaId}
+      </if>
+      <if test="consigneeSsoId != null and consigneeSsoId != ''">
+        and CONSIGNEE_SSO_ID = #{consigneeSsoId}
+      </if>
+      <if test="consigneeSsoCode != null and consigneeSsoCode != ''">
+        and CONSIGNEE_SSO_CODE = #{consigneeSsoCode}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
-    <where> 
+    <where>
       <if test="consigneeId != null">
         and CONSIGNEE_ID = #{consigneeId}
       </if>
@@ -170,92 +182,112 @@
       <if test="consigneeFarId != null">
         and CONSIGNEE_FAR_ID = #{consigneeFarId}
       </if>
+      <if test="areaId != null">
+        and AREA_ID = #{areaId}
+      </if>
+      <if test="consigneeSsoId != null and consigneeSsoId != ''">
+        and CONSIGNEE_SSO_ID LIKE '%${consigneeSsoId}%'
+      </if>
+      <if test="consigneeSsoCode != null and consigneeSsoCode != ''">
+        and CONSIGNEE_SSO_CODE LIKE '%${consigneeSsoCode}%'
+      </if>
     </where>
   </sql>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+  <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
     delete from RMS_CONSIGNEE
     where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
   </delete>
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from RMS_CONSIGNEE
-    where 1!=1 
-      <if test="consigneeCompanyName != null and consigneeCompanyName != ''">
-        or CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName}
-      </if>
-      <if test="consigneeAbbreviation != null and consigneeAbbreviation != ''">
-        or CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation}
-      </if>
-      <if test="consigneeRegisteredAddress != null and consigneeRegisteredAddress != ''">
-        or CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress}
-      </if>
-      <if test="consigneeReceiveAddress != null and consigneeReceiveAddress != ''">
-        or CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress}
-      </if>
-      <if test="consigneeRegistrationTime != null">
-        or TO_CHAR(CONSIGNEE_REGISTRATION_TIME,'yyyy-MM-dd') = '#{consigneeRegistrationTime}'
-      </if>
-      <if test="consigneeContactName != null and consigneeContactName != ''">
-        or CONSIGNEE_CONTACT_NAME = #{consigneeContactName}
-      </if>
-      <if test="consigneeWarrantyAmount != null">
-        or CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount}
-      </if>
-      <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
-        or CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight}
-      </if>
-      <if test="consigneeContactTel != null and consigneeContactTel != ''">
-        or CONSIGNEE_CONTACT_TEL = #{consigneeContactTel}
-      </if>
-      <if test="consigneeExchangeDelivery != null">
-        or CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
-      </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="deleted != null">
-        or DELETED = #{deleted}
-      </if>
-      <if test="easConsigneeId != null and easConsigneeId != ''">
-        or EAS_CONSIGNEE_ID = #{easConsigneeId}
-      </if>
-      <if test="consigneeCode != null and consigneeCode != ''">
-        or CONSIGNEE_CODE = #{consigneeCode}
-      </if>
-      <if test="consigneeFarId != null">
-        or CONSIGNEE_FAR_ID = #{consigneeFarId}
-      </if>
+    where 1!=1
+    <if test="consigneeCompanyName != null and consigneeCompanyName != ''">
+      or CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName}
+    </if>
+    <if test="consigneeAbbreviation != null and consigneeAbbreviation != ''">
+      or CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation}
+    </if>
+    <if test="consigneeRegisteredAddress != null and consigneeRegisteredAddress != ''">
+      or CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress}
+    </if>
+    <if test="consigneeReceiveAddress != null and consigneeReceiveAddress != ''">
+      or CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress}
+    </if>
+    <if test="consigneeRegistrationTime != null">
+      or TO_CHAR(CONSIGNEE_REGISTRATION_TIME,'yyyy-MM-dd') = '#{consigneeRegistrationTime}'
+    </if>
+    <if test="consigneeContactName != null and consigneeContactName != ''">
+      or CONSIGNEE_CONTACT_NAME = #{consigneeContactName}
+    </if>
+    <if test="consigneeWarrantyAmount != null">
+      or CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount}
+    </if>
+    <if test="consigneeWarrantyWeight != null and consigneeWarrantyWeight != ''">
+      or CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight}
+    </if>
+    <if test="consigneeContactTel != null and consigneeContactTel != ''">
+      or CONSIGNEE_CONTACT_TEL = #{consigneeContactTel}
+    </if>
+    <if test="consigneeExchangeDelivery != null">
+      or CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery}
+    </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="deleted != null">
+      or DELETED = #{deleted}
+    </if>
+    <if test="easConsigneeId != null and easConsigneeId != ''">
+      or EAS_CONSIGNEE_ID = #{easConsigneeId}
+    </if>
+    <if test="consigneeCode != null and consigneeCode != ''">
+      or CONSIGNEE_CODE = #{consigneeCode}
+    </if>
+    <if test="consigneeFarId != null">
+      or CONSIGNEE_FAR_ID = #{consigneeFarId}
+    </if>
+    <if test="areaId != null">
+      or AREA_ID = #{areaId}
+    </if>
+    <if test="consigneeSsoId != null and consigneeSsoId != ''">
+      or CONSIGNEE_SSO_ID = #{consigneeSsoId}
+    </if>
+    <if test="consigneeSsoCode != null and consigneeSsoCode != ''">
+      or CONSIGNEE_SSO_CODE = #{consigneeSsoCode}
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.RmsConsignee">
-    insert into RMS_CONSIGNEE (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_FAR_ID)
-    values (#{consigneeId,jdbcType=DECIMAL}, #{consigneeCompanyName,jdbcType=VARCHAR}, 
-      #{consigneeAbbreviation,jdbcType=VARCHAR}, #{consigneeRegisteredAddress,jdbcType=VARCHAR}, 
-      #{consigneeReceiveAddress,jdbcType=VARCHAR}, #{consigneeRegistrationTime,jdbcType=TIMESTAMP}, 
-      #{consigneeContactName,jdbcType=VARCHAR}, #{consigneeWarrantyAmount,jdbcType=DECIMAL}, 
-      #{consigneeWarrantyWeight,jdbcType=VARCHAR}, #{consigneeContactTel,jdbcType=VARCHAR}, 
-      #{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}, #{consigneeFarId,jdbcType=DECIMAL})
+    insert into RMS_CONSIGNEE (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_FAR_ID, AREA_ID,
+                               CONSIGNEE_SSO_ID, CONSIGNEE_SSO_CODE)
+    values (#{consigneeId,jdbcType=DECIMAL}, #{consigneeCompanyName,jdbcType=VARCHAR},
+            #{consigneeAbbreviation,jdbcType=VARCHAR}, #{consigneeRegisteredAddress,jdbcType=VARCHAR},
+            #{consigneeReceiveAddress,jdbcType=VARCHAR}, #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
+            #{consigneeContactName,jdbcType=VARCHAR}, #{consigneeWarrantyAmount,jdbcType=DECIMAL},
+            #{consigneeWarrantyWeight,jdbcType=VARCHAR}, #{consigneeContactTel,jdbcType=VARCHAR},
+            #{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}, #{consigneeFarId,jdbcType=DECIMAL}, #{areaId,jdbcType=DECIMAL},
+            #{consigneeSsoId,jdbcType=VARCHAR}, #{consigneeSsoCode,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
     insert into RMS_CONSIGNEE
@@ -320,6 +352,15 @@
       <if test="consigneeFarId != null">
         CONSIGNEE_FAR_ID,
       </if>
+      <if test="areaId != null">
+        AREA_ID,
+      </if>
+      <if test="consigneeSsoId != null">
+        CONSIGNEE_SSO_ID,
+      </if>
+      <if test="consigneeSsoCode != null">
+        CONSIGNEE_SSO_CODE,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="consigneeId != null">
@@ -382,29 +423,41 @@
       <if test="consigneeFarId != null">
         #{consigneeFarId,jdbcType=DECIMAL},
       </if>
+      <if test="areaId != null">
+        #{areaId,jdbcType=DECIMAL},
+      </if>
+      <if test="consigneeSsoId != null">
+        #{consigneeSsoId,jdbcType=VARCHAR},
+      </if>
+      <if test="consigneeSsoCode != null">
+        #{consigneeSsoCode,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsConsignee">
     update RMS_CONSIGNEE
     set CONSIGNEE_COMPANY_NAME = #{consigneeCompanyName,jdbcType=VARCHAR},
-      CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation,jdbcType=VARCHAR},
-      CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress,jdbcType=VARCHAR},
-      CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress,jdbcType=VARCHAR},
-      CONSIGNEE_REGISTRATION_TIME = #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
-      CONSIGNEE_CONTACT_NAME = #{consigneeContactName,jdbcType=VARCHAR},
-      CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount,jdbcType=DECIMAL},
-      CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight,jdbcType=VARCHAR},
-      CONSIGNEE_CONTACT_TEL = #{consigneeContactTel,jdbcType=VARCHAR},
-      CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery,jdbcType=DECIMAL},
-      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},
-      DELETED = #{deleted,jdbcType=DECIMAL},
-      EAS_CONSIGNEE_ID = #{easConsigneeId,jdbcType=VARCHAR},
-      CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR},
-      CONSIGNEE_FAR_ID = #{consigneeFarId,jdbcType=DECIMAL}
+        CONSIGNEE_ABBREVIATION = #{consigneeAbbreviation,jdbcType=VARCHAR},
+        CONSIGNEE_REGISTERED_ADDRESS = #{consigneeRegisteredAddress,jdbcType=VARCHAR},
+        CONSIGNEE_RECEIVE_ADDRESS = #{consigneeReceiveAddress,jdbcType=VARCHAR},
+        CONSIGNEE_REGISTRATION_TIME = #{consigneeRegistrationTime,jdbcType=TIMESTAMP},
+        CONSIGNEE_CONTACT_NAME = #{consigneeContactName,jdbcType=VARCHAR},
+        CONSIGNEE_WARRANTY_AMOUNT = #{consigneeWarrantyAmount,jdbcType=DECIMAL},
+        CONSIGNEE_WARRANTY_WEIGHT = #{consigneeWarrantyWeight,jdbcType=VARCHAR},
+        CONSIGNEE_CONTACT_TEL = #{consigneeContactTel,jdbcType=VARCHAR},
+        CONSIGNEE_EXCHANGE_DELIVERY = #{consigneeExchangeDelivery,jdbcType=DECIMAL},
+        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},
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        EAS_CONSIGNEE_ID = #{easConsigneeId,jdbcType=VARCHAR},
+        CONSIGNEE_CODE = #{consigneeCode,jdbcType=VARCHAR},
+        CONSIGNEE_FAR_ID = #{consigneeFarId,jdbcType=DECIMAL},
+        AREA_ID = #{areaId,jdbcType=DECIMAL},
+        CONSIGNEE_SSO_ID = #{consigneeSsoId,jdbcType=VARCHAR},
+        CONSIGNEE_SSO_CODE = #{consigneeSsoCode,jdbcType=VARCHAR}
     where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsConsignee">
@@ -467,10 +520,19 @@
       <if test="consigneeFarId != null">
         CONSIGNEE_FAR_ID = #{consigneeFarId,jdbcType=DECIMAL},
       </if>
+      <if test="areaId != null">
+        AREA_ID = #{areaId,jdbcType=DECIMAL},
+      </if>
+      <if test="consigneeSsoId != null">
+        CONSIGNEE_SSO_ID = #{consigneeSsoId,jdbcType=VARCHAR},
+      </if>
+      <if test="consigneeSsoCode != null">
+        CONSIGNEE_SSO_CODE = #{consigneeSsoCode,jdbcType=VARCHAR},
+      </if>
     </set>
     where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
   </update>
-  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+  <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
     <include refid="select" />
     where CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
   </select>
@@ -483,124 +545,138 @@
     <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
-    insert into RMS_CONSIGNEE 
-      (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_FAR_ID)
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.consigneeId,jdbcType=DECIMAL}, 
-      #{item.consigneeCompanyName,jdbcType=VARCHAR}, #{item.consigneeAbbreviation,jdbcType=VARCHAR}, 
-      #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}, #{item.consigneeReceiveAddress,jdbcType=VARCHAR}, 
-      #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}, #{item.consigneeContactName,jdbcType=VARCHAR}, 
-      #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}, #{item.consigneeWarrantyWeight,jdbcType=VARCHAR}, 
-      #{item.consigneeContactTel,jdbcType=VARCHAR}, #{item.consigneeExchangeDelivery,jdbcType=DECIMAL}, 
-      #{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}, 
-      #{item.consigneeFarId,jdbcType=DECIMAL} from dual  
-   </foreach> )
+    insert into RMS_CONSIGNEE
+    (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_FAR_ID, AREA_ID, CONSIGNEE_SSO_ID,
+    CONSIGNEE_SSO_CODE)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.consigneeId,jdbcType=DECIMAL},
+    #{item.consigneeCompanyName,jdbcType=VARCHAR}, #{item.consigneeAbbreviation,jdbcType=VARCHAR},
+    #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}, #{item.consigneeReceiveAddress,jdbcType=VARCHAR},
+    #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}, #{item.consigneeContactName,jdbcType=VARCHAR},
+    #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}, #{item.consigneeWarrantyWeight,jdbcType=VARCHAR},
+    #{item.consigneeContactTel,jdbcType=VARCHAR}, #{item.consigneeExchangeDelivery,jdbcType=DECIMAL},
+    #{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},
+    #{item.consigneeFarId,jdbcType=DECIMAL}, #{item.areaId,jdbcType=DECIMAL}, #{item.consigneeSsoId,jdbcType=VARCHAR},
+    #{item.consigneeSsoCode,jdbcType=VARCHAR} from dual
+  </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
-     update RMS_CONSIGNEE
-     set
-       CONSIGNEE_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeId,jdbcType=DECIMAL}
-       </foreach>
-       ,CONSIGNEE_COMPANY_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeCompanyName,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_ABBREVIATION=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeAbbreviation,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_REGISTERED_ADDRESS=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_RECEIVE_ADDRESS=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeReceiveAddress,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_REGISTRATION_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,CONSIGNEE_CONTACT_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactName,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_WARRANTY_AMOUNT=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}
-       </foreach>
-       ,CONSIGNEE_WARRANTY_WEIGHT=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyWeight,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_CONTACT_TEL=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactTel,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_EXCHANGE_DELIVERY=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeExchangeDelivery,jdbcType=DECIMAL}
-       </foreach>
-       ,INSERT_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,UPDATE_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,UPDATE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,INSERT_UPDATE_REMARK=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
-       </foreach>
-       ,DELETED=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
-       </foreach>
-       ,EAS_CONSIGNEE_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
-          when #{item.consigneeId,jdbcType=DECIMAL} then #{item.easConsigneeId,jdbcType=VARCHAR}
-       </foreach>
-       ,CONSIGNEE_CODE=
-       <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}
-     </foreach> 
+    update RMS_CONSIGNEE
+    set
+    CONSIGNEE_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeId,jdbcType=DECIMAL}
+    </foreach>
+    ,CONSIGNEE_COMPANY_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeCompanyName,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_ABBREVIATION=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeAbbreviation,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_REGISTERED_ADDRESS=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegisteredAddress,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_RECEIVE_ADDRESS=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeReceiveAddress,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_REGISTRATION_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeRegistrationTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,CONSIGNEE_CONTACT_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactName,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_WARRANTY_AMOUNT=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyAmount,jdbcType=DECIMAL}
+    </foreach>
+    ,CONSIGNEE_WARRANTY_WEIGHT=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeWarrantyWeight,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_CONTACT_TEL=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeContactTel,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_EXCHANGE_DELIVERY=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeExchangeDelivery,jdbcType=DECIMAL}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETED=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    ,EAS_CONSIGNEE_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.easConsigneeId,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_CODE=
+    <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>
+    ,AREA_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.areaId,jdbcType=DECIMAL}
+    </foreach>
+    ,CONSIGNEE_SSO_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeSsoId,jdbcType=VARCHAR}
+    </foreach>
+    ,CONSIGNEE_SSO_CODE=
+    <foreach close="end" collection="list" index="index" item="item" open="case CONSIGNEE_ID" separator=" ">
+      when #{item.consigneeId,jdbcType=DECIMAL} then #{item.consigneeSsoCode,jdbcType=VARCHAR}
+    </foreach>
+    where CONSIGNEE_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.consigneeId,jdbcType=DECIMAL}
+    </foreach>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from RMS_CONSIGNEE
-    where CONSIGNEE_ID in 
+    where CONSIGNEE_ID in
     <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
@@ -687,7 +763,7 @@
 
 
   <select id="getConsigneeById" resultType="java.util.LinkedHashMap">
-     SELECT
+    SELECT
       RC.CONSIGNEE_ID AS "consigneeId",
       RC.CONSIGNEE_COMPANY_NAME AS "companyName",
       RC.CONSIGNEE_ABBREVIATION AS "consigneeAbbreviation",
@@ -696,27 +772,27 @@
       RC.CONSIGNEE_REGISTRATION_TIME AS "consigneeRegistrationTime",
       RC.CONSIGNEE_CONTACT_NAME AS "consigneeContactName",
       RC.CONSIGNEE_CONTACT_TEL AS "consigneeContactTel"
-   FROM RMS_CONSIGNEE RC
-   WHERE RC.CONSIGNEE_ID = #{id}
+    FROM RMS_CONSIGNEE RC
+    WHERE RC.CONSIGNEE_ID = #{id}
   </select>
 
   <select id="selectConsigneeId" resultType="DECIMAL" >
     select max(RC.CONSIGNEE_ID+1) from RMS_CONSIGNEE RC
   </select>
 
-  <select id="getConsigneeByCompanyName" parameterType="java.lang.String" resultType="int">
-    select count(*)
+  <select id="getConsigneeByCompanyName" parameterType="java.lang.String" resultType="DECIMAL">
+    select RC.CONSIGNEE_ID AS "consigneeId"
     from RMS_CONSIGNEE RC
     where RC.CONSIGNEE_COMPANY_NAME=#{companyName}
-    and RC.DELETED!=1
+      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"
+      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}
+      and RC.CONSIGNEE_COMPANY_NAME like #{state}
   </select>
 </mapper>

+ 201 - 124
src/main/resources/com/steerinfo/dil/mapper/RmsPierMapper.xml

@@ -4,6 +4,8 @@
   <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsPier">
     <id column="PIER_ID" jdbcType="DECIMAL" property="pierId" />
     <result column="PORT_ID" jdbcType="DECIMAL" property="portId" />
+    <result column="PIER_LONGITUDE" jdbcType="VARCHAR" property="pierLongitude" />
+    <result column="PIER_LATITUDE" jdbcType="VARCHAR" property="pierLatitude" />
     <result column="PIER_NAME" jdbcType="VARCHAR" property="pierName" />
     <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
     <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
@@ -11,14 +13,16 @@
     <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
     <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+    <result column="PIER_ALL_NAME" jdbcType="VARCHAR" property="pierAllName" />
   </resultMap>
   <sql id="columns">
-    PIER_ID, PORT_ID, PIER_NAME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
-    INSERT_UPDATE_REMARK, DELETED
+    PIER_ID, PORT_ID, PIER_LONGITUDE, PIER_LATITUDE, PIER_NAME, INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, PIER_ALL_NAME
   </sql>
   <sql id="columns_alias">
-    t.PIER_ID, t.PORT_ID, t.PIER_NAME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, 
-    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED
+    t.PIER_ID, t.PORT_ID, t.PIER_LONGITUDE, t.PIER_LATITUDE, t.PIER_NAME, t.INSERT_USERNAME,
+    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
+    t.PIER_ALL_NAME
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM RMS_PIER
@@ -27,13 +31,19 @@
     SELECT <include refid="columns_alias" /> FROM RMS_PIER t
   </sql>
   <sql id="where">
-    <where> 
+    <where>
       <if test="pierId != null">
         and PIER_ID = #{pierId}
       </if>
       <if test="portId != null">
         and PORT_ID = #{portId}
       </if>
+      <if test="pierLongitude != null and pierLongitude != ''">
+        and PIER_LONGITUDE = #{pierLongitude}
+      </if>
+      <if test="pierLatitude != null and pierLatitude != ''">
+        and PIER_LATITUDE = #{pierLatitude}
+      </if>
       <if test="pierName != null and pierName != ''">
         and PIER_NAME = #{pierName}
       </if>
@@ -55,16 +65,25 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="pierAllName != null and pierAllName != ''">
+        and PIER_ALL_NAME = #{pierAllName}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
-    <where> 
+    <where>
       <if test="pierId != null">
         and PIER_ID = #{pierId}
       </if>
       <if test="portId != null">
         and PORT_ID = #{portId}
       </if>
+      <if test="pierLongitude != null and pierLongitude != ''">
+        and PIER_LONGITUDE LIKE '%${pierLongitude}%'
+      </if>
+      <if test="pierLatitude != null and pierLatitude != ''">
+        and PIER_LATITUDE LIKE '%${pierLatitude}%'
+      </if>
       <if test="pierName != null and pierName != ''">
         and PIER_NAME LIKE '%${pierName}%'
       </if>
@@ -86,6 +105,9 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="pierAllName != null and pierAllName != ''">
+        and PIER_ALL_NAME LIKE '%${pierAllName}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
@@ -94,41 +116,52 @@
   </delete>
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from RMS_PIER
-    where 1!=1 
-      <if test="portId != null">
-        or PORT_ID = #{portId}
-      </if>
-      <if test="pierName != null and pierName != ''">
-        or PIER_NAME = #{pierName}
-      </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="deleted != null">
-        or DELETED = #{deleted}
-      </if>
+    where 1!=1
+    <if test="portId != null">
+      or PORT_ID = #{portId}
+    </if>
+    <if test="pierLongitude != null and pierLongitude != ''">
+      or PIER_LONGITUDE = #{pierLongitude}
+    </if>
+    <if test="pierLatitude != null and pierLatitude != ''">
+      or PIER_LATITUDE = #{pierLatitude}
+    </if>
+    <if test="pierName != null and pierName != ''">
+      or PIER_NAME = #{pierName}
+    </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="deleted != null">
+      or DELETED = #{deleted}
+    </if>
+    <if test="pierAllName != null and pierAllName != ''">
+      or PIER_ALL_NAME = #{pierAllName}
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.RmsPier">
-    insert into RMS_PIER (PIER_ID, PORT_ID, PIER_NAME, 
-      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED
-      )
-    values (#{pierId,jdbcType=DECIMAL}, #{portId,jdbcType=DECIMAL}, #{pierName,jdbcType=VARCHAR}, 
-      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}
-      )
+    insert into RMS_PIER (PIER_ID, PORT_ID, PIER_LONGITUDE,
+                          PIER_LATITUDE, PIER_NAME, INSERT_USERNAME,
+                          INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
+                          INSERT_UPDATE_REMARK, DELETED, PIER_ALL_NAME
+    )
+    values (#{pierId,jdbcType=DECIMAL}, #{portId,jdbcType=DECIMAL}, #{pierLongitude,jdbcType=VARCHAR},
+            #{pierLatitude,jdbcType=VARCHAR}, #{pierName,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR},
+            #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+            #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{pierAllName,jdbcType=VARCHAR}
+           )
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsPier">
     insert into RMS_PIER
@@ -139,6 +172,12 @@
       <if test="portId != null">
         PORT_ID,
       </if>
+      <if test="pierLongitude != null">
+        PIER_LONGITUDE,
+      </if>
+      <if test="pierLatitude != null">
+        PIER_LATITUDE,
+      </if>
       <if test="pierName != null">
         PIER_NAME,
       </if>
@@ -160,6 +199,9 @@
       <if test="deleted != null">
         DELETED,
       </if>
+      <if test="pierAllName != null">
+        PIER_ALL_NAME,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="pierId != null">
@@ -168,6 +210,12 @@
       <if test="portId != null">
         #{portId,jdbcType=DECIMAL},
       </if>
+      <if test="pierLongitude != null">
+        #{pierLongitude,jdbcType=VARCHAR},
+      </if>
+      <if test="pierLatitude != null">
+        #{pierLatitude,jdbcType=VARCHAR},
+      </if>
       <if test="pierName != null">
         #{pierName,jdbcType=VARCHAR},
       </if>
@@ -189,18 +237,24 @@
       <if test="deleted != null">
         #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="pierAllName != null">
+        #{pierAllName,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsPier">
     update RMS_PIER
     set PORT_ID = #{portId,jdbcType=DECIMAL},
-      PIER_NAME = #{pierName,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},
-      DELETED = #{deleted,jdbcType=DECIMAL}
+        PIER_LONGITUDE = #{pierLongitude,jdbcType=VARCHAR},
+        PIER_LATITUDE = #{pierLatitude,jdbcType=VARCHAR},
+        PIER_NAME = #{pierName,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},
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        PIER_ALL_NAME = #{pierAllName,jdbcType=VARCHAR}
     where PIER_ID = #{pierId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsPier">
@@ -209,6 +263,12 @@
       <if test="portId != null">
         PORT_ID = #{portId,jdbcType=DECIMAL},
       </if>
+      <if test="pierLongitude != null">
+        PIER_LONGITUDE = #{pierLongitude,jdbcType=VARCHAR},
+      </if>
+      <if test="pierLatitude != null">
+        PIER_LATITUDE = #{pierLatitude,jdbcType=VARCHAR},
+      </if>
       <if test="pierName != null">
         PIER_NAME = #{pierName,jdbcType=VARCHAR},
       </if>
@@ -230,6 +290,9 @@
       <if test="deleted != null">
         DELETED = #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="pierAllName != null">
+        PIER_ALL_NAME = #{pierAllName,jdbcType=VARCHAR},
+      </if>
     </set>
     where PIER_ID = #{pierId,jdbcType=DECIMAL}
   </update>
@@ -246,68 +309,82 @@
     <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
-    insert into RMS_PIER 
-      (PIER_ID, 
-      PORT_ID, PIER_NAME, INSERT_USERNAME, 
-      INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, 
-      DELETED)
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.pierId,jdbcType=DECIMAL}, 
-      #{item.portId,jdbcType=DECIMAL}, #{item.pierName,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR}, 
-      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
-      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, 
-      #{item.deleted,jdbcType=DECIMAL} from dual  
-   </foreach> )
+    insert into RMS_PIER
+    (PIER_ID,
+    PORT_ID, PIER_LONGITUDE, PIER_LATITUDE,
+    PIER_NAME, INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME,
+    INSERT_UPDATE_REMARK, DELETED,
+    PIER_ALL_NAME)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.pierId,jdbcType=DECIMAL},
+    #{item.portId,jdbcType=DECIMAL}, #{item.pierLongitude,jdbcType=VARCHAR}, #{item.pierLatitude,jdbcType=VARCHAR},
+    #{item.pierName,jdbcType=VARCHAR}, #{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.pierAllName,jdbcType=VARCHAR} from dual
+  </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
-     update RMS_PIER
-     set
-       PIER_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
-          when #{item.pierId,jdbcType=DECIMAL} then #{item.pierId,jdbcType=DECIMAL}
-       </foreach>
-       ,PORT_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
-          when #{item.pierId,jdbcType=DECIMAL} then #{item.portId,jdbcType=DECIMAL}
-       </foreach>
-       ,PIER_NAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
-          when #{item.pierId,jdbcType=DECIMAL} then #{item.pierName,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
-          when #{item.pierId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
-          when #{item.pierId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,UPDATE_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
-          when #{item.pierId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,UPDATE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
-          when #{item.pierId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,INSERT_UPDATE_REMARK=
-       <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
-          when #{item.pierId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
-       </foreach>
-       ,DELETED=
-       <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
-          when #{item.pierId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
-       </foreach>
-     where PIER_ID in 
-     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
-    #{item.pierId,jdbcType=DECIMAL}
-     </foreach> 
+    update RMS_PIER
+    set
+    PIER_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
+      when #{item.pierId,jdbcType=DECIMAL} then #{item.pierId,jdbcType=DECIMAL}
+    </foreach>
+    ,PORT_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
+      when #{item.pierId,jdbcType=DECIMAL} then #{item.portId,jdbcType=DECIMAL}
+    </foreach>
+    ,PIER_LONGITUDE=
+    <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
+      when #{item.pierId,jdbcType=DECIMAL} then #{item.pierLongitude,jdbcType=VARCHAR}
+    </foreach>
+    ,PIER_LATITUDE=
+    <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
+      when #{item.pierId,jdbcType=DECIMAL} then #{item.pierLatitude,jdbcType=VARCHAR}
+    </foreach>
+    ,PIER_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
+      when #{item.pierId,jdbcType=DECIMAL} then #{item.pierName,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
+      when #{item.pierId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
+      when #{item.pierId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
+      when #{item.pierId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
+      when #{item.pierId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
+      when #{item.pierId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETED=
+    <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
+      when #{item.pierId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    ,PIER_ALL_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case PIER_ID" separator=" ">
+      when #{item.pierId,jdbcType=DECIMAL} then #{item.pierAllName,jdbcType=VARCHAR}
+    </foreach>
+    where PIER_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.pierId,jdbcType=DECIMAL}
+    </foreach>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from RMS_PIER
-    where PIER_ID in 
+    where PIER_ID in
     <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
@@ -316,27 +393,27 @@
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <select id="getPier" resultType="java.util.LinkedHashMap">
     select * from (select
-                     rp.PIER_ID "pierId",
-                     rp.PIER_NAME "pierName",
-                     rpt.PORT_NAME "portName"
-                   from RMS_PIER rp
-                          left join RMS_PORT rpt
-                                    on rpt.PORT_ID=rp.PORT_ID
-                   where rp.DELETED=0)
-  <where>
-   <if test="pierName != null">
-    and "pierName" in
-    <foreach collection="pierName" item="item" open="(" separator="," close=")">
-      #{item}
-    </foreach>
-  </if>
-     <if test="portName != null">
-    and "portName" in
-    <foreach collection="portName" item="item" open="(" separator="," close=")">
-      #{item}
-    </foreach>
-  </if>
-  </where>
+    rp.PIER_ID "pierId",
+    rp.PIER_NAME "pierName",
+    rpt.PORT_NAME "portName"
+    from RMS_PIER rp
+    left join RMS_PORT rpt
+    on rpt.PORT_ID=rp.PORT_ID
+    where rp.DELETED=0)
+    <where>
+      <if test="pierName != null">
+        and "pierName" in
+        <foreach collection="pierName" item="item" open="(" separator="," close=")">
+          #{item}
+        </foreach>
+      </if>
+      <if test="portName != null">
+        and "portName" in
+        <foreach collection="portName" item="item" open="(" separator="," close=")">
+          #{item}
+        </foreach>
+      </if>
+    </where>
     <include refid="orderBy"></include>
   </select>
   <select id="getPortId" resultType="java.util.Map">

+ 142 - 66
src/main/resources/com/steerinfo/dil/mapper/RmsPortMapper.xml

@@ -4,6 +4,8 @@
   <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsPort">
     <id column="PORT_ID" jdbcType="DECIMAL" property="portId" />
     <result column="PORT_TYPE_ID" jdbcType="DECIMAL" property="portTypeId" />
+    <result column="PORT_LONGITUDE" jdbcType="VARCHAR" property="portLongitude" />
+    <result column="PORT_LATITUDE" jdbcType="VARCHAR" property="portLatitude" />
     <result column="PORT_NAME" jdbcType="VARCHAR" property="portName" />
     <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
     <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
@@ -11,20 +13,22 @@
     <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
     <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+    <result column="PORT_ALL_NAME" jdbcType="VARCHAR" property="portAllName" />
   </resultMap>
   <sql id="columns">
-    PORT_ID, PORT_TYPE_ID, PORT_NAME, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
-    UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED
+    PORT_ID, PORT_TYPE_ID, PORT_LONGITUDE, PORT_LATITUDE, PORT_NAME, INSERT_USERNAME, 
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, PORT_ALL_NAME
   </sql>
   <sql id="columns_alias">
-    t.PORT_ID, t.PORT_TYPE_ID, t.PORT_NAME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, 
-    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED
+    t.PORT_ID, t.PORT_TYPE_ID, t.PORT_LONGITUDE, t.PORT_LATITUDE, t.PORT_NAME, t.INSERT_USERNAME, 
+    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, 
+    t.PORT_ALL_NAME
   </sql>
   <sql id="select">
-    SELECT <include refid="columns"/> FROM RMS_PORT
+    SELECT <include refid="columns" /> FROM RMS_PORT
   </sql>
   <sql id="select_alias">
-    SELECT <include refid="columns_alias"/> FROM RMS_PORT t
+    SELECT <include refid="columns_alias" /> FROM RMS_PORT t
   </sql>
   <sql id="where">
     <where> 
@@ -34,6 +38,12 @@
       <if test="portTypeId != null">
         and PORT_TYPE_ID = #{portTypeId}
       </if>
+      <if test="portLongitude != null and portLongitude != ''">
+        and PORT_LONGITUDE = #{portLongitude}
+      </if>
+      <if test="portLatitude != null and portLatitude != ''">
+        and PORT_LATITUDE = #{portLatitude}
+      </if>
       <if test="portName != null and portName != ''">
         and PORT_NAME = #{portName}
       </if>
@@ -55,6 +65,9 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="portAllName != null and portAllName != ''">
+        and PORT_ALL_NAME = #{portAllName}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -65,6 +78,12 @@
       <if test="portTypeId != null">
         and PORT_TYPE_ID = #{portTypeId}
       </if>
+      <if test="portLongitude != null and portLongitude != ''">
+        and PORT_LONGITUDE LIKE '%${portLongitude}%'
+      </if>
+      <if test="portLatitude != null and portLatitude != ''">
+        and PORT_LATITUDE LIKE '%${portLatitude}%'
+      </if>
       <if test="portName != null and portName != ''">
         and PORT_NAME LIKE '%${portName}%'
       </if>
@@ -86,6 +105,9 @@
       <if test="deleted != null">
         and DELETED = #{deleted}
       </if>
+      <if test="portAllName != null and portAllName != ''">
+        and PORT_ALL_NAME LIKE '%${portAllName}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
@@ -98,6 +120,12 @@
       <if test="portTypeId != null">
         or PORT_TYPE_ID = #{portTypeId}
       </if>
+      <if test="portLongitude != null and portLongitude != ''">
+        or PORT_LONGITUDE = #{portLongitude}
+      </if>
+      <if test="portLatitude != null and portLatitude != ''">
+        or PORT_LATITUDE = #{portLatitude}
+      </if>
       <if test="portName != null and portName != ''">
         or PORT_NAME = #{portName}
       </if>
@@ -119,15 +147,20 @@
       <if test="deleted != null">
         or DELETED = #{deleted}
       </if>
+      <if test="portAllName != null and portAllName != ''">
+        or PORT_ALL_NAME = #{portAllName}
+      </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.dil.model.RmsPort">
-    insert into RMS_PORT (PORT_ID, PORT_TYPE_ID, PORT_NAME, 
-      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED
+    insert into RMS_PORT (PORT_ID, PORT_TYPE_ID, PORT_LONGITUDE, 
+      PORT_LATITUDE, PORT_NAME, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK, DELETED, PORT_ALL_NAME
       )
-    values (#{portId,jdbcType=DECIMAL}, #{portTypeId,jdbcType=DECIMAL}, #{portName,jdbcType=VARCHAR}, 
-      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}
+    values (#{portId,jdbcType=DECIMAL}, #{portTypeId,jdbcType=DECIMAL}, #{portLongitude,jdbcType=VARCHAR}, 
+      #{portLatitude,jdbcType=VARCHAR}, #{portName,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, 
+      #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
+      #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{portAllName,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsPort">
@@ -139,6 +172,12 @@
       <if test="portTypeId != null">
         PORT_TYPE_ID,
       </if>
+      <if test="portLongitude != null">
+        PORT_LONGITUDE,
+      </if>
+      <if test="portLatitude != null">
+        PORT_LATITUDE,
+      </if>
       <if test="portName != null">
         PORT_NAME,
       </if>
@@ -160,6 +199,9 @@
       <if test="deleted != null">
         DELETED,
       </if>
+      <if test="portAllName != null">
+        PORT_ALL_NAME,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="portId != null">
@@ -168,6 +210,12 @@
       <if test="portTypeId != null">
         #{portTypeId,jdbcType=DECIMAL},
       </if>
+      <if test="portLongitude != null">
+        #{portLongitude,jdbcType=VARCHAR},
+      </if>
+      <if test="portLatitude != null">
+        #{portLatitude,jdbcType=VARCHAR},
+      </if>
       <if test="portName != null">
         #{portName,jdbcType=VARCHAR},
       </if>
@@ -189,18 +237,24 @@
       <if test="deleted != null">
         #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="portAllName != null">
+        #{portAllName,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsPort">
     update RMS_PORT
     set PORT_TYPE_ID = #{portTypeId,jdbcType=DECIMAL},
+      PORT_LONGITUDE = #{portLongitude,jdbcType=VARCHAR},
+      PORT_LATITUDE = #{portLatitude,jdbcType=VARCHAR},
       PORT_NAME = #{portName,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},
-      DELETED = #{deleted,jdbcType=DECIMAL}
+      DELETED = #{deleted,jdbcType=DECIMAL},
+      PORT_ALL_NAME = #{portAllName,jdbcType=VARCHAR}
     where PORT_ID = #{portId,jdbcType=DECIMAL}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsPort">
@@ -209,6 +263,12 @@
       <if test="portTypeId != null">
         PORT_TYPE_ID = #{portTypeId,jdbcType=DECIMAL},
       </if>
+      <if test="portLongitude != null">
+        PORT_LONGITUDE = #{portLongitude,jdbcType=VARCHAR},
+      </if>
+      <if test="portLatitude != null">
+        PORT_LATITUDE = #{portLatitude,jdbcType=VARCHAR},
+      </if>
       <if test="portName != null">
         PORT_NAME = #{portName,jdbcType=VARCHAR},
       </if>
@@ -230,114 +290,130 @@
       <if test="deleted != null">
         DELETED = #{deleted,jdbcType=DECIMAL},
       </if>
+      <if test="portAllName != null">
+        PORT_ALL_NAME = #{portAllName,jdbcType=VARCHAR},
+      </if>
     </set>
     where PORT_ID = #{portId,jdbcType=DECIMAL}
   </update>
   <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
-    <include refid="select"/>
+    <include refid="select" />
     where PORT_ID = #{portId,jdbcType=DECIMAL}
   </select>
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="where"/>
+    <include refid="select" />
+    <include refid="where" />
   </select>
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="whereLike"/>
+    <include refid="select" />
+    <include refid="whereLike" />
   </select>
-
-    <insert id="batchInsert" parameterType="java.util.List">
+  <insert id="batchInsert" parameterType="java.util.List">
     insert into RMS_PORT 
       (PORT_ID, 
-      PORT_TYPE_ID, PORT_NAME, INSERT_USERNAME, 
-      INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, 
-      DELETED)
+      PORT_TYPE_ID, PORT_LONGITUDE, PORT_LATITUDE, 
+      PORT_NAME, INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK, DELETED, 
+      PORT_ALL_NAME)
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
       #{item.portId,jdbcType=DECIMAL}, 
-      #{item.portTypeId,jdbcType=DECIMAL}, #{item.portName,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR}, 
-      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
-      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, 
-      #{item.deleted,jdbcType=DECIMAL} from dual  
+      #{item.portTypeId,jdbcType=DECIMAL}, #{item.portLongitude,jdbcType=VARCHAR}, #{item.portLatitude,jdbcType=VARCHAR}, 
+      #{item.portName,jdbcType=VARCHAR}, #{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.portAllName,jdbcType=VARCHAR} from dual  
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
      update RMS_PORT
      set
        PORT_ID=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PORT_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PORT_ID" separator=" ">
           when #{item.portId,jdbcType=DECIMAL} then #{item.portId,jdbcType=DECIMAL}
        </foreach>
        ,PORT_TYPE_ID=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PORT_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PORT_ID" separator=" ">
           when #{item.portId,jdbcType=DECIMAL} then #{item.portTypeId,jdbcType=DECIMAL}
        </foreach>
+       ,PORT_LONGITUDE=
+       <foreach close="end" collection="list" index="index" item="item" open="case PORT_ID" separator=" ">
+          when #{item.portId,jdbcType=DECIMAL} then #{item.portLongitude,jdbcType=VARCHAR}
+       </foreach>
+       ,PORT_LATITUDE=
+       <foreach close="end" collection="list" index="index" item="item" open="case PORT_ID" separator=" ">
+          when #{item.portId,jdbcType=DECIMAL} then #{item.portLatitude,jdbcType=VARCHAR}
+       </foreach>
        ,PORT_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PORT_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PORT_ID" separator=" ">
           when #{item.portId,jdbcType=DECIMAL} then #{item.portName,jdbcType=VARCHAR}
        </foreach>
        ,INSERT_USERNAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PORT_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PORT_ID" separator=" ">
           when #{item.portId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
        </foreach>
        ,INSERT_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PORT_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PORT_ID" separator=" ">
           when #{item.portId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
        </foreach>
        ,UPDATE_USERNAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PORT_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PORT_ID" separator=" ">
           when #{item.portId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
        </foreach>
        ,UPDATE_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PORT_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PORT_ID" separator=" ">
           when #{item.portId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
        </foreach>
        ,INSERT_UPDATE_REMARK=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PORT_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PORT_ID" separator=" ">
           when #{item.portId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
        </foreach>
        ,DELETED=
-       <foreach collection="list" item="item" index="index" separator=" " open="case PORT_ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case PORT_ID" separator=" ">
           when #{item.portId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
        </foreach>
+       ,PORT_ALL_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case PORT_ID" separator=" ">
+          when #{item.portId,jdbcType=DECIMAL} then #{item.portAllName,jdbcType=VARCHAR}
+       </foreach>
      where PORT_ID in 
-     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.portId,jdbcType=DECIMAL}
      </foreach> 
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from RMS_PORT
     where PORT_ID in 
-    <foreach collection="list" item="id" open="(" close=")" separator=",">
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
   <select id="getPort" resultType="java.util.LinkedHashMap">
-        select * from (select
-        rp.PORT_ID "portId",
-        rp.PORT_NAME "portName",
-        rpt.PORT_TYPE_NAME "portTypeName"
-        from RMS_PORT rp
-        left join RMS_PORT_TYPE rpt
-        on rpt.PORT_TYPE_ID=rp.PORT_TYPE_ID
-        where rp.DELETED=0)
-        <where>
-          <if test="portName != null">
-              and "portName" in
-              <foreach collection="portName" item="item" open="(" separator="," close=")">
-                #{item}
-              </foreach>
-            </if>
-               <if test="portTypeName != null">
-              and "portTypeName" in
-              <foreach collection="portTypeName" item="item" open="(" separator="," close=")">
-                #{item}
-              </foreach>
-            </if>
-        </where>
+    select * from (select
+    rp.PORT_ID "portId",
+    rp.PORT_NAME "portName",
+    rpt.PORT_TYPE_NAME "portTypeName"
+    from RMS_PORT rp
+    left join RMS_PORT_TYPE rpt
+    on rpt.PORT_TYPE_ID=rp.PORT_TYPE_ID
+    where rp.DELETED=0)
+    <where>
+      <if test="portName != null">
+        and "portName" in
+        <foreach collection="portName" item="item" open="(" separator="," close=")">
+          #{item}
+        </foreach>
+      </if>
+      <if test="portTypeName != null">
+        and "portTypeName" in
+        <foreach collection="portTypeName" item="item" open="(" separator="," close=")">
+          #{item}
+        </foreach>
+      </if>
+    </where>
     <include refid="orderBy"></include>
   </select>
   <sql id="orderBy">
@@ -349,10 +425,10 @@
     </if>
   </sql>
   <select id="getPortType" resultType="java.util.Map">
-select
-       rpt.PORT_TYPE_ID as "id" ,
-       rpt.PORT_TYPE_ID as "value",
-       rpt.PORT_TYPE_NAME as "label"
-from RMS_PORT_TYPE rpt
+    select
+      rpt.PORT_TYPE_ID as "id" ,
+      rpt.PORT_TYPE_ID as "value",
+      rpt.PORT_TYPE_NAME as "label"
+    from RMS_PORT_TYPE rpt
   </select>
 </mapper>