delete("t_inspect_task_report","task_key=? and task_report_id=? and datetime(report_start_date)=datetime(?, 'utc')",newString[]{dto.taskKey,""+dto.taskReportId,DateTimeUtil.toString(dto.reportStartDate,DateTimeFormat.yyyyMMddHHmmss_hyphen)});
returnrawQueryGetDto("select * from t_inspect_task_report where task_key=? and task_report_id=? and datetime(report_start_date)=datetime(?, 'utc')",newString[]{taskKey,""+taskReportId,reportStartDate},RoutineTaskReportDto.class);
}
// public List<RoutineTaskReportDto> selectRoutineTaskReportByTaskKey(String taskKey) {
// return rawQueryGetDtoList("select * from t_inspect_task_report where task_key=?", new String[]{ taskKey }, RoutineTaskReportDto.class);
// }
//
// public List<RoutineTaskReportDto> getRoutineTaskReportByOperationId(Long operationId) {
// StringBuilder sb = new StringBuilder();
// sb.append(" select tr.* ");
// sb.append(" from t_inspect_task_report tr ");
// sb.append(" inner join ");
// sb.append(" t_task tt ");
// sb.append(" ON tt.task_key == tr.task_key ");
// sb.append(" WHERE tt.del_flg = 0");
// sb.append(" AND tt.operation_id = ?");
// sb.append(" ORDER BY task_report_id ASC, report_start_date ASC");
// return rawQueryGetDtoList(sb.toString(), new String[]{"" + operationId}, RoutineTaskReportDto.class);
// }
//
// public List<RoutineTaskReportDto> getSendableRoutineTaskReportData(long operationId) {
// StringBuilder sb = new StringBuilder();
// sb.append(" select * ");
// sb.append(" from t_inspect_task_report tr ");
// sb.append(" inner join ");
// sb.append(" t_task tt ");
// sb.append(" ON tr.task_key == tt.task_key");
// sb.append(" WHERE tr.data_send_flag = 1");
// sb.append(" AND tt.operation_id = ?");
// return rawQueryGetDtoList(sb.toString(), new String[]{ "" + operationId }, RoutineTaskReportDto.class);
// }
//
// public List<RoutineTaskReportDto> getSendableRoutineTaskReportData(long operationId, String taskKey) {
// public List<RoutineTaskReportDto> geRoutineTaskReportByTaskKey(String taskKey) {
// StringBuilder sb = new StringBuilder();
// sb.append(" SELECT * ");
// sb.append(" FROM t_inspect_task_report ");
// sb.append(" WHERE task_key = ? ");
// sb.append(" ORDER BY task_report_id, report_start_date ");
// return rawQueryGetDtoList(sb.toString(), new String[]{ taskKey }, RoutineTaskReportDto.class);
// }
// 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 });
@@ -105,6 +106,15 @@ public class TaskReportDao extends AbstractDao {
...
@@ -105,6 +106,15 @@ public class TaskReportDao extends AbstractDao {
returnrawQueryGetDto("select * from t_task_report where task_key=? AND task_report_level=?",newString[]{""+taskKey,""+taskReportLevel},TaskReportDto.class);
returnrawQueryGetDto("select * from t_task_report where task_key=? AND task_report_level=?",newString[]{""+taskKey,""+taskReportLevel},TaskReportDto.class);
returnrawQueryGetDtoList("select * from t_task_report where task_key=? ORDER BY task_report_id, report_start_date",newString[]{""+taskKey},TaskReportDto.class);
}
publicbooleanupdate(TaskReportDtodto){
publicbooleanupdate(TaskReportDtodto){
longcount=update("update t_task_report "
longcount=update("update t_task_report "
+"set "
+"set "
...
@@ -123,39 +133,6 @@ public class TaskReportDao extends AbstractDao {
...
@@ -123,39 +133,6 @@ public class TaskReportDao extends AbstractDao {
returncount>0;
returncount>0;
}
}
// public boolean updateRoutinTask(TaskReportDto dto, boolean reportedFlg) {
// long count;
// if (reportedFlg) {
// dto.reportedFlag = true;
//
// count = update("update t_inspect_task_report "
// + "set "
// + "report_end_date=?, "
// + "attached_file_name=?, "
// + "local_attached_file_name=?, "
// + "json_data=?, "
// + "data_send_flag=?, "
// + "attached_file_send_flag=?, "
// + "reported_flag=? "
// + "where task_key=? and task_report_id=? and datetime(report_start_date)=datetime(?)",
// dto.getUpdateValues());
// } else {
// count = update("update t_inspect_task_report "
// + "set "
// + "report_end_date=?, "
// + "attached_file_name=?, "
// + "local_attached_file_name=?, "
// + "json_data=?, "
// + "data_send_flag=?, "
// + "attached_file_send_flag=? "
// + "where task_key=? and task_report_id=? and datetime(report_start_date)=datetime(?)",
delete("t_task_report","task_key=? and task_report_level=? task_report_id=? and datetime(report_start_date)=datetime(?, 'utc')",newString[]{dto.taskKey,""+dto.taskReportLevel,""+dto.taskReportId,DateTimeUtil.toString(dto.reportStartDate,DateTimeFormat.yyyyMMddHHmmss_hyphen)});
delete("t_task_report","task_key=? and task_report_level=? task_report_id=? and datetime(report_start_date)=datetime(?, 'utc')",newString[]{dto.taskKey,""+dto.taskReportLevel,""+dto.taskReportId,DateTimeUtil.toString(dto.reportStartDate,DateTimeFormat.yyyyMMddHHmmss_hyphen)});
returnrawQueryGetDto("select * from t_inspect_task_report where task_key=? and task_report_id=? and datetime(report_start_date)=datetime(?, 'utc')",newString[]{taskKey,""+taskReportId,reportStartDate},TaskReportDto.class);
returnrawQueryGetDto("select * from t_task_report where task_key=? and task_report_id=? and datetime(report_start_date)=datetime(?, 'utc')",newString[]{taskKey,""+taskReportId,reportStartDate},TaskReportDto.class);
returnrawQueryGetString("select local_attached_file_name from t_inspect_task_report where task_key=? and task_report_id=? and datetime(report_start_date)=datetime(?)",newString[]{taskKey,""+taskReportId,reportStartDate});
returnrawQueryGetString("select local_attached_file_name from t_inspect_task_report where task_key=? and task_report_id=? and datetime(report_start_date)=datetime(?)",newString[]{taskKey,""+taskReportId,reportStartDate});