3cooking 5 年之前
父節點
當前提交
125002639c

+ 1 - 1
.idea/misc.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="JDK" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/build/classes" />
   </component>
   <component name="ProjectType">

+ 3 - 1
app/build.gradle

@@ -17,8 +17,9 @@ android {
 
         buildConfigField "String", "originalPackageName", "\"com.dbs.dbsec\"";
 //        buildConfigField "String", "CONSENT_SERVER_URL", "\"http://wcollector.idatabank.com:8091/\""
-        buildConfigField "String", "CONSENT_SERVER_URL", "\"http://172.16.10.192:8080/\""
+        buildConfigField "String", "CONSENT_SERVER_URL", "\"http://172.16.10.193:8080/\""
         buildConfigField "String", "CONSENT_EFORM_SERVER_URL", "\"http://wcollector.idatabank.com:5228/\""
+//        buildConfigField "String", "CONSENT_EFORM_SERVER_URL", "\"http://211.118.215.111:8090/\""
         buildConfigField "String", "INST_CD", "\"031\""
         manifestPlaceholders = [appLabel: "전자동의서 데모"]
     }
@@ -36,6 +37,7 @@ android {
             buildConfigField "String", "originalPackageName", "\"com.dbs.dbsec\"";
             buildConfigField "String", "CONSENT_SERVER_URL", "\"http://wcollector.idatabank.com:8091/\""
             buildConfigField "String", "CONSENT_EFORM_SERVER_URL", "\"http://wcollector.idatabank.com:5228/\""
+//            buildConfigField "String", "CONSENT_EFORM_SERVER_URL", "\"http://211.118.215.111:8090/\""
             buildConfigField "String", "INST_CD", "\"031\""
             manifestPlaceholders = [appLabel: "전자동의서 데모"]
 

+ 2 - 2
app/src/main/java/com/dbs/dbsec/activity/ConsentActivity.java

@@ -38,6 +38,7 @@ import com.dbs.dbsec.consent.sign.SignWrapper;
 import com.dbs.dbsec.customView.CustomAlertDialog;
 import com.dbs.dbsec.customView.CustomRadioGroup;
 import com.dbs.dbsec.customView.LoadingProgress;
+import com.dbs.dbsec.model.PatientInfoVO;
 import com.dbs.dbsec.util.Common;
 import com.dbs.dbsec.util.ConsentConfig;
 
@@ -53,8 +54,6 @@ public class ConsentActivity extends AppCompatActivity {
   public LeftMenu leftMenu;
   public RightMenu rightMenu;
   public CenterMenu centerMenu;
-//  public CenterMenu centerMenu;
-//  private RightMenu rightMenu;
 
   public HistoryFragment history;
   public MarkerFragment  marker;
@@ -451,6 +450,7 @@ public class ConsentActivity extends AppCompatActivity {
     });
   }
 
