Commit 7b1a7fd9 by Lee Jaebin

#32825 作業一覧画面改善

parent 3493050a
......@@ -192,7 +192,6 @@ public class AcmsClient implements AcmsClientResponseListener {
dto.memberName = json.userName;
dto.requiredPasswordChange = json.requirePasswordChange;
dto.userId = json.userId;
dto.operationAuthLevel = json.operationAuthLevel;
dto.workerCode = json.workerCode;
if (json.result) {
......
......@@ -11,14 +11,12 @@ public class NewAppStoreLoginJSON extends AcmsBooleanResultJSON {
public static final String Sid = "sid";
public static final String UserName = "userName";
public static final String UserId = "userId";
public static final String OperationAuthLevel = "projectAuthLevel";
public static final String WorkerCode = "workerCode";
public String sid;
public RequirePasswordChangeCode requirePasswordChange;
public String userName;
public int userId;
public Integer operationAuthLevel;
public String workerCode;
public NewAppStoreLoginJSON(String jsonString) throws AcmsException {
......@@ -35,9 +33,6 @@ public class NewAppStoreLoginJSON extends AcmsBooleanResultJSON {
if (json.has(UserId)) {
userId = getInt(json,UserId);
}
if (json.has(OperationAuthLevel)) {
operationAuthLevel = getInt(json, OperationAuthLevel);
}
if (json.has(WorkerCode)) {
workerCode = getString(json, WorkerCode, StringUtil.Empty);
}
......
......@@ -73,7 +73,11 @@ public class OperationDataJSON extends AcmsCommonJSON {
JSONObject taskReportJson = taskReportList.getJSONObject(j);
taskReportDto.taskKey = dto.taskKey;
taskReportDto.taskReportLevel = taskReportJson.getInt(TaskReportLevel);
// 報告可能区分
if (taskReportJson.has(EnableReport)) {
taskReportDto.enableReport = taskReportJson.getInt(EnableReport);
}
if (taskReportJson.has(TaskReportInfoId)) {
// 定期点検の場合
......
......@@ -140,8 +140,6 @@ public class AcmsApis {
public static final String ApiSendTaskData = "taskData";
// 作業データ取得
public static final String ApiGetOperationData = "getOperationData";
// 定期点検データ取得
public static final String ApiGetRoutineTaskData = "getProjectInspectData";
// 作業ファイル取得
public static final String ApiGetTaskFile = "getTaskFile";
// コンテンツ登録
......@@ -198,7 +196,7 @@ public class AcmsApis {
apiValue = Constant.ApiValue.nuapi;
} else if (methodName.equals(ApiOperationList) || methodName.equals(ApiWorkingGroupList) || methodName.equals(ApiSendTaskData) || methodName.equals(ApiGetOperationData) ||
methodName.equals(ApiGetTaskFile) || methodName.equals(ApiSceneEntry) || methodName.equals(ApiTaskContentEntry) ||
methodName.equals(ApiSendPushMessage) || methodName.equals(ApiGetPushMessages) || methodName.equals(ApiGetRoutineTaskData) || methodName.equals(ApiSendRoutineTaskData)) {
methodName.equals(ApiSendPushMessage) || methodName.equals(ApiGetPushMessages) || methodName.equals(ApiSendRoutineTaskData)) {
apiValue = Constant.ApiValue.checkapi;
}
......
......@@ -106,8 +106,8 @@ public class ABVEnvironment {
public static final String CommonDirectoryFormat = "%s/ABook/common";
public static final String OperationDirFormat = "%s/ABook/projects/%d";
public static final String OperationTaskKeyDirFormat = "%s/ABook/projects/%d/%s";
public static final String OperationDirFormat = "%s/ABook/operation/%d";
public static final String OperationTaskKeyDirFormat = "%s/ABook/operation/%d/%s";
public static final String PanoImageDirFormat = "%s/panoImage";
public static final String PanoImageFileFormat = "%s/panoImage.zip";
public static final String TaskPdfDirFormat = "%s/taskPdf";
......@@ -664,7 +664,7 @@ public class ABVEnvironment {
/**
* プロジェクトの作業ディレクトリパス
* 例)root/files/ABook/projects/[project_id]/[task_key]
* 例)root/files/ABook/operation/[operation_id]/[task_key]
* @param operationId
* @param taskKey
* @return
......@@ -697,7 +697,7 @@ public class ABVEnvironment {
/**
* 作業報告レベルのディレクトリパス
* 例)root/files/ABook/projects/[project_id]/[task_key]/[taskReportLevel]
* 例)root/files/ABook/operation/[operation_id]/[task_key]/[taskReportLevel]
* @param operationId
* @param taskKey
* @param taskReportLevel
......
......@@ -119,4 +119,5 @@ public class ABookKeys {
// #32926 作業報告画面改善 start
public static final String HAS_AUTHORITY = "hasAuthority";
// #32926 作業報告画面改善 end
public static final String CLOSE_TASK_REPORT = "closeTaskReport";
}
......@@ -72,10 +72,6 @@ public class MemberInfoDao extends AbstractDao {
if (column != -1) {
dto.lastUpdateInfor = cursor.getString(column);
}
column = cursor.getColumnIndex("operation_auth_level");
if (column != -1) {
dto.operationAuthLevel = cursor.getInt(column);
}
column = cursor.getColumnIndex("worker_code");
if (column != -1) {
dto.workerCode = cursor.getString(column);
......
......@@ -32,7 +32,6 @@ public class MMemberInfo extends SQLiteTableScript {
sql.append(" , password_expiry_date DATETIME ");
sql.append(" , user_id INTEGER");
sql.append(" , last_update_infor VARCHAR(64)");
sql.append(" , operation_auth_level INTEGER");
sql.append(" , worker_code TEXT");
sql.append(" , PRIMARY KEY (login_id) ");
sql.append(" ) ");
......
......@@ -25,19 +25,18 @@ public class MemberInfoDto extends AbstractDto {
public Date lastCMSAccessDate;
public Date passwordExpiryDate;
public String lastUpdateInfor; //ABookSee 1.8.1
public Integer operationAuthLevel;
public String workerCode;
public RequirePasswordChangeCode requiredPasswordChange;
@Override
public Object[] getInsertValues() {
return new Object[]{loginId, password, memberName, sid, loginStatus, invalidPasswordCount, lastLoginDate, lastChangePasswordDate, lastCMSAccessDate, userId, lastUpdateInfor, operationAuthLevel, workerCode};
return new Object[]{loginId, password, memberName, sid, loginStatus, invalidPasswordCount, lastLoginDate, lastChangePasswordDate, lastCMSAccessDate, userId, lastUpdateInfor, workerCode};
}
@Override
public Object[] getUpdateValues() {
return new Object[]{password, memberName, sid, loginStatus, invalidPasswordCount, lastLoginDate, lastChangePasswordDate, lastCMSAccessDate, lastUpdateInfor, operationAuthLevel, workerCode, loginId};
return new Object[]{password, memberName, sid, loginStatus, invalidPasswordCount, lastLoginDate, lastChangePasswordDate, lastCMSAccessDate, lastUpdateInfor, workerCode, loginId};
}
@Override
......
......@@ -628,11 +628,10 @@ public class OperationLogic extends AbstractLogic {
* @param taskReportDto
* @param attachedChangeFlag
* @param dataSendFlg
* @param insertFlg
* @param reportedFlg
* @throws IOException
*/
public void updateRoutineTaskReport(long operationId, long contentId, TaskReportDto taskReportDto, boolean attachedChangeFlag, boolean dataSendFlg, boolean insertFlg, boolean reportedFlg) throws IOException {
public void updateRoutineTaskReport(long operationId, long contentId, TaskReportDto taskReportDto, boolean attachedChangeFlag, boolean dataSendFlg, boolean reportedFlg) throws IOException {
taskReportDto.attachedFileSendFlg = attachedChangeFlag;
taskReportDto.dataSendFlg = dataSendFlg;
taskReportDto.reportedFlag = reportedFlg;
......@@ -642,24 +641,9 @@ public class OperationLogic extends AbstractLogic {
JSONObject taskReportJson = new JSONObject(taskReportDto.jsonData);
JSONObject taskJson = taskReportJson.getJSONObject("task");
if (insertFlg) {
Iterator taskKeys = taskJson.keys();
while (taskKeys.hasNext()) {
TaskReportItemsDto taskReportItemsDto = new TaskReportItemsDto();
String itemKey = (String) taskKeys.next();
taskReportItemsDto.taskKey = taskReportDto.taskKey;
taskReportItemsDto.itemKey = itemKey;
taskReportItemsDto.taskReportLevel = Constant.TaskReportLevel.ReportType;
try {
taskReportItemsDto.inputValue = taskJson.getString(itemKey);
} catch (JSONException e) {
// 値がStringではない場合、無視する
continue;
}
mTaskReportItemsDao.insertTaskReportItems(taskReportItemsDto);
}
} else {
List<TaskReportItemsDto> taskReportItemsDaoList = mTaskReportItemsDao.getTaskReportItemByTaskKey(taskReportDto.taskKey, Constant.TaskReportLevel.ReportType);
if (taskReportItemsDaoList.size() > 0) {
// 更新
for (TaskReportItemsDto taskReportItemsDto : taskReportItemsDaoList) {
try {
String newValue = taskJson.getString(taskReportItemsDto.itemKey);
......@@ -673,6 +657,22 @@ public class OperationLogic extends AbstractLogic {
continue;
}
}
} else {
// 登録
Iterator taskKeys = taskJson.keys();
while (taskKeys.hasNext()) {
TaskReportItemsDto taskReportItemsDto = new TaskReportItemsDto();
String itemKey = (String) taskKeys.next();
taskReportItemsDto.taskKey = taskReportDto.taskKey;
taskReportItemsDto.itemKey = itemKey;
taskReportItemsDto.taskReportLevel = Constant.TaskReportLevel.ReportType;
try {
taskReportItemsDto.inputValue = taskJson.getString(itemKey);
} catch (JSONException e) {
// 値がStringではない場合、無視する
continue;
}
mTaskReportItemsDao.insertTaskReportItems(taskReportItemsDto);
}
}
......@@ -681,24 +681,8 @@ public class OperationLogic extends AbstractLogic {
String routineTaskReportDirPath = ABVEnvironment.getInstance().getRoutineTaskReportDirFilePath(operationId, taskReportDto.taskKey, taskReportDto.taskReportId, strReportStartDate);
if (insertFlg) {
if (!StringUtil.isNullOrEmpty(taskReportDto.jsonData)) {
JSONObject attachedListJson = (new JSONObject(taskReportDto.jsonData)).getJSONObject("attached");
List<String> attachedFileNames = JSONObject.getValues(attachedListJson);
// コピー元のファイルで、添付ファイルとして使用しないファイル削除
deleteDifferentialFile(tempDirPath, attachedFileNames);
}
// 添付ディレクトリの移動
boolean result = FileUtil.copy(tempDirPath, routineTaskReportDirPath, true);
if(result) {
FileUtil.delete(tempDirPath);
}
} else {
if (taskReportDto.attachedFileSendFlg) {
if (StringUtil.isNullOrEmpty(taskReportDto.jsonData)) {
if (!StringUtil.isNullOrEmpty(taskReportDto.jsonData)) {
//添付ファイル変更の場合、以下の処理を行う
JSONObject attachedListJson = (new JSONObject(taskReportDto.jsonData)).getJSONObject("attached");
List<String> attachedFileNames = JSONObject.getValues(attachedListJson);
......@@ -707,7 +691,7 @@ public class OperationLogic extends AbstractLogic {
// 同じファイル名が存在すれば、コピー先ファイルを削除
deleteDifferentialFile(routineTaskReportDirPath, attachedFileNames);
}
}
// 添付ディレクトリの移動
boolean result = FileUtil.copy(tempDirPath, routineTaskReportDirPath, true);
if (result) {
......@@ -715,7 +699,6 @@ public class OperationLogic extends AbstractLogic {
}
}
}
}
/**
* 作業報告送信データ、新規
......@@ -978,7 +961,7 @@ public class OperationLogic extends AbstractLogic {
jsonObject.put("workerCode", ABVDataCache.getInstance().getMemberInfo().workerCode);
// データディレクトリへの相対パス
jsonObject.put("attachedPath", "../../../../files/ABook/projects/" + operationId);
jsonObject.put("attachedPath", "../../../../files/ABook/operation/" + operationId);
jsonObject.put("attachedMoviePath", ABVEnvironment.getInstance().getAttachedMoviesFilePath(contentId));
FileUtil.createFile(contentPath + "/content.json", jsonObject.toString());
......@@ -1058,6 +1041,7 @@ public class OperationLogic extends AbstractLogic {
public void createTaskReportJson(Long operationId, String contentPath) throws IOException {
List<JSONObject> taskReportJsonList = new ArrayList<JSONObject>();
JSONObject taskReportJson = new JSONObject();
OperationDto operationDto = mOperationDao.getOperation(operationId);
List<TaskReportDto> taskReportDtoList = mTaskReportDao.getTaskReportByOperationId(operationId);
int level = 0;
......@@ -1071,11 +1055,17 @@ public class OperationLogic extends AbstractLogic {
}
if(dto.jsonData != null && dto.jsonData.length() > 0) {
if (operationDto.reportType == Constant.ReportType.ReportReply) {
taskReportJsonList.add(new JSONObject(dto.jsonData).put(ABookKeys.HAS_AUTHORITY, dto.enableReport));
} else {
taskReportJsonList.add(new JSONObject(dto.jsonData));
}
} else {
JSONObject emptyTaskReportJson = new JSONObject();
emptyTaskReportJson.put(ABookKeys.TASK_KEY, dto.taskKey);
if (operationDto.reportType == Constant.ReportType.ReportReply) {
emptyTaskReportJson.put(ABookKeys.HAS_AUTHORITY, dto.enableReport);
}
taskReportJsonList.add(emptyTaskReportJson);
}
......@@ -1096,6 +1086,12 @@ public class OperationLogic extends AbstractLogic {
FileUtil.createFile(contentPath + "/" + ABookKeys.TASK_REPORT + ".json", taskReportJson.toString());
}
/**
* 定期点検用のJSON作成
* @param operationId
* @param contentPath
* @throws IOException
*/
public void createRoutineTaskReportJson(Long operationId, String contentPath) throws IOException {
List<JSONObject> taskReportJsonList = new ArrayList<JSONObject>();
JSONObject taskReportJsonRoot = new JSONObject();
......
......@@ -860,6 +860,11 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
if (abookCheckParam.containsKey(ABookKeys.TASK_REPORT_LEVEL)) {
taskReportLevel = Integer.parseInt(abookCheckParam.get(ABookKeys.TASK_REPORT_LEVEL)); // 作業報告レベル
}
mAddReport = true;
if (abookCheckParam.containsKey(ABookKeys.ADD_REPORT)) {
mAddReport = Integer.parseInt(abookCheckParam.get(ABookKeys.ADD_REPORT)) > 0 ? true : false;
}
int taskReportId = 0;
String reportStartDate = "";
......@@ -916,9 +921,13 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
public Object callback(Object ret) {
final boolean isError = (boolean)ret;
closeProgressPopup();
if (mAddReport) {
// #32861 作業情報追加 start
afterABookCheckApi(mCmd, mTaskKey, isNetWorkError(isError), "", null, isOperationPdf());
// #32861 作業情報追加 end
} else {
finish();
}
return null;
}
};
......@@ -955,9 +964,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
if (abookCheckParam.containsKey(ABookKeys.LOCAL_SAVE)) {
mLocalSave = Integer.parseInt(abookCheckParam.get(ABookKeys.LOCAL_SAVE)) > 0 ? true : false;
}
if (abookCheckParam.containsKey(ABookKeys.ADD_REPORT)) {
mAddReport = Integer.parseInt(abookCheckParam.get(ABookKeys.ADD_REPORT)) > 0 ? true : false;
}
// #32926 作業報告画面改善 start
ActivityHandlingHelper.getInstance().startOZViewerActivity(this, mOperationId, getContentId(), mTaskKey, false, taskReportId, reportStartDate, mReportFileName, mLocalSave, mAddReport, taskReportLevel);
// #32926 作業報告画面改善 end
......@@ -1252,7 +1258,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
// 押したボタンによってHTML側の処理を行う
if (this instanceof CheckOZDViewActivity) {
if (mButtonStatus == R.id.btn_close) {
super.finish();
ozdCancelProcess(); // 閉じる
} else if (mButtonStatus == R.id.btn_temp_save) {
ozdLocalSaveProcess(); // 一時保存
......
......@@ -131,9 +131,7 @@ public interface AppDefType {
interface PushMessageKey {
String message = "message";
String data = "data";
// TODO
// サーバ作業後、対応必要「project」→「operation」
String operationId = "projectId";
String operationId = "operationId";
}
interface UrlPattern {
......
......@@ -56,7 +56,6 @@ import jp.agentec.abook.abv.bl.acms.client.AcmsClient;
import jp.agentec.abook.abv.bl.acms.client.json.OperationDataJSON;
import jp.agentec.abook.abv.bl.acms.client.parameters.GetOperationDataParameters;
import jp.agentec.abook.abv.bl.acms.type.DownloadStatusType;
import jp.agentec.abook.abv.bl.acms.type.OperationAuthLevel;
import jp.agentec.abook.abv.bl.acms.type.OperationType;
import jp.agentec.abook.abv.bl.common.ABVEnvironment;
import jp.agentec.abook.abv.bl.common.Callback;
......@@ -152,7 +151,6 @@ public class OperationListActivity extends ABVUIActivity {
private TaskDao mTaskDao = AbstractDao.getDao(TaskDao.class);
private PushMessageLogic mPushMessageLogic = AbstractLogic.getLogic(PushMessageLogic.class);
private Integer mOperationAuthLevel = ABVDataCache.getInstance().getMemberInfo().operationAuthLevel;
private ImageView mPanoCotnentImageView;
private TextView mPanoContentNameTextView;
......@@ -595,19 +593,13 @@ public class OperationListActivity extends ABVUIActivity {
mOperationLogic.createJsonForOpenABookCheckPano(operationDto.operationId, operationDto.contentId, contentPath);
mOperationLogic.createJsonForOperationContent(operationDto.operationId, contentPath, operationDto.reportType == Constant.OperationReportType.ROUTINE_TASK);
if (operationDto.reportType == Constant.OperationReportType.ROUTINE_TASK) {
mOperationLogic.createJsonForRoutineTaskReport(operationDto.reportCycle, operationDto.enableReportUpdate, mOperationLogic.getLastRoutineTaskReportData(operationDto.operationId).taskReportId, contentPath);
}
// サーバ作業後、対応必要
StringBuffer path = new StringBuffer();
path.append(contentPath);
// #32926 作業報告画面改善 start
path.append("/index.html?app=android");
path.append("&view_mode=" + mOperationAuthLevel);
path.append("&report_type=" + operationDto.reportType); // 作業報告タイプ : 0:報告 1:定期点検 2:報告(回答)
path.append("&mobile_flg=" + (isNormalSize() ? "1" : "0")); // ScreenType
path.append("&operation_type=" + operationDto.operationType); // 作業タイプ : 0:リスト、1:図面、2:360°
Logger.d(TAG, "path : " + path);
// #32926 作業報告画面改善 end
......@@ -773,11 +765,11 @@ public class OperationListActivity extends ABVUIActivity {
}
public void onClickShowHelpView(View v) {
if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
// if (mOperationAuthLevel == OperationAuthLevel.OPERATION_INSTRUCTOR) {
showHelpViewDialog(Constant.HelpViewType.OperationListDirector);
} else {
// } else {
showHelpViewDialog(Constant.HelpViewType.OperationListReporter);
}
// }
}
/**
......@@ -878,7 +870,7 @@ public class OperationListActivity extends ABVUIActivity {
if (isExistsTaskReportInList(localTaskReportList, taskReportDto, true)) {
// 報告データが存在すると作業報告を更新する
if (taskReportDto.jsonData != null) {
mOperationLogic.updateRoutineTaskReport(serverTaskDto.operationId, operationContentDto.contentId, taskReportDto, false, false, false, false);
mOperationLogic.updateRoutineTaskReport(serverTaskDto.operationId, operationContentDto.contentId, taskReportDto, false, false, false);
}
} else {
if (taskReportDto.jsonData != null) {
......
......@@ -21,7 +21,6 @@ import jp.agentec.abook.abv.launcher.android.R;
public abstract class AbstractOperationAdapter extends BaseAdapter {
protected AbstractOperationListAdapterListener listener;
protected List<OperationDto> listItem = new ArrayList<>(); // NullPointException防止
protected Integer mOperationAuthLevel = ABVDataCache.getInstance().getMemberInfo().operationAuthLevel;
protected ContentDao mContentDao = AbstractDao.getDao(ContentDao.class);
public interface AbstractOperationListAdapterListener {
......
......@@ -11,7 +11,6 @@ import android.widget.TextView;
import java.util.ArrayList;
import java.util.List;
import jp.agentec.abook.abv.bl.acms.type.OperationAuthLevel;
import jp.agentec.abook.abv.bl.acms.type.OperationButtonType;
import jp.agentec.abook.abv.bl.acms.type.OperationType;
import jp.agentec.abook.abv.bl.common.Constant;
......
......@@ -10,7 +10,6 @@ import android.widget.TextView;
import java.util.List;
import jp.agentec.abook.abv.bl.acms.type.OperationAuthLevel;
import jp.agentec.abook.abv.bl.acms.type.OperationButtonType;
import jp.agentec.abook.abv.bl.acms.type.OperationType;
import jp.agentec.abook.abv.bl.common.Constant;
......
......@@ -73,17 +73,21 @@ public class ABookCheckWebViewHelper extends ABookHelper {
public void doABookCheckParam(ABVContentViewActivity context, String cmd, String taskKey, int enableReportHistory, Map<String, String> param, long operationId, String contentPath, long contentId, int reportType, Callback finishCallback, int taskReportLevel) throws IOException {
int taskReportSendId = 0;
mFinishCallback = finishCallback;
boolean isAddReport = false;
if (param.containsKey(ABookKeys.ADD_REPORT)) {
isAddReport = Integer.parseInt(param.get(ABookKeys.ADD_REPORT)) > 0 ? true : false;
}
switch (cmd) {
case ABookKeys.CMD_INSERT_TASK_REPORT:
insertOrUpdateTaskReport(taskKey, enableReportHistory, operationId, contentId, param, contentPath, true, reportType, taskReportLevel);
case ABookKeys.CMD_UPDATE_TASK_REPORT:
insertOrUpdateTaskReport(taskKey, enableReportHistory, operationId, contentId, param, contentPath, reportType, taskReportLevel, true);
copyTaskAttachedMovie(operationId, contentId, taskKey, taskReportLevel);
sendTaskData(context, operationId, taskKey, taskReportLevel);
break;
case ABookKeys.CMD_UPDATE_TASK_REPORT:
insertOrUpdateTaskReport(taskKey, enableReportHistory, operationId, contentId, param, contentPath, false, reportType, taskReportLevel);
case ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT:
insertOrUpdateTaskReport(taskKey, enableReportHistory, operationId, contentId, param, contentPath, reportType, taskReportLevel, false);
copyTaskAttachedMovie(operationId, contentId, taskKey, taskReportLevel);
sendTaskData(context, operationId, taskKey, taskReportLevel);
mFinishCallback.callback(true);
break;
case ABookKeys.CMD_DELETE_TASK_REPORT:
int taskReportId = 0;
......@@ -271,12 +275,11 @@ public class ABookCheckWebViewHelper extends ABookHelper {
* @param contentId
* @param param
* @param contentPath
* @param insertFlg
* @param reportType
* @param taskReportLevel
* @throws IOException
*/
private void insertOrUpdateTaskReport(String taskKey, int enableReportHistory, long operationId, long contentId, Map<String, String> param, String contentPath, boolean insertFlg, int reportType, int taskReportLevel) throws IOException {
private void insertOrUpdateTaskReport(String taskKey, int enableReportHistory, long operationId, long contentId, Map<String, String> param, String contentPath, int reportType, int taskReportLevel, boolean dataSendFlg) throws IOException {
int taskReportSendId = 0;
boolean attachedChangeFlag = param.get(ABookKeys.ATTACHED_CHANGE_FLAG).equals("1") ? true : false;
String taskReport = param.get(ABookKeys.TASK_REPORT);
......@@ -291,35 +294,39 @@ public class ABookCheckWebViewHelper extends ABookHelper {
TaskReportDto taskReportDto = mOperationLogic.getRoutineTaskReportUtc(taskKey, taskReportId, reportStartDate);
taskReportDto.jsonData = taskReport;
mOperationLogic.updateRoutineTaskReport(operationId, contentId, taskReportDto, attachedChangeFlag, true, true);
mOperationLogic.updateRoutineTaskReport(operationId, contentId, taskReportDto, attachedChangeFlag, true, insertFlg, true);
mOperationLogic.createJsonForOperationContent(operationId, contentPath, true);
copyRoutineTaskReportAttachedMovie(operationId, contentId, taskKey, taskReportId, reportStartDate);
} else {
if (taskReportLevel == Constant.TaskReportLevel.ReportType) {
String hotSpotInfo = param.get(ABookKeys.HOT_SPOT);
if (insertFlg) {
mOperationLogic.insertTaskReport(taskKey, operationId, contentId, Constant.EnableReport.YES, taskReportJson, hotSpotInfo, null, attachedChangeFlag, true);
TaskReportDto taskReportDto = mOperationLogic.getTaskReport(taskKey, taskReportLevel);
if (taskReportDto != null) {
// 更新
if (taskReportDto.taskReportLevel == Constant.TaskReportLevel.ReportType) {
mOperationLogic.updateTaskReport(taskKey, operationId, contentId, Constant.EnableReport.YES, taskReportJson, param.get(ABookKeys.HOT_SPOT), null, attachedChangeFlag, dataSendFlg);
} else {
mOperationLogic.updateTaskReport(taskKey, operationId, contentId, Constant.EnableReport.YES, taskReportJson, hotSpotInfo, null, attachedChangeFlag, true);
mOperationLogic.updateTaskReportReply(taskKey, operationId, contentId, Constant.EnableReport.YES, taskReportJson, null, attachedChangeFlag, dataSendFlg);
}
} else {
if (insertFlg) {
mOperationLogic.insertTaskReportReply(taskKey, operationId, contentId, Constant.EnableReport.YES, taskReportJson, null, attachedChangeFlag, true);
// 登録
if (taskReportLevel == Constant.TaskReportLevel.ReportType) {
mOperationLogic.insertTaskReport(taskKey, operationId, contentId, Constant.EnableReport.YES, taskReportJson, param.get(ABookKeys.HOT_SPOT), null, attachedChangeFlag, dataSendFlg);
} else {
mOperationLogic.updateTaskReportReply(taskKey, operationId, contentId, Constant.EnableReport.YES, taskReportJson, null, attachedChangeFlag, true);
mOperationLogic.insertTaskReportReply(taskKey, operationId, contentId, Constant.EnableReport.YES, taskReportJson, null, attachedChangeFlag, dataSendFlg);
}
}
mOperationLogic.createJsonForOperationContent(operationId, contentPath, false);
copyTaskAttachedMovie(operationId, contentId, taskKey, taskReportLevel);
}
if (dataSendFlg) {
if (enableReportHistory == Constant.EnableReportHistory.Invalid) {
//データ無い場合は中でinsertされる
taskReportSendId = mOperationLogic.updateTaskReportSend(taskKey, taskReportId, reportStartDate, taskReportJson, false);
} else {
taskReportSendId = mOperationLogic.insertTaskReportSend(taskKey, taskReportId, reportStartDate, taskReportJson, false);
}
}
// #32926 作業報告画面改善 start
copyReportTaskSendFiles(operationId, taskKey, taskReportSendId, reportType == Constant.ReportType.Routine, taskReportId, reportStartDate, taskReportLevel);
......@@ -348,7 +355,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
/**
* 定期点検
* /.../files/ABook/project/{projectId}/{taskKey}/report/{taskReportId}/{reportStartDate}/*.(mov,mp4)を
* /.../files/ABook/operation/{operationId}/{taskKey}/report/{taskReportId}/{reportStartDate}/*.(mov,mp4)を
* /.../cache/{contentId}/attachedMovie/{taskKey}/report/{taskReportId}/{reportStartDate}/*.(mov,mp4)にコピー
* @param operationId
* @param contentId
......@@ -384,7 +391,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
}
/**
* /.../files/ABook/project/{projectId}/{taskKey}/{taskType}/{taskReportLevel}/*.(mov,mp4)を
* /.../files/ABook/operation/{operationId}/{taskKey}/{taskType}/{taskReportLevel}/*.(mov,mp4)を
* /.../cache/{contentId}/attachedMovie/{taskKey}/{taskType}/{taskReportLevel}/*.(mov,mp4)にコピー
*
* @param operationId
......
......@@ -96,7 +96,7 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
boolean isUpdate = intent.getBooleanExtra("isUpdate", false);
final String url = intent.getStringExtra("LINKURL"); // LinkURL
mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1); // ProjectId
mOperationId = intent.getLongExtra(ABookKeys.OPERATION_ID, -1); // OperationId
// ***** WebViewセット
......
......@@ -51,13 +51,13 @@ public class PageView extends ImageView {
protected GestureDetector mGestureDetector;
protected ScaleGestureDetector mScaleDetector = null;
private boolean isProjectPdf;
private boolean isOperationPdf;
public PageView(Context context) {
super(context);
}
public PageView(Context context, Size pageSize, int pageNumber, int displayWidth, int displayHeight, RelativeLayout pageLayout, boolean isProjectPdf) {
public PageView(Context context, Size pageSize, int pageNumber, int displayWidth, int displayHeight, RelativeLayout pageLayout, boolean isOperationPdf) {
super(context);
Logger.i(TAG, "[PageView]: page=" + pageNumber);
......@@ -71,9 +71,9 @@ public class PageView extends ImageView {
mGestureDetector = new GestureDetector(context, mGestureListener);
this.isProjectPdf = isProjectPdf;
this.isOperationPdf = isOperationPdf;
// ABook Check : doubletap = 新作業指示
if (!isProjectPdf) {
if (!isOperationPdf) {
mGestureDetector.setOnDoubleTapListener(mDoubleTapListener);
}
mScaleDetector = new ScaleGestureDetector(context, onScaleGestureListener);
......
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