浏览代码

'零星物资'

HUJIANGUO 3 年之前
父节点
当前提交
60b5cb649c

+ 1 - 1
pom.xml

@@ -111,7 +111,7 @@
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-<!--                        <param>AMSTRUCK_INWARD_REQUIREMENT</param>&lt;!&ndash;销售计划&ndash;&gt;-->
+                        <param>AMSTRUCK_SPORADIC_ORDER</param><!--销售计划-->
 <!--                        <param>AMSTRUCK_INWARD_REQUIREMENT</param>&lt;!&ndash;销售计划物资中间表&ndash;&gt;-->
 <!--                        <param>AMSTRUCK_RAIL_DAYPLAN</param>&lt;!&ndash;销售计划物资中间表&ndash;&gt;-->
 <!--                        <param>AMS_CONTRACT_TRANSPORT_PRICE</param>&lt;!&ndash;销售订单&ndash;&gt;-->

+ 170 - 0
src/main/java/com/steerinfo/dil/controller/AmstruckSporadicOrderController.java

@@ -0,0 +1,170 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.feign.ColumnDataFeign;
+import com.steerinfo.dil.feign.ESFeign;
+import com.steerinfo.dil.service.IAmstruckSporadicOrderService;
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.ColumnDataUtil;
+import com.steerinfo.dil.util.PageListAdd;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageHelper;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * AmstruckSporadicOrder RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-16 02:49
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-16
+ * 作者:generator
+ * 参考:
+ * 描述:AmstruckSporadicOrder RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/amstrucksporadicorders")
+public class AmstruckSporadicOrderController extends BaseRESTfulController {
+
+    @Autowired
+    IAmstruckSporadicOrderService amstruckSporadicOrderService;
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+    @Autowired
+    ColumnDataFeign columnDataFeign;
+    @Autowired
+    ESFeign esFeign;
+
+
+    @ApiOperation(value="新增零星物资进出厂(以及销售钢材退货)")
+    @PostMapping("/addSporadicOrders")
+    public RESTfulResult addSporadicOrders(@RequestBody Map<String,Object> mapValue) {
+        int result = amstruckSporadicOrderService.addSporadicOrders(mapValue);
+        return success(result);
+    }
+
+    @ApiOperation(value="下发零星物资订单")
+    @PostMapping("/issueSporadicOrders")
+    public RESTfulResult issueSporadicOrders(@RequestBody List<Map<String, Object>> mapList) {
+        int result = amstruckSporadicOrderService.issueSporadicOrders(mapList);
+        return success(result);
+    }
+
+    @ApiOperation(value="逻辑删除零星物资订单")
+    @PostMapping("/deleteSporadicOrders")
+    public RESTfulResult deleteSporadicOrders(@RequestParam Integer sporadicOrderId) {
+        int result = amstruckSporadicOrderService.deleteSporadicOrders(sporadicOrderId);
+        return success(result);
+    }
+
+    @ApiOperation(value="查询零星物资订单列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "apiId", value = "384", required = false, dataType = "Integer")
+    })
+    @PostMapping("/getSporadicOrdersList")
+    public RESTfulResult getSporadicOrdersList(@RequestBody(required=false) Map<String,Object> mapValue,
+                                               Integer apiId,
+                                               Integer pageNum,
+                                               Integer pageSize,
+                                               Integer orderType,
+                                               Integer issueStatus,
+                                               String con) {
+        if (con != null && !con.equals("undefined")) {
+            String index="get_sporadic_order_list";//设置要查询的索引名称
+            return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));//获取查询结果
+        }
+        mapValue.put("orderType",orderType);
+        mapValue.put("issueStatus",issueStatus);
+        List<Map<String, Object>> sporadicOrderList = null;
+        if (mapValue.size() == 2) {
+            //将查询结果存入索引中
+            sporadicOrderList =  amstruckSporadicOrderService.getSporadicOrdersList(mapValue);
+            Map<String, Object> map1 = new HashMap<>();
+            //添加索引
+            map1.put("index","get_sporadic_order_list");
+            //添加id
+            map1.put("indexId","sporadicOrderId");
+            sporadicOrderList.add(map1);
+            //新建索引
+            esFeign.insertIndex(sporadicOrderList);
+            //删除
+            sporadicOrderList.remove(sporadicOrderList.size()-1);
+        }
+        if (sporadicOrderList == null) {
+            sporadicOrderList = amstruckSporadicOrderService.getSporadicOrdersList(mapValue);
+        }
+        PageHelper.startPage(pageNum,pageSize);
+        List<Map<String, Object>> columnList = amstruckSporadicOrderService.getSporadicOrdersList(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, sporadicOrderList,columnList);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="查看物资详情")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "apiId", value = "385", required = false, dataType = "Integer")
+    })
+    @PostMapping("/seeAllMaterials")
+    public RESTfulResult seeAllMaterials(@RequestBody(required = false) Map<String,Object> mapValue,
+                                         Integer apiId,
+                                         Integer pageNum,
+                                         Integer pageSize,
+                                         Integer sporadicOrderId,
+                                         String con) {
+        if (con != null && !con.equals("undefined")) {
+            String index="see_all_materials";//设置要查询的索引名称
+            return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));//获取查询结果
+        }
+        mapValue.put("sporadicOrderId",sporadicOrderId);
+        List<Map<String, Object>> mapList = null;
+        if (mapValue.size() == 1) {
+            //将查询结果存入索引中
+            mapList =  amstruckSporadicOrderService.seeAllMaterials(mapValue);
+            Map<String, Object> map1 = new HashMap<>();
+            //添加索引
+            map1.put("index","see_all_materials");
+            //添加id
+            map1.put("indexId","materialId");
+            mapList.add(map1);
+            //新建索引
+            esFeign.insertIndex(mapList);
+            //删除
+            mapList.remove(mapList.size()-1);
+        }
+        if (mapList == null) {
+            mapList = amstruckSporadicOrderService.seeAllMaterials(mapValue);
+        }
+        PageHelper.startPage(pageNum,pageSize);
+        List<Map<String, Object>> columnList = amstruckSporadicOrderService.getSporadicOrdersList(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, mapList,columnList);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="修改零星物资订单")
+    @PostMapping("/updateSporadicOrder")
+    public RESTfulResult updateSporadicOrder(@RequestBody Map<String,Object> mapValue) {
+        int result = amstruckSporadicOrderService.updateSporadicOrder(mapValue);
+        return success(result);
+    }
+
+    @ApiOperation(value="查询修改渲染")
+    @PostMapping("/selectSporadicOrder")
+    public RESTfulResult selectSporadicOrder(@RequestParam Integer sporadicOrderId) {
+        List<Map<String, Object>> mapList = amstruckSporadicOrderService.selectSporadicOrder(sporadicOrderId);
+        return success(mapList);
+    }
+
+}

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

@@ -0,0 +1,26 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.AmstruckSporadicOrder;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+
+@Mapper
+public interface AmstruckSporadicOrderMapper extends IBaseMapper<AmstruckSporadicOrder, BigDecimal> {
+
+    @Select("select seq__SPORADIC_ORDER.nextval from dual")
+    BigDecimal selectSporadicOrderId();
+
+    // 查询零星物资订单列表
+    List<Map<String, Object>> getSporadicOrdersList(Map<String, Object> mapValue);
+
+    // 查询物资详情
+    List<Map<String, Object>> seeAllMaterials(Map<String, Object> mapValue);
+
+    // 根据零星订单id查询修改渲染
+    List<Map<String, Object>> selectSporadicOrder(BigDecimal sporadicOrderId);
+}

+ 21 - 0
src/main/java/com/steerinfo/dil/mapper/OmstruckOrderMapper.java

@@ -0,0 +1,21 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.OmstruckOrder;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface OmstruckOrderMapper extends IBaseMapper<OmstruckOrder, BigDecimal> {
+
+    //查询最大主键Id
+    @Select("select seq_omstruck_order.nextval from dual")
+    BigDecimal selectMaxId();
+
+}

+ 18 - 0
src/main/java/com/steerinfo/dil/mapper/OmstruckOrderMaterialMapper.java

@@ -0,0 +1,18 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.OmstruckOrder;
+import com.steerinfo.dil.model.OmstruckOrderMaterial;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+
+import java.math.BigDecimal;
+
+@Mapper
+public interface OmstruckOrderMaterialMapper extends IBaseMapper<OmstruckOrderMaterial, BigDecimal> {
+
+    //查询最大主键Id
+    @Select("select seq_omstruck_order_material.nextval from dual")
+    BigDecimal selectMaxId();
+
+}

+ 213 - 0
src/main/java/com/steerinfo/dil/model/AmstruckSporadicOrder.java

@@ -0,0 +1,213 @@
+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 AmstruckSporadicOrder implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(SPORADIC_ORDER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal sporadicOrderId;
+
+    /**
+     * 发货单位ID(SEND_UNIT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="发货单位ID",required=false)
+    private BigDecimal sendUnitId;
+
+    /**
+     * 收货单位ID(RECEIVE_UNIT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="收货单位ID",required=false)
+    private BigDecimal receiveUnitId;
+
+    /**
+     * 承运商ID(CARRIER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="承运商ID",required=false)
+    private BigDecimal carrierId;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    /**
+     * 逻辑删除(DELETED,DECIMAL,0)
+     */
+    @ApiModelProperty(value="逻辑删除",required=false)
+    private BigDecimal deleted;
+
+    /**
+     * 下发状态(0:未下发,1:已下发)(ISSUE_STATUS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="下发状态(0:未下发,1:已下发)",required=false)
+    private BigDecimal issueStatus;
+
+    /**
+     * 零星订单编号(SPORADIC_ORDER_NO,VARCHAR,25)
+     */
+    @ApiModelProperty(value="零星订单编号",required=false)
+    private String sporadicOrderNo;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.sporadicOrderId;
+    }
+
+    @Override
+    public void setId(BigDecimal sporadicOrderId) {
+        this.sporadicOrderId = sporadicOrderId;
+    }
+
+    public BigDecimal getSporadicOrderId() {
+        return sporadicOrderId;
+    }
+
+    public void setSporadicOrderId(BigDecimal sporadicOrderId) {
+        this.sporadicOrderId = sporadicOrderId;
+    }
+
+    public BigDecimal getSendUnitId() {
+        return sendUnitId;
+    }
+
+    public void setSendUnitId(BigDecimal sendUnitId) {
+        this.sendUnitId = sendUnitId;
+    }
+
+    public BigDecimal getReceiveUnitId() {
+        return receiveUnitId;
+    }
+
+    public void setReceiveUnitId(BigDecimal receiveUnitId) {
+        this.receiveUnitId = receiveUnitId;
+    }
+
+    public BigDecimal getCarrierId() {
+        return carrierId;
+    }
+
+    public void setCarrierId(BigDecimal carrierId) {
+        this.carrierId = carrierId;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    public BigDecimal getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(BigDecimal deleted) {
+        this.deleted = deleted;
+    }
+
+    public BigDecimal getIssueStatus() {
+        return issueStatus;
+    }
+
+    public void setIssueStatus(BigDecimal issueStatus) {
+        this.issueStatus = issueStatus;
+    }
+
+    public String getSporadicOrderNo() {
+        return sporadicOrderNo;
+    }
+
+    public void setSporadicOrderNo(String sporadicOrderNo) {
+        this.sporadicOrderNo = sporadicOrderNo == null ? null : sporadicOrderNo.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", sporadicOrderId=").append(sporadicOrderId);
+        sb.append(", sendUnitId=").append(sendUnitId);
+        sb.append(", receiveUnitId=").append(receiveUnitId);
+        sb.append(", carrierId=").append(carrierId);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", issueStatus=").append(issueStatus);
+        sb.append(", sporadicOrderNo=").append(sporadicOrderNo);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 349 - 0
src/main/java/com/steerinfo/dil/model/OmstruckOrder.java

