Merge branch 'n-kawahito' of https://gitea.it-college.co.jp/2026_09_5H_Spring_KIZAKI/Monegement into n-kawahito
This commit is contained in:
@@ -1,32 +0,0 @@
|
|||||||
package com.example.demo.app.presentation.form;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.example.demo.app.domain.model.AnalysisModel;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class AnalysisForm {
|
|
||||||
|
|
||||||
private Integer currentMonthTotalAmount;
|
|
||||||
private Integer previousMonthTotalAmount;
|
|
||||||
private Integer totalDifferenceAmount;
|
|
||||||
private List<CategoryAnalysisForm> categoryAnalysisFormList;
|
|
||||||
|
|
||||||
public static AnalysisForm convertFrom(
|
|
||||||
AnalysisModel analysisModel) {
|
|
||||||
|
|
||||||
return new AnalysisForm(
|
|
||||||
analysisModel.getCurrentMonthTotalAmount(),
|
|
||||||
analysisModel.getPreviousMonthTotalAmount(),
|
|
||||||
analysisModel.getTotalDifferenceAmount(),
|
|
||||||
CategoryAnalysisForm.convertFrom(
|
|
||||||
analysisModel.getCategoryAnalysisModelList()));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
package com.example.demo.app.presentation.form;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.example.demo.app.domain.model.CategoryAnalysisModel;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class CategoryAnalysisForm {
|
|
||||||
|
|
||||||
private String categoryName;
|
|
||||||
|
|
||||||
private Integer currentMonthAmount;
|
|
||||||
|
|
||||||
private Integer previousMonthAmount;
|
|
||||||
|
|
||||||
private Integer monthDifferenceAmount;
|
|
||||||
|
|
||||||
private Integer courseLimitAmount;
|
|
||||||
|
|
||||||
private Integer courseDifferenceAmount;
|
|
||||||
|
|
||||||
public static CategoryAnalysisForm convertFrom(
|
|
||||||
|
|
||||||
CategoryAnalysisModel categoryAnalysisModel) {
|
|
||||||
return new CategoryAnalysisForm(
|
|
||||||
categoryAnalysisModel.getCategoryName(),
|
|
||||||
categoryAnalysisModel.getCurrentMonthAmount(),
|
|
||||||
categoryAnalysisModel.getPreviousMonthAmount(),
|
|
||||||
categoryAnalysisModel.getMonthDifferenceAmount(),
|
|
||||||
categoryAnalysisModel.getCourseLimitAmount(),
|
|
||||||
categoryAnalysisModel.getCourseDifferenceAmount());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<CategoryAnalysisForm> convertFrom(
|
|
||||||
List<CategoryAnalysisModel> categoryAnalysisModelList) {
|
|
||||||
|
|
||||||
return categoryAnalysisModelList.stream()
|
|
||||||
.map(CategoryAnalysisForm::convertFrom)
|
|
||||||
.toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user