Commit e2a1f542 by Lee Munkyeong

RFID関連修正

parent 0ecafb06
...@@ -208,4 +208,16 @@ public class ABookKeys { ...@@ -208,4 +208,16 @@ public class ABookKeys {
public static final String PROCESS_LIST = "processList"; public static final String PROCESS_LIST = "processList";
public static final String MAIL_TO_URL = "mailto"; public static final String MAIL_TO_URL = "mailto";
public static class SCAN_TYPE_VALUE {
public static final Integer BARCODE = 0;
public static final Integer RFID = 1;
}
public static class SCAN_TYPE_KEY {
public static final String BARCODE = "BARCODE";
public static final String RFID = "RFID";
}
public static final String SCAN_TYPE = "scanType";
} }
...@@ -160,6 +160,8 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -160,6 +160,8 @@ public class OperationListActivity extends ABVUIActivity {
private Long mSelectedOperationId; private Long mSelectedOperationId;
private Integer mScanType;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
...@@ -329,6 +331,9 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -329,6 +331,9 @@ public class OperationListActivity extends ABVUIActivity {
if (!jsonParam.has(ABookKeys.OPERATION_ID)) { if (!jsonParam.has(ABookKeys.OPERATION_ID)) {
break; break;
} }
if (jsonParam.has(ABookKeys.SCAN_TYPE)) {
mScanType = jsonParam.getInt(ABookKeys.SCAN_TYPE);
}
final OperationDto tempOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID)); final OperationDto tempOperationDto = mOperationDao.getOperationJoinContent(jsonParam.getInt(ABookKeys.OPERATION_ID));
if (tempOperationDto.needSyncFlg) { if (tempOperationDto.needSyncFlg) {
mCallBack = new Runnable() { mCallBack = new Runnable() {
...@@ -398,7 +403,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -398,7 +403,6 @@ public class OperationListActivity extends ABVUIActivity {
} }
}); });
break; break;
} }
} }
} }
...@@ -442,11 +446,21 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -442,11 +446,21 @@ public class OperationListActivity extends ABVUIActivity {
public int getSortType() { public int getSortType() {
return sortType; return sortType;
} }
@JavascriptInterface
public void testScanResult(String code, int scanType) {
onScanned(code, scanType);
}
} }
//TODO Method called when code is scanned //TODO Method called when code is scanned
public void onScanned(String code) { public void onScanned(final String code, final int scanType) {
mCheckWebView.loadUrl("javascript:CHK.scanResult(" + code + ");"); runOnUiThread(new Runnable() {
@Override
public void run() {
mCheckWebView.loadUrl("javascript:CHK.scanResult(" + code + "," + scanType + " );");
}
});
} }
// 共通資料画面表示 // 共通資料画面表示
...@@ -770,7 +784,17 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -770,7 +784,17 @@ public class OperationListActivity extends ABVUIActivity {
path.append("/index.html?app=android"); path.append("/index.html?app=android");
path.append("&report_type=" + operationDto.reportType); // 作業報告タイプ : 0:報告 1:定期点検 2:報告(回答) path.append("&report_type=" + operationDto.reportType); // 作業報告タイプ : 0:報告 1:定期点検 2:報告(回答)
path.append("&mobile_flg=" + (isNormalSize() ? "1" : "0")); // ScreenType path.append("&mobile_flg=" + (isNormalSize() ? "1" : "0")); // ScreenType
if (mScanType != null) {
String scanTypeKey = null;
if (mScanType.equals(ABookKeys.SCAN_TYPE_VALUE.BARCODE)) {
scanTypeKey = ABookKeys.SCAN_TYPE_KEY.BARCODE;
} else if (mScanType.equals(ABookKeys.SCAN_TYPE_VALUE.RFID)) {
scanTypeKey = ABookKeys.SCAN_TYPE_KEY.RFID;
}
path.append("&scanType=" + scanTypeKey);
path.append("&scanDate=" + DateTimeUtil.toString(new Date(), "yyyy-MM-dd hh:mm:ss"));
mScanType = null;
}
Logger.d(TAG, "path : " + path); Logger.d(TAG, "path : " + path);
// #32926 作業報告画面改善 end // #32926 作業報告画面改善 end
Intent intent = new Intent(); Intent intent = new Intent();
......
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