|
|
|
@ -146,14 +146,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="pageList" resultType="com.logpm.warehouse.vo.WarehouseWaybillVO"> |
|
|
|
|
select lww.*, |
|
|
|
|
select lww.id id, |
|
|
|
|
lww.brand brand, |
|
|
|
|
lww.waybill_no waybillNo, |
|
|
|
|
lww.order_no orderNo, |
|
|
|
|
lww.consignee consignee, |
|
|
|
|
lww.consignee_name consigneeName, |
|
|
|
|
lww.consignee_mobile consigneeMobile, |
|
|
|
|
lww.consignee_address consigneeAddress, |
|
|
|
|
lww.shipper shipper, |
|
|
|
|
lww.shipper_name shipperName, |
|
|
|
|
lww.shipper_mobile shipperMobile, |
|
|
|
|
lww.shipper_address shipperAddress, |
|
|
|
|
lww.destination destination, |
|
|
|
|
lww.departure departure, |
|
|
|
|
lww.departure_warehouse_name departureWarehouseName, |
|
|
|
|
lww.destination_warehouse_name destinationWarehouseName, |
|
|
|
|
lww.delivery_way deliveryWay, |
|
|
|
|
lww.customer_train customerTrain, |
|
|
|
|
IFNULL(lww.return_status,0) returnStatus, |
|
|
|
|
lww.remark remark, |
|
|
|
|
lww.pay_type payType, |
|
|
|
|
lww.pay_way payWay, |
|
|
|
|
lww.x_pay xPay, |
|
|
|
|
lww.d_pay dPay, |
|
|
|
|
lww.h_pay hPay, |
|
|
|
|
lww.y_pay yPay, |
|
|
|
|
lww.service_type serviceType, |
|
|
|
|
IFNULL(lww.update_status,0) updateStatus, |
|
|
|
|
IFNULL(lww.check_status,0) checkStatus, |
|
|
|
|
lww.check_reson checkReson, |
|
|
|
|
lww.check_remark checkRemark, |
|
|
|
|
lww.check_user_name checkUserName, |
|
|
|
|
lww.check_time checkTime, |
|
|
|
|
lww.cancle_check_remark cancleCheckRemark, |
|
|
|
|
lww.cancle_check_user_name cancleCheckUserName, |
|
|
|
|
lww.cancle_check_time cancleCheckTime, |
|
|
|
|
lww.waybill_status waybillStatus, |
|
|
|
|
lww.waybill_type waybillType, |
|
|
|
|
lww.document_making_time openTime, |
|
|
|
|
GROUP_CONCAT(lwwd.product_name) goodsName, |
|
|
|
|
lww.total_count totalCount, |
|
|
|
|
sum(lwwd.weight) totalWeight, |
|
|
|
|
sum(lwwd.volume) totalVolume, |
|
|
|
|
lww.x_pay+lww.d_pay+lww.h_pay+lww.y_pay totalFee, |
|
|
|
|
sum(IFNULL(lwwd.freight_price,0)*lwwd.num+IFNULL(lwwd.pickup_price,0)*lwwd.num+IFNULL(lwwd.delivery_price,0)*lwwd.num) systemTotalFee, |
|
|
|
|
lww.pickup_fee pickupFee, |
|
|
|
|
lww.total_freight totalFreight, |
|
|
|
|
lww.storage_fee+lww.warehouse_management_fee warehouseServiceFee, |
|
|
|
|
lww.storage_fee storageFee, |
|
|
|
|
lww.warehouse_management_fee warehouseManagementFee, |
|
|
|
|
0.00 warehouseSortingFee, |
|
|
|
|
0.00 warehouseOprationFee, |
|
|
|
|
lww.delivery_fee+lww.handling_fee deliveryServiceFee, |
|
|
|
|
lww.delivery_fee deliveryFee, |
|
|
|
|
lww.handling_fee handlingFee, |
|
|
|
|
0.00 deliverySortingFee, |
|
|
|
|
0.00 deliveryUpfloorFee, |
|
|
|
|
0.00 deliveryMoveFee, |
|
|
|
|
0.00 deliveryLine, |
|
|
|
|
0.00 deliveryLineFee, |
|
|
|
|
lww.other_fee otherFee, |
|
|
|
|
lww.install_fee installFee, |
|
|
|
|
lww.insurance_fee insuranceFee, |
|
|
|
|
lww.claiming_value claimingValue, |
|
|
|
|
lww.third_operation_fee thirdOperationFee, |
|
|
|
|
lww.sign_num signNum, |
|
|
|
|
lww.sign_user_name signUserName, |
|
|
|
|
lww.sign_time signTime, |
|
|
|
|
lww.sign_check_user_name signCheckUserName, |
|
|
|
|
lww.sign_check_time signCheckTime, |
|
|
|
|
lww.rebate rebate, |
|
|
|
|
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.num,')')) productNum, |
|
|
|
|
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.price,')')) productPrice |
|
|
|
|
from logpm_warehouse_waybill lww |
|
|
|
|
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id |
|
|
|
|
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id and lwwd.is_deleted = 0 |
|
|
|
|
where lww.is_deleted = 0 |
|
|
|
|
<if test="param.waybillNoList != null"> |
|
|
|
|
and lww.waybill_no not in |
|
|
|
|
and lww.waybill_no in |
|
|
|
|
<foreach collection="param.waybillNoList" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
@ -372,7 +442,7 @@
|
|
|
|
|
lww.d_pay dPay, |
|
|
|
|
lww.h_pay hPay, |
|
|
|
|
lww.y_pay yPay, |
|
|
|
|
lww.service_type serviceType, |
|
|
|
|
lbc.type_service serviceType, |
|
|
|
|
IFNULL(lww.update_status,0) updateStatus, |
|
|
|
|
IFNULL(lww.check_status,0) checkStatus, |
|
|
|
|
lww.check_reson checkReson, |
|
|
|
@ -387,8 +457,8 @@
|
|
|
|
|
lww.document_making_time openTime, |
|
|
|
|
lww.goods_name goodsName, |
|
|
|
|
lww.total_count totalCount, |
|
|
|
|
lww.total_weight totalWeight, |
|
|
|
|
lww.total_volume totalVolume, |
|
|
|
|
sum(lwwd.weight) totalWeight, |
|
|
|
|
sum(lwwd.volume) totalVolume, |
|
|
|
|
lww.x_pay+lww.d_pay+lww.h_pay+lww.y_pay totalFee, |
|
|
|
|
sum(IFNULL(lwwd.freight_price,0)*lwwd.num+IFNULL(lwwd.pickup_price,0)*lwwd.num+IFNULL(lwwd.delivery_price,0)*lwwd.num) systemTotalFee, |
|
|
|
|
lww.pickup_fee pickupFee, |
|
|
|
@ -420,10 +490,10 @@
|
|
|
|
|
count(lwwd.id) goodsTypeCount |
|
|
|
|
from logpm_warehouse_waybill lww |
|
|
|
|
left join logpm_basicdata_client lbc on lbc.id = lww.consignee_id |
|
|
|
|
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id |
|
|
|
|
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id and lwwd.is_deleted = 0 |
|
|
|
|
where lww.is_deleted = 0 |
|
|
|
|
<if test="param.waybillNoList != null"> |
|
|
|
|
and lww.waybill_no not in |
|
|
|
|
and lww.waybill_no in |
|
|
|
|
<foreach collection="param.waybillNoList" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
@ -620,10 +690,10 @@
|
|
|
|
|
lww.d_pay dPay, |
|
|
|
|
lww.h_pay hPay, |
|
|
|
|
lww.y_pay yPay, |
|
|
|
|
case when lww.service_type='1' then '商配' |
|
|
|
|
when lww.service_type='2' then '市配' |
|
|
|
|
when lww.service_type='3' then '自提' |
|
|
|
|
when lww.service_type='4' then '三方中转' |
|
|
|
|
case when lbc.type_service='1' then '商配' |
|
|
|
|
when lbc.type_service='2' then '市配' |
|
|
|
|
when lbc.type_service='3' then '自提' |
|
|
|
|
when lbc.type_service='4' then '三方中转' |
|
|
|
|
else '未知' end serviceType, |
|
|
|
|
CASE WHEN IFNULL(lww.update_status,0)=0 THEN '未改单' |
|
|
|
|
WHEN IFNULL(lww.update_status,0)=1 THEN '已改单' |
|
|
|
@ -652,8 +722,8 @@
|
|
|
|
|
lww.document_making_time openTime, |
|
|
|
|
lww.goods_name goodsName, |
|
|
|
|
lww.total_count totalCount, |
|
|
|
|
lww.total_weight totalWeight, |
|
|
|
|
lww.total_volume totalVolume, |
|
|
|
|
sum(lwwd.weight) totalWeight, |
|
|
|
|
sum(lwwd.volume) totalVolume, |
|
|
|
|
lww.x_pay+lww.d_pay+lww.h_pay+lww.y_pay totalFee, |
|
|
|
|
sum(IFNULL(lwwd.freight_price,0)*lwwd.num+IFNULL(lwwd.pickup_price,0)*lwwd.num+IFNULL(lwwd.delivery_price,0)*lwwd.num) systemTotalFee, |
|
|
|
|
lww.pickup_fee pickupFee, |
|
|
|
@ -685,10 +755,10 @@
|
|
|
|
|
count(lwwd.id) goodsTypeCount |
|
|
|
|
from logpm_warehouse_waybill lww |
|
|
|
|
left join logpm_basicdata_client lbc on lbc.id = lww.consignee_id |
|
|
|
|
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id |
|
|
|
|
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id and lwwd.is_deleted = 0 |
|
|
|
|
where lww.is_deleted = 0 |
|
|
|
|
<if test="param.waybillNoList != null"> |
|
|
|
|
and lww.waybill_no not in |
|
|
|
|
and lww.waybill_no in |
|
|
|
|
<foreach collection="param.waybillNoList" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
@ -847,14 +917,84 @@
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
<select id="exportWaybillList" resultType="com.logpm.warehouse.vo.ExportWarehouseWaybillVO"> |
|
|
|
|
select lww.*, |
|
|
|
|
select lww.id id, |
|
|
|
|
lww.brand brand, |
|
|
|
|
lww.waybill_no waybillNo, |
|
|
|
|
lww.order_no orderNo, |
|
|
|
|
lww.consignee consignee, |
|
|
|
|
lww.consignee_name consigneeName, |
|
|
|
|
lww.consignee_mobile consigneeMobile, |
|
|
|
|
lww.consignee_address consigneeAddress, |
|
|
|
|
lww.shipper shipper, |
|
|
|
|
lww.shipper_name shipperName, |
|
|
|
|
lww.shipper_mobile shipperMobile, |
|
|
|
|
lww.shipper_address shipperAddress, |
|
|
|
|
lww.destination destination, |
|
|
|
|
lww.departure departure, |
|
|
|
|
lww.departure_warehouse_name departureWarehouseName, |
|
|
|
|
lww.destination_warehouse_name destinationWarehouseName, |
|
|
|
|
lww.delivery_way deliveryWay, |
|
|
|
|
lww.customer_train customerTrain, |
|
|
|
|
IFNULL(lww.return_status,0) returnStatus, |
|
|
|
|
lww.remark remark, |
|
|
|
|
lww.pay_type payType, |
|
|
|
|
lww.pay_way payWay, |
|
|
|
|
lww.x_pay xPay, |
|
|
|
|
lww.d_pay dPay, |
|
|
|
|
lww.h_pay hPay, |
|
|
|
|
lww.y_pay yPay, |
|
|
|
|
lww.service_type serviceType, |
|
|
|
|
IFNULL(lww.update_status,0) updateStatus, |
|
|
|
|
IFNULL(lww.check_status,0) checkStatus, |
|
|
|
|
lww.check_reson checkReson, |
|
|
|
|
lww.check_remark checkRemark, |
|
|
|
|
lww.check_user_name checkUserName, |
|
|
|
|
lww.check_time checkTime, |
|
|
|
|
lww.cancle_check_remark cancleCheckRemark, |
|
|
|
|
lww.cancle_check_user_name cancleCheckUserName, |
|
|
|
|
lww.cancle_check_time cancleCheckTime, |
|
|
|
|
lww.waybill_status waybillStatus, |
|
|
|
|
lww.waybill_type waybillType, |
|
|
|
|
lww.document_making_time openTime, |
|
|
|
|
GROUP_CONCAT(lwwd.product_name) goodsName, |
|
|
|
|
lww.total_count totalCount, |
|
|
|
|
sum(lwwd.weight) totalWeight, |
|
|
|
|
sum(lwwd.volume) totalVolume, |
|
|
|
|
lww.x_pay+lww.d_pay+lww.h_pay+lww.y_pay totalFee, |
|
|
|
|
sum(IFNULL(lwwd.freight_price,0)*lwwd.num+IFNULL(lwwd.pickup_price,0)*lwwd.num+IFNULL(lwwd.delivery_price,0)*lwwd.num) systemTotalFee, |
|
|
|
|
lww.pickup_fee pickupFee, |
|
|
|
|
lww.total_freight totalFreight, |
|
|
|
|
lww.storage_fee+lww.warehouse_management_fee warehouseServiceFee, |
|
|
|
|
lww.storage_fee storageFee, |
|
|
|
|
lww.warehouse_management_fee warehouseManagementFee, |
|
|
|
|
0.00 warehouseSortingFee, |
|
|
|
|
0.00 warehouseOprationFee, |
|
|
|
|
lww.delivery_fee+lww.handling_fee deliveryServiceFee, |
|
|
|
|
lww.delivery_fee deliveryFee, |
|
|
|
|
lww.handling_fee handlingFee, |
|
|
|
|
0.00 deliverySortingFee, |
|
|
|
|
0.00 deliveryUpfloorFee, |
|
|
|
|
0.00 deliveryMoveFee, |
|
|
|
|
0.00 deliveryLine, |
|
|
|
|
0.00 deliveryLineFee, |
|
|
|
|
lww.other_fee otherFee, |
|
|
|
|
lww.install_fee installFee, |
|
|
|
|
lww.insurance_fee insuranceFee, |
|
|
|
|
lww.claiming_value claimingValue, |
|
|
|
|
lww.third_operation_fee thirdOperationFee, |
|
|
|
|
lww.sign_num signNum, |
|
|
|
|
lww.sign_user_name signUserName, |
|
|
|
|
lww.sign_time signTime, |
|
|
|
|
lww.sign_check_user_name signCheckUserName, |
|
|
|
|
lww.sign_check_time signCheckTime, |
|
|
|
|
lww.rebate rebate, |
|
|
|
|
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.num,')')) productNum, |
|
|
|
|
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.price,')')) productPrice |
|
|
|
|
from logpm_warehouse_waybill lww |
|
|
|
|
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id |
|
|
|
|
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id and lwwd.is_deleted = 0 |
|
|
|
|
where lww.is_deleted = 0 |
|
|
|
|
<if test="param.waybillNoList != null"> |
|
|
|
|
and lww.waybill_no not in |
|
|
|
|
and lww.waybill_no in |
|
|
|
|
<foreach collection="param.waybillNoList" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|