Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SOURCE_FLAG and DEBIT_SOURCE fields to IFQ_RECEIPTS_XML table #2407

Open
neilriley-NOAA opened this issue Jul 23, 2021 · 5 comments
Open
Assignees
Labels
Prj: EM Project: Electronic Monitoring

Comments

@neilriley-NOAA
Copy link

Add SOURCE_FLAG and DEBIT_SOURCE fields to IFQ_RECEIPTS_XML table to identify debit type for EM.

@neilriley-NOAA neilriley-NOAA added the Prj: EM Project: Electronic Monitoring label Jul 23, 2021
@sethgerou-noaa sethgerou-noaa self-assigned this Jul 26, 2021
@neilriley-NOAA
Copy link
Author

Required fields requested by Jeff C.

SOURCE_FLAG
OD - Observer Discard
LB - Lookbook
EM - Electronic Monitoring

DEBIT_SOURCE
LB - Lookbook
EM - Electronic Monitoring

--These are trip level fields that are redundant for each row
VESSEL_NAME, VESSEL_NUMBER, IFQ_ACCOUNT_NUMBER, DEPARTURE_DATE, RETURN_DATE, FISH_TICKET_NUMBER, FISH_TICKET_DATE,
FINAL_TRIP_NUMBER, LIMITED_ENTRY_PERMIT_NUMBER, PROCESSED_FLAG

('OD', 'LB', 'EM'), --You need to add AS "SOURCE_FLAG"
('LB', 'EM'), --You need to add AS "DEBIT_SOURCE
IFQ_ACCOUNT_NUMBER,
FISH_TICKET_NUMBER,
FINAL_TRIP_NUMBER,
FISH_TICKET_DATE or RETURN_DATE, --LANDING_DATE
RETURN_PORT_ID,
VESSEL_NUMBER,
LIMITED_ENTRY_PERMIT_NUMBER ,
REPLACE(tripRecs(i).FIRST_RECEIVER, 'FR',''), --Probably don't need this
IFQ_FISHING_AREA_ID,
IFQ_SPECIES_GROUP_ID,
ROUND(tripRecs(i).DISCARDED_CATCH_ESTIMATE),
sysdate,
'Standard',
FISH_TICKET_DATE or RETURN_DATE

MAP TO IFQ.FISHTICKET_PROCESSED_INTO_IFQ fields:

SOURCE_FLAG,
DEBIT_SOURCE,
ACCOUNT_NUM,
FTIX_NUM,
FINAL_TRIP_NUM,
LANDING_DATE,
PORT_CODE,
VESSEL_NUM,
GF_PERMIT_NUM,
CM_CONTRACT_NUMBER,
IFQ_MGT_AREA,
OYC_CAT,
DISCARD_LBS,
PROCESSED_DATE,
SUBMIT_TYPE,
QUOTA_YEAR

@neilriley-NOAA
Copy link
Author

@sethgerou-noaa does your vessel account reporting process ever write to STAGING_XPD_IFQ_WEIGHTS_XML or only IFQ_RECEIPTS_XML? I suspect not but wanted to double check?

@sethgerou-noaa
Copy link
Contributor

only IFQ_RECEIPTS_XML. Should I write to the other one?

@neilriley-NOAA
Copy link
Author

I don't think so. the STAGING_XPD_IFQ_WEIGHTS_XML is essentially the same as the "EM Results" page and can pull the details from there.

@neilriley-NOAA
Copy link
Author

@sethgerou-noaa I have added these columns to DEV.

alter table
ifq_receipts_xml
add
(SOURCE_FLAG varchar2(10),
DEBIT_SOURCE varchar2(10));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prj: EM Project: Electronic Monitoring
Projects
None yet
Development

No branches or pull requests

2 participants