LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_vehicle d ON a.vehicle_id = d.id AND d.f_delete_mark IS NULL
LEFT JOIN jg_vehicle d ON a.vehicle_id = d.id AND d.f_delete_mark IS NULL
LEFT JOIN flow_task e ON a.id = e.f_process_id
LEFT JOIN jg_product f ON c.product_id = f.id AND f.f_delete_mark IS NULL
LEFT JOIN jg_product f ON c.product_id = f.id AND f.f_delete_mark IS NULL
${ew.customSqlSegment}
${ew.customSqlSegment}
AND a.id not in(select voucher_id from jg_warehousing_storage_poundlist where business_type = #{businessType} and document_type = #{documentType} and f_delete_mark is null)
AND a.id not in(select voucher_id from jg_warehousing_storage_poundlist where business_type = #{businessType} and document_type = #{documentType} and f_delete_mark is null)
@ -201,7 +202,6 @@
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_vehicle d ON a.vehicle_id = d.id AND d.f_delete_mark IS NULL
LEFT JOIN jg_vehicle d ON a.vehicle_id = d.id AND d.f_delete_mark IS NULL
LEFT JOIN flow_task e ON a.id = e.f_process_id
${ew.customSqlSegment}
${ew.customSqlSegment}
AND a.id in (select voucher_id from jg_warehousing_storage_poundlist where business_type = #{businessType} and document_type = #{documentType} and f_delete_mark is null)
AND a.id in (select voucher_id from jg_warehousing_storage_poundlist where business_type = #{businessType} and document_type = #{documentType} and f_delete_mark is null)
</select>
</select>
@ -235,13 +235,13 @@
c.net_weight,
c.net_weight,
c.remark,
c.remark,
d.vehicle_number,
d.vehicle_number,
f.name as productName
f.name as productName,
c.clear_weight
FROM
FROM
jg_voucher a
jg_voucher a
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_vehicle d ON a.vehicle_id = d.id AND d.f_delete_mark IS NULL
LEFT JOIN jg_vehicle d ON a.vehicle_id = d.id AND d.f_delete_mark IS NULL
LEFT JOIN flow_task e ON a.id = e.f_process_id
LEFT JOIN jg_product f ON c.product_id = f.id AND f.f_delete_mark IS NULL
LEFT JOIN jg_product f ON c.product_id = f.id AND f.f_delete_mark IS NULL
${ew.customSqlSegment}
${ew.customSqlSegment}
AND a.id not in(select voucher_id from jg_warehousing_outbound_poundlist where business_type = #{businessType} and document_type = #{documentType} and f_delete_mark is null)
AND a.id not in(select voucher_id from jg_warehousing_outbound_poundlist where business_type = #{businessType} and document_type = #{documentType} and f_delete_mark is null)
@ -302,7 +302,6 @@
jg_voucher a
jg_voucher a
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN flow_task e ON a.id = e.f_process_id
WHERE
WHERE
a.business_type = '2'
a.business_type = '2'
AND a.document_type = '1'
AND a.document_type = '1'
@ -326,7 +325,6 @@
jg_voucher a
jg_voucher a
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN flow_task e ON a.id = e.f_process_id
WHERE
WHERE
a.business_type = '1'
a.business_type = '1'
AND a.document_type = '1'
AND a.document_type = '1'
@ -349,7 +347,6 @@
jg_voucher a
jg_voucher a
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN flow_task e ON a.id = e.f_process_id
WHERE
WHERE
a.business_type = '1'
a.business_type = '1'
AND a.document_type = '2'
AND a.document_type = '2'
@ -573,7 +570,6 @@
b.vehicle_number
b.vehicle_number
from jg_voucher a
from jg_voucher a
left join jg_vehicle b on a.vehicle_id = b.id and b.f_delete_mark is null
left join jg_vehicle b on a.vehicle_id = b.id and b.f_delete_mark is null
LEFT JOIN flow_task e ON a.id = e.f_process_id
where a.id = #{id}
where a.id = #{id}
</select>
</select>
@ -610,7 +606,10 @@
c.telephone as telephone,
c.telephone as telephone,
c.carrier as vehicleCarrier,
c.carrier as vehicleCarrier,
a.sale_contract_no as saleContractNo,
a.sale_contract_no as saleContractNo,
a.sale_amount as saleAmount
a.sale_amount as saleAmount,
a.purchase_contract_no as purchaseContractNo,
a.purchase_amount as purchaseAmount,
b.clear_weight as clearWeight
FROM
FROM
jg_voucher a
jg_voucher a
LEFT JOIN jg_voucher_product b ON a.id = b.voucher_id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product b ON a.id = b.voucher_id AND b.f_delete_mark IS NULL
@ -637,4 +636,29 @@
LEFT JOIN jg_product d ON a.product_id = d.id and d.f_delete_mark is null
LEFT JOIN jg_product d ON a.product_id = d.id and d.f_delete_mark is null