period.js 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. period_parameter = {};
  2. function period_symbol(str) {
  3. if (str.length == 0) {
  4. return '(0)';
  5. }
  6. return str;
  7. }
  8. function period_getQuery(url) {
  9. $.ajax({
  10. type : 'get',
  11. dataType : 'json',
  12. url : url,
  13. contentType : 'application/json; charset=utf-8',
  14. xhrFields : {
  15. 'withCredentials' : true
  16. },
  17. crossDomain : true
  18. }).always(function(json) {
  19. $('#result').html(JSON.stringify(json, null, 4));
  20. });
  21. }
  22. function period_listCountStartTask_init() {
  23. $('#result').html('');
  24. str = '<table border="1" width="100%">';
  25. str += '<tr><td colspan="2"><a href="#" id="applicationStubs">applicationStubs</a>&nbsp;<a href="#" id="companyStubs">companyStubs</a>&nbsp;<a href="#" id="list">list</a></td></tr>';
  26. str += '<tr><td colspan="2"><a href="#" id="byCompany">byCompany</a>&nbsp;<a href="#" id="byDepartment">byDepartment</a>&nbsp;<a href="#" id="byApplication">byApplication</a>&nbsp;<a href="#" id="byProcess">byProcess</a>&nbsp;<a href="#" id="byActivity">byActivity</a></td></tr>';
  27. str += '<tr><td>applicationId:</td><td><input type="text" id="applicationId" style="width:95%"/></td></tr>';
  28. str += '<tr><td>processId:</td><td><input type="text" id="processId" style="width:95%"/></td></tr>';
  29. str += '<tr><td>activityId:</td><td><input type="text" id="activityId" style="width:95%"/></td></tr>';
  30. str += '<tr><td>company:</td><td><input type="text" id="company" style="width:95%"/></td></tr>';
  31. str += '<tr><td>department:</td><td><input type="text" id="department" style="width:95%"/></td></tr>';
  32. str += '<tr><td>person:</td><td><input type="text" id="person" style="width:95%"/></td></tr>';
  33. str += '</table>';
  34. $('#content').html(str);
  35. $('#applicationStubs').click(function() {
  36. period_listStartTaskApplicationStubs();
  37. });
  38. $('#companyStubs').click(function() {
  39. period_listStartTaskCompanyStubs();
  40. });
  41. $('#list').click(
  42. function() {
  43. period_listCountStartTask(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#activityId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()),
  44. period_symbol($('#person').val()));
  45. });
  46. $('#byCompany').click(function() {
  47. period_listCountStartTaskByCompany(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#activityId').val()));
  48. });
  49. $('#byDepartment').click(function() {
  50. period_listCountStartTaskByDepartment(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#activityId').val()), period_symbol($('#company').val()));
  51. });
  52. $('#byApplication').click(function() {
  53. period_listCountStartTaskByApplication(period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  54. });
  55. $('#byProcess').click(function() {
  56. period_listCountStartTaskByProcess(period_symbol($('#applicationId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  57. });
  58. $('#byActivity').click(function() {
  59. period_listCountStartTaskByActivity(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  60. });
  61. }
  62. function period_listStartTaskApplicationStubs() {
  63. $('#result').html('');
  64. var url = '../jaxrs/period/list/start/task/applicationstubs';
  65. period_getQuery(url);
  66. }
  67. function period_listStartTaskCompanyStubs() {
  68. $('#result').html('');
  69. var url = '../jaxrs/period/list/start/task/companystubs';
  70. period_getQuery(url);
  71. }
  72. function period_listCountStartTask(applicationId, processId, activityId, company, department, person) {
  73. $('#result').html('');
  74. var url = '../jaxrs/period/list/count/start/task/application/' + applicationId + '/process/' + processId + '/activity/' + activityId + '/company/' + company + '/department/' + department + '/person/' + person;
  75. period_getQuery(url);
  76. }
  77. function period_listCountStartTaskByCompany(applicationId, processId, activityId) {
  78. $('#result').html('');
  79. var url = '../jaxrs/period/list/count/start/task/application/' + applicationId + '/process/' + processId + '/activity/' + activityId + '/by/company/';
  80. period_getQuery(url);
  81. }
  82. function period_listCountStartTaskByDepartment(applicationId, processId, activityId, company) {
  83. $('#result').html('');
  84. var url = '../jaxrs/period/list/count/start/task/application/' + applicationId + '/process/' + processId + '/activity/' + activityId + '/company/' + company + '/by/department';
  85. period_getQuery(url);
  86. }
  87. function period_listCountStartTaskByApplication(company, department, person) {
  88. $('#result').html('');
  89. var url = '../jaxrs/period/list/count/start/task/company/' + company + '/department/' + department + '/person/' + person + '/by/application';
  90. period_getQuery(url);
  91. }
  92. function period_listCountStartTaskByProcess(applicationId, company, department, person) {
  93. $('#result').html('');
  94. var url = '../jaxrs/period/list/count/start/task/application/' + applicationId + '/company/' + company + '/department/' + department + '/person/' + person + '/by/process';
  95. period_getQuery(url);
  96. }
  97. function period_listCountStartTaskByActivity(applicationId, processId, company, department, person) {
  98. $('#result').html('');
  99. var url = '../jaxrs/period/list/count/start/task/application/' + applicationId + '/process/' + processId + '/company/' + company + '/department/' + department + '/person/' + person + '/by/activity';
  100. period_getQuery(url);
  101. }
  102. function period_listCountCompletedTask_init() {
  103. $('#result').html('');
  104. str = '<table border="1" width="100%">';
  105. str += '<tr><td colspan="2"><a href="#" id="applicationStubs">applicationStubs</a>&nbsp;<a href="#" id="companyStubs">companyStubs</a>&nbsp;<a href="#" id="list">list</a></td></tr>';
  106. str += '<tr><td colspan="2"><a href="#" id="byCompany">byCompany</a>&nbsp;<a href="#" id="byDepartment">byDepartment</a>&nbsp;<a href="#" id="byApplication">byApplication</a>&nbsp;<a href="#" id="byProcess">byProcess</a>&nbsp;<a href="#" id="byActivity">byActivity</a></td></tr>';
  107. str += '<tr><td>applicationId:</td><td><input type="text" id="applicationId" style="width:95%"/></td></tr>';
  108. str += '<tr><td>processId:</td><td><input type="text" id="processId" style="width:95%"/></td></tr>';
  109. str += '<tr><td>activityId:</td><td><input type="text" id="activityId" style="width:95%"/></td></tr>';
  110. str += '<tr><td>company:</td><td><input type="text" id="company" style="width:95%"/></td></tr>';
  111. str += '<tr><td>department:</td><td><input type="text" id="department" style="width:95%"/></td></tr>';
  112. str += '<tr><td>person:</td><td><input type="text" id="person" style="width:95%"/></td></tr>';
  113. str += '</table>';
  114. $('#content').html(str);
  115. $('#applicationStubs').click(function() {
  116. period_listCompletedTaskApplicationStubs();
  117. });
  118. $('#companyStubs').click(function() {
  119. period_listCompletedTaskCompanyStubs();
  120. });
  121. $('#list').click(
  122. function() {
  123. period_listCountCompletedTask(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#activityId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()),
  124. period_symbol($('#person').val()));
  125. });
  126. $('#byCompany').click(function() {
  127. period_listCountCompletedTaskByCompany(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#activityId').val()));
  128. });
  129. $('#byDepartment').click(function() {
  130. period_listCountCompletedTaskByDepartment(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#activityId').val()), period_symbol($('#company').val()));
  131. });
  132. $('#byApplication').click(function() {
  133. period_listCountCompletedTaskByApplication(period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  134. });
  135. $('#byProcess').click(function() {
  136. period_listCountCompletedTaskByProcess(period_symbol($('#applicationId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  137. });
  138. $('#byActivity').click(function() {
  139. period_listCountCompletedTaskByActivity(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  140. });
  141. }
  142. function period_listCompletedTaskApplicationStubs() {
  143. $('#result').html('');
  144. var url = '../jaxrs/period/list/completed/task/applicationstubs';
  145. period_getQuery(url);
  146. }
  147. function period_listCompletedTaskCompanyStubs() {
  148. $('#result').html('');
  149. var url = '../jaxrs/period/list/completed/task/companystubs';
  150. period_getQuery(url);
  151. }
  152. function period_listCountCompletedTask(applicationId, processId, activityId, company, department, person) {
  153. $('#result').html('');
  154. var url = '../jaxrs/period/list/count/completed/task/application/' + applicationId + '/process/' + processId + '/activity/' + activityId + '/company/' + company + '/department/' + department + '/person/' + person;
  155. period_getQuery(url);
  156. }
  157. function period_listCountCompletedTaskByCompany(applicationId, processId, activityId) {
  158. $('#result').html('');
  159. var url = '../jaxrs/period/list/count/completed/task/application/' + applicationId + '/process/' + processId + '/activity/' + activityId + '/by/company/';
  160. period_getQuery(url);
  161. }
  162. function period_listCountCompletedTaskByDepartment(applicationId, processId, activityId, company) {
  163. $('#result').html('');
  164. var url = '../jaxrs/period/list/count/completed/task/application/' + applicationId + '/process/' + processId + '/activity/' + activityId + '/company/' + company + '/by/department';
  165. period_getQuery(url);
  166. }
  167. function period_listCountCompletedTaskByApplication(company, department, person) {
  168. $('#result').html('');
  169. var url = '../jaxrs/period/list/count/completed/task/company/' + company + '/department/' + department + '/person/' + person + '/by/application';
  170. period_getQuery(url);
  171. }
  172. function period_listCountCompletedTaskByProcess(applicationId, company, department, person) {
  173. $('#result').html('');
  174. var url = '../jaxrs/period/list/count/completed/task/application/' + applicationId + '/company/' + company + '/department/' + department + '/person/' + person + '/by/process';
  175. period_getQuery(url);
  176. }
  177. function period_listCountCompletedTaskByActivity(applicationId, processId, company, department, person) {
  178. $('#result').html('');
  179. var url = '../jaxrs/period/list/count/completed/task/application/' + applicationId + '/process/' + processId + '/company/' + company + '/department/' + department + '/person/' + person + '/by/activity';
  180. period_getQuery(url);
  181. }
  182. function period_listCountExpiredTask_init() {
  183. $('#result').html('');
  184. str = '<table border="1" width="100%">';
  185. str += '<tr><td colspan="2"><a href="#" id="applicationStubs">applicationStubs</a>&nbsp;<a href="#" id="companyStubs">companyStubs</a>&nbsp;<a href="#" id="list">list</a></td></tr>';
  186. str += '<tr><td colspan="2"><a href="#" id="byCompany">byCompany</a>&nbsp;<a href="#" id="byDepartment">byDepartment</a>&nbsp;<a href="#" id="byApplication">byApplication</a>&nbsp;<a href="#" id="byProcess">byProcess</a>&nbsp;<a href="#" id="byActivity">byActivity</a></td></tr>';
  187. str += '<tr><td>applicationId:</td><td><input type="text" id="applicationId" style="width:95%"/></td></tr>';
  188. str += '<tr><td>processId:</td><td><input type="text" id="processId" style="width:95%"/></td></tr>';
  189. str += '<tr><td>activityId:</td><td><input type="text" id="activityId" style="width:95%"/></td></tr>';
  190. str += '<tr><td>company:</td><td><input type="text" id="company" style="width:95%"/></td></tr>';
  191. str += '<tr><td>department:</td><td><input type="text" id="department" style="width:95%"/></td></tr>';
  192. str += '<tr><td>person:</td><td><input type="text" id="person" style="width:95%"/></td></tr>';
  193. str += '</table>';
  194. $('#content').html(str);
  195. $('#applicationStubs').click(function() {
  196. period_listExpiredTaskApplicationStubs();
  197. });
  198. $('#companyStubs').click(function() {
  199. period_listExpiredTaskCompanyStubs();
  200. });
  201. $('#list').click(
  202. function() {
  203. period_listCountExpiredTask(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#activityId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()),
  204. period_symbol($('#person').val()));
  205. });
  206. $('#byCompany').click(function() {
  207. period_listCountExpiredTaskByCompany(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#activityId').val()));
  208. });
  209. $('#byDepartment').click(function() {
  210. period_listCountExpiredTaskByDepartment(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#activityId').val()), period_symbol($('#company').val()));
  211. });
  212. $('#byApplication').click(function() {
  213. period_listCountExpiredTaskByApplication(period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  214. });
  215. $('#byProcess').click(function() {
  216. period_listCountExpiredTaskByProcess(period_symbol($('#applicationId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  217. });
  218. $('#byActivity').click(function() {
  219. period_listCountExpiredTaskByActivity(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  220. });
  221. }
  222. function period_listExpiredTaskApplicationStubs() {
  223. $('#result').html('');
  224. var url = '../jaxrs/period/list/expired/task/applicationstubs';
  225. period_getQuery(url);
  226. }
  227. function period_listExpiredTaskCompanyStubs() {
  228. $('#result').html('');
  229. var url = '../jaxrs/period/list/expired/task/companystubs';
  230. period_getQuery(url);
  231. }
  232. function period_listCountExpiredTask(applicationId, processId, activityId, company, department, person) {
  233. $('#result').html('');
  234. var url = '../jaxrs/period/list/count/expired/task/application/' + applicationId + '/process/' + processId + '/activity/' + activityId + '/company/' + company + '/department/' + department + '/person/' + person;
  235. period_getQuery(url);
  236. }
  237. function period_listCountExpiredTaskByCompany(applicationId, processId, activityId) {
  238. $('#result').html('');
  239. var url = '../jaxrs/period/list/count/expired/task/application/' + applicationId + '/process/' + processId + '/activity/' + activityId + '/by/company/';
  240. period_getQuery(url);
  241. }
  242. function period_listCountExpiredTaskByDepartment(applicationId, processId, activityId, company) {
  243. $('#result').html('');
  244. var url = '../jaxrs/period/list/count/expired/task/application/' + applicationId + '/process/' + processId + '/activity/' + activityId + '/company/' + company + '/by/department';
  245. period_getQuery(url);
  246. }
  247. function period_listCountExpiredTaskByApplication(company, department, person) {
  248. $('#result').html('');
  249. var url = '../jaxrs/period/list/count/expired/task/company/' + company + '/department/' + department + '/person/' + person + '/by/application';
  250. period_getQuery(url);
  251. }
  252. function period_listCountExpiredTaskByProcess(applicationId, company, department, person) {
  253. $('#result').html('');
  254. var url = '../jaxrs/period/list/count/expired/task/application/' + applicationId + '/company/' + company + '/department/' + department + '/person/' + person + '/by/process';
  255. period_getQuery(url);
  256. }
  257. function period_listCountExpiredTaskByActivity(applicationId, processId, company, department, person) {
  258. $('#result').html('');
  259. var url = '../jaxrs/period/list/count/expired/task/application/' + applicationId + '/process/' + processId + '/company/' + company + '/department/' + department + '/person/' + person + '/by/activity';
  260. period_getQuery(url);
  261. }
  262. function period_listCountStartWork_init() {
  263. $('#result').html('');
  264. str = '<table border="1" width="100%">';
  265. str += '<tr><td colspan="2"><a href="#" id="applicationStubs">applicationStubs</a>&nbsp;<a href="#" id="companyStubs">companyStubs</a>&nbsp;<a href="#" id="list">list</a></td></tr>';
  266. str += '<tr><td colspan="2"><a href="#" id="byCompany">byCompany</a>&nbsp;<a href="#" id="byDepartment">byDepartment</a>&nbsp;<a href="#" id="byApplication">byApplication</a>&nbsp;<a href="#" id="byProcess">byProcess</a></td></tr>';
  267. str += '<tr><td>applicationId:</td><td><input type="text" id="applicationId" style="width:95%"/></td></tr>';
  268. str += '<tr><td>processId:</td><td><input type="text" id="processId" style="width:95%"/></td></tr>';
  269. str += '<tr><td>company:</td><td><input type="text" id="company" style="width:95%"/></td></tr>';
  270. str += '<tr><td>department:</td><td><input type="text" id="department" style="width:95%"/></td></tr>';
  271. str += '<tr><td>person:</td><td><input type="text" id="person" style="width:95%"/></td></tr>';
  272. str += '</table>';
  273. $('#content').html(str);
  274. $('#applicationStubs').click(function() {
  275. period_listStartWorkApplicationStubs();
  276. });
  277. $('#companyStubs').click(function() {
  278. period_listStartWorkCompanyStubs();
  279. });
  280. $('#list').click(function() {
  281. period_listCountStartWork(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  282. });
  283. $('#byCompany').click(function() {
  284. period_listCountStartWorkByCompany(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()));
  285. });
  286. $('#byDepartment').click(function() {
  287. period_listCountStartWorkByDepartment(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#company').val()));
  288. });
  289. $('#byApplication').click(function() {
  290. period_listCountStartWorkByApplication(period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  291. });
  292. $('#byProcess').click(function() {
  293. period_listCountStartWorkByProcess(period_symbol($('#applicationId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  294. });
  295. }
  296. function period_listStartWorkApplicationStubs() {
  297. $('#result').html('');
  298. var url = '../jaxrs/period/list/start/work/applicationstubs';
  299. period_getQuery(url);
  300. }
  301. function period_listStartWorkCompanyStubs() {
  302. $('#result').html('');
  303. var url = '../jaxrs/period/list/start/work/companystubs';
  304. period_getQuery(url);
  305. }
  306. function period_listCountStartWork(applicationId, processId, company, department, person) {
  307. $('#result').html('');
  308. var url = '../jaxrs/period/list/count/start/work/application/' + applicationId + '/process/' + processId + '/company/' + company + '/department/' + department + '/person/' + person;
  309. period_getQuery(url);
  310. }
  311. function period_listCountStartWorkByCompany(applicationId, processId) {
  312. $('#result').html('');
  313. var url = '../jaxrs/period/list/count/start/work/application/' + applicationId + '/process/' + processId + '/by/company/';
  314. period_getQuery(url);
  315. }
  316. function period_listCountStartWorkByDepartment(applicationId, processId, company) {
  317. $('#result').html('');
  318. var url = '../jaxrs/period/list/count/start/work/application/' + applicationId + '/process/' + processId + '/company/' + company + '/by/department';
  319. period_getQuery(url);
  320. }
  321. function period_listCountStartWorkByApplication(company, department, person) {
  322. $('#result').html('');
  323. var url = '../jaxrs/period/list/count/start/work/company/' + company + '/department/' + department + '/person/' + person + '/by/application';
  324. period_getQuery(url);
  325. }
  326. function period_listCountStartWorkByProcess(applicationId, company, department, person) {
  327. $('#result').html('');
  328. var url = '../jaxrs/period/list/count/start/work/application/' + applicationId + '/company/' + company + '/department/' + department + '/person/' + person + '/by/process';
  329. period_getQuery(url);
  330. }
  331. function period_listCountCompletedWork_init() {
  332. $('#result').html('');
  333. str = '<table border="1" width="100%">';
  334. str += '<tr><td colspan="2"><a href="#" id="applicationStubs">applicationStubs</a>&nbsp;<a href="#" id="companyStubs">companyStubs</a>&nbsp;<a href="#" id="list">list</a></td></tr>';
  335. str += '<tr><td colspan="2"><a href="#" id="byCompany">byCompany</a>&nbsp;<a href="#" id="byDepartment">byDepartment</a>&nbsp;<a href="#" id="byApplication">byApplication</a>&nbsp;<a href="#" id="byProcess">byProcess</a></td></tr>';
  336. str += '<tr><td>applicationId:</td><td><input type="text" id="applicationId" style="width:95%"/></td></tr>';
  337. str += '<tr><td>processId:</td><td><input type="text" id="processId" style="width:95%"/></td></tr>';
  338. str += '<tr><td>company:</td><td><input type="text" id="company" style="width:95%"/></td></tr>';
  339. str += '<tr><td>department:</td><td><input type="text" id="department" style="width:95%"/></td></tr>';
  340. str += '<tr><td>person:</td><td><input type="text" id="person" style="width:95%"/></td></tr>';
  341. str += '</table>';
  342. $('#content').html(str);
  343. $('#applicationStubs').click(function() {
  344. period_listCompletedWorkApplicationStubs();
  345. });
  346. $('#companyStubs').click(function() {
  347. period_listCompletedWorkCompanyStubs();
  348. });
  349. $('#list').click(function() {
  350. period_listCountCompletedWork(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  351. });
  352. $('#byCompany').click(function() {
  353. period_listCountCompletedWorkByCompany(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()));
  354. });
  355. $('#byDepartment').click(function() {
  356. period_listCountCompletedWorkByDepartment(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#company').val()));
  357. });
  358. $('#byApplication').click(function() {
  359. period_listCountCompletedWorkByApplication(period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  360. });
  361. $('#byProcess').click(function() {
  362. period_listCountCompletedWorkByProcess(period_symbol($('#applicationId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  363. });
  364. }
  365. function period_listCompletedWorkApplicationStubs() {
  366. $('#result').html('');
  367. var url = '../jaxrs/period/list/completed/work/applicationstubs';
  368. period_getQuery(url);
  369. }
  370. function period_listCompletedWorkCompanyStubs() {
  371. $('#result').html('');
  372. var url = '../jaxrs/period/list/completed/work/companystubs';
  373. period_getQuery(url);
  374. }
  375. function period_listCountCompletedWork(applicationId, processId, company, department, person) {
  376. $('#result').html('');
  377. var url = '../jaxrs/period/list/count/completed/work/application/' + applicationId + '/process/' + processId + '/company/' + company + '/department/' + department + '/person/' + person;
  378. period_getQuery(url);
  379. }
  380. function period_listCountCompletedWorkByCompany(applicationId, processId) {
  381. $('#result').html('');
  382. var url = '../jaxrs/period/list/count/completed/work/application/' + applicationId + '/process/' + processId + '/by/company/';
  383. period_getQuery(url);
  384. }
  385. function period_listCountCompletedWorkByDepartment(applicationId, processId, company) {
  386. $('#result').html('');
  387. var url = '../jaxrs/period/list/count/completed/work/application/' + applicationId + '/process/' + processId + '/company/' + company + '/by/department';
  388. period_getQuery(url);
  389. }
  390. function period_listCountCompletedWorkByApplication(company, department, person) {
  391. $('#result').html('');
  392. var url = '../jaxrs/period/list/count/completed/work/company/' + company + '/department/' + department + '/person/' + person + '/by/application';
  393. period_getQuery(url);
  394. }
  395. function period_listCountCompletedWorkByProcess(applicationId, company, department, person) {
  396. $('#result').html('');
  397. var url = '../jaxrs/period/list/count/completed/work/application/' + applicationId + '/company/' + company + '/department/' + department + '/person/' + person + '/by/process';
  398. period_getQuery(url);
  399. }
  400. function period_listCountExpiredWork_init() {
  401. $('#result').html('');
  402. str = '<table border="1" width="100%">';
  403. str += '<tr><td colspan="2"><a href="#" id="applicationStubs">applicationStubs</a>&nbsp;<a href="#" id="companyStubs">companyStubs</a>&nbsp;<a href="#" id="list">list</a></td></tr>';
  404. str += '<tr><td colspan="2"><a href="#" id="byCompany">byCompany</a>&nbsp;<a href="#" id="byDepartment">byDepartment</a>&nbsp;<a href="#" id="byApplication">byApplication</a>&nbsp;<a href="#" id="byProcess">byProcess</a></td></tr>';
  405. str += '<tr><td>applicationId:</td><td><input type="text" id="applicationId" style="width:95%"/></td></tr>';
  406. str += '<tr><td>processId:</td><td><input type="text" id="processId" style="width:95%"/></td></tr>';
  407. str += '<tr><td>company:</td><td><input type="text" id="company" style="width:95%"/></td></tr>';
  408. str += '<tr><td>department:</td><td><input type="text" id="department" style="width:95%"/></td></tr>';
  409. str += '<tr><td>person:</td><td><input type="text" id="person" style="width:95%"/></td></tr>';
  410. str += '</table>';
  411. $('#content').html(str);
  412. $('#applicationStubs').click(function() {
  413. period_listExpiredWorkApplicationStubs();
  414. });
  415. $('#companyStubs').click(function() {
  416. period_listExpiredWorkCompanyStubs();
  417. });
  418. $('#list').click(function() {
  419. period_listCountExpiredWork(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  420. });
  421. $('#byCompany').click(function() {
  422. period_listCountExpiredWorkByCompany(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()));
  423. });
  424. $('#byDepartment').click(function() {
  425. period_listCountExpiredWorkByDepartment(period_symbol($('#applicationId').val()), period_symbol($('#processId').val()), period_symbol($('#company').val()));
  426. });
  427. $('#byApplication').click(function() {
  428. period_listCountExpiredWorkByApplication(period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  429. });
  430. $('#byProcess').click(function() {
  431. period_listCountExpiredWorkByProcess(period_symbol($('#applicationId').val()), period_symbol($('#company').val()), period_symbol($('#department').val()), period_symbol($('#person').val()));
  432. });
  433. }
  434. function period_listExpiredWorkApplicationStubs() {
  435. $('#result').html('');
  436. var url = '../jaxrs/period/list/expired/work/applicationstubs';
  437. period_getQuery(url);
  438. }
  439. function period_listExpiredWorkCompanyStubs() {
  440. $('#result').html('');
  441. var url = '../jaxrs/period/list/expired/work/companystubs';
  442. period_getQuery(url);
  443. }
  444. function period_listCountExpiredWork(applicationId, processId, company, department, person) {
  445. $('#result').html('');
  446. var url = '../jaxrs/period/list/count/expired/work/application/' + applicationId + '/process/' + processId + '/company/' + company + '/department/' + department + '/person/' + person;
  447. period_getQuery(url);
  448. }
  449. function period_listCountExpiredWorkByCompany(applicationId, processId) {
  450. $('#result').html('');
  451. var url = '../jaxrs/period/list/count/expired/work/application/' + applicationId + '/process/' + processId + '/by/company/';
  452. period_getQuery(url);
  453. }
  454. function period_listCountExpiredWorkByDepartment(applicationId, processId, company) {
  455. $('#result').html('');
  456. var url = '../jaxrs/period/list/count/expired/work/application/' + applicationId + '/process/' + processId + '/company/' + company + '/by/department';
  457. period_getQuery(url);
  458. }
  459. function period_listCountExpiredWorkByApplication(company, department, person) {
  460. $('#result').html('');
  461. var url = '../jaxrs/period/list/count/expired/work/company/' + company + '/department/' + department + '/person/' + person + '/by/application';
  462. period_getQuery(url);
  463. }
  464. function period_listCountExpiredWorkByProcess(applicationId, company, department, person) {
  465. $('#result').html('');
  466. var url = '../jaxrs/period/list/count/expired/work/application/' + applicationId + '/company/' + company + '/department/' + department + '/person/' + person + '/by/process';
  467. period_getQuery(url);
  468. }