Commit d17f9d1c by Lee Jaebin

#32825 作業一覧画面改善

parent 7b1a7fd9
......@@ -59,8 +59,12 @@ public class OperationDataJSON extends AcmsCommonJSON {
dto.operationId = taskJson.getLong(OperationId);
dto.taskId = taskJson.getLong(TaskId);
dto.taskKey = taskJson.getString(TaskKey);
dto.taskCode = taskJson.getString(TaskCode);
dto.taskStatus = taskJson.getInt(TaskStatus);
if (taskJson.has(TaskCode)) {
dto.taskCode = taskJson.getString(TaskCode);
}
if (taskJson.has(TaskStatus)) {
dto.taskStatus = taskJson.getInt(TaskStatus);
}
dto.taskHotSpotInfo = taskJson.getJSONObject(TaskHotspotInfo).toString();
......@@ -79,6 +83,11 @@ public class OperationDataJSON extends AcmsCommonJSON {
taskReportDto.enableReport = taskReportJson.getInt(EnableReport);
}
if (taskJson.has(TaskReportId)) {
// taskListの中にtaskReportIdキーが存在
taskReportDto.taskReportId = taskJson.getInt(TaskReportId);
}
if (taskReportJson.has(TaskReportInfoId)) {
// 定期点検の場合
taskReportDto.taskReportInfoId = taskReportJson.getInt(TaskReportInfoId);
......@@ -97,10 +106,14 @@ public class OperationDataJSON extends AcmsCommonJSON {
if (taskReportJson.has(TaskReportInfo)) {
Object object = taskReportJson.get(TaskReportInfo);
if (object instanceof String) {
taskReportDto.jsonData = null;
taskReportDto.jsonData = (String)object;
} else if (object instanceof JSONObject) {
taskReportDto.jsonData = object.toString();
} else {
taskReportDto.jsonData = taskReportJson.getJSONObject(TaskReportInfo).toString();
taskReportDto.jsonData = "";
}
} else {
taskReportDto.jsonData = "";
}
dto.taskReportDtoList.add(taskReportDto);
}
......
......@@ -104,11 +104,11 @@ public class MemberInfoDao extends AbstractDao {
}
public void insertMemberInfo(MemberInfoDto dto) {
insert("insert into m_member_info (login_id, password, member_name, sid, login_status, invalid_password_count, last_login_date, last_change_password_date, last_cms_access_date, user_id, last_update_infor, operation_auth_level, worker_code) values (?,?,?,?,?,?,?,?,?,?,?,?,?)", dto.getInsertValues());
insert("insert into m_member_info (login_id, password, member_name, sid, login_status, invalid_password_count, last_login_date, last_change_password_date, last_cms_access_date, user_id, last_update_infor, worker_code) values (?,?,?,?,?,?,?,?,?,?,?,?)", dto.getInsertValues());
}
public boolean updateMemberInfo(MemberInfoDto dto) {
long count = update("update m_member_info set password=?, member_name=?, sid=?, login_status=?, invalid_password_count=?, last_login_date=?, last_change_password_date=?, last_cms_access_date=?, last_update_infor = ?, operation_auth_level = ?, worker_code = ? where login_id=?", dto.getUpdateValues());
long count = update("update m_member_info set password=?, member_name=?, sid=?, login_status=?, invalid_password_count=?, last_login_date=?, last_change_password_date=?, last_cms_access_date=?, last_update_infor = ?, worker_code = ? where login_id=?", dto.getUpdateValues());
return count > 0;
}
......
......@@ -23,7 +23,7 @@ public class TTaskReport extends SQLiteTableScript {
sql.append(" CREATE TABLE t_task_report ( ");
sql.append(" task_key TEXT NOT NULL ");
sql.append(" , json_data TEXT NOT NULL ");
sql.append(" , json_data TEXT NOT NULL");
sql.append(" , attached_file_name TEXT ");
sql.append(" , local_attached_file_name TEXT ");
sql.append(" , attached_file_send_flg BOOLEAN DEFAULT 0 ");
......
......@@ -259,24 +259,24 @@ public class OperationLogic extends AbstractLogic {
TaskDto taskDto = new TaskDto();
TaskReportDto taskReportDto = new TaskReportDto();
JSONObject taskJson = taskDirectionsJson.getJSONObject("task");
JSONObject suggestJson = taskDirectionsJson.getJSONObject("suggest");
taskDto.taskKey = taskKey;
taskDto.operationId = operationId;
taskDto.taskHotSpotInfo = hotSpotInfo;
Iterator taskKeys = taskJson.keys();
Iterator taskKeys = suggestJson.keys();
while (taskKeys.hasNext()) {
TaskReportItemsDto taskReportItemsDto = new TaskReportItemsDto();
String itemKey = (String) taskKeys.next();
if (itemKey.startsWith("q_1_")) {
taskDto.taskCode = taskJson.getString(itemKey);
taskDto.taskCode = suggestJson.getString(itemKey);
}
taskReportItemsDto.taskKey = taskKey;
taskReportItemsDto.itemKey = itemKey;
taskReportItemsDto.taskReportLevel = Constant.TaskReportLevel.ReportType;
try {
taskReportItemsDto.inputValue = taskJson.getString(itemKey);
taskReportItemsDto.inputValue = suggestJson.getString(itemKey);
} catch (JSONException e) {
// 値がStringではない場合、無視する
continue;
......@@ -341,13 +341,12 @@ public class OperationLogic extends AbstractLogic {
TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey, Constant.TaskReportLevel.ReportType);
taskDto.operationId = operationId;
taskDto.taskHotSpotInfo = hotSpotInfo;
JSONObject taskJson = taskReportJson.getJSONObject("task");
JSONObject suggestJson = taskReportJson.getJSONObject("suggest");
Iterator taskKeys = taskJson.keys();
List<TaskReportItemsDto> taskReportItemsDtoList = mTaskReportItemsDao.getTaskReportItemByTaskKey(taskKey, Constant.TaskReportLevel.ReportType);
for (TaskReportItemsDto taskReportItemsDto : taskReportItemsDtoList) {
try {
String newValue = taskJson.getString(taskReportItemsDto.itemKey);
String newValue = suggestJson.getString(taskReportItemsDto.itemKey);
if (!newValue.equals(taskReportItemsDto.inputValue)) {
// 値が異なる場合のみ、更新する
taskReportItemsDto.inputValue = newValue;
......@@ -448,19 +447,19 @@ public class OperationLogic extends AbstractLogic {
TaskReportDto taskReportDto = new TaskReportDto();
// taskReportJsonがnullではない場合のみ以下の処理を行う
if (taskReportJson != null) {
JSONObject taskJson = taskReportJson.getJSONObject("task");
JSONObject suggestJson = taskReportJson.getJSONObject("suggest");
Iterator taskKeys = taskJson.keys();
Iterator taskKeys = suggestJson.keys();
while (taskKeys.hasNext()) {
TaskReportItemsDto taskReportItemsDto = new TaskReportItemsDto();
String itemKey = (String) taskKeys.next();
if (itemKey.startsWith("q_3_")) {
taskDto.taskStatus = taskJson.getInt(itemKey);
taskDto.taskStatus = suggestJson.getInt(itemKey);
}
taskReportItemsDto.taskKey = taskKey;
taskReportItemsDto.itemKey = itemKey;
try {
taskReportItemsDto.inputValue = taskJson.getString(itemKey);
taskReportItemsDto.inputValue = suggestJson.getString(itemKey);
} catch (JSONException e) {
// 値がStringではない場合、無視する
continue;
......@@ -566,12 +565,12 @@ public class OperationLogic extends AbstractLogic {
// #32926 作業報告画面改善 end
return;
}
JSONObject taskJson = taskReport.getJSONObject("task");
JSONObject suggestJson = taskReport.getJSONObject("suggest");
TaskDto taskDto = mTaskDao.getTaskByTaskKey(taskKey);
List<TaskReportItemsDto> taskReportItemsDaoList = mTaskReportItemsDao.getTaskReportItemByTaskKey(taskKey, Constant.TaskReportLevel.ReportReplyType);
for (TaskReportItemsDto taskReportItemsDto : taskReportItemsDaoList) {
try {
String newValue = taskJson.getString(taskReportItemsDto.itemKey);
String newValue = suggestJson.getString(taskReportItemsDto.itemKey);
if (!newValue.equals(taskReportItemsDto.inputValue)) {
// 値が異なる場合のみ、更新する
taskReportItemsDto.inputValue = newValue;
......@@ -1111,7 +1110,7 @@ public class OperationLogic extends AbstractLogic {
List<JSONObject> taskReportInfoList = new ArrayList<JSONObject>();
if (!StringUtil.isNullOrEmpty(dto.jsonData)) {
taskReportInfoList.add(new JSONObject(dto.jsonData).put(ABookKeys.HAS_AUTHORITY, dto.enableReport));
taskReportInfoList.add(new JSONObject(dto.jsonData));
}
taskReportJsonRow.put(ABookKeys.TASK_REPORT_INFO, taskReportInfoList);
taskReportJsonList.add(taskReportJsonRow);
......
......@@ -82,10 +82,10 @@
<color name="operation_date">#37648C</color>
<color name="operation_color">#095395</color>
<color name="operation_disable_color">#CCCCCC</color>
<color name="operation_search_background">#FFFFFF</color>
<color name="operation_search_header">#CCCCCC</color>
<color name="operation_search_button_color">#0068CB</color>
<color name="operation_search_label_color">#555555</color>
<color name="operation_related_content_new_mark">#ff0000</color>
<color name="operation_bg">#FFFFFF</color>
</resources>
\ No newline at end of file
......@@ -68,6 +68,9 @@
<style name="content_list_bg">
<item name="android:background">@color/background</item>
</style>
<style name="operation_list_bg">
<item name="android:background">@color/operation_bg</item>
</style>
<style name="Theme.MyTheme.ModalDialog" parent="@android:style/Theme.Dialog">
<item name="android:windowCloseOnTouchOutside">false</item>
......
......@@ -120,7 +120,7 @@
<FrameLayout
android:id="@+id/operation_list_layout"
style="@style/content_list_bg"
style="@style/operation_list_bg"
android:layout_width="match_parent"
android:layout_height="match_parent" />
......
......@@ -6,109 +6,88 @@
android:descendantFocusability="blocksDescendants"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="30dp"
android:orientation="vertical">
android:orientation="horizontal">
<TextView
android:id="@+id/operation_date"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/dummy_date"
android:textColor="@color/operation_date"
android:textSize="@dimen/operation_normal_text_size" />
android:layout_height="match_parent"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dp"
android:gravity="left"
android:orientation="horizontal">
<TextView
android:id="@+id/operation_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/dummy_str"
android:textColor="@color/operation_name"
android:textSize="@dimen/app_large_text_size"
android:textStyle="bold"
android:visibility="visible" />
<ImageButton
android:id="@+id/operation_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:background="@drawable/btn_pano_edit" />
</LinearLayout>
<ImageButton
android:id="@+id/operation_report_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_information_update" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="30dp"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal"
android:layout_gravity="bottom">
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/description"
android:id="@+id/operation_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/operation_description"
android:textSize="@dimen/operation_normal_text_size"/>
android:layout_marginTop="5dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/dummy_str"
android:textColor="@color/operation_name"
android:textSize="@dimen/app_large_text_size"
android:textStyle="bold"
android:visibility="visible" />
<TextView
android:id="@+id/operation_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/dummy_date"
android:textColor="@color/operation_date"
android:textSize="@dimen/operation_normal_text_size" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_margin="3dp"
android:gravity="right"
android:layout_marginLeft="30dp"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/layout_pano_edit"
<ImageButton
android:id="@+id/btn_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:orientation="vertical"
android:visibility="invisible">
android:background="@drawable/btn_pano_edit"
android:visibility="invisible" />
<ImageView
android:id="@+id/btn_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_pano_edit" />
<TextView
android:id="@+id/txt_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/ProjectIconText"
android:text="@string/pano_edit" />
</LinearLayout>
<LinearLayout
<ImageButton
android:id="@+id/btn_information_update"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:orientation="vertical">
<ImageButton
android:id="@+id/btn_information_update"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_information_update"/>
android:background="@drawable/btn_information_update" />
<TextView
android:id="@+id/txt_information_update"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/ProjectIconText"
android:text="@string/information_update" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
......@@ -45,70 +45,25 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="4"
android:textColor="@color/operation_description"
android:textSize="@dimen/operation_normal_text_size" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_margin="3dp"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/layout_pano_edit"
<ImageView
android:id="@+id/btn_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:orientation="vertical"
android:visibility="invisible">
<ImageView
android:id="@+id/btn_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_pano_edit" />
android:layout_weight="1"
android:background="@drawable/btn_pano_edit" />
<TextView
android:id="@+id/txt_pano_edit"
style="@style/ProjectIconText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pano_edit" />
</LinearLayout>
<LinearLayout
<ImageButton
android:id="@+id/btn_information_update"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:orientation="vertical">
<ImageButton
android:id="@+id/btn_information_update"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_information_update" />
<TextView
android:id="@+id/txt_information_update"
style="@style/ProjectIconText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/information_update" />
</LinearLayout>
android:layout_weight="1"
android:background="@drawable/btn_information_update" />
</LinearLayout>
</LinearLayout>
......
......@@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="300dp"
android:minHeight="200dp"
android:background="@color/operation_search_background"
android:background="@color/operation_bg"
android:orientation="vertical">
<RelativeLayout
......
......@@ -10,157 +10,106 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_margin="10dp"
android:background="@drawable/panel_frame"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="horizontal">
android:layout_height="match_parent">
<TextView
android:id="@+id/operation_name"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/dummy_str"
android:textColor="@color/operation_name"
android:textSize="@dimen/app_large_text_size"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp">
android:layout_height="match_parent"
android:padding="5dp">
<RelativeLayout
android:id="@+id/content_thumbnail_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:layout_gravity="center">
<ImageButton
android:id="@+id/operation_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_information_update" />
<ImageButton
android:id="@+id/btn_information_update1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:background="@drawable/btn_information_update" />
</RelativeLayout>
<ImageButton
android:id="@+id/operation_report_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="@drawable/btn_information_update" />
</LinearLayout>
<LinearLayout
android:id="@+id/operation_date_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:layout_weight="1"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_toRightOf="@+id/content_thumbnail_layout"
android:background="#dce6e6"
android:orientation="vertical"
android:padding="3dp"
android:paddingBottom="10dp">
android:padding="5dp"
android:gravity="right"
android:orientation="horizontal">
<TextView
android:id="@+id/operation_date"
<ImageButton
android:id="@+id/btn_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/dummy_date"
android:textColor="@color/operation_date"
android:textSize="@dimen/operation_normal_text_size" />
android:visibility="invisible"
android:background="@drawable/btn_pano_edit" />
<ImageButton
android:id="@+id/btn_information_update"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:background="@drawable/btn_information_update" />
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/view3"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_weight="1"
android:background="@color/line_side" />
<LinearLayout
android:id="@+id/button_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/operation_border"
android:orientation="horizontal"
android:padding="5dp"
android:visibility="visible">
<LinearLayout
android:id="@+id/edit_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal"
android:padding="5dp"
android:visibility="visible">
<LinearLayout
android:id="@+id/layout_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:orientation="vertical"
android:visibility="visible">
<ImageView
android:id="@+id/btn_pano_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_pano_edit" />
<TextView
android:id="@+id/txt_pano_edit"
style="@style/ProjectIconText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pano_edit" />
</LinearLayout>
</LinearLayout>
android:gravity="center_vertical"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/update_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal"
android:padding="5dp"
android:visibility="visible">
<TextView
android:id="@+id/operation_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:ellipsize="end"
android:maxLines="2"
android:text="@string/dummy_str"
android:textColor="@color/operation_name"
android:textSize="@dimen/app_large_text_size"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:orientation="vertical">
<LinearLayout
android:id="@+id/operation_date_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
android:orientation="vertical"
android:padding="3dp"
android:paddingBottom="10dp">
<ImageButton
android:id="@+id/btn_information_update"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_information_update" />
<TextView
android:id="@+id/operation_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/dummy_date"
android:textColor="@color/operation_date"
android:textSize="@dimen/operation_normal_text_size" />
<TextView
android:id="@+id/txt_information_update"
style="@style/ProjectIconText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/information_update" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
......@@ -4,7 +4,7 @@
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/operation_search_background"
android:background="@color/operation_bg"
android:orientation="vertical"
android:weightSum="1">
......
......@@ -3,7 +3,7 @@
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/operation_search_background"
android:background="@color/operation_bg"
android:minWidth="500dp"
android:orientation="vertical">
......
......@@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="420dp"
android:minHeight="300dp"
android:background="@color/operation_search_background"
android:background="@color/operation_bg"
android:orientation="vertical">
<RelativeLayout
......
......@@ -3,7 +3,7 @@
android:layout_width="match_parent"
android:layout_height="420dp"
android:minHeight="300dp"
android:background="@color/operation_search_background"
android:background="@color/operation_bg"
android:orientation="vertical">
<RelativeLayout
......
......@@ -3,7 +3,7 @@
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="420dp"
android:background="@color/operation_search_background"
android:background="@color/operation_bg"
android:minWidth="500dp"
android:orientation="vertical">
......
......@@ -875,7 +875,6 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
if (StringUtil.equalsAny(mCmd, 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;
try {
if (StringUtil.equalsAny(mCmd, ABookKeys.CMD_INSERT_TASK_REPORT, ABookKeys.CMD_UPDATE_TASK_REPORT)) {
......@@ -921,12 +920,17 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
public Object callback(Object ret) {
final boolean isError = (boolean)ret;
closeProgressPopup();
if (mAddReport) {
if (StringUtil.equalsAny(mCmd,
ABookKeys.CMD_INSERT_TASK_REPORT,
ABookKeys.CMD_UPDATE_TASK_REPORT,
ABookKeys.CMD_DELETE_TASK_REPORT,
ABookKeys.CMD_CANCEL_TASK_REPORT) && !mAddReport && !isError) {
finish();
} else {
// #32861 作業情報追加 start
afterABookCheckApi(mCmd, mTaskKey, isNetWorkError(isError), "", null, isOperationPdf());
afterABookCheckApi(mCmd, mTaskKey, 0, "", null, isOperationPdf());
// #32861 作業情報追加 end
} else {
finish();
}
return null;
}
......@@ -934,8 +938,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
ABookCheckWebViewHelper.getInstance().doABookCheckParam(ABVContentViewActivity.this,
mCmd, mTaskKey, mEnableReportHistory, abookCheckParam, mOperationId, mContentPath, getContentId(),
operationDto.reportType, finishCallback,
taskReportLevel);
operationDto.reportType, finishCallback, taskReportLevel);
} catch(Exception e) {
Logger.e(TAG, "doABookCheckParam error", e);
......@@ -1096,9 +1099,7 @@ public abstract class ABVContentViewActivity extends ABVAuthenticatedActivity {
Logger.i(TAG, String.format("javascript:%sCHK.afterABookCheckApi('%s', '%s', '%s', '%s')", finalParent, cmd, taskKey, result, message));
webViewLoadUrl(String.format("javascript:%sCHK.afterABookCheckApi('%s', '%s', '%s', '%s')", finalParent, cmd, taskKey, result, message));
}
// #32861 作業情報追加 start
doneProcess(result); // HTML側の処理が終わった後の処理を行う
// #32861 作業情報追加 end
}
});
}
......
......@@ -331,7 +331,7 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
isNeedCheck = true;
}
}
if (isNeedCheck) {
final ABVDataCache dataCache = ABVDataCache.getInstance();
final ABVEnvironment abvEnvironment = ABVEnvironment.getInstance();
......
......@@ -867,15 +867,11 @@ public class OperationListActivity extends ABVUIActivity {
if (isSyncGetTaskFileError) {
return null;
}
if (isExistsTaskReportInList(localTaskReportList, taskReportDto, true)) {
if (localTaskReportList.size() > 0 && isExistsTaskReportInList(localTaskReportList, taskReportDto, true)) {
// 報告データが存在すると作業報告を更新する
if (taskReportDto.jsonData != null) {
mOperationLogic.updateRoutineTaskReport(serverTaskDto.operationId, operationContentDto.contentId, taskReportDto, false, false, false);
}
mOperationLogic.updateRoutineTaskReport(serverTaskDto.operationId, operationContentDto.contentId, taskReportDto, false, false, false);
} else {
if (taskReportDto.jsonData != null) {
mOperationLogic.insertRoutineTaskReport(serverTaskDto.operationId, operationContentDto.contentId, taskReportDto, false, false);
}
mOperationLogic.insertRoutineTaskReport(serverTaskDto.operationId, operationContentDto.contentId, taskReportDto, false, false);
}
}
......
......@@ -67,16 +67,12 @@ public class OperationListAdapter extends AbstractOperationAdapter {
holder = new ViewHolder();
holder.tvOperationName = (TextView) convertView.findViewById(R.id.operation_name);
holder.tvDate = (TextView) convertView.findViewById(R.id.operation_date);
holder.tvDescription = (TextView) convertView.findViewById(R.id.description);
// 360編集関連
holder.lyPanoEditLayout = (LinearLayout) convertView.findViewById(R.id.layout_pano_edit);
holder.ivPanoEdit = (ImageView) convertView.findViewById(R.id.btn_pano_edit);
holder.tvPanoEditText = (TextView) convertView.findViewById(R.id.txt_pano_edit);
// 情報更新関連
holder.ivInformationUpdate = (ImageView) convertView.findViewById(R.id.btn_information_update);
holder.tvInformationUpdateText = (TextView) convertView.findViewById(R.id.txt_information_update);
convertView.setTag(holder);
} else {
......@@ -97,7 +93,6 @@ public class OperationListAdapter extends AbstractOperationAdapter {
} else {
holder.tvDate.setText(mContext.getString(R.string.date_label) + " : " + DateTimeUtil.toString(operationDto.operationStartDate, DateTimeFormat.yyyyMMdd_slash) + " ~ " + DateTimeUtil.toString(operationDto.operationEndDate, DateTimeFormat.yyyyMMdd_slash));
}
holder.tvDescription.setText(operationDto.operationDescriptions);
// 同期ボタン表示・非表示
if (operationDto.contentId != null && operationDto.contentId != 0) {
......@@ -127,7 +122,7 @@ public class OperationListAdapter extends AbstractOperationAdapter {
if(operationDto.operationType == OperationType.PANO) {
// 360タイプのみ360編集ボタン表示
holder.lyPanoEditLayout.setVisibility(View.VISIBLE);
holder.ivPanoEdit.setVisibility(View.VISIBLE);
if (operationDto.contentCreatingFlg) { //Panoコンテンツ作成中の状態
setButtonEnabled(holder, OperationButtonType.PANO_EDIT, false);
setButtonEnabled(holder, OperationButtonType.INFORMATION_UPDATE, false);
......@@ -139,11 +134,11 @@ public class OperationListAdapter extends AbstractOperationAdapter {
}
}
} else {
holder.lyPanoEditLayout.setVisibility(View.INVISIBLE);
holder.ivPanoEdit.setVisibility(View.INVISIBLE);
}
if(operationDto.enableReportEdit == Constant.EnableReportEdit.NO) {
holder.lyPanoEditLayout.setVisibility(View.GONE);
holder.ivPanoEdit.setVisibility(View.GONE);
}
holder.ivPanoEdit.setOnClickListener(new View.OnClickListener() {
......@@ -167,15 +162,11 @@ public class OperationListAdapter extends AbstractOperationAdapter {
private static class ViewHolder {
TextView tvOperationName;
TextView tvDate;
TextView tvDescription;
// 360編集関連
LinearLayout lyPanoEditLayout;
ImageView ivPanoEdit;
TextView tvPanoEditText;
// 情報更新関連
ImageView ivInformationUpdate;
TextView tvInformationUpdateText;
}
/**
......@@ -188,11 +179,9 @@ public class OperationListAdapter extends AbstractOperationAdapter {
switch (buttonType) {
case OperationButtonType.PANO_EDIT :
holder.ivPanoEdit.setEnabled(isEnabled);
holder.tvPanoEditText.setTextColor(mContext.getResources().getColor(isEnabled ? R.color.operation_color : R.color.operation_disable_color));
break;
case OperationButtonType.INFORMATION_UPDATE:
holder.ivInformationUpdate.setEnabled(isEnabled);
holder.tvInformationUpdateText.setTextColor(mContext.getResources().getColor(isEnabled ? R.color.operation_color : R.color.operation_disable_color));
break;
}
}
......
......@@ -70,7 +70,7 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
@Override
public long getItemId(int position) {
return listItem.get(position).contentId;
return listItem.get(position).operationId;
}
public List<OperationDto> getListItem() {
......@@ -82,13 +82,10 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
TextView tvDate;
TextView tvDescription;
// 360編集関連
LinearLayout lyPanoEditLayout;
ImageView ivPanoEdit;
TextView tvPanoEditText;
// 情報更新関連
ImageView ivInformationUpdate;
TextView tvInformationUpdateText;
}
@Override
......@@ -99,16 +96,12 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
holder = new OperationPanelAdapter.ViewHolder();
holder.tvOperationName = (TextView) convertView.findViewById(R.id.operation_name);
holder.tvDate = (TextView) convertView.findViewById(R.id.operation_date);
// holder.tvDescription = (TextView) convertView.findViewById(R.id.description);
// 360編集関連
holder.lyPanoEditLayout = (LinearLayout) convertView.findViewById(R.id.layout_pano_edit);
holder.ivPanoEdit = (ImageView) convertView.findViewById(R.id.btn_pano_edit);
holder.tvPanoEditText = (TextView) convertView.findViewById(R.id.txt_pano_edit);
// 情報更新関連
holder.ivInformationUpdate = (ImageView) convertView.findViewById(R.id.btn_information_update);
holder.tvInformationUpdateText = (TextView) convertView.findViewById(R.id.txt_information_update);
convertView.setTag(holder);
} else {
......@@ -158,7 +151,7 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
if(operationDto.operationType == OperationType.PANO) {
// 360タイプのみ360編集ボタン表示
holder.lyPanoEditLayout.setVisibility(View.VISIBLE);
holder.ivPanoEdit.setVisibility(View.VISIBLE);
if (operationDto.contentCreatingFlg) { //Panoコンテンツ作成中の状態
setButtonEnabled(holder, OperationButtonType.PANO_EDIT, false);
setButtonEnabled(holder, OperationButtonType.INFORMATION_UPDATE, false);
......@@ -170,13 +163,9 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
}
}
} else {
holder.lyPanoEditLayout.setVisibility(View.INVISIBLE);
holder.ivPanoEdit.setVisibility(View.INVISIBLE);
}
// if(mOperationAuthLevel.equals(OperationAuthLevel.WORKER)) {
holder.lyPanoEditLayout.setVisibility(View.GONE);
// }
holder.ivPanoEdit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
......@@ -199,11 +188,9 @@ public class OperationPanelAdapter extends AbstractOperationAdapter {
switch (buttonType) {
case OperationButtonType.PANO_EDIT :
holder.ivPanoEdit.setEnabled(isEnabled);
holder.tvPanoEditText.setTextColor(mContext.getResources().getColor(isEnabled ? R.color.operation_color : R.color.operation_disable_color));
break;
case OperationButtonType.INFORMATION_UPDATE:
holder.ivInformationUpdate.setEnabled(isEnabled);
holder.tvInformationUpdateText.setTextColor(mContext.getResources().getColor(isEnabled ? R.color.operation_color : R.color.operation_disable_color));
break;
}
}
......
......@@ -7,6 +7,7 @@ import android.graphics.Matrix;
import android.media.ExifInterface;
import android.os.AsyncTask;
import android.util.Base64;
import android.widget.Toast;
import org.json.adf.JSONObject;
......@@ -33,6 +34,7 @@ import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic;
import jp.agentec.abook.abv.launcher.android.R;
import jp.agentec.abook.abv.ui.common.activity.ABVContentViewActivity;
import jp.agentec.abook.abv.ui.common.util.ABVToastUtil;
import jp.agentec.adf.util.DateTimeFormat;
import jp.agentec.adf.util.DateTimeUtil;
import jp.agentec.adf.util.FileUtil;
......@@ -73,10 +75,6 @@ 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:
case ABookKeys.CMD_UPDATE_TASK_REPORT:
......@@ -87,6 +85,7 @@ public class ABookCheckWebViewHelper extends ABookHelper {
case ABookKeys.CMD_LOCAL_SAVE_TASK_REPORT:
insertOrUpdateTaskReport(taskKey, enableReportHistory, operationId, contentId, param, contentPath, reportType, taskReportLevel, false);
copyTaskAttachedMovie(operationId, contentId, taskKey, taskReportLevel);
ABVToastUtil.showMakeText(context, R.string.msg_temp_save_result, Toast.LENGTH_SHORT);
mFinishCallback.callback(true);
break;
case ABookKeys.CMD_DELETE_TASK_REPORT:
......
......@@ -537,7 +537,7 @@ public class CheckOZDViewActivity extends ABVContentViewActivity {
param.append("export.mode=silent#");
param.append("export.filename=" + FileUtil.getFilenameWithoutExt(mSaveOzdTempFileName) + "#");
// #32926 作業報告画面改善 start
param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "/" + mTaskReportLevel + "#");
param.append("export.path=" + OzdFileHelper.getTempTaskDirPath(contentId, mTaskKey) + "#");
// #32926 作業報告画面改善 end
param.append("export.confirmsave=false#");
param.append("export.format=ozd");
......
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