songjunekeun il y a 5 ans
Parent
commit
5c55e520b7

+ 10 - 6
app/src/main/java/com/dbs/mplus/knuh/activity/LoginActivity.java

@@ -103,6 +103,9 @@ public class LoginActivity extends AppCompatActivity {
 //    etId.setText("96070");
 //    etPasswd.setText("knumc2608?");
 
+//    etId.setText("98130");
+//    etPasswd.setText("a56515651!");
+
 //    etId.setText("ENR");
 //    etPasswd.setText("wjstkstlf1!");
   }
@@ -226,12 +229,6 @@ public class LoginActivity extends AppCompatActivity {
             stop();
           } else {
             stop();
-//            loadingProgress.dismiss();
-            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm");
-            Date nowDate = new Date();
-            String nowDateStr = dateFormat.format(nowDate);
-
-            Util.setStringPreference(mContext, "sessionTime", "sessionTime", nowDateStr);
             nextActivity(arrayList);
           }
         }
@@ -277,6 +274,13 @@ public class LoginActivity extends AppCompatActivity {
           intent.putExtra("departmentList", arrayList);
           startActivityForResult(intent, 0);
         } else {
+
+          SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm");
+          Date nowDate = new Date();
+          String nowDateStr = dateFormat.format(nowDate);
+
+          Util.setStringPreference(mContext, "sessionTime", "sessionTime", nowDateStr);
+
           String deptCd    = arrayList.get(0).getDutplceCd();
           String deptNm    = arrayList.get(0).getDeptHngNm();
           String jobKindCd = arrayList.get(0).getJobKindCd();

+ 9 - 0
app/src/main/java/com/dbs/mplus/knuh/adapter/DepartmentAdapter.java

@@ -20,7 +20,9 @@ import com.dbs.mplus.knuh.consent.sign.SignWrapper;
 import com.dbs.mplus.knuh.model.UserLoginDeptList;
 import com.dbs.mplus.knuh.util.Util;
 
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Date;
 
 public class DepartmentAdapter extends RecyclerView.Adapter<DepartmentAdapter.ViewHolder> {
 
@@ -120,6 +122,13 @@ public class DepartmentAdapter extends RecyclerView.Adapter<DepartmentAdapter.Vi
         }
         mActivity.finish();
       } else {
+
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm");
+        Date nowDate = new Date();
+        String nowDateStr = dateFormat.format(nowDate);
+
+        Util.setStringPreference(mActivity, "sessionTime", "sessionTime", nowDateStr);
+
         UserLoginDeptList userLoginDeptList = arrayList.get(lastSelectedPosition);
         String deptCd    = userLoginDeptList.getDutplceCd();
         String deptNm    = userLoginDeptList.getDeptHngNm();

+ 23 - 8
app/src/main/java/com/dbs/mplus/knuh/consent/ConsentCreateParam.java

@@ -153,6 +153,7 @@ public class ConsentCreateParam {
     connection = new HttpSoapConnection(ConsentConfig.HOST_HOSPITAL, ConsentConfig.GET_USER_INFO, mData);
     try {
       SoapObject object = connection.execute().get();
+      Log.e(TAG, "object -- > " + object);
       String userId       = object.getProperty("userId").toString().trim();
       String userName     = object.getProperty("userName").toString().trim();
       String userDeptCode = object.getProperty("userDeptCode").toString().trim();
@@ -192,6 +193,19 @@ public class ConsentCreateParam {
       e.printStackTrace();
     }
 
+    map.put("parCMSGBD_ExplDrNm", "");
+    map.put("parCMSGBD_ExplDrSignature", "");
+    map.put("parCMSGBD_ExplDrTelNo", "");
+
+    Log.e(TAG, "userVO.getUserTelNo() -- > " + userVO.getUserTelNo());
+    if (logionUserJobKindCd.indexOf("03") == 0) {
+      map.put("parCMSGBD_ExplDrNm", userVO.getUserName());
+      map.put("parCMSGBD_ExplDrSignature", signImage);
+      map.put("parCMSGBD_ExplDrTelNo", userVO.getUserTelNo());
+    }
+
+    Log.e(TAG, "map --- > " + map);
+
     // 새 서식을 작성할 경우
     if (rid == 0 || consentStateEng.equals(ConsentConfig.UNFINISHED)) {
 
@@ -264,14 +278,15 @@ public class ConsentCreateParam {
       map.put("parCMSGBD_PT_birthdayFix", juminNo.split("-")[0]);
       map.put("parCMSGBD_PT_telFix", telNum);
 
-      map.put("parCMSGBD_ExplDrNm", "");
-      map.put("parCMSGBD_ExplDrSignature", "");
-      map.put("parCMSGBD_ExplDrTelNo", "");
-      if (logionUserJobKindCd.indexOf("03") > 0) {
-        map.put("parCMSGBD_ExplDrNm", userVO.getUserName());
-        map.put("parCMSGBD_ExplDrSignature", signImage);
-        map.put("parCMSGBD_ExplDrTelNo", userVO.getUserTelNo());
-      }
+//      map.put("parCMSGBD_ExplDrNm", "");
+//      map.put("parCMSGBD_ExplDrSignature", "");
+//      map.put("parCMSGBD_ExplDrTelNo", "");
+//
+//      if (logionUserJobKindCd.indexOf("03") == 0) {
+//        map.put("parCMSGBD_ExplDrNm", userVO.getUserName());
+//        map.put("parCMSGBD_ExplDrSignature", signImage);
+//        map.put("parCMSGBD_ExplDrTelNo", userVO.getUserTelNo());
+//      }
 
       map.put("parCMDCBD_SpDrYN", "");
       map.put("parCMDCBD_ContStartDate", "");

+ 4 - 0
app/src/main/java/com/dbs/mplus/knuh/consent/ConsentFacade.java

@@ -128,6 +128,10 @@ public class ConsentFacade {
     if (SignWrapper.getInstance().isCertificate(userId) == true || certPass.equals("Y")) {
       String result = eFormToolkit.startEFormViewer(fos);
 
+      if (result.equals("ERROR_004")) {
+        return;
+      }
+
       if (!result.equals("SUCCESS")) {
         String message = "";
         if (result.equals("ERROR_000")) {