Redeem 1 년 전
부모
커밋
e140cb7764

+ 5 - 3
pom.xml

@@ -5,8 +5,8 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.example</groupId>
-    <artifactId>dil-api</artifactId>
-    <version>1.0-SNAPSHOT</version>
+    <artifactId>dil-wms-api</artifactId>
+    <version>1.4</version>
 
     <parent>
         <groupId>org.springframework.boot</groupId>
@@ -132,7 +132,9 @@
 <!--                        <param>WMSP_INBOUND_DRIVING_RESULT</param>-->
 <!--                        <param>WMSP_INBOUND_SCAN_RESULT</param>-->
 <!--                            <param>RMS_PWAREHOUSE_GRID</param>-->
-                        <param>WMSP_INBOUND_EAS</param>-->
+<!--                        <param>OYE_INBOUND_RESULT</param>-->
+<!--                        <param>OYE_REALTIME_INVENTORY</param>-->
+                        <param>OYE_OUTBOUND_RESULT</param>
                     </tables>
                 </configuration>
                 <executions>

+ 139 - 0
src/main/java/com/steerinfo/dil/controller/OyeResultController.java

@@ -0,0 +1,139 @@
+package com.steerinfo.dil.controller;
+
+
+import com.steerinfo.dil.service.impl.OyeResultServiceImpl;
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.ColumnDataUtil;
+import com.steerinfo.dil.util.DataChange;
+import com.steerinfo.dil.util.PageListAdd;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageHelper;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.text.SimpleDateFormat;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("${api.version}/OyeResult")
+public class OyeResultController extends BaseRESTfulController {
+
+    private final SimpleDateFormat sdfDateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+    @Resource
+    OyeResultServiceImpl oyeResultService;
+
+    @Resource
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation("查询入库实绩")
+    @PostMapping("/getOyeInboundResult")
+    public RESTfulResult getOyeInboundResult(@RequestBody(required = false) Map<String,Object> mapValue,
+                                             Integer apiId,
+                                             Integer pageNum,
+                                             Integer pageSize,
+                                             String con,
+                                             String startTime,
+                                             String endTime) {
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
+        if (mapValue==null){
+            mapValue=new HashMap<>();
+        }
+        if (con != null && !"null".equals(con)){
+            mapValue.put("con","%" + con + "%");
+        }
+        PageHelper.startPage(pageNum, pageSize);
+        //分页查询数据
+        List<Map<String, Object>> columnList = oyeResultService.getOyeInboundResult(mapValue);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
+        return success(data);
+
+    }
+
+    @ApiOperation("查询出库实绩")
+    @PostMapping("/getOyeOutboundResult")
+    public RESTfulResult getOyeOutboundResult(@RequestBody(required = false) Map<String,Object> mapValue,
+                                             Integer apiId,
+                                             Integer pageNum,
+                                             Integer pageSize,
+                                             String con,
+                                              String startTime,
+                                              String endTime) {
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
+        if (mapValue==null){
+            mapValue=new HashMap<>();
+        }
+        if (con != null && !"null".equals(con)){
+            mapValue.put("con","%" + con + "%");
+        }
+        PageHelper.startPage(pageNum, pageSize);
+        //分页查询数据
+        List<Map<String, Object>> columnList = oyeResultService.getOyeOutboundResult(mapValue);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
+        return success(data);
+    }
+
+
+    @ApiOperation("查询实时库存")
+    @PostMapping("/getOyeRealTimeResult")
+    public RESTfulResult getOyeRealTimeResult(@RequestBody(required = false) Map<String,Object> mapValue,
+                                              Integer apiId,
+                                              Integer pageNum,
+                                              Integer pageSize,
+                                              String con,
+                                              String startTime,
+                                              String endTime) {
+        DataChange.queryDataByDateTime(startTime, endTime, mapValue, sdfDateTime);//根据时间段查询数据
+        if (mapValue==null){
+            mapValue=new HashMap<>();
+        }
+        if (con != null && !"null".equals(con)){
+            mapValue.put("con","%" + con + "%");
+        }
+        PageHelper.startPage(pageNum, pageSize);
+        //分页查询数据
+        List<Map<String, Object>> columnList = oyeResultService.getOyeRealTimeResult(mapValue);
+        PageListAdd data = columnDataUtil.tableColumnData(apiId, null, columnList);
+        return success(data);
+    }
+
+    @ApiOperation("新增入库实绩")
+    @PostMapping("/insertOyeInboundResult")
+    public RESTfulResult insertInboundResult(@RequestBody Map<String,Object> map) {
+        String result = null;
+        try {
+            result = oyeResultService.insertInboundResult(map);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return failed(e.getMessage());
+        }
+        return success(result);
+    }
+
+
+    @ApiOperation("新增出库实绩")
+    @PostMapping("/insertOyeOutboundResult")
+    public RESTfulResult insertOutboundResult(@RequestBody Map<String,Object> map) {
+        String result = null;
+        try {
+            result = oyeResultService.insertOutboundResult(map);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return failed(e.getMessage());
+        }
+        return success(result);
+    }
+
+
+
+
+
+
+}

+ 26 - 0
src/main/java/com/steerinfo/dil/mapper/OyeInboundResultMapper.java

@@ -0,0 +1,26 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.OyeInboundResult;
+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 OyeInboundResultMapper extends IBaseMapper<OyeInboundResult, BigDecimal> {
+
+
+    @Select("select seq_OYE_INBOUND_RESULT.nextval from dual")
+    BigDecimal getResultId();
+
+
+    List<Map<String, Object>> getOyeInboundResult(Map<String, Object> mapValue);
+
+    BigDecimal selectSaleMaterialID(BigDecimal saleMaterialId);
+
+    int updateOrderStatus(BigDecimal orderId);
+
+}

+ 24 - 0
src/main/java/com/steerinfo/dil/mapper/OyeOutboundResultMapper.java

@@ -0,0 +1,24 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.OyeOutboundResult;
+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 OyeOutboundResultMapper extends IBaseMapper<OyeOutboundResult, BigDecimal> {
+
+
+    @Select("select seq_OYE_OUTBOUND_RESULT.nextval from dual")
+    BigDecimal getResultId();
+
+
+    List<Map<String, Object>> oyeOutboundResultMapper(Map<String, Object> mapValue);
+
+    BigDecimal selectSaleMaterialID(BigDecimal saleMaterialId);
+
+}

+ 25 - 0
src/main/java/com/steerinfo/dil/mapper/OyeRealtimeInventoryMapper.java

@@ -0,0 +1,25 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.OyeRealtimeInventory;
+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 OyeRealtimeInventoryMapper extends IBaseMapper<OyeRealtimeInventory, BigDecimal> {
+
+
+
+    @Select("select seq_OYE_REALTIME_INVENTORY.nextval from dual")
+    BigDecimal getResultId();
+
+
+    List<Map<String, Object>> getOyeRealTimeResult(Map<String, Object> mapValue);
+
+    BigDecimal getInventoryId(Map<String, Object> map);
+
+}

+ 469 - 0
src/main/java/com/steerinfo/dil/model/OyeInboundResult.java

