ShipmentHeaderMapper.xml
5.76 KB
1
2
3
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?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.huaheng.pc.shipment.shipmentHeader.mapper.ShipmentHeaderMapper">
<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" />
<result column="deleted" jdbcType="BIT" property="deleted" />
<result column="pushErrorCount" jdbcType="INTEGER" property="pushErrorCount" />
<result column="pushSuccessStatus" jdbcType="INTEGER" property="pushSuccessStatus" />
<result column="assistant" jdbcType="VARCHAR" property="assistant" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, warehouseCode, companyCode, code, referCode, referCodeType, referId,
referPlatform, firstStatus, lastStatus, shipmentType, route, customerCode, customerName,
priority, requestedDeliveryDate, scheduledShipDate, actualShipDateTime,
actualDeliveryDate, deliveryNote, rejectionNote, waveId, shipDock, allocateComplete,
totalWeight, totalQty, totalVolume, totalLines,
processType, lastWaveId, signValue, carrierCode, carrierService, shipmentNote, carrierServer,
carrierServerName, plateNumber, carModel, driverName, driverTel, created, createdBy,
lastUpdated, lastUpdatedBy, version, userDef1, userDef2, userDef3,processStamp, deleted,assistant
</sql>
<select id="createCode" resultType="java.lang.String">
SELECT code FROM shipment_header WHERE shipmentType = #{shipmentType,jdbcType=VARCHAR} ORDER BY id DESC LIMIT 1
</select>
<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>
<select id="getLatestShipment" resultType="com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader">
select * from shipment_header order by id desc limit 10
</select>
</mapper>