[EDIT]メニュー画面で現在高の表示をできる用にしました。
This commit is contained in:
@@ -25,6 +25,8 @@ public class GoalModel {
|
||||
private Integer goalComplete;
|
||||
|
||||
private Integer achievementRate; // 達成率
|
||||
|
||||
private Integer currentAmount; // 現在の資産
|
||||
|
||||
public static GoalModel convertFrom(GoalEntity goalEntity) {
|
||||
return new GoalModel(
|
||||
@@ -34,7 +36,7 @@ public class GoalModel {
|
||||
goalEntity.getTargetAmount(),
|
||||
goalEntity.getDeadline(),
|
||||
goalEntity.getGoalComplete(),
|
||||
null);
|
||||
null,null);
|
||||
}
|
||||
|
||||
public static GoalEntity convertTo(GoalModel goalModel) {
|
||||
@@ -56,7 +58,7 @@ public class GoalModel {
|
||||
goalForm.getTargetAmount(),
|
||||
goalForm.getDeadline(),
|
||||
goalForm.getGoalComplete()
|
||||
,null);
|
||||
,null,null);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -56,7 +56,8 @@ public class GoalServiceImpl implements GoalService {
|
||||
goalModel.getTargetAmount(),
|
||||
goalModel.getDeadline(),
|
||||
goalModel.getGoalComplete(),
|
||||
achievementRate);
|
||||
achievementRate,
|
||||
currentAmount);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -344,6 +344,8 @@ public class TransactionController {
|
||||
UserForm userForm = UserForm.convertFrom(userService.findByUserId(loginUser.getUserId()));
|
||||
|
||||
model.addAttribute("achievementRate", goalForm.getAchievementRate());
|
||||
|
||||
model.addAttribute("currentAmount", goalForm.getCurrentAmount());
|
||||
|
||||
model.addAttribute("targetAmount", goalForm.getTargetAmount());
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ public class GoalForm {
|
||||
private Integer goalComplete;
|
||||
|
||||
private Integer achievementRate; // 達成率
|
||||
|
||||
private Integer currentAmount; // 現在の資産
|
||||
|
||||
public static GoalForm convertFrom(GoalModel goalModel) {
|
||||
return new GoalForm(
|
||||
@@ -38,7 +40,8 @@ public class GoalForm {
|
||||
goalModel.getTargetAmount(),
|
||||
goalModel.getDeadline(),
|
||||
goalModel.getGoalComplete(),
|
||||
goalModel.getAchievementRate());
|
||||
goalModel.getAchievementRate(),
|
||||
goalModel.getCurrentAmount());
|
||||
}
|
||||
|
||||
// public static List<GoalForm> convertFrom(List<GoalModel> goalModelList) {
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
<h1>目標詳細</h1>
|
||||
|
||||
<table>
|
||||
|
||||
<tr>
|
||||
<th>目標名</th>
|
||||
<td th:text="${goalForm.goalTitle}"></td>
|
||||
|
||||
@@ -118,6 +118,13 @@
|
||||
<span th:text="${targetAmount}"></span>
|
||||
<span>円</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>現在高</span>
|
||||
<span th:text="${currentAmount}"></span>
|
||||
<span>円</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>貯金額</span>
|
||||
<span th:text="${saving}"></span>
|
||||
|
||||
Reference in New Issue
Block a user