zx 2 lat temu
rodzic
commit
227fd9ca95

+ 1 - 1
pom.xml

@@ -194,7 +194,7 @@
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-                        <table>AMS_SALE_MATERIAL</table>
+                        <table>OMSTRAIN_ORDER</table>
                     </tables>
                 </configuration>
                 <executions>

+ 30 - 6
src/main/java/com/steerinfo/dil/controller/AmsSaleOrderController.java

@@ -103,21 +103,45 @@ public class AmsSaleOrderController extends BaseRESTfulController {
      * @param map
      * @return
      */
-    @ApiModelProperty(value = "对外开放接口")
+    @ApiModelProperty(value = "异地库:对外开放接口")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "saleNumber", value = "WXSDD-20210909-00000007", required = true, dataType = "String"),
-            @ApiImplicitParam(name = "saleAccountBalance", value = "3000", required = true, dataType = "String"),
-            @ApiImplicitParam(name = "saleCurrentOrderAmount", value = "1000", required = true, dataType = "String"),
-            @ApiImplicitParam(name = "saleHistoricalOrderAmount", value = "5000", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "wagonNo", value = "车皮号", required = true, dataType = "String")
     })
     @PostMapping("/selectSaleSteelOrder")
     public RESTfulResult selectSaleSteelOrder(@RequestBody(required = false) Map<String,Object> map) {
         List<Map<String,Object>> steelOrder = amsSaleOrderService.selectSaleSteelOrder(map);
         if (steelOrder==null)
         {
-            return failed("抱歉物流系统没有找到你要的数据");
+            return failed("抱歉,物流系统没有找到你要的数据");
         }
         return success(steelOrder);
     }
 
+
+
+    /**
+     * 查询车牌号和金蝶分录
+     *
+     * @param map
+     * @return
+     */
+    @ApiModelProperty(value = "异地库:接收对方信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "orderNumber", value = "运输订单号", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "wagonNo", value = "车皮号", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "isReceive", value = "", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "ReceiveTime", value = "", required = true, dataType = "String"),
+    })
+    @PostMapping("/receiveOrderResult")
+    public RESTfulResult receiveOrderResult(@RequestBody(required = false) Map<String,Object> map) {
+        int result=0;
+       try {
+            result = amsSaleOrderService.receiveOrderResult(map);
+       }catch (Exception e
+       ){
+           return failed(e.getMessage());
+       }
+        return success("回传成功");
+    }
+
 }

+ 3 - 0
src/main/java/com/steerinfo/dil/mapper/AmsSaleOrderMapper.java

@@ -38,4 +38,7 @@ public interface AmsSaleOrderMapper extends IBaseMapper<AmsSaleOrder, BigDecimal
     BigDecimal selectAmsSaleOrderNum(String saleNumber);
 
     List<Map<String, Object>>  selectSaleSteelOrder(Map<String,Object> map);
+
+    //根据物资id查找炉批号
+    String selectMaterialFurnaceNumber(BigDecimal materialId,BigDecimal resultId);
 }

+ 16 - 0
src/main/java/com/steerinfo/dil/mapper/OmstrainOrderMapper.java

@@ -0,0 +1,16 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.OmstrainOrder;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.math.BigDecimal;
+
+@Mapper
+public interface OmstrainOrderMapper extends IBaseMapper<OmstrainOrder, BigDecimal> {
+    //根据运输订单号查找id
+    BigDecimal selectOrderIdByNo(String orderNumber);
+
+    //根据车皮号和运输订单查找id
+    BigDecimal selectOrderIdBywagonNoAndOrderNumber(String orderNumber,String wagonNo);
+}

+ 274 - 0
src/main/java/com/steerinfo/dil/model/OmstrainOrder.java

