Commit e81ee568 by Lee Munkyeong

カテゴリ保存実装

parent 8541bbcf
...@@ -93,6 +93,7 @@ public class ABookKeys { ...@@ -93,6 +93,7 @@ public class ABookKeys {
public static final String GO_COMMUNICATION = "goCommunication"; public static final String GO_COMMUNICATION = "goCommunication";
public static final String GO_PANORAMA_EDIT = "goPanoramaEdit"; public static final String GO_PANORAMA_EDIT = "goPanoramaEdit";
public static final String REFRESH_CONTENT = "refreshContent"; public static final String REFRESH_CONTENT = "refreshContent";
public static final String RESET_SEARCH = "resetSearch";
public static final String CHANGE_OPERATION_GROUP_MASTER = "changeOperationGroupMaster"; public static final String CHANGE_OPERATION_GROUP_MASTER = "changeOperationGroupMaster";
} }
......
...@@ -279,8 +279,8 @@ public class OperationDao extends AbstractDao { ...@@ -279,8 +279,8 @@ public class OperationDao extends AbstractDao {
* @param operationSortType * @param operationSortType
* @return * @return
*/ */
public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortType) { public List<OperationDto> getOperations(String searchOperationName, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortType, int operationGroupMasterId) {
String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, operationSortType, null); String sql = generateGetOperationQuery(searchOperationName, searchStartDateStr, searchEndDateStr, operationSortType, Integer.valueOf(operationGroupMasterId) == 0 ? null : Integer.valueOf(operationGroupMasterId));
return rawQueryGetDtoList(sql, null, OperationDto.class); return rawQueryGetDtoList(sql, null, OperationDto.class);
} }
......
...@@ -1329,9 +1329,9 @@ public class OperationLogic extends AbstractLogic { ...@@ -1329,9 +1329,9 @@ public class OperationLogic extends AbstractLogic {
* @param operationSortingType ソート順 * @param operationSortingType ソート順
* @return 作業リスト * @return 作業リスト
*/ */
public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortingType) { public List<OperationDto> getRefreshOperation(String searchWord, String searchStartDateStr, String searchEndDateStr, OperationSortingType operationSortingType, int operationGroupMasterId) {
List<OperationDto> operationDtoList; List<OperationDto> operationDtoList;
operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, operationSortingType); operationDtoList = mOperationDao.getOperations(searchWord, searchStartDateStr, searchEndDateStr, operationSortingType, operationGroupMasterId);
for (OperationDto operationDto : operationDtoList) { for (OperationDto operationDto : operationDtoList) {
// 作業送信フラグが存在する場合またはホットスポット更新フラグが存在する場合、needSyncFlgをtrueにセット // 作業送信フラグが存在する場合またはホットスポット更新フラグが存在する場合、needSyncFlgをtrueにセット
if (mTaskReportDao.isExistSendTaskData(operationDto.operationId) || mTaskReportDao.isExistUpdateTargetHotSpotTaskData(operationDto.operationId)) { if (mTaskReportDao.isExistSendTaskData(operationDto.operationId) || mTaskReportDao.isExistUpdateTargetHotSpotTaskData(operationDto.operationId)) {
......
Subproject commit 0a9dd91eab004d76ae2fec60aae676d3c5058d30 Subproject commit 6000dac6d681be5f8f97d39419df8158777bfbaf
...@@ -123,6 +123,9 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -123,6 +123,9 @@ public class OperationListActivity extends ABVUIActivity {
public String mSearchWord; // 検索画面の値(作業名) public String mSearchWord; // 検索画面の値(作業名)
public String mStartDateStr; // 検索画面の値(作業開始日) public String mStartDateStr; // 検索画面の値(作業開始日)
public String mEndDateStr; // 検索画面の値(作業終了日) public String mEndDateStr; // 検索画面の値(作業終了日)
public int sortType = 2;
public boolean isSearch = false;
public int mOperationGroupMasterId = 0;
private EditText mSearchTextView; // 検索画面の作業名 private EditText mSearchTextView; // 検索画面の作業名
private TextView mStartDate; // 検索画面の作業開始日 private TextView mStartDate; // 検索画面の作業開始日
...@@ -370,6 +373,7 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -370,6 +373,7 @@ public class OperationListActivity extends ABVUIActivity {
case ABookKeys.CMD_KEY.REFRESH_CONTENT: case ABookKeys.CMD_KEY.REFRESH_CONTENT:
clearSearch(); clearSearch();
dataRefresh(true);
runOnUiThread(new Runnable() { runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
...@@ -383,6 +387,17 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -383,6 +387,17 @@ public class OperationListActivity extends ABVUIActivity {
List<OperationDto>operationList = mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(jsonParam.getInt(ABookKeys.OPERATION_GROUPMASTER_ID), null); List<OperationDto>operationList = mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(jsonParam.getInt(ABookKeys.OPERATION_GROUPMASTER_ID), null);
mOperationLogic.createOperationListJson(operationList, null); mOperationLogic.createOperationListJson(operationList, null);
break; break;
case ABookKeys.CMD_KEY.RESET_SEARCH:
clearSearch();
runOnUiThread(new Runnable() {
@Override
public void run() {
mCheckWebView.loadUrl("javascript:CHK.initReportApp();");
}
});
break;
} }
} }
} }
...@@ -399,11 +414,11 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -399,11 +414,11 @@ public class OperationListActivity extends ABVUIActivity {
mEndDateStr = searchEndDate; mEndDateStr = searchEndDate;
List<OperationDto> operationList; List<OperationDto> operationList;
if (operationGroupMasterId != 0) { if (operationGroupMasterId != 0) {
operationList = mOperationGroupMasterLogic.getOperationByOperationGroupMasterId(operationGroupMasterId, null); mOperationGroupMasterId = operationGroupMasterId;
} else {
operationList = mListHelper.filterOperationList();
} }
operationList = mListHelper.filterOperationList();
String searchOperationListStr = mOperationLogic.createOperationListJson(operationList, null); String searchOperationListStr = mOperationLogic.createOperationListJson(operationList, null);
isSearch = true;
return searchOperationListStr; return searchOperationListStr;
} }
...@@ -416,6 +431,16 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -416,6 +431,16 @@ public class OperationListActivity extends ABVUIActivity {
public void stopScan() { public void stopScan() {
//TODO DisconnectScanner //TODO DisconnectScanner
} }
@JavascriptInterface
public void setSortType(int requestSortType) {
sortType = requestSortType;
}
@JavascriptInterface
public int getSortType() {
return sortType;
}
} }
//TODO Method called when code is scanned //TODO Method called when code is scanned
...@@ -449,6 +474,9 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -449,6 +474,9 @@ public class OperationListActivity extends ABVUIActivity {
mSearchWord = null; mSearchWord = null;
mStartDateStr = null; mStartDateStr = null;
mEndDateStr = null; mEndDateStr = null;
mOperationGroupMasterId = 0;
isSearch = false;
sortType = 2;
clearData(); clearData();
} }
...@@ -508,6 +536,12 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -508,6 +536,12 @@ public class OperationListActivity extends ABVUIActivity {
//showProgressPopup(); //showProgressPopup();
Logger.i(TAG, "onResume:start"); Logger.i(TAG, "onResume:start");
super.onResume(); super.onResume();
if (isSearch) {
isSearch = false;
return;
}
//アプリロック状態の場合、何もしない。 //アプリロック状態の場合、何もしない。
if (checkForceLoginPeriodically()) { if (checkForceLoginPeriodically()) {
return; return;
...@@ -663,20 +697,16 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -663,20 +697,16 @@ public class OperationListActivity extends ABVUIActivity {
} }
private void clearData() { private void clearData() {
// 開始日の初期化
if (mStartDate != null) {
mStartDate.setText(StringUtil.Empty);
}
// 終了日の初期化 runOnUiThread(new Runnable() {
if (mEndDate != null) { @Override
mEndDate.setText(StringUtil.Empty); public void run() {
} mCheckWebView.loadUrl("javascript:$('#searchTaskName').val('');");
mCheckWebView.loadUrl("javascript:$('#searchStartDate').val('');");
// 作業名の初期化 mCheckWebView.loadUrl("javascript:$('#searchEndDate').val('');");
if (mSearchTextView != null) { mCheckWebView.loadUrl("javascript:CHK.changeSortType($('#defaultSort'));");
mSearchTextView.setText(StringUtil.Empty); }
} });
} }
// 開始日と終了日のバリデーション // 開始日と終了日のバリデーション
......
...@@ -22,6 +22,6 @@ public class HomeOperationListHelper extends OperationListHelper { ...@@ -22,6 +22,6 @@ public class HomeOperationListHelper extends OperationListHelper {
protected List<OperationDto> findOperationList() throws Exception { protected List<OperationDto> findOperationList() throws Exception {
int operationSortType = mAppActivity.getSortCondition(); int operationSortType = mAppActivity.getSortCondition();
OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType); OperationSortingType operationSortingType = OperationSortingType.parse(operationSortType);
return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, operationSortingType); return operationLogic.getRefreshOperation(mAppActivity.mSearchWord, mAppActivity.mStartDateStr, mAppActivity.mEndDateStr, operationSortingType, mAppActivity.mOperationGroupMasterId);
} }
} }
...@@ -123,6 +123,11 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -123,6 +123,11 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
settings.setCacheMode(WebSettings.LOAD_NO_CACHE); settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
// webView.loadDataWithBaseURL("", url2, "text/html", "UTF-8", ""); // webView.loadDataWithBaseURL("", url2, "text/html", "UTF-8", "");
settings.setAllowFileAccessFromFileURLs(true); //Android7利用で警告ダイヤログ表示問題対応 settings.setAllowFileAccessFromFileURLs(true); //Android7利用で警告ダイヤログ表示問題対応
settings.setAllowFileAccess(true);
settings.setAllowContentAccess(true);
settings.setAllowUniversalAccessFromFileURLs(true);
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
final RelativeLayout fl = (RelativeLayout) findViewById(R.id.frameTopbar); final RelativeLayout fl = (RelativeLayout) findViewById(R.id.frameTopbar);
......
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