SMMNR018.js 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911
  1. /*
  2. 진술문장 관리(SMMNR01800.xfm - JScript )
  3. - Version :
  4. 1) : Ver.1.00.01
  5. */
  6. var sAttrNM = "";
  7. var xTermInfoPath = "/root/main/termanaly/terminfo"; // 용어분석 정보
  8. var xStmtInfoPath = "/root/main/stmtmngt/stmtinfo"; // 진술문 정보
  9. var xGrupInfoPath = "/root/main/stmtmngt/grupinfolist"; // 진술문 분류체계 사용내역
  10. var xBKStmtInfoPath = "/root/hidden/stmtmngt/stmtinfo"; // 진술문 백업 정보
  11. var xAttrListPath = "/root/main/attrinfo/attrlist"; // 속성 정보
  12. var xStmtListPath = "/root/main/stmtlist/stmtinfo"; // 진술문 리스트 정보
  13. /**
  14. * @group :
  15. * @ver : 2007.03.02
  16. * @by : 이은영
  17. * @---------------------------------------------------
  18. * @type : function
  19. * @access : public
  20. * @desc : 화면 초기화
  21. * @param :
  22. * @return :
  23. * @---------------------------------------------------
  24. */
  25. function fInit(){
  26. model.removenodeset("/root/main/stmtlist");
  27. model.removenodeset("/root/main/prcpmappspec");
  28. model.removenodeset("/root/main/termanaly");
  29. model.removenodeset(xStmtInfoPath+"/icnpmngt/icnpinfo");
  30. model.removenodeset(xGrupInfoPath);
  31. model.removenodeset("/roOt/main/stmtmngt/stmtinfo/icnpinfo");
  32. model.setValue("/root/main/cond/dnar",'%');
  33. fAttrSearch("C");
  34. submit("TRMNR01806"); // 축 정보 조회
  35. // fSearch();
  36. }
  37. /**
  38. * @group :
  39. * @ver : 2007.03.02
  40. * @by : 이은영
  41. * @---------------------------------------------------
  42. * @type : function
  43. * @access : public
  44. * @desc : 속성 조회
  45. * @param :
  46. * @return :
  47. * @---------------------------------------------------
  48. */
  49. function fAttrSearch(pFlag){
  50. model.removenodeset("/root/main/attrinfo");
  51. model.removenode("/root/send");
  52. switch(pFlag){
  53. case 'C' : // 코드속성
  54. case 'A' : // 사정도구
  55. model.toggle("attrinfo2");
  56. model.removenodeset("/root/main/detlattrspec");
  57. break;
  58. case 'V' : // 수치속성
  59. case 'F' : // 특수속성
  60. model.toggle("attrinfo1");
  61. break;
  62. }
  63. model.makeValue("/root/send/attrflag",pFlag);
  64. model.makeValue("/root/send/supcd","********");
  65. submit("TRMNR01801");
  66. }
  67. /**
  68. * @group :
  69. * @ver : 2007.03.02
  70. * @by : 이은영
  71. * @---------------------------------------------------
  72. * @type : function
  73. * @access : public
  74. * @desc : 그리드 클릭시..
  75. * @param :
  76. * @return :
  77. * @---------------------------------------------------
  78. */
  79. function OnClickedGrid(pFlag){
  80. var sRow = 0;
  81. if(pFlag == "CSAttr"){
  82. model.removenodeset("/root/main/detlattrspec");
  83. model.removenode("/root/send");
  84. sRow = grd_attrlist2.row;
  85. if(sRow < 1) return;
  86. model.makeValue("/root/send/attrflag",pFlag);
  87. model.makeValue("/root/send/supcd",model.getValue(xAttrListPath+"["+sRow+"]/attrcd"));
  88. submit("TRMNR01802");
  89. }else if(pFlag == "VFAttr"){
  90. sRow = grd_attrlist1.row;
  91. if(sRow < 1) return;
  92. }
  93. sAttrNM = model.getValue(xAttrListPath+"["+sRow+"]/attrnm");
  94. }
  95. /**
  96. * @group :
  97. * @ver : 2007.03.02
  98. * @by : 이은영
  99. * @---------------------------------------------------
  100. * @type : function
  101. * @access : public
  102. * @desc : 진술문 조회
  103. * @param :
  104. * @return :
  105. * @---------------------------------------------------
  106. */
  107. function fSearch(){
  108. //조회건수 정보 초기화
  109. model.setValue("/root/hidden/stmtcnt", 0);
  110. model.setValue("/root/hidden/stmtcnt1", 0);
  111. model.removenodeset("/root/main/stmtlist");
  112. model.removenode("/root/send");
  113. model.makeValue("/root/send/dnar", model.getValue("/root/main/cond/dnar"));
  114. model.makeValue("/root/send/stmtnm", model.getValue("/root/main/cond/stmtnm"));
  115. model.makeValue("/root/send/offset", 0);
  116. model.makeValue("/root/send/pagesize", 500);
  117. if(submit("TRMNR01803")){
  118. // grd_stmtlist.mergecells = "bycol";
  119. // grd_stmtlist.mergecol(2)=false;
  120. // fSettingStmtStyle(); 임시
  121. model.setValue("/root/hidden/stmtcnt", getNodesetCount("/root/main/stmtlist/stmtinfo") );
  122. // grd_stmtlist.resizeCells();
  123. }
  124. grd_stmtlist.colSort(grd_stmtlist.colRef("dnarflag")) = "asc";
  125. grd_stmtlist.sort(1, grd_stmtlist.colRef("dnarflag"), grd_stmtlist.rows-1, grd_stmtlist.cols-1) = "usersort";
  126. grd_stmtlist.gridToInstance();
  127. grd_stmtlist.mergecells = "bycol";
  128. grd_stmtlist.mergecol(2) = false;
  129. fStmtInfoClear();
  130. model.copyNode("/root/hidden/stmtmngt","/root/main/stmtmngt");
  131. }
  132. /**
  133. * @group :
  134. * @ver : 2007.03.02
  135. * @by : 이은영
  136. * @---------------------------------------------------
  137. * @type : function
  138. * @access : 그리드 더블 클릭시..
  139. * @desc :
  140. * @param :
  141. * @return :
  142. * @---------------------------------------------------
  143. */
  144. function OnDblClick(){
  145. var sRow = 0;
  146. sRow = grd_stmtlist.row;
  147. if(sRow < 1) return;
  148. model.removenode("/root/send");
  149. model.removenodeset(xTermInfoPath);
  150. // alert(sRow);
  151. // alert(grd_stmtlist.labelMatrix(sRow, 1));
  152. // alert(grd_stmtlist.labelMatrix(sRow, 3));
  153. // alert(grd_stmtlist.labelMatrix(sRow, 6));
  154. //양천덕 2007-11-30 수정
  155. //model.makeValue("/root/send/stmtcd", model.getValue(xStmtListPath+"["+sRow+"]/stmtcd"));
  156. //model.makeValue("/root/send/todd", model.getValue(xStmtListPath+"["+sRow+"]/todd"));
  157. model.makeValue("/root/send/stmtcd", grd_stmtlist.labelMatrix(sRow, 3));
  158. model.makeValue("/root/send/todd", grd_stmtlist.labelMatrix(sRow, 6));
  159. if(submit("TRMNR01804")){
  160. model.copyNode("/root/hidden/stmtmngt","/root/main/stmtmngt");
  161. }
  162. model.refresh();
  163. }
  164. /**
  165. * @group :
  166. * @ver : 2007.03.03
  167. * @by : 이은영
  168. * @---------------------------------------------------
  169. * @type : function
  170. * @access : 속성 진술문에 등록
  171. * @desc :
  172. * @param :
  173. * @return :
  174. * @---------------------------------------------------
  175. */
  176. function fAttrRgst(){
  177. var sStmtCnts = model.getValue(xStmtInfoPath+"/stmtcnts");
  178. if(sStmtCnts != "") sStmtCnts += " ";
  179. model.setValue(xStmtInfoPath+"/stmtcnts", sStmtCnts+sAttrNM);
  180. model.refresh();
  181. }
  182. /**
  183. * @group :
  184. * @ver : 2007.03.03
  185. * @by : 이은영
  186. * @---------------------------------------------------
  187. * @type : function
  188. * @access : 용어 분석
  189. * @desc :
  190. * @param :
  191. * @return :
  192. * @---------------------------------------------------
  193. */
  194. function fTermAnaly(){
  195. var sStmtCnts = model.getValue(xStmtInfoPath+"/stmtcnts");
  196. if(sStmtCnts == ""){
  197. messageBox("분석할 진술문장이 ","I004");
  198. return;
  199. }
  200. model.removenodeset("/root/send");
  201. model.makeValue("/root/send/stmtcnts", sStmtCnts); // 진술문
  202. model.makeValue("/root/send/stmtcd" , model.getValue("/root/main/stmtmngt/stmtinfo/stmtcd")); // 진술문코드
  203. submit("TRMNR01805");
  204. /**
  205. * @ver : 2007.10.04
  206. * @by : 김진아
  207. * @---------------------------------------------------
  208. **/
  209. }
  210. /**
  211. * @group :
  212. * @ver : 2007.10.04
  213. * @by : 김진아
  214. * @---------------------------------------------------
  215. * @type : function
  216. * @access : 용어정보 저장
  217. * @desc :
  218. * @param :
  219. * @return :
  220. * @---------------------------------------------------
  221. */
  222. function fSaveTermInfo(){
  223. model.removenode("/root/send");
  224. model.makeNode ("/root/send/savedata");
  225. model.makeValue ("/root/send/savedata", grd_terminfo.getupdatedataAll("i"));
  226. alert("개발중 입니다.");
  227. return;
  228. submit("TXMNR01802");
  229. }
  230. /**
  231. * @group :
  232. * @ver : 2007.03.06
  233. * @by : 이은영
  234. * @---------------------------------------------------
  235. * @type : function
  236. * @access : 등록할 용어 분석
  237. * @desc :
  238. * @param :
  239. * @return :
  240. * @---------------------------------------------------
  241. */
  242. function fRgstTermAnaly(){
  243. var sRowCnt = grd_terminfo.rows- grd_terminfo.fixedrows; // 용어분석 내역 개수
  244. var sStmtCnts = model.getValue(xStmtInfoPath+"/stmtcnts"); // 진술문장
  245. var sAttrInfo1 = ""; // 속성정보1
  246. var sAttrInfo2 = ""; // 속성정보2
  247. var sAttrCnt = 0; // 문장내 속성개수
  248. var sTermCnt = 0; // 선택된 용어개수
  249. var sRow = 0; // 새로 추가된 용어 순번
  250. var iRow = 1; // 선택된 단어 순번
  251. var sTerm = ""; // 선택된 단어
  252. var sTermRgstChk = false; // 분석된 용어 등록 여부
  253. model.removenodeset(xStmtInfoPath+"/icnpmngt/icnpinfo");
  254. grd_icnp.rebuild();
  255. //이은영 개발 로직 변경으로 주석처리
  256. /*
  257. var sStmtCnt = 0; // 문장내 단어 개수
  258. var sTermInfo = sStmtCnts.split(" ");
  259. sTermCnt = grd_icnp.rows- grd_icnp.fixedrows;
  260. for(var i=1; i<=sRowCnt; i++){
  261. if(model.getValue(xTermInfoPath+"["+i+"]/check") == "true"){
  262. grd_icnp.addRow(false);
  263. sRow = grd_icnp.rows - grd_icnp.fixedrows;
  264. model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/flag", model.getValue(xTermInfoPath+"["+i+"]/flag"));
  265. model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/termnm", model.getValue(xTermInfoPath+"["+i+"]/termnm"));
  266. model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/termcd", model.getValue(xTermInfoPath+"["+i+"]/itemcd"));
  267. model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/smnttypecd", model.getValue(xTermInfoPath+"["+i+"]/smnttypecd"));
  268. model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/cnptid", model.getValue(xTermInfoPath+"["+i+"]/cnptid"));
  269. sTermRgstChk = true;
  270. }
  271. }
  272. if(sTermRgstChk == false){
  273. model.makeNode(xStmtInfoPath+"/icnpmngt/icnpinfo");
  274. }
  275. sStmtCnts = "";
  276. var sStmtCnt = 0;
  277. var sTmpTerm = "";
  278. var sTmpTerm1 = "";
  279. sTermCnt = grd_icnp.rows- grd_icnp.fixedrows;
  280. for(var j=0; j<sTermInfo.length; j++){
  281. sTerm = sTermInfo[j];
  282. while(sTerm.indexOf(" ") > 0){
  283. sTerm = sTerm.replace(" ", "");
  284. }
  285. if(sTerm == "") continue;
  286. //단어내에서 조사를 별도로 구분 할 수 없기 때문에 "^"을 구분자로 조사를 잘라낸다.
  287. sTmpTerm = sTerm.split("^");
  288. while(sTmpTerm[0].indexOf(" ")>0){
  289. sTmpTerm[0] = sTmpTerm[0].replace(" ", "");
  290. }
  291. //icnp 용어 분석시 "단어$단어" => "단어 단어" 형태로 변경..
  292. //문자의 용어 분석 단위가 " "이므로 공백이 있는 단어의 묶음을 하나의 단어로 분석이 되도록 특정 구분자를 넣어줌.
  293. while(sTmpTerm[0].indexOf("$")>0){
  294. sTerm = sTerm.replace("$"," ");
  295. sTmpTerm[0] = sTmpTerm[0].replace("$", " ");
  296. }
  297. //단어내에서 특수기호가 들어간 경우 제외한다.
  298. sTmpTerm[0] = sTmpTerm[0].replace(/[\:,\,]/g,"");
  299. if(sTmpTerm[0] == ""){
  300. sAttrInfo2 += sTerm + " ";
  301. sStmtCnts += sTerm + " ";
  302. continue;
  303. }
  304. if(model.getValue(xTermInfoPath+"[termnm ='"+sTmpTerm[0]+"']/flag") == "속성"){
  305. sAttrInfo1 += model.getValue(xTermInfoPath+"[termnm ='"+sTmpTerm[0]+"']/itemcd") + "⊙";
  306. sAttrInfo2 += "@"+sAttrCnt + " ";
  307. sAttrCnt++;
  308. }else{
  309. sAttrInfo2 += sTerm + " ";
  310. }
  311. sStmtCnts += sTerm + " ";
  312. }
  313. //if(model.getValue(xStmtInfoPath+"/dnarflag") == "2N" && sAttrCnt > 0){
  314. // messageBox("진단에는 속성이 들어갈 수" ,"I004");
  315. // return;
  316. // }
  317. while(sStmtCnts.indexOf("^") > 0){
  318. sStmtCnts = sStmtCnts.replace("^","");
  319. sAttrInfo2 = sAttrInfo2.replace("^","");
  320. }
  321. return sAttrCnt+"▦"+ sAttrInfo1+"▦"+sAttrInfo2+"▦"+sStmtCnts+"▦";
  322. */
  323. // var sStmtCnt = 0; // 문장내 단어 개수
  324. // var sTermInfo = sStmtCnts.split(" ");
  325. sTermCnt = grd_icnp.rows- grd_icnp.fixedrows;
  326. // for(var i=1; i<=sRowCnt; i++){
  327. // if(model.getValue(xTermInfoPath+"["+i+"]/check") == "true"){
  328. // grd_icnp.addRow(false);
  329. // sRow = grd_icnp.rows - grd_icnp.fixedrows;
  330. // model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/flag", model.getValue(xTermInfoPath+"["+i+"]/flag"));
  331. // model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/termnm", model.getValue(xTermInfoPath+"["+i+"]/termnm"));
  332. // model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/termcd", model.getValue(xTermInfoPath+"["+i+"]/itemcd"));
  333. // model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/smnttypecd", model.getValue(xTermInfoPath+"["+i+"]/smnttypecd"));
  334. // model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/cnptid", model.getValue(xTermInfoPath+"["+i+"]/cnptid"));
  335. // sTermRgstChk = true;
  336. // }
  337. // }
  338. var sStmtCntsCopy = sStmtCnts;
  339. model.makeNode(xStmtInfoPath+"/icnpmngt/icnpinfo");
  340. //단어내에서 조사를 별도로 구분 할 수 없기 때문에 "^"을 구분자로 조사를 잘라낸다.
  341. while(sStmtCntsCopy.indexOf("^")>0){
  342. sStmtCntsCopy = sStmtCntsCopy.replace("^", "");
  343. }
  344. //icnp 용어 분석시 "단어$단어" => "단어 단어" 형태로 변경..
  345. //문자의 용어 분석 단위가 " "이므로 공백이 있는 단어의 묶음을 하나의 단어로 분석이 되도록 특정 구분자를 넣어줌.
  346. while(sStmtCntsCopy.indexOf("$")>0){
  347. sStmtCntsCopy = sStmtCntsCopy.replace("$"," ");
  348. }
  349. var sStmtCntsCopy1 = sStmtCntsCopy;
  350. var sStmtCnt = 0;
  351. for(i = 1 ; i < grd_terminfo.rows ; i++){
  352. // sStmtCntsCopy2 = sStmtCntsCopy;
  353. if(model.getValue(xTermInfoPath +"["+i+"]/flag") == "속성" ){
  354. // sStmtCntsCopy2 = sStmtCntsCopy2.replace(model.getValue(xTermInfoPath+"["+i+"]/termnm"), "");
  355. // if( chklength > sStmtCntsCopy2.length ){
  356. sAttrInfo1 += model.getValue(xTermInfoPath+"["+i+"]/itemcd")+ "⊙";
  357. sStmtCntsCopy1 = sStmtCntsCopy1.replace( model.getValue(xTermInfoPath+"["+i+"]/termnm"), "@" + sStmtCnt);
  358. sAttrCnt++;
  359. sStmtCnt++;
  360. // }
  361. }
  362. }
  363. sStmtCntsCopy += " ";
  364. sStmtCntsCopy1 += " ";
  365. sStmtCntsCopy = sStmtCntsCopy.replace(" ", " ");
  366. sStmtCntsCopy1 = sStmtCntsCopy1.replace(" ", " ");
  367. return sAttrCnt+"▦"+ sAttrInfo1+"▦"+sStmtCntsCopy1+"▦"+sStmtCntsCopy+"▦";
  368. }
  369. /**
  370. * @group :
  371. * @ver : 2007.03.05
  372. * @by : 이은영
  373. * @---------------------------------------------------
  374. * @type : function
  375. * @access : 진술문 등록
  376. * @desc :
  377. * @param :
  378. * @return :
  379. * @---------------------------------------------------
  380. */
  381. function fStmtRgst(){
  382. var sStmtCD = model.getValue(xStmtInfoPath+"/stmtcd"); //진술문 코드
  383. var sStmtCnts = model.getValue(xStmtInfoPath+"/stmtcnts"); //진술문장
  384. var sAttrEssnYN = model.getValue(xStmtInfoPath+"/attressnyn"); //속성 필수 등록 여부
  385. var sOriginCD = model.getValue(xStmtInfoPath+"/origincd"); //문장출처
  386. var sDNARFlag = model.getValue(xStmtInfoPath+"/dnarflag"); //DNAR 구분
  387. var sStmtCntsDesc = model.getValue(xStmtInfoPath+"/stmtcntsdesc"); //진술문장정의
  388. var sRelaCause = model.getValue(xStmtInfoPath+"/relacause"); //관련요인
  389. var sRowCnt = grd_terminfo.rows- grd_terminfo.fixedrows; //용어분석 내역 개수
  390. if(sStmtCD != ""){
  391. messageBox("이미 등록된 진술문장입니다. 신규 등록","E001");
  392. return;
  393. }
  394. if(sStmtCnts == ""){
  395. messageBox("등록할 진술 문장을","C001");
  396. return;
  397. }
  398. if(sOriginCD == ""){
  399. messageBox("문장 출처를","C001");
  400. return;
  401. }
  402. if(sDNARFlag == ""){
  403. messageBox("D.N.A.R 분류 타입을","C001");
  404. return;
  405. }
  406. if(sRowCnt < 1){
  407. messageBox("문장 분석이 이루어지지","E007");
  408. //return; //일시적으로 주석처리
  409. }
  410. var sStmtInfo = fRgstTermAnaly();
  411. if(sStmtInfo == null) return;
  412. var sAttrInfo = sStmtInfo.split("▦");
  413. model.removenode("/root/send");
  414. var sStmtInfo = "stat" +"▦" + // 상태
  415. "stmtcd" +"▦" + //진술문 코드
  416. "instcd" +"▦" + //기관코드
  417. "todd" +"▦" + //종료일자
  418. "stmtcnts" +"▦" + //진술문
  419. "origincd" +"▦" + //출처코드
  420. "attrcnt" +"▦" + //속성개수
  421. "attrinfo1" +"▦" + //속성정보1
  422. "attrinfo2" +"▦" + //속성정보2
  423. "attressnyn" +"▦" + //속성 필수 입력 여부
  424. "dnarflag" +"▦" + //D.N.A.R 구분
  425. "stmtcntsdesc" +"▦" + //진술문정의
  426. "relacause" +"▦" + //관련요인
  427. "icnpinfo" +"▩"; //ICNP 정보
  428. sStmtInfo +="I▦" + // 상태
  429. "▦" + // 진술문 코드
  430. "▦" +
  431. "99991231235959" + "▦" + // 종료일자
  432. sAttrInfo[3] + "▦" + // 진술문
  433. sOriginCD + "▦" + // 출처코드
  434. sAttrInfo[0] + "▦" + // 속성개수
  435. sAttrInfo[1] + "▦" + // 속성정보1
  436. sAttrInfo[2] + "▦" + // 속성정보2
  437. sAttrEssnYN + "▦" + // 속성 필수 입력 여부
  438. sDNARFlag + "▦" + // D.N.A.R 구분
  439. sStmtCntsDesc + "▦" + // 진술문 정의
  440. sRelaCause + "▦" + // 관련요인
  441. root.main.stmtmngt.stmtinfo.icnpmngt.icnpinfo.xml+ "▩"; // ICNP 정보
  442. // 속성이 없는 경우 선택/필수 여부를 입력하지 않도록 함.
  443. if(sAttrEssnYN == "" && eval(sAttrInfo[0])>0){
  444. messageBox("속성 등록 여부(선택 or 필수) 입력이 이루어지지","E007");
  445. return;
  446. }
  447. if(messageBox("","Q002") != '6') return;
  448. var refCond = "dnar▦stmtnm▦offset▦pagesize▩"
  449. + model.getValue("/root/main/cond/dnar")+"▦"
  450. + model.getValue("/root/main/cond/stmtnm")+"▦"
  451. + 0 +"▦";
  452. if(model.getValue("/root/hidden/stmtcnt") == ""){
  453. refCond += 500 +"▩";
  454. }else{
  455. refCond += model.getValue("/root/hidden/stmtcnt") +"▩";
  456. }
  457. model.makeValue("/root/send/stmtinfo",sStmtInfo);
  458. model.makeValue("/root/send/refCond", refCond);
  459. if(submit("TXMNR01801")){
  460. model.setValue("/root/hidden/stmtcnt", getNodesetCount("/root/main/stmtlist/stmtinfo") );
  461. fStmtInfoClear();
  462. // fSettingStmtStyle(); 임시
  463. model.copyNode("/root/hidden/stmtmngt","/root/main/stmtmngt");
  464. }
  465. }
  466. /**
  467. * @group :
  468. * @ver : 2007.03.06
  469. * @by : 이은영
  470. * @---------------------------------------------------
  471. * @type : function
  472. * @access : 진술문 수정
  473. * @desc :
  474. * @param :
  475. * @return :
  476. * @---------------------------------------------------
  477. */
  478. function fStmtUpdt(){
  479. var sStmtCD = model.getValue(xStmtInfoPath+"/stmtcd"); // 진술문 코드
  480. var sStmtCnts = model.getValue(xStmtInfoPath+"/stmtcnts"); // 진술문장
  481. var sAttrEssnYN = model.getValue(xStmtInfoPath+"/attressnyn"); // 속성 필수 등록 여부
  482. var sOriginCD = model.getValue(xStmtInfoPath+"/origincd"); // 문장출처
  483. var sDNARFlag = model.getValue(xStmtInfoPath+"/dnarflag"); // DNAR 구분
  484. var sStmtCntsDesc = model.getValue(xStmtInfoPath+"/stmtcntsdesc"); //진술문장정의
  485. var sRelaCause = model.getValue(xStmtInfoPath+"/relacause"); //관련요인
  486. var sRowCnt = grd_terminfo.rows- grd_terminfo.fixedrows; // 용어분석 내역 개수
  487. var sTermCnt = 0;
  488. if(sStmtCD == "" && sStmtCnts == ""){
  489. messageBox("수정할 진술문이","I004");
  490. return;
  491. }
  492. if(sStmtCD == "" && sStmtCnts != ""){
  493. messageBox("등록된 진술문장이 아닙니다. 진술문 수정을","E001");
  494. return;
  495. }
  496. if(sStmtCnts == ""){
  497. messageBox("수정할 진술 문장을","C001");
  498. return;
  499. }
  500. if(sOriginCD == ""){
  501. messageBox("문장 출처를","C001");
  502. return;
  503. }
  504. if(sDNARFlag == ""){
  505. messageBox("D.N.A.R 분류 타입을","C001");
  506. return;
  507. }
  508. if(sRowCnt < 1){
  509. messageBox("문장 분석이 이루어지지","E007");
  510. //return; //일시적으로 주석처리
  511. }
  512. if(messageBox("","Q003") != '6') return;
  513. var sStmtInfo = fRgstTermAnaly();
  514. if(sStmtInfo == null) return;
  515. /*
  516. if(sStmtCnts == model.getValue(xBKStmtPath+"/stmtcnts") &&
  517. sAttrEssnYN == model.getValue(xBKStmtPath+"/attressnyn") &&
  518. sOriginCD == model.getValue(xBKStmtPath+"/origincd") &&
  519. sDNARFlag == model.getValue(xBKStmtPath+"/dnarflag")){
  520. messageBox("변경된 데이터가 없습니다. 진술문 수정을","E001");
  521. return;
  522. } */
  523. var sAttrInfo = sStmtInfo.split("▦");
  524. model.removenode("/root/send");
  525. var sStmtInfo = "stat" + "▦"+ //상태
  526. "stmtcd" + "▦"+ //진술문 코드
  527. "instcd" + "▦"+ //기관코드
  528. "todd" + "▦"+ //종료일자
  529. "stmtcnts" + "▦"+ //진술문
  530. "origincd" + "▦"+ //출처코드
  531. "attrcnt" + "▦"+ //속성개수
  532. "attrinfo1" + "▦"+ //속성정보1
  533. "attrinfo2" + "▦"+ //속성정보2
  534. "attressnyn" + "▦"+ //속성 필수 입력 여부
  535. "dnarflag" + "▦"+ //D.N.A.R 구분
  536. "stmtcntsdesc" + "▦"+ //진술문정의
  537. "relacause" + "▦" + //관련요인
  538. "icnpinfo" + "▩"; //ICNP 정보
  539. sStmtInfo +="U" + "▦" + // 상태
  540. sStmtCD + "▦" + // 진술문 코드
  541. model.getValue(xStmtInfoPath+"/instcd") + "▦" + // 기관코드
  542. model.getValue(xStmtInfoPath+"/todd") + "▦" + // 종료일자
  543. sAttrInfo[3] + "▦" + // 진술문
  544. sOriginCD + "▦" + // 출처코드
  545. sAttrInfo[0] + "▦" + // 속성개수
  546. sAttrInfo[1] + "▦" + // 속성정보1
  547. sAttrInfo[2] + "▦" + // 속성정보2
  548. sAttrEssnYN + "▦" + // 속성 필수 입력 여부
  549. sDNARFlag + "▦" + // D.N.A.R 구분
  550. sStmtCntsDesc + "▦" + // 진술문정의
  551. sRelaCause + "▦" + // 관련요인
  552. root.main.stmtmngt.stmtinfo.icnpmngt.icnpinfo.xml + "▩"; // ICNP 정보
  553. // 속성이 없는 경우 선택/필수 여부를 입력하지 않도록 함.
  554. if(sAttrEssnYN == "" && eval(sAttrInfo[0])>0){
  555. messageBox("속성 등록 여부(선택 or 필수) 입력이 이루어지지","E007");
  556. return;
  557. }
  558. var refCond = "dnar▦stmtnm▦offset▦pagesize▩"
  559. + model.getValue("/root/main/cond/dnar")+"▦"
  560. + model.getValue("/root/main/cond/stmtnm")+"▦"
  561. + 0 +"▦"
  562. + model.getValue("/root/hidden/stmtcnt") +"▩";
  563. model.makeValue("/root/send/stmtinfo",sStmtInfo);
  564. model.makeValue("/root/send/refCond", refCond);
  565. if(submit("TXMNR01801")){
  566. model.setValue("/root/hidden/stmtcnt", getNodesetCount("/root/main/stmtlist/stmtinfo") );
  567. fStmtInfoClear();
  568. // fSettingStmtStyle(); 임시
  569. model.copyNode("/root/hidden/stmtmngt","/root/main/stmtmngt");
  570. }
  571. }
  572. /**
  573. * @group :
  574. * @ver : 2007.03.06
  575. * @by : 이은영
  576. * @---------------------------------------------------
  577. * @type : function
  578. * @access : 진술문 삭제
  579. * @desc :
  580. * @param :
  581. * @return :
  582. * @---------------------------------------------------
  583. */
  584. function fStmtDelete(){
  585. var sStmtCD = model.getValue(xStmtInfoPath+"/stmtcd"); // 진술문 코드
  586. var sStmtCnts = model.getValue(xStmtInfoPath+"/stmtcnts"); // 진술문장
  587. var sAttrEssnYN = model.getValue(xStmtInfoPath+"/attressnyn"); // 속성 필수 등록 여부
  588. var sOriginCD = model.getValue(xStmtInfoPath+"/origincd"); // 문장출처
  589. var sDNARFlag = model.getValue(xStmtInfoPath+"/dnarflag"); // DNAR 구분
  590. var sRowCnt = grd_terminfo.rows- grd_terminfo.fixedrows;
  591. if(sStmtCD == "" && sStmtCnts == ""){
  592. messageBox("삭제할 진술문이","I004");
  593. return;
  594. }
  595. if(sStmtCD == "" && sStmtCnts != ""){
  596. messageBox("등록된 진술문장이 아닙니다. 진술문 삭제를","E001");
  597. return;
  598. }
  599. var sStmtInfo = "stat▦"+ // 상태
  600. "stmtcd▦" + // 진술문 코드
  601. "instcd▦" + // 기관코드
  602. "todd▩"; // 종료일자
  603. sStmtInfo +="D▦" + // 상태
  604. sStmtCD + "▦" + // 진술문 코드
  605. model.getValue(xStmtInfoPath+"/instcd") + "▦" + // 기관코드
  606. model.getValue(xStmtInfoPath+"/todd") + "▩"; // 종료일자
  607. var refCond = "dnar▦stmtnm▦offset▦pagesize▩"
  608. + model.getValue("/root/main/cond/dnar")+"▦"
  609. + model.getValue("/root/main/cond/stmtnm")+"▦"
  610. + 0 +"▦"
  611. + model.getValue("/root/hidden/stmtcnt") +"▩";
  612. model.makeValue("/root/send/stmtinfo",sStmtInfo);
  613. model.makeValue("/root/send/refCond", refCond);
  614. if(submit("TXMNR01801")){
  615. model.setValue("/root/hidden/stmtcnt", getNodesetCount("/root/main/stmtlist/stmtinfo") );
  616. fStmtInfoClear();
  617. // fSettingStmtStyle(); 임시
  618. model.copyNode("/root/hidden/stmtmngt","/root/main/stmtmngt");
  619. }
  620. }
  621. /**
  622. * @group :
  623. * @ver : 2007.03.06
  624. * @by : 이은영
  625. * @---------------------------------------------------
  626. * @type : function
  627. * @access : 진술문 Clear
  628. * @desc :
  629. * @param :
  630. * @return :
  631. * @---------------------------------------------------
  632. */
  633. function fStmtInfoClear(){
  634. var xPath = "/root/main/stmtmngt/stmtinfo";
  635. model.setValue(xPath+"/stmtcd","");
  636. model.setValue(xPath+"/instcd","");
  637. model.setValue(xPath+"/todd","");
  638. model.setValue(xPath+"/stmtcnts","");
  639. model.setValue(xPath+"/origincd","");
  640. model.setValue(xPath+"/attrcnt","");
  641. model.setValue(xPath+"/attrinfo1","");
  642. model.setValue(xPath+"/attrinfo2","");
  643. model.setValue(xPath+"/attressnyn","");
  644. model.setValue(xPath+"/dnarflag","");
  645. model.setValue(xPath+"/stmtcntsdesc","");
  646. model.setValue(xPath+"/relacause","");
  647. model.removenodeset(xPath+"/icnpmngt/icnpinfo");
  648. model.removenodeset("/root/main/termanaly");
  649. model.removenodeset(xGrupInfoPath); // 진술문 분류체계 사용내역 지우기
  650. model.refresh();
  651. }
  652. /**
  653. * @group :
  654. * @ver : 2007.03.06
  655. * @by : 이은영
  656. * @---------------------------------------------------
  657. * @type : function
  658. * @access : 전체선택
  659. * @desc :
  660. * @param :
  661. * @return :
  662. * @---------------------------------------------------
  663. */
  664. function fAllChoi(){
  665. var sRow = grd_terminfo.rows - grd_terminfo.fixedrows;
  666. if(sRow <1) return;
  667. for(var i=1; i<=sRow; i++){
  668. model.setValue(xTermInfoPath+"["+i+"]/check","true");
  669. }
  670. }
  671. /**
  672. * @group :
  673. * @ver : 2007.03.06
  674. * @by : 이은영
  675. * @---------------------------------------------------
  676. * @type : function
  677. * @access : 진술문 내 작성자 ToolTip 보기
  678. * @desc :
  679. * @param :
  680. * @return :
  681. * @---------------------------------------------------
  682. */
  683. function OnMouseMoveGrid(){
  684. var iRow = grd_stmtlist.mouseRow;
  685. var iCol = grd_stmtlist.mouseCol;
  686. var sRow = grd_stmtlist.rows - grd_stmtlist.fixedrows;
  687. var sToolTipvw = model.getValue("/root/main/cond/tooltipvw");
  688. var sToolTipMsg = "";
  689. if(iRow > 0 && iCol > 0 && sToolTipvw == "Y"){
  690. var xPath = "/root/main/stmtlist/stmtinfo";
  691. var sStmtCnts = model.getValue(xPath+"["+iRow+"]/stmtcnts");
  692. var sLastupdtdt = model.getValue(xPath+"["+iRow+"]/lastupdtdt");
  693. var sLastupdtrnm = model.getValue(xPath+"["+iRow+"]/lastupdtrnm");
  694. sToolTipMsg = "등록문장: "+sStmtCnts+" 기록정보: "+
  695. sLastupdtdt.substr(0,4)+"-"+sLastupdtdt.substr(4,2) +"-"+
  696. sLastupdtdt.substr(6,2)+" "+sLastupdtdt.substr(8,2) +":"+
  697. sLastupdtdt.substr(10,2)+" - " + sLastupdtrnm;
  698. grd_stmtlist.tooltiptext(iRow,iCol) = sToolTipMsg;
  699. }else{
  700. grd_stmtlist.tooltiptext(iRow,iCol) = "";
  701. }
  702. }
  703. /**
  704. * @group :
  705. * @ver : 2007.03.07
  706. * @by : 이은영
  707. * @---------------------------------------------------
  708. * @type : function
  709. * @access : 속성 관리 화면 팝업
  710. * @desc :
  711. * @param :
  712. * @return :
  713. * @---------------------------------------------------
  714. */
  715. function fPopUpCall(pFlag){
  716. if(pFlag == "AttrMngt"){
  717. var xpos = event.screenX-1000;
  718. var ypos = event.screenY-100;
  719. modal("SMMNR01700", 1, xpos, ypos);
  720. }else if(pFlag == "ICNPTerm"){
  721. var xpos = event.screenX-800;
  722. var ypos = event.screenY-400;
  723. var iRow = grd_terminfo.row;
  724. if(iRow < 1){
  725. messageBox("ICNP 매핑할 용어가","I004");
  726. //return;
  727. }
  728. model.makeValue("/root/hidden/refinfo/flag","p");
  729. modal("SMMNR01200",1, xpos, ypos,"SMMNR01200","/root/hidden/refinfo","/root/hidden/refinfo");
  730. var sTermInfo = getParameter("terminfo");
  731. if(sTermInfo == "") return;
  732. var sValue = sTermInfo.split("▦");
  733. model.setValue(xTermInfoPath+"["+iRow+"]/smnttypecd", sValue[0]);
  734. model.setValue(xTermInfoPath+"["+iRow+"]/itemcd", sValue[1]);
  735. model.setValue(xTermInfoPath+"["+iRow+"]/icnphngterm", sValue[2]);
  736. model.setValue(xTermInfoPath+"["+iRow+"]/icnpengterm", sValue[3]);
  737. model.setValue(xTermInfoPath+"["+iRow+"]/cnptid", sValue[4]);
  738. grd_terminfo.rebuild();
  739. }
  740. }
  741. /**
  742. * @group :
  743. * @ver : 2007.04.19
  744. * @by : 이은영
  745. * @---------------------------------------------------
  746. * @type : function
  747. * @access : public
  748. * @desc : 진술문 폰트 color 변경 - 속성이 있는 경우 진술문 폰트 색상을 변경한다.
  749. * @param :
  750. * @return :
  751. * @---------------------------------------------------
  752. */
  753. function fSettingStmtStyle(){
  754. grd_stmtlist.allstyle("data","color") = "#000000";
  755. for(var iRow=grd_stmtlist.fixedrows; iRow<=grd_stmtlist.rows-grd_stmtlist.fixedrows; iRow++){
  756. if(eval(model.getValue(xStmtListPath+"["+iRow+"]/attrcnt"))>0){
  757. grd_stmtlist.cellstyle("color",iRow,4) = "#CC0099"; // 보라
  758. }
  759. }
  760. }
  761. /**
  762. * @group :
  763. * @ver : 2007.11.29
  764. * @by : 양천덕
  765. * @---------------------------------------------------
  766. * @type : function
  767. * @access : public
  768. * @desc : 진술문 페이지 별 검색
  769. * @param :
  770. * @return :
  771. * @---------------------------------------------------
  772. */
  773. function fSubmitOnScroll() {
  774. if(grd_stmtlist.vscroll.attribute("max") == grd_stmtlist.vscroll.attribute("pos")) {
  775. if(model.getValue("/root/hidden/stmtcnt") != model.getValue("/root/hidden/stmtcnt1") ){
  776. model.setValue("/root/hidden/stmtcnt1", getNodesetCount("/root/main/stmtlist/stmtinfo") );
  777. model.removenode("/root/send");
  778. model.makeValue("/root/send/dnar", model.getValue("/root/main/cond/dnar"));
  779. model.makeValue("/root/send/stmtnm", model.getValue("/root/main/cond/stmtnm"));
  780. model.makeValue("/root/send/offset", grd_stmtlist.rows-grd_stmtlist.fixedRows );
  781. model.makeValue("/root/send/pagesize", 500);
  782. if(submit("TRMNR01803")){
  783. grd_stmtlist.dispatch("onmouseup");
  784. model.setValue("/root/hidden/stmtcnt", getNodesetCount("/root/main/stmtlist/stmtinfo") );
  785. grd_stmtlist.rebuild();
  786. }
  787. }
  788. }
  789. }