浏览代码

合并冲突

txf 3 年之前
父节点
当前提交
bc4360c921

+ 1 - 1
pom.xml

@@ -110,7 +110,7 @@
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
 <!--                        <param>AMSTRUCK_RAIL_DAYPLAN</param>-->
-                    <param>OMSTRUCK_ORDER</param>
+                    <param>RMS_PWAREHOUSE_GRID</param>
                     </tables>
                 </configuration>
                 <executions>

+ 10 - 0
src/main/java/com/steerinfo/dil/controller/UtilsController.java

@@ -57,5 +57,15 @@ public class UtilsController extends BaseRESTfulController {
         return success(i);
     }
 
+    //================================================================================================
+//    /**
+//     * 仓储网格数据插入逻辑(!!!非必要情况,千万别打开)
+//     * @return
+//     */
+//    @PostMapping("/insertGrid")
+//    public RESTfulResult insertGrid() {
+//        int result = omstruckOrderMaterialService.insertGrid();
+//        return success(result);
+//    }
 
 }

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

@@ -3,9 +3,21 @@ package com.steerinfo.dil.mapper;
 import com.steerinfo.dil.model.RmsCapacity;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
 
 import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
 
 @Mapper
 public interface RmsCapacityMapper extends IBaseMapper<RmsCapacity, BigDecimal> {
+
+    List<Map<String,Object>> warehouseId();
+
+    List<Map<String,Object>> platformId();
+
+    List<Map<String,Object>> stackingId();
+
+    @Select("select seq__RMS_PWAREHOUSE_GRID.nextval from dual")
+    BigDecimal gridId();
 }

+ 12 - 0
src/main/java/com/steerinfo/dil/mapper/RmsPwarehouseGridMapper.java

@@ -0,0 +1,12 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.RmsPwarehouseGrid;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface RmsPwarehouseGridMapper extends IBaseMapper<RmsPwarehouseGrid, BigDecimal> {
+
+    int insertSelective(RmsPwarehouseGrid rmsPwarehouseGrid);
+}

+ 198 - 0
src/main/java/com/steerinfo/dil/model/RmsPwarehouseGrid.java