@@ -0,0 +1,349 @@
+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 OmstruckOrder implements IBasePO<BigDecimal> {
+    /**
+     * 运输订单id(ORDER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运输订单id",required=true)
+    private BigDecimal orderId;
+
+    /**
+     * 销售订单和物资的中间表ID/发运计划ID/采购订单ID/内转物流计划ID(ORDER_PLAN_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="销售订单和物资的中间表ID/发运计划ID/采购订单ID/内转物流计划ID",required=false)
+    private BigDecimal orderPlanId;
+
+    /**
+     * 运输订单号(WYSDD-年月日-8位数的顺序号)(ORDER_NUMBER,VARCHAR,50)
+     */
+    @ApiModelProperty(value="运输订单号(WYSDD-年月日-8位数的顺序号)",required=false)
+    private String orderNumber;
+
+    /**
+     * 运力ID(CAPACITY_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运力ID",required=false)
+    private BigDecimal capacityId;
+
+    /**
+     * 订单下发时间(ORDER_ISSUE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="订单下发时间",required=false)
+    private Date orderIssueTime;
+
+    /**
+     * 司机操作订单行为:0:拒绝;1:接收(ORDER_RECEIVE_STATUS,DECIMAL,38)
+     */
+    @ApiModelProperty(value="司机操作订单行为:0:拒绝;1:接收",required=false)
+    private BigDecimal orderReceiveStatus;
+
+    /**
+     * 司机接收/拒绝订单时间(ORDER_RECEIVE_REFUSE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="司机接收/拒绝订单时间",required=false)
+    private Date orderReceiveRefuseTime;
+
+    /**
+     * 通信时长=司机接单/拒绝时间-订单下发时间(ORDER_COMMUNICATION_DURATION,DECIMAL,0)
+     */
+    @ApiModelProperty(value="通信时长=司机接单/拒绝时间-订单下发时间",required=false)
+    private BigDecimal orderCommunicationDuration;
+
+    /**
+     * 运单状态 :0:待运输,1:执行中,2:已结束,3:未下发,4:已下发,5:已接收,6:已拒绝,7:逻辑删除 8: 关闭  9:退货关闭(ORDER_STATUS,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运单状态 :0:待运输,1:执行中,2:已结束,3:未下发,4:已下发,5:已接收,6:已拒绝,7:逻辑删除 8: 关闭  9:退货关闭",required=false)
+    private BigDecimal orderStatus;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    /**
+     * 逻辑删除(DELETED,DECIMAL,0)
+     */
+    @ApiModelProperty(value="逻辑删除",required=false)
+    private BigDecimal deleted;
+
+    /**
+     * 订单类型(1:销售订单;2:焦炭发运计划;3:水渣发运计划;4:内转到异地库;5:采购辅料订单;6:采购老区燃料订单;7:采购新区燃料订单;8:采购进口矿(万州-厂内);9:采购内转(达州-厂内);10:采购内转(老区-厂内); 11:厂内内转)(ORDER_TYPE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="订单类型(1:销售订单;2:焦炭发运计划;3:水渣发运计划;4:内转到异地库;5:采购辅料订单;6:采购老区燃料订单;7:采购新区燃料订单;8:采购进口矿(万州-厂内);9:采购内转(达州-厂内);10:采购内转(老区-厂内); 11:厂内内转)",required=false)
+    private BigDecimal orderType;
+
+    /**
+     * 路段顺序号:(1:进厂 ; 2:计毛;3:卸货;4:计皮;5:出厂;6:装货)(ORDER_LINE_SEQUENCE,DECIMAL,38)
+     */
+    @ApiModelProperty(value="路段顺序号:(1:进厂 ; 2:计毛;3:卸货;4:计皮;5:出厂;6:装货)",required=false)
+    private BigDecimal orderLineSequence;
+
+    /**
+     * 运输路线ID(LINE_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="运输路线ID",required=false)
+    private BigDecimal lineId;
+
+    /**
+     * 预计进厂时间(ORDER_ENTRY_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="预计进厂时间",required=false)
+    private Date orderEntryTime;
+
+    /**
+     * 卸货点ID(UNLOAD_POINT_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="卸货点ID",required=false)
+    private BigDecimal unloadPointId;
+
+    /**
+     * 司机确认订单(1:已确认)(DRIVER_CONFIRMATION,DECIMAL,0)
+     */
+    @ApiModelProperty(value="司机确认订单(1:已确认)",required=false)
+    private BigDecimal driverConfirmation;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.orderId;
+    }
+
+    @Override
+    public void setId(BigDecimal orderId) {
+        this.orderId = orderId;
+    }
+
+    public BigDecimal getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(BigDecimal orderId) {
+        this.orderId = orderId;
+    }
+
+    public BigDecimal getOrderPlanId() {
+        return orderPlanId;
+    }
+
+    public void setOrderPlanId(BigDecimal orderPlanId) {
+        this.orderPlanId = orderPlanId;
+    }
+
+    public String getOrderNumber() {
+        return orderNumber;
+    }
+
+    public void setOrderNumber(String orderNumber) {
+        this.orderNumber = orderNumber == null ? null : orderNumber.trim();
+    }
+
+    public BigDecimal getCapacityId() {
+        return capacityId;
+    }
+
+    public void setCapacityId(BigDecimal capacityId) {
+        this.capacityId = capacityId;
+    }
+
+    public Date getOrderIssueTime() {
+        return orderIssueTime;
+    }
+
+    public void setOrderIssueTime(Date orderIssueTime) {
+        this.orderIssueTime = orderIssueTime;
+    }
+
+    public BigDecimal getOrderReceiveStatus() {
+        return orderReceiveStatus;
+    }
+
+    public void setOrderReceiveStatus(BigDecimal orderReceiveStatus) {
+        this.orderReceiveStatus = orderReceiveStatus;
+    }
+
+    public Date getOrderReceiveRefuseTime() {
+        return orderReceiveRefuseTime;
+    }
+
+    public void setOrderReceiveRefuseTime(Date orderReceiveRefuseTime) {
+        this.orderReceiveRefuseTime = orderReceiveRefuseTime;
+    }
+
+    public BigDecimal getOrderCommunicationDuration() {
+        return orderCommunicationDuration;
+    }
+
+    public void setOrderCommunicationDuration(BigDecimal orderCommunicationDuration) {
+        this.orderCommunicationDuration = orderCommunicationDuration;
+    }
+
+    public BigDecimal getOrderStatus() {
+        return orderStatus;
+    }
+
+    public void setOrderStatus(BigDecimal orderStatus) {
+        this.orderStatus = orderStatus;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    public BigDecimal getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(BigDecimal deleted) {
+        this.deleted = deleted;
+    }
+
+    public BigDecimal getOrderType() {
+        return orderType;
+    }
+
+    public void setOrderType(BigDecimal orderType) {
+        this.orderType = orderType;
+    }
+
+    public BigDecimal getOrderLineSequence() {
+        return orderLineSequence;
+    }
+
+    public void setOrderLineSequence(BigDecimal orderLineSequence) {
+        this.orderLineSequence = orderLineSequence;
+    }
+
+    public BigDecimal getLineId() {
+        return lineId;
+    }
+
+    public void setLineId(BigDecimal lineId) {
+        this.lineId = lineId;
+    }
+
+    public Date getOrderEntryTime() {
+        return orderEntryTime;
+    }
+
+    public void setOrderEntryTime(Date orderEntryTime) {
+        this.orderEntryTime = orderEntryTime;
+    }
+
+    public BigDecimal getUnloadPointId() {
+        return unloadPointId;
+    }
+
+    public void setUnloadPointId(BigDecimal unloadPointId) {
+        this.unloadPointId = unloadPointId;
+    }
+
+    public BigDecimal getDriverConfirmation() {
+        return driverConfirmation;
+    }
+
+    public void setDriverConfirmation(BigDecimal driverConfirmation) {
+        this.driverConfirmation = driverConfirmation;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", orderId=").append(orderId);
+        sb.append(", orderPlanId=").append(orderPlanId);
+        sb.append(", orderNumber=").append(orderNumber);
+        sb.append(", capacityId=").append(capacityId);
+        sb.append(", orderIssueTime=").append(orderIssueTime);
+        sb.append(", orderReceiveStatus=").append(orderReceiveStatus);
+        sb.append(", orderReceiveRefuseTime=").append(orderReceiveRefuseTime);
+        sb.append(", orderCommunicationDuration=").append(orderCommunicationDuration);
+        sb.append(", orderStatus=").append(orderStatus);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", orderType=").append(orderType);
+        sb.append(", orderLineSequence=").append(orderLineSequence);
+        sb.append(", lineId=").append(lineId);
+        sb.append(", orderEntryTime=").append(orderEntryTime);
+        sb.append(", unloadPointId=").append(unloadPointId);
+        sb.append(", driverConfirmation=").append(driverConfirmation);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 199 - 0
src/main/java/com/steerinfo/dil/model/OmstruckOrderMaterial.java

