Commit 51f02995 by onuma

Merge branch 'develop'

parents 0cf92a9c 4e8470d2
......@@ -68,8 +68,9 @@ public class OperationDataJSON extends AcmsCommonJSON {
if (taskJson.has(TaskStatus)) {
dto.taskStatus = taskJson.getInt(TaskStatus);
}
dto.taskHotSpotInfo = taskJson.getJSONObject(TaskHotspotInfo).toString();
if (taskJson.has(TaskHotspotInfo) && !taskJson.get(TaskHotspotInfo).equals("")) {
dto.taskHotSpotInfo = taskJson.getJSONObject(TaskHotspotInfo).toString();
}
if (taskJson.has(TaskStatus)) {
dto.taskStatus = taskJson.getInt(TaskStatus);
}
......
......@@ -193,6 +193,11 @@ public class ABookKeys {
public static final String THETA_LIST_ACTIVITY_FLG = "thetaListActivityFlg";
//連続作業
public static final String PANO_IMAGE = "panoImage";
public static final String TASK_PDF = "taskPdf";
public static final String PHASE_INFO_JSON = "phaseInfo.json";
public static final String TIME_LINE_LIST = "timeLineList";
public static final String PROCESS_KEY = "processKey";
public static final String PROCESS_STATUS = "processStatus";
public static final String PHASE_NO = "phaseNo";
......
......@@ -204,29 +204,32 @@ public class ContentRefresher {
}
groupLogic.initializeGroups(); // グループ設定(グループ変更の場合、FetchDateをクリアする)
if (mProgressCallback != null) {
mProgressCallback.callback(5);
mProgressCallback.callback(10);
}
categoryLogic.initializeCategories(); // カテゴリ設定
// 絞り検索マスタデータの最新更新された時のFetchDateを一時に保存する。
if (mProgressCallback != null) {
mProgressCallback.callback(5);
mProgressCallback.callback(10);
}
// CMSでメンテナンスされる絞り検索マスタデータをアプリから取得できるようにJSONファイルを生成する。
apertureMasterDataLogic.initializeApertureMasterData();
if (mProgressCallback != null) {
mProgressCallback.callback(5);
mProgressCallback.callback(10);
}
// 作業種別情報を取得
operationGroupMasterLogic.setOperationGroupMaster();
if (mProgressCallback != null) {
mProgressCallback.callback(5);
mProgressCallback.callback(10);
}
if (interrupt) { // この時点で停止要求が来た場合先には進まない。(ServiceOption/Group/Categoryの更新は1セットで行う(トランザクションはそれぞれ別))
Logger.d(TAG, "stop refresh worker before content update.");
setFail();
updateRefreshContentListState(-1L, null, mProgressCallback);
if (mProgressCallback != null) {
mProgressCallback.callback(10);
}
return;
}
isFinishedContentCheck = retrieveServerContent(localContents, mProgressCallback); // ContentVersionAPIを呼出し新規と更新の場合ContentInfoをDLする
......@@ -236,13 +239,12 @@ public class ContentRefresher {
initializingRefreshing = false;
if (!isRefreshing()) {
updateRefreshContentListState(-1L, null, mProgressCallback);
updateRefreshContentListState(-1L, null);
}
mProgressCallback.callback(100);
} catch (Exception e) {
Logger.e("refreshContent failed.", e);
mProgressCallback.callback(100);
updateRefreshContentListState(-1L, e);
mProgressCallback.callback(100);
}
contentDownloader.kickTask();
Logger.i(TAG, "refresh main thread end.-----------------------------------------------");
......@@ -342,11 +344,6 @@ public class ContentRefresher {
List<ContentDto> serverContents = json.contentVersions;
// DTO Info:contentId, metaVersion, resourceVersion, contentNameKana, readerShareFlg
int progressPercent = 0;
if (CollectionUtil.isNotEmpty(serverContents) && serverContents.size() != 0) {
progressPercent = 50 / serverContents.size() < 1 ? 1 : 50 / serverContents.size();
}
int totalProgress = 0;
for (ContentDto serverContentDto : serverContents) {
while (isBusyRefreshingContent()) {
......@@ -386,9 +383,9 @@ public class ContentRefresher {
}
}
}
if (mProgressCallback != null && totalProgress < 50) {
mProgressCallback.callback(progressPercent);
totalProgress = totalProgress + progressPercent;
if (mProgressCallback != null && totalProgress < 20) {
mProgressCallback.callback(1);
totalProgress = totalProgress + 1;
}
}
......
......@@ -14,6 +14,8 @@ public class OperationTaskDto extends AbstractDto {
public int seqId;
public Date insertDate;
public Date updateDate;
public String processKey;
public int processStatus;
public float pdfX;
public float pdfY;
public boolean isFinished;
......
package jp.agentec.abook.abv.bl.logic;
import static jp.agentec.abook.abv.bl.acms.type.OperationType.DRAWING;
import static jp.agentec.abook.abv.bl.acms.type.OperationType.PANO;
import static jp.agentec.abook.abv.bl.acms.type.OperationType.PDF;
import net.lingala.zip4j.exception.ZipException;
import org.json.adf.JSONArray;
......@@ -113,7 +117,7 @@ public class OperationLogic extends AbstractLogic {
public void initializeOperations(Callback mCallBack) throws AcmsException, NetworkDisconnectedException {
// 作業グループリスト取得
setWorkingGroupList();
mCallBack.callback(5);
mCallBack.callback(2);
// 作業一覧取得し、登録・更新・削除する
retrieveServerOperation(mCallBack);
}
......@@ -366,7 +370,6 @@ public class OperationLogic extends AbstractLogic {
insertFlg = false;
break;
}
mCallBack.callback(1);
}
// 更新されたら以下の処理は行わない
......@@ -394,7 +397,6 @@ public class OperationLogic extends AbstractLogic {
for (OperationGroupMasterRelationDto operationGroupMasterRelationDto : serverOperationDto.operationGroupMasterRelationDtoList) {
mOperationGroupMasterOperationDao.insertOperationGroupMasterOperation(operationGroupMasterRelationDto);
}
mCallBack.callback(2);
}
// 作業担当グループ登録
......@@ -1022,6 +1024,8 @@ public class OperationLogic extends AbstractLogic {
try {
OperationDto operationDto = mOperationDao.getOperation(operationId);
if (operationDto.reportType == Constant.ReportType.ReportContinuous) {
contentPath = contentPath.replaceAll("panoImage","processList");
contentPath = contentPath.replaceAll("taskPdf","processList");
createContinuousTaskReportJson(operationId);
createContinuousTaskReportSuggestJson(operationId);
createProcessInfoJson(operationId, contentPath);
......@@ -1154,6 +1158,11 @@ public class OperationLogic extends AbstractLogic {
List<JSONObject> taskJsonList = new ArrayList<JSONObject>();
JSONObject hotspotJson = new JSONObject();
List<TaskDto> taskDtoList = mTaskDao.selectTaskByOperationId(operationId);
OperationDto operation = mOperationDao.getOperation(operationId);
if (operation.reportType == Constant.ReportType.ReportContinuous) {
contentPath = contentPath.replaceAll("panoImage","processList");
contentPath = contentPath.replaceAll("taskPdf","processList");
}
for (TaskDto dto : taskDtoList) {
if (!StringUtil.isNullOrEmpty(dto.taskHotSpotInfo)) {
JSONObject taskHotSpot = new JSONObject(dto.taskHotSpotInfo);
......@@ -1211,6 +1220,11 @@ public class OperationLogic extends AbstractLogic {
JSONObject phaseStatusJson = new JSONObject();
phaseStatusJson.put(ABookKeys.PROCESS_LIST, processInfoList);
OperationDto operation = mOperationDao.getOperation(operationId);
if (operation.operationType == PANO || operation.operationType == DRAWING || operation.operationType == PDF) {
contentPath = contentPath.replaceAll("panoImage","processList");
contentPath = contentPath.replaceAll("taskPdf","processList");
}
FileUtil.createFile(contentPath + "/phaseStatus.json", phaseStatusJson.toString());
}
/**
......@@ -1233,10 +1247,38 @@ public class OperationLogic extends AbstractLogic {
taskJsonList.add(taskDtoJson);
}
processInfoJson.put("processList", taskJsonList);
OperationDto operation = mOperationDao.getOperation(operationId);
if (operation.operationType == PANO || operation.operationType == DRAWING || operation.operationType == PDF) {
contentPath = contentPath.replaceAll("panoImage","processList");
contentPath = contentPath.replaceAll("taskPdf","processList");
}
Logger.d(TAG, "createProcessInfoJson : " + processInfoJson.toString());
FileUtil.createFile(contentPath + "/processInfo.json", processInfoJson.toString());
}
private String getProcessInfoJson(Long operationId, String contentPath) throws IOException {
List<JSONObject> taskJsonList = new ArrayList<JSONObject>();
JSONObject processInfoJson = new JSONObject();
List<TaskDto> taskDtoList = mTaskDao.selectTaskGroupByProcessKeyByOperationId(operationId);
for (TaskDto dto : taskDtoList) {
JSONObject taskDtoJson = new JSONObject();
taskDtoJson.put(ABookKeys.TASK_NAME, dto.taskName);
taskDtoJson.put(ABookKeys.TASK_CODE, dto.taskCode);
taskDtoJson.put(ABookKeys.PROCESS_KEY, dto.processKey);
taskDtoJson.put(ABookKeys.PROCESS_STATUS, dto.processStatus);
taskJsonList.add(taskDtoJson);
}
processInfoJson.put("processList", taskJsonList);
OperationDto operation = mOperationDao.getOperation(operationId);
if (operation.operationType == PANO || operation.operationType == DRAWING || operation.operationType == PDF) {
contentPath = contentPath.replaceAll("panoImage","processList");
contentPath = contentPath.replaceAll("taskPdf","processList");
}
Logger.d(TAG, "createProcessInfoJson : " + processInfoJson.toString());
FileUtil.createFile(contentPath + "/processInfo.json", processInfoJson.toString());
return processInfoJson.toString();
}
/**
* 作業報告用のjsonファイル
* 報告と報告(回答)のデータの区分が必要なので、「taskReport_0」と「taskReport_1」で形式で作成
......@@ -2127,6 +2169,29 @@ public class OperationLogic extends AbstractLogic {
}
}
public String getProcessDataAndCreateJson(Long operationId, String contentPath, boolean routineTaskReportFlg) throws NetworkDisconnectedException, ABVException, IOException {
GetOperationDataParameters param = new GetOperationDataParameters(ABVDataCache.getInstance().getMemberInfo().sid, operationId);
ProcessDataJSON json = AcmsClient.getInstance(ABVDataCache.getInstance().getUrlPath(), ABVEnvironment.getInstance().networkAdapter).getProcessData(param);
for (TaskDto taskDto : json.taskDtoList) {
for (TaskDto phaseTaskDto : taskDto.phaseList) {
//Taskデータ更新(phaseStatus, processStatus)
mTaskDao.updateStatus(taskDto.processKey, phaseTaskDto.phaseNo, taskDto.processStatus, phaseTaskDto.phaseStatus);
for (TaskReportApprovalDto taskReportApprovalDto : phaseTaskDto.taskReportApprovalDtoList) {
taskReportApprovalDto.processKey = taskDto.processKey;
taskReportApprovalDto.phaseNo = phaseTaskDto.phaseNo;
//TaskReportApprovalデータ追加・更新
if (mTaskReportApprovalDao.selectTaskReportApprovalByProcessKey(taskDto.processKey, phaseTaskDto.phaseNo, taskReportApprovalDto.approvalNo) != null) {
mTaskReportApprovalDao.update(taskReportApprovalDto);
} else {
mTaskReportApprovalDao.insert(taskReportApprovalDto);
}
}
}
}
return getProcessInfoJson(operationId, contentPath);
}
/**
* 工程情報を全部削除する。(全削除ボタンタップ時)
* @param operationId 作業ID
......
Subproject commit 2d46495648e5448102da39f0641590102570421a
Subproject commit 23a816fbded72bb2495c4eb25e6413a28e4f900e

502 Bytes | W: | H:

1.34 KB | W: | H:

ABVJE_Res_Default_Android/res/drawable-xhdpi/home_icon_off.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/home_icon_off.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/home_icon_off.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/home_icon_off.png
  • 2-up
  • Swipe
  • Onion skin

479 Bytes | W: | H:

1.34 KB | W: | H:

ABVJE_Res_Default_Android/res/drawable-xhdpi/home_icon_on.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/home_icon_on.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/home_icon_on.png
ABVJE_Res_Default_Android/res/drawable-xhdpi/home_icon_on.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_enabled="false"
android:drawable="@drawable/home_common_content_icon_off"/>
android:drawable="@drawable/home_common_content_icon_on"/>
<item
android:drawable="@drawable/home_common_content_icon_on"/>
</selector>
\ No newline at end of file
......@@ -1503,5 +1503,9 @@
<string name="msg_fail_collaboration_not_action_allow">文書協業中には利用できない機能です。</string>
<string name="msg_fail_collaboration_join_error">協業に参加することができませんでした。</string>
<string name="msg_fail_collaboration_pip_change_host">PIP状態ではホスト変更できません。PIPを解除してください。</string>
<string name="btn_home">ホーム</string>
<string name="btn_content">関連資料</string>
<string name="btn_communication">コミュニケーション</string>
<string name="btn_setting">設定</string>
<string name="btn_print">PDF</string>
</resources>
......@@ -1508,4 +1508,9 @@
<string name="msg_fail_collaboration_not_action_allow">문서협업 중에는 이용할 수 없는 기능입니다.</string>
<string name="msg_fail_collaboration_join_error">협업에 참여하실수 없습니다.</string>
<string name="msg_fail_collaboration_pip_change_host">PIP 상태에서는 호스트 변경이 불가능합니다. PIP 모드를 해제해 주세요.</string>
<string name="btn_home"></string>
<string name="btn_content">관련자료</string>
<string name="btn_communication">커뮤니케이션</string>
<string name="btn_setting">설정</string>
<string name="btn_print">PDF</string>
</resources>
\ No newline at end of file
......@@ -80,7 +80,7 @@
<color name="operation_name">#333333</color>
<color name="operation_description">#333333</color>
<color name="operation_date">#37648C</color>
<color name="operation_color">#095395</color>
<color name="operation_color">#0053F0</color>
<color name="operation_disable_color">#CCCCCC</color>
<color name="operation_search_header">#CCCCCC</color>
<color name="operation_search_button_color">#0068CB</color>
......@@ -88,7 +88,7 @@
<color name="operation_related_content_new_mark">#ff0000</color>
<color name="operation_bg">#FFFFFF</color>
<color name="bottom_toolbar">#F2F2F2</color>
<color name="bottom_toolbar">#F8F9FA</color>
<color name="dialog_text_color">#000000</color>
......
......@@ -1504,4 +1504,9 @@
<string name="msg_fail_collaboration_not_action_allow">This function cannot be used during document collaboration.</string>
<string name="msg_fail_collaboration_join_error">Could not connect to the collaboration.</string>
<string name="msg_fail_collaboration_pip_change_host">Host change is not possible in PIP state. Please turn off picture-in-picture mode.</string>
<string name="btn_home">Home</string>
<string name="btn_content">Related Content</string>
<string name="btn_communication">Communication</string>
<string name="btn_setting">Setting</string>
<string name="btn_print">PDF</string>
</resources>
......@@ -90,7 +90,7 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@color/bottom_toolbar"
android:minHeight="50dp"
android:minHeight="70dp"
android:visibility="visible">
<LinearLayout
......@@ -104,25 +104,49 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btn_operation_home"
style="@style/ToolBarIcon"
android:layout_width="25dp"
android:layout_height="25dp"
android:scaleType="fitCenter"
android:src="@drawable/btn_operation_home" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="11sp"
android:text="@string/btn_home"
android:gravity="center"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btn_common_content"
style="@style/ToolBarIcon"
android:scaleType="fitCenter"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/btn_common_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="11sp"
android:textColor="@color/operation_color"
android:text="@string/btn_content"
android:gravity="center"/>
</LinearLayout>
......@@ -130,13 +154,24 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btn_communication_menu"
style="@style/ToolBarIcon"
android:layout_width="25dp"
android:layout_height="25dp"
android:scaleType="fitCenter"
android:layout_centerVertical="true"
android:src="@drawable/ic_communication_menu" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="11sp"
android:text="@string/btn_communication"
android:gravity="center"/>
</LinearLayout>
<LinearLayout
......@@ -144,26 +179,48 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btn_operation_print"
style="@style/ToolBarIcon"
android:layout_width="25dp"
android:layout_height="25dp"
android:scaleType="fitCenter"
android:layout_centerVertical="true"
android:src="@drawable/btn_operation_print" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="11sp"
android:text="@string/btn_print"
android:gravity="center"/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btn_setting"
style="@style/ToolBarIcon"
android:layout_width="25dp"
android:layout_height="25dp"
android:scaleType="fitCenter"
android:onClick="onClickSetting"
android:src="@drawable/ic_operation_setting" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="11sp"
android:text="@string/btn_setting"
android:gravity="center"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/related_content_main_linear"
android:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -81,7 +82,7 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@color/bottom_toolbar"
android:minHeight="50dp"
android:minHeight="70dp"
android:visibility="visible">
<LinearLayout
......@@ -89,13 +90,23 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btn_operation_home"
android:layout_width="wrap_content"
android:layout_width="25dp"
android:layout_height="25dp"
android:background="@drawable/btn_operation_home"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/btn_operation_home" />
android:textSize="11sp"
android:text="@string/btn_home"
android:gravity="center"/>
</LinearLayout>
......@@ -104,13 +115,23 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btn_common_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="25dp"
android:layout_height="25dp"
android:background="@drawable/btn_common_content" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="11sp"
android:text="@string/btn_content"
android:textColor="@color/operation_color"
android:gravity="center"/>
</LinearLayout>
......@@ -119,14 +140,23 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btn_communication_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_width="25dp"
android:layout_height="25dp"
android:scaleType="fitCenter"
android:background="@drawable/ic_communication_menu" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="11sp"
android:text="@string/btn_communication"
android:gravity="center"/>
</LinearLayout>
<LinearLayout
......@@ -135,14 +165,22 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btn_operation_print"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_centerVertical="true"
android:background="@drawable/btn_operation_print" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="11sp"
android:text="@string/btn_print"
android:gravity="center"/>
</LinearLayout>
<LinearLayout
......@@ -150,15 +188,24 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/btn_setting"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_centerVertical="true"
android:background="@drawable/ic_operation_setting"
android:onClick="onClickSetting" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="11sp"
android:text="@string/btn_setting"
android:gravity="center"/>
</LinearLayout>
</LinearLayout>
......
......@@ -3,7 +3,7 @@
android:id="@+id/linear_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/app_bg"
android:background="@color/operation_color"
>
<LinearLayout
......
......@@ -2,7 +2,7 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/app_bg" >
android:background="@color/operation_color" >
<ImageView
android:id="@+id/img_logo"
......
......@@ -1284,7 +1284,7 @@ public abstract class ABVAuthenticatedActivity extends ABVActivity implements Co
protected void setCommunicationImageButton() {
List<PushMessageDto> pushMessageDtoList = pushMessageLogic.getAllPushMessageList();
boolean existUnreadFlg = checkUnReadCommunication(pushMessageDtoList);
communicationButton.setImageResource(existUnreadFlg ? R.drawable.ic_communication_menu_with_badge : R.drawable.ic_communication_menu);
communicationButton.setImageResource(R.drawable.ic_communication_menu);
}
/**
......
......@@ -116,7 +116,13 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
Bundle extras = getIntent().getExtras();
Long roomId = extras.getLong(AppDefType.ChatPushMessageKey.roomId, 0);
if (roomId == 0) {
alertDialog.setPositiveButton(R.string.ok, null);
alertDialog.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.CANCEL, getIntent());
dialog.dismiss();
}
});
} else {
alertDialog.setPositiveButton(R.string.move, new DialogInterface.OnClickListener() {
@Override
......@@ -146,13 +152,13 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
dialog.dismiss();
}
});
alertDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
finish();
}
});
}
alertDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
finish();
}
});
alertDialog.show();
}
}
......
......@@ -1902,7 +1902,7 @@ public class OperationListActivity extends ABVUIActivity {
public void run() {
try {
createJsonForOperationList(getCacheDir().getAbsolutePath());
mCheckWebView.loadUrl("javascript:CHK.initReportApp();");
mCheckWebView.loadUrl("javascript:CHK.initOperationList();");
} catch (Exception e) {
Logger.d("Update error");
}
......
......@@ -4,6 +4,10 @@ package jp.agentec.abook.abv.ui.viewer.activity;
* @author jang
*/
import static jp.agentec.abook.abv.bl.acms.type.OperationType.DRAWING;
import static jp.agentec.abook.abv.bl.acms.type.OperationType.PANO;
import static jp.agentec.abook.abv.bl.acms.type.OperationType.PDF;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
......@@ -76,8 +80,10 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import jp.agentec.abook.abv.bl.acms.client.json.AcmsJSONParser;
import jp.agentec.abook.abv.bl.acms.client.json.DownloadedContentInfoJSON;
import jp.agentec.abook.abv.bl.acms.client.json.MarkingJson;
import jp.agentec.abook.abv.bl.acms.client.json.content.ActionInfoJSON;
......@@ -95,7 +101,9 @@ import jp.agentec.abook.abv.bl.common.CommonExecutor;
import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.constant.ABookCommConstants;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.exception.ABVException;
import jp.agentec.abook.abv.bl.common.exception.ExceptionHandler;
import jp.agentec.abook.abv.bl.common.exception.NetworkDisconnectedException;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.common.util.ContentFileUtil;
import jp.agentec.abook.abv.bl.common.util.JsonUtil;
......@@ -104,9 +112,13 @@ import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.data.dao.ContentPageDao;
import jp.agentec.abook.abv.bl.download.ContentFileExtractor;
import jp.agentec.abook.abv.bl.dto.ChatMessageDto;
import jp.agentec.abook.abv.bl.dto.ChatRoomDto;
import jp.agentec.abook.abv.bl.dto.ContentBookmarkDto;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.dto.OperationTaskDto;
import jp.agentec.abook.abv.bl.dto.TaskDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic;
import jp.agentec.abook.abv.bl.logic.ContractLogic;
......@@ -172,6 +184,7 @@ import jp.agentec.abook.abv.ui.viewer.view.action.TapMediaPlayer;
import jp.agentec.abook.abv.ui.viewer.view.action.VideoMountAction;
import jp.agentec.adf.net.http.HttpDownloadSimpleNotification;
import jp.agentec.adf.net.http.HttpDownloadState;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil;
import jp.agentec.adf.util.StringUtil;
......@@ -335,7 +348,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
public boolean mMoveTaskFlg = false;
private long currentRemoteObjectId = 0;
private static final int FINISHED_STATUS = 999;
/**
* スクロールステータス
......@@ -5157,6 +5170,10 @@ public class ContentViewActivity extends ABVContentViewActivity {
case ABookKeys.CMD_UPDATE_TASK_REPORT: // 作業報告の更新
case ABookKeys.CMD_DELETE_TASK_REPORT: // 作業報告の削除
case ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT: // 一時保存
case ABookKeys.CMD_DELETE_PROCESS:
if (cmd.equals(ABookKeys.CMD_DELETE_PROCESS)) {
checkParam.put(ABookKeys.TASK_REPORT_LEVEL, "0");
}
getTaskHotspotJSON();
case ABookKeys.CMD_CANCEL_TASK_REPORT: // 作業報告のキャンセル
if(operationTaskDto != null) {
......@@ -5210,8 +5227,14 @@ public class ContentViewActivity extends ABVContentViewActivity {
private void getTaskHotspotJSON() {
try {
String contentPath = ABVEnvironment.getInstance().getTaskPdfDirName(ContentFileExtractor.getInstance().getContentCacheDirWithExtract(operationDto.contentId));
String hotspots = FileUtil.readTextFile(contentPath + "/" + ABookKeys.TASK_HOTSPOT + ".json");
mTaskHotspotJSON = new TaskHotspotJSON(hotspots);
if (operationDto.reportType == Constant.ReportType.ReportContinuous) {
contentPath = contentPath.replaceAll("panoImage","processList");
contentPath = contentPath.replaceAll("taskPdf","processList");
}
String hotspots = FileUtil.readTextFile(contentPath + "/" + ABookKeys.TASK_HOTSPOT + ".json");
if (hotspots != null) {
mTaskHotspotJSON = new TaskHotspotJSON(hotspots);
}
} catch (IOException e) {
Logger.e(TAG, "read taskHotspot.json failed.", e);
initError();
......@@ -5340,6 +5363,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
mMainLayout.addView(operationTaskLayout);
List<OperationTaskDto> tasks = mTaskHotspotJSON.getPageTasks(pageNumber);
operationTaskLayout.addAllOperationTaskIcon(rootLayout, tasks);
//画面回転の時
......@@ -5388,15 +5412,71 @@ public class ContentViewActivity extends ABVContentViewActivity {
case ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT: // 一時保存
if (taskReportLevel == Constant.TaskReportLevel.ReportType) {
JSONObject hotspot = new JSONObject(checkParam.get(ABookKeys.HOT_SPOT));
JSONObject hotspot = null;
if (checkParam.get(ABookKeys.HOT_SPOT) != null) {
hotspot = new JSONObject(checkParam.get(ABookKeys.HOT_SPOT));
taskCode = hotspot.getString(ABookKeys.TASK_CODE);
}
OperationDto operation = mOperationDao.getOperation(mOperationId);
String jsonPath = "";
if ((operation.operationType == PANO || operation.operationType == DRAWING || operation.operationType == PDF) && operation.reportType == Constant.ReportType.ReportContinuous) {
String processKey = checkParam.get(ABookKeys.PROCESS_KEY) != null ? checkParam.get(ABookKeys.PROCESS_KEY) : "";
List<TaskDto> taskList = mTaskDao.getTaskByProcessKey(processKey);
if (taskList != null && taskList.size() > 0) {
for (TaskDto task : taskList) {
if (task.phaseNo == 1) {
operationTaskLayout.setIconStatus(taskKey, true);
operationTaskLayout.currentTaskDto.taskKey = task.taskKey;
operationTaskLayout.currentTaskDto.taskCode = task.taskCode;
jsonPath = mContentPath.replaceAll(ABookKeys.PANO_IMAGE,ABookKeys.PROCESS_LIST).replaceAll(ABookKeys.TASK_PDF, ABookKeys.PROCESS_LIST) + "/" + ABookKeys.PHASE_INFO_JSON;
JSONObject phaseInfo = null;
int lastPhase = 0;
try {
phaseInfo = new JSONObject(FileUtil.readTextFile(jsonPath));
JSONArray timeLineListJSONArray = phaseInfo.getJSONArray(ABookKeys.TIME_LINE_LIST);
for (int listCount = 0; listCount < timeLineListJSONArray.length(); listCount++) {
if (timeLineListJSONArray.getJSONObject(listCount).length() == 0) {
break;
}
JSONObject timeLineJSONObject = timeLineListJSONArray.getJSONObject(listCount);
JSONArray phaseListJSONArray = timeLineJSONObject.getJSONArray(ABookKeys.PHASE_LIST);
lastPhase = lastPhase + phaseListJSONArray.length();
}
} catch (IOException e) {
e.printStackTrace();
}
TaskDto lastTask = null;
for (TaskDto compareTask : taskList) {
if (compareTask.phaseNo == lastPhase) {
lastTask = compareTask;
}
}
if (lastTask != null) {
operationTaskLayout.currentTaskDto.isFinished = (lastTask.taskStatus == FINISHED_STATUS);
} else {
operationTaskLayout.currentTaskDto.isFinished = false;
}
operationTaskLayout.currentTaskDto.processKey = task.processKey;
operationTaskLayout.currentTaskDto.processStatus = task.processStatus;
operationTaskLayout.addOperationTaskIcon(operationTaskLayout.currentLayout, operationTaskLayout.currentTaskDto);
}
}
} else {
operationTaskLayout.setIconStatus(taskKey, true);
operationTaskLayout.currentTaskDto.taskKey = taskKey;
operationTaskLayout.currentTaskDto.taskCode = taskCode;
operationTaskLayout.currentTaskDto.isFinished = operationTaskLayout.isTaskFinished(taskKey);
operationTaskLayout.addOperationTaskIcon(operationTaskLayout.currentLayout, operationTaskLayout.currentTaskDto);
}
taskCode = hotspot.getString(ABookKeys.TASK_CODE);
} else {
operationTaskLayout.setIconStatus(taskKey, true);
operationTaskLayout.currentTaskDto.taskKey = taskKey;
operationTaskLayout.currentTaskDto.taskCode = taskCode;
operationTaskLayout.currentTaskDto.isFinished = operationTaskLayout.isTaskFinished(taskKey);
operationTaskLayout.addOperationTaskIcon(operationTaskLayout.currentLayout, operationTaskLayout.currentTaskDto);
}
operationTaskLayout.setIconStatus(taskKey, true);
operationTaskLayout.currentTaskDto.taskKey = taskKey;
operationTaskLayout.currentTaskDto.taskCode = taskCode;
operationTaskLayout.currentTaskDto.isFinished = operationTaskLayout.isTaskFinished(taskKey);
operationTaskLayout.addOperationTaskIcon(operationTaskLayout.currentLayout, operationTaskLayout.currentTaskDto);
//hideOperationTaskLayout();
} else {
operationTaskLayout.setIconStatus(taskKey, false);
......@@ -5404,6 +5484,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
break;
case ABookKeys.CMD_DELETE_TASK_REPORT:
case ABookKeys.CMD_DELETE_PROCESS:
if (taskReportLevel == Constant.TaskReportLevel.ReportType) {
operationTaskLayout.setIconStatus(taskKey, true);
} else {
......
......@@ -51,6 +51,7 @@ public class OperationTaskLayout extends RelativeLayout {
private static final String TEMP_TASK_KEY = "00000000-0000-0000-0000-000000000000";
private static final String SCRIPT_SHOW_TASK_LIST = "javascript:CHK_P.updateTaskListForApp(%d)";//CHK.updateTaskListForApp(pageNum)
private static final String SCRIPT_SHOW_TASK_REPORT = "javascript:CHK.showReportForm('%s')";//CHK.showTaskReportForm(name, taskKey, lookto)
private static final String SCRIPT_BEFORE_SHOW_TASK_REPORT = "javascript:CHK.beforeShowReportForm('%s')";//CHK.beforeShowReportForm(name, taskKey, lookto)
private static final int ICON_WIDTH = 32;
private static final int ICON_HEIGHT = 32;
......@@ -284,7 +285,16 @@ public class OperationTaskLayout extends RelativeLayout {
public void addAllOperationTaskIcon(final ZoomRelativeLayout rootLayout, final List<OperationTaskDto> dto) {
for (OperationTaskDto task : dto) {
task.isFinished = isTaskFinished(task.taskKey);
TaskDto taskDto = mTaskDao.getTaskByTaskKey(task.taskKey);
task.processKey = taskDto.processKey;
task.processStatus = taskDto.processStatus;
if (StringUtil.isNullOrEmpty(task.processKey)) {
task.isFinished = isTaskFinished(task.taskKey);
} else if (task.processStatus == FINISHED_STATUS) {
task.isFinished = true;
} else {
task.isFinished = false;
}
addOperationTaskIcon(rootLayout, task);
}
}
......@@ -301,6 +311,13 @@ public class OperationTaskLayout extends RelativeLayout {
return mTaskDao.getTaskByTaskKey(taskKey).taskStatus == FINISHED_STATUS;
}
public boolean isProcessFinished(String taskKey) {
if (mTaskDao.getTaskByTaskKey(taskKey) == null) {
return false;
}
return mTaskDao.getTaskByTaskKey(taskKey).taskStatus == FINISHED_STATUS;
}
public void showTaskList(int pageNum, boolean isNormalSize) {
final String script = String.format(SCRIPT_SHOW_TASK_LIST, pageNum + 1);
......@@ -335,7 +352,7 @@ public class OperationTaskLayout extends RelativeLayout {
final String script;
script = String.format(SCRIPT_SHOW_TASK_REPORT, operationTaskDto.taskKey.equals(TEMP_TASK_KEY) ? "" : operationTaskDto.taskKey);
script = String.format(SCRIPT_BEFORE_SHOW_TASK_REPORT, operationTaskDto.taskKey.equals(TEMP_TASK_KEY) ? "" : operationTaskDto.taskKey);
runOnUiThread(new Runnable() {
@Override
......@@ -399,13 +416,13 @@ public class OperationTaskLayout extends RelativeLayout {
operationTaskDto.taskKey = taskDto.taskKey;
operationTaskDto.taskCode = taskDto.taskCode;
JSONObject hotSpot = new JSONObject(taskDto.taskHotSpotInfo);
operationTaskDto.pdfX = hotSpot.getInt(ABookKeys.PDF_X);
operationTaskDto.pdfY = hotSpot.getInt(ABookKeys.PDF_Y);
if (!StringUtil.isNullOrEmpty(taskDto.taskHotSpotInfo)) {
JSONObject hotSpot = new JSONObject(taskDto.taskHotSpotInfo);
operationTaskDto.pdfX = hotSpot.getInt(ABookKeys.PDF_X);
operationTaskDto.pdfY = hotSpot.getInt(ABookKeys.PDF_Y);
}
currentTaskDto = operationTaskDto;
if (currentLayout.isLeftSideOfPdf((int)operationTaskDto.pdfX)) {
if (operationTaskDto.pdfY != 0 && currentLayout.isLeftSideOfPdf((int)operationTaskDto.pdfX)) {
params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
} else {
params.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
......
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