|
@@ -56,15 +56,17 @@ public class EFormSaveHandler implements IEventHandler<ResultEventArgs>, CallBac
|
|
|
private HashMap saveMapData = null;
|
|
|
|
|
|
private String apiType = "";
|
|
|
+ private String certPass = "";
|
|
|
private String buttonType = "";
|
|
|
|
|
|
- public EFormSaveHandler(Context mContext, EFormToolkit eFormToolkit, HashMap consentData, String apiType) {
|
|
|
+ public EFormSaveHandler(Context mContext, EFormToolkit eFormToolkit, HashMap consentData, String apiType, String certPass) {
|
|
|
this.mContext = mContext;
|
|
|
this.eFormToolkit = eFormToolkit;
|
|
|
this.consentData = consentData;
|
|
|
this.callBack = this;
|
|
|
this.instance = (ConsentActivity) mContext;
|
|
|
this.apiType = apiType;
|
|
|
+ this.certPass = certPass;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -186,36 +188,36 @@ public class EFormSaveHandler implements IEventHandler<ResultEventArgs>, CallBac
|
|
|
eFormToolkit.sendEFormViewerCancelEvent(mContext.getString(R.string.networkError));
|
|
|
} else {
|
|
|
|
|
|
-
|
|
|
if (Util.checkNetwork(mContext) == true) {
|
|
|
- switch (eventArgs.getResultCode()) {
|
|
|
- case SAVE: // 인증저장
|
|
|
|
|
|
- int state = 0;
|
|
|
- try {
|
|
|
- HashMap<String, String> mData = new HashMap<String, String>();
|
|
|
- mData.put("consentmstrid", saveData.get("consentMstRid").toString());
|
|
|
- if (saveData.get("consentStateEng") != null) {
|
|
|
- mData.put("consent_state", saveData.get("consentStateEng").toString());
|
|
|
- HttpSoapConnection connection = new HttpSoapConnection(ConsentConfig.HOST_CONSENT, ConsentConfig.CHECK_CONSENT_STATE, mData);
|
|
|
- SoapObject object = connection.execute().get();
|
|
|
- state = Integer.parseInt(object.getProperty("responseData").toString().trim());
|
|
|
- Log.e(TAG, "mData -- > " + mData);
|
|
|
- Log.e(TAG, "state -- > " + state);
|
|
|
- }
|
|
|
-
|
|
|
- } catch (ExecutionException e) {
|
|
|
- e.printStackTrace();
|
|
|
- } catch (InterruptedException e) {
|
|
|
- e.printStackTrace();
|
|
|
- } catch (NullPointerException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
+ int state = 0;
|
|
|
+ try {
|
|
|
+ HashMap<String, String> mData = new HashMap<String, String>();
|
|
|
+ mData.put("consentmstrid", saveData.get("consentMstRid").toString());
|
|
|
+ if (saveData.get("consentStateEng") != null) {
|
|
|
+ mData.put("consent_state", saveData.get("consentStateEng").toString());
|
|
|
+ HttpSoapConnection connection = new HttpSoapConnection(ConsentConfig.HOST_CONSENT, ConsentConfig.CHECK_CONSENT_STATE, mData);
|
|
|
+ SoapObject object = connection.execute().get();
|
|
|
+ state = Integer.parseInt(object.getProperty("responseData").toString().trim());
|
|
|
+ Log.e(TAG, "mData -- > " + mData);
|
|
|
+ Log.e(TAG, "state -- > " + state);
|
|
|
+ }
|
|
|
|
|
|
- if (state == 1) {
|
|
|
- eFormToolkit.sendEFormViewerCancelEvent(mContext.getString(R.string.writeConsnet));
|
|
|
- return;
|
|
|
- }
|
|
|
+ } catch (ExecutionException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ } catch (InterruptedException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ } catch (NullPointerException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (state == 1) {
|
|
|
+ eFormToolkit.sendEFormViewerCancelEvent(mContext.getString(R.string.writeConsnet));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ switch (eventArgs.getResultCode()) {
|
|
|
+ case SAVE: // 인증저장
|
|
|
|
|
|
saveData.putAll(imageUpload(eventArgs));
|
|
|
saveData.put("actKind", "C");
|
|
@@ -231,11 +233,17 @@ public class EFormSaveHandler implements IEventHandler<ResultEventArgs>, CallBac
|
|
|
|
|
|
break;
|
|
|
case TEMP_SAVE2: // 확인저장
|
|
|
- saveData.putAll(imageUpload(eventArgs));
|
|
|
- saveData.put("actKind", "T");
|
|
|
- saveData.put("consentState", "ELECTR_CMP");
|
|
|
|
|
|
- Util.callHttp(mContext, ConsentConfig.HOST_CONSENT, ConsentConfig.SAVE_CONFIRM_CERTIFY, saveData, callBack);
|
|
|
+ if (certPass.equals("Y")) {
|
|
|
+ eFormToolkit.sendEFormViewerCancelEvent(mContext.getString(R.string.certPassConsentConfirmNotSave));
|
|
|
+ } else {
|
|
|
+ saveData.putAll(imageUpload(eventArgs));
|
|
|
+ saveData.put("actKind", "T");
|
|
|
+ saveData.put("consentState", "ELECTR_CMP");
|
|
|
+
|
|
|
+ Util.callHttp(mContext, ConsentConfig.HOST_CONSENT, ConsentConfig.SAVE_CONFIRM_CERTIFY, saveData, callBack);
|
|
|
+ }
|
|
|
+
|
|
|
break;
|
|
|
}
|
|
|
|