Commit ba9ec461 by onuma

Merge branch 'develop'

parents ab3a2bd5 91980b05
......@@ -141,6 +141,13 @@ public class Constant {
int ReportContinuous = 3; // 連続作業
}
public interface operationType {
int LIST = 0;
int DRAWING = 1;
int CONTENT360 = 2;
}
// 報告履歴管理
public interface EnableReportHistory {
int Invalid = 0; // 無効
......
Subproject commit 135a83eb1a5782ccaee8b3677942b07463e86f50
Subproject commit 89f7f804a54cf4890189864d9384f6b3de21ccb4
......@@ -41,6 +41,7 @@ import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Stack;
......@@ -204,6 +205,7 @@ public class OperationListActivity extends ABVUIActivity {
ArrayList<String> paramList = new ArrayList<String>();
paramList.add("debug=1");
paramList.add("app=android");
paramList.add("lang=" + ActivityHandlingHelper.getInstance().getLocaleFileName());
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"));
......@@ -307,6 +309,11 @@ public class OperationListActivity extends ABVUIActivity {
mScanType = jsonParam.getInt(ABookKeys.SCAN_TYPE);
}
final OperationDto tempOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID));
if (tempOperationDto.operationType == Constant.operationType.CONTENT360
&& tempOperationDto.contentId == null) {
tempOperationDto.operationId = jsonParam.getLong(ABookKeys.OPERATION_ID);
showPanoEntryDialog(tempOperationDto);
} else {
if (tempOperationDto.needSyncFlg) {
mCallBack = new Runnable() {
@Override
......@@ -323,6 +330,7 @@ public class OperationListActivity extends ABVUIActivity {
} else {
openReportView(tempOperationDto);
}
}
break;
case ABookKeys.CMD_KEY.GO_COMMUNICATION:
......@@ -331,6 +339,7 @@ public class OperationListActivity extends ABVUIActivity {
case ABookKeys.CMD_KEY.GO_PANORAMA_EDIT:
final OperationDto panoramaOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID));
if (panoramaOperationDto.contentId != null && panoramaOperationDto.contentId != 0) {
if (panoramaOperationDto.needSyncFlg) {
mCallBack = new Runnable() {
@Override
......@@ -347,6 +356,10 @@ public class OperationListActivity extends ABVUIActivity {
} else {
startPanoEdit(panoramaOperationDto);
}
}else {
panoramaOperationDto.operationId = jsonParam.getLong(ABookKeys.OPERATION_ID);
showPanoEntryDialog(panoramaOperationDto);
}
break;
case ABookKeys.CMD_KEY.REFRESH_CONTENT:
......@@ -743,8 +756,8 @@ public class OperationListActivity extends ABVUIActivity {
}
public void startTaskDirectionOrReportView(OperationDto operationDto) {
ContentDto contentDto = contentDao.getContent(operationDto.contentId);
try {
ContentDto contentDto = contentDao.getContent(operationDto.contentId);
if (contentDto != null && contentDto.downloadedFlg) {
String contentPath;
if (operationDto.operationType == OperationType.LIST) {
......@@ -1302,28 +1315,9 @@ public class OperationListActivity extends ABVUIActivity {
public void run() {
int progress = progressDialogHorizontal.getProgress();
progressDialogHorizontal.setProgress(progress + 10);
if (progress >= 100) {
closeProgressPopup();
//新着更新
final Callback progressCallback = new Callback() {
@Override
public Object callback(Object ret) {
final int progress = (int)ret;
runOnUiThread(new Runnable() {
@Override
public void run() {
if ((progressDialogHorizontal.getProgress() + progress) < 100) {
progressDialogHorizontal.setProgress(progressDialogHorizontal.getProgress() + progress);
} else {
progressDialogHorizontal.setProgress(100);
}
}
});
return null;
}
};
if (progress >= 30) {
try {
dataRefresh(true, progressCallback);
dateUpdate();
} catch (Exception e) {
handler.post(new Runnable() {
@Override
......@@ -1333,10 +1327,10 @@ public class OperationListActivity extends ABVUIActivity {
});
}
} else {
handler.postDelayed(this, 1000);
handler.postDelayed(this, 4000);
}
}
}, 1000);
}, 2000);
}
}
......@@ -1425,6 +1419,14 @@ public class OperationListActivity extends ABVUIActivity {
public void run() {
Logger.i(TAG, "[syncOperation] operationId=%s, contentId=%s", operationDto.operationId, operationDto.contentId);
// コンテンツダウンロード
if (operationDto.contentId == null) {
Logger.e(TAG, "contentDto is null !");
closeProgressPopup();
if (mCallBack != null) {
mCallBack.run();
}
return;
}
ContentDto contentDto = contentDao.getContent(operationDto.contentId);
if (contentDto == null) {
Logger.e(TAG, "contentDto is null !");
......@@ -1994,13 +1996,14 @@ public class OperationListActivity extends ABVUIActivity {
}
public void dateUpdate() {
if (!isFinishing() && progressDialogHorizontal != null && !progressDialogHorizontal.isShowing()) {
handler.post(new Runnable() {
@Override
public void run() {
showProgressView(getString(R.string.msg_common_processing));
}
});
}
final Callback progressCallback = new Callback() {
@Override
public Object callback(Object ret) {
......
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