|
|
|
@ -20,19 +20,22 @@
|
|
|
|
|
<result column="reserve5" property="reserve5"/> |
|
|
|
|
<result column="order_id" property="orderId"/> |
|
|
|
|
<result column="reservation_id" property="reservationId"/> |
|
|
|
|
<result column="consignee" property="consignee"/> |
|
|
|
|
<result column="consignee" property="consigneeName"/> |
|
|
|
|
<result column="consignee" property="consigneeId"/> |
|
|
|
|
<result column="delivery_address" property="deliveryAddress"/> |
|
|
|
|
<result column="serve_type" property="serveType"/> |
|
|
|
|
<result column="distributing_warehouse" property="distributingWarehouse"/> |
|
|
|
|
<result column="warehouse_name" property="warehouseName"/> |
|
|
|
|
<result column="warehouse_id" property="warehouseId"/> |
|
|
|
|
<result column="train_number" property="trainNumber"/> |
|
|
|
|
<result column="order_total" property="orderTotal"/> |
|
|
|
|
<result column="total" property="total"/> |
|
|
|
|
<result column="loaded_number" property="loadedNumber"/> |
|
|
|
|
<result column="received_quantity" property="receivedQuantity"/> |
|
|
|
|
<result column="delivery_driver" property="deliveryDriver"/> |
|
|
|
|
<result column="delivery_driver_id" property="deliveryDriverId"/> |
|
|
|
|
<result column="delivery_driver_name" property="deliveryDriverName"/> |
|
|
|
|
<result column="delivery_driver_phone" property="deliveryDriverPhone"/> |
|
|
|
|
<result column="signing_time" property="signingTime"/> |
|
|
|
|
<result column="signee" property="signee"/> |
|
|
|
|
<result column="signee_name" property="signeeName"/> |
|
|
|
|
<result column="signee_id" property="signeeId"/> |
|
|
|
|
<result column="signing_status" property="signingStatus"/> |
|
|
|
|
<result column="signing_type" property="signingType"/> |
|
|
|
|
<result column="clerk_sign_pictures" property="clerkSignPictures"/> |
|
|
|
@ -43,8 +46,94 @@
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectDistributionSignforPage" resultMap="distributionSignforResultMap"> |
|
|
|
|
select * from logpm_distribution_signfor where is_deleted = 0 |
|
|
|
|
<select id="selectDistributionSignforPage" resultType="com.logpm.distribution.vo.DistributionSignforVO"> |
|
|
|
|
SELECT |
|
|
|
|
id id, |
|
|
|
|
number number, |
|
|
|
|
order_id orderId, |
|
|
|
|
reservation_id reservationId, |
|
|
|
|
consignee_id consigneeId, |
|
|
|
|
consignee_name consigneeName, |
|
|
|
|
delivery_phone deliveryPhone, |
|
|
|
|
delivery_address delivery_Address, |
|
|
|
|
delivery_type deliveryType, |
|
|
|
|
delivery_way deliveryWay, |
|
|
|
|
warehouse_name warehouseName, |
|
|
|
|
warehouse_id warehouseId, |
|
|
|
|
train_number trainNumber, |
|
|
|
|
order_total orderTotal, |
|
|
|
|
total total, |
|
|
|
|
loaded_number loadedNumber, |
|
|
|
|
received_quantity receivedQuantity, |
|
|
|
|
delivery_driver_name deliveryDriverName, |
|
|
|
|
delivery_driver_id deliveryDriverId, |
|
|
|
|
delivery_driver_phone deliveryDriverPhone, |
|
|
|
|
signing_time signingTime, |
|
|
|
|
sjsigning_time sjsigningTime, |
|
|
|
|
signee_name signeeName, |
|
|
|
|
signee_id signeeId, |
|
|
|
|
signing_status signingStatus, |
|
|
|
|
driver_signing driverSigning, |
|
|
|
|
signing_type signingType, |
|
|
|
|
clerk_sign_pictures clerkSignPictures, |
|
|
|
|
delivery_sign_pictures deliverySignPictures, |
|
|
|
|
service_number serviceNumber, |
|
|
|
|
notes notes, |
|
|
|
|
delivery_time deliveryTime, |
|
|
|
|
delivery_vehicle_id deliveryVehicleId, |
|
|
|
|
delivery_vehicle_name deliveryVehicleName, |
|
|
|
|
shopping_name shoppingName, |
|
|
|
|
order_source orderSource |
|
|
|
|
FROM |
|
|
|
|
logpm_distribution_signfor |
|
|
|
|
<where> |
|
|
|
|
is_deleted = 0 |
|
|
|
|
<if test="param.number != null and param.number!=''"> |
|
|
|
|
and number like concat('%',#{param.number},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.shoppingName != null and param.shoppingName!=''"> |
|
|
|
|
and shopping_name like concat('%',#{param.shoppingName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryTime!=null and param.deliveryTime!=''"> |
|
|
|
|
and date_format(delivery_time,'%y%m%d%') = date_format(#{param.deliveryTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.signingTime!=null and param.signingTime!=''"> |
|
|
|
|
and date_format(signing_time,'%y%m%d%') = date_format(#{param.signingTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.sjsigningTime!=null and param.sjsigningTime!=''"> |
|
|
|
|
and date_format(sjsigning_time,'%y%m%d%') = date_format(#{param.sjsigningTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.orderId != null and param.orderId!=''"> |
|
|
|
|
and order_id like concat('%',#{param.orderId},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.consigneeName != null and param.consigneeName!=''"> |
|
|
|
|
and consignee_name like concat('%',#{param.consigneeName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryType != null and param.deliveryType!=''"> |
|
|
|
|
and delivery_type = #{param.deliveryType} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.signingStatus != null and param.signingStatus!=''"> |
|
|
|
|
and signing_status = #{param.signingStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.orderSource != null and param.orderSource!=''"> |
|
|
|
|
and order_source = #{param.orderSource} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryPhone != null and param.deliveryPhone!=''"> |
|
|
|
|
and delivery_phone = #{param.deliveryPhone} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.trainNumber != null and param.trainNumber!=''"> |
|
|
|
|
and train_number like concat('%',#{param.trainNumber},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryDriverName != null and param.deliveryDriverName!=''"> |
|
|
|
|
and delivery_driver_name like concat('%',#{param.deliveryDriverName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryAddress != null and param.deliveryAddress!=''"> |
|
|
|
|
and delivery_address like concat('%',#{param.deliveryAddress},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.driverSigning != null and param.driverSigning!=''"> |
|
|
|
|
and driver_signing = #{param.driverSigning} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -63,5 +152,101 @@
|
|
|
|
|
<select id="selectCustomNub" resultMap="distributionSignforResultMap"> |
|
|
|
|
select id,reservation_id,order_id from logpm_distribution_signfor where is_deleted = 0 |
|
|
|
|
</select> |
|
|
|
|
<select id="selectdriverNubCount" resultType="java.lang.Integer"> |
|
|
|
|
select COALESCE(COUNT(*), 0) from logpm_distribution_signfor |
|
|
|
|
<where> |
|
|
|
|
is_deleted = 0 and driver_signing ='1' |
|
|
|
|
<if test="param.number != null and param.number!=''"> |
|
|
|
|
and number like concat('%',#{param.number},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.shoppingName != null and param.shoppingName!=''"> |
|
|
|
|
and shopping_name like concat('%',#{param.shoppingName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.signingStatus != null and param.signingStatus!=''"> |
|
|
|
|
and signing_status = #{param.signingStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryTime!=null and param.deliveryTime!=''"> |
|
|
|
|
and date_format(delivery_time,'%y%m%d%') = date_format(#{param.deliveryTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.signingTime!=null and param.signingTime!=''"> |
|
|
|
|
and date_format(signing_time,'%y%m%d%') = date_format(#{param.signingTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.sjsigningTime!=null and param.sjsigningTime!=''"> |
|
|
|
|
and date_format(sjsigning_time,'%y%m%d%') = date_format(#{param.sjsigningTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.orderId != null and param.orderId!=''"> |
|
|
|
|
and order_id like concat('%',#{param.orderId},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.consigneeName != null and param.consigneeName!=''"> |
|
|
|
|
and consignee_name like concat('%',#{param.consigneeName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryType != null and param.deliveryType!=''"> |
|
|
|
|
and delivery_type = #{param.deliveryType} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.orderSource != null and param.orderSource!=''"> |
|
|
|
|
and order_source = #{param.orderSource} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryPhone != null and param.deliveryPhone!=''"> |
|
|
|
|
and delivery_phone = #{param.deliveryPhone} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.trainNumber != null and param.trainNumber!=''"> |
|
|
|
|
and train_number like concat('%',#{param.trainNumber},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryDriverName != null and param.deliveryDriverName!=''"> |
|
|
|
|
and delivery_driver_name like concat('%',#{param.deliveryDriverName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryAddress != null and param.deliveryAddress!=''"> |
|
|
|
|
and delivery_address like concat('%',#{param.deliveryAddress},'%') |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|
<select id="selectclerkNubCount" resultType="java.lang.Integer"> |
|
|
|
|
select COALESCE(COUNT(*), 0) from logpm_distribution_signfor |
|
|
|
|
<where> |
|
|
|
|
is_deleted = 0 and signing_status ='1' |
|
|
|
|
<if test="param.number != null and param.number!=''"> |
|
|
|
|
and number like concat('%',#{param.number},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.signingStatus != null and param.signingStatus!=''"> |
|
|
|
|
and signing_status = #{param.signingStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.shoppingName != null and param.shoppingName!=''"> |
|
|
|
|
and shopping_name like concat('%',#{param.shoppingName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryTime!=null and param.deliveryTime!=''"> |
|
|
|
|
and date_format(delivery_time,'%y%m%d%') = date_format(#{param.deliveryTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.signingTime!=null and param.signingTime!=''"> |
|
|
|
|
and date_format(signing_time,'%y%m%d%') = date_format(#{param.signingTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.sjsigningTime!=null and param.sjsigningTime!=''"> |
|
|
|
|
and date_format(sjsigning_time,'%y%m%d%') = date_format(#{param.sjsigningTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.orderId != null and param.orderId!=''"> |
|
|
|
|
and order_id like concat('%',#{param.orderId},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.consigneeName != null and param.consigneeName!=''"> |
|
|
|
|
and consignee_name like concat('%',#{param.consigneeName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryType != null and param.deliveryType!=''"> |
|
|
|
|
and delivery_type = #{param.deliveryType} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.orderSource != null and param.orderSource!=''"> |
|
|
|
|
and order_source = #{param.orderSource} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryPhone != null and param.deliveryPhone!=''"> |
|
|
|
|
and delivery_phone = #{param.deliveryPhone} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.trainNumber != null and param.trainNumber!=''"> |
|
|
|
|
and train_number like concat('%',#{param.trainNumber},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryDriverName != null and param.deliveryDriverName!=''"> |
|
|
|
|
and delivery_driver_name like concat('%',#{param.deliveryDriverName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.deliveryAddress != null and param.deliveryAddress!=''"> |
|
|
|
|
and delivery_address like concat('%',#{param.deliveryAddress},'%') |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
|
|