Commit 30c2a398 by Jeong Gilmo

Merge branch 'feature/1.0.1' into feature/1.0.1_33006

parents ec42bc8b 3144d053
...@@ -211,7 +211,6 @@ public class OperationDao extends AbstractDao { ...@@ -211,7 +211,6 @@ public class OperationDao extends AbstractDao {
delete("t_task_report", null, null); delete("t_task_report", null, null);
delete("t_task_report_send", null, null); delete("t_task_report_send", null, null);
delete("t_task_report_items", null, null); delete("t_task_report_items", null, null);
delete("t_inspect_task_report", null, null);
delete("m_worker_group", null, null); delete("m_worker_group", null, null);
delete("r_task_worker_group", null, null); delete("r_task_worker_group", null, null);
} }
...@@ -241,21 +240,21 @@ public class OperationDao extends AbstractDao { ...@@ -241,21 +240,21 @@ public class OperationDao extends AbstractDao {
sql.append(" top.enable_report_update, "); sql.append(" top.enable_report_update, ");
sql.append(" CASE "); sql.append(" CASE ");
sql.append(" WHEN report_type = 1 THEN ( "); sql.append(" WHEN report_type = 1 THEN ( ");
sql.append(" SELECT strftime('%Y/%m/%d %H:%M', datetime(ti.report_start_date, 'localtime')) || ' ~ ' || strftime('%Y/%m/%d %H:%M', datetime(ti.report_end_date, 'localtime')) "); sql.append(" SELECT strftime('%Y/%m/%d %H:%M', datetime(ttr.report_start_date, 'localtime')) || ' ~ ' || strftime('%Y/%m/%d %H:%M', datetime(ttr.report_end_date, 'localtime')) ");
sql.append(" FROM t_task tt "); sql.append(" FROM t_task tt ");
sql.append(" INNER JOIN t_inspect_task_report ti "); sql.append(" INNER JOIN t_task_report ttr ");
sql.append(" ON tt.task_key = ti.task_key "); sql.append(" ON tt.task_key = ttr.task_key ");
sql.append(" AND tt.del_flg = 0 "); sql.append(" AND tt.del_flg = 0 ");
//sql.append(" AND datetime(ti.report_start_date) <= datetime('" + curDate + "') "); //sql.append(" AND datetime(ttr.report_start_date) <= datetime('" + curDate + "') ");
sql.append(" AND datetime(ti.report_end_date) >= datetime('" + curDate + "') "); sql.append(" AND datetime(ttr.report_end_date) >= datetime('" + curDate + "') ");
sql.append(" WHERE tt.operation_id = top.operation_id "); sql.append(" WHERE tt.operation_id = top.operation_id ");
sql.append(" ORDER BY ti.report_start_date ASC LIMIT 1 ) "); sql.append(" ORDER BY ttr.report_start_date ASC LIMIT 1 ) ");
sql.append(" ELSE '' "); sql.append(" ELSE '' ");
sql.append(" END AS report_period, "); sql.append(" END AS report_period, ");
sql.append(" CASE "); sql.append(" CASE ");
sql.append(" WHEN report_type = 1 THEN ( "); sql.append(" WHEN report_type = 1 THEN ( ");
sql.append(" SELECT count(*) "); sql.append(" SELECT count(*) ");
sql.append(" FROM t_inspect_task_report "); sql.append(" FROM t_task_report ");
sql.append(" WHERE task_key = (SELECT task_key FROM t_task WHERE operation_id = top.operation_id LIMIT 1) ) "); sql.append(" WHERE task_key = (SELECT task_key FROM t_task WHERE operation_id = top.operation_id LIMIT 1) ) ");
sql.append(" ELSE 0 "); sql.append(" ELSE 0 ");
sql.append(" END AS report_count, "); sql.append(" END AS report_count, ");
......
...@@ -115,6 +115,5 @@ public class TaskDao extends AbstractDao { ...@@ -115,6 +115,5 @@ public class TaskDao extends AbstractDao {
delete("t_task", "task_key=?", dto.getKeyValues()); delete("t_task", "task_key=?", dto.getKeyValues());
delete("t_task_report", "task_key=?", dto.getKeyValues()); delete("t_task_report", "task_key=?", dto.getKeyValues());
delete("t_task_report_items", "task_key=?", dto.getKeyValues()); delete("t_task_report_items", "task_key=?", dto.getKeyValues());
delete("t_inspect_task_report", "task_key=?", new String[] { dto.taskKey });
} }
} }
\ No newline at end of file
...@@ -297,7 +297,7 @@ public class TaskReportDao extends AbstractDao { ...@@ -297,7 +297,7 @@ public class TaskReportDao extends AbstractDao {
* @return * @return
*/ */
public String getRoutineTaskReportAttachedFileName(String taskKey, int taskReportId, String reportStartDate) { public String getRoutineTaskReportAttachedFileName(String taskKey, int taskReportId, String reportStartDate) {
return rawQueryGetString("select local_attached_file_name from t_inspect_task_report where task_key=? and task_report_id=? and datetime(report_start_date)=datetime(?)", new String[]{ taskKey, "" + taskReportId, reportStartDate }); return rawQueryGetString("select local_attached_file_name from t_task_report where task_key=? and task_report_id=? and datetime(report_start_date)=datetime(?)", new String[]{ taskKey, "" + taskReportId, reportStartDate });
} }
/** /**
......
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