From 84820baf71ce88f18823d820a340ec49403eab77 Mon Sep 17 00:00:00 2001 From: Hemanoel Date: Tue, 14 Nov 2023 00:13:02 +0000 Subject: [PATCH] backend da lista nova de projetos --- .../app/__pycache__/__init__.cpython-38.pyc | Bin 163 -> 163 bytes project/app/__pycache__/admin.cpython-38.pyc | Bin 204 -> 204 bytes project/app/__pycache__/apps.cpython-38.pyc | Bin 423 -> 423 bytes project/app/__pycache__/capa.cpython-38.pyc | Bin 5914 -> 5914 bytes .../app/__pycache__/estilo_fub.cpython-38.pyc | Bin 40011 -> 40011 bytes .../__pycache__/estilo_fundep.cpython-38.pyc | Bin 2291 -> 2291 bytes project/app/__pycache__/models.cpython-38.pyc | Bin 3543 -> 3543 bytes .../app/__pycache__/new_dev.cpython-38.pyc | Bin 4072 -> 4072 bytes .../__pycache__/oracle_cruds.cpython-38.pyc | Bin 2324 -> 2324 bytes .../__pycache__/preenche_fub.cpython-38.pyc | Bin 13286 -> 13286 bytes .../preenche_fundep.cpython-38.pyc | Bin 4006 -> 4006 bytes project/app/__pycache__/urls.cpython-38.pyc | Bin 543 -> 543 bytes project/app/__pycache__/views.cpython-38.pyc | Bin 7335 -> 7335 bytes .../0003_alter_mapeamento_id_tipo.py | 18 ++ .../__pycache__/0001_initial.cpython-38.pyc | Bin 3528 -> 3528 bytes ...o_agencia_bancaria_and_more.cpython-38.pyc | Bin 589 -> 589 bytes ...03_alter_mapeamento_id_tipo.cpython-38.pyc | Bin 0 -> 662 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 174 -> 174 bytes project/backend/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 167 bytes .../backend/__pycache__/admin.cpython-38.pyc | Bin 0 -> 208 bytes .../backend/__pycache__/apps.cpython-38.pyc | Bin 0 -> 446 bytes .../consultas_oracledb.cpython-38.pyc | Bin 0 -> 1767 bytes .../backend/__pycache__/models.cpython-38.pyc | Bin 0 -> 205 bytes .../__pycache__/teste_projects.cpython-38.pyc | Bin 0 -> 1763 bytes .../backend/__pycache__/urls.cpython-38.pyc | Bin 0 -> 309 bytes .../backend/__pycache__/views.cpython-38.pyc | Bin 0 -> 2540 bytes project/backend/admin.py | 3 + project/backend/apps.py | 6 + project/backend/consultas_oracledb.py | 107 +++++++++++ project/backend/migrations/__init__.py | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 178 bytes project/backend/models.py | 3 + project/backend/templates/backend/base.html | 26 +++ .../backend/templates/backend/projetos.html | 180 ++++++++++++++++++ project/backend/tests.py | 3 + project/backend/urls.py | 6 + project/backend/views.py | 86 +++++++++ .../__pycache__/__init__.cpython-38.pyc | Bin 167 -> 167 bytes .../__pycache__/settings.cpython-38.pyc | Bin 2380 -> 2393 bytes .../project/__pycache__/urls.cpython-38.pyc | Bin 344 -> 383 bytes .../project/__pycache__/wsgi.cpython-38.pyc | Bin 570 -> 570 bytes project/project/settings.py | 2 + project/project/urls.py | 1 + 44 files changed, 441 insertions(+) create mode 100644 project/app/migrations/0003_alter_mapeamento_id_tipo.py create mode 100644 project/app/migrations/__pycache__/0003_alter_mapeamento_id_tipo.cpython-38.pyc create mode 100644 project/backend/__init__.py create mode 100644 project/backend/__pycache__/__init__.cpython-38.pyc create mode 100644 project/backend/__pycache__/admin.cpython-38.pyc create mode 100644 project/backend/__pycache__/apps.cpython-38.pyc create mode 100644 project/backend/__pycache__/consultas_oracledb.cpython-38.pyc create mode 100644 project/backend/__pycache__/models.cpython-38.pyc create mode 100644 project/backend/__pycache__/teste_projects.cpython-38.pyc create mode 100644 project/backend/__pycache__/urls.cpython-38.pyc create mode 100644 project/backend/__pycache__/views.cpython-38.pyc create mode 100644 project/backend/admin.py create mode 100644 project/backend/apps.py create mode 100644 project/backend/consultas_oracledb.py create mode 100644 project/backend/migrations/__init__.py create mode 100644 project/backend/migrations/__pycache__/__init__.cpython-38.pyc create mode 100644 project/backend/models.py create mode 100644 project/backend/templates/backend/base.html create mode 100644 project/backend/templates/backend/projetos.html create mode 100644 project/backend/tests.py create mode 100644 project/backend/urls.py create mode 100644 project/backend/views.py diff --git a/project/app/__pycache__/__init__.cpython-38.pyc b/project/app/__pycache__/__init__.cpython-38.pyc index da43e96949741ee022219afa4479ac45180fe437..9d1a75a32329bf386a5b21b675545b79b367632f 100644 GIT binary patch delta 19 ZcmZ3?xR{YUl$V!_0SNZG1Wn|g0RSh81XKV3 delta 19 ZcmZ3?xR{YUl$V!_0SJ^P2TtUk0RSa$1P1^B diff --git a/project/app/__pycache__/admin.cpython-38.pyc b/project/app/__pycache__/admin.cpython-38.pyc index e1bd455baf0f06b3aaef6a2daab9205fed2c1805..23d083def8e3c2a78a1bb041c20e7a904ac7cf32 100644 GIT binary patch delta 19 ZcmX@Zc!rTXl$V!_0SNZG1Wn{V2mmd21kV5f delta 19 ZcmX@Zc!rTXl$V!_0SJ^P2TtTZ2mmWw1cCqn diff --git a/project/app/__pycache__/apps.cpython-38.pyc b/project/app/__pycache__/apps.cpython-38.pyc index 2cd22e5a31d47b7515c231993c1a1e129aec34a8..a5c6da21fbace88c807a1a643e57cfe130165a89 100644 GIT binary patch delta 20 acmZ3^yquXkl$V!_0SNZG1a0J=!w3K^M+Aic delta 20 acmZ3^yquXkl$V!_0SJ^P2X5q^!w3K>-vl@S diff --git a/project/app/__pycache__/capa.cpython-38.pyc b/project/app/__pycache__/capa.cpython-38.pyc index c10ba657ff32e65944b5b4309ddce5f4189a934a..27c68e564c92138347f4652e67a972db46385d82 100644 GIT binary patch delta 20 acmbQGH%pH@l$V!_0SHdG1a0Kz7Y6_^t^`#8 delta 20 acmbQGH%pH@l$V!_0SNRb2X5r%7Y6_?R0IkD diff --git a/project/app/__pycache__/estilo_fub.cpython-38.pyc b/project/app/__pycache__/estilo_fub.cpython-38.pyc index ed2a7790e30678db478707e7493fc3d44d3fb564..1ec03f0d19677b99016e51f1c270ae27ff505d78 100644 GIT binary patch delta 139 zcmX@TgX#1RCf-n9UM>b8xVtSV^~y%xpNx#Go7tIk#khrlg2l5Kfh6PxzSF9!es delta 139 zcmX@TgX#1RCf-n9UM>b8V4M?}x?>~nPew+T&FoCNV%&m2!QxqrK$3ZLqQ_Lm%~vE- z`IxjAHy2tgVcdLQa{?cu>*fNBC;Uta%n-3(o+^Ay)hrOsk;rg9rfIA|&J4!QTQh(1 hGH%+uzPy&7@yur3_7y^mt2bYp>B7XwI9Ym*0RUjRE$ILN diff --git a/project/app/__pycache__/estilo_fundep.cpython-38.pyc b/project/app/__pycache__/estilo_fundep.cpython-38.pyc index 687b0cc571346d4844ab40627da6c25e98da037c..f44ffcc04dd84c605bf691e7e3081270e67e1dea 100644 GIT binary patch delta 20 acmew?_*sxUl$V!_0SHdG1a0Jg!2tj}a|M?G delta 20 acmew?_*sxUl$V!_0SFqm2X5qk!2tj~F9pH? diff --git a/project/app/__pycache__/models.cpython-38.pyc b/project/app/__pycache__/models.cpython-38.pyc index 413ec2476450d50444f9ed190e397d4a72f12b06..e566dcd6b6a449b1de1f667670ac96b837d21df0 100644 GIT binary patch delta 20 acmcaEeO;P6l$V!_0SHdG1a0I#!wUd7fCXFt delta 20 acmcaEeO;P6l$V!_0SNRb2X5p(!wUd5CIt}y diff --git a/project/app/__pycache__/new_dev.cpython-38.pyc b/project/app/__pycache__/new_dev.cpython-38.pyc index fdcfa375ebf465f7a93e74a4224e5d6509bcd613..bbca4236e842a24f14f23dffd115567614e21958 100644 GIT binary patch delta 20 acmaDM|3aQSl$V!_0SHdG1a0KL%MSoMx&@g4 delta 20 acmaDM|3aQSl$V!_0SNRb2X5rP%MSoKUheL|W$l$V!_0SHdG1a0Kr%L@QDCheL|W$l$V!_0SNRb2X5rv%L@QA&IIHD diff --git a/project/app/migrations/__pycache__/0002_rename_agencia_bancaria_mapeamento_agencia_bancaria_and_more.cpython-38.pyc b/project/app/migrations/__pycache__/0002_rename_agencia_bancaria_mapeamento_agencia_bancaria_and_more.cpython-38.pyc index 6cd013cb400c4280bd6fb46c90f49aeb81db9b02..bfc332c5cf7f209133f0d3b0c912e68339097c9b 100644 GIT binary patch delta 20 acmX@ha+ZZVl$V!_0SHdG1a0JYVgdj%sRV@p delta 20 acmX@ha+ZZVl$V!_0SNRb2X5qcVgdj#PXsyu diff --git a/project/app/migrations/__pycache__/0003_alter_mapeamento_id_tipo.cpython-38.pyc b/project/app/migrations/__pycache__/0003_alter_mapeamento_id_tipo.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3dd822babeb025082222d1128009b374575cd3b7 GIT binary patch literal 662 zcmZWn&2H2%5VqrFHycr@2Y3afNT^wXxFOUER8FlBh)XV(H#6ji#5PV=qUUn$gK+7U zSKt|Z<vSbR{P8$e%xJ=9|y?aBz?@ii_{>@R~FBGl2bw2^`ZJA5#Jbyk`S1 z`4E*6XKxrpAigpX$UAW<+-0$%e{VB9640WP{F#E@KZSX>EWQdm-()UVF|)~9AdSzDg0*XyU!p;iM*Rimz2 zB{xb}%F$*}7KzZ4`JYo74~d=Aucm0sfW>yR)zh|kjpL`u*rLHfX@h;SelFj(7W-D?X{*(QRbid! zu$l^Tthj%og1mbsRS>Z6)SU%K_QHjqA-vakNGTQ3ZJfkBqA&X$-_GoL9{Uw^O4sHH eHuFsL95Z>ZdAEB+Rebtl=g!M8?ifrs6n_Bvg}U$n literal 0 HcmV?d00001 diff --git a/project/app/migrations/__pycache__/__init__.cpython-38.pyc b/project/app/migrations/__pycache__/__init__.cpython-38.pyc index 8f2edafdad796fb58c10bfcfaba60a3d5178aaf2..92e8d292711595de3043fcd0ea6d45a1257fae8d 100644 GIT binary patch delta 19 ZcmZ3-xQ>xKl$V!_0SNZG1Wn{#3;-!11a$xa delta 19 ZcmZ3-xQ>xKl$V!_0SJ^P2TtT(3;-tv1SkLi diff --git a/project/backend/__init__.py b/project/backend/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/project/backend/__pycache__/__init__.cpython-38.pyc b/project/backend/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..51b18afebbe920735ebf87b56daf78803823664f GIT binary patch literal 167 zcmWIL<>g`kf{#0cQbF`%5P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;!HIenx(7s(xuw zX&ryk0@&Ee@O9{FKt1R6CF@pMjVG05d2mWB>pF literal 0 HcmV?d00001 diff --git a/project/backend/__pycache__/admin.cpython-38.pyc b/project/backend/__pycache__/admin.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..53324aaf1141885dec22e6589791a0902b96d94a GIT binary patch literal 208 zcmYjKy$ZrG7))9O5h}h$m&V0S)IkIn5yhp8q|Jv-o1fAqgOB7R_$pnU9L3GauTCD^ z9e2asDT+n}@wy*iiT>!rKLQLZWII6-L{LREO(`WJIFdMgVoPG$4Y<(K?BXCDi;|m* zO>%2oBeSL-xREAA`^jg^3af$n%p2#~8rsU)niZhAv7p#=cHYYxlr*rBhC9ev-PjUx a$1RJ;6^S)V%)*9HTTo%D5Qrs<<;K@Gtz(<~46woz@D@A*uacFC zk(G&aQ;D8*pYP}M=kq-dhdqM!^LY>Ncz*e0-$G1A=;bMbB8qB~(}YrTLsX#H8&M4C zD@y_uK9H#MjVuz;=5XxXl{JfOnfl7UQA|eYd`*bFB!-GEW8 z#LJ0VOS81Gn#Z|Spv!oYEys0brx|F~9L!txEb25}A&ksHh^8k5l56ebfe=r%)Vt1+ zf`zPgB_v9S#a1Kqy$@3OZEWH9mal9Myq?#ls`)jPo60)Af?OI4nxCDEyUc;k3`{d4 zD@eI3>>ARF@5bTMxiWUo1w&20$I?TWhICt*MXc%XKIWN4;Gg!~{~_9_kF}rmy literal 0 HcmV?d00001 diff --git a/project/backend/__pycache__/consultas_oracledb.cpython-38.pyc b/project/backend/__pycache__/consultas_oracledb.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f56257424a5df925836bdb3c7407ccc7b11242ef GIT binary patch literal 1767 zcma)+Pj4GV6u@U@|9HK&qmok8AXHWe3EV@>B}hmCQ8^A2QKxm%Bv?Y$W@nOYvfg!O z$EC4mdod>tz#Spk5*Ijg;-k!!3rKu|oOo~DvZ@vqH6HXJ-C!F;uxB5(2f^vJxzFY3w!k#&EGIQso&-Ta~c|>|- zpKyn}Uz2`Cc)T*DlyHw%VO-@tuR-r~x=ot(KfyQYPF7pT*-*5`2jf(YTN@%jRoSS; z#gjvsrK(iMNzxjHdA_QiDnksF5q^5v7$_FJZFuvyL2yzKMP^j7IW34LGiy!?s_D$; zbPnNY+@5tWn%kYvJMEp|Zm`+gdJx>-=-gY~-uYzku($PDXJ>1B(BA6qcDncP^_q_H zG8smR;0LA>WoarRWn56Um4tpQ^GuqGcq*c?5=~}oTw^Sl_?gH$#B{OyufKULhGCkC zr1jp~;9)!xNt}w!I1QDES|gdAz&5ReFgg_}Z-L8voTxA#T!ykbIyXy4LbbCb84tVR zP~=#-yezI|GoN|XXL1Q_hWZhO{<5JBmz7Cdf|(dnbVLd^`D5~{VlzwGkUUFUSl_}{ zl(VvumL@-tA6emOd**7VOs74oz#3P1Q&LoP<)m6L<#St;Dcc}l_6rYuSCy}78hlJC z*wzbQGwrVsZm*D{rd{o=5F8hEUDMT5SI%@**H*}^uIsqRS)%J`Sx2p^srEqIhZxA5 zP_jqTRhuYw(m3_yUz8LLN+wGXv!feRhVyF(MdMjxpL{`5wqIJb^*xmy{9)+>RzqwQ z=q>SZyBD{2jz#di)^U~waUMiTmJ5DytGysV@IYk&4^?;&=3?@}|K=&!`?S;R1ih`j z?&Al+`iBxrb8%-gjDaxpDMiRj#{ryzVE`K>qPb+8G63U@WSlDLz(>+WQ9YNX5=`Dhv1p_vaj+tz?Q!cf>67BeComDGwfaJvL$BI8?;XA!1xX3TfSFk%QRpv zuCnC2@a45z0`v3&_+MZ!`F7HO0Xp6i2s(WUdcokva5dZ^cw>}^TMBTQQala|4S~6~ z>N<{9!0{Wv(Rq%et(_}4I?tSII1>32MDb4;ZMdtPuDk&e%U4j?D3(DqeR&i0S5f>I z3-T7u-bV2{h^8y=pkA`_CTal);{pvw>R7&m7QC*m6vl_b07_VtM=+DW1%g2G7X`WO z>rk3S0qjKq?!u~Ot&Gc54}t5!D1;r5RAXm=ow3nsJVYI@J>%pGAT5zy{1ettqMs`v hmBE$3cxbm{s!drr@R0F literal 0 HcmV?d00001 diff --git a/project/backend/__pycache__/models.cpython-38.pyc b/project/backend/__pycache__/models.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3dce3f67764a17f5fa94eab7eab6f42ddb62d5de GIT binary patch literal 205 zcmWIL<>g`kf{#0cQZ0e>V-N=!FabFZKwK;UBvKes7;_kM8KW2(8B&;n88n$+0!0}# z8E>)W=BK3Q6#Hp1-QrBiO3X{o*Gow%0%=~!P{abHz{D>v{fzwFRQ=MV(!7#VeV5eY z?2`Nf{fyMy#Jv2}9DM`R_<+oU)SS$`RJY8$#FErx{eq(WtkmQZ{iMX??9{vzeTY4J W1(mlrY=G?2oK!nTpz)u9m;nHIdo=O@ literal 0 HcmV?d00001 diff --git a/project/backend/__pycache__/teste_projects.cpython-38.pyc b/project/backend/__pycache__/teste_projects.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1508c9f54a6bf047f98f9947e643fbb1325f8d7e GIT binary patch literal 1763 zcma)+&2J+$6u@oIM<$aGl`f062rVOo1ldEwrASBxu}V`|#HPDxw=I!SG>zSM+R04n zah7f5*-JQa0PYAWk+{H_6Mu@YTtMP4=!y3x?QV-eVn*}){Ooyte(z^LsnvV}&+czs z(W(&gJ9e%=W$1hiU$zT^6Ha5&Bb@apw|Y!if^vJxzFY3u!k#&EGIQso$M(n?c}%)w zpKyn}Uz1)*c)T>FlyHxipwcyL%2Ej>A6q!-Q<}@do%&a-dsirfV z(>a8rae3CcXl%DXZ?|@Wd%tXOqwdyc?VYXderv0<+wMHL-)%U? zOJz8S1wSyQL7F6Dpo|O3wvy0}WtK`)63@h7tVDwu8|N4c27V^83Nc-D|8<+kVi+c= zh@0=N^&dqe5l4yGjFM1^L31S26IiBs5Drd7!kbEDO7t(S+3M)r)Q^N}rExqScEX{^ zuxeRRSj%QU^Qg~c9c+gB0}AccgEpL2B&-f25v1pc9Ve@kXcn%agDQBSJASLT3J)=fwm7ZkU61b zk0h%$QS794>dU_<$!nBM>JYP|Yg2~fYY0T`d2OG3K@zrKShV#$l^*P{@By7pp1@K9j=jdv*2 z;5dxqMd>SCWCIzE6zsw{GE9zyv0{-JHyn+CD&w@JOeOfYlkxDtc(Cbg9IMdK(D*Mi zP^@5XWoK~&5N09}Va&*J91X!U@1|d6Z-6a(9|WOx@%q$**Js$e)Ma&M(kk~Xu+%MT48)B44{NXc?=`jTObG|e^HRD zwhE);0MY{4#h$Q+68&5Y hsR*tB##o69@a$xmAJ0Nms`NGHRlSn8_BZ{+rY`^h literal 0 HcmV?d00001 diff --git a/project/backend/__pycache__/urls.cpython-38.pyc b/project/backend/__pycache__/urls.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..df61deb9f8f544e515d272e085e47dd381194df2 GIT binary patch literal 309 zcmYjLJ5Izf5VhkZEbNA3Af<_E=n$enhzcPPjhmG>9&M8KPyT>71P9>?93?H)UV#Q| zEd?XZn|Ye|X6CtRPEd-o&qs)=3N6iED^lvfU@O}qc(0skKZ}Z|(84)F1<^sHbu(IRRRYT zP{4fvKR_<*%RWPU-8bmX-WDj37wAQ9+8N4OJ4GskzrUH;ot>SfweFNkc?mx3*A`iv zm83t>IQ&t-cnnYc2*j6sIgo~OSC%DT@zp>Xs$F%cbv3XhUkfrry{iwi-R#il8sN+L z`p;4~=V#ke#dr@Hq>9XSN^K>GutDcNF>-&eurPy7cm=NiNAv&-vvj zJ>`6&`SOMWqaHFn$!^P_`R#pAVnE&;=9S^S*!(+un2uIqw8FAUp6S~-Q%SPB#-5bq zQ8)C|^PibJ%BGTL&=PfG_=}SQ%Oyrq*j6UR{feu5@}%^(oD_HSNeQ_8ofJOSBv#nS zL&o2+23f+We;1?QOW|dR7Srfo2hpUsp3a82@f2VA#@K^Vs!S$L` zx0f6)ajoGjTRhV?pVu8eQ#W1HGuv&uVY;1`$xEqY#a^-+HQVGzQWMx}wajI!;X1tJ z+D*r+ISsdEf;n$D+OF+(?3(F#)(flFaUIBGG+R#1YPTI;Xm_3nqX=bqU^Sh#I~_Eo z@{0M~X?Z4uR!petI2P%-&FMPMbIY67TV85)VD%-d4XapfUYL>x+~kFtdp2|cIDXVZnBLOXE(n5bB{nr6%0 z-@Va>y_&FBo_PX896oDKTjimN*?1XyV;)t2ZownofkdvQIIdtS%h~T?XS)e)i(xnBIB1#FRjDp|F6s{PF9zmHyIf`-& zWgg`?$_bQ{D5p?PqntrGi*gR-Jjw->izt^+E~8vQxr%ZPu!onDl6W?LA(UTpPj7Lsh`H^RIgS4Y{Qe3z>(- zaCL)hb@PKTB-HZm=S_(WtschP^N%LG|tzUUM)a!5}10 zF$L*QJKAT}j~#wJAaCNu(H1YIz3wwF^AIVCTD_UHfnpCA3H_YeI} zQ7yv?nrz6k@>z%)@=efLMT0f-N>NtiGDPs1Qw&-8hdzUv8kIbs_1AmhYP1-yMU?f& zY@ \n {consulta['OBJETIVOS']} \n") + #consulta[0]['OBJETIVOS'] = str(consulta[0]['OBJETIVOS']) + + cursor.close() + + except oracledb.Error as error: + print("Failed to read data from table", error) + finally: + if connection: + connection.close() + print("The connection is closed") + + # return records + return consulta + + +# a = int(input("")) +# lul = getlimitedRows(a) +# print("\n") +# print(type(lul)) + +def getallRows(): + + try: + connection = oracledb.connect(conStr) + cursor = connection.cursor() + print("Connected to database") + sqlite_select_query = f"SELECT * FROM IDEA.STG_PROJETOS_CONVENIAR" + cursor.execute(sqlite_select_query) + records = cursor.fetchall() + length = len(records) + print(len(records)) + cursor.execute(sqlite_select_query) + + cursor.close() + + except oracledb.Error as error: + print("Failed to read data from table", error) + finally: + if connection: + connection.close() + print("The connection is closed") + + # return records + return length + + + diff --git a/project/backend/migrations/__init__.py b/project/backend/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/project/backend/migrations/__pycache__/__init__.cpython-38.pyc b/project/backend/migrations/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2a08ba9191db45b84bd3d81c215e1dc5df464c00 GIT binary patch literal 178 zcmWIL<>g`kf{#0cQbF`%5P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;x_`enx(7s(xuw zX + + + AutomaTEC + + + + + + + + + + + +
+ finatec +

Sistema de prestação automático

+
+ {% block conteudo %} + + {% endblock %} +
Copyright BRISA 2021©. Todos direitos reservados.
+ + \ No newline at end of file diff --git a/project/backend/templates/backend/projetos.html b/project/backend/templates/backend/projetos.html new file mode 100644 index 00000000..f6a28c4c --- /dev/null +++ b/project/backend/templates/backend/projetos.html @@ -0,0 +1,180 @@ +{% extends 'base.html' %} +{% block conteudo %} +{% load static %} + +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% for entry in data %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% endfor %} + +
CODIGONOMESALDODATA ASSINATURADATA VIGENCIADATA ENCERRAMENTOTIPO DO CONTRATOINSTITUICAO EXECUTORAPROCESSOSUBPROCESSOCOD_PROPOSTAPROPOSTAVALOR_APROVADONOME_TP_CONTROLE_SALDOGRUPO_GESTORESGESTOR_RESPCOORDENADORPROCEDIMENTO_COMPRATAB_FRETETAB_DIARIASCUSTO_OPNOME_FINANCIADORDEPARTAMENTOSITUACAOBANCOAGENCIA_BANCARIACONTA_BANCARIACENTRO_CUSTOCONTA_CAIXACATEGORIA_PROJETOCOD_CONVENIO_CONTACOD_STATUSIND_SUB_PROJETOTIPO_CUSTO_OPPROJETO_MAEID_COORDENADORID_FINANCIADORID_INSTITUICAOID_DEPARTAMENTONOME_INSTITUICAOID_INSTITUICAO_EXECUTORAID_TIPO
{{ entry.CODIGO }}{{ entry.NOME }}{{ entry.SALDO }}{{ entry.DATA_ASSINATURA }}{{ entry.DATA_VIGENCIA }}{{ entry.DATA_ENCERRAMENTO }}{{ entry.TIPO_CONTRATO }}{{ entry.INSTITUICAO_EXECUTORA }}{{ entry.PROCESSO }}{{ entry.SUBPROCESSO }}{{ entry.COD_PROPOSTA }}{{ entry.PROPOSTA }}{{ entry.VALOR_APROVADO }}{{ entry.NOME_TP_CONTROLE_SALDO }}{{ entry.GRUPO_GESTORES }}{{ entry.GESTOR_RESP }}{{ entry.COORDENADOR }}{{ entry.PROCEDIMENTO_COMPRA }}{{ entry.TAB_FRETE }}{{ entry.TAB_DIARIAS }}{{ entry.CUSTO_OP }}{{ entry.NOME_FINANCIADOR }}{{ entry.DEPARTAMENTO }}{{ entry.SITUACAO }}{{ entry.BANCO }}{{ entry.AGENCIA_BANCARIA }}{{ entry.CONTA_BANCARIA }}{{ entry.CENTRO_CUSTO }}{{ entry.CONTA_CAIXA }}{{ entry.CATEGORIA_PROJETO }}{{ entry.COD_CONVENIO_CONTA }}{{ entry.COD_STATUS }}{{ entry.IND_SUB_PROJETO }}{{ entry.TIPO_CUSTO_OP }}{{ entry.PROJETO_MAE }}{{ entry.ID_COORDENADOR }}{{ entry.ID_FINANCIADOR }}{{ entry.ID_INSTITUICAO }}{{ entry.ID_DEPARTAMENTO }}{{ entry.NOME_INSTITUICAO }}{{ entry.ID_INSTITUICAO_EXECUTORA }}{{ entry.ID_TIPO }}

+ + + +{% endblock %} \ No newline at end of file diff --git a/project/backend/tests.py b/project/backend/tests.py new file mode 100644 index 00000000..7ce503c2 --- /dev/null +++ b/project/backend/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/project/backend/urls.py b/project/backend/urls.py new file mode 100644 index 00000000..64705d83 --- /dev/null +++ b/project/backend/urls.py @@ -0,0 +1,6 @@ +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.project_views, name='pjview'), +] \ No newline at end of file diff --git a/project/backend/views.py b/project/backend/views.py new file mode 100644 index 00000000..bd30d4c8 --- /dev/null +++ b/project/backend/views.py @@ -0,0 +1,86 @@ +from django.shortcuts import render +from .consultas_oracledb import getlimitedRows,getallRows +from django.core.paginator import Paginator,EmptyPage, PageNotAnInteger +# Create your views here. + +def project_views(request): + length = getallRows() + data = getlimitedRows(length) + + relevant_data = [] + for key, inner_dict in data.items(): + relevant_info = { + 'CODIGO': inner_dict.get('CODIGO', ''), + 'NOME': inner_dict.get('NOME', ''), + 'SALDO': inner_dict.get('SALDO', ''), + 'DATA_ASSINATURA': inner_dict.get('DATA_ASSINATURA', ''), + 'DATA_VIGENCIA': inner_dict.get('DATA_VIGENCIA', ''), + 'DATA_ENCERRAMENTO': inner_dict.get('DATA_ENCERRAMENTO', ''), + 'TIPO_CONTRATO': inner_dict.get('TIPO_CONTRATO', ''), + 'INSTITUICAO_EXECUTORA': inner_dict.get('INSTITUICAO_EXECUTORA', ''), + 'PROCESSO': inner_dict.get('PROCESSO', ''), + 'SUBPROCESSO': inner_dict.get('SUBPROCESSO', ''), + 'COD_PROPOSTA': inner_dict.get('COD_PROPOSTA', ''), + 'PROPOSTA': inner_dict.get('PROPOSTA', ''), + #'OBJETIVOS': inner_dict.get('OBJETIVOS', ''), + 'VALOR_APROVADO': inner_dict.get('VALOR_APROVADO', ''), + 'NOME_TP_CONTROLE_SALDO': inner_dict.get('NOME_TP_CONTROLE_SALDO', ''), + 'GRUPO_GESTORES': inner_dict.get('GRUPO_GESTORES', ''), + 'GESTOR_RESP': inner_dict.get('GESTOR_RESP', ''), + 'COORDENADOR': inner_dict.get('COORDENADOR', ''), + 'PROCEDIMENTO_COMPRA': inner_dict.get('PROCEDIMENTO_COMPRA', ''), + 'TAB_FRETE': inner_dict.get('TAB_FRETE', ''), + 'TAB_DIARIAS': inner_dict.get('TAB_DIARIAS', ''), + 'CUSTO_OP': inner_dict.get('CUSTO_OP', ''), + 'NOME_FINANCIADOR': inner_dict.get('NOME_FINANCIADOR', ''), + 'DEPARTAMENTO': inner_dict.get('DEPARTAMENTO', ''), + 'SITUACAO': inner_dict.get('SITUACAO', ''), + 'BANCO': inner_dict.get('BANCO', ''), + 'AGENCIA_BANCARIA': inner_dict.get('AGENCIA_BANCARIA', ''), + 'CONTA_BANCARIA': inner_dict.get('CONTA_BANCARIA', ''), + 'CENTRO_CUSTO': inner_dict.get('CENTRO_CUSTO', ''), + 'CONTA_CAIXA': inner_dict.get('CONTA_CAIXA', ''), + 'CATEGORIA_PROJETO': inner_dict.get('CATEGORIA_PROJETO', ''), + 'COD_CONVENIO_CONTA': inner_dict.get('COD_CONVENIO_CONTA', ''), + 'COD_STATUS': inner_dict.get('COD_STATUS', ''), + 'IND_SUB_PROJETO': inner_dict.get('IND_SUB_PROJETO', ''), + 'TIPO_CUSTO_OP': inner_dict.get('TIPO_CUSTO_OP', ''), + 'PROJETO_MAE': inner_dict.get('PROJETO_MAE', ''), + 'ID_COORDENADOR': inner_dict.get('ID_COORDENADOR', ''), + 'ID_FINANCIADOR': inner_dict.get('ID_FINANCIADOR', ''), + 'ID_INSTITUICAO': inner_dict.get('ID_INSTITUICAO', ''), + 'ID_DEPARTAMENTO': inner_dict.get('ID_DEPARTAMENTO', ''), + 'NOME_INSTITUICAO': inner_dict.get('NOME_INSTITUICAO', ''), + 'ID_INSTITUICAO_EXECUTORA': inner_dict.get('ID_INSTITUICAO_EXECUTORA', ''), + 'ID_TIPO': inner_dict.get('ID_TIPO', ''), + } + relevant_data.append(relevant_info) + # Number of items to display per page + + search_query = request.GET.get('search', '') + if search_query: + search_results = [] + for entry in relevant_data: + for key, value in entry.items(): + if key == 'CODIGO' and str(search_query) == str(value): + search_results.append(entry) + break + elif key != 'CODIGO' and isinstance(value, str) and search_query.lower() in value.lower(): + search_results.append(entry) + break + else: + search_results = relevant_data + + items_per_page = 10 + paginator = Paginator(search_results, items_per_page) + + page = request.GET.get('page') + try: + items = paginator.get_page(page) + except PageNotAnInteger: + items = paginator.get_page(1) + except EmptyPage: + items = paginator.get_page(paginator.num_pages) + + return render(request, "backend/projetos.html", {"search_query": search_query, + "data":items}) diff --git a/project/project/__pycache__/__init__.cpython-38.pyc b/project/project/__pycache__/__init__.cpython-38.pyc index 8710576c3ac174bb048da4eef396d4ebd384b774..dc0880329a5f0a8f3db4460322d19ce7d428461f 100644 GIT binary patch delta 19 ZcmZ3^xSWwYl$V!_0SNZG1Wn|g0{|!<1YiIF delta 19 ZcmZ3^xSWwYl$V!_0SJ^P2TtUk0{|ui1QP%N diff --git a/project/project/__pycache__/settings.cpython-38.pyc b/project/project/__pycache__/settings.cpython-38.pyc index 75f277359eead94afd65b9128bfc234d0738e1f8..41155c6b40ad59ba5dcdfdb80e171854e627db00 100644 GIT binary patch delta 281 zcmX>jbW?~ol$V!_0SNx=3`+eqkynak-`!s z3B*z3@pOj$AuWK-Ev^cFHj$-#O03z>kH%BL7aDWot3GiVyV1o=dh@fJ%!Vo8Qy zl~YRAWFN*moVVDM5|gu2^HMfzFhwyl@^5Zty~@O90#sXMGC7VTfw5=uehwK{My4Mu Kyp!*7RDM%LBRzm(oujSw<+v1 z-rN`0yfRIl8@0uO4F}q+l z3~hAK#hUW4jty+ii!mo3J#6LIdN|)++Rjq@F^?owu}d`!s18YuoK5UeONmL4hN_7D zOi=qj9b_VZr-LDNAud_}FgfO5i;E IB%j*tFF>kCxc~qF diff --git a/project/project/__pycache__/urls.cpython-38.pyc b/project/project/__pycache__/urls.cpython-38.pyc index 94958553bad9e721a7516ece89079a046611ce12..753e0048eeb63f36ba1e801904550dd2b1cdaea7 100644 GIT binary patch delta 121 zcmcb?^q)yPl$V!_0SLTz1f^aE(vLwLWWWaGH~?|6$3$&&u~e26wp8X6_GZRrrgY{g z_7sj_22IY1ImVJzoCQVsS*a!Y#rjn|Nr}nXsd*`SrA0Z#6X&nx16jetD8RzQ2!wwD DuPPc* delta 81 zcmey*bc0Ddl$V!_0SJ^P2c|9t(vLwLWWWOCH~?|6%|vZ;u5_j-_7t{Y22J*f6~+^f StmWYVO7SoXu<$VQ`~v_d7!9HT diff --git a/project/project/__pycache__/wsgi.cpython-38.pyc b/project/project/__pycache__/wsgi.cpython-38.pyc index 46227831c651d8a1c58711ee188fb86592d71927..8c90fc34939c1e1bfaa817f5f71364355e60e651 100644 GIT binary patch delta 20 acmdnRvWtZ~l$V!_0SNZG1a0KjX955(WCTF~ delta 20 acmdnRvWtZ~l$V!_0SJ^P2X5rnX955$`~&m= diff --git a/project/project/settings.py b/project/project/settings.py index 6436bdcb..72b26e9c 100644 --- a/project/project/settings.py +++ b/project/project/settings.py @@ -27,6 +27,8 @@ 'django.contrib.messages', 'django.contrib.staticfiles', 'app', + 'backend', + ] MIDDLEWARE = [ diff --git a/project/project/urls.py b/project/project/urls.py index a3a89530..aa668f2d 100644 --- a/project/project/urls.py +++ b/project/project/urls.py @@ -5,4 +5,5 @@ urlpatterns = [ path('', include('app.urls')), path('admin/', admin.site.urls), + path('projetos/',include('backend.urls')), ]