services.js 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501
  1. //Setting up the application services.....
  2. function transformToInteger(data, headersGetter, status) {
  3. return {value:parseInt(data)}
  4. }
  5. function transformToString(data, headersGetter, status) {
  6. return {value:data.substring(1,data.length-1)} // strips the quotes
  7. }
  8. function transformToBoolean(data, headersGetter, status){
  9. return {value: data=="true"};
  10. }
  11. angular.module('services', ['ngResource'])
  12. // Define the API
  13. .factory('UserManager', function($resource,$q) {
  14. var data = $resource(AppConfig.url + 'user/:action/:user', {}, {
  15. GetUserInfo: {method:'GET', params:{action:'userinfo'}, cache:false},
  16. Login: {method: 'POST', params: {action: 'login'}, cache:false},
  17. AutenticationGroups: {method: 'POST', params:{action: 'authentication_groups'}, isArray: true, cache:false},
  18. Logout: {method: 'GET', params: {action: 'logout'}, cache:false},
  19. AppVariables: {method:'GET', params:{action:'appvariables'}, cache:false},
  20. ValidSession: {method:'GET',params:{action:'validSession'},cache:false,transformResponse: transformToBoolean},
  21. List: {
  22. method:'GET',
  23. url:AppConfig.url + 'user/:action/:start-:size?orderField=:orderField&filter=:filter',
  24. params:{action:'list',start:'@start',size:'@size', orderField:'@orderField', filter:'@filter'},
  25. hasBody: true,
  26. cache:false,
  27. isArray:true
  28. },
  29. New: {
  30. method:'GET',
  31. url:AppConfig.url + 'user/:action',
  32. params:{action:'new'},
  33. hasBody: true,
  34. cache:false,
  35. isArray:false
  36. },
  37. Count: {
  38. method:'GET',
  39. url:AppConfig.url + 'user/:action?filter=:filter',
  40. params:{action:'count', filter:'@filter'},
  41. isArray:false,
  42. cache:false,
  43. transformResponse: transformToInteger
  44. },
  45. Delete: {
  46. method:'DELETE',
  47. url: AppConfig.url + 'user/:action/:id',
  48. params:{action: 'delete', id:'@id'},
  49. hasBody: true,
  50. cache:false,
  51. isArray:false
  52. }
  53. });
  54. return data;
  55. })
  56. .factory('ComboManager', function($resource){
  57. var data = $resource(AppConfig.url + 'combo/:type/:tipologia', {}, {
  58. List: {method:'GET', isArray: true, cache:false},
  59. Count: {method:'GET', url: AppConfig.url + 'combo/:type/count', params:{tipologia:'@tipologia', type:'@type'}, isArray:false, cache:false,
  60. transformResponse: transformToInteger},
  61. CausaliEsiti:{
  62. method:'GET',
  63. url: AppConfig.url + 'combo/causaliEsiti',
  64. isArray: true,
  65. cache: false
  66. }
  67. });
  68. return data;
  69. })
  70. .factory('DisposizioniRid', function($resource) {
  71. var data = $resource(AppConfig.url + 'DisposizioniRid/:action', {}, {
  72. Get: {
  73. method:'GET',
  74. url:AppConfig.url + 'DisposizioniRid/:id',
  75. params:{id:'@id'},
  76. hasBody: true,
  77. cache:false,
  78. isArray:false
  79. },
  80. Count: {
  81. method:'POST',
  82. params: {action: 'count'},
  83. isArray:false,
  84. hasBody: true,
  85. cache:false,
  86. transformResponse: transformToInteger
  87. },
  88. List: {
  89. method:'POST',
  90. url:AppConfig.url + 'DisposizioniRid/:action/:start-:size',
  91. params:{action:'list',start:'@start',size:'@size'},
  92. hasBody: true,
  93. cache:false,
  94. isArray:true
  95. },
  96. Export: {method:'POST', url:AppConfig.url + 'DisposizioniRid/:action',
  97. params:{action:'export',start:'@start',size:'@size', ids:'@ids'},
  98. cache:false,
  99. isArray:false,
  100. tresponseType: 'arraybuffer',
  101. transformResponse: function (data) {
  102. var pdf;
  103. if (data) {
  104. pdf = new Blob([data], {
  105. type: 'text/csv'
  106. });
  107. }
  108. return {
  109. response: pdf
  110. };
  111. }
  112. },
  113. ExportFiltered: {method:'POST', url:AppConfig.url + 'DisposizioniRid/:action',
  114. params:{action:'exportFiltered', ids:'@ids'},
  115. cache:false,
  116. isArray:false,
  117. transformResponse: function (data) {
  118. var pdf;
  119. if (data) {
  120. pdf = new Blob([data], {
  121. type: 'text/csv'
  122. });
  123. }
  124. return {
  125. response: pdf
  126. };
  127. }
  128. },
  129. Print: {method:'POST', url:AppConfig.url + 'DisposizioniRid/:action?label=:label',
  130. params:{action:'print', label:'@label'},
  131. cache:false,
  132. isArray:false,
  133. responseType: 'arraybuffer',
  134. transformResponse: function (data) {
  135. var pdf;
  136. if (data) {
  137. pdf = new Blob([data], {
  138. type: 'application/pdf'
  139. });
  140. }
  141. return {
  142. response: pdf
  143. };
  144. }
  145. },
  146. PrintFiltered: {method:'POST', url:AppConfig.url + 'DisposizioniRid/:action?label=:label',
  147. params:{action:'printFiltered', label:'@label'},
  148. cache:false,
  149. isArray:false,
  150. responseType: 'arraybuffer',
  151. transformResponse: function (data) {
  152. var pdf;
  153. if (data) {
  154. pdf = new Blob([data], {
  155. type: 'application/pdf'
  156. });
  157. }
  158. return {
  159. response: pdf
  160. };
  161. }
  162. },
  163. MassDelete: {
  164. method:'POST',
  165. url:AppConfig.url + 'DisposizioniRid/:action/',
  166. params:{action:'massDelete'},
  167. hasBody: true,
  168. cache:false,
  169. isArray:false,
  170. transformResponse: transformToBoolean
  171. },
  172. LogStati: {
  173. method:'GET',
  174. url:AppConfig.url + 'DisposizioniRid/:action/:id',
  175. params:{action:'logStati', id:'@id'},
  176. cache:false,
  177. isArray:true
  178. },
  179. LogVariazioni: {
  180. method:'GET',
  181. url:AppConfig.url + 'DisposizioniRid/:action/:id',
  182. params:{action:'logVariazioni', id:'@id'},
  183. cache:false,
  184. isArray:true
  185. },
  186. Filter: {
  187. method:'POST',
  188. url:AppConfig.url + 'DisposizioniRid/:action/:start-:size?orderField=:orderField',
  189. params:{action:'filter',start:'@start',size:'@size',orderField:'@orderField'},
  190. cache:false,
  191. hasBody: true,
  192. isArray:true
  193. },
  194. CountFiltered: {
  195. method:'POST',
  196. params: {action: 'countfilter'},
  197. isArray:false,
  198. hasBody: true,
  199. cache:false,
  200. transformResponse: transformToInteger
  201. }
  202. });
  203. return data;
  204. })
  205. .factory('DisposizioniAea', function($resource) {
  206. var data = $resource(AppConfig.url + 'DisposizioniAea/:action', {}, {
  207. Get: {
  208. method:'GET',
  209. url:AppConfig.url + 'DisposizioniAea/:id',
  210. params:{id:'@id'},
  211. hasBody: true,
  212. cache:false,
  213. isArray:false
  214. },
  215. Count: {
  216. method:'POST',
  217. params: {action: 'count'},
  218. isArray:false,
  219. hasBody: true,
  220. cache:false,
  221. transformResponse: transformToInteger
  222. },
  223. List: {
  224. method:'POST',
  225. url:AppConfig.url + 'DisposizioniAea/:action/:start-:size',
  226. params:{action:'list',start:'@start',size:'@size'},
  227. hasBody: true,
  228. cache:false,
  229. isArray:true
  230. },
  231. Export: {method:'POST', url:AppConfig.url + 'DisposizioniAea/:action',
  232. params:{action:'export',start:'@start',size:'@size'},
  233. cache:false,
  234. isArray:false,
  235. transformResponse: function (data) {
  236. var pdf;
  237. if (data) {
  238. pdf = new Blob([data], {
  239. type: 'text/csv'
  240. });
  241. }
  242. return {
  243. response: pdf
  244. };
  245. }
  246. },
  247. ExportFiltered: {method:'POST', url:AppConfig.url + 'DisposizioniAea/:action',
  248. params:{action:'exportFiltered'},
  249. cache:false,
  250. isArray:false,
  251. transformResponse: function (data) {
  252. var pdf;
  253. if (data) {
  254. pdf = new Blob([data], {
  255. type: 'text/csv'
  256. });
  257. }
  258. return {
  259. response: pdf
  260. };
  261. }
  262. },
  263. Print: {method:'POST', url:AppConfig.url + 'DisposizioniAea/:action',
  264. params:{action:'print'},
  265. cache:false,
  266. isArray:false,
  267. responseType: 'arraybuffer',
  268. transformResponse: function (data) {
  269. var pdf;
  270. if (data) {
  271. pdf = new Blob([data], {
  272. type: 'application/pdf'
  273. });
  274. }
  275. return {
  276. response: pdf
  277. };
  278. }
  279. },
  280. PrintFiltered: {method:'POST', url:AppConfig.url + 'DisposizioniAea/:action',
  281. params:{action:'printFiltered'},
  282. cache:false,
  283. isArray:false,
  284. responseType: 'arraybuffer',
  285. transformResponse: function (data) {
  286. var pdf;
  287. if (data) {
  288. pdf = new Blob([data], {
  289. type: 'application/pdf'
  290. });
  291. }
  292. return {
  293. response: pdf
  294. };
  295. }
  296. },
  297. MassDelete: {
  298. method:'POST',
  299. url:AppConfig.url + 'DisposizioniAea/:action/',
  300. params:{action:'massDelete'},
  301. hasBody: true,
  302. cache:false,
  303. isArray:false,
  304. transformResponse: transformToBoolean
  305. },
  306. LogStati: {
  307. method:'GET',
  308. url:AppConfig.url + 'DisposizioniAea/:action/:id',
  309. params:{action:'logStati', id:'@id'},
  310. cache:false,
  311. isArray:true
  312. },
  313. LogVariazioni: {
  314. method:'GET',
  315. url:AppConfig.url + 'DisposizioniAea/:action/:id',
  316. params:{action:'logVariazioni', id:'@id'},
  317. cache:false,
  318. isArray:true
  319. },
  320. Filter: {
  321. method:'POST',
  322. url:AppConfig.url + 'DisposizioniAea/:action/:start-:size?orderField=:orderField',
  323. params:{action:'filter',start:'@start',size:'@size',orderField:'@orderField'},
  324. hasBody: true,
  325. cache:false,
  326. isArray:true
  327. },
  328. CountFiltered: {
  329. method:'POST',
  330. params: {action: 'countfilter'},
  331. isArray:false,
  332. cache:false,
  333. hasBody: true,
  334. transformResponse: transformToInteger
  335. }
  336. });
  337. return data;
  338. })
  339. .factory('DisposizioniBonifici', function($resource) {
  340. var data = $resource(AppConfig.url + 'DisposizioniBonifici/:action', {}, {
  341. Get: {
  342. method:'GET',
  343. url:AppConfig.url + 'DisposizioniBonifici/:id',
  344. params:{id:'@id'},
  345. hasBody: true,
  346. cache:false,
  347. isArray:false
  348. },
  349. Count: {
  350. method:'POST',
  351. params: {action: 'count'},
  352. isArray:false,
  353. hasBody: true,
  354. cache:false,
  355. transformResponse: transformToInteger
  356. },
  357. List: {
  358. method:'POST',
  359. url:AppConfig.url + 'DisposizioniBonifici/:action/:start-:size',
  360. params:{action:'list',start:'@start',size:'@size'},
  361. hasBody: true,
  362. cache:false,
  363. isArray:true
  364. },
  365. Export: {
  366. method:'POST',
  367. url:AppConfig.url + 'DisposizioniBonifici/:action',
  368. params:{action:'export'},
  369. cache:false,
  370. isArray:false,
  371. transformResponse: function (data) {
  372. var pdf;
  373. if (data) {
  374. pdf = new Blob([data], {
  375. type: 'text/csv'
  376. });
  377. }
  378. return {
  379. response: pdf
  380. };
  381. }
  382. },
  383. ExportFiltered: {method:'POST', url:AppConfig.url + 'DisposizioniBonifici/:action',
  384. params:{action:'exportFiltered'},
  385. cache:false,
  386. isArray:false,
  387. transformResponse: function (data) {
  388. var pdf;
  389. if (data) {
  390. pdf = new Blob([data], {
  391. type: 'text/csv'
  392. });
  393. }
  394. return {
  395. response: pdf
  396. };
  397. }
  398. },
  399. Filter: {
  400. method:'POST',
  401. url:AppConfig.url + 'DisposizioniBonifici/:action/:start-:size?orderField=:orderField',
  402. params:{action:'filter',start:'@start',size:'@size',orderField:'@orderField'},
  403. hasBody: true,
  404. cache:false,
  405. isArray:true
  406. },
  407. CountFiltered: {
  408. method:'POST',
  409. params: {action: 'countfilter'},
  410. isArray:false,
  411. cache:false,
  412. hasBody: true,
  413. transformResponse: transformToInteger
  414. },
  415. Print: {method:'POST', url:AppConfig.url + 'DisposizioniBonifici/:action',
  416. params:{action:'print'},
  417. cache:false,
  418. isArray:false,
  419. responseType: 'arraybuffer',
  420. transformResponse: function (data) {
  421. var pdf;
  422. if (data) {
  423. pdf = new Blob([data], {
  424. type: 'application/pdf'
  425. });
  426. }
  427. return {
  428. response: pdf
  429. };
  430. }
  431. },
  432. PrintFiltered: {method:'POST', url:AppConfig.url + 'DisposizioniBonifici/:action',
  433. params:{action:'printFiltered'},
  434. cache:false,
  435. isArray:false,
  436. responseType: 'arraybuffer',
  437. transformResponse: function (data) {
  438. var pdf;
  439. if (data) {
  440. pdf = new Blob([data], {
  441. type: 'application/pdf'
  442. });
  443. }
  444. return {
  445. response: pdf
  446. };
  447. }
  448. },
  449. StampaContabile:{
  450. Method:'GET',
  451. url:AppConfig.url + 'DisposizioniBonifici/:action/:id',
  452. params:{id:'@id', action:'stampaContabile'},
  453. cache:false,
  454. isArray:false,
  455. responseType: 'arraybuffer',
  456. transformResponse: function (data) {
  457. var pdf;
  458. if (data) {
  459. pdf = new Blob([data], {
  460. type: 'application/pdf'
  461. });
  462. }
  463. return {
  464. response: pdf
  465. };
  466. }
  467. },
  468. StampaRichiamo:{
  469. method:'POST',
  470. url:AppConfig.url + 'DisposizioniBonifici/:action/:id',
  471. params:{id:'@id', action:'stampaRichiamo'},
  472. cache:false,
  473. hasBody: true,
  474. isArray:false,
  475. responseType: 'arraybuffer',
  476. transformResponse: function (data) {
  477. var pdf;
  478. if (data) {
  479. pdf = new Blob([data], {
  480. type: 'application/pdf'
  481. });
  482. }
  483. return {
  484. response: pdf
  485. };
  486. }
  487. },
  488. MassDelete: {
  489. method:'POST',
  490. url:AppConfig.url + 'DisposizioniBonifici/:action/',
  491. params:{action:'massDelete'},
  492. hasBody: true,
  493. cache:false,
  494. isArray:false,
  495. transformResponse: transformToBoolean
  496. },
  497. LogStati: {
  498. method:'GET',
  499. url:AppConfig.url + 'DisposizioniBonifici/:action/:id',
  500. params:{action:'logStati', id:'@id'},
  501. cache:false,
  502. isArray:true
  503. },
  504. LogVariazioni: {
  505. method:'GET',
  506. url:AppConfig.url + 'DisposizioniBonifici/:action/:id',
  507. params:{action:'logVariazioni', id:'@id'},
  508. cache:false,
  509. isArray:true
  510. },
  511. GeneraRichiamo:{
  512. method:'GET',
  513. url:AppConfig.url + 'DisposizioniBonifici/:action/:idDistinta/:idDisposizione',
  514. params:{action:'generaRichiamo', idDistinta:'@idDistinta', idDisposizione:'@idDisposizione'},
  515. cache: false,
  516. isArray: false,
  517. transformResponse: transformToInteger
  518. }
  519. });
  520. return data;
  521. })
  522. .factory('DelegheSepa', function($resource) {
  523. var data = $resource(AppConfig.url + 'delegheSepa/:action', {}, {
  524. Count: {
  525. method:'POST',
  526. params: {action: 'count'},
  527. isArray:false,
  528. hasBody: true,
  529. cache:false,
  530. transformResponse: transformToInteger
  531. },
  532. List: {
  533. method:'POST',
  534. url:AppConfig.url + 'delegheSepa/:action/:start-:size',
  535. params:{action:'list',start:'@start',size:'@size'},
  536. hasBody: true,
  537. cache:false,
  538. isArray:true
  539. },
  540. Print: {method:'POST', url:AppConfig.url + 'delegheSepa/:action',
  541. params:{action:'print'},
  542. cache:false,
  543. isArray:false,
  544. responseType: 'arraybuffer',
  545. transformResponse: function (data) {
  546. var pdf;
  547. if (data) {
  548. pdf = new Blob([data], {
  549. type: 'application/pdf'
  550. });
  551. }
  552. return {
  553. response: pdf
  554. };
  555. }
  556. },
  557. Export: {method:'POST', url:AppConfig.url + 'delegheSepa/:action',
  558. params:{action:'export'},
  559. cache:false,
  560. isArray:false,
  561. tresponseType: 'arraybuffer',
  562. transformResponse: function (data) {
  563. var pdf;
  564. if (data) {
  565. pdf = new Blob([data], {
  566. type: 'text/csv'
  567. });
  568. }
  569. return {
  570. response: pdf
  571. };
  572. }
  573. },
  574. })
  575. return data;
  576. })
  577. .factory('Banche', function($resource) {
  578. var data = $resource(AppConfig.url + 'abi/:action', {}, {
  579. AutocompleteIstituti: {
  580. method:'GET',
  581. url:AppConfig.url + 'abi/autocomplete/:filter',
  582. params:{filter:'@filter'},
  583. cache:false,
  584. isArray:true
  585. },
  586. GetByAbi: {
  587. method:'GET',
  588. url:AppConfig.url + 'abi/:action/:abi',
  589. params:{action: 'byAbi', abi:'@abi'},
  590. cache:false,
  591. isArray:false
  592. },
  593. FilterFiliali: {
  594. method:'POST',
  595. url:AppConfig.url + 'abi/filiali/',
  596. hasBody: true,
  597. cache:false,
  598. isArray: true
  599. },
  600. SaveBanca: {
  601. method:'POST',
  602. params:{action: 'saveBanca'},
  603. hasBody: true,
  604. cache:false,
  605. transformResponse: transformToString
  606. },
  607. NuovaBanca:{
  608. method:'GET',
  609. params:{action: 'nuovaBanca'},
  610. hasBody: true,
  611. cache:false
  612. },
  613. NuovoSportello:{
  614. method:'GET',
  615. params:{action: 'nuovaFiliale'},
  616. hasBody: true,
  617. cache:false,
  618. isArray: false
  619. },
  620. SaveFiliale: {
  621. method:'POST',
  622. params:{action: 'saveFiliale'},
  623. hasBody: true,
  624. cache:false,
  625. transformResponse: transformToString
  626. },
  627. EliminaFiliale:{
  628. method:'GET',
  629. url:AppConfig.url + 'abi/:action/:id',
  630. params:{action: 'eliminaFiliale', id:'@id'},
  631. cache:false,
  632. transformResponse: transformToString
  633. }
  634. });
  635. return data;
  636. })
  637. .factory('Deleghe', function($resource) {
  638. var data = $resource(AppConfig.url + 'deleghe/:codiceClienteDebitore/:action', {}, {
  639. ListAea: {
  640. method:'POST',
  641. url:AppConfig.url + 'deleghe/:action/:codiceClienteDebitore',
  642. params:{action:'listAea', codiceClienteDebitore: '@codiceClienteDebitore'},
  643. hasBody: true,
  644. cache:false,
  645. isArray:true
  646. },
  647. ListRid: {
  648. method:'POST',
  649. url:AppConfig.url + 'deleghe/:action/:codiceClienteDebitore',
  650. params:{action:'listRid', codiceClienteDebitore: '@codiceClienteDebitore'},
  651. hasBody: true,
  652. cache:false,
  653. isArray:true
  654. }
  655. });
  656. return data;
  657. })
  658. .factory('LogSicuraScheduler', function($resource) {
  659. var data = $resource(AppConfig.url + 'logSicura/:action?inputFile=:inputFile', {}, {
  660. Count: {
  661. method:'POST',
  662. params: {action: 'count', inputFile: '@inputFile'},
  663. isArray:false,
  664. cache:false,
  665. hasBody: true,
  666. transformResponse: transformToInteger
  667. },
  668. List: {
  669. method:'POST',
  670. url:AppConfig.url + 'logSicura/:action/:start-:size?inputFile=:inputFile&orderBy=:orderBy',
  671. params:{action:'list',start:'@start',size:'@size', inputFile: '@inputFile', orderBy: '@orderBy'},
  672. hasBody: true,
  673. cache:false,
  674. isArray:true
  675. },
  676. LogDetail: {
  677. method:'GET',
  678. url:AppConfig.url + 'logSicura/:action/:id',
  679. params:{action:'details',id:'@id'},
  680. hasBody: true,
  681. cache:false,
  682. transformResponse: transformToString
  683. }
  684. });
  685. return data;
  686. })
  687. .factory('PianiEstrazioneDistinte', function($resource) {
  688. var data = $resource(AppConfig.url + 'pianiEstrazione/:action?orderBy=:orderBy', {}, {
  689. List: {
  690. method:'GET',
  691. params:{action:'list',orderBy: '@orderBy'},
  692. hasBody: true,
  693. cache:false,
  694. isArray:true
  695. },
  696. Save: {
  697. method:'POST',
  698. url: AppConfig.url + 'pianiEstrazione',
  699. hasBody: true,
  700. cache:false,
  701. isArray:false,
  702. transformResponse: transformToInteger
  703. },
  704. New: {
  705. method:'GET',
  706. url:AppConfig.url + 'pianiEstrazione/:action',
  707. params:{action:'new'},
  708. cache:false,
  709. isArray: false
  710. },
  711. Delete: {
  712. method:'DELETE',
  713. url:AppConfig.url + 'pianiEstrazione/:id',
  714. params:{id:'@id'},
  715. cache:false,
  716. isArray: false,
  717. transformResponse: transformToInteger
  718. },
  719. Istruzioni: {
  720. method:'GET',
  721. url:AppConfig.url + 'pianiEstrazione/:action/:id',
  722. params:{action:'istruzioni',id:'@id'},
  723. hasBody: true,
  724. cache:false,
  725. isArray: true
  726. },
  727. NewIstruzione: {
  728. method:'GET',
  729. url:AppConfig.url + 'pianiEstrazione/:action/new/:id',
  730. params:{action:'istruzioni',id:'@id'},
  731. hasBody: true,
  732. cache:false,
  733. isArray: false
  734. }
  735. ,
  736. Exec: {
  737. method:'GET',
  738. url:AppConfig.url + 'pianiEstrazione/:action/:id',
  739. params:{action:'exec',id:'@id'},
  740. hasBody: true,
  741. cache:false,
  742. isArray: false,
  743. transformResponse: transformToString
  744. }
  745. });
  746. return data;
  747. })
  748. .factory('FunzioniOrdinanti', function($resource) {
  749. var data = $resource(AppConfig.url + 'funzioniOrdinanti/:action', {}, {
  750. List: {
  751. method:'GET',
  752. params:{action:'list',orderBy: '@orderBy', filter:'@filter'},
  753. cache:false,
  754. isArray:true
  755. },
  756. ListItems: {
  757. method:'GET',
  758. url:AppConfig.url + 'funzioniOrdinanti/:action/:start-:size',
  759. params:{action:'list',orderBy: '@orderBy', filter:'@filter'},
  760. cache:false,
  761. isArray:true
  762. },
  763. Count: {
  764. method:'GET',
  765. params:{action:'count',filter:'@filter'},
  766. cache:false,
  767. isArray:false,
  768. transformResponse: transformToInteger
  769. },
  770. save: {
  771. method:'POST',
  772. cache:false,
  773. isArray:false,
  774. transformResponse: transformToString
  775. },
  776. New: {
  777. method:'GET',
  778. params:{action:'new'},
  779. cache:false,
  780. isArray:false,
  781. },
  782. Delete: {
  783. method:'DELETE',
  784. url: AppConfig.url + 'funzioniOrdinanti/:id',
  785. params:{id:'@id'},
  786. cache:false,
  787. isArray:false,
  788. },
  789. ListForUser: {
  790. method:'GET',
  791. params:{action:'utente',orderBy:'FunzioneOrdinante'},
  792. cache:false,
  793. isArray: true
  794. },
  795. ListAllForUser: {
  796. method:'GET',
  797. params:{action:'all',orderBy:'FunzioneOrdinante'},
  798. cache:false,
  799. isArray: true
  800. }
  801. });
  802. return data;
  803. })
  804. .factory('ProvenienzaDisposizioni', function($resource) {
  805. var data = $resource(AppConfig.url + 'provenienza/:type', {}, {
  806. List: {
  807. method:'GET',
  808. params:{type: '@type'},
  809. cache:false,
  810. isArray:true
  811. },
  812. });
  813. return data;
  814. })
  815. .factory('Conti', function($resource) {
  816. var data = $resource(AppConfig.url + 'conti/:action', {}, {
  817. List: {
  818. method:'POST',
  819. params:{action:'list'},
  820. isBody: true,
  821. cache:false,
  822. isArray:true
  823. }
  824. });
  825. return data;
  826. })
  827. .factory('Remuneration', function($resource) {
  828. var data = $resource(AppConfig.url + 'remuneration/:action', {}, {
  829. HeaderCount: {
  830. method:'GET',
  831. params:{action:'headercount'},
  832. cache:false,
  833. transformResponse: transformToInteger
  834. },
  835. Header: {
  836. method:'GET',
  837. url:AppConfig.url + 'remuneration/:action/:start-:size?orderBy=:orderBy',
  838. params:{action:'header',start:'@start',size:'@size',orderBy: '@orderBy'},
  839. cache:false,
  840. isArray:true
  841. },
  842. ExportMessaggi:{
  843. method:'GET',
  844. url: AppConfig.url + 'remuneration/:action/:idremuneration',
  845. params:{action:'exportMessaggi', idremuneration:'@idremuneration'},
  846. cache:false,
  847. isArray:false,
  848. transformResponse: function (data) {
  849. return {
  850. response: data //new Blob([data], {type: 'text/csv'})
  851. }
  852. }
  853. },
  854. ProvisioningCount:{
  855. method:'GET',
  856. url:AppConfig.url + 'remuneration/:action/:id',
  857. params:{action:'provisioningcount',id:'@id'},
  858. cache:false,
  859. transformResponse: transformToInteger
  860. },
  861. Provisioning:{
  862. method:'GET',
  863. url:AppConfig.url + 'remuneration/:action/:id/:start-:size?orderBy=:orderBy',
  864. params:{action:'provisioning',id:'@id', start:'@start',size:'@size',orderBy: '@orderBy'},
  865. cache:false,
  866. isArray:true
  867. },
  868. DetailCount:{
  869. method:'GET',
  870. url:AppConfig.url + 'remuneration/:action/:id',
  871. params:{action:'detailCount',id:'@id'},
  872. cache:false,
  873. transformResponse: transformToInteger
  874. },
  875. Detail:{
  876. method:'GET',
  877. url:AppConfig.url + 'remuneration/:action/:id/:start-:size?orderBy=:orderBy',
  878. params:{action:'detail',id:'@id', start:'@start',size:'@size',orderBy: '@orderBy'},
  879. cache:false,
  880. isArray:true
  881. },
  882. GeneraRichiestaDettagli:{
  883. method:'GET',
  884. url:AppConfig.url + 'remuneration/:action/:id',
  885. params:{action:'generaRichiestaDettagli', id:'@id'},
  886. isArray:false,
  887. cache:false,
  888. transformResponse: transformToString
  889. },
  890. GeneraRichiestaDettagliTrimestre:{
  891. method:'GET',
  892. url:AppConfig.url + 'remuneration/:action/:id/:idDettaglio',
  893. params:{action:'generaRichiestaDettagli', id:'@id', idDettaglio:'@idDettaglio'},
  894. isArray:false,
  895. cache:false,
  896. transformResponse: transformToString
  897. },
  898. QuadraRemuneration:{
  899. method:'GET',
  900. url:AppConfig.url + 'remuneration/:action/:id',
  901. params:{action:'quadra', id:'@id'},
  902. isArray:false,
  903. cache:false,
  904. transformResponse: transformToString
  905. },
  906. QuadraDetail:{
  907. method:'GET',
  908. url:AppConfig.url + 'remuneration/:action/:id/:idDettaglio',
  909. params:{action:'quadra', id:'@id', idDettaglio:'@idDettaglio'},
  910. isArray:false,
  911. cache:false,
  912. transformResponse: transformToString
  913. },
  914. CodiciSia:{
  915. method:'GET',
  916. url:AppConfig.url + 'remuneration/:action',
  917. params:{action:'codiciSia'},
  918. cache:false,
  919. isArray: true
  920. },
  921. PrintPrevisioning: {method:'POST', url:AppConfig.url + 'remuneration/:action/:id',
  922. params:{action:'print',id:'@id'},
  923. cache:false,
  924. isArray:false,
  925. responseType: 'arraybuffer',
  926. transformResponse: function (data) {
  927. var pdf;
  928. if (data) {
  929. pdf = new Blob([data], {
  930. type: 'application/pdf'
  931. });
  932. }
  933. return {
  934. response: pdf
  935. };
  936. }
  937. },
  938. PrintDetails: {method:'POST', url:AppConfig.url + 'remuneration/:action/:id',
  939. params:{action:'printDetails',id:'@id'},
  940. cache:false,
  941. isArray:false,
  942. responseType: 'arraybuffer',
  943. transformResponse: function (data) {
  944. var pdf;
  945. if (data) {
  946. pdf = new Blob([data], {
  947. type: 'application/pdf'
  948. });
  949. }
  950. return {
  951. response: pdf
  952. };
  953. }
  954. },
  955. });
  956. return data;
  957. })
  958. .factory('DistinteBanca', function($resource) {
  959. var data = $resource(AppConfig.url + 'distinte/:action', {}, {
  960. Count:{
  961. method:'POST',
  962. url:AppConfig.url + 'distinte/:action',
  963. params:{action:'count'},
  964. hasBody: true,
  965. cache:false,
  966. transformResponse: transformToInteger
  967. },
  968. List: {
  969. method:'POST',
  970. url:AppConfig.url + 'distinte/:action/:start-:size?orderBy=:orderBy',
  971. params:{action:'list',start:'@start',size:'@size',orderBy: '@orderBy'},
  972. hasBody: true,
  973. cache:false,
  974. isArray:true
  975. },
  976. FirmaDistinta: {
  977. method:'GET',
  978. url:AppConfig.url + 'distinte/:action/:tipoFirma/:generaFlusso/:idDistintaBanca',
  979. params:{action:'firmaDistinta',tipoFirma:'@tipoFirma',idDistintaBanca:'@idDistintaBanca'},
  980. cache:false,
  981. isArray:false
  982. },
  983. LogStati: {
  984. method:'GET',
  985. url:AppConfig.url + 'distinte/:action/:id',
  986. params:{action:'logStati', id:'@id', generaFlusso:'@generaFlusso', idDistintaBanca:'@idDistintaBanca'},
  987. cache:false,
  988. isArray:true
  989. },
  990. AnnullaDistinta: {
  991. method:'POST',
  992. params:{action:'annulla'},
  993. hasBody: true,
  994. cache:false,
  995. isArray: false
  996. },
  997. ModificaContoDistinta: {
  998. method:'POST',
  999. params:{action:'modificaConto'},
  1000. hasBody: true,
  1001. cache:false,
  1002. isArray: false
  1003. },
  1004. ModificaDataValuta: {
  1005. method:'POST',
  1006. params:{action:'modificaDataValuta'},
  1007. hasBody: true,
  1008. cache:false,
  1009. isArray: false
  1010. },
  1011. ModificaDataEsecuzione: {
  1012. method:'POST',
  1013. params:{action:'modificaDataEsecuzione'},
  1014. hasBody: true,
  1015. cache:false,
  1016. isArray: false
  1017. },
  1018. ValidaEGeneraFlusso: {
  1019. method:'GET',
  1020. url:AppConfig.url + 'distinte/:action/:id',
  1021. params:{action:'validaEGenera', id:'@id'},
  1022. isArray: false,
  1023. cache:false,
  1024. transformResponse: transformToString
  1025. },
  1026. GeneraFlusso: {
  1027. method:'GET',
  1028. url:AppConfig.url + 'distinte/:action/:id',
  1029. params:{action:'genera', id:'@id'},
  1030. isArray: false,
  1031. cache:false,
  1032. transformResponse: transformToString
  1033. },
  1034. EsportaTASC: {
  1035. method:'POST',
  1036. url:AppConfig.url + 'distinte/:action',
  1037. params:{action:'esportaTASC'},
  1038. hasBody: true,
  1039. cache: false,
  1040. transformResponse: function (data) {
  1041. return {
  1042. response: data //new Blob([data], {type: 'text/csv'})
  1043. }
  1044. }
  1045. },
  1046. Print: {method:'POST', url:AppConfig.url + 'distinte/:action',
  1047. params:{action:'print'},
  1048. cache:false,
  1049. isArray:false,
  1050. responseType: 'arraybuffer',
  1051. transformResponse: function (data) {
  1052. var pdf;
  1053. if (data) {
  1054. pdf = new Blob([data], {
  1055. type: 'application/pdf'
  1056. });
  1057. }
  1058. return {
  1059. response: pdf
  1060. };
  1061. }
  1062. },
  1063. ForzaturaInviata: {
  1064. method:'GET',
  1065. url:AppConfig.url + 'distinte/forzaturaInviata/:id',
  1066. params:{id:'@id'},
  1067. hasBody: true,
  1068. cache:false,
  1069. isArray:false,
  1070. transformResponse: transformToInteger
  1071. }
  1072. });
  1073. return data;
  1074. })
  1075. .factory('DistintaFlussiInput', function($resource) {
  1076. var data = $resource(AppConfig.url + 'DistintaFlussiInput/', {}, {
  1077. Count:{
  1078. method:'GET',
  1079. url:AppConfig.url + 'DistintaFlussiInput/:action',
  1080. params:{action:'count'},
  1081. cache:false,
  1082. transformResponse: transformToInteger
  1083. },
  1084. List: {
  1085. method:'GET',
  1086. url:AppConfig.url + 'DistintaFlussiInput/:action/:start-:size?orderBy=:orderBy',
  1087. params:{action:'list',start:'@start',size:'@size',orderBy: '@orderBy'},
  1088. hasBody: true,
  1089. cache:false,
  1090. isArray:true
  1091. },
  1092. Annulla: {
  1093. method: 'GET',
  1094. url:AppConfig.url + 'DistintaFlussiInput/:action/:id',
  1095. params:{action:'annulla', id:'@id'},
  1096. cache:false,
  1097. transformResponse: transformToString
  1098. },
  1099. LogStati: {
  1100. method:'GET',
  1101. url:AppConfig.url + 'DistintaFlussiInput/:action/:id',
  1102. params:{action:'logStati', id:'@id'},
  1103. cache:false,
  1104. isArray:true
  1105. },
  1106. Print: {method:'POST', url:AppConfig.url + 'DistintaFlussiInput/:action',
  1107. params:{action:'print'},
  1108. cache:false,
  1109. isArray:false,
  1110. responseType: 'arraybuffer',
  1111. transformResponse: function (data) {
  1112. var pdf;
  1113. if (data) {
  1114. pdf = new Blob([data], {
  1115. type: 'application/pdf'
  1116. });
  1117. }
  1118. return {
  1119. response: pdf
  1120. };
  1121. }
  1122. }
  1123. });
  1124. return data;
  1125. })
  1126. .factory('LogModifiche', function($resource) {
  1127. var data = $resource(AppConfig.url + 'logModifiche/:idDisposizione', {}, {
  1128. SaveAll: {
  1129. method:'POST',
  1130. url:AppConfig.url + 'logModifiche/:idDisposizione',
  1131. hasBody: true,
  1132. cache:false,
  1133. isArray:true
  1134. }
  1135. });
  1136. return data;
  1137. })
  1138. .factory('DelegatoFirma', function($resource) {
  1139. var data = $resource(AppConfig.url + 'delegato/:action', {}, {
  1140. List: {
  1141. method:'GET',
  1142. params:{action: 'list'},
  1143. hasBody: true,
  1144. cache:false,
  1145. isArray:true
  1146. },
  1147. SetStatus: {
  1148. method:'GET',
  1149. url:AppConfig.url + 'delegato/:action/:id/:status',
  1150. params:{action: 'setStatus', id:'@id', status:'@status'},
  1151. hasBody: true,
  1152. cache:false,
  1153. isArray:true
  1154. }
  1155. });
  1156. return data;
  1157. })
  1158. .factory('PianoEstrazioneTipoFlusso', function($resource) {
  1159. var data = $resource(AppConfig.url + 'tipoFlusso/:action', {}, {
  1160. List: {
  1161. method:'GET',
  1162. url: AppConfig.url + 'tipoFlusso/:action/:id',
  1163. params:{action: 'list', id:'@id'},
  1164. hasBody: true,
  1165. cache:false,
  1166. isArray:true
  1167. },
  1168. New: {
  1169. method:'GET',
  1170. url: AppConfig.url + 'tipoFlusso/:action/:id',
  1171. params:{action: 'new', id:'@id'},
  1172. hasBody: true,
  1173. cache:false,
  1174. isArray:false
  1175. },
  1176. Save: {
  1177. method:'POST',
  1178. url: AppConfig.url + 'tipoFlusso/:action/:idPiano',
  1179. params:{action: 'save', idPiano:'@idPiano'},
  1180. hasBody: true,
  1181. cache:false,
  1182. isArray:false
  1183. }
  1184. ,
  1185. Delete: {
  1186. method:'DELETE',
  1187. url: AppConfig.url + 'tipoFlusso/:action/:idPiano/:id',
  1188. params:{action: 'delete', idPiano:'@idPiano', id:'@id'},
  1189. hasBody: true,
  1190. cache:false,
  1191. isArray:false
  1192. }
  1193. });
  1194. return data;
  1195. })
  1196. .factory('Tipologie', function($resource) {
  1197. var data = $resource(AppConfig.url + 'tipologie/:action', {}, {
  1198. List: {
  1199. method:'GET',
  1200. params:{action:'list'},
  1201. cache:false,
  1202. isArray:true
  1203. },
  1204. Count: {
  1205. method:'GET',
  1206. params:{action:'count',filter:'@filter'},
  1207. cache:false,
  1208. isArray:false,
  1209. transformResponse: transformToInteger
  1210. }
  1211. });
  1212. return data;
  1213. })
  1214. .factory('Firme', function($resource) {
  1215. var data = $resource(AppConfig.url + 'firme/:action', {}, {
  1216. List: {
  1217. method:'GET',
  1218. params:{action:'list'},
  1219. cache:false,
  1220. isArray:true
  1221. },
  1222. Count: {
  1223. method:'GET',
  1224. params:{action:'count',filter:'@filter'},
  1225. cache:false,
  1226. isArray:false,
  1227. transformResponse: transformToInteger
  1228. },
  1229. New: {
  1230. method:'GET',
  1231. params:{action: 'new'},
  1232. hasBody: true,
  1233. cache:false,
  1234. isArray:false
  1235. },
  1236. Delete: {
  1237. method:'DELETE',
  1238. url: AppConfig.url + 'firme/:id',
  1239. params:{id: '@id'},
  1240. hasBody: true,
  1241. cache:false,
  1242. isArray:false
  1243. }
  1244. });
  1245. return data;
  1246. })
  1247. .factory('FlussiNonSeda', function($resource) {
  1248. var data = $resource(AppConfig.url + 'flussiNonSeda/:action', {}, {
  1249. List: {
  1250. method:'GET',
  1251. params:{action:'list'},
  1252. cache:false,
  1253. isArray:true
  1254. },
  1255. Count: {
  1256. method:'GET',
  1257. params:{action:'count',filter:'@filter'},
  1258. cache:false,
  1259. isArray:false,
  1260. transformResponse: transformToInteger
  1261. },
  1262. New: {
  1263. method:'GET',
  1264. params:{action: 'new'},
  1265. hasBody: true,
  1266. cache:false,
  1267. isArray:false
  1268. },
  1269. Delete: {
  1270. method:'DELETE',
  1271. url: AppConfig.url + 'flussiNonSeda/:id',
  1272. params:{id: '@id'},
  1273. hasBody: true,
  1274. cache:false,
  1275. isArray:false
  1276. }
  1277. });
  1278. return data;
  1279. })
  1280. .factory('Ordinanti', function($resource) {
  1281. var data = $resource(AppConfig.url + 'ordinanti/:action', {}, {
  1282. List: {
  1283. url: AppConfig.url + 'ordinanti/:action?filter=:filter',
  1284. method:'GET',
  1285. params:{action:'list'},
  1286. cache:false,
  1287. isArray:true
  1288. },
  1289. Count: {
  1290. url: AppConfig.url + 'ordinanti/:action?filter=:filter',
  1291. method:'GET',
  1292. params:{action:'count'},
  1293. cache:false,
  1294. isArray:false,
  1295. transformResponse: transformToInteger
  1296. },
  1297. New: {
  1298. method:'GET',
  1299. params:{action:'new'},
  1300. cache:false,
  1301. isArray:false,
  1302. },
  1303. Delete: {
  1304. method:'DELETE',
  1305. url: AppConfig.url + 'ordinanti/:id',
  1306. params:{id:'@id'},
  1307. cache:false,
  1308. isArray:false,
  1309. },
  1310. Print: {
  1311. method:'GET',
  1312. params:{action:'print'},
  1313. cache:false,
  1314. isArray:false,
  1315. responseType: 'arraybuffer',
  1316. transformResponse: function (data) {
  1317. var pdf;
  1318. if (data) {
  1319. pdf = new Blob([data], {
  1320. type: 'application/pdf'
  1321. });
  1322. }
  1323. return {
  1324. response: pdf
  1325. };
  1326. }
  1327. }
  1328. });
  1329. return data;
  1330. })
  1331. .factory('Destinatari', function($resource) {
  1332. var data = $resource(AppConfig.url + 'destinatari/:action/:idOrdinante', {}, {
  1333. List: {
  1334. method:'GET',
  1335. url: AppConfig.url + 'destinatari/:action/:idOrdinante/:start-:size?filter=:filter&orderBy=:orderBy',
  1336. params:{action:'list', idOrdinante: '@idOrdinante'},
  1337. cache:false,
  1338. isArray:true
  1339. },
  1340. Count: {
  1341. method:'GET',
  1342. url: AppConfig.url + 'destinatari/:action/:idOrdinante?filter=:filter&orderBy=:orderBy',
  1343. params:{action:'count', idOrdinante: '@idOrdinante'},
  1344. cache:false,
  1345. isArray:false,
  1346. transformResponse: transformToInteger
  1347. },
  1348. New: {
  1349. method:'GET',
  1350. params:{action:'new'},
  1351. cache:false,
  1352. isArray:false
  1353. },
  1354. Delete: {
  1355. method:'DELETE',
  1356. url: AppConfig.url + 'destinatari/:idDestinatario',
  1357. cache:false,
  1358. isArray:false
  1359. },
  1360. CambioOrdinanti:{
  1361. method:'POST',
  1362. url: AppConfig.url + 'destinatari/:action',
  1363. params:{action:'cambioOrdinante'},
  1364. cache:false,
  1365. isArray:false
  1366. },
  1367. Print:{
  1368. method:'GET',
  1369. params:{action:'print'},
  1370. cache:false,
  1371. isArray:false,
  1372. responseType: 'arraybuffer',
  1373. transformResponse: function (data) {
  1374. var pdf;
  1375. if (data) {
  1376. pdf = new Blob([data], {
  1377. type: 'application/pdf'
  1378. });
  1379. }
  1380. return {
  1381. response: pdf
  1382. };
  1383. }
  1384. }
  1385. });
  1386. return data;
  1387. })
  1388. .factory('ContiDestinatario', function($resource) {
  1389. var data = $resource(AppConfig.url + 'contiDestinatario/:action/:idDestinatario', {}, {
  1390. List: {
  1391. method:'GET',
  1392. url: AppConfig.url + 'contiDestinatario/:action/:idDestinatario/:start-:size?orderBy=:orderBy',
  1393. params:{action:'list', idDestinatario: '@idDestinatario',start:'@start',size:'@size',orderBy: '@orderBy'},
  1394. cache:false,
  1395. isArray:true
  1396. },
  1397. Count: {
  1398. method:'GET',
  1399. params:{action:'count', idDestinatario: '@idDestinatario'},
  1400. cache:false,
  1401. isArray:false,
  1402. transformResponse: transformToInteger
  1403. },
  1404. Save: {
  1405. method:'POST',
  1406. url: AppConfig.url + 'contiDestinatario',
  1407. cache:false,
  1408. isArray:false,
  1409. transformResponse: transformToString
  1410. },
  1411. New: {
  1412. method:'GET',
  1413. params:{action:'new'},
  1414. cache:false,
  1415. isArray:false
  1416. },
  1417. Delete: {
  1418. method:'DELETE',
  1419. url: AppConfig.url + 'contiDestinatario/:idConto',
  1420. cache:false,
  1421. isArray:false
  1422. }
  1423. });
  1424. return data;
  1425. })
  1426. .factory('ReportPagamenti', function($resource) {
  1427. var data = $resource(AppConfig.url + 'reportPagamenti/:action', {}, {
  1428. Get: {
  1429. method:'GET',
  1430. url:AppConfig.url + 'reportPagamenti/:id',
  1431. params:{id:'@id'},
  1432. hasBody: true,
  1433. cache:false,
  1434. isArray:false
  1435. },
  1436. List: {
  1437. method:'GET',
  1438. params:{action:'list'},
  1439. cache:false,
  1440. isArray:true
  1441. },
  1442. Count: {
  1443. method:'GET',
  1444. params:{action:'count',filter:'@filter'},
  1445. cache:false,
  1446. isArray:false,
  1447. transformResponse: transformToInteger
  1448. },
  1449. Download: {method:'GET', url:AppConfig.url + 'reportPagamenti/:action/:id',
  1450. params:{action:'downloadFile', id:'@id'},
  1451. cache:false,
  1452. isArray:false,
  1453. responseType: 'arraybuffer',
  1454. transformResponse: function (data) {
  1455. var txt;
  1456. if (data) {
  1457. txt = new Blob([data], {
  1458. type: 'text/plain'
  1459. });
  1460. }
  1461. return {
  1462. response: txt
  1463. };
  1464. }
  1465. }
  1466. });
  1467. return data;
  1468. })
  1469. .factory('AppParam', function($resource){
  1470. var data = $resource(AppConfig.url + 'param', {}, {
  1471. Get: {method:'GET', isArray: false, cache:false},
  1472. Set: {method:'POST', isArray:false, cache:false},
  1473. });
  1474. return data;
  1475. })
  1476. ;