Commit dd7a2c6b by Jung Kwangkyu

Merge branch 'features/1.4.100_develop_mk' into 'features/1.4.202'

工程管理不具合修正

See merge request !245
parents 257f293c 5d28fbd0
......@@ -68,8 +68,9 @@ public class OperationDataJSON extends AcmsCommonJSON {
if (taskJson.has(TaskStatus)) {
dto.taskStatus = taskJson.getInt(TaskStatus);
}
dto.taskHotSpotInfo = taskJson.getJSONObject(TaskHotspotInfo).toString();
if (taskJson.has(TaskHotspotInfo)) {
dto.taskHotSpotInfo = taskJson.getJSONObject(TaskHotspotInfo).toString();
}
if (taskJson.has(TaskStatus)) {
dto.taskStatus = taskJson.getInt(TaskStatus);
}
......
......@@ -1025,6 +1025,8 @@ public class OperationLogic extends AbstractLogic {
try {
OperationDto operationDto = mOperationDao.getOperation(operationId);
if (operationDto.reportType == Constant.ReportType.ReportContinuous) {
contentPath = contentPath.replaceAll("panoImage","processList");
contentPath = contentPath.replaceAll("taskPdf","processList");
createContinuousTaskReportJson(operationId);
createContinuousTaskReportSuggestJson(operationId);
createProcessInfoJson(operationId, contentPath);
......@@ -1160,6 +1162,7 @@ public class OperationLogic extends AbstractLogic {
OperationDto operation = mOperationDao.getOperation(operationId);
if (operation.reportType == Constant.ReportType.ReportContinuous) {
contentPath = contentPath.replaceAll("panoImage","processList");
contentPath = contentPath.replaceAll("taskPdf","processList");
}
for (TaskDto dto : taskDtoList) {
if (!StringUtil.isNullOrEmpty(dto.taskHotSpotInfo)) {
......@@ -1221,6 +1224,7 @@ public class OperationLogic extends AbstractLogic {
OperationDto operation = mOperationDao.getOperation(operationId);
if (operation.operationType == PANO || operation.operationType == DRAWING) {
contentPath = contentPath.replaceAll("panoImage","processList");
contentPath = contentPath.replaceAll("taskPdf","processList");
}
FileUtil.createFile(contentPath + "/phaseStatus.json", phaseStatusJson.toString());
}
......@@ -1247,6 +1251,7 @@ public class OperationLogic extends AbstractLogic {
OperationDto operation = mOperationDao.getOperation(operationId);
if (operation.operationType == PANO || operation.operationType == DRAWING) {
contentPath = contentPath.replaceAll("panoImage","processList");
contentPath = contentPath.replaceAll("taskPdf","processList");
}
Logger.d(TAG, "createProcessInfoJson : " + processInfoJson.toString());
FileUtil.createFile(contentPath + "/processInfo.json", processInfoJson.toString());
......
Subproject commit 535f7af15eef6ec47c49b3fe79665e53e6113ead
Subproject commit 4313eb5084533edc7b622189bb928a4724c5bf29
......@@ -1902,7 +1902,7 @@ public class OperationListActivity extends ABVUIActivity {
public void run() {
try {
createJsonForOperationList(getCacheDir().getAbsolutePath());
mCheckWebView.loadUrl("javascript:CHK.initReportApp();");
mCheckWebView.loadUrl("javascript:CHK.initOperationList();");
} catch (Exception e) {
Logger.d("Update error");
}
......
......@@ -5210,8 +5210,14 @@ public class ContentViewActivity extends ABVContentViewActivity {
private void getTaskHotspotJSON() {
try {
String contentPath = ABVEnvironment.getInstance().getTaskPdfDirName(ContentFileExtractor.getInstance().getContentCacheDirWithExtract(operationDto.contentId));
String hotspots = FileUtil.readTextFile(contentPath + "/" + ABookKeys.TASK_HOTSPOT + ".json");
mTaskHotspotJSON = new TaskHotspotJSON(hotspots);
if (operationDto.reportType == Constant.ReportType.ReportContinuous) {
contentPath = contentPath.replaceAll("panoImage","processList");
contentPath = contentPath.replaceAll("taskPdf","processList");
}
String hotspots = FileUtil.readTextFile(contentPath + "/" + ABookKeys.TASK_HOTSPOT + ".json");
if (hotspots != null) {
mTaskHotspotJSON = new TaskHotspotJSON(hotspots);
}
} catch (IOException e) {
Logger.e(TAG, "read taskHotspot.json failed.", e);
initError();
......@@ -5388,10 +5394,11 @@ public class ContentViewActivity extends ABVContentViewActivity {
case ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT: // 一時保存
if (taskReportLevel == Constant.TaskReportLevel.ReportType) {
JSONObject hotspot = new JSONObject(checkParam.get(ABookKeys.HOT_SPOT));
taskCode = hotspot.getString(ABookKeys.TASK_CODE);
JSONObject hotspot = null;
if (checkParam.get(ABookKeys.HOT_SPOT) != null) {
hotspot = new JSONObject(checkParam.get(ABookKeys.HOT_SPOT));
taskCode = hotspot.getString(ABookKeys.TASK_CODE);
}
operationTaskLayout.setIconStatus(taskKey, true);
operationTaskLayout.currentTaskDto.taskKey = taskKey;
operationTaskLayout.currentTaskDto.taskCode = taskCode;
......
......@@ -51,6 +51,7 @@ public class OperationTaskLayout extends RelativeLayout {
private static final String TEMP_TASK_KEY = "00000000-0000-0000-0000-000000000000";
private static final String SCRIPT_SHOW_TASK_LIST = "javascript:CHK_P.updateTaskListForApp(%d)";//CHK.updateTaskListForApp(pageNum)
private static final String SCRIPT_SHOW_TASK_REPORT = "javascript:CHK.showReportForm('%s')";//CHK.showTaskReportForm(name, taskKey, lookto)
private static final String SCRIPT_BEFORE_SHOW_TASK_REPORT = "javascript:CHK.beforeShowReportForm('%s')";//CHK.beforeShowReportForm(name, taskKey, lookto)
private static final int ICON_WIDTH = 32;
private static final int ICON_HEIGHT = 32;
......@@ -335,7 +336,7 @@ public class OperationTaskLayout extends RelativeLayout {
final String script;
script = String.format(SCRIPT_SHOW_TASK_REPORT, operationTaskDto.taskKey.equals(TEMP_TASK_KEY) ? "" : operationTaskDto.taskKey);
script = String.format(SCRIPT_BEFORE_SHOW_TASK_REPORT, operationTaskDto.taskKey.equals(TEMP_TASK_KEY) ? "" : operationTaskDto.taskKey);
runOnUiThread(new Runnable() {
@Override
......
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