@@ -0,0 +1,198 @@
+package com.steerinfo.dil.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="成品仓库网格")
+public class RmsPwarehouseGrid implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(GRID_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal gridId;
+
+    /**
+     * 仓库ID(WAREHOUSE_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="仓库ID",required=false)
+    private BigDecimal warehouseId;
+
+    /**
+     * 月台ID(PLATFORM_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="月台ID",required=false)
+    private BigDecimal platformId;
+
+    /**
+     * 垛位ID(STACKING_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="垛位ID",required=false)
+    private BigDecimal stackingId;
+
+    /**
+     * 层次号(GRID_GRADATION_NUMBER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="层次号",required=false)
+    private BigDecimal gridGradationNumber;
+
+    /**
+     * 层序号(GRID_SEQUENCE_NUMBER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="层序号",required=false)
+    private BigDecimal gridSequenceNumber;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.gridId;
+    }
+
+    @Override
+    public void setId(BigDecimal gridId) {
+        this.gridId = gridId;
+    }
+
+    public BigDecimal getGridId() {
+        return gridId;
+    }
+
+    public void setGridId(BigDecimal gridId) {
+        this.gridId = gridId;
+    }
+
+    public BigDecimal getWarehouseId() {
+        return warehouseId;
+    }
+
+    public void setWarehouseId(BigDecimal warehouseId) {
+        this.warehouseId = warehouseId;
+    }
+
+    public BigDecimal getPlatformId() {
+        return platformId;
+    }
+
+    public void setPlatformId(BigDecimal platformId) {
+        this.platformId = platformId;
+    }
+
+    public BigDecimal getStackingId() {
+        return stackingId;
+    }
+
+    public void setStackingId(BigDecimal stackingId) {
+        this.stackingId = stackingId;
+    }
+
+    public BigDecimal getGridGradationNumber() {
+        return gridGradationNumber;
+    }
+
+    public void setGridGradationNumber(BigDecimal gridGradationNumber) {
+        this.gridGradationNumber = gridGradationNumber;
+    }
+
+    public BigDecimal getGridSequenceNumber() {
+        return gridSequenceNumber;
+    }
+
+    public void setGridSequenceNumber(BigDecimal gridSequenceNumber) {
+        this.gridSequenceNumber = gridSequenceNumber;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", gridId=").append(gridId);
+        sb.append(", warehouseId=").append(warehouseId);
+        sb.append(", platformId=").append(platformId);
+        sb.append(", stackingId=").append(stackingId);
+        sb.append(", gridGradationNumber=").append(gridGradationNumber);
+        sb.append(", gridSequenceNumber=").append(gridSequenceNumber);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 17 - 0
src/main/java/com/steerinfo/dil/service/IOmstruckOrderMaterialService.java

@@ -1,6 +1,11 @@
 package com.steerinfo.dil.service;
 
 import com.steerinfo.dil.model.OmstruckOrderMaterial;
+import com.steerinfo.dil.model.RmsPwarehouseGrid;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
 
 /**
  * OmstruckOrderMaterial服务接口:
@@ -20,4 +25,16 @@ public interface IOmstruckOrderMaterialService {
 
     //用于远程调用新增订单子表
     int insertSelective(OmstruckOrderMaterial omstruckOrderMaterial);
+
+    List<Map<String,Object>> warehouseId();
+
+    List<Map<String,Object>> platformId();
+
+    List<Map<String,Object>> stackingId();
+
+    BigDecimal gridId();
+
+    int insertSelective(RmsPwarehouseGrid rmsPwarehouseGrid);
+
+    int insertGrid();
 }

+ 218 - 2
src/main/java/com/steerinfo/dil/service/impl/OmstruckOrderMaterialServiceImpl.java

@@ -1,11 +1,18 @@
 package com.steerinfo.dil.service.impl;
 
 import com.steerinfo.dil.mapper.OmstruckOrderMaterialMapper;
+import com.steerinfo.dil.mapper.RmsCapacityMapper;
+import com.steerinfo.dil.mapper.RmsPwarehouseGridMapper;
 import com.steerinfo.dil.model.OmstruckOrderMaterial;
+import com.steerinfo.dil.model.RmsPwarehouseGrid;
 import com.steerinfo.dil.service.IOmstruckOrderMaterialService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
 /**
  * OmstruckOrderMaterial服务实现:
  *
@@ -26,6 +33,12 @@ public class OmstruckOrderMaterialServiceImpl implements IOmstruckOrderMaterialS
     @Autowired
     private OmstruckOrderMaterialMapper omstruckOrderMaterialMapper;
 
+    @Autowired
+    RmsCapacityMapper rmsCapacityMapper;
+
+    @Autowired
+    RmsPwarehouseGridMapper rmsPwarehouseGridMapper;
+
     /**
      * 远程调用订单子表新增
      *
@@ -34,7 +47,210 @@ public class OmstruckOrderMaterialServiceImpl implements IOmstruckOrderMaterialS
      */
     @Override
     public int insertSelective(OmstruckOrderMaterial omstruckOrderMaterial) {
-        omstruckOrderMaterialMapper.insertSelective(omstruckOrderMaterial);
-        return 0;
+        return omstruckOrderMaterialMapper.insertSelective(omstruckOrderMaterial);
     }
+
+    /**
+     * 仓库
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> warehouseId() {
+        return rmsCapacityMapper.warehouseId();
+    }
+
+    /**
+     * 月台
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> platformId() {
+        return rmsCapacityMapper.platformId();
+    }
+
+    /**
+     * 垛位
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> stackingId() {
+        return rmsCapacityMapper.stackingId();
+    }
+
+    /**
+     * 主键
+     * @return
+     */
+    @Override
+    public BigDecimal gridId() {
+        return rmsCapacityMapper.gridId();
+    }
+
+    @Override
+    public int insertSelective(RmsPwarehouseGrid rmsPwarehouseGrid) {
+        return rmsPwarehouseGridMapper.insertSelective(rmsPwarehouseGrid);
+    }
+
+    @Override
+    public int insertGrid() {
+        int count = 0;
+        // 仓库
+        List<Map<String, Object>> warehouseIdList = warehouseId();
+        // 月台
+        List<Map<String, Object>> platformIdList = platformId();
+        // 垛位
+        List<Map<String, Object>> stackingIdList = stackingId();
+        // 遍历仓库
+        for (Map<String,Object> warehouseIdMap : warehouseIdList) {
+            BigDecimal warehouseId = (BigDecimal) warehouseIdMap.get("warehouseId");
+            // 遍历月台
+            for (Map<String,Object> platformIdMap : platformIdList) {
+                BigDecimal platformId = (BigDecimal) platformIdMap.get("platformId");
+                // 遍历垛位
+                for (Map<String,Object> stackingIdMap : stackingIdList) {
+                    BigDecimal stackingId = (BigDecimal) stackingIdMap.get("stackingId");
+                    // 遍历层次
+                    for (int i = 1; i <= 8; i++) {
+                        // 遍历层序
+                        for (int j = 1; j <= 24; j++) {
+                            // 一棒库时
+                            if (warehouseId.intValue() == 1) {
+                                // A月台
+                                if (platformId.intValue() == 1) {
+                                    // A月台的垛位
+                                    if (stackingId.intValue() == 1) {
+                                        RmsPwarehouseGrid rmsPwarehouseGrid = new RmsPwarehouseGrid();
+                                        BigDecimal gridId = gridId();
+                                        rmsPwarehouseGrid.setGridId(gridId);
+                                        rmsPwarehouseGrid.setWarehouseId(warehouseId);
+                                        rmsPwarehouseGrid.setStackingId(stackingId);
+                                        rmsPwarehouseGrid.setGridGradationNumber(new BigDecimal(i));
+                                        rmsPwarehouseGrid.setGridSequenceNumber(new BigDecimal(j));
+                                        insertSelective(rmsPwarehouseGrid);
+                                        count++;
+                                    }
+                                }
+                                // B月台
+                                if (platformId.intValue() == 1) {
+                                    // B月台的垛位: 2-8
+                                    if (stackingId.intValue() >= 2 && stackingId.intValue() <= 8) {
+                                        RmsPwarehouseGrid rmsPwarehouseGrid = new RmsPwarehouseGrid();
+                                        BigDecimal gridId = gridId();
+                                        rmsPwarehouseGrid.setGridId(gridId);
+                                        rmsPwarehouseGrid.setWarehouseId(warehouseId);
+                                        rmsPwarehouseGrid.setPlatformId(platformId);
+                                        rmsPwarehouseGrid.setStackingId(stackingId);
+                                        rmsPwarehouseGrid.setGridGradationNumber(new BigDecimal(i));
+                                        rmsPwarehouseGrid.setGridSequenceNumber(new BigDecimal(j));
+                                        insertSelective(rmsPwarehouseGrid);
+                                        count++;
+                                    }
+                                }
+                            }
+                            // 二棒库时:
+                            if (warehouseId.intValue() == 2) {
+                                // A月台
+                                if (platformId.intValue() == 3) {
+                                    // A月台的垛位 : 1-3
+                                    if (stackingId.intValue() >= 41 && stackingId.intValue() <= 43) {
+                                        RmsPwarehouseGrid rmsPwarehouseGrid = new RmsPwarehouseGrid();
+                                        BigDecimal gridId = gridId();
+                                        rmsPwarehouseGrid.setGridId(gridId);
+                                        rmsPwarehouseGrid.setWarehouseId(warehouseId);
+                                        rmsPwarehouseGrid.setPlatformId(platformId);
+                                        rmsPwarehouseGrid.setStackingId(stackingId);
+                                        rmsPwarehouseGrid.setGridGradationNumber(new BigDecimal(i));
+                                        rmsPwarehouseGrid.setGridSequenceNumber(new BigDecimal(j));
+                                        insertSelective(rmsPwarehouseGrid);
+                                        count++;
+                                    }
+                                }
+                                // B月台
+                                if (platformId.intValue() == 4) {
+
+                                }
+                                // C月台
+                                if (platformId.intValue() == 5) {
+                                    // C月台的垛位:4-18
+                                    if (stackingId.intValue() >= 44 && stackingId.intValue() <= 58) {
+                                        RmsPwarehouseGrid rmsPwarehouseGrid = new RmsPwarehouseGrid();
+                                        BigDecimal gridId = gridId();
+                                        rmsPwarehouseGrid.setGridId(gridId);
+                                        rmsPwarehouseGrid.setWarehouseId(warehouseId);
+                                        rmsPwarehouseGrid.setPlatformId(platformId);
+                                        rmsPwarehouseGrid.setStackingId(stackingId);
+                                        rmsPwarehouseGrid.setGridGradationNumber(new BigDecimal(i));
+                                        rmsPwarehouseGrid.setGridSequenceNumber(new BigDecimal(j));
+                                        insertSelective(rmsPwarehouseGrid);
+                                        count++;
+                                    }
+                                }
+                                // D月台
+                                if (platformId.intValue() == 6) {
+                                    // D月台的垛位:19
+                                    if (stackingId.intValue() == 59) {
+                                        RmsPwarehouseGrid rmsPwarehouseGrid = new RmsPwarehouseGrid();
+                                        BigDecimal gridId = gridId();
+                                        rmsPwarehouseGrid.setGridId(gridId);
+                                        rmsPwarehouseGrid.setWarehouseId(warehouseId);
+                                        rmsPwarehouseGrid.setPlatformId(platformId);
+                                        rmsPwarehouseGrid.setStackingId(stackingId);
+                                        rmsPwarehouseGrid.setGridGradationNumber(new BigDecimal(i));
+                                        rmsPwarehouseGrid.setGridSequenceNumber(new BigDecimal(j));
+                                        insertSelective(rmsPwarehouseGrid);
+                                        count++;
+                                    }
+                                }
+                            }
+                            // 高线库时
+                            if (warehouseId.intValue() == 3) {
+                                // A月台
+                                if (platformId.intValue() == 7) {
+//                                    RmsPwarehouseGrid rmsPwarehouseGrid = new RmsPwarehouseGrid();
+                                }
+                            }
+                            // 配送库时:
+                            if (warehouseId.intValue() == 4) {
+                                // A月台
+                                if (platformId.intValue() == 8) {
+                                    // A月台的垛位:8-14 || 24-32
+                                    if ((stackingId.intValue() >= 16 && stackingId.intValue() <= 22) || (stackingId.intValue() >= 32 && stackingId.intValue() <= 40)) {
+                                        RmsPwarehouseGrid rmsPwarehouseGrid = new RmsPwarehouseGrid();
+                                        BigDecimal gridId = gridId();
+                                        rmsPwarehouseGrid.setGridId(gridId);
+                                        rmsPwarehouseGrid.setWarehouseId(warehouseId);
+                                        rmsPwarehouseGrid.setPlatformId(platformId);
+                                        rmsPwarehouseGrid.setStackingId(stackingId);
+                                        rmsPwarehouseGrid.setGridGradationNumber(new BigDecimal(i));
+                                        rmsPwarehouseGrid.setGridSequenceNumber(new BigDecimal(j));
+                                        insertSelective(rmsPwarehouseGrid);
+                                        count++;
+                                    }
+                                }
+                                // B月台
+                                if (platformId.intValue() == 9) {
+                                    // B月台的垛位:1-7 || 15-23
+                                    if ((stackingId.intValue() >= 9 && stackingId.intValue() <= 15) || (stackingId.intValue() >= 23 && stackingId.intValue() <= 31)) {
+                                        RmsPwarehouseGrid rmsPwarehouseGrid = new RmsPwarehouseGrid();
+                                        BigDecimal gridId = gridId();
+                                        rmsPwarehouseGrid.setGridId(gridId);
+                                        rmsPwarehouseGrid.setWarehouseId(warehouseId);
+                                        rmsPwarehouseGrid.setPlatformId(platformId);
+                                        rmsPwarehouseGrid.setStackingId(stackingId);
+                                        rmsPwarehouseGrid.setGridGradationNumber(new BigDecimal(i));
+                                        rmsPwarehouseGrid.setGridSequenceNumber(new BigDecimal(j));
+                                        insertSelective(rmsPwarehouseGrid);
+                                        count++;
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        System.out.println(count);
+        return count;
+    }
+
 }

+ 7 - 5
src/main/java/com/steerinfo/dil/service/impl/OmstruckOrderServiceImpl.java

@@ -1112,11 +1112,13 @@ public class OmstruckOrderServiceImpl implements IOmstruckOrderService {
         omstruckOrder.setDeleted(new BigDecimal(0));
         omstruckOrder.setOrderType(new BigDecimal(orderType));
         BigDecimal capacityId = omstruckOrderMapper.getCapacityId(capacityNumber);
-        BigDecimal driverCapacityId = omstruckOrderMapper.getDriverCapacityId(capacityId);
-        omstruckOrder.setDriverCapacityId(driverCapacityId);
-        RmsDriverCapacity rmsDriverCapacity = rmsDriverCapacityMapper.selectByPrimaryKey(driverCapacityId);
-        rmsDriverCapacity.setCarrierId(new BigDecimal(carrierId));
-        rmsDriverCapacityMapper.updateByPrimaryKeySelective(rmsDriverCapacity);
+        omstruckOrder.setCapacityId(capacityId);
+//        omstruckOrder.setCarrierId();
+//        BigDecimal driverCapacityId = omstruckOrderMapper.getDriverCapacityId(capacityId);
+//        omstruckOrder.setDriverCapacityId(driverCapacityId);
+//        RmsDriverCapacity rmsDriverCapacity = rmsDriverCapacityMapper.selectByPrimaryKey(driverCapacityId);
+//        rmsDriverCapacity.setCarrierId(new BigDecimal(carrierId));
+//        rmsDriverCapacityMapper.updateByPrimaryKeySelective(rmsDriverCapacity);
         List<Map<String, Object>> mapList = omstruckOrderMapper.getMaterialMessages(new BigDecimal(dispatchId));
         if (mapList != null && mapList.size() != 0) {
             for (Map<String, Object> map : mapList) {

+ 106 - 108
src/main/resources/com/steerinfo/dil/mapper/OmstruckOrderMapper.xml

@@ -2,28 +2,28 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.dil.mapper.OmstruckOrderMapper">
     <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OmstruckOrder">
-        <id column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
-        <result column="ORDER_PLAN_ID" jdbcType="DECIMAL" property="orderPlanId" />
-        <result column="ORDER_NUMBER" jdbcType="VARCHAR" property="orderNumber" />
-        <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
-        <result column="ORDER_ISSUE_TIME" jdbcType="TIMESTAMP" property="orderIssueTime" />
-        <result column="ORDER_RECEIVE_STATUS" jdbcType="DECIMAL" property="orderReceiveStatus" />
-        <result column="ORDER_RECEIVE_REFUSE_TIME" jdbcType="TIMESTAMP" property="orderReceiveRefuseTime" />
-        <result column="ORDER_COMMUNICATION_DURATION" jdbcType="DECIMAL" property="orderCommunicationDuration" />
-        <result column="ORDER_STATUS" jdbcType="DECIMAL" property="orderStatus" />
-        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
-        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
-        <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="DELETED" jdbcType="DECIMAL" property="deleted" />
-        <result column="ORDER_TYPE" jdbcType="DECIMAL" property="orderType" />
-        <result column="ORDER_LINE_SEQUENCE" jdbcType="DECIMAL" property="orderLineSequence" />
-        <result column="LINE_ID" jdbcType="DECIMAL" property="lineId" />
-        <result column="ORDER_ENTRY_TIME" jdbcType="TIMESTAMP" property="orderEntryTime" />
-        <result column="DRIVER_CAPACITY_ID" jdbcType="DECIMAL" property="driverCapacityId" />
-        <result column="UNLOAD_POINT_ID" jdbcType="DECIMAL" property="unloadPointId" />
-        <result column="DRIVER_CONFIRMATION" jdbcType="DECIMAL" property="driverConfirmation" />
+        <id column="ORDER_ID" jdbcType="DECIMAL" property="orderId"/>
+        <result column="ORDER_PLAN_ID" jdbcType="DECIMAL" property="orderPlanId"/>
+        <result column="ORDER_NUMBER" jdbcType="VARCHAR" property="orderNumber"/>
+        <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId"/>
+        <result column="ORDER_ISSUE_TIME" jdbcType="TIMESTAMP" property="orderIssueTime"/>
+        <result column="ORDER_RECEIVE_STATUS" jdbcType="DECIMAL" property="orderReceiveStatus"/>
+        <result column="ORDER_RECEIVE_REFUSE_TIME" jdbcType="TIMESTAMP" property="orderReceiveRefuseTime"/>
+        <result column="ORDER_COMMUNICATION_DURATION" jdbcType="DECIMAL" property="orderCommunicationDuration"/>
+        <result column="ORDER_STATUS" jdbcType="DECIMAL" property="orderStatus"/>
+        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
+        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
+        <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="DELETED" jdbcType="DECIMAL" property="deleted"/>
+        <result column="ORDER_TYPE" jdbcType="DECIMAL" property="orderType"/>
+        <result column="ORDER_LINE_SEQUENCE" jdbcType="DECIMAL" property="orderLineSequence"/>
+        <result column="LINE_ID" jdbcType="DECIMAL" property="lineId"/>
+        <result column="ORDER_ENTRY_TIME" jdbcType="TIMESTAMP" property="orderEntryTime"/>
+        <result column="DRIVER_CAPACITY_ID" jdbcType="DECIMAL" property="driverCapacityId"/>
+        <result column="UNLOAD_POINT_ID" jdbcType="DECIMAL" property="unloadPointId"/>
+        <result column="DRIVER_CONFIRMATION" jdbcType="DECIMAL" property="driverConfirmation"/>
     </resultMap>
     <sql id="columns">
         ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER, CAPACITY_ID, ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS, 
@@ -40,10 +40,14 @@
     t.UNLOAD_POINT_ID, t.DRIVER_CONFIRMATION
     </sql>
     <sql id="select">
-        SELECT <include refid="columns"/> FROM OMSTRUCK_ORDER
+        SELECT
+        <include refid="columns"/>
+        FROM OMSTRUCK_ORDER
     </sql>
     <sql id="select_alias">
-        SELECT <include refid="columns_alias"/> FROM OMSTRUCK_ORDER t
+        SELECT
+        <include refid="columns_alias"/>
+        FROM OMSTRUCK_ORDER t
     </sql>
     <sql id="where">
         <where>
@@ -186,7 +190,8 @@
         </where>
     </sql>
     <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
-        delete from OMSTRUCK_ORDER
+        delete
+        from OMSTRUCK_ORDER
         where ORDER_ID = #{orderId,jdbcType=DECIMAL}
     </delete>
     <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
@@ -266,10 +271,12 @@
                                     LINE_ID, ORDER_ENTRY_TIME, DRIVER_CAPACITY_ID,
                                     UNLOAD_POINT_ID, DRIVER_CONFIRMATION)
         values (#{orderId,jdbcType=DECIMAL}, #{orderPlanId,jdbcType=DECIMAL}, #{orderNumber,jdbcType=VARCHAR},
-                #{capacityId,jdbcType=DECIMAL}, #{orderIssueTime,jdbcType=TIMESTAMP}, #{orderReceiveStatus,jdbcType=DECIMAL},
+                #{capacityId,jdbcType=DECIMAL}, #{orderIssueTime,jdbcType=TIMESTAMP},
+                #{orderReceiveStatus,jdbcType=DECIMAL},
                 #{orderReceiveRefuseTime,jdbcType=TIMESTAMP}, #{orderCommunicationDuration,jdbcType=DECIMAL},
                 #{orderStatus,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
-                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
+                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+                #{insertUpdateRemark,jdbcType=VARCHAR},
                 #{deleted,jdbcType=DECIMAL}, #{orderType,jdbcType=DECIMAL}, #{orderLineSequence,jdbcType=DECIMAL},
                 #{lineId,jdbcType=DECIMAL}, #{orderEntryTime,jdbcType=TIMESTAMP}, #{driverCapacityId,jdbcType=DECIMAL},
                 #{unloadPointId,jdbcType=DECIMAL}, #{driverConfirmation,jdbcType=DECIMAL})
@@ -415,27 +422,27 @@
     </insert>
     <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmstruckOrder">
         update OMSTRUCK_ORDER
-        set ORDER_PLAN_ID = #{orderPlanId,jdbcType=DECIMAL},
-            ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR},
-            CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
-            ORDER_ISSUE_TIME = #{orderIssueTime,jdbcType=TIMESTAMP},
-            ORDER_RECEIVE_STATUS = #{orderReceiveStatus,jdbcType=DECIMAL},
-            ORDER_RECEIVE_REFUSE_TIME = #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
+        set ORDER_PLAN_ID                = #{orderPlanId,jdbcType=DECIMAL},
+            ORDER_NUMBER                 = #{orderNumber,jdbcType=VARCHAR},
+            CAPACITY_ID                  = #{capacityId,jdbcType=DECIMAL},
+            ORDER_ISSUE_TIME             = #{orderIssueTime,jdbcType=TIMESTAMP},
+            ORDER_RECEIVE_STATUS         = #{orderReceiveStatus,jdbcType=DECIMAL},
+            ORDER_RECEIVE_REFUSE_TIME    = #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
             ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration,jdbcType=DECIMAL},
-            ORDER_STATUS = #{orderStatus,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},
-            ORDER_TYPE = #{orderType,jdbcType=DECIMAL},
-            ORDER_LINE_SEQUENCE = #{orderLineSequence,jdbcType=DECIMAL},
-            LINE_ID = #{lineId,jdbcType=DECIMAL},
-            ORDER_ENTRY_TIME = #{orderEntryTime,jdbcType=TIMESTAMP},
-            DRIVER_CAPACITY_ID = #{driverCapacityId,jdbcType=DECIMAL},
-            UNLOAD_POINT_ID = #{unloadPointId,jdbcType=DECIMAL},
-            DRIVER_CONFIRMATION = #{driverConfirmation,jdbcType=DECIMAL}
+            ORDER_STATUS                 = #{orderStatus,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},
+            ORDER_TYPE                   = #{orderType,jdbcType=DECIMAL},
+            ORDER_LINE_SEQUENCE          = #{orderLineSequence,jdbcType=DECIMAL},
+            LINE_ID                      = #{lineId,jdbcType=DECIMAL},
+            ORDER_ENTRY_TIME             = #{orderEntryTime,jdbcType=TIMESTAMP},
+            DRIVER_CAPACITY_ID           = #{driverCapacityId,jdbcType=DECIMAL},
+            UNLOAD_POINT_ID              = #{unloadPointId,jdbcType=DECIMAL},
+            DRIVER_CONFIRMATION          = #{driverConfirmation,jdbcType=DECIMAL}
         where ORDER_ID = #{orderId,jdbcType=DECIMAL}
     </update>
     <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
@@ -541,8 +548,10 @@
         #{item.orderStatus,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.orderType,jdbcType=DECIMAL}, #{item.orderLineSequence,jdbcType=DECIMAL},
-        #{item.lineId,jdbcType=DECIMAL}, #{item.orderEntryTime,jdbcType=TIMESTAMP}, #{item.driverCapacityId,jdbcType=DECIMAL},
+        #{item.deleted,jdbcType=DECIMAL}, #{item.orderType,jdbcType=DECIMAL},
+        #{item.orderLineSequence,jdbcType=DECIMAL},
+        #{item.lineId,jdbcType=DECIMAL}, #{item.orderEntryTime,jdbcType=TIMESTAMP},
+        #{item.driverCapacityId,jdbcType=DECIMAL},
         #{item.unloadPointId,jdbcType=DECIMAL}, #{item.driverConfirmation,jdbcType=DECIMAL}
         from dual
     </foreach> )
@@ -974,14 +983,14 @@
         select *
         from (
         select OO.ORDER_NUMBER "orderNumber",
-                OOM.ORDER_MATERIAL_WEIGHT "orderMaterialWeight",
-                OO.ORDER_RECEIVE_REFUSE_TIME "orderReceiveRefuseTime",
-                RW.WAREHOUSE_NAME "warehouseName",
-                RM.MATERIAL_NAME "materialName",
-                RC.CAPACITY_NUMBER "capacityNumber",
-                RW2.WAREHOUSE_NAME "warehouseName2",
-                OO.INSERT_UPDATE_REMARK "insertUpdateRemark",
-                TTR.RESULT_TOTAL_ID "resultTotalId"
+        OOM.ORDER_MATERIAL_WEIGHT "orderMaterialWeight",
+        OO.ORDER_RECEIVE_REFUSE_TIME "orderReceiveRefuseTime",
+        RW.WAREHOUSE_NAME "warehouseName",
+        RM.MATERIAL_NAME "materialName",
+        RC.CAPACITY_NUMBER "capacityNumber",
+        RW2.WAREHOUSE_NAME "warehouseName2",
+        OO.INSERT_UPDATE_REMARK "insertUpdateRemark",
+        TTR.RESULT_TOTAL_ID "resultTotalId"
         from OMSTRUCK_ORDER OO
         left join RMS_DRIVER_CAPACITY RDC on OO.DRIVER_CAPACITY_ID = RDC.DRIVER_CAPACITY_ID
         left join RMS_CAPACITY RC on RC.CAPACITY_ID = RDC.CAPACITY_ID
@@ -2382,13 +2391,10 @@
     <select id="getCapacityAndDriver" parameterType="java.util.Map" resultType="java.util.Map">
         SELECT *
         FROM (SELECT RC.CAPACITY_NUMBER AS "capacityNumber",
-        RCD.DRIVER_NAME AS "driverName"
-        FROM RMS_DRIVER_CAPACITY RDC
-        LEFT JOIN RMS_CAPACITY RC
-        ON RC.CAPACITY_ID = RDC.CAPACITY_ID
-        LEFT JOIN RMS_CAR_DRIVER RCD
-        ON RDC.DRIVER_ID = RCD.DRIVER_ID
+        RC.CAPACITY_ID AS "carrierId"
+        FROM RMS_CAPACITY RC
         WHERE RC.CAPACITY_STATUS = 0
+            AND RC.CAPACITY_TYPE_ID = 1
         )
         <where>
             <if test="capacityNumber != null">
@@ -2397,12 +2403,6 @@
                     "capacityNumber" like '%${item}%'
                 </foreach>
             </if>
-            <if test="driverName != null">
-                and
-                <foreach collection="driverName" item="item" open="(" separator="or" close=")">
-                    "driverName" like '%${item}%'
-                </foreach>
-            </if>
         </where>
     </select>
 
@@ -2634,17 +2634,16 @@
 
     <!-- 物资信息 -->
     <select id="getMaterialMes" parameterType="DECIMAL" resultType="java.util.Map">
-        SELECT
-                RM.MATERIAL_NAME    "materialName",
-               CONCAT(CONCAT(RM.MATERIAL_MODEL,'(' ), CONCAT(MATERIAL_SPECIFICATION, ')')) "materialMC",
+        SELECT RM.MATERIAL_NAME                                                            "materialName",
+               CONCAT(CONCAT(RM.MATERIAL_MODEL, '('), CONCAT(MATERIAL_SPECIFICATION, ')')) "materialMC",
                (case
-                   when OOM.ORDER_MATERIAL_WEIGHT is not null
-                          then OOM.ORDER_MATERIAL_WEIGHT
-                        when OOM.ORDER_MATERIAL_NUMBER is not null
-                             then OOM.ORDER_MATERIAL_NUMBER
+                    when OOM.ORDER_MATERIAL_WEIGHT is not null
+                        then OOM.ORDER_MATERIAL_WEIGHT
+                    when OOM.ORDER_MATERIAL_NUMBER is not null
+                        then OOM.ORDER_MATERIAL_NUMBER
                    end
                    )
-                AS "weightNum"
+                   AS                                                                      "weightNum"
         FROM OMSTRUCK_ORDER_MATERIAL OOM
                  LEFT JOIN RMS_MATERIAL RM
                            ON RM.MATERIAL_ID = OOM.MATERIAL_ID
@@ -2803,24 +2802,24 @@
                  LEFT JOIN RMS_CAPACITY RC
                            ON RC.CAPACITY_ID = OO.CAPACITY_ID
         WHERE RC.CAPACITY_NUMBER = #{capacityNumber}
-AND OO.ORDER_STATUS = 4
+          AND OO.ORDER_STATUS = 4
     </select>
 
-<!--  通过运输订单号查询运输订单ID  -->
+    <!--  通过运输订单号查询运输订单ID  -->
     <select id="getOrderIdByOrderNumber" parameterType="string" resultType="java.lang.Integer">
         select OO.ORDER_ID
         from OMSTRUCK_ORDER OO
         where OO.ORDER_NUMBER = #{orderNumber}
     </select>
 
-<!--   查询采购运输订单给APP 5 6 7 8 -->
+    <!--   查询采购运输订单给APP 5 6 7 8 -->
     <select id="getCGOrderMessageToApp" parameterType="java.math.BigDecimal" resultType="java.util.Map">
-        SELECT OO.ORDER_ID     "orderId",
-               OO.ORDER_NUMBER "orderNumber",
-               RC.CAPACITY_NUMBER       "capacityNumber",
-               RS.SUPPLIER_NAME         "loadName",
-               RW.WAREHOUSE_NAME        "unloadName",
-               OO.ORDER_TYPE            "orderType"
+        SELECT OO.ORDER_ID        "orderId",
+               OO.ORDER_NUMBER    "orderNumber",
+               RC.CAPACITY_NUMBER "capacityNumber",
+               RS.SUPPLIER_NAME   "loadName",
+               RW.WAREHOUSE_NAME  "unloadName",
+               OO.ORDER_TYPE      "orderType"
         FROM OMSTRUCK_ORDER OO
                  LEFT JOIN RMS_CAPACITY RC
                            ON RC.CAPACITY_ID = OO.CAPACITY_ID
@@ -2835,12 +2834,12 @@ AND OO.ORDER_STATUS = 4
 
     <!--  查询内转运输订单给APP 9 10 11-->
     <select id="getNZOrderMessageToApp" parameterType="java.math.BigDecimal" resultType="java.util.Map">
-        SELECT OO.ORDER_ID  "orderId",
-               OO.ORDER_NUMBER  "orderNumber",
-               RC.CAPACITY_NUMBER       "capacityNumber",
-               RS.SUPPLIER_NAME         "loadName",
-               RW.WAREHOUSE_NAME        "unloadName",
-               OO.ORDER_TYPE            "orderType"
+        SELECT OO.ORDER_ID        "orderId",
+               OO.ORDER_NUMBER    "orderNumber",
+               RC.CAPACITY_NUMBER "capacityNumber",
+               RS.SUPPLIER_NAME   "loadName",
+               RW.WAREHOUSE_NAME  "unloadName",
+               OO.ORDER_TYPE      "orderType"
         FROM OMSTRUCK_ORDER OO
         LEFT JOIN AMSTRUCK_REQUIREMENT_PLAN ARP
             ON OO.ORDER_PLAN_ID = ARP.PLAN_ID
@@ -2859,12 +2858,12 @@ AND OO.ORDER_STATUS = 4
     </select>
     <!--  查询发运计划运输订单给APP  2 3 4 -->
     <select id="getFYJHOrderMessageToApp" parameterType="java.math.BigDecimal" resultType="java.util.Map">
-        SELECT OO.ORDER_ID  "orderId",
-               OO.ORDER_TYPE    "orderType",
-               OO.ORDER_NUMBER  "orderNumber",
+        SELECT OO.ORDER_ID        "orderId",
+               OO.ORDER_TYPE      "orderType",
+               OO.ORDER_NUMBER    "orderNumber",
                RC.CAPACITY_NUMBER "capacityNumber",
-               RS.SHIPPER_NAME  "loadName",
-               RW.WAREHOUSE_NAME    "unloadName"
+               RS.SHIPPER_NAME    "loadName",
+               RW.WAREHOUSE_NAME  "unloadName"
         FROM OMSTRUCK_ORDER OO
         LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM
             on ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
@@ -2880,19 +2879,19 @@ AND OO.ORDER_STATUS = 4
     </select>
     <!--  查询销售运输订单给APP 1 -->
     <select id="getXSOrderMessageToApp" parameterType="java.math.BigDecimal" resultType="java.util.Map">
-        SELECT OO.ORDER_ID  "orderId",
-               OO.ORDER_TYPE    "orderType",
-               OO.ORDER_NUMBER  "orderNumber",
-               RC.CAPACITY_NUMBER "capacityNumber",
-               RS.SHIPPER_NAME  "shipperName",
-               ASOM.SALE_DATE_OF_RECEIPT   "saleDateOfReceipt",
+        SELECT OO.ORDER_ID                   "orderId",
+               OO.ORDER_TYPE                 "orderType",
+               OO.ORDER_NUMBER               "orderNumber",
+               RC.CAPACITY_NUMBER            "capacityNumber",
+               RS.SHIPPER_NAME               "shipperName",
+               ASOM.SALE_DATE_OF_RECEIPT     "saleDateOfReceipt",
                RC2.CONSIGNEE_COMPANY_NAME    "consigneeCompanyName",
                CONCAT(CONCAT(CONCAT(RDA.ADDRESS_PROVINCE,RDA.ADDRESS_DISTRICT),RDA.ADDRESS_TOWN),RDA.ADDRESS_DELIVERY_ADDRESS) "receiveAddressName"
 
         FROM OMSTRUCK_ORDER OO
                  LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM
                            on ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
-                 LEFT JOIN AMS_SALE_ORDER  ASO
+                 LEFT JOIN AMS_SALE_ORDER ASO
                            ON ASO.SALE_ORDER_ID = ASOM.SALE_ORDER_ID
                  LEFT JOIN RMS_SHIPPER RS
                            ON RS.SHIPPER_ID = ASO.SHIPPER_ID
@@ -2905,17 +2904,16 @@ AND OO.ORDER_STATUS = 4
         WHERE OO.ORDER_ID = #{orderId}
     </select>
 
-<!--  通过运输订单号查询订单类型  -->
+    <!--  通过运输订单号查询订单类型  -->
     <select id="getOrderTypeByOrderNumber" parameterType="java.math.BigDecimal" resultType="java.lang.Integer">
         SELECT OO.ORDER_TYPE
         FROM OMSTRUCK_ORDER OO
         WHERE OO.ORDER_ID = #{orderId}
     </select>
 
-<!--  通过车牌匹配所有已下发的 的订单Id -->
+    <!--  通过车牌匹配所有已下发的 的订单Id -->
     <select id="getOrderIdListByCapacityNumber" parameterType="string" resultType="int">
-        SELECT
-               OO.ORDER_ID
+        SELECT OO.ORDER_ID
         FROM OMSTRUCK_ORDER OO
         LEFT JOIN RMS_CAPACITY RC
             ON RC.CAPACITY_ID = OO.CAPACITY_ID

+ 698 - 671
src/main/resources/com/steerinfo/dil/mapper/RmsCapacityMapper.xml

@@ -1,683 +1,710 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.dil.mapper.RmsCapacityMapper">
-  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsCapacity">
-    <id column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
-    <result column="CAPACITY_NUMBER" jdbcType="VARCHAR" property="capacityNumber" />
-    <result column="CAPACITY_MAX_LOAD" jdbcType="DECIMAL" property="capacityMaxLoad" />
-    <result column="CAPACITY_TYPE_ID" jdbcType="DECIMAL" property="capacityTypeId" />
-    <result column="CAPACITY_STATUS" jdbcType="DECIMAL" property="capacityStatus" />
-    <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
-    <result column="CAPACITY_ENERGY_ID" jdbcType="VARCHAR" property="capacityEnergyId" />
-    <result column="CAPACITY_LEN_VAL" jdbcType="DECIMAL" property="capacityLenVal" />
-    <result column="CAPACITY_WID_VAL" jdbcType="DECIMAL" property="capacityWidVal" />
-    <result column="CAPACITY_HIG_VAL" jdbcType="DECIMAL" property="capacityHigVal" />
-    <result column="CAPACITY_OIL_ID" jdbcType="DECIMAL" property="capacityOilId" />
-    <result column="CAPACITY_FUEL_CONSUMPTION" jdbcType="VARCHAR" property="capacityFuelConsumption" />
-    <result column="CAPACITY_OWNERIS" jdbcType="DECIMAL" property="capacityOwneris" />
-    <result column="CAPACITY_BLACKLIST" jdbcType="DECIMAL" property="capacityBlacklist" />
-    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
-    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
-    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
-    <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="CAPACITY_CORLOR" jdbcType="VARCHAR" property="capacityCorlor" />
-    <result column="CAPACITY_VIP" jdbcType="VARCHAR" property="capacityVip" />
-    <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
-  </resultMap>
-  <sql id="columns">
-    CAPACITY_ID, CAPACITY_NUMBER, CAPACITY_MAX_LOAD, CAPACITY_TYPE_ID, CAPACITY_STATUS, 
+    <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsCapacity">
+        <id column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId"/>
+        <result column="CAPACITY_NUMBER" jdbcType="VARCHAR" property="capacityNumber"/>
+        <result column="CAPACITY_MAX_LOAD" jdbcType="DECIMAL" property="capacityMaxLoad"/>
+        <result column="CAPACITY_TYPE_ID" jdbcType="DECIMAL" property="capacityTypeId"/>
+        <result column="CAPACITY_STATUS" jdbcType="DECIMAL" property="capacityStatus"/>
+        <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId"/>
+        <result column="CAPACITY_ENERGY_ID" jdbcType="VARCHAR" property="capacityEnergyId"/>
+        <result column="CAPACITY_LEN_VAL" jdbcType="DECIMAL" property="capacityLenVal"/>
+        <result column="CAPACITY_WID_VAL" jdbcType="DECIMAL" property="capacityWidVal"/>
+        <result column="CAPACITY_HIG_VAL" jdbcType="DECIMAL" property="capacityHigVal"/>
+        <result column="CAPACITY_OIL_ID" jdbcType="DECIMAL" property="capacityOilId"/>
+        <result column="CAPACITY_FUEL_CONSUMPTION" jdbcType="VARCHAR" property="capacityFuelConsumption"/>
+        <result column="CAPACITY_OWNERIS" jdbcType="DECIMAL" property="capacityOwneris"/>
+        <result column="CAPACITY_BLACKLIST" jdbcType="DECIMAL" property="capacityBlacklist"/>
+        <result column="MEMO" jdbcType="VARCHAR" property="memo"/>
+        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
+        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
+        <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="CAPACITY_CORLOR" jdbcType="VARCHAR" property="capacityCorlor"/>
+        <result column="CAPACITY_VIP" jdbcType="VARCHAR" property="capacityVip"/>
+        <result column="DELETED" jdbcType="DECIMAL" property="deleted"/>
+    </resultMap>
+    <sql id="columns">
+        CAPACITY_ID, CAPACITY_NUMBER, CAPACITY_MAX_LOAD, CAPACITY_TYPE_ID, CAPACITY_STATUS,
     CARRIER_ID, CAPACITY_ENERGY_ID, CAPACITY_LEN_VAL, CAPACITY_WID_VAL, CAPACITY_HIG_VAL, 
     CAPACITY_OIL_ID, CAPACITY_FUEL_CONSUMPTION, CAPACITY_OWNERIS, CAPACITY_BLACKLIST, 
     MEMO, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
     CAPACITY_CORLOR, CAPACITY_VIP, DELETED
-  </sql>
-  <sql id="columns_alias">
-    t.CAPACITY_ID, t.CAPACITY_NUMBER, t.CAPACITY_MAX_LOAD, t.CAPACITY_TYPE_ID, t.CAPACITY_STATUS, 
+    </sql>
+    <sql id="columns_alias">
+        t.CAPACITY_ID, t.CAPACITY_NUMBER, t.CAPACITY_MAX_LOAD, t.CAPACITY_TYPE_ID, t.CAPACITY_STATUS,
     t.CARRIER_ID, t.CAPACITY_ENERGY_ID, t.CAPACITY_LEN_VAL, t.CAPACITY_WID_VAL, t.CAPACITY_HIG_VAL, 
     t.CAPACITY_OIL_ID, t.CAPACITY_FUEL_CONSUMPTION, t.CAPACITY_OWNERIS, t.CAPACITY_BLACKLIST, 
     t.MEMO, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, 
     t.CAPACITY_CORLOR, t.CAPACITY_VIP, t.DELETED
-  </sql>
-  <sql id="select">
-    SELECT <include refid="columns" /> FROM RMS_CAPACITY
-  </sql>
-  <sql id="select_alias">
-    SELECT <include refid="columns_alias" /> FROM RMS_CAPACITY t
-  </sql>
-  <sql id="where">
-    <where> 
-      <if test="capacityId != null">
-        and CAPACITY_ID = #{capacityId}
-      </if>
-      <if test="capacityNumber != null and capacityNumber != ''">
-        and CAPACITY_NUMBER = #{capacityNumber}
-      </if>
-      <if test="capacityMaxLoad != null">
-        and CAPACITY_MAX_LOAD = #{capacityMaxLoad}
-      </if>
-      <if test="capacityTypeId != null">
-        and CAPACITY_TYPE_ID = #{capacityTypeId}
-      </if>
-      <if test="capacityStatus != null">
-        and CAPACITY_STATUS = #{capacityStatus}
-      </if>
-      <if test="carrierId != null">
-        and CARRIER_ID = #{carrierId}
-      </if>
-      <if test="capacityEnergyId != null and capacityEnergyId != ''">
-        and CAPACITY_ENERGY_ID = #{capacityEnergyId}
-      </if>
-      <if test="capacityLenVal != null">
-        and CAPACITY_LEN_VAL = #{capacityLenVal}
-      </if>
-      <if test="capacityWidVal != null">
-        and CAPACITY_WID_VAL = #{capacityWidVal}
-      </if>
-      <if test="capacityHigVal != null">
-        and CAPACITY_HIG_VAL = #{capacityHigVal}
-      </if>
-      <if test="capacityOilId != null">
-        and CAPACITY_OIL_ID = #{capacityOilId}
-      </if>
-      <if test="capacityFuelConsumption != null and capacityFuelConsumption != ''">
-        and CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption}
-      </if>
-      <if test="capacityOwneris != null">
-        and CAPACITY_OWNERIS = #{capacityOwneris}
-      </if>
-      <if test="capacityBlacklist != null">
-        and CAPACITY_BLACKLIST = #{capacityBlacklist}
-      </if>
-      <if test="memo != null and memo != ''">
-        and MEMO = #{memo}
-      </if>
-      <if test="insertUsername != null and insertUsername != ''">
-        and INSERT_USERNAME = #{insertUsername}
-      </if>
-      <if test="insertTime != null">
-        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
-      </if>
-      <if test="updateUsername != null and updateUsername != ''">
-        and UPDATE_USERNAME = #{updateUsername}
-      </if>
-      <if test="updateTime != null">
-        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
-      </if>
-      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
-        and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
-      </if>
-      <if test="capacityCorlor != null and capacityCorlor != ''">
-        and CAPACITY_CORLOR = #{capacityCorlor}
-      </if>
-      <if test="capacityVip != null and capacityVip != ''">
-        and CAPACITY_VIP = #{capacityVip}
-      </if>
-      <if test="deleted != null">
-        and DELETED = #{deleted}
-      </if>
-    </where>
-  </sql>
-  <sql id="whereLike">
-    <where> 
-      <if test="capacityId != null">
-        and CAPACITY_ID = #{capacityId}
-      </if>
-      <if test="capacityNumber != null and capacityNumber != ''">
-        and CAPACITY_NUMBER LIKE '%${capacityNumber}%'
-      </if>
-      <if test="capacityMaxLoad != null">
-        and CAPACITY_MAX_LOAD = #{capacityMaxLoad}
-      </if>
-      <if test="capacityTypeId != null">
-        and CAPACITY_TYPE_ID = #{capacityTypeId}
-      </if>
-      <if test="capacityStatus != null">
-        and CAPACITY_STATUS = #{capacityStatus}
-      </if>
-      <if test="carrierId != null">
-        and CARRIER_ID = #{carrierId}
-      </if>
-      <if test="capacityEnergyId != null and capacityEnergyId != ''">
-        and CAPACITY_ENERGY_ID LIKE '%${capacityEnergyId}%'
-      </if>
-      <if test="capacityLenVal != null">
-        and CAPACITY_LEN_VAL = #{capacityLenVal}
-      </if>
-      <if test="capacityWidVal != null">
-        and CAPACITY_WID_VAL = #{capacityWidVal}
-      </if>
-      <if test="capacityHigVal != null">
-        and CAPACITY_HIG_VAL = #{capacityHigVal}
-      </if>
-      <if test="capacityOilId != null">
-        and CAPACITY_OIL_ID = #{capacityOilId}
-      </if>
-      <if test="capacityFuelConsumption != null and capacityFuelConsumption != ''">
-        and CAPACITY_FUEL_CONSUMPTION LIKE '%${capacityFuelConsumption}%'
-      </if>
-      <if test="capacityOwneris != null">
-        and CAPACITY_OWNERIS = #{capacityOwneris}
-      </if>
-      <if test="capacityBlacklist != null">
-        and CAPACITY_BLACKLIST = #{capacityBlacklist}
-      </if>
-      <if test="memo != null and memo != ''">
-        and MEMO LIKE '%${memo}%'
-      </if>
-      <if test="insertUsername != null and insertUsername != ''">
-        and INSERT_USERNAME LIKE '%${insertUsername}%'
-      </if>
-      <if test="insertTime != null">
-        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
-      </if>
-      <if test="updateUsername != null and updateUsername != ''">
-        and UPDATE_USERNAME LIKE '%${updateUsername}%'
-      </if>
-      <if test="updateTime != null">
-        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
-      </if>
-      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
-        and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
-      </if>
-      <if test="capacityCorlor != null and capacityCorlor != ''">
-        and CAPACITY_CORLOR LIKE '%${capacityCorlor}%'
-      </if>
-      <if test="capacityVip != null and capacityVip != ''">
-        and CAPACITY_VIP LIKE '%${capacityVip}%'
-      </if>
-      <if test="deleted != null">
-        and DELETED = #{deleted}
-      </if>
-    </where>
-  </sql>
-  <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
-    delete from RMS_CAPACITY
-    where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
-  </delete>
-  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
-    delete from RMS_CAPACITY
-    where 1!=1 
-      <if test="capacityNumber != null and capacityNumber != ''">
-        or CAPACITY_NUMBER = #{capacityNumber}
-      </if>
-      <if test="capacityMaxLoad != null">
-        or CAPACITY_MAX_LOAD = #{capacityMaxLoad}
-      </if>
-      <if test="capacityTypeId != null">
-        or CAPACITY_TYPE_ID = #{capacityTypeId}
-      </if>
-      <if test="capacityStatus != null">
-        or CAPACITY_STATUS = #{capacityStatus}
-      </if>
-      <if test="carrierId != null">
-        or CARRIER_ID = #{carrierId}
-      </if>
-      <if test="capacityEnergyId != null and capacityEnergyId != ''">
-        or CAPACITY_ENERGY_ID = #{capacityEnergyId}
-      </if>
-      <if test="capacityLenVal != null">
-        or CAPACITY_LEN_VAL = #{capacityLenVal}
-      </if>
-      <if test="capacityWidVal != null">
-        or CAPACITY_WID_VAL = #{capacityWidVal}
-      </if>
-      <if test="capacityHigVal != null">
-        or CAPACITY_HIG_VAL = #{capacityHigVal}
-      </if>
-      <if test="capacityOilId != null">
-        or CAPACITY_OIL_ID = #{capacityOilId}
-      </if>
-      <if test="capacityFuelConsumption != null and capacityFuelConsumption != ''">
-        or CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption}
-      </if>
-      <if test="capacityOwneris != null">
-        or CAPACITY_OWNERIS = #{capacityOwneris}
-      </if>
-      <if test="capacityBlacklist != null">
-        or CAPACITY_BLACKLIST = #{capacityBlacklist}
-      </if>
-      <if test="memo != null and memo != ''">
-        or MEMO = #{memo}
-      </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="capacityCorlor != null and capacityCorlor != ''">
-        or CAPACITY_CORLOR = #{capacityCorlor}
-      </if>
-      <if test="capacityVip != null and capacityVip != ''">
-        or CAPACITY_VIP = #{capacityVip}
-      </if>
-      <if test="deleted != null">
-        or DELETED = #{deleted}
-      </if>
-  </delete>
-  <insert id="insert" parameterType="com.steerinfo.dil.model.RmsCapacity">
-    insert into RMS_CAPACITY (CAPACITY_ID, CAPACITY_NUMBER, CAPACITY_MAX_LOAD, 
-      CAPACITY_TYPE_ID, CAPACITY_STATUS, CARRIER_ID, 
-      CAPACITY_ENERGY_ID, CAPACITY_LEN_VAL, CAPACITY_WID_VAL, 
-      CAPACITY_HIG_VAL, CAPACITY_OIL_ID, CAPACITY_FUEL_CONSUMPTION, 
-      CAPACITY_OWNERIS, CAPACITY_BLACKLIST, MEMO, 
-      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, CAPACITY_CORLOR, 
-      CAPACITY_VIP, DELETED)
-    values (#{capacityId,jdbcType=DECIMAL}, #{capacityNumber,jdbcType=VARCHAR}, #{capacityMaxLoad,jdbcType=DECIMAL}, 
-      #{capacityTypeId,jdbcType=DECIMAL}, #{capacityStatus,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL}, 
-      #{capacityEnergyId,jdbcType=VARCHAR}, #{capacityLenVal,jdbcType=DECIMAL}, #{capacityWidVal,jdbcType=DECIMAL}, 
-      #{capacityHigVal,jdbcType=DECIMAL}, #{capacityOilId,jdbcType=DECIMAL}, #{capacityFuelConsumption,jdbcType=VARCHAR}, 
-      #{capacityOwneris,jdbcType=DECIMAL}, #{capacityBlacklist,jdbcType=DECIMAL}, #{memo,jdbcType=VARCHAR}, 
-      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{capacityCorlor,jdbcType=VARCHAR}, 
-      #{capacityVip,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL})
-  </insert>
-  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsCapacity">
-    insert into RMS_CAPACITY
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="capacityId != null">
-        CAPACITY_ID,
-      </if>
-      <if test="capacityNumber != null">
-        CAPACITY_NUMBER,
-      </if>
-      <if test="capacityMaxLoad != null">
-        CAPACITY_MAX_LOAD,
-      </if>
-      <if test="capacityTypeId != null">
-        CAPACITY_TYPE_ID,
-      </if>
-      <if test="capacityStatus != null">
-        CAPACITY_STATUS,
-      </if>
-      <if test="carrierId != null">
-        CARRIER_ID,
-      </if>
-      <if test="capacityEnergyId != null">
-        CAPACITY_ENERGY_ID,
-      </if>
-      <if test="capacityLenVal != null">
-        CAPACITY_LEN_VAL,
-      </if>
-      <if test="capacityWidVal != null">
-        CAPACITY_WID_VAL,
-      </if>
-      <if test="capacityHigVal != null">
-        CAPACITY_HIG_VAL,
-      </if>
-      <if test="capacityOilId != null">
-        CAPACITY_OIL_ID,
-      </if>
-      <if test="capacityFuelConsumption != null">
-        CAPACITY_FUEL_CONSUMPTION,
-      </if>
-      <if test="capacityOwneris != null">
-        CAPACITY_OWNERIS,
-      </if>
-      <if test="capacityBlacklist != null">
-        CAPACITY_BLACKLIST,
-      </if>
-      <if test="memo != null">
-        MEMO,
-      </if>
-      <if test="insertUsername != null">
-        INSERT_USERNAME,
-      </if>
-      <if test="insertTime != null">
-        INSERT_TIME,
-      </if>
-      <if test="updateUsername != null">
-        UPDATE_USERNAME,
-      </if>
-      <if test="updateTime != null">
-        UPDATE_TIME,
-      </if>
-      <if test="insertUpdateRemark != null">
-        INSERT_UPDATE_REMARK,
-      </if>
-      <if test="capacityCorlor != null">
-        CAPACITY_CORLOR,
-      </if>
-      <if test="capacityVip != null">
-        CAPACITY_VIP,
-      </if>
-      <if test="deleted != null">
-        DELETED,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="capacityId != null">
-        #{capacityId,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityNumber != null">
-        #{capacityNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="capacityMaxLoad != null">
-        #{capacityMaxLoad,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityTypeId != null">
-        #{capacityTypeId,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityStatus != null">
-        #{capacityStatus,jdbcType=DECIMAL},
-      </if>
-      <if test="carrierId != null">
-        #{carrierId,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityEnergyId != null">
-        #{capacityEnergyId,jdbcType=VARCHAR},
-      </if>
-      <if test="capacityLenVal != null">
-        #{capacityLenVal,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityWidVal != null">
-        #{capacityWidVal,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityHigVal != null">
-        #{capacityHigVal,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityOilId != null">
-        #{capacityOilId,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityFuelConsumption != null">
-        #{capacityFuelConsumption,jdbcType=VARCHAR},
-      </if>
-      <if test="capacityOwneris != null">
-        #{capacityOwneris,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityBlacklist != null">
-        #{capacityBlacklist,jdbcType=DECIMAL},
-      </if>
-      <if test="memo != null">
-        #{memo,jdbcType=VARCHAR},
-      </if>
-      <if test="insertUsername != null">
-        #{insertUsername,jdbcType=VARCHAR},
-      </if>
-      <if test="insertTime != null">
-        #{insertTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="updateUsername != null">
-        #{updateUsername,jdbcType=VARCHAR},
-      </if>
-      <if test="updateTime != null">
-        #{updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="insertUpdateRemark != null">
-        #{insertUpdateRemark,jdbcType=VARCHAR},
-      </if>
-      <if test="capacityCorlor != null">
-        #{capacityCorlor,jdbcType=VARCHAR},
-      </if>
-      <if test="capacityVip != null">
-        #{capacityVip,jdbcType=VARCHAR},
-      </if>
-      <if test="deleted != null">
-        #{deleted,jdbcType=DECIMAL},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsCapacity">
-    update RMS_CAPACITY
-    set CAPACITY_NUMBER = #{capacityNumber,jdbcType=VARCHAR},
-      CAPACITY_MAX_LOAD = #{capacityMaxLoad,jdbcType=DECIMAL},
-      CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
-      CAPACITY_STATUS = #{capacityStatus,jdbcType=DECIMAL},
-      CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
-      CAPACITY_ENERGY_ID = #{capacityEnergyId,jdbcType=VARCHAR},
-      CAPACITY_LEN_VAL = #{capacityLenVal,jdbcType=DECIMAL},
-      CAPACITY_WID_VAL = #{capacityWidVal,jdbcType=DECIMAL},
-      CAPACITY_HIG_VAL = #{capacityHigVal,jdbcType=DECIMAL},
-      CAPACITY_OIL_ID = #{capacityOilId,jdbcType=DECIMAL},
-      CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption,jdbcType=VARCHAR},
-      CAPACITY_OWNERIS = #{capacityOwneris,jdbcType=DECIMAL},
-      CAPACITY_BLACKLIST = #{capacityBlacklist,jdbcType=DECIMAL},
-      MEMO = #{memo,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},
-      CAPACITY_CORLOR = #{capacityCorlor,jdbcType=VARCHAR},
-      CAPACITY_VIP = #{capacityVip,jdbcType=VARCHAR},
-      DELETED = #{deleted,jdbcType=DECIMAL}
-    where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsCapacity">
-    update RMS_CAPACITY
-    <set>
-      <if test="capacityNumber != null">
-        CAPACITY_NUMBER = #{capacityNumber,jdbcType=VARCHAR},
-      </if>
-      <if test="capacityMaxLoad != null">
-        CAPACITY_MAX_LOAD = #{capacityMaxLoad,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityTypeId != null">
-        CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityStatus != null">
-        CAPACITY_STATUS = #{capacityStatus,jdbcType=DECIMAL},
-      </if>
-      <if test="carrierId != null">
-        CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityEnergyId != null">
-        CAPACITY_ENERGY_ID = #{capacityEnergyId,jdbcType=VARCHAR},
-      </if>
-      <if test="capacityLenVal != null">
-        CAPACITY_LEN_VAL = #{capacityLenVal,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityWidVal != null">
-        CAPACITY_WID_VAL = #{capacityWidVal,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityHigVal != null">
-        CAPACITY_HIG_VAL = #{capacityHigVal,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityOilId != null">
-        CAPACITY_OIL_ID = #{capacityOilId,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityFuelConsumption != null">
-        CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption,jdbcType=VARCHAR},
-      </if>
-      <if test="capacityOwneris != null">
-        CAPACITY_OWNERIS = #{capacityOwneris,jdbcType=DECIMAL},
-      </if>
-      <if test="capacityBlacklist != null">
-        CAPACITY_BLACKLIST = #{capacityBlacklist,jdbcType=DECIMAL},
-      </if>
-      <if test="memo != null">
-        MEMO = #{memo,jdbcType=VARCHAR},
-      </if>
-      <if test="insertUsername != null">
-        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
-      </if>
-      <if test="insertTime != null">
-        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="updateUsername != null">
-        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
-      </if>
-      <if test="updateTime != null">
-        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="insertUpdateRemark != null">
-        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
-      </if>
-      <if test="capacityCorlor != null">
-        CAPACITY_CORLOR = #{capacityCorlor,jdbcType=VARCHAR},
-      </if>
-      <if test="capacityVip != null">
-        CAPACITY_VIP = #{capacityVip,jdbcType=VARCHAR},
-      </if>
-      <if test="deleted != null">
-        DELETED = #{deleted,jdbcType=DECIMAL},
-      </if>
-    </set>
-    where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
-  </update>
-  <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
-    <include refid="select" />
-    where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
-  </select>
-  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select" />
-    <include refid="where" />
-  </select>
-  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select" />
-    <include refid="whereLike" />
-  </select>
-  <insert id="batchInsert" parameterType="java.util.List">
-    insert into RMS_CAPACITY 
-      (CAPACITY_ID, 
-      CAPACITY_NUMBER, CAPACITY_MAX_LOAD, 
-      CAPACITY_TYPE_ID, CAPACITY_STATUS, 
-      CARRIER_ID, CAPACITY_ENERGY_ID, 
-      CAPACITY_LEN_VAL, CAPACITY_WID_VAL, 
-      CAPACITY_HIG_VAL, CAPACITY_OIL_ID, 
-      CAPACITY_FUEL_CONSUMPTION, CAPACITY_OWNERIS, 
-      CAPACITY_BLACKLIST, MEMO, INSERT_USERNAME, 
-      INSERT_TIME, UPDATE_USERNAME, 
-      UPDATE_TIME, INSERT_UPDATE_REMARK, 
-      CAPACITY_CORLOR, CAPACITY_VIP, 
-      DELETED)
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.capacityId,jdbcType=DECIMAL}, 
-      #{item.capacityNumber,jdbcType=VARCHAR}, #{item.capacityMaxLoad,jdbcType=DECIMAL}, 
-      #{item.capacityTypeId,jdbcType=DECIMAL}, #{item.capacityStatus,jdbcType=DECIMAL}, 
-      #{item.carrierId,jdbcType=DECIMAL}, #{item.capacityEnergyId,jdbcType=VARCHAR}, 
-      #{item.capacityLenVal,jdbcType=DECIMAL}, #{item.capacityWidVal,jdbcType=DECIMAL}, 
-      #{item.capacityHigVal,jdbcType=DECIMAL}, #{item.capacityOilId,jdbcType=DECIMAL}, 
-      #{item.capacityFuelConsumption,jdbcType=VARCHAR}, #{item.capacityOwneris,jdbcType=DECIMAL}, 
-      #{item.capacityBlacklist,jdbcType=DECIMAL}, #{item.memo,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR}, 
-      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
-      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, 
-      #{item.capacityCorlor,jdbcType=VARCHAR}, #{item.capacityVip,jdbcType=VARCHAR}, 
-      #{item.deleted,jdbcType=DECIMAL} from dual  
-   </foreach> )
-  </insert>
-  <update id="batchUpdate" parameterType="java.util.List">
-     update RMS_CAPACITY
-     set
-       CAPACITY_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
-       </foreach>
-       ,CAPACITY_NUMBER=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityNumber,jdbcType=VARCHAR}
-       </foreach>
-       ,CAPACITY_MAX_LOAD=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityMaxLoad,jdbcType=DECIMAL}
-       </foreach>
-       ,CAPACITY_TYPE_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityTypeId,jdbcType=DECIMAL}
-       </foreach>
-       ,CAPACITY_STATUS=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityStatus,jdbcType=DECIMAL}
-       </foreach>
-       ,CARRIER_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
-       </foreach>
-       ,CAPACITY_ENERGY_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityEnergyId,jdbcType=VARCHAR}
-       </foreach>
-       ,CAPACITY_LEN_VAL=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityLenVal,jdbcType=DECIMAL}
-       </foreach>
-       ,CAPACITY_WID_VAL=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityWidVal,jdbcType=DECIMAL}
-       </foreach>
-       ,CAPACITY_HIG_VAL=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityHigVal,jdbcType=DECIMAL}
-       </foreach>
-       ,CAPACITY_OIL_ID=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityOilId,jdbcType=DECIMAL}
-       </foreach>
-       ,CAPACITY_FUEL_CONSUMPTION=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityFuelConsumption,jdbcType=VARCHAR}
-       </foreach>
-       ,CAPACITY_OWNERIS=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityOwneris,jdbcType=DECIMAL}
-       </foreach>
-       ,CAPACITY_BLACKLIST=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityBlacklist,jdbcType=DECIMAL}
-       </foreach>
-       ,MEMO=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.memo,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,INSERT_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,UPDATE_USERNAME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
-       </foreach>
-       ,UPDATE_TIME=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
-       </foreach>
-       ,INSERT_UPDATE_REMARK=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
-       </foreach>
-       ,CAPACITY_CORLOR=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityCorlor,jdbcType=VARCHAR}
-       </foreach>
-       ,CAPACITY_VIP=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityVip,jdbcType=VARCHAR}
-       </foreach>
-       ,DELETED=
-       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
-          when #{item.capacityId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
-       </foreach>
-     where CAPACITY_ID in 
-     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
-    #{item.capacityId,jdbcType=DECIMAL}
-     </foreach> 
-  </update>
-  <delete id="batchDelete" parameterType="java.util.List">
-    delete from RMS_CAPACITY
-    where CAPACITY_ID in 
-    <foreach close=")" collection="list" item="id" open="(" separator=",">
-      #{id}
-    </foreach>
-  </delete>
-  <!-- 友情提示!!!-->
-  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  
-  
+    </sql>
+    <sql id="select">
+        SELECT
+        <include refid="columns"/>
+        FROM RMS_CAPACITY
+    </sql>
+    <sql id="select_alias">
+        SELECT
+        <include refid="columns_alias"/>
+        FROM RMS_CAPACITY t
+    </sql>
+    <sql id="where">
+        <where>
+            <if test="capacityId != null">
+                and CAPACITY_ID = #{capacityId}
+            </if>
+            <if test="capacityNumber != null and capacityNumber != ''">
+                and CAPACITY_NUMBER = #{capacityNumber}
+            </if>
+            <if test="capacityMaxLoad != null">
+                and CAPACITY_MAX_LOAD = #{capacityMaxLoad}
+            </if>
+            <if test="capacityTypeId != null">
+                and CAPACITY_TYPE_ID = #{capacityTypeId}
+            </if>
+            <if test="capacityStatus != null">
+                and CAPACITY_STATUS = #{capacityStatus}
+            </if>
+            <if test="carrierId != null">
+                and CARRIER_ID = #{carrierId}
+            </if>
+            <if test="capacityEnergyId != null and capacityEnergyId != ''">
+                and CAPACITY_ENERGY_ID = #{capacityEnergyId}
+            </if>
+            <if test="capacityLenVal != null">
+                and CAPACITY_LEN_VAL = #{capacityLenVal}
+            </if>
+            <if test="capacityWidVal != null">
+                and CAPACITY_WID_VAL = #{capacityWidVal}
+            </if>
+            <if test="capacityHigVal != null">
+                and CAPACITY_HIG_VAL = #{capacityHigVal}
+            </if>
+            <if test="capacityOilId != null">
+                and CAPACITY_OIL_ID = #{capacityOilId}
+            </if>
+            <if test="capacityFuelConsumption != null and capacityFuelConsumption != ''">
+                and CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption}
+            </if>
+            <if test="capacityOwneris != null">
+                and CAPACITY_OWNERIS = #{capacityOwneris}
+            </if>
+            <if test="capacityBlacklist != null">
+                and CAPACITY_BLACKLIST = #{capacityBlacklist}
+            </if>
+            <if test="memo != null and memo != ''">
+                and MEMO = #{memo}
+            </if>
+            <if test="insertUsername != null and insertUsername != ''">
+                and INSERT_USERNAME = #{insertUsername}
+            </if>
+            <if test="insertTime != null">
+                and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+            </if>
+            <if test="updateUsername != null and updateUsername != ''">
+                and UPDATE_USERNAME = #{updateUsername}
+            </if>
+            <if test="updateTime != null">
+                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+            </if>
+            <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+                and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+            </if>
+            <if test="capacityCorlor != null and capacityCorlor != ''">
+                and CAPACITY_CORLOR = #{capacityCorlor}
+            </if>
+            <if test="capacityVip != null and capacityVip != ''">
+                and CAPACITY_VIP = #{capacityVip}
+            </if>
+            <if test="deleted != null">
+                and DELETED = #{deleted}
+            </if>
+        </where>
+    </sql>
+    <sql id="whereLike">
+        <where>
+            <if test="capacityId != null">
+                and CAPACITY_ID = #{capacityId}
+            </if>
+            <if test="capacityNumber != null and capacityNumber != ''">
+                and CAPACITY_NUMBER LIKE '%${capacityNumber}%'
+            </if>
+            <if test="capacityMaxLoad != null">
+                and CAPACITY_MAX_LOAD = #{capacityMaxLoad}
+            </if>
+            <if test="capacityTypeId != null">
+                and CAPACITY_TYPE_ID = #{capacityTypeId}
+            </if>
+            <if test="capacityStatus != null">
+                and CAPACITY_STATUS = #{capacityStatus}
+            </if>
+            <if test="carrierId != null">
+                and CARRIER_ID = #{carrierId}
+            </if>
+            <if test="capacityEnergyId != null and capacityEnergyId != ''">
+                and CAPACITY_ENERGY_ID LIKE '%${capacityEnergyId}%'
+            </if>
+            <if test="capacityLenVal != null">
+                and CAPACITY_LEN_VAL = #{capacityLenVal}
+            </if>
+            <if test="capacityWidVal != null">
+                and CAPACITY_WID_VAL = #{capacityWidVal}
+            </if>
+            <if test="capacityHigVal != null">
+                and CAPACITY_HIG_VAL = #{capacityHigVal}
+            </if>
+            <if test="capacityOilId != null">
+                and CAPACITY_OIL_ID = #{capacityOilId}
+            </if>
+            <if test="capacityFuelConsumption != null and capacityFuelConsumption != ''">
+                and CAPACITY_FUEL_CONSUMPTION LIKE '%${capacityFuelConsumption}%'
+            </if>
+            <if test="capacityOwneris != null">
+                and CAPACITY_OWNERIS = #{capacityOwneris}
+            </if>
+            <if test="capacityBlacklist != null">
+                and CAPACITY_BLACKLIST = #{capacityBlacklist}
+            </if>
+            <if test="memo != null and memo != ''">
+                and MEMO LIKE '%${memo}%'
+            </if>
+            <if test="insertUsername != null and insertUsername != ''">
+                and INSERT_USERNAME LIKE '%${insertUsername}%'
+            </if>
+            <if test="insertTime != null">
+                and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+            </if>
+            <if test="updateUsername != null and updateUsername != ''">
+                and UPDATE_USERNAME LIKE '%${updateUsername}%'
+            </if>
+            <if test="updateTime != null">
+                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+            </if>
+            <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+                and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+            </if>
+            <if test="capacityCorlor != null and capacityCorlor != ''">
+                and CAPACITY_CORLOR LIKE '%${capacityCorlor}%'
+            </if>
+            <if test="capacityVip != null and capacityVip != ''">
+                and CAPACITY_VIP LIKE '%${capacityVip}%'
+            </if>
+            <if test="deleted != null">
+                and DELETED = #{deleted}
+            </if>
+        </where>
+    </sql>
+    <delete id="deleteByPrimaryKey" parameterType="DECIMAL">
+        delete
+        from RMS_CAPACITY
+        where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
+    </delete>
+    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+        delete from RMS_CAPACITY
+        where 1!=1
+        <if test="capacityNumber != null and capacityNumber != ''">
+            or CAPACITY_NUMBER = #{capacityNumber}
+        </if>
+        <if test="capacityMaxLoad != null">
+            or CAPACITY_MAX_LOAD = #{capacityMaxLoad}
+        </if>
+        <if test="capacityTypeId != null">
+            or CAPACITY_TYPE_ID = #{capacityTypeId}
+        </if>
+        <if test="capacityStatus != null">
+            or CAPACITY_STATUS = #{capacityStatus}
+        </if>
+        <if test="carrierId != null">
+            or CARRIER_ID = #{carrierId}
+        </if>
+        <if test="capacityEnergyId != null and capacityEnergyId != ''">
+            or CAPACITY_ENERGY_ID = #{capacityEnergyId}
+        </if>
+        <if test="capacityLenVal != null">
+            or CAPACITY_LEN_VAL = #{capacityLenVal}
+        </if>
+        <if test="capacityWidVal != null">
+            or CAPACITY_WID_VAL = #{capacityWidVal}
+        </if>
+        <if test="capacityHigVal != null">
+            or CAPACITY_HIG_VAL = #{capacityHigVal}
+        </if>
+        <if test="capacityOilId != null">
+            or CAPACITY_OIL_ID = #{capacityOilId}
+        </if>
+        <if test="capacityFuelConsumption != null and capacityFuelConsumption != ''">
+            or CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption}
+        </if>
+        <if test="capacityOwneris != null">
+            or CAPACITY_OWNERIS = #{capacityOwneris}
+        </if>
+        <if test="capacityBlacklist != null">
+            or CAPACITY_BLACKLIST = #{capacityBlacklist}
+        </if>
+        <if test="memo != null and memo != ''">
+            or MEMO = #{memo}
+        </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="capacityCorlor != null and capacityCorlor != ''">
+            or CAPACITY_CORLOR = #{capacityCorlor}
+        </if>
+        <if test="capacityVip != null and capacityVip != ''">
+            or CAPACITY_VIP = #{capacityVip}
+        </if>
+        <if test="deleted != null">
+            or DELETED = #{deleted}
+        </if>
+    </delete>
+    <insert id="insert" parameterType="com.steerinfo.dil.model.RmsCapacity">
+        insert into RMS_CAPACITY (CAPACITY_ID, CAPACITY_NUMBER, CAPACITY_MAX_LOAD,
+                                  CAPACITY_TYPE_ID, CAPACITY_STATUS, CARRIER_ID,
+                                  CAPACITY_ENERGY_ID, CAPACITY_LEN_VAL, CAPACITY_WID_VAL,
+                                  CAPACITY_HIG_VAL, CAPACITY_OIL_ID, CAPACITY_FUEL_CONSUMPTION,
+                                  CAPACITY_OWNERIS, CAPACITY_BLACKLIST, MEMO,
+                                  INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+                                  UPDATE_TIME, INSERT_UPDATE_REMARK, CAPACITY_CORLOR,
+                                  CAPACITY_VIP, DELETED)
+        values (#{capacityId,jdbcType=DECIMAL}, #{capacityNumber,jdbcType=VARCHAR}, #{capacityMaxLoad,jdbcType=DECIMAL},
+                #{capacityTypeId,jdbcType=DECIMAL}, #{capacityStatus,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL},
+                #{capacityEnergyId,jdbcType=VARCHAR}, #{capacityLenVal,jdbcType=DECIMAL},
+                #{capacityWidVal,jdbcType=DECIMAL},
+                #{capacityHigVal,jdbcType=DECIMAL}, #{capacityOilId,jdbcType=DECIMAL},
+                #{capacityFuelConsumption,jdbcType=VARCHAR},
+                #{capacityOwneris,jdbcType=DECIMAL}, #{capacityBlacklist,jdbcType=DECIMAL}, #{memo,jdbcType=VARCHAR},
+                #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+                #{updateUsername,jdbcType=VARCHAR},
+                #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
+                #{capacityCorlor,jdbcType=VARCHAR},
+                #{capacityVip,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL})
+    </insert>
+    <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsCapacity">
+        insert into RMS_CAPACITY
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="capacityId != null">
+                CAPACITY_ID,
+            </if>
+            <if test="capacityNumber != null">
+                CAPACITY_NUMBER,
+            </if>
+            <if test="capacityMaxLoad != null">
+                CAPACITY_MAX_LOAD,
+            </if>
+            <if test="capacityTypeId != null">
+                CAPACITY_TYPE_ID,
+            </if>
+            <if test="capacityStatus != null">
+                CAPACITY_STATUS,
+            </if>
+            <if test="carrierId != null">
+                CARRIER_ID,
+            </if>
+            <if test="capacityEnergyId != null">
+                CAPACITY_ENERGY_ID,
+            </if>
+            <if test="capacityLenVal != null">
+                CAPACITY_LEN_VAL,
+            </if>
+            <if test="capacityWidVal != null">
+                CAPACITY_WID_VAL,
+            </if>
+            <if test="capacityHigVal != null">
+                CAPACITY_HIG_VAL,
+            </if>
+            <if test="capacityOilId != null">
+                CAPACITY_OIL_ID,
+            </if>
+            <if test="capacityFuelConsumption != null">
+                CAPACITY_FUEL_CONSUMPTION,
+            </if>
+            <if test="capacityOwneris != null">
+                CAPACITY_OWNERIS,
+            </if>
+            <if test="capacityBlacklist != null">
+                CAPACITY_BLACKLIST,
+            </if>
+            <if test="memo != null">
+                MEMO,
+            </if>
+            <if test="insertUsername != null">
+                INSERT_USERNAME,
+            </if>
+            <if test="insertTime != null">
+                INSERT_TIME,
+            </if>
+            <if test="updateUsername != null">
+                UPDATE_USERNAME,
+            </if>
+            <if test="updateTime != null">
+                UPDATE_TIME,
+            </if>
+            <if test="insertUpdateRemark != null">
+                INSERT_UPDATE_REMARK,
+            </if>
+            <if test="capacityCorlor != null">
+                CAPACITY_CORLOR,
+            </if>
+            <if test="capacityVip != null">
+                CAPACITY_VIP,
+            </if>
+            <if test="deleted != null">
+                DELETED,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="capacityId != null">
+                #{capacityId,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityNumber != null">
+                #{capacityNumber,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityMaxLoad != null">
+                #{capacityMaxLoad,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityTypeId != null">
+                #{capacityTypeId,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityStatus != null">
+                #{capacityStatus,jdbcType=DECIMAL},
+            </if>
+            <if test="carrierId != null">
+                #{carrierId,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityEnergyId != null">
+                #{capacityEnergyId,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityLenVal != null">
+                #{capacityLenVal,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityWidVal != null">
+                #{capacityWidVal,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityHigVal != null">
+                #{capacityHigVal,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityOilId != null">
+                #{capacityOilId,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityFuelConsumption != null">
+                #{capacityFuelConsumption,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityOwneris != null">
+                #{capacityOwneris,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityBlacklist != null">
+                #{capacityBlacklist,jdbcType=DECIMAL},
+            </if>
+            <if test="memo != null">
+                #{memo,jdbcType=VARCHAR},
+            </if>
+            <if test="insertUsername != null">
+                #{insertUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="insertTime != null">
+                #{insertTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUsername != null">
+                #{updateUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="insertUpdateRemark != null">
+                #{insertUpdateRemark,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityCorlor != null">
+                #{capacityCorlor,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityVip != null">
+                #{capacityVip,jdbcType=VARCHAR},
+            </if>
+            <if test="deleted != null">
+                #{deleted,jdbcType=DECIMAL},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsCapacity">
+        update RMS_CAPACITY
+        set CAPACITY_NUMBER           = #{capacityNumber,jdbcType=VARCHAR},
+            CAPACITY_MAX_LOAD         = #{capacityMaxLoad,jdbcType=DECIMAL},
+            CAPACITY_TYPE_ID          = #{capacityTypeId,jdbcType=DECIMAL},
+            CAPACITY_STATUS           = #{capacityStatus,jdbcType=DECIMAL},
+            CARRIER_ID                = #{carrierId,jdbcType=DECIMAL},
+            CAPACITY_ENERGY_ID        = #{capacityEnergyId,jdbcType=VARCHAR},
+            CAPACITY_LEN_VAL          = #{capacityLenVal,jdbcType=DECIMAL},
+            CAPACITY_WID_VAL          = #{capacityWidVal,jdbcType=DECIMAL},
+            CAPACITY_HIG_VAL          = #{capacityHigVal,jdbcType=DECIMAL},
+            CAPACITY_OIL_ID           = #{capacityOilId,jdbcType=DECIMAL},
+            CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption,jdbcType=VARCHAR},
+            CAPACITY_OWNERIS          = #{capacityOwneris,jdbcType=DECIMAL},
+            CAPACITY_BLACKLIST        = #{capacityBlacklist,jdbcType=DECIMAL},
+            MEMO                      = #{memo,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},
+            CAPACITY_CORLOR           = #{capacityCorlor,jdbcType=VARCHAR},
+            CAPACITY_VIP              = #{capacityVip,jdbcType=VARCHAR},
+            DELETED                   = #{deleted,jdbcType=DECIMAL}
+        where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsCapacity">
+        update RMS_CAPACITY
+        <set>
+            <if test="capacityNumber != null">
+                CAPACITY_NUMBER = #{capacityNumber,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityMaxLoad != null">
+                CAPACITY_MAX_LOAD = #{capacityMaxLoad,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityTypeId != null">
+                CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityStatus != null">
+                CAPACITY_STATUS = #{capacityStatus,jdbcType=DECIMAL},
+            </if>
+            <if test="carrierId != null">
+                CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityEnergyId != null">
+                CAPACITY_ENERGY_ID = #{capacityEnergyId,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityLenVal != null">
+                CAPACITY_LEN_VAL = #{capacityLenVal,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityWidVal != null">
+                CAPACITY_WID_VAL = #{capacityWidVal,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityHigVal != null">
+                CAPACITY_HIG_VAL = #{capacityHigVal,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityOilId != null">
+                CAPACITY_OIL_ID = #{capacityOilId,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityFuelConsumption != null">
+                CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityOwneris != null">
+                CAPACITY_OWNERIS = #{capacityOwneris,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityBlacklist != null">
+                CAPACITY_BLACKLIST = #{capacityBlacklist,jdbcType=DECIMAL},
+            </if>
+            <if test="memo != null">
+                MEMO = #{memo,jdbcType=VARCHAR},
+            </if>
+            <if test="insertUsername != null">
+                INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="insertTime != null">
+                INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUsername != null">
+                UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime != null">
+                UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="insertUpdateRemark != null">
+                INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityCorlor != null">
+                CAPACITY_CORLOR = #{capacityCorlor,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityVip != null">
+                CAPACITY_VIP = #{capacityVip,jdbcType=VARCHAR},
+            </if>
+            <if test="deleted != null">
+                DELETED = #{deleted,jdbcType=DECIMAL},
+            </if>
+        </set>
+        where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
+    </update>
+    <select id="selectByPrimaryKey" parameterType="DECIMAL" resultMap="BaseResultMap">
+        <include refid="select"/>
+        where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
+    </select>
+    <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+        <include refid="select"/>
+        <include refid="where"/>
+    </select>
+    <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+        <include refid="select"/>
+        <include refid="whereLike"/>
+    </select>
+    <insert id="batchInsert" parameterType="java.util.List">
+        insert into RMS_CAPACITY
+        (CAPACITY_ID,
+        CAPACITY_NUMBER, CAPACITY_MAX_LOAD,
+        CAPACITY_TYPE_ID, CAPACITY_STATUS,
+        CARRIER_ID, CAPACITY_ENERGY_ID,
+        CAPACITY_LEN_VAL, CAPACITY_WID_VAL,
+        CAPACITY_HIG_VAL, CAPACITY_OIL_ID,
+        CAPACITY_FUEL_CONSUMPTION, CAPACITY_OWNERIS,
+        CAPACITY_BLACKLIST, MEMO, INSERT_USERNAME,
+        INSERT_TIME, UPDATE_USERNAME,
+        UPDATE_TIME, INSERT_UPDATE_REMARK,
+        CAPACITY_CORLOR, CAPACITY_VIP,
+        DELETED)
+        ( <foreach collection="list" item="item" separator="union all">
+        select
+        #{item.capacityId,jdbcType=DECIMAL},
+        #{item.capacityNumber,jdbcType=VARCHAR}, #{item.capacityMaxLoad,jdbcType=DECIMAL},
+        #{item.capacityTypeId,jdbcType=DECIMAL}, #{item.capacityStatus,jdbcType=DECIMAL},
+        #{item.carrierId,jdbcType=DECIMAL}, #{item.capacityEnergyId,jdbcType=VARCHAR},
+        #{item.capacityLenVal,jdbcType=DECIMAL}, #{item.capacityWidVal,jdbcType=DECIMAL},
+        #{item.capacityHigVal,jdbcType=DECIMAL}, #{item.capacityOilId,jdbcType=DECIMAL},
+        #{item.capacityFuelConsumption,jdbcType=VARCHAR}, #{item.capacityOwneris,jdbcType=DECIMAL},
+        #{item.capacityBlacklist,jdbcType=DECIMAL}, #{item.memo,jdbcType=VARCHAR},
+        #{item.insertUsername,jdbcType=VARCHAR},
+        #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
+        #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
+        #{item.capacityCorlor,jdbcType=VARCHAR}, #{item.capacityVip,jdbcType=VARCHAR},
+        #{item.deleted,jdbcType=DECIMAL} from dual
+    </foreach> )
+    </insert>
+    <update id="batchUpdate" parameterType="java.util.List">
+        update RMS_CAPACITY
+        set
+        CAPACITY_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
+        </foreach>
+        ,CAPACITY_NUMBER=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityNumber,jdbcType=VARCHAR}
+        </foreach>
+        ,CAPACITY_MAX_LOAD=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityMaxLoad,jdbcType=DECIMAL}
+        </foreach>
+        ,CAPACITY_TYPE_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityTypeId,jdbcType=DECIMAL}
+        </foreach>
+        ,CAPACITY_STATUS=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityStatus,jdbcType=DECIMAL}
+        </foreach>
+        ,CARRIER_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
+        </foreach>
+        ,CAPACITY_ENERGY_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityEnergyId,jdbcType=VARCHAR}
+        </foreach>
+        ,CAPACITY_LEN_VAL=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityLenVal,jdbcType=DECIMAL}
+        </foreach>
+        ,CAPACITY_WID_VAL=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityWidVal,jdbcType=DECIMAL}
+        </foreach>
+        ,CAPACITY_HIG_VAL=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityHigVal,jdbcType=DECIMAL}
+        </foreach>
+        ,CAPACITY_OIL_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityOilId,jdbcType=DECIMAL}
+        </foreach>
+        ,CAPACITY_FUEL_CONSUMPTION=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityFuelConsumption,jdbcType=VARCHAR}
+        </foreach>
+        ,CAPACITY_OWNERIS=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityOwneris,jdbcType=DECIMAL}
+        </foreach>
+        ,CAPACITY_BLACKLIST=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityBlacklist,jdbcType=DECIMAL}
+        </foreach>
+        ,MEMO=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.memo,jdbcType=VARCHAR}
+        </foreach>
+        ,INSERT_USERNAME=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,INSERT_TIME=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,UPDATE_USERNAME=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,UPDATE_TIME=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,INSERT_UPDATE_REMARK=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+        </foreach>
+        ,CAPACITY_CORLOR=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityCorlor,jdbcType=VARCHAR}
+        </foreach>
+        ,CAPACITY_VIP=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityVip,jdbcType=VARCHAR}
+        </foreach>
+        ,DELETED=
+        <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+            when #{item.capacityId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+        </foreach>
+        where CAPACITY_ID in
+        <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+            #{item.capacityId,jdbcType=DECIMAL}
+        </foreach>
+    </update>
+    <delete id="batchDelete" parameterType="java.util.List">
+        delete from RMS_CAPACITY
+        where CAPACITY_ID in
+        <foreach close=")" collection="list" item="id" open="(" separator=",">
+            #{id}
+        </foreach>
+    </delete>
+    <!-- 友情提示!!!-->
+    <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+    <select id="warehouseId" resultType="java.util.Map">
+        select RW.WAREHOUSE_ID AS "warehouseId"
+        from RMS_WAREHOUSE RW
+        WHERE RW.WAREHOUSE_TYPE_ID = 1
+        order by rw.WAREHOUSE_ID
+    </select>
+
+    <select id="platformId" resultType="java.util.Map">
+        select rpp.PLATFORM_ID as "platformId"
+        from RMS_PWAREHOUSE_PLATFORM rpp
+        order by rpp.PLATFORM_ID asc
+    </select>
+
+    <select id="stackingId" resultType="java.util.Map">
+        select rs.STACKING_ID as "stackingId"
+        from RMS_STACKING rs
+        order by rs.STACKING_ID asc
+    </select>
 </mapper>

