Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
A
abook_check
  • Overview
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • abook_android
  • abook_check
  • Merge Requests
  • !299

Merged
Opened Feb 28, 2023 by Kazuyuki Hida@hida-k 
  • Report abuse
Report abuse

いろいろな不具合を修正

詳細はコメントにて

Edited Feb 28, 2023 by Kazuyuki Hida
  • Discussion 10
  • Commits 4
  • Changes 5
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Feb 28, 2023
    Resolved by Yujin Seo Feb 28, 2023
    ABVJE_BL/src/jp/agentec/abook/abv/bl/data/dao/TaskReportDao.java
    538 int count;
    539 StringBuilder sql = new StringBuilder();
    540 sql.append("SELECT count(*) FROM t_task_report");
    541 sql.append(" WHERE task_status = 1 ");
    542 if (reportStartDate == null) {
    543 // 報告
    544 sql.append(" AND task_key=?");
    545 count = rawQueryGetInt(sql.toString(), new String[] { taskKey });
    546 } else {
    547 // 点検
    548 sql.append(" AND task_report_id=?");
    549 sql.append(" AND datetime(report_start_date)=datetime(?, 'utc')");
    550 count = rawQueryGetInt(sql.toString(), new String[] { String.valueOf(taskReportId), reportStartDate });
    551 }
    552 return count > 0;
    553 }
    • Kazuyuki Hida @hida-k commented Feb 28, 2023
      Developer

      指定したtaskが、作業中かを確認するためのメソッド

      Edited Feb 28, 2023
      指定したtaskが、作業中かを確認するためのメソッド
    Please register or sign in to reply
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Feb 28, 2023
    Resolved by Yujin Seo Feb 28, 2023
    ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
    949 950 if (!routineTaskFlg) {
    950 951 String jsonText = FileUtil.readTextFile(contentPath + "/" + ABookKeys.TASK_REPORT + ".json");
    951 952 JSONObject jsonObject = new JSONObject(jsonText);
    952 JSONArray taskReportJsonArray = jsonObject.getJSONArray(ABookKeys.KEY_TASK_REPORT_0);
    953 JSONArray taskReportJsonArray = jsonObject.has(ABookKeys.KEY_TASK_REPORT_0) ? jsonObject.getJSONArray(ABookKeys.KEY_TASK_REPORT_0) : new JSONArray();
    • Kazuyuki Hida @hida-k commented Feb 28, 2023
      Developer

      報告一覧が空になると、途中でNullPointerExceptionが発生して、ローディングが止まらなくなる不具合を修正

      Edited Feb 28, 2023
      報告一覧が空になると、途中でNullPointerExceptionが発生して、ローディングが止まらなくなる不具合を修正
    Please register or sign in to reply
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Feb 28, 2023
    Last updated by Kazuyuki Hida Mar 01, 2023
    ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
    1498 1499 }
    1499 1500 throw ex;
    1500 1501 } catch (Exception ex) {
    1501 throw ex;
    1502 Logger.e(TAG, ex);
    1503 if (ex instanceof NetworkDisconnectedException) {
    1504 // オフラインの場合、エラー扱いにしないで、設問の状況から、taskStatusを推測する
    1505 taskReportDto.taskStatus = recoveryTaskStatus(taskReportDto.jsonData);
    1506 taskReportDto.dataSendFlg = true;
    1507 taskReportDto.attachedFileSendFlg = true;
    1508 mTaskReportDao.update(taskReportDto);
    1509 // CMSへの送信は打ち切り
    1510 return;
    1511 } else {
    1512 throw ex;
    1513 }
    • Kazuyuki Hida @hida-k commented Feb 28, 2023
      Developer

      オフライン時でも、ローカルのDBに保存する。

      オフライン時でも、ローカルのDBに保存する。
    • Yujin Seo @seo commented Feb 28, 2023
      Developer

      taskReportDto.attachedFileSendFlg = true; も必要なのか確認をお願いします。

      taskReportDto.attachedFileSendFlg = true; も必要なのか確認をお願いします。
    • Kazuyuki Hida @hida-k commented Mar 01, 2023
      Developer

      ここで変える必要はないですね。 周辺のコードからコピペして使用したのが間違いでした。

      ここで変える必要はないですね。 周辺のコードからコピペして使用したのが間違いでした。
    Please register or sign in to reply
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Feb 28, 2023
    Resolved by Yujin Seo Feb 28, 2023
    ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/OperationLogic.java
    1542 String key = keys.next();
    1543 if (key.startsWith("q_3_")) { // 状況入力欄
    1544 try {
    1545 int taskStatus = Integer.parseInt(taskObject.getString(key));
    1546 if (taskStatus != 0 && taskStatus != 999) {
    1547 taskStatus = 1;
    1548 }
    1549 return taskStatus;
    1550 } catch (Throwable ignored) {
    1551 return 0;
    1552 }
    1553 }
    1554 }
    1555 return 0;
    1556 }
    1557
    • Kazuyuki Hida @hida-k commented Feb 28, 2023
      Developer

      オフライン時は、CMSからのレスポンスがないので、taskStatusの値を仮に与える(件数表示などで必要)

      Edited Feb 28, 2023
      オフライン時は、CMSからのレスポンスがないので、taskStatusの値を仮に与える(件数表示などで必要)
    Please register or sign in to reply
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Feb 28, 2023
    Resolved by Yujin Seo Feb 28, 2023
    ABVJE_BL/src/jp/agentec/abook/abv/bl/logic/UnlockReportLogic.java
    27 27
    28 28 public Result unlock(String taskKey, Long taskReportId, Date reportStartDate) {
    29 29 Result r = sendUnlockReport(taskKey, taskReportId, reportStartDate);
    30 if (r.result == 0) {
    30 if (r.result == 0 || r.extParam.reportStatus == 3) {
    31 31 updateLocalDB(taskKey, taskReportId, reportStartDate, r.extParam.getReportStatus());
    • Kazuyuki Hida @hida-k commented Feb 28, 2023
      Developer

      オフラインr.extParam.reportStatus == 3でもローカルのDBに格納する。

      Edited Feb 28, 2023
      オフライン`r.extParam.reportStatus == 3`でもローカルのDBに格納する。
    Please register or sign in to reply
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Feb 28, 2023
    Resolved by Yujin Seo Feb 28, 2023
    ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/common/activity/ABVContentViewActivity.java
    1121 1123 // アンロック
    1122 1124 UnlockReportLogic.Result r = UnlockReportLogic.newInstance().unlock(taskKey, taskReportId, startDate);
    1123 1125 // JSコールバック
    1124 // アンロックの失敗は無視
    1125 afterABookCheckApi(mCmd, mTaskKey, 0, "", "{'reportStatus':0}");
    1126 JSONObject extParam = new JSONObject();
    1127 extParam.put(ReportStatus, 0);
    1128 extParam.put(TaskReportId, taskReportId);
    1129 extParam.put(ReportStartDate, DateTimeUtil.toStringInTimeZone(startDate, DateTimeFormat.yyyyMMddHHmmss_hyphen, "UTC"));
    1130 afterABookCheckApi(mCmd, mTaskKey, 0, "", extParam.toString());
    • Kazuyuki Hida @hida-k commented Feb 28, 2023
      Developer

      アンロックのコールバック時に必要な情報がかけていたので、追加した。

      Edited Feb 28, 2023
      アンロックのコールバック時に必要な情報がかけていたので、追加した。
    Please register or sign in to reply
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Feb 28, 2023
    Resolved by Yujin Seo Feb 28, 2023
    ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
    98 98 case ABookKeys.CMD_UPDATE_TASK_REPORT: {
    99 99 // もとから作業中だったかを調べる
    100 100 TaskReportDao taskReportDao = AbstractDao.getDao(TaskReportDao.class);
    101 int rportId = Integer.parseInt(String.valueOf(param.getOrDefault(TaskReportId, "0")));
    101 int reportId = Integer.parseInt(String.valueOf(param.getOrDefault(TaskReportId, "0")));
    • Kazuyuki Hida @hida-k commented Feb 28, 2023
      Developer

      typoを修正

      Edited Feb 28, 2023
      typoを修正
    Please register or sign in to reply
  • Kazuyuki Hida
    @hida-k started a discussion on the diff Feb 28, 2023
    Resolved by Yujin Seo Feb 28, 2023
    ABVJE_UI_Android/src/jp/agentec/abook/abv/ui/home/helper/ABookCheckWebViewHelper.java
    106 107 insertOrUpdateTaskReport(taskKey, enableReportHistory, operationId, contentId, param, contentPath, reportType, taskReportLevel, false);
    107 108 copyTaskAttachedMovie(operationId, contentId, taskKey, taskReportLevel);
    108 109 sendTaskData(context, operationId, taskKey, taskReportLevel);
    109 // 作業ステータスのカウントを変える
    110 // 作業ステータスのカウントを変える todo:要リファクタリング(直すのはともかく動作確認する時間が惜しい)
    110 111 OperationDao operationDao = AbstractDao.getDao(OperationDao.class);
    111 112 if (isLocalSaved) {
    112 113 operationDao.coutUpCompletedFromWorking(operationId);
    113 114 } else if (! isCompleted) {
    114 operationDao.countUpCompleted(operationId);
    115 boolean nowWorking = taskReportDao.isWorking(taskKey, reportId, startDate);
    116 if (!isWorking && nowWorking) {
    117 operationDao.countUpWorking(operationId);
    118 } else {
    119 operationDao.countUpCompleted(operationId);
    120 }
    • Kazuyuki Hida @hida-k commented Feb 28, 2023
      Developer

      作業一覧で表示する各状態の件数を補正する処理。 試行錯誤しながらの実装だったので、可読性が悪いが、開発の遅れがあって、動作確認の時間が惜しいので、このまま通してください。

      Edited Feb 28, 2023 by Kazuyuki Hida
      作業一覧で表示する各状態の件数を補正する処理。 試行錯誤しながらの実装だったので、可読性が悪いが、開発の遅れがあって、動作確認の時間が惜しいので、このまま通してください。
    Please register or sign in to reply
  • Kazuyuki Hida @hida-k

    assigned to @seo

    Feb 28, 2023

    assigned to @seo

    assigned to @seo
    Toggle commit list
  • Kazuyuki Hida @hida-k

    unmarked as a Work In Progress

    Feb 28, 2023

    unmarked as a Work In Progress

    unmarked as a **Work In Progress**
    Toggle commit list
  • Kazuyuki Hida @hida-k

    changed title from Feature/contract/sato/1.0.300 52170 unlock icon2 to いろいろな不具合を修正

    Feb 28, 2023

    changed title from Feature/contract/sato/1.0.300 52170 unlock icon2 to いろいろな不具合を修正

    changed title from **{-Feature/contract/sato/1.0.300 52170 unlock icon2-}** to **{+いろいろな不具合を修正+}**
    Toggle commit list
  • Kazuyuki Hida @hida-k

    changed the description

    Feb 28, 2023

    changed the description

    changed the description
    Toggle commit list
  • Yujin Seo @seo

    assigned to @hida-k

    Feb 28, 2023

    assigned to @hida-k

    assigned to @hida-k
    Toggle commit list
  • Kazuyuki Hida @hida-k

    added 1 commit

    • 00fe6ff1 - 添付ファイルのフラグは変更しないようにした。

    Compare with previous version

    Mar 01, 2023

    added 1 commit

    • 00fe6ff1 - 添付ファイルのフラグは変更しないようにした。

    Compare with previous version

    added 1 commit * 00fe6ff1 - 添付ファイルのフラグは変更しないようにした。 [Compare with previous version](https://gitlab.agentec.jp/abook_android/abook_check/merge_requests/299/diffs?diff_id=10991&start_sha=cd891278323303bf6286686ca2b6e329415b5c7e)
    Toggle commit list
  • Kazuyuki Hida @hida-k

    merged

    Mar 01, 2023

    merged

    merged
    Toggle commit list
  • Kazuyuki Hida @hida-k

    mentioned in commit 9922d073

    Mar 01, 2023

    mentioned in commit 9922d073

    mentioned in commit 9922d073bd62acf71aeca4ba66b0096cab8fa95e
    Toggle commit list
  • Write
  • Preview
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 sign in to comment
Kazuyuki Hida
Assignee
Kazuyuki Hida @hida-k
Assign to
None
Milestone
None
Assign milestone
Time tracking
2
2 participants
Reference: abook_android/abook_check!299
×

Revert this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.
×

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.