@@ -0,0 +1,274 @@
+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 OmstrainOrder implements IBasePO<BigDecimal> {
+    /**
+     * 主键id(ORDER_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="主键id",required=true)
+    private BigDecimal orderId;
+
+    /**
+     * 运单号(ORDER_NO,VARCHAR,50)
+     */
+    @ApiModelProperty(value="运单号",required=false)
+    private String orderNo;
+
+    /**
+     * 车皮号(ORDER_WAGON_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="车皮号",required=false)
+    private String orderWagonNo;
+
+    /**
+     * 车皮标重(ORDER_WAGON_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="车皮标重",required=false)
+    private BigDecimal orderWagonWeight;
+
+    /**
+     * 记录创建人(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;
+
+    /**
+     * 进站时间(ENSTATION_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="进站时间",required=false)
+    private Date enstationTime;
+
+    /**
+     * 发出时间(OUTSTATION_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="发出时间",required=false)
+    private Date outstationTime;
+
+    /**
+     * 计费吨位(BILLING_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="计费吨位",required=false)
+    private BigDecimal billingWeight;
+
+    /**
+     * 是否验收(IS_ACCEPT ,DECIMAL,0)
+     */
+    @ApiModelProperty(value="是否验收",required=false)
+    private BigDecimal isAccept;
+
+    /**
+     * 卸货点ID(WAREHOUSE_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="卸货点ID",required=false)
+    private BigDecimal warehouseId;
+
+    /**
+     * 草垫根数(STRAWMATS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="草垫根数",required=false)
+    private BigDecimal strawmats;
+
+    /**
+     * 验收时间(IS_ACCEPT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="验收时间",required=false)
+    private Date isAcceptTime;
+
+    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 String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo == null ? null : orderNo.trim();
+    }
+
+    public String getOrderWagonNo() {
+        return orderWagonNo;
+    }
+
+    public void setOrderWagonNo(String orderWagonNo) {
+        this.orderWagonNo = orderWagonNo == null ? null : orderWagonNo.trim();
+    }
+
+    public BigDecimal getOrderWagonWeight() {
+        return orderWagonWeight;
+    }
+
+    public void setOrderWagonWeight(BigDecimal orderWagonWeight) {
+        this.orderWagonWeight = orderWagonWeight;
+    }
+
+    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 Date getEnstationTime() {
+        return enstationTime;
+    }
+
+    public void setEnstationTime(Date enstationTime) {
+        this.enstationTime = enstationTime;
+    }
+
+    public Date getOutstationTime() {
+        return outstationTime;
+    }
+
+    public void setOutstationTime(Date outstationTime) {
+        this.outstationTime = outstationTime;
+    }
+
+    public BigDecimal getBillingWeight() {
+        return billingWeight;
+    }
+
+    public void setBillingWeight(BigDecimal billingWeight) {
+        this.billingWeight = billingWeight;
+    }
+
+    public BigDecimal getIsAccept() {
+        return isAccept;
+    }
+
+    public void setIsAccept(BigDecimal isAccept) {
+        this.isAccept = isAccept;
+    }
+
+    public BigDecimal getWarehouseId() {
+        return warehouseId;
+    }
+
+    public void setWarehouseId(BigDecimal warehouseId) {
+        this.warehouseId = warehouseId;
+    }
+
+    public BigDecimal getStrawmats() {
+        return strawmats;
+    }
+
+    public void setStrawmats(BigDecimal strawmats) {
+        this.strawmats = strawmats;
+    }
+
+    public Date getIsAcceptTime() {
+        return isAcceptTime;
+    }
+
+    public void setIsAcceptTime(Date isAcceptTime) {
+        this.isAcceptTime = isAcceptTime;
+    }
+
+    @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(", orderNo=").append(orderNo);
+        sb.append(", orderWagonNo=").append(orderWagonNo);
+        sb.append(", orderWagonWeight=").append(orderWagonWeight);
+        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(", enstationTime=").append(enstationTime);
+        sb.append(", outstationTime=").append(outstationTime);
+        sb.append(", billingWeight=").append(billingWeight);
+        sb.append(", isAccept=").append(isAccept);
+        sb.append(", warehouseId=").append(warehouseId);
+        sb.append(", strawmats=").append(strawmats);
+        sb.append(", isAcceptTime=").append(isAcceptTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 3 - 0
src/main/java/com/steerinfo/dil/service/IAmsSaleOrderService.java

@@ -42,4 +42,7 @@ public interface IAmsSaleOrderService {
     int addInwardSteelOrder(Map<String,Object> map) throws Exception;
 
     List<Map<String, Object>> selectSaleSteelOrder(Map<String,Object> map);
+
+    //接收数据
+    int receiveOrderResult(Map<String, Object> map) throws Exception;
 }

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

@@ -57,6 +57,8 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
     private TmstrainPleaseApproveResultMapper tmstrainPleaseApproveResultMapper;
     @Autowired
     RmstrainArrivalSendMapper rmstrainArrivalSendMapper;
+    @Autowired
+    OmstrainOrderMapper omstrainOrderMapper;
 
     /**
      * 查询销售订单
@@ -488,7 +490,7 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
         //获取销售摘要
         String saleRemark = (String) map.get("saleRemark");
-        SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:MM:SS");
+        SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         //设置是否为车皮
         String whetherTheCar =(String) map.get("whetherTheCar");
         //业务日期
@@ -781,9 +783,45 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
             }else if (materialName.contains("螺纹")){
                 map1.put("materialType","螺纹钢");
             }
+            //根据物资id查找炉批号
+            BigDecimal materialId =DataChange.dataToBigDecimal(map1.get("materialId"));
+            BigDecimal resultId =DataChange.dataToBigDecimal(map1.get("resultId"));
+            String materialFurnaceNumber = amsSaleOrderMapper.selectMaterialFurnaceNumber(materialId,resultId);
+            map1.put("materialFurnaceNumber",materialFurnaceNumber);
             //接口发送日期
             map1.put("sendTime",new Date());
         }
         return mapList;
     }
+
+    @Override
+    @Transactional(rollbackFor = {Exception.class})
+    public int receiveOrderResult(Map<String, Object> map) throws Exception {
+        int result=0;
+        OmstrainOrder omstrainOrder = new OmstrainOrder();
+        //获取运输订单号
+        Object orderNumber = map.get("orderNumber");
+        //接收车皮号
+        Object wagonNo = map.get("wagonNo");
+        BigDecimal orderId = omstrainOrderMapper.selectOrderIdBywagonNoAndOrderNumber((String) orderNumber, (String) wagonNo);
+        if (orderId==null){
+            throw new Exception("提示回传车皮号与运输订单号不匹配");
+        }
+        //根据运输订单号查找id
+        omstrainOrder.setOrderId(orderId);
+        //接收是否收货(0为未收货,1为已收货)
+        Object receviceOrNot = map.get("receviceOrNot");
+        omstrainOrder.setIsAccept(DataChange.dataToBigDecimal(receviceOrNot));
+        //接收时间
+        String receviceTime2 =(String) map.get("receviceTime");
+        SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        try {
+            Date receviceTime = sdf2.parse(receviceTime2);
+            omstrainOrder.setIsAcceptTime(receviceTime);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+       result = omstrainOrderMapper.updateByPrimaryKeySelective(omstrainOrder);
+        return result;
+    }
 }

+ 30 - 18
src/main/resources/com/steerinfo/dil/mapper/AmsSaleOrderMapper.xml

@@ -956,10 +956,12 @@
     from AMS_SALE_ORDER ASO
     WHERE  ASO.SALE_NUMBER =#{saleNumber}
   </select>
-<!-- 对外开发查询接口-->
+
+   <!-- 对外开发查询接口-->
     <select id="selectSaleSteelOrder" resultType="java.util.Map" parameterType="java.lang.String">
       SELECT DISTINCT
-        OO.ORDER_NUMBER "orderNumber",
+        OO2.ORDER_NO "orderNumber",
+        OO.ORDER_ID "orderId",
         OO.ORDER_ISSUE_TIME "orderIssueTime",
         DECODE( RS.SHIPPER_NAME, '四川省达州钢铁集团有限责任公司', '四川省达州市通川区' ) AS "shipperAdddress",
         RS.SHIPPER_NAME "shipperName",
@@ -967,25 +969,25 @@
         CONCAT( CONCAT( CONCAT( RRA.ADDRESS_PROVINCE, ADDRESS_DISTRICT ), ADDRESS_TOWN ), RRP.ADDRESS_DELIVERY_ADDRESS ) "consigneeAddress",
         TLFR.RESULT_OUT_GATE_TIME "resultOutGateTime",
         DECODE( OO.ORDER_TYPE, 1, '汽运', 4, '火运' ) AS "transportType",
-        RCA.CAPACITY_NUMBER "capacityNumber",
         OO2.ORDER_WAGON_NO "orderWagonNo",
         OO.DRIVER_TEL "capacityTel",
         RM.MATERIAL_ID "materialId",
         RM.MATERIAL_NAME "materialName",
         RM.MATERIAL_SPECIFICATION "materialSpecification",
         RM.MATERIAL_MODEL "materialModel",
-        RMS.MATERIAL_FURNACE_NUMBER "materialFurnaceNumber",
         CONCAT(ASM.MATERIAL_NUMBER,'件') "materialNum",
         CONCAT(TWR.RESULT_NET_WEIGHT,'吨') "netWeight",
-        ASO.SALE_REMARK "remark"
+        ASO.SALE_REMARK "remark",
+        DECODE(ASM.IS_POUND_SALE,'0','磅重','1','理重') "isPoundSale",
+        WOR.RESULT_ID "resultId"
       FROM
-        OMSTRUCK_ORDER OO --销售订单
+        OMSTRAIN_ORDER OO2 --销售订单
+          LEFT JOIN TMSTT_ORDER T_ORDER ON T_ORDER.TRAIN_ORDER_ID = OO2.ORDER_ID
+          LEFT JOIN OMSTRUCK_ORDER OO ON OO.ORDER_ID = T_ORDER.TRUCK_ORDER_ID
           LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM ON ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
           LEFT JOIN AMS_SALE_ORDER ASO ON ASO.SALE_ORDER_ID = ASOM.SALE_ORDER_ID
-          LEFT JOIN RMS_CONSIGNEE RC --收货客户
-                    ON RC.CONSIGNEE_ID = ASO.RECEIVE_ID
-          LEFT JOIN RMS_SHIPPER RS --
-                    ON RS.SHIPPER_ID = ASO.SHIPPER_ID
+          LEFT JOIN RMS_CONSIGNEE RC  ON RC.CONSIGNEE_ID = ASO.RECEIVE_ID
+          LEFT JOIN RMS_SHIPPER RS ON RS.SHIPPER_ID = ASO.SHIPPER_ID
           LEFT JOIN RMS_SALER RSR ON RSR.SALER_ID = ASO.SALER_ID
           LEFT JOIN RMS_RECEIVE_PLACE RRP ON RRP.PLACE_ID = ASOM.SALE_SHIPPING_ADDRESS_ID
           LEFT JOIN RMS_RECEIVE_ADDRESS RRA ON RRA.ADDRESS_ID = RRP.ADDRESS_ID
@@ -994,26 +996,36 @@
           LEFT JOIN AMS_SALE_TRUCKNO_MATERIAL ASTM ON ASTM.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
           LEFT JOIN AMS_SALE_MATERIAL ASM ON ASM.SALE_MATERIAL_ID = ASTM.MATERIAL_ID
           LEFT JOIN RMS_MATERIAL RM ON RM.MATERIAL_ID = ASM.MATERIAL_ID
-          left join RMS_MATERIAL_STEEL RMS ON RM.MATERIAL_ID = RMS.MATERIAL_ID
           LEFT JOIN RMS_CAPACITY RCA ON RCA.CAPACITY_ID = OO.CAPACITY_ID
           LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR ON TTR.ORDER_ID = OO.ORDER_ID
           LEFT JOIN TMSTRUCK_ENFACTORY_RESULT TER ON TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
           LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR ON TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
-          AND TWR.MATERIAL_ID = RM.MATERIAL_ID
+                    AND TWR.MATERIAL_ID = RM.MATERIAL_ID
           LEFT JOIN TMSTRUCK_LOAD_RESULT TLR ON TLR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
           AND TLR.MATERIAL_ID = RM.MATERIAL_ID
           LEFT JOIN TMSTRUCK_LEAVE_FACTORY_RESULT TLFR ON TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+          LEFT JOIN WMSP_OUTBOUND_RESULT WOR  ON WOR.BILL_LADING_ID = OO.ORDER_ID
           LEFT JOIN TMSTRUCK_ARRIVAL_RESULT TAR ON TAR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
           LEFT JOIN TMStRUCK_RECEIPT_RESULT TRR ON TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
-          LEFT JOIN TMSTT_ORDER T_ORDER ON T_ORDER.TRUCK_ORDER_ID = OO.ORDER_ID
-          LEFT JOIN OMSTRAIN_ORDER OO2 ON OO2.ORDER_ID = T_ORDER.TRAIN_ORDER_ID
-      WHERE
-        ASO.SALE_TYPE IN ( 1, 4 )
-        AND (INSTR(OO.ORDER_NUMBER,#{orderNumber}) > 0 OR INSTR(RCA.CAPACITY_NUMBER,#{capacityNumber}) > 0  )
 
+      WHERE
+        ASO.SALE_TYPE IN (4)
+       AND OO2.ORDER_WAGON_NO = #{wagonNo}
     </select>
 
-    <update id="updateTruckOrderStatus" parameterType="DECIMAL">
+<!-- 根据物资id查找炉批号-->
+  <select id="selectMaterialFurnaceNumber" resultType="java.lang.String" parameterType="java.util.Map">
+    SELECT distinct RMS.MATERIAL_FURNACE_NUMBER "materialFurnaceNumber"
+    FROM WMSP_OUTBOUND_RESULT WOR
+    LEFT JOIN WMSP_OUTBOUND_SCAN_RESULT WOSR ON WOSR.OUTBOUND_RESULT_ID = WOR.RESULT_ID
+    LEFT JOIN WMSP_INBOUND_RESULT WIR ON WOSR.INBOUND_RESULT_ID = WIR.INBOUND_ID
+    LEFT JOIN RMS_MATERIAL_STEEL RMS ON WIR.MATERIAL_ID = RMS.MATERIAL_STEEL_ID
+    WHERE
+      RMS.MATERIAL_ID = #{materialId}
+      AND WOR.RESULT_ID =#{resultId}
+  </select>
+
+  <update id="updateTruckOrderStatus" parameterType="DECIMAL">
     UPDATE OMSTRUCK_ORDER OO
     SET OO.CAN_WORK = 0
     WHERE OO.ORDER_ID IN (

+ 511 - 0
src/main/resources/com/steerinfo/dil/mapper/OmstrainOrderMapper.xml

@@ -0,0 +1,511 @@
+<?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.OmstrainOrderMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OmstrainOrder">
+    <id column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
+    <result column="ORDER_NO" jdbcType="VARCHAR" property="orderNo" />
+    <result column="ORDER_WAGON_NO" jdbcType="VARCHAR" property="orderWagonNo" />
+    <result column="ORDER_WAGON_WEIGHT" jdbcType="DECIMAL" property="orderWagonWeight" />
+    <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="ENSTATION_TIME" jdbcType="TIMESTAMP" property="enstationTime" />
+    <result column="OUTSTATION_TIME" jdbcType="TIMESTAMP" property="outstationTime" />
+    <result column="BILLING_WEIGHT" jdbcType="DECIMAL" property="billingWeight" />
+    <result column="IS_ACCEPT " jdbcType="DECIMAL" property="isAccept" />
+    <result column="WAREHOUSE_ID" jdbcType="DECIMAL" property="warehouseId" />
+    <result column="STRAWMATS" jdbcType="DECIMAL" property="strawmats" />
+    <result column="IS_ACCEPT_TIME" jdbcType="TIMESTAMP" property="isAcceptTime" />
+  </resultMap>
+  <sql id="columns">
+    ORDER_ID, ORDER_NO, ORDER_WAGON_NO, ORDER_WAGON_WEIGHT, INSERT_USERNAME, INSERT_TIME, 
+    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, ENSTATION_TIME, OUTSTATION_TIME, 
+    BILLING_WEIGHT, IS_ACCEPT, WAREHOUSE_ID, STRAWMATS, IS_ACCEPT_TIME
+  </sql>
+  <sql id="columns_alias">
+    t.ORDER_ID, t.ORDER_NO, t.ORDER_WAGON_NO, t.ORDER_WAGON_WEIGHT, t.INSERT_USERNAME, 
+    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.ENSTATION_TIME, 
+    t.OUTSTATION_TIME, t.BILLING_WEIGHT, t.IS_ACCEPT, t.WAREHOUSE_ID, t.STRAWMATS,
+    t.IS_ACCEPT_TIME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM OMSTRAIN_ORDER
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM OMSTRAIN_ORDER t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="orderId != null">
+        and ORDER_ID = #{orderId}
+      </if>
+      <if test="orderNo != null and orderNo != ''">
+        and ORDER_NO = #{orderNo}
+      </if>
+      <if test="orderWagonNo != null and orderWagonNo != ''">
+        and ORDER_WAGON_NO = #{orderWagonNo}
+      </if>
+      <if test="orderWagonWeight != null">
+        and ORDER_WAGON_WEIGHT = #{orderWagonWeight}
+      </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="enstationTime != null">
+        and TO_CHAR(ENSTATION_TIME,'yyyy-MM-dd') = #{enstationTime}
+      </if>
+      <if test="outstationTime != null">
+        and TO_CHAR(OUTSTATION_TIME,'yyyy-MM-dd') = #{outstationTime}
+      </if>
+      <if test="billingWeight != null">
+        and BILLING_WEIGHT = #{billingWeight}
+      </if>
+      <if test="isAccept != null">
+        and IS_ACCEPT  = #{isAccept}
+      </if>
+      <if test="warehouseId != null">
+        and WAREHOUSE_ID = #{warehouseId}
+      </if>
+      <if test="strawmats != null">
+        and STRAWMATS = #{strawmats}
+      </if>
+      <if test="isAcceptTime != null">
+        and TO_CHAR(IS_ACCEPT_TIME,'yyyy-MM-dd') = #{isAcceptTime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="orderId != null">
+        and ORDER_ID = #{orderId}
+      </if>
+      <if test="orderNo != null and orderNo != ''">
+        and ORDER_NO LIKE '%${orderNo}%'
+      </if>
+      <if test="orderWagonNo != null and orderWagonNo != ''">
+        and ORDER_WAGON_NO LIKE '%${orderWagonNo}%'
+      </if>
+      <if test="orderWagonWeight != null">
+        and ORDER_WAGON_WEIGHT = #{orderWagonWeight}
+      </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="enstationTime != null">
+        and TO_CHAR(ENSTATION_TIME,'yyyy-MM-dd') = #{enstationTime}
+      </if>
+      <if test="outstationTime != null">
+        and TO_CHAR(OUTSTATION_TIME,'yyyy-MM-dd') = #{outstationTime}
+      </if>
+      <if test="billingWeight != null">
+        and BILLING_WEIGHT = #{billingWeight}
+      </if>
+      <if test="isAccept != null">
+        and IS_ACCEPT = #{isAccept}
+      </if>
+      <if test="warehouseId != null">
+        and WAREHOUSE_ID = #{warehouseId}
+      </if>
+      <if test="strawmats != null">
+        and STRAWMATS = #{strawmats}
+      </if>
+      <if test="isAcceptTime != null">
+        and TO_CHAR(IS_ACCEPT_TIME,'yyyy-MM-dd') = #{isAcceptTime}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    delete from OMSTRAIN_ORDER
+    where ORDER_ID = #{orderId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from OMSTRAIN_ORDER
+    where 1!=1 
+      <if test="orderNo != null and orderNo != ''">
+        or ORDER_NO = #{orderNo}
+      </if>
+      <if test="orderWagonNo != null and orderWagonNo != ''">
+        or ORDER_WAGON_NO = #{orderWagonNo}
+      </if>
+      <if test="orderWagonWeight != null">
+        or ORDER_WAGON_WEIGHT = #{orderWagonWeight}
+      </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="enstationTime != null">
+        or TO_CHAR(ENSTATION_TIME,'yyyy-MM-dd') = '#{enstationTime}'
+      </if>
+      <if test="outstationTime != null">
+        or TO_CHAR(OUTSTATION_TIME,'yyyy-MM-dd') = '#{outstationTime}'
+      </if>
+      <if test="billingWeight != null">
+        or BILLING_WEIGHT = #{billingWeight}
+      </if>
+      <if test="isAccept != null">
+        or IS_ACCEPT  = #{isAccept}
+      </if>
+      <if test="warehouseId != null">
+        or WAREHOUSE_ID = #{warehouseId}
+      </if>
+      <if test="strawmats != null">
+        or STRAWMATS = #{strawmats}
+      </if>
+      <if test="isAcceptTime != null">
+        or TO_CHAR(IS_ACCEPT_TIME,'yyyy-MM-dd') = '#{isAcceptTime}'
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.OmstrainOrder">
+    insert into OMSTRAIN_ORDER (ORDER_ID, ORDER_NO, ORDER_WAGON_NO, 
+      ORDER_WAGON_WEIGHT, INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
+      ENSTATION_TIME, OUTSTATION_TIME, BILLING_WEIGHT, 
+      IS_ACCEPT, WAREHOUSE_ID, STRAWMATS,
+      IS_ACCEPT_TIME)
+    values (#{orderId,jdbcType=DECIMAL}, #{orderNo,jdbcType=VARCHAR}, #{orderWagonNo,jdbcType=VARCHAR}, 
+      #{orderWagonWeight,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, 
+      #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, 
+      #{enstationTime,jdbcType=TIMESTAMP}, #{outstationTime,jdbcType=TIMESTAMP}, #{billingWeight,jdbcType=DECIMAL}, 
+      #{isAccept,jdbcType=DECIMAL}, #{warehouseId,jdbcType=DECIMAL}, #{strawmats,jdbcType=DECIMAL}, 
+      #{isAcceptTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmstrainOrder">
+    insert into OMSTRAIN_ORDER
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="orderId != null">
+        ORDER_ID,
+      </if>
+      <if test="orderNo != null">
+        ORDER_NO,
+      </if>
+      <if test="orderWagonNo != null">
+        ORDER_WAGON_NO,
+      </if>
+      <if test="orderWagonWeight != null">
+        ORDER_WAGON_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="enstationTime != null">
+        ENSTATION_TIME,
+      </if>
+      <if test="outstationTime != null">
+        OUTSTATION_TIME,
+      </if>
+      <if test="billingWeight != null">
+        BILLING_WEIGHT,
+      </if>
+      <if test="isAccept != null">
+        "IS_ACCEPT ",
+      </if>
+      <if test="warehouseId != null">
+        WAREHOUSE_ID,
+      </if>
+      <if test="strawmats != null">
+        STRAWMATS,
+      </if>
+      <if test="isAcceptTime != null">
+        IS_ACCEPT_TIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="orderId != null">
+        #{orderId,jdbcType=DECIMAL},
+      </if>
+      <if test="orderNo != null">
+        #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="orderWagonNo != null">
+        #{orderWagonNo,jdbcType=VARCHAR},
+      </if>
+      <if test="orderWagonWeight != null">
+        #{orderWagonWeight,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="enstationTime != null">
+        #{enstationTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="outstationTime != null">
+        #{outstationTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="billingWeight != null">
+        #{billingWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="isAccept != null">
+        #{isAccept,jdbcType=DECIMAL},
+      </if>
+      <if test="warehouseId != null">
+        #{warehouseId,jdbcType=DECIMAL},
+      </if>
+      <if test="strawmats != null">
+        #{strawmats,jdbcType=DECIMAL},
+      </if>
+      <if test="isAcceptTime != null">
+        #{isAcceptTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmstrainOrder">
+    update OMSTRAIN_ORDER
+    set ORDER_NO = #{orderNo,jdbcType=VARCHAR},
+      ORDER_WAGON_NO = #{orderWagonNo,jdbcType=VARCHAR},
+      ORDER_WAGON_WEIGHT = #{orderWagonWeight,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},
+      ENSTATION_TIME = #{enstationTime,jdbcType=TIMESTAMP},
+      OUTSTATION_TIME = #{outstationTime,jdbcType=TIMESTAMP},
+      BILLING_WEIGHT = #{billingWeight,jdbcType=DECIMAL},
+      IS_ACCEPT = #{isAccept,jdbcType=DECIMAL},
+      WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
+      STRAWMATS = #{strawmats,jdbcType=DECIMAL},
+      IS_ACCEPT_TIME = #{isAcceptTime,jdbcType=TIMESTAMP}
+    where ORDER_ID = #{orderId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmstrainOrder">
+    update OMSTRAIN_ORDER
+    <set>
+      <if test="orderNo != null">
+        ORDER_NO = #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="orderWagonNo != null">
+        ORDER_WAGON_NO = #{orderWagonNo,jdbcType=VARCHAR},
+      </if>
+      <if test="orderWagonWeight != null">
+        ORDER_WAGON_WEIGHT = #{orderWagonWeight,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="enstationTime != null">
+        ENSTATION_TIME = #{enstationTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="outstationTime != null">
+        OUTSTATION_TIME = #{outstationTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="billingWeight != null">
+        BILLING_WEIGHT = #{billingWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="isAccept != null">
+        "IS_ACCEPT " = #{isAccept,jdbcType=DECIMAL},
+      </if>
+      <if test="warehouseId != null">
+        WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
+      </if>
+      <if test="strawmats != null">
+        STRAWMATS = #{strawmats,jdbcType=DECIMAL},
+      </if>
+      <if test="isAcceptTime != null">
+        IS_ACCEPT_TIME = #{isAcceptTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where ORDER_ID = #{orderId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" 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 OMSTRAIN_ORDER 
+      (ORDER_ID, 
+      ORDER_NO, ORDER_WAGON_NO, ORDER_WAGON_WEIGHT, 
+      INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK, ENSTATION_TIME, 
+      OUTSTATION_TIME, BILLING_WEIGHT, 
+      IS_ACCEPT, WAREHOUSE_ID, STRAWMATS,
+      IS_ACCEPT_TIME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.orderId,jdbcType=DECIMAL}, 
+      #{item.orderNo,jdbcType=VARCHAR}, #{item.orderWagonNo,jdbcType=VARCHAR}, #{item.orderWagonWeight,jdbcType=DECIMAL}, 
+      #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, 
+      #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
+      #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.enstationTime,jdbcType=TIMESTAMP}, 
+      #{item.outstationTime,jdbcType=TIMESTAMP}, #{item.billingWeight,jdbcType=DECIMAL}, 
+      #{item.isAccept,jdbcType=DECIMAL}, #{item.warehouseId,jdbcType=DECIMAL}, #{item.strawmats,jdbcType=DECIMAL}, 
+      #{item.isAcceptTime,jdbcType=TIMESTAMP} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update OMSTRAIN_ORDER
+     set
+       ORDER_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
+       </foreach>
+       ,ORDER_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.orderNo,jdbcType=VARCHAR}
+       </foreach>
+       ,ORDER_WAGON_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.orderWagonNo,jdbcType=VARCHAR}
+       </foreach>
+       ,ORDER_WAGON_WEIGHT=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.orderWagonWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+       ,ENSTATION_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.enstationTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,OUTSTATION_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.outstationTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,BILLING_WEIGHT=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.billingWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,"IS_ACCEPT "=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.isAccept,jdbcType=DECIMAL}
+       </foreach>
+       ,WAREHOUSE_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.warehouseId,jdbcType=DECIMAL}
+       </foreach>
+       ,STRAWMATS=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.strawmats,jdbcType=DECIMAL}
+       </foreach>
+       ,IS_ACCEPT_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ORDER_ID" separator=" ">
+          when #{item.orderId,jdbcType=DECIMAL} then #{item.isAcceptTime,jdbcType=TIMESTAMP}
+       </foreach>
+     where ORDER_ID in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.orderId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from OMSTRAIN_ORDER
+    where ORDER_ID in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="selectOrderIdByNo" resultType="java.math.BigDecimal" parameterType="java.lang.String">
+    select oo.ORDER_ID "orderId"
+    from OMSTRAIN_ORDER oo
+    where oo.ORDER_NO =#{orderNumber}
+  </select>
+<!--  根据车皮号和运输订单号查找运输订单id-->
+  <select id="selectOrderIdBywagonNoAndOrderNumber" resultType="java.math.BigDecimal" parameterType="java.util.Map">
+    select oo.ORDER_ID "orderId"
+    from OMSTRAIN_ORDER oo
+    where oo.ORDER_NO =#{orderNumber} and OO.ORDER_WAGON_NO=#{wagonNo}
+  </select>
+
+</mapper>