innercheck_lcl_query.sql 1.1 KB

1234567891011121314151617181920212223242526272829
  1. SELECT
  2. innercheckD.GMT_MODIFIED AS innecheck_red_data,
  3. bill.src_code,
  4. omsbill.CONSIGNORCODE ,
  5. omsbill.CONSIGNORNAME ,
  6. wws.WAREHOUSE_AREA_CODE ,
  7. billd.ITEM_CODE ,
  8. billd.item_name,
  9. wws.uom,
  10. billd.ITEM_SPECS ,
  11. billd.CASE_CONVERSION_RATE ,
  12. wws.MANUFACTURER_LOT_NUM ,
  13. wws.PRODUCTION_DATE ,
  14. wws.EXPIRED_DATE ,
  15. billd.MANUFACTURER ,
  16. innercheckD.RED_QTY,
  17. innercheckD.RED_REASON
  18. FROM
  19. UPCLOUD_BIZ_OUTBOUND.WMS_PICK_TASK_D taskd
  20. left join UPCLOUD_BIZ_OUTBOUND.WMS_PICK_TASK_H taskh on taskh.PICK_TASK_ID = TASKD.PICK_TASK_ID
  21. left join UPCLOUD_BIZ_OUTBOUND.WMS_WAVE_STORAGE wws on wws.id = taskd.WAVE_STORAGE_ID
  22. left join UPCLOUD_BIZ_OUTBOUND.WMS_INNER_CHECK_D innerCheckD on innerCheckD.pick_task_d_id = taskd.pick_task_d_id
  23. LEFT JOIN UPCLOUD_BIZ_OUTBOUND.wms_wave_bill_d billd ON wws.BILL_D_ID = billd.id
  24. left join UPCLOUD_BIZ_OUTBOUND.WMS_WAVE_BILL bill on bill.id = billd.bill_id
  25. LEFT JOIN UPCLOUD_BIZ_OUTBOUND.OMS_DO_BILL_H omsbill ON OMSBILL.BILLID = bill.src_id
  26. where
  27. innercheckD.RED_QTY != 0 and bill.warehouse_id = #{name:warehouseId,value:""}
  28. order by
  29. billd.item_code