@@ -0,0 +1,199 @@
+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 OmstruckOrderMaterial implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(ORDER_MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal orderMaterialId;
+
+    /**
+     * 订单id(ORDER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="订单id",required=false)
+    private BigDecimal orderId;
+
+    /**
+     * 钢材物资ID(MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="钢材物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 物资件数(ORDER_MATERIAL_NUMBER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资件数",required=false)
+    private BigDecimal orderMaterialNumber;
+
+    /**
+     * 物资重量(ORDER_MATERIAL_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="物资重量",required=false)
+    private BigDecimal orderMaterialWeight;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    /**
+     * 物资指向:0:物资主表(原料用);1:物资子表(钢材用)(MATERIAL_DIRECTION,DECIMAL,0)
+     */
+    @ApiModelProperty(value="物资指向:0:物资主表(原料用);1:物资子表(钢材用)",required=false)
+    private BigDecimal materialDirection;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.orderMaterialId;
+    }
+
+    @Override
+    public void setId(BigDecimal orderMaterialId) {
+        this.orderMaterialId = orderMaterialId;
+    }
+
+    public BigDecimal getOrderMaterialId() {
+        return orderMaterialId;
+    }
+
+    public void setOrderMaterialId(BigDecimal orderMaterialId) {
+        this.orderMaterialId = orderMaterialId;
+    }
+
+    public BigDecimal getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(BigDecimal orderId) {
+        this.orderId = orderId;
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public BigDecimal getOrderMaterialNumber() {
+        return orderMaterialNumber;
+    }
+
+    public void setOrderMaterialNumber(BigDecimal orderMaterialNumber) {
+        this.orderMaterialNumber = orderMaterialNumber;
+    }
+
+    public BigDecimal getOrderMaterialWeight() {
+        return orderMaterialWeight;
+    }
+
+    public void setOrderMaterialWeight(BigDecimal orderMaterialWeight) {
+        this.orderMaterialWeight = orderMaterialWeight;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    public BigDecimal getMaterialDirection() {
+        return materialDirection;
+    }
+
+    public void setMaterialDirection(BigDecimal materialDirection) {
+        this.materialDirection = materialDirection;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", orderMaterialId=").append(orderMaterialId);
+        sb.append(", orderId=").append(orderId);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", orderMaterialNumber=").append(orderMaterialNumber);
+        sb.append(", orderMaterialWeight=").append(orderMaterialWeight);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", materialDirection=").append(materialDirection);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 41 - 0
src/main/java/com/steerinfo/dil/service/IAmstruckSporadicOrderService.java

@@ -0,0 +1,41 @@
+package com.steerinfo.dil.service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * AmstruckSporadicOrder服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-16 02:49
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-16
+ * 作者:generator
+ * 参考:
+ * 描述:AmstruckSporadicOrder服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IAmstruckSporadicOrderService {
+
+    // 新增零星物资进出厂(以及销售钢材退货)
+    int addSporadicOrders(Map<String, Object> mapValue);
+
+    // 下发零星物资订单
+    int issueSporadicOrders(List<Map<String, Object>> mapList);
+
+    // 逻辑删除零星物资订单
+    int deleteSporadicOrders(Integer sporadicOrderId);
+
+    // 查询零星物资订单列表
+    List<Map<String, Object>> getSporadicOrdersList(Map<String, Object> mapValue);
+
+    // 查询物资详情
+    List<Map<String, Object>> seeAllMaterials(Map<String,Object> mapValue);
+
+    // 修改零星物资订单
+    int updateSporadicOrder(Map<String, Object> mapValue);
+
+    // 查询修改渲染
+    List<Map<String, Object>> selectSporadicOrder(Integer sporadicOrderId);
+}

+ 211 - 0
src/main/java/com/steerinfo/dil/service/impl/AmstruckSporadicOrderServiceImpl.java

