Commit 983574e5 by Kazuyuki Hida

報告の差戻が反映されていない不具合を修正

parent 612a724b
...@@ -49,4 +49,53 @@ public class TaskReportDto extends AbstractDto { ...@@ -49,4 +49,53 @@ public class TaskReportDto extends AbstractDto {
public String[] getKeyValues() { public String[] getKeyValues() {
return new String[] { "" + taskKey }; return new String[] { "" + taskKey };
} }
public LockInfo getLockInfo() {
return new LockInfo(
reportLockUserId,
reportLockUserName,
reportLockTime
);
}
public static class LockInfo {
public final String reportLockUserId;
public final String reportLockUserName;
public final Date reportLockTime;
public LockInfo(
String reportLockUserId,
String reportLockUserName,
Date reportLockTime
) {
this.reportLockUserId = reportLockUserId;
this.reportLockUserName = reportLockUserName;
this.reportLockTime = reportLockTime == null ? null : new Date(reportLockTime.getTime());
}
}
public SendBackInfo getSendBackInfo() {
return new SendBackInfo(
sendBackUserId,
sendBackUserName,
sendBackComment
);
}
public static class SendBackInfo {
public final String sendBackUserId;
public final String sendBackUserName;
public final String sendBackComment;
public SendBackInfo(
String sendBackUserId,
String sendBackUserName,
String sendBackComment
) {
this.sendBackUserId = sendBackUserId;
this.sendBackUserName = sendBackComment;
this.sendBackComment = sendBackComment;
}
}
} }
...@@ -367,7 +367,21 @@ public class OperationLogic extends AbstractLogic { ...@@ -367,7 +367,21 @@ public class OperationLogic extends AbstractLogic {
* @param localSavedFlg * @param localSavedFlg
* @throws IOException * @throws IOException
*/ */
public void updateTaskReport(String taskKey, long operationId, long contentId, int taskReportLevel, int enableReport, JSONObject taskReportJson, String localAttachedFileName, boolean attachedChangeFlag, boolean dataSendFlg, boolean localSavedFlg) throws IOException { public void updateTaskReport(
String taskKey,
long operationId,
long contentId,
int taskReportLevel,
int enableReport,
JSONObject taskReportJson,
String localAttachedFileName,
boolean attachedChangeFlag,
boolean dataSendFlg,
boolean localSavedFlg,
TaskReportDto.SendBackInfo sendBackInfo,
TaskReportDto.LockInfo lockInfo,
int taskStatus
) throws IOException {
TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey, taskReportLevel); TaskReportDto taskReportDto = mTaskReportDao.getTaskReport(taskKey, taskReportLevel);
if (taskReportDto == null) { if (taskReportDto == null) {
//TODO error? //TODO error?
...@@ -398,6 +412,18 @@ public class OperationLogic extends AbstractLogic { ...@@ -398,6 +412,18 @@ public class OperationLogic extends AbstractLogic {
taskReportDto.localAttachedFileName = localAttachedFileName; taskReportDto.localAttachedFileName = localAttachedFileName;
} }
if (sendBackInfo != null) {
taskReportDto.sendBackUserId = sendBackInfo.sendBackUserId;
taskReportDto.sendBackUserName = sendBackInfo.sendBackUserName;
taskReportDto.sendBackComment = sendBackInfo.sendBackComment;
}
if (lockInfo != null) {
taskReportDto.reportLockUserId = lockInfo.reportLockUserId;
taskReportDto.reportLockUserName = lockInfo.reportLockUserName;
taskReportDto.reportLockTime = lockInfo.reportLockTime;
}
taskReportDto.taskStatus = taskStatus;
mTaskReportDao.update(taskReportDto); mTaskReportDao.update(taskReportDto);
String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey); String tempDirPath = ABVEnvironment.getInstance().getTempTaskDirPath(contentId, taskKey);
......
...@@ -1056,9 +1056,21 @@ public class OperationListActivity extends OperationActivity { ...@@ -1056,9 +1056,21 @@ public class OperationListActivity extends OperationActivity {
} else { } else {
// 更新 // 更新
// jsonDataが空で入る場合、taskReportJsonをnullで登録 // jsonDataが空で入る場合、taskReportJsonをnullで登録
mOperationLogic.updateTaskReport(serverTaskDto.taskKey, operationId, operationContentDto.contentId, mOperationLogic.updateTaskReport(
serverTaskReportDto.taskReportLevel, serverTaskReportDto.enableReport, serverTaskDto.taskKey,
taskReportJson, attachedFileName, false, false, localTaskReportDto.localSavedFlg); operationId,
operationContentDto.contentId,
serverTaskReportDto.taskReportLevel,
serverTaskReportDto.enableReport,
taskReportJson,
attachedFileName,
false,
false,
localTaskReportDto.localSavedFlg,
serverTaskReportDto.getSendBackInfo(),
serverTaskReportDto.getLockInfo(),
serverTaskReportDto.taskStatus
);
} }
} }
} }
......
...@@ -370,10 +370,35 @@ public class ABookCheckWebViewHelper extends ABookHelper { ...@@ -370,10 +370,35 @@ public class ABookCheckWebViewHelper extends ABookHelper {
TaskReportDto taskReportDto = mOperationLogic.getTaskReport(taskKey, taskReportLevel); TaskReportDto taskReportDto = mOperationLogic.getTaskReport(taskKey, taskReportLevel);
if (taskReportDto != null) { if (taskReportDto != null) {
// 更新 // 更新
mOperationLogic.updateTaskReport(taskReportDto.taskKey, operationId, contentId, taskReportLevel, Constant.EnableEditReport.YES, taskReportJson, null, attachedChangeFlag, localSavedFlg ? false : true, localSavedFlg); mOperationLogic.updateTaskReport(
taskReportDto.taskKey,
operationId,
contentId,
taskReportLevel,
Constant.EnableEditReport.YES,
taskReportJson,
null,
attachedChangeFlag,
localSavedFlg ? false : true,
localSavedFlg,
taskReportDto.getSendBackInfo(),
taskReportDto.getLockInfo(),
taskReportDto.taskStatus
);
} else { } else {
// 登録 // 登録
mOperationLogic.insertTaskReport(taskKey, operationId, contentId, taskReportLevel, Constant.EnableEditReport.YES, taskReportJson, null, attachedChangeFlag, localSavedFlg ? false : true, localSavedFlg); mOperationLogic.insertTaskReport(
taskKey,
operationId,
contentId,
taskReportLevel,
Constant.EnableEditReport.YES,
taskReportJson,
null,
attachedChangeFlag,
localSavedFlg ? false : true,
localSavedFlg
);
} }
mOperationLogic.createJsonForOperationContent(operationId, contentPath, false); mOperationLogic.createJsonForOperationContent(operationId, contentPath, false);
copyTaskAttachedMovie(operationId, contentId, taskKey, taskReportLevel); copyTaskAttachedMovie(operationId, contentId, taskKey, taskReportLevel);
......
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