@@ -0,0 +1,469 @@
+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 OyeInboundResult implements IBasePO<BigDecimal> {
+    /**
+     * 实绩ID(RESULT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="实绩ID",required=true)
+    private BigDecimal resultId;
+
+    /**
+     * 库存ID(INVENTORY_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="库存ID",required=false)
+    private BigDecimal inventoryId;
+
+    /**
+     * 销售订单号(SALE_NO,VARCHAR,255)
+     */
+    @ApiModelProperty(value="销售订单号",required=false)
+    private String saleNo;
+
+    /**
+     * 运单ID(ORDER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运单ID",required=false)
+    private BigDecimal orderId;
+
+    /**
+     * 分录ID(SALE_MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="分录ID",required=false)
+    private BigDecimal saleMaterialId;
+
+    /**
+     * 客户ID(CONSIGNEE_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="客户ID",required=false)
+    private BigDecimal consigneeId;
+
+    /**
+     * 车牌号(CAPACITY_NUMBHER,VARCHAR,255)
+     */
+    @ApiModelProperty(value="车牌号",required=false)
+    private String capacityNumbher;
+
+    /**
+     * 运力ID(CAPACITY_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运力ID",required=false)
+    private BigDecimal capacityId;
+
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 米数(METER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="米数",required=false)
+    private BigDecimal meter;
+
+    /**
+     * 件数(MATERIAL_NUMBER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="件数",required=false)
+    private BigDecimal materialNumber;
+
+    /**
+     * 理论重量(THEORY_WEIGHT,DECIMAL,38)
+     */
+    @ApiModelProperty(value="理论重量",required=false)
+    private BigDecimal theoryWeight;
+
+    /**
+     * 单件理重(SINGLE_WEIGHT,DECIMAL,38)
+     */
+    @ApiModelProperty(value="单件理重",required=false)
+    private BigDecimal singleWeight;
+
+    /**
+     * 片区(直发)(SALE_AREA,VARCHAR,255)
+     */
+    @ApiModelProperty(value="片区(直发)",required=false)
+    private String saleArea;
+
+    /**
+     * 入库净重(NET_WEIGHT,DECIMAL,38)
+     */
+    @ApiModelProperty(value="入库净重",required=false)
+    private BigDecimal netWeight;
+
+    /**
+     * 入库仓库(INBOUND_WAREHOUSE,VARCHAR,255)
+     */
+    @ApiModelProperty(value="入库仓库",required=false)
+    private String inboundWarehouse;
+
+    /**
+     * 入库库区(INBOUND_AREA,VARCHAR,255)
+     */
+    @ApiModelProperty(value="入库库区",required=false)
+    private String inboundArea;
+
+    /**
+     * 新增时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="新增时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 新增用户(INSERT_USERNAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="新增用户",required=false)
+    private String insertUsername;
+
+    /**
+     * 更新时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="更新时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 更新用户(UPDATE_USERNAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="更新用户",required=false)
+    private String updateUsername;
+
+    /**
+     * 逻辑删除(0,未删除,1,已删除)(DELETED,VARCHAR,255)
+     */
+    @ApiModelProperty(value="逻辑删除(0,未删除,1,已删除)",required=false)
+    private String deleted;
+
+    /**
+     * 备用字段2(ALTERNATE_FIELDS2,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段2",required=false)
+    private String alternateFields2;
+
+    /**
+     * 备用字段3(ALTERNATE_FIELDS3,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段3",required=false)
+    private String alternateFields3;
+
+    /**
+     * 备用字段4(ALTERNATE_FIELDS4,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段4",required=false)
+    private String alternateFields4;
+
+    /**
+     * 备用字段5(ALTERNATE_FIELDS5,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段5",required=false)
+    private String alternateFields5;
+
+    /**
+     * 备用字段6(ALTERNATE_FIELDS6,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段6",required=false)
+    private String alternateFields6;
+
+    /**
+     * 备用字段7(ALTERNATE_FIELDS7,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段7",required=false)
+    private String alternateFields7;
+
+    /**
+     * 备用字段8(ALTERNATE_FIELDS8,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段8",required=false)
+    private String alternateFields8;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.resultId;
+    }
+
+    @Override
+    public void setId(BigDecimal resultId) {
+        this.resultId = resultId;
+    }
+
+    public BigDecimal getResultId() {
+        return resultId;
+    }
+
+    public void setResultId(BigDecimal resultId) {
+        this.resultId = resultId;
+    }
+
+    public BigDecimal getInventoryId() {
+        return inventoryId;
+    }
+
+    public void setInventoryId(BigDecimal inventoryId) {
+        this.inventoryId = inventoryId;
+    }
+
+    public String getSaleNo() {
+        return saleNo;
+    }
+
+    public void setSaleNo(String saleNo) {
+        this.saleNo = saleNo == null ? null : saleNo.trim();
+    }
+
+    public BigDecimal getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(BigDecimal orderId) {
+        this.orderId = orderId;
+    }
+
+    public BigDecimal getSaleMaterialId() {
+        return saleMaterialId;
+    }
+
+    public void setSaleMaterialId(BigDecimal saleMaterialId) {
+        this.saleMaterialId = saleMaterialId;
+    }
+
+    public BigDecimal getConsigneeId() {
+        return consigneeId;
+    }
+
+    public void setConsigneeId(BigDecimal consigneeId) {
+        this.consigneeId = consigneeId;
+    }
+
+    public String getCapacityNumbher() {
+        return capacityNumbher;
+    }
+
+    public void setCapacityNumbher(String capacityNumbher) {
+        this.capacityNumbher = capacityNumbher == null ? null : capacityNumbher.trim();
+    }
+
+    public BigDecimal getCapacityId() {
+        return capacityId;
+    }
+
+    public void setCapacityId(BigDecimal capacityId) {
+        this.capacityId = capacityId;
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public BigDecimal getMeter() {
+        return meter;
+    }
+
+    public void setMeter(BigDecimal meter) {
+        this.meter = meter;
+    }
+
+    public BigDecimal getMaterialNumber() {
+        return materialNumber;
+    }
+
+    public void setMaterialNumber(BigDecimal materialNumber) {
+        this.materialNumber = materialNumber;
+    }
+
+    public BigDecimal getTheoryWeight() {
+        return theoryWeight;
+    }
+
+    public void setTheoryWeight(BigDecimal theoryWeight) {
+        this.theoryWeight = theoryWeight;
+    }
+
+    public BigDecimal getSingleWeight() {
+        return singleWeight;
+    }
+
+    public void setSingleWeight(BigDecimal singleWeight) {
+        this.singleWeight = singleWeight;
+    }
+
+    public String getSaleArea() {
+        return saleArea;
+    }
+
+    public void setSaleArea(String saleArea) {
+        this.saleArea = saleArea == null ? null : saleArea.trim();
+    }
+
+    public BigDecimal getNetWeight() {
+        return netWeight;
+    }
+
+    public void setNetWeight(BigDecimal netWeight) {
+        this.netWeight = netWeight;
+    }
+
+    public String getInboundWarehouse() {
+        return inboundWarehouse;
+    }
+
+    public void setInboundWarehouse(String inboundWarehouse) {
+        this.inboundWarehouse = inboundWarehouse == null ? null : inboundWarehouse.trim();
+    }
+
+    public String getInboundArea() {
+        return inboundArea;
+    }
+
+    public void setInboundArea(String inboundArea) {
+        this.inboundArea = inboundArea == null ? null : inboundArea.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public String getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(String deleted) {
+        this.deleted = deleted == null ? null : deleted.trim();
+    }
+
+    public String getAlternateFields2() {
+        return alternateFields2;
+    }
+
+    public void setAlternateFields2(String alternateFields2) {
+        this.alternateFields2 = alternateFields2 == null ? null : alternateFields2.trim();
+    }
+
+    public String getAlternateFields3() {
+        return alternateFields3;
+    }
+
+    public void setAlternateFields3(String alternateFields3) {
+        this.alternateFields3 = alternateFields3 == null ? null : alternateFields3.trim();
+    }
+
+    public String getAlternateFields4() {
+        return alternateFields4;
+    }
+
+    public void setAlternateFields4(String alternateFields4) {
+        this.alternateFields4 = alternateFields4 == null ? null : alternateFields4.trim();
+    }
+
+    public String getAlternateFields5() {
+        return alternateFields5;
+    }
+
+    public void setAlternateFields5(String alternateFields5) {
+        this.alternateFields5 = alternateFields5 == null ? null : alternateFields5.trim();
+    }
+
+    public String getAlternateFields6() {
+        return alternateFields6;
+    }
+
+    public void setAlternateFields6(String alternateFields6) {
+        this.alternateFields6 = alternateFields6 == null ? null : alternateFields6.trim();
+    }
+
+    public String getAlternateFields7() {
+        return alternateFields7;
+    }
+
+    public void setAlternateFields7(String alternateFields7) {
+        this.alternateFields7 = alternateFields7 == null ? null : alternateFields7.trim();
+    }
+
+    public String getAlternateFields8() {
+        return alternateFields8;
+    }
+
+    public void setAlternateFields8(String alternateFields8) {
+        this.alternateFields8 = alternateFields8 == null ? null : alternateFields8.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", resultId=").append(resultId);
+        sb.append(", inventoryId=").append(inventoryId);
+        sb.append(", saleNo=").append(saleNo);
+        sb.append(", orderId=").append(orderId);
+        sb.append(", saleMaterialId=").append(saleMaterialId);
+        sb.append(", consigneeId=").append(consigneeId);
+        sb.append(", capacityNumbher=").append(capacityNumbher);
+        sb.append(", capacityId=").append(capacityId);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", meter=").append(meter);
+        sb.append(", materialNumber=").append(materialNumber);
+        sb.append(", theoryWeight=").append(theoryWeight);
+        sb.append(", singleWeight=").append(singleWeight);
+        sb.append(", saleArea=").append(saleArea);
+        sb.append(", netWeight=").append(netWeight);
+        sb.append(", inboundWarehouse=").append(inboundWarehouse);
+        sb.append(", inboundArea=").append(inboundArea);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", alternateFields2=").append(alternateFields2);
+        sb.append(", alternateFields3=").append(alternateFields3);
+        sb.append(", alternateFields4=").append(alternateFields4);
+        sb.append(", alternateFields5=").append(alternateFields5);
+        sb.append(", alternateFields6=").append(alternateFields6);
+        sb.append(", alternateFields7=").append(alternateFields7);
+        sb.append(", alternateFields8=").append(alternateFields8);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 453 - 0
src/main/java/com/steerinfo/dil/model/OyeOutboundResult.java

@@ -0,0 +1,453 @@
+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 OyeOutboundResult implements IBasePO<BigDecimal> {
+    /**
+     * 实绩ID(RESULT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="实绩ID",required=true)
+    private BigDecimal resultId;
+
+    /**
+     * 库存ID(INVENTORY_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="库存ID",required=false)
+    private BigDecimal inventoryId;
+
+    /**
+     * 运单ID(ORDER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运单ID",required=false)
+    private BigDecimal orderId;
+
+    /**
+     * 客户ID(CONSIGNEE_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="客户ID",required=false)
+    private BigDecimal consigneeId;
+
+    /**
+     * 车牌号(CAPACITY_NUMBHER,VARCHAR,255)
+     */
+    @ApiModelProperty(value="车牌号",required=false)
+    private String capacityNumbher;
+
+    /**
+     * 运力ID(CAPACITY_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运力ID",required=false)
+    private BigDecimal capacityId;
+
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 米数(METER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="米数",required=false)
+    private BigDecimal meter;
+
+    /**
+     * 件数(MATERIAL_NUMBER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="件数",required=false)
+    private BigDecimal materialNumber;
+
+    /**
+     * 理论重量(THEORY_WEIGHT,DECIMAL,38)
+     */
+    @ApiModelProperty(value="理论重量",required=false)
+    private BigDecimal theoryWeight;
+
+    /**
+     * 单件理重(SINGLE_WEIGHT,DECIMAL,38)
+     */
+    @ApiModelProperty(value="单件理重",required=false)
+    private BigDecimal singleWeight;
+
+    /**
+     * 片区(直发)(SALE_AREA,VARCHAR,255)
+     */
+    @ApiModelProperty(value="片区(直发)",required=false)
+    private String saleArea;
+
+    /**
+     * 出库净重(NET_WEIGHT,DECIMAL,38)
+     */
+    @ApiModelProperty(value="出库净重",required=false)
+    private BigDecimal netWeight;
+
+    /**
+     * 出库仓库(INBOUND_WAREHOUSE,VARCHAR,255)
+     */
+    @ApiModelProperty(value="出库仓库",required=false)
+    private String inboundWarehouse;
+
+    /**
+     * 出库库区(INBOUND_AREA,VARCHAR,255)
+     */
+    @ApiModelProperty(value="出库库区",required=false)
+    private String inboundArea;
+
+    /**
+     * 新增时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="新增时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 新增用户(INSERT_USERNAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="新增用户",required=false)
+    private String insertUsername;
+
+    /**
+     * 更新时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="更新时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 更新用户(UPDATE_USERNAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="更新用户",required=false)
+    private String updateUsername;
+
+    /**
+     * 逻辑删除(0,未删除,1,已删除)(DELETED,VARCHAR,255)
+     */
+    @ApiModelProperty(value="逻辑删除(0,未删除,1,已删除)",required=false)
+    private String deleted;
+
+    /**
+     * 备用字段2(ALTERNATE_FIELDS2,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段2",required=false)
+    private String alternateFields2;
+
+    /**
+     * 备用字段3(ALTERNATE_FIELDS3,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段3",required=false)
+    private String alternateFields3;
+
+    /**
+     * 备用字段4(ALTERNATE_FIELDS4,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段4",required=false)
+    private String alternateFields4;
+
+    /**
+     * 备用字段5(ALTERNATE_FIELDS5,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段5",required=false)
+    private String alternateFields5;
+
+    /**
+     * 备用字段6(ALTERNATE_FIELDS6,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段6",required=false)
+    private String alternateFields6;
+
+    /**
+     * 备用字段7(ALTERNATE_FIELDS7,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段7",required=false)
+    private String alternateFields7;
+
+    /**
+     * 备用字段8(ALTERNATE_FIELDS8,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段8",required=false)
+    private String alternateFields8;
+
+    /**
+     * 销售订单子表ID(SALE_MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="销售订单子表ID",required=false)
+    private BigDecimal saleMaterialId;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.resultId;
+    }
+
+    @Override
+    public void setId(BigDecimal resultId) {
+        this.resultId = resultId;
+    }
+
+    public BigDecimal getResultId() {
+        return resultId;
+    }
+
+    public void setResultId(BigDecimal resultId) {
+        this.resultId = resultId;
+    }
+
+    public BigDecimal getInventoryId() {
+        return inventoryId;
+    }
+
+    public void setInventoryId(BigDecimal inventoryId) {
+        this.inventoryId = inventoryId;
+    }
+
+    public BigDecimal getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(BigDecimal orderId) {
+        this.orderId = orderId;
+    }
+
+    public BigDecimal getConsigneeId() {
+        return consigneeId;
+    }
+
+    public void setConsigneeId(BigDecimal consigneeId) {
+        this.consigneeId = consigneeId;
+    }
+
+    public String getCapacityNumbher() {
+        return capacityNumbher;
+    }
+
+    public void setCapacityNumbher(String capacityNumbher) {
+        this.capacityNumbher = capacityNumbher == null ? null : capacityNumbher.trim();
+    }
+
+    public BigDecimal getCapacityId() {
+        return capacityId;
+    }
+
+    public void setCapacityId(BigDecimal capacityId) {
+        this.capacityId = capacityId;
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public BigDecimal getMeter() {
+        return meter;
+    }
+
+    public void setMeter(BigDecimal meter) {
+        this.meter = meter;
+    }
+
+    public BigDecimal getMaterialNumber() {
+        return materialNumber;
+    }
+
+    public void setMaterialNumber(BigDecimal materialNumber) {
+        this.materialNumber = materialNumber;
+    }
+
+    public BigDecimal getTheoryWeight() {
+        return theoryWeight;
+    }
+
+    public void setTheoryWeight(BigDecimal theoryWeight) {
+        this.theoryWeight = theoryWeight;
+    }
+
+    public BigDecimal getSingleWeight() {
+        return singleWeight;
+    }
+
+    public void setSingleWeight(BigDecimal singleWeight) {
+        this.singleWeight = singleWeight;
+    }
+
+    public String getSaleArea() {
+        return saleArea;
+    }
+
+    public void setSaleArea(String saleArea) {
+        this.saleArea = saleArea == null ? null : saleArea.trim();
+    }
+
+    public BigDecimal getNetWeight() {
+        return netWeight;
+    }
+
+    public void setNetWeight(BigDecimal netWeight) {
+        this.netWeight = netWeight;
+    }
+
+    public String getInboundWarehouse() {
+        return inboundWarehouse;
+    }
+
+    public void setInboundWarehouse(String inboundWarehouse) {
+        this.inboundWarehouse = inboundWarehouse == null ? null : inboundWarehouse.trim();
+    }
+
+    public String getInboundArea() {
+        return inboundArea;
+    }
+
+    public void setInboundArea(String inboundArea) {
+        this.inboundArea = inboundArea == null ? null : inboundArea.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public String getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(String deleted) {
+        this.deleted = deleted == null ? null : deleted.trim();
+    }
+
+    public String getAlternateFields2() {
+        return alternateFields2;
+    }
+
+    public void setAlternateFields2(String alternateFields2) {
+        this.alternateFields2 = alternateFields2 == null ? null : alternateFields2.trim();
+    }
+
+    public String getAlternateFields3() {
+        return alternateFields3;
+    }
+
+    public void setAlternateFields3(String alternateFields3) {
+        this.alternateFields3 = alternateFields3 == null ? null : alternateFields3.trim();
+    }
+
+    public String getAlternateFields4() {
+        return alternateFields4;
+    }
+
+    public void setAlternateFields4(String alternateFields4) {
+        this.alternateFields4 = alternateFields4 == null ? null : alternateFields4.trim();
+    }
+
+    public String getAlternateFields5() {
+        return alternateFields5;
+    }
+
+    public void setAlternateFields5(String alternateFields5) {
+        this.alternateFields5 = alternateFields5 == null ? null : alternateFields5.trim();
+    }
+
+    public String getAlternateFields6() {
+        return alternateFields6;
+    }
+
+    public void setAlternateFields6(String alternateFields6) {
+        this.alternateFields6 = alternateFields6 == null ? null : alternateFields6.trim();
+    }
+
+    public String getAlternateFields7() {
+        return alternateFields7;
+    }
+
+    public void setAlternateFields7(String alternateFields7) {
+        this.alternateFields7 = alternateFields7 == null ? null : alternateFields7.trim();
+    }
+
+    public String getAlternateFields8() {
+        return alternateFields8;
+    }
+
+    public void setAlternateFields8(String alternateFields8) {
+        this.alternateFields8 = alternateFields8 == null ? null : alternateFields8.trim();
+    }
+
+    public BigDecimal getSaleMaterialId() {
+        return saleMaterialId;
+    }
+
+    public void setSaleMaterialId(BigDecimal saleMaterialId) {
+        this.saleMaterialId = saleMaterialId;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", resultId=").append(resultId);
+        sb.append(", inventoryId=").append(inventoryId);
+        sb.append(", orderId=").append(orderId);
+        sb.append(", consigneeId=").append(consigneeId);
+        sb.append(", capacityNumbher=").append(capacityNumbher);
+        sb.append(", capacityId=").append(capacityId);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", meter=").append(meter);
+        sb.append(", materialNumber=").append(materialNumber);
+        sb.append(", theoryWeight=").append(theoryWeight);
+        sb.append(", singleWeight=").append(singleWeight);
+        sb.append(", saleArea=").append(saleArea);
+        sb.append(", netWeight=").append(netWeight);
+        sb.append(", inboundWarehouse=").append(inboundWarehouse);
+        sb.append(", inboundArea=").append(inboundArea);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", alternateFields2=").append(alternateFields2);
+        sb.append(", alternateFields3=").append(alternateFields3);
+        sb.append(", alternateFields4=").append(alternateFields4);
+        sb.append(", alternateFields5=").append(alternateFields5);
+        sb.append(", alternateFields6=").append(alternateFields6);
+        sb.append(", alternateFields7=").append(alternateFields7);
+        sb.append(", alternateFields8=").append(alternateFields8);
+        sb.append(", saleMaterialId=").append(saleMaterialId);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 379 - 0
src/main/java/com/steerinfo/dil/model/OyeRealtimeInventory.java

@@ -0,0 +1,379 @@
+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 OyeRealtimeInventory implements IBasePO<BigDecimal> {
+    /**
+     * 库存ID(INVENTORY_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="库存ID",required=true)
+    private BigDecimal inventoryId;
+
+    /**
+     * 客户ID(CONSIGNEE_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="客户ID",required=false)
+    private BigDecimal consigneeId;
+
+    /**
+     * 片区(直发)(SALE_AREA,VARCHAR,255)
+     */
+    @ApiModelProperty(value="片区(直发)",required=false)
+    private String saleArea;
+
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 米数(METER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="米数",required=false)
+    private BigDecimal meter;
+
+    /**
+     * 件数(MATERIAL_NUMBER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="件数",required=false)
+    private BigDecimal materialNumber;
+
+    /**
+     * 理论重量(THEORY_WEIGHT,DECIMAL,38)
+     */
+    @ApiModelProperty(value="理论重量",required=false)
+    private BigDecimal theoryWeight;
+
+    /**
+     * 单件理重(SINGLE_WEIGHT,DECIMAL,38)
+     */
+    @ApiModelProperty(value="单件理重",required=false)
+    private BigDecimal singleWeight;
+
+    /**
+     * 库存净重(NET_WEIGHT,DECIMAL,38)
+     */
+    @ApiModelProperty(value="库存净重",required=false)
+    private BigDecimal netWeight;
+
+    /**
+     * 仓库(指向地址表的县)(INBOUND_WAREHOUSE,VARCHAR,255)
+     */
+    @ApiModelProperty(value="仓库(指向地址表的县)",required=false)
+    private String inboundWarehouse;
+
+    /**
+     * 库区(指向地址表的place)(INBOUND_AREA,VARCHAR,255)
+     */
+    @ApiModelProperty(value="库区(指向地址表的place)",required=false)
+    private String inboundArea;
+
+    /**
+     * 新增时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="新增时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 新增用户(INSERT_USERNAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="新增用户",required=false)
+    private String insertUsername;
+
+    /**
+     * 更新时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="更新时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 更新用户(UPDATE_USERNAME,VARCHAR,255)
+     */
+    @ApiModelProperty(value="更新用户",required=false)
+    private String updateUsername;
+
+    /**
+     * 逻辑删除(0,未删除,1,已删除)(DELETED,VARCHAR,255)
+     */
+    @ApiModelProperty(value="逻辑删除(0,未删除,1,已删除)",required=false)
+    private String deleted;
+
+    /**
+     * 备用字段2(ALTERNATE_FIELDS2,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段2",required=false)
+    private String alternateFields2;
+
+    /**
+     * 备用字段3(ALTERNATE_FIELDS3,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段3",required=false)
+    private String alternateFields3;
+
+    /**
+     * 备用字段4(ALTERNATE_FIELDS4,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段4",required=false)
+    private String alternateFields4;
+
+    /**
+     * 备用字段5(ALTERNATE_FIELDS5,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段5",required=false)
+    private String alternateFields5;
+
+    /**
+     * 备用字段6(ALTERNATE_FIELDS6,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段6",required=false)
+    private String alternateFields6;
+
+    /**
+     * 备用字段7(ALTERNATE_FIELDS7,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段7",required=false)
+    private String alternateFields7;
+
+    /**
+     * 备用字段8(ALTERNATE_FIELDS8,VARCHAR,255)
+     */
+    @ApiModelProperty(value="备用字段8",required=false)
+    private String alternateFields8;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.inventoryId;
+    }
+
+    @Override
+    public void setId(BigDecimal inventoryId) {
+        this.inventoryId = inventoryId;
+    }
+
+    public BigDecimal getInventoryId() {
+        return inventoryId;
+    }
+
+    public void setInventoryId(BigDecimal inventoryId) {
+        this.inventoryId = inventoryId;
+    }
+
+    public BigDecimal getConsigneeId() {
+        return consigneeId;
+    }
+
+    public void setConsigneeId(BigDecimal consigneeId) {
+        this.consigneeId = consigneeId;
+    }
+
+    public String getSaleArea() {
+        return saleArea;
+    }
+
+    public void setSaleArea(String saleArea) {
+        this.saleArea = saleArea == null ? null : saleArea.trim();
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public BigDecimal getMeter() {
+        return meter;
+    }
+
+    public void setMeter(BigDecimal meter) {
+        this.meter = meter;
+    }
+
+    public BigDecimal getMaterialNumber() {
+        return materialNumber;
+    }
+
+    public void setMaterialNumber(BigDecimal materialNumber) {
+        this.materialNumber = materialNumber;
+    }
+
+    public BigDecimal getTheoryWeight() {
+        return theoryWeight;
+    }
+
+    public void setTheoryWeight(BigDecimal theoryWeight) {
+        this.theoryWeight = theoryWeight;
+    }
+
+    public BigDecimal getSingleWeight() {
+        return singleWeight;
+    }
+
+    public void setSingleWeight(BigDecimal singleWeight) {
+        this.singleWeight = singleWeight;
+    }
+
+    public BigDecimal getNetWeight() {
+        return netWeight;
+    }
+
+    public void setNetWeight(BigDecimal netWeight) {
+        this.netWeight = netWeight;
+    }
+
+    public String getInboundWarehouse() {
+        return inboundWarehouse;
+    }
+
+    public void setInboundWarehouse(String inboundWarehouse) {
+        this.inboundWarehouse = inboundWarehouse == null ? null : inboundWarehouse.trim();
+    }
+
+    public String getInboundArea() {
+        return inboundArea;
+    }
+
+    public void setInboundArea(String inboundArea) {
+        this.inboundArea = inboundArea == null ? null : inboundArea.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public String getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(String deleted) {
+        this.deleted = deleted == null ? null : deleted.trim();
+    }
+
+    public String getAlternateFields2() {
+        return alternateFields2;
+    }
+
+    public void setAlternateFields2(String alternateFields2) {
+        this.alternateFields2 = alternateFields2 == null ? null : alternateFields2.trim();
+    }
+
+    public String getAlternateFields3() {
+        return alternateFields3;
+    }
+
+    public void setAlternateFields3(String alternateFields3) {
+        this.alternateFields3 = alternateFields3 == null ? null : alternateFields3.trim();
+    }
+
+    public String getAlternateFields4() {
+        return alternateFields4;
+    }
+
+    public void setAlternateFields4(String alternateFields4) {
+        this.alternateFields4 = alternateFields4 == null ? null : alternateFields4.trim();
+    }
+
+    public String getAlternateFields5() {
+        return alternateFields5;
+    }
+
+    public void setAlternateFields5(String alternateFields5) {
+        this.alternateFields5 = alternateFields5 == null ? null : alternateFields5.trim();
+    }
+
+    public String getAlternateFields6() {
+        return alternateFields6;
+    }
+
+    public void setAlternateFields6(String alternateFields6) {
+        this.alternateFields6 = alternateFields6 == null ? null : alternateFields6.trim();
+    }
+
+    public String getAlternateFields7() {
+        return alternateFields7;
+    }
+
+    public void setAlternateFields7(String alternateFields7) {
+        this.alternateFields7 = alternateFields7 == null ? null : alternateFields7.trim();
+    }
+
+    public String getAlternateFields8() {
+        return alternateFields8;
+    }
+
+    public void setAlternateFields8(String alternateFields8) {
+        this.alternateFields8 = alternateFields8 == null ? null : alternateFields8.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", inventoryId=").append(inventoryId);
+        sb.append(", consigneeId=").append(consigneeId);
+        sb.append(", saleArea=").append(saleArea);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", meter=").append(meter);
+        sb.append(", materialNumber=").append(materialNumber);
+        sb.append(", theoryWeight=").append(theoryWeight);
+        sb.append(", singleWeight=").append(singleWeight);
+        sb.append(", netWeight=").append(netWeight);
+        sb.append(", inboundWarehouse=").append(inboundWarehouse);
+        sb.append(", inboundArea=").append(inboundArea);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", alternateFields2=").append(alternateFields2);
+        sb.append(", alternateFields3=").append(alternateFields3);
+        sb.append(", alternateFields4=").append(alternateFields4);
+        sb.append(", alternateFields5=").append(alternateFields5);
+        sb.append(", alternateFields6=").append(alternateFields6);
+        sb.append(", alternateFields7=").append(alternateFields7);
+        sb.append(", alternateFields8=").append(alternateFields8);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 4 - 0
src/main/java/com/steerinfo/dil/service/IOyeResultService.java