+ 370 - 0
src/main/resources/com/steerinfo/dil/mapper/RmsPwarehouseGridMapper.xml

@@ -0,0 +1,370 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.steerinfo.dil.mapper.RmsPwarehouseGridMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsPwarehouseGrid">
+    <id column="GRID_ID" jdbcType="DECIMAL" property="gridId" />
+    <result column="WAREHOUSE_ID" jdbcType="DECIMAL" property="warehouseId" />
+    <result column="PLATFORM_ID" jdbcType="DECIMAL" property="platformId" />
+    <result column="STACKING_ID" jdbcType="DECIMAL" property="stackingId" />
+    <result column="GRID_GRADATION_NUMBER" jdbcType="DECIMAL" property="gridGradationNumber" />
+    <result column="GRID_SEQUENCE_NUMBER" jdbcType="DECIMAL" property="gridSequenceNumber" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <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" />
+  </resultMap>
+  <sql id="columns">
+    GRID_ID, WAREHOUSE_ID, PLATFORM_ID, STACKING_ID, GRID_GRADATION_NUMBER, GRID_SEQUENCE_NUMBER, 
+    INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="columns_alias">
+    t.GRID_ID, t.WAREHOUSE_ID, t.PLATFORM_ID, t.STACKING_ID, t.GRID_GRADATION_NUMBER, 
+    t.GRID_SEQUENCE_NUMBER, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, 
+    t.INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM RMS_PWAREHOUSE_GRID
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM RMS_PWAREHOUSE_GRID t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="gridId != null">
+        and GRID_ID = #{gridId}
+      </if>
+      <if test="warehouseId != null">
+        and WAREHOUSE_ID = #{warehouseId}
+      </if>
+      <if test="platformId != null">
+        and PLATFORM_ID = #{platformId}
+      </if>
+      <if test="stackingId != null">
+        and STACKING_ID = #{stackingId}
+      </if>
+      <if test="gridGradationNumber != null">
+        and GRID_GRADATION_NUMBER = #{gridGradationNumber}
+      </if>
+      <if test="gridSequenceNumber != null">
+        and GRID_SEQUENCE_NUMBER = #{gridSequenceNumber}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="gridId != null">
+        and GRID_ID = #{gridId}
+      </if>
+      <if test="warehouseId != null">
+        and WAREHOUSE_ID = #{warehouseId}
+      </if>
+      <if test="platformId != null">
+        and PLATFORM_ID = #{platformId}
+      </if>
+      <if test="stackingId != null">
+        and STACKING_ID = #{stackingId}
+      </if>
+      <if test="gridGradationNumber != null">
+        and GRID_GRADATION_NUMBER = #{gridGradationNumber}
+      </if>
+      <if test="gridSequenceNumber != null">
+        and GRID_SEQUENCE_NUMBER = #{gridSequenceNumber}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from RMS_PWAREHOUSE_GRID
+    where GRID_ID = #{gridId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from RMS_PWAREHOUSE_GRID
+    where 1!=1 
+      <if test="warehouseId != null">
+        or WAREHOUSE_ID = #{warehouseId}
+      </if>
+      <if test="platformId != null">
+        or PLATFORM_ID = #{platformId}
+      </if>
+      <if test="stackingId != null">
+        or STACKING_ID = #{stackingId}
+      </if>
+      <if test="gridGradationNumber != null">
+        or GRID_GRADATION_NUMBER = #{gridGradationNumber}
+      </if>
+      <if test="gridSequenceNumber != null">
+        or GRID_SEQUENCE_NUMBER = #{gridSequenceNumber}
+      </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>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.RmsPwarehouseGrid">
+    insert into RMS_PWAREHOUSE_GRID (GRID_ID, WAREHOUSE_ID, PLATFORM_ID, 
+      STACKING_ID, GRID_GRADATION_NUMBER, GRID_SEQUENCE_NUMBER, 
+      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK)
+    values (#{gridId,jdbcType=DECIMAL}, #{warehouseId,jdbcType=DECIMAL}, #{platformId,jdbcType=DECIMAL}, 
+      #{stackingId,jdbcType=DECIMAL}, #{gridGradationNumber,jdbcType=DECIMAL}, #{gridSequenceNumber,jdbcType=DECIMAL}, 
+      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsPwarehouseGrid">
+    insert into RMS_PWAREHOUSE_GRID
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="gridId != null">
+        GRID_ID,
+      </if>
+      <if test="warehouseId != null">
+        WAREHOUSE_ID,
+      </if>
+      <if test="platformId != null">
+        PLATFORM_ID,
+      </if>
+      <if test="stackingId != null">
+        STACKING_ID,
+      </if>
+      <if test="gridGradationNumber != null">
+        GRID_GRADATION_NUMBER,
+      </if>
+      <if test="gridSequenceNumber != null">
+        GRID_SEQUENCE_NUMBER,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="gridId != null">
+        #{gridId,jdbcType=DECIMAL},
+      </if>
+      <if test="warehouseId != null">
+        #{warehouseId,jdbcType=DECIMAL},
+      </if>
+      <if test="platformId != null">
+        #{platformId,jdbcType=DECIMAL},
+      </if>
+      <if test="stackingId != null">
+        #{stackingId,jdbcType=DECIMAL},
+      </if>
+      <if test="gridGradationNumber != null">
+        #{gridGradationNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="gridSequenceNumber != null">
+        #{gridSequenceNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsPwarehouseGrid">
+    update RMS_PWAREHOUSE_GRID
+    set WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
+      PLATFORM_ID = #{platformId,jdbcType=DECIMAL},
+      STACKING_ID = #{stackingId,jdbcType=DECIMAL},
+      GRID_GRADATION_NUMBER = #{gridGradationNumber,jdbcType=DECIMAL},
+      GRID_SEQUENCE_NUMBER = #{gridSequenceNumber,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}
+    where GRID_ID = #{gridId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsPwarehouseGrid">
+    update RMS_PWAREHOUSE_GRID
+    <set>
+      <if test="warehouseId != null">
+        WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
+      </if>
+      <if test="platformId != null">
+        PLATFORM_ID = #{platformId,jdbcType=DECIMAL},
+      </if>
+      <if test="stackingId != null">
+        STACKING_ID = #{stackingId,jdbcType=DECIMAL},
+      </if>
+      <if test="gridGradationNumber != null">
+        GRID_GRADATION_NUMBER = #{gridGradationNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="gridSequenceNumber != null">
+        GRID_SEQUENCE_NUMBER = #{gridSequenceNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where GRID_ID = #{gridId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select" />
+    where GRID_ID = #{gridId,jdbcType=DECIMAL}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="where" />
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="whereLike" />
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into RMS_PWAREHOUSE_GRID 
+      (GRID_ID, 
+      WAREHOUSE_ID, PLATFORM_ID, STACKING_ID, 
+      GRID_GRADATION_NUMBER, GRID_SEQUENCE_NUMBER, 
+      INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.gridId,jdbcType=DECIMAL}, 
+      #{item.warehouseId,jdbcType=DECIMAL}, #{item.platformId,jdbcType=DECIMAL}, #{item.stackingId,jdbcType=DECIMAL}, 
+      #{item.gridGradationNumber,jdbcType=DECIMAL}, #{item.gridSequenceNumber,jdbcType=DECIMAL}, 
+      #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, 
+      #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
+      #{item.insertUpdateRemark,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update RMS_PWAREHOUSE_GRID
+     set
+       GRID_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case GRID_ID" separator=" ">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.gridId,jdbcType=DECIMAL}
+       </foreach>
+       ,WAREHOUSE_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case GRID_ID" separator=" ">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.warehouseId,jdbcType=DECIMAL}
+       </foreach>
+       ,PLATFORM_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case GRID_ID" separator=" ">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.platformId,jdbcType=DECIMAL}
+       </foreach>
+       ,STACKING_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case GRID_ID" separator=" ">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.stackingId,jdbcType=DECIMAL}
+       </foreach>
+       ,GRID_GRADATION_NUMBER=
+       <foreach close="end" collection="list" index="index" item="item" open="case GRID_ID" separator=" ">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.gridGradationNumber,jdbcType=DECIMAL}
+       </foreach>
+       ,GRID_SEQUENCE_NUMBER=
+       <foreach close="end" collection="list" index="index" item="item" open="case GRID_ID" separator=" ">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.gridSequenceNumber,jdbcType=DECIMAL}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case GRID_ID" separator=" ">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case GRID_ID" separator=" ">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case GRID_ID" separator=" ">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case GRID_ID" separator=" ">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach close="end" collection="list" index="index" item="item" open="case GRID_ID" separator=" ">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+     where GRID_ID in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.gridId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from RMS_PWAREHOUSE_GRID
+    where GRID_ID in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+  
+</mapper>