Commit 167e720e by Kim Jinsung

Merge branch 'feature/1.0.1_32861' into 'feature/1.0.1'

Feature/1.0.1 32861

See merge request !10
parents 3493050a 7fe70099
...@@ -132,7 +132,7 @@ public class ABVEnvironment { ...@@ -132,7 +132,7 @@ public class ABVEnvironment {
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
// 作業報告レベル(taskReportLevel)によってディレクトリを追加する // 作業報告レベル(taskReportLevel)によってディレクトリを追加する
public static final String TaskReportLevelDir = "/%s"; public static final String TaskReportLevelDir = "/%s";
public static final String SavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir + "/%s"; public static final String SavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir;
public static final String RoutineTaskSavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir + "/%d/%s/%s"; public static final String RoutineTaskSavedOzFileFormat = OperationDirectionOrReportDirFormat + TaskReportLevelDir + "/%d/%s/%s";
public static final String OperationTaskKeyReportSendDirFormat = OperationTaskKeyDirFormat + TaskReportLevelDir + "/reportSend/%d"; public static final String OperationTaskKeyReportSendDirFormat = OperationTaskKeyDirFormat + TaskReportLevelDir + "/reportSend/%d";
public static final String OperationTaskKeyRoutineTaskReportSendDirFormat = OperationTaskKeyDirFormat + "/reportSend/%d/%s/%d"; public static final String OperationTaskKeyRoutineTaskReportSendDirFormat = OperationTaskKeyDirFormat + "/reportSend/%d/%s/%d";
...@@ -600,7 +600,7 @@ public class ABVEnvironment { ...@@ -600,7 +600,7 @@ public class ABVEnvironment {
* @return ファイルパス * @return ファイルパス
*/ */
public String getSavedOzFileTaskReportLevelPath(long operationId, String taskKey, String fileName, String taskReportLevel) { public String getSavedOzFileTaskReportLevelPath(long operationId, String taskKey, String fileName, String taskReportLevel) {
return String.format(SavedOzFileFormat, rootDirectory, operationId, taskKey, taskReportLevel, "report", fileName); return String.format(SavedOzFileFormat, rootDirectory, operationId, taskKey, taskReportLevel, fileName);
} }
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
......
...@@ -111,11 +111,9 @@ public class ABookKeys { ...@@ -111,11 +111,9 @@ public class ABookKeys {
public static final String URI = "uri"; public static final String URI = "uri";
public static final String OK = "OK"; public static final String OK = "OK";
// #32861 作業情報追加 start
public static final String LOCAL_SAVE = "localSave"; // 一時保存情報 public static final String LOCAL_SAVE = "localSave"; // 一時保存情報
public static final String ADD_REPORT = "addReport"; // 作業追加区分 public static final String ADD_REPORT = "addReport"; // 作業追加区分
public static final String CMD_LOCAL_SAVE_TASK_REPORT = "localSaveTaskReport"; // 一時保存 public static final String CMD_LOCAL_SAVE_TASK_REPORT = "localSaveTaskReport"; // 一時保存
// #32861 作業情報追加 end
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
public static final String HAS_AUTHORITY = "hasAuthority"; public static final String HAS_AUTHORITY = "hasAuthority";
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
......

488 Bytes | W: | H:

607 Bytes | W: | H:

ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_delete.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_delete.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_delete.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/ic_delete.png
  • 2-up
  • Swipe
  • Onion skin
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
...@@ -350,12 +350,11 @@ ...@@ -350,12 +350,11 @@
<string name="content_share_text3">\n上記のURLからダウンロードして下さい。\n</string> <string name="content_share_text3">\n上記のURLからダウンロードして下さい。\n</string>
<string name="content_share_password_hint">半角英数字16文字以下</string> <string name="content_share_password_hint">半角英数字16文字以下</string>
<!-- #32861 作業情報追加 start -->
<string name="temp_save">一時保存</string> <string name="temp_save">一時保存</string>
<string name="temp_save_info">一時保存しますか?</string> <string name="temp_save_info">一時保存しますか?</string>
<string name="save_info">保存してサーバへ送信しますか?</string> <string name="save_info">保存してサーバへ送信しますか?</string>
<string name="msg_temp_save_result">保存されました。</string> <string name="msg_temp_save_result">保存されました。</string>
<!-- #32861 作業情報追加 end --> <string name="delete_info">保存されたデータを削除しますか?</string>
<!-- Error Message --> <!-- Error Message -->
<string name="E000">事業者IDを入力してください。</string> <string name="E000">事業者IDを入力してください。</string>
......
...@@ -350,12 +350,11 @@ ...@@ -350,12 +350,11 @@
<string name="content_share_text3">\n상기URL에서 다운로드해 주십시오.\n</string> <string name="content_share_text3">\n상기URL에서 다운로드해 주십시오.\n</string>
<string name="content_share_password_hint">영숫자16자 이하</string> <string name="content_share_password_hint">영숫자16자 이하</string>
<!-- #32861 作業情報追加 start -->
<string name="temp_save">임시저장</string> <string name="temp_save">임시저장</string>
<string name="temp_save_info">임시저장 하시겠습니까?</string> <string name="temp_save_info">임시저장 하시겠습니까?</string>
<string name="save_info">저장하시고 서버로 송신하시겠습니까?</string> <string name="save_info">저장하시고 서버로 송신하시겠습니까?</string>
<string name="msg_temp_save_result">저장되었습니다.</string> <string name="msg_temp_save_result">저장되었습니다.</string>
<!-- #32861 作業情報追加 end --> <string name="delete_info">저장된 데이터를 삭제하시겠습니까?</string>
<!-- Error Message --> <!-- Error Message -->
<string name="E000">어카운트패스 입력해 주십시오.</string> <string name="E000">어카운트패스 입력해 주십시오.</string>
......
...@@ -350,12 +350,11 @@ ...@@ -350,12 +350,11 @@
<string name="content_share_text3">\nDownload a content from the URL above.\n</string> <string name="content_share_text3">\nDownload a content from the URL above.\n</string>
<string name="content_share_password_hint">Alpha digit with one byte not exceed 16 characters</string> <string name="content_share_password_hint">Alpha digit with one byte not exceed 16 characters</string>
<!-- #32861 作業情報追加 start -->
<string name="temp_save">Temporarily saved</string> <string name="temp_save">Temporarily saved</string>
<string name="temp_save_info">Do you want to temporarily save it?</string> <string name="temp_save_info">Do you want to temporarily save it?</string>
<string name="save_info">Save it and send it to the server?</string> <string name="save_info">Save it and send it to the server?</string>
<string name="msg_temp_save_result">It has been saved.</string> <string name="msg_temp_save_result">It has been saved.</string>
<!-- #32861 作業情報追加 end --> <string name="delete_info">Do you want to delete the saved data?</string>
<!-- Error Message --> <!-- Error Message -->
<string name="E000">Please enter company ID.</string> <string name="E000">Please enter company ID.</string>
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
style="@style/OperationSearchToolBar" style="@style/OperationSearchToolBar"
android:minHeight="50dp"> android:minHeight="50dp">
<!-- #32861 作業情報追加 start -->
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
...@@ -38,7 +37,6 @@ ...@@ -38,7 +37,6 @@
android:background="@drawable/ic_operation_home" /> android:background="@drawable/ic_operation_home" />
</LinearLayout> </LinearLayout>
<!-- #32861 作業情報追加 end -->
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
...@@ -64,7 +62,14 @@ ...@@ -64,7 +62,14 @@
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true"> android:layout_centerVertical="true">
<!-- #32861 作業情報追加 start --> <Button
android:id="@+id/btn_delete"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:background="@drawable/ic_delete" />
<Button <Button
android:id="@+id/btn_temp_save" android:id="@+id/btn_temp_save"
android:layout_width="30dp" android:layout_width="30dp"
...@@ -72,7 +77,7 @@ ...@@ -72,7 +77,7 @@
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginRight="5dp" android:layout_marginRight="5dp"
android:background="@drawable/ic_download_off" /> android:background="@drawable/ic_local_save" />
<Button <Button
android:id="@+id/btn_save" android:id="@+id/btn_save"
android:layout_width="30dp" android:layout_width="30dp"
...@@ -80,8 +85,7 @@ ...@@ -80,8 +85,7 @@
android:layout_alignParentLeft="true" android:layout_alignParentLeft="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginRight="5dp" android:layout_marginRight="5dp"
android:background="@drawable/ic_download_on" /> android:background="@drawable/ic_save" />
<!-- #32861 作業情報追加 end -->
</LinearLayout> </LinearLayout>
</RelativeLayout> </RelativeLayout>
......
...@@ -73,6 +73,7 @@ import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper; ...@@ -73,6 +73,7 @@ import jp.agentec.abook.abv.ui.home.helper.ABookCheckWebViewHelper;
import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper; import jp.agentec.abook.abv.ui.home.helper.ABookPermissionHelper;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.NoPdfViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.NoPdfViewActivity;
import jp.agentec.abook.abv.ui.viewer.foxitPdf.FoxitPdfCore; import jp.agentec.abook.abv.ui.viewer.foxitPdf.FoxitPdfCore;
...@@ -133,16 +134,14 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -133,16 +134,14 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
public boolean isLinkedContent; public boolean isLinkedContent;
public int pageNo; public int pageNo;
// #32861 作業情報追加 start
public int mButtonStatus; // 保存ボタンチェック public int mButtonStatus; // 保存ボタンチェック
protected boolean mLocalSave; // 一時保存情報
protected boolean mAddReport; // 作業追加区分 protected boolean mAddReport; // 作業追加区分
// #32861 作業情報追加 end protected int mTaskReportLevel; // 作業報告レベル
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
Intent intent = getIntent(); Intent intent = getIntent();
contentId = intent.getLongExtra(ABookKeys.CONTENT_ID, 0); contentId = intent.getLongExtra(ABookKeys.CONTENT_ID, 0);
contentType = intent.getStringExtra(ABookKeys.CONTENT_TYPE); contentType = intent.getStringExtra(ABookKeys.CONTENT_TYPE);
...@@ -674,9 +673,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -674,9 +673,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}); });
alertDialog.show(); alertDialog.show();
} else { } else {
putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, mOperationId); // 作業終了する時、作業ID設定して作業一覧で使用するメソットを行う。
finishActivity(); putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, mOperationId);
} finishActivity(); // 開いてる画面を閉じる
}
} }
}); });
operationHomeButton.setVisibility(View.VISIBLE); operationHomeButton.setVisibility(View.VISIBLE);
...@@ -764,8 +764,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -764,8 +764,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}); });
alertDialog.show(); alertDialog.show();
} else { } else {
putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, mOperationId); // 作業終了する時、作業ID設定して作業一覧で使用するメソットを行う。
finishActivity(); putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, mOperationId); // 作業IDの設定
finishActivity(); // 開いてる画面を閉じる
} }
} }
...@@ -856,23 +857,28 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -856,23 +857,28 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
mCmd = abookCheckParam.get(ABookKeys.CMD); mCmd = abookCheckParam.get(ABookKeys.CMD);
mTaskKey = abookCheckParam.get(ABookKeys.TASK_KEY); mTaskKey = abookCheckParam.get(ABookKeys.TASK_KEY);
int taskReportLevel = 0; // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答)) mTaskReportLevel = 0; // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
if (abookCheckParam.containsKey(ABookKeys.TASK_REPORT_LEVEL)) { if (abookCheckParam.containsKey(ABookKeys.TASK_REPORT_LEVEL)) {
taskReportLevel = Integer.parseInt(abookCheckParam.get(ABookKeys.TASK_REPORT_LEVEL)); // 作業報告レベル mTaskReportLevel = Integer.parseInt(abookCheckParam.get(ABookKeys.TASK_REPORT_LEVEL)); // 作業報告レベル
} }
int taskReportId = 0; int taskReportId = 0;
String reportStartDate = ""; String reportStartDate = "";
if (operationDto.reportType == Constant.OperationReportType.ROUTINE_TASK && abookCheckParam.get(ABookKeys.TASK_REPORT_ID) != null && abookCheckParam.get(ABookKeys.REPORT_START_DATE) != null) { // 作業追加区分の値を取得する
mAddReport = true;
if (abookCheckParam.containsKey(ABookKeys.ADD_REPORT)) {
mAddReport = Integer.parseInt(abookCheckParam.get(ABookKeys.ADD_REPORT)) > 0 ? true : false;
}
if (operationDto.reportType == Constant.OperationReportType.ROUTINE_TASK && abookCheckParam.get(ABookKeys.TASK_REPORT_ID) != null && abookCheckParam.get(ABookKeys.REPORT_START_DATE) != null) {
taskReportId = Integer.parseInt(abookCheckParam.get(ABookKeys.TASK_REPORT_ID)); taskReportId = Integer.parseInt(abookCheckParam.get(ABookKeys.TASK_REPORT_ID));
reportStartDate = abookCheckParam.get(ABookKeys.REPORT_START_DATE); reportStartDate = abookCheckParam.get(ABookKeys.REPORT_START_DATE);
} }
if (StringUtil.equalsAny(mCmd, ABookKeys.CMD_MOVE_HOT_SPOT, ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT, if (StringUtil.equalsAny(mCmd, ABookKeys.CMD_MOVE_HOT_SPOT, ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT,
ABookKeys.CMD_DELETE_TASK_REPORT, ABookKeys.CMD_CANCEL_TASK_REPORT, ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT)) { ABookKeys.CMD_DELETE_TASK_REPORT, ABookKeys.CMD_CANCEL_TASK_REPORT, ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT)) {
boolean isError = false;
try { try {
if (StringUtil.equalsAny(mCmd, ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT)) { if (StringUtil.equalsAny(mCmd, ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT)) {
showProgressPopup(getString(R.string.file_initialization)); showProgressPopup(getString(R.string.file_initialization));
} }
...@@ -916,9 +922,26 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -916,9 +922,26 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
public Object callback(Object ret) { public Object callback(Object ret) {
final boolean isError = (boolean)ret; final boolean isError = (boolean)ret;
closeProgressPopup(); closeProgressPopup();
// #32861 作業情報追加 start int ozViewCloseFlag = 0;
afterABookCheckApi(mCmd, mTaskKey, isNetWorkError(isError), "", null, isOperationPdf()); // OZD作業でエラーが発生する場合ozViewCloseFlagの値を設定する。
// #32861 作業情報追加 end if (isError && ActivityHandlingHelper.getInstance().searchOzdActivityStack()) {
ozViewCloseFlag = 1;
}
if (mAddReport) { // 作業追加区分あり
if (ozViewCloseFlag == 0) { // エラーなし
// コールバック処理のみ行う。
afterABookCheckApi(mCmd, mTaskKey, 0, "", null, isOperationPdf());
} else { // エラーあり
// OZD作業以外の場合
if (!ActivityHandlingHelper.getInstance().searchOzdActivityStack()) {
// コールバック処理のみ行う。
afterABookCheckApi(mCmd, mTaskKey, 0, "", null, isOperationPdf());
}
}
}
// エラーがない場合のみ画面遷移処理を行う。
if (ozViewCloseFlag == 0) closeCurrentScreen(mOperationType);
return null; return null;
} }
}; };
...@@ -926,7 +949,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -926,7 +949,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
ABookCheckWebViewHelper.getInstance().doABookCheckParam(ABVContentViewActivity.this, ABookCheckWebViewHelper.getInstance().doABookCheckParam(ABVContentViewActivity.this,
mCmd, mTaskKey, mEnableReportHistory, abookCheckParam, mOperationId, mContentPath, getContentId(), mCmd, mTaskKey, mEnableReportHistory, abookCheckParam, mOperationId, mContentPath, getContentId(),
operationDto.reportType, finishCallback, operationDto.reportType, finishCallback,
taskReportLevel); mTaskReportLevel);
} catch(Exception e) { } catch(Exception e) {
Logger.e(TAG, "doABookCheckParam error", e); Logger.e(TAG, "doABookCheckParam error", e);
...@@ -951,21 +974,17 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -951,21 +974,17 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, true, true, mReportFileName); ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, true, true, mReportFileName);
} else if (mCmd.equals(ABookKeys.CMD_SHOW_REPORT_OZD)) { } else if (mCmd.equals(ABookKeys.CMD_SHOW_REPORT_OZD)) {
mReportFileName = abookCheckParam.get(ABookKeys.REPORT_FILE_NAME); mReportFileName = abookCheckParam.get(ABookKeys.REPORT_FILE_NAME);
// #32861 作業情報追加 start // #32926 作業報告画面改善 start
boolean mLocalSave = false; // 一時保存情報
if (abookCheckParam.containsKey(ABookKeys.LOCAL_SAVE)) { if (abookCheckParam.containsKey(ABookKeys.LOCAL_SAVE)) {
mLocalSave = Integer.parseInt(abookCheckParam.get(ABookKeys.LOCAL_SAVE)) > 0 ? true : false; mLocalSave = Integer.parseInt(abookCheckParam.get(ABookKeys.LOCAL_SAVE)) > 0 ? true : false;
} }
if (abookCheckParam.containsKey(ABookKeys.ADD_REPORT)) { ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, false, taskReportId, reportStartDate, mReportFileName, mLocalSave, mAddReport, mTaskReportLevel);
mAddReport = Integer.parseInt(abookCheckParam.get(ABookKeys.ADD_REPORT)) > 0 ? true : false;
}
// #32926 作業報告画面改善 start
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, false, taskReportId, reportStartDate, mReportFileName, mLocalSave, mAddReport, taskReportLevel);
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
// #32861 作業情報追加 end
} else if (mCmd.equals(ABookKeys.CMD_PREVIEW_REPORT_OZD)) { } else if (mCmd.equals(ABookKeys.CMD_PREVIEW_REPORT_OZD)) {
mReportFileName = abookCheckParam.get(ABookKeys.REPORT_FILE_NAME); mReportFileName = abookCheckParam.get(ABookKeys.REPORT_FILE_NAME);
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, true, taskReportId, reportStartDate, mReportFileName, false, false, taskReportLevel); ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, true, taskReportId, reportStartDate, mReportFileName, false, false, mTaskReportLevel);
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
} else if (mCmd.equals(ABookKeys.CMD_CONTENT_EDIT_CLOSE)) { } else if (mCmd.equals(ABookKeys.CMD_CONTENT_EDIT_CLOSE)) {
showProgressPopup(); showProgressPopup();
...@@ -978,7 +997,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -978,7 +997,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}, 5000); }, 5000);
} else if (mCmd.equals(ABookKeys.CMD_GET_GPS_INFO)) { } else if (mCmd.equals(ABookKeys.CMD_GET_GPS_INFO)) {
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
setLocation((Integer.valueOf(abookCheckParam.get(ABookKeys.GPS_TYPE)) != 1), taskReportLevel); setLocation((Integer.valueOf(abookCheckParam.get(ABookKeys.GPS_TYPE)) != 1), mTaskReportLevel);
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
} else if (mCmd.equals(ABookKeys.CMD_SCENE_REGIST)) { } else if (mCmd.equals(ABookKeys.CMD_SCENE_REGIST)) {
String successFlg = abookCheckParam.get(ABookKeys.SUCCESS_FLG); String successFlg = abookCheckParam.get(ABookKeys.SUCCESS_FLG);
...@@ -1090,9 +1109,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1090,9 +1109,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
Logger.i(TAG, String.format("javascript:%sCHK.afterABookCheckApi('%s', '%s', '%s', '%s')", finalParent, cmd, taskKey, result, message)); Logger.i(TAG, String.format("javascript:%sCHK.afterABookCheckApi('%s', '%s', '%s', '%s')", finalParent, cmd, taskKey, result, message));
webViewLoadUrl(String.format("javascript:%sCHK.afterABookCheckApi('%s', '%s', '%s', '%s')", finalParent, cmd, taskKey, result, message)); webViewLoadUrl(String.format("javascript:%sCHK.afterABookCheckApi('%s', '%s', '%s', '%s')", finalParent, cmd, taskKey, result, message));
} }
// #32861 作業情報追加 start
doneProcess(result); // HTML側の処理が終わった後の処理を行う
// #32861 作業情報追加 end
} }
}); });
} }
...@@ -1205,14 +1221,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1205,14 +1221,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
return new FoxitPdfCore(this, filepath); return new FoxitPdfCore(this, filepath);
} }
// #32861 作業情報追加 start
// 保存処理 // 保存処理
public void ozdSaveProcess() { public void ozdSaveProcess() {
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@Override @Override
public void run () { public void run () {
// 実行Javascript - 保存 // 実行Javascript - 保存
webViewLoadUrl("javascript:CHK.saveOzReport()"); ActivityHandlingHelper.getInstance().callOzdHtmlScript("javascript:CHK.saveOzReport()");
Logger.d(TAG, "ozdSaveProcess"); Logger.d(TAG, "ozdSaveProcess");
} }
}); });
...@@ -1224,7 +1239,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1224,7 +1239,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
@Override @Override
public void run () { public void run () {
// 実行Javascript - 一時保存 // 実行Javascript - 一時保存
webViewLoadUrl("javascript:CHK.localSaveOzReport()"); ActivityHandlingHelper.getInstance().callOzdHtmlScript("javascript:CHK.localSaveOzReport()");
Logger.d(TAG, "ozdLocalSaveProcess"); Logger.d(TAG, "ozdLocalSaveProcess");
} }
}); });
...@@ -1236,55 +1251,64 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1236,55 +1251,64 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
@Override @Override
public void run () { public void run () {
// 実行Javascript - 閉じる // 実行Javascript - 閉じる
webViewLoadUrl("javascript:CHK.cancelOzReport()"); ActivityHandlingHelper.getInstance().callOzdHtmlScript("javascript:CHK.cancelOzReport()");
Logger.d(TAG, "ozdCancelProcess"); Logger.d(TAG, "ozdCancelProcess");
} }
}); });
} }
// 削除処理
public void ozdDeleteProcess() {
runOnUiThread(new Runnable() {
@Override
public void run () {
// 実行Javascript - 閉じる
ActivityHandlingHelper.getInstance().callOzdHtmlScript("javascript:CHK.deleteOzReport()");
Logger.d(TAG, "ozdDeleteProcess");
}
});
}
// 作業一覧画面に遷移 // 作業一覧画面に遷移
public void goToMain() { public void goToMain() {
ActivityHandlingHelper.getInstance().finishAllContentViewActivity(); // 一覧画面に遷移 ActivityHandlingHelper.getInstance().finishAllContentViewActivity(); // 一覧画面に遷移
} }
// 押したボタンによってHTML側の処理を行う
public void doProcess() { public void doProcess() {
// #32861 作業情報追加 start
// 押したボタンによってHTML側の処理を行う
if (this instanceof CheckOZDViewActivity) { if (this instanceof CheckOZDViewActivity) {
if (mButtonStatus == R.id.btn_close) { if (mButtonStatus == R.id.btn_close) {
super.finish();
ozdCancelProcess(); // 閉じる ozdCancelProcess(); // 閉じる
} else if (mButtonStatus == R.id.btn_temp_save) { } else if (mButtonStatus == R.id.btn_temp_save) {
ozdLocalSaveProcess(); // 一時保存 ozdLocalSaveProcess(); // 一時保存
} else if (mButtonStatus == R.id.btn_save){ } else if (mButtonStatus == R.id.btn_save) {
ozdSaveProcess(); // 保存 ozdSaveProcess(); // 保存
doneProcess(1); } else if (mButtonStatus == R.id.btn_delete) {
ozdDeleteProcess(); // 削除
} }
} }
// #32861 作業情報追加 end
} }
public void doneProcess(int isError) { // 作業終了する時、作業ID設定し、画面遷移処理
// 押したボタンによってHTML側の処理が終わった後の処理を行う public void closeCurrentScreen(int operationType) {
if (this instanceof CheckOZDViewActivity) { putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, mOperationId); // 作業IDの設定
if (mButtonStatus == R.id.btn_save || mButtonStatus == R.id.btn_close){
// 作業追加区分ありの場合 if (mAddReport) { // 作業追加あり
if (mAddReport) { if (ActivityHandlingHelper.getInstance().searchOzdActivityStack()) { // OZD画面で画面遷移処理
super.finish(); ActivityHandlingHelper.getInstance().selectedOzdActivityClose(); // 開いてる画面を閉じる
if (isError == 0) ozdCancelProcess(); // 通信成功の場合だけHTML側の処理を行う }
} else { } else { // 作業追加なし
if (operationType == Constant.ReportType.Report) { // 報告タイプ
if (ActivityHandlingHelper.getInstance().searchOzdActivityStack()) { // OZD画面で画面遷移処理
goToMain(); // 一覧画面に遷移 goToMain(); // 一覧画面に遷移
} else {
finishActivity(); // 一覧画面に遷移
}
} else { // 報告タイプ以外
if (ActivityHandlingHelper.getInstance().searchOzdActivityStack()) { // OZD画面で画面遷移処理
ActivityHandlingHelper.getInstance().selectedOzdActivityClose(); // 開いてる画面を閉じる
} }
} }
} }
} }
// ネットワークの非接続の場合の処理(OZ作業報告だけ)
protected int isNetWorkError(boolean isError) {
if (this instanceof CheckOZDViewActivity) {
return isError ? 0 : 1;
}
return 0;
}
// #32861 作業情報追加 end
} }
...@@ -33,6 +33,7 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic; ...@@ -33,6 +33,7 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic; import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.launcher.android.R; import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity; import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.CheckOZDViewActivity;
import jp.agentec.adf.util.DateTimeFormat; import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil; import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil; import jp.agentec.adf.util.FileUtil;
...@@ -74,6 +75,11 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -74,6 +75,11 @@ public class ABookCheckWebViewHelper extends ABookHelper {
int taskReportSendId = 0; int taskReportSendId = 0;
mFinishCallback = finishCallback; mFinishCallback = finishCallback;
// ActivityであるClassからCheckOZDViewActivityを確認してContextの値を変更する。
if (ActivityHandlingHelper.getInstance().searchOzdActivityStack()) {
context = (ABVContentViewActivity) ActivityHandlingHelper.getInstance().selectedOzdAtivityContext();
}
switch (cmd) { switch (cmd) {
case ABookKeys.CMD_INSERT_TASK_REPORT: case ABookKeys.CMD_INSERT_TASK_REPORT:
insertOrUpdateTaskReport(taskKey, enableReportHistory, operationId, contentId, param, contentPath, true, reportType, taskReportLevel); insertOrUpdateTaskReport(taskKey, enableReportHistory, operationId, contentId, param, contentPath, true, reportType, taskReportLevel);
...@@ -163,6 +169,7 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -163,6 +169,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
public void run() { public void run() {
OperationDto operationDto = mOperationLogic.getOperation(operationId); OperationDto operationDto = mOperationLogic.getOperation(operationId);
boolean isError = false; boolean isError = false;
try { try {
mOperationLogic.updateSyncOperation(operationId, true); mOperationLogic.updateSyncOperation(operationId, true);
if (mOperationLogic.sendTaskReportSendData(operationId, taskKey, taskReportLevel, progressCallback)) { if (mOperationLogic.sendTaskReportSendData(operationId, taskKey, taskReportLevel, progressCallback)) {
......
...@@ -1547,7 +1547,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1547,7 +1547,6 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
* @param addReport * @param addReport
* @param taskReportLevel * @param taskReportLevel
*/ */
// #32861 作業情報追加 start
public void startOZViewerActivity(Context context, long operationId, long contentId, String taskKey, boolean isReadOnly, int taskReportId, String reportStartDate, String reportFileName, boolean localSave, boolean addReport, int taskReportLevel) { public void startOZViewerActivity(Context context, long operationId, long contentId, String taskKey, boolean isReadOnly, int taskReportId, String reportStartDate, String reportFileName, boolean localSave, boolean addReport, int taskReportLevel) {
reportStartDate = reportStartDate.replace("T", " "); reportStartDate = reportStartDate.replace("T", " ");
String strReportStartDate = DateTimeUtil.toString(DateTimeUtil.toDate(reportStartDate, DateTimeFormat.yyyyMMddHHmmss_hyphen), DateTimeFormat.yyyyMMddHHmm_none); String strReportStartDate = DateTimeUtil.toString(DateTimeUtil.toDate(reportStartDate, DateTimeFormat.yyyyMMddHHmmss_hyphen), DateTimeFormat.yyyyMMddHHmm_none);
...@@ -1562,17 +1561,15 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1562,17 +1561,15 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra(ABookKeys.TASK_REPORT_ID, taskReportId); intent.putExtra(ABookKeys.TASK_REPORT_ID, taskReportId);
intent.putExtra(ABookKeys.REPORT_START_DATE, strReportStartDate); intent.putExtra(ABookKeys.REPORT_START_DATE, strReportStartDate);
intent.putExtra(ABookKeys.REPORT_FILE_NAME, reportFileName); intent.putExtra(ABookKeys.REPORT_FILE_NAME, reportFileName);
// #32861 作業情報追加 start
intent.putExtra(ABookKeys.LOCAL_SAVE, localSave); // 一時保存情報 intent.putExtra(ABookKeys.LOCAL_SAVE, localSave); // 一時保存情報
intent.putExtra(ABookKeys.ADD_REPORT, addReport); // 作業追加区分 intent.putExtra(ABookKeys.ADD_REPORT, addReport); // 作業追加区分
// #32861 作業情報追加 end
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
intent.putExtra(ABookKeys.TASK_REPORT_LEVEL, taskReportLevel); // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答)) intent.putExtra(ABookKeys.TASK_REPORT_LEVEL, taskReportLevel); // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
context.startActivity(intent); context.startActivity(intent);
} }
// #32861 作業情報追加 end
public boolean isMeetingConnected() { public boolean isMeetingConnected() {
return meetingManager.isConnected(); return meetingManager.isConnected();
...@@ -1594,4 +1591,53 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1594,4 +1591,53 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
@Override @Override
public void onAuthenticationFailed() { public void onAuthenticationFailed() {
} // ignore : not come here } // ignore : not come here
// 上位のClassからHTML側のコールを行うための処理
public void callOzdHtmlScript(String url) {
if (!currentActivityStack.isEmpty()) {
for (final ABVAuthenticatedActivity activity : currentActivityStack) {
final String scriptUrl = url;
if (activity instanceof ParentWebViewActivity) {
((ParentWebViewActivity) activity).callViewLoadUrl(scriptUrl);
}
}
}
}
// ActivityであるClassからCheckOZDViewActivityを確認する処理
public boolean searchOzdActivityStack() {
if (!currentActivityStack.isEmpty()) {
for (final ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof CheckOZDViewActivity) {
return true;
}
}
}
return false;
}
// ActivityであるClassからCheckOZDViewActivityを確認して画面を閉じる処理
public void selectedOzdActivityClose() {
if (!currentActivityStack.isEmpty()) {
for (final ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof CheckOZDViewActivity) {
((CheckOZDViewActivity) activity).finishActivity();
}
}
}
}
// ActivityであるClassからCheckOZDViewActivityを確認してContextの値を変更する。
public Context selectedOzdAtivityContext() {
Context context = null;
if (!currentActivityStack.isEmpty()) {
for (final ABVAuthenticatedActivity activity : currentActivityStack) {
if (activity instanceof CheckOZDViewActivity) {
context = activity;
return context;
}
}
}
return context;
}
} }
...@@ -27,11 +27,12 @@ public class OzdFileHelper { ...@@ -27,11 +27,12 @@ public class OzdFileHelper {
/** /**
* OZDファイルをPDFに変換したファイルをCMSへアップロードする。 * OZDファイルをPDFに変換したファイルをCMSへアップロードする。
* @param pdfFile String *
* @param jsonData String * @param pdfFile String
* @param jsonData String
* @param contentId long * @param contentId long
* @param objectId long * @param objectId long
* @param sendTime String(GMT) * @param sendTime String(GMT)
* @throws Exception * @throws Exception
*/ */
public static final void sendOzdToAcms(final File pdfFile, final String jsonData, final long contentId, final long objectId, final String sendTime, final int fileType) throws AcmsException, NetworkDisconnectedException, IOException { public static final void sendOzdToAcms(final File pdfFile, final String jsonData, final long contentId, final long objectId, final String sendTime, final int fileType) throws AcmsException, NetworkDisconnectedException, IOException {
...@@ -48,6 +49,7 @@ public class OzdFileHelper { ...@@ -48,6 +49,7 @@ public class OzdFileHelper {
/** /**
* 優先的なOZDファイルのフォルダを返す。 * 優先的なOZDファイルのフォルダを返す。
* 保存先のファイルを優先する。 * 保存先のファイルを優先する。
*
* @param contentId * @param contentId
* @param ozdFileName * @param ozdFileName
* @return * @return
...@@ -63,6 +65,7 @@ public class OzdFileHelper { ...@@ -63,6 +65,7 @@ public class OzdFileHelper {
/** /**
* OZDファイルの日付取得する。 * OZDファイルの日付取得する。
*
* @param contentId * @param contentId
* @param objectId * @param objectId
* @return * @return
...@@ -81,6 +84,7 @@ public class OzdFileHelper { ...@@ -81,6 +84,7 @@ public class OzdFileHelper {
// GetOzdFileDateParameters parameters = new GetOzdFileDateParameters(sId, contentId, objectId); // GetOzdFileDateParameters parameters = new GetOzdFileDateParameters(sId, contentId, objectId);
// AcmsClient.getInstance(URL_PATH, ABVEnvironment.getInstance().networkAdapter).downloadOzdFile(parameters, outputFilePath); // AcmsClient.getInstance(URL_PATH, ABVEnvironment.getInstance().networkAdapter).downloadOzdFile(parameters, outputFilePath);
} }
public static final String getSaveOzFileName(boolean directionFlg, String reportFileName) { public static final String getSaveOzFileName(boolean directionFlg, String reportFileName) {
if (reportFileName != null) { if (reportFileName != null) {
String replacedFileName = replaceFileName(reportFileName); String replacedFileName = replaceFileName(reportFileName);
...@@ -141,8 +145,8 @@ public class OzdFileHelper { ...@@ -141,8 +145,8 @@ public class OzdFileHelper {
} }
public static final String replaceFileName(String fileName) { public static final String replaceFileName(String fileName) {
String editingName=fileName.replace("Ozr", "Ozd"); String editingName = fileName.replace("Ozr", "Ozd");
String replacedName=editingName.replace("ozr", "ozd"); String replacedName = editingName.replace("ozr", "ozd");
return replacedName; return replacedName;
} }
...@@ -153,7 +157,7 @@ public class OzdFileHelper { ...@@ -153,7 +157,7 @@ public class OzdFileHelper {
} }
} }
public static final String getTempTaskDirPath(long contentId, String taskKey) { public static final String getTempTaskDirPath(long contentId, String taskKey) {
return ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey); return ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
} }
...@@ -167,4 +171,30 @@ public class OzdFileHelper { ...@@ -167,4 +171,30 @@ public class OzdFileHelper {
} }
return FileUtil.move(tempOzdFilePath, ozdFilePath, true); return FileUtil.move(tempOzdFilePath, ozdFilePath, true);
} }
// 削除するOZDファイルがあるかを確認する
public static final boolean checkOzFilePath(long operationId, String taskKey, int taskReportId, String reportStartDate, String reportFileName, int taskReportLevel) {
String ozdFileName = null;
if (reportFileName != null) {
ozdFileName = reportFileName;
} else {
if (taskReportLevel == 0) {
ozdFileName = DIRECTION_OZD_FILE_NAME;
} else {
ozdFileName = REPORT_OZD_FILE_NAME;
}
}
String ozFilePath = null;
if (taskReportId > 0 && !StringUtil.isNullOrEmpty(reportStartDate)) {
ozFilePath = ABVEnvironment.getInstance().getRoutineTaskSavedOzFilePath(operationId, taskKey, taskReportId, reportStartDate, ozdFileName, String.valueOf(taskReportLevel));
} else {
ozFilePath = ABVEnvironment.getInstance().getSavedOzFileTaskReportLevelPath(operationId, taskKey, ozdFileName, String.valueOf(taskReportLevel));
}
if (FileUtil.exists(ozFilePath)) {
return true;
}
return false;
}
} }
\ No newline at end of file
...@@ -76,6 +76,8 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -76,6 +76,8 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
private int mTaskReportLevel; // 作業報告レベル private int mTaskReportLevel; // 作業報告レベル
boolean mIsOzFilePath; // 削除処理のフラグ
boolean mLocalSave; // 一時保存フラグ
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
@Override @Override
...@@ -118,7 +120,6 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -118,7 +120,6 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
TextView tvTitle = (TextView) findViewById(R.id.tv_title); TextView tvTitle = (TextView) findViewById(R.id.tv_title);
tvTitle.setText(frontTitle + rearTitle); tvTitle.setText(frontTitle + rearTitle);
// #32861 作業情報追加 start
// OZ閲覧画面に表示するボタン表示の可否設定 // OZ閲覧画面に表示するボタン表示の可否設定
// 一時保存情報についてボタン表示:「0:false、一時保存ボタン非表示」「1:ture、一時保存ボタン表示」 // 一時保存情報についてボタン表示:「0:false、一時保存ボタン非表示」「1:ture、一時保存ボタン表示」
mLocalSave = intent.getBooleanExtra(ABookKeys.LOCAL_SAVE, false); mLocalSave = intent.getBooleanExtra(ABookKeys.LOCAL_SAVE, false);
...@@ -129,12 +130,17 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -129,12 +130,17 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
final Button closeButton = (Button) findViewById(R.id.btn_close); final Button closeButton = (Button) findViewById(R.id.btn_close);
final Button tempSaveButton = (Button) findViewById(R.id.btn_temp_save); final Button tempSaveButton = (Button) findViewById(R.id.btn_temp_save);
final Button saveButton = (Button) findViewById(R.id.btn_save); final Button saveButton = (Button) findViewById(R.id.btn_save);
final Button deleteButton = (Button) findViewById(R.id.btn_delete);
// 一時ボタン表示可否判断 // 一時ボタン表示可否判断
homeButton.setVisibility(mAddReport ? View.GONE : View.VISIBLE); homeButton.setVisibility(mAddReport ? View.GONE : View.VISIBLE);
closeButton.setVisibility(mAddReport ? View.VISIBLE : View.GONE); closeButton.setVisibility(mAddReport ? View.VISIBLE : View.GONE);
tempSaveButton.setVisibility(mLocalSave ? View.VISIBLE : View.GONE); tempSaveButton.setVisibility(mLocalSave ? View.VISIBLE : View.GONE);
// 削除ボタン表示可否判断
mIsOzFilePath = OzdFileHelper.checkOzFilePath(mOperationId, mTaskKey, mTaskReportId, mReportStartDate, mReportFileName, mTaskReportLevel);
deleteButton.setVisibility(mIsOzFilePath ? View.VISIBLE : View.GONE);
// 作業一覧へ戻るボタン // 作業一覧へ戻るボタン
homeButton.setOnClickListener(new OnClickListener() { homeButton.setOnClickListener(new OnClickListener() {
@Override @Override
...@@ -169,7 +175,15 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -169,7 +175,15 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
showSaveConfirmAlert(R.string.save, R.string.save_info); showSaveConfirmAlert(R.string.save, R.string.save_info);
} }
}); });
// #32861 作業情報追加 end
// 削除ボタン
deleteButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
mButtonStatus = R.id.btn_delete; // HTML側の分岐処理を行うため変数に値を渡す
showSaveConfirmAlert(R.string.delete, R.string.delete_info);
}
});
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
mOzFilePath = OzdFileHelper.getOzFilePath(mOperationId, contentId, mTaskKey, mDirectionFlg, mTaskReportId, mReportStartDate, mReportFileName, mTaskReportLevel); mOzFilePath = OzdFileHelper.getOzFilePath(mOperationId, contentId, mTaskKey, mDirectionFlg, mTaskReportId, mReportStartDate, mReportFileName, mTaskReportLevel);
...@@ -301,13 +315,11 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -301,13 +315,11 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
@Override @Override
public boolean onKeyUp(int keyCode, KeyEvent event) { public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) { if (keyCode == KeyEvent.KEYCODE_BACK) {
// #32861 作業情報追加 start if (!mAddReport) { // 作業追加区分がなしの場合
if (!mAddReport) {
goToMain(); // 一覧画面に遷移 goToMain(); // 一覧画面に遷移
} else { } else {
finishActivity(); // Ozd作業画面を閉じる finishActivity(); // Ozd作業画面を閉じる
} }
// #32861 作業情報追加 end
} else { } else {
return super.onKeyUp(keyCode, event); return super.onKeyUp(keyCode, event);
} }
...@@ -537,7 +549,7 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -537,7 +549,7 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
param.append("export.mode=silent#"); param.append("export.mode=silent#");
param.append("export.filename=" + FileUtil.getFilenameWithoutExt(mSaveOzdTempFileName) + "#"); param.append("export.filename=" + FileUtil.getFilenameWithoutExt(mSaveOzdTempFileName) + "#");
// #32926 作業報告画面改善 start // #32926 作業報告画面改善 start
param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "/" + mTaskReportLevel + "#"); param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "#"); //OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "/" + mTaskReportLevel + "#");
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
param.append("export.confirmsave=false#"); param.append("export.confirmsave=false#");
param.append("export.format=ozd"); param.append("export.format=ozd");
...@@ -555,7 +567,6 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -555,7 +567,6 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
return true; return true;
} }
// #32861 作業情報追加 start
// アラート表示処理 // アラート表示処理
private void showSaveConfirmAlert(final int dialogTitle, int dialogMessage) { private void showSaveConfirmAlert(final int dialogTitle, int dialogMessage) {
ABookAlertDialog logoutAkert = AlertDialogUtil.createAlertDialog(this, dialogTitle); ABookAlertDialog logoutAkert = AlertDialogUtil.createAlertDialog(this, dialogTitle);
...@@ -563,7 +574,11 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -563,7 +574,11 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
logoutAkert.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.confirm), new DialogInterface.OnClickListener() { logoutAkert.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.confirm), new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
tempSaved(); // 一時保存処理 // 削除ボタン以外には臨時保存処理を行う
if (mButtonStatus != R.id.btn_delete) {
tempSaved(); // 臨時保存処理
}
doProcess(); // HTML側の処理を行う
} }
}); });
logoutAkert.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), (DialogInterface.OnClickListener) null); logoutAkert.setButton(DialogInterface.BUTTON_NEGATIVE, getResources().getString(R.string.cancel), (DialogInterface.OnClickListener) null);
...@@ -579,7 +594,5 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -579,7 +594,5 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
return; return;
} }
} }
doProcess(); // HTML側の処理を行う
} }
// #32861 作業情報追加 end
} }
\ No newline at end of file
...@@ -63,7 +63,9 @@ import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; ...@@ -63,7 +63,9 @@ import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
public class HTMLWebViewActivity extends ParentWebViewActivity { public class HTMLWebViewActivity extends ParentWebViewActivity {
private static final String TAG = "HTMLWebViewActivity"; private static final String TAG = "HTMLWebViewActivity";
/** Called when the activity is first created. */ /**
* Called when the activity is first created.
*/
boolean forwardCheckFlg = false; boolean forwardCheckFlg = false;
boolean backCheckFlg = false; boolean backCheckFlg = false;
...@@ -74,6 +76,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -74,6 +76,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
private WebView webView; private WebView webView;
private JsInf jsInf = new JsInf(); private JsInf jsInf = new JsInf();
private ValueCallback<Uri[]> mUploadMessage; private ValueCallback<Uri[]> mUploadMessage;
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
Logger.i(TAG, "onCreate"); Logger.i(TAG, "onCreate");
...@@ -145,7 +148,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -145,7 +148,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
mShowedPopupWindow = new ABVPopupListWindow(HTMLWebViewActivity.this); mShowedPopupWindow = new ABVPopupListWindow(HTMLWebViewActivity.this);
if (isNormalSize()) { if (isNormalSize()) {
mShowedPopupWindow.setWidth(getRDimensionSize(R.dimen.popup_size_normal)); mShowedPopupWindow.setWidth(getRDimensionSize(R.dimen.popup_size_normal));
} else { } else {
mShowedPopupWindow.setWidth(getRDimensionSize(R.dimen.popup_size_large)); mShowedPopupWindow.setWidth(getRDimensionSize(R.dimen.popup_size_large));
...@@ -164,11 +167,11 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -164,11 +167,11 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
@Override @Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) { public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
switch (position) { switch (position) {
case 0 : case 0:
// お気に入り // お気に入り
contentLogic.setFavoriteContent(getContentId(), !isExist); contentLogic.setFavoriteContent(getContentId(), !isExist);
break; break;
default : default:
break; break;
} }
mShowedPopupWindow.dismiss(); mShowedPopupWindow.dismiss();
...@@ -278,7 +281,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -278,7 +281,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
} }
@Override @Override
public void onReceivedError (WebView view, int errorCode, String description, String failingUrl) { public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
Logger.e(TAG, "onReceivedError errorCode=%s, description=%s, failingUrl=%s", errorCode, description, failingUrl); Logger.e(TAG, "onReceivedError errorCode=%s, description=%s, failingUrl=%s", errorCode, description, failingUrl);
} }
...@@ -342,8 +345,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -342,8 +345,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
Logger.d(TAG, "ReloadUrl"); Logger.d(TAG, "ReloadUrl");
if (latitude != null && longitude != null) { if (latitude != null && longitude != null) {
webView.loadUrl(url + "&reload=true&latitude=" + latitude + "&longitude=" + longitude); webView.loadUrl(url + "&reload=true&latitude=" + latitude + "&longitude=" + longitude);
} } else {
else {
webView.loadUrl(url + "&reload=true"); webView.loadUrl(url + "&reload=true");
} }
} }
...@@ -359,7 +361,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -359,7 +361,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
ContentDownloader.getInstance().download(contentId); ContentDownloader.getInstance().download(contentId);
ABVToastUtil.showMakeText(getApplicationContext(), R.string.download_start, Toast.LENGTH_SHORT); ABVToastUtil.showMakeText(getApplicationContext(), R.string.download_start, Toast.LENGTH_SHORT);
} catch (Exception e) { } catch (Exception e) {
Logger.e(TAG, "Download failed." ,e); Logger.e(TAG, "Download failed.", e);
downloadButton.setEnabled(true); downloadButton.setEnabled(true);
handleErrorMessageToast(e); handleErrorMessageToast(e);
} }
...@@ -369,8 +371,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -369,8 +371,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
downloadButton.setVisibility(View.VISIBLE); downloadButton.setVisibility(View.VISIBLE);
if (isUpdate) { if (isUpdate) {
downloadButton.setBackgroundResource(R.drawable.btn_update); downloadButton.setBackgroundResource(R.drawable.btn_update);
} } else {
else {
downloadButton.setBackgroundResource(R.drawable.btn_download); downloadButton.setBackgroundResource(R.drawable.btn_download);
} }
} }
...@@ -411,7 +412,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -411,7 +412,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
historyListBtn.setVisibility(View.GONE); historyListBtn.setVisibility(View.GONE);
if(isLinkedContent) { if (isLinkedContent) {
ContentDto contentDto = AbstractDao.getDao(ContentDao.class).getContent(contentId); ContentDto contentDto = AbstractDao.getDao(ContentDao.class).getContent(contentId);
if (ContentJSON.KEY_MOVIE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_MUSIC_TYPE.equals(contentDto.contentType) if (ContentJSON.KEY_MOVIE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_MUSIC_TYPE.equals(contentDto.contentType)
|| ContentJSON.KEY_PANO_IMAGE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_PANO_MOVIE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_PANO_IMAGE_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_PANO_MOVIE_TYPE.equals(contentDto.contentType)
...@@ -453,8 +454,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -453,8 +454,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
Logger.d(TAG, "existSetLocation=%s", ret); Logger.d(TAG, "existSetLocation=%s", ret);
if (ret != null && ret.equals("true")) { // setLocationメソッドが存在する場合、ページ読み込み完了とみなす if (ret != null && ret.equals("true")) { // setLocationメソッドが存在する場合、ページ読み込み完了とみなす
isPageFinished = true; isPageFinished = true;
} } else { // 存在しない場合、ページ読み込み未完了とみなし1秒後に再度呼出しを繰り返す
else { // 存在しない場合、ページ読み込み未完了とみなし1秒後に再度呼出しを繰り返す
handler.postDelayed(new Runnable() { handler.postDelayed(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -478,11 +478,11 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -478,11 +478,11 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
} }
} }
}); });
} } else {
else {
finishActivity(); finishActivity();
} }
} }
@JavascriptInterface @JavascriptInterface
public void getAttachedDataUrl(String data) { public void getAttachedDataUrl(String data) {
commonAttachedDataUrl(data); commonAttachedDataUrl(data);
...@@ -671,7 +671,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -671,7 +671,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
} }
@Override @Override
protected void webViewLoadUrl(String url){ protected void webViewLoadUrl(String url) {
if (webView != null) { if (webView != null) {
webView.loadUrl(url); webView.loadUrl(url);
} }
......
...@@ -401,4 +401,9 @@ public class ParentWebViewActivity extends ABVContentViewActivity { ...@@ -401,4 +401,9 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
return null; return null;
} }
// 上位のClassからHTML側のコールを行うための処理
public void callViewLoadUrl(String url) {
webViewLoadUrl(url);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment