Commit 60e0ca4b by Kim Peace

Merge commit '484b514b' into communication/develop

# Conflicts:
#	ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/activity/OperationListActivity.java
parents 43db6181 484b514b
......@@ -20,6 +20,7 @@ public class ABookKeys {
public static final String OPERATION_TYPE = "operationType";
public static final String OPERATION_START_DATE = "operationStartDate";
public static final String OPERATION_END_DATE = "operationEndDate";
public static final String OPERATION_OPEN_DATE = "operationOpenDate";
public static final String LAST_EDIT_DATE = "lastEditDate";
public static final String NEED_SYNC_FLG = "needSyncFlg";
public static final String REPORT_TYPE = "reportType";
......
......@@ -45,6 +45,10 @@ public class OperationDao extends AbstractDao {
if (column != -1) {
dto.operationEndDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMdd_hyphen);
}
column = cursor.getColumnIndex("operation_open_date");
if (column != -1) {
dto.operationOpenDate = DateTimeUtil.toDate(cursor.getString(column), "UTC", DateTimeFormat.yyyyMMddHHmmss_hyphen);
}
column = cursor.getColumnIndex("operation_type");
if (column != -1) {
dto.operationType = cursor.getInt(column);
......@@ -322,6 +326,7 @@ public class OperationDao extends AbstractDao {
sql.append(" top.operation_descriptions, ");
sql.append(" top.operation_start_date, ");
sql.append(" top.operation_end_date, ");
sql.append(" top.operation_open_date, ");
sql.append(" top.last_edit_date, ");
sql.append(" top.edit_lock_flg, ");
sql.append(" top.need_sync_flg, ");
......
......@@ -15,6 +15,7 @@ public class OperationDto extends AbstractDto {
public String operationDescriptions;
public Date operationStartDate;
public Date operationEndDate;
public Date operationOpenDate;
public Date lastEditDate;
public boolean editLockFlg;
public boolean needSyncFlg;
......
......@@ -2018,6 +2018,7 @@ public class OperationLogic extends AbstractLogic {
operationJson.put(ABookKeys.QUICK_REPORT, operationList.get(i).quickReport);
operationJson.put(ABookKeys.PERMIT_CODE, operationList.get(i).permitCode);
operationJson.put(ABookKeys.PERMIT_CODE_REQUIRED_FLG, operationList.get(i).permitCodeRequiredFlg);
operationJson.put(ABookKeys.OPERATION_OPEN_DATE, DateTimeUtil.toString(operationList.get(i).operationOpenDate, DateTimeFormat.yyyyMMddHHmmss_hyphen));
operationJson.put(ABookKeys.DISPLAY_PERMISSION_FLG, operationList.get(i).displayPermissionFlg);
operationJson.put(ABookKeys.CONTENT_ID, operationList.get(i).contentId);
operationJsonArray.put(operationJson);
......
Subproject commit 07de49e3e94c2598072e6d78061a9d1cc3e47f90
Subproject commit 5d0e71bd7ff6383baab4a0f7f333279b7307a27a
......@@ -238,6 +238,7 @@
<string name="L122">現在、この機能はAndroid版アプリでは\n対応しておりません。</string>
<string name="L123">この資料の表示は制限されています。\nパスワードの入力が必要です。</string>
<string name="L124">システムエラーが発生しました。アプリをリロードします。</string>
<string name="L125">その作業は非公開または削除されました。更新を行って下さい。</string>
<string name="C_E_SYSTEM_0001">予期せぬ問題が発生しました。</string>
<string name="C_E_SYSTEM_0002">ログインできませんでした。(暗号化失敗 0002)</string>
......
......@@ -239,6 +239,7 @@
<string name="L122">현재 이 기능은 Android 버전 앱에서 \n 대응하고 있지 않습니다.</string>
<string name="L123">표시가 제한된 컨텐츠 입니다.\n로그인 패스워드를 입력해 주세요.</string>
<string name="L124">시스템에러가 발생하였습니다.앱을 리로드합니다.</string>
<string name="L125">해당 자료가 비공개 또는 삭제되었습니다. 갱신해 주세요.</string>
<string name="C_E_SYSTEM_0001">예기치 않은 오류가 발생하였습니다.</string>
<string name="C_E_SYSTEM_0002">로그인 할 수 없습니다.(암호화 실패 0002)</string>
......
......@@ -238,7 +238,7 @@
<string name="L122">Currently, this feature is not supported in the version of the App Android.</string>
<string name="L123">These content are limited.\nThe input of the password is necessary.</string>
<string name="L124">System error occurred. Will reload the application.</string>
<string name="L125">The working was closed or deleted.Please update the working.</string>
<string name="C_E_SYSTEM_0001">Contingency has occurred.</string>
<string name="C_E_SYSTEM_0002">App can not login.(Encryption failures 0002)</string>
<string name="C_E_SYSTEM_0003">App can not login.(Library initialization Failed)</string>
......
......@@ -142,6 +142,20 @@
android:background="@drawable/btn_view_sub_menu" />
<ImageButton
android:id="@+id/btn_operation_print"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_operation_print_white"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:scaleX="0.6"
android:scaleY="0.6"
style="@style/ToolBarIcon"
android:layout_marginRight="50dp"
android:visibility="gone" />
<ImageButton
android:id="@+id/btn_show_task_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......
......@@ -78,6 +78,9 @@ 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.PhotoEditActivity;
import jp.agentec.abook.abv.ui.viewer.foxitPdf.FoxitPdfCore;
import jp.agentec.abook.abv.bl.acms.type.AcmsApis;
import jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity;
import jp.agentec.abook.abv.ui.common.constant.NaviConsts;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil;
import jp.agentec.adf.util.StringUtil;
......@@ -122,6 +125,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
protected TextView operationNameTitle;
protected ImageButton operationHomeButton;
protected ImageButton taskListButton;
protected ImageButton quickReportPrintButton;
// protected ImageButton helpButton;
protected boolean isPageFinished;
......@@ -663,6 +667,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
fl.setBackgroundColor(getResources().getColor(R.color.operation_color));
operationHomeButton = (ImageButton) findViewById(R.id.btn_operation_home);
quickReportPrintButton = (ImageButton) findViewById(R.id.btn_operation_print);
operationHomeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
......@@ -676,6 +681,25 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
});
operationHomeButton.setVisibility(View.VISIBLE);
if(operationDto != null && operationDto.operationType == OperationType.PDF){
// 簡易帳票印刷ボタン
quickReportPrintButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showPrintTargetSelect(operationDto);
}
});
if (ABVDataCache.getInstance().serviceOption.isUnableIOReport() && operationDto.quickReport == 1) {
quickReportPrintButton.setVisibility(View.VISIBLE);
} else {
if (findViewById(R.id.print_layout) != null) {
findViewById(R.id.print_layout).setVisibility(View.GONE);
quickReportPrintButton.setVisibility(View.GONE);
}
}
}
taskListButton = (ImageButton) findViewById(R.id.btn_show_task_list);
taskListButton.setOnClickListener(new View.OnClickListener() {
......@@ -718,6 +742,19 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
}
}
/**
* 簡易帳票印刷対象選択画面表示
*/
private void showPrintTargetSelect(OperationDto operationDto) {
Intent intent = new Intent();
intent.setClass(ABVContentViewActivity.this, OnlineHTMLWebViewActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("LINKURL", AcmsApis.getApiUrl(ABVEnvironment.getInstance().acmsAddress, ABVDataCache.getInstance().getUrlPath(), AcmsApis.ApiQuickReportRevision) + "?isNative=1");
intent.putExtra("operationId", mOperationId);
startActivity(intent, NaviConsts.Right);
}
/**
* 360編集画面を閉じた時、呼び出す
*/
......
......@@ -217,7 +217,7 @@ public abstract class ABVUIActivity extends ABVAuthenticatedActivity {
Logger.e(TAG, "Exception DataRefresh", e);
handleErrorMessageToast(ErrorCode.E107);
} finally {
closeProgressPopup();
//closeProgressPopup();
}
return result;
......
......@@ -7,7 +7,6 @@ import android.content.Intent;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Bundle;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.View;
......@@ -82,10 +81,9 @@ import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.bl.logic.PushMessageLogic;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVUIActivity;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.OperationLocationType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType;
import jp.agentec.abook.abv.ui.common.appinfo.AppDefType.OperationLocationType;
import jp.agentec.abook.abv.ui.common.constant.ErrorCode;
import jp.agentec.abook.abv.ui.common.constant.ErrorMessage;
import jp.agentec.abook.abv.ui.common.constant.NaviConsts;
......@@ -104,6 +102,7 @@ import jp.agentec.abook.abv.ui.home.helper.OperationGroupMasterListHelper;
import jp.agentec.abook.abv.ui.home.helper.OperationListHelper;
import jp.agentec.abook.abv.ui.viewer.activity.DeviceImageListActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLXWalkWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.OnlineHTMLWebViewActivity;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil;
......@@ -128,7 +127,7 @@ public class OperationListActivity extends ABVUIActivity {
public int sortType = 2;
public boolean isSearch = false;
public int mOperationGroupMasterId = 0;
boolean firstFlg = true;
private EditText mSearchTextView; // 検索画面の作業名
private TextView mStartDate; // 検索画面の作業開始日
private TextView mEndDate; // 検索画面の作業終了日
......@@ -164,6 +163,8 @@ public class OperationListActivity extends ABVUIActivity {
private Integer mScanType;
@Override
protected void onCreate(Bundle savedInstanceState) {
......@@ -194,12 +195,12 @@ public class OperationListActivity extends ABVUIActivity {
settings.setAllowFileAccessFromFileURLs(true);
settings.setSaveFormData(false);
settings.setAllowUniversalAccessFromFileURLs(true);
ArrayList<String> paramList = new ArrayList<String>();
paramList.add("debug=1");
paramList.add("app=android");
paramList.add("mobile_flg=" + (isNormalSize() ? "1" : "0"));
paramList.add("isRFIDBarcodeScan=" + (ABVDataCache.getInstance().serviceOption.isUsableRFIDBarcodeScan() ? "1" : "0"));
paramList.add("isOperationGroupMaster=" + (ABVDataCache.getInstance().serviceOption.isOperationGroupMaster() ? "1" : "0"));
mCheckWebView.postUrl(OPERATION_LIST_PAGE + StringUtil.join("&", paramList), null);
mListHelper = getListHelper();
updateNeedSyncRoutineOperation();
......@@ -363,7 +364,12 @@ public class OperationListActivity extends ABVUIActivity {
break;
case ABookKeys.CMD_KEY.REFRESH_CONTENT:
clearSearch();
handler.post(new Runnable() {
@Override
public void run() {
showProgressPopup();
}
});
dataRefresh(true);
break;
......@@ -430,6 +436,26 @@ public class OperationListActivity extends ABVUIActivity {
public void testScanResult(String code, int scanType) {
onScanned(code, scanType);
}
@JavascriptInterface
public void showLoading() {
handler.post(new Runnable() {
@Override
public void run() {
showProgressPopup();
}
});
}
@JavascriptInterface
public void hideLoading() {
handler.post(new Runnable() {
@Override
public void run() {
closeProgressPopup();
}
});
}
}
//TODO Method called when code is scanned
......@@ -472,7 +498,7 @@ public class OperationListActivity extends ABVUIActivity {
mOperationGroupMasterId = 0;
isSearch = false;
sortType = 2;
clearData();
//clearData();
}
// 検索済みかどうかチェック
......@@ -554,28 +580,36 @@ public class OperationListActivity extends ABVUIActivity {
// 報告画面から作業一覧へ戻った時の同期処理
final long operationId = getUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, -1L);
if (operationId != -1) {
dataRefresh(true);
// リソースパターンの適用
if (operationId == -1) {
handler.post(new Runnable() {
@Override
public void run() {
showProgressPopup();
}
});
if (firstFlg) {
dataRefresh(true);
firstFlg = false;
}
runOnUiThread(new Runnable() {
@Override
public void run() {
try {
createJsonForOperationList(getCacheDir().getAbsolutePath());
//closeProgressPopup();
} catch (Exception e) {
Logger.d("Update error");
}
}
});
}
if (!activityResultFlg && operationId == -1) {
dataRefresh(true);
//dataRefresh(true);
}
putUserPref(AppDefType.UserPrefKey.SYNC_TARGET_OPERATION_ID, -1L);
activityResultFlg = false;
runOnUiThread(new Runnable() {
@Override
public void run() {
try {
createJsonForOperationList(getCacheDir().getAbsolutePath());
//closeProgressPopup();
} catch (Exception e) {
Logger.d("Update error");
}
}
});
}
// 検索ダイアログ表示
......@@ -753,8 +787,14 @@ public class OperationListActivity extends ABVUIActivity {
}
} else if (operationDto.operationType == OperationType.PDF) {
contentPath = ABVEnvironment.getInstance().getTaskPdfDirName(ContentFileExtractor.getInstance().getContentCacheDirWithExtract(operationDto.contentId));
if (operationDto.reportType == ReportType.ReportContinuous) {
contentPath = ABVEnvironment.getInstance().getProcessListDirName(ContentFileExtractor.getInstance().getContentCacheDirWithExtract(operationDto.contentId));
}
} else {
contentPath = ABVEnvironment.getInstance().getPanoImageDirName(ContentFileExtractor.getInstance().getContentCacheDirWithExtract(operationDto.contentId));
if (operationDto.reportType == ReportType.ReportContinuous) {
contentPath = ABVEnvironment.getInstance().getProcessListDirName(ContentFileExtractor.getInstance().getContentCacheDirWithExtract(operationDto.contentId));
}
}
// 作業の報告画面を表示時、必要なJSONファイル作成
......@@ -1950,7 +1990,7 @@ public class OperationListActivity extends ABVUIActivity {
}
public void createJsonForOperationList(String filePath) {
clearSearch();
//clearSearch();
List<OperationDto> operationList = mListHelper.filterOperationList();
mOperationLogic.createOperationListJson(operationList, filePath);
mOperationGroupMasterLogic.createOperationGroupMasterListJson(filePath);
......
......@@ -120,11 +120,8 @@ public class OperationRelatedContentActivity extends ABVUIActivity {
showCommunicationMenuDialog();
}
});
if (ABVDataCache.getInstance().serviceOption.isUnableIOReport()) {
mQuickReportPrintButton.setVisibility(View.VISIBLE);
} else {
if (findViewById(R.id.print_layout) != null) {
findViewById(R.id.print_layout).setVisibility(View.GONE);
mQuickReportPrintButton.setVisibility(View.GONE);
}
}
......
......@@ -1398,7 +1398,7 @@ public class ContentViewActivity extends ABVContentViewActivity {
if (ContentJSON.KEY_PDF_TYPE.equals(contentDto.contentType) || ContentJSON.KEY_NONE_TYPE.equals(contentDto.contentType)
|| ContentJSON.KEY_OTHER_TYPE.equals(contentDto.contentType)) {
mExitBtn.setBackgroundResource(R.drawable.btn_first_back);
mLinkOriginalBackBtn.setVisibility(View.VISIBLE);
mLinkOriginalBackBtn.setVisibility(View.GONE);
mHistoryBtn.setVisibility(View.GONE);
indexBtn.setVisibility(View.GONE);
mBtnMeetingRoomSetting.setVisibility(View.GONE);
......
......@@ -471,7 +471,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
subMenuBtn.setVisibility(View.GONE);
}
} else {
btnLinkOriginalBack.setVisibility(View.GONE);
configureRemote();
}
if (meetingManager.isCollaboration()) {
......@@ -706,7 +706,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
Intent intent = new Intent();
intent.setClass(HTMLWebViewActivity.this, OnlineHTMLWebViewActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
intent.putExtra("LINKURL", AcmsApis.getApiUrl(ABVEnvironment.getInstance().acmsAddress, ABVDataCache.getInstance().getUrlPath(), AcmsApis.ApiQuickReportRevision));
intent.putExtra("LINKURL", AcmsApis.getApiUrl(ABVEnvironment.getInstance().acmsAddress, ABVDataCache.getInstance().getUrlPath(), AcmsApis.ApiQuickReportRevision) + "?isNative=1");
intent.putExtra("operationId", mOperationId);
startActivity(intent, NaviConsts.Right);
}
......
......@@ -59,9 +59,11 @@ import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.download.ContentDownloader;
import jp.agentec.abook.abv.bl.download.ContentZipDownloadNotification;
import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.ContentReadingLogLogic;
import jp.agentec.abook.abv.bl.logic.ContractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.cl.util.ContentLogUtil;
import jp.agentec.abook.abv.cl.util.PreferenceUtil;
import jp.agentec.abook.abv.launcher.android.R;
......@@ -87,6 +89,8 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
private int objectLogId;
private XWalkView webView;
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
private HTMLXWalkWebViewActivity.JsInf jsInf = new HTMLXWalkWebViewActivity.JsInf();
private Integer lastPageNo = 0;
......@@ -487,7 +491,10 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
configureRemote();
}
});
historyListBtn.setVisibility(View.GONE);
if (ContentJSON.KEY_LIST_TYPE.equals(mContentDto.contentType)) {
fl.setVisibility(View.GONE);
}
if(isLinkedContent) {
if (ContentJSON.KEY_MOVIE_TYPE.equals(mContentDto.contentType) || ContentJSON.KEY_MUSIC_TYPE.equals(mContentDto.contentType)
|| ContentJSON.KEY_PANO_IMAGE_TYPE.equals(mContentDto.contentType) || ContentJSON.KEY_PANO_MOVIE_TYPE.equals(mContentDto.contentType)
......@@ -577,6 +584,15 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
public void openEditPage() {
commonOpenEditPage();
}
@org.xwalk.core.JavascriptInterface
public String getOperation() {
ArrayList<OperationDto> operationDtos = new ArrayList<OperationDto>();
OperationDto opertaionDto = mOperationLogic.getOperation(mOperationId);
operationDtos.add(opertaionDto);
String operationJson = mOperationLogic.createOperationListJson(operationDtos, null);
return operationJson;
}
}
@Override
......
......@@ -20,6 +20,7 @@ import android.widget.RelativeLayout;
import org.json.adf.JSONObject;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.common.Constant;
......@@ -28,8 +29,11 @@ import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.TaskDao;
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.OperationLogic;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVActivity;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
......@@ -68,6 +72,8 @@ public class OperationTaskLayout extends RelativeLayout {
private ContentViewActivity mContext;
private JsInf jsInf = new JsInf();
private OperationLogic mOperationLogic = AbstractLogic.getLogic(OperationLogic.class);
private static TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class);
public OperationTaskLayout(final Context context, final long contentId, final String linkUrl, boolean isNormalSize) {
......@@ -555,5 +561,14 @@ public class OperationTaskLayout extends RelativeLayout {
public void openEditPage() {
((ABVContentViewActivity) OperationTaskLayout.this.mContext).commonOpenEditPage();
}
@JavascriptInterface
public String getOperation() {
ArrayList<OperationDto> operationDtos = new ArrayList<OperationDto>();
OperationDto opertaionDto = mOperationLogic.getOperation(mContext.mOperationId);
operationDtos.add(opertaionDto);
String operationJson = mOperationLogic.createOperationListJson(operationDtos, null);
return operationJson;
}
}
}
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