Commit 2cac1130 by Kim Jinsung

Merge branch 'feature/1.0.1_32926' into 'feature/1.0.1'

Feature/1.0.1 32926

See merge request !8
parents 4554093e 1bea882c
...@@ -45,6 +45,10 @@ public class OperationDataJSON extends AcmsCommonJSON { ...@@ -45,6 +45,10 @@ public class OperationDataJSON extends AcmsCommonJSON {
public List<TaskDto> taskDtoList; public List<TaskDto> taskDtoList;
public Date lastEditDate; public Date lastEditDate;
// #32926 作業報告画面改善 start
public static final String TaskReportLevel = "taskReportLevel";
// #32926 作業報告画面改善 end
public OperationDataJSON(String jsonString) throws AcmsException { public OperationDataJSON(String jsonString) throws AcmsException {
super(jsonString); super(jsonString);
} }
...@@ -90,6 +94,7 @@ public class OperationDataJSON extends AcmsCommonJSON { ...@@ -90,6 +94,7 @@ public class OperationDataJSON extends AcmsCommonJSON {
if (taskJson.has(TaskReportKey)) { if (taskJson.has(TaskReportKey)) {
dto.taskReportDto.attachedFileName = taskJson.getString(TaskReportKey); dto.taskReportDto.attachedFileName = taskJson.getString(TaskReportKey);
} }
taskDtoList.add(dto); taskDtoList.add(dto);
} }
} }
......
...@@ -140,4 +140,12 @@ public class Constant { ...@@ -140,4 +140,12 @@ public class Constant {
int Camera = 2; int Camera = 2;
int Audio =3; int Audio =3;
} }
// #32926 作業報告画面改善 start
public interface ReportType {
int Report = 0; // 報告
int Routine = 1; // 定期点検
int Report_Answer = 2; // 報告(回答)
}
// #32926 作業報告画面改善 end
} }
...@@ -122,4 +122,8 @@ public class ABookKeys { ...@@ -122,4 +122,8 @@ public class ABookKeys {
public static final String ADD_REPORT = "addReport"; // 作業追加区分 public static final String ADD_REPORT = "addReport"; // 作業追加区分
public static final String CMD_LOCAL_SAVE_TASK_REPORT = "localSaveTaskReport"; // 一時保存 public static final String CMD_LOCAL_SAVE_TASK_REPORT = "localSaveTaskReport"; // 一時保存
// #32861 作業情報追加 end // #32861 作業情報追加 end
// #32926 作業報告画面改善 start
public static final String TASK_REPORT_LEVEL = "taskReportLevel"; // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
public static final String TASK_HAS_AUTHORITY = "taskHasAuthority";
// #32926 作業報告画面改善 end
} }
...@@ -48,6 +48,12 @@ public class TaskDao extends AbstractDao { ...@@ -48,6 +48,12 @@ public class TaskDao extends AbstractDao {
if (column != -1) { if (column != -1) {
dto.delFlg = toBool(cursor.getInt(column)); dto.delFlg = toBool(cursor.getInt(column));
} }
// #32926 作業報告画面改善 start
column = cursor.getColumnIndex("task_has_Authority");
if (column != -1) {
dto.taskHasAuthority = toBool(cursor.getInt(column));
}
// #32926 作業報告画面改善 end
return dto; return dto;
} }
......
...@@ -159,9 +159,12 @@ public class TaskReportDao extends AbstractDao { ...@@ -159,9 +159,12 @@ public class TaskReportDao extends AbstractDao {
// #32782 指示者テーブル関連削除 end // #32782 指示者テーブル関連削除 end
} }
public String getTaskReportAttachedFileName(String taskKey) { // #32926 作業報告画面改善 start
return rawQueryGetString("select local_attached_file_name from t_task_report where task_key=?", new String[]{"" + taskKey}); // taskReportLevel によって添付ファイルを取得する
public String getTaskReportAttachedFileName(String taskKey, String taskReportLevel) {
return rawQueryGetString("select local_attached_file_name from t_task_report where task_key=?", new String[]{"" + taskKey, "" + taskReportLevel});
} }
// #32926 作業報告画面改善 end
public List<TaskReportDto> selectByTaskKey(String taskKey) { public List<TaskReportDto> selectByTaskKey(String taskKey) {
return rawQueryGetDtoList("select * from t_task_report where task_key=?", new String[]{ taskKey }, TaskReportDto.class); return rawQueryGetDtoList("select * from t_task_report where task_key=?", new String[]{ taskKey }, TaskReportDto.class);
......
...@@ -30,6 +30,10 @@ public class OperationDto extends AbstractDto { ...@@ -30,6 +30,10 @@ public class OperationDto extends AbstractDto {
public String reportPeriod; //定期点検、2018/12/20 08:10:00 ~ 2018/12/21 18:10:00 public String reportPeriod; //定期点検、2018/12/20 08:10:00 ~ 2018/12/21 18:10:00
public int reportCount; //定期点検、作業数 public int reportCount; //定期点検、作業数
// #32926 作業報告画面改善 start
public int reportType; // 作業報告タイプ 0:報告 1:定期点検 2:報告(回答)
// #32926 作業報告画面改善 end
public boolean equalsLastEdit(OperationDto dto) { public boolean equalsLastEdit(OperationDto dto) {
if (dto != null) { if (dto != null) {
if (operationId.equals(dto.operationId) && lastEditDate.equals(dto.lastEditDate)) { if (operationId.equals(dto.operationId) && lastEditDate.equals(dto.lastEditDate)) {
......
...@@ -26,6 +26,10 @@ public class TaskDto extends AbstractDto { ...@@ -26,6 +26,10 @@ public class TaskDto extends AbstractDto {
public int taskReportId; public int taskReportId;
public List<RoutineTaskReportDto> RoutineTaskReportList; public List<RoutineTaskReportDto> RoutineTaskReportList;
// #32926 作業報告画面改善 start
public boolean taskHasAuthority; // タスク別の権限
public int taskReportLevel; // 作業報告階層
// #32926 作業報告画面改善 end
@Override @Override
public Object[] getInsertValues() { public Object[] getInsertValues() {
......
package jp.agentec.abook.abv.bl.dto; package jp.agentec.abook.abv.bl.dto;
import java.util.Date;
/** /**
* Created by leej on 2018/09/10. * Created by leej on 2018/09/10.
*/ */
...@@ -17,6 +19,14 @@ public class TaskReportDto extends AbstractDto { ...@@ -17,6 +19,14 @@ public class TaskReportDto extends AbstractDto {
// #32782 指示者テーブル関連削除 start // #32782 指示者テーブル関連削除 start
public boolean reporterFlag; public boolean reporterFlag;
public int taskReportLevel; // 作業報告レベル
public int taskHasAuthority; // 権限
public int taskReportId; // 作業報告ID
public int taskReportInfoId; // 作業報告情報ID
public Date reportStartDate; // 作業開始日
public Date reportEndDate; // 作業終了日
public int enableReport; // 報告可能区分
public boolean reportedFlag; //
// #32782 指示者テーブル関連削除 end // #32782 指示者テーブル関連削除 end
@Override @Override
......
...@@ -855,6 +855,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -855,6 +855,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
mCmd = abookCheckParam.get(ABookKeys.CMD); mCmd = abookCheckParam.get(ABookKeys.CMD);
mTaskKey = abookCheckParam.get(ABookKeys.TASK_KEY); mTaskKey = abookCheckParam.get(ABookKeys.TASK_KEY);
// #32926 作業報告画面改善 start
int taskReportLevel = 0; // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
if (abookCheckParam.containsKey(ABookKeys.TASK_REPORT_LEVEL)) {
taskReportLevel = Integer.parseInt(abookCheckParam.get(ABookKeys.TASK_REPORT_LEVEL)); // 作業報告レベル
}
// #32926 作業報告画面改善 end
int taskReportId = 0; int taskReportId = 0;
String reportStartDate = ""; String reportStartDate = "";
...@@ -864,7 +871,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -864,7 +871,8 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
} }
if (StringUtil.equalsAny(mCmd, ABookKeys.CMD_INSERT_TASK_DIRECTIONS, ABookKeys.CMD_UPDATE_TASK_DIRECTIONS, ABookKeys.CMD_DELETE_TASK_DIRECTIONS, ABookKeys.CMD_CANCEL_TASK_DIRECTIONS, if (StringUtil.equalsAny(mCmd, ABookKeys.CMD_INSERT_TASK_DIRECTIONS, ABookKeys.CMD_UPDATE_TASK_DIRECTIONS, ABookKeys.CMD_DELETE_TASK_DIRECTIONS, ABookKeys.CMD_CANCEL_TASK_DIRECTIONS,
ABookKeys.CMD_MOVE_HOT_SPOT, ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT, ABookKeys.CMD_DELETE_TASK_REPORT, ABookKeys.CMD_CANCEL_TASK_REPORT)) { ABookKeys.CMD_MOVE_HOT_SPOT, ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT, ABookKeys.CMD_DELETE_TASK_REPORT, ABookKeys.CMD_CANCEL_TASK_REPORT,
ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT)) {
boolean isError = false; boolean isError = false;
try { try {
...@@ -877,9 +885,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -877,9 +885,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
ABookKeys.CMD_UPDATE_TASK_DIRECTIONS, ABookKeys.CMD_UPDATE_TASK_DIRECTIONS,
ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_INSERT_TASK_REPORT,
ABookKeys.CMD_UPDATE_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT,
ABookKeys.CMD_MOVE_HOT_SPOT)) { ABookKeys.CMD_MOVE_HOT_SPOT,
ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT)) {
String taskCode = ""; String taskCode = "";
// #32781 start
// TODO TASK_DIRECTIONSの削除され、TASK_REPORTに変更する
if (abookCheckParam.get(ABookKeys.TASK_DIRECTIONS) != null) { if (abookCheckParam.get(ABookKeys.TASK_DIRECTIONS) != null) {
JSONObject direction = new JSONObject(abookCheckParam.get(ABookKeys.TASK_DIRECTIONS)); JSONObject direction = new JSONObject(abookCheckParam.get(ABookKeys.TASK_DIRECTIONS));
JSONObject taskJson = direction.getJSONObject(ABookKeys.TASK); JSONObject taskJson = direction.getJSONObject(ABookKeys.TASK);
...@@ -891,6 +902,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -891,6 +902,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
} }
} }
} }
// #32781 end
if (abookCheckParam.get(ABookKeys.HOT_SPOT) != null) { if (abookCheckParam.get(ABookKeys.HOT_SPOT) != null) {
JSONObject hotSpot = new JSONObject(abookCheckParam.get(ABookKeys.HOT_SPOT)); JSONObject hotSpot = new JSONObject(abookCheckParam.get(ABookKeys.HOT_SPOT));
...@@ -918,7 +930,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -918,7 +930,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
return null; return null;
} }
}; };
ABookCheckWebViewHelper.getInstance().doABookCheckParam(ABVContentViewActivity.this, mCmd, mTaskKey, reportUpdateType, abookCheckParam, mOperationId, mContentPath, getContentId(), operationDto.operationReportType == Constant.OperationReportType.ROUTINE_TASK, finishCallback); // #32926 作業報告画面改善 start
ABookCheckWebViewHelper.getInstance().doABookCheckParam(ABVContentViewActivity.this,
mCmd, mTaskKey, reportUpdateType, abookCheckParam, mOperationId, mContentPath, getContentId(),
operationDto.reportType == Constant.ReportType.Routine, finishCallback,
taskReportLevel);
// #32926 作業報告画面改善 end
} catch(Exception e) { } catch(Exception e) {
Logger.e(TAG, "doABookCheckParam error", e); Logger.e(TAG, "doABookCheckParam error", e);
} }
...@@ -949,11 +966,15 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -949,11 +966,15 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
if (abookCheckParam.containsKey(ABookKeys.ADD_REPORT)) { if (abookCheckParam.containsKey(ABookKeys.ADD_REPORT)) {
mAddReport = Integer.parseInt(abookCheckParam.get(ABookKeys.ADD_REPORT)) > 0 ? true : false; mAddReport = Integer.parseInt(abookCheckParam.get(ABookKeys.ADD_REPORT)) > 0 ? true : false;
} }
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, false, taskReportId, reportStartDate, mReportFileName, mLocalSave, mAddReport); // #32926 作業報告画面改善 start
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, false, taskReportId, reportStartDate, mReportFileName, mLocalSave, mAddReport, taskReportLevel);
// #32926 作業報告画面改善 end
// #32861 作業情報追加 end // #32861 作業情報追加 end
} else if (mCmd.equals(ABookKeys.CMD_PREVIEW_REPORT_OZD)) { } else if (mCmd.equals(ABookKeys.CMD_PREVIEW_REPORT_OZD)) {
mReportFileName = abookCheckParam.get(ABookKeys.REPORT_FILE_NAME); mReportFileName = abookCheckParam.get(ABookKeys.REPORT_FILE_NAME);
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, true, taskReportId, reportStartDate, mReportFileName, false, false); // #32926 作業報告画面改善 start
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, true, taskReportId, reportStartDate, mReportFileName, false, false, taskReportLevel);
// #32926 作業報告画面改善 end
} else if (mCmd.equals(ABookKeys.CMD_CONTENT_EDIT_CLOSE)) { } else if (mCmd.equals(ABookKeys.CMD_CONTENT_EDIT_CLOSE)) {
showProgressPopup(); showProgressPopup();
handler.postDelayed(new Runnable() { handler.postDelayed(new Runnable() {
...@@ -964,7 +985,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -964,7 +985,9 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
} }
}, 5000); }, 5000);
} else if (mCmd.equals(ABookKeys.CMD_GET_GPS_INFO)) { } else if (mCmd.equals(ABookKeys.CMD_GET_GPS_INFO)) {
setLocation(true, (Integer.valueOf(abookCheckParam.get(ABookKeys.GPS_TYPE)) != 1)); // #32926 作業報告画面改善 start
setLocation((Integer.valueOf(abookCheckParam.get(ABookKeys.GPS_TYPE)) != 1), taskReportLevel);
// #32926 作業報告画面改善 end
} else if (mCmd.equals(ABookKeys.CMD_SCENE_REGIST)) { } else if (mCmd.equals(ABookKeys.CMD_SCENE_REGIST)) {
String successFlg = abookCheckParam.get(ABookKeys.SUCCESS_FLG); String successFlg = abookCheckParam.get(ABookKeys.SUCCESS_FLG);
if(Integer.parseInt(successFlg) == 0) { if(Integer.parseInt(successFlg) == 0) {
...@@ -1099,9 +1122,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1099,9 +1122,12 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
/** /**
* 位置情報取得 * 位置情報取得
* @param isReport * @param showPermissionDialogFlg
* @param taskReportLevel
*/ */
protected void setLocation(final boolean isReport, final boolean showPermissionDialogFlg) { // #32926 作業報告画面改善 start
protected void setLocation(final boolean showPermissionDialogFlg, final int taskReportLevel) {
// #32926 作業報告画面改善 end
ABookPermissionHelper helper = new ABookPermissionHelper(this, Constant.ABookPermissionType.AccessFineLocation, null); ABookPermissionHelper helper = new ABookPermissionHelper(this, Constant.ABookPermissionType.AccessFineLocation, null);
if (helper.checkMultiPermissions(showPermissionDialogFlg)) { if (helper.checkMultiPermissions(showPermissionDialogFlg)) {
// 位置情報取得 // 位置情報取得
...@@ -1109,7 +1135,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1109,7 +1135,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
@Override @Override
public void onGetLocationFailed() { public void onGetLocationFailed() {
Logger.w(TAG, "onGetLocationFailed"); Logger.w(TAG, "onGetLocationFailed");
if (isReport) { // #32926 作業報告画面改善 start
// 報告(回答)の場合
if (taskReportLevel > 0) {
// #32926 作業報告画面改善 end
afterABookCheckApi(mCmd, "", 1, getString(R.string.msg_location_search_fail), null); afterABookCheckApi(mCmd, "", 1, getString(R.string.msg_location_search_fail), null);
} }
} }
...@@ -1122,7 +1151,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1122,7 +1151,10 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
CommonExecutor.execute(new Runnable() { CommonExecutor.execute(new Runnable() {
@Override @Override
public void run() { public void run() {
if (isReport) { // #32926 作業報告画面改善 start
// 報告(回答)の場合
if (taskReportLevel > 0) {
// #32926 作業報告画面改善 end
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
json.put("latitude", latitude); json.put("latitude", latitude);
json.put("longitude", longitude); json.put("longitude", longitude);
...@@ -1148,7 +1180,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity { ...@@ -1148,7 +1180,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
locationManagerUtil.startLocationService(); locationManagerUtil.startLocationService();
} else { } else {
Logger.w(TAG,"onGetLocationFailed AccessFineLocation false"); Logger.w(TAG,"onGetLocationFailed AccessFineLocation false");
if (isReport) { if (taskReportLevel > 0) {
afterABookCheckApi(mCmd, "", 1, getString(R.string.msg_location_search_fail), null); afterABookCheckApi(mCmd, "", 1, getString(R.string.msg_location_search_fail), null);
} }
} }
......
...@@ -1545,9 +1545,10 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1545,9 +1545,10 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
* @param reportFileName * @param reportFileName
* @param localSave * @param localSave
* @param addReport * @param addReport
* @param taskReportLevel
*/ */
// #32861 作業情報追加 start // #32861 作業情報追加 start
public void startOZViewerActivity(Context context, long operationId, long contentId, String taskKey, boolean isReadOnly, int taskReportId, String reportStartDate, String reportFileName, boolean localSave, boolean addReport) { public void startOZViewerActivity(Context context, long operationId, long contentId, String taskKey, boolean isReadOnly, int taskReportId, String reportStartDate, String reportFileName, boolean localSave, boolean addReport, int taskReportLevel) {
reportStartDate = reportStartDate.replace("T", " "); reportStartDate = reportStartDate.replace("T", " ");
String strReportStartDate = DateTimeUtil.toString(DateTimeUtil.toDate(reportStartDate, DateTimeFormat.yyyyMMddHHmmss_hyphen), DateTimeFormat.yyyyMMddHHmm_none); String strReportStartDate = DateTimeUtil.toString(DateTimeUtil.toDate(reportStartDate, DateTimeFormat.yyyyMMddHHmmss_hyphen), DateTimeFormat.yyyyMMddHHmm_none);
...@@ -1565,6 +1566,9 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1565,6 +1566,9 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra(ABookKeys.LOCAL_SAVE, localSave); // 一時保存情報 intent.putExtra(ABookKeys.LOCAL_SAVE, localSave); // 一時保存情報
intent.putExtra(ABookKeys.ADD_REPORT, addReport); // 作業追加区分 intent.putExtra(ABookKeys.ADD_REPORT, addReport); // 作業追加区分
// #32861 作業情報追加 end // #32861 作業情報追加 end
// #32926 作業報告画面改善 start
intent.putExtra(ABookKeys.TASK_REPORT_LEVEL, taskReportLevel); // 作業報告レベル(0:報告、1:報告(回答)、2:報告(回答))
// #32926 作業報告画面改善 end
context.startActivity(intent); context.startActivity(intent);
} }
......
...@@ -92,7 +92,7 @@ public class OzdFileHelper { ...@@ -92,7 +92,7 @@ public class OzdFileHelper {
return REPORT_OZD_FILE_NAME; return REPORT_OZD_FILE_NAME;
} }
public static final String getOzFilePath(long operationId, long contentId, String taskKey, boolean directionFlg, int taskReportId, String reportStartDate, String reportFileName) { public static final String getOzFilePath(long operationId, long contentId, String taskKey, boolean directionFlg, int taskReportId, String reportStartDate, String reportFileName, int taskReportLevel) {
String ozdFileName = null; String ozdFileName = null;
String ozrFileName = null; String ozrFileName = null;
...@@ -100,13 +100,15 @@ public class OzdFileHelper { ...@@ -100,13 +100,15 @@ public class OzdFileHelper {
ozdFileName = reportFileName; ozdFileName = reportFileName;
ozrFileName = reportFileName; ozrFileName = reportFileName;
} else { } else {
if (directionFlg) { // #32926 作業報告画面改善 start
if (taskReportLevel == 0) {
ozdFileName = DIRECTION_OZD_FILE_NAME; ozdFileName = DIRECTION_OZD_FILE_NAME;
ozrFileName = DIRECTION_OZR_FILE_NAME; ozrFileName = DIRECTION_OZR_FILE_NAME;
} else { } else {
ozdFileName = REPORT_OZD_FILE_NAME; ozdFileName = REPORT_OZD_FILE_NAME;
ozrFileName = REPORT_OZR_FILE_NAME; ozrFileName = REPORT_OZR_FILE_NAME;
} }
// #32926 作業報告画面改善 end
} }
String ozFilePath = ABVEnvironment.getInstance().getTempFilePath(contentId, taskKey, ozdFileName); String ozFilePath = ABVEnvironment.getInstance().getTempFilePath(contentId, taskKey, ozdFileName);
...@@ -115,9 +117,11 @@ public class OzdFileHelper { ...@@ -115,9 +117,11 @@ public class OzdFileHelper {
} }
if (taskReportId > 0 && !StringUtil.isNullOrEmpty(reportStartDate)) { if (taskReportId > 0 && !StringUtil.isNullOrEmpty(reportStartDate)) {
ozFilePath = ABVEnvironment.getInstance().getRoutineTaskSavedOzFilePath(operationId, taskKey, taskReportId, reportStartDate, ozdFileName); ozFilePath = ABVEnvironment.getInstance().getRoutineTaskSavedOzFilePath(operationId, taskKey, taskReportId, reportStartDate, ozdFileName, String.valueOf(taskReportLevel));
} else { } else {
ozFilePath = ABVEnvironment.getInstance().getSavedOzFilePath(operationId, taskKey, ozdFileName, directionFlg); // #32926 作業報告画面改善 start
ozFilePath = ABVEnvironment.getInstance().getSavedOzFileTaskReportLevelPath(operationId, taskKey, ozdFileName, String.valueOf(taskReportLevel));
// #32926 作業報告画面改善 end
} }
if (FileUtil.exists(ozFilePath)) { if (FileUtil.exists(ozFilePath)) {
return ozFilePath; return ozFilePath;
......
...@@ -74,6 +74,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -74,6 +74,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
private String mSaveOzdTempFileName; private String mSaveOzdTempFileName;
private String mSaveOzdFileName; private String mSaveOzdFileName;
// #32926 作業報告画面改善 start
private int mTaskReportLevel; // 作業報告レベル
// #32926 作業報告画面改善 end
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
Logger.i(TAG, "onCreate"); Logger.i(TAG, "onCreate");
...@@ -92,6 +96,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -92,6 +96,10 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
mReportStartDate = intent.getStringExtra(ABookKeys.REPORT_START_DATE); mReportStartDate = intent.getStringExtra(ABookKeys.REPORT_START_DATE);
mReportFileName = intent.getStringExtra(ABookKeys.REPORT_FILE_NAME); mReportFileName = intent.getStringExtra(ABookKeys.REPORT_FILE_NAME);
// #32926 作業報告画面改善 start
mTaskReportLevel = intent.getIntExtra(ABookKeys.TASK_REPORT_LEVEL, 0); // 作業報告レベル
// #32926 作業報告画面改善 end
String frontTitle = ""; String frontTitle = "";
String rearTitle = ""; String rearTitle = "";
...@@ -163,7 +171,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -163,7 +171,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
}); });
// #32861 作業情報追加 end // #32861 作業情報追加 end
mOzFilePath = OzdFileHelper.getOzFilePath(mOperationId, contentId, mTaskKey, mDirectionFlg, mTaskReportId, mReportStartDate, mReportFileName); // #32926 作業報告画面改善 start
mOzFilePath = OzdFileHelper.getOzFilePath(mOperationId, contentId, mTaskKey, mDirectionFlg, mTaskReportId, mReportStartDate, mReportFileName, mTaskReportLevel);
// #32926 作業報告画面改善 end
Logger.i(TAG,"********mOzFilePath = %s" + mOzFilePath); Logger.i(TAG,"********mOzFilePath = %s" + mOzFilePath);
if (mOzFilePath == null) { if (mOzFilePath == null) {
...@@ -526,7 +536,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity { ...@@ -526,7 +536,9 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
StringBuilder param = new StringBuilder(); StringBuilder param = new StringBuilder();
param.append("export.mode=silent#"); param.append("export.mode=silent#");
param.append("export.filename=" + FileUtil.getFilenameWithoutExt(mSaveOzdTempFileName) + "#"); param.append("export.filename=" + FileUtil.getFilenameWithoutExt(mSaveOzdTempFileName) + "#");
param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "#"); // #32926 作業報告画面改善 start
param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "/" + mTaskReportLevel + "#");
// #32926 作業報告画面改善 end
param.append("export.confirmsave=false#"); param.append("export.confirmsave=false#");
param.append("export.format=ozd"); param.append("export.format=ozd");
int result = mOzReportViewer.ScriptEx("save", param.toString(), "#"); int result = mOzReportViewer.ScriptEx("save", param.toString(), "#");
......
...@@ -379,8 +379,12 @@ public class OperationTaskLayout extends RelativeLayout { ...@@ -379,8 +379,12 @@ public class OperationTaskLayout extends RelativeLayout {
setLayoutParams(params); setLayoutParams(params);
} else { } else {
DisplayMetrics displayMetrics = getResources().getDisplayMetrics(); DisplayMetrics displayMetrics = getResources().getDisplayMetrics();
int halfWidth = (int) (displayMetrics.density * OperationTaskLayout.HALF_WIDTH);
params = createParam(halfWidth, ViewGroup.LayoutParams.WRAP_CONTENT); // #32926 作業報告画面改善 start
// 作業報告画面を全画面に表示する
int screenWidth = displayMetrics.widthPixels;
params = createParam(screenWidth, ViewGroup.LayoutParams.WRAP_CONTENT);
// #32926 作業報告画面改善 end
if (!StringUtil.isNullOrEmpty(taskKey)) { if (!StringUtil.isNullOrEmpty(taskKey)) {
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey); TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
......
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