SSSTC00600_통합배치작업.xrw 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. <?xml version="1.0" encoding="EUC-KR"?>
  2. <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
  3. <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
  4. <xhtml:head>
  5. <xhtml:title>통합 배치작업</xhtml:title>
  6. <model id="model1">
  7. <instance id="instance1">
  8. <root xmlns="">
  9. <main>
  10. <bizabbr/>
  11. <selectcond/>
  12. <list>
  13. <batlog>
  14. <prgmnm/>
  15. <prcsstat/>
  16. <fromdt/>
  17. <enddt/>
  18. <execrid/>
  19. <execnode/>
  20. <prcscnt/>
  21. <sucscnt/>
  22. <failcnt/>
  23. <modulenm/>
  24. <prgmid/>
  25. <paramcnts/>
  26. <prgmexecno/>
  27. </batlog>
  28. </list>
  29. <loginfo>
  30. <prgmnm/>
  31. <modulenm/>
  32. <prgmid/>
  33. <fromdt/>
  34. <enddt/>
  35. <prcsstat/>
  36. <prcscnt/>
  37. <sucscnt/>
  38. <failcnt/>
  39. <paramcnts/>
  40. <prgmexecno/>
  41. <curresultfile/>
  42. <logmsg/>
  43. <resultfile>
  44. <filepath/>
  45. </resultfile>
  46. <lines/>
  47. <pages>
  48. <label/>
  49. <value/>
  50. </pages>
  51. <currentpage/>
  52. </loginfo>
  53. </main>
  54. <send>
  55. <execrid/>
  56. <prgmnm/>
  57. <fromdt/>
  58. <offset/>
  59. <pagesize/>
  60. <prgmexecno/>
  61. <modulenm/>
  62. <prgmid/>
  63. <prgmuid/>
  64. </send>
  65. <batchsend>
  66. <prgmuid/>
  67. </batchsend>
  68. <init>
  69. <prgmlist>
  70. <prgmitem>
  71. <label>전체</label>
  72. <value></value>
  73. </prgmitem>
  74. <prgmitem>
  75. <label>테스트1</label>
  76. <value>test1</value>
  77. </prgmitem>
  78. <prgmitem>
  79. <label>테스트2</label>
  80. <value>test2</value>
  81. </prgmitem>
  82. <prgmitem>
  83. <label>재원환자 조회</label>
  84. <value>inpatlist</value>
  85. </prgmitem>
  86. </prgmlist>
  87. <statuslist>
  88. <status>
  89. <label>실행중</label>
  90. <value>S</value>
  91. </status>
  92. <status>
  93. <label>정상종료</label>
  94. <value>E</value>
  95. </status>
  96. <status>
  97. <label>에러발생</label>
  98. <value>F</value>
  99. </status>
  100. </statuslist>
  101. </init>
  102. <hidden>
  103. <list>
  104. <batprgm>
  105. <rowno/>
  106. <bizabbr/>
  107. <modulenm/>
  108. <prgmid/>
  109. <prgmnm/>
  110. <useyn/>
  111. <fstrgstrid/>
  112. <fstrgstdt/>
  113. <lastupdtrid/>
  114. <lastupdtdt/>
  115. <status/>
  116. </batprgm>
  117. </list>
  118. </hidden>
  119. </root>
  120. </instance>
  121. <script type="javascript" ev:event="xforms-ready">
  122. <![CDATA[
  123. fInitialize();
  124. model.refresh();
  125. ]]>
  126. </script>
  127. <script type="javascript" ev:event="xforms-model-construct-done">
  128. <![CDATA[
  129. // submit("TRZSB00201");
  130. // model.refresh();
  131. ]]>
  132. </script>
  133. <submission id="TXSTC00100" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/batchsend"/>
  134. <submission id="TRZSB00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/temp" resultref="/root/init/prgmlist"/>
  135. <submission id="TRZSB00202" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
  136. <submission id="TRZSB00203" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/loginfo"/>
  137. <submission id="TRZSB00204" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/loginfo/logmsg"/>
  138. <submission id="TRSTC00500" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/list"/>
  139. <bind id="prcsstat" ref="/root/main/list/batlog/prcsstat" readonly="true()"/>
  140. </model>
  141. <script type="javascript" src="../../../com/commonweb/js/common.js"/>
  142. <script type="javascript" src="../../../com/commonweb/js/dateHelper.js"/>
  143. <script type="javascript">
  144. <![CDATA[
  145. // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
  146. function fInitialize() {
  147. model.removeNodeset("/root/main/list");
  148. model.resetInstanceNode("/root/main/loginfo");
  149. model.removeNodeset("/root/main/logdetail");
  150. model.resetInstanceNode("/root/send");
  151. model.makeValue("/root/send/pagesize","100");
  152. model.setValue("/root/send/execrid",getUserId());
  153. model.setValue("/root/send/fromdt",getCurrentDate());
  154. btn_reload.disabled = true;
  155. }
  156. // 배치 로그 상세 정보를 조회하여 화면 하단 항목으로 보여준다.
  157. function fGetLogInfo() {
  158. if (submit("TRZSB00203")) {
  159. model.makeValue("/root/main/loginfo/curresultfile",model.getValue("/root/main/loginfo/resultfile/filepath"));
  160. var lines = model.getValue("/root/main/loginfo/lines");
  161. var pagesize = model.getValue("/root/send/pagesize");
  162. // page combo 설정
  163. var pages = Math.floor((lines/pagesize)+1);
  164. if (lines%pagesize == 0) {
  165. pages = pages -1;
  166. }
  167. for(var i=0;i<pages;i++) {
  168. model.makeNode("/root/main/loginfo/pages["+(i+1)+"]");
  169. model.makeValue("/root/main/loginfo/pages["+(i+1)+"]/label",(i+1)+"/"+pages);
  170. model.makeValue("/root/main/loginfo/pages["+(i+1)+"]/value",i+1);
  171. }
  172. model.makeValue("/root/main/loginfo/currentpage",1);
  173. model.makeValue("/root/send/offset",0);
  174. }
  175. }
  176. // 배치 로그 메시지의 페이지 단위 조회를 수행한다.
  177. function fGetLogMessage() {
  178. var pagesize = model.getValue("/root/send/pagesize");
  179. var curpage = model.getValue("/root/main/loginfo/currentpage");
  180. model.makeValue("/root/send/offset",(curpage-1)*pagesize);
  181. submit("TRZSB00204");
  182. }
  183. ]]>
  184. </script>
  185. </xhtml:head>
  186. <xhtml:body guideline="1,1242;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
  187. <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
  188. <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">통합 배치작업</caption>
  189. </group>
  190. <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
  191. <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
  192. <button id="btn_init" class="btn4_letter3" style="left:1126px; top:3px; width:68px; height:22px; ">
  193. <caption>초기화</caption>
  194. <script type="javascript" ev:event="DOMActivate">
  195. <![CDATA[
  196. fInitialize();
  197. model.refresh();
  198. ]]>
  199. </script>
  200. </button>
  201. </group>
  202. <group id="group5" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
  203. <line id="line15" class="line_2" style="x1:0px; y1:715px; x2:615px; y2:716px; "/>
  204. <line id="line16" class="line_2" style="x1:0px; y1:625px; x2:615px; y2:625px; "/>
  205. <line id="line17" class="line_2" style="x1:0px; y1:601px; x2:615px; y2:600px; "/>
  206. <group id="group6" style="left:0px; top:10px; width:1194px; height:35px; vertical-align:top; ">
  207. <shape id="roundrect3" class="roundrect_search" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
  208. <caption id="caption21" class="search_name" style="left:16px; top:8px; width:125px; height:17px; ">실행자 ID :</caption>
  209. <line id="line18" class="line_4" style="x1:1041px; y1:7px; x2:1041px; y2:29px; border-left-style:solid; "/>
  210. <caption id="caption59" class="search_name" style="left:255px; top:8px; width:100px; height:17px; ">프로그램명 :</caption>
  211. <button id="btn_select" class="btn1_letter2" style="left:1127px; top:7px; width:56px; height:22px; ">
  212. <caption>조회</caption>
  213. <script type="javascript" ev:event="DOMActivate">
  214. <![CDATA[
  215. var prgmuid = model.getValue("/root/send/prgmuid");
  216. if (prgmuid == "") {
  217. model.makeValue("/root/send/modulenm","");
  218. model.makeValue("/root/send/prgmid","");
  219. } else {
  220. var uidsplit = prgmuid.split(".");
  221. model.makeValue("/root/send/modulenm",uidsplit[0]);
  222. model.makeValue("/root/send/prgmid",uidsplit[1]);
  223. }
  224. submit("TRSTC00500");
  225. // submit("TRZSB00202");
  226. ]]>
  227. </script>
  228. </button>
  229. <input id="ipt_execrid" ref="/root/send/execrid" class="input_search" style="left:110px; top:8px; width:115px; height:19px; "/>
  230. <caption id="caption10" class="search_name" style="left:680px; top:8px; width:100px; height:17px; ">시작일자 :</caption>
  231. <input id="input1" ref="/root/send/fromdt" class="input_search" inputtype="date" style="left:770px; top:8px; width:140px; height:19px; "/>
  232. <select1 id="cmb_batprgm" ref="/root/send/prgmuid" class="combo_search" appearance="minimal" style="left:360px; top:8px; width:300px; height:19px; ">
  233. <choices>
  234. <itemset nodeset="/root/init/prgmlist/prgmitem">
  235. <label ref="label"/>
  236. <value ref="value"/>
  237. </itemset>
  238. </choices>
  239. </select1>
  240. <button id="button1" class="btn1_letter2" style="left:1060px; top:7px; width:56px; height:22px; ">
  241. <caption>실행</caption>
  242. <script type="javascript" ev:event="DOMActivate">
  243. <![CDATA[
  244. model.setValue("/root/batchsend/prgmuid",model.getValue("/root/send/prgmuid"));
  245. var rtn = messageBox("배치작업을 ", "Q004");
  246. if ( rtn == 6 )
  247. submit("TXSTC00100");
  248. ]]>
  249. </script>
  250. </button>
  251. </group>
  252. <caption id="caption22" class="tit_2" style="left:5px; top:559px; width:136px; height:13px; ">배치 로그 상세 정보</caption>
  253. <line id="line19" class="line_1" style="x1:0px; y1:574px; x2:1194px; y2:574px; "/>
  254. <caption id="caption34" class="cell_1" style="left:0px; top:603px; width:80px; height:23px; vertical-align:middle; ">모듈명</caption>
  255. <caption id="caption42" class="cell_1" style="left:0px; top:579px; width:80px; height:23px; vertical-align:middle; ">프로그램 명</caption>
  256. <caption id="caption47" class="cell_1" style="left:0px; top:677px; width:80px; height:38px; vertical-align:middle; ">매개변수</caption>
  257. <caption id="caption48" class="tit_2" style="left:5px; top:55px; width:131px; height:14px; ">배치 로그 목록</caption>
  258. <line id="line20" class="line_1" style="x1:0px; y1:70px; x2:1194px; y2:70px; "/>
  259. <line id="line23" class="line_2" style="x1:856px; y1:221px; x2:1194px; y2:221px; "/>
  260. <line id="line24" class="line_3" style="x1:0px; y1:740px; x2:1194px; y2:740px; "/>
  261. <caption id="caption35" class="cell_1" style="left:288px; top:603px; width:100px; height:23px; vertical-align:middle; ">프로그램 ID</caption>
  262. <datagrid id="grd_batlog" nodeset="/root/main/list/batlog" visibility="visible" caption="프로그램명^실행상태^시작시간^종료시간^실행자^노드명^처리건수^정상건수^오류건수^모듈명^프로그램ID^파라메터^배치실행번호" colsep="^" colwidth="239, 60, 127, 126, 76, 80, 80, 80, 80, 100, 100, 100, 100" dataheight="23" datatype="xml" defaultrows="0" explorerbar="sortshow" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="update" rowheight="23" rowsep="|" style="left:0px; top:75px; width:1194px; height:475px; ">
  263. <col ref="prgmnm"/>
  264. <col ref="prcsstat" type="combo">
  265. <choices>
  266. <itemset nodeset="/root/init/statuslist/status">
  267. <label ref="label"/>
  268. <value ref="value"/>
  269. </itemset>
  270. </choices>
  271. </col>
  272. <col ref="fromdt" format="yyyy-mm-dd hh:nn:ss"/>
  273. <col ref="enddt" format="yyyy-mm-dd hh:nn:ss" style="left:446px; top:23px; width:126px; height:23px; "/>
  274. <col ref="execrid" style="text-align:right; "/>
  275. <col ref="execnode" style="text-align:right; "/>
  276. <col ref="prcscnt" style="text-align:right; "/>
  277. <col ref="sucscnt" style="text-align:right; "/>
  278. <col ref="failcnt" style="text-align:right; "/>
  279. <col ref="modulenm"/>
  280. <col ref="prgmid"/>
  281. <col ref="paramcnts" visibility="hidden"/>
  282. <col ref="prgmexecno" visibility="hidden"/>
  283. <script type="javascript" ev:event="ondblclick">
  284. <![CDATA[
  285. var curRow = grd_batlog.row;
  286. if ( curRow > 0 ) {
  287. // 상제 정보 조회
  288. model.makeValue("/root/send/prgmexecno",model.getValue("/root/main/list/batlog["+curRow+"]/prgmexecno"));
  289. fGetLogInfo();
  290. btn_reload.disabled = false;
  291. model.refresh();
  292. }
  293. ]]>
  294. </script>
  295. </datagrid>
  296. <textarea id="tar_exeparamcnts" ref="/root/main/loginfo/paramcnts" style="left:83px; top:678px; width:529px; height:36px; "/>
  297. <caption id="caption1" class="cell_1" style="left:0px; top:627px; width:80px; height:23px; vertical-align:middle; ">시작시간</caption>
  298. <caption id="caption2" class="cell_1" style="left:205px; top:627px; width:80px; height:23px; vertical-align:middle; ">종료시간</caption>
  299. <caption id="caption3" class="cell_1" style="left:0px; top:652px; width:80px; height:23px; vertical-align:middle; ">총 처리건수</caption>
  300. <caption id="caption4" class="cell_1" style="left:205px; top:652px; width:80px; height:23px; vertical-align:middle; ">정상건수</caption>
  301. <caption id="caption5" class="cell_1" style="left:410px; top:652px; width:80px; height:23px; vertical-align:middle; ">오류건수</caption>
  302. <caption id="caption7" class="cell_1" style="left:410px; top:627px; width:80px; height:23px; vertical-align:middle; ">완료여부</caption>
  303. <caption id="caption8" class="cell_1" style="left:616px; top:579px; width:74px; height:161px; vertical-align:middle; ">로그 메시지</caption>
  304. <textarea id="textarea1" ref="/root/main/loginfo/logmsg" scroll="vertical" style="left:692px; top:580px; width:501px; height:136px; word-wrap:letter; "/>
  305. <caption id="caption9" class="cell_1" style="left:0px; top:717px; width:80px; height:23px; vertical-align:middle; ">결과 파일</caption>
  306. <line id="line1" class="line_2" style="x1:0px; y1:650px; x2:615px; y2:650px; "/>
  307. <line id="line2" class="line_2" style="x1:0px; y1:675px; x2:615px; y2:675px; "/>
  308. <button id="btn_download" class="btn2_letter4" style="left:549px; top:719px; width:64px; height:19px; ">
  309. <caption>내려받기</caption>
  310. <script type="javascript" ev:event="DOMActivate">
  311. <![CDATA[
  312. var filepath = model.getValue("/root/main/loginfo/curresultfile");
  313. if (filepath != "") {
  314. var filenm = filepath.split(/\/|\\/); // / 또는 \ 로 split 하여 마지막 항목을 default 파일 명으로 사용한다.
  315. var len = filenm.length;
  316. filenm = filenm[len-1];
  317. var localfile = window.fileDialog("save","|",false,filenm,"","All Files(*.*)|*.*");
  318. if (localfile != "") {
  319. model.download(getActionURL("TRZSB00205")+"&filepath="+filepath,localfile);
  320. var rtn = messageBox("파일을", "Q004");
  321. if( rtn == 6 ) {
  322. window.exec(localfile);
  323. }
  324. }
  325. }
  326. ]]>
  327. </script>
  328. </button>
  329. <output id="opt_prgmnm" ref="/root/main/loginfo/prgmnm" class="output_fix" appearance="input" style="left:82px; top:580px; width:530px; height:19px; "/>
  330. <output id="opt_modulenm" ref="/root/main/loginfo/modulenm" class="output_fix" appearance="input" style="left:82px; top:604px; width:203px; height:19px; "/>
  331. <output id="opt_prgmid" ref="/root/main/loginfo/prgmid" class="output_fix" appearance="input" style="left:390px; top:604px; width:222px; height:19px; "/>
  332. <output id="opt_fromdt" ref="/root/main/loginfo/fromdt" class="output_fix" format="yyyy-mm-dd hh:nn:ss" appearance="input" style="left:82px; top:629px; width:120px; height:19px; "/>
  333. <output id="opt_enddt" ref="/root/main/loginfo/enddt" class="output_fix" format="yyyy-mm-dd hh:nn:ss" appearance="input" style="left:287px; top:629px; width:120px; height:19px; "/>
  334. <output id="opt_prcscnt" ref="/root/main/loginfo/prcscnt" class="output_fix" appearance="input" style="left:82px; top:654px; width:120px; height:19px; "/>
  335. <output id="opt_sucscnt" ref="/root/main/loginfo/sucscnt" class="output_fix" appearance="input" style="left:287px; top:654px; width:120px; height:19px; "/>
  336. <output id="opt_failcnt" ref="/root/main/loginfo/failcnt" class="output_fix" appearance="input" style="left:492px; top:654px; width:120px; height:19px; "/>
  337. <select1 id="cmb_resultfile" ref="/root/main/loginfo/curresultfile" class="combo_search" appearance="minimal" style="left:83px; top:719px; width:462px; height:19px; ">
  338. <choices>
  339. <itemset nodeset="/root/main/loginfo/resultfile">
  340. <label ref="filepath"/>
  341. <value ref="filepath"/>
  342. </itemset>
  343. </choices>
  344. </select1>
  345. <button id="btn_reload" class="btn2_letter4" style="left:1126px; top:554px; width:64px; height:19px; ">
  346. <caption>새로고침</caption>
  347. <script type="javascript" ev:event="DOMActivate">
  348. <![CDATA[
  349. fGetLogInfo();
  350. model.refresh();
  351. ]]>
  352. </script>
  353. </button>
  354. <caption id="caption11" style="left:695px; top:720px; width:65px; height:20px; ">총 라인수 :</caption>
  355. <caption id="cap_lines" ref="/root/main/loginfo/lines" style="left:760px; top:719px; width:100px; height:20px; "/>
  356. <select1 id="cmb_page" ref="/root/main/loginfo/currentpage" appearance="minimal" style="left:1060px; top:719px; width:100px; height:19px; ">
  357. <choices>
  358. <itemset nodeset="/root/main/loginfo/pages">
  359. <label ref="label"/>
  360. <value ref="value"/>
  361. </itemset>
  362. </choices>
  363. <script type="javascript" ev:event="xforms-value-changed">
  364. <![CDATA[
  365. fGetLogMessage();
  366. ]]>
  367. </script>
  368. </select1>
  369. <button id="btn_next" class="icon_right" style="left:1164px; top:719px; width:26px; height:19px; ">
  370. <caption/>
  371. <script type="javascript" ev:event="DOMActivate">
  372. <![CDATA[
  373. var pages = cmb_page.length;
  374. //alert(pages);
  375. //alert(cmb_page.value);
  376. if (cmb_page.value< pages) {
  377. model.makeValue("/root/main/loginfo/currentpage",1+parseInt(cmb_page.value));
  378. fGetLogMessage();
  379. cmb_page.refresh();
  380. }
  381. ]]>
  382. </script>
  383. </button>
  384. <button id="btn_prev" class="icon_left" style="left:1030px; top:719px; width:26px; height:19px; ">
  385. <caption/>
  386. <script type="javascript" ev:event="DOMActivate">
  387. <![CDATA[
  388. var pages = cmb_page.length;
  389. //alert(pages);
  390. //alert(cmb_page.value);
  391. if (cmb_page.value > 1) {
  392. model.makeValue("/root/main/loginfo/currentpage",parseInt(cmb_page.value)-1);
  393. fGetLogMessage();
  394. cmb_page.refresh();
  395. }
  396. ]]>
  397. </script>
  398. </button>
  399. <select1 id="cmb_prcsstat" ref="/root/main/loginfo/prcsstat" disabled="true" appearance="minimal" style="left:492px; top:629px; width:120px; height:19px; ">
  400. <choices>
  401. <itemset nodeset="/root/init/statuslist/status">
  402. <label ref="label"/>
  403. <value ref="value"/>
  404. </itemset>
  405. </choices>
  406. </select1>
  407. </group>
  408. </xhtml:body>
  409. </xhtml:html>