Commit e81ee568 by Lee Munkyeong

カテゴリ保存実装

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