diff --git a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/VoucherMapper.xml b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/VoucherMapper.xml index bef57173..d3820051 100644 --- a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/VoucherMapper.xml +++ b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/VoucherMapper.xml @@ -109,9 +109,9 @@ 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 - ${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_delivery_voucher_relation where document_type = #{documentType} and f_delete_mark is null) + AND a.id not in(select voucher_id from jg_delivery_voucher_relation where document_type = #{documentType} and f_delete_mark is null) @@ -228,7 +228,6 @@ 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_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} @@ -406,7 +405,7 @@ AND f.f_delete_mark IS NULL ${ew.customSqlSegment} - ORDER BY ${voucherPagination.sidx} ${voucherPagination.sort} + ORDER BY ${voucherPagination.sidx} ${voucherPagination.sort} @@ -488,8 +487,7 @@ LEFT JOIN jg_voucher_product b ON a.id=b.voucher_id LEFT JOIN jg_product c ON b.product_id=c.id LEFT JOIN jg_vehicle d ON a.vehicle_id = d.id - LEFT JOIN flow_task e ON a.id = e.f_process_id - ${ew.customSqlSegment} AND a.id not in (SELECT voucher_id from jg_warehousing_storage_poundlist where f_delete_mark is null) + ${ew.customSqlSegment} AND a.id not in (SELECT voucher_id from jg_warehousing_storage_poundlist where f_delete_mark is null) ORDER BY a.f_creator_time DESC @@ -499,12 +497,12 @@ select a.*, CASE - a.document_type - WHEN '1' THEN + a.document_type + WHEN '1' THEN '收货凭证' WHEN '2' THEN '发货凭证' - END AS documentType1, + END AS documentType1, CASE a.voucher_type WHEN '1' THEN @@ -516,11 +514,11 @@ END AS voucherType1, b.vehicle_number from jg_voucher a - 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 + 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} - +