Generate pdf for a given documentΒΆ


You can find these scripts inside the folder pmis/STND_PMIS/test/console/example.
If you want to execute them, you can use the Jython Console from the devtool menu.

filename =>

# ============ DEPRECATED ============

list = sql('''
select doc_id, file_seq, doc_seq, owner_id, PJT_CD from document where doc_id = 'CSCEC-LETTER-2014-0080';

for doc in list:
    print doc
    revid = sql('select revid as revid from comm_attch_file where file_seq =' + str(doc['FILE_SEQ']) +' and format_div=11 order by reg_date desc;')
    print revid[0]['REVID']

    param = HashMap()

    param.put('revid', revid[0]['REVID'] )

    param.put('owner_id', doc['OWNER_ID'] )
    param.put('file_seq', str(doc['FILE_SEQ']))
    param.put('doc_id', doc['DOC_ID'])
    param.put('pjt_cd', doc['PJT_CD'])

    serv = Beans.documentService
    print param
    serv.generatePdf( param )