@@ -0,0 +1,211 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.OmstruckOrderMapper;
+import com.steerinfo.dil.mapper.OmstruckOrderMaterialMapper;
+import com.steerinfo.dil.model.OmstruckOrder;
+import com.steerinfo.dil.model.OmstruckOrderMaterial;
+import com.steerinfo.dil.util.DataChange;
+import com.steerinfo.dil.model.AmstruckSporadicOrder;
+import com.steerinfo.dil.mapper.AmstruckSporadicOrderMapper;
+import com.steerinfo.dil.service.IAmstruckSporadicOrderService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * AmstruckSporadicOrder服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-12-16 02:49
+ * 类描述
+ * 修订历史:
+ * 日期:2021-12-16
+ * 作者:generator
+ * 参考:
+ * 描述:AmstruckSporadicOrder服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "amstruckSporadicOrderService")
+public class AmstruckSporadicOrderServiceImpl implements IAmstruckSporadicOrderService {
+
+    @Autowired
+    private AmstruckSporadicOrderMapper amstruckSporadicOrderMapper;
+    @Autowired
+    OmstruckOrderMapper omstruckOrderMapper;
+    @Autowired
+    OmstruckOrderMaterialMapper omstruckOrderMaterialMapper;
+
+
+    /**
+     * 新增零星物资进出厂(以及销售钢材退货)
+     * @param mapValue
+     * @return
+     */
+    @Transactional
+    @Override
+    public int addSporadicOrders(Map<String, Object> mapValue) {
+        int result = 0;
+        // 新增零星订单表
+        // 发货单位
+        BigDecimal sendUnit = new BigDecimal((Integer) mapValue.get("supplierId"));
+        // 收货单位
+        BigDecimal receiveUnitId = new BigDecimal((Integer) mapValue.get("receiveId"));
+        // 承运商
+        BigDecimal carrierId = new BigDecimal((Integer) mapValue.get("carrierId"));
+        // 得到订单类型
+        BigDecimal orderType = new BigDecimal((Integer) mapValue.get("orderType"));
+        // 得到运输路径
+        BigDecimal lineId = new BigDecimal((Integer) mapValue.get("lineId"));
+        // 得到运输路径
+        BigDecimal unloadPointId = new BigDecimal((Integer) mapValue.get("unloadPointId"));
+        BigDecimal sporadicOrderId = amstruckSporadicOrderMapper.selectSporadicOrderId();
+        AmstruckSporadicOrder amstruckSporadicOrder = new AmstruckSporadicOrder();
+        amstruckSporadicOrder.setSporadicOrderId(sporadicOrderId);
+        amstruckSporadicOrder.setSporadicOrderNo(DataChange.generateEightDigitsNumber("WLXDD",sporadicOrderId.intValue()));
+        amstruckSporadicOrder.setSendUnitId(sendUnit);
+        amstruckSporadicOrder.setReceiveUnitId(receiveUnitId);
+        amstruckSporadicOrder.setCarrierId(carrierId);
+        amstruckSporadicOrder.setIssueStatus(new BigDecimal(0));
+        amstruckSporadicOrder.setInsertTime(new Date());
+        amstruckSporadicOrder.setInsertUsername("admin");
+        amstruckSporadicOrder.setDeleted(new BigDecimal(0));
+        amstruckSporadicOrder.setInsertUpdateRemark("无");
+        List<Map<String,Object>> mapList = (List<Map<String, Object>>) mapValue.get("mapList");
+        // 新增运输订单表
+        OmstruckOrder omstruckOrder = new OmstruckOrder();
+        BigDecimal orderId = omstruckOrderMapper.selectMaxId();
+        omstruckOrder.setOrderId(orderId);
+        omstruckOrder.setOrderPlanId(sporadicOrderId);
+        omstruckOrder.setOrderNumber(DataChange.generateEightDigitsNumber("WYSDD",orderId.intValue()));
+        omstruckOrder.setOrderType(orderType);
+        omstruckOrder.setInsertTime(new Date());
+        omstruckOrder.setInsertUsername("admin");
+        omstruckOrder.setInsertUpdateRemark("无");
+        omstruckOrder.setLineId(lineId);
+        omstruckOrder.setUnloadPointId(unloadPointId);
+        result += amstruckSporadicOrderMapper.insertSelective(amstruckSporadicOrder);
+        result += omstruckOrderMapper.insertSelective(omstruckOrder);
+        for (Map<String, Object> map : mapList) {
+            BigDecimal materialId = new BigDecimal((Integer) map.get("materialId"));
+            Double materialWeight = (Double) map.get("orderMaterialWeight");
+            Double materialNumber = (Double) map.get("orderMaterialNumber");
+            OmstruckOrderMaterial omstruckOrderMaterial = new OmstruckOrderMaterial();
+            BigDecimal orderMaterialId = omstruckOrderMaterialMapper.selectMaxId();
+            omstruckOrderMaterial.setOrderMaterialId(orderMaterialId);
+            omstruckOrderMaterial.setOrderId(orderId);
+            omstruckOrderMaterial.setMaterialId(materialId);
+            omstruckOrderMaterial.setInsertUsername("admin");
+            omstruckOrderMaterial.setInsertTime(new Date());
+            if (materialWeight != null && materialWeight.toString().length() != 0) {
+                omstruckOrderMaterial.setOrderMaterialWeight(new BigDecimal(materialWeight));
+            }
+            if (materialNumber != null && materialNumber.toString().length() != 0) {
+                omstruckOrderMaterial.setOrderMaterialNumber(new BigDecimal(materialNumber));
+            }
+            result += omstruckOrderMaterialMapper.insertSelective(omstruckOrderMaterial);
+        }
+        return result;
+    }
+
+    /**
+     * 下发零星物资订单
+     * @param mapList
+     * @return
+     */
+    @Override
+    public int issueSporadicOrders(List<Map<String, Object>> mapList) {
+        int result = 0;
+        // 遍历
+        for (Map<String, Object> map : mapList) {
+            BigDecimal sporadicOrderId = DataChange.dataToBigDecimal(map.get("sporadicOrderId"));
+            AmstruckSporadicOrder amstruckSporadicOrder = amstruckSporadicOrderMapper.selectByPrimaryKey(sporadicOrderId);
+            amstruckSporadicOrder.setIssueStatus(new BigDecimal(1));
+            result += amstruckSporadicOrderMapper.updateByPrimaryKeySelective(amstruckSporadicOrder);
+        }
+        return result;
+    }
+
+    /**
+     * 逻辑删除零星物资订单
+     * @param sporadicOrderId
+     * @return
+     */
+    @Override
+    public int deleteSporadicOrders(Integer sporadicOrderId) {
+        int result = 0;
+        AmstruckSporadicOrder amstruckSporadicOrder = amstruckSporadicOrderMapper.selectByPrimaryKey(new BigDecimal(sporadicOrderId));
+        amstruckSporadicOrder.setDeleted(new BigDecimal(1));
+        result += amstruckSporadicOrderMapper.updateByPrimaryKeySelective(amstruckSporadicOrder);
+        return result;
+    }
+
+    /**
+     * 查询零星物资订单列表
+     * @param mapValue
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getSporadicOrdersList(Map<String, Object> mapValue) {
+        List<Map<String,Object>> mapList = amstruckSporadicOrderMapper.getSporadicOrdersList(mapValue);
+        for (Map<String, Object> map : mapList) {
+            BigDecimal type = (BigDecimal) map.get("type");
+            String orderType = "";
+            if (type.intValue() == 12) {
+                orderType += "零星物资进厂";
+            }
+            if (type.intValue() == 13) {
+                orderType += "零星物资出厂";
+            }
+            map.put("orderType",orderType);
+        }
+        return mapList;
+    }
+
+    /**
+     * 查询物资详情
+     * @param mapValue
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> seeAllMaterials(Map<String,Object> mapValue) {
+        List<Map<String,Object>> mapList = amstruckSporadicOrderMapper.seeAllMaterials(mapValue);
+        return mapList;
+    }
+
+    /**
+     * 修改零星物资订单
+     * @param mapValue
+     * @return
+     */
+    @Override
+    public int updateSporadicOrder(Map<String, Object> mapValue) {
+        BigDecimal sporadicOrderId = new BigDecimal((Integer) mapValue.get("sporadicOrderId"));
+        BigDecimal sendUnitId = new BigDecimal((Integer) mapValue.get("sendUnitId"));
+        BigDecimal receiveUnitId = new BigDecimal((Integer) mapValue.get("receiveUnitId"));
+        BigDecimal carrierId = new BigDecimal((Integer) mapValue.get("carrierId"));
+        AmstruckSporadicOrder amstruckSporadicOrder = amstruckSporadicOrderMapper.selectByPrimaryKey(sporadicOrderId);
+        amstruckSporadicOrder.setSendUnitId(sendUnitId);
+        amstruckSporadicOrder.setReceiveUnitId(receiveUnitId);
+        amstruckSporadicOrder.setCarrierId(carrierId);
+        amstruckSporadicOrder.setUpdateTime(new Date());
+        amstruckSporadicOrder.setUpdateUsername("admin");
+        int result = amstruckSporadicOrderMapper.updateByPrimaryKeySelective(amstruckSporadicOrder);
+        return result;
+    }
+
+    /**
+     * 查询修改渲染
+     * @param sporadicOrderId
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> selectSporadicOrder(Integer sporadicOrderId) {
+        List<Map<String, Object>> mapList = amstruckSporadicOrderMapper.selectSporadicOrder(new BigDecimal(sporadicOrderId));
+        return mapList;
+    }
+}

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

@@ -13,6 +13,13 @@ spring:
     static-path-pattern:
 
 openfeign:
+  # 正式环境
+#  ESFeign:
+#    url: ${ESFEIGN_URL:172.16.33.166:8089}
+#  ColumnDataFeign:
+#    url: ${COLUMNDATAFEIGN_URL:172.16.33.166:8083}
+
+  # 测试环境
   ESFeign:
     url: ${ESFEIGN_URL:172.16.33.162:8011}
   ColumnDataFeign:
@@ -57,4 +64,4 @@ mybatis:
     call-setters-on-nulls: true
 
 server:
-  port: 8015
+  port: 8079

+ 518 - 0
src/main/resources/com/steerinfo/dil/mapper/AmstruckSporadicOrderMapper.xml

@@ -0,0 +1,518 @@
+<?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.AmstruckSporadicOrderMapper">
+    <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmstruckSporadicOrder">
+        <id column="SPORADIC_ORDER_ID" jdbcType="DECIMAL" property="sporadicOrderId"/>
+        <result column="SEND_UNIT_ID" jdbcType="DECIMAL" property="sendUnitId"/>
+        <result column="RECEIVE_UNIT_ID" jdbcType="DECIMAL" property="receiveUnitId"/>
+        <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId"/>
+        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
+        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
+        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername"/>
+        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark"/>
+        <result column="DELETED" jdbcType="DECIMAL" property="deleted"/>
+        <result column="ISSUE_STATUS" jdbcType="DECIMAL" property="issueStatus"/>
+        <result column="SPORADIC_ORDER_NO" jdbcType="VARCHAR" property="sporadicOrderNo"/>
+    </resultMap>
+    <sql id="columns">
+        SPORADIC_ORDER_ID, SEND_UNIT_ID, RECEIVE_UNIT_ID, CARRIER_ID, INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, ISSUE_STATUS, SPORADIC_ORDER_NO
+    </sql>
+    <sql id="columns_alias">
+        t.SPORADIC_ORDER_ID, t.SEND_UNIT_ID, t.RECEIVE_UNIT_ID, t.CARRIER_ID, t.INSERT_USERNAME,
+    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
+    t.ISSUE_STATUS, t.SPORADIC_ORDER_NO
+    </sql>
+    <sql id="select">
+        SELECT
+        <include refid="columns"/>
+        FROM AMSTRUCK_SPORADIC_ORDER
+    </sql>
+    <sql id="select_alias">
+        SELECT
+        <include refid="columns_alias"/>
+        FROM AMSTRUCK_SPORADIC_ORDER t
+    </sql>
+    <sql id="where">
+        <where>
+            <if test="sporadicOrderId != null">
+                and SPORADIC_ORDER_ID = #{sporadicOrderId}
+            </if>
+            <if test="sendUnitId != null">
+                and SEND_UNIT_ID = #{sendUnitId}
+            </if>
+            <if test="receiveUnitId != null">
+                and RECEIVE_UNIT_ID = #{receiveUnitId}
+            </if>
+            <if test="carrierId != null">
+                and CARRIER_ID = #{carrierId}
+            </if>
+            <if test="insertUsername != null and insertUsername != ''">
+                and INSERT_USERNAME = #{insertUsername}
+            </if>
+            <if test="insertTime != null">
+                and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+            </if>
+            <if test="updateUsername != null and updateUsername != ''">
+                and UPDATE_USERNAME = #{updateUsername}
+            </if>
+            <if test="updateTime != null">
+                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+            </if>
+            <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+                and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+            </if>
+            <if test="deleted != null">
+                and DELETED = #{deleted}
+            </if>
+            <if test="issueStatus != null">
+                and ISSUE_STATUS = #{issueStatus}
+            </if>
+            <if test="sporadicOrderNo != null and sporadicOrderNo != ''">
+                and SPORADIC_ORDER_NO = #{sporadicOrderNo}
+            </if>
+        </where>
+    </sql>
+    <sql id="whereLike">
+        <where>
+            <if test="sporadicOrderId != null">
+                and SPORADIC_ORDER_ID = #{sporadicOrderId}
+            </if>
+            <if test="sendUnitId != null">
+                and SEND_UNIT_ID = #{sendUnitId}
+            </if>
+            <if test="receiveUnitId != null">
+                and RECEIVE_UNIT_ID = #{receiveUnitId}
+            </if>
+            <if test="carrierId != null">
+                and CARRIER_ID = #{carrierId}
+            </if>
+            <if test="insertUsername != null and insertUsername != ''">
+                and INSERT_USERNAME LIKE '%${insertUsername}%'
+            </if>
+            <if test="insertTime != null">
+                and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+            </if>
+            <if test="updateUsername != null and updateUsername != ''">
+                and UPDATE_USERNAME LIKE '%${updateUsername}%'
+            </if>
+            <if test="updateTime != null">
+                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+            </if>
+            <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+                and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+            </if>
+            <if test="deleted != null">
+                and DELETED = #{deleted}
+            </if>
+            <if test="issueStatus != null">
+                and ISSUE_STATUS = #{issueStatus}
+            </if>
+            <if test="sporadicOrderNo != null and sporadicOrderNo != ''">
+                and SPORADIC_ORDER_NO LIKE '%${sporadicOrderNo}%'
+            </if>
+        </where>
+    </sql>
+    <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+        delete
+        from AMSTRUCK_SPORADIC_ORDER
+        where SPORADIC_ORDER_ID = #{sporadicOrderId,jdbcType=DECIMAL}
+    </delete>
+    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+        delete from AMSTRUCK_SPORADIC_ORDER
+        where 1!=1
+        <if test="sendUnitId != null">
+            or SEND_UNIT_ID = #{sendUnitId}
+        </if>
+        <if test="receiveUnitId != null">
+            or RECEIVE_UNIT_ID = #{receiveUnitId}
+        </if>
+        <if test="carrierId != null">
+            or CARRIER_ID = #{carrierId}
+        </if>
+        <if test="insertUsername != null and insertUsername != ''">
+            or INSERT_USERNAME = #{insertUsername}
+        </if>
+        <if test="insertTime != null">
+            or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+        </if>
+        <if test="updateUsername != null and updateUsername != ''">
+            or UPDATE_USERNAME = #{updateUsername}
+        </if>
+        <if test="updateTime != null">
+            or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+        </if>
+        <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+            or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+        </if>
+        <if test="deleted != null">
+            or DELETED = #{deleted}
+        </if>
+        <if test="issueStatus != null">
+            or ISSUE_STATUS = #{issueStatus}
+        </if>
+        <if test="sporadicOrderNo != null and sporadicOrderNo != ''">
+            or SPORADIC_ORDER_NO = #{sporadicOrderNo}
+        </if>
+    </delete>
+    <insert id="insert" parameterType="com.steerinfo.dil.model.AmstruckSporadicOrder">
+        insert into AMSTRUCK_SPORADIC_ORDER (SPORADIC_ORDER_ID, SEND_UNIT_ID, RECEIVE_UNIT_ID,
+                                             CARRIER_ID, INSERT_USERNAME, INSERT_TIME,
+                                             UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
+                                             DELETED, ISSUE_STATUS, SPORADIC_ORDER_NO)
+        values (#{sporadicOrderId,jdbcType=DECIMAL}, #{sendUnitId,jdbcType=DECIMAL}, #{receiveUnitId,jdbcType=DECIMAL},
+                #{carrierId,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+                #{insertUpdateRemark,jdbcType=VARCHAR},
+                #{deleted,jdbcType=DECIMAL}, #{issueStatus,jdbcType=DECIMAL}, #{sporadicOrderNo,jdbcType=VARCHAR})
+    </insert>
+    <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmstruckSporadicOrder">
+        insert into AMSTRUCK_SPORADIC_ORDER
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="sporadicOrderId != null">
+                SPORADIC_ORDER_ID,
+            </if>
+            <if test="sendUnitId != null">
+                SEND_UNIT_ID,
+            </if>
+            <if test="receiveUnitId != null">
+                RECEIVE_UNIT_ID,
+            </if>
+            <if test="carrierId != null">
+                CARRIER_ID,
+            </if>
+            <if test="insertUsername != null">
+                INSERT_USERNAME,
+            </if>
+            <if test="insertTime != null">
+                INSERT_TIME,
+            </if>
+            <if test="updateUsername != null">
+                UPDATE_USERNAME,
+            </if>
+            <if test="updateTime != null">
+                UPDATE_TIME,
+            </if>
+            <if test="insertUpdateRemark != null">
+                INSERT_UPDATE_REMARK,
+            </if>
+            <if test="deleted != null">
+                DELETED,
+            </if>
+            <if test="issueStatus != null">
+                ISSUE_STATUS,
+            </if>
+            <if test="sporadicOrderNo != null">
+                SPORADIC_ORDER_NO,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="sporadicOrderId != null">
+                #{sporadicOrderId,jdbcType=DECIMAL},
+            </if>
+            <if test="sendUnitId != null">
+                #{sendUnitId,jdbcType=DECIMAL},
+            </if>
+            <if test="receiveUnitId != null">
+                #{receiveUnitId,jdbcType=DECIMAL},
+            </if>
+            <if test="carrierId != null">
+                #{carrierId,jdbcType=DECIMAL},
+            </if>
+            <if test="insertUsername != null">
+                #{insertUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="insertTime != null">
+                #{insertTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUsername != null">
+                #{updateUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="insertUpdateRemark != null">
+                #{insertUpdateRemark,jdbcType=VARCHAR},
+            </if>
+            <if test="deleted != null">
+                #{deleted,jdbcType=DECIMAL},
+            </if>
+            <if test="issueStatus != null">
+                #{issueStatus,jdbcType=DECIMAL},
+            </if>
+            <if test="sporadicOrderNo != null">
+                #{sporadicOrderNo,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmstruckSporadicOrder">
+        update AMSTRUCK_SPORADIC_ORDER
+        set SEND_UNIT_ID         = #{sendUnitId,jdbcType=DECIMAL},
+            RECEIVE_UNIT_ID      = #{receiveUnitId,jdbcType=DECIMAL},
+            CARRIER_ID           = #{carrierId,jdbcType=DECIMAL},
+            INSERT_USERNAME      = #{insertUsername,jdbcType=VARCHAR},
+            INSERT_TIME          = #{insertTime,jdbcType=TIMESTAMP},
+            UPDATE_USERNAME      = #{updateUsername,jdbcType=VARCHAR},
+            UPDATE_TIME          = #{updateTime,jdbcType=TIMESTAMP},
+            INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+            DELETED              = #{deleted,jdbcType=DECIMAL},
+            ISSUE_STATUS         = #{issueStatus,jdbcType=DECIMAL},
+            SPORADIC_ORDER_NO    = #{sporadicOrderNo,jdbcType=VARCHAR}
+        where SPORADIC_ORDER_ID = #{sporadicOrderId,jdbcType=DECIMAL}
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmstruckSporadicOrder">
+        update AMSTRUCK_SPORADIC_ORDER
+        <set>
+            <if test="sendUnitId != null">
+                SEND_UNIT_ID = #{sendUnitId,jdbcType=DECIMAL},
+            </if>
+            <if test="receiveUnitId != null">
+                RECEIVE_UNIT_ID = #{receiveUnitId,jdbcType=DECIMAL},
+            </if>
+            <if test="carrierId != null">
+                CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
+            </if>
+            <if test="insertUsername != null">
+                INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="insertTime != null">
+                INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUsername != null">
+                UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime != null">
+                UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="insertUpdateRemark != null">
+                INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+            </if>
+            <if test="deleted != null">
+                DELETED = #{deleted,jdbcType=DECIMAL},
+            </if>
+            <if test="issueStatus != null">
+                ISSUE_STATUS = #{issueStatus,jdbcType=DECIMAL},
+            </if>
+            <if test="sporadicOrderNo != null">
+                SPORADIC_ORDER_NO = #{sporadicOrderNo,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where SPORADIC_ORDER_ID = #{sporadicOrderId,jdbcType=DECIMAL}
+    </update>
+    <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+        <include refid="select"/>
+        where SPORADIC_ORDER_ID = #{sporadicOrderId,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 AMSTRUCK_SPORADIC_ORDER
+        (SPORADIC_ORDER_ID,
+        SEND_UNIT_ID, RECEIVE_UNIT_ID, CARRIER_ID,
+        INSERT_USERNAME, INSERT_TIME,
+        UPDATE_USERNAME, UPDATE_TIME,
+        INSERT_UPDATE_REMARK, DELETED,
+        ISSUE_STATUS, SPORADIC_ORDER_NO)
+        ( <foreach collection="list" item="item" separator="union all">
+        select
+        #{item.sporadicOrderId,jdbcType=DECIMAL},
+        #{item.sendUnitId,jdbcType=DECIMAL}, #{item.receiveUnitId,jdbcType=DECIMAL}, #{item.carrierId,jdbcType=DECIMAL},
+        #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
+        #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
+        #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL},
+        #{item.issueStatus,jdbcType=DECIMAL}, #{item.sporadicOrderNo,jdbcType=VARCHAR} from dual
+    </foreach> )
+    </insert>
+    <update id="batchUpdate" parameterType="java.util.List">
+        update AMSTRUCK_SPORADIC_ORDER
+        set
+        SPORADIC_ORDER_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
+            when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.sporadicOrderId,jdbcType=DECIMAL}
+        </foreach>
+        ,SEND_UNIT_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
+            when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.sendUnitId,jdbcType=DECIMAL}
+        </foreach>
+        ,RECEIVE_UNIT_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
+            when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.receiveUnitId,jdbcType=DECIMAL}
+        </foreach>
+        ,CARRIER_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
+            when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
+        </foreach>
+        ,INSERT_USERNAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
+            when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,INSERT_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
+            when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,UPDATE_USERNAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
+            when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,UPDATE_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
+            when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,INSERT_UPDATE_REMARK=
+        <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
+            when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+        </foreach>
+        ,DELETED=
+        <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
+            when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+        </foreach>
+        ,ISSUE_STATUS=
+        <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
+            when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.issueStatus,jdbcType=DECIMAL}
+        </foreach>
+        ,SPORADIC_ORDER_NO=
+        <foreach collection="list" item="item" index="index" separator=" " open="case SPORADIC_ORDER_ID" close="end">
+            when #{item.sporadicOrderId,jdbcType=DECIMAL} then #{item.sporadicOrderNo,jdbcType=VARCHAR}
+        </foreach>
+        where SPORADIC_ORDER_ID in
+        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+            #{item.sporadicOrderId,jdbcType=DECIMAL}
+        </foreach>
+    </update>
+    <delete id="batchDelete" parameterType="java.util.List">
+        delete from AMSTRUCK_SPORADIC_ORDER
+        where SPORADIC_ORDER_ID in
+        <foreach collection="list" item="id" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+    </delete>
+    <!-- 友情提示!!!-->
+    <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+    <!-- 排序 -->
+    <sql id="orderBy">
+        <if test="orderField != null and orderField != ''">
+            order by "${orderField}"
+            <if test="orderType != null and orderType != ''">
+                ${orderType}
+            </if>
+        </if>
+        <if test="orderField == null  ">
+            order by "insertTime" desc
+        </if>
+    </sql>
+    <!-- 查询零星物资订单列表 -->
+    <select id="getSporadicOrdersList" parameterType="java.util.Map" resultType="java.util.Map">
+        SELECT *
+        FROM (
+        SELECT
+        ASO.SPORADIC_ORDER_ID AS "sporadicOrderId",
+        ASO.SPORADIC_ORDER_NO AS "sporadicOrderNo",
+        RSU.SUPPLIER_NAME AS "supplierName",
+        RCO.CONSIGNEE_COMPANY_NAME AS "consigneeCompanyName",
+        RCA.CARRIER_NAME AS "carrierName",
+        ASO.INSERT_TIME AS "insertTime",
+        OO.ORDER_TYPE AS "type"
+        FROM AMSTRUCK_SPORADIC_ORDER ASO
+        LEFT JOIN RMS_CONSIGNEE RCO
+        ON ASO.RECEIVE_UNIT_ID = RCO.CONSIGNEE_ID
+        LEFT JOIN RMS_SUPPLIER RSU
+        ON ASO.SEND_UNIT_ID = RSU.SUPPLIER_ID
+        LEFT JOIN RMS_CARRIER RCA
+        ON RCA.CARRIER_ID = ASO.CARRIER_ID
+        LEFT JOIN OMSTRUCK_ORDER OO
+        ON OO.ORDER_PLAN_ID = ASO.SPORADIC_ORDER_ID
+        WHERE OO.ORDER_TYPE in (12,13)
+        AND ASO.ISSUE_STATUS = #{issueStatus}
+        AND ASO.DELETED = 0
+        )
+        <where>
+            <if test="sporadicOrderNo != null">
+                and
+                <foreach collection="sporadicOrderNo" item="item" open="(" separator="or" close=")">
+                    "sporadicOrderNo" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="supplierName != null">
+                and
+                <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
+                    "supplierName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="consigneeCompanyName != null">
+                and
+                <foreach collection="consigneeCompanyName" item="item" open="(" separator="or" close=")">
+                    "consigneeCompanyName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="carrierName != null">
+                and
+                <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
+                    "carrierName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="insertTime != null">
+                and
+                <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
+                    "insertTime" like to_date('${item}','yyyy-mm-dd hh24:mi:ss')
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+    </select>
+
+    <!-- 查询所有物资 -->
+    <select id="seeAllMaterials" parameterType="java.util.Map" resultType="java.util.Map">
+        SELECT *
+        FROM (
+        SELECT RM.MATERIAL_NAME AS "materialName",
+        RM.MATERIAL_CODE AS "materialCode",
+        RM.MATERIAL_SPECIFICATION || RM.MATERIAL_MODEL AS "specificationModel",
+        RM.MATERIAL_ID AS "materialId"
+        FROM AMSTRUCK_SPORADIC_ORDER ASO
+        LEFT JOIN OMSTRUCK_ORDER OO
+        ON OO.ORDER_PLAN_ID = ASO.SPORADIC_ORDER_ID
+        LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM
+        ON OOM.ORDER_ID = OO.ORDER_ID
+        LEFT JOIN RMS_MATERIAL RM
+        ON RM.MATERIAL_ID = OOM.MATERIAL_ID
+        WHERE ASO.SPORADIC_ORDER_ID = #{sporadicOrderId}
+        )
+        <where>
+            <if test="materialName != null">
+                and
+                <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+                    "materialName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="materialCode != null">
+                and
+                <foreach collection="materialCode" item="item" open="(" separator="or" close=")">
+                    "materialCode" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="specificationModel != null">
+                and
+                <foreach collection="specificationModel" item="item" open="(" separator="or" close=")">
+                    "specificationModel" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+    </select>
+
+    <!-- 查询修改渲染 -->
+    <select id="selectSporadicOrder" parameterType="DECIMAL" resultType="java.util.Map">
+        SELECT ASO.SEND_UNIT_ID    AS "sendUnitId",
+               ASO.RECEIVE_UNIT_ID AS "receiveUnitId",
+               ASO.CARRIER_ID      AS "carrierId"
+        FROM AMSTRUCK_SPORADIC_ORDER ASO
+        WHERE SPORADIC_ORDER_ID = #{sporadicOrderId}
+    </select>
+
+</mapper>

+ 629 - 0
src/main/resources/com/steerinfo/dil/mapper/OmstruckOrderMapper.xml

@@ -0,0 +1,629 @@
+<?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.OmstruckOrderMapper">
+    <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OmstruckOrder">
+        <id column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
+        <result column="ORDER_PLAN_ID" jdbcType="DECIMAL" property="orderPlanId" />
+        <result column="ORDER_NUMBER" jdbcType="VARCHAR" property="orderNumber" />
+        <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
+        <result column="ORDER_ISSUE_TIME" jdbcType="TIMESTAMP" property="orderIssueTime" />
+        <result column="ORDER_RECEIVE_STATUS" jdbcType="DECIMAL" property="orderReceiveStatus" />
+        <result column="ORDER_RECEIVE_REFUSE_TIME" jdbcType="TIMESTAMP" property="orderReceiveRefuseTime" />
+        <result column="ORDER_COMMUNICATION_DURATION" jdbcType="DECIMAL" property="orderCommunicationDuration" />
+        <result column="ORDER_STATUS" jdbcType="DECIMAL" property="orderStatus" />
+        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+        <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+        <result column="ORDER_TYPE" jdbcType="DECIMAL" property="orderType" />
+        <result column="ORDER_LINE_SEQUENCE" jdbcType="DECIMAL" property="orderLineSequence" />
+        <result column="LINE_ID" jdbcType="DECIMAL" property="lineId" />
+        <result column="ORDER_ENTRY_TIME" jdbcType="TIMESTAMP" property="orderEntryTime" />
+        <result column="UNLOAD_POINT_ID" jdbcType="DECIMAL" property="unloadPointId" />
+        <result column="DRIVER_CONFIRMATION" jdbcType="DECIMAL" property="driverConfirmation" />
+    </resultMap>
+    <sql id="columns">
+        ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER, CAPACITY_ID, ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
+    ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION, ORDER_STATUS, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, ORDER_TYPE,
+    ORDER_LINE_SEQUENCE, LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID, DRIVER_CONFIRMATION
+    </sql>
+    <sql id="columns_alias">
+        t.ORDER_ID, t.ORDER_PLAN_ID, t.ORDER_NUMBER, t.CAPACITY_ID, t.ORDER_ISSUE_TIME, t.ORDER_RECEIVE_STATUS,
+    t.ORDER_RECEIVE_REFUSE_TIME, t.ORDER_COMMUNICATION_DURATION, t.ORDER_STATUS, t.INSERT_USERNAME,
+    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED,
+    t.ORDER_TYPE, t.ORDER_LINE_SEQUENCE, t.LINE_ID, t.ORDER_ENTRY_TIME, t.UNLOAD_POINT_ID,
+    t.DRIVER_CONFIRMATION
+    </sql>
+    <sql id="select">
+        SELECT <include refid="columns"/> FROM OMSTRUCK_ORDER
+    </sql>
+    <sql id="select_alias">
+        SELECT <include refid="columns_alias"/> FROM OMSTRUCK_ORDER t
+    </sql>
+    <sql id="where">
+        <where>
+            <if test="orderId != null">
+                and ORDER_ID = #{orderId}
+            </if>
+            <if test="orderPlanId != null">
+                and ORDER_PLAN_ID = #{orderPlanId}
+            </if>
+            <if test="orderNumber != null and orderNumber != ''">
+                and ORDER_NUMBER = #{orderNumber}
+            </if>
+            <if test="capacityId != null">
+                and CAPACITY_ID = #{capacityId}
+            </if>
+            <if test="orderIssueTime != null">
+                and TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = #{orderIssueTime}
+            </if>
+            <if test="orderReceiveStatus != null">
+                and ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
+            </if>
+            <if test="orderReceiveRefuseTime != null">
+                and TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = #{orderReceiveRefuseTime}
+            </if>
+            <if test="orderCommunicationDuration != null">
+                and ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
+            </if>
+            <if test="orderStatus != null">
+                and ORDER_STATUS = #{orderStatus}
+            </if>
+            <if test="insertUsername != null and insertUsername != ''">
+                and INSERT_USERNAME = #{insertUsername}
+            </if>
+            <if test="insertTime != null">
+                and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+            </if>
+            <if test="updateUsername != null and updateUsername != ''">
+                and UPDATE_USERNAME = #{updateUsername}
+            </if>
+            <if test="updateTime != null">
+                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+            </if>
+            <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+                and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+            </if>
+            <if test="deleted != null">
+                and DELETED = #{deleted}
+            </if>
+            <if test="orderType != null">
+                and ORDER_TYPE = #{orderType}
+            </if>
+            <if test="orderLineSequence != null">
+                and ORDER_LINE_SEQUENCE = #{orderLineSequence}
+            </if>
+            <if test="lineId != null">
+                and LINE_ID = #{lineId}
+            </if>
+            <if test="orderEntryTime != null">
+                and TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = #{orderEntryTime}
+            </if>
+            <if test="unloadPointId != null">
+                and UNLOAD_POINT_ID = #{unloadPointId}
+            </if>
+            <if test="driverConfirmation != null">
+                and DRIVER_CONFIRMATION = #{driverConfirmation}
+            </if>
+        </where>
+    </sql>
+    <sql id="whereLike">
+        <where>
+            <if test="orderId != null">
+                and ORDER_ID = #{orderId}
+            </if>
+            <if test="orderPlanId != null">
+                and ORDER_PLAN_ID = #{orderPlanId}
+            </if>
+            <if test="orderNumber != null and orderNumber != ''">
+                and ORDER_NUMBER LIKE '%${orderNumber}%'
+            </if>
+            <if test="capacityId != null">
+                and CAPACITY_ID = #{capacityId}
+            </if>
+            <if test="orderIssueTime != null">
+                and TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = #{orderIssueTime}
+            </if>
+            <if test="orderReceiveStatus != null">
+                and ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
+            </if>
+            <if test="orderReceiveRefuseTime != null">
+                and TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = #{orderReceiveRefuseTime}
+            </if>
+            <if test="orderCommunicationDuration != null">
+                and ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
+            </if>
+            <if test="orderStatus != null">
+                and ORDER_STATUS = #{orderStatus}
+            </if>
+            <if test="insertUsername != null and insertUsername != ''">
+                and INSERT_USERNAME LIKE '%${insertUsername}%'
+            </if>
+            <if test="insertTime != null">
+                and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+            </if>
+            <if test="updateUsername != null and updateUsername != ''">
+                and UPDATE_USERNAME LIKE '%${updateUsername}%'
+            </if>
+            <if test="updateTime != null">
+                and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+            </if>
+            <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+                and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+            </if>
+            <if test="deleted != null">
+                and DELETED = #{deleted}
+            </if>
+            <if test="orderType != null">
+                and ORDER_TYPE = #{orderType}
+            </if>
+            <if test="orderLineSequence != null">
+                and ORDER_LINE_SEQUENCE = #{orderLineSequence}
+            </if>
+            <if test="lineId != null">
+                and LINE_ID = #{lineId}
+            </if>
+            <if test="orderEntryTime != null">
+                and TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = #{orderEntryTime}
+            </if>
+            <if test="unloadPointId != null">
+                and UNLOAD_POINT_ID = #{unloadPointId}
+            </if>
+            <if test="driverConfirmation != null">
+                and DRIVER_CONFIRMATION = #{driverConfirmation}
+            </if>
+        </where>
+    </sql>
+    <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+        delete from OMSTRUCK_ORDER
+        where ORDER_ID = #{orderId,jdbcType=DECIMAL}
+    </delete>
+    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+        delete from OMSTRUCK_ORDER
+        where 1!=1
+        <if test="orderPlanId != null">
+            or ORDER_PLAN_ID = #{orderPlanId}
+        </if>
+        <if test="orderNumber != null and orderNumber != ''">
+            or ORDER_NUMBER = #{orderNumber}
+        </if>
+        <if test="capacityId != null">
+            or CAPACITY_ID = #{capacityId}
+        </if>
+        <if test="orderIssueTime != null">
+            or TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = '#{orderIssueTime}'
+        </if>
+        <if test="orderReceiveStatus != null">
+            or ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
+        </if>
+        <if test="orderReceiveRefuseTime != null">
+            or TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = '#{orderReceiveRefuseTime}'
+        </if>
+        <if test="orderCommunicationDuration != null">
+            or ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
+        </if>
+        <if test="orderStatus != null">
+            or ORDER_STATUS = #{orderStatus}
+        </if>
+        <if test="insertUsername != null and insertUsername != ''">
+            or INSERT_USERNAME = #{insertUsername}
+        </if>
+        <if test="insertTime != null">
+            or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+        </if>
+        <if test="updateUsername != null and updateUsername != ''">
+            or UPDATE_USERNAME = #{updateUsername}
+        </if>
+        <if test="updateTime != null">
+            or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+        </if>
+        <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+            or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+        </if>
+        <if test="deleted != null">
+            or DELETED = #{deleted}
+        </if>
+        <if test="orderType != null">
+            or ORDER_TYPE = #{orderType}
+        </if>
+        <if test="orderLineSequence != null">
+            or ORDER_LINE_SEQUENCE = #{orderLineSequence}
+        </if>
+        <if test="lineId != null">
+            or LINE_ID = #{lineId}
+        </if>
+        <if test="orderEntryTime != null">
+            or TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = '#{orderEntryTime}'
+        </if>
+        <if test="unloadPointId != null">
+            or UNLOAD_POINT_ID = #{unloadPointId}
+        </if>
+        <if test="driverConfirmation != null">
+            or DRIVER_CONFIRMATION = #{driverConfirmation}
+        </if>
+    </delete>
+    <insert id="insert" parameterType="com.steerinfo.dil.model.OmstruckOrder">
+        insert into OMSTRUCK_ORDER (ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER,
+                                    CAPACITY_ID, ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
+                                    ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION,
+                                    ORDER_STATUS, INSERT_USERNAME, INSERT_TIME,
+                                    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
+                                    DELETED, ORDER_TYPE, ORDER_LINE_SEQUENCE,
+                                    LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID,
+                                    DRIVER_CONFIRMATION)
+        values (#{orderId,jdbcType=DECIMAL}, #{orderPlanId,jdbcType=DECIMAL}, #{orderNumber,jdbcType=VARCHAR},
+                #{capacityId,jdbcType=DECIMAL}, #{orderIssueTime,jdbcType=TIMESTAMP}, #{orderReceiveStatus,jdbcType=DECIMAL},
+                #{orderReceiveRefuseTime,jdbcType=TIMESTAMP}, #{orderCommunicationDuration,jdbcType=DECIMAL},
+                #{orderStatus,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
+                #{deleted,jdbcType=DECIMAL}, #{orderType,jdbcType=DECIMAL}, #{orderLineSequence,jdbcType=DECIMAL},
+                #{lineId,jdbcType=DECIMAL}, #{orderEntryTime,jdbcType=TIMESTAMP}, #{unloadPointId,jdbcType=DECIMAL},
+                #{driverConfirmation,jdbcType=DECIMAL})
+    </insert>
+    <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
+        insert into OMSTRUCK_ORDER
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="orderId != null">
+                ORDER_ID,
+            </if>
+            <if test="orderPlanId != null">
+                ORDER_PLAN_ID,
+            </if>
+            <if test="orderNumber != null">
+                ORDER_NUMBER,
+            </if>
+            <if test="capacityId != null">
+                CAPACITY_ID,
+            </if>
+            <if test="orderIssueTime != null">
+                ORDER_ISSUE_TIME,
+            </if>
+            <if test="orderReceiveStatus != null">
+                ORDER_RECEIVE_STATUS,
+            </if>
+            <if test="orderReceiveRefuseTime != null">
+                ORDER_RECEIVE_REFUSE_TIME,
+            </if>
+            <if test="orderCommunicationDuration != null">
+                ORDER_COMMUNICATION_DURATION,
+            </if>
+            <if test="orderStatus != null">
+                ORDER_STATUS,
+            </if>
+            <if test="insertUsername != null">
+                INSERT_USERNAME,
+            </if>
+            <if test="insertTime != null">
+                INSERT_TIME,
+            </if>
+            <if test="updateUsername != null">
+                UPDATE_USERNAME,
+            </if>
+            <if test="updateTime != null">
+                UPDATE_TIME,
+            </if>
+            <if test="insertUpdateRemark != null">
+                INSERT_UPDATE_REMARK,
+            </if>
+            <if test="deleted != null">
+                DELETED,
+            </if>
+            <if test="orderType != null">
+                ORDER_TYPE,
+            </if>
+            <if test="orderLineSequence != null">
+                ORDER_LINE_SEQUENCE,
+            </if>
+            <if test="lineId != null">
+                LINE_ID,
+            </if>
+            <if test="orderEntryTime != null">
+                ORDER_ENTRY_TIME,
+            </if>
+            <if test="unloadPointId != null">
+                UNLOAD_POINT_ID,
+            </if>
+            <if test="driverConfirmation != null">
+                DRIVER_CONFIRMATION,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="orderId != null">
+                #{orderId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderPlanId != null">
+                #{orderPlanId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderNumber != null">
+                #{orderNumber,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityId != null">
+                #{capacityId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderIssueTime != null">
+                #{orderIssueTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="orderReceiveStatus != null">
+                #{orderReceiveStatus,jdbcType=DECIMAL},
+            </if>
+            <if test="orderReceiveRefuseTime != null">
+                #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="orderCommunicationDuration != null">
+                #{orderCommunicationDuration,jdbcType=DECIMAL},
+            </if>
+            <if test="orderStatus != null">
+                #{orderStatus,jdbcType=DECIMAL},
+            </if>
+            <if test="insertUsername != null">
+                #{insertUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="insertTime != null">
+                #{insertTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUsername != null">
+                #{updateUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="insertUpdateRemark != null">
+                #{insertUpdateRemark,jdbcType=VARCHAR},
+            </if>
+            <if test="deleted != null">
+                #{deleted,jdbcType=DECIMAL},
+            </if>
+            <if test="orderType != null">
+                #{orderType,jdbcType=DECIMAL},
+            </if>
+            <if test="orderLineSequence != null">
+                #{orderLineSequence,jdbcType=DECIMAL},
+            </if>
+            <if test="lineId != null">
+                #{lineId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderEntryTime != null">
+                #{orderEntryTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="unloadPointId != null">
+                #{unloadPointId,jdbcType=DECIMAL},
+            </if>
+            <if test="driverConfirmation != null">
+                #{driverConfirmation,jdbcType=DECIMAL},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmstruckOrder">
+        update OMSTRUCK_ORDER
+        set ORDER_PLAN_ID = #{orderPlanId,jdbcType=DECIMAL},
+            ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR},
+            CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+            ORDER_ISSUE_TIME = #{orderIssueTime,jdbcType=TIMESTAMP},
+            ORDER_RECEIVE_STATUS = #{orderReceiveStatus,jdbcType=DECIMAL},
+            ORDER_RECEIVE_REFUSE_TIME = #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
+            ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration,jdbcType=DECIMAL},
+            ORDER_STATUS = #{orderStatus,jdbcType=DECIMAL},
+            INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+            INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+            UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+            UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+            INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+            DELETED = #{deleted,jdbcType=DECIMAL},
+            ORDER_TYPE = #{orderType,jdbcType=DECIMAL},
+            ORDER_LINE_SEQUENCE = #{orderLineSequence,jdbcType=DECIMAL},
+            LINE_ID = #{lineId,jdbcType=DECIMAL},
+            ORDER_ENTRY_TIME = #{orderEntryTime,jdbcType=TIMESTAMP},
+            UNLOAD_POINT_ID = #{unloadPointId,jdbcType=DECIMAL},
+            DRIVER_CONFIRMATION = #{driverConfirmation,jdbcType=DECIMAL}
+        where ORDER_ID = #{orderId,jdbcType=DECIMAL}
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
+        update OMSTRUCK_ORDER
+        <set>
+            <if test="orderPlanId != null">
+                ORDER_PLAN_ID = #{orderPlanId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderNumber != null">
+                ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityId != null">
+                CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderIssueTime != null">
+                ORDER_ISSUE_TIME = #{orderIssueTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="orderReceiveStatus != null">
+                ORDER_RECEIVE_STATUS = #{orderReceiveStatus,jdbcType=DECIMAL},
+            </if>
+            <if test="orderReceiveRefuseTime != null">
+                ORDER_RECEIVE_REFUSE_TIME = #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="orderCommunicationDuration != null">
+                ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration,jdbcType=DECIMAL},
+            </if>
+            <if test="orderStatus != null">
+                ORDER_STATUS = #{orderStatus,jdbcType=DECIMAL},
+            </if>
+            <if test="insertUsername != null">
+                INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="insertTime != null">
+                INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUsername != null">
+                UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime != null">
+                UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="insertUpdateRemark != null">
+                INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+            </if>
+            <if test="deleted != null">
+                DELETED = #{deleted,jdbcType=DECIMAL},
+            </if>
+            <if test="orderType != null">
+                ORDER_TYPE = #{orderType,jdbcType=DECIMAL},
+            </if>
+            <if test="orderLineSequence != null">
+                ORDER_LINE_SEQUENCE = #{orderLineSequence,jdbcType=DECIMAL},
+            </if>
+            <if test="lineId != null">
+                LINE_ID = #{lineId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderEntryTime != null">
+                ORDER_ENTRY_TIME = #{orderEntryTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="unloadPointId != null">
+                UNLOAD_POINT_ID = #{unloadPointId,jdbcType=DECIMAL},
+            </if>
+            <if test="driverConfirmation != null">
+                DRIVER_CONFIRMATION = #{driverConfirmation,jdbcType=DECIMAL},
+            </if>
+        </set>
+        where ORDER_ID = #{orderId,jdbcType=DECIMAL}
+    </update>
+    <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+        <include refid="select"/>
+        where ORDER_ID = #{orderId,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 OMSTRUCK_ORDER
+        (ORDER_ID,
+        ORDER_PLAN_ID, ORDER_NUMBER, CAPACITY_ID,
+        ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
+        ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION,
+        ORDER_STATUS, INSERT_USERNAME,
+        INSERT_TIME, UPDATE_USERNAME,
+        UPDATE_TIME, INSERT_UPDATE_REMARK,
+        DELETED, ORDER_TYPE, ORDER_LINE_SEQUENCE,
+        LINE_ID, ORDER_ENTRY_TIME, UNLOAD_POINT_ID,
+        DRIVER_CONFIRMATION)
+        ( <foreach collection="list" item="item" separator="union all">
+        select
+        #{item.orderId,jdbcType=DECIMAL},
+        #{item.orderPlanId,jdbcType=DECIMAL}, #{item.orderNumber,jdbcType=VARCHAR}, #{item.capacityId,jdbcType=DECIMAL},
+        #{item.orderIssueTime,jdbcType=TIMESTAMP}, #{item.orderReceiveStatus,jdbcType=DECIMAL},
+        #{item.orderReceiveRefuseTime,jdbcType=TIMESTAMP}, #{item.orderCommunicationDuration,jdbcType=DECIMAL},
+        #{item.orderStatus,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
+        #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
+        #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
+        #{item.deleted,jdbcType=DECIMAL}, #{item.orderType,jdbcType=DECIMAL}, #{item.orderLineSequence,jdbcType=DECIMAL},
+        #{item.lineId,jdbcType=DECIMAL}, #{item.orderEntryTime,jdbcType=TIMESTAMP}, #{item.unloadPointId,jdbcType=DECIMAL},
+        #{item.driverConfirmation,jdbcType=DECIMAL} from dual
+    </foreach> )
+    </insert>
+    <update id="batchUpdate" parameterType="java.util.List">
+        update OMSTRUCK_ORDER
+        set
+        ORDER_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_PLAN_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderPlanId,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_NUMBER=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderNumber,jdbcType=VARCHAR}
+        </foreach>
+        ,CAPACITY_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_ISSUE_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderIssueTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,ORDER_RECEIVE_STATUS=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderReceiveStatus,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_RECEIVE_REFUSE_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderReceiveRefuseTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,ORDER_COMMUNICATION_DURATION=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderCommunicationDuration,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_STATUS=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderStatus,jdbcType=DECIMAL}
+        </foreach>
+        ,INSERT_USERNAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,INSERT_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,UPDATE_USERNAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,UPDATE_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,INSERT_UPDATE_REMARK=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+        </foreach>
+        ,DELETED=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_TYPE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderType,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_LINE_SEQUENCE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderLineSequence,jdbcType=DECIMAL}
+        </foreach>
+        ,LINE_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.lineId,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_ENTRY_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderEntryTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,UNLOAD_POINT_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.unloadPointId,jdbcType=DECIMAL}
+        </foreach>
+        ,DRIVER_CONFIRMATION=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.driverConfirmation,jdbcType=DECIMAL}
+        </foreach>
+        where ORDER_ID in
+        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+            #{item.orderId,jdbcType=DECIMAL}
+        </foreach>
+    </update>
+    <delete id="batchDelete" parameterType="java.util.List">
+        delete from OMSTRUCK_ORDER
+        where ORDER_ID in
+        <foreach collection="list" item="id" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+    </delete>
+    <!-- 友情提示!!!-->
+    <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+</mapper>

+ 373 - 0
src/main/resources/com/steerinfo/dil/mapper/OmstruckOrderMaterialMapper.xml

@@ -0,0 +1,373 @@
+<?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.OmstruckOrderMaterialMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OmstruckOrderMaterial">
+    <id column="ORDER_MATERIAL_ID" jdbcType="DECIMAL" property="orderMaterialId" />
+    <result column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
+    <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
+    <result column="ORDER_MATERIAL_NUMBER" jdbcType="DECIMAL" property="orderMaterialNumber" />
+    <result column="ORDER_MATERIAL_WEIGHT" jdbcType="DECIMAL" property="orderMaterialWeight" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+    <result column="MATERIAL_DIRECTION" jdbcType="DECIMAL" property="materialDirection" />
+  </resultMap>
+  <sql id="columns">
+    ORDER_MATERIAL_ID, ORDER_ID, MATERIAL_ID, ORDER_MATERIAL_NUMBER, ORDER_MATERIAL_WEIGHT, 
+    INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
+    MATERIAL_DIRECTION
+  </sql>
+  <sql id="columns_alias">
+    t.ORDER_MATERIAL_ID, t.ORDER_ID, t.MATERIAL_ID, t.ORDER_MATERIAL_NUMBER, t.ORDER_MATERIAL_WEIGHT, 
+    t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, 
+    t.MATERIAL_DIRECTION
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM OMSTRUCK_ORDER_MATERIAL
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM OMSTRUCK_ORDER_MATERIAL t
+  </sql>
+  <sql id="where">
+    <where>
+      <if test="orderMaterialId != null">
+        and ORDER_MATERIAL_ID = #{orderMaterialId}
+      </if>
+      <if test="orderId != null">
+        and ORDER_ID = #{orderId}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="orderMaterialNumber != null">
+        and ORDER_MATERIAL_NUMBER = #{orderMaterialNumber}
+      </if>
+      <if test="orderMaterialWeight != null">
+        and ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+      <if test="materialDirection != null">
+        and MATERIAL_DIRECTION = #{materialDirection}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where>
+      <if test="orderMaterialId != null">
+        and ORDER_MATERIAL_ID = #{orderMaterialId}
+      </if>
+      <if test="orderId != null">
+        and ORDER_ID = #{orderId}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="orderMaterialNumber != null">
+        and ORDER_MATERIAL_NUMBER = #{orderMaterialNumber}
+      </if>
+      <if test="orderMaterialWeight != null">
+        and ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+      </if>
+      <if test="materialDirection != null">
+        and MATERIAL_DIRECTION = #{materialDirection}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from OMSTRUCK_ORDER_MATERIAL
+    where ORDER_MATERIAL_ID = #{orderMaterialId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from OMSTRUCK_ORDER_MATERIAL
+    where 1!=1
+    <if test="orderId != null">
+      or ORDER_ID = #{orderId}
+    </if>
+    <if test="materialId != null">
+      or MATERIAL_ID = #{materialId}
+    </if>
+    <if test="orderMaterialNumber != null">
+      or ORDER_MATERIAL_NUMBER = #{orderMaterialNumber}
+    </if>
+    <if test="orderMaterialWeight != null">
+      or ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight}
+    </if>
+    <if test="insertUsername != null and insertUsername != ''">
+      or INSERT_USERNAME = #{insertUsername}
+    </if>
+    <if test="insertTime != null">
+      or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+    </if>
+    <if test="updateUsername != null and updateUsername != ''">
+      or UPDATE_USERNAME = #{updateUsername}
+    </if>
+    <if test="updateTime != null">
+      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+    </if>
+    <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+      or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+    </if>
+    <if test="materialDirection != null">
+      or MATERIAL_DIRECTION = #{materialDirection}
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.OmstruckOrderMaterial">
+    insert into OMSTRUCK_ORDER_MATERIAL (ORDER_MATERIAL_ID, ORDER_ID, MATERIAL_ID,
+                                         ORDER_MATERIAL_NUMBER, ORDER_MATERIAL_WEIGHT,
+                                         INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+                                         UPDATE_TIME, INSERT_UPDATE_REMARK, MATERIAL_DIRECTION
+    )
+    values (#{orderMaterialId,jdbcType=DECIMAL}, #{orderId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL},
+            #{orderMaterialNumber,jdbcType=DECIMAL}, #{orderMaterialWeight,jdbcType=DECIMAL},
+            #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
+            #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{materialDirection,jdbcType=DECIMAL}
+           )
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmstruckOrderMaterial">
+    insert into OMSTRUCK_ORDER_MATERIAL
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="orderMaterialId != null">
+        ORDER_MATERIAL_ID,
+      </if>
+      <if test="orderId != null">
+        ORDER_ID,
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID,
+      </if>
+      <if test="orderMaterialNumber != null">
+        ORDER_MATERIAL_NUMBER,
+      </if>
+      <if test="orderMaterialWeight != null">
+        ORDER_MATERIAL_WEIGHT,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK,
+      </if>
+      <if test="materialDirection != null">
+        MATERIAL_DIRECTION,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="orderMaterialId != null">
+        #{orderMaterialId,jdbcType=DECIMAL},
+      </if>
+      <if test="orderId != null">
+        #{orderId,jdbcType=DECIMAL},
+      </if>
+      <if test="materialId != null">
+        #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="orderMaterialNumber != null">
+        #{orderMaterialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="orderMaterialWeight != null">
+        #{orderMaterialWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="materialDirection != null">
+        #{materialDirection,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmstruckOrderMaterial">
+    update OMSTRUCK_ORDER_MATERIAL
+    set ORDER_ID = #{orderId,jdbcType=DECIMAL},
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+        ORDER_MATERIAL_NUMBER = #{orderMaterialNumber,jdbcType=DECIMAL},
+        ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight,jdbcType=DECIMAL},
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+        MATERIAL_DIRECTION = #{materialDirection,jdbcType=DECIMAL}
+    where ORDER_MATERIAL_ID = #{orderMaterialId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmstruckOrderMaterial">
+    update OMSTRUCK_ORDER_MATERIAL
+    <set>
+      <if test="orderId != null">
+        ORDER_ID = #{orderId,jdbcType=DECIMAL},
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="orderMaterialNumber != null">
+        ORDER_MATERIAL_NUMBER = #{orderMaterialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="orderMaterialWeight != null">
+        ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="materialDirection != null">
+        MATERIAL_DIRECTION = #{materialDirection,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where ORDER_MATERIAL_ID = #{orderMaterialId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ORDER_MATERIAL_ID = #{orderMaterialId,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 OMSTRUCK_ORDER_MATERIAL
+    (ORDER_MATERIAL_ID,
+    ORDER_ID, MATERIAL_ID, ORDER_MATERIAL_NUMBER,
+    ORDER_MATERIAL_WEIGHT, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME,
+    UPDATE_TIME, INSERT_UPDATE_REMARK,
+    MATERIAL_DIRECTION)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.orderMaterialId,jdbcType=DECIMAL},
+    #{item.orderId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.orderMaterialNumber,jdbcType=DECIMAL},
+    #{item.orderMaterialWeight,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
+    #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
+    #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
+    #{item.materialDirection,jdbcType=DECIMAL} from dual
+  </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+    update OMSTRUCK_ORDER_MATERIAL
+    set
+    ORDER_MATERIAL_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+      when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.orderMaterialId,jdbcType=DECIMAL}
+    </foreach>
+    ,ORDER_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+      when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
+    </foreach>
+    ,MATERIAL_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+      when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+    </foreach>
+    ,ORDER_MATERIAL_NUMBER=
+    <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+      when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.orderMaterialNumber,jdbcType=DECIMAL}
+    </foreach>
+    ,ORDER_MATERIAL_WEIGHT=
+    <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+      when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.orderMaterialWeight,jdbcType=DECIMAL}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+      when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+      when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+      when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+      when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+      when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,MATERIAL_DIRECTION=
+    <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+      when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.materialDirection,jdbcType=DECIMAL}
+    </foreach>
+    where ORDER_MATERIAL_ID in
+    <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+      #{item.orderMaterialId,jdbcType=DECIMAL}
+    </foreach>
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from OMSTRUCK_ORDER_MATERIAL
+    where ORDER_MATERIAL_ID in
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+</mapper>