+
   @Override
   public void onBackPressed() {
     if(System.currentTimeMillis() > backKeyPressedTime + 2000) {

+ 3 - 1
app/src/main/java/com/dbs/dbsec/activity/LoginActivity.java

@@ -31,6 +31,7 @@ import com.dbs.dbsec.httpTask.ParseJsonData;
 import com.dbs.dbsec.model.UserLoginDeptList;
 import com.dbs.dbsec.util.Common;
 import com.dbs.dbsec.util.ConsentConfig;
+import com.dbs.dbsec.util.ConvertToEnglish;
 
 import java.lang.reflect.Array;
 import java.text.SimpleDateFormat;
@@ -154,7 +155,8 @@ public class LoginActivity extends AppCompatActivity {
   private void loginEvent() {
     loadingProgress.show();
     userId = etId.getText().toString();
-    userPw = etPasswd.getText().toString();
+    userPw = ConvertToEnglish.convertToEnglish(etPasswd.getText().toString());
+    Log.e(TAG, "userPw -- > " + userPw);
     String certStrFlag = "";
 
 

+ 43 - 4
app/src/main/java/com/dbs/dbsec/activity/adapter/ConsentListAdapter.java

@@ -14,11 +14,15 @@ import com.dbs.dbsec.BuildConfig;
 import com.dbs.dbsec.R;
 import com.dbs.dbsec.activity.ConsentActivity;
 import com.dbs.dbsec.activity.fragment.MarkerFragment;
+import com.dbs.dbsec.consent.ConsentCreateParam;
+import com.dbs.dbsec.consent.ConsentFacade;
 import com.dbs.dbsec.httpTask.CallBack;
 import com.dbs.dbsec.model.ConsentFormListVO;
+import com.dbs.dbsec.model.PatientInfoVO;
 import com.dbs.dbsec.util.Common;
 import com.dbs.dbsec.util.ConsentConfig;
 
+import java.lang.reflect.Array;
 import java.util.ArrayList;
 import java.util.HashMap;
 
@@ -119,10 +123,45 @@ public class ConsentListAdapter extends RecyclerView.Adapter<ConsentListAdapter.
       final int position = holder.getLayoutPosition();
       final ConsentFormListVO consentFormListVO = arrayList.get(position);
 
-      String formCd = consentFormListVO.getFormCode();
+      String userId        = Common.getStringPreference(mContext, "userInfo", "userId");
+      String idx           = consentFormListVO.getIdx();
+      String formCd        = consentFormListVO.getFormCode();
+      String formId        = consentFormListVO.getFormId();
+      String formName      = consentFormListVO.getFormName();
+      String formPrntNm    = consentFormListVO.getFormPrntNm();
+      String printCnt      = consentFormListVO.getPrintCnt();
+      String consentMstRid = consentFormListVO.getConsentMstRid();
+      String pid = consentFormListVO.getPid();
+      String ocrTag = consentFormListVO.getOcrTag();
+      String clnDate = consentFormListVO.getClnDate();
+      String cretNo = consentFormListVO.getCretNo();
+      String ordType = consentFormListVO.getOrdType();
+      String deptCd = consentFormListVO.getDeptCd();
+      String mainDrId = consentFormListVO.getMainDrId();
+      String certPass = consentFormListVO.getCertPass();
 
       if (v == holder.listLayer) {
 
+        if (Common.sessionTimeCheck(mContext)) {
+          PatientInfoVO patientInfoVO = ((ConsentActivity) mContext).centerMenu.patientInfoVO;
+          if (patientInfoVO == null) {
+            instance.showSingButtonDialog(mContext.getString(R.string.emptyPatientInfo));
+          } else {
+            ConsentCreateParam consentCreateParam = new ConsentCreateParam(mContext, patientInfoVO);
+            HashMap<String, String> globalParam = consentCreateParam.globalParam(consentMstRid);
+            ArrayList<HashMap<String, String>> consentArray = consentCreateParam.consentParam(consentMstRid, formId, formCd, formName, pid, ocrTag, clnDate, cretNo, ordType, deptCd, mainDrId);
+
+            HashMap consentData = new HashMap();
+            consentData.put("globalParam", globalParam);
+            consentData.put("consentArray", consentArray);
+            ConsentFacade consentFacade = new ConsentFacade(mContext, instance.indexPage, "", "");
+            consentFacade.startConsent(consentData, certPass);
+          }
+
+
+        }
+
+
       } else if (v == holder.tvSubText) {
         String httpUrl = "";
         String alertMsg = "";
@@ -138,9 +177,9 @@ public class ConsentListAdapter extends RecyclerView.Adapter<ConsentListAdapter.
         instance.csAlert.show();
         instance.csAlert.setContent(alertMsg, "");
 
-        final String finalUrl = httpUrl;
+        final String finalUrl    = httpUrl;
         final String finalFormCd = formCd;
-        final String idx = consentFormListVO.getIdx();
+        final String finalIdx    = idx;
 
         instance.csAlert.btnConfirm.setOnClickListener(new View.OnClickListener() {
           @Override
@@ -199,7 +238,7 @@ public class ConsentListAdapter extends RecyclerView.Adapter<ConsentListAdapter.
             mData.put("formCd", finalFormCd);
 
             if (apiType.equals(ConsentConfig.GET_USER_FORM_SET)) {
-              mData.put("idx", idx);
+              mData.put("idx", finalIdx);
             }
             Log.e(TAG, "mData -- > " + mData);
 

+ 193 - 0
app/src/main/java/com/dbs/dbsec/consent/ConsentCreateParam.java

@@ -0,0 +1,193 @@
+package com.dbs.dbsec.consent;
+
+import android.content.Context;
+import android.util.Log;
+
+import com.dbs.dbsec.R;
+import com.dbs.dbsec.activity.ConsentActivity;
+import com.dbs.dbsec.model.PatientInfoVO;
+import com.dbs.dbsec.util.Common;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+
+public class ConsentCreateParam {
+  private static final String TAG = ConsentCreateParam.class.getSimpleName();
+
+  private Context       mContext;
+  private PatientInfoVO patientInfoVO;
+  private String        indexPage = "";
+
+  public ConsentCreateParam(Context mContext, PatientInfoVO patientInfoVO) {
+    this.mContext = mContext;
+    this.patientInfoVO = patientInfoVO;
+    this.indexPage = ((ConsentActivity) mContext).indexPage;
+  }
+
+  public HashMap<String, String> globalParam(String consentMstRid) {
+    HashMap<String, String> globalParam = new HashMap<String, String>();
+
+    int rid;
+    if (consentMstRid.equals("")) {
+      rid = 0;
+    } else {
+      rid = Integer.parseInt(consentMstRid);
+    }
+    Log.e(TAG, "rid -- > " + rid);
+
+    String userId     = Common.getStringPreference(mContext, "userInfo", "userId");
+    String userName   = Common.getStringPreference(mContext, "userInfo", "userName");
+    String userDeptCd = Common.getStringPreference(mContext, "userInfo", "deptCd");
+    String drKind     = Common.getStringPreference(mContext, "userInfo", "drKind");
+
+    if (rid == 0) {
+
+      String ordTypeStr  = "";
+      String ordDeptCd   = patientInfoVO.getOrdDeptCd();
+      String deptEngAbbr = patientInfoVO.getDeptEngAbbr();
+      String ordDeptNm   = patientInfoVO.getOrdDeptNm();
+      String pid         = patientInfoVO.getPid();
+      String cretNo      = patientInfoVO.getCretNo();
+      String roomCd      = patientInfoVO.getRoomCd();
+      String inDd        = patientInfoVO.getInDd();
+      String dschDd      = patientInfoVO.getDschDd();
+      String ordType     = patientInfoVO.getOrdType();
+      String instCd      = patientInfoVO.getInstCd();
+      String mainDrId    = patientInfoVO.getMainDrId();
+      String erDrNm      = patientInfoVO.getErDrNm();
+      String firstRgstDt = patientInfoVO.getFirstRgstDt();
+      String sa          = patientInfoVO.getSa();
+      String patientName = patientInfoVO.getPatientName();
+      String juminNo     = patientInfoVO.getJuminNo();
+      String zipCdAddr   = patientInfoVO.getZipCdAddr();
+      String telNum      = patientInfoVO.getTelNum();
+      String insuKind    = patientInfoVO.getInsuKind();
+      String ward        = patientInfoVO.getWard();
+      String dxCd        = patientInfoVO.getDxCd();
+      String dxNm        = patientInfoVO.getDxNm();
+      String gb          = patientInfoVO.getGb();
+      String gbn         = patientInfoVO.getGbn();
+      String opDeptCd    = patientInfoVO.getOpDeptCd();
+      String opDeptNm    = patientInfoVO.getOpDeptNm();
+      String opDrNm      = patientInfoVO.getOpDrNm();
+      String opDrId      = patientInfoVO.getOpDrId();
+      String opCnfmDd    = patientInfoVO.getOpCnfmDd();
+      String perfDrNm    = patientInfoVO.getPerfDrNm();
+      String perfDrFlag  = patientInfoVO.getPerfDrFlag();
+      String perfDrDept  = patientInfoVO.getPerfDrDept();
+      String opDiagNm    = patientInfoVO.getOpDiagNm();
+      String opNm        = patientInfoVO.getOpNm();
+      String anstDrNm1   = patientInfoVO.getAnstDrNm1();
+      String anstDrFlag1 = patientInfoVO.getAnstDrFlag1();
+      String anstDeptNm1 = patientInfoVO.getAnstDeptNm1();
+      String anstDrNm2   = patientInfoVO.getAnstDrNm2();
+      String anstDrFlag2 = patientInfoVO.getAnstDrFlag2();
+      String anstDeptNm2 = patientInfoVO.getAnstDeptNm2();
+      String anstDrNm3   = patientInfoVO.getAnstDrNm3();
+      String anstDrFlag3 = patientInfoVO.getAnstDrFlag3();
+      String anstDeptNm3 = patientInfoVO.getAnstDeptNm3();
+      String opRsrvNo    = patientInfoVO.getOpRsrvNo();
+      String orderNo     = patientInfoVO.getOrderNo();
+      String printTime   = patientInfoVO.getPrintTime();
+      String ocrCd       = patientInfoVO.getOcrCd();
+      String inputId     = patientInfoVO.getInputId();
+      String inputNm     = patientInfoVO.getInputNm();
+      String signImg     = patientInfoVO.getSignImg();
+      String bp          = patientInfoVO.getBp();
+      String dm          = patientInfoVO.getDm();
+      String heart       = patientInfoVO.getHeart();
+      String kidney      = patientInfoVO.getKidney();
+      String respiration = patientInfoVO.getRespiration();
+      String hx          = patientInfoVO.getHx();
+      String allergy     = patientInfoVO.getAllergy();
+      String drug        = patientInfoVO.getDrug();
+      String smoking     = patientInfoVO.getSmoking();
+      String idio        = patientInfoVO.getIdio();
+      String nacrotics   = patientInfoVO.getNacrotics();
+      String airway      = patientInfoVO.getAirway();
+      String hemorrhage  = patientInfoVO.getHemorrhage();
+      String statusEt    = patientInfoVO.getStatusEt();
+
+      if (ordType.equals("I")) {
+        ordTypeStr = mContext.getString(R.string.admission);
+      } else if (ordType.equals("O")) {
+        ordTypeStr = mContext.getString(R.string.outPatient);
+      } else if (ordType.equals("E")) {
+        ordTypeStr = mContext.getString(R.string.emergency);
+      } else if (ordType.equals("OP")) {
+        ordTypeStr = mContext.getString(R.string.surgery);
+      }
+
+      globalParam.put("par_explDrNm", userName);
+      globalParam.put("par_patientCretno", cretNo);
+      globalParam.put("par_patientId", pid);
+      globalParam.put("par_patientOrdtype", ordTypeStr);
+      globalParam.put("par_patientNm", patientName);
+      globalParam.put("par_patientSexAge", sa);
+      globalParam.put("par_patientRrn", juminNo);
+      globalParam.put("par_patientClnDeptCd", "");
+      globalParam.put("par_patientClnDeptNm", "");
+      globalParam.put("par_patientClnDt", inDd);
+      globalParam.put("par_patientBirthday", "");
+      globalParam.put("par_patientTelNo", "");
+      globalParam.put("par_patientMpNo", telNum);
+      globalParam.put("par_patientAddress", zipCdAddr);
+      globalParam.put("par_patientWardNo", ward);
+      globalParam.put("par_patientRoomNo", roomCd);
+      globalParam.put("par_explMpNo", ""); // 설명의사 연락처
+      globalParam.put("par_explAnstDrNm", "");
+      globalParam.put("par_explAnstDrMpNo", "");
+      globalParam.put("par_diagHngnm", opDrNm);
+      globalParam.put("par_opNm", opNm);
+      globalParam.put("par_opremFact", "");
+      globalParam.put("par_opRsrvNo", opRsrvNo);
+      globalParam.put("par_opCnFmDd", opCnfmDd);
+//      globalParam.put("par_mainDr1Nm", mainDrNm);
+      globalParam.put("par_prefDr1Dept", "");
+      globalParam.put("par_geDr1Dept", "");
+      globalParam.put("par_anstDr1Nm", "");
+      globalParam.put("par_anstDr1PrefDrDept", "");
+      globalParam.put("par_anstDr1GeDrDept", "");
+      globalParam.put("par_userDeptCd", userDeptCd);
+      globalParam.put("par_userId", userId);
+      globalParam.put("par_userNm", userName);
+
+      globalParam.put("ordType", ordType);
+      globalParam.put("patientDeptCd", ordDeptCd);
+      globalParam.put("mainDrId", mainDrId);
+      globalParam.put("dSchDd", dschDd);
+    }
+//    if (!drKind.equals("C")) {
+//      HashMap<String, String> mData = new HashMap<String, String>();
+//
+//
+//    }
+    return globalParam;
+  }
+
+  public ArrayList<HashMap<String, String>> consentParam(String consentMstRid, String formId, String formCode, String formName, String pid, String ocrTag, String clnDate, String cretNo, String ordType, String deptCd, String mainDrId) {
+    ArrayList<HashMap<String, String>> consentArray = new ArrayList<>();
+    HashMap<String, String> consentParam = new HashMap<>();
+    consentParam.put("consentMstRid", consentMstRid);
+    consentParam.put("formId", formId);
+    consentParam.put("formCode", formCode);
+    if (patientInfoVO != null) {
+      consentParam.put("par_mainDr1Nm", patientInfoVO.getMainDrName());
+    }
+    consentParam.put("par_formNm", formName);
+    consentParam.put("par_ocrCd", ocrTag);
+    consentParam.put("par_patientClnDt", clnDate);
+    consentParam.put("par_patientId", pid);
+    consentParam.put("par_ocrCd", ocrTag);
+    consentParam.put("ordType", ordType);
+    consentParam.put("patientDeptCd", deptCd);
+    consentParam.put("mainDrId", mainDrId);
+    consentParam.put("par_patientCretno", cretNo);
+
+    consentArray.add(consentParam);
+
+    return consentArray;
+  }
+
+
+}

+ 89 - 12
app/src/main/java/com/dbs/dbsec/consent/ConsentFacade.java

@@ -1,11 +1,17 @@
 package com.dbs.dbsec.consent;
 
 import android.content.Context;
+import android.util.Log;
 
+import com.dbs.dbsec.BuildConfig;
 import com.dbs.dbsec.R;
 import com.dbs.dbsec.activity.ConsentActivity;
+import com.dbs.dbsec.util.Common;
 import com.dbs.dbsec.util.ConsentConfig;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+
 import kr.co.clipsoft.eform.EFormToolkit;
 import kr.co.clipsoft.eform.information.RunOption;
 import kr.co.clipsoft.eform.type.enumtype.LogLevel;
@@ -18,33 +24,29 @@ public class ConsentFacade {
   private ConsentActivity instance;
   private EFormToolkit eFormToolkit;
 
-  private String consentStateEng = "";
+  private String indexPage = "";
+  private String patientState = "";
+  private String certify = "";
 
 
-  public ConsentFacade(Context mContext, String consentStateEng) {
+  public ConsentFacade(Context mContext, String indexPage, String patientState, String certify) {
     this.mContext = mContext;
     this.eFormToolkit = new EFormToolkit(mContext);
     this.instance = ((ConsentActivity) mContext);
-    this.consentStateEng = consentStateEng;
+    this.indexPage = indexPage;
+    this.patientState = patientState;
+    this.certify = certify;
   }
 
   private RunOption getRunOption(String consentMstRid) {
 
-    int sessionTime = Integer.parseInt(ConsentConfig.SETTING_DATA.get("SESSION_TIME"));
-
     RunOption runOption = new RunOption();
     runOption.setDefaultZoomRate(1); // 화면 최초 로딩 시 서식 scale 크기 설정 1 ~ 4 default value : -1.0 (임의 조정하지 않음)
     runOption.setInitializeScrollOnPageMove(true); // 서식 페이지 이동시 스크롤 초기화 여부 true : 이동시 초기화, false : 초기화 하지 않음
     runOption.setInitializeScaleOnPageMove(true); // 페이지 이동시 scale 초기화 여부 true : 초기화, false : 초기화 하지 않음
-
-    if (consentMstRid.equals("0")) {
-      runOption.setParameterDefaultValueClear(true); // 서식에 저장되어 있는 파라미터 값 초기화 여부 true : 초기화, false : 초기화 하지 않음
-    } else {
-      runOption.setParameterDefaultValueClear(false); // 서식에 저장되어 있는 파라미터 값 초기화 여부 true : 초기화, false : 초기화 하지 않음
-    }
+    runOption.setParameterDefaultValueClear(true); // 서식에 저장되어 있는 파라미터 값 초기화 여부 true : 초기화, false : 초기화 하지 않음
     runOption.setLogLevel(LogLevel.INFO); // 레벨에 맞는 로그를 기록함
     runOption.setFosLogging(true); // FOS를 파일로 로깅할지 여부를 설정함 true : FOS를 파일로 로깅함, false : 로깅하지 않음
-
     runOption.setDataXmlSaveAsFileOnTempSave(false); // 임시저장 시 dataXml 리턴 시 file 여부(true : file, false : String)
     runOption.setReturnDataXmlOnTempSave(true); // 임시저장 시 데이터 XMl도 함께 저장할지 여부를 설정함 true : 함께 저장, false : 저장 X
     runOption.setDataXmlSaveAsFileOnSave(false); // 저장 시 데이터를 xml 문자열 형태로 받을지, 파일로 저장 후 저장된 파일의 path 로 받을지 설정함 true :  로컬에 저장 후 경로 반환, false : xml 문자열 반환
@@ -65,6 +67,81 @@ public class ConsentFacade {
     return runOption;
   }
 
+  public void startConsent(HashMap consentData, String certPass) {
+    HashMap<String, String> globalParam = (HashMap<String, String>) consentData.get("globalParam");
+    ArrayList<HashMap<String, String>> formList = (ArrayList<HashMap<String, String>>) consentData.get("consentArray");
+    String fos = createFOS(consentData);
+    String consentMstRid = formList.get(0).get("consentMstRid");
+
+    eFormToolkit.setRunOption(getRunOption(consentMstRid));
+
+    eFormToolkit.startEFormViewer(fos);
+
+  }
+
+  public String createFOS(HashMap consentData) {
+    String fos = "";
+
+    fos  = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
+    fos += "  <fos version=\"1.0\">";
+    fos += "    <global>";
+    fos += "      <parameters>";
+    fos += createParam((HashMap<String,String>) consentData.get("globalParam"));
+    fos += "      </parameters>";
+    fos += "      <page-template path='" + BuildConfig.CONSENT_EFORM_SERVER_URL + "' request-encode='utf-8' response-encode='utf-8'>";
+    fos += "        <template-get-parameters>";
+    fos += "          <post-param key='parameter'><![CDATA[{}]]></post-param>";
+    fos += "        </template-get-parameters>";
+    fos += "      </page-template>";
+    fos += "    </global>";
+    fos += "    <form-list>";
+    fos += formParam((ArrayList<HashMap<String, String>>) consentData.get("consentArray"));
+    fos += "    </form-list>";
+    fos += "  </fos>";
+
+    Log.e(TAG, "fos -- > " + fos);
+    return fos;
+  }
+
+  private String formParam(ArrayList<HashMap<String, String>> consentArray) {
+    String formStr = "";
+    int seq = 0;
+
+    if (consentArray.size() > 0) {
+      for (int i = 0; i < consentArray.size(); i++) {
+        HashMap<String ,String> data = consentArray.get(i);
+        seq += seq + 1;
+
+        formStr += "  <form name=\""+ consentArray.get(i).get("par_formNm") +"\" open-sequence='"+ seq +"' path='"+ BuildConfig.CONSENT_EFORM_SERVER_URL +"' request-encode='utf-8' response-encode='utf-8' compression='false'>";
+        formStr += "    <form-get-parameters>";
+        formStr += "    <post-param key='parameter'>";
+        formStr += "      <![CDATA[{'formId':'"+ consentArray.get(i).get("formId") +"', 'formVersion':'-1'}]]>";
+        formStr += "    </post-param>";
+        formStr += "    </form-get-parameters>";
+        formStr += "  <attachments>";
+//        formStr += "    <record-files>";
+//        formStr +=        recordFileTag(data);
+//        formStr += "    </record-files>";
+        formStr += "  </attachments>";
+        formStr += "  </form>";
+      }
+    }
+
+    return formStr;
+  }
+
+  private String createParam(HashMap<String, String> globalParam) {
+    String paramStr = "";
+
+    if (globalParam != null && !globalParam.isEmpty()) {
+      for (String key : globalParam.keySet()) {
+        paramStr += "<param key='" + key +"'><![CDATA[" + globalParam.get(key) + "]]></param>";
+      }
+    }
+
+    return paramStr;
+  }
+
   private String getUiStyle() {
 
     String str = "{                                                                                                                                         " +

+ 15 - 0
app/src/main/java/com/dbs/dbsec/util/Common.java

@@ -521,4 +521,19 @@ public class Common {
 
     return builder.create();
   }
+
+  public static String changeJuminToBirthday2(String dateStr) {
+
+    String resDate = "";
+    try {
+      SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");
+      Date date = date = df.parse(dateStr);
+      SimpleDateFormat df1 = new SimpleDateFormat("yyyy-MM-dd");
+      resDate = df1.format(date);
+    } catch (ParseException e) {
+      e.printStackTrace();
+    }
+
+    return resDate;
+  }
 }

+ 180 - 0
app/src/main/java/com/dbs/dbsec/util/ConvertToEnglish.java

@@ -0,0 +1,180 @@
+package com.dbs.dbsec.util;
+
+public class ConvertToEnglish {
+  /**
+   * 한글을 초성, 중성, 종성으로 분리하여
+   * 해당 키보드에 맞는 영어로 변환하는 클래스
+   */
+
+  final static char[] choSung = {
+    //  ㄱ      ㄲ      ㄴ       ㄷ      ㄸ       ㄹ      ㅁ      ㅂ      ㅃ      ㅅ
+    0x3131, 0x3132, 0x3134, 0x3137, 0x3138, 0x3139, 0x3141, 0x3142, 0x3143, 0x3145,
+    //  ㅆ      ㅇ       ㅈ      ㅉ      ㅊ       ㅋ      ㅌ      ㅍ      ㅎ
+    0x3146, 0x3147, 0x3148, 0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e
+  };
+
+  final static String[] choSungEng = {
+    "r", "R", "s", "e", "E", "f", "a", "q", "Q", "t", "T", "d", "w", "W", "c", "z", "x", "v"," g"
+  };
+
+  final static char[] jungSung = {
+    //  ㅏ       ㅐ      ㅑ      ㅒ      ㅓ      ㅔ      ㅕ       ㅖ      ㅗ      ㅘ       ㅙ
+    0x314f, 0x3150, 0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156, 0x3157, 0x3158, 0x3159,
+    //  ㅚ       ㅛ      ㅜ      ㅝ      ㅞ      ㅟ       ㅠ      ㅡ      ㅢ      ㅣ
+    0x315a, 0x315b, 0x315c, 0x315d, 0x315e, 0x315f, 0x3160, 0x3161, 0x3162, 0x3163
+  };
+
+  final static String[] jungSungEng = {
+    "k", "o", "i", "O", "j", "p", "u", "P", "h", "hk", "ho", "hl", "y", "n", "nj", "np", "nl", "b", "m", "ml", "l"
+  };
+
+  final static char[] jongSung = {
+    //" "   ㄱ      ㄲ      ㄳ      ㄴ      ㄵ       ㄶ     ㄷ       ㄹ      ㄺ      ㄻ       ㄼ      ㄽ
+    0, 0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3139, 0x313a, 0x313b, 0x313c, 0x313d,
+    //    ㄾ      ㄿ      ㅀ     ㅁ       ㅂ       ㅄ      ㅅ      ㅆ       ㅇ     ㅈ        ㅊ      ㅋ     ㅌ      ㅍ       ㅎ
+    0x313e, 0x313f, 0x3140, 0x3141, 0x3142, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e
+  };
+
+  final static String[] jongSungEng ={
+    "", "r", "R", "rt", "s", "sw", "sg", "e", "f", "fr", "fa", "fq", "ft", "fx", "fv", "fg", "a", "q", "qt", "t", "T", "d", "w", "c", "z", "x", "v", "g"
+  };
+
+  public static String convertToJaso(String pwd) {
+    int a, b, c;
+    String result = "";
+
+    for (int i = 0; i < pwd.length(); i++) {
+      char ch = pwd.charAt(i);
+
+      if (ch >= 0xAC00 && ch <= 0xD7A3) {
+        c = ch - 0xAC00;
+        a = c / (21 * 28);
+        c = c % (21 * 28);
+        b = c / 28;
+        c = c % 28;
+
+        result = result + choSung[a] + jungSung[b];
+
+        if (c != 0) {
+          result = result + jongSung[c];
+        }
+      } else {
+        result = result + ch;
+      }
+    }
+    return result;
+  }
+
+  public static String convertToEnglish(String pwd) {
+    int a, b, c;
+    String result = "";
+
+    for (int i = 0; i < pwd.length(); i++) {
+      char ch = pwd.charAt(i);
+
+      if (ch >= 0xAC00 && ch <= 0xD7A3) {
+        c = ch - 0xAC00;
+        a = c / (21 * 28);
+        c = c % (21 * 28);
+        b = c / 28;
+        c = c % 28;
+
+        result = result + choSungEng[a] + jungSungEng[b];
+
+        if (c != 0) {
+          result = result + jongSungEng[c];
+        }
+      } else if (ch >= 0x3131 && ch <= 0x3163) {
+        String temp = null;
+
+        temp = findChoSung(ch);
+        if (temp != null) {
+          result = result + temp;
+        } else {
+          temp = findJungSung(ch);
+          if (temp != null) {
+            result = result + temp;
+          } else {
+            temp = findJongSung(ch);
+            if (temp != null) {
+              result = result + temp;
+            } else {
+              result = result + ch;
+            }
+          }
+        }
+      } else {
+        result = result + ch;
+      }
+    }
+    return result;
+  }
+
+//  public static String convertToSingleChar(String pwd) {
+//    String result = "";
+//    String temp = null;
+//
+//    for (int i = 0; i < pwd.length(); i++) {
+//      char ch = pwd.charAt(i);
+//
+//      if (ch >= 0x3131 && ch <= 0x3163) {
+//        temp = findChoSung(ch);
+//        if (temp != null) {
+//          result = result + temp;
+//        } else {
+//          temp = findJungSung(ch);
+//          if (temp != null) {
+//            result = result + temp;
+//          } else {
+//            temp = findJongSung(ch);
+//            if (temp != null) {
+//              result = result + temp;
+//            } else {
+//              result = result + ch;
+//            }
+//          }
+//        }
+//      } else {
+//        result = result + ch;
+//      }
+//    }
+//    return result;
+//  }
+
+  private static String findJongSung(char ch) {
+    String result = null;
+
+    for (int i = 0; i < jongSung.length; i++) {
+      if (jongSung[i] == ch) {
+        result = jongSungEng[i];
+        break;
+      }
+    }
+    return result;
+  }
+
+  private static String findJungSung(char ch) {
+    String result = null;
+
+    for (int i = 0; i < jungSung.length; i++) {
+      if (jungSung[i] == ch) {
+        result = jungSungEng[i];
+        break;
+      }
+    }
+    return result;
+  }
+
+  public static String findChoSung(char ch) {
+    String result = null;
+
+    for (int i = 0; i < choSung.length; i++) {
+      if (choSung[i] == ch) {
+        result = choSungEng[i];
+        break;
+      }
+    }
+    return result;
+  }
+
+}