Blame view

src/main/resources/mybatis/shipment/ShipmentHeaderMapper.xml 5.68 KB
mahuandong authored
1
2
<?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">
pengcheng authored
3
<mapper namespace="com.huaheng.pc.shipment.shipmentHeader.mapper.ShipmentHeaderMapper">
mahuandong authored
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
  <resultMap id="BaseResultMap" type="com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader">
    <!--@mbg.generated-->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" />
    <result column="companyCode" jdbcType="VARCHAR" property="companyCode" />
    <result column="code" jdbcType="VARCHAR" property="code" />
    <result column="referCode" jdbcType="VARCHAR" property="referCode" />
    <result column="referCodeType" jdbcType="VARCHAR" property="referCodeType" />
    <result column="referId" jdbcType="INTEGER" property="referId" />
    <result column="referPlatform" jdbcType="INTEGER" property="referPlatform" />
    <result column="firstStatus" jdbcType="INTEGER" property="firstStatus" />
    <result column="lastStatus" jdbcType="INTEGER" property="lastStatus" />
    <result column="shipmentType" jdbcType="VARCHAR" property="shipmentType" />
    <result column="route" jdbcType="VARCHAR" property="route" />
    <result column="customerCode" jdbcType="VARCHAR" property="customerCode" />
    <result column="customerName" jdbcType="VARCHAR" property="customerName" />
    <result column="priority" jdbcType="INTEGER" property="priority" />
    <result column="requestedDeliveryDate" jdbcType="DATE" property="requestedDeliveryDate" />
    <result column="scheduledShipDate" jdbcType="DATE" property="scheduledShipDate" />
    <result column="actualShipDateTime" jdbcType="TIMESTAMP" property="actualShipDateTime" />
    <result column="actualDeliveryDate" jdbcType="DATE" property="actualDeliveryDate" />
    <result column="deliveryNote" jdbcType="VARCHAR" property="deliveryNote" />
    <result column="rejectionNote" jdbcType="VARCHAR" property="rejectionNote" />
    <result column="waveId" jdbcType="INTEGER" property="waveId" />
    <result column="shipDock" jdbcType="VARCHAR" property="shipDock" />
    <result column="allocateComplete" jdbcType="INTEGER" property="allocateComplete" />
    <result column="totalWeight" jdbcType="DECIMAL" property="totalWeight" />
    <result column="totalQty" jdbcType="INTEGER" property="totalQty" />
    <result column="totalVolume" jdbcType="DECIMAL" property="totalVolume" />
    <result column="totalLines" jdbcType="INTEGER" property="totalLines" />
    <result column="processType" jdbcType="VARCHAR" property="processType" />
    <result column="lastWaveId" jdbcType="INTEGER" property="lastWaveId" />
    <result column="signValue" jdbcType="VARCHAR" property="signValue" />
    <result column="carrierCode" jdbcType="VARCHAR" property="carrierCode" />
    <result column="carrierService" jdbcType="VARCHAR" property="carrierService" />
    <result column="shipmentNote" jdbcType="VARCHAR" property="shipmentNote" />
    <result column="carrierServer" jdbcType="VARCHAR" property="carrierServer" />
    <result column="carrierServerName" jdbcType="VARCHAR" property="carrierServerName" />
    <result column="plateNumber" jdbcType="VARCHAR" property="plateNumber" />
    <result column="carModel" jdbcType="VARCHAR" property="carModel" />
    <result column="driverName" jdbcType="VARCHAR" property="driverName" />
    <result column="driverTel" jdbcType="VARCHAR" property="driverTel" />
    <result column="created" jdbcType="TIMESTAMP" property="created" />
    <result column="createdBy" jdbcType="VARCHAR" property="createdBy" />
    <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" />
    <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" />
    <result column="version" jdbcType="INTEGER" property="version" />
    <result column="userDef1" jdbcType="VARCHAR" property="userDef1" />
    <result column="userDef2" jdbcType="VARCHAR" property="userDef2" />
    <result column="userDef3" jdbcType="VARCHAR" property="userDef3" />
    <result column="processStamp" jdbcType="VARCHAR" property="processStamp" />
55
    <result column="deleted" jdbcType="BIT" property="deleted" />
pengcheng authored
56
57
    <result column="pushErrorCount" jdbcType="INTEGER" property="pushErrorCount" />
    <result column="pushSuccessStatus" jdbcType="INTEGER" property="pushSuccessStatus" />
mahuandong authored
58
59
60
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
pengcheng authored
61
    id, warehouseCode, companyCode, code, referCode, referCodeType, referId,
mahuandong authored
62
    referPlatform, firstStatus, lastStatus, shipmentType, route, customerCode, customerName, 
pengcheng authored
63
    priority, requestedDeliveryDate, scheduledShipDate, actualShipDateTime,
mahuandong authored
64
    actualDeliveryDate, deliveryNote, rejectionNote, waveId, shipDock, allocateComplete, 
pengcheng authored
65
    totalWeight, totalQty, totalVolume, totalLines,
mahuandong authored
66
67
    processType, lastWaveId, signValue, carrierCode, carrierService, shipmentNote, carrierServer, 
    carrierServerName, plateNumber, carModel, driverName, driverTel, created, createdBy, 
68
    lastUpdated, lastUpdatedBy, version, userDef1, userDef2, userDef3,processStamp, deleted
mahuandong authored
69
  </sql>
tangying authored
70
pengcheng authored
71
72
73
  <select id="createCode" resultType="java.lang.String">
        SELECT code FROM shipment_header WHERE shipmentType = #{shipmentType,jdbcType=VARCHAR} ORDER BY id DESC LIMIT 1
    </select>
tangying authored
74
75
76
77
78
79
  <select id="selectListByCreated" resultType="com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader">
    SELECT  s.* from shipment_header s
    inner join task_detail t on t.billCode=s.code and
    t.status>700 and DATEDIFF(NOW(), t.lastUpdated)=0 GROUP BY s.code
    </select>
游杰 authored
80
81
82
83

  <select id="getLatestShipment" resultType="com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader">
     select * from shipment_header order by id desc  limit 10
  </select>
tangying authored
84
</mapper>