@@ -152,74 +152,70 @@ public class RoutineTaskReportDao extends AbstractDao {
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);
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});
}
// 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 });
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);
}
publicbooleanupdate(TaskReportDtodto){
...
...
@@ -114,44 +117,44 @@ public class TaskReportDao extends AbstractDao {
@@ -201,20 +204,16 @@ public class TaskReportDao extends AbstractDao {
returnrawQueryGetString("select local_attached_file_name from t_task_report where task_key=? AND task_report_level=?",newString[]{""+taskKey,""+taskReportLevel});
returnrawQueryGetDtoList("select * from t_task_report where task_key=? and task_report_level",newString[]{""+taskKey,""+taskReportLevel},TaskReportDto.class);
}
publicList<TaskReportDto>selectAll(){
returnrawQueryGetDtoList("select * from t_task_report",null,TaskReportDto.class);
}
publicvoiddeleteAll(){
delete("t_task_report",null,null);
}
/**
*
* データの存在チェック
* @param taskKey
* @param taskReportLevel
* @return
...
...
@@ -222,4 +221,146 @@ public class TaskReportDao extends AbstractDao {
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);
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});
private void sendTaskReportData(final ABVContentViewActivity context, final long operationId, final String taskKey, final int enableReportHistory, final boolean isDirection) {