@@ -0,0 +1,4 @@
+package com.steerinfo.dil.service;
+
+public interface IOyeResultService {
+}

+ 224 - 0
src/main/java/com/steerinfo/dil/service/impl/OyeResultServiceImpl.java

@@ -0,0 +1,224 @@
+package com.steerinfo.dil.service.impl;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.steerinfo.dil.mapper.OyeInboundResultMapper;
+import com.steerinfo.dil.mapper.OyeOutboundResultMapper;
+import com.steerinfo.dil.mapper.OyeRealtimeInventoryMapper;
+import com.steerinfo.dil.model.OyeInboundResult;
+import com.steerinfo.dil.model.OyeOutboundResult;
+import com.steerinfo.dil.model.OyeRealtimeInventory;
+import com.steerinfo.dil.service.IOyeResultService;
+import com.steerinfo.dil.util.DataChange;
+import com.sun.org.apache.bcel.internal.generic.RETURN;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import javax.xml.crypto.Data;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class OyeResultServiceImpl implements IOyeResultService {
+
+    @Resource
+    OyeInboundResultMapper oyeInboundResultMapper;
+
+    @Resource
+    OyeOutboundResultMapper oyeOutboundResultMapper;
+
+    @Resource
+    OyeRealtimeInventoryMapper oyeRealtimeInventoryMapper;
+
+
+
+
+    public List<Map<String, Object>> getOyeInboundResult(Map<String, Object> mapValue) {
+        return oyeInboundResultMapper.getOyeInboundResult(mapValue);
+    }
+
+
+    public List<Map<String, Object>> getOyeOutboundResult(Map<String, Object> mapValue) {
+        return oyeOutboundResultMapper.oyeOutboundResultMapper(mapValue);
+    }
+
+    public List<Map<String, Object>> getOyeRealTimeResult(Map<String, Object> mapValue) {
+        return oyeRealtimeInventoryMapper.getOyeRealTimeResult(mapValue);
+    }
+
+
+    /**
+     * 入库作业
+     * @param mapValue
+     * @return
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public synchronized String insertInboundResult(Map<String, Object> mapValue) throws Exception {
+        List<Map<String,Object>> mapList = (List<Map<String,Object>>) mapValue.get("mapList");
+        List<OyeInboundResult> OyeInboundResults = new ArrayList<>();
+        System.out.println("===========" + new Date());
+        JSONObject jsonObject = new JSONObject(mapValue);
+        System.out.println(jsonObject);
+        System.out.println("===========" + new Date());
+        for (Map<String,Object> map : mapList) {
+            OyeInboundResult oyeInboundResult = new OyeInboundResult();
+            BigDecimal materialId = DataChange.dataToBigDecimal(map.get("materialId"));
+            BigDecimal theoryWeight = DataChange.dataToBigDecimal(map.get("theoryWeight"));
+            BigDecimal materialNumber = DataChange.dataToBigDecimal(map.get("materialNumber"));
+            BigDecimal singleWeight = theoryWeight.divide(materialNumber);
+            BigDecimal meter = DataChange.dataToBigDecimal(map.get("meter"));
+            oyeInboundResult.setResultId(oyeInboundResultMapper.getResultId());
+            oyeInboundResult.setSaleArea(map.get("saleArea").toString());
+            oyeInboundResult.setConsigneeId(DataChange.dataToBigDecimal(map.get("consigneeId")));
+            oyeInboundResult.setCapacityId(DataChange.dataToBigDecimal(map.get("capacityId")));
+            oyeInboundResult.setOrderId(DataChange.dataToBigDecimal(map.get("orderId")));
+            oyeInboundResult.setSaleMaterialId(DataChange.dataToBigDecimal(map.get("saleMaterialId")));
+            //判断该拼是否入库
+            if (oyeInboundResultMapper.selectSaleMaterialID(DataChange.dataToBigDecimal(map.get("saleMaterialId"))) != null) {
+                throw new Exception("该分录已入库,无法继续入库");
+            }
+            oyeInboundResult.setCapacityNumbher(map.get("capacityNumber") + "");
+            oyeInboundResult.setInboundArea(map.get("inboundArea").toString());
+            oyeInboundResult.setInboundWarehouse(map.get("inboundWarehouse").toString());
+            oyeInboundResult.setSaleNo(map.get("saleNo") + "");
+            oyeInboundResult.setMeter(meter);
+            oyeInboundResult.setMaterialId(materialId);
+            oyeInboundResult.setTheoryWeight(theoryWeight);
+            oyeInboundResult.setSingleWeight(singleWeight);
+            oyeInboundResult.setNetWeight(DataChange.dataToBigDecimal(map.get("netWeight")));
+            oyeInboundResult.setMaterialNumber(materialNumber);
+            oyeInboundResult.setInsertUsername(map.get("userName") + "");
+            oyeInboundResult.setInsertTime(new Date());
+            map.put("singleWeight",singleWeight);
+            //根据区域,客户,物资,单重,米数,仓库,库区查询实时库存在不在
+            BigDecimal inventoryId = oyeRealtimeInventoryMapper.getInventoryId(map);
+            if (inventoryId == null) {
+                //新增实时库存
+                map.put("flag",1);
+                inventoryId = insertRealTimeInventory(map);
+                oyeInboundResult.setInventoryId(inventoryId);
+            }else{
+                map.put("inventoryId",inventoryId);
+                map.put("flag",1);
+                String result = updateRealTimeInventory(map);
+            }
+            // 修改运单状态
+            oyeInboundResultMapper.updateOrderStatus(DataChange.dataToBigDecimal(map.get("orderId")));
+            OyeInboundResults.add(oyeInboundResult);
+        }
+        oyeInboundResultMapper.batchInsert(OyeInboundResults);
+        return "入库成功";
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    public synchronized String insertOutboundResult(Map<String,Object> mapValue) throws Exception {
+        List<OyeOutboundResult> oyeOutboundResults = new ArrayList<>();
+        List<Map<String,Object>> mapList = (List<Map<String,Object>>) mapValue.get("mapList");
+        System.out.println("===========" + new Date());
+        JSONObject jsonObject = new JSONObject(mapValue);
+        System.out.println(jsonObject);
+        System.out.println("===========" + new Date());
+        for (Map<String,Object> map : mapList) {
+            OyeOutboundResult oyeOutboundResult = new OyeOutboundResult();
+            BigDecimal materialId = DataChange.dataToBigDecimal(map.get("materialId"));
+            BigDecimal theoryWeight = DataChange.dataToBigDecimal(map.get("theoryWeight"));
+            BigDecimal materialNumber = DataChange.dataToBigDecimal(map.get("materialNumber"));
+            BigDecimal singleWeight = theoryWeight.divide(materialNumber);
+            BigDecimal meter = DataChange.dataToBigDecimal(map.get("meter"));
+            oyeOutboundResult.setResultId(oyeOutboundResultMapper.getResultId());
+            oyeOutboundResult.setSaleArea(map.get("saleArea").toString());
+            oyeOutboundResult.setConsigneeId(DataChange.dataToBigDecimal(map.get("consigneeId")));
+            oyeOutboundResult.setCapacityNumbher(map.get("capacityNumber") + "");
+            oyeOutboundResult.setCapacityId(DataChange.dataToBigDecimal(map.get("capacityId")));
+            oyeOutboundResult.setOrderId(DataChange.dataToBigDecimal(map.get("orderId")));
+            oyeOutboundResult.setCapacityNumbher(map.get("capacityNumber") + "");
+            oyeOutboundResult.setInboundArea(map.get("inboundArea").toString());
+            oyeOutboundResult.setInboundWarehouse(map.get("inboundWarehouse").toString());
+            oyeOutboundResult.setSaleMaterialId(DataChange.dataToBigDecimal(map.get("saleMaterialId")));
+            //判断该拼是否入库
+            if (oyeOutboundResultMapper.selectSaleMaterialID(DataChange.dataToBigDecimal(map.get("saleMaterialId"))) != null) {
+                throw new Exception("该分录已出库,无法继续出库");
+            }
+            oyeOutboundResult.setMeter(meter);
+            oyeOutboundResult.setMaterialId(materialId);
+            oyeOutboundResult.setTheoryWeight(theoryWeight);
+            oyeOutboundResult.setSingleWeight(singleWeight);
+            oyeOutboundResult.setNetWeight(DataChange.dataToBigDecimal(map.get("netWeight")));
+            oyeOutboundResult.setMaterialNumber(materialNumber);
+            oyeOutboundResult.setInsertUsername(map.get("userName") + "");
+            oyeOutboundResult.setInsertTime(new Date());
+            map.put("singleWeight",singleWeight);
+            //根据区域,客户,物资,单重,米数,仓库,库区查询实时库存在不在
+            BigDecimal inventoryId = oyeRealtimeInventoryMapper.getInventoryId(map);
+            oyeOutboundResult.setInventoryId(inventoryId);
+            map.put("inventoryId",inventoryId);
+            map.put("flag",2);
+            String result = updateRealTimeInventory(map);
+            oyeOutboundResults.add(oyeOutboundResult);
+        }
+        oyeOutboundResultMapper.batchInsert(oyeOutboundResults);
+        return "出库成功";
+    }
+
+    /**
+     * 新增实时库存
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public synchronized BigDecimal insertRealTimeInventory(Map<String,Object> map) {
+        BigDecimal inventoryId = oyeRealtimeInventoryMapper.getResultId();
+        OyeRealtimeInventory oyeRealtimeInventory = new OyeRealtimeInventory();
+        oyeRealtimeInventory.setInventoryId(inventoryId);
+        oyeRealtimeInventory.setSaleArea(map.get("saleArea").toString());
+        oyeRealtimeInventory.setConsigneeId(DataChange.dataToBigDecimal(map.get("consigneeId")));
+        oyeRealtimeInventory.setInboundWarehouse(map.get("inboundWarehouse").toString());
+        oyeRealtimeInventory.setInboundArea(map.get("inboundArea").toString());
+        oyeRealtimeInventory.setMaterialId(DataChange.dataToBigDecimal(map.get("materialId")));
+        oyeRealtimeInventory.setMeter(DataChange.dataToBigDecimal(map.get("meter")));
+        oyeRealtimeInventory.setSingleWeight(DataChange.dataToBigDecimal(map.get("singleWeight")));
+        oyeRealtimeInventory.setTheoryWeight(DataChange.dataToBigDecimal(map.get("theoryWeight")));
+        oyeRealtimeInventory.setMaterialNumber(DataChange.dataToBigDecimal(map.get("materialNumber")));
+        oyeRealtimeInventory.setNetWeight(DataChange.dataToBigDecimal(map.get("netWeight")));
+        oyeRealtimeInventory.setInsertTime(new Date());
+        oyeRealtimeInventoryMapper.insertSelective(oyeRealtimeInventory);
+        return inventoryId;
+    }
+
+    /**
+     * 更新实时库存
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public synchronized String updateRealTimeInventory(Map<String,Object> map) throws Exception {
+        //更新实时库存
+        BigDecimal inventoryId = DataChange.dataToBigDecimal(map.get("inventoryId"));
+        // flag为1,则为入库,为2则为出库
+        BigDecimal flag = DataChange.dataToBigDecimal(map.get("flag"));
+        BigDecimal theoryWeight = DataChange.dataToBigDecimal(map.get("theoryWeight"));
+        BigDecimal materialNumber = DataChange.dataToBigDecimal(map.get("materialNumber"));
+        BigDecimal netWeight = DataChange.dataToBigDecimal(map.get("netWeight"));
+        OyeRealtimeInventory oyeRealtimeInventory = oyeRealtimeInventoryMapper.selectByPrimaryKey(inventoryId);
+        if (flag.compareTo(new BigDecimal(1)) == 0) {
+            oyeRealtimeInventory.setNetWeight(oyeRealtimeInventory.getNetWeight().add(netWeight));
+            oyeRealtimeInventory.setTheoryWeight(oyeRealtimeInventory.getTheoryWeight().add(theoryWeight));
+            oyeRealtimeInventory.setMaterialNumber(oyeRealtimeInventory.getMaterialNumber().add(materialNumber));
+        } else {
+            BigDecimal realTimeTheoryWeight = oyeRealtimeInventory.getTheoryWeight();
+            BigDecimal realTimeMaterialNumber = oyeRealtimeInventory.getMaterialNumber();
+            BigDecimal realTimeNetWeight = oyeRealtimeInventory.getNetWeight();
+            if (realTimeTheoryWeight.compareTo(theoryWeight) >= 0) {
+                oyeRealtimeInventory.setTheoryWeight(realTimeTheoryWeight.subtract(theoryWeight));
+            }
+            if (realTimeMaterialNumber.compareTo(materialNumber) >= 0 ) {
+                oyeRealtimeInventory.setMaterialNumber(realTimeMaterialNumber.subtract(materialNumber));
+            }else{
+                throw new Exception("出库件数大于库存件数,无法出库");
+            }
+            oyeRealtimeInventory.setNetWeight(realTimeNetWeight.subtract(netWeight));
+        }
+        oyeRealtimeInventoryMapper.updateByPrimaryKeySelective(oyeRealtimeInventory);
+        return "实时库存更新成功!";
+    }
+}

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

@@ -21,7 +21,7 @@ eureka:
     fetch-registry: false #是否从EurekaServer抓取已有的注册信息,默认为true,单节点无所谓,集群必须设置为true才能配合ribbon使用负载均衡
 
   instance:
-    prefer-ip-address: true
+    prefer-ip-address: false
     status-page-url: http://${spring.cloud.client.ip-address}:${server.port}/swagger-ui.html#/
     instance-id: ${spring.cloud.client.ip-address}:${server.port}
 

+ 900 - 0
src/main/resources/com/steerinfo/dil/mapper/OyeInboundResultMapper.xml

@@ -0,0 +1,900 @@
+<?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.OyeInboundResultMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OyeInboundResult">
+    <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
+    <result column="INVENTORY_ID" jdbcType="DECIMAL" property="inventoryId" />
+    <result column="SALE_NO" jdbcType="VARCHAR" property="saleNo" />
+    <result column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
+    <result column="SALE_MATERIAL_ID" jdbcType="DECIMAL" property="saleMaterialId" />
+    <result column="CONSIGNEE_ID" jdbcType="DECIMAL" property="consigneeId" />
+    <result column="CAPACITY_NUMBHER" jdbcType="VARCHAR" property="capacityNumbher" />
+    <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
+    <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
+    <result column="METER" jdbcType="DECIMAL" property="meter" />
+    <result column="MATERIAL_NUMBER" jdbcType="DECIMAL" property="materialNumber" />
+    <result column="THEORY_WEIGHT" jdbcType="DECIMAL" property="theoryWeight" />
+    <result column="SINGLE_WEIGHT" jdbcType="DECIMAL" property="singleWeight" />
+    <result column="SALE_AREA" jdbcType="VARCHAR" property="saleArea" />
+    <result column="NET_WEIGHT" jdbcType="DECIMAL" property="netWeight" />
+    <result column="INBOUND_WAREHOUSE" jdbcType="VARCHAR" property="inboundWarehouse" />
+    <result column="INBOUND_AREA" jdbcType="VARCHAR" property="inboundArea" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+    <result column="DELETED" jdbcType="VARCHAR" property="deleted" />
+    <result column="ALTERNATE_FIELDS2" jdbcType="VARCHAR" property="alternateFields2" />
+    <result column="ALTERNATE_FIELDS3" jdbcType="VARCHAR" property="alternateFields3" />
+    <result column="ALTERNATE_FIELDS4" jdbcType="VARCHAR" property="alternateFields4" />
+    <result column="ALTERNATE_FIELDS5" jdbcType="VARCHAR" property="alternateFields5" />
+    <result column="ALTERNATE_FIELDS6" jdbcType="VARCHAR" property="alternateFields6" />
+    <result column="ALTERNATE_FIELDS7" jdbcType="VARCHAR" property="alternateFields7" />
+    <result column="ALTERNATE_FIELDS8" jdbcType="VARCHAR" property="alternateFields8" />
+  </resultMap>
+  <sql id="columns">
+    RESULT_ID, INVENTORY_ID, SALE_NO, ORDER_ID, SALE_MATERIAL_ID, CONSIGNEE_ID, CAPACITY_NUMBHER, 
+    CAPACITY_ID, MATERIAL_ID, METER, MATERIAL_NUMBER, THEORY_WEIGHT, SINGLE_WEIGHT, SALE_AREA, 
+    NET_WEIGHT, INBOUND_WAREHOUSE, INBOUND_AREA, INSERT_TIME, INSERT_USERNAME, UPDATE_TIME, 
+    UPDATE_USERNAME, DELETED, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3, ALTERNATE_FIELDS4, 
+    ALTERNATE_FIELDS5, ALTERNATE_FIELDS6, ALTERNATE_FIELDS7, ALTERNATE_FIELDS8
+  </sql>
+  <sql id="columns_alias">
+    t.RESULT_ID, t.INVENTORY_ID, t.SALE_NO, t.ORDER_ID, t.SALE_MATERIAL_ID, t.CONSIGNEE_ID, 
+    t.CAPACITY_NUMBHER, t.CAPACITY_ID, t.MATERIAL_ID, t.METER, t.MATERIAL_NUMBER, t.THEORY_WEIGHT, 
+    t.SINGLE_WEIGHT, t.SALE_AREA, t.NET_WEIGHT, t.INBOUND_WAREHOUSE, t.INBOUND_AREA, 
+    t.INSERT_TIME, t.INSERT_USERNAME, t.UPDATE_TIME, t.UPDATE_USERNAME, t.DELETED, t.ALTERNATE_FIELDS2, 
+    t.ALTERNATE_FIELDS3, t.ALTERNATE_FIELDS4, t.ALTERNATE_FIELDS5, t.ALTERNATE_FIELDS6, 
+    t.ALTERNATE_FIELDS7, t.ALTERNATE_FIELDS8
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM OYE_INBOUND_RESULT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM OYE_INBOUND_RESULT t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="inventoryId != null">
+        and INVENTORY_ID = #{inventoryId}
+      </if>
+      <if test="saleNo != null and saleNo != ''">
+        and SALE_NO = #{saleNo}
+      </if>
+      <if test="orderId != null">
+        and ORDER_ID = #{orderId}
+      </if>
+      <if test="saleMaterialId != null">
+        and SALE_MATERIAL_ID = #{saleMaterialId}
+      </if>
+      <if test="consigneeId != null">
+        and CONSIGNEE_ID = #{consigneeId}
+      </if>
+      <if test="capacityNumbher != null and capacityNumbher != ''">
+        and CAPACITY_NUMBHER = #{capacityNumbher}
+      </if>
+      <if test="capacityId != null">
+        and CAPACITY_ID = #{capacityId}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="meter != null">
+        and METER = #{meter}
+      </if>
+      <if test="materialNumber != null">
+        and MATERIAL_NUMBER = #{materialNumber}
+      </if>
+      <if test="theoryWeight != null">
+        and THEORY_WEIGHT = #{theoryWeight}
+      </if>
+      <if test="singleWeight != null">
+        and SINGLE_WEIGHT = #{singleWeight}
+      </if>
+      <if test="saleArea != null and saleArea != ''">
+        and SALE_AREA = #{saleArea}
+      </if>
+      <if test="netWeight != null">
+        and NET_WEIGHT = #{netWeight}
+      </if>
+      <if test="inboundWarehouse != null and inboundWarehouse != ''">
+        and INBOUND_WAREHOUSE = #{inboundWarehouse}
+      </if>
+      <if test="inboundArea != null and inboundArea != ''">
+        and INBOUND_AREA = #{inboundArea}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="deleted != null and deleted != ''">
+        and DELETED = #{deleted}
+      </if>
+      <if test="alternateFields2 != null and alternateFields2 != ''">
+        and ALTERNATE_FIELDS2 = #{alternateFields2}
+      </if>
+      <if test="alternateFields3 != null and alternateFields3 != ''">
+        and ALTERNATE_FIELDS3 = #{alternateFields3}
+      </if>
+      <if test="alternateFields4 != null and alternateFields4 != ''">
+        and ALTERNATE_FIELDS4 = #{alternateFields4}
+      </if>
+      <if test="alternateFields5 != null and alternateFields5 != ''">
+        and ALTERNATE_FIELDS5 = #{alternateFields5}
+      </if>
+      <if test="alternateFields6 != null and alternateFields6 != ''">
+        and ALTERNATE_FIELDS6 = #{alternateFields6}
+      </if>
+      <if test="alternateFields7 != null and alternateFields7 != ''">
+        and ALTERNATE_FIELDS7 = #{alternateFields7}
+      </if>
+      <if test="alternateFields8 != null and alternateFields8 != ''">
+        and ALTERNATE_FIELDS8 = #{alternateFields8}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="inventoryId != null">
+        and INVENTORY_ID = #{inventoryId}
+      </if>
+      <if test="saleNo != null and saleNo != ''">
+        and SALE_NO LIKE '%${saleNo}%'
+      </if>
+      <if test="orderId != null">
+        and ORDER_ID = #{orderId}
+      </if>
+      <if test="saleMaterialId != null">
+        and SALE_MATERIAL_ID = #{saleMaterialId}
+      </if>
+      <if test="consigneeId != null">
+        and CONSIGNEE_ID = #{consigneeId}
+      </if>
+      <if test="capacityNumbher != null and capacityNumbher != ''">
+        and CAPACITY_NUMBHER LIKE '%${capacityNumbher}%'
+      </if>
+      <if test="capacityId != null">
+        and CAPACITY_ID = #{capacityId}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="meter != null">
+        and METER = #{meter}
+      </if>
+      <if test="materialNumber != null">
+        and MATERIAL_NUMBER = #{materialNumber}
+      </if>
+      <if test="theoryWeight != null">
+        and THEORY_WEIGHT = #{theoryWeight}
+      </if>
+      <if test="singleWeight != null">
+        and SINGLE_WEIGHT = #{singleWeight}
+      </if>
+      <if test="saleArea != null and saleArea != ''">
+        and SALE_AREA LIKE '%${saleArea}%'
+      </if>
+      <if test="netWeight != null">
+        and NET_WEIGHT = #{netWeight}
+      </if>
+      <if test="inboundWarehouse != null and inboundWarehouse != ''">
+        and INBOUND_WAREHOUSE LIKE '%${inboundWarehouse}%'
+      </if>
+      <if test="inboundArea != null and inboundArea != ''">
+        and INBOUND_AREA LIKE '%${inboundArea}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="deleted != null and deleted != ''">
+        and DELETED LIKE '%${deleted}%'
+      </if>
+      <if test="alternateFields2 != null and alternateFields2 != ''">
+        and ALTERNATE_FIELDS2 LIKE '%${alternateFields2}%'
+      </if>
+      <if test="alternateFields3 != null and alternateFields3 != ''">
+        and ALTERNATE_FIELDS3 LIKE '%${alternateFields3}%'
+      </if>
+      <if test="alternateFields4 != null and alternateFields4 != ''">
+        and ALTERNATE_FIELDS4 LIKE '%${alternateFields4}%'
+      </if>
+      <if test="alternateFields5 != null and alternateFields5 != ''">
+        and ALTERNATE_FIELDS5 LIKE '%${alternateFields5}%'
+      </if>
+      <if test="alternateFields6 != null and alternateFields6 != ''">
+        and ALTERNATE_FIELDS6 LIKE '%${alternateFields6}%'
+      </if>
+      <if test="alternateFields7 != null and alternateFields7 != ''">
+        and ALTERNATE_FIELDS7 LIKE '%${alternateFields7}%'
+      </if>
+      <if test="alternateFields8 != null and alternateFields8 != ''">
+        and ALTERNATE_FIELDS8 LIKE '%${alternateFields8}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from OYE_INBOUND_RESULT
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from OYE_INBOUND_RESULT
+    where 1!=1 
+      <if test="inventoryId != null">
+        or INVENTORY_ID = #{inventoryId}
+      </if>
+      <if test="saleNo != null and saleNo != ''">
+        or SALE_NO = #{saleNo}
+      </if>
+      <if test="orderId != null">
+        or ORDER_ID = #{orderId}
+      </if>
+      <if test="saleMaterialId != null">
+        or SALE_MATERIAL_ID = #{saleMaterialId}
+      </if>
+      <if test="consigneeId != null">
+        or CONSIGNEE_ID = #{consigneeId}
+      </if>
+      <if test="capacityNumbher != null and capacityNumbher != ''">
+        or CAPACITY_NUMBHER = #{capacityNumbher}
+      </if>
+      <if test="capacityId != null">
+        or CAPACITY_ID = #{capacityId}
+      </if>
+      <if test="materialId != null">
+        or MATERIAL_ID = #{materialId}
+      </if>
+      <if test="meter != null">
+        or METER = #{meter}
+      </if>
+      <if test="materialNumber != null">
+        or MATERIAL_NUMBER = #{materialNumber}
+      </if>
+      <if test="theoryWeight != null">
+        or THEORY_WEIGHT = #{theoryWeight}
+      </if>
+      <if test="singleWeight != null">
+        or SINGLE_WEIGHT = #{singleWeight}
+      </if>
+      <if test="saleArea != null and saleArea != ''">
+        or SALE_AREA = #{saleArea}
+      </if>
+      <if test="netWeight != null">
+        or NET_WEIGHT = #{netWeight}
+      </if>
+      <if test="inboundWarehouse != null and inboundWarehouse != ''">
+        or INBOUND_WAREHOUSE = #{inboundWarehouse}
+      </if>
+      <if test="inboundArea != null and inboundArea != ''">
+        or INBOUND_AREA = #{inboundArea}
+      </if>
+      <if test="insertTime != null">
+        or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        or INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        or UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="deleted != null and deleted != ''">
+        or DELETED = #{deleted}
+      </if>
+      <if test="alternateFields2 != null and alternateFields2 != ''">
+        or ALTERNATE_FIELDS2 = #{alternateFields2}
+      </if>
+      <if test="alternateFields3 != null and alternateFields3 != ''">
+        or ALTERNATE_FIELDS3 = #{alternateFields3}
+      </if>
+      <if test="alternateFields4 != null and alternateFields4 != ''">
+        or ALTERNATE_FIELDS4 = #{alternateFields4}
+      </if>
+      <if test="alternateFields5 != null and alternateFields5 != ''">
+        or ALTERNATE_FIELDS5 = #{alternateFields5}
+      </if>
+      <if test="alternateFields6 != null and alternateFields6 != ''">
+        or ALTERNATE_FIELDS6 = #{alternateFields6}
+      </if>
+      <if test="alternateFields7 != null and alternateFields7 != ''">
+        or ALTERNATE_FIELDS7 = #{alternateFields7}
+      </if>
+      <if test="alternateFields8 != null and alternateFields8 != ''">
+        or ALTERNATE_FIELDS8 = #{alternateFields8}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.OyeInboundResult">
+    insert into OYE_INBOUND_RESULT (RESULT_ID, INVENTORY_ID, SALE_NO, 
+      ORDER_ID, SALE_MATERIAL_ID, CONSIGNEE_ID, 
+      CAPACITY_NUMBHER, CAPACITY_ID, MATERIAL_ID, 
+      METER, MATERIAL_NUMBER, THEORY_WEIGHT, 
+      SINGLE_WEIGHT, SALE_AREA, NET_WEIGHT, 
+      INBOUND_WAREHOUSE, INBOUND_AREA, INSERT_TIME, 
+      INSERT_USERNAME, UPDATE_TIME, UPDATE_USERNAME, 
+      DELETED, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3, 
+      ALTERNATE_FIELDS4, ALTERNATE_FIELDS5, ALTERNATE_FIELDS6, 
+      ALTERNATE_FIELDS7, ALTERNATE_FIELDS8)
+    values (#{resultId,jdbcType=DECIMAL}, #{inventoryId,jdbcType=DECIMAL}, #{saleNo,jdbcType=VARCHAR}, 
+      #{orderId,jdbcType=DECIMAL}, #{saleMaterialId,jdbcType=DECIMAL}, #{consigneeId,jdbcType=DECIMAL}, 
+      #{capacityNumbher,jdbcType=VARCHAR}, #{capacityId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, 
+      #{meter,jdbcType=DECIMAL}, #{materialNumber,jdbcType=DECIMAL}, #{theoryWeight,jdbcType=DECIMAL}, 
+      #{singleWeight,jdbcType=DECIMAL}, #{saleArea,jdbcType=VARCHAR}, #{netWeight,jdbcType=DECIMAL}, 
+      #{inboundWarehouse,jdbcType=VARCHAR}, #{inboundArea,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, 
+      #{insertUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
+      #{deleted,jdbcType=VARCHAR}, #{alternateFields2,jdbcType=VARCHAR}, #{alternateFields3,jdbcType=VARCHAR}, 
+      #{alternateFields4,jdbcType=VARCHAR}, #{alternateFields5,jdbcType=VARCHAR}, #{alternateFields6,jdbcType=VARCHAR}, 
+      #{alternateFields7,jdbcType=VARCHAR}, #{alternateFields8,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OyeInboundResult">
+    insert into OYE_INBOUND_RESULT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        RESULT_ID,
+      </if>
+      <if test="inventoryId != null">
+        INVENTORY_ID,
+      </if>
+      <if test="saleNo != null">
+        SALE_NO,
+      </if>
+      <if test="orderId != null">
+        ORDER_ID,
+      </if>
+      <if test="saleMaterialId != null">
+        SALE_MATERIAL_ID,
+      </if>
+      <if test="consigneeId != null">
+        CONSIGNEE_ID,
+      </if>
+      <if test="capacityNumbher != null">
+        CAPACITY_NUMBHER,
+      </if>
+      <if test="capacityId != null">
+        CAPACITY_ID,
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID,
+      </if>
+      <if test="meter != null">
+        METER,
+      </if>
+      <if test="materialNumber != null">
+        MATERIAL_NUMBER,
+      </if>
+      <if test="theoryWeight != null">
+        THEORY_WEIGHT,
+      </if>
+      <if test="singleWeight != null">
+        SINGLE_WEIGHT,
+      </if>
+      <if test="saleArea != null">
+        SALE_AREA,
+      </if>
+      <if test="netWeight != null">
+        NET_WEIGHT,
+      </if>
+      <if test="inboundWarehouse != null">
+        INBOUND_WAREHOUSE,
+      </if>
+      <if test="inboundArea != null">
+        INBOUND_AREA,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="deleted != null">
+        DELETED,
+      </if>
+      <if test="alternateFields2 != null">
+        ALTERNATE_FIELDS2,
+      </if>
+      <if test="alternateFields3 != null">
+        ALTERNATE_FIELDS3,
+      </if>
+      <if test="alternateFields4 != null">
+        ALTERNATE_FIELDS4,
+      </if>
+      <if test="alternateFields5 != null">
+        ALTERNATE_FIELDS5,
+      </if>
+      <if test="alternateFields6 != null">
+        ALTERNATE_FIELDS6,
+      </if>
+      <if test="alternateFields7 != null">
+        ALTERNATE_FIELDS7,
+      </if>
+      <if test="alternateFields8 != null">
+        ALTERNATE_FIELDS8,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        #{resultId,jdbcType=DECIMAL},
+      </if>
+      <if test="inventoryId != null">
+        #{inventoryId,jdbcType=DECIMAL},
+      </if>
+      <if test="saleNo != null">
+        #{saleNo,jdbcType=VARCHAR},
+      </if>
+      <if test="orderId != null">
+        #{orderId,jdbcType=DECIMAL},
+      </if>
+      <if test="saleMaterialId != null">
+        #{saleMaterialId,jdbcType=DECIMAL},
+      </if>
+      <if test="consigneeId != null">
+        #{consigneeId,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityNumbher != null">
+        #{capacityNumbher,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityId != null">
+        #{capacityId,jdbcType=DECIMAL},
+      </if>
+      <if test="materialId != null">
+        #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="meter != null">
+        #{meter,jdbcType=DECIMAL},
+      </if>
+      <if test="materialNumber != null">
+        #{materialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="theoryWeight != null">
+        #{theoryWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="singleWeight != null">
+        #{singleWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="saleArea != null">
+        #{saleArea,jdbcType=VARCHAR},
+      </if>
+      <if test="netWeight != null">
+        #{netWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="inboundWarehouse != null">
+        #{inboundWarehouse,jdbcType=VARCHAR},
+      </if>
+      <if test="inboundArea != null">
+        #{inboundArea,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        #{deleted,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields2 != null">
+        #{alternateFields2,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields3 != null">
+        #{alternateFields3,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields4 != null">
+        #{alternateFields4,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields5 != null">
+        #{alternateFields5,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields6 != null">
+        #{alternateFields6,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields7 != null">
+        #{alternateFields7,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields8 != null">
+        #{alternateFields8,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OyeInboundResult">
+    update OYE_INBOUND_RESULT
+    set INVENTORY_ID = #{inventoryId,jdbcType=DECIMAL},
+      SALE_NO = #{saleNo,jdbcType=VARCHAR},
+      ORDER_ID = #{orderId,jdbcType=DECIMAL},
+      SALE_MATERIAL_ID = #{saleMaterialId,jdbcType=DECIMAL},
+      CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL},
+      CAPACITY_NUMBHER = #{capacityNumbher,jdbcType=VARCHAR},
+      CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+      MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      METER = #{meter,jdbcType=DECIMAL},
+      MATERIAL_NUMBER = #{materialNumber,jdbcType=DECIMAL},
+      THEORY_WEIGHT = #{theoryWeight,jdbcType=DECIMAL},
+      SINGLE_WEIGHT = #{singleWeight,jdbcType=DECIMAL},
+      SALE_AREA = #{saleArea,jdbcType=VARCHAR},
+      NET_WEIGHT = #{netWeight,jdbcType=DECIMAL},
+      INBOUND_WAREHOUSE = #{inboundWarehouse,jdbcType=VARCHAR},
+      INBOUND_AREA = #{inboundArea,jdbcType=VARCHAR},
+      INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      DELETED = #{deleted,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS8 = #{alternateFields8,jdbcType=VARCHAR}
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OyeInboundResult">
+    update OYE_INBOUND_RESULT
+    <set>
+      <if test="inventoryId != null">
+        INVENTORY_ID = #{inventoryId,jdbcType=DECIMAL},
+      </if>
+      <if test="saleNo != null">
+        SALE_NO = #{saleNo,jdbcType=VARCHAR},
+      </if>
+      <if test="orderId != null">
+        ORDER_ID = #{orderId,jdbcType=DECIMAL},
+      </if>
+      <if test="saleMaterialId != null">
+        SALE_MATERIAL_ID = #{saleMaterialId,jdbcType=DECIMAL},
+      </if>
+      <if test="consigneeId != null">
+        CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityNumbher != null">
+        CAPACITY_NUMBHER = #{capacityNumbher,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityId != null">
+        CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="meter != null">
+        METER = #{meter,jdbcType=DECIMAL},
+      </if>
+      <if test="materialNumber != null">
+        MATERIAL_NUMBER = #{materialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="theoryWeight != null">
+        THEORY_WEIGHT = #{theoryWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="singleWeight != null">
+        SINGLE_WEIGHT = #{singleWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="saleArea != null">
+        SALE_AREA = #{saleArea,jdbcType=VARCHAR},
+      </if>
+      <if test="netWeight != null">
+        NET_WEIGHT = #{netWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="inboundWarehouse != null">
+        INBOUND_WAREHOUSE = #{inboundWarehouse,jdbcType=VARCHAR},
+      </if>
+      <if test="inboundArea != null">
+        INBOUND_AREA = #{inboundArea,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        DELETED = #{deleted,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields2 != null">
+        ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields3 != null">
+        ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields4 != null">
+        ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields5 != null">
+        ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields6 != null">
+        ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields7 != null">
+        ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields8 != null">
+        ALTERNATE_FIELDS8 = #{alternateFields8,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where RESULT_ID = #{resultId,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 OYE_INBOUND_RESULT 
+      (RESULT_ID, 
+      INVENTORY_ID, SALE_NO, ORDER_ID, 
+      SALE_MATERIAL_ID, CONSIGNEE_ID, 
+      CAPACITY_NUMBHER, CAPACITY_ID, 
+      MATERIAL_ID, METER, MATERIAL_NUMBER, 
+      THEORY_WEIGHT, SINGLE_WEIGHT, SALE_AREA, 
+      NET_WEIGHT, INBOUND_WAREHOUSE, 
+      INBOUND_AREA, INSERT_TIME, INSERT_USERNAME, 
+      UPDATE_TIME, UPDATE_USERNAME, 
+      DELETED, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3, 
+      ALTERNATE_FIELDS4, ALTERNATE_FIELDS5, 
+      ALTERNATE_FIELDS6, ALTERNATE_FIELDS7, 
+      ALTERNATE_FIELDS8)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.resultId,jdbcType=DECIMAL}, 
+      #{item.inventoryId,jdbcType=DECIMAL}, #{item.saleNo,jdbcType=VARCHAR}, #{item.orderId,jdbcType=DECIMAL}, 
+      #{item.saleMaterialId,jdbcType=DECIMAL}, #{item.consigneeId,jdbcType=DECIMAL}, 
+      #{item.capacityNumbher,jdbcType=VARCHAR}, #{item.capacityId,jdbcType=DECIMAL}, 
+      #{item.materialId,jdbcType=DECIMAL}, #{item.meter,jdbcType=DECIMAL}, #{item.materialNumber,jdbcType=DECIMAL}, 
+      #{item.theoryWeight,jdbcType=DECIMAL}, #{item.singleWeight,jdbcType=DECIMAL}, #{item.saleArea,jdbcType=VARCHAR}, 
+      #{item.netWeight,jdbcType=DECIMAL}, #{item.inboundWarehouse,jdbcType=VARCHAR}, 
+      #{item.inboundArea,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
+      #{item.deleted,jdbcType=VARCHAR}, #{item.alternateFields2,jdbcType=VARCHAR}, #{item.alternateFields3,jdbcType=VARCHAR}, 
+      #{item.alternateFields4,jdbcType=VARCHAR}, #{item.alternateFields5,jdbcType=VARCHAR}, 
+      #{item.alternateFields6,jdbcType=VARCHAR}, #{item.alternateFields7,jdbcType=VARCHAR}, 
+      #{item.alternateFields8,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update OYE_INBOUND_RESULT
+     set
+       RESULT_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
+       </foreach>
+       ,INVENTORY_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.inventoryId,jdbcType=DECIMAL}
+       </foreach>
+       ,SALE_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.saleNo,jdbcType=VARCHAR}
+       </foreach>
+       ,ORDER_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
+       </foreach>
+       ,SALE_MATERIAL_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.saleMaterialId,jdbcType=DECIMAL}
+       </foreach>
+       ,CONSIGNEE_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.consigneeId,jdbcType=DECIMAL}
+       </foreach>
+       ,CAPACITY_NUMBHER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityNumbher,jdbcType=VARCHAR}
+       </foreach>
+       ,CAPACITY_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
+       </foreach>
+       ,MATERIAL_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+       </foreach>
+       ,METER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.meter,jdbcType=DECIMAL}
+       </foreach>
+       ,MATERIAL_NUMBER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.materialNumber,jdbcType=DECIMAL}
+       </foreach>
+       ,THEORY_WEIGHT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.theoryWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,SINGLE_WEIGHT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.singleWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,SALE_AREA=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.saleArea,jdbcType=VARCHAR}
+       </foreach>
+       ,NET_WEIGHT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.netWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,INBOUND_WAREHOUSE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundWarehouse,jdbcType=VARCHAR}
+       </foreach>
+       ,INBOUND_AREA=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundArea,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,DELETED=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS2=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields2,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS3=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields3,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS4=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields4,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS5=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields5,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS6=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields6,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS7=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields7,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS8=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields8,jdbcType=VARCHAR}
+       </foreach>
+     where RESULT_ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.resultId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from OYE_INBOUND_RESULT
+    where RESULT_ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getOyeInboundResult" resultType="java.util.Map">
+    SELECT OIR.SINGLE_WEIGHT "singleWeight",
+           OIR.METER    "meter",
+           OIR.MATERIAL_ID  "materialId",
+           OIR.CAPACITY_NUMBHER "capacityNumber",
+           OIR.MATERIAL_NUMBER  "materialNumber",
+           OIR.THEORY_WEIGHT    "theoryWeight",
+           OIR.NET_WEIGHT       "netWeight",
+           OIR.SALE_NO          "saleNo",
+           OIR.SALE_AREA        "saleArea",
+           OIR.INVENTORY_ID     "inventoryId",
+           OIR.INBOUND_WAREHOUSE "inboundWarehouse",
+           OIR.INBOUND_AREA     "inboundArea",
+           OIR.SALE_MATERIAL_ID "saleMaterialId",
+           OIR.INSERT_TIME      "insertTime",
+           RC.CONSIGNEE_ID      "consigneeId",
+           RC.CONSIGNEE_COMPANY_NAME    "consigneeName",
+           RM.MATERIAL_NAME "materialName",
+           RM.MATERIAL_SPECIFICATION "materialSpe",
+           RM.MATERIAL_MODEL    "materialModel",
+           OO.ORDER_ID          "orderId",
+           OO.ORDER_NUMBER      "orderNumber",
+           OO.CAPACITY_ID       "capacityId"
+           FROM OYE_INBOUND_RESULT OIR
+           LEFT JOIN RMS_MATERIAL RM on OIR.MATERIAL_ID = RM.MATERIAL_ID
+           LEFT JOIN RMS_CONSIGNEE RC on OIR.CONSIGNEE_ID = RC.CONSIGNEE_ID
+           LEFT JOIN OMSTRUCK_ORDER OO on OIR.ORDER_ID = OO.ORDER_ID
+           <where>
+           <if test="oneDate != null">
+              and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= OIR.INSERT_TIME
+           </if>
+           <if test="startDate != null and isEnFactoryFlag == 5">
+              and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= OIR.INSERT_TIME
+              and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= OIR.INSERT_TIME
+           </if>
+           <if test="consigneeName != null and consigneeName != ''">
+              AND RC.CONSIGNEE_COMPANY_NAME LIKE '%${consigneeName}%'
+           </if>
+           <if test="capacityNumber != null and capacityNumber != ''">
+              AND OIR.CAPACITY_NUMBHER LIKE '%${capacityNumber}%'
+           </if>
+           <if test="saleArea != null and saleArea != ''">
+              AND OIR.SALE_AREA LIKE '%${saleArea}%'
+           </if>
+           <if test="inboundWarehouse != null and inboundWarehouse != ''">
+              AND OIR.INBOUND_WAREHOUSE LIKE '%${inboundWarehouse}%'
+           </if>
+           <if test="inboundArea != null and inboundArea != ''">
+              AND OIR.inbound_Area LIKE '%${inboundArea}%'
+           </if>
+           <if test="materialName != null and materialName != ''">
+              AND RM.material_Name LIKE '%${materialName}%'
+           </if>
+           <if test="materialSpe != null and materialSpe != ''">
+              AND RM.MATERIAL_SPECIFICATION LIKE '%${materialSpe}%'
+           </if>
+           </where>
+           ORDER BY OIR.INSERT_TIME DESC
+  </select>
+    <select id="selectSaleMaterialID" resultType="java.lang.Integer">
+      SELECT OIR.SALE_MATERIAL_ID FROM OYE_INBOUND_RESULT OIR
+      WHERE OIR.SALE_MATERIAL_ID = #{saleMaterialId}
+    </select>
+  <update id="updateOrderStatus">
+    UPDATE TMSTRUCK_TOTAL_RESULT
+    SET ORDER_STATUS = '已入库'
+    WHERE ORDER_ID = #{orderId}
+  </update>
+</mapper>

+ 870 - 0
src/main/resources/com/steerinfo/dil/mapper/OyeOutboundResultMapper.xml

@@ -0,0 +1,870 @@
+<?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.OyeOutboundResultMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OyeOutboundResult">
+    <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
+    <result column="INVENTORY_ID" jdbcType="DECIMAL" property="inventoryId" />
+    <result column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
+    <result column="CONSIGNEE_ID" jdbcType="DECIMAL" property="consigneeId" />
+    <result column="CAPACITY_NUMBHER" jdbcType="VARCHAR" property="capacityNumbher" />
+    <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
+    <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
+    <result column="METER" jdbcType="DECIMAL" property="meter" />
+    <result column="MATERIAL_NUMBER" jdbcType="DECIMAL" property="materialNumber" />
+    <result column="THEORY_WEIGHT" jdbcType="DECIMAL" property="theoryWeight" />
+    <result column="SINGLE_WEIGHT" jdbcType="DECIMAL" property="singleWeight" />
+    <result column="SALE_AREA" jdbcType="VARCHAR" property="saleArea" />
+    <result column="NET_WEIGHT" jdbcType="DECIMAL" property="netWeight" />
+    <result column="INBOUND_WAREHOUSE" jdbcType="VARCHAR" property="inboundWarehouse" />
+    <result column="INBOUND_AREA" jdbcType="VARCHAR" property="inboundArea" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+    <result column="DELETED" jdbcType="VARCHAR" property="deleted" />
+    <result column="ALTERNATE_FIELDS2" jdbcType="VARCHAR" property="alternateFields2" />
+    <result column="ALTERNATE_FIELDS3" jdbcType="VARCHAR" property="alternateFields3" />
+    <result column="ALTERNATE_FIELDS4" jdbcType="VARCHAR" property="alternateFields4" />
+    <result column="ALTERNATE_FIELDS5" jdbcType="VARCHAR" property="alternateFields5" />
+    <result column="ALTERNATE_FIELDS6" jdbcType="VARCHAR" property="alternateFields6" />
+    <result column="ALTERNATE_FIELDS7" jdbcType="VARCHAR" property="alternateFields7" />
+    <result column="ALTERNATE_FIELDS8" jdbcType="VARCHAR" property="alternateFields8" />
+    <result column="SALE_MATERIAL_ID" jdbcType="DECIMAL" property="saleMaterialId" />
+  </resultMap>
+  <sql id="columns">
+    RESULT_ID, INVENTORY_ID, ORDER_ID, CONSIGNEE_ID, CAPACITY_NUMBHER, CAPACITY_ID, MATERIAL_ID, 
+    METER, MATERIAL_NUMBER, THEORY_WEIGHT, SINGLE_WEIGHT, SALE_AREA, NET_WEIGHT, INBOUND_WAREHOUSE, 
+    INBOUND_AREA, INSERT_TIME, INSERT_USERNAME, UPDATE_TIME, UPDATE_USERNAME, DELETED, 
+    ALTERNATE_FIELDS2, ALTERNATE_FIELDS3, ALTERNATE_FIELDS4, ALTERNATE_FIELDS5, ALTERNATE_FIELDS6, 
+    ALTERNATE_FIELDS7, ALTERNATE_FIELDS8, SALE_MATERIAL_ID
+  </sql>
+  <sql id="columns_alias">
+    t.RESULT_ID, t.INVENTORY_ID, t.ORDER_ID, t.CONSIGNEE_ID, t.CAPACITY_NUMBHER, t.CAPACITY_ID, 
+    t.MATERIAL_ID, t.METER, t.MATERIAL_NUMBER, t.THEORY_WEIGHT, t.SINGLE_WEIGHT, t.SALE_AREA, 
+    t.NET_WEIGHT, t.INBOUND_WAREHOUSE, t.INBOUND_AREA, t.INSERT_TIME, t.INSERT_USERNAME, 
+    t.UPDATE_TIME, t.UPDATE_USERNAME, t.DELETED, t.ALTERNATE_FIELDS2, t.ALTERNATE_FIELDS3, 
+    t.ALTERNATE_FIELDS4, t.ALTERNATE_FIELDS5, t.ALTERNATE_FIELDS6, t.ALTERNATE_FIELDS7, 
+    t.ALTERNATE_FIELDS8, t.SALE_MATERIAL_ID
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM OYE_OUTBOUND_RESULT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM OYE_OUTBOUND_RESULT t
+  </sql>
+  <sql id="where">
+    <where>
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="inventoryId != null">
+        and INVENTORY_ID = #{inventoryId}
+      </if>
+      <if test="orderId != null">
+        and ORDER_ID = #{orderId}
+      </if>
+      <if test="consigneeId != null">
+        and CONSIGNEE_ID = #{consigneeId}
+      </if>
+      <if test="capacityNumbher != null and capacityNumbher != ''">
+        and CAPACITY_NUMBHER = #{capacityNumbher}
+      </if>
+      <if test="capacityId != null">
+        and CAPACITY_ID = #{capacityId}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="meter != null">
+        and METER = #{meter}
+      </if>
+      <if test="materialNumber != null">
+        and MATERIAL_NUMBER = #{materialNumber}
+      </if>
+      <if test="theoryWeight != null">
+        and THEORY_WEIGHT = #{theoryWeight}
+      </if>
+      <if test="singleWeight != null">
+        and SINGLE_WEIGHT = #{singleWeight}
+      </if>
+      <if test="saleArea != null and saleArea != ''">
+        and SALE_AREA = #{saleArea}
+      </if>
+      <if test="netWeight != null">
+        and NET_WEIGHT = #{netWeight}
+      </if>
+      <if test="inboundWarehouse != null and inboundWarehouse != ''">
+        and INBOUND_WAREHOUSE = #{inboundWarehouse}
+      </if>
+      <if test="inboundArea != null and inboundArea != ''">
+        and INBOUND_AREA = #{inboundArea}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="deleted != null and deleted != ''">
+        and DELETED = #{deleted}
+      </if>
+      <if test="alternateFields2 != null and alternateFields2 != ''">
+        and ALTERNATE_FIELDS2 = #{alternateFields2}
+      </if>
+      <if test="alternateFields3 != null and alternateFields3 != ''">
+        and ALTERNATE_FIELDS3 = #{alternateFields3}
+      </if>
+      <if test="alternateFields4 != null and alternateFields4 != ''">
+        and ALTERNATE_FIELDS4 = #{alternateFields4}
+      </if>
+      <if test="alternateFields5 != null and alternateFields5 != ''">
+        and ALTERNATE_FIELDS5 = #{alternateFields5}
+      </if>
+      <if test="alternateFields6 != null and alternateFields6 != ''">
+        and ALTERNATE_FIELDS6 = #{alternateFields6}
+      </if>
+      <if test="alternateFields7 != null and alternateFields7 != ''">
+        and ALTERNATE_FIELDS7 = #{alternateFields7}
+      </if>
+      <if test="alternateFields8 != null and alternateFields8 != ''">
+        and ALTERNATE_FIELDS8 = #{alternateFields8}
+      </if>
+      <if test="saleMaterialId != null">
+        and SALE_MATERIAL_ID = #{saleMaterialId}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where>
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="inventoryId != null">
+        and INVENTORY_ID = #{inventoryId}
+      </if>
+      <if test="orderId != null">
+        and ORDER_ID = #{orderId}
+      </if>
+      <if test="consigneeId != null">
+        and CONSIGNEE_ID = #{consigneeId}
+      </if>
+      <if test="capacityNumbher != null and capacityNumbher != ''">
+        and CAPACITY_NUMBHER LIKE '%${capacityNumbher}%'
+      </if>
+      <if test="capacityId != null">
+        and CAPACITY_ID = #{capacityId}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="meter != null">
+        and METER = #{meter}
+      </if>
+      <if test="materialNumber != null">
+        and MATERIAL_NUMBER = #{materialNumber}
+      </if>
+      <if test="theoryWeight != null">
+        and THEORY_WEIGHT = #{theoryWeight}
+      </if>
+      <if test="singleWeight != null">
+        and SINGLE_WEIGHT = #{singleWeight}
+      </if>
+      <if test="saleArea != null and saleArea != ''">
+        and SALE_AREA LIKE '%${saleArea}%'
+      </if>
+      <if test="netWeight != null">
+        and NET_WEIGHT = #{netWeight}
+      </if>
+      <if test="inboundWarehouse != null and inboundWarehouse != ''">
+        and INBOUND_WAREHOUSE LIKE '%${inboundWarehouse}%'
+      </if>
+      <if test="inboundArea != null and inboundArea != ''">
+        and INBOUND_AREA LIKE '%${inboundArea}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="deleted != null and deleted != ''">
+        and DELETED LIKE '%${deleted}%'
+      </if>
+      <if test="alternateFields2 != null and alternateFields2 != ''">
+        and ALTERNATE_FIELDS2 LIKE '%${alternateFields2}%'
+      </if>
+      <if test="alternateFields3 != null and alternateFields3 != ''">
+        and ALTERNATE_FIELDS3 LIKE '%${alternateFields3}%'
+      </if>
+      <if test="alternateFields4 != null and alternateFields4 != ''">
+        and ALTERNATE_FIELDS4 LIKE '%${alternateFields4}%'
+      </if>
+      <if test="alternateFields5 != null and alternateFields5 != ''">
+        and ALTERNATE_FIELDS5 LIKE '%${alternateFields5}%'
+      </if>
+      <if test="alternateFields6 != null and alternateFields6 != ''">
+        and ALTERNATE_FIELDS6 LIKE '%${alternateFields6}%'
+      </if>
+      <if test="alternateFields7 != null and alternateFields7 != ''">
+        and ALTERNATE_FIELDS7 LIKE '%${alternateFields7}%'
+      </if>
+      <if test="alternateFields8 != null and alternateFields8 != ''">
+        and ALTERNATE_FIELDS8 LIKE '%${alternateFields8}%'
+      </if>
+      <if test="saleMaterialId != null">
+        and SALE_MATERIAL_ID = #{saleMaterialId}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from OYE_OUTBOUND_RESULT
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from OYE_OUTBOUND_RESULT
+    where 1!=1
+    <if test="inventoryId != null">
+      or INVENTORY_ID = #{inventoryId}
+    </if>
+    <if test="orderId != null">
+      or ORDER_ID = #{orderId}
+    </if>
+    <if test="consigneeId != null">
+      or CONSIGNEE_ID = #{consigneeId}
+    </if>
+    <if test="capacityNumbher != null and capacityNumbher != ''">
+      or CAPACITY_NUMBHER = #{capacityNumbher}
+    </if>
+    <if test="capacityId != null">
+      or CAPACITY_ID = #{capacityId}
+    </if>
+    <if test="materialId != null">
+      or MATERIAL_ID = #{materialId}
+    </if>
+    <if test="meter != null">
+      or METER = #{meter}
+    </if>
+    <if test="materialNumber != null">
+      or MATERIAL_NUMBER = #{materialNumber}
+    </if>
+    <if test="theoryWeight != null">
+      or THEORY_WEIGHT = #{theoryWeight}
+    </if>
+    <if test="singleWeight != null">
+      or SINGLE_WEIGHT = #{singleWeight}
+    </if>
+    <if test="saleArea != null and saleArea != ''">
+      or SALE_AREA = #{saleArea}
+    </if>
+    <if test="netWeight != null">
+      or NET_WEIGHT = #{netWeight}
+    </if>
+    <if test="inboundWarehouse != null and inboundWarehouse != ''">
+      or INBOUND_WAREHOUSE = #{inboundWarehouse}
+    </if>
+    <if test="inboundArea != null and inboundArea != ''">
+      or INBOUND_AREA = #{inboundArea}
+    </if>
+    <if test="insertTime != null">
+      or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+    </if>
+    <if test="insertUsername != null and insertUsername != ''">
+      or INSERT_USERNAME = #{insertUsername}
+    </if>
+    <if test="updateTime != null">
+      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+    </if>
+    <if test="updateUsername != null and updateUsername != ''">
+      or UPDATE_USERNAME = #{updateUsername}
+    </if>
+    <if test="deleted != null and deleted != ''">
+      or DELETED = #{deleted}
+    </if>
+    <if test="alternateFields2 != null and alternateFields2 != ''">
+      or ALTERNATE_FIELDS2 = #{alternateFields2}
+    </if>
+    <if test="alternateFields3 != null and alternateFields3 != ''">
+      or ALTERNATE_FIELDS3 = #{alternateFields3}
+    </if>
+    <if test="alternateFields4 != null and alternateFields4 != ''">
+      or ALTERNATE_FIELDS4 = #{alternateFields4}
+    </if>
+    <if test="alternateFields5 != null and alternateFields5 != ''">
+      or ALTERNATE_FIELDS5 = #{alternateFields5}
+    </if>
+    <if test="alternateFields6 != null and alternateFields6 != ''">
+      or ALTERNATE_FIELDS6 = #{alternateFields6}
+    </if>
+    <if test="alternateFields7 != null and alternateFields7 != ''">
+      or ALTERNATE_FIELDS7 = #{alternateFields7}
+    </if>
+    <if test="alternateFields8 != null and alternateFields8 != ''">
+      or ALTERNATE_FIELDS8 = #{alternateFields8}
+    </if>
+    <if test="saleMaterialId != null">
+      or SALE_MATERIAL_ID = #{saleMaterialId}
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.OyeOutboundResult">
+    insert into OYE_OUTBOUND_RESULT (RESULT_ID, INVENTORY_ID, ORDER_ID,
+                                     CONSIGNEE_ID, CAPACITY_NUMBHER, CAPACITY_ID,
+                                     MATERIAL_ID, METER, MATERIAL_NUMBER,
+                                     THEORY_WEIGHT, SINGLE_WEIGHT, SALE_AREA,
+                                     NET_WEIGHT, INBOUND_WAREHOUSE, INBOUND_AREA,
+                                     INSERT_TIME, INSERT_USERNAME, UPDATE_TIME,
+                                     UPDATE_USERNAME, DELETED, ALTERNATE_FIELDS2,
+                                     ALTERNATE_FIELDS3, ALTERNATE_FIELDS4, ALTERNATE_FIELDS5,
+                                     ALTERNATE_FIELDS6, ALTERNATE_FIELDS7, ALTERNATE_FIELDS8,
+                                     SALE_MATERIAL_ID)
+    values (#{resultId,jdbcType=DECIMAL}, #{inventoryId,jdbcType=DECIMAL}, #{orderId,jdbcType=DECIMAL},
+            #{consigneeId,jdbcType=DECIMAL}, #{capacityNumbher,jdbcType=VARCHAR}, #{capacityId,jdbcType=DECIMAL},
+            #{materialId,jdbcType=DECIMAL}, #{meter,jdbcType=DECIMAL}, #{materialNumber,jdbcType=DECIMAL},
+            #{theoryWeight,jdbcType=DECIMAL}, #{singleWeight,jdbcType=DECIMAL}, #{saleArea,jdbcType=VARCHAR},
+            #{netWeight,jdbcType=DECIMAL}, #{inboundWarehouse,jdbcType=VARCHAR}, #{inboundArea,jdbcType=VARCHAR},
+            #{insertTime,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+            #{updateUsername,jdbcType=VARCHAR}, #{deleted,jdbcType=VARCHAR}, #{alternateFields2,jdbcType=VARCHAR},
+            #{alternateFields3,jdbcType=VARCHAR}, #{alternateFields4,jdbcType=VARCHAR}, #{alternateFields5,jdbcType=VARCHAR},
+            #{alternateFields6,jdbcType=VARCHAR}, #{alternateFields7,jdbcType=VARCHAR}, #{alternateFields8,jdbcType=VARCHAR},
+            #{saleMaterialId,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OyeOutboundResult">
+    insert into OYE_OUTBOUND_RESULT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        RESULT_ID,
+      </if>
+      <if test="inventoryId != null">
+        INVENTORY_ID,
+      </if>
+      <if test="orderId != null">
+        ORDER_ID,
+      </if>
+      <if test="consigneeId != null">
+        CONSIGNEE_ID,
+      </if>
+      <if test="capacityNumbher != null">
+        CAPACITY_NUMBHER,
+      </if>
+      <if test="capacityId != null">
+        CAPACITY_ID,
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID,
+      </if>
+      <if test="meter != null">
+        METER,
+      </if>
+      <if test="materialNumber != null">
+        MATERIAL_NUMBER,
+      </if>
+      <if test="theoryWeight != null">
+        THEORY_WEIGHT,
+      </if>
+      <if test="singleWeight != null">
+        SINGLE_WEIGHT,
+      </if>
+      <if test="saleArea != null">
+        SALE_AREA,
+      </if>
+      <if test="netWeight != null">
+        NET_WEIGHT,
+      </if>
+      <if test="inboundWarehouse != null">
+        INBOUND_WAREHOUSE,
+      </if>
+      <if test="inboundArea != null">
+        INBOUND_AREA,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="deleted != null">
+        DELETED,
+      </if>
+      <if test="alternateFields2 != null">
+        ALTERNATE_FIELDS2,
+      </if>
+      <if test="alternateFields3 != null">
+        ALTERNATE_FIELDS3,
+      </if>
+      <if test="alternateFields4 != null">
+        ALTERNATE_FIELDS4,
+      </if>
+      <if test="alternateFields5 != null">
+        ALTERNATE_FIELDS5,
+      </if>
+      <if test="alternateFields6 != null">
+        ALTERNATE_FIELDS6,
+      </if>
+      <if test="alternateFields7 != null">
+        ALTERNATE_FIELDS7,
+      </if>
+      <if test="alternateFields8 != null">
+        ALTERNATE_FIELDS8,
+      </if>
+      <if test="saleMaterialId != null">
+        SALE_MATERIAL_ID,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        #{resultId,jdbcType=DECIMAL},
+      </if>
+      <if test="inventoryId != null">
+        #{inventoryId,jdbcType=DECIMAL},
+      </if>
+      <if test="orderId != null">
+        #{orderId,jdbcType=DECIMAL},
+      </if>
+      <if test="consigneeId != null">
+        #{consigneeId,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityNumbher != null">
+        #{capacityNumbher,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityId != null">
+        #{capacityId,jdbcType=DECIMAL},
+      </if>
+      <if test="materialId != null">
+        #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="meter != null">
+        #{meter,jdbcType=DECIMAL},
+      </if>
+      <if test="materialNumber != null">
+        #{materialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="theoryWeight != null">
+        #{theoryWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="singleWeight != null">
+        #{singleWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="saleArea != null">
+        #{saleArea,jdbcType=VARCHAR},
+      </if>
+      <if test="netWeight != null">
+        #{netWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="inboundWarehouse != null">
+        #{inboundWarehouse,jdbcType=VARCHAR},
+      </if>
+      <if test="inboundArea != null">
+        #{inboundArea,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        #{deleted,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields2 != null">
+        #{alternateFields2,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields3 != null">
+        #{alternateFields3,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields4 != null">
+        #{alternateFields4,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields5 != null">
+        #{alternateFields5,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields6 != null">
+        #{alternateFields6,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields7 != null">
+        #{alternateFields7,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields8 != null">
+        #{alternateFields8,jdbcType=VARCHAR},
+      </if>
+      <if test="saleMaterialId != null">
+        #{saleMaterialId,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OyeOutboundResult">
+    update OYE_OUTBOUND_RESULT
+    set INVENTORY_ID = #{inventoryId,jdbcType=DECIMAL},
+        ORDER_ID = #{orderId,jdbcType=DECIMAL},
+        CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL},
+        CAPACITY_NUMBHER = #{capacityNumbher,jdbcType=VARCHAR},
+        CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+        METER = #{meter,jdbcType=DECIMAL},
+        MATERIAL_NUMBER = #{materialNumber,jdbcType=DECIMAL},
+        THEORY_WEIGHT = #{theoryWeight,jdbcType=DECIMAL},
+        SINGLE_WEIGHT = #{singleWeight,jdbcType=DECIMAL},
+        SALE_AREA = #{saleArea,jdbcType=VARCHAR},
+        NET_WEIGHT = #{netWeight,jdbcType=DECIMAL},
+        INBOUND_WAREHOUSE = #{inboundWarehouse,jdbcType=VARCHAR},
+        INBOUND_AREA = #{inboundArea,jdbcType=VARCHAR},
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+        DELETED = #{deleted,jdbcType=VARCHAR},
+        ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
+        ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
+        ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
+        ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
+        ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
+        ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
+        ALTERNATE_FIELDS8 = #{alternateFields8,jdbcType=VARCHAR},
+        SALE_MATERIAL_ID = #{saleMaterialId,jdbcType=DECIMAL}
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OyeOutboundResult">
+    update OYE_OUTBOUND_RESULT
+    <set>
+      <if test="inventoryId != null">
+        INVENTORY_ID = #{inventoryId,jdbcType=DECIMAL},
+      </if>
+      <if test="orderId != null">
+        ORDER_ID = #{orderId,jdbcType=DECIMAL},
+      </if>
+      <if test="consigneeId != null">
+        CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityNumbher != null">
+        CAPACITY_NUMBHER = #{capacityNumbher,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityId != null">
+        CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="meter != null">
+        METER = #{meter,jdbcType=DECIMAL},
+      </if>
+      <if test="materialNumber != null">
+        MATERIAL_NUMBER = #{materialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="theoryWeight != null">
+        THEORY_WEIGHT = #{theoryWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="singleWeight != null">
+        SINGLE_WEIGHT = #{singleWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="saleArea != null">
+        SALE_AREA = #{saleArea,jdbcType=VARCHAR},
+      </if>
+      <if test="netWeight != null">
+        NET_WEIGHT = #{netWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="inboundWarehouse != null">
+        INBOUND_WAREHOUSE = #{inboundWarehouse,jdbcType=VARCHAR},
+      </if>
+      <if test="inboundArea != null">
+        INBOUND_AREA = #{inboundArea,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        DELETED = #{deleted,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields2 != null">
+        ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields3 != null">
+        ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields4 != null">
+        ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields5 != null">
+        ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields6 != null">
+        ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields7 != null">
+        ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields8 != null">
+        ALTERNATE_FIELDS8 = #{alternateFields8,jdbcType=VARCHAR},
+      </if>
+      <if test="saleMaterialId != null">
+        SALE_MATERIAL_ID = #{saleMaterialId,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where RESULT_ID = #{resultId,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 OYE_OUTBOUND_RESULT
+    (RESULT_ID,
+    INVENTORY_ID, ORDER_ID, CONSIGNEE_ID,
+    CAPACITY_NUMBHER, CAPACITY_ID,
+    MATERIAL_ID, METER, MATERIAL_NUMBER,
+    THEORY_WEIGHT, SINGLE_WEIGHT, SALE_AREA,
+    NET_WEIGHT, INBOUND_WAREHOUSE,
+    INBOUND_AREA, INSERT_TIME, INSERT_USERNAME,
+    UPDATE_TIME, UPDATE_USERNAME,
+    DELETED, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3,
+    ALTERNATE_FIELDS4, ALTERNATE_FIELDS5,
+    ALTERNATE_FIELDS6, ALTERNATE_FIELDS7,
+    ALTERNATE_FIELDS8, SALE_MATERIAL_ID
+    )
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.resultId,jdbcType=DECIMAL},
+    #{item.inventoryId,jdbcType=DECIMAL}, #{item.orderId,jdbcType=DECIMAL}, #{item.consigneeId,jdbcType=DECIMAL},
+    #{item.capacityNumbher,jdbcType=VARCHAR}, #{item.capacityId,jdbcType=DECIMAL},
+    #{item.materialId,jdbcType=DECIMAL}, #{item.meter,jdbcType=DECIMAL}, #{item.materialNumber,jdbcType=DECIMAL},
+    #{item.theoryWeight,jdbcType=DECIMAL}, #{item.singleWeight,jdbcType=DECIMAL}, #{item.saleArea,jdbcType=VARCHAR},
+    #{item.netWeight,jdbcType=DECIMAL}, #{item.inboundWarehouse,jdbcType=VARCHAR},
+    #{item.inboundArea,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR},
+    #{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
+    #{item.deleted,jdbcType=VARCHAR}, #{item.alternateFields2,jdbcType=VARCHAR}, #{item.alternateFields3,jdbcType=VARCHAR},
+    #{item.alternateFields4,jdbcType=VARCHAR}, #{item.alternateFields5,jdbcType=VARCHAR},
+    #{item.alternateFields6,jdbcType=VARCHAR}, #{item.alternateFields7,jdbcType=VARCHAR},
+    #{item.alternateFields8,jdbcType=VARCHAR}, #{item.saleMaterialId,jdbcType=DECIMAL}
+    from dual
+  </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+    update OYE_OUTBOUND_RESULT
+    set
+    RESULT_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
+    </foreach>
+    ,INVENTORY_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.inventoryId,jdbcType=DECIMAL}
+    </foreach>
+    ,ORDER_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
+    </foreach>
+    ,CONSIGNEE_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.consigneeId,jdbcType=DECIMAL}
+    </foreach>
+    ,CAPACITY_NUMBHER=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityNumbher,jdbcType=VARCHAR}
+    </foreach>
+    ,CAPACITY_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
+    </foreach>
+    ,MATERIAL_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+    </foreach>
+    ,METER=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.meter,jdbcType=DECIMAL}
+    </foreach>
+    ,MATERIAL_NUMBER=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.materialNumber,jdbcType=DECIMAL}
+    </foreach>
+    ,THEORY_WEIGHT=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.theoryWeight,jdbcType=DECIMAL}
+    </foreach>
+    ,SINGLE_WEIGHT=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.singleWeight,jdbcType=DECIMAL}
+    </foreach>
+    ,SALE_AREA=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.saleArea,jdbcType=VARCHAR}
+    </foreach>
+    ,NET_WEIGHT=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.netWeight,jdbcType=DECIMAL}
+    </foreach>
+    ,INBOUND_WAREHOUSE=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundWarehouse,jdbcType=VARCHAR}
+    </foreach>
+    ,INBOUND_AREA=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.inboundArea,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETED=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=VARCHAR}
+    </foreach>
+    ,ALTERNATE_FIELDS2=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields2,jdbcType=VARCHAR}
+    </foreach>
+    ,ALTERNATE_FIELDS3=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields3,jdbcType=VARCHAR}
+    </foreach>
+    ,ALTERNATE_FIELDS4=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields4,jdbcType=VARCHAR}
+    </foreach>
+    ,ALTERNATE_FIELDS5=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields5,jdbcType=VARCHAR}
+    </foreach>
+    ,ALTERNATE_FIELDS6=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields6,jdbcType=VARCHAR}
+    </foreach>
+    ,ALTERNATE_FIELDS7=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields7,jdbcType=VARCHAR}
+    </foreach>
+    ,ALTERNATE_FIELDS8=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.alternateFields8,jdbcType=VARCHAR}
+    </foreach>
+    ,SALE_MATERIAL_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.saleMaterialId,jdbcType=DECIMAL}
+    </foreach>
+    where RESULT_ID in
+    <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+      #{item.resultId,jdbcType=DECIMAL}
+    </foreach>
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from OYE_OUTBOUND_RESULT
+    where RESULT_ID in
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="oyeOutboundResultMapper" resultType="java.util.Map">
+    SELECT OOR.SINGLE_WEIGHT "singleWeight",
+    OOR.METER    "meter",
+    OOR.MATERIAL_ID  "materialId",
+    OOR.CAPACITY_NUMBHER "capacityNumber",
+    OOR.MATERIAL_NUMBER  "materialNumber",
+    OOR.THEORY_WEIGHT    "theoryWeight",
+    OOR.NET_WEIGHT       "netWeight",
+    OOR.SALE_AREA        "saleArea",
+    OOR.INVENTORY_ID     "inventoryId",
+    OOR.INBOUND_WAREHOUSE "outWarehouse",
+    OOR.INBOUND_AREA     "outboundArea",
+    OOR.INSERT_TIME      "insertTime",
+    RC.CONSIGNEE_ID      "consigneeId",
+    RC.CONSIGNEE_COMPANY_NAME    "consigneeName",
+    RM.MATERIAL_NAME "materialName",
+    RM.MATERIAL_SPECIFICATION "materialSpe",
+    RM.MATERIAL_MODEL    "materialModel",
+    OO.ORDER_ID          "orderId",
+    OO.ORDER_NUMBER      "orderNumber",
+    OO.CAPACITY_ID       "capacityId"
+    FROM OYE_OUTBOUND_RESULT OOR
+    LEFT JOIN RMS_MATERIAL RM on OOR.MATERIAL_ID = RM.MATERIAL_ID
+    LEFT JOIN RMS_CONSIGNEE RC on OOR.CONSIGNEE_ID = RC.CONSIGNEE_ID
+    LEFT JOIN OMSTRUCK_ORDER OO on OOR.ORDER_ID = OO.ORDER_ID
+    <where>
+      <if test="oneDate != null">
+        and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= OOR.INSERT_TIME
+      </if>
+      <if test="startDate != null and isEnFactoryFlag == 5">
+        and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= OOR.INSERT_TIME
+        and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= OOR.INSERT_TIME
+      </if>
+      <if test="consigneeName != null and consigneeName != ''">
+        AND RC.CONSIGNEE_COMPANY_NAME LIKE '%${consigneeName}%'
+      </if>
+      <if test="capacityNumber != null and capacityNumber != ''">
+        AND OOR.CAPACITY_NUMBHER LIKE '%${capacityNumber}%'
+      </if>
+      <if test="saleArea != null and saleArea != ''">
+        AND OOR.SALE_AREA LIKE '%${saleArea}%'
+      </if>
+      <if test="inboundWarehouse != null and inboundWarehouse != ''">
+        AND OOR.INBOUND_WAREHOUSE LIKE '%${inboundWarehouse}%'
+      </if>
+      <if test="inboundArea != null and inboundArea != ''">
+        AND OOR.inbound_Area LIKE '%${inboundArea}%'
+      </if>
+      <if test="materialName != null and materialName != ''">
+        AND RM.material_Name LIKE '%${materialName}%'
+      </if>
+      <if test="materialSpe != null and materialSpe != ''">
+        AND RM.MATERIAL_SPECIFICATION LIKE '%${materialSpe}%'
+      </if>
+    </where>
+    ORDER BY OOR.INSERT_TIME DESC
+  </select>
+  <select id="selectSaleMaterialID" resultType="java.math.BigDecimal">
+    SELECT OOR.SALE_MATERIAL_ID FROM OYE_OUTBOUND_RESULT OOR
+    WHERE OOR.SALE_MATERIAL_ID = #{saleMaterialId}
+  </select>
+
+</mapper>

+ 742 - 0
src/main/resources/com/steerinfo/dil/mapper/OyeRealtimeInventoryMapper.xml

@@ -0,0 +1,742 @@
+<?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.OyeRealtimeInventoryMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OyeRealtimeInventory">
+    <id column="INVENTORY_ID" jdbcType="DECIMAL" property="inventoryId" />
+    <result column="CONSIGNEE_ID" jdbcType="DECIMAL" property="consigneeId" />
+    <result column="SALE_AREA" jdbcType="VARCHAR" property="saleArea" />
+    <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
+    <result column="METER" jdbcType="DECIMAL" property="meter" />
+    <result column="MATERIAL_NUMBER" jdbcType="DECIMAL" property="materialNumber" />
+    <result column="THEORY_WEIGHT" jdbcType="DECIMAL" property="theoryWeight" />
+    <result column="SINGLE_WEIGHT" jdbcType="DECIMAL" property="singleWeight" />
+    <result column="NET_WEIGHT" jdbcType="DECIMAL" property="netWeight" />
+    <result column="INBOUND_WAREHOUSE" jdbcType="VARCHAR" property="inboundWarehouse" />
+    <result column="INBOUND_AREA" jdbcType="VARCHAR" property="inboundArea" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+    <result column="DELETED" jdbcType="VARCHAR" property="deleted" />
+    <result column="ALTERNATE_FIELDS2" jdbcType="VARCHAR" property="alternateFields2" />
+    <result column="ALTERNATE_FIELDS3" jdbcType="VARCHAR" property="alternateFields3" />
+    <result column="ALTERNATE_FIELDS4" jdbcType="VARCHAR" property="alternateFields4" />
+    <result column="ALTERNATE_FIELDS5" jdbcType="VARCHAR" property="alternateFields5" />
+    <result column="ALTERNATE_FIELDS6" jdbcType="VARCHAR" property="alternateFields6" />
+    <result column="ALTERNATE_FIELDS7" jdbcType="VARCHAR" property="alternateFields7" />
+    <result column="ALTERNATE_FIELDS8" jdbcType="VARCHAR" property="alternateFields8" />
+  </resultMap>
+  <sql id="columns">
+    INVENTORY_ID, CONSIGNEE_ID, SALE_AREA, MATERIAL_ID, METER, MATERIAL_NUMBER, THEORY_WEIGHT, 
+    SINGLE_WEIGHT, NET_WEIGHT, INBOUND_WAREHOUSE, INBOUND_AREA, INSERT_TIME, INSERT_USERNAME, 
+    UPDATE_TIME, UPDATE_USERNAME, DELETED, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3, ALTERNATE_FIELDS4, 
+    ALTERNATE_FIELDS5, ALTERNATE_FIELDS6, ALTERNATE_FIELDS7, ALTERNATE_FIELDS8
+  </sql>
+  <sql id="columns_alias">
+    t.INVENTORY_ID, t.CONSIGNEE_ID, t.SALE_AREA, t.MATERIAL_ID, t.METER, t.MATERIAL_NUMBER, 
+    t.THEORY_WEIGHT, t.SINGLE_WEIGHT, t.NET_WEIGHT, t.INBOUND_WAREHOUSE, t.INBOUND_AREA, 
+    t.INSERT_TIME, t.INSERT_USERNAME, t.UPDATE_TIME, t.UPDATE_USERNAME, t.DELETED, t.ALTERNATE_FIELDS2, 
+    t.ALTERNATE_FIELDS3, t.ALTERNATE_FIELDS4, t.ALTERNATE_FIELDS5, t.ALTERNATE_FIELDS6, 
+    t.ALTERNATE_FIELDS7, t.ALTERNATE_FIELDS8
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM OYE_REALTIME_INVENTORY
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM OYE_REALTIME_INVENTORY t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="inventoryId != null">
+        and INVENTORY_ID = #{inventoryId}
+      </if>
+      <if test="consigneeId != null">
+        and CONSIGNEE_ID = #{consigneeId}
+      </if>
+      <if test="saleArea != null and saleArea != ''">
+        and SALE_AREA = #{saleArea}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="meter != null">
+        and METER = #{meter}
+      </if>
+      <if test="materialNumber != null">
+        and MATERIAL_NUMBER = #{materialNumber}
+      </if>
+      <if test="theoryWeight != null">
+        and THEORY_WEIGHT = #{theoryWeight}
+      </if>
+      <if test="singleWeight != null">
+        and SINGLE_WEIGHT = #{singleWeight}
+      </if>
+      <if test="netWeight != null">
+        and NET_WEIGHT = #{netWeight}
+      </if>
+      <if test="inboundWarehouse != null and inboundWarehouse != ''">
+        and INBOUND_WAREHOUSE = #{inboundWarehouse}
+      </if>
+      <if test="inboundArea != null and inboundArea != ''">
+        and INBOUND_AREA = #{inboundArea}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="deleted != null and deleted != ''">
+        and DELETED = #{deleted}
+      </if>
+      <if test="alternateFields2 != null and alternateFields2 != ''">
+        and ALTERNATE_FIELDS2 = #{alternateFields2}
+      </if>
+      <if test="alternateFields3 != null and alternateFields3 != ''">
+        and ALTERNATE_FIELDS3 = #{alternateFields3}
+      </if>
+      <if test="alternateFields4 != null and alternateFields4 != ''">
+        and ALTERNATE_FIELDS4 = #{alternateFields4}
+      </if>
+      <if test="alternateFields5 != null and alternateFields5 != ''">
+        and ALTERNATE_FIELDS5 = #{alternateFields5}
+      </if>
+      <if test="alternateFields6 != null and alternateFields6 != ''">
+        and ALTERNATE_FIELDS6 = #{alternateFields6}
+      </if>
+      <if test="alternateFields7 != null and alternateFields7 != ''">
+        and ALTERNATE_FIELDS7 = #{alternateFields7}
+      </if>
+      <if test="alternateFields8 != null and alternateFields8 != ''">
+        and ALTERNATE_FIELDS8 = #{alternateFields8}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="inventoryId != null">
+        and INVENTORY_ID = #{inventoryId}
+      </if>
+      <if test="consigneeId != null">
+        and CONSIGNEE_ID = #{consigneeId}
+      </if>
+      <if test="saleArea != null and saleArea != ''">
+        and SALE_AREA LIKE '%${saleArea}%'
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="meter != null">
+        and METER = #{meter}
+      </if>
+      <if test="materialNumber != null">
+        and MATERIAL_NUMBER = #{materialNumber}
+      </if>
+      <if test="theoryWeight != null">
+        and THEORY_WEIGHT = #{theoryWeight}
+      </if>
+      <if test="singleWeight != null">
+        and SINGLE_WEIGHT = #{singleWeight}
+      </if>
+      <if test="netWeight != null">
+        and NET_WEIGHT = #{netWeight}
+      </if>
+      <if test="inboundWarehouse != null and inboundWarehouse != ''">
+        and INBOUND_WAREHOUSE LIKE '%${inboundWarehouse}%'
+      </if>
+      <if test="inboundArea != null and inboundArea != ''">
+        and INBOUND_AREA LIKE '%${inboundArea}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="deleted != null and deleted != ''">
+        and DELETED LIKE '%${deleted}%'
+      </if>
+      <if test="alternateFields2 != null and alternateFields2 != ''">
+        and ALTERNATE_FIELDS2 LIKE '%${alternateFields2}%'
+      </if>
+      <if test="alternateFields3 != null and alternateFields3 != ''">
+        and ALTERNATE_FIELDS3 LIKE '%${alternateFields3}%'
+      </if>
+      <if test="alternateFields4 != null and alternateFields4 != ''">
+        and ALTERNATE_FIELDS4 LIKE '%${alternateFields4}%'
+      </if>
+      <if test="alternateFields5 != null and alternateFields5 != ''">
+        and ALTERNATE_FIELDS5 LIKE '%${alternateFields5}%'
+      </if>
+      <if test="alternateFields6 != null and alternateFields6 != ''">
+        and ALTERNATE_FIELDS6 LIKE '%${alternateFields6}%'
+      </if>
+      <if test="alternateFields7 != null and alternateFields7 != ''">
+        and ALTERNATE_FIELDS7 LIKE '%${alternateFields7}%'
+      </if>
+      <if test="alternateFields8 != null and alternateFields8 != ''">
+        and ALTERNATE_FIELDS8 LIKE '%${alternateFields8}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from OYE_REALTIME_INVENTORY
+    where INVENTORY_ID = #{inventoryId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from OYE_REALTIME_INVENTORY
+    where 1!=1 
+      <if test="consigneeId != null">
+        or CONSIGNEE_ID = #{consigneeId}
+      </if>
+      <if test="saleArea != null and saleArea != ''">
+        or SALE_AREA = #{saleArea}
+      </if>
+      <if test="materialId != null">
+        or MATERIAL_ID = #{materialId}
+      </if>
+      <if test="meter != null">
+        or METER = #{meter}
+      </if>
+      <if test="materialNumber != null">
+        or MATERIAL_NUMBER = #{materialNumber}
+      </if>
+      <if test="theoryWeight != null">
+        or THEORY_WEIGHT = #{theoryWeight}
+      </if>
+      <if test="singleWeight != null">
+        or SINGLE_WEIGHT = #{singleWeight}
+      </if>
+      <if test="netWeight != null">
+        or NET_WEIGHT = #{netWeight}
+      </if>
+      <if test="inboundWarehouse != null and inboundWarehouse != ''">
+        or INBOUND_WAREHOUSE = #{inboundWarehouse}
+      </if>
+      <if test="inboundArea != null and inboundArea != ''">
+        or INBOUND_AREA = #{inboundArea}
+      </if>
+      <if test="insertTime != null">
+        or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        or INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        or UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="deleted != null and deleted != ''">
+        or DELETED = #{deleted}
+      </if>
+      <if test="alternateFields2 != null and alternateFields2 != ''">
+        or ALTERNATE_FIELDS2 = #{alternateFields2}
+      </if>
+      <if test="alternateFields3 != null and alternateFields3 != ''">
+        or ALTERNATE_FIELDS3 = #{alternateFields3}
+      </if>
+      <if test="alternateFields4 != null and alternateFields4 != ''">
+        or ALTERNATE_FIELDS4 = #{alternateFields4}
+      </if>
+      <if test="alternateFields5 != null and alternateFields5 != ''">
+        or ALTERNATE_FIELDS5 = #{alternateFields5}
+      </if>
+      <if test="alternateFields6 != null and alternateFields6 != ''">
+        or ALTERNATE_FIELDS6 = #{alternateFields6}
+      </if>
+      <if test="alternateFields7 != null and alternateFields7 != ''">
+        or ALTERNATE_FIELDS7 = #{alternateFields7}
+      </if>
+      <if test="alternateFields8 != null and alternateFields8 != ''">
+        or ALTERNATE_FIELDS8 = #{alternateFields8}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.OyeRealtimeInventory">
+    insert into OYE_REALTIME_INVENTORY (INVENTORY_ID, CONSIGNEE_ID, SALE_AREA, 
+      MATERIAL_ID, METER, MATERIAL_NUMBER, 
+      THEORY_WEIGHT, SINGLE_WEIGHT, NET_WEIGHT, 
+      INBOUND_WAREHOUSE, INBOUND_AREA, INSERT_TIME, 
+      INSERT_USERNAME, UPDATE_TIME, UPDATE_USERNAME, 
+      DELETED, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3, 
+      ALTERNATE_FIELDS4, ALTERNATE_FIELDS5, ALTERNATE_FIELDS6, 
+      ALTERNATE_FIELDS7, ALTERNATE_FIELDS8)
+    values (#{inventoryId,jdbcType=DECIMAL}, #{consigneeId,jdbcType=DECIMAL}, #{saleArea,jdbcType=VARCHAR}, 
+      #{materialId,jdbcType=DECIMAL}, #{meter,jdbcType=DECIMAL}, #{materialNumber,jdbcType=DECIMAL}, 
+      #{theoryWeight,jdbcType=DECIMAL}, #{singleWeight,jdbcType=DECIMAL}, #{netWeight,jdbcType=DECIMAL}, 
+      #{inboundWarehouse,jdbcType=VARCHAR}, #{inboundArea,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, 
+      #{insertUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
+      #{deleted,jdbcType=VARCHAR}, #{alternateFields2,jdbcType=VARCHAR}, #{alternateFields3,jdbcType=VARCHAR}, 
+      #{alternateFields4,jdbcType=VARCHAR}, #{alternateFields5,jdbcType=VARCHAR}, #{alternateFields6,jdbcType=VARCHAR}, 
+      #{alternateFields7,jdbcType=VARCHAR}, #{alternateFields8,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OyeRealtimeInventory">
+    insert into OYE_REALTIME_INVENTORY
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="inventoryId != null">
+        INVENTORY_ID,
+      </if>
+      <if test="consigneeId != null">
+        CONSIGNEE_ID,
+      </if>
+      <if test="saleArea != null">
+        SALE_AREA,
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID,
+      </if>
+      <if test="meter != null">
+        METER,
+      </if>
+      <if test="materialNumber != null">
+        MATERIAL_NUMBER,
+      </if>
+      <if test="theoryWeight != null">
+        THEORY_WEIGHT,
+      </if>
+      <if test="singleWeight != null">
+        SINGLE_WEIGHT,
+      </if>
+      <if test="netWeight != null">
+        NET_WEIGHT,
+      </if>
+      <if test="inboundWarehouse != null">
+        INBOUND_WAREHOUSE,
+      </if>
+      <if test="inboundArea != null">
+        INBOUND_AREA,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="deleted != null">
+        DELETED,
+      </if>
+      <if test="alternateFields2 != null">
+        ALTERNATE_FIELDS2,
+      </if>
+      <if test="alternateFields3 != null">
+        ALTERNATE_FIELDS3,
+      </if>
+      <if test="alternateFields4 != null">
+        ALTERNATE_FIELDS4,
+      </if>
+      <if test="alternateFields5 != null">
+        ALTERNATE_FIELDS5,
+      </if>
+      <if test="alternateFields6 != null">
+        ALTERNATE_FIELDS6,
+      </if>
+      <if test="alternateFields7 != null">
+        ALTERNATE_FIELDS7,
+      </if>
+      <if test="alternateFields8 != null">
+        ALTERNATE_FIELDS8,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="inventoryId != null">
+        #{inventoryId,jdbcType=DECIMAL},
+      </if>
+      <if test="consigneeId != null">
+        #{consigneeId,jdbcType=DECIMAL},
+      </if>
+      <if test="saleArea != null">
+        #{saleArea,jdbcType=VARCHAR},
+      </if>
+      <if test="materialId != null">
+        #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="meter != null">
+        #{meter,jdbcType=DECIMAL},
+      </if>
+      <if test="materialNumber != null">
+        #{materialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="theoryWeight != null">
+        #{theoryWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="singleWeight != null">
+        #{singleWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="netWeight != null">
+        #{netWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="inboundWarehouse != null">
+        #{inboundWarehouse,jdbcType=VARCHAR},
+      </if>
+      <if test="inboundArea != null">
+        #{inboundArea,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        #{deleted,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields2 != null">
+        #{alternateFields2,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields3 != null">
+        #{alternateFields3,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields4 != null">
+        #{alternateFields4,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields5 != null">
+        #{alternateFields5,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields6 != null">
+        #{alternateFields6,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields7 != null">
+        #{alternateFields7,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields8 != null">
+        #{alternateFields8,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OyeRealtimeInventory">
+    update OYE_REALTIME_INVENTORY
+    set CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL},
+      SALE_AREA = #{saleArea,jdbcType=VARCHAR},
+      MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      METER = #{meter,jdbcType=DECIMAL},
+      MATERIAL_NUMBER = #{materialNumber,jdbcType=DECIMAL},
+      THEORY_WEIGHT = #{theoryWeight,jdbcType=DECIMAL},
+      SINGLE_WEIGHT = #{singleWeight,jdbcType=DECIMAL},
+      NET_WEIGHT = #{netWeight,jdbcType=DECIMAL},
+      INBOUND_WAREHOUSE = #{inboundWarehouse,jdbcType=VARCHAR},
+      INBOUND_AREA = #{inboundArea,jdbcType=VARCHAR},
+      INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      DELETED = #{deleted,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
+      ALTERNATE_FIELDS8 = #{alternateFields8,jdbcType=VARCHAR}
+    where INVENTORY_ID = #{inventoryId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OyeRealtimeInventory">
+    update OYE_REALTIME_INVENTORY
+    <set>
+      <if test="consigneeId != null">
+        CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL},
+      </if>
+      <if test="saleArea != null">
+        SALE_AREA = #{saleArea,jdbcType=VARCHAR},
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="meter != null">
+        METER = #{meter,jdbcType=DECIMAL},
+      </if>
+      <if test="materialNumber != null">
+        MATERIAL_NUMBER = #{materialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="theoryWeight != null">
+        THEORY_WEIGHT = #{theoryWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="singleWeight != null">
+        SINGLE_WEIGHT = #{singleWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="netWeight != null">
+        NET_WEIGHT = #{netWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="inboundWarehouse != null">
+        INBOUND_WAREHOUSE = #{inboundWarehouse,jdbcType=VARCHAR},
+      </if>
+      <if test="inboundArea != null">
+        INBOUND_AREA = #{inboundArea,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        DELETED = #{deleted,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields2 != null">
+        ALTERNATE_FIELDS2 = #{alternateFields2,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields3 != null">
+        ALTERNATE_FIELDS3 = #{alternateFields3,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields4 != null">
+        ALTERNATE_FIELDS4 = #{alternateFields4,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields5 != null">
+        ALTERNATE_FIELDS5 = #{alternateFields5,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields6 != null">
+        ALTERNATE_FIELDS6 = #{alternateFields6,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields7 != null">
+        ALTERNATE_FIELDS7 = #{alternateFields7,jdbcType=VARCHAR},
+      </if>
+      <if test="alternateFields8 != null">
+        ALTERNATE_FIELDS8 = #{alternateFields8,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where INVENTORY_ID = #{inventoryId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where INVENTORY_ID = #{inventoryId,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 OYE_REALTIME_INVENTORY 
+      (INVENTORY_ID, 
+      CONSIGNEE_ID, SALE_AREA, MATERIAL_ID, 
+      METER, MATERIAL_NUMBER, THEORY_WEIGHT, 
+      SINGLE_WEIGHT, NET_WEIGHT, INBOUND_WAREHOUSE, 
+      INBOUND_AREA, INSERT_TIME, INSERT_USERNAME, 
+      UPDATE_TIME, UPDATE_USERNAME, 
+      DELETED, ALTERNATE_FIELDS2, ALTERNATE_FIELDS3, 
+      ALTERNATE_FIELDS4, ALTERNATE_FIELDS5, 
+      ALTERNATE_FIELDS6, ALTERNATE_FIELDS7, 
+      ALTERNATE_FIELDS8)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.inventoryId,jdbcType=DECIMAL}, 
+      #{item.consigneeId,jdbcType=DECIMAL}, #{item.saleArea,jdbcType=VARCHAR}, #{item.materialId,jdbcType=DECIMAL}, 
+      #{item.meter,jdbcType=DECIMAL}, #{item.materialNumber,jdbcType=DECIMAL}, #{item.theoryWeight,jdbcType=DECIMAL}, 
+      #{item.singleWeight,jdbcType=DECIMAL}, #{item.netWeight,jdbcType=DECIMAL}, #{item.inboundWarehouse,jdbcType=VARCHAR}, 
+      #{item.inboundArea,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
+      #{item.deleted,jdbcType=VARCHAR}, #{item.alternateFields2,jdbcType=VARCHAR}, #{item.alternateFields3,jdbcType=VARCHAR}, 
+      #{item.alternateFields4,jdbcType=VARCHAR}, #{item.alternateFields5,jdbcType=VARCHAR}, 
+      #{item.alternateFields6,jdbcType=VARCHAR}, #{item.alternateFields7,jdbcType=VARCHAR}, 
+      #{item.alternateFields8,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update OYE_REALTIME_INVENTORY
+     set
+       INVENTORY_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.inventoryId,jdbcType=DECIMAL}
+       </foreach>
+       ,CONSIGNEE_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.consigneeId,jdbcType=DECIMAL}
+       </foreach>
+       ,SALE_AREA=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.saleArea,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIAL_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+       </foreach>
+       ,METER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.meter,jdbcType=DECIMAL}
+       </foreach>
+       ,MATERIAL_NUMBER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.materialNumber,jdbcType=DECIMAL}
+       </foreach>
+       ,THEORY_WEIGHT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.theoryWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,SINGLE_WEIGHT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.singleWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,NET_WEIGHT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.netWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,INBOUND_WAREHOUSE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.inboundWarehouse,jdbcType=VARCHAR}
+       </foreach>
+       ,INBOUND_AREA=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.inboundArea,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,DELETED=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS2=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.alternateFields2,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS3=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.alternateFields3,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS4=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.alternateFields4,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS5=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.alternateFields5,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS6=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.alternateFields6,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS7=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.alternateFields7,jdbcType=VARCHAR}
+       </foreach>
+       ,ALTERNATE_FIELDS8=
+       <foreach collection="list" item="item" index="index" separator=" " open="case INVENTORY_ID" close="end">
+          when #{item.inventoryId,jdbcType=DECIMAL} then #{item.alternateFields8,jdbcType=VARCHAR}
+       </foreach>
+     where INVENTORY_ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.inventoryId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from OYE_REALTIME_INVENTORY
+    where INVENTORY_ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getOyeRealTimeResult" resultType="java.util.Map">
+    SELECT ORI.SINGLE_WEIGHT "singleWeight",
+    ORI.METER    "meter",
+    ORI.MATERIAL_ID  "materialId",
+    ORI.MATERIAL_NUMBER  "materialNumber",
+    ORI.THEORY_WEIGHT    "theoryWeight",
+    ORI.NET_WEIGHT       "netWeight",
+    ORI.SALE_AREA        "saleArea",
+    ORI.INVENTORY_ID     "inventoryId",
+    ORI.INBOUND_WAREHOUSE "inboundWarehouse",
+    ORI.INBOUND_AREA     "inboundArea",
+    ORI.INSERT_TIME      "insertTime",
+    RC.CONSIGNEE_ID      "consigneeId",
+    RC.CONSIGNEE_COMPANY_NAME    "consigneeName",
+    RM.MATERIAL_NAME "materialName",
+    RM.MATERIAL_SPECIFICATION "materialSpe",
+    RM.MATERIAL_MODEL    "materialModel"
+    FROM OYE_REALTIME_INVENTORY ORI
+    LEFT JOIN RMS_MATERIAL RM on ORI.MATERIAL_ID = RM.MATERIAL_ID
+    LEFT JOIN RMS_CONSIGNEE RC on ORI.CONSIGNEE_ID = RC.CONSIGNEE_ID
+    <where>
+      <if test="startDate != null and isEnFactoryFlag == 5">
+        and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') &lt;= ORI.INSERT_TIME
+        and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= ORI.INSERT_TIME
+      </if>
+      <if test="consigneeName != null and consigneeName != ''">
+        AND RC.CONSIGNEE_COMPANY_NAME LIKE '%${consigneeName}%'
+      </if>
+      <if test="saleArea != null and saleArea != ''">
+        AND ORI.SALE_AREA LIKE '%${saleArea}%'
+      </if>
+      <if test="inboundWarehouse != null and inboundWarehouse != ''">
+        AND ORI.INBOUND_WAREHOUSE LIKE '%${inboundWarehouse}%'
+      </if>
+      <if test="inboundArea != null and inboundArea != ''">
+        AND ORI.inbound_Area LIKE '%${inboundArea}%'
+      </if>
+      <if test="materialName != null and materialName != ''">
+        AND RM.material_Name LIKE '%${materialName}%'
+      </if>
+      <if test="materialNameText != null and materialNameText != ''">
+        AND RM.material_Name || RM.MATERIAL_MODEL LIKE '%${materialNameText}%'
+      </if>
+      <if test="materialSpe != null and materialSpe != ''">
+        AND RM.MATERIAL_SPECIFICATION LIKE '%${materialSpe}%'
+      </if>
+      <if test="saleRemark != null and saleRemark != ''">
+        AND ORI.SALE_AREA LIKE '%${saleRemark}%'
+      </if>
+      <if test="receiveCompanyId != null and receiveCompanyId != ''">
+        AND RC.CONSIGNEE_ID LIKE '%${receiveCompanyId}%'
+      </if>
+    </where>
+    ORDER BY ORI.INSERT_TIME DESC
+  </select>
+  <select id="getInventoryId" resultType="java.math.BigDecimal" parameterType="java.util.Map">
+    SELECT ORI.INVENTORY_ID FROM OYE_REALTIME_INVENTORY ORI
+    WHERE ORI.CONSIGNEE_ID = #{consigneeId,jdbcType=DECIMAL}
+    AND ORI.SINGLE_WEIGHT = #{singleWeight,jdbcType=DECIMAL}
+    AND ORI.SALE_AREA = #{saleArea,jdbcType=VARCHAR}
+    AND ORI.material_Id = #{materialId,jdbcType=DECIMAL}
+    AND ORI.INBOUND_WAREHOUSE = #{inboundWarehouse,jdbcType=VARCHAR}
+    AND ORI.meter = #{meter,jdbcType=DECIMAL}
+    AND ORI.INBOUND_AREA = #{inboundArea,jdbcType=VARCHAR}
+  </select>
+
+</mapper>