123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911 |
- /*
- 진술문장 관리(SMMNR01800.xfm - JScript )
- - Version :
- 1) : Ver.1.00.01
- */
- var sAttrNM = "";
- var xTermInfoPath = "/root/main/termanaly/terminfo"; // 용어분석 정보
- var xStmtInfoPath = "/root/main/stmtmngt/stmtinfo"; // 진술문 정보
- var xGrupInfoPath = "/root/main/stmtmngt/grupinfolist"; // 진술문 분류체계 사용내역
- var xBKStmtInfoPath = "/root/hidden/stmtmngt/stmtinfo"; // 진술문 백업 정보
- var xAttrListPath = "/root/main/attrinfo/attrlist"; // 속성 정보
- var xStmtListPath = "/root/main/stmtlist/stmtinfo"; // 진술문 리스트 정보
- /**
- * @group :
- * @ver : 2007.03.02
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 화면 초기화
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fInit(){
- model.removenodeset("/root/main/stmtlist");
- model.removenodeset("/root/main/prcpmappspec");
- model.removenodeset("/root/main/termanaly");
- model.removenodeset(xStmtInfoPath+"/icnpmngt/icnpinfo");
- model.removenodeset(xGrupInfoPath);
- model.removenodeset("/roOt/main/stmtmngt/stmtinfo/icnpinfo");
- model.setValue("/root/main/cond/dnar",'%');
- fAttrSearch("C");
- submit("TRMNR01806"); // 축 정보 조회
- // fSearch();
- }
- /**
- * @group :
- * @ver : 2007.03.02
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 속성 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAttrSearch(pFlag){
- model.removenodeset("/root/main/attrinfo");
- model.removenode("/root/send");
- switch(pFlag){
- case 'C' : // 코드속성
- case 'A' : // 사정도구
- model.toggle("attrinfo2");
- model.removenodeset("/root/main/detlattrspec");
- break;
- case 'V' : // 수치속성
- case 'F' : // 특수속성
- model.toggle("attrinfo1");
- break;
- }
- model.makeValue("/root/send/attrflag",pFlag);
- model.makeValue("/root/send/supcd","********");
- submit("TRMNR01801");
- }
- /**
- * @group :
- * @ver : 2007.03.02
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 그리드 클릭시..
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function OnClickedGrid(pFlag){
- var sRow = 0;
- if(pFlag == "CSAttr"){
- model.removenodeset("/root/main/detlattrspec");
- model.removenode("/root/send");
- sRow = grd_attrlist2.row;
- if(sRow < 1) return;
- model.makeValue("/root/send/attrflag",pFlag);
- model.makeValue("/root/send/supcd",model.getValue(xAttrListPath+"["+sRow+"]/attrcd"));
- submit("TRMNR01802");
- }else if(pFlag == "VFAttr"){
- sRow = grd_attrlist1.row;
- if(sRow < 1) return;
- }
- sAttrNM = model.getValue(xAttrListPath+"["+sRow+"]/attrnm");
- }
- /**
- * @group :
- * @ver : 2007.03.02
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진술문 조회
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSearch(){
- //조회건수 정보 초기화
- model.setValue("/root/hidden/stmtcnt", 0);
- model.setValue("/root/hidden/stmtcnt1", 0);
- model.removenodeset("/root/main/stmtlist");
- model.removenode("/root/send");
- model.makeValue("/root/send/dnar", model.getValue("/root/main/cond/dnar"));
- model.makeValue("/root/send/stmtnm", model.getValue("/root/main/cond/stmtnm"));
- model.makeValue("/root/send/offset", 0);
- model.makeValue("/root/send/pagesize", 500);
- if(submit("TRMNR01803")){
- // grd_stmtlist.mergecells = "bycol";
- // grd_stmtlist.mergecol(2)=false;
- // fSettingStmtStyle(); 임시
- model.setValue("/root/hidden/stmtcnt", getNodesetCount("/root/main/stmtlist/stmtinfo") );
- // grd_stmtlist.resizeCells();
- }
- grd_stmtlist.colSort(grd_stmtlist.colRef("dnarflag")) = "asc";
- grd_stmtlist.sort(1, grd_stmtlist.colRef("dnarflag"), grd_stmtlist.rows-1, grd_stmtlist.cols-1) = "usersort";
- grd_stmtlist.gridToInstance();
- grd_stmtlist.mergecells = "bycol";
- grd_stmtlist.mergecol(2) = false;
- fStmtInfoClear();
- model.copyNode("/root/hidden/stmtmngt","/root/main/stmtmngt");
- }
- /**
- * @group :
- * @ver : 2007.03.02
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : 그리드 더블 클릭시..
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function OnDblClick(){
- var sRow = 0;
- sRow = grd_stmtlist.row;
- if(sRow < 1) return;
- model.removenode("/root/send");
- model.removenodeset(xTermInfoPath);
- // alert(sRow);
- // alert(grd_stmtlist.labelMatrix(sRow, 1));
- // alert(grd_stmtlist.labelMatrix(sRow, 3));
- // alert(grd_stmtlist.labelMatrix(sRow, 6));
- //양천덕 2007-11-30 수정
- //model.makeValue("/root/send/stmtcd", model.getValue(xStmtListPath+"["+sRow+"]/stmtcd"));
- //model.makeValue("/root/send/todd", model.getValue(xStmtListPath+"["+sRow+"]/todd"));
- model.makeValue("/root/send/stmtcd", grd_stmtlist.labelMatrix(sRow, 3));
- model.makeValue("/root/send/todd", grd_stmtlist.labelMatrix(sRow, 6));
- if(submit("TRMNR01804")){
- model.copyNode("/root/hidden/stmtmngt","/root/main/stmtmngt");
- }
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.03.03
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : 속성 진술문에 등록
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAttrRgst(){
- var sStmtCnts = model.getValue(xStmtInfoPath+"/stmtcnts");
- if(sStmtCnts != "") sStmtCnts += " ";
- model.setValue(xStmtInfoPath+"/stmtcnts", sStmtCnts+sAttrNM);
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.03.03
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : 용어 분석
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fTermAnaly(){
- var sStmtCnts = model.getValue(xStmtInfoPath+"/stmtcnts");
- if(sStmtCnts == ""){
- messageBox("분석할 진술문장이 ","I004");
- return;
- }
- model.removenodeset("/root/send");
- model.makeValue("/root/send/stmtcnts", sStmtCnts); // 진술문
- model.makeValue("/root/send/stmtcd" , model.getValue("/root/main/stmtmngt/stmtinfo/stmtcd")); // 진술문코드
- submit("TRMNR01805");
- /**
- * @ver : 2007.10.04
- * @by : 김진아
- * @---------------------------------------------------
- **/
- }
- /**
- * @group :
- * @ver : 2007.10.04
- * @by : 김진아
- * @---------------------------------------------------
- * @type : function
- * @access : 용어정보 저장
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSaveTermInfo(){
- model.removenode("/root/send");
- model.makeNode ("/root/send/savedata");
- model.makeValue ("/root/send/savedata", grd_terminfo.getupdatedataAll("i"));
- alert("개발중 입니다.");
- return;
- submit("TXMNR01802");
- }
- /**
- * @group :
- * @ver : 2007.03.06
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : 등록할 용어 분석
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fRgstTermAnaly(){
- var sRowCnt = grd_terminfo.rows- grd_terminfo.fixedrows; // 용어분석 내역 개수
- var sStmtCnts = model.getValue(xStmtInfoPath+"/stmtcnts"); // 진술문장
- var sAttrInfo1 = ""; // 속성정보1
- var sAttrInfo2 = ""; // 속성정보2
- var sAttrCnt = 0; // 문장내 속성개수
- var sTermCnt = 0; // 선택된 용어개수
- var sRow = 0; // 새로 추가된 용어 순번
- var iRow = 1; // 선택된 단어 순번
- var sTerm = ""; // 선택된 단어
- var sTermRgstChk = false; // 분석된 용어 등록 여부
- model.removenodeset(xStmtInfoPath+"/icnpmngt/icnpinfo");
- grd_icnp.rebuild();
- //이은영 개발 로직 변경으로 주석처리
- /*
- var sStmtCnt = 0; // 문장내 단어 개수
- var sTermInfo = sStmtCnts.split(" ");
- sTermCnt = grd_icnp.rows- grd_icnp.fixedrows;
- for(var i=1; i<=sRowCnt; i++){
- if(model.getValue(xTermInfoPath+"["+i+"]/check") == "true"){
- grd_icnp.addRow(false);
- sRow = grd_icnp.rows - grd_icnp.fixedrows;
- model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/flag", model.getValue(xTermInfoPath+"["+i+"]/flag"));
- model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/termnm", model.getValue(xTermInfoPath+"["+i+"]/termnm"));
- model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/termcd", model.getValue(xTermInfoPath+"["+i+"]/itemcd"));
- model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/smnttypecd", model.getValue(xTermInfoPath+"["+i+"]/smnttypecd"));
- model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/cnptid", model.getValue(xTermInfoPath+"["+i+"]/cnptid"));
- sTermRgstChk = true;
- }
- }
- if(sTermRgstChk == false){
- model.makeNode(xStmtInfoPath+"/icnpmngt/icnpinfo");
- }
- sStmtCnts = "";
- var sStmtCnt = 0;
- var sTmpTerm = "";
- var sTmpTerm1 = "";
- sTermCnt = grd_icnp.rows- grd_icnp.fixedrows;
- for(var j=0; j<sTermInfo.length; j++){
- sTerm = sTermInfo[j];
- while(sTerm.indexOf(" ") > 0){
- sTerm = sTerm.replace(" ", "");
- }
- if(sTerm == "") continue;
- //단어내에서 조사를 별도로 구분 할 수 없기 때문에 "^"을 구분자로 조사를 잘라낸다.
- sTmpTerm = sTerm.split("^");
- while(sTmpTerm[0].indexOf(" ")>0){
- sTmpTerm[0] = sTmpTerm[0].replace(" ", "");
- }
- //icnp 용어 분석시 "단어$단어" => "단어 단어" 형태로 변경..
- //문자의 용어 분석 단위가 " "이므로 공백이 있는 단어의 묶음을 하나의 단어로 분석이 되도록 특정 구분자를 넣어줌.
- while(sTmpTerm[0].indexOf("$")>0){
- sTerm = sTerm.replace("$"," ");
- sTmpTerm[0] = sTmpTerm[0].replace("$", " ");
- }
- //단어내에서 특수기호가 들어간 경우 제외한다.
- sTmpTerm[0] = sTmpTerm[0].replace(/[\:,\,]/g,"");
- if(sTmpTerm[0] == ""){
- sAttrInfo2 += sTerm + " ";
- sStmtCnts += sTerm + " ";
- continue;
- }
- if(model.getValue(xTermInfoPath+"[termnm ='"+sTmpTerm[0]+"']/flag") == "속성"){
- sAttrInfo1 += model.getValue(xTermInfoPath+"[termnm ='"+sTmpTerm[0]+"']/itemcd") + "⊙";
- sAttrInfo2 += "@"+sAttrCnt + " ";
- sAttrCnt++;
- }else{
- sAttrInfo2 += sTerm + " ";
- }
- sStmtCnts += sTerm + " ";
- }
- //if(model.getValue(xStmtInfoPath+"/dnarflag") == "2N" && sAttrCnt > 0){
- // messageBox("진단에는 속성이 들어갈 수" ,"I004");
- // return;
- // }
- while(sStmtCnts.indexOf("^") > 0){
- sStmtCnts = sStmtCnts.replace("^","");
- sAttrInfo2 = sAttrInfo2.replace("^","");
- }
- return sAttrCnt+"▦"+ sAttrInfo1+"▦"+sAttrInfo2+"▦"+sStmtCnts+"▦";
- */
- // var sStmtCnt = 0; // 문장내 단어 개수
- // var sTermInfo = sStmtCnts.split(" ");
- sTermCnt = grd_icnp.rows- grd_icnp.fixedrows;
- // for(var i=1; i<=sRowCnt; i++){
- // if(model.getValue(xTermInfoPath+"["+i+"]/check") == "true"){
- // grd_icnp.addRow(false);
- // sRow = grd_icnp.rows - grd_icnp.fixedrows;
- // model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/flag", model.getValue(xTermInfoPath+"["+i+"]/flag"));
- // model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/termnm", model.getValue(xTermInfoPath+"["+i+"]/termnm"));
- // model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/termcd", model.getValue(xTermInfoPath+"["+i+"]/itemcd"));
- // model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/smnttypecd", model.getValue(xTermInfoPath+"["+i+"]/smnttypecd"));
- // model.setValue(xStmtInfoPath+"/icnpmngt/icnpinfo/icnp["+sRow+"]/cnptid", model.getValue(xTermInfoPath+"["+i+"]/cnptid"));
- // sTermRgstChk = true;
- // }
- // }
- var sStmtCntsCopy = sStmtCnts;
- model.makeNode(xStmtInfoPath+"/icnpmngt/icnpinfo");
- //단어내에서 조사를 별도로 구분 할 수 없기 때문에 "^"을 구분자로 조사를 잘라낸다.
- while(sStmtCntsCopy.indexOf("^")>0){
- sStmtCntsCopy = sStmtCntsCopy.replace("^", "");
- }
- //icnp 용어 분석시 "단어$단어" => "단어 단어" 형태로 변경..
- //문자의 용어 분석 단위가 " "이므로 공백이 있는 단어의 묶음을 하나의 단어로 분석이 되도록 특정 구분자를 넣어줌.
- while(sStmtCntsCopy.indexOf("$")>0){
- sStmtCntsCopy = sStmtCntsCopy.replace("$"," ");
- }
- var sStmtCntsCopy1 = sStmtCntsCopy;
- var sStmtCnt = 0;
- for(i = 1 ; i < grd_terminfo.rows ; i++){
- // sStmtCntsCopy2 = sStmtCntsCopy;
- if(model.getValue(xTermInfoPath +"["+i+"]/flag") == "속성" ){
- // sStmtCntsCopy2 = sStmtCntsCopy2.replace(model.getValue(xTermInfoPath+"["+i+"]/termnm"), "");
- // if( chklength > sStmtCntsCopy2.length ){
- sAttrInfo1 += model.getValue(xTermInfoPath+"["+i+"]/itemcd")+ "⊙";
- sStmtCntsCopy1 = sStmtCntsCopy1.replace( model.getValue(xTermInfoPath+"["+i+"]/termnm"), "@" + sStmtCnt);
- sAttrCnt++;
- sStmtCnt++;
- // }
- }
- }
- sStmtCntsCopy += " ";
- sStmtCntsCopy1 += " ";
- sStmtCntsCopy = sStmtCntsCopy.replace(" ", " ");
- sStmtCntsCopy1 = sStmtCntsCopy1.replace(" ", " ");
- return sAttrCnt+"▦"+ sAttrInfo1+"▦"+sStmtCntsCopy1+"▦"+sStmtCntsCopy+"▦";
- }
- /**
- * @group :
- * @ver : 2007.03.05
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : 진술문 등록
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fStmtRgst(){
- var sStmtCD = model.getValue(xStmtInfoPath+"/stmtcd"); //진술문 코드
- var sStmtCnts = model.getValue(xStmtInfoPath+"/stmtcnts"); //진술문장
- var sAttrEssnYN = model.getValue(xStmtInfoPath+"/attressnyn"); //속성 필수 등록 여부
- var sOriginCD = model.getValue(xStmtInfoPath+"/origincd"); //문장출처
- var sDNARFlag = model.getValue(xStmtInfoPath+"/dnarflag"); //DNAR 구분
- var sStmtCntsDesc = model.getValue(xStmtInfoPath+"/stmtcntsdesc"); //진술문장정의
- var sRelaCause = model.getValue(xStmtInfoPath+"/relacause"); //관련요인
- var sRowCnt = grd_terminfo.rows- grd_terminfo.fixedrows; //용어분석 내역 개수
- if(sStmtCD != ""){
- messageBox("이미 등록된 진술문장입니다. 신규 등록","E001");
- return;
- }
- if(sStmtCnts == ""){
- messageBox("등록할 진술 문장을","C001");
- return;
- }
- if(sOriginCD == ""){
- messageBox("문장 출처를","C001");
- return;
- }
- if(sDNARFlag == ""){
- messageBox("D.N.A.R 분류 타입을","C001");
- return;
- }
- if(sRowCnt < 1){
- messageBox("문장 분석이 이루어지지","E007");
- //return; //일시적으로 주석처리
- }
- var sStmtInfo = fRgstTermAnaly();
- if(sStmtInfo == null) return;
- var sAttrInfo = sStmtInfo.split("▦");
- model.removenode("/root/send");
- var sStmtInfo = "stat" +"▦" + // 상태
- "stmtcd" +"▦" + //진술문 코드
- "instcd" +"▦" + //기관코드
- "todd" +"▦" + //종료일자
- "stmtcnts" +"▦" + //진술문
- "origincd" +"▦" + //출처코드
- "attrcnt" +"▦" + //속성개수
- "attrinfo1" +"▦" + //속성정보1
- "attrinfo2" +"▦" + //속성정보2
- "attressnyn" +"▦" + //속성 필수 입력 여부
- "dnarflag" +"▦" + //D.N.A.R 구분
- "stmtcntsdesc" +"▦" + //진술문정의
- "relacause" +"▦" + //관련요인
- "icnpinfo" +"▩"; //ICNP 정보
- sStmtInfo +="I▦" + // 상태
- "▦" + // 진술문 코드
- "▦" +
- "99991231235959" + "▦" + // 종료일자
- sAttrInfo[3] + "▦" + // 진술문
- sOriginCD + "▦" + // 출처코드
- sAttrInfo[0] + "▦" + // 속성개수
- sAttrInfo[1] + "▦" + // 속성정보1
- sAttrInfo[2] + "▦" + // 속성정보2
- sAttrEssnYN + "▦" + // 속성 필수 입력 여부
- sDNARFlag + "▦" + // D.N.A.R 구분
- sStmtCntsDesc + "▦" + // 진술문 정의
- sRelaCause + "▦" + // 관련요인
- root.main.stmtmngt.stmtinfo.icnpmngt.icnpinfo.xml+ "▩"; // ICNP 정보
- // 속성이 없는 경우 선택/필수 여부를 입력하지 않도록 함.
- if(sAttrEssnYN == "" && eval(sAttrInfo[0])>0){
- messageBox("속성 등록 여부(선택 or 필수) 입력이 이루어지지","E007");
- return;
- }
- if(messageBox("","Q002") != '6') return;
- var refCond = "dnar▦stmtnm▦offset▦pagesize▩"
- + model.getValue("/root/main/cond/dnar")+"▦"
- + model.getValue("/root/main/cond/stmtnm")+"▦"
- + 0 +"▦";
- if(model.getValue("/root/hidden/stmtcnt") == ""){
- refCond += 500 +"▩";
- }else{
- refCond += model.getValue("/root/hidden/stmtcnt") +"▩";
- }
- model.makeValue("/root/send/stmtinfo",sStmtInfo);
- model.makeValue("/root/send/refCond", refCond);
- if(submit("TXMNR01801")){
- model.setValue("/root/hidden/stmtcnt", getNodesetCount("/root/main/stmtlist/stmtinfo") );
- fStmtInfoClear();
- // fSettingStmtStyle(); 임시
- model.copyNode("/root/hidden/stmtmngt","/root/main/stmtmngt");
- }
- }
- /**
- * @group :
- * @ver : 2007.03.06
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : 진술문 수정
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fStmtUpdt(){
- var sStmtCD = model.getValue(xStmtInfoPath+"/stmtcd"); // 진술문 코드
- var sStmtCnts = model.getValue(xStmtInfoPath+"/stmtcnts"); // 진술문장
- var sAttrEssnYN = model.getValue(xStmtInfoPath+"/attressnyn"); // 속성 필수 등록 여부
- var sOriginCD = model.getValue(xStmtInfoPath+"/origincd"); // 문장출처
- var sDNARFlag = model.getValue(xStmtInfoPath+"/dnarflag"); // DNAR 구분
- var sStmtCntsDesc = model.getValue(xStmtInfoPath+"/stmtcntsdesc"); //진술문장정의
- var sRelaCause = model.getValue(xStmtInfoPath+"/relacause"); //관련요인
- var sRowCnt = grd_terminfo.rows- grd_terminfo.fixedrows; // 용어분석 내역 개수
- var sTermCnt = 0;
- if(sStmtCD == "" && sStmtCnts == ""){
- messageBox("수정할 진술문이","I004");
- return;
- }
- if(sStmtCD == "" && sStmtCnts != ""){
- messageBox("등록된 진술문장이 아닙니다. 진술문 수정을","E001");
- return;
- }
- if(sStmtCnts == ""){
- messageBox("수정할 진술 문장을","C001");
- return;
- }
- if(sOriginCD == ""){
- messageBox("문장 출처를","C001");
- return;
- }
- if(sDNARFlag == ""){
- messageBox("D.N.A.R 분류 타입을","C001");
- return;
- }
- if(sRowCnt < 1){
- messageBox("문장 분석이 이루어지지","E007");
- //return; //일시적으로 주석처리
- }
- if(messageBox("","Q003") != '6') return;
- var sStmtInfo = fRgstTermAnaly();
- if(sStmtInfo == null) return;
- /*
- if(sStmtCnts == model.getValue(xBKStmtPath+"/stmtcnts") &&
- sAttrEssnYN == model.getValue(xBKStmtPath+"/attressnyn") &&
- sOriginCD == model.getValue(xBKStmtPath+"/origincd") &&
- sDNARFlag == model.getValue(xBKStmtPath+"/dnarflag")){
- messageBox("변경된 데이터가 없습니다. 진술문 수정을","E001");
- return;
- } */
- var sAttrInfo = sStmtInfo.split("▦");
- model.removenode("/root/send");
- var sStmtInfo = "stat" + "▦"+ //상태
- "stmtcd" + "▦"+ //진술문 코드
- "instcd" + "▦"+ //기관코드
- "todd" + "▦"+ //종료일자
- "stmtcnts" + "▦"+ //진술문
- "origincd" + "▦"+ //출처코드
- "attrcnt" + "▦"+ //속성개수
- "attrinfo1" + "▦"+ //속성정보1
- "attrinfo2" + "▦"+ //속성정보2
- "attressnyn" + "▦"+ //속성 필수 입력 여부
- "dnarflag" + "▦"+ //D.N.A.R 구분
- "stmtcntsdesc" + "▦"+ //진술문정의
- "relacause" + "▦" + //관련요인
- "icnpinfo" + "▩"; //ICNP 정보
- sStmtInfo +="U" + "▦" + // 상태
- sStmtCD + "▦" + // 진술문 코드
- model.getValue(xStmtInfoPath+"/instcd") + "▦" + // 기관코드
- model.getValue(xStmtInfoPath+"/todd") + "▦" + // 종료일자
- sAttrInfo[3] + "▦" + // 진술문
- sOriginCD + "▦" + // 출처코드
- sAttrInfo[0] + "▦" + // 속성개수
- sAttrInfo[1] + "▦" + // 속성정보1
- sAttrInfo[2] + "▦" + // 속성정보2
- sAttrEssnYN + "▦" + // 속성 필수 입력 여부
- sDNARFlag + "▦" + // D.N.A.R 구분
- sStmtCntsDesc + "▦" + // 진술문정의
- sRelaCause + "▦" + // 관련요인
- root.main.stmtmngt.stmtinfo.icnpmngt.icnpinfo.xml + "▩"; // ICNP 정보
- // 속성이 없는 경우 선택/필수 여부를 입력하지 않도록 함.
- if(sAttrEssnYN == "" && eval(sAttrInfo[0])>0){
- messageBox("속성 등록 여부(선택 or 필수) 입력이 이루어지지","E007");
- return;
- }
- var refCond = "dnar▦stmtnm▦offset▦pagesize▩"
- + model.getValue("/root/main/cond/dnar")+"▦"
- + model.getValue("/root/main/cond/stmtnm")+"▦"
- + 0 +"▦"
- + model.getValue("/root/hidden/stmtcnt") +"▩";
- model.makeValue("/root/send/stmtinfo",sStmtInfo);
- model.makeValue("/root/send/refCond", refCond);
- if(submit("TXMNR01801")){
- model.setValue("/root/hidden/stmtcnt", getNodesetCount("/root/main/stmtlist/stmtinfo") );
- fStmtInfoClear();
- // fSettingStmtStyle(); 임시
- model.copyNode("/root/hidden/stmtmngt","/root/main/stmtmngt");
- }
- }
- /**
- * @group :
- * @ver : 2007.03.06
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : 진술문 삭제
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fStmtDelete(){
- var sStmtCD = model.getValue(xStmtInfoPath+"/stmtcd"); // 진술문 코드
- var sStmtCnts = model.getValue(xStmtInfoPath+"/stmtcnts"); // 진술문장
- var sAttrEssnYN = model.getValue(xStmtInfoPath+"/attressnyn"); // 속성 필수 등록 여부
- var sOriginCD = model.getValue(xStmtInfoPath+"/origincd"); // 문장출처
- var sDNARFlag = model.getValue(xStmtInfoPath+"/dnarflag"); // DNAR 구분
- var sRowCnt = grd_terminfo.rows- grd_terminfo.fixedrows;
- if(sStmtCD == "" && sStmtCnts == ""){
- messageBox("삭제할 진술문이","I004");
- return;
- }
- if(sStmtCD == "" && sStmtCnts != ""){
- messageBox("등록된 진술문장이 아닙니다. 진술문 삭제를","E001");
- return;
- }
- var sStmtInfo = "stat▦"+ // 상태
- "stmtcd▦" + // 진술문 코드
- "instcd▦" + // 기관코드
- "todd▩"; // 종료일자
- sStmtInfo +="D▦" + // 상태
- sStmtCD + "▦" + // 진술문 코드
- model.getValue(xStmtInfoPath+"/instcd") + "▦" + // 기관코드
- model.getValue(xStmtInfoPath+"/todd") + "▩"; // 종료일자
- var refCond = "dnar▦stmtnm▦offset▦pagesize▩"
- + model.getValue("/root/main/cond/dnar")+"▦"
- + model.getValue("/root/main/cond/stmtnm")+"▦"
- + 0 +"▦"
- + model.getValue("/root/hidden/stmtcnt") +"▩";
- model.makeValue("/root/send/stmtinfo",sStmtInfo);
- model.makeValue("/root/send/refCond", refCond);
- if(submit("TXMNR01801")){
- model.setValue("/root/hidden/stmtcnt", getNodesetCount("/root/main/stmtlist/stmtinfo") );
- fStmtInfoClear();
- // fSettingStmtStyle(); 임시
- model.copyNode("/root/hidden/stmtmngt","/root/main/stmtmngt");
- }
- }
- /**
- * @group :
- * @ver : 2007.03.06
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : 진술문 Clear
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fStmtInfoClear(){
- var xPath = "/root/main/stmtmngt/stmtinfo";
- model.setValue(xPath+"/stmtcd","");
- model.setValue(xPath+"/instcd","");
- model.setValue(xPath+"/todd","");
- model.setValue(xPath+"/stmtcnts","");
- model.setValue(xPath+"/origincd","");
- model.setValue(xPath+"/attrcnt","");
- model.setValue(xPath+"/attrinfo1","");
- model.setValue(xPath+"/attrinfo2","");
- model.setValue(xPath+"/attressnyn","");
- model.setValue(xPath+"/dnarflag","");
- model.setValue(xPath+"/stmtcntsdesc","");
- model.setValue(xPath+"/relacause","");
- model.removenodeset(xPath+"/icnpmngt/icnpinfo");
- model.removenodeset("/root/main/termanaly");
- model.removenodeset(xGrupInfoPath); // 진술문 분류체계 사용내역 지우기
- model.refresh();
- }
- /**
- * @group :
- * @ver : 2007.03.06
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : 전체선택
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fAllChoi(){
- var sRow = grd_terminfo.rows - grd_terminfo.fixedrows;
- if(sRow <1) return;
- for(var i=1; i<=sRow; i++){
- model.setValue(xTermInfoPath+"["+i+"]/check","true");
- }
- }
- /**
- * @group :
- * @ver : 2007.03.06
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : 진술문 내 작성자 ToolTip 보기
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function OnMouseMoveGrid(){
- var iRow = grd_stmtlist.mouseRow;
- var iCol = grd_stmtlist.mouseCol;
- var sRow = grd_stmtlist.rows - grd_stmtlist.fixedrows;
- var sToolTipvw = model.getValue("/root/main/cond/tooltipvw");
- var sToolTipMsg = "";
- if(iRow > 0 && iCol > 0 && sToolTipvw == "Y"){
- var xPath = "/root/main/stmtlist/stmtinfo";
- var sStmtCnts = model.getValue(xPath+"["+iRow+"]/stmtcnts");
- var sLastupdtdt = model.getValue(xPath+"["+iRow+"]/lastupdtdt");
- var sLastupdtrnm = model.getValue(xPath+"["+iRow+"]/lastupdtrnm");
- sToolTipMsg = "등록문장: "+sStmtCnts+" 기록정보: "+
- sLastupdtdt.substr(0,4)+"-"+sLastupdtdt.substr(4,2) +"-"+
- sLastupdtdt.substr(6,2)+" "+sLastupdtdt.substr(8,2) +":"+
- sLastupdtdt.substr(10,2)+" - " + sLastupdtrnm;
- grd_stmtlist.tooltiptext(iRow,iCol) = sToolTipMsg;
- }else{
- grd_stmtlist.tooltiptext(iRow,iCol) = "";
- }
- }
- /**
- * @group :
- * @ver : 2007.03.07
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : 속성 관리 화면 팝업
- * @desc :
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fPopUpCall(pFlag){
- if(pFlag == "AttrMngt"){
- var xpos = event.screenX-1000;
- var ypos = event.screenY-100;
- modal("SMMNR01700", 1, xpos, ypos);
- }else if(pFlag == "ICNPTerm"){
- var xpos = event.screenX-800;
- var ypos = event.screenY-400;
- var iRow = grd_terminfo.row;
- if(iRow < 1){
- messageBox("ICNP 매핑할 용어가","I004");
- //return;
- }
- model.makeValue("/root/hidden/refinfo/flag","p");
- modal("SMMNR01200",1, xpos, ypos,"SMMNR01200","/root/hidden/refinfo","/root/hidden/refinfo");
- var sTermInfo = getParameter("terminfo");
- if(sTermInfo == "") return;
- var sValue = sTermInfo.split("▦");
- model.setValue(xTermInfoPath+"["+iRow+"]/smnttypecd", sValue[0]);
- model.setValue(xTermInfoPath+"["+iRow+"]/itemcd", sValue[1]);
- model.setValue(xTermInfoPath+"["+iRow+"]/icnphngterm", sValue[2]);
- model.setValue(xTermInfoPath+"["+iRow+"]/icnpengterm", sValue[3]);
- model.setValue(xTermInfoPath+"["+iRow+"]/cnptid", sValue[4]);
- grd_terminfo.rebuild();
- }
- }
- /**
- * @group :
- * @ver : 2007.04.19
- * @by : 이은영
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진술문 폰트 color 변경 - 속성이 있는 경우 진술문 폰트 색상을 변경한다.
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSettingStmtStyle(){
- grd_stmtlist.allstyle("data","color") = "#000000";
- for(var iRow=grd_stmtlist.fixedrows; iRow<=grd_stmtlist.rows-grd_stmtlist.fixedrows; iRow++){
- if(eval(model.getValue(xStmtListPath+"["+iRow+"]/attrcnt"))>0){
- grd_stmtlist.cellstyle("color",iRow,4) = "#CC0099"; // 보라
- }
- }
- }
- /**
- * @group :
- * @ver : 2007.11.29
- * @by : 양천덕
- * @---------------------------------------------------
- * @type : function
- * @access : public
- * @desc : 진술문 페이지 별 검색
- * @param :
- * @return :
- * @---------------------------------------------------
- */
- function fSubmitOnScroll() {
- if(grd_stmtlist.vscroll.attribute("max") == grd_stmtlist.vscroll.attribute("pos")) {
- if(model.getValue("/root/hidden/stmtcnt") != model.getValue("/root/hidden/stmtcnt1") ){
- model.setValue("/root/hidden/stmtcnt1", getNodesetCount("/root/main/stmtlist/stmtinfo") );
- model.removenode("/root/send");
- model.makeValue("/root/send/dnar", model.getValue("/root/main/cond/dnar"));
- model.makeValue("/root/send/stmtnm", model.getValue("/root/main/cond/stmtnm"));
- model.makeValue("/root/send/offset", grd_stmtlist.rows-grd_stmtlist.fixedRows );
- model.makeValue("/root/send/pagesize", 500);
- if(submit("TRMNR01803")){
- grd_stmtlist.dispatch("onmouseup");
- model.setValue("/root/hidden/stmtcnt", getNodesetCount("/root/main/stmtlist/stmtinfo") );
- grd_stmtlist.rebuild();
- }
- }
- }
- }
|