Commit 36fb0eed by Lee Munkyeong

作業一覧対応

parent 1dd4363b
...@@ -81,6 +81,19 @@ public class ABookKeys { ...@@ -81,6 +81,19 @@ public class ABookKeys {
public static final String ATTACHED_CHANGE_FLAG = "attachedChangeFlag"; public static final String ATTACHED_CHANGE_FLAG = "attachedChangeFlag";
public static final String ROUTINE_TASK_FLAG = "routineTaskFlag"; public static final String ROUTINE_TASK_FLAG = "routineTaskFlag";
public static final String UPDATE_HOTSPOT_ONLY_FLAG = "updateHotSpotOnlyFlag"; public static final String UPDATE_HOTSPOT_ONLY_FLAG = "updateHotSpotOnlyFlag";
//Webviewから呼び出すApiキー
public static final class CMD_KEY{
public static final String GO_SETTING = "goSetting";
public static final String GO_RELATION_CONTENT = "goRelationContent";
public static final String GO_PRINT_TARGET = "goPrintTarget";
public static final String GO_OPERATION = "goOperation";
public static final String GO_COMMUNICATION = "goCommunication";
public static final String GO_PANORAMA_EDIT = "goPanoramaEdit";
public static final String REFRESH_CONTENT = "refreshContent";
}
// #32782 指示者テーブル関連削除 start // #32782 指示者テーブル関連削除 start
// TODO change TASK_DIRECTIONS 削除が必要 // TODO change TASK_DIRECTIONS 削除が必要
// public static final String TASK_DIRECTIONS = "taskReport"; // public static final String TASK_DIRECTIONS = "taskReport";
......
...@@ -1999,8 +1999,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -1999,8 +1999,7 @@ public class OperationLogic extends AbstractLogic {
return isSuccess; return isSuccess;
} }
public void createOperationListJson(String filePath) { public String createOperationListJson(List<OperationDto> operationList, String filePath) {
List<OperationDto> operationList = getRefreshOperation(null, null, null, null);
JSONObject operationListJsonObject = new JSONObject(); JSONObject operationListJsonObject = new JSONObject();
try { try {
JSONArray operationJsonArray = new JSONArray(); JSONArray operationJsonArray = new JSONArray();
...@@ -2011,7 +2010,7 @@ public class OperationLogic extends AbstractLogic { ...@@ -2011,7 +2010,7 @@ public class OperationLogic extends AbstractLogic {
operationJson.put(ABookKeys.OPERATION_DESCRIPTIONS, operationList.get(i).operationDescriptions); operationJson.put(ABookKeys.OPERATION_DESCRIPTIONS, operationList.get(i).operationDescriptions);
operationJson.put(ABookKeys.OPERATION_TYPE, operationList.get(i).operationType); operationJson.put(ABookKeys.OPERATION_TYPE, operationList.get(i).operationType);
operationJson.put(ABookKeys.OPERATION_START_DATE, DateTimeUtil.toString(operationList.get(i).operationStartDate, DateTimeFormat.yyyyMMdd_slash)); operationJson.put(ABookKeys.OPERATION_START_DATE, DateTimeUtil.toString(operationList.get(i).operationStartDate, DateTimeFormat.yyyyMMdd_slash));
operationJson.put(ABookKeys.OPERATION_END_DATE, DateTimeUtil.toString(operationList.get(i).operationStartDate, DateTimeFormat.yyyyMMdd_slash)); operationJson.put(ABookKeys.OPERATION_END_DATE, DateTimeUtil.toString(operationList.get(i).operationEndDate, DateTimeFormat.yyyyMMdd_slash));
operationJson.put(ABookKeys.LAST_EDIT_DATE, operationList.get(i).lastEditDate); operationJson.put(ABookKeys.LAST_EDIT_DATE, operationList.get(i).lastEditDate);
operationJson.put(ABookKeys.NEED_SYNC_FLG, operationList.get(i).needSyncFlg); operationJson.put(ABookKeys.NEED_SYNC_FLG, operationList.get(i).needSyncFlg);
operationJson.put(ABookKeys.REPORT_TYPE, operationList.get(i).reportType); operationJson.put(ABookKeys.REPORT_TYPE, operationList.get(i).reportType);
...@@ -2024,11 +2023,13 @@ public class OperationLogic extends AbstractLogic { ...@@ -2024,11 +2023,13 @@ public class OperationLogic extends AbstractLogic {
operationJsonArray.put(operationJson); operationJsonArray.put(operationJson);
} }
operationListJsonObject.put(ABookKeys.OPERATION_LIST, operationJsonArray); operationListJsonObject.put(ABookKeys.OPERATION_LIST, operationJsonArray);
if (!StringUtil.isNullOrEmpty(filePath)) {
FileUtil.createFile(filePath + "/operationList.json", operationListJsonObject.toString()); FileUtil.createFile(filePath + "/operationList.json", operationListJsonObject.toString());
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
return operationListJsonObject.toString();
} }
} }
...@@ -350,25 +350,25 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -350,25 +350,25 @@ public class OperationListActivity extends ABVUIActivity {
public void sendParam(String param) { public void sendParam(String param) {
JSONObject jsonParam = new JSONObject(param); JSONObject jsonParam = new JSONObject(param);
OperationDto operationDto; OperationDto operationDto;
if (jsonParam.has("cmd")) { if (jsonParam.has(ABookKeys.CMD)) {
switch (jsonParam.getString("cmd")){ switch (jsonParam.getString(ABookKeys.CMD)){
case "goSetting": case ABookKeys.CMD_KEY.GO_SETTING:
showSetting(); showSetting();
break; break;
case "goRelationContent": case ABookKeys.CMD_KEY.GO_RELATION_CONTENT:
showCommonContent(); showCommonContent();
break; break;
case "goPrintTarget": case ABookKeys.CMD_KEY.GO_PRINT_TARGET:
showPrintTargetSelect(); showPrintTargetSelect();
break; break;
case "goOperation": case ABookKeys.CMD_KEY.GO_OPERATION:
if (!jsonParam.has("operationId")) { if (!jsonParam.has(ABookKeys.OPERATION_ID)) {
break; break;
} }
final OperationDto tempOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt("operationId")); final OperationDto tempOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID));
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -378,12 +378,12 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -378,12 +378,12 @@ public class OperationListActivity extends ABVUIActivity {
openReportView(tempOperationDto); openReportView(tempOperationDto);
break; break;
case "goCommunication": case ABookKeys.CMD_KEY.GO_COMMUNICATION:
showCommunicationMenuDialog(); showCommunicationMenuDialog();
break; break;
case "goPanoramaEdit": case ABookKeys.CMD_KEY.GO_PANORAMA_EDIT:
final OperationDto panoramaOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt("operationId")); final OperationDto panoramaOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID));
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -393,6 +393,15 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -393,6 +393,15 @@ public class OperationListActivity extends ABVUIActivity {
startTaskDirectionOrReportView(panoramaOperationDto); startTaskDirectionOrReportView(panoramaOperationDto);
break; break;
case ABookKeys.CMD_KEY.REFRESH_CONTENT:
clearSearch();
runOnUiThread(new Runnable() {
@Override
public void run() {
mCheckWebView.loadUrl("javascript:location.reload();");
}
});
break;
} }
} }
} }
...@@ -401,6 +410,16 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -401,6 +410,16 @@ public class OperationListActivity extends ABVUIActivity {
public String getCachePath() { public String getCachePath() {
return getCacheDir().getAbsolutePath(); return getCacheDir().getAbsolutePath();
} }
@JavascriptInterface
public String searchOperationList(String searchKeyword, String searchStartDate, String searchEndDate) {
mSearchWord = searchKeyword;
mStartDateStr = searchStartDate;
mEndDateStr = searchEndDate;
List<OperationDto> operationList = mListHelper.filterOperationList();
String searchOperationListStr = mOperationLogic.createOperationListJson(operationList, null);
return searchOperationListStr;
}
} }
// 共通資料画面表示 // 共通資料画面表示
...@@ -1956,13 +1975,15 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -1956,13 +1975,15 @@ public class OperationListActivity extends ABVUIActivity {
} }
public void createJsonForOperationList(String filePath) { public void createJsonForOperationList(String filePath) {
mOperationLogic.createOperationListJson(filePath); List<OperationDto> operationList = mListHelper.filterOperationList();
mOperationLogic.createOperationListJson(operationList, filePath);
mOperationGroupMasterLogic.createOperationGroupMasterListJson(filePath); mOperationGroupMasterLogic.createOperationGroupMasterListJson(filePath);
mOperationGroupMasterLogic.createOperationGroupMasterRelationListJson(filePath); mOperationGroupMasterLogic.createOperationGroupMasterRelationListJson(filePath);
mPushMessageLogic.createOperationPushMessageListJson(filePath); mPushMessageLogic.createOperationPushMessageListJson(filePath);
} }
public void screenRefresh() { public void screenRefresh() {
showProgressPopup(); showProgressPopup();
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@Override @Override
......
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